From 34025cb5cc3e148d06946fe260c8e129fd1bbcfa Mon Sep 17 00:00:00 2001 From: Alexander Castillo Date: Fri, 2 Aug 2024 07:39:11 +0200 Subject: [PATCH 1/4] fix: Add hidden comment at start instead of end --- src/compare.ts | 623 +++++++++++++++++++++++++------------------------ 1 file changed, 313 insertions(+), 310 deletions(-) diff --git a/src/compare.ts b/src/compare.ts index c7200fb..1f42502 100644 --- a/src/compare.ts +++ b/src/compare.ts @@ -1,119 +1,120 @@ import * as console from "node:console"; import fs from "node:fs"; import path from "node:path"; -import { findMetafiles } from "./report"; -import type { CompareResult, Input, Report, TreeMapNode } from "./types"; -import { loadAnalysisJson, loadMetaFile } from "./utils"; +import {findMetafiles} from "./report"; +import type {CompareResult, Input, Report, TreeMapNode} from "./types"; +import {loadAnalysisJson, loadMetaFile} from "./utils"; export function compare(input: Input): void { - let hasAnyChange = false; - let output = `## πŸ“¦ esbuild Bundle Analysis for ${input.name} + let hasAnyChange = false; + let output = `## πŸ“¦ esbuild Bundle Analysis for ${input.name} This analysis was generated by [esbuild-bundle-analyzer](https://github.com/exoego/esbuild-bundle-analyzer). πŸ€– `; - const currentAnalysisPath = path.join( - process.cwd(), - input.analyzerDirectory, - "bundle_analysis.json", - ); - const current = loadAnalysisJson(currentAnalysisPath); - console.log(`Current analysis found in ${currentAnalysisPath}`, current); - const base = loadBaseAnalysisJson(input); - - const fileTree = buildFileTree(input); - - const allOutFiles: string[] = [ - ...new Set([...Object.keys(current), ...Object.keys(base)]), - ].sort(); - - const comparison: Array = allOutFiles.map((outfile) => { - const currentStats = current[outfile]; - const baseStats = base[outfile]; - console.log("Comparing", outfile, currentStats, baseStats); - - if (!currentStats) { - console.log("Deleted file", outfile); - hasAnyChange = true; - return { - ...baseStats, - baseBytes: -1, - remark: "deleted", - tree: undefined, - }; - } - - const tree = fileTree.get( - treeKey(currentStats.metafile, currentStats.outfile), - ); - if (!baseStats) { - console.log("New file", outfile); - hasAnyChange = true; - return { ...currentStats, baseBytes: -1, remark: "added", tree }; - } - - const diff = currentStats.bytes - baseStats.bytes; - if (diff !== 0) { - console.log("Changed file", outfile, diff); - hasAnyChange = true; - } else { - console.log("No change", outfile); - } - return { - ...currentStats, - baseBytes: baseStats.bytes, - tree, - remark: Math.sign(diff) ? "increased" : "decreased", - }; - }); - console.log("Comparison done.", comparison); - - if (hasAnyChange) { - output += markdownTable( - comparison, - input.percentExtraAttention, - input.showNoChange, - ); - output += noChangesTable(comparison, input.showNoChange); - output += fileSizeTable(comparison, input.topNLargestPaths); - output += detail(input); - } else { - output += "This PR introduced no changes to the esbuild bundle! πŸ™Œ"; - } - - // we add this tag so that our action can be able to easily and - // consistently find the right comment to edit as more commits are pushed. - output += ``; - - writeComment(input, output); + const currentAnalysisPath = path.join( + process.cwd(), + input.analyzerDirectory, + "bundle_analysis.json", + ); + const current = loadAnalysisJson(currentAnalysisPath); + console.log(`Current analysis found in ${currentAnalysisPath}`, current); + const base = loadBaseAnalysisJson(input); + + const fileTree = buildFileTree(input); + + const allOutFiles: string[] = [ + ...new Set([...Object.keys(current), ...Object.keys(base)]), + ].sort(); + + const comparison: Array = allOutFiles.map((outfile) => { + const currentStats = current[outfile]; + const baseStats = base[outfile]; + console.log("Comparing", outfile, currentStats, baseStats); + + if (!currentStats) { + console.log("Deleted file", outfile); + hasAnyChange = true; + return { + ...baseStats, + baseBytes: -1, + remark: "deleted", + tree: undefined, + }; + } + + const tree = fileTree.get( + treeKey(currentStats.metafile, currentStats.outfile), + ); + if (!baseStats) { + console.log("New file", outfile); + hasAnyChange = true; + return {...currentStats, baseBytes: -1, remark: "added", tree}; + } + + const diff = currentStats.bytes - baseStats.bytes; + if (diff !== 0) { + console.log("Changed file", outfile, diff); + hasAnyChange = true; + } else { + console.log("No change", outfile); + } + return { + ...currentStats, + baseBytes: baseStats.bytes, + tree, + remark: Math.sign(diff) ? "increased" : "decreased", + }; + }); + console.log("Comparison done.", comparison); + + if (hasAnyChange) { + output += markdownTable( + comparison, + input.percentExtraAttention, + input.showNoChange, + ); + output += noChangesTable(comparison, input.showNoChange); + output += fileSizeTable(comparison, input.topNLargestPaths); + output += detail(input); + } else { + output += "This PR introduced no changes to the esbuild bundle! πŸ™Œ"; + } + + // we add this tag so that our action can be able to easily and + // consistently find the right comment to edit as more commits are pushed. + output = ` +` + output; + + writeComment(input, output); } function treeKey(metafile: string, outfile: string): string { - return `${metafile} -> ${outfile}`; + return `${metafile} -> ${outfile}`; } // Write the output to a file which is later read in // as comment contents by the actions workflow. function writeComment(input: Input, output: string): void { - console.log("Writing comment to file.", output); - fs.mkdirSync(path.join(process.cwd(), input.analyzerDirectory), { - recursive: true, - }); - fs.writeFileSync( - path.join( - process.cwd(), - input.analyzerDirectory, - "bundle_analysis_comment.txt", - ), - output.trim(), - ); + console.log("Writing comment to file.", output); + fs.mkdirSync(path.join(process.cwd(), input.analyzerDirectory), { + recursive: true, + }); + fs.writeFileSync( + path.join( + process.cwd(), + input.analyzerDirectory, + "bundle_analysis_comment.txt", + ), + output.trim(), + ); } function detail(input: Input): string { - if (!input.showDetails) { - return ""; - } - return `\n
+ if (!input.showDetails) { + return ""; + } + return `\n
Details

Next to the size is how much the size has increased or decreased compared with the base branch of this PR.

    @@ -127,139 +128,140 @@ function detail(input: Input): string { } function loadBaseAnalysisJson(input: Input): Report { - try { - const baseAnalysisPath = path.join( - process.cwd(), - input.analyzerDirectory, - "base/bundle/bundle_analysis.json", - ); - const report = loadAnalysisJson(baseAnalysisPath); - console.info(`Base analysis found in ${baseAnalysisPath}`, report); - return report; - } catch (e) { - console.warn( - "No base analysis found. First setup or all artifacts are expired.", - ); - return {}; - } + try { + const baseAnalysisPath = path.join( + process.cwd(), + input.analyzerDirectory, + "base/bundle/bundle_analysis.json", + ); + const report = loadAnalysisJson(baseAnalysisPath); + console.info(`Base analysis found in ${baseAnalysisPath}`, report); + return report; + } catch (e) { + console.warn( + "No base analysis found. First setup or all artifacts are expired.", + ); + return {}; + } } function buildFileTree(input: Input) { - function buildRoot( - input: Record, - ): TreeMapNode { - const root: TreeMapNode = { name: "", path: "", value: 0, children: [] }; - for (const [filePath, { bytesInOutput }] of Object.entries(input)) { - const directories = filePath.split("/"); - buildNode(root, directories, bytesInOutput); - } - return root; - } - - function buildNode( - node: TreeMapNode, - paths: Array, - value: number, - ): void { - const first = paths.shift(); - if (first === undefined) { - // leaf node (file) - node.value += value; - return; - } - let child = node.children.find((child) => child.name === first); - if (!child) { - child = { - name: first, - path: `${node.path}/${first}`.replace(/^\//, ""), - value: 0, - children: [], - }; - node.children.push(child); - } - node.value += value; - buildNode(child, paths, value); - } - - const trees = new Map(); - if (input.topNLargestPaths <= 0) { - // Skip building tree if we don't need it. - return trees; - } - for (const { relativePath, absolutePath } of findMetafiles(input)) { - const metafileJson = loadMetaFile(absolutePath); - for (const [outfile, buildMeta] of Object.entries(metafileJson.outputs)) { - const tree = buildRoot(buildMeta.inputs); - trees.set(treeKey(relativePath, outfile), tree); - - fs.writeFileSync( - path.join(process.cwd(), input.analyzerDirectory, "tree.json"), - JSON.stringify(tree, null, 2), - ); - } - } - return trees; + function buildRoot( + input: Record, + ): TreeMapNode { + const root: TreeMapNode = {name: "", path: "", value: 0, children: []}; + for (const [filePath, {bytesInOutput}] of Object.entries(input)) { + const directories = filePath.split("/"); + buildNode(root, directories, bytesInOutput); + } + return root; + } + + function buildNode( + node: TreeMapNode, + paths: Array, + value: number, + ): void { + const first = paths.shift(); + if (first === undefined) { + // leaf node (file) + node.value += value; + return; + } + let child = node.children.find((child) => child.name === first); + if (!child) { + child = { + name: first, + path: `${node.path}/${first}`.replace(/^\//, ""), + value: 0, + children: [], + }; + node.children.push(child); + } + node.value += value; + buildNode(child, paths, value); + } + + const trees = new Map(); + if (input.topNLargestPaths <= 0) { + // Skip building tree if we don't need it. + return trees; + } + for (const {relativePath, absolutePath} of findMetafiles(input)) { + const metafileJson = loadMetaFile(absolutePath); + for (const [outfile, buildMeta] of Object.entries(metafileJson.outputs)) { + const tree = buildRoot(buildMeta.inputs); + trees.set(treeKey(relativePath, outfile), tree); + + fs.writeFileSync( + path.join(process.cwd(), input.analyzerDirectory, "tree.json"), + JSON.stringify(tree, null, 2), + ); + } + } + return trees; } const spacer = "Β "; + function filesize(bytes: number): string { - const sign = bytes < 0 ? "-" : ""; - const n = Math.abs(bytes); - if (n < 1000) { - return `${sign}${n}${spacer}B`; - } - if (n < 1000 * 1000) { - return `${sign}${(n / 1000).toFixed(2)}${spacer}KB`; - } - if (n < 1000 * 1000 * 1000) { - return `${sign}${(n / 1000 / 1000).toFixed(2)}${spacer}MB`; - } - if (n < 1000 * 1000 * 1000 * 1000) { - return `${sign}${(n / 1000 / 1000 / 1000).toFixed(2)}${spacer}GB`; - } - throw new Error("Too large file size!! Are you sure?"); + const sign = bytes < 0 ? "-" : ""; + const n = Math.abs(bytes); + if (n < 1000) { + return `${sign}${n}${spacer}B`; + } + if (n < 1000 * 1000) { + return `${sign}${(n / 1000).toFixed(2)}${spacer}KB`; + } + if (n < 1000 * 1000 * 1000) { + return `${sign}${(n / 1000 / 1000).toFixed(2)}${spacer}MB`; + } + if (n < 1000 * 1000 * 1000 * 1000) { + return `${sign}${(n / 1000 / 1000 / 1000).toFixed(2)}${spacer}GB`; + } + throw new Error("Too large file size!! Are you sure?"); } const shouldShowBundle = (d: CompareResult, showNoChange: boolean) => - showNoChange || d.bytes - d.baseBytes !== 0; + showNoChange || d.bytes - d.baseBytes !== 0; function markdownTable( - data: Array, - redThreshold: number, - showNoChange: boolean, + data: Array, + redThreshold: number, + showNoChange: boolean, ): string { - const rows = data - .filter((d) => shouldShowBundle(d, showNoChange)) - .map((d) => { - return `${d.metafile} | ${d.outfile} | ${renderSize(d)} | ${renderNote( - d, - redThreshold, - )}\n`; - }) - .join(""); - - return ` + const rows = data + .filter((d) => shouldShowBundle(d, showNoChange)) + .map((d) => { + return `${d.metafile} | ${d.outfile} | ${renderSize(d)} | ${renderNote( + d, + redThreshold, + )}\n`; + }) + .join(""); + + return ` Meta File | Out File | Size (raw) | Note ----------|----------|-----------:|------ ${rows}`; } function noChangesTable( - data: Array, - showNoChange: boolean, + data: Array, + showNoChange: boolean, ): string { - const noChangeBundles = data.filter( - (d) => !shouldShowBundle(d, showNoChange), - ); - const rows = noChangeBundles - .map((d) => { - return `${d.metafile} | ${d.outfile} | ${renderSize(d)} | βœ… No change\n`; - }) - .join(""); - if (noChangeBundles.length === 0) { - return ""; - } - return ` + const noChangeBundles = data.filter( + (d) => !shouldShowBundle(d, showNoChange), + ); + const rows = noChangeBundles + .map((d) => { + return `${d.metafile} | ${d.outfile} | ${renderSize(d)} | βœ… No change\n`; + }) + .join(""); + if (noChangeBundles.length === 0) { + return ""; + } + return `
    ${noChangeBundles.length} bundles with no change are hidden. @@ -276,134 +278,135 @@ ${rows} * Dig nodes until the depth of 3. */ function findLargeDirectories(root: TreeMapNode, N: number) { - const nodes: TreeMapNode[] = []; - const queue: Array<{ node: TreeMapNode; depth: number }> = [ - { node: root, depth: 0 }, - ]; - while (queue.length > 0) { - const shift = queue.shift(); - if (!shift) { - break; - } - const { node, depth } = shift; - if (depth === 3) { - nodes.push(node); - continue; - } - if (node.children.length === 0) { - nodes.push(node); - } else { - for (const item of node.children) { - queue.push({ node: item, depth: depth + 1 }); - } - } - } - const largeNodes = nodes.sort((a, b) => b.value - a.value).slice(0, N); - return { - largeNodes, - hasOther: nodes.length > N, - }; + const nodes: TreeMapNode[] = []; + const queue: Array<{ node: TreeMapNode; depth: number }> = [ + {node: root, depth: 0}, + ]; + while (queue.length > 0) { + const shift = queue.shift(); + if (!shift) { + break; + } + const {node, depth} = shift; + if (depth === 3) { + nodes.push(node); + continue; + } + if (node.children.length === 0) { + nodes.push(node); + } else { + for (const item of node.children) { + queue.push({node: item, depth: depth + 1}); + } + } + } + const largeNodes = nodes.sort((a, b) => b.value - a.value).slice(0, N); + return { + largeNodes, + hasOther: nodes.length > N, + }; } function fixedPercent(n: number, d: number): number { - return Number.parseFloat(((n / d) * 100).toFixed(1)); + return Number.parseFloat(((n / d) * 100).toFixed(1)); } function fileSizeTable( - data: Array, - topNLargestPaths: number, + data: Array, + topNLargestPaths: number, ): string { - if (data.length === 0 || topNLargestPaths <= 0) { - return ""; - } - let output = ""; - output += "
    \n"; - output += "Largest paths\n"; - output += `These visualization shows top ${topNLargestPaths} largest paths in the bundle.\n`; - for (const d of data) { - output += "\n"; - output += `## Meta file: ${d.metafile}, Out file: ${d.outfile}\n`; - if (!d.tree) { - output += "οΈοΈπŸ—‘οΈDeleted\n"; - continue; - } - output += "| Path | Size |\n"; - output += "|------|-------|\n"; - const totalSize = d.tree.value; - const { largeNodes, hasOther } = findLargeDirectories( - d.tree, - topNLargestPaths, - ); - for (const { path, value } of largeNodes) { - const percent = fixedPercent(value, totalSize); - output += `| ${path} | ${renderBar(percent, value)} |\n`; - } - if (hasOther) { - const otherSize = totalSize - largeNodes[0].value; - const otherPercent = fixedPercent(otherSize, totalSize); - output += `| (other) | ${renderBar(otherPercent, otherSize)} |\n`; - } - } - output += "
    \n"; - return output; + if (data.length === 0 || topNLargestPaths <= 0) { + return ""; + } + let output = ""; + output += "
    \n"; + output += "Largest paths\n"; + output += `These visualization shows top ${topNLargestPaths} largest paths in the bundle.\n`; + for (const d of data) { + output += "\n"; + output += `## Meta file: ${d.metafile}, Out file: ${d.outfile}\n`; + if (!d.tree) { + output += "οΈοΈπŸ—‘οΈDeleted\n"; + continue; + } + output += "| Path | Size |\n"; + output += "|------|-------|\n"; + const totalSize = d.tree.value; + const {largeNodes, hasOther} = findLargeDirectories( + d.tree, + topNLargestPaths, + ); + for (const {path, value} of largeNodes) { + const percent = fixedPercent(value, totalSize); + output += `| ${path} | ${renderBar(percent, value)} |\n`; + } + if (hasOther) { + const otherSize = totalSize - largeNodes[0].value; + const otherPercent = fixedPercent(otherSize, totalSize); + output += `| (other) | ${renderBar(otherPercent, otherSize)} |\n`; + } + } + output += "
    \n"; + return output; } function renderBar(percent: number, bytes: number): string { - const bar = progress(percent / 100); - return `\${{\\color{Goldenrod}{ ${bar} }}}\$ ${percent.toFixed( - 1, - )}%, ${filesize(bytes)}`; + const bar = progress(percent / 100); + return `\${{\\color{Goldenrod}{ ${bar} }}}\$ ${percent.toFixed( + 1, + )}%, ${filesize(bytes)}`; } // Block progression is 1/8 = 0.125 const blocks = ["", "▏", "β–Ž", "▍", "β–Œ", "β–‹", "β–Š", "β–‰", "β–ˆ"]; const progression = 1 / (blocks.length - 1); + function progress(value: number, length = 25, vmin = 0.0, vmax = 1.0) { - const v = value * length; - const integerPart = Math.floor(v); - const fractionalPart = v - integerPart; - const i = Math.round( - (progression * Math.floor(fractionalPart / progression)) / progression, - ); - return "β–ˆ".repeat(integerPart) + blocks[i]; + const v = value * length; + const integerPart = Math.floor(v); + const fractionalPart = v - integerPart; + const i = Math.round( + (progression * Math.floor(fractionalPart / progression)) / progression, + ); + return "β–ˆ".repeat(integerPart) + blocks[i]; } function renderSize(d: CompareResult): string { - return filesize(d.bytes); + return filesize(d.bytes); } function renderNote(d: CompareResult, redThreshold: number): string { - if (d.remark === "deleted") { - return "πŸ—‘οΈ Deleted"; - } - if (d.remark === "added") { - return "πŸ†• Added"; - } - const diff = d.bytes - d.baseBytes; - if (diff !== 0) { - const percentChange = (diff / d.baseBytes) * 100; - return `${renderStatusIndicator(percentChange, redThreshold)}${filesize( - diff, - )} (${sign(percentChange)}${percentChange.toFixed(1)}%)`; - } - return "βœ… No change"; + if (d.remark === "deleted") { + return "πŸ—‘οΈ Deleted"; + } + if (d.remark === "added") { + return "πŸ†• Added"; + } + const diff = d.bytes - d.baseBytes; + if (diff !== 0) { + const percentChange = (diff / d.baseBytes) * 100; + return `${renderStatusIndicator(percentChange, redThreshold)}${filesize( + diff, + )} (${sign(percentChange)}${percentChange.toFixed(1)}%)`; + } + return "βœ… No change"; } function sign(num: number): string { - return num < 0 ? "" : "+"; + return num < 0 ? "" : "+"; } function renderStatusIndicator( - percentChange: number, - redThreshold: number, + percentChange: number, + redThreshold: number, ): string { - let res: string; - if (percentChange > 0 && percentChange < redThreshold) { - res = "⚠️"; - } else if (percentChange >= redThreshold) { - res = "‼️"; - } else { - res = "βœ… "; - } - return `${res} ${sign(percentChange)}`; + let res: string; + if (percentChange > 0 && percentChange < redThreshold) { + res = "⚠️"; + } else if (percentChange >= redThreshold) { + res = "‼️"; + } else { + res = "βœ… "; + } + return `${res} ${sign(percentChange)}`; } From 9649e315aec655ea3df1f9f20a72040dec9b33ac Mon Sep 17 00:00:00 2001 From: Alexander Castillo Date: Fri, 2 Aug 2024 07:41:08 +0200 Subject: [PATCH 2/4] fix: formatting --- src/compare.ts | 623 ++++++++++++++++++++++++------------------------- 1 file changed, 310 insertions(+), 313 deletions(-) diff --git a/src/compare.ts b/src/compare.ts index 1f42502..c7200fb 100644 --- a/src/compare.ts +++ b/src/compare.ts @@ -1,120 +1,119 @@ import * as console from "node:console"; import fs from "node:fs"; import path from "node:path"; -import {findMetafiles} from "./report"; -import type {CompareResult, Input, Report, TreeMapNode} from "./types"; -import {loadAnalysisJson, loadMetaFile} from "./utils"; +import { findMetafiles } from "./report"; +import type { CompareResult, Input, Report, TreeMapNode } from "./types"; +import { loadAnalysisJson, loadMetaFile } from "./utils"; export function compare(input: Input): void { - let hasAnyChange = false; - let output = `## πŸ“¦ esbuild Bundle Analysis for ${input.name} + let hasAnyChange = false; + let output = `## πŸ“¦ esbuild Bundle Analysis for ${input.name} This analysis was generated by [esbuild-bundle-analyzer](https://github.com/exoego/esbuild-bundle-analyzer). πŸ€– `; - const currentAnalysisPath = path.join( - process.cwd(), - input.analyzerDirectory, - "bundle_analysis.json", - ); - const current = loadAnalysisJson(currentAnalysisPath); - console.log(`Current analysis found in ${currentAnalysisPath}`, current); - const base = loadBaseAnalysisJson(input); - - const fileTree = buildFileTree(input); - - const allOutFiles: string[] = [ - ...new Set([...Object.keys(current), ...Object.keys(base)]), - ].sort(); - - const comparison: Array = allOutFiles.map((outfile) => { - const currentStats = current[outfile]; - const baseStats = base[outfile]; - console.log("Comparing", outfile, currentStats, baseStats); - - if (!currentStats) { - console.log("Deleted file", outfile); - hasAnyChange = true; - return { - ...baseStats, - baseBytes: -1, - remark: "deleted", - tree: undefined, - }; - } - - const tree = fileTree.get( - treeKey(currentStats.metafile, currentStats.outfile), - ); - if (!baseStats) { - console.log("New file", outfile); - hasAnyChange = true; - return {...currentStats, baseBytes: -1, remark: "added", tree}; - } - - const diff = currentStats.bytes - baseStats.bytes; - if (diff !== 0) { - console.log("Changed file", outfile, diff); - hasAnyChange = true; - } else { - console.log("No change", outfile); - } - return { - ...currentStats, - baseBytes: baseStats.bytes, - tree, - remark: Math.sign(diff) ? "increased" : "decreased", - }; - }); - console.log("Comparison done.", comparison); - - if (hasAnyChange) { - output += markdownTable( - comparison, - input.percentExtraAttention, - input.showNoChange, - ); - output += noChangesTable(comparison, input.showNoChange); - output += fileSizeTable(comparison, input.topNLargestPaths); - output += detail(input); - } else { - output += "This PR introduced no changes to the esbuild bundle! πŸ™Œ"; - } - - // we add this tag so that our action can be able to easily and - // consistently find the right comment to edit as more commits are pushed. - output = ` -` + output; - - writeComment(input, output); + const currentAnalysisPath = path.join( + process.cwd(), + input.analyzerDirectory, + "bundle_analysis.json", + ); + const current = loadAnalysisJson(currentAnalysisPath); + console.log(`Current analysis found in ${currentAnalysisPath}`, current); + const base = loadBaseAnalysisJson(input); + + const fileTree = buildFileTree(input); + + const allOutFiles: string[] = [ + ...new Set([...Object.keys(current), ...Object.keys(base)]), + ].sort(); + + const comparison: Array = allOutFiles.map((outfile) => { + const currentStats = current[outfile]; + const baseStats = base[outfile]; + console.log("Comparing", outfile, currentStats, baseStats); + + if (!currentStats) { + console.log("Deleted file", outfile); + hasAnyChange = true; + return { + ...baseStats, + baseBytes: -1, + remark: "deleted", + tree: undefined, + }; + } + + const tree = fileTree.get( + treeKey(currentStats.metafile, currentStats.outfile), + ); + if (!baseStats) { + console.log("New file", outfile); + hasAnyChange = true; + return { ...currentStats, baseBytes: -1, remark: "added", tree }; + } + + const diff = currentStats.bytes - baseStats.bytes; + if (diff !== 0) { + console.log("Changed file", outfile, diff); + hasAnyChange = true; + } else { + console.log("No change", outfile); + } + return { + ...currentStats, + baseBytes: baseStats.bytes, + tree, + remark: Math.sign(diff) ? "increased" : "decreased", + }; + }); + console.log("Comparison done.", comparison); + + if (hasAnyChange) { + output += markdownTable( + comparison, + input.percentExtraAttention, + input.showNoChange, + ); + output += noChangesTable(comparison, input.showNoChange); + output += fileSizeTable(comparison, input.topNLargestPaths); + output += detail(input); + } else { + output += "This PR introduced no changes to the esbuild bundle! πŸ™Œ"; + } + + // we add this tag so that our action can be able to easily and + // consistently find the right comment to edit as more commits are pushed. + output += ``; + + writeComment(input, output); } function treeKey(metafile: string, outfile: string): string { - return `${metafile} -> ${outfile}`; + return `${metafile} -> ${outfile}`; } // Write the output to a file which is later read in // as comment contents by the actions workflow. function writeComment(input: Input, output: string): void { - console.log("Writing comment to file.", output); - fs.mkdirSync(path.join(process.cwd(), input.analyzerDirectory), { - recursive: true, - }); - fs.writeFileSync( - path.join( - process.cwd(), - input.analyzerDirectory, - "bundle_analysis_comment.txt", - ), - output.trim(), - ); + console.log("Writing comment to file.", output); + fs.mkdirSync(path.join(process.cwd(), input.analyzerDirectory), { + recursive: true, + }); + fs.writeFileSync( + path.join( + process.cwd(), + input.analyzerDirectory, + "bundle_analysis_comment.txt", + ), + output.trim(), + ); } function detail(input: Input): string { - if (!input.showDetails) { - return ""; - } - return `\n
    + if (!input.showDetails) { + return ""; + } + return `\n
    Details

    Next to the size is how much the size has increased or decreased compared with the base branch of this PR.

      @@ -128,140 +127,139 @@ function detail(input: Input): string { } function loadBaseAnalysisJson(input: Input): Report { - try { - const baseAnalysisPath = path.join( - process.cwd(), - input.analyzerDirectory, - "base/bundle/bundle_analysis.json", - ); - const report = loadAnalysisJson(baseAnalysisPath); - console.info(`Base analysis found in ${baseAnalysisPath}`, report); - return report; - } catch (e) { - console.warn( - "No base analysis found. First setup or all artifacts are expired.", - ); - return {}; - } + try { + const baseAnalysisPath = path.join( + process.cwd(), + input.analyzerDirectory, + "base/bundle/bundle_analysis.json", + ); + const report = loadAnalysisJson(baseAnalysisPath); + console.info(`Base analysis found in ${baseAnalysisPath}`, report); + return report; + } catch (e) { + console.warn( + "No base analysis found. First setup or all artifacts are expired.", + ); + return {}; + } } function buildFileTree(input: Input) { - function buildRoot( - input: Record, - ): TreeMapNode { - const root: TreeMapNode = {name: "", path: "", value: 0, children: []}; - for (const [filePath, {bytesInOutput}] of Object.entries(input)) { - const directories = filePath.split("/"); - buildNode(root, directories, bytesInOutput); - } - return root; - } - - function buildNode( - node: TreeMapNode, - paths: Array, - value: number, - ): void { - const first = paths.shift(); - if (first === undefined) { - // leaf node (file) - node.value += value; - return; - } - let child = node.children.find((child) => child.name === first); - if (!child) { - child = { - name: first, - path: `${node.path}/${first}`.replace(/^\//, ""), - value: 0, - children: [], - }; - node.children.push(child); - } - node.value += value; - buildNode(child, paths, value); - } - - const trees = new Map(); - if (input.topNLargestPaths <= 0) { - // Skip building tree if we don't need it. - return trees; - } - for (const {relativePath, absolutePath} of findMetafiles(input)) { - const metafileJson = loadMetaFile(absolutePath); - for (const [outfile, buildMeta] of Object.entries(metafileJson.outputs)) { - const tree = buildRoot(buildMeta.inputs); - trees.set(treeKey(relativePath, outfile), tree); - - fs.writeFileSync( - path.join(process.cwd(), input.analyzerDirectory, "tree.json"), - JSON.stringify(tree, null, 2), - ); - } - } - return trees; + function buildRoot( + input: Record, + ): TreeMapNode { + const root: TreeMapNode = { name: "", path: "", value: 0, children: [] }; + for (const [filePath, { bytesInOutput }] of Object.entries(input)) { + const directories = filePath.split("/"); + buildNode(root, directories, bytesInOutput); + } + return root; + } + + function buildNode( + node: TreeMapNode, + paths: Array, + value: number, + ): void { + const first = paths.shift(); + if (first === undefined) { + // leaf node (file) + node.value += value; + return; + } + let child = node.children.find((child) => child.name === first); + if (!child) { + child = { + name: first, + path: `${node.path}/${first}`.replace(/^\//, ""), + value: 0, + children: [], + }; + node.children.push(child); + } + node.value += value; + buildNode(child, paths, value); + } + + const trees = new Map(); + if (input.topNLargestPaths <= 0) { + // Skip building tree if we don't need it. + return trees; + } + for (const { relativePath, absolutePath } of findMetafiles(input)) { + const metafileJson = loadMetaFile(absolutePath); + for (const [outfile, buildMeta] of Object.entries(metafileJson.outputs)) { + const tree = buildRoot(buildMeta.inputs); + trees.set(treeKey(relativePath, outfile), tree); + + fs.writeFileSync( + path.join(process.cwd(), input.analyzerDirectory, "tree.json"), + JSON.stringify(tree, null, 2), + ); + } + } + return trees; } const spacer = "Β "; - function filesize(bytes: number): string { - const sign = bytes < 0 ? "-" : ""; - const n = Math.abs(bytes); - if (n < 1000) { - return `${sign}${n}${spacer}B`; - } - if (n < 1000 * 1000) { - return `${sign}${(n / 1000).toFixed(2)}${spacer}KB`; - } - if (n < 1000 * 1000 * 1000) { - return `${sign}${(n / 1000 / 1000).toFixed(2)}${spacer}MB`; - } - if (n < 1000 * 1000 * 1000 * 1000) { - return `${sign}${(n / 1000 / 1000 / 1000).toFixed(2)}${spacer}GB`; - } - throw new Error("Too large file size!! Are you sure?"); + const sign = bytes < 0 ? "-" : ""; + const n = Math.abs(bytes); + if (n < 1000) { + return `${sign}${n}${spacer}B`; + } + if (n < 1000 * 1000) { + return `${sign}${(n / 1000).toFixed(2)}${spacer}KB`; + } + if (n < 1000 * 1000 * 1000) { + return `${sign}${(n / 1000 / 1000).toFixed(2)}${spacer}MB`; + } + if (n < 1000 * 1000 * 1000 * 1000) { + return `${sign}${(n / 1000 / 1000 / 1000).toFixed(2)}${spacer}GB`; + } + throw new Error("Too large file size!! Are you sure?"); } const shouldShowBundle = (d: CompareResult, showNoChange: boolean) => - showNoChange || d.bytes - d.baseBytes !== 0; + showNoChange || d.bytes - d.baseBytes !== 0; function markdownTable( - data: Array, - redThreshold: number, - showNoChange: boolean, + data: Array, + redThreshold: number, + showNoChange: boolean, ): string { - const rows = data - .filter((d) => shouldShowBundle(d, showNoChange)) - .map((d) => { - return `${d.metafile} | ${d.outfile} | ${renderSize(d)} | ${renderNote( - d, - redThreshold, - )}\n`; - }) - .join(""); - - return ` + const rows = data + .filter((d) => shouldShowBundle(d, showNoChange)) + .map((d) => { + return `${d.metafile} | ${d.outfile} | ${renderSize(d)} | ${renderNote( + d, + redThreshold, + )}\n`; + }) + .join(""); + + return ` Meta File | Out File | Size (raw) | Note ----------|----------|-----------:|------ ${rows}`; } function noChangesTable( - data: Array, - showNoChange: boolean, + data: Array, + showNoChange: boolean, ): string { - const noChangeBundles = data.filter( - (d) => !shouldShowBundle(d, showNoChange), - ); - const rows = noChangeBundles - .map((d) => { - return `${d.metafile} | ${d.outfile} | ${renderSize(d)} | βœ… No change\n`; - }) - .join(""); - if (noChangeBundles.length === 0) { - return ""; - } - return ` + const noChangeBundles = data.filter( + (d) => !shouldShowBundle(d, showNoChange), + ); + const rows = noChangeBundles + .map((d) => { + return `${d.metafile} | ${d.outfile} | ${renderSize(d)} | βœ… No change\n`; + }) + .join(""); + if (noChangeBundles.length === 0) { + return ""; + } + return `
      ${noChangeBundles.length} bundles with no change are hidden. @@ -278,135 +276,134 @@ ${rows} * Dig nodes until the depth of 3. */ function findLargeDirectories(root: TreeMapNode, N: number) { - const nodes: TreeMapNode[] = []; - const queue: Array<{ node: TreeMapNode; depth: number }> = [ - {node: root, depth: 0}, - ]; - while (queue.length > 0) { - const shift = queue.shift(); - if (!shift) { - break; - } - const {node, depth} = shift; - if (depth === 3) { - nodes.push(node); - continue; - } - if (node.children.length === 0) { - nodes.push(node); - } else { - for (const item of node.children) { - queue.push({node: item, depth: depth + 1}); - } - } - } - const largeNodes = nodes.sort((a, b) => b.value - a.value).slice(0, N); - return { - largeNodes, - hasOther: nodes.length > N, - }; + const nodes: TreeMapNode[] = []; + const queue: Array<{ node: TreeMapNode; depth: number }> = [ + { node: root, depth: 0 }, + ]; + while (queue.length > 0) { + const shift = queue.shift(); + if (!shift) { + break; + } + const { node, depth } = shift; + if (depth === 3) { + nodes.push(node); + continue; + } + if (node.children.length === 0) { + nodes.push(node); + } else { + for (const item of node.children) { + queue.push({ node: item, depth: depth + 1 }); + } + } + } + const largeNodes = nodes.sort((a, b) => b.value - a.value).slice(0, N); + return { + largeNodes, + hasOther: nodes.length > N, + }; } function fixedPercent(n: number, d: number): number { - return Number.parseFloat(((n / d) * 100).toFixed(1)); + return Number.parseFloat(((n / d) * 100).toFixed(1)); } function fileSizeTable( - data: Array, - topNLargestPaths: number, + data: Array, + topNLargestPaths: number, ): string { - if (data.length === 0 || topNLargestPaths <= 0) { - return ""; - } - let output = ""; - output += "
      \n"; - output += "Largest paths\n"; - output += `These visualization shows top ${topNLargestPaths} largest paths in the bundle.\n`; - for (const d of data) { - output += "\n"; - output += `## Meta file: ${d.metafile}, Out file: ${d.outfile}\n`; - if (!d.tree) { - output += "οΈοΈπŸ—‘οΈDeleted\n"; - continue; - } - output += "| Path | Size |\n"; - output += "|------|-------|\n"; - const totalSize = d.tree.value; - const {largeNodes, hasOther} = findLargeDirectories( - d.tree, - topNLargestPaths, - ); - for (const {path, value} of largeNodes) { - const percent = fixedPercent(value, totalSize); - output += `| ${path} | ${renderBar(percent, value)} |\n`; - } - if (hasOther) { - const otherSize = totalSize - largeNodes[0].value; - const otherPercent = fixedPercent(otherSize, totalSize); - output += `| (other) | ${renderBar(otherPercent, otherSize)} |\n`; - } - } - output += "
      \n"; - return output; + if (data.length === 0 || topNLargestPaths <= 0) { + return ""; + } + let output = ""; + output += "
      \n"; + output += "Largest paths\n"; + output += `These visualization shows top ${topNLargestPaths} largest paths in the bundle.\n`; + for (const d of data) { + output += "\n"; + output += `## Meta file: ${d.metafile}, Out file: ${d.outfile}\n`; + if (!d.tree) { + output += "οΈοΈπŸ—‘οΈDeleted\n"; + continue; + } + output += "| Path | Size |\n"; + output += "|------|-------|\n"; + const totalSize = d.tree.value; + const { largeNodes, hasOther } = findLargeDirectories( + d.tree, + topNLargestPaths, + ); + for (const { path, value } of largeNodes) { + const percent = fixedPercent(value, totalSize); + output += `| ${path} | ${renderBar(percent, value)} |\n`; + } + if (hasOther) { + const otherSize = totalSize - largeNodes[0].value; + const otherPercent = fixedPercent(otherSize, totalSize); + output += `| (other) | ${renderBar(otherPercent, otherSize)} |\n`; + } + } + output += "
      \n"; + return output; } function renderBar(percent: number, bytes: number): string { - const bar = progress(percent / 100); - return `\${{\\color{Goldenrod}{ ${bar} }}}\$ ${percent.toFixed( - 1, - )}%, ${filesize(bytes)}`; + const bar = progress(percent / 100); + return `\${{\\color{Goldenrod}{ ${bar} }}}\$ ${percent.toFixed( + 1, + )}%, ${filesize(bytes)}`; } // Block progression is 1/8 = 0.125 const blocks = ["", "▏", "β–Ž", "▍", "β–Œ", "β–‹", "β–Š", "β–‰", "β–ˆ"]; const progression = 1 / (blocks.length - 1); - function progress(value: number, length = 25, vmin = 0.0, vmax = 1.0) { - const v = value * length; - const integerPart = Math.floor(v); - const fractionalPart = v - integerPart; - const i = Math.round( - (progression * Math.floor(fractionalPart / progression)) / progression, - ); - return "β–ˆ".repeat(integerPart) + blocks[i]; + const v = value * length; + const integerPart = Math.floor(v); + const fractionalPart = v - integerPart; + const i = Math.round( + (progression * Math.floor(fractionalPart / progression)) / progression, + ); + return "β–ˆ".repeat(integerPart) + blocks[i]; } function renderSize(d: CompareResult): string { - return filesize(d.bytes); + return filesize(d.bytes); } function renderNote(d: CompareResult, redThreshold: number): string { - if (d.remark === "deleted") { - return "πŸ—‘οΈ Deleted"; - } - if (d.remark === "added") { - return "πŸ†• Added"; - } - const diff = d.bytes - d.baseBytes; - if (diff !== 0) { - const percentChange = (diff / d.baseBytes) * 100; - return `${renderStatusIndicator(percentChange, redThreshold)}${filesize( - diff, - )} (${sign(percentChange)}${percentChange.toFixed(1)}%)`; - } - return "βœ… No change"; + if (d.remark === "deleted") { + return "πŸ—‘οΈ Deleted"; + } + if (d.remark === "added") { + return "πŸ†• Added"; + } + const diff = d.bytes - d.baseBytes; + if (diff !== 0) { + const percentChange = (diff / d.baseBytes) * 100; + return `${renderStatusIndicator(percentChange, redThreshold)}${filesize( + diff, + )} (${sign(percentChange)}${percentChange.toFixed(1)}%)`; + } + return "βœ… No change"; } function sign(num: number): string { - return num < 0 ? "" : "+"; + return num < 0 ? "" : "+"; } function renderStatusIndicator( - percentChange: number, - redThreshold: number, + percentChange: number, + redThreshold: number, ): string { - let res: string; - if (percentChange > 0 && percentChange < redThreshold) { - res = "⚠️"; - } else if (percentChange >= redThreshold) { - res = "‼️"; - } else { - res = "βœ… "; - } - return `${res} ${sign(percentChange)}`; + let res: string; + if (percentChange > 0 && percentChange < redThreshold) { + res = "⚠️"; + } else if (percentChange >= redThreshold) { + res = "‼️"; + } else { + res = "βœ… "; + } + return `${res} ${sign(percentChange)}`; } From edcceb7011a115aea989c44544ecdba2b0749bf7 Mon Sep 17 00:00:00 2001 From: Alexander Castillo Date: Fri, 2 Aug 2024 07:42:08 +0200 Subject: [PATCH 3/4] fix: add fix again --- dist/index.mjs | 5 +++-- src/compare.ts | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dist/index.mjs b/dist/index.mjs index d32263e..c073cb4 100644 --- a/dist/index.mjs +++ b/dist/index.mjs @@ -3,7 +3,8 @@ globstar while`,t,u,e,d,g),this.matchOne(t.slice(u),e.slice(d),s))return this.de >>> no match, partial?`,t,u,e,d),u===a))}let p;if(typeof c=="string"?(p=f===c,this.debug("string match",c,f,p)):(p=c.test(f),this.debug("pattern match",c,f,p)),!p)return!1}if(o===a&&h===l)return!0;if(o===a)return s;if(h===l)return o===a-1&&t[o]==="";throw new Error("wtf?")}braceExpand(){return Xe(this.pattern,this.options)}parse(t){ut(t);let e=this.options;if(t==="**")return R;if(t==="")return"";let s,i=null;(s=t.match(ui))?i=e.dot?pi:di:(s=t.match(si))?i=(e.nocase?e.dot?oi:ri:e.dot?ni:ii)(s[1]):(s=t.match(mi))?i=(e.nocase?e.dot?wi:gi:e.dot?yi:bi)(s):(s=t.match(hi))?i=e.dot?li:ai:(s=t.match(ci))&&(i=fi);let r=tt.fromGlob(t,this.options).toMMPattern();return i&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:i}),r}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let e=this.options,s=e.noglobstar?vi:e.dot?xi:Ti,i=new Set(e.nocase?["i"]:[]),r=t.map(a=>{let l=a.map(c=>{if(c instanceof RegExp)for(let f of c.flags.split(""))i.add(f);return typeof c=="string"?Oi(c):c===R?R:c._src});return l.forEach((c,f)=>{let u=l[f+1],d=l[f-1];c!==R||d===R||(d===void 0?u!==void 0&&u!==R?l[f+1]="(?:\\/|"+s+"\\/)?"+u:l[f]=s:u===void 0?l[f-1]=d+"(?:\\/|"+s+")?":u!==R&&(l[f-1]=d+"(?:\\/|\\/"+s+"\\/)"+u,l[f+1]=R))}),l.filter(c=>c!==R).join("/")}).join("|"),[o,h]=t.length>1?["(?:",")"]:["",""];r="^"+o+r+h+"$",this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;let s=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let r=this.set;this.debug(this.pattern,"set",r);let o=i[i.length-1];if(!o)for(let h=i.length-2;!o&&h>=0;h--)o=i[h];for(let h=0;h{typeof ie.emitWarning=="function"?ie.emitWarning(n,t,e,s):console.error(`[${e}] ${t}: ${n}`)},Dt=globalThis.AbortController,Ze=globalThis.AbortSignal;if(typeof Dt>"u"){Ze=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(s,i){this._onabort.push(i)}},Dt=class{constructor(){t()}signal=new Ze;abort(s){if(!this.signal.aborted){this.signal.reason=s,this.signal.aborted=!0;for(let i of this.signal._onabort)i(s);this.signal.onabort?.(s)}}};let n=ie.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{n&&(n=!1,ts("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var Fi=n=>!Qe.has(n),Qn=Symbol("type"),V=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),es=n=>V(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?it:null:null,it=class extends Array{constructor(t){super(t),this.fill(0)}},ne=class n{heap;length;static#t=!1;static create(t){let e=es(t);if(!e)return[];n.#t=!0;let s=new n(t,e);return n.#t=!1,s}constructor(t,e){if(!n.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},pt=class n{#t;#s;#r;#i;#h;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#l;#f;#a;#o;#e;#m;#w;#d;#u;#S;#g;#C;#A;#E;#b;#k;#p;static unsafeExposeInternals(t){return{starts:t.#A,ttls:t.#E,sizes:t.#C,keyMap:t.#a,keyList:t.#o,valList:t.#e,next:t.#m,prev:t.#w,get head(){return t.#d},get tail(){return t.#u},free:t.#S,isBackgroundFetch:e=>t.#c(e),backgroundFetch:(e,s,i,r)=>t.#_(e,s,i,r),moveToTail:e=>t.#N(e),indexes:e=>t.#T(e),rindexes:e=>t.#O(e),isStale:e=>t.#y(e)}}get max(){return this.#t}get maxSize(){return this.#s}get calculatedSize(){return this.#f}get size(){return this.#l}get fetchMethod(){return this.#h}get dispose(){return this.#r}get disposeAfter(){return this.#i}constructor(t){let{max:e=0,ttl:s,ttlResolution:i=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:h,allowStale:a,dispose:l,disposeAfter:c,noDisposeOnSet:f,noUpdateTTL:u,maxSize:d=0,maxEntrySize:g=0,sizeCalculation:p,fetchMethod:w,noDeleteOnFetchRejection:m,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:y,ignoreFetchAbort:E}=t;if(e!==0&&!V(e))throw new TypeError("max option must be a nonnegative integer");let x=e?es(e):Array;if(!x)throw new Error("invalid max value: "+e);if(this.#t=e,this.#s=d,this.maxEntrySize=g||this.#s,this.sizeCalculation=p,this.sizeCalculation){if(!this.#s&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(w!==void 0&&typeof w!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#h=w,this.#k=!!w,this.#a=new Map,this.#o=new Array(e).fill(void 0),this.#e=new Array(e).fill(void 0),this.#m=new x(e),this.#w=new x(e),this.#d=0,this.#u=0,this.#S=ne.create(e),this.#l=0,this.#f=0,typeof l=="function"&&(this.#r=l),typeof c=="function"?(this.#i=c,this.#g=[]):(this.#i=void 0,this.#g=void 0),this.#b=!!this.#r,this.#p=!!this.#i,this.noDisposeOnSet=!!f,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!m,this.allowStaleOnFetchRejection=!!b,this.allowStaleOnFetchAbort=!!y,this.ignoreFetchAbort=!!E,this.maxEntrySize!==0){if(this.#s!==0&&!V(this.#s))throw new TypeError("maxSize must be a positive integer if specified");if(!V(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#M()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!h,this.ttlResolution=V(i)||i===0?i:1,this.ttlAutopurge=!!r,this.ttl=s||0,this.ttl){if(!V(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#F()}if(this.#t===0&&this.ttl===0&&this.#s===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#s){let I="LRU_CACHE_UNBOUNDED";Fi(I)&&(Qe.add(I),ts("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",I,n))}}getRemainingTTL(t){return this.#a.has(t)?1/0:0}#F(){let t=new it(this.#t),e=new it(this.#t);this.#E=t,this.#A=e,this.#n=(r,o,h=st.now())=>{if(e[r]=o!==0?h:0,t[r]=o,o!==0&&this.ttlAutopurge){let a=setTimeout(()=>{this.#y(r)&&this.delete(this.#o[r])},o+1);a.unref&&a.unref()}},this.#R=r=>{e[r]=t[r]!==0?st.now():0},this.#v=(r,o)=>{if(t[o]){let h=t[o],a=e[o];if(!h||!a)return;r.ttl=h,r.start=a,r.now=s||i();let l=r.now-a;r.remainingTTL=h-l}};let s=0,i=()=>{let r=st.now();if(this.ttlResolution>0){s=r;let o=setTimeout(()=>s=0,this.ttlResolution);o.unref&&o.unref()}return r};this.getRemainingTTL=r=>{let o=this.#a.get(r);if(o===void 0)return 0;let h=t[o],a=e[o];if(!h||!a)return 1/0;let l=(s||i())-a;return h-l},this.#y=r=>{let o=e[r],h=t[r];return!!h&&!!o&&(s||i())-o>h}}#R=()=>{};#v=()=>{};#n=()=>{};#y=()=>!1;#M(){let t=new it(this.#t);this.#f=0,this.#C=t,this.#x=e=>{this.#f-=t[e],t[e]=0},this.#j=(e,s,i,r)=>{if(this.#c(s))return 0;if(!V(i))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(i=r(s,e),!V(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#L=(e,s,i)=>{if(t[e]=s,this.#s){let r=this.#s-t[e];for(;this.#f>r;)this.#D(!0)}this.#f+=t[e],i&&(i.entrySize=s,i.totalCalculatedSize=this.#f)}}#x=t=>{};#L=(t,e,s)=>{};#j=(t,e,s,i)=>{if(s||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#T({allowStale:t=this.allowStale}={}){if(this.#l)for(let e=this.#u;!(!this.#z(e)||((t||!this.#y(e))&&(yield e),e===this.#d));)e=this.#w[e]}*#O({allowStale:t=this.allowStale}={}){if(this.#l)for(let e=this.#d;!(!this.#z(e)||((t||!this.#y(e))&&(yield e),e===this.#u));)e=this.#m[e]}#z(t){return t!==void 0&&this.#a.get(this.#o[t])===t}*entries(){for(let t of this.#T())this.#e[t]!==void 0&&this.#o[t]!==void 0&&!this.#c(this.#e[t])&&(yield[this.#o[t],this.#e[t]])}*rentries(){for(let t of this.#O())this.#e[t]!==void 0&&this.#o[t]!==void 0&&!this.#c(this.#e[t])&&(yield[this.#o[t],this.#e[t]])}*keys(){for(let t of this.#T()){let e=this.#o[t];e!==void 0&&!this.#c(this.#e[t])&&(yield e)}}*rkeys(){for(let t of this.#O()){let e=this.#o[t];e!==void 0&&!this.#c(this.#e[t])&&(yield e)}}*values(){for(let t of this.#T())this.#e[t]!==void 0&&!this.#c(this.#e[t])&&(yield this.#e[t])}*rvalues(){for(let t of this.#O())this.#e[t]!==void 0&&!this.#c(this.#e[t])&&(yield this.#e[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let s of this.#T()){let i=this.#e[s],r=this.#c(i)?i.__staleWhileFetching:i;if(r!==void 0&&t(r,this.#o[s],this))return this.get(this.#o[s],e)}}forEach(t,e=this){for(let s of this.#T()){let i=this.#e[s],r=this.#c(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#o[s],this)}}rforEach(t,e=this){for(let s of this.#O()){let i=this.#e[s],r=this.#c(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#o[s],this)}}purgeStale(){let t=!1;for(let e of this.#O({allowStale:!0}))this.#y(e)&&(this.delete(this.#o[e]),t=!0);return t}info(t){let e=this.#a.get(t);if(e===void 0)return;let s=this.#e[e],i=this.#c(s)?s.__staleWhileFetching:s;if(i===void 0)return;let r={value:i};if(this.#E&&this.#A){let o=this.#E[e],h=this.#A[e];if(o&&h){let a=o-(st.now()-h);r.ttl=a,r.start=Date.now()}}return this.#C&&(r.size=this.#C[e]),r}dump(){let t=[];for(let e of this.#T({allowStale:!0})){let s=this.#o[e],i=this.#e[e],r=this.#c(i)?i.__staleWhileFetching:i;if(r===void 0||s===void 0)continue;let o={value:r};if(this.#E&&this.#A){o.ttl=this.#E[e];let h=st.now()-this.#A[e];o.start=Math.floor(Date.now()-h)}this.#C&&(o.size=this.#C[e]),t.unshift([s,o])}return t}load(t){this.clear();for(let[e,s]of t){if(s.start){let i=Date.now()-s.start;s.start=st.now()-i}this.set(e,s.value,s)}}set(t,e,s={}){if(e===void 0)return this.delete(t),this;let{ttl:i=this.ttl,start:r,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:h=this.sizeCalculation,status:a}=s,{noUpdateTTL:l=this.noUpdateTTL}=s,c=this.#j(t,e,s.size||0,h);if(this.maxEntrySize&&c>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.delete(t),this;let f=this.#l===0?void 0:this.#a.get(t);if(f===void 0)f=this.#l===0?this.#u:this.#S.length!==0?this.#S.pop():this.#l===this.#t?this.#D(!1):this.#l,this.#o[f]=t,this.#e[f]=e,this.#a.set(t,f),this.#m[this.#u]=f,this.#w[f]=this.#u,this.#u=f,this.#l++,this.#L(f,c,a),a&&(a.set="add"),l=!1;else{this.#N(f);let u=this.#e[f];if(e!==u){if(this.#k&&this.#c(u)){u.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:d}=u;d!==void 0&&!o&&(this.#b&&this.#r?.(d,t,"set"),this.#p&&this.#g?.push([d,t,"set"]))}else o||(this.#b&&this.#r?.(u,t,"set"),this.#p&&this.#g?.push([u,t,"set"]));if(this.#x(f),this.#L(f,c,a),this.#e[f]=e,a){a.set="replace";let d=u&&this.#c(u)?u.__staleWhileFetching:u;d!==void 0&&(a.oldValue=d)}}else a&&(a.set="update")}if(i!==0&&!this.#E&&this.#F(),this.#E&&(l||this.#n(f,i,r),a&&this.#v(a,f)),!o&&this.#p&&this.#g){let u=this.#g,d;for(;d=u?.shift();)this.#i?.(...d)}return this}pop(){try{for(;this.#l;){let t=this.#e[this.#d];if(this.#D(!0),this.#c(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#p&&this.#g){let t=this.#g,e;for(;e=t?.shift();)this.#i?.(...e)}}}#D(t){let e=this.#d,s=this.#o[e],i=this.#e[e];return this.#k&&this.#c(i)?i.__abortController.abort(new Error("evicted")):(this.#b||this.#p)&&(this.#b&&this.#r?.(i,s,"evict"),this.#p&&this.#g?.push([i,s,"evict"])),this.#x(e),t&&(this.#o[e]=void 0,this.#e[e]=void 0,this.#S.push(e)),this.#l===1?(this.#d=this.#u=0,this.#S.length=0):this.#d=this.#m[e],this.#a.delete(s),this.#l--,e}has(t,e={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=e,r=this.#a.get(t);if(r!==void 0){let o=this.#e[r];if(this.#c(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#y(r))i&&(i.has="stale",this.#v(i,r));else return s&&this.#R(r),i&&(i.has="hit",this.#v(i,r)),!0}else i&&(i.has="miss");return!1}peek(t,e={}){let{allowStale:s=this.allowStale}=e,i=this.#a.get(t);if(i===void 0||!s&&this.#y(i))return;let r=this.#e[i];return this.#c(r)?r.__staleWhileFetching:r}#_(t,e,s,i){let r=e===void 0?void 0:this.#e[e];if(this.#c(r))return r;let o=new Dt,{signal:h}=s;h?.addEventListener("abort",()=>o.abort(h.reason),{signal:o.signal});let a={signal:o.signal,options:s,context:i},l=(p,w=!1)=>{let{aborted:m}=o.signal,S=s.ignoreFetchAbort&&p!==void 0;if(s.status&&(m&&!w?(s.status.fetchAborted=!0,s.status.fetchError=o.signal.reason,S&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),m&&!S&&!w)return f(o.signal.reason);let b=d;return this.#e[e]===d&&(p===void 0?b.__staleWhileFetching?this.#e[e]=b.__staleWhileFetching:this.delete(t):(s.status&&(s.status.fetchUpdated=!0),this.set(t,p,a.options))),p},c=p=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=p),f(p)),f=p=>{let{aborted:w}=o.signal,m=w&&s.allowStaleOnFetchAbort,S=m||s.allowStaleOnFetchRejection,b=S||s.noDeleteOnFetchRejection,y=d;if(this.#e[e]===d&&(!b||y.__staleWhileFetching===void 0?this.delete(t):m||(this.#e[e]=y.__staleWhileFetching)),S)return s.status&&y.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),y.__staleWhileFetching;if(y.__returned===y)throw p},u=(p,w)=>{let m=this.#h?.(t,r,a);m&&m instanceof Promise&&m.then(S=>p(S===void 0?void 0:S),w),o.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(p(void 0),s.allowStaleOnFetchAbort&&(p=S=>l(S,!0)))})};s.status&&(s.status.fetchDispatched=!0);let d=new Promise(u).then(l,c),g=Object.assign(d,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.set(t,g,{...a.options,status:void 0}),e=this.#a.get(t)):this.#e[e]=g,g}#c(t){if(!this.#k)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof Dt}async fetch(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:h=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:p,forceRefresh:w=!1,status:m,signal:S}=e;if(!this.#k)return m&&(m.fetch="get"),this.get(t,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:m});let b={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:h,size:a,sizeCalculation:l,noUpdateTTL:c,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:g,ignoreFetchAbort:d,status:m,signal:S},y=this.#a.get(t);if(y===void 0){m&&(m.fetch="miss");let E=this.#_(t,y,b,p);return E.__returned=E}else{let E=this.#e[y];if(this.#c(E)){let Ft=s&&E.__staleWhileFetching!==void 0;return m&&(m.fetch="inflight",Ft&&(m.returnedStale=!0)),Ft?E.__staleWhileFetching:E.__returned=E}let x=this.#y(y);if(!w&&!x)return m&&(m.fetch="hit"),this.#N(y),i&&this.#R(y),m&&this.#v(m,y),E;let I=this.#_(t,y,b,p),U=I.__staleWhileFetching!==void 0&&s;return m&&(m.fetch=x?"stale":"refresh",U&&x&&(m.returnedStale=!0)),U?I.__staleWhileFetching:I.__returned=I}}get(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=e,h=this.#a.get(t);if(h!==void 0){let a=this.#e[h],l=this.#c(a);return o&&this.#v(o,h),this.#y(h)?(o&&(o.get="stale"),l?(o&&s&&a.__staleWhileFetching!==void 0&&(o.returnedStale=!0),s?a.__staleWhileFetching:void 0):(r||this.delete(t),o&&s&&(o.returnedStale=!0),s?a:void 0)):(o&&(o.get="hit"),l?a.__staleWhileFetching:(this.#N(h),i&&this.#R(h),a))}else o&&(o.get="miss")}#I(t,e){this.#w[e]=t,this.#m[t]=e}#N(t){t!==this.#u&&(t===this.#d?this.#d=this.#m[t]:this.#I(this.#w[t],this.#m[t]),this.#I(this.#u,t),this.#u=t)}delete(t){let e=!1;if(this.#l!==0){let s=this.#a.get(t);if(s!==void 0)if(e=!0,this.#l===1)this.clear();else{this.#x(s);let i=this.#e[s];if(this.#c(i)?i.__abortController.abort(new Error("deleted")):(this.#b||this.#p)&&(this.#b&&this.#r?.(i,t,"delete"),this.#p&&this.#g?.push([i,t,"delete"])),this.#a.delete(t),this.#o[s]=void 0,this.#e[s]=void 0,s===this.#u)this.#u=this.#w[s];else if(s===this.#d)this.#d=this.#m[s];else{let r=this.#w[s];this.#m[r]=this.#m[s];let o=this.#m[s];this.#w[o]=this.#w[s]}this.#l--,this.#S.push(s)}}if(this.#p&&this.#g?.length){let s=this.#g,i;for(;i=s?.shift();)this.#i?.(...i)}return e}clear(){for(let t of this.#O({allowStale:!0})){let e=this.#e[t];if(this.#c(e))e.__abortController.abort(new Error("deleted"));else{let s=this.#o[t];this.#b&&this.#r?.(e,s,"delete"),this.#p&&this.#g?.push([e,s,"delete"])}}if(this.#a.clear(),this.#e.fill(void 0),this.#o.fill(void 0),this.#E&&this.#A&&(this.#E.fill(0),this.#A.fill(0)),this.#C&&this.#C.fill(0),this.#d=0,this.#u=0,this.#S.length=0,this.#f=0,this.#l=0,this.#p&&this.#g){let t=this.#g,e;for(;e=t?.shift();)this.#i?.(...e)}}};import{posix as Wi,win32 as pe}from"node:path";import{fileURLToPath as Bi}from"node:url";import{lstatSync as Ui,readdir as Gi,readdirSync as Hi,readlinkSync as qi,realpathSync as Ji}from"fs";import*as Ki from"node:fs";import{lstat as Yi,readdir as Xi,readlink as Zi,realpath as Qi}from"node:fs/promises";import{EventEmitter as fe}from"node:events";import os from"node:stream";import{StringDecoder as Mi}from"node:string_decoder";var ss=typeof process=="object"&&process?process:{stdout:null,stderr:null},Di=n=>!!n&&typeof n=="object"&&(n instanceof X||n instanceof os||Ni(n)||_i(n)),Ni=n=>!!n&&typeof n=="object"&&n instanceof fe&&typeof n.pipe=="function"&&n.pipe!==os.Writable.prototype.pipe,_i=n=>!!n&&typeof n=="object"&&n instanceof fe&&typeof n.write=="function"&&typeof n.end=="function",q=Symbol("EOF"),J=Symbol("maybeEmitEnd"),Y=Symbol("emittedEnd"),Nt=Symbol("emittingEnd"),mt=Symbol("emittedError"),_t=Symbol("closed"),is=Symbol("read"),Lt=Symbol("flush"),ns=Symbol("flushChunk"),P=Symbol("encoding"),nt=Symbol("decoder"),T=Symbol("flowing"),gt=Symbol("paused"),rt=Symbol("resume"),C=Symbol("buffer"),M=Symbol("pipes"),A=Symbol("bufferLength"),re=Symbol("bufferPush"),jt=Symbol("bufferShift"),k=Symbol("objectMode"),v=Symbol("destroyed"),oe=Symbol("error"),he=Symbol("emitData"),rs=Symbol("emitEnd"),ae=Symbol("emitEnd2"),G=Symbol("async"),le=Symbol("abort"),zt=Symbol("aborted"),wt=Symbol("signal"),Z=Symbol("dataListeners"),N=Symbol("discarded"),yt=n=>Promise.resolve().then(n),Li=n=>n(),ji=n=>n==="end"||n==="finish"||n==="prefinish",zi=n=>n instanceof ArrayBuffer||!!n&&typeof n=="object"&&n.constructor&&n.constructor.name==="ArrayBuffer"&&n.byteLength>=0,Ii=n=>!Buffer.isBuffer(n)&&ArrayBuffer.isView(n),It=class{src;dest;opts;ondrain;constructor(t,e,s){this.src=t,this.dest=e,this.opts=s,this.ondrain=()=>t[rt](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},ce=class extends It{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,s){super(t,e,s),this.proxyErrors=i=>e.emit("error",i),t.on("error",this.proxyErrors)}},$i=n=>!!n.objectMode,Pi=n=>!n.objectMode&&!!n.encoding&&n.encoding!=="buffer",X=class extends fe{[T]=!1;[gt]=!1;[M]=[];[C]=[];[k];[P];[G];[nt];[q]=!1;[Y]=!1;[Nt]=!1;[_t]=!1;[mt]=null;[A]=0;[v]=!1;[wt];[zt]=!1;[Z]=0;[N]=!1;writable=!0;readable=!0;constructor(...t){let e=t[0]||{};if(super(),e.objectMode&&typeof e.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");$i(e)?(this[k]=!0,this[P]=null):Pi(e)?(this[P]=e.encoding,this[k]=!1):(this[k]=!1,this[P]=null),this[G]=!!e.async,this[nt]=this[P]?new Mi(this[P]):null,e&&e.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[C]}),e&&e.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[M]});let{signal:s}=e;s&&(this[wt]=s,s.aborted?this[le]():s.addEventListener("abort",()=>this[le]()))}get bufferLength(){return this[A]}get encoding(){return this[P]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[k]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[G]}set async(t){this[G]=this[G]||!!t}[le](){this[zt]=!0,this.emit("abort",this[wt]?.reason),this.destroy(this[wt]?.reason)}get aborted(){return this[zt]}set aborted(t){}write(t,e,s){if(this[zt])return!1;if(this[q])throw new Error("write after end");if(this[v])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof e=="function"&&(s=e,e="utf8"),e||(e="utf8");let i=this[G]?yt:Li;if(!this[k]&&!Buffer.isBuffer(t)){if(Ii(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(zi(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[k]?(this[T]&&this[A]!==0&&this[Lt](!0),this[T]?this.emit("data",t):this[re](t),this[A]!==0&&this.emit("readable"),s&&i(s),this[T]):t.length?(typeof t=="string"&&!(e===this[P]&&!this[nt]?.lastNeed)&&(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[P]&&(t=this[nt].write(t)),this[T]&&this[A]!==0&&this[Lt](!0),this[T]?this.emit("data",t):this[re](t),this[A]!==0&&this.emit("readable"),s&&i(s),this[T]):(this[A]!==0&&this.emit("readable"),s&&i(s),this[T])}read(t){if(this[v])return null;if(this[N]=!1,this[A]===0||t===0||t&&t>this[A])return this[J](),null;this[k]&&(t=null),this[C].length>1&&!this[k]&&(this[C]=[this[P]?this[C].join(""):Buffer.concat(this[C],this[A])]);let e=this[is](t||null,this[C][0]);return this[J](),e}[is](t,e){if(this[k])this[jt]();else{let s=e;t===s.length||t===null?this[jt]():typeof s=="string"?(this[C][0]=s.slice(t),e=s.slice(0,t),this[A]-=t):(this[C][0]=s.subarray(t),e=s.subarray(0,t),this[A]-=t)}return this.emit("data",e),!this[C].length&&!this[q]&&this.emit("drain"),e}end(t,e,s){return typeof t=="function"&&(s=t,t=void 0),typeof e=="function"&&(s=e,e="utf8"),t!==void 0&&this.write(t,e),s&&this.once("end",s),this[q]=!0,this.writable=!1,(this[T]||!this[gt])&&this[J](),this}[rt](){this[v]||(!this[Z]&&!this[M].length&&(this[N]=!0),this[gt]=!1,this[T]=!0,this.emit("resume"),this[C].length?this[Lt]():this[q]?this[J]():this.emit("drain"))}resume(){return this[rt]()}pause(){this[T]=!1,this[gt]=!0,this[N]=!1}get destroyed(){return this[v]}get flowing(){return this[T]}get paused(){return this[gt]}[re](t){this[k]?this[A]+=1:this[A]+=t.length,this[C].push(t)}[jt](){return this[k]?this[A]-=1:this[A]-=this[C][0].length,this[C].shift()}[Lt](t=!1){do;while(this[ns](this[jt]())&&this[C].length);!t&&!this[C].length&&!this[q]&&this.emit("drain")}[ns](t){return this.emit("data",t),this[T]}pipe(t,e){if(this[v])return t;this[N]=!1;let s=this[Y];return e=e||{},t===ss.stdout||t===ss.stderr?e.end=!1:e.end=e.end!==!1,e.proxyErrors=!!e.proxyErrors,s?e.end&&t.end():(this[M].push(e.proxyErrors?new ce(this,t,e):new It(this,t,e)),this[G]?yt(()=>this[rt]()):this[rt]()),t}unpipe(t){let e=this[M].find(s=>s.dest===t);e&&(this[M].length===1?(this[T]&&this[Z]===0&&(this[T]=!1),this[M]=[]):this[M].splice(this[M].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){let s=super.on(t,e);if(t==="data")this[N]=!1,this[Z]++,!this[M].length&&!this[T]&&this[rt]();else if(t==="readable"&&this[A]!==0)super.emit("readable");else if(ji(t)&&this[Y])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[mt]){let i=e;this[G]?yt(()=>i.call(this,this[mt])):i.call(this,this[mt])}return s}removeListener(t,e){return this.off(t,e)}off(t,e){let s=super.off(t,e);return t==="data"&&(this[Z]=this.listeners("data").length,this[Z]===0&&!this[N]&&!this[M].length&&(this[T]=!1)),s}removeAllListeners(t){let e=super.removeAllListeners(t);return(t==="data"||t===void 0)&&(this[Z]=0,!this[N]&&!this[M].length&&(this[T]=!1)),e}get emittedEnd(){return this[Y]}[J](){!this[Nt]&&!this[Y]&&!this[v]&&this[C].length===0&&this[q]&&(this[Nt]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[_t]&&this.emit("close"),this[Nt]=!1)}emit(t,...e){let s=e[0];if(t!=="error"&&t!=="close"&&t!==v&&this[v])return!1;if(t==="data")return!this[k]&&!s?!1:this[G]?(yt(()=>this[he](s)),!0):this[he](s);if(t==="end")return this[rs]();if(t==="close"){if(this[_t]=!0,!this[Y]&&!this[v])return!1;let r=super.emit("close");return this.removeAllListeners("close"),r}else if(t==="error"){this[mt]=s,super.emit(oe,s);let r=!this[wt]||this.listeners("error").length?super.emit("error",s):!1;return this[J](),r}else if(t==="resume"){let r=super.emit("resume");return this[J](),r}else if(t==="finish"||t==="prefinish"){let r=super.emit(t);return this.removeAllListeners(t),r}let i=super.emit(t,...e);return this[J](),i}[he](t){for(let s of this[M])s.dest.write(t)===!1&&this.pause();let e=this[N]?!1:super.emit("data",t);return this[J](),e}[rs](){return this[Y]?!1:(this[Y]=!0,this.readable=!1,this[G]?(yt(()=>this[ae]()),!0):this[ae]())}[ae](){if(this[nt]){let e=this[nt].end();if(e){for(let s of this[M])s.dest.write(e);this[N]||super.emit("data",e)}}for(let e of this[M])e.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[k]||(t.dataLength=0);let e=this.promise();return this.on("data",s=>{t.push(s),this[k]||(t.dataLength+=s.length)}),await e,t}async concat(){if(this[k])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[P]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(v,()=>e(new Error("stream destroyed"))),this.on("error",s=>e(s)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[N]=!1;let t=!1,e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[q])return e();let r,o,h=f=>{this.off("data",a),this.off("end",l),this.off(v,c),e(),o(f)},a=f=>{this.off("error",h),this.off("end",l),this.off(v,c),this.pause(),r({value:f,done:!!this[q]})},l=()=>{this.off("error",h),this.off("data",a),this.off(v,c),e(),r({done:!0,value:void 0})},c=()=>h(new Error("stream destroyed"));return new Promise((f,u)=>{o=u,r=f,this.once(v,c),this.once("error",h),this.once("end",l),this.once("data",a)})},throw:e,return:e,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[N]=!1;let t=!1,e=()=>(this.pause(),this.off(oe,e),this.off(v,e),this.off("end",e),t=!0,{done:!0,value:void 0}),s=()=>{if(t)return e();let i=this.read();return i===null?e():{done:!1,value:i}};return this.once("end",e),this.once(oe,e),this.once(v,e),{next:s,throw:e,return:e,[Symbol.iterator](){return this}}}destroy(t){if(this[v])return t?this.emit("error",t):this.emit(v),this;this[v]=!0,this[N]=!0,this[C].length=0,this[A]=0;let e=this;return typeof e.close=="function"&&!this[_t]&&e.close(),t?this.emit("error",t):this.emit(v),this}static get isStream(){return Di}};var Vi=Ji.native,St={lstatSync:Ui,readdir:Gi,readdirSync:Hi,readlinkSync:qi,realpathSync:Vi,promises:{lstat:Yi,readdir:Xi,readlink:Zi,realpath:Qi}},fs=n=>!n||n===St||n===Ki?St:{...St,...n,promises:{...St.promises,...n.promises||{}}},us=/^\\\\\?\\([a-z]:)\\?$/i,tn=n=>n.replace(/\//g,"\\").replace(us,"$1\\"),en=/[\\\/]/,z=0,ds=1,ps=2,H=4,ms=6,gs=8,Q=10,ws=12,j=15,bt=~j,ue=16,hs=32,Et=64,W=128,$t=256,Wt=512,as=Et|W|Wt,sn=1023,de=n=>n.isFile()?gs:n.isDirectory()?H:n.isSymbolicLink()?Q:n.isCharacterDevice()?ps:n.isBlockDevice()?ms:n.isSocket()?ws:n.isFIFO()?ds:z,ls=new Map,vt=n=>{let t=ls.get(n);if(t)return t;let e=n.normalize("NFKD");return ls.set(n,e),e},cs=new Map,Pt=n=>{let t=cs.get(n);if(t)return t;let e=vt(n.toLowerCase());return cs.set(n,e),e},Bt=class extends pt{constructor(){super({max:256})}},me=class extends pt{constructor(t=16*1024){super({maxSize:t,sizeCalculation:e=>e.length+1})}},ys=Symbol("PathScurry setAsCwd"),O=class{name;root;roots;parent;nocase;isCWD=!1;#t;#s;get dev(){return this.#s}#r;get mode(){return this.#r}#i;get nlink(){return this.#i}#h;get uid(){return this.#h}#l;get gid(){return this.#l}#f;get rdev(){return this.#f}#a;get blksize(){return this.#a}#o;get ino(){return this.#o}#e;get size(){return this.#e}#m;get blocks(){return this.#m}#w;get atimeMs(){return this.#w}#d;get mtimeMs(){return this.#d}#u;get ctimeMs(){return this.#u}#S;get birthtimeMs(){return this.#S}#g;get atime(){return this.#g}#C;get mtime(){return this.#C}#A;get ctime(){return this.#A}#E;get birthtime(){return this.#E}#b;#k;#p;#F;#R;#v;#n;#y;#M;#x;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=z,s,i,r,o,h){this.name=t,this.#b=r?Pt(t):vt(t),this.#n=e&sn,this.nocase=r,this.roots=i,this.root=s||this,this.#y=o,this.#p=h.fullpath,this.#R=h.relative,this.#v=h.relativePosix,this.parent=h.parent,this.parent?this.#t=this.parent.#t:this.#t=fs(h.fs)}depth(){return this.#k!==void 0?this.#k:this.parent?this.#k=this.parent.depth()+1:this.#k=0}childrenCache(){return this.#y}resolve(t){if(!t)return this;let e=this.getRootString(t),i=t.substring(e.length).split(this.splitSep);return e?this.getRoot(e).#L(i):this.#L(i)}#L(t){let e=this;for(let s of t)e=e.child(s);return e}children(){let t=this.#y.get(this);if(t)return t;let e=Object.assign([],{provisional:0});return this.#y.set(this,e),this.#n&=~ue,e}child(t,e){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let s=this.children(),i=this.nocase?Pt(t):vt(t);for(let a of s)if(a.#b===i)return a;let r=this.parent?this.sep:"",o=this.#p?this.#p+r+t:void 0,h=this.newChild(t,z,{...e,parent:this,fullpath:o});return this.canReaddir()||(h.#n|=W),s.push(h),h}relative(){if(this.isCWD)return"";if(this.#R!==void 0)return this.#R;let t=this.name,e=this.parent;if(!e)return this.#R=this.name;let s=e.relative();return s+(!s||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#v!==void 0)return this.#v;let t=this.name,e=this.parent;if(!e)return this.#v=this.fullpathPosix();let s=e.relativePosix();return s+(!s||!e.parent?"":"/")+t}fullpath(){if(this.#p!==void 0)return this.#p;let t=this.name,e=this.parent;if(!e)return this.#p=this.name;let i=e.fullpath()+(e.parent?this.sep:"")+t;return this.#p=i}fullpathPosix(){if(this.#F!==void 0)return this.#F;if(this.sep==="/")return this.#F=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#F=`//?/${i}`:this.#F=i}let t=this.parent,e=t.fullpathPosix(),s=e+(!e||!t.parent?"":"/")+this.name;return this.#F=s}isUnknown(){return(this.#n&j)===z}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#n&j)===gs}isDirectory(){return(this.#n&j)===H}isCharacterDevice(){return(this.#n&j)===ps}isBlockDevice(){return(this.#n&j)===ms}isFIFO(){return(this.#n&j)===ds}isSocket(){return(this.#n&j)===ws}isSymbolicLink(){return(this.#n&Q)===Q}lstatCached(){return this.#n&hs?this:void 0}readlinkCached(){return this.#M}realpathCached(){return this.#x}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#M)return!0;if(!this.parent)return!1;let t=this.#n&j;return!(t!==z&&t!==Q||this.#n&$t||this.#n&W)}calledReaddir(){return!!(this.#n&ue)}isENOENT(){return!!(this.#n&W)}isNamed(t){return this.nocase?this.#b===Pt(t):this.#b===vt(t)}async readlink(){let t=this.#M;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=await this.#t.promises.readlink(this.fullpath()),s=(await this.parent.realpath())?.resolve(e);if(s)return this.#M=s}catch(e){this.#I(e.code);return}}readlinkSync(){let t=this.#M;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=this.#t.readlinkSync(this.fullpath()),s=this.parent.realpathSync()?.resolve(e);if(s)return this.#M=s}catch(e){this.#I(e.code);return}}#j(t){this.#n|=ue;for(let e=t.provisional;es(null,t))}readdirCB(t,e=!1){if(!this.canReaddir()){e?t(null,[]):queueMicrotask(()=>t(null,[]));return}let s=this.children();if(this.calledReaddir()){let r=s.slice(0,s.provisional);e?t(null,r):queueMicrotask(()=>t(null,r));return}if(this.#P.push(t),this.#W)return;this.#W=!0;let i=this.fullpath();this.#t.readdir(i,{withFileTypes:!0},(r,o)=>{if(r)this.#_(r.code),s.provisional=0;else{for(let h of o)this.#N(h,s);this.#j(s)}this.#q(s.slice(0,s.provisional))})}#$;async readdir(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();if(this.#$)await this.#$;else{let s=()=>{};this.#$=new Promise(i=>s=i);try{for(let i of await this.#t.promises.readdir(e,{withFileTypes:!0}))this.#N(i,t);this.#j(t)}catch(i){this.#_(i.code),t.provisional=0}this.#$=void 0,s()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();try{for(let s of this.#t.readdirSync(e,{withFileTypes:!0}))this.#N(s,t);this.#j(t)}catch(s){this.#_(s.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(this.#n&as)return!1;let t=j&this.#n;return t===z||t===H||t===Q}shouldWalk(t,e){return(this.#n&H)===H&&!(this.#n&as)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#x)return this.#x;if(!((Wt|$t|W)&this.#n))try{let t=await this.#t.promises.realpath(this.fullpath());return this.#x=this.resolve(t)}catch{this.#z()}}realpathSync(){if(this.#x)return this.#x;if(!((Wt|$t|W)&this.#n))try{let t=this.#t.realpathSync(this.fullpath());return this.#x=this.resolve(t)}catch{this.#z()}}[ys](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;let e=new Set([]),s=[],i=this;for(;i&&i.parent;)e.add(i),i.#R=s.join(this.sep),i.#v=s.join("/"),i=i.parent,s.push("..");for(i=t;i&&i.parent&&!e.has(i);)i.#R=void 0,i.#v=void 0,i=i.parent}},Ut=class n extends O{sep="\\";splitSep=en;constructor(t,e=z,s,i,r,o,h){super(t,e,s,i,r,o,h)}newChild(t,e=z,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(t){return pe.parse(t).root}getRoot(t){if(t=tn(t.toUpperCase()),t===this.root.name)return this.root;for(let[e,s]of Object.entries(this.roots))if(this.sameRoot(t,e))return this.roots[t]=s;return this.roots[t]=new ot(t,this).root}sameRoot(t,e=this.root.name){return t=t.toUpperCase().replace(/\//g,"\\").replace(us,"$1\\"),t===e}},Gt=class n extends O{splitSep="/";sep="/";constructor(t,e=z,s,i,r,o,h){super(t,e,s,i,r,o,h)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,e=z,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}},Ht=class{root;rootPath;roots;cwd;#t;#s;#r;nocase;#i;constructor(t=process.cwd(),e,s,{nocase:i,childrenCacheSize:r=16*1024,fs:o=St}={}){this.#i=fs(o),(t instanceof URL||t.startsWith("file://"))&&(t=Bi(t));let h=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(h),this.#t=new Bt,this.#s=new Bt,this.#r=new me(r);let a=h.substring(this.rootPath.length).split(s);if(a.length===1&&!a[0]&&a.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#i),this.roots[this.rootPath]=this.root;let l=this.root,c=a.length-1,f=e.sep,u=this.rootPath,d=!1;for(let g of a){let p=c--;l=l.child(g,{relative:new Array(p).fill("..").join(f),relativePosix:new Array(p).fill("..").join("/"),fullpath:u+=(d?"":f)+g}),d=!0}this.cwd=l}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#r}resolve(...t){let e="";for(let r=t.length-1;r>=0;r--){let o=t[r];if(!(!o||o===".")&&(e=e?`${o}/${e}`:o,this.isAbsolute(o)))break}let s=this.#t.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpath();return this.#t.set(e,i),i}resolvePosix(...t){let e="";for(let r=t.length-1;r>=0;r--){let o=t[r];if(!(!o||o===".")&&(e=e?`${o}/${e}`:o,this.isAbsolute(o)))break}let s=this.#s.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpathPosix();return this.#s.set(e,i),i}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t,t=this.cwd);let{withFileTypes:s}=e;if(t.canReaddir()){let i=await t.readdir();return s?i:i.map(r=>r.name)}else return[]}readdirSync(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t,t=this.cwd);let{withFileTypes:s=!0}=e;return t.canReaddir()?s?t.readdirSync():t.readdirSync().map(i=>i.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t.withFileTypes,t=this.cwd);let s=await t.readlink();return e?s:s?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t.withFileTypes,t=this.cwd);let s=t.readlinkSync();return e?s:s?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t.withFileTypes,t=this.cwd);let s=await t.realpath();return e?s:s?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t.withFileTypes,t=this.cwd);let s=t.realpathSync();return e?s:s?.fullpath()}async walk(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=[];(!r||r(t))&&h.push(s?t:t.fullpath());let a=new Set,l=(f,u)=>{a.add(f),f.readdirCB((d,g)=>{if(d)return u(d);let p=g.length;if(!p)return u();let w=()=>{--p===0&&u()};for(let m of g)(!r||r(m))&&h.push(s?m:m.fullpath()),i&&m.isSymbolicLink()?m.realpath().then(S=>S?.isUnknown()?S.lstat():S).then(S=>S?.shouldWalk(a,o)?l(S,w):w()):m.shouldWalk(a,o)?l(m,w):w()},!0)},c=t;return new Promise((f,u)=>{l(c,d=>{if(d)return u(d);f(h)})})}walkSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=[];(!r||r(t))&&h.push(s?t:t.fullpath());let a=new Set([t]);for(let l of a){let c=l.readdirSync();for(let f of c){(!r||r(f))&&h.push(s?f:f.fullpath());let u=f;if(f.isSymbolicLink()){if(!(i&&(u=f.realpathSync())))continue;u.isUnknown()&&u.lstatSync()}u.shouldWalk(a,o)&&a.add(u)}}return h}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e;(!r||r(t))&&(yield s?t:t.fullpath());let h=new Set([t]);for(let a of h){let l=a.readdirSync();for(let c of l){(!r||r(c))&&(yield s?c:c.fullpath());let f=c;if(c.isSymbolicLink()){if(!(i&&(f=c.realpathSync())))continue;f.isUnknown()&&f.lstatSync()}f.shouldWalk(h,o)&&h.add(f)}}}stream(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=new X({objectMode:!0});(!r||r(t))&&h.write(s?t:t.fullpath());let a=new Set,l=[t],c=0,f=()=>{let u=!1;for(;!u;){let d=l.shift();if(!d){c===0&&h.end();return}c++,a.add(d);let g=(w,m,S=!1)=>{if(w)return h.emit("error",w);if(i&&!S){let b=[];for(let y of m)y.isSymbolicLink()&&b.push(y.realpath().then(E=>E?.isUnknown()?E.lstat():E));if(b.length){Promise.all(b).then(()=>g(null,m,!0));return}}for(let b of m)b&&(!r||r(b))&&(h.write(s?b:b.fullpath())||(u=!0));c--;for(let b of m){let y=b.realpathCached()||b;y.shouldWalk(a,o)&&l.push(y)}u&&!h.flowing?h.once("drain",f):p||f()},p=!0;d.readdirCB(g,!0),p=!1}};return f(),h}streamSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=new X({objectMode:!0}),a=new Set;(!r||r(t))&&h.write(s?t:t.fullpath());let l=[t],c=0,f=()=>{let u=!1;for(;!u;){let d=l.shift();if(!d){c===0&&h.end();return}c++,a.add(d);let g=d.readdirSync();for(let p of g)(!r||r(p))&&(h.write(s?p:p.fullpath())||(u=!0));c--;for(let p of g){let w=p;if(p.isSymbolicLink()){if(!(i&&(w=p.realpathSync())))continue;w.isUnknown()&&w.lstatSync()}w.shouldWalk(a,o)&&l.push(w)}}u&&!h.flowing&&h.once("drain",f)};return f(),h}chdir(t=this.cwd){let e=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[ys](e)}},ot=class extends Ht{sep="\\";constructor(t=process.cwd(),e={}){let{nocase:s=!0}=e;super(t,pe,"\\",{...e,nocase:s}),this.nocase=s;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(t){return pe.parse(t).root.toUpperCase()}newRoot(t){return new Ut(this.rootPath,H,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}},ht=class extends Ht{sep="/";constructor(t=process.cwd(),e={}){let{nocase:s=!1}=e;super(t,Wi,"/",{...e,nocase:s}),this.nocase=s}parseRootPath(t){return"/"}newRoot(t){return new Gt(this.rootPath,H,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}},xt=class extends ht{constructor(t=process.cwd(),e={}){let{nocase:s=!0}=e;super(t,{...e,nocase:s})}},fr=process.platform==="win32"?Ut:Gt,bs=process.platform==="win32"?ot:process.platform==="darwin"?xt:ht;var nn=n=>n.length>=1,rn=n=>n.length>=1,at=class n{#t;#s;#r;length;#i;#h;#l;#f;#a;#o;#e=!0;constructor(t,e,s,i){if(!nn(t))throw new TypeError("empty pattern list");if(!rn(e))throw new TypeError("empty glob list");if(e.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,s<0||s>=this.length)throw new TypeError("index out of range");if(this.#t=t,this.#s=e,this.#r=s,this.#i=i,this.#r===0){if(this.isUNC()){let[r,o,h,a,...l]=this.#t,[c,f,u,d,...g]=this.#s;l[0]===""&&(l.shift(),g.shift());let p=[r,o,h,a,""].join("/"),w=[c,f,u,d,""].join("/");this.#t=[p,...l],this.#s=[w,...g],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){let[r,...o]=this.#t,[h,...a]=this.#s;o[0]===""&&(o.shift(),a.shift());let l=r+"/",c=h+"/";this.#t=[l,...o],this.#s=[c,...a],this.length=this.#t.length}}}pattern(){return this.#t[this.#r]}isString(){return typeof this.#t[this.#r]=="string"}isGlobstar(){return this.#t[this.#r]===R}isRegExp(){return this.#t[this.#r]instanceof RegExp}globString(){return this.#l=this.#l||(this.#r===0?this.isAbsolute()?this.#s[0]+this.#s.slice(1).join("/"):this.#s.join("/"):this.#s.slice(this.#r).join("/"))}hasMore(){return this.length>this.#r+1}rest(){return this.#h!==void 0?this.#h:this.hasMore()?(this.#h=new n(this.#t,this.#s,this.#r+1,this.#i),this.#h.#o=this.#o,this.#h.#a=this.#a,this.#h.#f=this.#f,this.#h):this.#h=null}isUNC(){let t=this.#t;return this.#a!==void 0?this.#a:this.#a=this.#i==="win32"&&this.#r===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3]}isDrive(){let t=this.#t;return this.#f!==void 0?this.#f:this.#f=this.#i==="win32"&&this.#r===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){let t=this.#t;return this.#o!==void 0?this.#o:this.#o=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){let t=this.#t[0];return typeof t=="string"&&this.isAbsolute()&&this.#r===0?t:""}checkFollowGlobstar(){return!(this.#r===0||!this.isGlobstar()||!this.#e)}markFollowGlobstar(){return this.#r===0||!this.isGlobstar()||!this.#e?!1:(this.#e=!1,!0)}};var on=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",lt=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(t,{nobrace:e,nocase:s,noext:i,noglobstar:r,platform:o=on}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:e,nocase:s,noext:i,noglobstar:r,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let h of t)this.add(h)}add(t){let e=new D(t,this.mmopts);for(let s=0;s[t,!!(e&2),!!(e&1)])}},ye=class{store=new Map;add(t,e){if(!t.canReaddir())return;let s=this.store.get(t);s?s.find(i=>i.globString()===e.globString())||s.push(e):this.store.set(t,[e])}get(t){let e=this.store.get(t);if(!e)throw new Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}},Tt=class n{hasWalkedCache;matches=new we;subwalks=new ye;patterns;follow;dot;opts;constructor(t,e){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=e?e.copy():new ge}processPatterns(t,e){this.patterns=e;let s=e.map(i=>[t,i]);for(let[i,r]of s){this.hasWalkedCache.storeWalked(i,r);let o=r.root(),h=r.isAbsolute()&&this.opts.absolute!==!1;if(o){i=i.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let f=r.rest();if(f)r=f;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let a,l,c=!1;for(;typeof(a=r.pattern())=="string"&&(l=r.rest());)i=i.resolve(a),r=l,c=!0;if(a=r.pattern(),l=r.rest(),c){if(this.hasWalkedCache.hasWalked(i,r))continue;this.hasWalkedCache.storeWalked(i,r)}if(typeof a=="string"){let f=a===".."||a===""||a===".";this.matches.add(i.resolve(a),h,f);continue}else if(a===R){(!i.isSymbolicLink()||this.follow||r.checkFollowGlobstar())&&this.subwalks.add(i,r);let f=l?.pattern(),u=l?.rest();if(!l||(f===""||f===".")&&!u)this.matches.add(i,h,f===""||f===".");else if(f===".."){let d=i.parent||i;u?this.hasWalkedCache.hasWalked(d,u)||this.subwalks.add(d,u):this.matches.add(d,h,!0)}}else a instanceof RegExp&&this.subwalks.add(i,r)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new n(this.opts,this.hasWalkedCache)}filterEntries(t,e){let s=this.subwalks.get(t),i=this.child();for(let r of e)for(let o of s){let h=o.isAbsolute(),a=o.pattern(),l=o.rest();a===R?i.testGlobstar(r,o,l,h):a instanceof RegExp?i.testRegExp(r,a,l,h):i.testString(r,a,l,h)}return i}testGlobstar(t,e,s,i){if((this.dot||!t.name.startsWith("."))&&(e.hasMore()||this.matches.add(t,i,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,e):t.isSymbolicLink()&&(s&&e.checkFollowGlobstar()?this.subwalks.add(t,s):e.markFollowGlobstar()&&this.subwalks.add(t,e)))),s){let r=s.pattern();if(typeof r=="string"&&r!==".."&&r!==""&&r!==".")this.testString(t,r,s.rest(),i);else if(r===".."){let o=t.parent||t;this.subwalks.add(o,s)}else r instanceof RegExp&&this.testRegExp(t,r,s.rest(),i)}}testRegExp(t,e,s,i){e.test(t.name)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,!1))}testString(t,e,s,i){t.isNamed(e)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,!1))}};var hn=(n,t)=>typeof n=="string"?new lt([n],t):Array.isArray(n)?new lt(n,t):n,qt=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#s;#r;signal;maxDepth;includeChildMatches;constructor(t,e,s){if(this.patterns=t,this.path=e,this.opts=s,this.#r=!s.posix&&s.platform==="win32"?"\\":"/",this.includeChildMatches=s.includeChildMatches!==!1,(s.ignore||!this.includeChildMatches)&&(this.#s=hn(s.ignore??[],s),!this.includeChildMatches&&typeof this.#s.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=s.maxDepth||1/0,s.signal&&(this.signal=s.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0}))}#i(t){return this.seen.has(t)||!!this.#s?.ignored?.(t)}#h(t){return!!this.#s?.childrenIgnored?.(t)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let t;for(;!this.paused&&(t=this.#t.shift());)t()}onResume(t){this.signal?.aborted||(this.paused?this.#t.push(t):t())}async matchCheck(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||await t.realpath(),!s)return;t=s}let r=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let o=await r.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(r,e)}matchCheckTest(t,e){return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!t.realpathCached()?.isDirectory())&&!this.#i(t)?t:void 0}matchCheckSync(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||t.realpathSync(),!s)return;t=s}let r=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let o=r.realpathSync();o&&(o?.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(r,e)}matchFinish(t,e){if(this.#i(t))return;if(!this.includeChildMatches&&this.#s?.add){let r=`${t.relativePosix()}/**`;this.#s.add(r)}let s=this.opts.absolute===void 0?e:this.opts.absolute;this.seen.add(t);let i=this.opts.mark&&t.isDirectory()?this.#r:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(s){let r=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(r+i)}else{let r=this.opts.posix?t.relativePosix():t.relative(),o=this.opts.dotRelative&&!r.startsWith(".."+this.#r)?"."+this.#r:"";this.matchEmit(r?o+r+i:"."+i)}}async match(t,e,s){let i=await this.matchCheck(t,s);i&&this.matchFinish(i,e)}matchSync(t,e,s){let i=this.matchCheckSync(t,s);i&&this.matchFinish(i,e)}walkCB(t,e,s){this.signal?.aborted&&s(),this.walkCB2(t,e,new Tt(this.opts),s)}walkCB2(t,e,s,i){if(this.#h(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(t,e,s,i));return}s.processPatterns(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#i(h)||(r++,this.match(h,a,l).then(()=>o()));for(let h of s.subwalkTargets()){if(this.maxDepth!==1/0&&h.depth()>=this.maxDepth)continue;r++;let a=h.readdirCached();h.calledReaddir()?this.walkCB3(h,a,s,o):h.readdirCB((l,c)=>this.walkCB3(h,c,s,o),!0)}o()}walkCB3(t,e,s,i){s=s.filterEntries(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#i(h)||(r++,this.match(h,a,l).then(()=>o()));for(let[h,a]of s.subwalks.entries())r++,this.walkCB2(h,a,s.child(),o);o()}walkCBSync(t,e,s){this.signal?.aborted&&s(),this.walkCB2Sync(t,e,new Tt(this.opts),s)}walkCB2Sync(t,e,s,i){if(this.#h(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(t,e,s,i));return}s.processPatterns(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#i(h)||this.matchSync(h,a,l);for(let h of s.subwalkTargets()){if(this.maxDepth!==1/0&&h.depth()>=this.maxDepth)continue;r++;let a=h.readdirSync();this.walkCB3Sync(h,a,s,o)}o()}walkCB3Sync(t,e,s,i){s=s.filterEntries(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#i(h)||this.matchSync(h,a,l);for(let[h,a]of s.subwalks.entries())r++,this.walkCB2Sync(h,a,s.child(),o);o()}},Ct=class extends qt{matches=new Set;constructor(t,e,s){super(t,e,s)}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,e)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?e(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},At=class extends qt{results;constructor(t,e,s){super(t,e,s),this.results=new X({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(t){this.results.write(t),this.results.flowing||this.pause()}stream(){let t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end())}):this.walkCB(t,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var ln=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",B=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(t,e){if(!e)throw new TypeError("glob options required");if(this.withFileTypes=!!e.withFileTypes,this.signal=e.signal,this.follow=!!e.follow,this.dot=!!e.dot,this.dotRelative=!!e.dotRelative,this.nodir=!!e.nodir,this.mark=!!e.mark,e.cwd?(e.cwd instanceof URL||e.cwd.startsWith("file://"))&&(e.cwd=an(e.cwd)):this.cwd="",this.cwd=e.cwd||"",this.root=e.root,this.magicalBraces=!!e.magicalBraces,this.nobrace=!!e.nobrace,this.noext=!!e.noext,this.realpath=!!e.realpath,this.absolute=e.absolute,this.includeChildMatches=e.includeChildMatches!==!1,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(t=t.map(a=>a.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(a=>a.includes("/")?a:`./**/${a}`)}if(this.pattern=t,this.platform=e.platform||ln,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,e.nocase!==void 0&&e.nocase!==e.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let a=e.platform==="win32"?ot:e.platform==="darwin"?xt:e.platform?ht:bs;this.scurry=new a(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;let s=this.platform==="darwin"||this.platform==="win32",i={...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},r=this.pattern.map(a=>new D(a,i)),[o,h]=r.reduce((a,l)=>(a[0].push(...l.set),a[1].push(...l.globParts),a),[[],[]]);this.patterns=o.map((a,l)=>{let c=h[l];if(!c)throw new Error("invalid pattern object");return new at(a,c,0,this.platform)})}async walk(){return[...await new Ct(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new Ct(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new At(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new At(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var be=(n,t={})=>{Array.isArray(n)||(n=[n]);for(let e of n)if(new D(e,t).hasMagic())return!0;return!1};function Jt(n,t={}){return new B(n,t).streamSync()}function vs(n,t={}){return new B(n,t).stream()}function Kt(n,t={}){return new B(n,t).walkSync()}async function Ss(n,t={}){return new B(n,t).walk()}function Vt(n,t={}){return new B(n,t).iterateSync()}function xs(n,t={}){return new B(n,t).iterate()}var cn=Jt,fn=Object.assign(vs,{sync:Jt}),un=Vt,dn=Object.assign(xs,{sync:Vt}),pn=Object.assign(Kt,{stream:Jt,iterate:Vt}),Es=Object.assign(Ss,{glob:Ss,globSync:Kt,sync:pn,globStream:vs,stream:fn,globStreamSync:Jt,streamSync:cn,globIterate:xs,iterate:dn,globIterateSync:Vt,iterateSync:un,Glob:B,hasMagic:be,escape:et,unescape:$});Es.glob=Es;import mn from"node:fs";function Ts(n){return JSON.parse(mn.readFileSync(n).toString("utf-8"))}function Yt(n){return Ts(n)}function Se(n){return Ts(n)}function K(n){return(process.env[`INPUT_${n.toUpperCase()}`]||"").trim()}function Cs(n){let t=gn(n);Xt.mkdirSync(Zt.join(Rt.cwd(),n.analyzerDirectory),{recursive:!0});let e=Zt.join(Rt.cwd(),n.analyzerDirectory,"bundle_analysis.json");Xt.writeFileSync(e,JSON.stringify(t,null,2)),ct.log(`Wrote ${e}`,t)}function Ee(n){return n.metafiles.flatMap(t=>Kt(Zt.join(Rt.cwd(),t),{nodir:!0}).map(e=>({relativePath:Zt.relative(Rt.cwd(),e),absolutePath:e})))}function gn(n){let t={},e=Ee(n),s=e.reduce((i,{relativePath:r,absolutePath:o})=>{try{Xt.accessSync(o,Xt.constants.R_OK)}catch{ct.error(`No meta file found at "${o}" - a path to meta file may be wrong, or esbuild is not executed.`),Rt.exit(1)}let h=Yt(o);return Object.entries(h.outputs).reduce((a,l)=>{let[c,f]=l;return n.includeExtensions.some(u=>c.toLowerCase().endsWith(u))&&(a[`${r} -> ${c}`]={bytes:f.bytes,metafile:r,outfile:c}),a},i),i},t);return ct.log("Found metafiles",e),ct.log("Found result",s),s}function ks(n){let t=!1,e=`## \u{1F4E6} esbuild Bundle Analysis for ${n.name} This analysis was generated by [esbuild-bundle-analyzer](https://github.com/exoego/esbuild-bundle-analyzer). \u{1F916} -`,s=kt.join(process.cwd(),n.analyzerDirectory,"bundle_analysis.json"),i=Se(s);_.log(`Current analysis found in ${s}`,i);let r=bn(n),o=Sn(n),a=[...new Set([...Object.keys(i),...Object.keys(r)])].sort().map(l=>{let c=i[l],f=r[l];if(_.log("Comparing",l,c,f),!c)return _.log("Deleted file",l),t=!0,{...f,baseBytes:-1,remark:"deleted",tree:void 0};let u=o.get(Os(c.metafile,c.outfile));if(!f)return _.log("New file",l),t=!0,{...c,baseBytes:-1,remark:"added",tree:u};let d=c.bytes-f.bytes;return d!==0?(_.log("Changed file",l,d),t=!0):_.log("No change",l),{...c,baseBytes:f.bytes,tree:u,remark:Math.sign(d)?"increased":"decreased"}});_.log("Comparison done.",a),t?(e+=En(a,n.percentExtraAttention,n.showNoChange),e+=vn(a,n.showNoChange),e+=Tn(a,n.topNLargestPaths),e+=yn(n)):e+="This PR introduced no changes to the esbuild bundle! \u{1F64C}",e+=``,wn(n,e)}function Os(n,t){return`${n} -> ${t}`}function wn(n,t){_.log("Writing comment to file.",t),xe.mkdirSync(kt.join(process.cwd(),n.analyzerDirectory),{recursive:!0}),xe.writeFileSync(kt.join(process.cwd(),n.analyzerDirectory,"bundle_analysis_comment.txt"),t.trim())}function yn(n){return n.showDetails?` +`,s=kt.join(process.cwd(),n.analyzerDirectory,"bundle_analysis.json"),i=Se(s);_.log(`Current analysis found in ${s}`,i);let r=bn(n),o=Sn(n),a=[...new Set([...Object.keys(i),...Object.keys(r)])].sort().map(l=>{let c=i[l],f=r[l];if(_.log("Comparing",l,c,f),!c)return _.log("Deleted file",l),t=!0,{...f,baseBytes:-1,remark:"deleted",tree:void 0};let u=o.get(Os(c.metafile,c.outfile));if(!f)return _.log("New file",l),t=!0,{...c,baseBytes:-1,remark:"added",tree:u};let d=c.bytes-f.bytes;return d!==0?(_.log("Changed file",l,d),t=!0):_.log("No change",l),{...c,baseBytes:f.bytes,tree:u,remark:Math.sign(d)?"increased":"decreased"}});_.log("Comparison done.",a),t?(e+=En(a,n.percentExtraAttention,n.showNoChange),e+=vn(a,n.showNoChange),e+=Tn(a,n.topNLargestPaths),e+=yn(n)):e+="This PR introduced no changes to the esbuild bundle! \u{1F64C}",e=` +${e}`,wn(n,e)}function Os(n,t){return`${n} -> ${t}`}function wn(n,t){_.log("Writing comment to file.",t),xe.mkdirSync(kt.join(process.cwd(),n.analyzerDirectory),{recursive:!0}),xe.writeFileSync(kt.join(process.cwd(),n.analyzerDirectory,"bundle_analysis_comment.txt"),t.trim())}function yn(n){return n.showDetails?`
      Details

      Next to the size is how much the size has increased or decreased compared with the base branch of this PR.

      @@ -41,4 +42,4 @@ ${s} `}if(o){let h=i-r[0].value,a=As(h,i);e+=`| (other) | ${Rs(a,h)} | `}}return e+=`
      `,e}function Rs(n,t){return`\${{\\color{Goldenrod}{ ${Cn(n/100)} }}}$ ${n.toFixed(1)}%, ${Te(t)}`}var Ms=["","\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u2588"],ve=1/(Ms.length-1);function Cn(n,t=25,e=0,s=1){let i=n*t,r=Math.floor(i),o=i-r,h=Math.round(ve*Math.floor(o/ve)/ve);return"\u2588".repeat(r)+Ms[h]}function Ds(n){return Te(n.bytes)}function An(n,t){if(n.remark==="deleted")return"\u{1F5D1}\uFE0F Deleted";if(n.remark==="added")return"\u{1F195} Added";let e=n.bytes-n.baseBytes;if(e!==0){let s=e/n.baseBytes*100;return`${Rn(s,t)}${Te(e)} (${Ns(s)}${s.toFixed(1)}%)`}return"\u2705 No change"}function Ns(n){return n<0?"":"+"}function Rn(n,t){let e;return n>0&&n=t?e="\u203C\uFE0F":e="\u2705 ",`${e} ${Ns(n)}`}function On(){let n=K("metafiles");if(!n)throw new Error("metafiles is not specified");let t=K("name");if(!t)throw new Error("name is not specified");return{percentExtraAttention:Number.parseInt(K("percent_extra_attention")||"20",10),showDetails:["true","True","TRUE"].includes(K("show_details")||"true"),showNoChange:["true","True","TRUE"].includes(K("show_no_change")||"true"),topNLargestPaths:Number.parseInt(K("top_n_largest_paths")||"20",10),includeExtensions:(K("include_extensions")||".js,.mjs,.cjs").split(","),name:t,analyzerDirectory:K("analyze_directory")||".analyzer",metafiles:n.split(",")}}function Fn(n=On()){Cs(n),ks(n)}import.meta.url===kn(process.argv[1]).href&&Fn();export{Fn as run}; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jb21wYXJlLnRzIiwgIi4uL3NyYy9yZXBvcnQudHMiLCAiLi4vc3JjL3V0aWxzLnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJpbXBvcnQgeyBwYXRoVG9GaWxlVVJMIH0gZnJvbSBcIm5vZGU6dXJsXCI7XG5pbXBvcnQgeyBjb21wYXJlIH0gZnJvbSBcIi4vY29tcGFyZVwiO1xuaW1wb3J0IHsgcmVwb3J0IH0gZnJvbSBcIi4vcmVwb3J0XCI7XG5pbXBvcnQgdHlwZSB7IElucHV0IH0gZnJvbSBcIi4vdHlwZXNcIjtcbmltcG9ydCB7IGdldFNpbmdsZUlucHV0IH0gZnJvbSBcIi4vdXRpbHNcIjtcblxuZnVuY3Rpb24gZ2V0SW5wdXQoKTogSW5wdXQge1xuXHRjb25zdCByYXdNZXRhZmlsZXMgPSBnZXRTaW5nbGVJbnB1dChcIm1ldGFmaWxlc1wiKTtcblx0aWYgKCFyYXdNZXRhZmlsZXMpIHtcblx0XHR0aHJvdyBuZXcgRXJyb3IoXCJtZXRhZmlsZXMgaXMgbm90IHNwZWNpZmllZFwiKTtcblx0fVxuXHRjb25zdCBuYW1lID0gZ2V0U2luZ2xlSW5wdXQoXCJuYW1lXCIpO1xuXHRpZiAoIW5hbWUpIHtcblx0XHR0aHJvdyBuZXcgRXJyb3IoXCJuYW1lIGlzIG5vdCBzcGV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sICJkIiwgInNob3dOb0NoYW5nZSIsICJkYXRhIiwgInJlZFRocmVzaG9sZCIsICJyZW5kZXJTaXplIiwgInJlbmRlck5vdGUiLCAibm9DaGFuZ2VCdW5kbGVzIiwgInJvd3MiLCAiZmluZExhcmdlRGlyZWN0b3JpZXMiLCAiTiIsICJub2RlcyIsICJxdWV1ZSIsICJzaGlmdCIsICJkZXB0aCIsICJpdGVtIiwgImEiLCAiYiIsICJmaXhlZFBlcmNlbnQiLCAidG9wTkxhcmdlc3RQYXRocyIsICJ0b3RhbFNpemUiLCAibGFyZ2VOb2RlcyIsICJoYXNPdGhlciIsICJwZXJjZW50IiwgInJlbmRlckJhciIsICJvdGhlclNpemUiLCAib3RoZXJQZXJjZW50IiwgInByb2dyZXNzIiwgImJsb2NrcyIsICJwcm9ncmVzc2lvbiIsICJsZW5ndGgiLCAidm1pbiIsICJ2bWF4IiwgInYiLCAiaW50ZWdlclBhcnQiLCAiZnJhY3Rpb25hbFBhcnQiLCAiaSIsICJwZXJjZW50Q2hhbmdlIiwgInJlbmRlclN0YXR1c0luZGljYXRvciIsICJudW0iLCAicmVzIiwgImdldElucHV0IiwgInJhd01ldGFmaWxlcyIsICJnZXRTaW5nbGVJbnB1dCIsICJuYW1lIiwgInJ1biIsICJpbnB1dCIsICJyZXBvcnQiLCAiY29tcGFyZSIsICJwYXRoVG9GaWxlVVJMIl0KfQo= +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jb21wYXJlLnRzIiwgIi4uL3NyYy9yZXBvcnQudHMiLCAiLi4vc3JjL3V0aWxzLnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJpbXBvcnQgeyBwYXRoVG9GaWxlVVJMIH0gZnJvbSBcIm5vZGU6dXJsXCI7XG5pbXBvcnQgeyBjb21wYXJlIH0gZnJvbSBcIi4vY29tcGFyZVwiO1xuaW1wb3J0IH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wgInZtYXgiLCAidiIsICJpbnRlZ2VyUGFydCIsICJmcmFjdGlvbmFsUGFydCIsICJpIiwgInBlcmNlbnRDaGFuZ2UiLCAicmVuZGVyU3RhdHVzSW5kaWNhdG9yIiwgIm51bSIsICJyZXMiLCAiZ2V0SW5wdXQiLCAicmF3TWV0YWZpbGVzIiwgImdldFNpbmdsZUlucHV0IiwgIm5hbWUiLCAicnVuIiwgImlucHV0IiwgInJlcG9ydCIsICJjb21wYXJlIiwgInBhdGhUb0ZpbGVVUkwiXQp9Cg== diff --git a/src/compare.ts b/src/compare.ts index c7200fb..2eb52a5 100644 --- a/src/compare.ts +++ b/src/compare.ts @@ -83,7 +83,8 @@ This analysis was generated by [esbuild-bundle-analyzer](https://github.com/exoe // we add this tag so that our action can be able to easily and // consistently find the right comment to edit as more commits are pushed. - output += ``; + output = ` +${output}`; writeComment(input, output); } From ed5bb5c377f319e0dbd3c6b9d6ab2bc2d8f051cb Mon Sep 17 00:00:00 2001 From: Alexander Castillo Date: Fri, 2 Aug 2024 07:45:14 +0200 Subject: [PATCH 4/4] chore: rerun build after syncing with main --- dist/index.mjs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dist/index.mjs b/dist/index.mjs index c073cb4..51c7582 100644 --- a/dist/index.mjs +++ b/dist/index.mjs @@ -1,10 +1,10 @@ -var _s=Object.create;var Ce=Object.defineProperty;var Ls=Object.getOwnPropertyDescriptor;var js=Object.getOwnPropertyNames;var zs=Object.getPrototypeOf,Is=Object.prototype.hasOwnProperty;var Ae=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var $s=(n,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of js(t))!Is.call(n,i)&&i!==e&&Ce(n,i,{get:()=>t[i],enumerable:!(s=Ls(t,i))||s.enumerable});return n};var Ps=(n,t,e)=>(e=n!=null?_s(zs(n)):{},$s(t||!n||!n.__esModule?Ce(e,"default",{value:n,enumerable:!0}):e,n));var Me=Ae((Dn,Fe)=>{"use strict";Fe.exports=ke;function ke(n,t,e){n instanceof RegExp&&(n=Re(n,e)),t instanceof RegExp&&(t=Re(t,e));var s=Oe(n,t,e);return s&&{start:s[0],end:s[1],pre:e.slice(0,s[0]),body:e.slice(s[0]+n.length,s[1]),post:e.slice(s[1]+t.length)}}function Re(n,t){var e=t.match(n);return e?e[0]:null}ke.range=Oe;function Oe(n,t,e){var s,i,r,o,h,a=e.indexOf(n),l=e.indexOf(t,a+1),c=a;if(a>=0&&l>0){if(n===t)return[a,l];for(s=[],r=e.length;c>=0&&!h;)c==a?(s.push(c),a=e.indexOf(n,c+1)):s.length==1?h=[s.pop(),l]:(i=s.pop(),i=0?a:l;s.length&&(h=[r,o])}return h}});var $e=Ae((Nn,Ie)=>{var De=Me();Ie.exports=Us;var Ne="\0SLASH"+Math.random()+"\0",_e="\0OPEN"+Math.random()+"\0",ee="\0CLOSE"+Math.random()+"\0",Le="\0COMMA"+Math.random()+"\0",je="\0PERIOD"+Math.random()+"\0";function te(n){return parseInt(n,10)==n?parseInt(n,10):n.charCodeAt(0)}function Ws(n){return n.split("\\\\").join(Ne).split("\\{").join(_e).split("\\}").join(ee).split("\\,").join(Le).split("\\.").join(je)}function Bs(n){return n.split(Ne).join("\\").split(_e).join("{").split(ee).join("}").split(Le).join(",").split(je).join(".")}function ze(n){if(!n)return[""];var t=[],e=De("{","}",n);if(!e)return n.split(",");var s=e.pre,i=e.body,r=e.post,o=s.split(",");o[o.length-1]+="{"+i+"}";var h=ze(r);return r.length&&(o[o.length-1]+=h.shift(),o.push.apply(o,h)),t.push.apply(t,o),t}function Us(n){return n?(n.substr(0,2)==="{}"&&(n="\\{\\}"+n.substr(2)),ft(Ws(n),!0).map(Bs)):[]}function Gs(n){return"{"+n+"}"}function Hs(n){return/^-?0\d/.test(n)}function qs(n,t){return n<=t}function Js(n,t){return n>=t}function ft(n,t){var e=[],s=De("{","}",n);if(!s)return[n];var i=s.pre,r=s.post.length?ft(s.post,!1):[""];if(/\$$/.test(s.pre))for(var o=0;o=0;if(!c&&!f)return s.post.match(/,.*\}/)?(n=s.pre+"{"+s.body+ee+s.post,ft(n)):[n];var u;if(c)u=s.body.split(/\.\./);else if(u=ze(s.body),u.length===1&&(u=ft(u[0],!1).map(Gs),u.length===1))return r.map(function(Ft){return s.pre+u[0]+Ft});var d;if(c){var g=te(u[0]),p=te(u[1]),w=Math.max(u[0].length,u[1].length),m=u.length==3?Math.abs(te(u[2])):1,S=qs,b=p0){var Ot=new Array(I+1).join("0");E<0?x="-"+Ot+x.slice(1):x=Ot+x}}d.push(x)}}else{d=[];for(var U=0;U{if(typeof n!="string")throw new TypeError("invalid pattern");if(n.length>65536)throw new TypeError("pattern is too long")};var Ks={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},dt=n=>n.replace(/[[\]\\-]/g,"\\$&"),Vs=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Pe=n=>n.join(""),We=(n,t)=>{let e=t;if(n.charAt(e)!=="[")throw new Error("not in a brace expression");let s=[],i=[],r=e+1,o=!1,h=!1,a=!1,l=!1,c=e,f="";t:for(;rf?s.push(dt(f)+"-"+dt(p)):p===f&&s.push(dt(p)),f="",r++;continue}if(n.startsWith("-]",r+1)){s.push(dt(p+"-")),r+=2;continue}if(n.startsWith("-",r+1)){f=p,r+=2;continue}s.push(dt(p)),r++}if(ct?n.replace(/\[([^\/\\])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var Ys=new Set(["!","?","+","*","@"]),Be=n=>Ys.has(n),Xs="(?!(?:^|/)\\.\\.?(?:$|/))",Mt="(?!\\.)",Zs=new Set(["[","."]),Qs=new Set(["..","."]),ti=new Set("().*{}+?[]^$\\!"),ei=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),se="[^/]",Ue=se+"*?",Ge=se+"+?",tt=class n{type;#t;#s;#r=!1;#i=[];#h;#l;#f;#a=!1;#o;#e;#m=!1;constructor(t,e,s={}){this.type=t,t&&(this.#s=!0),this.#h=e,this.#t=this.#h?this.#h.#t:this,this.#o=this.#t===this?s:this.#t.#o,this.#f=this.#t===this?[]:this.#t.#f,t==="!"&&!this.#t.#a&&this.#f.push(this),this.#l=this.#h?this.#h.#i.length:0}get hasMagic(){if(this.#s!==void 0)return this.#s;for(let t of this.#i)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#s=!0;return this.#s}toString(){return this.#e!==void 0?this.#e:this.type?this.#e=this.type+"("+this.#i.map(t=>String(t)).join("|")+")":this.#e=this.#i.map(t=>String(t)).join("")}#w(){if(this!==this.#t)throw new Error("should only call on root");if(this.#a)return this;this.toString(),this.#a=!0;let t;for(;t=this.#f.pop();){if(t.type!=="!")continue;let e=t,s=e.#h;for(;s;){for(let i=e.#l+1;!s.type&&itypeof e=="string"?e:e.toJSON()):[this.type,...this.#i.map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#a&&this.#h?.type==="!")&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#h?.isStart())return!1;if(this.#l===0)return!0;let t=this.#h;for(let e=0;e{let[g,p,w,m]=typeof d=="string"?n.#S(d,this.#s,a):d.toRegExpSource(t);return this.#s=this.#s||w,this.#r=this.#r||m,g}).join(""),c="";if(this.isStart()&&typeof this.#i[0]=="string"&&!(this.#i.length===1&&Qs.has(this.#i[0]))){let g=Zs,p=e&&g.has(l.charAt(0))||l.startsWith("\\.")&&g.has(l.charAt(2))||l.startsWith("\\.\\.")&&g.has(l.charAt(4)),w=!e&&!t&&g.has(l.charAt(0));c=p?Xs:w?Mt:""}let f="";return this.isEnd()&&this.#t.#a&&this.#h?.type==="!"&&(f="(?:$|\\/)"),[c+l+f,$(l),this.#s=!!this.#s,this.#r]}let s=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",r=this.#u(e);if(this.isStart()&&this.isEnd()&&!r&&this.type!=="!"){let a=this.toString();return this.#i=[a],this.type=null,this.#s=void 0,[a,$(this.toString()),!1,!1]}let o=!s||t||e||!Mt?"":this.#u(!0);o===r&&(o=""),o&&(r=`(?:${r})(?:${o})*?`);let h="";if(this.type==="!"&&this.#m)h=(this.isStart()&&!e?Mt:"")+Ge;else{let a=this.type==="!"?"))"+(this.isStart()&&!e&&!t?Mt:"")+Ue+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;h=i+r+a}return[h,$(r),this.#s=!!this.#s,this.#r]}#u(t){return this.#i.map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");let[s,i,r,o]=e.toRegExpSource(t);return this.#r=this.#r||o,s}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")}static#S(t,e,s=!1){let i=!1,r="",o=!1;for(let h=0;ht?n.replace(/[?*()[\]]/g,"[$&]"):n.replace(/[?*()[\]\\]/g,"\\$&");var F=(n,t,e={})=>(ut(t),!e.nocomment&&t.charAt(0)==="#"?!1:new D(t,e).match(n)),si=/^\*+([^+@!?\*\[\(]*)$/,ii=n=>t=>!t.startsWith(".")&&t.endsWith(n),ni=n=>t=>t.endsWith(n),ri=n=>(n=n.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(n)),oi=n=>(n=n.toLowerCase(),t=>t.toLowerCase().endsWith(n)),hi=/^\*+\.\*+$/,ai=n=>!n.startsWith(".")&&n.includes("."),li=n=>n!=="."&&n!==".."&&n.includes("."),ci=/^\.\*+$/,fi=n=>n!=="."&&n!==".."&&n.startsWith("."),ui=/^\*+$/,di=n=>n.length!==0&&!n.startsWith("."),pi=n=>n.length!==0&&n!=="."&&n!=="..",mi=/^\?+([^+@!?\*\[\(]*)?$/,gi=([n,t=""])=>{let e=Ke([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},wi=([n,t=""])=>{let e=Ve([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},yi=([n,t=""])=>{let e=Ve([n]);return t?s=>e(s)&&s.endsWith(t):e},bi=([n,t=""])=>{let e=Ke([n]);return t?s=>e(s)&&s.endsWith(t):e},Ke=([n])=>{let t=n.length;return e=>e.length===t&&!e.startsWith(".")},Ve=([n])=>{let t=n.length;return e=>e.length===t&&e!=="."&&e!==".."},Ye=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",He={win32:{sep:"\\"},posix:{sep:"/"}},Si=Ye==="win32"?He.win32.sep:He.posix.sep;F.sep=Si;var R=Symbol("globstar **");F.GLOBSTAR=R;var Ei="[^/]",vi=Ei+"*?",xi="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Ti="(?:(?!(?:\\/|^)\\.).)*?",Ci=(n,t={})=>e=>F(e,n,t);F.filter=Ci;var L=(n,t={})=>Object.assign({},n,t),Ai=n=>{if(!n||typeof n!="object"||!Object.keys(n).length)return F;let t=F;return Object.assign((s,i,r={})=>t(s,i,L(n,r)),{Minimatch:class extends t.Minimatch{constructor(i,r={}){super(i,L(n,r))}static defaults(i){return t.defaults(L(n,i)).Minimatch}},AST:class extends t.AST{constructor(i,r,o={}){super(i,r,L(n,o))}static fromGlob(i,r={}){return t.AST.fromGlob(i,L(n,r))}},unescape:(s,i={})=>t.unescape(s,L(n,i)),escape:(s,i={})=>t.escape(s,L(n,i)),filter:(s,i={})=>t.filter(s,L(n,i)),defaults:s=>t.defaults(L(n,s)),makeRe:(s,i={})=>t.makeRe(s,L(n,i)),braceExpand:(s,i={})=>t.braceExpand(s,L(n,i)),match:(s,i,r={})=>t.match(s,i,L(n,r)),sep:t.sep,GLOBSTAR:R})};F.defaults=Ai;var Xe=(n,t={})=>(ut(n),t.nobrace||!/\{(?:(?!\{).)*\}/.test(n)?[n]:(0,Je.default)(n));F.braceExpand=Xe;var Ri=(n,t={})=>new D(n,t).makeRe();F.makeRe=Ri;var ki=(n,t,e={})=>{let s=new D(t,e);return n=n.filter(i=>s.match(i)),s.options.nonull&&!n.length&&n.push(t),n};F.match=ki;var qe=/[?*]|[+@!]\(.*?\)|\[|\]/,Oi=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),D=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){ut(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||Ye,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);let s=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let i=this.globParts.map((r,o,h)=>{if(this.isWindows&&this.windowsNoMagicRoot){let a=r[0]===""&&r[1]===""&&(r[2]==="?"||!qe.test(r[2]))&&!qe.test(r[3]),l=/^[a-z]:/i.test(r[0]);if(a)return[...r.slice(0,4),...r.slice(4).map(c=>this.parse(c))];if(l)return[r[0],...r.slice(1).map(c=>this.parse(c))]}return r.map(a=>this.parse(a))});if(this.debug(this.pattern,i),this.set=i.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let s=-1;for(;(s=e.indexOf("**",s+1))!==-1;){let i=s;for(;e[i+1]==="**";)i++;i!==s&&e.splice(s,i-s)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((s,i)=>{let r=s[s.length-1];return i==="**"&&r==="**"?s:i===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(s.pop(),s):(s.push(i),s)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let i=1;ii&&s.splice(i+1,o-i);let h=s[i+1],a=s[i+2],l=s[i+3];if(h!==".."||!a||a==="."||a===".."||!l||l==="."||l==="..")continue;e=!0,s.splice(i,1);let c=s.slice(0);c[i]="**",t.push(c),i--}if(!this.preserveMultipleSlashes){for(let o=1;oe.length)}partsMatch(t,e,s=!1){let i=0,r=0,o=[],h="";for(;ib?e=e.slice(y):b>y&&(t=t.slice(b)))}}let{optimizationLevel:r=1}=this.options;r>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,h=0,a=t.length,l=e.length;o()=>(t||n((t={exports:{}}).exports,t),t.exports);var $s=(n,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of js(t))!Is.call(n,i)&&i!==e&&Ce(n,i,{get:()=>t[i],enumerable:!(s=Ls(t,i))||s.enumerable});return n};var Ps=(n,t,e)=>(e=n!=null?_s(zs(n)):{},$s(t||!n||!n.__esModule?Ce(e,"default",{value:n,enumerable:!0}):e,n));var Fe=Ae((Dn,Oe)=>{"use strict";Oe.exports=ke;function ke(n,t,e){n instanceof RegExp&&(n=Re(n,e)),t instanceof RegExp&&(t=Re(t,e));var s=Me(n,t,e);return s&&{start:s[0],end:s[1],pre:e.slice(0,s[0]),body:e.slice(s[0]+n.length,s[1]),post:e.slice(s[1]+t.length)}}function Re(n,t){var e=t.match(n);return e?e[0]:null}ke.range=Me;function Me(n,t,e){var s,i,r,o,h,a=e.indexOf(n),l=e.indexOf(t,a+1),c=a;if(a>=0&&l>0){if(n===t)return[a,l];for(s=[],r=e.length;c>=0&&!h;)c==a?(s.push(c),a=e.indexOf(n,c+1)):s.length==1?h=[s.pop(),l]:(i=s.pop(),i=0?a:l;s.length&&(h=[r,o])}return h}});var $e=Ae((Nn,Ie)=>{var De=Fe();Ie.exports=Us;var Ne="\0SLASH"+Math.random()+"\0",_e="\0OPEN"+Math.random()+"\0",ee="\0CLOSE"+Math.random()+"\0",Le="\0COMMA"+Math.random()+"\0",je="\0PERIOD"+Math.random()+"\0";function te(n){return parseInt(n,10)==n?parseInt(n,10):n.charCodeAt(0)}function Ws(n){return n.split("\\\\").join(Ne).split("\\{").join(_e).split("\\}").join(ee).split("\\,").join(Le).split("\\.").join(je)}function Bs(n){return n.split(Ne).join("\\").split(_e).join("{").split(ee).join("}").split(Le).join(",").split(je).join(".")}function ze(n){if(!n)return[""];var t=[],e=De("{","}",n);if(!e)return n.split(",");var s=e.pre,i=e.body,r=e.post,o=s.split(",");o[o.length-1]+="{"+i+"}";var h=ze(r);return r.length&&(o[o.length-1]+=h.shift(),o.push.apply(o,h)),t.push.apply(t,o),t}function Us(n){return n?(n.substr(0,2)==="{}"&&(n="\\{\\}"+n.substr(2)),ut(Ws(n),!0).map(Bs)):[]}function Gs(n){return"{"+n+"}"}function Hs(n){return/^-?0\d/.test(n)}function qs(n,t){return n<=t}function Js(n,t){return n>=t}function ut(n,t){var e=[],s=De("{","}",n);if(!s)return[n];var i=s.pre,r=s.post.length?ut(s.post,!1):[""];if(/\$$/.test(s.pre))for(var o=0;o=0;if(!c&&!f)return s.post.match(/,.*\}/)?(n=s.pre+"{"+s.body+ee+s.post,ut(n)):[n];var u;if(c)u=s.body.split(/\.\./);else if(u=ze(s.body),u.length===1&&(u=ut(u[0],!1).map(Gs),u.length===1))return r.map(function(Ot){return s.pre+u[0]+Ot});var d;if(c){var g=te(u[0]),p=te(u[1]),w=Math.max(u[0].length,u[1].length),m=u.length==3?Math.abs(te(u[2])):1,S=qs,b=p0){var Z=new Array(I+1).join("0");E<0?x="-"+Z+x.slice(1):x=Z+x}}d.push(x)}}else{d=[];for(var $=0;${if(typeof n!="string")throw new TypeError("invalid pattern");if(n.length>65536)throw new TypeError("pattern is too long")};var Ks={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},pt=n=>n.replace(/[[\]\\-]/g,"\\$&"),Vs=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Pe=n=>n.join(""),We=(n,t)=>{let e=t;if(n.charAt(e)!=="[")throw new Error("not in a brace expression");let s=[],i=[],r=e+1,o=!1,h=!1,a=!1,l=!1,c=e,f="";t:for(;rf?s.push(pt(f)+"-"+pt(p)):p===f&&s.push(pt(p)),f="",r++;continue}if(n.startsWith("-]",r+1)){s.push(pt(p+"-")),r+=2;continue}if(n.startsWith("-",r+1)){f=p,r+=2;continue}s.push(pt(p)),r++}if(ct?n.replace(/\[([^\/\\])\]/g,"$1"):n.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var Ys=new Set(["!","?","+","*","@"]),Be=n=>Ys.has(n),Xs="(?!(?:^|/)\\.\\.?(?:$|/))",Ft="(?!\\.)",Zs=new Set(["[","."]),Qs=new Set(["..","."]),ti=new Set("().*{}+?[]^$\\!"),ei=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),se="[^/]",Ue=se+"*?",Ge=se+"+?",et=class n{type;#t;#e;#r=!1;#i=[];#o;#S;#l;#f=!1;#h;#a;#n=!1;constructor(t,e,s={}){this.type=t,t&&(this.#e=!0),this.#o=e,this.#t=this.#o?this.#o.#t:this,this.#h=this.#t===this?s:this.#t.#h,this.#l=this.#t===this?[]:this.#t.#l,t==="!"&&!this.#t.#f&&this.#l.push(this),this.#S=this.#o?this.#o.#i.length:0}get hasMagic(){if(this.#e!==void 0)return this.#e;for(let t of this.#i)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#e=!0;return this.#e}toString(){return this.#a!==void 0?this.#a:this.type?this.#a=this.type+"("+this.#i.map(t=>String(t)).join("|")+")":this.#a=this.#i.map(t=>String(t)).join("")}#g(){if(this!==this.#t)throw new Error("should only call on root");if(this.#f)return this;this.toString(),this.#f=!0;let t;for(;t=this.#l.pop();){if(t.type!=="!")continue;let e=t,s=e.#o;for(;s;){for(let i=e.#S+1;!s.type&&itypeof e=="string"?e:e.toJSON()):[this.type,...this.#i.map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#f&&this.#o?.type==="!")&&t.push({}),t}isStart(){if(this.#t===this)return!0;if(!this.#o?.isStart())return!1;if(this.#S===0)return!0;let t=this.#o;for(let e=0;e{let[g,p,w,m]=typeof d=="string"?n.#u(d,this.#e,a):d.toRegExpSource(t);return this.#e=this.#e||w,this.#r=this.#r||m,g}).join(""),c="";if(this.isStart()&&typeof this.#i[0]=="string"&&!(this.#i.length===1&&Qs.has(this.#i[0]))){let g=Zs,p=e&&g.has(l.charAt(0))||l.startsWith("\\.")&&g.has(l.charAt(2))||l.startsWith("\\.\\.")&&g.has(l.charAt(4)),w=!e&&!t&&g.has(l.charAt(0));c=p?Xs:w?Ft:""}let f="";return this.isEnd()&&this.#t.#f&&this.#o?.type==="!"&&(f="(?:$|\\/)"),[c+l+f,P(l),this.#e=!!this.#e,this.#r]}let s=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",r=this.#d(e);if(this.isStart()&&this.isEnd()&&!r&&this.type!=="!"){let a=this.toString();return this.#i=[a],this.type=null,this.#e=void 0,[a,P(this.toString()),!1,!1]}let o=!s||t||e||!Ft?"":this.#d(!0);o===r&&(o=""),o&&(r=`(?:${r})(?:${o})*?`);let h="";if(this.type==="!"&&this.#n)h=(this.isStart()&&!e?Ft:"")+Ge;else{let a=this.type==="!"?"))"+(this.isStart()&&!e&&!t?Ft:"")+Ue+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;h=i+r+a}return[h,P(r),this.#e=!!this.#e,this.#r]}#d(t){return this.#i.map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");let[s,i,r,o]=e.toRegExpSource(t);return this.#r=this.#r||o,s}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")}static#u(t,e,s=!1){let i=!1,r="",o=!1;for(let h=0;ht?n.replace(/[?*()[\]]/g,"[$&]"):n.replace(/[?*()[\]\\]/g,"\\$&");var O=(n,t,e={})=>(dt(t),!e.nocomment&&t.charAt(0)==="#"?!1:new D(t,e).match(n)),si=/^\*+([^+@!?\*\[\(]*)$/,ii=n=>t=>!t.startsWith(".")&&t.endsWith(n),ni=n=>t=>t.endsWith(n),ri=n=>(n=n.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(n)),oi=n=>(n=n.toLowerCase(),t=>t.toLowerCase().endsWith(n)),hi=/^\*+\.\*+$/,ai=n=>!n.startsWith(".")&&n.includes("."),li=n=>n!=="."&&n!==".."&&n.includes("."),ci=/^\.\*+$/,fi=n=>n!=="."&&n!==".."&&n.startsWith("."),ui=/^\*+$/,di=n=>n.length!==0&&!n.startsWith("."),pi=n=>n.length!==0&&n!=="."&&n!=="..",mi=/^\?+([^+@!?\*\[\(]*)?$/,gi=([n,t=""])=>{let e=Ke([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},wi=([n,t=""])=>{let e=Ve([n]);return t?(t=t.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(t)):e},yi=([n,t=""])=>{let e=Ve([n]);return t?s=>e(s)&&s.endsWith(t):e},bi=([n,t=""])=>{let e=Ke([n]);return t?s=>e(s)&&s.endsWith(t):e},Ke=([n])=>{let t=n.length;return e=>e.length===t&&!e.startsWith(".")},Ve=([n])=>{let t=n.length;return e=>e.length===t&&e!=="."&&e!==".."},Ye=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",He={win32:{sep:"\\"},posix:{sep:"/"}},Si=Ye==="win32"?He.win32.sep:He.posix.sep;O.sep=Si;var R=Symbol("globstar **");O.GLOBSTAR=R;var Ei="[^/]",vi=Ei+"*?",xi="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Ti="(?:(?!(?:\\/|^)\\.).)*?",Ci=(n,t={})=>e=>O(e,n,t);O.filter=Ci;var L=(n,t={})=>Object.assign({},n,t),Ai=n=>{if(!n||typeof n!="object"||!Object.keys(n).length)return O;let t=O;return Object.assign((s,i,r={})=>t(s,i,L(n,r)),{Minimatch:class extends t.Minimatch{constructor(i,r={}){super(i,L(n,r))}static defaults(i){return t.defaults(L(n,i)).Minimatch}},AST:class extends t.AST{constructor(i,r,o={}){super(i,r,L(n,o))}static fromGlob(i,r={}){return t.AST.fromGlob(i,L(n,r))}},unescape:(s,i={})=>t.unescape(s,L(n,i)),escape:(s,i={})=>t.escape(s,L(n,i)),filter:(s,i={})=>t.filter(s,L(n,i)),defaults:s=>t.defaults(L(n,s)),makeRe:(s,i={})=>t.makeRe(s,L(n,i)),braceExpand:(s,i={})=>t.braceExpand(s,L(n,i)),match:(s,i,r={})=>t.match(s,i,L(n,r)),sep:t.sep,GLOBSTAR:R})};O.defaults=Ai;var Xe=(n,t={})=>(dt(n),t.nobrace||!/\{(?:(?!\{).)*\}/.test(n)?[n]:(0,Je.default)(n));O.braceExpand=Xe;var Ri=(n,t={})=>new D(n,t).makeRe();O.makeRe=Ri;var ki=(n,t,e={})=>{let s=new D(t,e);return n=n.filter(i=>s.match(i)),s.options.nonull&&!n.length&&n.push(t),n};O.match=ki;var qe=/[?*]|[+@!]\(.*?\)|\[|\]/,Mi=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),D=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){dt(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||Ye,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);let s=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let i=this.globParts.map((r,o,h)=>{if(this.isWindows&&this.windowsNoMagicRoot){let a=r[0]===""&&r[1]===""&&(r[2]==="?"||!qe.test(r[2]))&&!qe.test(r[3]),l=/^[a-z]:/i.test(r[0]);if(a)return[...r.slice(0,4),...r.slice(4).map(c=>this.parse(c))];if(l)return[r[0],...r.slice(1).map(c=>this.parse(c))]}return r.map(a=>this.parse(a))});if(this.debug(this.pattern,i),this.set=i.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let s=-1;for(;(s=e.indexOf("**",s+1))!==-1;){let i=s;for(;e[i+1]==="**";)i++;i!==s&&e.splice(s,i-s)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((s,i)=>{let r=s[s.length-1];return i==="**"&&r==="**"?s:i===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(s.pop(),s):(s.push(i),s)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let i=1;ii&&s.splice(i+1,o-i);let h=s[i+1],a=s[i+2],l=s[i+3];if(h!==".."||!a||a==="."||a===".."||!l||l==="."||l==="..")continue;e=!0,s.splice(i,1);let c=s.slice(0);c[i]="**",t.push(c),i--}if(!this.preserveMultipleSlashes){for(let o=1;oe.length)}partsMatch(t,e,s=!1){let i=0,r=0,o=[],h="";for(;ib?e=e.slice(y):b>y&&(t=t.slice(b)))}}let{optimizationLevel:r=1}=this.options;r>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,h=0,a=t.length,l=e.length;o>> no match, partial?`,t,u,e,d),u===a))}let p;if(typeof c=="string"?(p=f===c,this.debug("string match",c,f,p)):(p=c.test(f),this.debug("pattern match",c,f,p)),!p)return!1}if(o===a&&h===l)return!0;if(o===a)return s;if(h===l)return o===a-1&&t[o]==="";throw new Error("wtf?")}braceExpand(){return Xe(this.pattern,this.options)}parse(t){ut(t);let e=this.options;if(t==="**")return R;if(t==="")return"";let s,i=null;(s=t.match(ui))?i=e.dot?pi:di:(s=t.match(si))?i=(e.nocase?e.dot?oi:ri:e.dot?ni:ii)(s[1]):(s=t.match(mi))?i=(e.nocase?e.dot?wi:gi:e.dot?yi:bi)(s):(s=t.match(hi))?i=e.dot?li:ai:(s=t.match(ci))&&(i=fi);let r=tt.fromGlob(t,this.options).toMMPattern();return i&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:i}),r}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let e=this.options,s=e.noglobstar?vi:e.dot?xi:Ti,i=new Set(e.nocase?["i"]:[]),r=t.map(a=>{let l=a.map(c=>{if(c instanceof RegExp)for(let f of c.flags.split(""))i.add(f);return typeof c=="string"?Oi(c):c===R?R:c._src});return l.forEach((c,f)=>{let u=l[f+1],d=l[f-1];c!==R||d===R||(d===void 0?u!==void 0&&u!==R?l[f+1]="(?:\\/|"+s+"\\/)?"+u:l[f]=s:u===void 0?l[f-1]=d+"(?:\\/|"+s+")?":u!==R&&(l[f-1]=d+"(?:\\/|\\/"+s+"\\/)"+u,l[f+1]=R))}),l.filter(c=>c!==R).join("/")}).join("|"),[o,h]=t.length>1?["(?:",")"]:["",""];r="^"+o+r+h+"$",this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;let s=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let r=this.set;this.debug(this.pattern,"set",r);let o=i[i.length-1];if(!o)for(let h=i.length-2;!o&&h>=0;h--)o=i[h];for(let h=0;h{typeof ie.emitWarning=="function"?ie.emitWarning(n,t,e,s):console.error(`[${e}] ${t}: ${n}`)},Dt=globalThis.AbortController,Ze=globalThis.AbortSignal;if(typeof Dt>"u"){Ze=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(s,i){this._onabort.push(i)}},Dt=class{constructor(){t()}signal=new Ze;abort(s){if(!this.signal.aborted){this.signal.reason=s,this.signal.aborted=!0;for(let i of this.signal._onabort)i(s);this.signal.onabort?.(s)}}};let n=ie.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{n&&(n=!1,ts("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var Fi=n=>!Qe.has(n),Qn=Symbol("type"),V=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),es=n=>V(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?it:null:null,it=class extends Array{constructor(t){super(t),this.fill(0)}},ne=class n{heap;length;static#t=!1;static create(t){let e=es(t);if(!e)return[];n.#t=!0;let s=new n(t,e);return n.#t=!1,s}constructor(t,e){if(!n.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},pt=class n{#t;#s;#r;#i;#h;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#l;#f;#a;#o;#e;#m;#w;#d;#u;#S;#g;#C;#A;#E;#b;#k;#p;static unsafeExposeInternals(t){return{starts:t.#A,ttls:t.#E,sizes:t.#C,keyMap:t.#a,keyList:t.#o,valList:t.#e,next:t.#m,prev:t.#w,get head(){return t.#d},get tail(){return t.#u},free:t.#S,isBackgroundFetch:e=>t.#c(e),backgroundFetch:(e,s,i,r)=>t.#_(e,s,i,r),moveToTail:e=>t.#N(e),indexes:e=>t.#T(e),rindexes:e=>t.#O(e),isStale:e=>t.#y(e)}}get max(){return this.#t}get maxSize(){return this.#s}get calculatedSize(){return this.#f}get size(){return this.#l}get fetchMethod(){return this.#h}get dispose(){return this.#r}get disposeAfter(){return this.#i}constructor(t){let{max:e=0,ttl:s,ttlResolution:i=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:h,allowStale:a,dispose:l,disposeAfter:c,noDisposeOnSet:f,noUpdateTTL:u,maxSize:d=0,maxEntrySize:g=0,sizeCalculation:p,fetchMethod:w,noDeleteOnFetchRejection:m,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:y,ignoreFetchAbort:E}=t;if(e!==0&&!V(e))throw new TypeError("max option must be a nonnegative integer");let x=e?es(e):Array;if(!x)throw new Error("invalid max value: "+e);if(this.#t=e,this.#s=d,this.maxEntrySize=g||this.#s,this.sizeCalculation=p,this.sizeCalculation){if(!this.#s&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(w!==void 0&&typeof w!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#h=w,this.#k=!!w,this.#a=new Map,this.#o=new Array(e).fill(void 0),this.#e=new Array(e).fill(void 0),this.#m=new x(e),this.#w=new x(e),this.#d=0,this.#u=0,this.#S=ne.create(e),this.#l=0,this.#f=0,typeof l=="function"&&(this.#r=l),typeof c=="function"?(this.#i=c,this.#g=[]):(this.#i=void 0,this.#g=void 0),this.#b=!!this.#r,this.#p=!!this.#i,this.noDisposeOnSet=!!f,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!m,this.allowStaleOnFetchRejection=!!b,this.allowStaleOnFetchAbort=!!y,this.ignoreFetchAbort=!!E,this.maxEntrySize!==0){if(this.#s!==0&&!V(this.#s))throw new TypeError("maxSize must be a positive integer if specified");if(!V(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#M()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!h,this.ttlResolution=V(i)||i===0?i:1,this.ttlAutopurge=!!r,this.ttl=s||0,this.ttl){if(!V(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#F()}if(this.#t===0&&this.ttl===0&&this.#s===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#s){let I="LRU_CACHE_UNBOUNDED";Fi(I)&&(Qe.add(I),ts("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",I,n))}}getRemainingTTL(t){return this.#a.has(t)?1/0:0}#F(){let t=new it(this.#t),e=new it(this.#t);this.#E=t,this.#A=e,this.#n=(r,o,h=st.now())=>{if(e[r]=o!==0?h:0,t[r]=o,o!==0&&this.ttlAutopurge){let a=setTimeout(()=>{this.#y(r)&&this.delete(this.#o[r])},o+1);a.unref&&a.unref()}},this.#R=r=>{e[r]=t[r]!==0?st.now():0},this.#v=(r,o)=>{if(t[o]){let h=t[o],a=e[o];if(!h||!a)return;r.ttl=h,r.start=a,r.now=s||i();let l=r.now-a;r.remainingTTL=h-l}};let s=0,i=()=>{let r=st.now();if(this.ttlResolution>0){s=r;let o=setTimeout(()=>s=0,this.ttlResolution);o.unref&&o.unref()}return r};this.getRemainingTTL=r=>{let o=this.#a.get(r);if(o===void 0)return 0;let h=t[o],a=e[o];if(!h||!a)return 1/0;let l=(s||i())-a;return h-l},this.#y=r=>{let o=e[r],h=t[r];return!!h&&!!o&&(s||i())-o>h}}#R=()=>{};#v=()=>{};#n=()=>{};#y=()=>!1;#M(){let t=new it(this.#t);this.#f=0,this.#C=t,this.#x=e=>{this.#f-=t[e],t[e]=0},this.#j=(e,s,i,r)=>{if(this.#c(s))return 0;if(!V(i))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(i=r(s,e),!V(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#L=(e,s,i)=>{if(t[e]=s,this.#s){let r=this.#s-t[e];for(;this.#f>r;)this.#D(!0)}this.#f+=t[e],i&&(i.entrySize=s,i.totalCalculatedSize=this.#f)}}#x=t=>{};#L=(t,e,s)=>{};#j=(t,e,s,i)=>{if(s||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#T({allowStale:t=this.allowStale}={}){if(this.#l)for(let e=this.#u;!(!this.#z(e)||((t||!this.#y(e))&&(yield e),e===this.#d));)e=this.#w[e]}*#O({allowStale:t=this.allowStale}={}){if(this.#l)for(let e=this.#d;!(!this.#z(e)||((t||!this.#y(e))&&(yield e),e===this.#u));)e=this.#m[e]}#z(t){return t!==void 0&&this.#a.get(this.#o[t])===t}*entries(){for(let t of this.#T())this.#e[t]!==void 0&&this.#o[t]!==void 0&&!this.#c(this.#e[t])&&(yield[this.#o[t],this.#e[t]])}*rentries(){for(let t of this.#O())this.#e[t]!==void 0&&this.#o[t]!==void 0&&!this.#c(this.#e[t])&&(yield[this.#o[t],this.#e[t]])}*keys(){for(let t of this.#T()){let e=this.#o[t];e!==void 0&&!this.#c(this.#e[t])&&(yield e)}}*rkeys(){for(let t of this.#O()){let e=this.#o[t];e!==void 0&&!this.#c(this.#e[t])&&(yield e)}}*values(){for(let t of this.#T())this.#e[t]!==void 0&&!this.#c(this.#e[t])&&(yield this.#e[t])}*rvalues(){for(let t of this.#O())this.#e[t]!==void 0&&!this.#c(this.#e[t])&&(yield this.#e[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let s of this.#T()){let i=this.#e[s],r=this.#c(i)?i.__staleWhileFetching:i;if(r!==void 0&&t(r,this.#o[s],this))return this.get(this.#o[s],e)}}forEach(t,e=this){for(let s of this.#T()){let i=this.#e[s],r=this.#c(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#o[s],this)}}rforEach(t,e=this){for(let s of this.#O()){let i=this.#e[s],r=this.#c(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#o[s],this)}}purgeStale(){let t=!1;for(let e of this.#O({allowStale:!0}))this.#y(e)&&(this.delete(this.#o[e]),t=!0);return t}info(t){let e=this.#a.get(t);if(e===void 0)return;let s=this.#e[e],i=this.#c(s)?s.__staleWhileFetching:s;if(i===void 0)return;let r={value:i};if(this.#E&&this.#A){let o=this.#E[e],h=this.#A[e];if(o&&h){let a=o-(st.now()-h);r.ttl=a,r.start=Date.now()}}return this.#C&&(r.size=this.#C[e]),r}dump(){let t=[];for(let e of this.#T({allowStale:!0})){let s=this.#o[e],i=this.#e[e],r=this.#c(i)?i.__staleWhileFetching:i;if(r===void 0||s===void 0)continue;let o={value:r};if(this.#E&&this.#A){o.ttl=this.#E[e];let h=st.now()-this.#A[e];o.start=Math.floor(Date.now()-h)}this.#C&&(o.size=this.#C[e]),t.unshift([s,o])}return t}load(t){this.clear();for(let[e,s]of t){if(s.start){let i=Date.now()-s.start;s.start=st.now()-i}this.set(e,s.value,s)}}set(t,e,s={}){if(e===void 0)return this.delete(t),this;let{ttl:i=this.ttl,start:r,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:h=this.sizeCalculation,status:a}=s,{noUpdateTTL:l=this.noUpdateTTL}=s,c=this.#j(t,e,s.size||0,h);if(this.maxEntrySize&&c>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.delete(t),this;let f=this.#l===0?void 0:this.#a.get(t);if(f===void 0)f=this.#l===0?this.#u:this.#S.length!==0?this.#S.pop():this.#l===this.#t?this.#D(!1):this.#l,this.#o[f]=t,this.#e[f]=e,this.#a.set(t,f),this.#m[this.#u]=f,this.#w[f]=this.#u,this.#u=f,this.#l++,this.#L(f,c,a),a&&(a.set="add"),l=!1;else{this.#N(f);let u=this.#e[f];if(e!==u){if(this.#k&&this.#c(u)){u.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:d}=u;d!==void 0&&!o&&(this.#b&&this.#r?.(d,t,"set"),this.#p&&this.#g?.push([d,t,"set"]))}else o||(this.#b&&this.#r?.(u,t,"set"),this.#p&&this.#g?.push([u,t,"set"]));if(this.#x(f),this.#L(f,c,a),this.#e[f]=e,a){a.set="replace";let d=u&&this.#c(u)?u.__staleWhileFetching:u;d!==void 0&&(a.oldValue=d)}}else a&&(a.set="update")}if(i!==0&&!this.#E&&this.#F(),this.#E&&(l||this.#n(f,i,r),a&&this.#v(a,f)),!o&&this.#p&&this.#g){let u=this.#g,d;for(;d=u?.shift();)this.#i?.(...d)}return this}pop(){try{for(;this.#l;){let t=this.#e[this.#d];if(this.#D(!0),this.#c(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#p&&this.#g){let t=this.#g,e;for(;e=t?.shift();)this.#i?.(...e)}}}#D(t){let e=this.#d,s=this.#o[e],i=this.#e[e];return this.#k&&this.#c(i)?i.__abortController.abort(new Error("evicted")):(this.#b||this.#p)&&(this.#b&&this.#r?.(i,s,"evict"),this.#p&&this.#g?.push([i,s,"evict"])),this.#x(e),t&&(this.#o[e]=void 0,this.#e[e]=void 0,this.#S.push(e)),this.#l===1?(this.#d=this.#u=0,this.#S.length=0):this.#d=this.#m[e],this.#a.delete(s),this.#l--,e}has(t,e={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=e,r=this.#a.get(t);if(r!==void 0){let o=this.#e[r];if(this.#c(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#y(r))i&&(i.has="stale",this.#v(i,r));else return s&&this.#R(r),i&&(i.has="hit",this.#v(i,r)),!0}else i&&(i.has="miss");return!1}peek(t,e={}){let{allowStale:s=this.allowStale}=e,i=this.#a.get(t);if(i===void 0||!s&&this.#y(i))return;let r=this.#e[i];return this.#c(r)?r.__staleWhileFetching:r}#_(t,e,s,i){let r=e===void 0?void 0:this.#e[e];if(this.#c(r))return r;let o=new Dt,{signal:h}=s;h?.addEventListener("abort",()=>o.abort(h.reason),{signal:o.signal});let a={signal:o.signal,options:s,context:i},l=(p,w=!1)=>{let{aborted:m}=o.signal,S=s.ignoreFetchAbort&&p!==void 0;if(s.status&&(m&&!w?(s.status.fetchAborted=!0,s.status.fetchError=o.signal.reason,S&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),m&&!S&&!w)return f(o.signal.reason);let b=d;return this.#e[e]===d&&(p===void 0?b.__staleWhileFetching?this.#e[e]=b.__staleWhileFetching:this.delete(t):(s.status&&(s.status.fetchUpdated=!0),this.set(t,p,a.options))),p},c=p=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=p),f(p)),f=p=>{let{aborted:w}=o.signal,m=w&&s.allowStaleOnFetchAbort,S=m||s.allowStaleOnFetchRejection,b=S||s.noDeleteOnFetchRejection,y=d;if(this.#e[e]===d&&(!b||y.__staleWhileFetching===void 0?this.delete(t):m||(this.#e[e]=y.__staleWhileFetching)),S)return s.status&&y.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),y.__staleWhileFetching;if(y.__returned===y)throw p},u=(p,w)=>{let m=this.#h?.(t,r,a);m&&m instanceof Promise&&m.then(S=>p(S===void 0?void 0:S),w),o.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(p(void 0),s.allowStaleOnFetchAbort&&(p=S=>l(S,!0)))})};s.status&&(s.status.fetchDispatched=!0);let d=new Promise(u).then(l,c),g=Object.assign(d,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.set(t,g,{...a.options,status:void 0}),e=this.#a.get(t)):this.#e[e]=g,g}#c(t){if(!this.#k)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof Dt}async fetch(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:h=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:p,forceRefresh:w=!1,status:m,signal:S}=e;if(!this.#k)return m&&(m.fetch="get"),this.get(t,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:m});let b={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:h,size:a,sizeCalculation:l,noUpdateTTL:c,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:g,ignoreFetchAbort:d,status:m,signal:S},y=this.#a.get(t);if(y===void 0){m&&(m.fetch="miss");let E=this.#_(t,y,b,p);return E.__returned=E}else{let E=this.#e[y];if(this.#c(E)){let Ft=s&&E.__staleWhileFetching!==void 0;return m&&(m.fetch="inflight",Ft&&(m.returnedStale=!0)),Ft?E.__staleWhileFetching:E.__returned=E}let x=this.#y(y);if(!w&&!x)return m&&(m.fetch="hit"),this.#N(y),i&&this.#R(y),m&&this.#v(m,y),E;let I=this.#_(t,y,b,p),U=I.__staleWhileFetching!==void 0&&s;return m&&(m.fetch=x?"stale":"refresh",U&&x&&(m.returnedStale=!0)),U?I.__staleWhileFetching:I.__returned=I}}get(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=e,h=this.#a.get(t);if(h!==void 0){let a=this.#e[h],l=this.#c(a);return o&&this.#v(o,h),this.#y(h)?(o&&(o.get="stale"),l?(o&&s&&a.__staleWhileFetching!==void 0&&(o.returnedStale=!0),s?a.__staleWhileFetching:void 0):(r||this.delete(t),o&&s&&(o.returnedStale=!0),s?a:void 0)):(o&&(o.get="hit"),l?a.__staleWhileFetching:(this.#N(h),i&&this.#R(h),a))}else o&&(o.get="miss")}#I(t,e){this.#w[e]=t,this.#m[t]=e}#N(t){t!==this.#u&&(t===this.#d?this.#d=this.#m[t]:this.#I(this.#w[t],this.#m[t]),this.#I(this.#u,t),this.#u=t)}delete(t){let e=!1;if(this.#l!==0){let s=this.#a.get(t);if(s!==void 0)if(e=!0,this.#l===1)this.clear();else{this.#x(s);let i=this.#e[s];if(this.#c(i)?i.__abortController.abort(new Error("deleted")):(this.#b||this.#p)&&(this.#b&&this.#r?.(i,t,"delete"),this.#p&&this.#g?.push([i,t,"delete"])),this.#a.delete(t),this.#o[s]=void 0,this.#e[s]=void 0,s===this.#u)this.#u=this.#w[s];else if(s===this.#d)this.#d=this.#m[s];else{let r=this.#w[s];this.#m[r]=this.#m[s];let o=this.#m[s];this.#w[o]=this.#w[s]}this.#l--,this.#S.push(s)}}if(this.#p&&this.#g?.length){let s=this.#g,i;for(;i=s?.shift();)this.#i?.(...i)}return e}clear(){for(let t of this.#O({allowStale:!0})){let e=this.#e[t];if(this.#c(e))e.__abortController.abort(new Error("deleted"));else{let s=this.#o[t];this.#b&&this.#r?.(e,s,"delete"),this.#p&&this.#g?.push([e,s,"delete"])}}if(this.#a.clear(),this.#e.fill(void 0),this.#o.fill(void 0),this.#E&&this.#A&&(this.#E.fill(0),this.#A.fill(0)),this.#C&&this.#C.fill(0),this.#d=0,this.#u=0,this.#S.length=0,this.#f=0,this.#l=0,this.#p&&this.#g){let t=this.#g,e;for(;e=t?.shift();)this.#i?.(...e)}}};import{posix as Wi,win32 as pe}from"node:path";import{fileURLToPath as Bi}from"node:url";import{lstatSync as Ui,readdir as Gi,readdirSync as Hi,readlinkSync as qi,realpathSync as Ji}from"fs";import*as Ki from"node:fs";import{lstat as Yi,readdir as Xi,readlink as Zi,realpath as Qi}from"node:fs/promises";import{EventEmitter as fe}from"node:events";import os from"node:stream";import{StringDecoder as Mi}from"node:string_decoder";var ss=typeof process=="object"&&process?process:{stdout:null,stderr:null},Di=n=>!!n&&typeof n=="object"&&(n instanceof X||n instanceof os||Ni(n)||_i(n)),Ni=n=>!!n&&typeof n=="object"&&n instanceof fe&&typeof n.pipe=="function"&&n.pipe!==os.Writable.prototype.pipe,_i=n=>!!n&&typeof n=="object"&&n instanceof fe&&typeof n.write=="function"&&typeof n.end=="function",q=Symbol("EOF"),J=Symbol("maybeEmitEnd"),Y=Symbol("emittedEnd"),Nt=Symbol("emittingEnd"),mt=Symbol("emittedError"),_t=Symbol("closed"),is=Symbol("read"),Lt=Symbol("flush"),ns=Symbol("flushChunk"),P=Symbol("encoding"),nt=Symbol("decoder"),T=Symbol("flowing"),gt=Symbol("paused"),rt=Symbol("resume"),C=Symbol("buffer"),M=Symbol("pipes"),A=Symbol("bufferLength"),re=Symbol("bufferPush"),jt=Symbol("bufferShift"),k=Symbol("objectMode"),v=Symbol("destroyed"),oe=Symbol("error"),he=Symbol("emitData"),rs=Symbol("emitEnd"),ae=Symbol("emitEnd2"),G=Symbol("async"),le=Symbol("abort"),zt=Symbol("aborted"),wt=Symbol("signal"),Z=Symbol("dataListeners"),N=Symbol("discarded"),yt=n=>Promise.resolve().then(n),Li=n=>n(),ji=n=>n==="end"||n==="finish"||n==="prefinish",zi=n=>n instanceof ArrayBuffer||!!n&&typeof n=="object"&&n.constructor&&n.constructor.name==="ArrayBuffer"&&n.byteLength>=0,Ii=n=>!Buffer.isBuffer(n)&&ArrayBuffer.isView(n),It=class{src;dest;opts;ondrain;constructor(t,e,s){this.src=t,this.dest=e,this.opts=s,this.ondrain=()=>t[rt](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},ce=class extends It{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,s){super(t,e,s),this.proxyErrors=i=>e.emit("error",i),t.on("error",this.proxyErrors)}},$i=n=>!!n.objectMode,Pi=n=>!n.objectMode&&!!n.encoding&&n.encoding!=="buffer",X=class extends fe{[T]=!1;[gt]=!1;[M]=[];[C]=[];[k];[P];[G];[nt];[q]=!1;[Y]=!1;[Nt]=!1;[_t]=!1;[mt]=null;[A]=0;[v]=!1;[wt];[zt]=!1;[Z]=0;[N]=!1;writable=!0;readable=!0;constructor(...t){let e=t[0]||{};if(super(),e.objectMode&&typeof e.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");$i(e)?(this[k]=!0,this[P]=null):Pi(e)?(this[P]=e.encoding,this[k]=!1):(this[k]=!1,this[P]=null),this[G]=!!e.async,this[nt]=this[P]?new Mi(this[P]):null,e&&e.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[C]}),e&&e.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[M]});let{signal:s}=e;s&&(this[wt]=s,s.aborted?this[le]():s.addEventListener("abort",()=>this[le]()))}get bufferLength(){return this[A]}get encoding(){return this[P]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[k]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[G]}set async(t){this[G]=this[G]||!!t}[le](){this[zt]=!0,this.emit("abort",this[wt]?.reason),this.destroy(this[wt]?.reason)}get aborted(){return this[zt]}set aborted(t){}write(t,e,s){if(this[zt])return!1;if(this[q])throw new Error("write after end");if(this[v])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof e=="function"&&(s=e,e="utf8"),e||(e="utf8");let i=this[G]?yt:Li;if(!this[k]&&!Buffer.isBuffer(t)){if(Ii(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(zi(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[k]?(this[T]&&this[A]!==0&&this[Lt](!0),this[T]?this.emit("data",t):this[re](t),this[A]!==0&&this.emit("readable"),s&&i(s),this[T]):t.length?(typeof t=="string"&&!(e===this[P]&&!this[nt]?.lastNeed)&&(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[P]&&(t=this[nt].write(t)),this[T]&&this[A]!==0&&this[Lt](!0),this[T]?this.emit("data",t):this[re](t),this[A]!==0&&this.emit("readable"),s&&i(s),this[T]):(this[A]!==0&&this.emit("readable"),s&&i(s),this[T])}read(t){if(this[v])return null;if(this[N]=!1,this[A]===0||t===0||t&&t>this[A])return this[J](),null;this[k]&&(t=null),this[C].length>1&&!this[k]&&(this[C]=[this[P]?this[C].join(""):Buffer.concat(this[C],this[A])]);let e=this[is](t||null,this[C][0]);return this[J](),e}[is](t,e){if(this[k])this[jt]();else{let s=e;t===s.length||t===null?this[jt]():typeof s=="string"?(this[C][0]=s.slice(t),e=s.slice(0,t),this[A]-=t):(this[C][0]=s.subarray(t),e=s.subarray(0,t),this[A]-=t)}return this.emit("data",e),!this[C].length&&!this[q]&&this.emit("drain"),e}end(t,e,s){return typeof t=="function"&&(s=t,t=void 0),typeof e=="function"&&(s=e,e="utf8"),t!==void 0&&this.write(t,e),s&&this.once("end",s),this[q]=!0,this.writable=!1,(this[T]||!this[gt])&&this[J](),this}[rt](){this[v]||(!this[Z]&&!this[M].length&&(this[N]=!0),this[gt]=!1,this[T]=!0,this.emit("resume"),this[C].length?this[Lt]():this[q]?this[J]():this.emit("drain"))}resume(){return this[rt]()}pause(){this[T]=!1,this[gt]=!0,this[N]=!1}get destroyed(){return this[v]}get flowing(){return this[T]}get paused(){return this[gt]}[re](t){this[k]?this[A]+=1:this[A]+=t.length,this[C].push(t)}[jt](){return this[k]?this[A]-=1:this[A]-=this[C][0].length,this[C].shift()}[Lt](t=!1){do;while(this[ns](this[jt]())&&this[C].length);!t&&!this[C].length&&!this[q]&&this.emit("drain")}[ns](t){return this.emit("data",t),this[T]}pipe(t,e){if(this[v])return t;this[N]=!1;let s=this[Y];return e=e||{},t===ss.stdout||t===ss.stderr?e.end=!1:e.end=e.end!==!1,e.proxyErrors=!!e.proxyErrors,s?e.end&&t.end():(this[M].push(e.proxyErrors?new ce(this,t,e):new It(this,t,e)),this[G]?yt(()=>this[rt]()):this[rt]()),t}unpipe(t){let e=this[M].find(s=>s.dest===t);e&&(this[M].length===1?(this[T]&&this[Z]===0&&(this[T]=!1),this[M]=[]):this[M].splice(this[M].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){let s=super.on(t,e);if(t==="data")this[N]=!1,this[Z]++,!this[M].length&&!this[T]&&this[rt]();else if(t==="readable"&&this[A]!==0)super.emit("readable");else if(ji(t)&&this[Y])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[mt]){let i=e;this[G]?yt(()=>i.call(this,this[mt])):i.call(this,this[mt])}return s}removeListener(t,e){return this.off(t,e)}off(t,e){let s=super.off(t,e);return t==="data"&&(this[Z]=this.listeners("data").length,this[Z]===0&&!this[N]&&!this[M].length&&(this[T]=!1)),s}removeAllListeners(t){let e=super.removeAllListeners(t);return(t==="data"||t===void 0)&&(this[Z]=0,!this[N]&&!this[M].length&&(this[T]=!1)),e}get emittedEnd(){return this[Y]}[J](){!this[Nt]&&!this[Y]&&!this[v]&&this[C].length===0&&this[q]&&(this[Nt]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[_t]&&this.emit("close"),this[Nt]=!1)}emit(t,...e){let s=e[0];if(t!=="error"&&t!=="close"&&t!==v&&this[v])return!1;if(t==="data")return!this[k]&&!s?!1:this[G]?(yt(()=>this[he](s)),!0):this[he](s);if(t==="end")return this[rs]();if(t==="close"){if(this[_t]=!0,!this[Y]&&!this[v])return!1;let r=super.emit("close");return this.removeAllListeners("close"),r}else if(t==="error"){this[mt]=s,super.emit(oe,s);let r=!this[wt]||this.listeners("error").length?super.emit("error",s):!1;return this[J](),r}else if(t==="resume"){let r=super.emit("resume");return this[J](),r}else if(t==="finish"||t==="prefinish"){let r=super.emit(t);return this.removeAllListeners(t),r}let i=super.emit(t,...e);return this[J](),i}[he](t){for(let s of this[M])s.dest.write(t)===!1&&this.pause();let e=this[N]?!1:super.emit("data",t);return this[J](),e}[rs](){return this[Y]?!1:(this[Y]=!0,this.readable=!1,this[G]?(yt(()=>this[ae]()),!0):this[ae]())}[ae](){if(this[nt]){let e=this[nt].end();if(e){for(let s of this[M])s.dest.write(e);this[N]||super.emit("data",e)}}for(let e of this[M])e.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[k]||(t.dataLength=0);let e=this.promise();return this.on("data",s=>{t.push(s),this[k]||(t.dataLength+=s.length)}),await e,t}async concat(){if(this[k])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[P]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(v,()=>e(new Error("stream destroyed"))),this.on("error",s=>e(s)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[N]=!1;let t=!1,e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[q])return e();let r,o,h=f=>{this.off("data",a),this.off("end",l),this.off(v,c),e(),o(f)},a=f=>{this.off("error",h),this.off("end",l),this.off(v,c),this.pause(),r({value:f,done:!!this[q]})},l=()=>{this.off("error",h),this.off("data",a),this.off(v,c),e(),r({done:!0,value:void 0})},c=()=>h(new Error("stream destroyed"));return new Promise((f,u)=>{o=u,r=f,this.once(v,c),this.once("error",h),this.once("end",l),this.once("data",a)})},throw:e,return:e,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[N]=!1;let t=!1,e=()=>(this.pause(),this.off(oe,e),this.off(v,e),this.off("end",e),t=!0,{done:!0,value:void 0}),s=()=>{if(t)return e();let i=this.read();return i===null?e():{done:!1,value:i}};return this.once("end",e),this.once(oe,e),this.once(v,e),{next:s,throw:e,return:e,[Symbol.iterator](){return this}}}destroy(t){if(this[v])return t?this.emit("error",t):this.emit(v),this;this[v]=!0,this[N]=!0,this[C].length=0,this[A]=0;let e=this;return typeof e.close=="function"&&!this[_t]&&e.close(),t?this.emit("error",t):this.emit(v),this}static get isStream(){return Di}};var Vi=Ji.native,St={lstatSync:Ui,readdir:Gi,readdirSync:Hi,readlinkSync:qi,realpathSync:Vi,promises:{lstat:Yi,readdir:Xi,readlink:Zi,realpath:Qi}},fs=n=>!n||n===St||n===Ki?St:{...St,...n,promises:{...St.promises,...n.promises||{}}},us=/^\\\\\?\\([a-z]:)\\?$/i,tn=n=>n.replace(/\//g,"\\").replace(us,"$1\\"),en=/[\\\/]/,z=0,ds=1,ps=2,H=4,ms=6,gs=8,Q=10,ws=12,j=15,bt=~j,ue=16,hs=32,Et=64,W=128,$t=256,Wt=512,as=Et|W|Wt,sn=1023,de=n=>n.isFile()?gs:n.isDirectory()?H:n.isSymbolicLink()?Q:n.isCharacterDevice()?ps:n.isBlockDevice()?ms:n.isSocket()?ws:n.isFIFO()?ds:z,ls=new Map,vt=n=>{let t=ls.get(n);if(t)return t;let e=n.normalize("NFKD");return ls.set(n,e),e},cs=new Map,Pt=n=>{let t=cs.get(n);if(t)return t;let e=vt(n.toLowerCase());return cs.set(n,e),e},Bt=class extends pt{constructor(){super({max:256})}},me=class extends pt{constructor(t=16*1024){super({maxSize:t,sizeCalculation:e=>e.length+1})}},ys=Symbol("PathScurry setAsCwd"),O=class{name;root;roots;parent;nocase;isCWD=!1;#t;#s;get dev(){return this.#s}#r;get mode(){return this.#r}#i;get nlink(){return this.#i}#h;get uid(){return this.#h}#l;get gid(){return this.#l}#f;get rdev(){return this.#f}#a;get blksize(){return this.#a}#o;get ino(){return this.#o}#e;get size(){return this.#e}#m;get blocks(){return this.#m}#w;get atimeMs(){return this.#w}#d;get mtimeMs(){return this.#d}#u;get ctimeMs(){return this.#u}#S;get birthtimeMs(){return this.#S}#g;get atime(){return this.#g}#C;get mtime(){return this.#C}#A;get ctime(){return this.#A}#E;get birthtime(){return this.#E}#b;#k;#p;#F;#R;#v;#n;#y;#M;#x;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=z,s,i,r,o,h){this.name=t,this.#b=r?Pt(t):vt(t),this.#n=e&sn,this.nocase=r,this.roots=i,this.root=s||this,this.#y=o,this.#p=h.fullpath,this.#R=h.relative,this.#v=h.relativePosix,this.parent=h.parent,this.parent?this.#t=this.parent.#t:this.#t=fs(h.fs)}depth(){return this.#k!==void 0?this.#k:this.parent?this.#k=this.parent.depth()+1:this.#k=0}childrenCache(){return this.#y}resolve(t){if(!t)return this;let e=this.getRootString(t),i=t.substring(e.length).split(this.splitSep);return e?this.getRoot(e).#L(i):this.#L(i)}#L(t){let e=this;for(let s of t)e=e.child(s);return e}children(){let t=this.#y.get(this);if(t)return t;let e=Object.assign([],{provisional:0});return this.#y.set(this,e),this.#n&=~ue,e}child(t,e){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let s=this.children(),i=this.nocase?Pt(t):vt(t);for(let a of s)if(a.#b===i)return a;let r=this.parent?this.sep:"",o=this.#p?this.#p+r+t:void 0,h=this.newChild(t,z,{...e,parent:this,fullpath:o});return this.canReaddir()||(h.#n|=W),s.push(h),h}relative(){if(this.isCWD)return"";if(this.#R!==void 0)return this.#R;let t=this.name,e=this.parent;if(!e)return this.#R=this.name;let s=e.relative();return s+(!s||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#v!==void 0)return this.#v;let t=this.name,e=this.parent;if(!e)return this.#v=this.fullpathPosix();let s=e.relativePosix();return s+(!s||!e.parent?"":"/")+t}fullpath(){if(this.#p!==void 0)return this.#p;let t=this.name,e=this.parent;if(!e)return this.#p=this.name;let i=e.fullpath()+(e.parent?this.sep:"")+t;return this.#p=i}fullpathPosix(){if(this.#F!==void 0)return this.#F;if(this.sep==="/")return this.#F=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#F=`//?/${i}`:this.#F=i}let t=this.parent,e=t.fullpathPosix(),s=e+(!e||!t.parent?"":"/")+this.name;return this.#F=s}isUnknown(){return(this.#n&j)===z}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#n&j)===gs}isDirectory(){return(this.#n&j)===H}isCharacterDevice(){return(this.#n&j)===ps}isBlockDevice(){return(this.#n&j)===ms}isFIFO(){return(this.#n&j)===ds}isSocket(){return(this.#n&j)===ws}isSymbolicLink(){return(this.#n&Q)===Q}lstatCached(){return this.#n&hs?this:void 0}readlinkCached(){return this.#M}realpathCached(){return this.#x}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#M)return!0;if(!this.parent)return!1;let t=this.#n&j;return!(t!==z&&t!==Q||this.#n&$t||this.#n&W)}calledReaddir(){return!!(this.#n&ue)}isENOENT(){return!!(this.#n&W)}isNamed(t){return this.nocase?this.#b===Pt(t):this.#b===vt(t)}async readlink(){let t=this.#M;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=await this.#t.promises.readlink(this.fullpath()),s=(await this.parent.realpath())?.resolve(e);if(s)return this.#M=s}catch(e){this.#I(e.code);return}}readlinkSync(){let t=this.#M;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=this.#t.readlinkSync(this.fullpath()),s=this.parent.realpathSync()?.resolve(e);if(s)return this.#M=s}catch(e){this.#I(e.code);return}}#j(t){this.#n|=ue;for(let e=t.provisional;es(null,t))}readdirCB(t,e=!1){if(!this.canReaddir()){e?t(null,[]):queueMicrotask(()=>t(null,[]));return}let s=this.children();if(this.calledReaddir()){let r=s.slice(0,s.provisional);e?t(null,r):queueMicrotask(()=>t(null,r));return}if(this.#P.push(t),this.#W)return;this.#W=!0;let i=this.fullpath();this.#t.readdir(i,{withFileTypes:!0},(r,o)=>{if(r)this.#_(r.code),s.provisional=0;else{for(let h of o)this.#N(h,s);this.#j(s)}this.#q(s.slice(0,s.provisional))})}#$;async readdir(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();if(this.#$)await this.#$;else{let s=()=>{};this.#$=new Promise(i=>s=i);try{for(let i of await this.#t.promises.readdir(e,{withFileTypes:!0}))this.#N(i,t);this.#j(t)}catch(i){this.#_(i.code),t.provisional=0}this.#$=void 0,s()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();try{for(let s of this.#t.readdirSync(e,{withFileTypes:!0}))this.#N(s,t);this.#j(t)}catch(s){this.#_(s.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(this.#n&as)return!1;let t=j&this.#n;return t===z||t===H||t===Q}shouldWalk(t,e){return(this.#n&H)===H&&!(this.#n&as)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#x)return this.#x;if(!((Wt|$t|W)&this.#n))try{let t=await this.#t.promises.realpath(this.fullpath());return this.#x=this.resolve(t)}catch{this.#z()}}realpathSync(){if(this.#x)return this.#x;if(!((Wt|$t|W)&this.#n))try{let t=this.#t.realpathSync(this.fullpath());return this.#x=this.resolve(t)}catch{this.#z()}}[ys](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;let e=new Set([]),s=[],i=this;for(;i&&i.parent;)e.add(i),i.#R=s.join(this.sep),i.#v=s.join("/"),i=i.parent,s.push("..");for(i=t;i&&i.parent&&!e.has(i);)i.#R=void 0,i.#v=void 0,i=i.parent}},Ut=class n extends O{sep="\\";splitSep=en;constructor(t,e=z,s,i,r,o,h){super(t,e,s,i,r,o,h)}newChild(t,e=z,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(t){return pe.parse(t).root}getRoot(t){if(t=tn(t.toUpperCase()),t===this.root.name)return this.root;for(let[e,s]of Object.entries(this.roots))if(this.sameRoot(t,e))return this.roots[t]=s;return this.roots[t]=new ot(t,this).root}sameRoot(t,e=this.root.name){return t=t.toUpperCase().replace(/\//g,"\\").replace(us,"$1\\"),t===e}},Gt=class n extends O{splitSep="/";sep="/";constructor(t,e=z,s,i,r,o,h){super(t,e,s,i,r,o,h)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,e=z,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}},Ht=class{root;rootPath;roots;cwd;#t;#s;#r;nocase;#i;constructor(t=process.cwd(),e,s,{nocase:i,childrenCacheSize:r=16*1024,fs:o=St}={}){this.#i=fs(o),(t instanceof URL||t.startsWith("file://"))&&(t=Bi(t));let h=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(h),this.#t=new Bt,this.#s=new Bt,this.#r=new me(r);let a=h.substring(this.rootPath.length).split(s);if(a.length===1&&!a[0]&&a.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#i),this.roots[this.rootPath]=this.root;let l=this.root,c=a.length-1,f=e.sep,u=this.rootPath,d=!1;for(let g of a){let p=c--;l=l.child(g,{relative:new Array(p).fill("..").join(f),relativePosix:new Array(p).fill("..").join("/"),fullpath:u+=(d?"":f)+g}),d=!0}this.cwd=l}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#r}resolve(...t){let e="";for(let r=t.length-1;r>=0;r--){let o=t[r];if(!(!o||o===".")&&(e=e?`${o}/${e}`:o,this.isAbsolute(o)))break}let s=this.#t.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpath();return this.#t.set(e,i),i}resolvePosix(...t){let e="";for(let r=t.length-1;r>=0;r--){let o=t[r];if(!(!o||o===".")&&(e=e?`${o}/${e}`:o,this.isAbsolute(o)))break}let s=this.#s.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpathPosix();return this.#s.set(e,i),i}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t,t=this.cwd);let{withFileTypes:s}=e;if(t.canReaddir()){let i=await t.readdir();return s?i:i.map(r=>r.name)}else return[]}readdirSync(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t,t=this.cwd);let{withFileTypes:s=!0}=e;return t.canReaddir()?s?t.readdirSync():t.readdirSync().map(i=>i.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t.withFileTypes,t=this.cwd);let s=await t.readlink();return e?s:s?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t.withFileTypes,t=this.cwd);let s=t.readlinkSync();return e?s:s?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t.withFileTypes,t=this.cwd);let s=await t.realpath();return e?s:s?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t.withFileTypes,t=this.cwd);let s=t.realpathSync();return e?s:s?.fullpath()}async walk(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=[];(!r||r(t))&&h.push(s?t:t.fullpath());let a=new Set,l=(f,u)=>{a.add(f),f.readdirCB((d,g)=>{if(d)return u(d);let p=g.length;if(!p)return u();let w=()=>{--p===0&&u()};for(let m of g)(!r||r(m))&&h.push(s?m:m.fullpath()),i&&m.isSymbolicLink()?m.realpath().then(S=>S?.isUnknown()?S.lstat():S).then(S=>S?.shouldWalk(a,o)?l(S,w):w()):m.shouldWalk(a,o)?l(m,w):w()},!0)},c=t;return new Promise((f,u)=>{l(c,d=>{if(d)return u(d);f(h)})})}walkSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=[];(!r||r(t))&&h.push(s?t:t.fullpath());let a=new Set([t]);for(let l of a){let c=l.readdirSync();for(let f of c){(!r||r(f))&&h.push(s?f:f.fullpath());let u=f;if(f.isSymbolicLink()){if(!(i&&(u=f.realpathSync())))continue;u.isUnknown()&&u.lstatSync()}u.shouldWalk(a,o)&&a.add(u)}}return h}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e;(!r||r(t))&&(yield s?t:t.fullpath());let h=new Set([t]);for(let a of h){let l=a.readdirSync();for(let c of l){(!r||r(c))&&(yield s?c:c.fullpath());let f=c;if(c.isSymbolicLink()){if(!(i&&(f=c.realpathSync())))continue;f.isUnknown()&&f.lstatSync()}f.shouldWalk(h,o)&&h.add(f)}}}stream(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=new X({objectMode:!0});(!r||r(t))&&h.write(s?t:t.fullpath());let a=new Set,l=[t],c=0,f=()=>{let u=!1;for(;!u;){let d=l.shift();if(!d){c===0&&h.end();return}c++,a.add(d);let g=(w,m,S=!1)=>{if(w)return h.emit("error",w);if(i&&!S){let b=[];for(let y of m)y.isSymbolicLink()&&b.push(y.realpath().then(E=>E?.isUnknown()?E.lstat():E));if(b.length){Promise.all(b).then(()=>g(null,m,!0));return}}for(let b of m)b&&(!r||r(b))&&(h.write(s?b:b.fullpath())||(u=!0));c--;for(let b of m){let y=b.realpathCached()||b;y.shouldWalk(a,o)&&l.push(y)}u&&!h.flowing?h.once("drain",f):p||f()},p=!0;d.readdirCB(g,!0),p=!1}};return f(),h}streamSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof O||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=new X({objectMode:!0}),a=new Set;(!r||r(t))&&h.write(s?t:t.fullpath());let l=[t],c=0,f=()=>{let u=!1;for(;!u;){let d=l.shift();if(!d){c===0&&h.end();return}c++,a.add(d);let g=d.readdirSync();for(let p of g)(!r||r(p))&&(h.write(s?p:p.fullpath())||(u=!0));c--;for(let p of g){let w=p;if(p.isSymbolicLink()){if(!(i&&(w=p.realpathSync())))continue;w.isUnknown()&&w.lstatSync()}w.shouldWalk(a,o)&&l.push(w)}}u&&!h.flowing&&h.once("drain",f)};return f(),h}chdir(t=this.cwd){let e=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[ys](e)}},ot=class extends Ht{sep="\\";constructor(t=process.cwd(),e={}){let{nocase:s=!0}=e;super(t,pe,"\\",{...e,nocase:s}),this.nocase=s;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(t){return pe.parse(t).root.toUpperCase()}newRoot(t){return new Ut(this.rootPath,H,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}},ht=class extends Ht{sep="/";constructor(t=process.cwd(),e={}){let{nocase:s=!1}=e;super(t,Wi,"/",{...e,nocase:s}),this.nocase=s}parseRootPath(t){return"/"}newRoot(t){return new Gt(this.rootPath,H,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}},xt=class extends ht{constructor(t=process.cwd(),e={}){let{nocase:s=!0}=e;super(t,{...e,nocase:s})}},fr=process.platform==="win32"?Ut:Gt,bs=process.platform==="win32"?ot:process.platform==="darwin"?xt:ht;var nn=n=>n.length>=1,rn=n=>n.length>=1,at=class n{#t;#s;#r;length;#i;#h;#l;#f;#a;#o;#e=!0;constructor(t,e,s,i){if(!nn(t))throw new TypeError("empty pattern list");if(!rn(e))throw new TypeError("empty glob list");if(e.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,s<0||s>=this.length)throw new TypeError("index out of range");if(this.#t=t,this.#s=e,this.#r=s,this.#i=i,this.#r===0){if(this.isUNC()){let[r,o,h,a,...l]=this.#t,[c,f,u,d,...g]=this.#s;l[0]===""&&(l.shift(),g.shift());let p=[r,o,h,a,""].join("/"),w=[c,f,u,d,""].join("/");this.#t=[p,...l],this.#s=[w,...g],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){let[r,...o]=this.#t,[h,...a]=this.#s;o[0]===""&&(o.shift(),a.shift());let l=r+"/",c=h+"/";this.#t=[l,...o],this.#s=[c,...a],this.length=this.#t.length}}}pattern(){return this.#t[this.#r]}isString(){return typeof this.#t[this.#r]=="string"}isGlobstar(){return this.#t[this.#r]===R}isRegExp(){return this.#t[this.#r]instanceof RegExp}globString(){return this.#l=this.#l||(this.#r===0?this.isAbsolute()?this.#s[0]+this.#s.slice(1).join("/"):this.#s.join("/"):this.#s.slice(this.#r).join("/"))}hasMore(){return this.length>this.#r+1}rest(){return this.#h!==void 0?this.#h:this.hasMore()?(this.#h=new n(this.#t,this.#s,this.#r+1,this.#i),this.#h.#o=this.#o,this.#h.#a=this.#a,this.#h.#f=this.#f,this.#h):this.#h=null}isUNC(){let t=this.#t;return this.#a!==void 0?this.#a:this.#a=this.#i==="win32"&&this.#r===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3]}isDrive(){let t=this.#t;return this.#f!==void 0?this.#f:this.#f=this.#i==="win32"&&this.#r===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){let t=this.#t;return this.#o!==void 0?this.#o:this.#o=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){let t=this.#t[0];return typeof t=="string"&&this.isAbsolute()&&this.#r===0?t:""}checkFollowGlobstar(){return!(this.#r===0||!this.isGlobstar()||!this.#e)}markFollowGlobstar(){return this.#r===0||!this.isGlobstar()||!this.#e?!1:(this.#e=!1,!0)}};var on=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",lt=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(t,{nobrace:e,nocase:s,noext:i,noglobstar:r,platform:o=on}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:e,nocase:s,noext:i,noglobstar:r,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let h of t)this.add(h)}add(t){let e=new D(t,this.mmopts);for(let s=0;s[t,!!(e&2),!!(e&1)])}},ye=class{store=new Map;add(t,e){if(!t.canReaddir())return;let s=this.store.get(t);s?s.find(i=>i.globString()===e.globString())||s.push(e):this.store.set(t,[e])}get(t){let e=this.store.get(t);if(!e)throw new Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}},Tt=class n{hasWalkedCache;matches=new we;subwalks=new ye;patterns;follow;dot;opts;constructor(t,e){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=e?e.copy():new ge}processPatterns(t,e){this.patterns=e;let s=e.map(i=>[t,i]);for(let[i,r]of s){this.hasWalkedCache.storeWalked(i,r);let o=r.root(),h=r.isAbsolute()&&this.opts.absolute!==!1;if(o){i=i.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let f=r.rest();if(f)r=f;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let a,l,c=!1;for(;typeof(a=r.pattern())=="string"&&(l=r.rest());)i=i.resolve(a),r=l,c=!0;if(a=r.pattern(),l=r.rest(),c){if(this.hasWalkedCache.hasWalked(i,r))continue;this.hasWalkedCache.storeWalked(i,r)}if(typeof a=="string"){let f=a===".."||a===""||a===".";this.matches.add(i.resolve(a),h,f);continue}else if(a===R){(!i.isSymbolicLink()||this.follow||r.checkFollowGlobstar())&&this.subwalks.add(i,r);let f=l?.pattern(),u=l?.rest();if(!l||(f===""||f===".")&&!u)this.matches.add(i,h,f===""||f===".");else if(f===".."){let d=i.parent||i;u?this.hasWalkedCache.hasWalked(d,u)||this.subwalks.add(d,u):this.matches.add(d,h,!0)}}else a instanceof RegExp&&this.subwalks.add(i,r)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new n(this.opts,this.hasWalkedCache)}filterEntries(t,e){let s=this.subwalks.get(t),i=this.child();for(let r of e)for(let o of s){let h=o.isAbsolute(),a=o.pattern(),l=o.rest();a===R?i.testGlobstar(r,o,l,h):a instanceof RegExp?i.testRegExp(r,a,l,h):i.testString(r,a,l,h)}return i}testGlobstar(t,e,s,i){if((this.dot||!t.name.startsWith("."))&&(e.hasMore()||this.matches.add(t,i,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,e):t.isSymbolicLink()&&(s&&e.checkFollowGlobstar()?this.subwalks.add(t,s):e.markFollowGlobstar()&&this.subwalks.add(t,e)))),s){let r=s.pattern();if(typeof r=="string"&&r!==".."&&r!==""&&r!==".")this.testString(t,r,s.rest(),i);else if(r===".."){let o=t.parent||t;this.subwalks.add(o,s)}else r instanceof RegExp&&this.testRegExp(t,r,s.rest(),i)}}testRegExp(t,e,s,i){e.test(t.name)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,!1))}testString(t,e,s,i){t.isNamed(e)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,!1))}};var hn=(n,t)=>typeof n=="string"?new lt([n],t):Array.isArray(n)?new lt(n,t):n,qt=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#s;#r;signal;maxDepth;includeChildMatches;constructor(t,e,s){if(this.patterns=t,this.path=e,this.opts=s,this.#r=!s.posix&&s.platform==="win32"?"\\":"/",this.includeChildMatches=s.includeChildMatches!==!1,(s.ignore||!this.includeChildMatches)&&(this.#s=hn(s.ignore??[],s),!this.includeChildMatches&&typeof this.#s.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=s.maxDepth||1/0,s.signal&&(this.signal=s.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0}))}#i(t){return this.seen.has(t)||!!this.#s?.ignored?.(t)}#h(t){return!!this.#s?.childrenIgnored?.(t)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let t;for(;!this.paused&&(t=this.#t.shift());)t()}onResume(t){this.signal?.aborted||(this.paused?this.#t.push(t):t())}async matchCheck(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||await t.realpath(),!s)return;t=s}let r=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let o=await r.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(r,e)}matchCheckTest(t,e){return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!t.realpathCached()?.isDirectory())&&!this.#i(t)?t:void 0}matchCheckSync(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||t.realpathSync(),!s)return;t=s}let r=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let o=r.realpathSync();o&&(o?.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(r,e)}matchFinish(t,e){if(this.#i(t))return;if(!this.includeChildMatches&&this.#s?.add){let r=`${t.relativePosix()}/**`;this.#s.add(r)}let s=this.opts.absolute===void 0?e:this.opts.absolute;this.seen.add(t);let i=this.opts.mark&&t.isDirectory()?this.#r:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(s){let r=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(r+i)}else{let r=this.opts.posix?t.relativePosix():t.relative(),o=this.opts.dotRelative&&!r.startsWith(".."+this.#r)?"."+this.#r:"";this.matchEmit(r?o+r+i:"."+i)}}async match(t,e,s){let i=await this.matchCheck(t,s);i&&this.matchFinish(i,e)}matchSync(t,e,s){let i=this.matchCheckSync(t,s);i&&this.matchFinish(i,e)}walkCB(t,e,s){this.signal?.aborted&&s(),this.walkCB2(t,e,new Tt(this.opts),s)}walkCB2(t,e,s,i){if(this.#h(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(t,e,s,i));return}s.processPatterns(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#i(h)||(r++,this.match(h,a,l).then(()=>o()));for(let h of s.subwalkTargets()){if(this.maxDepth!==1/0&&h.depth()>=this.maxDepth)continue;r++;let a=h.readdirCached();h.calledReaddir()?this.walkCB3(h,a,s,o):h.readdirCB((l,c)=>this.walkCB3(h,c,s,o),!0)}o()}walkCB3(t,e,s,i){s=s.filterEntries(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#i(h)||(r++,this.match(h,a,l).then(()=>o()));for(let[h,a]of s.subwalks.entries())r++,this.walkCB2(h,a,s.child(),o);o()}walkCBSync(t,e,s){this.signal?.aborted&&s(),this.walkCB2Sync(t,e,new Tt(this.opts),s)}walkCB2Sync(t,e,s,i){if(this.#h(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(t,e,s,i));return}s.processPatterns(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#i(h)||this.matchSync(h,a,l);for(let h of s.subwalkTargets()){if(this.maxDepth!==1/0&&h.depth()>=this.maxDepth)continue;r++;let a=h.readdirSync();this.walkCB3Sync(h,a,s,o)}o()}walkCB3Sync(t,e,s,i){s=s.filterEntries(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#i(h)||this.matchSync(h,a,l);for(let[h,a]of s.subwalks.entries())r++,this.walkCB2Sync(h,a,s.child(),o);o()}},Ct=class extends qt{matches=new Set;constructor(t,e,s){super(t,e,s)}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,e)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?e(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},At=class extends qt{results;constructor(t,e,s){super(t,e,s),this.results=new X({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(t){this.results.write(t),this.results.flowing||this.pause()}stream(){let t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end())}):this.walkCB(t,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var ln=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",B=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(t,e){if(!e)throw new TypeError("glob options required");if(this.withFileTypes=!!e.withFileTypes,this.signal=e.signal,this.follow=!!e.follow,this.dot=!!e.dot,this.dotRelative=!!e.dotRelative,this.nodir=!!e.nodir,this.mark=!!e.mark,e.cwd?(e.cwd instanceof URL||e.cwd.startsWith("file://"))&&(e.cwd=an(e.cwd)):this.cwd="",this.cwd=e.cwd||"",this.root=e.root,this.magicalBraces=!!e.magicalBraces,this.nobrace=!!e.nobrace,this.noext=!!e.noext,this.realpath=!!e.realpath,this.absolute=e.absolute,this.includeChildMatches=e.includeChildMatches!==!1,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(t=t.map(a=>a.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(a=>a.includes("/")?a:`./**/${a}`)}if(this.pattern=t,this.platform=e.platform||ln,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,e.nocase!==void 0&&e.nocase!==e.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let a=e.platform==="win32"?ot:e.platform==="darwin"?xt:e.platform?ht:bs;this.scurry=new a(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;let s=this.platform==="darwin"||this.platform==="win32",i={...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},r=this.pattern.map(a=>new D(a,i)),[o,h]=r.reduce((a,l)=>(a[0].push(...l.set),a[1].push(...l.globParts),a),[[],[]]);this.patterns=o.map((a,l)=>{let c=h[l];if(!c)throw new Error("invalid pattern object");return new at(a,c,0,this.platform)})}async walk(){return[...await new Ct(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new Ct(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new At(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new At(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var be=(n,t={})=>{Array.isArray(n)||(n=[n]);for(let e of n)if(new D(e,t).hasMagic())return!0;return!1};function Jt(n,t={}){return new B(n,t).streamSync()}function vs(n,t={}){return new B(n,t).stream()}function Kt(n,t={}){return new B(n,t).walkSync()}async function Ss(n,t={}){return new B(n,t).walk()}function Vt(n,t={}){return new B(n,t).iterateSync()}function xs(n,t={}){return new B(n,t).iterate()}var cn=Jt,fn=Object.assign(vs,{sync:Jt}),un=Vt,dn=Object.assign(xs,{sync:Vt}),pn=Object.assign(Kt,{stream:Jt,iterate:Vt}),Es=Object.assign(Ss,{glob:Ss,globSync:Kt,sync:pn,globStream:vs,stream:fn,globStreamSync:Jt,streamSync:cn,globIterate:xs,iterate:dn,globIterateSync:Vt,iterateSync:un,Glob:B,hasMagic:be,escape:et,unescape:$});Es.glob=Es;import mn from"node:fs";function Ts(n){return JSON.parse(mn.readFileSync(n).toString("utf-8"))}function Yt(n){return Ts(n)}function Se(n){return Ts(n)}function K(n){return(process.env[`INPUT_${n.toUpperCase()}`]||"").trim()}function Cs(n){let t=gn(n);Xt.mkdirSync(Zt.join(Rt.cwd(),n.analyzerDirectory),{recursive:!0});let e=Zt.join(Rt.cwd(),n.analyzerDirectory,"bundle_analysis.json");Xt.writeFileSync(e,JSON.stringify(t,null,2)),ct.log(`Wrote ${e}`,t)}function Ee(n){return n.metafiles.flatMap(t=>Kt(Zt.join(Rt.cwd(),t),{nodir:!0}).map(e=>({relativePath:Zt.relative(Rt.cwd(),e),absolutePath:e})))}function gn(n){let t={},e=Ee(n),s=e.reduce((i,{relativePath:r,absolutePath:o})=>{try{Xt.accessSync(o,Xt.constants.R_OK)}catch{ct.error(`No meta file found at "${o}" - a path to meta file may be wrong, or esbuild is not executed.`),Rt.exit(1)}let h=Yt(o);return Object.entries(h.outputs).reduce((a,l)=>{let[c,f]=l;return n.includeExtensions.some(u=>c.toLowerCase().endsWith(u))&&(a[`${r} -> ${c}`]={bytes:f.bytes,metafile:r,outfile:c}),a},i),i},t);return ct.log("Found metafiles",e),ct.log("Found result",s),s}function ks(n){let t=!1,e=`## \u{1F4E6} esbuild Bundle Analysis for ${n.name} +>>> no match, partial?`,t,u,e,d),u===a))}let p;if(typeof c=="string"?(p=f===c,this.debug("string match",c,f,p)):(p=c.test(f),this.debug("pattern match",c,f,p)),!p)return!1}if(o===a&&h===l)return!0;if(o===a)return s;if(h===l)return o===a-1&&t[o]==="";throw new Error("wtf?")}braceExpand(){return Xe(this.pattern,this.options)}parse(t){dt(t);let e=this.options;if(t==="**")return R;if(t==="")return"";let s,i=null;(s=t.match(ui))?i=e.dot?pi:di:(s=t.match(si))?i=(e.nocase?e.dot?oi:ri:e.dot?ni:ii)(s[1]):(s=t.match(mi))?i=(e.nocase?e.dot?wi:gi:e.dot?yi:bi)(s):(s=t.match(hi))?i=e.dot?li:ai:(s=t.match(ci))&&(i=fi);let r=et.fromGlob(t,this.options).toMMPattern();return i&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:i}),r}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let e=this.options,s=e.noglobstar?vi:e.dot?xi:Ti,i=new Set(e.nocase?["i"]:[]),r=t.map(a=>{let l=a.map(c=>{if(c instanceof RegExp)for(let f of c.flags.split(""))i.add(f);return typeof c=="string"?Mi(c):c===R?R:c._src});return l.forEach((c,f)=>{let u=l[f+1],d=l[f-1];c!==R||d===R||(d===void 0?u!==void 0&&u!==R?l[f+1]="(?:\\/|"+s+"\\/)?"+u:l[f]=s:u===void 0?l[f-1]=d+"(?:\\/|"+s+")?":u!==R&&(l[f-1]=d+"(?:\\/|\\/"+s+"\\/)"+u,l[f+1]=R))}),l.filter(c=>c!==R).join("/")}).join("|"),[o,h]=t.length>1?["(?:",")"]:["",""];r="^"+o+r+h+"$",this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;let s=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let r=this.set;this.debug(this.pattern,"set",r);let o=i[i.length-1];if(!o)for(let h=i.length-2;!o&&h>=0;h--)o=i[h];for(let h=0;h{typeof ie.emitWarning=="function"?ie.emitWarning(n,t,e,s):console.error(`[${e}] ${t}: ${n}`)},Dt=globalThis.AbortController,Ze=globalThis.AbortSignal;if(typeof Dt>"u"){Ze=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(s,i){this._onabort.push(i)}},Dt=class{constructor(){t()}signal=new Ze;abort(s){if(!this.signal.aborted){this.signal.reason=s,this.signal.aborted=!0;for(let i of this.signal._onabort)i(s);this.signal.onabort?.(s)}}};let n=ie.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{n&&(n=!1,ts("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var Oi=n=>!Qe.has(n),Qn=Symbol("type"),V=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),es=n=>V(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?nt:null:null,nt=class extends Array{constructor(t){super(t),this.fill(0)}},ne=class n{heap;length;static#t=!1;static create(t){let e=es(t);if(!e)return[];n.#t=!0;let s=new n(t,e);return n.#t=!1,s}constructor(t,e){if(!n.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},mt=class n{#t;#e;#r;#i;#o;#S;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#l;#f;#h;#a;#n;#g;#w;#d;#u;#x;#m;#T;#C;#b;#E;#v;#p;static unsafeExposeInternals(t){return{starts:t.#C,ttls:t.#b,sizes:t.#T,keyMap:t.#h,keyList:t.#a,valList:t.#n,next:t.#g,prev:t.#w,get head(){return t.#d},get tail(){return t.#u},free:t.#x,isBackgroundFetch:e=>t.#c(e),backgroundFetch:(e,s,i,r)=>t.#I(e,s,i,r),moveToTail:e=>t.#P(e),indexes:e=>t.#R(e),rindexes:e=>t.#k(e),isStale:e=>t.#y(e)}}get max(){return this.#t}get maxSize(){return this.#e}get calculatedSize(){return this.#f}get size(){return this.#l}get fetchMethod(){return this.#o}get memoMethod(){return this.#S}get dispose(){return this.#r}get disposeAfter(){return this.#i}constructor(t){let{max:e=0,ttl:s,ttlResolution:i=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:h,allowStale:a,dispose:l,disposeAfter:c,noDisposeOnSet:f,noUpdateTTL:u,maxSize:d=0,maxEntrySize:g=0,sizeCalculation:p,fetchMethod:w,memoMethod:m,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:E,ignoreFetchAbort:x}=t;if(e!==0&&!V(e))throw new TypeError("max option must be a nonnegative integer");let I=e?es(e):Array;if(!I)throw new Error("invalid max value: "+e);if(this.#t=e,this.#e=d,this.maxEntrySize=g||this.#e,this.sizeCalculation=p,this.sizeCalculation){if(!this.#e&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(m!==void 0&&typeof m!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#S=m,w!==void 0&&typeof w!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#o=w,this.#v=!!w,this.#h=new Map,this.#a=new Array(e).fill(void 0),this.#n=new Array(e).fill(void 0),this.#g=new I(e),this.#w=new I(e),this.#d=0,this.#u=0,this.#x=ne.create(e),this.#l=0,this.#f=0,typeof l=="function"&&(this.#r=l),typeof c=="function"?(this.#i=c,this.#m=[]):(this.#i=void 0,this.#m=void 0),this.#E=!!this.#r,this.#p=!!this.#i,this.noDisposeOnSet=!!f,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!S,this.allowStaleOnFetchRejection=!!y,this.allowStaleOnFetchAbort=!!E,this.ignoreFetchAbort=!!x,this.maxEntrySize!==0){if(this.#e!==0&&!V(this.#e))throw new TypeError("maxSize must be a positive integer if specified");if(!V(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#O()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!b,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!h,this.ttlResolution=V(i)||i===0?i:1,this.ttlAutopurge=!!r,this.ttl=s||0,this.ttl){if(!V(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#M()}if(this.#t===0&&this.ttl===0&&this.#e===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#e){let Z="LRU_CACHE_UNBOUNDED";Oi(Z)&&(Qe.add(Z),ts("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Z,n))}}getRemainingTTL(t){return this.#h.has(t)?1/0:0}#M(){let t=new nt(this.#t),e=new nt(this.#t);this.#b=t,this.#C=e,this.#D=(r,o,h=it.now())=>{if(e[r]=o!==0?h:0,t[r]=o,o!==0&&this.ttlAutopurge){let a=setTimeout(()=>{this.#y(r)&&this.#F(this.#a[r],"expire")},o+1);a.unref&&a.unref()}},this.#A=r=>{e[r]=t[r]!==0?it.now():0},this.#s=(r,o)=>{if(t[o]){let h=t[o],a=e[o];if(!h||!a)return;r.ttl=h,r.start=a,r.now=s||i();let l=r.now-a;r.remainingTTL=h-l}};let s=0,i=()=>{let r=it.now();if(this.ttlResolution>0){s=r;let o=setTimeout(()=>s=0,this.ttlResolution);o.unref&&o.unref()}return r};this.getRemainingTTL=r=>{let o=this.#h.get(r);if(o===void 0)return 0;let h=t[o],a=e[o];if(!h||!a)return 1/0;let l=(s||i())-a;return h-l},this.#y=r=>{let o=e[r],h=t[r];return!!h&&!!o&&(s||i())-o>h}}#A=()=>{};#s=()=>{};#D=()=>{};#y=()=>!1;#O(){let t=new nt(this.#t);this.#f=0,this.#T=t,this.#N=e=>{this.#f-=t[e],t[e]=0},this.#L=(e,s,i,r)=>{if(this.#c(s))return 0;if(!V(i))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(i=r(s,e),!V(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#_=(e,s,i)=>{if(t[e]=s,this.#e){let r=this.#e-t[e];for(;this.#f>r;)this.#z(!0)}this.#f+=t[e],i&&(i.entrySize=s,i.totalCalculatedSize=this.#f)}}#N=t=>{};#_=(t,e,s)=>{};#L=(t,e,s,i)=>{if(s||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#R({allowStale:t=this.allowStale}={}){if(this.#l)for(let e=this.#u;!(!this.#j(e)||((t||!this.#y(e))&&(yield e),e===this.#d));)e=this.#w[e]}*#k({allowStale:t=this.allowStale}={}){if(this.#l)for(let e=this.#d;!(!this.#j(e)||((t||!this.#y(e))&&(yield e),e===this.#u));)e=this.#g[e]}#j(t){return t!==void 0&&this.#h.get(this.#a[t])===t}*entries(){for(let t of this.#R())this.#n[t]!==void 0&&this.#a[t]!==void 0&&!this.#c(this.#n[t])&&(yield[this.#a[t],this.#n[t]])}*rentries(){for(let t of this.#k())this.#n[t]!==void 0&&this.#a[t]!==void 0&&!this.#c(this.#n[t])&&(yield[this.#a[t],this.#n[t]])}*keys(){for(let t of this.#R()){let e=this.#a[t];e!==void 0&&!this.#c(this.#n[t])&&(yield e)}}*rkeys(){for(let t of this.#k()){let e=this.#a[t];e!==void 0&&!this.#c(this.#n[t])&&(yield e)}}*values(){for(let t of this.#R())this.#n[t]!==void 0&&!this.#c(this.#n[t])&&(yield this.#n[t])}*rvalues(){for(let t of this.#k())this.#n[t]!==void 0&&!this.#c(this.#n[t])&&(yield this.#n[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let s of this.#R()){let i=this.#n[s],r=this.#c(i)?i.__staleWhileFetching:i;if(r!==void 0&&t(r,this.#a[s],this))return this.get(this.#a[s],e)}}forEach(t,e=this){for(let s of this.#R()){let i=this.#n[s],r=this.#c(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#a[s],this)}}rforEach(t,e=this){for(let s of this.#k()){let i=this.#n[s],r=this.#c(i)?i.__staleWhileFetching:i;r!==void 0&&t.call(e,r,this.#a[s],this)}}purgeStale(){let t=!1;for(let e of this.#k({allowStale:!0}))this.#y(e)&&(this.#F(this.#a[e],"expire"),t=!0);return t}info(t){let e=this.#h.get(t);if(e===void 0)return;let s=this.#n[e],i=this.#c(s)?s.__staleWhileFetching:s;if(i===void 0)return;let r={value:i};if(this.#b&&this.#C){let o=this.#b[e],h=this.#C[e];if(o&&h){let a=o-(it.now()-h);r.ttl=a,r.start=Date.now()}}return this.#T&&(r.size=this.#T[e]),r}dump(){let t=[];for(let e of this.#R({allowStale:!0})){let s=this.#a[e],i=this.#n[e],r=this.#c(i)?i.__staleWhileFetching:i;if(r===void 0||s===void 0)continue;let o={value:r};if(this.#b&&this.#C){o.ttl=this.#b[e];let h=it.now()-this.#C[e];o.start=Math.floor(Date.now()-h)}this.#T&&(o.size=this.#T[e]),t.unshift([s,o])}return t}load(t){this.clear();for(let[e,s]of t){if(s.start){let i=Date.now()-s.start;s.start=it.now()-i}this.set(e,s.value,s)}}set(t,e,s={}){if(e===void 0)return this.delete(t),this;let{ttl:i=this.ttl,start:r,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:h=this.sizeCalculation,status:a}=s,{noUpdateTTL:l=this.noUpdateTTL}=s,c=this.#L(t,e,s.size||0,h);if(this.maxEntrySize&&c>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#F(t,"set"),this;let f=this.#l===0?void 0:this.#h.get(t);if(f===void 0)f=this.#l===0?this.#u:this.#x.length!==0?this.#x.pop():this.#l===this.#t?this.#z(!1):this.#l,this.#a[f]=t,this.#n[f]=e,this.#h.set(t,f),this.#g[this.#u]=f,this.#w[f]=this.#u,this.#u=f,this.#l++,this.#_(f,c,a),a&&(a.set="add"),l=!1;else{this.#P(f);let u=this.#n[f];if(e!==u){if(this.#v&&this.#c(u)){u.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:d}=u;d!==void 0&&!o&&(this.#E&&this.#r?.(d,t,"set"),this.#p&&this.#m?.push([d,t,"set"]))}else o||(this.#E&&this.#r?.(u,t,"set"),this.#p&&this.#m?.push([u,t,"set"]));if(this.#N(f),this.#_(f,c,a),this.#n[f]=e,a){a.set="replace";let d=u&&this.#c(u)?u.__staleWhileFetching:u;d!==void 0&&(a.oldValue=d)}}else a&&(a.set="update")}if(i!==0&&!this.#b&&this.#M(),this.#b&&(l||this.#D(f,i,r),a&&this.#s(a,f)),!o&&this.#p&&this.#m){let u=this.#m,d;for(;d=u?.shift();)this.#i?.(...d)}return this}pop(){try{for(;this.#l;){let t=this.#n[this.#d];if(this.#z(!0),this.#c(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#p&&this.#m){let t=this.#m,e;for(;e=t?.shift();)this.#i?.(...e)}}}#z(t){let e=this.#d,s=this.#a[e],i=this.#n[e];return this.#v&&this.#c(i)?i.__abortController.abort(new Error("evicted")):(this.#E||this.#p)&&(this.#E&&this.#r?.(i,s,"evict"),this.#p&&this.#m?.push([i,s,"evict"])),this.#N(e),t&&(this.#a[e]=void 0,this.#n[e]=void 0,this.#x.push(e)),this.#l===1?(this.#d=this.#u=0,this.#x.length=0):this.#d=this.#g[e],this.#h.delete(s),this.#l--,e}has(t,e={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=e,r=this.#h.get(t);if(r!==void 0){let o=this.#n[r];if(this.#c(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#y(r))i&&(i.has="stale",this.#s(i,r));else return s&&this.#A(r),i&&(i.has="hit",this.#s(i,r)),!0}else i&&(i.has="miss");return!1}peek(t,e={}){let{allowStale:s=this.allowStale}=e,i=this.#h.get(t);if(i===void 0||!s&&this.#y(i))return;let r=this.#n[i];return this.#c(r)?r.__staleWhileFetching:r}#I(t,e,s,i){let r=e===void 0?void 0:this.#n[e];if(this.#c(r))return r;let o=new Dt,{signal:h}=s;h?.addEventListener("abort",()=>o.abort(h.reason),{signal:o.signal});let a={signal:o.signal,options:s,context:i},l=(p,w=!1)=>{let{aborted:m}=o.signal,S=s.ignoreFetchAbort&&p!==void 0;if(s.status&&(m&&!w?(s.status.fetchAborted=!0,s.status.fetchError=o.signal.reason,S&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),m&&!S&&!w)return f(o.signal.reason);let b=d;return this.#n[e]===d&&(p===void 0?b.__staleWhileFetching?this.#n[e]=b.__staleWhileFetching:this.#F(t,"fetch"):(s.status&&(s.status.fetchUpdated=!0),this.set(t,p,a.options))),p},c=p=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=p),f(p)),f=p=>{let{aborted:w}=o.signal,m=w&&s.allowStaleOnFetchAbort,S=m||s.allowStaleOnFetchRejection,b=S||s.noDeleteOnFetchRejection,y=d;if(this.#n[e]===d&&(!b||y.__staleWhileFetching===void 0?this.#F(t,"fetch"):m||(this.#n[e]=y.__staleWhileFetching)),S)return s.status&&y.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),y.__staleWhileFetching;if(y.__returned===y)throw p},u=(p,w)=>{let m=this.#o?.(t,r,a);m&&m instanceof Promise&&m.then(S=>p(S===void 0?void 0:S),w),o.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(p(void 0),s.allowStaleOnFetchAbort&&(p=S=>l(S,!0)))})};s.status&&(s.status.fetchDispatched=!0);let d=new Promise(u).then(l,c),g=Object.assign(d,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.set(t,g,{...a.options,status:void 0}),e=this.#h.get(t)):this.#n[e]=g,g}#c(t){if(!this.#v)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof Dt}async fetch(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:h=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:p,forceRefresh:w=!1,status:m,signal:S}=e;if(!this.#v)return m&&(m.fetch="get"),this.get(t,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:m});let b={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:h,size:a,sizeCalculation:l,noUpdateTTL:c,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:g,ignoreFetchAbort:d,status:m,signal:S},y=this.#h.get(t);if(y===void 0){m&&(m.fetch="miss");let E=this.#I(t,y,b,p);return E.__returned=E}else{let E=this.#n[y];if(this.#c(E)){let Ot=s&&E.__staleWhileFetching!==void 0;return m&&(m.fetch="inflight",Ot&&(m.returnedStale=!0)),Ot?E.__staleWhileFetching:E.__returned=E}let x=this.#y(y);if(!w&&!x)return m&&(m.fetch="hit"),this.#P(y),i&&this.#A(y),m&&this.#s(m,y),E;let I=this.#I(t,y,b,p),$=I.__staleWhileFetching!==void 0&&s;return m&&(m.fetch=x?"stale":"refresh",$&&x&&(m.returnedStale=!0)),$?I.__staleWhileFetching:I.__returned=I}}async forceFetch(t,e={}){let s=await this.fetch(t,e);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(t,e={}){let s=this.#S;if(!s)throw new Error("no memoMethod provided to constructor");let{context:i,forceRefresh:r,...o}=e,h=this.get(t,o);if(!r&&h!==void 0)return h;let a=s(t,h,{options:o,context:i});return this.set(t,a,o),a}get(t,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=e,h=this.#h.get(t);if(h!==void 0){let a=this.#n[h],l=this.#c(a);return o&&this.#s(o,h),this.#y(h)?(o&&(o.get="stale"),l?(o&&s&&a.__staleWhileFetching!==void 0&&(o.returnedStale=!0),s?a.__staleWhileFetching:void 0):(r||this.#F(t,"expire"),o&&s&&(o.returnedStale=!0),s?a:void 0)):(o&&(o.get="hit"),l?a.__staleWhileFetching:(this.#P(h),i&&this.#A(h),a))}else o&&(o.get="miss")}#$(t,e){this.#w[e]=t,this.#g[t]=e}#P(t){t!==this.#u&&(t===this.#d?this.#d=this.#g[t]:this.#$(this.#w[t],this.#g[t]),this.#$(this.#u,t),this.#u=t)}delete(t){return this.#F(t,"delete")}#F(t,e){let s=!1;if(this.#l!==0){let i=this.#h.get(t);if(i!==void 0)if(s=!0,this.#l===1)this.#W(e);else{this.#N(i);let r=this.#n[i];if(this.#c(r)?r.__abortController.abort(new Error("deleted")):(this.#E||this.#p)&&(this.#E&&this.#r?.(r,t,e),this.#p&&this.#m?.push([r,t,e])),this.#h.delete(t),this.#a[i]=void 0,this.#n[i]=void 0,i===this.#u)this.#u=this.#w[i];else if(i===this.#d)this.#d=this.#g[i];else{let o=this.#w[i];this.#g[o]=this.#g[i];let h=this.#g[i];this.#w[h]=this.#w[i]}this.#l--,this.#x.push(i)}}if(this.#p&&this.#m?.length){let i=this.#m,r;for(;r=i?.shift();)this.#i?.(...r)}return s}clear(){return this.#W("delete")}#W(t){for(let e of this.#k({allowStale:!0})){let s=this.#n[e];if(this.#c(s))s.__abortController.abort(new Error("deleted"));else{let i=this.#a[e];this.#E&&this.#r?.(s,i,t),this.#p&&this.#m?.push([s,i,t])}}if(this.#h.clear(),this.#n.fill(void 0),this.#a.fill(void 0),this.#b&&this.#C&&(this.#b.fill(0),this.#C.fill(0)),this.#T&&this.#T.fill(0),this.#d=0,this.#u=0,this.#x.length=0,this.#f=0,this.#l=0,this.#p&&this.#m){let e=this.#m,s;for(;s=e?.shift();)this.#i?.(...s)}}};import{posix as Wi,win32 as pe}from"node:path";import{fileURLToPath as Bi}from"node:url";import{lstatSync as Ui,readdir as Gi,readdirSync as Hi,readlinkSync as qi,realpathSync as Ji}from"fs";import*as Ki from"node:fs";import{lstat as Yi,readdir as Xi,readlink as Zi,realpath as Qi}from"node:fs/promises";import{EventEmitter as fe}from"node:events";import os from"node:stream";import{StringDecoder as Fi}from"node:string_decoder";var ss=typeof process=="object"&&process?process:{stdout:null,stderr:null},Di=n=>!!n&&typeof n=="object"&&(n instanceof X||n instanceof os||Ni(n)||_i(n)),Ni=n=>!!n&&typeof n=="object"&&n instanceof fe&&typeof n.pipe=="function"&&n.pipe!==os.Writable.prototype.pipe,_i=n=>!!n&&typeof n=="object"&&n instanceof fe&&typeof n.write=="function"&&typeof n.end=="function",q=Symbol("EOF"),J=Symbol("maybeEmitEnd"),Y=Symbol("emittedEnd"),Nt=Symbol("emittingEnd"),gt=Symbol("emittedError"),_t=Symbol("closed"),is=Symbol("read"),Lt=Symbol("flush"),ns=Symbol("flushChunk"),W=Symbol("encoding"),rt=Symbol("decoder"),T=Symbol("flowing"),wt=Symbol("paused"),ot=Symbol("resume"),C=Symbol("buffer"),F=Symbol("pipes"),A=Symbol("bufferLength"),re=Symbol("bufferPush"),jt=Symbol("bufferShift"),k=Symbol("objectMode"),v=Symbol("destroyed"),oe=Symbol("error"),he=Symbol("emitData"),rs=Symbol("emitEnd"),ae=Symbol("emitEnd2"),G=Symbol("async"),le=Symbol("abort"),zt=Symbol("aborted"),yt=Symbol("signal"),Q=Symbol("dataListeners"),N=Symbol("discarded"),bt=n=>Promise.resolve().then(n),Li=n=>n(),ji=n=>n==="end"||n==="finish"||n==="prefinish",zi=n=>n instanceof ArrayBuffer||!!n&&typeof n=="object"&&n.constructor&&n.constructor.name==="ArrayBuffer"&&n.byteLength>=0,Ii=n=>!Buffer.isBuffer(n)&&ArrayBuffer.isView(n),It=class{src;dest;opts;ondrain;constructor(t,e,s){this.src=t,this.dest=e,this.opts=s,this.ondrain=()=>t[ot](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},ce=class extends It{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,s){super(t,e,s),this.proxyErrors=i=>e.emit("error",i),t.on("error",this.proxyErrors)}},$i=n=>!!n.objectMode,Pi=n=>!n.objectMode&&!!n.encoding&&n.encoding!=="buffer",X=class extends fe{[T]=!1;[wt]=!1;[F]=[];[C]=[];[k];[W];[G];[rt];[q]=!1;[Y]=!1;[Nt]=!1;[_t]=!1;[gt]=null;[A]=0;[v]=!1;[yt];[zt]=!1;[Q]=0;[N]=!1;writable=!0;readable=!0;constructor(...t){let e=t[0]||{};if(super(),e.objectMode&&typeof e.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");$i(e)?(this[k]=!0,this[W]=null):Pi(e)?(this[W]=e.encoding,this[k]=!1):(this[k]=!1,this[W]=null),this[G]=!!e.async,this[rt]=this[W]?new Fi(this[W]):null,e&&e.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[C]}),e&&e.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[F]});let{signal:s}=e;s&&(this[yt]=s,s.aborted?this[le]():s.addEventListener("abort",()=>this[le]()))}get bufferLength(){return this[A]}get encoding(){return this[W]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[k]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[G]}set async(t){this[G]=this[G]||!!t}[le](){this[zt]=!0,this.emit("abort",this[yt]?.reason),this.destroy(this[yt]?.reason)}get aborted(){return this[zt]}set aborted(t){}write(t,e,s){if(this[zt])return!1;if(this[q])throw new Error("write after end");if(this[v])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof e=="function"&&(s=e,e="utf8"),e||(e="utf8");let i=this[G]?bt:Li;if(!this[k]&&!Buffer.isBuffer(t)){if(Ii(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(zi(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[k]?(this[T]&&this[A]!==0&&this[Lt](!0),this[T]?this.emit("data",t):this[re](t),this[A]!==0&&this.emit("readable"),s&&i(s),this[T]):t.length?(typeof t=="string"&&!(e===this[W]&&!this[rt]?.lastNeed)&&(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[W]&&(t=this[rt].write(t)),this[T]&&this[A]!==0&&this[Lt](!0),this[T]?this.emit("data",t):this[re](t),this[A]!==0&&this.emit("readable"),s&&i(s),this[T]):(this[A]!==0&&this.emit("readable"),s&&i(s),this[T])}read(t){if(this[v])return null;if(this[N]=!1,this[A]===0||t===0||t&&t>this[A])return this[J](),null;this[k]&&(t=null),this[C].length>1&&!this[k]&&(this[C]=[this[W]?this[C].join(""):Buffer.concat(this[C],this[A])]);let e=this[is](t||null,this[C][0]);return this[J](),e}[is](t,e){if(this[k])this[jt]();else{let s=e;t===s.length||t===null?this[jt]():typeof s=="string"?(this[C][0]=s.slice(t),e=s.slice(0,t),this[A]-=t):(this[C][0]=s.subarray(t),e=s.subarray(0,t),this[A]-=t)}return this.emit("data",e),!this[C].length&&!this[q]&&this.emit("drain"),e}end(t,e,s){return typeof t=="function"&&(s=t,t=void 0),typeof e=="function"&&(s=e,e="utf8"),t!==void 0&&this.write(t,e),s&&this.once("end",s),this[q]=!0,this.writable=!1,(this[T]||!this[wt])&&this[J](),this}[ot](){this[v]||(!this[Q]&&!this[F].length&&(this[N]=!0),this[wt]=!1,this[T]=!0,this.emit("resume"),this[C].length?this[Lt]():this[q]?this[J]():this.emit("drain"))}resume(){return this[ot]()}pause(){this[T]=!1,this[wt]=!0,this[N]=!1}get destroyed(){return this[v]}get flowing(){return this[T]}get paused(){return this[wt]}[re](t){this[k]?this[A]+=1:this[A]+=t.length,this[C].push(t)}[jt](){return this[k]?this[A]-=1:this[A]-=this[C][0].length,this[C].shift()}[Lt](t=!1){do;while(this[ns](this[jt]())&&this[C].length);!t&&!this[C].length&&!this[q]&&this.emit("drain")}[ns](t){return this.emit("data",t),this[T]}pipe(t,e){if(this[v])return t;this[N]=!1;let s=this[Y];return e=e||{},t===ss.stdout||t===ss.stderr?e.end=!1:e.end=e.end!==!1,e.proxyErrors=!!e.proxyErrors,s?e.end&&t.end():(this[F].push(e.proxyErrors?new ce(this,t,e):new It(this,t,e)),this[G]?bt(()=>this[ot]()):this[ot]()),t}unpipe(t){let e=this[F].find(s=>s.dest===t);e&&(this[F].length===1?(this[T]&&this[Q]===0&&(this[T]=!1),this[F]=[]):this[F].splice(this[F].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){let s=super.on(t,e);if(t==="data")this[N]=!1,this[Q]++,!this[F].length&&!this[T]&&this[ot]();else if(t==="readable"&&this[A]!==0)super.emit("readable");else if(ji(t)&&this[Y])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[gt]){let i=e;this[G]?bt(()=>i.call(this,this[gt])):i.call(this,this[gt])}return s}removeListener(t,e){return this.off(t,e)}off(t,e){let s=super.off(t,e);return t==="data"&&(this[Q]=this.listeners("data").length,this[Q]===0&&!this[N]&&!this[F].length&&(this[T]=!1)),s}removeAllListeners(t){let e=super.removeAllListeners(t);return(t==="data"||t===void 0)&&(this[Q]=0,!this[N]&&!this[F].length&&(this[T]=!1)),e}get emittedEnd(){return this[Y]}[J](){!this[Nt]&&!this[Y]&&!this[v]&&this[C].length===0&&this[q]&&(this[Nt]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[_t]&&this.emit("close"),this[Nt]=!1)}emit(t,...e){let s=e[0];if(t!=="error"&&t!=="close"&&t!==v&&this[v])return!1;if(t==="data")return!this[k]&&!s?!1:this[G]?(bt(()=>this[he](s)),!0):this[he](s);if(t==="end")return this[rs]();if(t==="close"){if(this[_t]=!0,!this[Y]&&!this[v])return!1;let r=super.emit("close");return this.removeAllListeners("close"),r}else if(t==="error"){this[gt]=s,super.emit(oe,s);let r=!this[yt]||this.listeners("error").length?super.emit("error",s):!1;return this[J](),r}else if(t==="resume"){let r=super.emit("resume");return this[J](),r}else if(t==="finish"||t==="prefinish"){let r=super.emit(t);return this.removeAllListeners(t),r}let i=super.emit(t,...e);return this[J](),i}[he](t){for(let s of this[F])s.dest.write(t)===!1&&this.pause();let e=this[N]?!1:super.emit("data",t);return this[J](),e}[rs](){return this[Y]?!1:(this[Y]=!0,this.readable=!1,this[G]?(bt(()=>this[ae]()),!0):this[ae]())}[ae](){if(this[rt]){let e=this[rt].end();if(e){for(let s of this[F])s.dest.write(e);this[N]||super.emit("data",e)}}for(let e of this[F])e.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[k]||(t.dataLength=0);let e=this.promise();return this.on("data",s=>{t.push(s),this[k]||(t.dataLength+=s.length)}),await e,t}async concat(){if(this[k])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[W]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(v,()=>e(new Error("stream destroyed"))),this.on("error",s=>e(s)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[N]=!1;let t=!1,e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[q])return e();let r,o,h=f=>{this.off("data",a),this.off("end",l),this.off(v,c),e(),o(f)},a=f=>{this.off("error",h),this.off("end",l),this.off(v,c),this.pause(),r({value:f,done:!!this[q]})},l=()=>{this.off("error",h),this.off("data",a),this.off(v,c),e(),r({done:!0,value:void 0})},c=()=>h(new Error("stream destroyed"));return new Promise((f,u)=>{o=u,r=f,this.once(v,c),this.once("error",h),this.once("end",l),this.once("data",a)})},throw:e,return:e,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[N]=!1;let t=!1,e=()=>(this.pause(),this.off(oe,e),this.off(v,e),this.off("end",e),t=!0,{done:!0,value:void 0}),s=()=>{if(t)return e();let i=this.read();return i===null?e():{done:!1,value:i}};return this.once("end",e),this.once(oe,e),this.once(v,e),{next:s,throw:e,return:e,[Symbol.iterator](){return this}}}destroy(t){if(this[v])return t?this.emit("error",t):this.emit(v),this;this[v]=!0,this[N]=!0,this[C].length=0,this[A]=0;let e=this;return typeof e.close=="function"&&!this[_t]&&e.close(),t?this.emit("error",t):this.emit(v),this}static get isStream(){return Di}};var Vi=Ji.native,Et={lstatSync:Ui,readdir:Gi,readdirSync:Hi,readlinkSync:qi,realpathSync:Vi,promises:{lstat:Yi,readdir:Xi,readlink:Zi,realpath:Qi}},fs=n=>!n||n===Et||n===Ki?Et:{...Et,...n,promises:{...Et.promises,...n.promises||{}}},us=/^\\\\\?\\([a-z]:)\\?$/i,tn=n=>n.replace(/\//g,"\\").replace(us,"$1\\"),en=/[\\\/]/,z=0,ds=1,ps=2,H=4,ms=6,gs=8,tt=10,ws=12,j=15,St=~j,ue=16,hs=32,vt=64,B=128,$t=256,Wt=512,as=vt|B|Wt,sn=1023,de=n=>n.isFile()?gs:n.isDirectory()?H:n.isSymbolicLink()?tt:n.isCharacterDevice()?ps:n.isBlockDevice()?ms:n.isSocket()?ws:n.isFIFO()?ds:z,ls=new Map,xt=n=>{let t=ls.get(n);if(t)return t;let e=n.normalize("NFKD");return ls.set(n,e),e},cs=new Map,Pt=n=>{let t=cs.get(n);if(t)return t;let e=xt(n.toLowerCase());return cs.set(n,e),e},Bt=class extends mt{constructor(){super({max:256})}},me=class extends mt{constructor(t=16*1024){super({maxSize:t,sizeCalculation:e=>e.length+1})}},ys=Symbol("PathScurry setAsCwd"),M=class{name;root;roots;parent;nocase;isCWD=!1;#t;#e;get dev(){return this.#e}#r;get mode(){return this.#r}#i;get nlink(){return this.#i}#o;get uid(){return this.#o}#S;get gid(){return this.#S}#l;get rdev(){return this.#l}#f;get blksize(){return this.#f}#h;get ino(){return this.#h}#a;get size(){return this.#a}#n;get blocks(){return this.#n}#g;get atimeMs(){return this.#g}#w;get mtimeMs(){return this.#w}#d;get ctimeMs(){return this.#d}#u;get birthtimeMs(){return this.#u}#x;get atime(){return this.#x}#m;get mtime(){return this.#m}#T;get ctime(){return this.#T}#C;get birthtime(){return this.#C}#b;#E;#v;#p;#M;#A;#s;#D;#y;#O;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=z,s,i,r,o,h){this.name=t,this.#b=r?Pt(t):xt(t),this.#s=e&sn,this.nocase=r,this.roots=i,this.root=s||this,this.#D=o,this.#v=h.fullpath,this.#M=h.relative,this.#A=h.relativePosix,this.parent=h.parent,this.parent?this.#t=this.parent.#t:this.#t=fs(h.fs)}depth(){return this.#E!==void 0?this.#E:this.parent?this.#E=this.parent.depth()+1:this.#E=0}childrenCache(){return this.#D}resolve(t){if(!t)return this;let e=this.getRootString(t),i=t.substring(e.length).split(this.splitSep);return e?this.getRoot(e).#N(i):this.#N(i)}#N(t){let e=this;for(let s of t)e=e.child(s);return e}children(){let t=this.#D.get(this);if(t)return t;let e=Object.assign([],{provisional:0});return this.#D.set(this,e),this.#s&=~ue,e}child(t,e){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let s=this.children(),i=this.nocase?Pt(t):xt(t);for(let a of s)if(a.#b===i)return a;let r=this.parent?this.sep:"",o=this.#v?this.#v+r+t:void 0,h=this.newChild(t,z,{...e,parent:this,fullpath:o});return this.canReaddir()||(h.#s|=B),s.push(h),h}relative(){if(this.isCWD)return"";if(this.#M!==void 0)return this.#M;let t=this.name,e=this.parent;if(!e)return this.#M=this.name;let s=e.relative();return s+(!s||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#A!==void 0)return this.#A;let t=this.name,e=this.parent;if(!e)return this.#A=this.fullpathPosix();let s=e.relativePosix();return s+(!s||!e.parent?"":"/")+t}fullpath(){if(this.#v!==void 0)return this.#v;let t=this.name,e=this.parent;if(!e)return this.#v=this.name;let i=e.fullpath()+(e.parent?this.sep:"")+t;return this.#v=i}fullpathPosix(){if(this.#p!==void 0)return this.#p;if(this.sep==="/")return this.#p=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#p=`//?/${i}`:this.#p=i}let t=this.parent,e=t.fullpathPosix(),s=e+(!e||!t.parent?"":"/")+this.name;return this.#p=s}isUnknown(){return(this.#s&j)===z}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#s&j)===gs}isDirectory(){return(this.#s&j)===H}isCharacterDevice(){return(this.#s&j)===ps}isBlockDevice(){return(this.#s&j)===ms}isFIFO(){return(this.#s&j)===ds}isSocket(){return(this.#s&j)===ws}isSymbolicLink(){return(this.#s&tt)===tt}lstatCached(){return this.#s&hs?this:void 0}readlinkCached(){return this.#y}realpathCached(){return this.#O}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#y)return!0;if(!this.parent)return!1;let t=this.#s&j;return!(t!==z&&t!==tt||this.#s&$t||this.#s&B)}calledReaddir(){return!!(this.#s&ue)}isENOENT(){return!!(this.#s&B)}isNamed(t){return this.nocase?this.#b===Pt(t):this.#b===xt(t)}async readlink(){let t=this.#y;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=await this.#t.promises.readlink(this.fullpath()),s=(await this.parent.realpath())?.resolve(e);if(s)return this.#y=s}catch(e){this.#c(e.code);return}}readlinkSync(){let t=this.#y;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=this.#t.readlinkSync(this.fullpath()),s=this.parent.realpathSync()?.resolve(e);if(s)return this.#y=s}catch(e){this.#c(e.code);return}}#_(t){this.#s|=ue;for(let e=t.provisional;es(null,t))}readdirCB(t,e=!1){if(!this.canReaddir()){e?t(null,[]):queueMicrotask(()=>t(null,[]));return}let s=this.children();if(this.calledReaddir()){let r=s.slice(0,s.provisional);e?t(null,r):queueMicrotask(()=>t(null,r));return}if(this.#U.push(t),this.#G)return;this.#G=!0;let i=this.fullpath();this.#t.readdir(i,{withFileTypes:!0},(r,o)=>{if(r)this.#z(r.code),s.provisional=0;else{for(let h of o)this.#$(h,s);this.#_(s)}this.#q(s.slice(0,s.provisional))})}#B;async readdir(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();if(this.#B)await this.#B;else{let s=()=>{};this.#B=new Promise(i=>s=i);try{for(let i of await this.#t.promises.readdir(e,{withFileTypes:!0}))this.#$(i,t);this.#_(t)}catch(i){this.#z(i.code),t.provisional=0}this.#B=void 0,s()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();try{for(let s of this.#t.readdirSync(e,{withFileTypes:!0}))this.#$(s,t);this.#_(t)}catch(s){this.#z(s.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(this.#s&as)return!1;let t=j&this.#s;return t===z||t===H||t===tt}shouldWalk(t,e){return(this.#s&H)===H&&!(this.#s&as)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#O)return this.#O;if(!((Wt|$t|B)&this.#s))try{let t=await this.#t.promises.realpath(this.fullpath());return this.#O=this.resolve(t)}catch{this.#k()}}realpathSync(){if(this.#O)return this.#O;if(!((Wt|$t|B)&this.#s))try{let t=this.#t.realpathSync(this.fullpath());return this.#O=this.resolve(t)}catch{this.#k()}}[ys](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;let e=new Set([]),s=[],i=this;for(;i&&i.parent;)e.add(i),i.#M=s.join(this.sep),i.#A=s.join("/"),i=i.parent,s.push("..");for(i=t;i&&i.parent&&!e.has(i);)i.#M=void 0,i.#A=void 0,i=i.parent}},Ut=class n extends M{sep="\\";splitSep=en;constructor(t,e=z,s,i,r,o,h){super(t,e,s,i,r,o,h)}newChild(t,e=z,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(t){return pe.parse(t).root}getRoot(t){if(t=tn(t.toUpperCase()),t===this.root.name)return this.root;for(let[e,s]of Object.entries(this.roots))if(this.sameRoot(t,e))return this.roots[t]=s;return this.roots[t]=new ht(t,this).root}sameRoot(t,e=this.root.name){return t=t.toUpperCase().replace(/\//g,"\\").replace(us,"$1\\"),t===e}},Gt=class n extends M{splitSep="/";sep="/";constructor(t,e=z,s,i,r,o,h){super(t,e,s,i,r,o,h)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,e=z,s={}){return new n(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}},Ht=class{root;rootPath;roots;cwd;#t;#e;#r;nocase;#i;constructor(t=process.cwd(),e,s,{nocase:i,childrenCacheSize:r=16*1024,fs:o=Et}={}){this.#i=fs(o),(t instanceof URL||t.startsWith("file://"))&&(t=Bi(t));let h=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(h),this.#t=new Bt,this.#e=new Bt,this.#r=new me(r);let a=h.substring(this.rootPath.length).split(s);if(a.length===1&&!a[0]&&a.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#i),this.roots[this.rootPath]=this.root;let l=this.root,c=a.length-1,f=e.sep,u=this.rootPath,d=!1;for(let g of a){let p=c--;l=l.child(g,{relative:new Array(p).fill("..").join(f),relativePosix:new Array(p).fill("..").join("/"),fullpath:u+=(d?"":f)+g}),d=!0}this.cwd=l}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#r}resolve(...t){let e="";for(let r=t.length-1;r>=0;r--){let o=t[r];if(!(!o||o===".")&&(e=e?`${o}/${e}`:o,this.isAbsolute(o)))break}let s=this.#t.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpath();return this.#t.set(e,i),i}resolvePosix(...t){let e="";for(let r=t.length-1;r>=0;r--){let o=t[r];if(!(!o||o===".")&&(e=e?`${o}/${e}`:o,this.isAbsolute(o)))break}let s=this.#e.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpathPosix();return this.#e.set(e,i),i}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof M||(e=t,t=this.cwd);let{withFileTypes:s}=e;if(t.canReaddir()){let i=await t.readdir();return s?i:i.map(r=>r.name)}else return[]}readdirSync(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof M||(e=t,t=this.cwd);let{withFileTypes:s=!0}=e;return t.canReaddir()?s?t.readdirSync():t.readdirSync().map(i=>i.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof M||(e=t.withFileTypes,t=this.cwd);let s=await t.readlink();return e?s:s?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof M||(e=t.withFileTypes,t=this.cwd);let s=t.readlinkSync();return e?s:s?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof M||(e=t.withFileTypes,t=this.cwd);let s=await t.realpath();return e?s:s?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof M||(e=t.withFileTypes,t=this.cwd);let s=t.realpathSync();return e?s:s?.fullpath()}async walk(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof M||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=[];(!r||r(t))&&h.push(s?t:t.fullpath());let a=new Set,l=(f,u)=>{a.add(f),f.readdirCB((d,g)=>{if(d)return u(d);let p=g.length;if(!p)return u();let w=()=>{--p===0&&u()};for(let m of g)(!r||r(m))&&h.push(s?m:m.fullpath()),i&&m.isSymbolicLink()?m.realpath().then(S=>S?.isUnknown()?S.lstat():S).then(S=>S?.shouldWalk(a,o)?l(S,w):w()):m.shouldWalk(a,o)?l(m,w):w()},!0)},c=t;return new Promise((f,u)=>{l(c,d=>{if(d)return u(d);f(h)})})}walkSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof M||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=[];(!r||r(t))&&h.push(s?t:t.fullpath());let a=new Set([t]);for(let l of a){let c=l.readdirSync();for(let f of c){(!r||r(f))&&h.push(s?f:f.fullpath());let u=f;if(f.isSymbolicLink()){if(!(i&&(u=f.realpathSync())))continue;u.isUnknown()&&u.lstatSync()}u.shouldWalk(a,o)&&a.add(u)}}return h}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof M||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof M||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e;(!r||r(t))&&(yield s?t:t.fullpath());let h=new Set([t]);for(let a of h){let l=a.readdirSync();for(let c of l){(!r||r(c))&&(yield s?c:c.fullpath());let f=c;if(c.isSymbolicLink()){if(!(i&&(f=c.realpathSync())))continue;f.isUnknown()&&f.lstatSync()}f.shouldWalk(h,o)&&h.add(f)}}}stream(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof M||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=new X({objectMode:!0});(!r||r(t))&&h.write(s?t:t.fullpath());let a=new Set,l=[t],c=0,f=()=>{let u=!1;for(;!u;){let d=l.shift();if(!d){c===0&&h.end();return}c++,a.add(d);let g=(w,m,S=!1)=>{if(w)return h.emit("error",w);if(i&&!S){let b=[];for(let y of m)y.isSymbolicLink()&&b.push(y.realpath().then(E=>E?.isUnknown()?E.lstat():E));if(b.length){Promise.all(b).then(()=>g(null,m,!0));return}}for(let b of m)b&&(!r||r(b))&&(h.write(s?b:b.fullpath())||(u=!0));c--;for(let b of m){let y=b.realpathCached()||b;y.shouldWalk(a,o)&&l.push(y)}u&&!h.flowing?h.once("drain",f):p||f()},p=!0;d.readdirCB(g,!0),p=!1}};return f(),h}streamSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof M||(e=t,t=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:o}=e,h=new X({objectMode:!0}),a=new Set;(!r||r(t))&&h.write(s?t:t.fullpath());let l=[t],c=0,f=()=>{let u=!1;for(;!u;){let d=l.shift();if(!d){c===0&&h.end();return}c++,a.add(d);let g=d.readdirSync();for(let p of g)(!r||r(p))&&(h.write(s?p:p.fullpath())||(u=!0));c--;for(let p of g){let w=p;if(p.isSymbolicLink()){if(!(i&&(w=p.realpathSync())))continue;w.isUnknown()&&w.lstatSync()}w.shouldWalk(a,o)&&l.push(w)}}u&&!h.flowing&&h.once("drain",f)};return f(),h}chdir(t=this.cwd){let e=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[ys](e)}},ht=class extends Ht{sep="\\";constructor(t=process.cwd(),e={}){let{nocase:s=!0}=e;super(t,pe,"\\",{...e,nocase:s}),this.nocase=s;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(t){return pe.parse(t).root.toUpperCase()}newRoot(t){return new Ut(this.rootPath,H,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}},at=class extends Ht{sep="/";constructor(t=process.cwd(),e={}){let{nocase:s=!1}=e;super(t,Wi,"/",{...e,nocase:s}),this.nocase=s}parseRootPath(t){return"/"}newRoot(t){return new Gt(this.rootPath,H,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}},Tt=class extends at{constructor(t=process.cwd(),e={}){let{nocase:s=!0}=e;super(t,{...e,nocase:s})}},fr=process.platform==="win32"?Ut:Gt,bs=process.platform==="win32"?ht:process.platform==="darwin"?Tt:at;var nn=n=>n.length>=1,rn=n=>n.length>=1,lt=class n{#t;#e;#r;length;#i;#o;#S;#l;#f;#h;#a=!0;constructor(t,e,s,i){if(!nn(t))throw new TypeError("empty pattern list");if(!rn(e))throw new TypeError("empty glob list");if(e.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,s<0||s>=this.length)throw new TypeError("index out of range");if(this.#t=t,this.#e=e,this.#r=s,this.#i=i,this.#r===0){if(this.isUNC()){let[r,o,h,a,...l]=this.#t,[c,f,u,d,...g]=this.#e;l[0]===""&&(l.shift(),g.shift());let p=[r,o,h,a,""].join("/"),w=[c,f,u,d,""].join("/");this.#t=[p,...l],this.#e=[w,...g],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){let[r,...o]=this.#t,[h,...a]=this.#e;o[0]===""&&(o.shift(),a.shift());let l=r+"/",c=h+"/";this.#t=[l,...o],this.#e=[c,...a],this.length=this.#t.length}}}pattern(){return this.#t[this.#r]}isString(){return typeof this.#t[this.#r]=="string"}isGlobstar(){return this.#t[this.#r]===R}isRegExp(){return this.#t[this.#r]instanceof RegExp}globString(){return this.#S=this.#S||(this.#r===0?this.isAbsolute()?this.#e[0]+this.#e.slice(1).join("/"):this.#e.join("/"):this.#e.slice(this.#r).join("/"))}hasMore(){return this.length>this.#r+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new n(this.#t,this.#e,this.#r+1,this.#i),this.#o.#h=this.#h,this.#o.#f=this.#f,this.#o.#l=this.#l,this.#o):this.#o=null}isUNC(){let t=this.#t;return this.#f!==void 0?this.#f:this.#f=this.#i==="win32"&&this.#r===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3]}isDrive(){let t=this.#t;return this.#l!==void 0?this.#l:this.#l=this.#i==="win32"&&this.#r===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){let t=this.#t;return this.#h!==void 0?this.#h:this.#h=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){let t=this.#t[0];return typeof t=="string"&&this.isAbsolute()&&this.#r===0?t:""}checkFollowGlobstar(){return!(this.#r===0||!this.isGlobstar()||!this.#a)}markFollowGlobstar(){return this.#r===0||!this.isGlobstar()||!this.#a?!1:(this.#a=!1,!0)}};var on=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",ct=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(t,{nobrace:e,nocase:s,noext:i,noglobstar:r,platform:o=on}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:e,nocase:s,noext:i,noglobstar:r,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let h of t)this.add(h)}add(t){let e=new D(t,this.mmopts);for(let s=0;s[t,!!(e&2),!!(e&1)])}},ye=class{store=new Map;add(t,e){if(!t.canReaddir())return;let s=this.store.get(t);s?s.find(i=>i.globString()===e.globString())||s.push(e):this.store.set(t,[e])}get(t){let e=this.store.get(t);if(!e)throw new Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}},Ct=class n{hasWalkedCache;matches=new we;subwalks=new ye;patterns;follow;dot;opts;constructor(t,e){this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=e?e.copy():new ge}processPatterns(t,e){this.patterns=e;let s=e.map(i=>[t,i]);for(let[i,r]of s){this.hasWalkedCache.storeWalked(i,r);let o=r.root(),h=r.isAbsolute()&&this.opts.absolute!==!1;if(o){i=i.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let f=r.rest();if(f)r=f;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let a,l,c=!1;for(;typeof(a=r.pattern())=="string"&&(l=r.rest());)i=i.resolve(a),r=l,c=!0;if(a=r.pattern(),l=r.rest(),c){if(this.hasWalkedCache.hasWalked(i,r))continue;this.hasWalkedCache.storeWalked(i,r)}if(typeof a=="string"){let f=a===".."||a===""||a===".";this.matches.add(i.resolve(a),h,f);continue}else if(a===R){(!i.isSymbolicLink()||this.follow||r.checkFollowGlobstar())&&this.subwalks.add(i,r);let f=l?.pattern(),u=l?.rest();if(!l||(f===""||f===".")&&!u)this.matches.add(i,h,f===""||f===".");else if(f===".."){let d=i.parent||i;u?this.hasWalkedCache.hasWalked(d,u)||this.subwalks.add(d,u):this.matches.add(d,h,!0)}}else a instanceof RegExp&&this.subwalks.add(i,r)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new n(this.opts,this.hasWalkedCache)}filterEntries(t,e){let s=this.subwalks.get(t),i=this.child();for(let r of e)for(let o of s){let h=o.isAbsolute(),a=o.pattern(),l=o.rest();a===R?i.testGlobstar(r,o,l,h):a instanceof RegExp?i.testRegExp(r,a,l,h):i.testString(r,a,l,h)}return i}testGlobstar(t,e,s,i){if((this.dot||!t.name.startsWith("."))&&(e.hasMore()||this.matches.add(t,i,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,e):t.isSymbolicLink()&&(s&&e.checkFollowGlobstar()?this.subwalks.add(t,s):e.markFollowGlobstar()&&this.subwalks.add(t,e)))),s){let r=s.pattern();if(typeof r=="string"&&r!==".."&&r!==""&&r!==".")this.testString(t,r,s.rest(),i);else if(r===".."){let o=t.parent||t;this.subwalks.add(o,s)}else r instanceof RegExp&&this.testRegExp(t,r,s.rest(),i)}}testRegExp(t,e,s,i){e.test(t.name)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,!1))}testString(t,e,s,i){t.isNamed(e)&&(s?this.subwalks.add(t,s):this.matches.add(t,i,!1))}};var hn=(n,t)=>typeof n=="string"?new ct([n],t):Array.isArray(n)?new ct(n,t):n,qt=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#e;#r;signal;maxDepth;includeChildMatches;constructor(t,e,s){if(this.patterns=t,this.path=e,this.opts=s,this.#r=!s.posix&&s.platform==="win32"?"\\":"/",this.includeChildMatches=s.includeChildMatches!==!1,(s.ignore||!this.includeChildMatches)&&(this.#e=hn(s.ignore??[],s),!this.includeChildMatches&&typeof this.#e.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=s.maxDepth||1/0,s.signal&&(this.signal=s.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0}))}#i(t){return this.seen.has(t)||!!this.#e?.ignored?.(t)}#o(t){return!!this.#e?.childrenIgnored?.(t)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let t;for(;!this.paused&&(t=this.#t.shift());)t()}onResume(t){this.signal?.aborted||(this.paused?this.#t.push(t):t())}async matchCheck(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||await t.realpath(),!s)return;t=s}let r=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let o=await r.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(r,e)}matchCheckTest(t,e){return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!t.realpathCached()?.isDirectory())&&!this.#i(t)?t:void 0}matchCheckSync(t,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=t.realpathCached()||t.realpathSync(),!s)return;t=s}let r=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let o=r.realpathSync();o&&(o?.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(r,e)}matchFinish(t,e){if(this.#i(t))return;if(!this.includeChildMatches&&this.#e?.add){let r=`${t.relativePosix()}/**`;this.#e.add(r)}let s=this.opts.absolute===void 0?e:this.opts.absolute;this.seen.add(t);let i=this.opts.mark&&t.isDirectory()?this.#r:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(s){let r=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(r+i)}else{let r=this.opts.posix?t.relativePosix():t.relative(),o=this.opts.dotRelative&&!r.startsWith(".."+this.#r)?"."+this.#r:"";this.matchEmit(r?o+r+i:"."+i)}}async match(t,e,s){let i=await this.matchCheck(t,s);i&&this.matchFinish(i,e)}matchSync(t,e,s){let i=this.matchCheckSync(t,s);i&&this.matchFinish(i,e)}walkCB(t,e,s){this.signal?.aborted&&s(),this.walkCB2(t,e,new Ct(this.opts),s)}walkCB2(t,e,s,i){if(this.#o(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(t,e,s,i));return}s.processPatterns(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#i(h)||(r++,this.match(h,a,l).then(()=>o()));for(let h of s.subwalkTargets()){if(this.maxDepth!==1/0&&h.depth()>=this.maxDepth)continue;r++;let a=h.readdirCached();h.calledReaddir()?this.walkCB3(h,a,s,o):h.readdirCB((l,c)=>this.walkCB3(h,c,s,o),!0)}o()}walkCB3(t,e,s,i){s=s.filterEntries(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#i(h)||(r++,this.match(h,a,l).then(()=>o()));for(let[h,a]of s.subwalks.entries())r++,this.walkCB2(h,a,s.child(),o);o()}walkCBSync(t,e,s){this.signal?.aborted&&s(),this.walkCB2Sync(t,e,new Ct(this.opts),s)}walkCB2Sync(t,e,s,i){if(this.#o(t))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(t,e,s,i));return}s.processPatterns(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#i(h)||this.matchSync(h,a,l);for(let h of s.subwalkTargets()){if(this.maxDepth!==1/0&&h.depth()>=this.maxDepth)continue;r++;let a=h.readdirSync();this.walkCB3Sync(h,a,s,o)}o()}walkCB3Sync(t,e,s,i){s=s.filterEntries(t,e);let r=1,o=()=>{--r===0&&i()};for(let[h,a,l]of s.matches.entries())this.#i(h)||this.matchSync(h,a,l);for(let[h,a]of s.subwalks.entries())r++,this.walkCB2Sync(h,a,s.child(),o);o()}},At=class extends qt{matches=new Set;constructor(t,e,s){super(t,e,s)}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,e)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?e(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},Rt=class extends qt{results;constructor(t,e,s){super(t,e,s),this.results=new X({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(t){this.results.write(t),this.results.flowing||this.pause()}stream(){let t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end())}):this.walkCB(t,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var ln=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",U=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(t,e){if(!e)throw new TypeError("glob options required");if(this.withFileTypes=!!e.withFileTypes,this.signal=e.signal,this.follow=!!e.follow,this.dot=!!e.dot,this.dotRelative=!!e.dotRelative,this.nodir=!!e.nodir,this.mark=!!e.mark,e.cwd?(e.cwd instanceof URL||e.cwd.startsWith("file://"))&&(e.cwd=an(e.cwd)):this.cwd="",this.cwd=e.cwd||"",this.root=e.root,this.magicalBraces=!!e.magicalBraces,this.nobrace=!!e.nobrace,this.noext=!!e.noext,this.realpath=!!e.realpath,this.absolute=e.absolute,this.includeChildMatches=e.includeChildMatches!==!1,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(t=t.map(a=>a.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(a=>a.includes("/")?a:`./**/${a}`)}if(this.pattern=t,this.platform=e.platform||ln,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,e.nocase!==void 0&&e.nocase!==e.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let a=e.platform==="win32"?ht:e.platform==="darwin"?Tt:e.platform?at:bs;this.scurry=new a(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;let s=this.platform==="darwin"||this.platform==="win32",i={...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},r=this.pattern.map(a=>new D(a,i)),[o,h]=r.reduce((a,l)=>(a[0].push(...l.set),a[1].push(...l.globParts),a),[[],[]]);this.patterns=o.map((a,l)=>{let c=h[l];if(!c)throw new Error("invalid pattern object");return new lt(a,c,0,this.platform)})}async walk(){return[...await new At(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new At(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new Rt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new Rt(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var be=(n,t={})=>{Array.isArray(n)||(n=[n]);for(let e of n)if(new D(e,t).hasMagic())return!0;return!1};function Jt(n,t={}){return new U(n,t).streamSync()}function vs(n,t={}){return new U(n,t).stream()}function Kt(n,t={}){return new U(n,t).walkSync()}async function Ss(n,t={}){return new U(n,t).walk()}function Vt(n,t={}){return new U(n,t).iterateSync()}function xs(n,t={}){return new U(n,t).iterate()}var cn=Jt,fn=Object.assign(vs,{sync:Jt}),un=Vt,dn=Object.assign(xs,{sync:Vt}),pn=Object.assign(Kt,{stream:Jt,iterate:Vt}),Es=Object.assign(Ss,{glob:Ss,globSync:Kt,sync:pn,globStream:vs,stream:fn,globStreamSync:Jt,streamSync:cn,globIterate:xs,iterate:dn,globIterateSync:Vt,iterateSync:un,Glob:U,hasMagic:be,escape:st,unescape:P});Es.glob=Es;import mn from"node:fs";function Ts(n){return JSON.parse(mn.readFileSync(n).toString("utf-8"))}function Yt(n){return Ts(n)}function Se(n){return Ts(n)}function K(n){return(process.env[`INPUT_${n.toUpperCase()}`]||"").trim()}function Cs(n){let t=gn(n);Xt.mkdirSync(Zt.join(kt.cwd(),n.analyzerDirectory),{recursive:!0});let e=Zt.join(kt.cwd(),n.analyzerDirectory,"bundle_analysis.json");Xt.writeFileSync(e,JSON.stringify(t,null,2)),ft.log(`Wrote ${e}`,t)}function Ee(n){return n.metafiles.flatMap(t=>Kt(Zt.join(kt.cwd(),t),{nodir:!0}).map(e=>({relativePath:Zt.relative(kt.cwd(),e),absolutePath:e})))}function gn(n){let t={},e=Ee(n),s=e.reduce((i,{relativePath:r,absolutePath:o})=>{try{Xt.accessSync(o,Xt.constants.R_OK)}catch{ft.error(`No meta file found at "${o}" - a path to meta file may be wrong, or esbuild is not executed.`),kt.exit(1)}let h=Yt(o);return Object.entries(h.outputs).reduce((a,l)=>{let[c,f]=l;return n.includeExtensions.some(u=>c.toLowerCase().endsWith(u))&&(a[`${r} -> ${c}`]={bytes:f.bytes,metafile:r,outfile:c}),a},i),i},t);return ft.log("Found metafiles",e),ft.log("Found result",s),s}function ks(n){let t=!1,e=`## \u{1F4E6} esbuild Bundle Analysis for ${n.name} This analysis was generated by [esbuild-bundle-analyzer](https://github.com/exoego/esbuild-bundle-analyzer). \u{1F916} -`,s=kt.join(process.cwd(),n.analyzerDirectory,"bundle_analysis.json"),i=Se(s);_.log(`Current analysis found in ${s}`,i);let r=bn(n),o=Sn(n),a=[...new Set([...Object.keys(i),...Object.keys(r)])].sort().map(l=>{let c=i[l],f=r[l];if(_.log("Comparing",l,c,f),!c)return _.log("Deleted file",l),t=!0,{...f,baseBytes:-1,remark:"deleted",tree:void 0};let u=o.get(Os(c.metafile,c.outfile));if(!f)return _.log("New file",l),t=!0,{...c,baseBytes:-1,remark:"added",tree:u};let d=c.bytes-f.bytes;return d!==0?(_.log("Changed file",l,d),t=!0):_.log("No change",l),{...c,baseBytes:f.bytes,tree:u,remark:Math.sign(d)?"increased":"decreased"}});_.log("Comparison done.",a),t?(e+=En(a,n.percentExtraAttention,n.showNoChange),e+=vn(a,n.showNoChange),e+=Tn(a,n.topNLargestPaths),e+=yn(n)):e+="This PR introduced no changes to the esbuild bundle! \u{1F64C}",e=` -${e}`,wn(n,e)}function Os(n,t){return`${n} -> ${t}`}function wn(n,t){_.log("Writing comment to file.",t),xe.mkdirSync(kt.join(process.cwd(),n.analyzerDirectory),{recursive:!0}),xe.writeFileSync(kt.join(process.cwd(),n.analyzerDirectory,"bundle_analysis_comment.txt"),t.trim())}function yn(n){return n.showDetails?` +`,s=Mt.join(process.cwd(),n.analyzerDirectory,"bundle_analysis.json"),i=Se(s);_.log(`Current analysis found in ${s}`,i);let r=bn(n),o=Sn(n),a=[...new Set([...Object.keys(i),...Object.keys(r)])].sort().map(l=>{let c=i[l],f=r[l];if(_.log("Comparing",l,c,f),!c)return _.log("Deleted file",l),t=!0,{...f,baseBytes:-1,remark:"deleted",tree:void 0};let u=o.get(Ms(c.metafile,c.outfile));if(!f)return _.log("New file",l),t=!0,{...c,baseBytes:-1,remark:"added",tree:u};let d=c.bytes-f.bytes;return d!==0?(_.log("Changed file",l,d),t=!0):_.log("No change",l),{...c,baseBytes:f.bytes,tree:u,remark:Math.sign(d)?"increased":"decreased"}});_.log("Comparison done.",a),t?(e+=En(a,n.percentExtraAttention,n.showNoChange),e+=vn(a,n.showNoChange),e+=Tn(a,n.topNLargestPaths),e+=yn(n)):e+="This PR introduced no changes to the esbuild bundle! \u{1F64C}",e=` +${e}`,wn(n,e)}function Ms(n,t){return`${n} -> ${t}`}function wn(n,t){_.log("Writing comment to file.",t),xe.mkdirSync(Mt.join(process.cwd(),n.analyzerDirectory),{recursive:!0}),xe.writeFileSync(Mt.join(process.cwd(),n.analyzerDirectory,"bundle_analysis_comment.txt"),t.trim())}function yn(n){return n.showDetails?`
      Details

      Next to the size is how much the size has increased or decreased compared with the base branch of this PR.

      @@ -16,11 +16,11 @@ ${e}`,wn(n,e)}function Os(n,t){return`${n} -> ${t}`}function wn(n,t){_.log("Writ
    • \u{1F195}: The out file is newly found: will be added to base branch.
    -`:""}function bn(n){try{let t=kt.join(process.cwd(),n.analyzerDirectory,"base/bundle/bundle_analysis.json"),e=Se(t);return _.info(`Base analysis found in ${t}`,e),e}catch{return _.warn("No base analysis found. First setup or all artifacts are expired."),{}}}function Sn(n){function t(i){let r={name:"",path:"",value:0,children:[]};for(let[o,{bytesInOutput:h}]of Object.entries(i)){let a=o.split("/");e(r,a,h)}return r}function e(i,r,o){let h=r.shift();if(h===void 0){i.value+=o;return}let a=i.children.find(l=>l.name===h);a||(a={name:h,path:`${i.path}/${h}`.replace(/^\//,""),value:0,children:[]},i.children.push(a)),i.value+=o,e(a,r,o)}let s=new Map;if(n.topNLargestPaths<=0)return s;for(let{relativePath:i,absolutePath:r}of Ee(n)){let o=Yt(r);for(let[h,a]of Object.entries(o.outputs)){let l=t(a.inputs);s.set(Os(i,h),l),xe.writeFileSync(kt.join(process.cwd(),n.analyzerDirectory,"tree.json"),JSON.stringify(l,null,2))}}return s}var Qt="\xA0";function Te(n){let t=n<0?"-":"",e=Math.abs(n);if(e<1e3)return`${t}${e}${Qt}B`;if(e<1e3*1e3)return`${t}${(e/1e3).toFixed(2)}${Qt}KB`;if(e<1e3*1e3*1e3)return`${t}${(e/1e3/1e3).toFixed(2)}${Qt}MB`;if(e<1e3*1e3*1e3*1e3)return`${t}${(e/1e3/1e3/1e3).toFixed(2)}${Qt}GB`;throw new Error("Too large file size!! Are you sure?")}var Fs=(n,t)=>t||n.bytes-n.baseBytes!==0;function En(n,t,e){return` +`:""}function bn(n){try{let t=Mt.join(process.cwd(),n.analyzerDirectory,"base/bundle/bundle_analysis.json"),e=Se(t);return _.info(`Base analysis found in ${t}`,e),e}catch{return _.warn("No base analysis found. First setup or all artifacts are expired."),{}}}function Sn(n){function t(i){let r={name:"",path:"",value:0,children:[]};for(let[o,{bytesInOutput:h}]of Object.entries(i)){let a=o.split("/");e(r,a,h)}return r}function e(i,r,o){let h=r.shift();if(h===void 0){i.value+=o;return}let a=i.children.find(l=>l.name===h);a||(a={name:h,path:`${i.path}/${h}`.replace(/^\//,""),value:0,children:[]},i.children.push(a)),i.value+=o,e(a,r,o)}let s=new Map;if(n.topNLargestPaths<=0)return s;for(let{relativePath:i,absolutePath:r}of Ee(n)){let o=Yt(r);for(let[h,a]of Object.entries(o.outputs)){let l=t(a.inputs);s.set(Ms(i,h),l),xe.writeFileSync(Mt.join(process.cwd(),n.analyzerDirectory,"tree.json"),JSON.stringify(l,null,2))}}return s}var Qt="\xA0";function Te(n){let t=n<0?"-":"",e=Math.abs(n);if(e<1e3)return`${t}${e}${Qt}B`;if(e<1e3*1e3)return`${t}${(e/1e3).toFixed(2)}${Qt}KB`;if(e<1e3*1e3*1e3)return`${t}${(e/1e3/1e3).toFixed(2)}${Qt}MB`;if(e<1e3*1e3*1e3*1e3)return`${t}${(e/1e3/1e3/1e3).toFixed(2)}${Qt}GB`;throw new Error("Too large file size!! Are you sure?")}var Os=(n,t)=>t||n.bytes-n.baseBytes!==0;function En(n,t,e){return` Meta File | Out File | Size (raw) | Note ----------|----------|-----------:|------ -${n.filter(i=>Fs(i,e)).map(i=>`${i.metafile} | ${i.outfile} | ${Ds(i)} | ${An(i,t)} -`).join("")}`}function vn(n,t){let e=n.filter(i=>!Fs(i,t)),s=e.map(i=>`${i.metafile} | ${i.outfile} | ${Ds(i)} | \u2705 No change +${n.filter(i=>Os(i,e)).map(i=>`${i.metafile} | ${i.outfile} | ${Ds(i)} | ${An(i,t)} +`).join("")}`}function vn(n,t){let e=n.filter(i=>!Os(i,t)),s=e.map(i=>`${i.metafile} | ${i.outfile} | ${Ds(i)} | \u2705 No change `).join("");return e.length===0?"":`
    ${e.length} bundles with no change are hidden. @@ -41,5 +41,5 @@ ${s} `;let i=s.tree.value,{largeNodes:r,hasOther:o}=xn(s.tree,t);for(let{path:h,value:a}of r){let l=As(a,i);e+=`| ${h} | ${Rs(l,a)} | `}if(o){let h=i-r[0].value,a=As(h,i);e+=`| (other) | ${Rs(a,h)} | `}}return e+=`
    -`,e}function Rs(n,t){return`\${{\\color{Goldenrod}{ ${Cn(n/100)} }}}$ ${n.toFixed(1)}%, ${Te(t)}`}var Ms=["","\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u2588"],ve=1/(Ms.length-1);function Cn(n,t=25,e=0,s=1){let i=n*t,r=Math.floor(i),o=i-r,h=Math.round(ve*Math.floor(o/ve)/ve);return"\u2588".repeat(r)+Ms[h]}function Ds(n){return Te(n.bytes)}function An(n,t){if(n.remark==="deleted")return"\u{1F5D1}\uFE0F Deleted";if(n.remark==="added")return"\u{1F195} Added";let e=n.bytes-n.baseBytes;if(e!==0){let s=e/n.baseBytes*100;return`${Rn(s,t)}${Te(e)} (${Ns(s)}${s.toFixed(1)}%)`}return"\u2705 No change"}function Ns(n){return n<0?"":"+"}function Rn(n,t){let e;return n>0&&n=t?e="\u203C\uFE0F":e="\u2705 ",`${e} ${Ns(n)}`}function On(){let n=K("metafiles");if(!n)throw new Error("metafiles is not specified");let t=K("name");if(!t)throw new Error("name is not specified");return{percentExtraAttention:Number.parseInt(K("percent_extra_attention")||"20",10),showDetails:["true","True","TRUE"].includes(K("show_details")||"true"),showNoChange:["true","True","TRUE"].includes(K("show_no_change")||"true"),topNLargestPaths:Number.parseInt(K("top_n_largest_paths")||"20",10),includeExtensions:(K("include_extensions")||".js,.mjs,.cjs").split(","),name:t,analyzerDirectory:K("analyze_directory")||".analyzer",metafiles:n.split(",")}}function Fn(n=On()){Cs(n),ks(n)}import.meta.url===kn(process.argv[1]).href&&Fn();export{Fn as run}; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jb21wYXJlLnRzIiwgIi4uL3NyYy9yZXBvcnQudHMiLCAiLi4vc3JjL3V0aWxzLnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJpbXBvcnQgeyBwYXRoVG9GaWxlVVJMIH0gZnJvbSBcIm5vZGU6dXJsXCI7XG5pbXBvcnQgeyBjb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vY2tzIiwgInByb2dyZXNzaW9uIiwgImxlbmd0aCIsICJ2bWluIiwgInZtYXgiLCAidiIsICJpbnRlZ2VyUGFydCIsICJmcmFjdGlvbmFsUGFydCIsICJpIiwgInBlcmNlbnRDaGFuZ2UiLCAicmVuZGVyU3RhdHVzSW5kaWNhdG9yIiwgIm51bSIsICJyZXMiLCAiZ2V0SW5wdXQiLCAicmF3TWV0YWZpbGVzIiwgImdldFNpbmdsZUlucHV0IiwgIm5hbWUiLCAicnVuIiwgImlucHV0IiwgInJlcG9ydCIsICJjb21wYXJlIiwgInBhdGhUb0ZpbGVVUkwiXQp9Cg== +`,e}function Rs(n,t){return`\${{\\color{Goldenrod}{ ${Cn(n/100)} }}}$ ${n.toFixed(1)}%, ${Te(t)}`}var Fs=["","\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u2588"],ve=1/(Fs.length-1);function Cn(n,t=25,e=0,s=1){let i=n*t,r=Math.floor(i),o=i-r,h=Math.round(ve*Math.floor(o/ve)/ve);return"\u2588".repeat(r)+Fs[h]}function Ds(n){return Te(n.bytes)}function An(n,t){if(n.remark==="deleted")return"\u{1F5D1}\uFE0F Deleted";if(n.remark==="added")return"\u{1F195} Added";let e=n.bytes-n.baseBytes;if(e!==0){let s=e/n.baseBytes*100;return`${Rn(s,t)}${Te(e)} (${Ns(s)}${s.toFixed(1)}%)`}return"\u2705 No change"}function Ns(n){return n<0?"":"+"}function Rn(n,t){let e;return n>0&&n=t?e="\u203C\uFE0F":e="\u2705 ",`${e} ${Ns(n)}`}function Mn(){let n=K("metafiles");if(!n)throw new Error("metafiles is not specified");let t=K("name");if(!t)throw new Error("name is not specified");return{percentExtraAttention:Number.parseInt(K("percent_extra_attention")||"20",10),showDetails:["true","True","TRUE"].includes(K("show_details")||"true"),showNoChange:["true","True","TRUE"].includes(K("show_no_change")||"true"),topNLargestPaths:Number.parseInt(K("top_n_largest_paths")||"20",10),includeExtensions:(K("include_extensions")||".js,.mjs,.cjs").split(","),name:t,analyzerDirectory:K("analyze_directory")||".analyzer",metafiles:n.split(",")}}function On(n=Mn()){Cs(n),ks(n)}import.meta.url===kn(process.argv[1]).href&&On();export{On as run}; +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2luZGV4LnRzIiwgIi4uL3NyYy9jb21wYXJlLnRzIiwgIi4uL3NyYy9yZXBvcnQudHMiLCAiLi4vc3JjL3V0aWxzLnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJpbXBvcnQgeyBwYXRoVG9GaWxlVVJMIH0gZnJvbSBcIm5vZGU6dXJsXCI7XG5pbXBvcnQgeyBjb21wYXJlIH0gZnJvbSBcIi4vY29tcGFyZVwiO1xuaW1wb3J0IHsgcmVwb3J0IH0gZnJvbSBcIi4vcmVwb3J0XCI7XG5pbXBvcnQgdHlwZSB7IElucHV0IH0gZnJvbSBcIi4vdHlwZXNcIjtcbmltcG9ydCB7IGdldFNpbmdsZUlucHV0IH0gZnJvbSBcIi4vdXRpbHNcIjtcblxuZnVuY3Rpb24gZ2V0SW5wdXQoKTogSW5wdXQge1xuXHRjb25zdCByYXdNZXRhZmlsZXMgPSBnZXRTaW5nbGVJbnB1dChcIm1ldGFmaWxlc1wiKTtcblx0aWYgKCFyYXdNZXRhZmlsZXMpIHtcblx0XHR0aHJvdyBuZXcgRXJyb3IoXCJtZXRhZmlsZXMgaXMgbm90IHNwZWNpZmllZFwiKTtcblx0fVxuXHRjb25zdCBuYW1lID0gZ2V0U2luZ2xlSW5wdXQoXCJuYW1lXCIpO1xuXHRpZiAoIW5hbWUpIHtcblx0XHR0aHJvdyBuZXcgRXJyb3IoXCJuYW1lIGlzIG5vdCBzcGVjaWZpZWRcIik7XG5cdH1cblx0cmV0dXJuIHtcblx0XHRwZXJjZW50RXh0cmFBdHRlbnRpb246IE51bWJlci5wYXJzZUludChcblx0XHRcdGdldFNpbmdsZUlucHV0KFwicGVyY2VudF9leHRyYV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