sonda 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.cjs +13 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.html +2 -2
- package/dist/index.js +13 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -265,8 +265,8 @@ function generateJsonReport(assets, inputs, options) {
|
|
|
265
265
|
return carry;
|
|
266
266
|
}, {});
|
|
267
267
|
return {
|
|
268
|
-
inputs,
|
|
269
|
-
outputs
|
|
268
|
+
inputs: sortObjectKeys(inputs),
|
|
269
|
+
outputs: sortObjectKeys(outputs)
|
|
270
270
|
};
|
|
271
271
|
}
|
|
272
272
|
function generateHtmlReport(assets, inputs, options) {
|
|
@@ -288,17 +288,24 @@ function processAsset(asset, inputs, options) {
|
|
|
288
288
|
mapped.sources = mapped.sources.map((source)=>normalizePath(source));
|
|
289
289
|
const assetSizes = getSizes(code, options);
|
|
290
290
|
const bytes = getBytesPerSource(code, mapped, assetSizes, options);
|
|
291
|
+
const outputInputs = Array.from(bytes).reduce((carry, [source, sizes])=>{
|
|
292
|
+
carry[normalizePath(source)] = sizes;
|
|
293
|
+
return carry;
|
|
294
|
+
}, {});
|
|
291
295
|
return {
|
|
292
296
|
...assetSizes,
|
|
293
|
-
inputs:
|
|
294
|
-
carry[normalizePath(source)] = sizes;
|
|
295
|
-
return carry;
|
|
296
|
-
}, {})
|
|
297
|
+
inputs: sortObjectKeys(outputInputs)
|
|
297
298
|
};
|
|
298
299
|
}
|
|
299
300
|
function hasCodeAndMap(result) {
|
|
300
301
|
return Boolean(result && result.code && result.map);
|
|
301
302
|
}
|
|
303
|
+
function sortObjectKeys(object) {
|
|
304
|
+
return Object.keys(object).sort().reduce((carry, key)=>{
|
|
305
|
+
carry[key] = object[key];
|
|
306
|
+
return carry;
|
|
307
|
+
}, {});
|
|
308
|
+
}
|
|
302
309
|
|
|
303
310
|
async function generateReportFromAssets(assets, inputs, userOptions) {
|
|
304
311
|
const options = normalizeOptions(userOptions);
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../load-source-map/dist/index.js","../src/utils.ts","../src/sourcemap/map.ts","../src/sourcemap/bytes.ts","../src/report.ts","../src/report/generate.ts","../src/bundlers/esbuild.ts","../src/bundlers/rollup.ts","../src/bundlers/webpack.ts"],"sourcesContent":["import { existsSync, readFileSync } from 'fs';\nimport { join, dirname, isAbsolute, resolve } from 'path';\n\n/**\n * Strip any JSON XSSI avoidance prefix from the string (as documented in the source maps specification),\n * and parses the string as JSON.\n *\n * https://github.com/mozilla/source-map/blob/3cb92cc3b73bfab27c146bae4ef2bc09dbb4e5ed/lib/util.js#L162-L164\n */ function parseSourceMapInput(str) {\n return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, \"\"));\n}\n/**\n\tsourceMappingURL=data:application/json;charset=utf-8;base64,data\n\tsourceMappingURL=data:application/json;base64,data\n\tsourceMappingURL=data:application/json;uri,data\n\tsourceMappingURL=map-file-comment.css.map\n\tsourceMappingURL=map-file-comment.css.map?query=value\n*/ const sourceMappingRegExp = /[@#]\\s*sourceMappingURL=(\\S+)\\b/g;\nfunction loadCodeAndMap(codePath) {\n if (!existsSync(codePath)) {\n return null;\n }\n const code = readFileSync(codePath, 'utf-8');\n const extractedComment = code.includes('sourceMappingURL') && Array.from(code.matchAll(sourceMappingRegExp)).at(-1);\n if (!extractedComment || !extractedComment.length) {\n return {\n code\n };\n }\n const maybeMap = loadMap(codePath, extractedComment[1]);\n if (!maybeMap) {\n return {\n code\n };\n }\n const { map, mapPath } = maybeMap;\n map.sources = normalizeSourcesPaths(map, mapPath);\n map.sourcesContent = loadMissingSourcesContent(map);\n delete map.sourceRoot;\n return {\n code,\n map\n };\n}\nfunction loadMap(codePath, sourceMappingURL) {\n if (sourceMappingURL.startsWith('data:')) {\n const map = parseDataUrl(sourceMappingURL);\n return {\n map: parseSourceMapInput(map),\n mapPath: codePath\n };\n }\n const sourceMapFilename = new URL(sourceMappingURL, 'file://').pathname;\n const mapPath = join(dirname(codePath), sourceMapFilename);\n if (!existsSync(mapPath)) {\n return null;\n }\n return {\n map: parseSourceMapInput(readFileSync(mapPath, 'utf-8')),\n mapPath\n };\n}\nfunction parseDataUrl(url) {\n const [prefix, payload] = url.split(',');\n const encoding = prefix.split(';').at(-1);\n switch(encoding){\n case 'base64':\n return Buffer.from(payload, 'base64').toString();\n case 'uri':\n return decodeURIComponent(payload);\n default:\n throw new Error('Unsupported source map encoding: ' + encoding);\n }\n}\n/**\n * Normalize the paths of the sources in the source map to be absolute paths.\n */ function normalizeSourcesPaths(map, mapPath) {\n const mapDir = dirname(mapPath);\n return map.sources.map((source)=>{\n if (!source) {\n return source;\n }\n return isAbsolute(source) ? source : resolve(mapDir, map.sourceRoot ?? '.', source);\n });\n}\n/**\n * Loop through the sources and try to load missing `sourcesContent` from the file system.\n */ function loadMissingSourcesContent(map) {\n return map.sources.map((source, index)=>{\n if (map.sourcesContent?.[index]) {\n return map.sourcesContent[index];\n }\n if (source && existsSync(source)) {\n return readFileSync(source, 'utf-8');\n }\n return null;\n });\n}\n\nexport { loadCodeAndMap };\n//# sourceMappingURL=index.js.map\n","import { relative, win32, posix } from 'path';\nimport type { Options } from './types';\n\nexport const esmRegex: RegExp = /\\.m[tj]sx?$/;\nexport const cjsRegex: RegExp = /\\.c[tj]sx?$/;\nexport const jsRegexp: RegExp = /\\.[cm]?[tj]s[x]?$/;\n\nexport function normalizeOptions( options?: Partial<Options> ) {\n\tconst defaultOptions: Options = {\n\t\topen: true,\n\t\tformat: 'html',\n\t\tdetailed: false,\n\t\tgzip: false,\n\t\tbrotli: false,\n\t};\n\n\treturn Object.assign( {}, defaultOptions, options ) as Options;\n}\n\nexport function normalizePath( pathToNormalize: string ): string {\n\t// Unicode escape sequences used by Rollup and Vite to identify virtual modules\n\tconst normalized = pathToNormalize.replace( /^\\0/, '' )\n\n\t// Transform absolute paths to relative paths\n\tconst relativized = relative( process.cwd(), normalized );\n\n\t// Ensure paths are POSIX-compliant - https://stackoverflow.com/a/63251716/4617687\n\treturn relativized.replaceAll( win32.sep, posix.sep );\n}\n","import { default as remapping, type DecodedSourceMap, type EncodedSourceMap } from '@ampproject/remapping';\nimport { loadCodeAndMap } from 'load-source-map';\nimport { resolve } from 'path';\nimport { normalizePath } from '../utils';\nimport type { CodeMap, ReportInput } from '../types';\n\nexport function mapSourceMap(\n\tmap: EncodedSourceMap,\n\tdirPath: string,\n\tinputs: Record<string, ReportInput>\n): DecodedSourceMap {\n\tconst alreadyRemapped = new Set<string>();\n\tconst remapped = remapping( map, ( file, ctx ) => {\n\t\tif ( alreadyRemapped.has( file ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\talreadyRemapped.add( file );\n\n\t\tconst codeMap = addSourcesToInputs(\n\t\t\tresolve( dirPath, file ),\n\t\t\tinputs\n\t\t);\n\n\t\tif ( !codeMap ) {\n\t\t\treturn;\n\t\t}\n\n\t\tctx.content ??= codeMap.code;\n\n\t\treturn codeMap.map;\n\t}, { decodedMappings: true } );\n\n\treturn remapped as DecodedSourceMap;\n}\n\n/**\n * Loads the source map of a given file and adds its \"sources\" to the given inputs object.\n */\nexport function addSourcesToInputs(\n\tpath: string,\n\tinputs: Record<string, ReportInput>\n): CodeMap | null {\n\tconst codeMap = loadCodeAndMap( path );\n\n\tif ( !codeMap ) {\n\t\treturn null;\n\t}\n\n\tconst parentPath = normalizePath( path );\n\tconst format = inputs[ parentPath ]?.format ?? 'unknown';\n\n\tcodeMap.map?.sources\n\t\t.filter( source => source !== null )\n\t\t.forEach( ( source, index ) => {\n\t\t\tconst normalizedPath = normalizePath( source );\n\n\t\t\tif ( parentPath === normalizedPath ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tinputs[ normalizedPath ] = {\n\t\t\t\tbytes: Buffer.byteLength( codeMap.map!.sourcesContent?.[ index ] ?? '' ),\n\t\t\t\tformat,\n\t\t\t\timports: [],\n\t\t\t\tbelongsTo: parentPath\n\t\t\t};\n\t\t} );\n\t\n\treturn codeMap;\n}\n","import { gzipSync, brotliCompressSync } from 'zlib';\nimport type { DecodedSourceMap, SourceMapSegment } from '@ampproject/remapping';\nimport type { Options, Sizes } from '../types';\n\nconst UNASSIGNED = '[unassigned]';\n\nexport function getBytesPerSource(\n\tcode: string,\n\tmap: DecodedSourceMap,\n\tassetSizes: Sizes,\n\toptions: Options\n): Map<string, Sizes> {\n\tconst contributions = getContributions( map.sources );\n\n\t// Split the code into lines\n\tconst codeLines = code.split( /(?<=\\r?\\n)/ );\n\n\tfor ( let lineIndex = 0; lineIndex < codeLines.length; lineIndex++ ) {\n\t\tconst lineCode = codeLines[ lineIndex ];\n\t\tconst mappings = map.mappings[ lineIndex ] || [];\n\t\tlet currentColumn = 0;\n\n\t\tfor ( let i = 0; i <= mappings.length; i++ ) {\n\t\t\t// 0: generatedColumn\n\t\t\t// 1: sourceIndex\n\t\t\t// 2: originalLine\n\t\t\t// 3: originalColumn\n\t\t\t// 4: nameIndex\n\n\t\t\tconst mapping: SourceMapSegment | undefined = mappings[ i ];\n\t\t\tconst startColumn = mapping?.[ 0 ] ?? lineCode.length;\n\t\t\tconst endColumn = mappings[ i + 1 ]?.[ 0 ] ?? lineCode.length;\n\n\t\t\t// Slice the code from currentColumn to startColumn for unassigned code\n\t\t\tif ( startColumn > currentColumn ) {\n\t\t\t\tcontributions.set( UNASSIGNED, contributions.get( UNASSIGNED ) + lineCode.slice( currentColumn, startColumn ) );\n\t\t\t}\n\n\t\t\tif ( mapping ) {\n\t\t\t\t// Slice the code from startColumn to endColumn for assigned code\n\t\t\t\tconst sourceIndex = mapping?.[ 1 ];\n\t\t\t\tconst codeSlice = lineCode.slice( startColumn, endColumn );\n\t\t\t\tconst source = sourceIndex !== undefined ? map.sources[ sourceIndex ]! : UNASSIGNED;\n\n\t\t\t\tcontributions.set( source, contributions.get( source ) + codeSlice );\n\t\t\t\tcurrentColumn = endColumn;\n\t\t\t} else {\n\t\t\t\tcurrentColumn = startColumn;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compute sizes for each source\n\tconst sourceSizes = new Map<string, Sizes>();\n\n\tconst contributionsSum: Sizes = {\n\t\tuncompressed: 0,\n\t\tgzip: 0,\n\t\tbrotli: 0\n\t};\n\n\tfor ( const [ source, codeSegment ] of contributions ) {\n\t\tconst sizes = getSizes( codeSegment, options );\n\n\t\tcontributionsSum.uncompressed += sizes.uncompressed;\n\t\tcontributionsSum.gzip += sizes.gzip;\n\t\tcontributionsSum.brotli += sizes.brotli;\n\n\t\tsourceSizes.set( source, sizes );\n\t}\n\n\treturn adjustSizes( sourceSizes, assetSizes, contributionsSum, options );\n}\n\nexport function getSizes(\n\tcode: string,\n\toptions: Options\n): Sizes {\n\treturn {\n\t\tuncompressed: Buffer.byteLength( code ),\n\t\tgzip: options.gzip ? gzipSync( code ).length : 0,\n\t\tbrotli: options.brotli ? brotliCompressSync( code ).length : 0\n\t};\n}\n\nfunction getContributions( sources: Array<string | null> ): Map<string, string> {\n\tconst contributions = new Map<string, string>();\n\n\t// Populate contributions with sources\n\tsources\n\t\t.filter( source => source !== null )\n\t\t.forEach( source => contributions.set( source, '' ) );\n\n\t// Add entry for the code that is not assigned to any source\n\tcontributions.set( UNASSIGNED, '' );\n\n\treturn contributions;\n}\n\n/**\n * Compression efficiency improves with the size of the file.\n *\n * However, what we have is the compressed size of the entire bundle (`actual`),\n * the sum of all files compressed individually (`sum`) and the compressed\n * size of a given file (`content`). The last value is essentially a “worst-case”\n * scenario, and the actual size of the file in the bundle is likely to be smaller.\n *\n * We use this information to estimate the actual size of the file in the bundle\n * after compression.\n */\nfunction adjustSizes(\n\tsources: Map<string, Sizes>,\n\tasset: Sizes,\n\tsums: Sizes,\n\toptions: Options\n): Map<string, Sizes> {\n\tconst gzipDelta = options.gzip ? asset.gzip / sums.gzip : 0;\n\tconst brotliDelta = options.brotli ? asset.brotli / sums.brotli : 0;\n\n\tfor ( const [ source, sizes ] of sources ) {\n\t\tsources.set( source, {\n\t\t\tuncompressed: sizes.uncompressed,\n\t\t\tgzip: options.gzip ? Math.round( sizes.gzip * gzipDelta ) : 0,\n\t\t\tbrotli: options.brotli ? Math.round( sizes.brotli * brotliDelta ) : 0\n\t\t} );\n\t}\n\n\treturn sources;\n}\n","import { readFileSync } from 'fs';\nimport { fileURLToPath } from 'url';\nimport { dirname, resolve } from 'path';\nimport { loadCodeAndMap } from 'load-source-map';\nimport { decode } from '@jridgewell/sourcemap-codec';\nimport { mapSourceMap } from './sourcemap/map.js';\nimport { getBytesPerSource, getSizes } from './sourcemap/bytes.js';\nimport type {\n JsonReport,\n MaybeCodeMap,\n ReportInput,\n ReportOutput,\n CodeMap,\n ReportOutputInput,\n Options\n} from './types.js';\nimport { normalizePath } from './utils.js';\n\nexport function generateJsonReport(\n assets: Array<string>,\n inputs: Record<string, ReportInput>,\n options: Options\n): JsonReport {\n const outputs = assets\n .filter( asset => !asset.endsWith( '.map' ) )\n .reduce( ( carry, asset ) => {\n const data = processAsset( asset, inputs, options );\n\n if ( data ) {\n carry[ normalizePath( asset ) ] = data;\n }\n\n return carry;\n }, {} as Record<string, ReportOutput> );\n\n return {\n inputs,\n outputs\n };\n}\n\nexport function generateHtmlReport(\n assets: Array<string>,\n inputs: Record<string, ReportInput>,\n options: Options\n): string {\n const json = generateJsonReport( assets, inputs, options );\n const __dirname = dirname( fileURLToPath( import.meta.url ) );\n const template = readFileSync( resolve( __dirname, './index.html' ), 'utf-8' );\n\n return template.replace( '__REPORT_DATA__', JSON.stringify( json ) );\n}\n\nfunction processAsset(\n asset: string,\n inputs: Record<string, ReportInput>,\n options: Options\n): ReportOutput | void {\n const maybeCodeMap = loadCodeAndMap( asset );\n\n if ( !hasCodeAndMap( maybeCodeMap ) ) {\n return;\n }\n\n const { code, map } = maybeCodeMap;\n const mapped = options.detailed\n ? mapSourceMap( map, dirname( asset ), inputs )\n : { ...map, mappings: decode( map.mappings ) };\n\n mapped.sources = mapped.sources.map( source => normalizePath( source! ) );\n\n const assetSizes = getSizes( code, options );\n const bytes = getBytesPerSource( code, mapped, assetSizes, options );\n\n return {\n ...assetSizes,\n inputs: Array.from( bytes ).reduce( ( carry, [ source, sizes ] ) => {\n carry[ normalizePath( source ) ] = sizes;\n\n return carry;\n }, {} as Record<string, ReportOutputInput> )\n };\n}\n\nfunction hasCodeAndMap( result: MaybeCodeMap ): result is Required<CodeMap> {\n return Boolean( result && result.code && result.map );\n}\n","import { join } from 'path';\nimport { writeFileSync } from 'fs';\nimport { generateHtmlReport, generateJsonReport } from '../report.js';\nimport type { Options, JsonReport } from '../types.js';\nimport { normalizeOptions } from '../utils.js';\n\nexport async function generateReportFromAssets(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\tuserOptions: Partial<Options>\n): Promise<void> {\n\tconst options = normalizeOptions( userOptions );\n\tconst handler = options.format === 'html' ? saveHtml : saveJson;\n\tconst path = handler( assets, inputs, options );\n\n\tif ( !options.open || !path ) {\n\t\treturn;\n\t}\n\n\t/**\n\t * `open` is ESM-only package, so we need to import it\n\t * dynamically to make it work in CommonJS environment.\n\t */\n\tconst { default: open } = await import( 'open' );\n\n\topen( path );\n}\n\nfunction saveHtml(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\toptions: Options\n): string | null {\n\tconst report = generateHtmlReport( assets, inputs, options );\n\tconst path = join( process.cwd(), 'sonda-report.html' );\n\n\twriteFileSync( path, report );\n\n\treturn path;\n}\n\nfunction saveJson(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\toptions: Options\n): string | null {\n\tconst report = generateJsonReport( assets, inputs, options );\n\tconst path = join( process.cwd(), 'sonda-report.json' );\n\n\twriteFileSync( path, JSON.stringify( report, null, 2 ) );\n\n\treturn path;\n}\n","import { resolve } from 'path';\nimport { addSourcesToInputs } from '../sourcemap/map';\nimport { generateReportFromAssets } from '../report/generate';\nimport type { Plugin } from 'esbuild';\nimport type { Options, JsonReport } from '../types';\n\nexport function SondaEsbuildPlugin( options: Partial<Options> = {} ): Plugin {\n\treturn {\n\t\tname: 'sonda',\n\t\tsetup( build ) {\n\t\t\tbuild.initialOptions.metafile = true;\n\n\t\t\t// Esbuild already reads the existing source maps, so there's no need to do it again\n\t\t\toptions.detailed = false;\n\n\t\t\tbuild.onEnd( result => {\n\t\t\t\tif ( !result.metafile ) {\n\t\t\t\t\treturn console.error( 'Metafile is required for SondaEsbuildPlugin to work.' );\n\t\t\t\t}\n\n\t\t\t\tconst cwd = process.cwd();\n\t\t\t\tconst inputs = Object\n\t\t\t\t\t.entries( result.metafile.inputs )\n\t\t\t\t\t.reduce( ( acc, [ path, data ] ) => {\n\t\t\t\t\t\tacc[ path ] = {\n\t\t\t\t\t\t\tbytes: data.bytes,\n\t\t\t\t\t\t\tformat: data.format ?? 'unknown',\n\t\t\t\t\t\t\timports: data.imports.map( data => data.path ),\n\t\t\t\t\t\t\tbelongsTo: null,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Because esbuild already reads the existing source maps, there may be\n\t\t\t\t\t\t * cases where some report \"outputs\" include \"inputs\" don't exist in the\n\t\t\t\t\t\t * main \"inputs\" object. To avoid this, we parse each esbuild input and\n\t\t\t\t\t\t * add its sources to the \"inputs\" object.\n\t\t\t\t\t\t */\n\t\t\t\t\t\taddSourcesToInputs(\n\t\t\t\t\t\t\tresolve( cwd, path ),\n\t\t\t\t\t\t\tacc\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}, {} as JsonReport[ 'inputs' ] );\n\n\t\t\t\treturn generateReportFromAssets(\n\t\t\t\t\tObject.keys( result.metafile.outputs ).map( path => resolve( cwd, path ) ),\n\t\t\t\t\tinputs,\n\t\t\t\t\toptions\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\t};\n}\n","import { join, resolve, dirname } from 'path';\nimport { normalizePath, cjsRegex, jsRegexp } from '../utils.js';\nimport { generateReportFromAssets } from '../report/generate.js';\nimport type { Options, ModuleFormat, JsonReport } from '../types.js';\nimport type { Plugin, ModuleInfo, NormalizedOutputOptions, OutputBundle } from 'rollup';\n\nexport function SondaRollupPlugin( options: Partial<Options> = {} ): Plugin {\n\tlet inputs: JsonReport[ 'inputs' ] = {};\n\n\treturn {\n\t\tname: 'sonda',\n\n\t\twriteBundle(\n\t\t\t{ dir, file }: NormalizedOutputOptions,\n\t\t\tbundle: OutputBundle\n\t\t) {\n\t\t\tconst outputDir = resolve( process.cwd(), dir ?? dirname( file! ) );\n\t\t\tconst assets = Object.keys( bundle ).map( name => join( outputDir, name ) );\n\n\t\t\treturn generateReportFromAssets(\n\t\t\t\tassets,\n\t\t\t\tinputs,\n\t\t\t\toptions\n\t\t\t);\n\t\t},\n\n\t\tmoduleParsed( module: ModuleInfo ) {\n\t\t\tinputs[ normalizePath( module.id ) ] = {\n\t\t\t\tbytes: module.code ? Buffer.byteLength( module.code ) : 0,\n\t\t\t\tformat: getFormat( module.id, module.meta.commonjs?.isCommonJS ),\n\t\t\t\timports: module.importedIds.map( id => normalizePath( id ) ),\n\t\t\t\tbelongsTo: null,\n\t\t\t};\n\t\t}\n\t};\n}\n\nfunction getFormat( moduleId: string, isCommonJS: boolean | undefined ): ModuleFormat {\n\tif ( isCommonJS === true || cjsRegex.test( moduleId ) ) {\n\t\treturn 'cjs';\n\t}\n\n\tif ( isCommonJS === false || jsRegexp.test( moduleId ) ) {\n\t\treturn 'esm';\n\t}\n\n\treturn'unknown';\n}\n","import { join } from 'path';\nimport { normalizePath, jsRegexp } from '../utils';\nimport { generateReportFromAssets } from '../report/generate';\nimport type { Compiler, StatsModule } from 'webpack';\nimport type { Options, ModuleFormat, JsonReport } from '../types';\n\nexport class SondaWebpackPlugin {\n\toptions: Partial<Options>;\n\n\tconstructor ( options: Partial<Options> = {} ) {\n\t\tthis.options = options;\n\t}\n\n\tapply( compiler: Compiler ): void {\n\t\tcompiler.options.output.devtoolModuleFilenameTemplate = '[absolute-resource-path]';\n\n\t\tcompiler.hooks.afterEmit.tapPromise( 'SondaWebpackPlugin', compilation => {\n\t\t\tconst inputs: JsonReport[ 'inputs' ] = {};\n\t\t\tconst stats = compilation.getStats().toJson( {\n\t\t\t\tmodules: true,\n\t\t\t\tprovidedExports: true,\n\t\t\t} );\n\n\t\t\tconst outputPath = stats.outputPath || compiler.outputPath;\n\t\t\tconst modules: Array<StatsModule> = stats.modules\n\t\t\t\t?.flatMap( mod => mod.modules ? [ mod, ...mod.modules ] : mod )\n\t\t\t\t.filter( mod => mod.nameForCondition && !mod.codeGenerated )\n\t\t\t\t.filter( ( mod, index, self ) => self.findIndex( m => m.nameForCondition === mod.nameForCondition ) === index )\n\t\t\t\t|| [];\n\n\t\t\tmodules.forEach( module => {\n\t\t\t\tconst imports = modules.reduce( ( acc, { nameForCondition, issuerName, reasons } ) => {\n\t\t\t\t\tif ( issuerName === module.name || reasons?.some( reason => reason.resolvedModule === module.name ) ) {\n\t\t\t\t\t\tacc.push( normalizePath( nameForCondition! ) );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn acc;\n\t\t\t\t}, [] as Array<string> );\n\n\t\t\t\tinputs[ normalizePath( module.nameForCondition! ) ] = {\n\t\t\t\t\tbytes: module.size || 0,\n\t\t\t\t\tformat: getFormat( module ),\n\t\t\t\t\timports,\n\t\t\t\t\tbelongsTo: null\n\t\t\t\t};\n\t\t\t} );\n\n\t\t\treturn generateReportFromAssets(\n\t\t\t\tstats.assets?.map( asset => join( outputPath, asset.name ) ) || [],\n\t\t\t\tinputs,\n\t\t\t\tthis.options\n\t\t\t);\n\t\t} );\n\t}\n}\n\nfunction getFormat( module: StatsModule ): ModuleFormat {\n\tif ( !jsRegexp.test( module.nameForCondition! ) ) {\n\t\treturn 'unknown';\n\t}\n\n\t/**\n\t * Sometimes ESM modules have `moduleType` set as `javascript/auto`, so we\n\t * also need to check if the module has exports to determine if it's ESM.\n\t */\n\tif ( module.moduleType === 'javascript/esm' || !!module.providedExports?.length ) {\n\t\treturn 'esm';\n\t}\n\n\treturn 'cjs';\n}\n"],"names":["parseSourceMapInput","str","JSON","parse","replace","sourceMappingRegExp","loadCodeAndMap","codePath","existsSync","code","readFileSync","extractedComment","includes","Array","from","matchAll","at","length","maybeMap","loadMap","map","mapPath","sources","normalizeSourcesPaths","sourcesContent","loadMissingSourcesContent","sourceRoot","sourceMappingURL","startsWith","parseDataUrl","sourceMapFilename","URL","pathname","join","dirname","url","prefix","payload","split","encoding","Buffer","toString","decodeURIComponent","Error","mapDir","source","isAbsolute","resolve","index","cjsRegex","jsRegexp","normalizeOptions","options","defaultOptions","open","format","detailed","gzip","brotli","Object","assign","normalizePath","pathToNormalize","normalized","relativized","relative","process","cwd","replaceAll","win32","sep","posix","mapSourceMap","dirPath","inputs","alreadyRemapped","Set","remapped","remapping","file","ctx","has","add","codeMap","addSourcesToInputs","content","decodedMappings","path","parentPath","filter","forEach","normalizedPath","bytes","byteLength","imports","belongsTo","UNASSIGNED","getBytesPerSource","assetSizes","contributions","getContributions","codeLines","lineIndex","lineCode","mappings","currentColumn","i","mapping","startColumn","endColumn","set","get","slice","sourceIndex","codeSlice","undefined","sourceSizes","Map","contributionsSum","uncompressed","codeSegment","sizes","getSizes","adjustSizes","gzipSync","brotliCompressSync","asset","sums","gzipDelta","brotliDelta","Math","round","generateJsonReport","assets","outputs","endsWith","reduce","carry","data","processAsset","generateHtmlReport","json","__dirname","fileURLToPath","template","stringify","maybeCodeMap","hasCodeAndMap","mapped","decode","result","Boolean","generateReportFromAssets","userOptions","handler","saveHtml","saveJson","default","report","writeFileSync","SondaEsbuildPlugin","name","setup","build","initialOptions","metafile","onEnd","console","error","entries","acc","keys","SondaRollupPlugin","writeBundle","dir","bundle","outputDir","moduleParsed","module","id","getFormat","meta","commonjs","isCommonJS","importedIds","moduleId","test","SondaWebpackPlugin","apply","compiler","output","devtoolModuleFilenameTemplate","hooks","afterEmit","tapPromise","compilation","stats","getStats","toJson","modules","providedExports","outputPath","flatMap","mod","nameForCondition","codeGenerated","self","findIndex","m","issuerName","reasons","some","reason","resolvedModule","push","size","constructor","moduleType"],"mappings":";;;;;;;;;;AAqBA;;;;;IAMA,SAASA,mBAAAA,CAAqBC,GAAW,EAAA;AACxC,IAAA,OAAOC,IAAKC,CAAAA,KAAK,CAAEF,GAAIG,CAAAA,OAAO,CAAE,gBAAkB,EAAA,EAAA,CAAA,CAAA,CAAA;AACnD,CAAA;AAEA;;;;;;AAMA,GACA,MAAMC,mBAAsB,GAAA,kCAAA,CAAA;AAErB,SAASC,cAAAA,CAAgBC,QAAgB,EAAA;AAC/C,IAAA,IAAK,CAACC,aAAAA,CAAYD,QAAa,CAAA,EAAA;AAC9B,QAAA,OAAO,IAAA,CAAA;KACR;AAEA,IAAA,MAAME,IAAAA,GAAOC,eAAAA,CAAcH,QAAU,EAAA,OAAA,CAAA,CAAA;IAErC,MAAMI,gBAAmBF,GAAAA,IAAAA,CAAKG,QAAQ,CAAE,kBAAwBC,CAAAA,IAAAA,KAAMC,CAAAA,IAAI,CAAEL,IAAAA,CAAKM,QAAQ,CAAEV,mBAAwBW,CAAAA,CAAAA,CAAAA,EAAE,CAAE,CAAC,CAAA,CAAA,CAAA;AAExH,IAAA,IAAK,CAACL,gBAAAA,IAAoB,CAACA,gBAAAA,CAAiBM,MAAM,EAAG;QACpD,OAAO;YAAER,IAAAA;AAAK,SAAA,CAAA;KACf;IAEA,MAAMS,QAAWC,GAAAA,OAAAA,CAASZ,QAAUI,EAAAA,gBAAgB,CAAE,CAAG,CAAA,CAAA,CAAA;IAEzD,IAAK,CAACO,QAAW,EAAA;QAChB,OAAO;YAAET,IAAAA;AAAK,SAAA,CAAA;KACf;AAEA,IAAA,MAAM,EAAEW,GAAG,EAAEC,OAAO,EAAE,GAAGH,QAAAA,CAAAA;IAEzBE,GAAIE,CAAAA,OAAO,G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MAAAA,CAAO0B,gBAAgB,CAAM,EAAA;QACjD,OAAO,SAAA,CAAA;AACR,KAAA;AAEA;;;KAIA,IAAK1B,MAAOuC,CAAAA,UAAU,KAAK,gBAAA,IAAoB,CAAC,CAACvC,MAAAA,CAAOsB,eAAe,EAAEvL,MAAS,EAAA;QACjF,OAAO,KAAA,CAAA;AACR,KAAA;IAEA,OAAO,KAAA,CAAA;AACR;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../load-source-map/dist/index.js","../src/utils.ts","../src/sourcemap/map.ts","../src/sourcemap/bytes.ts","../src/report.ts","../src/report/generate.ts","../src/bundlers/esbuild.ts","../src/bundlers/rollup.ts","../src/bundlers/webpack.ts"],"sourcesContent":["import { existsSync, readFileSync } from 'fs';\nimport { join, dirname, isAbsolute, resolve } from 'path';\n\n/**\n * Strip any JSON XSSI avoidance prefix from the string (as documented in the source maps specification),\n * and parses the string as JSON.\n *\n * https://github.com/mozilla/source-map/blob/3cb92cc3b73bfab27c146bae4ef2bc09dbb4e5ed/lib/util.js#L162-L164\n */ function parseSourceMapInput(str) {\n return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, \"\"));\n}\n/**\n\tsourceMappingURL=data:application/json;charset=utf-8;base64,data\n\tsourceMappingURL=data:application/json;base64,data\n\tsourceMappingURL=data:application/json;uri,data\n\tsourceMappingURL=map-file-comment.css.map\n\tsourceMappingURL=map-file-comment.css.map?query=value\n*/ const sourceMappingRegExp = /[@#]\\s*sourceMappingURL=(\\S+)\\b/g;\nfunction loadCodeAndMap(codePath) {\n if (!existsSync(codePath)) {\n return null;\n }\n const code = readFileSync(codePath, 'utf-8');\n const extractedComment = code.includes('sourceMappingURL') && Array.from(code.matchAll(sourceMappingRegExp)).at(-1);\n if (!extractedComment || !extractedComment.length) {\n return {\n code\n };\n }\n const maybeMap = loadMap(codePath, extractedComment[1]);\n if (!maybeMap) {\n return {\n code\n };\n }\n const { map, mapPath } = maybeMap;\n map.sources = normalizeSourcesPaths(map, mapPath);\n map.sourcesContent = loadMissingSourcesContent(map);\n delete map.sourceRoot;\n return {\n code,\n map\n };\n}\nfunction loadMap(codePath, sourceMappingURL) {\n if (sourceMappingURL.startsWith('data:')) {\n const map = parseDataUrl(sourceMappingURL);\n return {\n map: parseSourceMapInput(map),\n mapPath: codePath\n };\n }\n const sourceMapFilename = new URL(sourceMappingURL, 'file://').pathname;\n const mapPath = join(dirname(codePath), sourceMapFilename);\n if (!existsSync(mapPath)) {\n return null;\n }\n return {\n map: parseSourceMapInput(readFileSync(mapPath, 'utf-8')),\n mapPath\n };\n}\nfunction parseDataUrl(url) {\n const [prefix, payload] = url.split(',');\n const encoding = prefix.split(';').at(-1);\n switch(encoding){\n case 'base64':\n return Buffer.from(payload, 'base64').toString();\n case 'uri':\n return decodeURIComponent(payload);\n default:\n throw new Error('Unsupported source map encoding: ' + encoding);\n }\n}\n/**\n * Normalize the paths of the sources in the source map to be absolute paths.\n */ function normalizeSourcesPaths(map, mapPath) {\n const mapDir = dirname(mapPath);\n return map.sources.map((source)=>{\n if (!source) {\n return source;\n }\n return isAbsolute(source) ? source : resolve(mapDir, map.sourceRoot ?? '.', source);\n });\n}\n/**\n * Loop through the sources and try to load missing `sourcesContent` from the file system.\n */ function loadMissingSourcesContent(map) {\n return map.sources.map((source, index)=>{\n if (map.sourcesContent?.[index]) {\n return map.sourcesContent[index];\n }\n if (source && existsSync(source)) {\n return readFileSync(source, 'utf-8');\n }\n return null;\n });\n}\n\nexport { loadCodeAndMap };\n//# sourceMappingURL=index.js.map\n","import { relative, win32, posix } from 'path';\nimport type { Options } from './types';\n\nexport const esmRegex: RegExp = /\\.m[tj]sx?$/;\nexport const cjsRegex: RegExp = /\\.c[tj]sx?$/;\nexport const jsRegexp: RegExp = /\\.[cm]?[tj]s[x]?$/;\n\nexport function normalizeOptions( options?: Partial<Options> ) {\n\tconst defaultOptions: Options = {\n\t\topen: true,\n\t\tformat: 'html',\n\t\tdetailed: false,\n\t\tgzip: false,\n\t\tbrotli: false,\n\t};\n\n\treturn Object.assign( {}, defaultOptions, options ) as Options;\n}\n\nexport function normalizePath( pathToNormalize: string ): string {\n\t// Unicode escape sequences used by Rollup and Vite to identify virtual modules\n\tconst normalized = pathToNormalize.replace( /^\\0/, '' )\n\n\t// Transform absolute paths to relative paths\n\tconst relativized = relative( process.cwd(), normalized );\n\n\t// Ensure paths are POSIX-compliant - https://stackoverflow.com/a/63251716/4617687\n\treturn relativized.replaceAll( win32.sep, posix.sep );\n}\n","import { default as remapping, type DecodedSourceMap, type EncodedSourceMap } from '@ampproject/remapping';\nimport { loadCodeAndMap } from 'load-source-map';\nimport { resolve } from 'path';\nimport { normalizePath } from '../utils';\nimport type { CodeMap, ReportInput } from '../types';\n\nexport function mapSourceMap(\n\tmap: EncodedSourceMap,\n\tdirPath: string,\n\tinputs: Record<string, ReportInput>\n): DecodedSourceMap {\n\tconst alreadyRemapped = new Set<string>();\n\tconst remapped = remapping( map, ( file, ctx ) => {\n\t\tif ( alreadyRemapped.has( file ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\talreadyRemapped.add( file );\n\n\t\tconst codeMap = addSourcesToInputs(\n\t\t\tresolve( dirPath, file ),\n\t\t\tinputs\n\t\t);\n\n\t\tif ( !codeMap ) {\n\t\t\treturn;\n\t\t}\n\n\t\tctx.content ??= codeMap.code;\n\n\t\treturn codeMap.map;\n\t}, { decodedMappings: true } );\n\n\treturn remapped as DecodedSourceMap;\n}\n\n/**\n * Loads the source map of a given file and adds its \"sources\" to the given inputs object.\n */\nexport function addSourcesToInputs(\n\tpath: string,\n\tinputs: Record<string, ReportInput>\n): CodeMap | null {\n\tconst codeMap = loadCodeAndMap( path );\n\n\tif ( !codeMap ) {\n\t\treturn null;\n\t}\n\n\tconst parentPath = normalizePath( path );\n\tconst format = inputs[ parentPath ]?.format ?? 'unknown';\n\n\tcodeMap.map?.sources\n\t\t.filter( source => source !== null )\n\t\t.forEach( ( source, index ) => {\n\t\t\tconst normalizedPath = normalizePath( source );\n\n\t\t\tif ( parentPath === normalizedPath ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tinputs[ normalizedPath ] = {\n\t\t\t\tbytes: Buffer.byteLength( codeMap.map!.sourcesContent?.[ index ] ?? '' ),\n\t\t\t\tformat,\n\t\t\t\timports: [],\n\t\t\t\tbelongsTo: parentPath\n\t\t\t};\n\t\t} );\n\t\n\treturn codeMap;\n}\n","import { gzipSync, brotliCompressSync } from 'zlib';\nimport type { DecodedSourceMap, SourceMapSegment } from '@ampproject/remapping';\nimport type { Options, Sizes } from '../types';\n\nconst UNASSIGNED = '[unassigned]';\n\nexport function getBytesPerSource(\n\tcode: string,\n\tmap: DecodedSourceMap,\n\tassetSizes: Sizes,\n\toptions: Options\n): Map<string, Sizes> {\n\tconst contributions = getContributions( map.sources );\n\n\t// Split the code into lines\n\tconst codeLines = code.split( /(?<=\\r?\\n)/ );\n\n\tfor ( let lineIndex = 0; lineIndex < codeLines.length; lineIndex++ ) {\n\t\tconst lineCode = codeLines[ lineIndex ];\n\t\tconst mappings = map.mappings[ lineIndex ] || [];\n\t\tlet currentColumn = 0;\n\n\t\tfor ( let i = 0; i <= mappings.length; i++ ) {\n\t\t\t// 0: generatedColumn\n\t\t\t// 1: sourceIndex\n\t\t\t// 2: originalLine\n\t\t\t// 3: originalColumn\n\t\t\t// 4: nameIndex\n\n\t\t\tconst mapping: SourceMapSegment | undefined = mappings[ i ];\n\t\t\tconst startColumn = mapping?.[ 0 ] ?? lineCode.length;\n\t\t\tconst endColumn = mappings[ i + 1 ]?.[ 0 ] ?? lineCode.length;\n\n\t\t\t// Slice the code from currentColumn to startColumn for unassigned code\n\t\t\tif ( startColumn > currentColumn ) {\n\t\t\t\tcontributions.set( UNASSIGNED, contributions.get( UNASSIGNED ) + lineCode.slice( currentColumn, startColumn ) );\n\t\t\t}\n\n\t\t\tif ( mapping ) {\n\t\t\t\t// Slice the code from startColumn to endColumn for assigned code\n\t\t\t\tconst sourceIndex = mapping?.[ 1 ];\n\t\t\t\tconst codeSlice = lineCode.slice( startColumn, endColumn );\n\t\t\t\tconst source = sourceIndex !== undefined ? map.sources[ sourceIndex ]! : UNASSIGNED;\n\n\t\t\t\tcontributions.set( source, contributions.get( source ) + codeSlice );\n\t\t\t\tcurrentColumn = endColumn;\n\t\t\t} else {\n\t\t\t\tcurrentColumn = startColumn;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compute sizes for each source\n\tconst sourceSizes = new Map<string, Sizes>();\n\n\tconst contributionsSum: Sizes = {\n\t\tuncompressed: 0,\n\t\tgzip: 0,\n\t\tbrotli: 0\n\t};\n\n\tfor ( const [ source, codeSegment ] of contributions ) {\n\t\tconst sizes = getSizes( codeSegment, options );\n\n\t\tcontributionsSum.uncompressed += sizes.uncompressed;\n\t\tcontributionsSum.gzip += sizes.gzip;\n\t\tcontributionsSum.brotli += sizes.brotli;\n\n\t\tsourceSizes.set( source, sizes );\n\t}\n\n\treturn adjustSizes( sourceSizes, assetSizes, contributionsSum, options );\n}\n\nexport function getSizes(\n\tcode: string,\n\toptions: Options\n): Sizes {\n\treturn {\n\t\tuncompressed: Buffer.byteLength( code ),\n\t\tgzip: options.gzip ? gzipSync( code ).length : 0,\n\t\tbrotli: options.brotli ? brotliCompressSync( code ).length : 0\n\t};\n}\n\nfunction getContributions( sources: Array<string | null> ): Map<string, string> {\n\tconst contributions = new Map<string, string>();\n\n\t// Populate contributions with sources\n\tsources\n\t\t.filter( source => source !== null )\n\t\t.forEach( source => contributions.set( source, '' ) );\n\n\t// Add entry for the code that is not assigned to any source\n\tcontributions.set( UNASSIGNED, '' );\n\n\treturn contributions;\n}\n\n/**\n * Compression efficiency improves with the size of the file.\n *\n * However, what we have is the compressed size of the entire bundle (`actual`),\n * the sum of all files compressed individually (`sum`) and the compressed\n * size of a given file (`content`). The last value is essentially a “worst-case”\n * scenario, and the actual size of the file in the bundle is likely to be smaller.\n *\n * We use this information to estimate the actual size of the file in the bundle\n * after compression.\n */\nfunction adjustSizes(\n\tsources: Map<string, Sizes>,\n\tasset: Sizes,\n\tsums: Sizes,\n\toptions: Options\n): Map<string, Sizes> {\n\tconst gzipDelta = options.gzip ? asset.gzip / sums.gzip : 0;\n\tconst brotliDelta = options.brotli ? asset.brotli / sums.brotli : 0;\n\n\tfor ( const [ source, sizes ] of sources ) {\n\t\tsources.set( source, {\n\t\t\tuncompressed: sizes.uncompressed,\n\t\t\tgzip: options.gzip ? Math.round( sizes.gzip * gzipDelta ) : 0,\n\t\t\tbrotli: options.brotli ? Math.round( sizes.brotli * brotliDelta ) : 0\n\t\t} );\n\t}\n\n\treturn sources;\n}\n","import { readFileSync } from 'fs';\nimport { fileURLToPath } from 'url';\nimport { dirname, resolve } from 'path';\nimport { loadCodeAndMap } from 'load-source-map';\nimport { decode } from '@jridgewell/sourcemap-codec';\nimport { mapSourceMap } from './sourcemap/map.js';\nimport { getBytesPerSource, getSizes } from './sourcemap/bytes.js';\nimport type {\n JsonReport,\n MaybeCodeMap,\n ReportInput,\n ReportOutput,\n CodeMap,\n ReportOutputInput,\n Options\n} from './types.js';\nimport { normalizePath } from './utils.js';\n\nexport function generateJsonReport(\n assets: Array<string>,\n inputs: Record<string, ReportInput>,\n options: Options\n): JsonReport {\n const outputs = assets\n .filter( asset => !asset.endsWith( '.map' ) )\n .reduce( ( carry, asset ) => {\n const data = processAsset( asset, inputs, options );\n\n if ( data ) {\n carry[ normalizePath( asset ) ] = data;\n }\n\n return carry;\n }, {} as Record<string, ReportOutput> );\n\n return {\n inputs: sortObjectKeys( inputs ),\n outputs: sortObjectKeys( outputs )\n };\n}\n\nexport function generateHtmlReport(\n assets: Array<string>,\n inputs: Record<string, ReportInput>,\n options: Options\n): string {\n const json = generateJsonReport( assets, inputs, options );\n const __dirname = dirname( fileURLToPath( import.meta.url ) );\n const template = readFileSync( resolve( __dirname, './index.html' ), 'utf-8' );\n\n return template.replace( '__REPORT_DATA__', JSON.stringify( json ) );\n}\n\nfunction processAsset(\n asset: string,\n inputs: Record<string, ReportInput>,\n options: Options\n): ReportOutput | void {\n const maybeCodeMap = loadCodeAndMap( asset );\n\n if ( !hasCodeAndMap( maybeCodeMap ) ) {\n return;\n }\n\n const { code, map } = maybeCodeMap;\n const mapped = options.detailed\n ? mapSourceMap( map, dirname( asset ), inputs )\n : { ...map, mappings: decode( map.mappings ) };\n\n mapped.sources = mapped.sources.map( source => normalizePath( source! ) );\n\n const assetSizes = getSizes( code, options );\n const bytes = getBytesPerSource( code, mapped, assetSizes, options );\n const outputInputs = Array\n .from( bytes )\n .reduce( ( carry, [ source, sizes ] ) => {\n carry[ normalizePath( source ) ] = sizes;\n\n return carry;\n }, {} as Record<string, ReportOutputInput> );\n\n return {\n ...assetSizes,\n inputs: sortObjectKeys( outputInputs )\n };\n}\n\nfunction hasCodeAndMap( result: MaybeCodeMap ): result is Required<CodeMap> {\n return Boolean( result && result.code && result.map );\n}\n\nfunction sortObjectKeys<T extends unknown>( object: Record<string, T> ): Record<string, T> {\n return Object\n .keys( object )\n .sort()\n .reduce( ( carry, key ) => {\n carry[ key ] = object[ key ];\n\n return carry;\n }, {} as Record<string, T> );\n} \n","import { join } from 'path';\nimport { writeFileSync } from 'fs';\nimport { generateHtmlReport, generateJsonReport } from '../report.js';\nimport type { Options, JsonReport } from '../types.js';\nimport { normalizeOptions } from '../utils.js';\n\nexport async function generateReportFromAssets(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\tuserOptions: Partial<Options>\n): Promise<void> {\n\tconst options = normalizeOptions( userOptions );\n\tconst handler = options.format === 'html' ? saveHtml : saveJson;\n\tconst path = handler( assets, inputs, options );\n\n\tif ( !options.open || !path ) {\n\t\treturn;\n\t}\n\n\t/**\n\t * `open` is ESM-only package, so we need to import it\n\t * dynamically to make it work in CommonJS environment.\n\t */\n\tconst { default: open } = await import( 'open' );\n\n\topen( path );\n}\n\nfunction saveHtml(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\toptions: Options\n): string | null {\n\tconst report = generateHtmlReport( assets, inputs, options );\n\tconst path = join( process.cwd(), 'sonda-report.html' );\n\n\twriteFileSync( path, report );\n\n\treturn path;\n}\n\nfunction saveJson(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\toptions: Options\n): string | null {\n\tconst report = generateJsonReport( assets, inputs, options );\n\tconst path = join( process.cwd(), 'sonda-report.json' );\n\n\twriteFileSync( path, JSON.stringify( report, null, 2 ) );\n\n\treturn path;\n}\n","import { resolve } from 'path';\nimport { addSourcesToInputs } from '../sourcemap/map';\nimport { generateReportFromAssets } from '../report/generate';\nimport type { Plugin } from 'esbuild';\nimport type { Options, JsonReport } from '../types';\n\nexport function SondaEsbuildPlugin( options: Partial<Options> = {} ): Plugin {\n\treturn {\n\t\tname: 'sonda',\n\t\tsetup( build ) {\n\t\t\tbuild.initialOptions.metafile = true;\n\n\t\t\t// Esbuild already reads the existing source maps, so there's no need to do it again\n\t\t\toptions.detailed = false;\n\n\t\t\tbuild.onEnd( result => {\n\t\t\t\tif ( !result.metafile ) {\n\t\t\t\t\treturn console.error( 'Metafile is required for SondaEsbuildPlugin to work.' );\n\t\t\t\t}\n\n\t\t\t\tconst cwd = process.cwd();\n\t\t\t\tconst inputs = Object\n\t\t\t\t\t.entries( result.metafile.inputs )\n\t\t\t\t\t.reduce( ( acc, [ path, data ] ) => {\n\t\t\t\t\t\tacc[ path ] = {\n\t\t\t\t\t\t\tbytes: data.bytes,\n\t\t\t\t\t\t\tformat: data.format ?? 'unknown',\n\t\t\t\t\t\t\timports: data.imports.map( data => data.path ),\n\t\t\t\t\t\t\tbelongsTo: null,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Because esbuild already reads the existing source maps, there may be\n\t\t\t\t\t\t * cases where some report \"outputs\" include \"inputs\" don't exist in the\n\t\t\t\t\t\t * main \"inputs\" object. To avoid this, we parse each esbuild input and\n\t\t\t\t\t\t * add its sources to the \"inputs\" object.\n\t\t\t\t\t\t */\n\t\t\t\t\t\taddSourcesToInputs(\n\t\t\t\t\t\t\tresolve( cwd, path ),\n\t\t\t\t\t\t\tacc\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}, {} as JsonReport[ 'inputs' ] );\n\n\t\t\t\treturn generateReportFromAssets(\n\t\t\t\t\tObject.keys( result.metafile.outputs ).map( path => resolve( cwd, path ) ),\n\t\t\t\t\tinputs,\n\t\t\t\t\toptions\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\t};\n}\n","import { join, resolve, dirname } from 'path';\nimport { normalizePath, cjsRegex, jsRegexp } from '../utils.js';\nimport { generateReportFromAssets } from '../report/generate.js';\nimport type { Options, ModuleFormat, JsonReport } from '../types.js';\nimport type { Plugin, ModuleInfo, NormalizedOutputOptions, OutputBundle } from 'rollup';\n\nexport function SondaRollupPlugin( options: Partial<Options> = {} ): Plugin {\n\tlet inputs: JsonReport[ 'inputs' ] = {};\n\n\treturn {\n\t\tname: 'sonda',\n\n\t\twriteBundle(\n\t\t\t{ dir, file }: NormalizedOutputOptions,\n\t\t\tbundle: OutputBundle\n\t\t) {\n\t\t\tconst outputDir = resolve( process.cwd(), dir ?? dirname( file! ) );\n\t\t\tconst assets = Object.keys( bundle ).map( name => join( outputDir, name ) );\n\n\t\t\treturn generateReportFromAssets(\n\t\t\t\tassets,\n\t\t\t\tinputs,\n\t\t\t\toptions\n\t\t\t);\n\t\t},\n\n\t\tmoduleParsed( module: ModuleInfo ) {\n\t\t\tinputs[ normalizePath( module.id ) ] = {\n\t\t\t\tbytes: module.code ? Buffer.byteLength( module.code ) : 0,\n\t\t\t\tformat: getFormat( module.id, module.meta.commonjs?.isCommonJS ),\n\t\t\t\timports: module.importedIds.map( id => normalizePath( id ) ),\n\t\t\t\tbelongsTo: null,\n\t\t\t};\n\t\t}\n\t};\n}\n\nfunction getFormat( moduleId: string, isCommonJS: boolean | undefined ): ModuleFormat {\n\tif ( isCommonJS === true || cjsRegex.test( moduleId ) ) {\n\t\treturn 'cjs';\n\t}\n\n\tif ( isCommonJS === false || jsRegexp.test( moduleId ) ) {\n\t\treturn 'esm';\n\t}\n\n\treturn'unknown';\n}\n","import { join } from 'path';\nimport { normalizePath, jsRegexp } from '../utils';\nimport { generateReportFromAssets } from '../report/generate';\nimport type { Compiler, StatsModule } from 'webpack';\nimport type { Options, ModuleFormat, JsonReport } from '../types';\n\nexport class SondaWebpackPlugin {\n\toptions: Partial<Options>;\n\n\tconstructor ( options: Partial<Options> = {} ) {\n\t\tthis.options = options;\n\t}\n\n\tapply( compiler: Compiler ): void {\n\t\tcompiler.options.output.devtoolModuleFilenameTemplate = '[absolute-resource-path]';\n\n\t\tcompiler.hooks.afterEmit.tapPromise( 'SondaWebpackPlugin', compilation => {\n\t\t\tconst inputs: JsonReport[ 'inputs' ] = {};\n\t\t\tconst stats = compilation.getStats().toJson( {\n\t\t\t\tmodules: true,\n\t\t\t\tprovidedExports: true,\n\t\t\t} );\n\n\t\t\tconst outputPath = stats.outputPath || compiler.outputPath;\n\t\t\tconst modules: Array<StatsModule> = stats.modules\n\t\t\t\t?.flatMap( mod => mod.modules ? [ mod, ...mod.modules ] : mod )\n\t\t\t\t.filter( mod => mod.nameForCondition && !mod.codeGenerated )\n\t\t\t\t.filter( ( mod, index, self ) => self.findIndex( m => m.nameForCondition === mod.nameForCondition ) === index )\n\t\t\t\t|| [];\n\n\t\t\tmodules.forEach( module => {\n\t\t\t\tconst imports = modules.reduce( ( acc, { nameForCondition, issuerName, reasons } ) => {\n\t\t\t\t\tif ( issuerName === module.name || reasons?.some( reason => reason.resolvedModule === module.name ) ) {\n\t\t\t\t\t\tacc.push( normalizePath( nameForCondition! ) );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn acc;\n\t\t\t\t}, [] as Array<string> );\n\n\t\t\t\tinputs[ normalizePath( module.nameForCondition! ) ] = {\n\t\t\t\t\tbytes: module.size || 0,\n\t\t\t\t\tformat: getFormat( module ),\n\t\t\t\t\timports,\n\t\t\t\t\tbelongsTo: null\n\t\t\t\t};\n\t\t\t} );\n\n\t\t\treturn generateReportFromAssets(\n\t\t\t\tstats.assets?.map( asset => join( outputPath, asset.name ) ) || [],\n\t\t\t\tinputs,\n\t\t\t\tthis.options\n\t\t\t);\n\t\t} );\n\t}\n}\n\nfunction getFormat( module: StatsModule ): ModuleFormat {\n\tif ( !jsRegexp.test( module.nameForCondition! ) ) {\n\t\treturn 'unknown';\n\t}\n\n\t/**\n\t * Sometimes ESM modules have `moduleType` set as `javascript/auto`, so we\n\t * also need to check if the module has exports to determine if it's ESM.\n\t */\n\tif ( module.moduleType === 'javascript/esm' || !!module.providedExports?.length ) {\n\t\treturn 'esm';\n\t}\n\n\treturn 'cjs';\n}\n"],"names":["parseSourceMapInput","str","JSON","parse","replace","sourceMappingRegExp","loadCodeAndMap","codePath","existsSync","code","readFileSync","extractedComment","includes","Array","from","matchAll","at","length","maybeMap","loadMap","map","mapPath","sources","normalizeSourcesPaths","sourcesContent","loadMissingSourcesContent","sourceRoot","sourceMappingURL","startsWith","parseDataUrl","sourceMapFilename","URL","pathname","join","dirname","url","prefix","payload","split","encoding","Buffer","toString","decodeURIComponent","Error","mapDir","source","isAbsolute","resolve","index","cjsRegex","jsRegexp","normalizeOptions","options","defaultOptions","open","format","detailed","gzip","brotli","Object","assign","normalizePath","pathToNormalize","normalized","relativized","relative","process","cwd","replaceAll","win32","sep","posix","mapSourceMap","dirPath","inputs","alreadyRemapped","Set","remapped","remapping","file","ctx","has","add","codeMap","addSourcesToInputs","content","decodedMappings","path","parentPath","filter","forEach","normalizedPath","bytes","byteLength","imports","belongsTo","UNASSIGNED","getBytesPerSource","assetSizes","contributions","getContributions","codeLines","lineIndex","lineCode","mappings","currentColumn","i","mapping","startColumn","endColumn","set","get","slice","sourceIndex","codeSlice","undefined","sourceSizes","Map","contributionsSum","uncompressed","codeSegment","sizes","getSizes","adjustSizes","gzipSync","brotliCompressSync","asset","sums","gzipDelta","brotliDelta","Math","round","generateJsonReport","assets","outputs","endsWith","reduce","carry","data","processAsset","sortObjectKeys","generateHtmlReport","json","__dirname","fileURLToPath","template","stringify","maybeCodeMap","hasCodeAndMap","mapped","decode","outputInputs","result","Boolean","object","keys","sort","key","generateReportFromAssets","userOptions","handler","saveHtml","saveJson","default","report","writeFileSync","SondaEsbuildPlugin","name","setup","build","initialOptions","metafile","onEnd","console","error","entries","acc","SondaRollupPlugin","writeBundle","dir","bundle","outputDir","moduleParsed","module","id","getFormat","meta","commonjs","isCommonJS","importedIds","moduleId","test","SondaWebpackPlugin","apply","compiler","output","devtoolModuleFilenameTemplate","hooks","afterEmit","tapPromise","compilation","stats","getStats","toJson","modules","providedExports","outputPath","flatMap","mod","nameForCondition","codeGenerated","self","findIndex","m","issuerName","reasons","some","reason","resolvedModule","push","size","constructor","moduleType"],"mappings":";;;;;;;;;;AAqBA;;;;;IAMA,SAASA,mBAAAA,CAAqBC,GAAW,EAAA;AACxC,IAAA,OAAOC,IAAKC,CAAAA,KAAK,CAAEF,GAAIG,CAAAA,OAAO,CAAE,gBAAkB,EAAA,EAAA,CAAA,CAAA,CAAA;AACnD,CAAA;AAEA;;;;;;AAMA,GACA,MAAMC,mBAAsB,GAAA,kCAAA,CAAA;AAErB,SAASC,cAAAA,CAAgBC,QAAgB,EAAA;AAC/C,IAAA,IAAK,CAACC,aAAAA,CAAYD,QAAa,CAAA,EAAA;AAC9B,QAAA,OAAO,IAAA,CAAA;KACR;AAEA,IAAA,MAAME,IAAAA,GAAOC,eAAAA,CAAcH,QAAU,EAAA,OAAA,CAAA,CAAA;IAErC,MAAMI,gBAAmBF,GAAAA,IAAAA,CAAKG,QAAQ,CAAE,kBAAwBC,CAAAA,IAAAA,KAAMC,CAAAA,IAAI,CAAEL,IAAAA,CAAKM,QAAQ,CAAEV,mBAAwBW,CAAAA,CAAAA,CAAAA,EAAE,CAAE,CAAC,CAAA,CAAA,CAAA;AAExH,IAAA,IAAK,CAACL,gBAAAA,IAAoB,CAACA,gBAAAA,CA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,qBAAA;oBAEA,OAAOjC,GAAAA,CAAAA;AACR,iBAAA,EAAG,EAAE,CAAA,CAAA;AAELtG,gBAAAA,MAAM,CAAEb,aAAAA,CAAe0H,MAAO0B,CAAAA,gBAAgB,EAAK,GAAG;oBACrDrH,KAAO2F,EAAAA,MAAAA,CAAOqC,IAAI,IAAI,CAAA;AACtBrK,oBAAAA,MAAAA,EAAQkI,SAAWF,CAAAA,MAAAA,CAAAA;AACnBzF,oBAAAA,OAAAA;oBACAC,SAAW,EAAA,IAAA;AACZ,iBAAA,CAAA;AACD,aAAA,CAAA,CAAA;AAEA,YAAA,OAAO+D,yBACN2C,KAAMpE,CAAAA,MAAM,EAAEjH,GAAAA,CAAK0G,CAAAA,KAAS7F,GAAAA,SAAAA,CAAM6K,UAAYhF,EAAAA,KAAAA,CAAMyC,IAAI,CAAQ,CAAA,IAAA,EAAE,EAClE7F,MACA,EAAA,IAAI,CAACtB,OAAO,CAAA,CAAA;AAEd,SAAA,CAAA,CAAA;AACD,KAAA;IA5CAyK,WAAczK,CAAAA,OAAAA,GAA4B,EAAE,CAAG;QAC9C,IAAI,CAACA,OAAO,GAAGA,OAAAA,CAAAA;AAChB,KAAA;AA2CD,CAAA;AAEA,SAASqI,UAAWF,MAAmB,EAAA;AACtC,IAAA,IAAK,CAACrI,QAAS6I,CAAAA,IAAI,CAAER,MAAAA,CAAO0B,gBAAgB,CAAM,EAAA;QACjD,OAAO,SAAA,CAAA;AACR,KAAA;AAEA;;;KAIA,IAAK1B,MAAOuC,CAAAA,UAAU,KAAK,gBAAA,IAAoB,CAAC,CAACvC,MAAAA,CAAOsB,eAAe,EAAE5L,MAAS,EAAA;QACjF,OAAO,KAAA,CAAA;AACR,KAAA;IAEA,OAAO,KAAA,CAAA;AACR;;;;;;"}
|
package/dist/index.html
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><link rel="icon" href="data:;base64,iVBORw0KGgo="/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Sonda report</title><link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='512' height='512' fill='none'%3E%3Cpath fill='%23FACC15' d='M0 0h512v512H0V0Z'/%3E%3Cpath fill='%23000' d='m264.536 203.704-41.984 89.6-21.504-9.728c-20.139-9.216-35.669-21.504-46.592-36.864-10.923-15.36-16.384-37.717-16.384-67.072 0-37.547 9.728-65.536 29.184-83.968 19.797-18.773 52.395-28.33 97.792-28.672 18.773 0 35.84.853 51.2 2.56s27.648 3.584 36.864 5.632l13.824 2.56-10.24 82.432-12.8-1.536c-8.192-1.024-18.432-1.877-30.72-2.56-12.288-1.024-24.235-1.536-35.84-1.536-12.288 0-21.675 1.877-28.16 5.632-6.144 3.413-9.216 10.069-9.216 19.968 0 5.461 2.219 9.899 6.656 13.312 4.437 3.413 10.411 6.827 17.92 10.24Zm-18.432 100.864 42.496-90.624 22.016 9.728c23.211 10.24 40.107 23.04 50.688 38.4 10.581 15.019 15.872 36.523 15.872 64.512 0 37.888-9.899 67.072-29.696 87.552-19.797 20.48-52.395 30.891-97.792 31.232-22.528 0-43.52-1.536-62.976-4.608-19.456-2.731-36.693-5.973-51.712-9.728l10.24-82.432 12.288 2.048c8.533 1.365 19.797 2.731 33.792 4.096 13.995 1.365 29.355 2.048 46.08 2.048 12.971 0 22.699-1.877 29.184-5.632 6.485-3.755 9.728-9.899 9.728-18.432 0-5.803-1.536-10.411-4.608-13.824-3.072-3.413-8.533-6.827-16.384-10.24l-9.216-4.096Z'/%3E%3C/svg%3E"/><script type="module" crossorigin>var Jr=Object.defineProperty;var Ve=t=>{throw TypeError(t)};var Kr=(t,e,r)=>e in t?Jr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var nt=(t,e,r)=>Kr(t,typeof e!="symbol"?e+"":e,r),we=(t,e,r)=>e.has(t)||Ve("Cannot "+r);var it=(t,e,r)=>(we(t,e,"read from private field"),r?r.call(t):e.get(t)),Dt=(t,e,r)=>e.has(t)?Ve("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),me=(t,e,r,n)=>(we(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),Je=(t,e,r)=>(we(t,e,"access private method"),r);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();window.SONDA_JSON_REPORT=JSON.parse(String.raw`__REPORT_DATA__`);const Zr=!1;var Re=Array.isArray,Le=Array.from,Yr=Object.defineProperty,Lt=Object.getOwnPropertyDescriptor,sr=Object.getOwnPropertyDescriptors,Qr=Object.prototype,Xr=Array.prototype,te=Object.getPrototypeOf;function $r(t){return typeof t=="function"}const Pt=()=>{};function tn(t){return t()}function ye(t){for(var e=0;e<t.length;e++)t[e]()}const at=2,ar=4,Bt=8,ue=16,et=32,fe=64,wt=128,ee=256,J=512,ht=1024,Ft=2048,st=4096,qt=8192,lr=16384,Ht=32768,en=1<<18,ur=1<<19,dt=Symbol("$state"),rn=Symbol("");function fr(t){return t===this.v}function cr(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function nn(t){return!cr(t,this.v)}function on(t){throw new Error("effect_in_teardown")}function sn(){throw new Error("effect_in_unowned_derived")}function an(t){throw new Error("effect_orphan")}function ln(){throw new Error("effect_update_depth_exceeded")}function un(){throw new Error("state_descriptors_fixed")}function fn(){throw new Error("state_prototype_fixed")}function cn(){throw new Error("state_unsafe_local_read")}function dn(){throw new Error("state_unsafe_mutation")}function Z(t){return{f:0,v:t,reactions:null,equals:fr,version:0}}function V(t){return hn(Z(t))}function vn(t,e=!1){var n;const r=Z(t);return e||(r.equals=nn),C!==null&&C.l!==null&&((n=C.l).s??(n.s=[])).push(r),r}function hn(t){return N!==null&&N.f&at&&(tt===null?Mn([t]):tt.push(t)),t}function z(t,e){return N!==null&&He()&&N.f&(at|ue)&&(tt===null||!tt.includes(t))&&dn(),xe(t,e)}function xe(t,e){return t.equals(e)||(t.v=e,t.version=Mr(),dr(t,ht),He()&&S!==null&&S.f&J&&!(S.f&et)&&(F!==null&&F.includes(t)?(rt(S,ht),he(S)):vt===null?An([t]):vt.push(t))),e}function dr(t,e){var r=t.reactions;if(r!==null)for(var n=He(),i=r.length,o=0;o<i;o++){var s=r[o],l=s.f;l&ht||!n&&s===S||(rt(s,e),l&(J|wt)&&(l&at?dr(s,Ft):he(s)))}}const Ie=1,Ce=2,vr=4,_n=8,pn=16,gn=4,wn=1,mn=2,G=Symbol();let hr=!1;function Q(t,e=null,r){if(typeof t!="object"||t===null||dt in t)return t;const n=te(t);if(n!==Qr&&n!==Xr)return t;var i=new Map,o=Re(t),s=Z(0);o&&i.set("length",Z(t.length));var l;return new Proxy(t,{defineProperty(f,a,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&un();var c=i.get(a);return c===void 0?(c=Z(u.value),i.set(a,c)):z(c,Q(u.value,l)),!0},deleteProperty(f,a){var u=i.get(a);if(u===void 0)a in f&&i.set(a,Z(G));else{if(o&&typeof a=="string"){var c=i.get("length"),v=Number(a);Number.isInteger(v)&&v<c.v&&z(c,v)}z(u,G),Ke(s)}return!0},get(f,a,u){var h;if(a===dt)return t;var c=i.get(a),v=a in f;if(c===void 0&&(!v||(h=Lt(f,a))!=null&&h.writable)&&(c=Z(Q(v?f[a]:G,l)),i.set(a,c)),c!==void 0){var d=_(c);return d===G?void 0:d}return Reflect.get(f,a,u)},getOwnPropertyDescriptor(f,a){var u=Reflect.getOwnPropertyDescriptor(f,a);if(u&&"value"in u){var c=i.get(a);c&&(u.value=_(c))}else if(u===void 0){var v=i.get(a),d=v==null?void 0:v.v;if(v!==void 0&&d!==G)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return u},has(f,a){var d;if(a===dt)return!0;var u=i.get(a),c=u!==void 0&&u.v!==G||Reflect.has(f,a);if(u!==void 0||S!==null&&(!c||(d=Lt(f,a))!=null&&d.writable)){u===void 0&&(u=Z(c?Q(f[a],l):G),i.set(a,u));var v=_(u);if(v===G)return!1}return c},set(f,a,u,c){var m;var v=i.get(a),d=a in f;if(o&&a==="length")for(var h=u;h<v.v;h+=1){var g=i.get(h+"");g!==void 0?z(g,G):h in f&&(g=Z(G),i.set(h+"",g))}v===void 0?(!d||(m=Lt(f,a))!=null&&m.writable)&&(v=Z(void 0),z(v,Q(u,l)),i.set(a,v)):(d=v.v!==G,z(v,Q(u,l)));var b=Reflect.getOwnPropertyDescriptor(f,a);if(b!=null&&b.set&&b.set.call(c,u),!d){if(o&&typeof a=="string"){var k=i.get("length"),E=Number(a);Number.isInteger(E)&&E>=k.v&&z(k,E+1)}Ke(s)}return!0},ownKeys(f){_(s);var a=Reflect.ownKeys(f).filter(v=>{var d=i.get(v);return d===void 0||d.v!==G});for(var[u,c]of i)c.v!==G&&!(u in f)&&a.push(u);return a},setPrototypeOf(){fn()}})}function Ke(t,e=1){z(t,t.v+e)}function Ze(t){return t!==null&&typeof t=="object"&&dt in t?t[dt]:t}function bn(t,e){return Object.is(Ze(t),Ze(e))}var Ye,ot,_r,pr;function yn(){if(Ye===void 0){Ye=window,ot=document;var t=Element.prototype,e=Node.prototype;_r=Lt(e,"firstChild").get,pr=Lt(e,"nextSibling").get,t.__click=void 0,t.__className="",t.__attributes=null,t.__e=void 0,Text.prototype.__t=void 0}}function je(t=""){return document.createTextNode(t)}function St(t){return _r.call(t)}function ce(t){return pr.call(t)}function p(t){return St(t)}function I(t,e){{var r=St(t);return r instanceof Comment&&r.data===""?ce(r):r}}function w(t,e=1,r=!1){let n=t;for(;e--;)n=ce(n);return n}function xn(t){t.textContent=""}function O(t){var e=at|ht;S===null?e|=wt:S.f|=ur;const r={children:null,deps:null,equals:fr,f:e,fn:t,reactions:null,v:null,version:0,parent:S};if(N!==null&&N.f&at){var n=N;(n.children??(n.children=[])).push(r)}return r}function gr(t){var e=t.children;if(e!==null){t.children=null;for(var r=0;r<e.length;r+=1){var n=e[r];n.f&at?Be(n):_t(n)}}}function wr(t){var e,r=S;Tt(t.parent);try{gr(t),e=Ar(t)}finally{Tt(r)}return e}function mr(t){var e=wr(t),r=(yt||t.f&wt)&&t.deps!==null?Ft:J;rt(t,r),t.equals(e)||(t.v=e,t.version=Mr())}function Be(t){gr(t),Ct(t,0),rt(t,qt),t.v=t.children=t.deps=t.reactions=null}function br(t){S===null&&N===null&&an(),N!==null&&N.f&wt&&sn(),qe&&on()}function En(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function Mt(t,e,r,n=!0){var i=(t&fe)!==0,o=S,s={ctx:C,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:t|ht,first:null,fn:e,last:null,next:null,parent:i?null:o,prev:null,teardown:null,transitions:null,version:0};if(r){var l=xt;try{Xe(!0),ve(s),s.f|=lr}catch(u){throw _t(s),u}finally{Xe(l)}}else e!==null&&he(s);var f=r&&s.deps===null&&s.first===null&&s.nodes_start===null&&s.teardown===null&&(s.f&ur)===0;if(!f&&!i&&n&&(o!==null&&En(s,o),N!==null&&N.f&at)){var a=N;(a.children??(a.children=[])).push(s)}return s}function kn(t){const e=Mt(Bt,null,!1);return rt(e,J),e.teardown=t,e}function Qe(t){br();var e=S!==null&&(S.f&et)!==0&&C!==null&&!C.m;if(e){var r=C;(r.e??(r.e=[])).push({fn:t,effect:S,reaction:N})}else{var n=At(t);return n}}function Sn(t){return br(),yr(t)}function On(t){const e=Mt(fe,t,!0);return()=>{_t(e)}}function At(t){return Mt(ar,t,!1)}function yr(t){return Mt(Bt,t,!0)}function A(t){return Wt(t)}function Wt(t,e=0){return Mt(Bt|ue|e,t,!0)}function gt(t,e=!0){return Mt(Bt|et,t,!0,e)}function xr(t){var e=t.teardown;if(e!==null){const r=qe,n=N;$e(!0),Ot(null);try{e.call(null)}finally{$e(r),Ot(n)}}}function Er(t){var e=t.deriveds;if(e!==null){t.deriveds=null;for(var r=0;r<e.length;r+=1)Be(e[r])}}function kr(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var n=r.next;_t(r,e),r=n}}function Tn(t){for(var e=t.first;e!==null;){var r=e.next;e.f&et||_t(e),e=r}}function _t(t,e=!0){var r=!1;if((e||t.f&en)&&t.nodes_start!==null){var n=t.nodes_start,i=t.nodes_end,o=N,s=S;Ot(null),Tt(null);try{for(;n!==null;){var l=n===i?null:ce(n);n.remove(),n=l}}finally{Ot(o),Tt(s)}r=!0}Er(t),kr(t,e&&!r),Ct(t,0),rt(t,qt);var f=t.transitions;if(f!==null)for(const u of f)u.stop();xr(t);var a=t.parent;a!==null&&a.first!==null&&Sr(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.parent=t.fn=t.nodes_start=t.nodes_end=null}function Sr(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function re(t,e){var r=[];Fe(t,r,!0),Or(r,()=>{_t(t),e&&e()})}function Or(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var i of t)i.out(n)}else e()}function Fe(t,e,r){if(!(t.f&st)){if(t.f^=st,t.transitions!==null)for(const s of t.transitions)(s.is_global||r)&&e.push(s);for(var n=t.first;n!==null;){var i=n.next,o=(n.f&Ht)!==0||(n.f&et)!==0;Fe(n,e,o?r:!1),n=i}}}function ne(t){Tr(t,!0)}function Tr(t,e){if(t.f&st){t.f^=st,Ut(t)&&ve(t);for(var r=t.first;r!==null;){var n=r.next,i=(r.f&Ht)!==0||(r.f&et)!==0;Tr(r,i?e:!1),r=n}if(t.transitions!==null)for(const o of t.transitions)(o.is_global||e)&&o.in()}}let Ee=!1,ke=[];function Nn(){Ee=!1;const t=ke.slice();ke=[],ye(t)}function de(t){Ee||(Ee=!0,queueMicrotask(Nn)),ke.push(t)}let ie=!1,xt=!1,qe=!1;function Xe(t){xt=t}function $e(t){qe=t}let Se=[],It=0;let N=null;function Ot(t){N=t}let S=null;function Tt(t){S=t}let tt=null;function Mn(t){tt=t}let F=null,K=0,vt=null;function An(t){vt=t}let Nr=0,yt=!1,C=null;function Mr(){return++Nr}function He(){return C!==null&&C.l===null}function Ut(t){var s,l;var e=t.f;if(e&ht)return!0;if(e&Ft){var r=t.deps,n=(e&wt)!==0;if(r!==null){var i;if(e&ee){for(i=0;i<r.length;i++)((s=r[i]).reactions??(s.reactions=[])).push(t);t.f^=ee}for(i=0;i<r.length;i++){var o=r[i];if(Ut(o)&&mr(o),n&&S!==null&&!yt&&!((l=o==null?void 0:o.reactions)!=null&&l.includes(t))&&(o.reactions??(o.reactions=[])).push(t),o.version>t.version)return!0}}n||rt(t,J)}return!1}function zn(t,e,r){throw t}function Ar(t){var c;var e=F,r=K,n=vt,i=N,o=yt,s=tt,l=t.f;F=null,K=0,vt=null,N=l&(et|fe)?null:t,yt=!xt&&(l&wt)!==0,tt=null;try{var f=(0,t.fn)(),a=t.deps;if(F!==null){var u;if(Ct(t,K),a!==null&&K>0)for(a.length=K+F.length,u=0;u<F.length;u++)a[K+u]=F[u];else t.deps=a=F;if(!yt)for(u=K;u<a.length;u++)((c=a[u]).reactions??(c.reactions=[])).push(t)}else a!==null&&K<a.length&&(Ct(t,K),a.length=K);return f}finally{F=e,K=r,vt=n,N=i,yt=o,tt=s}}function Dn(t,e){let r=e.reactions;if(r!==null){var n=r.indexOf(t);if(n!==-1){var i=r.length-1;i===0?r=e.reactions=null:(r[n]=r[i],r.pop())}}r===null&&e.f&at&&(F===null||!F.includes(e))&&(rt(e,Ft),e.f&(wt|ee)||(e.f^=ee),Ct(e,0))}function Ct(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Dn(t,r[n])}function ve(t){var e=t.f;if(!(e&qt)){rt(t,J);var r=S,n=C;S=t,C=t.ctx;try{Er(t),e&ue?Tn(t):kr(t),xr(t);var i=Ar(t);t.teardown=typeof i=="function"?i:null,t.version=Nr}catch(o){zn(o)}finally{S=r,C=n}}}function Pn(){It>1e3&&(It=0,ln()),It++}function Rn(t){var e=t.length;if(e!==0){Pn();var r=xt;xt=!0;try{for(var n=0;n<e;n++){var i=t[n];i.f&J||(i.f^=J);var o=[];zr(i,o),Ln(o)}}finally{xt=r}}}function Ln(t){var e=t.length;if(e!==0)for(var r=0;r<e;r++){var n=t[r];!(n.f&(qt|st))&&Ut(n)&&(ve(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Sr(n):n.fn=null))}}function In(){if(ie=!1,It>1001)return;const t=Se;Se=[],Rn(t),ie||(It=0)}function he(t){ie||(ie=!0,queueMicrotask(In));for(var e=t;e.parent!==null;){e=e.parent;var r=e.f;if(r&(fe|et)){if(!(r&J))return;e.f^=J}}Se.push(e)}function zr(t,e){var r=t.first,n=[];t:for(;r!==null;){var i=r.f,o=(i&et)!==0,s=o&&(i&J)!==0;if(!s&&!(i&st))if(i&Bt){o?r.f^=J:Ut(r)&&ve(r);var l=r.first;if(l!==null){r=l;continue}}else i&ar&&n.push(r);var f=r.next;if(f===null){let c=r.parent;for(;c!==null;){if(t===c)break t;var a=c.next;if(a!==null){r=a;continue t}c=c.parent}}r=f}for(var u=0;u<n.length;u++)l=n[u],e.push(l),zr(l,e)}function _(t){var l;var e=t.f,r=(e&at)!==0;if(r&&e&qt){var n=wr(t);return Be(t),n}if(N!==null){tt!==null&&tt.includes(t)&&cn();var i=N.deps;F===null&&i!==null&&i[K]===t?K++:F===null?F=[t]:F.push(t),vt!==null&&S!==null&&S.f&J&&!(S.f&et)&&vt.includes(t)&&(rt(S,ht),he(S))}else if(r&&t.deps===null){var o=t,s=o.parent;s!==null&&!((l=s.deriveds)!=null&&l.includes(o))&&(s.deriveds??(s.deriveds=[])).push(o)}return r&&(o=t,Ut(o)&&mr(o)),t.v}function Gt(t){const e=N;try{return N=null,t()}finally{N=e}}const Cn=~(ht|Ft|J);function rt(t,e){t.f=t.f&Cn|e}function q(t,e=!1,r){C={p:C,c:null,e:null,m:!1,s:t,x:null,l:null},e||(C.l={s:null,u:null,r1:[],r2:Z(!1)})}function H(t){const e=C;if(e!==null){const s=e.e;if(s!==null){var r=S,n=N;e.e=null;try{for(var i=0;i<s.length;i++){var o=s[i];Tt(o.effect),Ot(o.reaction),At(o.fn)}}finally{Tt(r),Ot(n)}}C=e.p,e.m=!0}return{}}function jn(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(dt in t)Oe(t);else if(!Array.isArray(t))for(let e in t){const r=t[e];typeof r=="object"&&r&&dt in r&&Oe(r)}}}function Oe(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let n in t)try{Oe(t[n],e)}catch{}const r=te(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=sr(r);for(let i in n){const o=n[i].get;if(o)try{o.call(t)}catch{}}}}}const Dr=new Set,Te=new Set;function Bn(t,e,r,n){function i(o){if(n.capture||Rt.call(e,o),!o.cancelBubble)return r.call(this,o)}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?de(()=>{e.addEventListener(t,i,n)}):e.addEventListener(t,i,n),i}function Et(t,e,r,n,i){var o={capture:n,passive:i},s=Bn(t,e,r,o);(e===document.body||e===window||e===document)&&kn(()=>{e.removeEventListener(t,s,o)})}function Vt(t){for(var e=0;e<t.length;e++)Dr.add(t[e]);for(var r of Te)r(t)}function Rt(t){var b;var e=this,r=e.ownerDocument,n=t.type,i=((b=t.composedPath)==null?void 0:b.call(t))||[],o=i[0]||t.target,s=0,l=t.__root;if(l){var f=i.indexOf(l);if(f!==-1&&(e===document||e===window)){t.__root=e;return}var a=i.indexOf(e);if(a===-1)return;f<=a&&(s=f)}if(o=i[s]||t.target,o!==e){Yr(t,"currentTarget",{configurable:!0,get(){return o||r}});try{for(var u,c=[];o!==null;){var v=o.assignedSlot||o.parentNode||o.host||null;try{var d=o["__"+n];if(d!==void 0&&!o.disabled)if(Re(d)){var[h,...g]=d;h.apply(o,[t,...g])}else d.call(o,t)}catch(k){u?c.push(k):u=k}if(t.cancelBubble||v===e||v===null)break;o=v}if(u){for(let k of c)queueMicrotask(()=>{throw k});throw u}}finally{t.__root=e,delete t.currentTarget}}}function Pr(t){var e=document.createElement("template");return e.innerHTML=t,e.content}function oe(t,e){var r=S;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function T(t,e){var r=(e&wn)!==0,n=(e&mn)!==0,i,o=!t.startsWith("<!>");return()=>{i===void 0&&(i=Pr(o?t:"<!>"+t),r||(i=St(i)));var s=n?document.importNode(i,!0):i.cloneNode(!0);if(r){var l=St(s),f=s.lastChild;oe(l,f)}else oe(s,s);return s}}function Rr(t,e,r="svg"){var n=!t.startsWith("<!>"),i=`<${r}>${n?t:"<!>"+t}</${r}>`,o;return()=>{if(!o){var s=Pr(i),l=St(s);o=St(l)}var f=o.cloneNode(!0);return oe(f,f),f}}function Jt(){var t=document.createDocumentFragment(),e=document.createComment(""),r=je();return t.append(e,r),oe(e,r),t}function x(t,e){t!==null&&t.before(e)}const Fn=["touchstart","touchmove"];function qn(t){return Fn.includes(t)}let Ne=!0;function M(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=r,t.nodeValue=r==null?"":r+"")}function Hn(t,e){return Wn(t,e)}const bt=new Map;function Wn(t,{target:e,anchor:r,props:n={},events:i,context:o,intro:s=!0}){yn();var l=new Set,f=c=>{for(var v=0;v<c.length;v++){var d=c[v];if(!l.has(d)){l.add(d);var h=qn(d);e.addEventListener(d,Rt,{passive:h});var g=bt.get(d);g===void 0?(document.addEventListener(d,Rt,{passive:h}),bt.set(d,1)):bt.set(d,g+1)}}};f(Le(Dr)),Te.add(f);var a=void 0,u=On(()=>{var c=r??e.appendChild(je());return gt(()=>{if(o){q({});var v=C;v.c=o}i&&(n.$$events=i),Ne=s,a=t(c,n)||{},Ne=!0,o&&H()}),()=>{var h;for(var v of l){e.removeEventListener(v,Rt);var d=bt.get(v);--d===0?(document.removeEventListener(v,Rt),bt.delete(v)):bt.set(v,d)}Te.delete(f),tr.delete(a),c!==r&&((h=c.parentNode)==null||h.removeChild(c))}});return tr.set(a,u),a}let tr=new WeakMap;function P(t,e,r,n=null,i=!1){var o=t,s=null,l=null,f=null,a=i?Ht:0;Wt(()=>{f!==(f=!!e())&&(f?(s?ne(s):s=gt(()=>r(o)),l&&re(l,()=>{l=null})):(l?ne(l):n&&(l=gt(()=>n(o))),s&&re(s,()=>{s=null})))},a)}function Un(t,e,r){var n=t,i=G,o;Wt(()=>{cr(i,i=e())&&(o&&re(o),o=gt(()=>r(n)))})}let be=null;function Gn(t,e){return e}function Vn(t,e,r,n){for(var i=[],o=e.length,s=0;s<o;s++)Fe(e[s].e,i,!0);var l=o>0&&i.length===0&&r!==null;if(l){var f=r.parentNode;xn(f),f.append(r),n.clear(),lt(t,e[0].prev,e[o-1].next)}Or(i,()=>{for(var a=0;a<o;a++){var u=e[a];l||(n.delete(u.k),lt(t,u.prev,u.next)),_t(u.e,!l)}})}function We(t,e,r,n,i,o=null){var s=t,l={flags:e,items:new Map,first:null},f=(e&vr)!==0;if(f){var a=t;s=a.appendChild(je())}var u=null,c=!1;Wt(()=>{var v=r(),d=Re(v)?v:v==null?[]:Le(v),h=d.length;c&&h===0||(c=h===0,Jn(d,l,s,i,e,n),o!==null&&(h===0?u?ne(u):u=gt(()=>o(s)):u!==null&&re(u,()=>{u=null})),r())})}function Jn(t,e,r,n,i,o){var Kt,zt,Zt,Yt;var s=(i&_n)!==0,l=(i&(Ie|Ce))!==0,f=t.length,a=e.items,u=e.first,c=u,v,d=null,h,g=[],b=[],k,E,m,y;if(s)for(y=0;y<f;y+=1)k=t[y],E=o(k,y),m=a.get(E),m!==void 0&&((Kt=m.a)==null||Kt.measure(),(h??(h=new Set)).add(m));for(y=0;y<f;y+=1){if(k=t[y],E=o(k,y),m=a.get(E),m===void 0){var R=c?c.e.nodes_start:r;d=Zn(R,e,d,d===null?e.first:d.next,k,E,y,n,i),a.set(E,d),g=[],b=[],c=d.next;continue}if(l&&Kn(m,k,y,i),m.e.f&st&&(ne(m.e),s&&((zt=m.a)==null||zt.unfix(),(h??(h=new Set)).delete(m))),m!==c){if(v!==void 0&&v.has(m)){if(g.length<b.length){var j=b[0],L;d=j.prev;var D=g[0],W=g[g.length-1];for(L=0;L<g.length;L+=1)er(g[L],j,r);for(L=0;L<b.length;L+=1)v.delete(b[L]);lt(e,D.prev,W.next),lt(e,d,D),lt(e,W,j),c=j,d=W,y-=1,g=[],b=[]}else v.delete(m),er(m,c,r),lt(e,m.prev,m.next),lt(e,m,d===null?e.first:d.next),lt(e,d,m),d=m;continue}for(g=[],b=[];c!==null&&c.k!==E;)c.e.f&st||(v??(v=new Set)).add(c),b.push(c),c=c.next;if(c===null)continue;m=c}g.push(m),d=m,c=m.next}if(c!==null||v!==void 0){for(var U=v===void 0?[]:Le(v);c!==null;)c.e.f&st||U.push(c),c=c.next;var mt=U.length;if(mt>0){var ge=i&vr&&f===0?r:null;if(s){for(y=0;y<mt;y+=1)(Zt=U[y].a)==null||Zt.measure();for(y=0;y<mt;y+=1)(Yt=U[y].a)==null||Yt.fix()}Vn(e,U,ge,a)}}s&&de(()=>{var Qt;if(h!==void 0)for(m of h)(Qt=m.a)==null||Qt.apply()}),S.first=e.first&&e.first.e,S.last=d&&d.e}function Kn(t,e,r,n){n&Ie&&xe(t.v,e),n&Ce?xe(t.i,r):t.i=r}function Zn(t,e,r,n,i,o,s,l,f){var a=be;try{var u=(f&Ie)!==0,c=(f&pn)===0,v=u?c?vn(i):Z(i):i,d=f&Ce?Z(s):s,h={i:d,v,k:o,a:null,e:null,prev:r,next:n};return be=h,h.e=gt(()=>l(t,v,d),hr),h.e.prev=r&&r.e,h.e.next=n&&n.e,r===null?e.first=h:(r.next=h,r.e.next=h.e),n!==null&&(n.prev=h,n.e.prev=h.e),h}finally{be=a}}function er(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,i=e?e.e.nodes_start:r,o=t.e.nodes_start;o!==n;){var s=ce(o);i.before(o),o=s}}function lt(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function Yn(t,e,...r){var n=t,i=Pt,o;Wt(()=>{i!==(i=e())&&(o&&(_t(o),o=null),o=gt(()=>i(n,...r)))},Ht)}function B(t,e,r,n){var i=t.__attributes??(t.__attributes={});i[e]!==(i[e]=r)&&(e==="loading"&&(t[rn]=r),r==null?t.removeAttribute(e):typeof r!="string"&&Qn(t).includes(e)?t[e]=r:t.setAttribute(e,r))}var rr=new Map;function Qn(t){var e=rr.get(t.nodeName);if(e)return e;rr.set(t.nodeName,e=[]);for(var r,n=te(t);n.constructor.name!=="Element";){r=sr(n);for(var i in r)r[i].set&&e.push(i);n=te(n)}return e}function Xn(t,e){var r=t.__className,n=$n(e);(r!==n||hr)&&(n===""?t.removeAttribute("class"):t.setAttribute("class",n),t.__className=n)}function $n(t){return t??""}function se(t,e,r){if(r){if(t.classList.contains(e))return;t.classList.add(e)}else{if(!t.classList.contains(e))return;t.classList.remove(e)}}function Me(t,e,r,n,i){var o=t.__attributes??(t.__attributes={}),s=t.style,l="style-"+e;o[l]===r&&!i||(o[l]=r,r==null?s.removeProperty(e):s.setProperty(e,r,""))}const ti=requestAnimationFrame,ei=()=>performance.now(),ft={tick:t=>ti(t),now:()=>ei(),tasks:new Set};function Lr(t){ft.tasks.forEach(e=>{e.c(t)||(ft.tasks.delete(e),e.f())}),ft.tasks.size!==0&&ft.tick(Lr)}function ri(t){let e;return ft.tasks.size===0&&ft.tick(Lr),{promise:new Promise(r=>{ft.tasks.add(e={c:t,f:r})}),abort(){ft.tasks.delete(e)}}}function Xt(t,e){t.dispatchEvent(new CustomEvent(e))}function ni(t){const e=t.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("")}function nr(t){const e={},r=t.split(";");for(const n of r){const[i,o]=n.split(":");if(!i||o===void 0)break;const s=ni(i.trim());e[s]=o.trim()}return e}const ii=t=>t;function oi(t,e,r,n){var i=(t&gn)!==0,o="both",s,l=e.inert,f,a;function u(){return s??(s=r()(e,(n==null?void 0:n())??{},{direction:o}))}var c={is_global:i,in(){e.inert=l,Xt(e,"introstart"),f=Ae(e,u(),a,1,()=>{Xt(e,"introend"),f==null||f.abort(),f=s=void 0})},out(g){e.inert=!0,Xt(e,"outrostart"),a=Ae(e,u(),f,0,()=>{Xt(e,"outroend"),g==null||g()})},stop:()=>{f==null||f.abort(),a==null||a.abort()}},v=S;if((v.transitions??(v.transitions=[])).push(c),Ne){var d=i;if(!d){for(var h=v.parent;h&&h.f&Ht;)for(;(h=h.parent)&&!(h.f&ue););d=!h||(h.f&lr)!==0}d&&At(()=>{Gt(()=>c.in())})}}function Ae(t,e,r,n,i){var o=n===1;if($r(e)){var s,l=!1;return de(()=>{if(!l){var b=e({direction:o?"in":"out"});s=Ae(t,b,r,n,i)}}),{abort:()=>{l=!0,s==null||s.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(r==null||r.deactivate(),!(e!=null&&e.duration))return i(),{abort:Pt,deactivate:Pt,reset:Pt,t:()=>n};const{delay:f=0,css:a,tick:u,easing:c=ii}=e;var v=[];if(o&&r===void 0&&(u&&u(0,1),a)){var d=nr(a(0,1));v.push(d,d)}var h=()=>1-n,g=t.animate(v,{duration:f});return g.onfinish=()=>{var b=(r==null?void 0:r.t())??1-n;r==null||r.abort();var k=n-b,E=e.duration*Math.abs(k),m=[];if(E>0){if(a)for(var y=Math.ceil(E/16.666666666666668),R=0;R<=y;R+=1){var j=b+k*c(R/y),L=a(j,1-j);m.push(nr(L))}h=()=>{var D=g.currentTime;return b+k*c(D/E)},u&&ri(()=>{if(g.playState!=="running")return!1;var D=h();return u(D,1-D),!0})}g=t.animate(m,{duration:E,fill:"forwards"}),g.onfinish=()=>{h=()=>n,u==null||u(n,1-n),i()}},{abort:()=>{g&&(g.cancel(),g.effect=null)},deactivate:()=>{i=Pt},reset:()=>{n===0&&(u==null||u(1,0))},t:()=>h()}}function ze(t,e,r){if(t.multiple)return ai(t,e);for(var n of t.options){var i=Ir(n);if(bn(i,e)){n.selected=!0;return}}(!r||e!==void 0)&&(t.selectedIndex=-1)}function si(t,e){let r=!0;At(()=>{e&&ze(t,Gt(e),r),r=!1;var n=new MutationObserver(()=>{var i=t.__value;ze(t,i)});return n.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),()=>{n.disconnect()}})}function ai(t,e){for(var r of t.options)r.selected=~e.indexOf(Ir(r))}function Ir(t){return"__value"in t?t.__value:t.value}var ut,kt,jt,ae,Cr;const le=class le{constructor(e){Dt(this,ae);Dt(this,ut,new WeakMap);Dt(this,kt);Dt(this,jt);me(this,jt,e)}observe(e,r){var n=it(this,ut).get(e)||new Set;return n.add(r),it(this,ut).set(e,n),Je(this,ae,Cr).call(this).observe(e,it(this,jt)),()=>{var i=it(this,ut).get(e);i.delete(r),i.size===0&&(it(this,ut).delete(e),it(this,kt).unobserve(e))}}};ut=new WeakMap,kt=new WeakMap,jt=new WeakMap,ae=new WeakSet,Cr=function(){return it(this,kt)??me(this,kt,new ResizeObserver(e=>{for(var r of e){le.entries.set(r.target,r);for(var n of it(this,ut).get(r.target)||[])n(r)}}))},nt(le,"entries",new WeakMap);let De=le;var li=new De({box:"border-box"});function ct(t,e,r){var n=li.observe(t,()=>r(t[e]));At(()=>(Gt(()=>r(t[e])),n))}function ir(t,e){return t===e||(t==null?void 0:t[dt])===e}function ui(t={},e,r,n){return At(()=>{var i,o;return yr(()=>{i=o,o=[],Gt(()=>{t!==r(...o)&&(e(t,...o),i&&ir(r(...i),t)&&e(null,...i))})}),()=>{de(()=>{o&&ir(r(...o),t)&&e(null,...o)})}}),t}function _e(t=!1){const e=C,r=e.l.u;if(!r)return;let n=()=>jn(e.s);if(t){let i=0,o={};const s=O(()=>{let l=!1;const f=e.s;for(const a in f)f[a]!==o[a]&&(o[a]=f[a],l=!0);return l&&i++,i});n=()=>_(s)}r.b.length&&Sn(()=>{or(e,n),ye(r.b)}),Qe(()=>{const i=Gt(()=>r.m.map(tn));return()=>{for(const o of i)typeof o=="function"&&o()}}),r.a.length&&Qe(()=>{or(e,n),ye(r.a)})}function or(t,e){if(t.l.s)for(const r of t.l.s)_(r);e()}const fi="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(fi);const ci=t=>t;function di(t,{delay:e=0,duration:r=400,easing:n=ci}={}){const i=+getComputedStyle(t).opacity;return{delay:e,duration:r,easing:n,css:o=>`opacity: ${o*i}`}}function vi(){let t=V("uncompressed");return{get type(){return _(t)},setType(e){z(t,Q(e))}}}function hi(){let t=Q({file:null,folder:null,output:null,duplicates:null}),e=Q([]);return{get file(){return t.file},get folder(){return t.folder},get output(){return t.output},get duplicates(){return t.duplicates},open(r,n){e.push(r),t[r]=n},close(){e.length!==0&&(t[e.pop()]=null)}}}function _i(t){return Object.entries(t.outputs).map(([e,r])=>{const n=new pi;return Object.entries(r.inputs).forEach(([i,o])=>n.insert(i,o)),n.root.name=e,n.root.uncompressed=r.uncompressed,n.root.gzip=r.gzip,n.root.brotli=r.brotli,n.optimize(),n})}function pt(t){return"items"in t}class pi{constructor(){nt(this,"root");this.root=this.createNode("","")}createNode(e,r){return{name:e,path:r,uncompressed:0,gzip:0,brotli:0,items:[]}}insert(e,r){const n=e.split("/"),i=n.pop();let o=this.root;n.forEach(s=>{let l=o.items.find(f=>pt(f)&&f.name===s);l||(l=this.createNode(s,o.path?`${o.path}/${s}`:s),o.items.push(l)),o=l,o.uncompressed+=r.uncompressed,o.gzip+=r.gzip,o.brotli+=r.brotli}),o.items.push({name:i,path:o.path?`${o.path}/${i}`:i,uncompressed:r.uncompressed,gzip:r.gzip,brotli:r.brotli})}optimize(){const e=[this.root];for(;e.length;){const r=e.pop();for(;r.items.length===1&&pt(r.items[0]);){const n=r.items[0];r.name=`${r.name}/${n.name}`,r.path=n.path,r.items=n.items}r.items.sort((n,i)=>i.uncompressed-n.uncompressed),r.items.forEach(n=>pt(n)&&e.push(n))}}get(e){let r=this.root;for(;r&&r.path!==e;)r=pt(r)&&r.items.find(n=>e.startsWith(n.path))||null;return r}}const Pe=_i(window.SONDA_JSON_REPORT);function gi(){let t=V(0);const e=O(()=>Pe.at(_(t)));return{get index(){return _(t)},get output(){return _(e)},setIndex(r){z(t,Q(r))}}}const wi=/(.*)(?:.*node_modules\/)(@[^\/]+\/[^\/]+|[^\/]+)/,mi=Object.keys(window.SONDA_JSON_REPORT.inputs).map(t=>wi.exec(t)).filter(t=>t!==null).reduce((t,e)=>{const[r,,n]=e;return t.has(n)||t.set(n,new Set),t.get(n).add(r),t},new Map),$t=new Map(Array.from(mi).filter(([,t])=>t.size>1).map(([t,e])=>[t,Array.from(e)])),X=gi(),Nt=vi(),Y=hi();var bi=()=>Y.close(),yi=T('<div class="fixed top-0 right-0 left-0 bottom-0 flex justify-center items-center"><div class="fixed bg-gray-200/70 w-full h-full backdrop-blur-sm" aria-hidden="true"></div> <div class="bg-white relative flex flex-col rounded-lg border p-6 shadow-lg overflow-hidden max-h-[95vh] max-w-[95vw]"><div class="mb-4"><h2 class="py-2 pr-6 block align-text-bottom font-semibold leading-none tracking-tight text-base border-b-2 border-gray-300 border-dashed"> </h2> <button aria-label="Close dialog" class="absolute top-0 right-0 mt-2 mr-2 flex justify-center items-center border border-transparent rounded-full w-10 h-10 text-gray-600 hover:text-gray-900"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M0 0h24v24H0z" stroke="none"></path><path d="M18 6 6 18M6 6l12 12"></path></svg></button></div> <!></div></div>');function pe(t,e){q(e,!0);let r=V(void 0);function n(v){v.target===_(r)&&Y.close()}var i=yi();Et("click",ot.body,n);var o=p(i);ui(o,v=>z(r,v),()=>_(r));var s=w(o,2),l=p(s),f=p(l),a=p(f),u=w(f,2);u.__click=[bi];var c=w(l,2);Yn(c,()=>e.children),A(()=>{se(s,"w-[95vw]",e.large),se(s,"h-[95vh]",e.large),M(a,e.heading)}),oi(3,i,()=>di,()=>({duration:150})),x(t,i),H()}Vt(["click"]);function $(t){const r=["b","KiB","MiB","GiB","TiB","PiB"];let n=t,i=0;for(;n>1024&&r.length>i+1;)n=n/1024,i++;return`${i?n.toFixed(2):n} ${r[i]}`}var xi=T('<span class="text-gray-900"> </span> <span class="text-gray-600"> </span>',1),Ei=Rr('<g><rect shape-rendering="crispEdges" vector-effect="non-scaling-stroke"></rect><foreignObject class="pointer-events-none"><p xmlns="http://www.w3.org/1999/xhtml" class="p-1 size-full text-center text-xs truncate"><!></p></foreignObject><!></g>');function ki(t,e){q(e,!0);const r=20,n=6,i=22,o=O(()=>e.tile.width-n*2),s=O(()=>e.tile.height-n-i),l=O(()=>$(e.content[Nt.type])),f=O(()=>Math.min(e.content[Nt.type]/e.totalBytes*100,100)),a=O(()=>`${e.content.name} - ${_(l)} (${_(f).toFixed(2)}%)`),u=O(()=>Math.round(_(f))+"%"),c=O(()=>e.tile.width>=i*1.75&&e.tile.height>=i),v=O(()=>!pt(e.content)||_(s)<=r||_(o)<=r?[]:e.content.items);var d=Ei(),h=p(d);const g=O(()=>`stroke-gray-500 ${(pt(e.content)?"cursor-zoom-in":"cursor-pointer")??""} svelte-xusoaq`);var b=w(h),k=p(b),E=p(k);P(E,()=>_(c),y=>{var R=xi(),j=I(R),L=p(j),D=w(j,2),W=p(D);A(()=>{M(L,e.content.name),M(W,`- ${_(l)??""}`)}),x(y,R)});var m=w(b);P(m,()=>_(v).length,y=>{var R=O(()=>e.tile.x+n),j=O(()=>e.tile.y+i);jr(y,{get content(){return _(v)},get totalBytes(){return e.totalBytes},get width(){return _(o)},get height(){return _(s)},get xStart(){return _(R)},get yStart(){return _(j)}})}),A(()=>{B(h,"data-tile",e.content.path),B(h,"data-hover",_(a)),B(h,"x",e.tile.x),B(h,"y",e.tile.y),B(h,"width",e.tile.width),B(h,"height",e.tile.height),Xn(h,_(g)),Me(h,"--percentage",_(u)),B(b,"x",e.tile.x),B(b,"y",e.tile.y),B(b,"width",e.tile.width),B(b,"height",e.tile.height)}),x(t,d),H()}class Si{constructor(e,r,n,i=0,o=0){nt(this,"sizes");nt(this,"tiles");nt(this,"xStart");nt(this,"yStart");nt(this,"widthLeft");nt(this,"heightLeft");const s=e.reduce((f,a)=>f+a,0),l=n*r/s;this.sizes=new Float32Array(e.length);for(let f=0;f<e.length;f++)this.sizes[f]=e[f]*l;this.tiles=new Array,this.xStart=i,this.yStart=o,this.widthLeft=r,this.heightLeft=n}layout(e,r,n,i,o){let s=i?this.yStart:this.xStart,l;const f=this.sizes,a=this.tiles;for(let u=e;u<=r;u++)l=f[u]/n,i?a.push({x:this.xStart,y:s,width:n,height:l}):a.push({x:s,y:this.yStart,width:l,height:n}),s+=l,o++;return i?(this.xStart+=n,this.widthLeft-=n):(this.yStart+=n,this.heightLeft-=n),o}calculate(){let e=this.heightLeft<this.widthLeft,r=e?this.heightLeft:this.widthLeft,n=r*r,i=0,o=0,s=this.sizes[0],l=this.sizes[0],f=this.sizes[0],a=0,u=s*s,c=Math.max(n*f/u,u/(n*l));for(let v=1;v<this.sizes.length;v++){const d=this.sizes[v],h=s+d,g=l<d?l:d,b=f>d?f:d,k=h*h,E=Math.max(n*b/k,k/(n*g));(c<=E?1:0)?(a=this.layout(i,o,s/r,e,a),e=this.heightLeft<this.widthLeft,r=e?this.heightLeft:this.widthLeft,n=r*r,i=v,o=v,s=d,l=d,f=d,u=d*d,c=Math.max(n*f/u,u/(n*l))):(o=v,s=h,l=g,f=b,u=k,c=E)}return a=this.layout(i,o,s/r,e,a),this.tiles}}function jr(t,e){q(e,!0);const r=O(()=>Array.isArray(e.content)?Object.values(e.content):[e.content]),n=O(()=>new Si(_(r).map(l=>l[Nt.type]),e.width,e.height,e.xStart,e.yStart).calculate());var i=Jt(),o=I(i);We(o,18,()=>_(n),s=>s,(s,l,f)=>{ki(s,{get tile(){return l},get content(){return _(r)[_(f)]},get totalBytes(){return e.totalBytes}})}),x(t,i),H()}var Oi=Rr('<svg xmlns="http://www.w3.org/2000/svg" role="img"><!></svg>');function Br(t,e){q(e,!0);var r=Jt(),n=I(r);Un(n,()=>[e.content.path,e.width,e.height],i=>{var o=Oi(),s=p(o),l=O(()=>e.width-1),f=O(()=>e.height-1);jr(s,{get content(){return e.content},get totalBytes(){return e.content[Nt.type]},get width(){return _(l)},get height(){return _(f)},xStart:.5,yStart:.5}),A(()=>{B(o,"width",e.width),B(o,"height",e.height)}),x(i,o)}),x(t,r),H()}var Ti=T('<span>Approx. GZIP size</span> <span class="font-bold"> </span>',1),Ni=T('<span>Approx. Brotli size</span> <span class="font-bold"> </span>',1),Mi=T('<div class="mb-4 grid grid-cols-[auto_1fr] gap-x-8"><span>Bundled size</span> <span class="font-bold"> </span> <!> <!></div> <div class="flex-grow overflow-hidden"><!></div>',1);function Ai(t,e){q(e,!0);let r=V(0),n=V(0);pe(t,{get heading(){return e.folder.path},large:!0,children:o=>{var s=Mi(),l=I(s),f=w(p(l),2),a=p(f);A(()=>M(a,$(e.folder.uncompressed)));var u=w(f,2);P(u,()=>e.folder.gzip,h=>{var g=Ti(),b=w(I(g),2),k=p(b);A(()=>M(k,$(e.folder.gzip))),x(h,g)});var c=w(u,2);P(c,()=>e.folder.brotli,h=>{var g=Ni(),b=w(I(g),2),k=p(b);A(()=>M(k,$(e.folder.brotli))),x(h,g)});var v=w(l,2),d=p(v);Br(d,{get content(){return e.folder},get width(){return _(r)},get height(){return _(n)}}),ct(v,"clientWidth",h=>z(r,h)),ct(v,"clientHeight",h=>z(n,h)),x(o,s)},$$slots:{children:!0}}),H()}class Ue{static generate(e,r){return this.processItems(e,r).join(`
|
|
2
|
-
`).trim()}static processItems(e,r=null,n=""){const i=[],o=e.length-1;return e.forEach((s,l)=>{const f=l===o,a=f?"└── ":"├── ",[u,c]=typeof s=="string"?[s,s]:s,v=r==null?void 0:r(u,e);if(i.push(n+a+c),v){const d=f?" ":"│ ";return i.push(...this.processItems(v,r,n+d))}if(f)return i.push(n)}),i}}var zi=T('<span>File format</span> <span class="font-bold"> </span>',1),Di=T('<span>Approx. GZIP size</span> <span class="font-bold"> </span>',1),Pi=T('<span>Approx. Brotli size</span> <span class="font-bold"> </span>',1),Ri=T('<p class="mt-12">This file is in the bundle, because it is:</p> <code class="mt-2 p-4 w-max leading-5 bg-slate-200 rounded overflow-auto min-w-full"><pre> </pre></code>',1),Li=T('<div class="flex flex-col overflow-y-auto"><div class="grid grid-cols-[auto_1fr] gap-x-8"><!> <span>Original file size</span> <span class="font-bold"> </span> <span>Bundled size</span> <span class="font-bold"> </span> <!> <!></div> <!></div>');function Ii(t,e){q(e,!0);const r=O(()=>window.SONDA_JSON_REPORT.inputs[e.file.path]),n=O(()=>{var l;if(_(r))return _(r).format.toUpperCase();const s=(l=window.SONDA_JSON_REPORT.inputs[e.file.path])==null?void 0:l.belongsTo;return s?window.SONDA_JSON_REPORT.inputs[s].format.toUpperCase:"UNKNOWN"});function i(s,l){return l.length>1?[]:Object.entries(window.SONDA_JSON_REPORT.inputs).filter(([,f])=>f.imports.includes(s)).map(([f])=>[f,`imported by ${f}`])}const o=O(()=>{if(!_(r))return null;const s=_(r).belongsTo?[[_(r).belongsTo,`part of the ${_(r).belongsTo} bundle`]]:i(e.file.path,[]);return Ue.generate(s,i)});pe(t,{get heading(){return e.file.path},children:l=>{var f=Li(),a=p(f),u=p(a);P(u,()=>_(n)!=="UNKNOWN",E=>{var m=zi(),y=w(I(m),2),R=p(y);A(()=>M(R,_(n))),x(E,m)});var c=w(u,4),v=p(c);A(()=>{var E;return M(v,$(((E=_(r))==null?void 0:E.bytes)||0))});var d=w(c,4),h=p(d);A(()=>M(h,$(e.file.uncompressed)));var g=w(d,2);P(g,()=>e.file.gzip,E=>{var m=Di(),y=w(I(m),2),R=p(y);A(()=>M(R,$(e.file.gzip))),x(E,m)});var b=w(g,2);P(b,()=>e.file.brotli,E=>{var m=Pi(),y=w(I(m),2),R=p(y);A(()=>M(R,$(e.file.brotli))),x(E,m)});var k=w(a,2);P(k,()=>_(o),E=>{var m=Ri(),y=w(I(m),2),R=p(y),j=p(R);A(()=>M(j,_(o))),x(E,m)}),x(l,f)},$$slots:{children:!0}}),H()}var Ci=T('<p>The following dependencies are duplicated:</p> <code class="mt-2 p-4 w-max leading-5 bg-slate-200 rounded overflow-auto min-w-full"><pre> </pre></code>',1);function ji(t,e){q(e,!0);const r=O(()=>Ue.generate(Array.from($t.keys()),n=>$t.get(n)));pe(t,{heading:"Duplicated modules found in the build",children:i=>{var o=Jt(),s=I(o);P(s,()=>$t.size>0,l=>{var f=Ci(),a=w(I(f),2),u=p(a),c=p(u);A(()=>M(c,_(r))),x(l,f)}),x(i,o)},$$slots:{children:!0}}),H()}var Bi=T('<span>GZIP size</span> <span class="font-bold"> </span>',1),Fi=T('<span>Brotli size</span> <span class="font-bold"> </span>',1),qi=T('<p class="mt-12">Module types</p> <div class="mt-2 h-10 w-[40rem] max-w-full flex rounded-lg overflow-hidden"><div class="bg-yellow-300 h-full"></div> <div class="bg-blue-300 h-full"></div> <div class="bg-gray-200 h-full"></div></div> <div class="flex justify-between mt-2"><div class="flex items-center space-x-2"><div class="inline-block w-4 h-4 bg-yellow-300"></div> <p>ESM: <span class="font-semibold"> </span></p></div> <div class="flex items-center space-x-2"><div class="inline-block w-4 h-4 bg-blue-300"></div> <p>CJS: <span class="font-semibold"> </span></p></div> <div class="flex items-center space-x-2"><div class="inline-block w-4 h-4 bg-gray-300"></div> <p>Unknown: <span class="font-semibold"> </span></p></div></div>',1),Hi=T('<code class="mt-2 p-4 w-max leading-5 bg-slate-200 rounded overflow-auto min-w-full"><pre> </pre></code>'),Wi=T('<div class="flex flex-col overflow-y-auto"><div class="grid grid-cols-[auto_1fr] gap-x-8"><span>Bundled size</span> <span class="font-bold"> </span> <!> <!></div></div> <!> <p class="mt-12">This asset includes <span class="font-semibold"> </span> external dependencies</p> <!>',1);function Ui(t,e){q(e,!0);const r=O(()=>window.SONDA_JSON_REPORT.outputs[e.output.root.name]),n=O(()=>{const a={esm:0,cjs:0,unknown:0},u=window.SONDA_JSON_REPORT.inputs;return Object.entries(_(r).inputs).forEach(([c,v])=>{var h;const d=((h=u[c])==null?void 0:h.format)??"unknown";a[d]+=v.uncompressed}),a}),i=O(()=>Math.round(_(n).esm/_(r).uncompressed*1e4)/100),o=O(()=>Math.round(_(n).cjs/_(r).uncompressed*1e4)/100),s=O(()=>Math.round(_(n).unknown/_(r).uncompressed*1e4)/100),l=O(()=>{const a=/(?:.*node_modules\/)(@[^\/]+\/[^\/]+|[^\/]+)/;return Object.keys(_(r).inputs).map(u=>{var c;return((c=u.match(a))==null?void 0:c[1])??null}).filter((u,c,v)=>u!==null&&v.indexOf(u)===c).sort()}),f=O(()=>Ue.generate(_(l)));pe(t,{get heading(){return e.output.root.name},children:u=>{var c=Wi(),v=I(c),d=p(v),h=w(p(d),2),g=p(h);A(()=>M(g,$(e.output.root.uncompressed)));var b=w(h,2);P(b,()=>e.output.root.gzip,L=>{var D=Bi(),W=w(I(D),2),U=p(W);A(()=>M(U,$(e.output.root.gzip))),x(L,D)});var k=w(b,2);P(k,()=>e.output.root.brotli,L=>{var D=Fi(),W=w(I(D),2),U=p(W);A(()=>M(U,$(e.output.root.brotli))),x(L,D)});var E=w(v,2);P(E,()=>_(s)<100,L=>{var D=qi(),W=w(I(D),2),U=p(W),mt=w(U,2),ge=w(mt,2),Kt=w(W,2),zt=p(Kt),Zt=w(p(zt),2),Yt=w(p(Zt)),Qt=p(Yt),Ge=w(zt,2),Fr=w(p(Ge),2),qr=w(p(Fr)),Hr=p(qr),Wr=w(Ge,2),Ur=w(p(Wr),2),Gr=w(p(Ur)),Vr=p(Gr);A(()=>{B(U,"style",`width: ${_(i)}%`),B(mt,"style",`width: ${_(o)}%`),B(ge,"style",`width: ${_(s)}%`),M(Qt,`${_(i)??""}%`),M(Hr,`${_(o)??""}%`),M(Vr,`${_(s)??""}%`)}),x(L,D)});var m=w(E,2),y=w(p(m)),R=p(y),j=w(m,2);P(j,()=>_(l).length>0,L=>{var D=Hi(),W=p(D),U=p(W);A(()=>M(U,_(f))),x(L,D)}),A(()=>M(R,_(l).length)),x(u,c)},$$slots:{children:!0}}),H()}var Gi=T("<!> <!> <!> <!>",1);function Vi(t,e){q(e,!1),_e();var r=Gi(),n=I(r);P(n,()=>Y.folder,l=>{Ai(l,{get folder(){return Y.folder}})});var i=w(n,2);P(i,()=>Y.file,l=>{Ii(l,{get file(){return Y.file}})});var o=w(i,2);P(o,()=>Y.output,l=>{Ui(l,{get output(){return Y.output}})});var s=w(o,2);P(s,()=>Y.duplicates,l=>{ji(l,{})}),x(t,r),H()}var Ji=(t,e)=>Nt.setType(e()),Ki=T('<button type="button" class="px-4 py-2 text-sm font-medium bg-white hover:bg-gray-100 text-gray-900 border border-gray-300 first:rounded-s-lg last:rounded-e-lg focus:ring-1 focus:ring-blue-300 focus:z-10 svelte-2f0583"> </button>'),Zi=T('<div class="inline-flex space-x-[-1px]" role="group"></div>');function Yi(t,e){q(e,!0);const r=O(()=>X.output.root.gzip>0),n=O(()=>X.output.root.brotli>0),i=O(()=>{const l=[["uncompressed","Uncompressed"]];return _(r)&&l.push(["gzip","GZIP"]),_(n)&&l.push(["brotli","Brotli"]),l});var o=Jt(),s=I(o);P(s,()=>_(i).length>1,l=>{var f=Zi();We(f,21,()=>_(i),([a,u])=>a,(a,u)=>{let c=()=>_(u)[0],v=()=>_(u)[1];var d=Ki();d.__click=[Ji,c];var h=p(d);A(()=>{B(d,"title",`Show the ${v()} file size in diagram`),se(d,"active",c()===Nt.type),M(h,v())}),x(a,d)}),x(l,f)}),x(t,o),H()}Vt(["click"]);function Qi(){Y.open("output",X.output)}var Xi=T('<button title="Show details of the active output" aria-label="Details of the entire build output" class="text-gray-900 bg-white border border-gray-300 focus:outline-none hover:bg-gray-100 focus:ring-1 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 h-10"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-gray-900 pointer-events-none"><path d="M0 0h24v24H0z" stroke="none" shape-rendering="geometricPrecision"></path><path d="M8 5H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.697M18 12V7a2 2 0 0 0-2-2h-2" shape-rendering="geometricPrecision"></path><path d="M8 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v0a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zM8 11h4M8 15h3M14 17.5a2.5 2.5 0 1 0 5 0 2.5 2.5 0 1 0-5 0M18.5 19.5 21 22" shape-rendering="geometricPrecision"></path></svg></button>');function $i(t,e){q(e,!1),_e();var r=Xi();r.__click=[Qi],x(t,r),H()}Vt(["click"]);function to(){Y.open("duplicates",!0)}var eo=T('<button title="See duplicated modules found in the build" aria-label="List of duplicated modules found in the build output" class="text-gray-900 bg-red-50 border border-red-400 focus:outline-none hover:bg-red-100 focus:ring-1 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 h-10"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-red-600"><path stroke="none" d="M0 0h24v24H0z" shape-rendering="geometricPrecision"></path><path d="M3 12a9 9 0 1 0 18 0 9 9 0 0 0-18 0M12 8v4M12 16h.01" shape-rendering="geometricPrecision"></path></svg></button>');function ro(t,e){q(e,!1),_e();var r=Jt(),n=I(r);P(n,()=>$t.size>1,i=>{var o=eo();o.__click=[to],x(i,o)}),x(t,r),H()}Vt(["click"]);function no(t){X.setIndex(Number(t.target.value))}var io=T("<option> </option>"),oo=T('<select class="text-gray-900 bg-white border border-gray-300 focus:outline-none hover:bg-gray-100 focus:ring-1 focus:ring-blue-300 font-medium rounded-lg text-sm pl-4 pr-8 h-10 min-w-80 svelte-yqayp2" title="Select the active output"></select>'),so=T('<div class="flex items-center justify-center space-x-2 max-w-sm"><!></div>');function ao(t,e){q(e,!1),_e();var r=so(),n=p(r);P(n,()=>Pe.length>0,i=>{var o=oo();si(o,()=>X.index);var s;o.__change=[no],We(o,5,()=>Pe,Gn,(l,f,a)=>{var u=io();u.value=(u.__value=a)==null?"":a;var c=p(u);A(()=>M(c,`${a+1}. ${_(f).root.name??""}`)),x(l,u)}),A(()=>{s!==(s=X.index)&&(o.value=(o.__value=X.index)==null?"":X.index,ze(o,X.index))}),x(i,o)}),x(t,r),H()}Vt(["change"]);var lo=T('<a href="https://github.com/filipsobol/sonda" target="_blank" title="Open Sonda repository on GitHub" aria-label="GitHub repository" class="flex items-center text-gray-900 bg-white border border-gray-300 focus:outline-none hover:bg-gray-100 focus:ring-1 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 h-10"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-gray-900 pointer-events-none"><path d="M0 0h24v24H0z" stroke="none" shape-rendering="geometricPrecision"></path><path d="M9 19c-4.3 1.4-4.3-2.5-6-3m12 5v-3.5c0-1 .1-1.4-.5-2 2.8-.3 5.5-1.4 5.5-6a4.6 4.6 0 0 0-1.3-3.2 4.2 4.2 0 0 0-.1-3.2s-1.1-.3-3.5 1.3a12.3 12.3 0 0 0-6.2 0C6.5 2.8 5.4 3.1 5.4 3.1a4.2 4.2 0 0 0-.1 3.2A4.6 4.6 0 0 0 4 9.5c0 4.6 2.7 5.7 5.5 6-.6.6-.6 1.2-.5 2V21" shape-rendering="geometricPrecision"></path></svg></a>');function uo(t){var e=lo();x(t,e)}var fo=T('<div class="flex flex-row p-4 items-center space-y-0 h-16 justify-between bg-gray-50 shadow"><div class="flex flex-row space-x-2"><!> <!> <!></div> <div class="flex flex-row space-x-2"><!> <!></div></div>');function co(t){var e=fo(),r=p(e),n=p(r);ao(n,{});var i=w(n,2);$i(i,{});var o=w(i,2);ro(o,{});var s=w(r,2),l=p(s);Yi(l,{});var f=w(l,2);uo(f),x(t,e)}var vo=T('<div class="flex-grow flex flex-col mt-24 items-center w-full h-full"><svg xmlns="http://www.w3.org/2000/svg" width="96" height="96" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="text-yellow-400 fill-yellow-100"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M12 21a9 9 0 1 1 0 -18a9 9 0 0 1 0 18z"></path><path d="M8 16l1 -1l1.5 1l1.5 -1l1.5 1l1.5 -1l1 1"></path><path d="M8.5 11.5l1.5 -1.5l-1.5 -1.5"></path><path d="M15.5 11.5l-1.5 -1.5l1.5 -1.5"></path></svg> <h2 class="mt-8 text-3xl font-semibold text-gray-800">No data to display</h2> <p class="mt-4 text-lg text-gray-500">Did you enable source maps in the bundler configuration?</p></div>');function ho(t){var e=vo();x(t,e)}var _o=T('<div role="tooltip" class="fixed z-10 px-2 py-1 bg-gray-800 text-gray-100 rounded-md whitespace-nowrap pointer-events-none svelte-1r0gq6x"> </div>');function po(t){let r=V(0),n=V(0),i=V(0),o=V(0),s=V(""),l=V("0px"),f=V("0px");function a({target:v,clientX:d,clientY:h}){z(s,Q(v instanceof Element&&v.getAttribute("data-hover")||"")),_(s)&&(z(l,(d+_(r)+12>_(i)?d-_(r)-12:d+12)+"px"),z(f,(h+_(n)+12>_(o)?h-_(n):h+12)+"px"))}var u=_o();Et("mouseover",ot.body,a),Et("mousemove",ot.body,a),Et("mouseleave",ot.body,()=>z(s,""));var c=p(u);A(()=>{se(u,"invisible",!_(s)),Me(u,"--x",_(l)),Me(u,"--y",_(f)),M(c,_(s))}),ct(ot.body,"clientWidth",v=>z(i,Q(v))),ct(ot.body,"clientHeight",v=>z(o,Q(v))),ct(u,"clientWidth",v=>z(r,v)),ct(u,"clientHeight",v=>z(n,v)),x(t,u)}var go=T('<div role="application" class="wrapper relative flex flex-col overflow-hidden h-screen w-screen"><!> <div class="flex-grow overflow-hidden"><!></div></div> <!> <!>',1);function wo(t,e){q(e,!0);let r=V(0),n=V(0);function i({target:d}){const h=d instanceof Element&&d.getAttribute("data-tile");if(!h)return;const g=X.output.get(h);g&&Y.open(pt(g)?"folder":"file",g)}function o(d){d.key==="Escape"&&(d.stopPropagation(),Y.close())}var s=go();Et("click",ot.body,i),Et("keydown",ot.body,o);var l=I(s),f=p(l);co(f);var a=w(f,2),u=p(a);P(u,()=>X,d=>{Br(d,{get content(){return X.output.root},get width(){return _(r)},get height(){return _(n)}})},d=>{ho(d)});var c=w(l,2);Vi(c,{});var v=w(c,2);po(v),ct(a,"clientWidth",d=>z(r,d)),ct(a,"clientHeight",d=>z(n,d)),x(t,s),H()}Hn(wo,{target:document.getElementById("app")});</script><style rel="stylesheet" crossorigin>rect.svelte-xusoaq{fill:color-mix(in oklch,#fca5a5 var(--percentage),#86efac)}rect.svelte-xusoaq:hover{fill:color-mix(in oklch,#fecaca var(--percentage),#bbf7d0)}button.active.svelte-2f0583,button.active.svelte-2f0583:hover{background-color:#e5e7eb}select.svelte-yqayp2{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%236b7280" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path stroke="none" d="M0 0h24v24H0z"/><path d="m8 9 4-4 4 4M16 15l-4 4-4-4"/></svg>');background-position:right .5rem center;background-repeat:no-repeat}div[role=tooltip].svelte-1r0gq6x{transform:translate(var(--x),var(--y));will-change:transform,contents}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:after,:before{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-10{z-index:10}.mb-4{margin-bottom:1rem}.mr-2{margin-right:.5rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-24{margin-top:6rem}.mt-4{margin-top:1rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.contents{display:contents}.size-full{width:100%;height:100%}.h-10{height:2.5rem}.h-16{height:4rem}.h-4{height:1rem}.h-\[95vh\]{height:95vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-\[95vh\]{max-height:95vh}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-4{width:1rem}.w-\[40rem\]{width:40rem}.w-\[95vw\]{width:95vw}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-screen{width:100vw}.min-w-80{min-width:20rem}.min-w-full{min-width:100%}.max-w-\[95vw\]{max-width:95vw}.max-w-full{max-width:100%}.max-w-sm{max-width:24rem}.flex-grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.cursor-zoom-in{cursor:zoom-in}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-x-8{-moz-column-gap:2rem;column-gap:2rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-\[-1px\]>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(-1px * var(--tw-space-x-reverse));margin-left:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-b-2{border-bottom-width:2px}.border-dashed{border-style:dashed}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-200\/70{background-color:#e5e7ebb3}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242 / var(--tw-bg-opacity))}.bg-slate-200{--tw-bg-opacity:1;background-color:rgb(226 232 240 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-300{--tw-bg-opacity:1;background-color:rgb(253 224 71 / var(--tw-bg-opacity))}.fill-yellow-100{fill:#fef9c3}.stroke-gray-500{stroke:#6b7280}.p-1{padding:.25rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pl-4{padding-left:1rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.text-center{text-align:center}.align-text-bottom{vertical-align:text-bottom}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-5{line-height:1.25rem}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21 / var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / .1),0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgb(0 0 0 / .1),0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}pre{line-height:1.125}.first\:rounded-s-lg:first-child{border-start-start-radius:.5rem;border-end-start-radius:.5rem}.last\:rounded-e-lg:last-child{border-start-end-radius:.5rem;border-end-end-radius:.5rem}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-red-100:hover{--tw-bg-opacity:1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity))}.focus\:z-10:focus{z-index:10}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-blue-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(147 197 253 / var(--tw-ring-opacity))}</style></head><body class="flex w-screen h-screen font-mono"><div id="app" class="flex w-screen min-h-screen"></div></body></html>
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><link rel="icon" href="data:;base64,iVBORw0KGgo="/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Sonda report</title><link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='512' height='512' fill='none'%3E%3Cpath fill='%23FACC15' d='M0 0h512v512H0V0Z'/%3E%3Cpath fill='%23000' d='m264.536 203.704-41.984 89.6-21.504-9.728c-20.139-9.216-35.669-21.504-46.592-36.864-10.923-15.36-16.384-37.717-16.384-67.072 0-37.547 9.728-65.536 29.184-83.968 19.797-18.773 52.395-28.33 97.792-28.672 18.773 0 35.84.853 51.2 2.56s27.648 3.584 36.864 5.632l13.824 2.56-10.24 82.432-12.8-1.536c-8.192-1.024-18.432-1.877-30.72-2.56-12.288-1.024-24.235-1.536-35.84-1.536-12.288 0-21.675 1.877-28.16 5.632-6.144 3.413-9.216 10.069-9.216 19.968 0 5.461 2.219 9.899 6.656 13.312 4.437 3.413 10.411 6.827 17.92 10.24Zm-18.432 100.864 42.496-90.624 22.016 9.728c23.211 10.24 40.107 23.04 50.688 38.4 10.581 15.019 15.872 36.523 15.872 64.512 0 37.888-9.899 67.072-29.696 87.552-19.797 20.48-52.395 30.891-97.792 31.232-22.528 0-43.52-1.536-62.976-4.608-19.456-2.731-36.693-5.973-51.712-9.728l10.24-82.432 12.288 2.048c8.533 1.365 19.797 2.731 33.792 4.096 13.995 1.365 29.355 2.048 46.08 2.048 12.971 0 22.699-1.877 29.184-5.632 6.485-3.755 9.728-9.899 9.728-18.432 0-5.803-1.536-10.411-4.608-13.824-3.072-3.413-8.533-6.827-16.384-10.24l-9.216-4.096Z'/%3E%3C/svg%3E"/><script type="module" crossorigin>var Zr=Object.defineProperty;var Jt=e=>{throw TypeError(e)};var Yr=(e,t,r)=>t in e?Zr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var gt=(e,t,r)=>Yr(e,typeof t!="symbol"?t+"":t,r),wt=(e,t,r)=>t.has(e)||Jt("Cannot "+r);var oe=(e,t,r)=>(wt(e,t,"read from private field"),r?r.call(e):t.get(e)),De=(e,t,r)=>t.has(e)?Jt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),mt=(e,t,r,n)=>(wt(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Kt=(e,t,r)=>(wt(e,t,"access private method"),r);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();window.SONDA_JSON_REPORT=JSON.parse(String.raw`__REPORT_DATA__`);const Qr=!1;var It=Array.isArray,Ct=Array.from,Xr=Object.defineProperty,ze=Object.getOwnPropertyDescriptor,lr=Object.getOwnPropertyDescriptors,$r=Object.prototype,en=Array.prototype,$e=Object.getPrototypeOf;function tn(e){return typeof e=="function"}const Re=()=>{};function rn(e){return e()}function xt(e){for(var t=0;t<e.length;t++)e[t]()}const le=2,ur=4,je=8,lt=16,ne=32,ut=64,me=128,et=256,J=512,_e=1024,Be=2048,se=4096,Fe=8192,fr=16384,qe=32768,nn=1<<18,cr=1<<19,ve=Symbol("$state"),on=Symbol("");function dr(e){return e===this.v}function vr(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function an(e){return!vr(e,this.v)}function sn(e){throw new Error("effect_in_teardown")}function ln(){throw new Error("effect_in_unowned_derived")}function un(e){throw new Error("effect_orphan")}function fn(){throw new Error("effect_update_depth_exceeded")}function cn(){throw new Error("state_descriptors_fixed")}function dn(){throw new Error("state_prototype_fixed")}function vn(){throw new Error("state_unsafe_local_read")}function hn(){throw new Error("state_unsafe_mutation")}function Z(e){return{f:0,v:e,reactions:null,equals:dr,version:0}}function G(e){return pn(Z(e))}function _n(e,t=!1){var n;const r=Z(e);return t||(r.equals=an),L!==null&&L.l!==null&&((n=L.l).s??(n.s=[])).push(r),r}function pn(e){return A!==null&&A.f&le&&(ee===null?Dn([e]):ee.push(e)),e}function z(e,t){return A!==null&&Wt()&&A.f&(le|lt)&&(ee===null||!ee.includes(e))&&hn(),kt(e,t)}function kt(e,t){return e.equals(t)||(e.v=t,e.version=Dr(),hr(e,_e),Wt()&&E!==null&&E.f&J&&!(E.f&ne)&&(H!==null&&H.includes(e)?(ie(E,_e),vt(E)):he===null?Rn([e]):he.push(e))),t}function hr(e,t){var r=e.reactions;if(r!==null)for(var n=Wt(),i=r.length,o=0;o<i;o++){var a=r[o],s=a.f;s&_e||!n&&a===E||(ie(a,t),s&(J|me)&&(s&le?hr(a,Be):vt(a)))}}const Lt=1,jt=2,_r=4,gn=8,wn=16,mn=4,bn=1,yn=2,V=Symbol();let pr=!1;function Q(e,t=null,r){if(typeof e!="object"||e===null||ve in e)return e;const n=$e(e);if(n!==$r&&n!==en)return e;var i=new Map,o=It(e),a=Z(0);o&&i.set("length",Z(e.length));var s;return new Proxy(e,{defineProperty(l,f,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&cn();var c=i.get(f);return c===void 0?(c=Z(u.value),i.set(f,c)):z(c,Q(u.value,s)),!0},deleteProperty(l,f){var u=i.get(f);if(u===void 0)f in l&&i.set(f,Z(V));else{if(o&&typeof f=="string"){var c=i.get("length"),d=Number(f);Number.isInteger(d)&&d<c.v&&z(c,d)}z(u,V),Zt(a)}return!0},get(l,f,u){var h;if(f===ve)return e;var c=i.get(f),d=f in l;if(c===void 0&&(!d||(h=ze(l,f))!=null&&h.writable)&&(c=Z(Q(d?l[f]:V,s)),i.set(f,c)),c!==void 0){var v=_(c);return v===V?void 0:v}return Reflect.get(l,f,u)},getOwnPropertyDescriptor(l,f){var u=Reflect.getOwnPropertyDescriptor(l,f);if(u&&"value"in u){var c=i.get(f);c&&(u.value=_(c))}else if(u===void 0){var d=i.get(f),v=d==null?void 0:d.v;if(d!==void 0&&v!==V)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return u},has(l,f){var v;if(f===ve)return!0;var u=i.get(f),c=u!==void 0&&u.v!==V||Reflect.has(l,f);if(u!==void 0||E!==null&&(!c||(v=ze(l,f))!=null&&v.writable)){u===void 0&&(u=Z(c?Q(l[f],s):V),i.set(f,u));var d=_(u);if(d===V)return!1}return c},set(l,f,u,c){var g;var d=i.get(f),v=f in l;if(o&&f==="length")for(var h=u;h<d.v;h+=1){var p=i.get(h+"");p!==void 0?z(p,V):h in l&&(p=Z(V),i.set(h+"",p))}d===void 0?(!v||(g=ze(l,f))!=null&&g.writable)&&(d=Z(void 0),z(d,Q(u,s)),i.set(f,d)):(v=d.v!==V,z(d,Q(u,s)));var y=Reflect.getOwnPropertyDescriptor(l,f);if(y!=null&&y.set&&y.set.call(c,u),!v){if(o&&typeof f=="string"){var O=i.get("length"),x=Number(f);Number.isInteger(x)&&x>=O.v&&z(O,x+1)}Zt(a)}return!0},ownKeys(l){_(a);var f=Reflect.ownKeys(l).filter(d=>{var v=i.get(d);return v===void 0||v.v!==V});for(var[u,c]of i)c.v!==V&&!(u in l)&&f.push(u);return f},setPrototypeOf(){dn()}})}function Zt(e,t=1){z(e,e.v+t)}function Yt(e){return e!==null&&typeof e=="object"&&ve in e?e[ve]:e}function xn(e,t){return Object.is(Yt(e),Yt(t))}var Qt,ae,gr,wr;function kn(){if(Qt===void 0){Qt=window,ae=document;var e=Element.prototype,t=Node.prototype;gr=ze(t,"firstChild").get,wr=ze(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__e=void 0,Text.prototype.__t=void 0}}function Bt(e=""){return document.createTextNode(e)}function Se(e){return gr.call(e)}function ft(e){return wr.call(e)}function w(e){return Se(e)}function C(e,t){{var r=Se(e);return r instanceof Comment&&r.data===""?ft(r):r}}function m(e,t=1,r=!1){let n=e;for(;t--;)n=ft(n);return n}function En(e){e.textContent=""}function S(e){var t=le|_e;E===null?t|=me:E.f|=cr;const r={children:null,ctx:L,deps:null,equals:dr,f:t,fn:e,reactions:null,v:null,version:0,parent:E};if(A!==null&&A.f&le){var n=A;(n.children??(n.children=[])).push(r)}return r}function mr(e){var t=e.children;if(t!==null){e.children=null;for(var r=0;r<t.length;r+=1){var n=t[r];n.f&le?Ft(n):pe(n)}}}function br(e){var t,r=E;re(e.parent);try{mr(e),t=Rr(e)}finally{re(r)}return t}function yr(e){var t=br(e),r=(xe||e.f&me)&&e.deps!==null?Be:J;ie(e,r),e.equals(t)||(e.v=t,e.version=Dr())}function Ft(e){mr(e),Ce(e,0),ie(e,Fe),e.v=e.children=e.deps=e.ctx=e.reactions=null}function xr(e){E===null&&A===null&&un(),A!==null&&A.f&me&&ln(),Ht&&sn()}function On(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function Ne(e,t,r,n=!0){var i=(e&ut)!==0,o=E,a={ctx:L,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:e|_e,first:null,fn:t,last:null,next:null,parent:i?null:o,prev:null,teardown:null,transitions:null,version:0};if(r){var s=ke;try{$t(!0),dt(a),a.f|=fr}catch(u){throw pe(a),u}finally{$t(s)}}else t!==null&&vt(a);var l=r&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&cr)===0;if(!l&&!i&&n&&(o!==null&&On(a,o),A!==null&&A.f&le)){var f=A;(f.children??(f.children=[])).push(a)}return a}function Sn(e){const t=Ne(je,null,!1);return ie(t,J),t.teardown=e,t}function Xt(e){xr();var t=E!==null&&(E.f&ne)!==0&&L!==null&&!L.m;if(t){var r=L;(r.e??(r.e=[])).push({fn:e,effect:E,reaction:A})}else{var n=Ae(e);return n}}function Tn(e){return xr(),kr(e)}function Nn(e){const t=Ne(ut,e,!0);return()=>{pe(t)}}function Ae(e){return Ne(ur,e,!1)}function kr(e){return Ne(je,e,!0)}function R(e){return He(e)}function He(e,t=0){return Ne(je|lt|t,e,!0)}function we(e,t=!0){return Ne(je|ne,e,!0,t)}function Er(e){var t=e.teardown;if(t!==null){const r=Ht,n=A;er(!0),te(null);try{t.call(null)}finally{er(r),te(n)}}}function Or(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var r=0;r<t.length;r+=1)Ft(t[r])}}function Sr(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){var n=r.next;pe(r,t),r=n}}function An(e){for(var t=e.first;t!==null;){var r=t.next;t.f&ne||pe(t),t=r}}function pe(e,t=!0){var r=!1;if((t||e.f&nn)&&e.nodes_start!==null){for(var n=e.nodes_start,i=e.nodes_end;n!==null;){var o=n===i?null:ft(n);n.remove(),n=o}r=!0}Or(e),Sr(e,t&&!r),Ce(e,0),ie(e,Fe);var a=e.transitions;if(a!==null)for(const l of a)l.stop();Er(e);var s=e.parent;s!==null&&s.first!==null&&Tr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.parent=e.fn=e.nodes_start=e.nodes_end=null}function Tr(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function tt(e,t){var r=[];qt(e,r,!0),Nr(r,()=>{pe(e),t&&t()})}function Nr(e,t){var r=e.length;if(r>0){var n=()=>--r||t();for(var i of e)i.out(n)}else t()}function qt(e,t,r){if(!(e.f&se)){if(e.f^=se,e.transitions!==null)for(const a of e.transitions)(a.is_global||r)&&t.push(a);for(var n=e.first;n!==null;){var i=n.next,o=(n.f&qe)!==0||(n.f&ne)!==0;qt(n,t,o?r:!1),n=i}}}function rt(e){Ar(e,!0)}function Ar(e,t){if(e.f&se){e.f^=se,We(e)&&dt(e);for(var r=e.first;r!==null;){var n=r.next,i=(r.f&qe)!==0||(r.f&ne)!==0;Ar(r,i?t:!1),r=n}if(e.transitions!==null)for(const o of e.transitions)(o.is_global||t)&&o.in()}}let Et=!1,Ot=[];function Mn(){Et=!1;const e=Ot.slice();Ot=[],xt(e)}function ct(e){Et||(Et=!0,queueMicrotask(Mn)),Ot.push(e)}let nt=!1,ke=!1,Ht=!1;function $t(e){ke=e}function er(e){Ht=e}let St=[],Ie=0;let A=null;function te(e){A=e}let E=null;function re(e){E=e}let ee=null;function Dn(e){ee=e}let H=null,K=0,he=null;function Rn(e){he=e}let Mr=0,xe=!1,L=null;function Dr(){return++Mr}function Wt(){return L!==null&&L.l===null}function We(e){var a,s;var t=e.f;if(t&_e)return!0;if(t&Be){var r=e.deps,n=(t&me)!==0;if(r!==null){var i;if(t&et){for(i=0;i<r.length;i++)((a=r[i]).reactions??(a.reactions=[])).push(e);e.f^=et}for(i=0;i<r.length;i++){var o=r[i];if(We(o)&&yr(o),n&&E!==null&&!xe&&!((s=o==null?void 0:o.reactions)!=null&&s.includes(e))&&(o.reactions??(o.reactions=[])).push(e),o.version>e.version)return!0}}n||ie(e,J)}return!1}function Pn(e,t,r){throw e}function Rr(e){var d;var t=H,r=K,n=he,i=A,o=xe,a=ee,s=L,l=e.f;H=null,K=0,he=null,A=l&(ne|ut)?null:e,xe=!ke&&(l&me)!==0,ee=null,L=e.ctx;try{var f=(0,e.fn)(),u=e.deps;if(H!==null){var c;if(Ce(e,K),u!==null&&K>0)for(u.length=K+H.length,c=0;c<H.length;c++)u[K+c]=H[c];else e.deps=u=H;if(!xe)for(c=K;c<u.length;c++)((d=u[c]).reactions??(d.reactions=[])).push(e)}else u!==null&&K<u.length&&(Ce(e,K),u.length=K);return f}finally{H=t,K=r,he=n,A=i,xe=o,ee=a,L=s}}function zn(e,t){let r=t.reactions;if(r!==null){var n=r.indexOf(e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}r===null&&t.f&le&&(H===null||!H.includes(t))&&(ie(t,Be),t.f&(me|et)||(t.f^=et),Ce(t,0))}function Ce(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)zn(e,r[n])}function dt(e){var t=e.f;if(!(t&Fe)){ie(e,J);var r=E;E=e;try{Or(e),t<?An(e):Sr(e),Er(e);var n=Rr(e);e.teardown=typeof n=="function"?n:null,e.version=Mr}catch(i){Pn(i)}finally{E=r}}}function In(){Ie>1e3&&(Ie=0,fn()),Ie++}function Cn(e){var t=e.length;if(t!==0){In();var r=ke;ke=!0;try{for(var n=0;n<t;n++){var i=e[n];i.f&J||(i.f^=J);var o=[];Pr(i,o),Ln(o)}}finally{ke=r}}}function Ln(e){var t=e.length;if(t!==0)for(var r=0;r<t;r++){var n=e[r];!(n.f&(Fe|se))&&We(n)&&(dt(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?Tr(n):n.fn=null))}}function jn(){if(nt=!1,Ie>1001)return;const e=St;St=[],Cn(e),nt||(Ie=0)}function vt(e){nt||(nt=!0,queueMicrotask(jn));for(var t=e;t.parent!==null;){t=t.parent;var r=t.f;if(r&(ut|ne)){if(!(r&J))return;t.f^=J}}St.push(t)}function Pr(e,t){var r=e.first,n=[];e:for(;r!==null;){var i=r.f,o=(i&ne)!==0,a=o&&(i&J)!==0;if(!a&&!(i&se))if(i&je){o?r.f^=J:We(r)&&dt(r);var s=r.first;if(s!==null){r=s;continue}}else i&ur&&n.push(r);var l=r.next;if(l===null){let c=r.parent;for(;c!==null;){if(e===c)break e;var f=c.next;if(f!==null){r=f;continue e}c=c.parent}}r=l}for(var u=0;u<n.length;u++)s=n[u],t.push(s),Pr(s,t)}function _(e){var s;var t=e.f,r=(t&le)!==0;if(r&&t&Fe){var n=br(e);return Ft(e),n}if(A!==null){ee!==null&&ee.includes(e)&&vn();var i=A.deps;H===null&&i!==null&&i[K]===e?K++:H===null?H=[e]:H.push(e),he!==null&&E!==null&&E.f&J&&!(E.f&ne)&&he.includes(e)&&(ie(E,_e),vt(E))}else if(r&&e.deps===null){var o=e,a=o.parent;a!==null&&!((s=a.deriveds)!=null&&s.includes(o))&&(a.deriveds??(a.deriveds=[])).push(o)}return r&&(o=e,We(o)&&yr(o)),e.v}function Ue(e){const t=A;try{return A=null,e()}finally{A=t}}const Bn=~(_e|Be|J);function ie(e,t){e.f=e.f&Bn|t}function W(e,t=!1,r){L={p:L,c:null,e:null,m:!1,s:e,x:null,l:null},t||(L.l={s:null,u:null,r1:[],r2:Z(!1)})}function U(e){const t=L;if(t!==null){const a=t.e;if(a!==null){var r=E,n=A;t.e=null;try{for(var i=0;i<a.length;i++){var o=a[i];re(o.effect),te(o.reaction),Ae(o.fn)}}finally{re(r),te(n)}}L=t.p,t.m=!0}return{}}function Fn(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(ve in e)Tt(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&ve in r&&Tt(r)}}}function Tt(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Tt(e[n],t)}catch{}const r=$e(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=lr(r);for(let i in n){const o=n[i].get;if(o)try{o.call(e)}catch{}}}}}const zr=new Set,Nt=new Set;function qn(e,t,r,n){function i(o){if(n.capture||Pe.call(t,o),!o.cancelBubble){var a=A,s=E;te(null),re(null);try{return r.call(this,o)}finally{te(a),re(s)}}}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?ct(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function Ee(e,t,r,n,i){var o={capture:n,passive:i},a=qn(e,t,r,o);(t===document.body||t===window||t===document)&&Sn(()=>{t.removeEventListener(e,a,o)})}function Ve(e){for(var t=0;t<e.length;t++)zr.add(e[t]);for(var r of Nt)r(e)}function Pe(e){var x;var t=this,r=t.ownerDocument,n=e.type,i=((x=e.composedPath)==null?void 0:x.call(e))||[],o=i[0]||e.target,a=0,s=e.__root;if(s){var l=i.indexOf(s);if(l!==-1&&(t===document||t===window)){e.__root=t;return}var f=i.indexOf(t);if(f===-1)return;l<=f&&(a=l)}if(o=i[a]||e.target,o!==t){Xr(e,"currentTarget",{configurable:!0,get(){return o||r}});var u=A,c=E;te(null),re(null);try{for(var d,v=[];o!==null;){var h=o.assignedSlot||o.parentNode||o.host||null;try{var p=o["__"+n];if(p!==void 0&&!o.disabled)if(It(p)){var[y,...O]=p;y.apply(o,[e,...O])}else p.call(o,e)}catch(g){d?v.push(g):d=g}if(e.cancelBubble||h===t||h===null)break;o=h}if(d){for(let g of v)queueMicrotask(()=>{throw g});throw d}}finally{e.__root=t,delete e.currentTarget,te(u),re(c)}}}function Ir(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function it(e,t){var r=E;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function N(e,t){var r=(t&bn)!==0,n=(t&yn)!==0,i,o=!e.startsWith("<!>");return()=>{i===void 0&&(i=Ir(o?e:"<!>"+e),r||(i=Se(i)));var a=n?document.importNode(i,!0):i.cloneNode(!0);if(r){var s=Se(a),l=a.lastChild;it(s,l)}else it(a,a);return a}}function Cr(e,t,r="svg"){var n=!e.startsWith("<!>"),i=`<${r}>${n?e:"<!>"+e}</${r}>`,o;return()=>{if(!o){var a=Ir(i),s=Se(a);o=Se(s)}var l=o.cloneNode(!0);return it(l,l),l}}function Ge(){var e=document.createDocumentFragment(),t=document.createComment(""),r=Bt();return e.append(t,r),it(t,r),e}function k(e,t){e!==null&&e.before(t)}const Hn=["touchstart","touchmove"];function Wn(e){return Hn.includes(e)}let At=!0;function D(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=r,e.nodeValue=r==null?"":r+"")}function Un(e,t){return Vn(e,t)}const ye=new Map;function Vn(e,{target:t,anchor:r,props:n={},events:i,context:o,intro:a=!0}){kn();var s=new Set,l=c=>{for(var d=0;d<c.length;d++){var v=c[d];if(!s.has(v)){s.add(v);var h=Wn(v);t.addEventListener(v,Pe,{passive:h});var p=ye.get(v);p===void 0?(document.addEventListener(v,Pe,{passive:h}),ye.set(v,1)):ye.set(v,p+1)}}};l(Ct(zr)),Nt.add(l);var f=void 0,u=Nn(()=>{var c=r??t.appendChild(Bt());return we(()=>{if(o){W({});var d=L;d.c=o}i&&(n.$$events=i),At=a,f=e(c,n)||{},At=!0,o&&U()}),()=>{var h;for(var d of s){t.removeEventListener(d,Pe);var v=ye.get(d);--v===0?(document.removeEventListener(d,Pe),ye.delete(d)):ye.set(d,v)}Nt.delete(l),tr.delete(f),c!==r&&((h=c.parentNode)==null||h.removeChild(c))}});return tr.set(f,u),f}let tr=new WeakMap;function I(e,t,r,n=null,i=!1){var o=e,a=null,s=null,l=null,f=i?qe:0;He(()=>{l!==(l=!!t())&&(l?(a?rt(a):a=we(()=>r(o)),s&&tt(s,()=>{s=null})):(s?rt(s):n&&(s=we(()=>n(o))),a&&tt(a,()=>{a=null})))},f)}function Gn(e,t,r){var n=e,i=V,o;He(()=>{vr(i,i=t())&&(o&&tt(o),o=we(()=>r(n)))})}let bt=null;function Jn(e,t){return t}function Kn(e,t,r,n){for(var i=[],o=t.length,a=0;a<o;a++)qt(t[a].e,i,!0);var s=o>0&&i.length===0&&r!==null;if(s){var l=r.parentNode;En(l),l.append(r),n.clear(),ue(e,t[0].prev,t[o-1].next)}Nr(i,()=>{for(var f=0;f<o;f++){var u=t[f];s||(n.delete(u.k),ue(e,u.prev,u.next)),pe(u.e,!s)}})}function Ut(e,t,r,n,i,o=null){var a=e,s={flags:t,items:new Map,first:null},l=(t&_r)!==0;if(l){var f=e;a=f.appendChild(Bt())}var u=null,c=!1;He(()=>{var d=r(),v=It(d)?d:d==null?[]:Ct(d),h=v.length;c&&h===0||(c=h===0,Zn(v,s,a,i,t,n),o!==null&&(h===0?u?rt(u):u=we(()=>o(a)):u!==null&&tt(u,()=>{u=null})),r())})}function Zn(e,t,r,n,i,o){var Je,Me,Ke,Ze;var a=(i&gn)!==0,s=(i&(Lt|jt))!==0,l=e.length,f=t.items,u=t.first,c=u,d,v=null,h,p=[],y=[],O,x,g,b;if(a)for(b=0;b<l;b+=1)O=e[b],x=o(O,b),g=f.get(x),g!==void 0&&((Je=g.a)==null||Je.measure(),(h??(h=new Set)).add(g));for(b=0;b<l;b+=1){if(O=e[b],x=o(O,b),g=f.get(x),g===void 0){var T=c?c.e.nodes_start:r;v=Qn(T,t,v,v===null?t.first:v.next,O,x,b,n,i),f.set(x,v),p=[],y=[],c=v.next;continue}if(s&&Yn(g,O,b,i),g.e.f&se&&(rt(g.e),a&&((Me=g.a)==null||Me.unfix(),(h??(h=new Set)).delete(g))),g!==c){if(d!==void 0&&d.has(g)){if(p.length<y.length){var j=y[0],P;v=j.prev;var M=p[0],F=p[p.length-1];for(P=0;P<p.length;P+=1)rr(p[P],j,r);for(P=0;P<y.length;P+=1)d.delete(y[P]);ue(t,M.prev,F.next),ue(t,v,M),ue(t,F,j),c=j,v=F,b-=1,p=[],y=[]}else d.delete(g),rr(g,c,r),ue(t,g.prev,g.next),ue(t,g,v===null?t.first:v.next),ue(t,v,g),v=g;continue}for(p=[],y=[];c!==null&&c.k!==x;)c.e.f&se||(d??(d=new Set)).add(c),y.push(c),c=c.next;if(c===null)continue;g=c}p.push(g),v=g,c=g.next}if(c!==null||d!==void 0){for(var B=d===void 0?[]:Ct(d);c!==null;)c.e.f&se||B.push(c),c=c.next;var be=B.length;if(be>0){var pt=i&_r&&l===0?r:null;if(a){for(b=0;b<be;b+=1)(Ke=B[b].a)==null||Ke.measure();for(b=0;b<be;b+=1)(Ze=B[b].a)==null||Ze.fix()}Kn(t,B,pt,f)}}a&&ct(()=>{var Ye;if(h!==void 0)for(g of h)(Ye=g.a)==null||Ye.apply()}),E.first=t.first&&t.first.e,E.last=v&&v.e}function Yn(e,t,r,n){n&Lt&&kt(e.v,t),n&jt?kt(e.i,r):e.i=r}function Qn(e,t,r,n,i,o,a,s,l){var f=bt;try{var u=(l&Lt)!==0,c=(l&wn)===0,d=u?c?_n(i):Z(i):i,v=l&jt?Z(a):a,h={i:v,v:d,k:o,a:null,e:null,prev:r,next:n};return bt=h,h.e=we(()=>s(e,d,v),pr),h.e.prev=r&&r.e,h.e.next=n&&n.e,r===null?t.first=h:(r.next=h,r.e.next=h.e),n!==null&&(n.prev=h,n.e.prev=h.e),h}finally{bt=f}}function rr(e,t,r){for(var n=e.next?e.next.e.nodes_start:r,i=t?t.e.nodes_start:r,o=e.e.nodes_start;o!==n;){var a=ft(o);i.before(o),o=a}}function ue(e,t,r){t===null?e.first=r:(t.next=r,t.e.next=r&&r.e),r!==null&&(r.prev=t,r.e.prev=t&&t.e)}function Xn(e,t,...r){var n=e,i=Re,o;He(()=>{i!==(i=t())&&(o&&(pe(o),o=null),o=we(()=>i(n,...r)))},qe)}function q(e,t,r,n){var i=e.__attributes??(e.__attributes={});i[t]!==(i[t]=r)&&(t==="loading"&&(e[on]=r),r==null?e.removeAttribute(t):typeof r!="string"&&$n(e).includes(t)?e[t]=r:e.setAttribute(t,r))}var nr=new Map;function $n(e){var t=nr.get(e.nodeName);if(t)return t;nr.set(e.nodeName,t=[]);for(var r,n=$e(e),i=Element.prototype;i!==n;){r=lr(n);for(var o in r)r[o].set&&t.push(o);n=$e(n)}return t}function ei(e,t){var r=e.__className,n=ti(t);(r!==n||pr)&&(n===""?e.removeAttribute("class"):e.setAttribute("class",n),e.__className=n)}function ti(e){return e??""}function ot(e,t,r){if(r){if(e.classList.contains(t))return;e.classList.add(t)}else{if(!e.classList.contains(t))return;e.classList.remove(t)}}function Mt(e,t,r,n,i){var o=e.__attributes??(e.__attributes={}),a=e.style,s="style-"+t;o[s]===r&&!i||(o[s]=r,r==null?a.removeProperty(t):a.setProperty(t,r,""))}const ri=requestAnimationFrame,ni=()=>performance.now(),ce={tick:e=>ri(e),now:()=>ni(),tasks:new Set};function Lr(e){ce.tasks.forEach(t=>{t.c(e)||(ce.tasks.delete(t),t.f())}),ce.tasks.size!==0&&ce.tick(Lr)}function ii(e){let t;return ce.tasks.size===0&&ce.tick(Lr),{promise:new Promise(r=>{ce.tasks.add(t={c:e,f:r})}),abort(){ce.tasks.delete(t)}}}function Qe(e,t){e.dispatchEvent(new CustomEvent(t))}function oi(e){if(e==="float")return"cssFloat";if(e==="offset")return"cssOffset";if(e.startsWith("--"))return e;const t=e.split("-");return t.length===1?t[0]:t[0]+t.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("")}function ir(e){const t={},r=e.split(";");for(const n of r){const[i,o]=n.split(":");if(!i||o===void 0)break;const a=oi(i.trim());t[a]=o.trim()}return t}const ai=e=>e;function si(e,t,r,n){var i=(e&mn)!==0,o="both",a,s=t.inert,l,f;function u(){var p=A,y=E;te(null),re(null);try{return a??(a=r()(t,(n==null?void 0:n())??{},{direction:o}))}finally{te(p),re(y)}}var c={is_global:i,in(){t.inert=s,Qe(t,"introstart"),l=Dt(t,u(),f,1,()=>{Qe(t,"introend"),l==null||l.abort(),l=a=void 0})},out(p){t.inert=!0,Qe(t,"outrostart"),f=Dt(t,u(),l,0,()=>{Qe(t,"outroend"),p==null||p()})},stop:()=>{l==null||l.abort(),f==null||f.abort()}},d=E;if((d.transitions??(d.transitions=[])).push(c),At){var v=i;if(!v){for(var h=d.parent;h&&h.f&qe;)for(;(h=h.parent)&&!(h.f<););v=!h||(h.f&fr)!==0}v&&Ae(()=>{Ue(()=>c.in())})}}function Dt(e,t,r,n,i){var o=n===1;if(tn(t)){var a,s=!1;return ct(()=>{if(!s){var y=t({direction:o?"in":"out"});a=Dt(e,y,r,n,i)}}),{abort:()=>{s=!0,a==null||a.abort()},deactivate:()=>a.deactivate(),reset:()=>a.reset(),t:()=>a.t()}}if(r==null||r.deactivate(),!(t!=null&&t.duration))return i(),{abort:Re,deactivate:Re,reset:Re,t:()=>n};const{delay:l=0,css:f,tick:u,easing:c=ai}=t;var d=[];if(o&&r===void 0&&(u&&u(0,1),f)){var v=ir(f(0,1));d.push(v,v)}var h=()=>1-n,p=e.animate(d,{duration:l});return p.onfinish=()=>{var y=(r==null?void 0:r.t())??1-n;r==null||r.abort();var O=n-y,x=t.duration*Math.abs(O),g=[];if(x>0){if(f)for(var b=Math.ceil(x/16.666666666666668),T=0;T<=b;T+=1){var j=y+O*c(T/b),P=f(j,1-j);g.push(ir(P))}h=()=>{var M=p.currentTime;return y+O*c(M/x)},u&&ii(()=>{if(p.playState!=="running")return!1;var M=h();return u(M,1-M),!0})}p=e.animate(g,{duration:x,fill:"forwards"}),p.onfinish=()=>{h=()=>n,u==null||u(n,1-n),i()}},{abort:()=>{p&&(p.cancel(),p.effect=null)},deactivate:()=>{i=Re},reset:()=>{n===0&&(u==null||u(1,0))},t:()=>h()}}function Rt(e,t,r){if(e.multiple)return ui(e,t);for(var n of e.options){var i=jr(n);if(xn(i,t)){n.selected=!0;return}}(!r||t!==void 0)&&(e.selectedIndex=-1)}function li(e,t){let r=!0;Ae(()=>{t&&Rt(e,Ue(t),r),r=!1;var n=new MutationObserver(()=>{var i=e.__value;Rt(e,i)});return n.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),()=>{n.disconnect()}})}function ui(e,t){for(var r of e.options)r.selected=~t.indexOf(jr(r))}function jr(e){return"__value"in e?e.__value:e.value}var fe,Oe,Le,at,Br;const st=class st{constructor(t){De(this,at);De(this,fe,new WeakMap);De(this,Oe);De(this,Le);mt(this,Le,t)}observe(t,r){var n=oe(this,fe).get(t)||new Set;return n.add(r),oe(this,fe).set(t,n),Kt(this,at,Br).call(this).observe(t,oe(this,Le)),()=>{var i=oe(this,fe).get(t);i.delete(r),i.size===0&&(oe(this,fe).delete(t),oe(this,Oe).unobserve(t))}}};fe=new WeakMap,Oe=new WeakMap,Le=new WeakMap,at=new WeakSet,Br=function(){return oe(this,Oe)??mt(this,Oe,new ResizeObserver(t=>{for(var r of t){st.entries.set(r.target,r);for(var n of oe(this,fe).get(r.target)||[])n(r)}}))},gt(st,"entries",new WeakMap);let Pt=st;var fi=new Pt({box:"border-box"});function de(e,t,r){var n=fi.observe(e,()=>r(e[t]));Ae(()=>(Ue(()=>r(e[t])),n))}function or(e,t){return e===t||(e==null?void 0:e[ve])===t}function ci(e={},t,r,n){return Ae(()=>{var i,o;return kr(()=>{i=o,o=[],Ue(()=>{e!==r(...o)&&(t(e,...o),i&&or(r(...i),e)&&t(null,...i))})}),()=>{ct(()=>{o&&or(r(...o),e)&&t(null,...o)})}}),e}function ht(e=!1){const t=L,r=t.l.u;if(!r)return;let n=()=>Fn(t.s);if(e){let i=0,o={};const a=S(()=>{let s=!1;const l=t.s;for(const f in l)l[f]!==o[f]&&(o[f]=l[f],s=!0);return s&&i++,i});n=()=>_(a)}r.b.length&&Tn(()=>{ar(t,n),xt(r.b)}),Xt(()=>{const i=Ue(()=>r.m.map(rn));return()=>{for(const o of i)typeof o=="function"&&o()}}),r.a.length&&Xt(()=>{ar(t,n),xt(r.a)})}function ar(e,t){if(e.l.s)for(const r of e.l.s)_(r);t()}const di="5";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(di);const vi=e=>e;function hi(e,{delay:t=0,duration:r=400,easing:n=vi}={}){const i=+getComputedStyle(e).opacity;return{delay:t,duration:r,easing:n,css:o=>`opacity: ${o*i}`}}function _i(){let e=G("uncompressed");return{get type(){return _(e)},setType(t){z(e,Q(t))}}}function pi(){let e=Q({file:null,folder:null,output:null,duplicates:null}),t=Q([]);return{get file(){return e.file},get folder(){return e.folder},get output(){return e.output},get duplicates(){return e.duplicates},open(r,n){t.push(r),e[r]=n},close(){t.length!==0&&(e[t.pop()]=null)}}}function gi(e){return Object.entries(e.outputs).map(([t,r])=>{const n=new wi;return Object.entries(r.inputs).forEach(([i,o])=>n.insert(i,o)),n.root.name=t,n.root.uncompressed=r.uncompressed,n.root.gzip=r.gzip,n.root.brotli=r.brotli,n.optimize(),n})}function ge(e){return"items"in e}class wi{constructor(){gt(this,"root");this.root=this.createNode("","")}createNode(t,r){return{name:t,path:r,uncompressed:0,gzip:0,brotli:0,items:[]}}insert(t,r){const n=t.split("/"),i=n.pop();let o=this.root;n.forEach(a=>{let s=o.items.find(l=>ge(l)&&l.name===a);s||(s=this.createNode(a,o.path?`${o.path}/${a}`:a),o.items.push(s)),o=s,o.uncompressed+=r.uncompressed,o.gzip+=r.gzip,o.brotli+=r.brotli}),o.items.push({name:i,path:o.path?`${o.path}/${i}`:i,uncompressed:r.uncompressed,gzip:r.gzip,brotli:r.brotli})}optimize(){const t=[this.root];for(;t.length;){const r=t.pop();for(;r.items.length===1&&ge(r.items[0]);){const n=r.items[0];r.name=`${r.name}/${n.name}`,r.path=n.path,r.items=n.items}r.items.sort((n,i)=>i.uncompressed-n.uncompressed),r.items.forEach(n=>ge(n)&&t.push(n))}}get(t){let r=this.root;for(;r&&r.path!==t;)r=ge(r)&&r.items.find(n=>t.startsWith(n.path))||null;return r}}const zt=gi(window.SONDA_JSON_REPORT);function mi(){let e=G(0);const t=S(()=>zt.at(_(e)));return{get index(){return _(e)},get output(){return _(t)},setIndex(r){z(e,Q(r))}}}const bi=/(.*)(?:.*node_modules\/)(@[^\/]+\/[^\/]+|[^\/]+)/,yi=Object.keys(window.SONDA_JSON_REPORT.inputs).map(e=>bi.exec(e)).filter(e=>e!==null).reduce((e,t)=>{const[r,,n]=t;return e.has(n)||e.set(n,new Set),e.get(n).add(r),e},new Map),Xe=new Map(Array.from(yi).filter(([,e])=>e.size>1).map(([e,t])=>[e,Array.from(t)])),X=mi(),Te=_i(),Y=pi();var xi=()=>Y.close(),ki=N('<div class="fixed top-0 right-0 left-0 bottom-0 flex justify-center items-center"><div class="fixed bg-gray-200/70 w-full h-full backdrop-blur-sm" aria-hidden="true"></div> <div class="bg-white relative flex flex-col rounded-lg border p-6 shadow-lg overflow-hidden max-h-[95vh] max-w-[95vw]"><div class="mb-4"><h2 class="py-2 pr-6 block align-text-bottom font-semibold leading-none tracking-tight text-base border-b-2 border-gray-300 border-dashed"> </h2> <button aria-label="Close dialog" class="absolute top-0 right-0 mt-2 mr-2 flex justify-center items-center border border-transparent rounded-full w-10 h-10 text-gray-600 hover:text-gray-900"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M0 0h24v24H0z" stroke="none"></path><path d="M18 6 6 18M6 6l12 12"></path></svg></button></div> <!></div></div>');function _t(e,t){W(t,!0);let r=G(void 0);function n(d){d.target===_(r)&&Y.close()}var i=ki();Ee("click",ae.body,n);var o=w(i);ci(o,d=>z(r,d),()=>_(r));var a=m(o,2),s=w(a),l=w(s),f=w(l),u=m(l,2);u.__click=[xi];var c=m(s,2);Xn(c,()=>t.children),R(()=>{ot(a,"w-[95vw]",t.large),ot(a,"h-[95vh]",t.large),D(f,t.heading)}),si(3,i,()=>hi,()=>({duration:150})),k(e,i),U()}Ve(["click"]);function $(e){const r=["b","KiB","MiB","GiB","TiB","PiB"];let n=e,i=0;for(;n>1024&&r.length>i+1;)n=n/1024,i++;return`${i?n.toFixed(2):n} ${r[i]}`}var Ei=N('<span class="text-gray-900"> </span> <span class="text-gray-600"> </span>',1),Oi=Cr('<g><rect shape-rendering="crispEdges" vector-effect="non-scaling-stroke"></rect><foreignObject class="pointer-events-none"><p xmlns="http://www.w3.org/1999/xhtml" class="p-1 size-full text-center text-xs truncate"><!></p></foreignObject><!></g>');function Si(e,t){W(t,!0);const r=20,n=6,i=22,o=S(()=>t.tile.width-n*2),a=S(()=>t.tile.height-n-i),s=S(()=>$(t.content[Te.type])),l=S(()=>Math.min(t.content[Te.type]/t.totalBytes*100,100)),f=S(()=>`${t.content.name} - ${_(s)} (${_(l).toFixed(2)}%)`),u=S(()=>Math.round(_(l))+"%"),c=S(()=>t.tile.width>=i*1.75&&t.tile.height>=i),d=S(()=>!ge(t.content)||_(a)<=r||_(o)<=r?[]:t.content.items);var v=Oi(),h=w(v);const p=S(()=>`stroke-gray-500 ${(ge(t.content)?"cursor-zoom-in":"cursor-pointer")??""} svelte-xusoaq`);var y=m(h),O=w(y),x=w(O);I(x,()=>_(c),b=>{var T=Ei(),j=C(T),P=w(j),M=m(j,2),F=w(M);R(()=>{D(P,t.content.name),D(F,`- ${_(s)??""}`)}),k(b,T)});var g=m(y);I(g,()=>_(d).length,b=>{var T=S(()=>t.tile.x+n),j=S(()=>t.tile.y+i);Fr(b,{get content(){return _(d)},get totalBytes(){return t.totalBytes},get width(){return _(o)},get height(){return _(a)},get xStart(){return _(T)},get yStart(){return _(j)}})}),R(()=>{q(h,"data-tile",t.content.path),q(h,"data-hover",_(f)),q(h,"x",t.tile.x),q(h,"y",t.tile.y),q(h,"width",t.tile.width),q(h,"height",t.tile.height),ei(h,_(p)),Mt(h,"--percentage",_(u)),q(y,"x",t.tile.x),q(y,"y",t.tile.y),q(y,"width",t.tile.width),q(y,"height",t.tile.height)}),k(e,v),U()}function Ti(e,t,r,n=0,i=0){const o=[],a=new Float32Array(e.length),s=e.reduce((b,T)=>b+T,0),l=t*r/s;for(let b=0;b<e.length;b++)a[b]=e[b]*l;let f=n,u=i,c=t,d=r,v=c>=d,h=v?d:c,p=0,y=a[0],O=a[0],x=a[0],g=yt(h,y,O,x);for(let b=1;b<a.length;b++){const T=a[b],j=y+T,P=Math.min(O,T),M=Math.max(x,T),F=yt(h,j,P,M);if(g<F){sr(a,p,b-1,y/h,v,f,u,o);const B=y/h;v?(f+=B,c-=B):(u+=B,d-=B),v=c>=d,h=v?d:c,p=b,y=T,O=T,x=T,g=yt(h,y,O,x)}else y=j,O=P,x=M,g=F}return sr(a,p,a.length-1,y/h,v,f,u,o),o}function yt(e,t,r,n){const i=e*e,o=t*t;return Math.max(i*n/o,o/(i*r))}function sr(e,t,r,n,i,o,a,s){let l=i?a:o;for(let f=t;f<=r;f++){const c=e[f]/n;i?s.push({x:o,y:l,width:n,height:c}):s.push({x:l,y:a,width:c,height:n}),l+=c}}function Fr(e,t){W(t,!0);const r=S(()=>Array.isArray(t.content)?Object.values(t.content):[t.content]),n=S(()=>Ti(_(r).map(a=>a[Te.type]),t.width,t.height,t.xStart,t.yStart));var i=Ge(),o=C(i);Ut(o,18,()=>_(n),a=>a,(a,s,l)=>{Si(a,{get tile(){return s},get content(){return _(r)[_(l)]},get totalBytes(){return t.totalBytes}})}),k(e,i),U()}var Ni=Cr('<svg xmlns="http://www.w3.org/2000/svg" role="img"><!></svg>');function qr(e,t){W(t,!0);var r=Ge(),n=C(r);Gn(n,()=>[t.content.path,t.width,t.height],i=>{var o=Ni(),a=w(o),s=S(()=>t.width-1),l=S(()=>t.height-1);Fr(a,{get content(){return t.content},get totalBytes(){return t.content[Te.type]},get width(){return _(s)},get height(){return _(l)},xStart:.5,yStart:.5}),R(()=>{q(o,"width",t.width),q(o,"height",t.height)}),k(i,o)}),k(e,r),U()}var Ai=N('<span>Approx. GZIP size</span> <span class="font-bold"> </span>',1),Mi=N('<span>Approx. Brotli size</span> <span class="font-bold"> </span>',1),Di=N('<div class="mb-4 grid grid-cols-[auto_1fr] gap-x-8"><span>Bundled size</span> <span class="font-bold"> </span> <!> <!></div> <div class="flex-grow overflow-hidden"><!></div>',1);function Ri(e,t){W(t,!0);let r=G(0),n=G(0);_t(e,{get heading(){return t.folder.path},large:!0,children:o=>{var a=Di(),s=C(a),l=m(w(s),2),f=w(l);R(()=>D(f,$(t.folder.uncompressed)));var u=m(l,2);I(u,()=>t.folder.gzip,h=>{var p=Ai(),y=m(C(p),2),O=w(y);R(()=>D(O,$(t.folder.gzip))),k(h,p)});var c=m(u,2);I(c,()=>t.folder.brotli,h=>{var p=Mi(),y=m(C(p),2),O=w(y);R(()=>D(O,$(t.folder.brotli))),k(h,p)});var d=m(s,2),v=w(d);qr(v,{get content(){return t.folder},get width(){return _(r)},get height(){return _(n)}}),de(d,"clientWidth",h=>z(r,h)),de(d,"clientHeight",h=>z(n,h)),k(o,a)},$$slots:{default:!0}}),U()}class Vt{static generate(t,r){return this.processItems(t,r).join(`
|
|
2
|
+
`).trim()}static processItems(t,r=null,n=""){const i=[],o=t.length-1;return t.forEach((a,s)=>{const l=s===o,f=l?"└── ":"├── ",[u,c]=typeof a=="string"?[a,a]:a,d=r==null?void 0:r(u,t);if(i.push(n+f+c),d){const v=l?" ":"│ ";return i.push(...this.processItems(d,r,n+v))}if(l)return i.push(n)}),i}}var Pi=N('<span>File format</span> <span class="font-bold"> </span>',1),zi=N('<span>Approx. GZIP size</span> <span class="font-bold"> </span>',1),Ii=N('<span>Approx. Brotli size</span> <span class="font-bold"> </span>',1),Ci=N('<p class="mt-12">This file is in the bundle, because it is:</p> <code class="mt-2 p-4 w-max leading-5 bg-slate-200 rounded overflow-auto min-w-full"><pre> </pre></code>',1),Li=N('<div class="flex flex-col overflow-y-auto"><div class="grid grid-cols-[auto_1fr] gap-x-8"><!> <span>Original file size</span> <span class="font-bold"> </span> <span>Bundled size</span> <span class="font-bold"> </span> <!> <!></div> <!></div>');function ji(e,t){W(t,!0);const r=S(()=>window.SONDA_JSON_REPORT.inputs[t.file.path]),n=S(()=>{var s;if(_(r))return _(r).format.toUpperCase();const a=(s=window.SONDA_JSON_REPORT.inputs[t.file.path])==null?void 0:s.belongsTo;return a?window.SONDA_JSON_REPORT.inputs[a].format.toUpperCase:"UNKNOWN"});function i(a,s){return s.length>1?[]:Object.entries(window.SONDA_JSON_REPORT.inputs).filter(([,l])=>l.imports.includes(a)).map(([l])=>[l,`imported by ${l}`])}const o=S(()=>{if(!_(r))return null;const a=_(r).belongsTo?[[_(r).belongsTo,`part of the ${_(r).belongsTo} bundle`]]:i(t.file.path,[]);return Vt.generate(a,i)});_t(e,{get heading(){return t.file.path},children:s=>{var l=Li(),f=w(l),u=w(f);I(u,()=>_(n)!=="UNKNOWN",x=>{var g=Pi(),b=m(C(g),2),T=w(b);R(()=>D(T,_(n))),k(x,g)});var c=m(u,4),d=w(c);R(()=>{var x;return D(d,$(((x=_(r))==null?void 0:x.bytes)||0))});var v=m(c,4),h=w(v);R(()=>D(h,$(t.file.uncompressed)));var p=m(v,2);I(p,()=>t.file.gzip,x=>{var g=zi(),b=m(C(g),2),T=w(b);R(()=>D(T,$(t.file.gzip))),k(x,g)});var y=m(p,2);I(y,()=>t.file.brotli,x=>{var g=Ii(),b=m(C(g),2),T=w(b);R(()=>D(T,$(t.file.brotli))),k(x,g)});var O=m(f,2);I(O,()=>_(o),x=>{var g=Ci(),b=m(C(g),2),T=w(b),j=w(T);R(()=>D(j,_(o))),k(x,g)}),k(s,l)},$$slots:{default:!0}}),U()}var Bi=N('<p>The following dependencies are duplicated:</p> <code class="mt-2 p-4 w-max leading-5 bg-slate-200 rounded overflow-auto min-w-full"><pre> </pre></code>',1);function Fi(e,t){W(t,!0);const r=S(()=>Vt.generate(Array.from(Xe.keys()),n=>Xe.get(n)));_t(e,{heading:"Duplicated modules found in the build",children:i=>{var o=Ge(),a=C(o);I(a,()=>Xe.size>0,s=>{var l=Bi(),f=m(C(l),2),u=w(f),c=w(u);R(()=>D(c,_(r))),k(s,l)}),k(i,o)},$$slots:{default:!0}}),U()}var qi=N('<span>GZIP size</span> <span class="font-bold"> </span>',1),Hi=N('<span>Brotli size</span> <span class="font-bold"> </span>',1),Wi=N('<p class="mt-12">Module types</p> <div class="mt-2 h-10 w-[40rem] max-w-full flex rounded-lg overflow-hidden"><div class="bg-yellow-300 h-full"></div> <div class="bg-blue-300 h-full"></div> <div class="bg-gray-200 h-full"></div></div> <div class="flex justify-between mt-2"><div class="flex items-center space-x-2"><div class="inline-block w-4 h-4 bg-yellow-300"></div> <p>ESM: <span class="font-semibold"> </span></p></div> <div class="flex items-center space-x-2"><div class="inline-block w-4 h-4 bg-blue-300"></div> <p>CJS: <span class="font-semibold"> </span></p></div> <div class="flex items-center space-x-2"><div class="inline-block w-4 h-4 bg-gray-300"></div> <p>Unknown: <span class="font-semibold"> </span></p></div></div>',1),Ui=N('<code class="mt-2 p-4 w-max leading-5 bg-slate-200 rounded overflow-auto min-w-full"><pre> </pre></code>'),Vi=N('<div class="flex flex-col overflow-y-auto"><div class="grid grid-cols-[auto_1fr] gap-x-8"><span>Bundled size</span> <span class="font-bold"> </span> <!> <!></div></div> <!> <p class="mt-12">This asset includes <span class="font-semibold"> </span> external dependencies</p> <!>',1);function Gi(e,t){W(t,!0);const r=S(()=>window.SONDA_JSON_REPORT.outputs[t.output.root.name]),n=S(()=>{const f={esm:0,cjs:0,unknown:0},u=window.SONDA_JSON_REPORT.inputs;return Object.entries(_(r).inputs).forEach(([c,d])=>{var h;const v=((h=u[c])==null?void 0:h.format)??"unknown";f[v]+=d.uncompressed}),f}),i=S(()=>Math.round(_(n).esm/_(r).uncompressed*1e4)/100),o=S(()=>Math.round(_(n).cjs/_(r).uncompressed*1e4)/100),a=S(()=>Math.round(_(n).unknown/_(r).uncompressed*1e4)/100),s=S(()=>{const f=/(?:.*node_modules\/)(@[^\/]+\/[^\/]+|[^\/]+)/;return Object.keys(_(r).inputs).map(u=>{var c;return((c=u.match(f))==null?void 0:c[1])??null}).filter((u,c,d)=>u!==null&&d.indexOf(u)===c).sort()}),l=S(()=>Vt.generate(_(s)));_t(e,{get heading(){return t.output.root.name},children:u=>{var c=Vi(),d=C(c),v=w(d),h=m(w(v),2),p=w(h);R(()=>D(p,$(t.output.root.uncompressed)));var y=m(h,2);I(y,()=>t.output.root.gzip,P=>{var M=qi(),F=m(C(M),2),B=w(F);R(()=>D(B,$(t.output.root.gzip))),k(P,M)});var O=m(y,2);I(O,()=>t.output.root.brotli,P=>{var M=Hi(),F=m(C(M),2),B=w(F);R(()=>D(B,$(t.output.root.brotli))),k(P,M)});var x=m(d,2);I(x,()=>_(a)<100,P=>{var M=Wi(),F=m(C(M),2),B=w(F),be=m(B,2),pt=m(be,2),Je=m(F,2),Me=w(Je),Ke=m(w(Me),2),Ze=m(w(Ke)),Ye=w(Ze),Gt=m(Me,2),Hr=m(w(Gt),2),Wr=m(w(Hr)),Ur=w(Wr),Vr=m(Gt,2),Gr=m(w(Vr),2),Jr=m(w(Gr)),Kr=w(Jr);R(()=>{q(B,"style",`width: ${_(i)}%`),q(be,"style",`width: ${_(o)}%`),q(pt,"style",`width: ${_(a)}%`),D(Ye,`${_(i)??""}%`),D(Ur,`${_(o)??""}%`),D(Kr,`${_(a)??""}%`)}),k(P,M)});var g=m(x,2),b=m(w(g)),T=w(b),j=m(g,2);I(j,()=>_(s).length>0,P=>{var M=Ui(),F=w(M),B=w(F);R(()=>D(B,_(l))),k(P,M)}),R(()=>D(T,_(s).length)),k(u,c)},$$slots:{default:!0}}),U()}var Ji=N("<!> <!> <!> <!>",1);function Ki(e,t){W(t,!1),ht();var r=Ji(),n=C(r);I(n,()=>Y.folder,s=>{Ri(s,{get folder(){return Y.folder}})});var i=m(n,2);I(i,()=>Y.file,s=>{ji(s,{get file(){return Y.file}})});var o=m(i,2);I(o,()=>Y.output,s=>{Gi(s,{get output(){return Y.output}})});var a=m(o,2);I(a,()=>Y.duplicates,s=>{Fi(s,{})}),k(e,r),U()}var Zi=(e,t)=>Te.setType(t()),Yi=N('<button type="button" class="px-4 py-2 text-sm font-medium bg-white hover:bg-gray-100 text-gray-900 border border-gray-300 first:rounded-s-lg last:rounded-e-lg focus:ring-1 focus:ring-blue-300 focus:z-10 svelte-2f0583"> </button>'),Qi=N('<div class="inline-flex space-x-[-1px]" role="group"></div>');function Xi(e,t){W(t,!0);const r=S(()=>X.output.root.gzip>0),n=S(()=>X.output.root.brotli>0),i=S(()=>{const s=[["uncompressed","Uncompressed"]];return _(r)&&s.push(["gzip","GZIP"]),_(n)&&s.push(["brotli","Brotli"]),s});var o=Ge(),a=C(o);I(a,()=>_(i).length>1,s=>{var l=Qi();Ut(l,21,()=>_(i),([f,u])=>f,(f,u)=>{let c=()=>_(u)[0],d=()=>_(u)[1];var v=Yi();v.__click=[Zi,c];var h=w(v);R(()=>{q(v,"title",`Show the ${d()} file size in diagram`),ot(v,"active",c()===Te.type),D(h,d())}),k(f,v)}),k(s,l)}),k(e,o),U()}Ve(["click"]);function $i(){Y.open("output",X.output)}var eo=N('<button title="Show details of the active output" aria-label="Details of the entire build output" class="text-gray-900 bg-white border border-gray-300 focus:outline-none hover:bg-gray-100 focus:ring-1 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 h-10"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-gray-900 pointer-events-none"><path d="M0 0h24v24H0z" stroke="none" shape-rendering="geometricPrecision"></path><path d="M8 5H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.697M18 12V7a2 2 0 0 0-2-2h-2" shape-rendering="geometricPrecision"></path><path d="M8 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v0a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zM8 11h4M8 15h3M14 17.5a2.5 2.5 0 1 0 5 0 2.5 2.5 0 1 0-5 0M18.5 19.5 21 22" shape-rendering="geometricPrecision"></path></svg></button>');function to(e,t){W(t,!1),ht();var r=eo();r.__click=[$i],k(e,r),U()}Ve(["click"]);function ro(){Y.open("duplicates",!0)}var no=N('<button title="See duplicated modules found in the build" aria-label="List of duplicated modules found in the build output" class="text-gray-900 bg-red-50 border border-red-400 focus:outline-none hover:bg-red-100 focus:ring-1 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 h-10"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-red-600"><path stroke="none" d="M0 0h24v24H0z" shape-rendering="geometricPrecision"></path><path d="M3 12a9 9 0 1 0 18 0 9 9 0 0 0-18 0M12 8v4M12 16h.01" shape-rendering="geometricPrecision"></path></svg></button>');function io(e,t){W(t,!1),ht();var r=Ge(),n=C(r);I(n,()=>Xe.size>1,i=>{var o=no();o.__click=[ro],k(i,o)}),k(e,r),U()}Ve(["click"]);function oo(e){X.setIndex(Number(e.target.value))}var ao=N("<option> </option>"),so=N('<select class="text-gray-900 bg-white border border-gray-300 focus:outline-none hover:bg-gray-100 focus:ring-1 focus:ring-blue-300 font-medium rounded-lg text-sm pl-4 pr-8 h-10 min-w-80 svelte-yqayp2" title="Select the active output"></select>'),lo=N('<div class="flex items-center justify-center space-x-2 max-w-sm"><!></div>');function uo(e,t){W(t,!1),ht();var r=lo(),n=w(r);I(n,()=>zt.length>0,i=>{var o=so();li(o,()=>X.index);var a;o.__change=[oo],Ut(o,5,()=>zt,Jn,(s,l,f)=>{var u=ao();u.value=(u.__value=f)==null?"":f;var c=w(u);R(()=>D(c,`${f+1}. ${_(l).root.name??""}`)),k(s,u)}),R(()=>{a!==(a=X.index)&&(o.value=(o.__value=X.index)==null?"":X.index,Rt(o,X.index))}),k(i,o)}),k(e,r),U()}Ve(["change"]);var fo=N('<a href="https://github.com/filipsobol/sonda" target="_blank" title="Open Sonda repository on GitHub" aria-label="GitHub repository" class="flex items-center text-gray-900 bg-white border border-gray-300 focus:outline-none hover:bg-gray-100 focus:ring-1 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 h-10"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-gray-900 pointer-events-none"><path d="M0 0h24v24H0z" stroke="none" shape-rendering="geometricPrecision"></path><path d="M9 19c-4.3 1.4-4.3-2.5-6-3m12 5v-3.5c0-1 .1-1.4-.5-2 2.8-.3 5.5-1.4 5.5-6a4.6 4.6 0 0 0-1.3-3.2 4.2 4.2 0 0 0-.1-3.2s-1.1-.3-3.5 1.3a12.3 12.3 0 0 0-6.2 0C6.5 2.8 5.4 3.1 5.4 3.1a4.2 4.2 0 0 0-.1 3.2A4.6 4.6 0 0 0 4 9.5c0 4.6 2.7 5.7 5.5 6-.6.6-.6 1.2-.5 2V21" shape-rendering="geometricPrecision"></path></svg></a>');function co(e){var t=fo();k(e,t)}var vo=N('<div class="flex flex-row p-4 items-center space-y-0 h-16 justify-between bg-gray-50 shadow"><div class="flex flex-row space-x-2"><!> <!> <!></div> <div class="flex flex-row space-x-2"><!> <!></div></div>');function ho(e){var t=vo(),r=w(t),n=w(r);uo(n,{});var i=m(n,2);to(i,{});var o=m(i,2);io(o,{});var a=m(r,2),s=w(a);Xi(s,{});var l=m(s,2);co(l),k(e,t)}var _o=N('<div class="flex-grow flex flex-col mt-24 items-center w-full h-full"><svg xmlns="http://www.w3.org/2000/svg" width="96" height="96" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="text-yellow-400 fill-yellow-100"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M12 21a9 9 0 1 1 0 -18a9 9 0 0 1 0 18z"></path><path d="M8 16l1 -1l1.5 1l1.5 -1l1.5 1l1.5 -1l1 1"></path><path d="M8.5 11.5l1.5 -1.5l-1.5 -1.5"></path><path d="M15.5 11.5l-1.5 -1.5l1.5 -1.5"></path></svg> <h2 class="mt-8 text-3xl font-semibold text-gray-800">No data to display</h2> <p class="mt-4 text-lg text-gray-500">Did you enable source maps in the bundler configuration?</p></div>');function po(e){var t=_o();k(e,t)}var go=N('<div role="tooltip" class="fixed z-10 px-2 py-1 bg-gray-800 text-gray-100 rounded-md whitespace-nowrap pointer-events-none svelte-1r0gq6x"> </div>');function wo(e){let r=G(0),n=G(0),i=G(0),o=G(0),a=G(""),s=G("0px"),l=G("0px");function f({target:d,clientX:v,clientY:h}){z(a,Q(d instanceof Element&&d.getAttribute("data-hover")||"")),_(a)&&(z(s,(v+_(r)+12>_(i)?v-_(r)-12:v+12)+"px"),z(l,(h+_(n)+12>_(o)?h-_(n):h+12)+"px"))}var u=go();Ee("mouseover",ae.body,f),Ee("mousemove",ae.body,f),Ee("mouseleave",ae.body,()=>z(a,""));var c=w(u);R(()=>{ot(u,"invisible",!_(a)),Mt(u,"--x",_(s)),Mt(u,"--y",_(l)),D(c,_(a))}),de(ae.body,"clientWidth",d=>z(i,Q(d))),de(ae.body,"clientHeight",d=>z(o,Q(d))),de(u,"clientWidth",d=>z(r,d)),de(u,"clientHeight",d=>z(n,d)),k(e,u)}var mo=N('<div role="application" class="wrapper relative flex flex-col overflow-hidden h-screen w-screen"><!> <div class="flex-grow overflow-hidden"><!></div></div> <!> <!>',1);function bo(e,t){W(t,!0);let r=G(0),n=G(0);function i({target:v}){const h=v instanceof Element&&v.getAttribute("data-tile");if(!h)return;const p=X.output.get(h);p&&Y.open(ge(p)?"folder":"file",p)}function o(v){v.key==="Escape"&&(v.stopPropagation(),Y.close())}var a=mo();Ee("click",ae.body,i),Ee("keydown",ae.body,o);var s=C(a),l=w(s);ho(l);var f=m(l,2),u=w(f);I(u,()=>X,v=>{qr(v,{get content(){return X.output.root},get width(){return _(r)},get height(){return _(n)}})},v=>{po(v)});var c=m(s,2);Ki(c,{});var d=m(c,2);wo(d),de(f,"clientWidth",v=>z(r,v)),de(f,"clientHeight",v=>z(n,v)),k(e,a),U()}Un(bo,{target:document.getElementById("app")});</script><style rel="stylesheet" crossorigin>rect.svelte-xusoaq{fill:color-mix(in oklch,#fca5a5 var(--percentage),#86efac)}rect.svelte-xusoaq:hover{fill:color-mix(in oklch,#fecaca var(--percentage),#bbf7d0)}button.active.svelte-2f0583,button.active.svelte-2f0583:hover{background-color:#e5e7eb}select.svelte-yqayp2{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%236b7280" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path stroke="none" d="M0 0h24v24H0z"/><path d="m8 9 4-4 4 4M16 15l-4 4-4-4"/></svg>');background-position:right .5rem center;background-repeat:no-repeat}div[role=tooltip].svelte-1r0gq6x{transform:translate(var(--x),var(--y));will-change:transform,contents}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / .5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:after,:before{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-10{z-index:10}.mb-4{margin-bottom:1rem}.mr-2{margin-right:.5rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-24{margin-top:6rem}.mt-4{margin-top:1rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.contents{display:contents}.size-full{width:100%;height:100%}.h-10{height:2.5rem}.h-16{height:4rem}.h-4{height:1rem}.h-\[95vh\]{height:95vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-\[95vh\]{max-height:95vh}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-4{width:1rem}.w-\[40rem\]{width:40rem}.w-\[95vw\]{width:95vw}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-screen{width:100vw}.min-w-80{min-width:20rem}.min-w-full{min-width:100%}.max-w-\[95vw\]{max-width:95vw}.max-w-full{max-width:100%}.max-w-sm{max-width:24rem}.flex-grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.cursor-zoom-in{cursor:zoom-in}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-x-8{-moz-column-gap:2rem;column-gap:2rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-\[-1px\]>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(-1px * var(--tw-space-x-reverse));margin-left:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-b-2{border-bottom-width:2px}.border-dashed{border-style:dashed}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-200\/70{background-color:#e5e7ebb3}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242 / var(--tw-bg-opacity))}.bg-slate-200{--tw-bg-opacity:1;background-color:rgb(226 232 240 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-300{--tw-bg-opacity:1;background-color:rgb(253 224 71 / var(--tw-bg-opacity))}.fill-yellow-100{fill:#fef9c3}.stroke-gray-500{stroke:#6b7280}.p-1{padding:.25rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pl-4{padding-left:1rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.text-center{text-align:center}.align-text-bottom{vertical-align:text-bottom}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-5{line-height:1.25rem}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21 / var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / .1),0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgb(0 0 0 / .1),0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}pre{line-height:1.125}.first\:rounded-s-lg:first-child{border-start-start-radius:.5rem;border-end-start-radius:.5rem}.last\:rounded-e-lg:last-child{border-start-end-radius:.5rem;border-end-end-radius:.5rem}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-red-100:hover{--tw-bg-opacity:1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity))}.focus\:z-10:focus{z-index:10}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-blue-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(147 197 253 / var(--tw-ring-opacity))}</style></head><body class="flex w-screen h-screen font-mono"><div id="app" class="flex w-screen min-h-screen"></div></body></html>
|
package/dist/index.js
CHANGED
|
@@ -262,8 +262,8 @@ function generateJsonReport(assets, inputs, options) {
|
|
|
262
262
|
return carry;
|
|
263
263
|
}, {});
|
|
264
264
|
return {
|
|
265
|
-
inputs,
|
|
266
|
-
outputs
|
|
265
|
+
inputs: sortObjectKeys(inputs),
|
|
266
|
+
outputs: sortObjectKeys(outputs)
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
269
|
function generateHtmlReport(assets, inputs, options) {
|
|
@@ -285,17 +285,24 @@ function processAsset(asset, inputs, options) {
|
|
|
285
285
|
mapped.sources = mapped.sources.map((source)=>normalizePath(source));
|
|
286
286
|
const assetSizes = getSizes(code, options);
|
|
287
287
|
const bytes = getBytesPerSource(code, mapped, assetSizes, options);
|
|
288
|
+
const outputInputs = Array.from(bytes).reduce((carry, [source, sizes])=>{
|
|
289
|
+
carry[normalizePath(source)] = sizes;
|
|
290
|
+
return carry;
|
|
291
|
+
}, {});
|
|
288
292
|
return {
|
|
289
293
|
...assetSizes,
|
|
290
|
-
inputs:
|
|
291
|
-
carry[normalizePath(source)] = sizes;
|
|
292
|
-
return carry;
|
|
293
|
-
}, {})
|
|
294
|
+
inputs: sortObjectKeys(outputInputs)
|
|
294
295
|
};
|
|
295
296
|
}
|
|
296
297
|
function hasCodeAndMap(result) {
|
|
297
298
|
return Boolean(result && result.code && result.map);
|
|
298
299
|
}
|
|
300
|
+
function sortObjectKeys(object) {
|
|
301
|
+
return Object.keys(object).sort().reduce((carry, key)=>{
|
|
302
|
+
carry[key] = object[key];
|
|
303
|
+
return carry;
|
|
304
|
+
}, {});
|
|
305
|
+
}
|
|
299
306
|
|
|
300
307
|
async function generateReportFromAssets(assets, inputs, userOptions) {
|
|
301
308
|
const options = normalizeOptions(userOptions);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../load-source-map/dist/index.js","../src/utils.ts","../src/sourcemap/map.ts","../src/sourcemap/bytes.ts","../src/report.ts","../src/report/generate.ts","../src/bundlers/esbuild.ts","../src/bundlers/rollup.ts","../src/bundlers/webpack.ts"],"sourcesContent":["import { existsSync, readFileSync } from 'fs';\nimport { join, dirname, isAbsolute, resolve } from 'path';\n\n/**\n * Strip any JSON XSSI avoidance prefix from the string (as documented in the source maps specification),\n * and parses the string as JSON.\n *\n * https://github.com/mozilla/source-map/blob/3cb92cc3b73bfab27c146bae4ef2bc09dbb4e5ed/lib/util.js#L162-L164\n */ function parseSourceMapInput(str) {\n return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, \"\"));\n}\n/**\n\tsourceMappingURL=data:application/json;charset=utf-8;base64,data\n\tsourceMappingURL=data:application/json;base64,data\n\tsourceMappingURL=data:application/json;uri,data\n\tsourceMappingURL=map-file-comment.css.map\n\tsourceMappingURL=map-file-comment.css.map?query=value\n*/ const sourceMappingRegExp = /[@#]\\s*sourceMappingURL=(\\S+)\\b/g;\nfunction loadCodeAndMap(codePath) {\n if (!existsSync(codePath)) {\n return null;\n }\n const code = readFileSync(codePath, 'utf-8');\n const extractedComment = code.includes('sourceMappingURL') && Array.from(code.matchAll(sourceMappingRegExp)).at(-1);\n if (!extractedComment || !extractedComment.length) {\n return {\n code\n };\n }\n const maybeMap = loadMap(codePath, extractedComment[1]);\n if (!maybeMap) {\n return {\n code\n };\n }\n const { map, mapPath } = maybeMap;\n map.sources = normalizeSourcesPaths(map, mapPath);\n map.sourcesContent = loadMissingSourcesContent(map);\n delete map.sourceRoot;\n return {\n code,\n map\n };\n}\nfunction loadMap(codePath, sourceMappingURL) {\n if (sourceMappingURL.startsWith('data:')) {\n const map = parseDataUrl(sourceMappingURL);\n return {\n map: parseSourceMapInput(map),\n mapPath: codePath\n };\n }\n const sourceMapFilename = new URL(sourceMappingURL, 'file://').pathname;\n const mapPath = join(dirname(codePath), sourceMapFilename);\n if (!existsSync(mapPath)) {\n return null;\n }\n return {\n map: parseSourceMapInput(readFileSync(mapPath, 'utf-8')),\n mapPath\n };\n}\nfunction parseDataUrl(url) {\n const [prefix, payload] = url.split(',');\n const encoding = prefix.split(';').at(-1);\n switch(encoding){\n case 'base64':\n return Buffer.from(payload, 'base64').toString();\n case 'uri':\n return decodeURIComponent(payload);\n default:\n throw new Error('Unsupported source map encoding: ' + encoding);\n }\n}\n/**\n * Normalize the paths of the sources in the source map to be absolute paths.\n */ function normalizeSourcesPaths(map, mapPath) {\n const mapDir = dirname(mapPath);\n return map.sources.map((source)=>{\n if (!source) {\n return source;\n }\n return isAbsolute(source) ? source : resolve(mapDir, map.sourceRoot ?? '.', source);\n });\n}\n/**\n * Loop through the sources and try to load missing `sourcesContent` from the file system.\n */ function loadMissingSourcesContent(map) {\n return map.sources.map((source, index)=>{\n if (map.sourcesContent?.[index]) {\n return map.sourcesContent[index];\n }\n if (source && existsSync(source)) {\n return readFileSync(source, 'utf-8');\n }\n return null;\n });\n}\n\nexport { loadCodeAndMap };\n//# sourceMappingURL=index.js.map\n","import { relative, win32, posix } from 'path';\nimport type { Options } from './types';\n\nexport const esmRegex: RegExp = /\\.m[tj]sx?$/;\nexport const cjsRegex: RegExp = /\\.c[tj]sx?$/;\nexport const jsRegexp: RegExp = /\\.[cm]?[tj]s[x]?$/;\n\nexport function normalizeOptions( options?: Partial<Options> ) {\n\tconst defaultOptions: Options = {\n\t\topen: true,\n\t\tformat: 'html',\n\t\tdetailed: false,\n\t\tgzip: false,\n\t\tbrotli: false,\n\t};\n\n\treturn Object.assign( {}, defaultOptions, options ) as Options;\n}\n\nexport function normalizePath( pathToNormalize: string ): string {\n\t// Unicode escape sequences used by Rollup and Vite to identify virtual modules\n\tconst normalized = pathToNormalize.replace( /^\\0/, '' )\n\n\t// Transform absolute paths to relative paths\n\tconst relativized = relative( process.cwd(), normalized );\n\n\t// Ensure paths are POSIX-compliant - https://stackoverflow.com/a/63251716/4617687\n\treturn relativized.replaceAll( win32.sep, posix.sep );\n}\n","import { default as remapping, type DecodedSourceMap, type EncodedSourceMap } from '@ampproject/remapping';\nimport { loadCodeAndMap } from 'load-source-map';\nimport { resolve } from 'path';\nimport { normalizePath } from '../utils';\nimport type { CodeMap, ReportInput } from '../types';\n\nexport function mapSourceMap(\n\tmap: EncodedSourceMap,\n\tdirPath: string,\n\tinputs: Record<string, ReportInput>\n): DecodedSourceMap {\n\tconst alreadyRemapped = new Set<string>();\n\tconst remapped = remapping( map, ( file, ctx ) => {\n\t\tif ( alreadyRemapped.has( file ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\talreadyRemapped.add( file );\n\n\t\tconst codeMap = addSourcesToInputs(\n\t\t\tresolve( dirPath, file ),\n\t\t\tinputs\n\t\t);\n\n\t\tif ( !codeMap ) {\n\t\t\treturn;\n\t\t}\n\n\t\tctx.content ??= codeMap.code;\n\n\t\treturn codeMap.map;\n\t}, { decodedMappings: true } );\n\n\treturn remapped as DecodedSourceMap;\n}\n\n/**\n * Loads the source map of a given file and adds its \"sources\" to the given inputs object.\n */\nexport function addSourcesToInputs(\n\tpath: string,\n\tinputs: Record<string, ReportInput>\n): CodeMap | null {\n\tconst codeMap = loadCodeAndMap( path );\n\n\tif ( !codeMap ) {\n\t\treturn null;\n\t}\n\n\tconst parentPath = normalizePath( path );\n\tconst format = inputs[ parentPath ]?.format ?? 'unknown';\n\n\tcodeMap.map?.sources\n\t\t.filter( source => source !== null )\n\t\t.forEach( ( source, index ) => {\n\t\t\tconst normalizedPath = normalizePath( source );\n\n\t\t\tif ( parentPath === normalizedPath ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tinputs[ normalizedPath ] = {\n\t\t\t\tbytes: Buffer.byteLength( codeMap.map!.sourcesContent?.[ index ] ?? '' ),\n\t\t\t\tformat,\n\t\t\t\timports: [],\n\t\t\t\tbelongsTo: parentPath\n\t\t\t};\n\t\t} );\n\t\n\treturn codeMap;\n}\n","import { gzipSync, brotliCompressSync } from 'zlib';\nimport type { DecodedSourceMap, SourceMapSegment } from '@ampproject/remapping';\nimport type { Options, Sizes } from '../types';\n\nconst UNASSIGNED = '[unassigned]';\n\nexport function getBytesPerSource(\n\tcode: string,\n\tmap: DecodedSourceMap,\n\tassetSizes: Sizes,\n\toptions: Options\n): Map<string, Sizes> {\n\tconst contributions = getContributions( map.sources );\n\n\t// Split the code into lines\n\tconst codeLines = code.split( /(?<=\\r?\\n)/ );\n\n\tfor ( let lineIndex = 0; lineIndex < codeLines.length; lineIndex++ ) {\n\t\tconst lineCode = codeLines[ lineIndex ];\n\t\tconst mappings = map.mappings[ lineIndex ] || [];\n\t\tlet currentColumn = 0;\n\n\t\tfor ( let i = 0; i <= mappings.length; i++ ) {\n\t\t\t// 0: generatedColumn\n\t\t\t// 1: sourceIndex\n\t\t\t// 2: originalLine\n\t\t\t// 3: originalColumn\n\t\t\t// 4: nameIndex\n\n\t\t\tconst mapping: SourceMapSegment | undefined = mappings[ i ];\n\t\t\tconst startColumn = mapping?.[ 0 ] ?? lineCode.length;\n\t\t\tconst endColumn = mappings[ i + 1 ]?.[ 0 ] ?? lineCode.length;\n\n\t\t\t// Slice the code from currentColumn to startColumn for unassigned code\n\t\t\tif ( startColumn > currentColumn ) {\n\t\t\t\tcontributions.set( UNASSIGNED, contributions.get( UNASSIGNED ) + lineCode.slice( currentColumn, startColumn ) );\n\t\t\t}\n\n\t\t\tif ( mapping ) {\n\t\t\t\t// Slice the code from startColumn to endColumn for assigned code\n\t\t\t\tconst sourceIndex = mapping?.[ 1 ];\n\t\t\t\tconst codeSlice = lineCode.slice( startColumn, endColumn );\n\t\t\t\tconst source = sourceIndex !== undefined ? map.sources[ sourceIndex ]! : UNASSIGNED;\n\n\t\t\t\tcontributions.set( source, contributions.get( source ) + codeSlice );\n\t\t\t\tcurrentColumn = endColumn;\n\t\t\t} else {\n\t\t\t\tcurrentColumn = startColumn;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compute sizes for each source\n\tconst sourceSizes = new Map<string, Sizes>();\n\n\tconst contributionsSum: Sizes = {\n\t\tuncompressed: 0,\n\t\tgzip: 0,\n\t\tbrotli: 0\n\t};\n\n\tfor ( const [ source, codeSegment ] of contributions ) {\n\t\tconst sizes = getSizes( codeSegment, options );\n\n\t\tcontributionsSum.uncompressed += sizes.uncompressed;\n\t\tcontributionsSum.gzip += sizes.gzip;\n\t\tcontributionsSum.brotli += sizes.brotli;\n\n\t\tsourceSizes.set( source, sizes );\n\t}\n\n\treturn adjustSizes( sourceSizes, assetSizes, contributionsSum, options );\n}\n\nexport function getSizes(\n\tcode: string,\n\toptions: Options\n): Sizes {\n\treturn {\n\t\tuncompressed: Buffer.byteLength( code ),\n\t\tgzip: options.gzip ? gzipSync( code ).length : 0,\n\t\tbrotli: options.brotli ? brotliCompressSync( code ).length : 0\n\t};\n}\n\nfunction getContributions( sources: Array<string | null> ): Map<string, string> {\n\tconst contributions = new Map<string, string>();\n\n\t// Populate contributions with sources\n\tsources\n\t\t.filter( source => source !== null )\n\t\t.forEach( source => contributions.set( source, '' ) );\n\n\t// Add entry for the code that is not assigned to any source\n\tcontributions.set( UNASSIGNED, '' );\n\n\treturn contributions;\n}\n\n/**\n * Compression efficiency improves with the size of the file.\n *\n * However, what we have is the compressed size of the entire bundle (`actual`),\n * the sum of all files compressed individually (`sum`) and the compressed\n * size of a given file (`content`). The last value is essentially a “worst-case”\n * scenario, and the actual size of the file in the bundle is likely to be smaller.\n *\n * We use this information to estimate the actual size of the file in the bundle\n * after compression.\n */\nfunction adjustSizes(\n\tsources: Map<string, Sizes>,\n\tasset: Sizes,\n\tsums: Sizes,\n\toptions: Options\n): Map<string, Sizes> {\n\tconst gzipDelta = options.gzip ? asset.gzip / sums.gzip : 0;\n\tconst brotliDelta = options.brotli ? asset.brotli / sums.brotli : 0;\n\n\tfor ( const [ source, sizes ] of sources ) {\n\t\tsources.set( source, {\n\t\t\tuncompressed: sizes.uncompressed,\n\t\t\tgzip: options.gzip ? Math.round( sizes.gzip * gzipDelta ) : 0,\n\t\t\tbrotli: options.brotli ? Math.round( sizes.brotli * brotliDelta ) : 0\n\t\t} );\n\t}\n\n\treturn sources;\n}\n","import { readFileSync } from 'fs';\nimport { fileURLToPath } from 'url';\nimport { dirname, resolve } from 'path';\nimport { loadCodeAndMap } from 'load-source-map';\nimport { decode } from '@jridgewell/sourcemap-codec';\nimport { mapSourceMap } from './sourcemap/map.js';\nimport { getBytesPerSource, getSizes } from './sourcemap/bytes.js';\nimport type {\n JsonReport,\n MaybeCodeMap,\n ReportInput,\n ReportOutput,\n CodeMap,\n ReportOutputInput,\n Options\n} from './types.js';\nimport { normalizePath } from './utils.js';\n\nexport function generateJsonReport(\n assets: Array<string>,\n inputs: Record<string, ReportInput>,\n options: Options\n): JsonReport {\n const outputs = assets\n .filter( asset => !asset.endsWith( '.map' ) )\n .reduce( ( carry, asset ) => {\n const data = processAsset( asset, inputs, options );\n\n if ( data ) {\n carry[ normalizePath( asset ) ] = data;\n }\n\n return carry;\n }, {} as Record<string, ReportOutput> );\n\n return {\n inputs,\n outputs\n };\n}\n\nexport function generateHtmlReport(\n assets: Array<string>,\n inputs: Record<string, ReportInput>,\n options: Options\n): string {\n const json = generateJsonReport( assets, inputs, options );\n const __dirname = dirname( fileURLToPath( import.meta.url ) );\n const template = readFileSync( resolve( __dirname, './index.html' ), 'utf-8' );\n\n return template.replace( '__REPORT_DATA__', JSON.stringify( json ) );\n}\n\nfunction processAsset(\n asset: string,\n inputs: Record<string, ReportInput>,\n options: Options\n): ReportOutput | void {\n const maybeCodeMap = loadCodeAndMap( asset );\n\n if ( !hasCodeAndMap( maybeCodeMap ) ) {\n return;\n }\n\n const { code, map } = maybeCodeMap;\n const mapped = options.detailed\n ? mapSourceMap( map, dirname( asset ), inputs )\n : { ...map, mappings: decode( map.mappings ) };\n\n mapped.sources = mapped.sources.map( source => normalizePath( source! ) );\n\n const assetSizes = getSizes( code, options );\n const bytes = getBytesPerSource( code, mapped, assetSizes, options );\n\n return {\n ...assetSizes,\n inputs: Array.from( bytes ).reduce( ( carry, [ source, sizes ] ) => {\n carry[ normalizePath( source ) ] = sizes;\n\n return carry;\n }, {} as Record<string, ReportOutputInput> )\n };\n}\n\nfunction hasCodeAndMap( result: MaybeCodeMap ): result is Required<CodeMap> {\n return Boolean( result && result.code && result.map );\n}\n","import { join } from 'path';\nimport { writeFileSync } from 'fs';\nimport { generateHtmlReport, generateJsonReport } from '../report.js';\nimport type { Options, JsonReport } from '../types.js';\nimport { normalizeOptions } from '../utils.js';\n\nexport async function generateReportFromAssets(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\tuserOptions: Partial<Options>\n): Promise<void> {\n\tconst options = normalizeOptions( userOptions );\n\tconst handler = options.format === 'html' ? saveHtml : saveJson;\n\tconst path = handler( assets, inputs, options );\n\n\tif ( !options.open || !path ) {\n\t\treturn;\n\t}\n\n\t/**\n\t * `open` is ESM-only package, so we need to import it\n\t * dynamically to make it work in CommonJS environment.\n\t */\n\tconst { default: open } = await import( 'open' );\n\n\topen( path );\n}\n\nfunction saveHtml(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\toptions: Options\n): string | null {\n\tconst report = generateHtmlReport( assets, inputs, options );\n\tconst path = join( process.cwd(), 'sonda-report.html' );\n\n\twriteFileSync( path, report );\n\n\treturn path;\n}\n\nfunction saveJson(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\toptions: Options\n): string | null {\n\tconst report = generateJsonReport( assets, inputs, options );\n\tconst path = join( process.cwd(), 'sonda-report.json' );\n\n\twriteFileSync( path, JSON.stringify( report, null, 2 ) );\n\n\treturn path;\n}\n","import { resolve } from 'path';\nimport { addSourcesToInputs } from '../sourcemap/map';\nimport { generateReportFromAssets } from '../report/generate';\nimport type { Plugin } from 'esbuild';\nimport type { Options, JsonReport } from '../types';\n\nexport function SondaEsbuildPlugin( options: Partial<Options> = {} ): Plugin {\n\treturn {\n\t\tname: 'sonda',\n\t\tsetup( build ) {\n\t\t\tbuild.initialOptions.metafile = true;\n\n\t\t\t// Esbuild already reads the existing source maps, so there's no need to do it again\n\t\t\toptions.detailed = false;\n\n\t\t\tbuild.onEnd( result => {\n\t\t\t\tif ( !result.metafile ) {\n\t\t\t\t\treturn console.error( 'Metafile is required for SondaEsbuildPlugin to work.' );\n\t\t\t\t}\n\n\t\t\t\tconst cwd = process.cwd();\n\t\t\t\tconst inputs = Object\n\t\t\t\t\t.entries( result.metafile.inputs )\n\t\t\t\t\t.reduce( ( acc, [ path, data ] ) => {\n\t\t\t\t\t\tacc[ path ] = {\n\t\t\t\t\t\t\tbytes: data.bytes,\n\t\t\t\t\t\t\tformat: data.format ?? 'unknown',\n\t\t\t\t\t\t\timports: data.imports.map( data => data.path ),\n\t\t\t\t\t\t\tbelongsTo: null,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Because esbuild already reads the existing source maps, there may be\n\t\t\t\t\t\t * cases where some report \"outputs\" include \"inputs\" don't exist in the\n\t\t\t\t\t\t * main \"inputs\" object. To avoid this, we parse each esbuild input and\n\t\t\t\t\t\t * add its sources to the \"inputs\" object.\n\t\t\t\t\t\t */\n\t\t\t\t\t\taddSourcesToInputs(\n\t\t\t\t\t\t\tresolve( cwd, path ),\n\t\t\t\t\t\t\tacc\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}, {} as JsonReport[ 'inputs' ] );\n\n\t\t\t\treturn generateReportFromAssets(\n\t\t\t\t\tObject.keys( result.metafile.outputs ).map( path => resolve( cwd, path ) ),\n\t\t\t\t\tinputs,\n\t\t\t\t\toptions\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\t};\n}\n","import { join, resolve, dirname } from 'path';\nimport { normalizePath, cjsRegex, jsRegexp } from '../utils.js';\nimport { generateReportFromAssets } from '../report/generate.js';\nimport type { Options, ModuleFormat, JsonReport } from '../types.js';\nimport type { Plugin, ModuleInfo, NormalizedOutputOptions, OutputBundle } from 'rollup';\n\nexport function SondaRollupPlugin( options: Partial<Options> = {} ): Plugin {\n\tlet inputs: JsonReport[ 'inputs' ] = {};\n\n\treturn {\n\t\tname: 'sonda',\n\n\t\twriteBundle(\n\t\t\t{ dir, file }: NormalizedOutputOptions,\n\t\t\tbundle: OutputBundle\n\t\t) {\n\t\t\tconst outputDir = resolve( process.cwd(), dir ?? dirname( file! ) );\n\t\t\tconst assets = Object.keys( bundle ).map( name => join( outputDir, name ) );\n\n\t\t\treturn generateReportFromAssets(\n\t\t\t\tassets,\n\t\t\t\tinputs,\n\t\t\t\toptions\n\t\t\t);\n\t\t},\n\n\t\tmoduleParsed( module: ModuleInfo ) {\n\t\t\tinputs[ normalizePath( module.id ) ] = {\n\t\t\t\tbytes: module.code ? Buffer.byteLength( module.code ) : 0,\n\t\t\t\tformat: getFormat( module.id, module.meta.commonjs?.isCommonJS ),\n\t\t\t\timports: module.importedIds.map( id => normalizePath( id ) ),\n\t\t\t\tbelongsTo: null,\n\t\t\t};\n\t\t}\n\t};\n}\n\nfunction getFormat( moduleId: string, isCommonJS: boolean | undefined ): ModuleFormat {\n\tif ( isCommonJS === true || cjsRegex.test( moduleId ) ) {\n\t\treturn 'cjs';\n\t}\n\n\tif ( isCommonJS === false || jsRegexp.test( moduleId ) ) {\n\t\treturn 'esm';\n\t}\n\n\treturn'unknown';\n}\n","import { join } from 'path';\nimport { normalizePath, jsRegexp } from '../utils';\nimport { generateReportFromAssets } from '../report/generate';\nimport type { Compiler, StatsModule } from 'webpack';\nimport type { Options, ModuleFormat, JsonReport } from '../types';\n\nexport class SondaWebpackPlugin {\n\toptions: Partial<Options>;\n\n\tconstructor ( options: Partial<Options> = {} ) {\n\t\tthis.options = options;\n\t}\n\n\tapply( compiler: Compiler ): void {\n\t\tcompiler.options.output.devtoolModuleFilenameTemplate = '[absolute-resource-path]';\n\n\t\tcompiler.hooks.afterEmit.tapPromise( 'SondaWebpackPlugin', compilation => {\n\t\t\tconst inputs: JsonReport[ 'inputs' ] = {};\n\t\t\tconst stats = compilation.getStats().toJson( {\n\t\t\t\tmodules: true,\n\t\t\t\tprovidedExports: true,\n\t\t\t} );\n\n\t\t\tconst outputPath = stats.outputPath || compiler.outputPath;\n\t\t\tconst modules: Array<StatsModule> = stats.modules\n\t\t\t\t?.flatMap( mod => mod.modules ? [ mod, ...mod.modules ] : mod )\n\t\t\t\t.filter( mod => mod.nameForCondition && !mod.codeGenerated )\n\t\t\t\t.filter( ( mod, index, self ) => self.findIndex( m => m.nameForCondition === mod.nameForCondition ) === index )\n\t\t\t\t|| [];\n\n\t\t\tmodules.forEach( module => {\n\t\t\t\tconst imports = modules.reduce( ( acc, { nameForCondition, issuerName, reasons } ) => {\n\t\t\t\t\tif ( issuerName === module.name || reasons?.some( reason => reason.resolvedModule === module.name ) ) {\n\t\t\t\t\t\tacc.push( normalizePath( nameForCondition! ) );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn acc;\n\t\t\t\t}, [] as Array<string> );\n\n\t\t\t\tinputs[ normalizePath( module.nameForCondition! ) ] = {\n\t\t\t\t\tbytes: module.size || 0,\n\t\t\t\t\tformat: getFormat( module ),\n\t\t\t\t\timports,\n\t\t\t\t\tbelongsTo: null\n\t\t\t\t};\n\t\t\t} );\n\n\t\t\treturn generateReportFromAssets(\n\t\t\t\tstats.assets?.map( asset => join( outputPath, asset.name ) ) || [],\n\t\t\t\tinputs,\n\t\t\t\tthis.options\n\t\t\t);\n\t\t} );\n\t}\n}\n\nfunction getFormat( module: StatsModule ): ModuleFormat {\n\tif ( !jsRegexp.test( module.nameForCondition! ) ) {\n\t\treturn 'unknown';\n\t}\n\n\t/**\n\t * Sometimes ESM modules have `moduleType` set as `javascript/auto`, so we\n\t * also need to check if the module has exports to determine if it's ESM.\n\t */\n\tif ( module.moduleType === 'javascript/esm' || !!module.providedExports?.length ) {\n\t\treturn 'esm';\n\t}\n\n\treturn 'cjs';\n}\n"],"names":["parseSourceMapInput","str","JSON","parse","replace","sourceMappingRegExp","loadCodeAndMap","codePath","existsSync","code","readFileSync","extractedComment","includes","Array","from","matchAll","at","length","maybeMap","loadMap","map","mapPath","sources","normalizeSourcesPaths","sourcesContent","loadMissingSourcesContent","sourceRoot","sourceMappingURL","startsWith","parseDataUrl","sourceMapFilename","URL","pathname","join","dirname","url","prefix","payload","split","encoding","Buffer","toString","decodeURIComponent","Error","mapDir","source","isAbsolute","resolve","index","cjsRegex","jsRegexp","normalizeOptions","options","defaultOptions","open","format","detailed","gzip","brotli","Object","assign","normalizePath","pathToNormalize","normalized","relativized","relative","process","cwd","replaceAll","win32","sep","posix","mapSourceMap","dirPath","inputs","alreadyRemapped","Set","remapped","remapping","file","ctx","has","add","codeMap","addSourcesToInputs","content","decodedMappings","path","parentPath","filter","forEach","normalizedPath","bytes","byteLength","imports","belongsTo","UNASSIGNED","getBytesPerSource","assetSizes","contributions","getContributions","codeLines","lineIndex","lineCode","mappings","currentColumn","i","mapping","startColumn","endColumn","set","get","slice","sourceIndex","codeSlice","undefined","sourceSizes","Map","contributionsSum","uncompressed","codeSegment","sizes","getSizes","adjustSizes","gzipSync","brotliCompressSync","asset","sums","gzipDelta","brotliDelta","Math","round","generateJsonReport","assets","outputs","endsWith","reduce","carry","data","processAsset","generateHtmlReport","json","__dirname","fileURLToPath","template","stringify","maybeCodeMap","hasCodeAndMap","mapped","decode","result","Boolean","generateReportFromAssets","userOptions","handler","saveHtml","saveJson","default","report","writeFileSync","SondaEsbuildPlugin","name","setup","build","initialOptions","metafile","onEnd","console","error","entries","acc","keys","SondaRollupPlugin","writeBundle","dir","bundle","outputDir","moduleParsed","module","id","getFormat","meta","commonjs","isCommonJS","importedIds","moduleId","test","SondaWebpackPlugin","apply","compiler","output","devtoolModuleFilenameTemplate","hooks","afterEmit","tapPromise","compilation","stats","getStats","toJson","modules","providedExports","outputPath","flatMap","mod","nameForCondition","codeGenerated","self","findIndex","m","issuerName","reasons","some","reason","resolvedModule","push","size","constructor","moduleType"],"mappings":";;;;;;;AAqBA;;;;;IAMA,SAASA,mBAAAA,CAAqBC,GAAW,EAAA;AACxC,IAAA,OAAOC,IAAKC,CAAAA,KAAK,CAAEF,GAAIG,CAAAA,OAAO,CAAE,gBAAkB,EAAA,EAAA,CAAA,CAAA,CAAA;AACnD,CAAA;AAEA;;;;;;AAMA,GACA,MAAMC,mBAAsB,GAAA,kCAAA,CAAA;AAErB,SAASC,cAAAA,CAAgBC,QAAgB,EAAA;AAC/C,IAAA,IAAK,CAACC,UAAAA,CAAYD,QAAa,CAAA,EAAA;AAC9B,QAAA,OAAO,IAAA,CAAA;KACR;AAEA,IAAA,MAAME,IAAAA,GAAOC,YAAAA,CAAcH,QAAU,EAAA,OAAA,CAAA,CAAA;IAErC,MAAMI,gBAAmBF,GAAAA,IAAAA,CAAKG,QAAQ,CAAE,kBAAwBC,CAAAA,IAAAA,KAAMC,CAAAA,IAAI,CAAEL,IAAAA,CAAKM,QAAQ,CAAEV,mBAAwBW,CAAAA,CAAAA,CAAAA,EAAE,CAAE,CAAC,CAAA,CAAA,CAAA;AAExH,IAAA,IAAK,CAACL,gBAAAA,IAAoB,CAACA,gBAAAA,CAAiBM,MAAM,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3E,EAAAA,KAAAA,CAAMmC,IAAI,CAAQ,CAAA,IAAA,EAAE,EAClEvF,MACA,EAAA,IAAI,CAACtB,OAAO,CAAA,CAAA;AAEd,SAAA,CAAA,CAAA;AACD,KAAA;IA5CAoK,WAAcpK,CAAAA,OAAAA,GAA4B,EAAE,CAAG;QAC9C,IAAI,CAACA,OAAO,GAAGA,OAAAA,CAAAA;AAChB,KAAA;AA2CD,CAAA;AAEA,SAASgI,UAAWF,MAAmB,EAAA;AACtC,IAAA,IAAK,CAAChI,QAASwI,CAAAA,IAAI,CAAER,MAAAA,CAAO0B,gBAAgB,CAAM,EAAA;QACjD,OAAO,SAAA,CAAA;AACR,KAAA;AAEA;;;KAIA,IAAK1B,MAAOuC,CAAAA,UAAU,KAAK,gBAAA,IAAoB,CAAC,CAACvC,MAAAA,CAAOsB,eAAe,EAAEvL,MAAS,EAAA;QACjF,OAAO,KAAA,CAAA;AACR,KAAA;IAEA,OAAO,KAAA,CAAA;AACR;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../load-source-map/dist/index.js","../src/utils.ts","../src/sourcemap/map.ts","../src/sourcemap/bytes.ts","../src/report.ts","../src/report/generate.ts","../src/bundlers/esbuild.ts","../src/bundlers/rollup.ts","../src/bundlers/webpack.ts"],"sourcesContent":["import { existsSync, readFileSync } from 'fs';\nimport { join, dirname, isAbsolute, resolve } from 'path';\n\n/**\n * Strip any JSON XSSI avoidance prefix from the string (as documented in the source maps specification),\n * and parses the string as JSON.\n *\n * https://github.com/mozilla/source-map/blob/3cb92cc3b73bfab27c146bae4ef2bc09dbb4e5ed/lib/util.js#L162-L164\n */ function parseSourceMapInput(str) {\n return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, \"\"));\n}\n/**\n\tsourceMappingURL=data:application/json;charset=utf-8;base64,data\n\tsourceMappingURL=data:application/json;base64,data\n\tsourceMappingURL=data:application/json;uri,data\n\tsourceMappingURL=map-file-comment.css.map\n\tsourceMappingURL=map-file-comment.css.map?query=value\n*/ const sourceMappingRegExp = /[@#]\\s*sourceMappingURL=(\\S+)\\b/g;\nfunction loadCodeAndMap(codePath) {\n if (!existsSync(codePath)) {\n return null;\n }\n const code = readFileSync(codePath, 'utf-8');\n const extractedComment = code.includes('sourceMappingURL') && Array.from(code.matchAll(sourceMappingRegExp)).at(-1);\n if (!extractedComment || !extractedComment.length) {\n return {\n code\n };\n }\n const maybeMap = loadMap(codePath, extractedComment[1]);\n if (!maybeMap) {\n return {\n code\n };\n }\n const { map, mapPath } = maybeMap;\n map.sources = normalizeSourcesPaths(map, mapPath);\n map.sourcesContent = loadMissingSourcesContent(map);\n delete map.sourceRoot;\n return {\n code,\n map\n };\n}\nfunction loadMap(codePath, sourceMappingURL) {\n if (sourceMappingURL.startsWith('data:')) {\n const map = parseDataUrl(sourceMappingURL);\n return {\n map: parseSourceMapInput(map),\n mapPath: codePath\n };\n }\n const sourceMapFilename = new URL(sourceMappingURL, 'file://').pathname;\n const mapPath = join(dirname(codePath), sourceMapFilename);\n if (!existsSync(mapPath)) {\n return null;\n }\n return {\n map: parseSourceMapInput(readFileSync(mapPath, 'utf-8')),\n mapPath\n };\n}\nfunction parseDataUrl(url) {\n const [prefix, payload] = url.split(',');\n const encoding = prefix.split(';').at(-1);\n switch(encoding){\n case 'base64':\n return Buffer.from(payload, 'base64').toString();\n case 'uri':\n return decodeURIComponent(payload);\n default:\n throw new Error('Unsupported source map encoding: ' + encoding);\n }\n}\n/**\n * Normalize the paths of the sources in the source map to be absolute paths.\n */ function normalizeSourcesPaths(map, mapPath) {\n const mapDir = dirname(mapPath);\n return map.sources.map((source)=>{\n if (!source) {\n return source;\n }\n return isAbsolute(source) ? source : resolve(mapDir, map.sourceRoot ?? '.', source);\n });\n}\n/**\n * Loop through the sources and try to load missing `sourcesContent` from the file system.\n */ function loadMissingSourcesContent(map) {\n return map.sources.map((source, index)=>{\n if (map.sourcesContent?.[index]) {\n return map.sourcesContent[index];\n }\n if (source && existsSync(source)) {\n return readFileSync(source, 'utf-8');\n }\n return null;\n });\n}\n\nexport { loadCodeAndMap };\n//# sourceMappingURL=index.js.map\n","import { relative, win32, posix } from 'path';\nimport type { Options } from './types';\n\nexport const esmRegex: RegExp = /\\.m[tj]sx?$/;\nexport const cjsRegex: RegExp = /\\.c[tj]sx?$/;\nexport const jsRegexp: RegExp = /\\.[cm]?[tj]s[x]?$/;\n\nexport function normalizeOptions( options?: Partial<Options> ) {\n\tconst defaultOptions: Options = {\n\t\topen: true,\n\t\tformat: 'html',\n\t\tdetailed: false,\n\t\tgzip: false,\n\t\tbrotli: false,\n\t};\n\n\treturn Object.assign( {}, defaultOptions, options ) as Options;\n}\n\nexport function normalizePath( pathToNormalize: string ): string {\n\t// Unicode escape sequences used by Rollup and Vite to identify virtual modules\n\tconst normalized = pathToNormalize.replace( /^\\0/, '' )\n\n\t// Transform absolute paths to relative paths\n\tconst relativized = relative( process.cwd(), normalized );\n\n\t// Ensure paths are POSIX-compliant - https://stackoverflow.com/a/63251716/4617687\n\treturn relativized.replaceAll( win32.sep, posix.sep );\n}\n","import { default as remapping, type DecodedSourceMap, type EncodedSourceMap } from '@ampproject/remapping';\nimport { loadCodeAndMap } from 'load-source-map';\nimport { resolve } from 'path';\nimport { normalizePath } from '../utils';\nimport type { CodeMap, ReportInput } from '../types';\n\nexport function mapSourceMap(\n\tmap: EncodedSourceMap,\n\tdirPath: string,\n\tinputs: Record<string, ReportInput>\n): DecodedSourceMap {\n\tconst alreadyRemapped = new Set<string>();\n\tconst remapped = remapping( map, ( file, ctx ) => {\n\t\tif ( alreadyRemapped.has( file ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\talreadyRemapped.add( file );\n\n\t\tconst codeMap = addSourcesToInputs(\n\t\t\tresolve( dirPath, file ),\n\t\t\tinputs\n\t\t);\n\n\t\tif ( !codeMap ) {\n\t\t\treturn;\n\t\t}\n\n\t\tctx.content ??= codeMap.code;\n\n\t\treturn codeMap.map;\n\t}, { decodedMappings: true } );\n\n\treturn remapped as DecodedSourceMap;\n}\n\n/**\n * Loads the source map of a given file and adds its \"sources\" to the given inputs object.\n */\nexport function addSourcesToInputs(\n\tpath: string,\n\tinputs: Record<string, ReportInput>\n): CodeMap | null {\n\tconst codeMap = loadCodeAndMap( path );\n\n\tif ( !codeMap ) {\n\t\treturn null;\n\t}\n\n\tconst parentPath = normalizePath( path );\n\tconst format = inputs[ parentPath ]?.format ?? 'unknown';\n\n\tcodeMap.map?.sources\n\t\t.filter( source => source !== null )\n\t\t.forEach( ( source, index ) => {\n\t\t\tconst normalizedPath = normalizePath( source );\n\n\t\t\tif ( parentPath === normalizedPath ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tinputs[ normalizedPath ] = {\n\t\t\t\tbytes: Buffer.byteLength( codeMap.map!.sourcesContent?.[ index ] ?? '' ),\n\t\t\t\tformat,\n\t\t\t\timports: [],\n\t\t\t\tbelongsTo: parentPath\n\t\t\t};\n\t\t} );\n\t\n\treturn codeMap;\n}\n","import { gzipSync, brotliCompressSync } from 'zlib';\nimport type { DecodedSourceMap, SourceMapSegment } from '@ampproject/remapping';\nimport type { Options, Sizes } from '../types';\n\nconst UNASSIGNED = '[unassigned]';\n\nexport function getBytesPerSource(\n\tcode: string,\n\tmap: DecodedSourceMap,\n\tassetSizes: Sizes,\n\toptions: Options\n): Map<string, Sizes> {\n\tconst contributions = getContributions( map.sources );\n\n\t// Split the code into lines\n\tconst codeLines = code.split( /(?<=\\r?\\n)/ );\n\n\tfor ( let lineIndex = 0; lineIndex < codeLines.length; lineIndex++ ) {\n\t\tconst lineCode = codeLines[ lineIndex ];\n\t\tconst mappings = map.mappings[ lineIndex ] || [];\n\t\tlet currentColumn = 0;\n\n\t\tfor ( let i = 0; i <= mappings.length; i++ ) {\n\t\t\t// 0: generatedColumn\n\t\t\t// 1: sourceIndex\n\t\t\t// 2: originalLine\n\t\t\t// 3: originalColumn\n\t\t\t// 4: nameIndex\n\n\t\t\tconst mapping: SourceMapSegment | undefined = mappings[ i ];\n\t\t\tconst startColumn = mapping?.[ 0 ] ?? lineCode.length;\n\t\t\tconst endColumn = mappings[ i + 1 ]?.[ 0 ] ?? lineCode.length;\n\n\t\t\t// Slice the code from currentColumn to startColumn for unassigned code\n\t\t\tif ( startColumn > currentColumn ) {\n\t\t\t\tcontributions.set( UNASSIGNED, contributions.get( UNASSIGNED ) + lineCode.slice( currentColumn, startColumn ) );\n\t\t\t}\n\n\t\t\tif ( mapping ) {\n\t\t\t\t// Slice the code from startColumn to endColumn for assigned code\n\t\t\t\tconst sourceIndex = mapping?.[ 1 ];\n\t\t\t\tconst codeSlice = lineCode.slice( startColumn, endColumn );\n\t\t\t\tconst source = sourceIndex !== undefined ? map.sources[ sourceIndex ]! : UNASSIGNED;\n\n\t\t\t\tcontributions.set( source, contributions.get( source ) + codeSlice );\n\t\t\t\tcurrentColumn = endColumn;\n\t\t\t} else {\n\t\t\t\tcurrentColumn = startColumn;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compute sizes for each source\n\tconst sourceSizes = new Map<string, Sizes>();\n\n\tconst contributionsSum: Sizes = {\n\t\tuncompressed: 0,\n\t\tgzip: 0,\n\t\tbrotli: 0\n\t};\n\n\tfor ( const [ source, codeSegment ] of contributions ) {\n\t\tconst sizes = getSizes( codeSegment, options );\n\n\t\tcontributionsSum.uncompressed += sizes.uncompressed;\n\t\tcontributionsSum.gzip += sizes.gzip;\n\t\tcontributionsSum.brotli += sizes.brotli;\n\n\t\tsourceSizes.set( source, sizes );\n\t}\n\n\treturn adjustSizes( sourceSizes, assetSizes, contributionsSum, options );\n}\n\nexport function getSizes(\n\tcode: string,\n\toptions: Options\n): Sizes {\n\treturn {\n\t\tuncompressed: Buffer.byteLength( code ),\n\t\tgzip: options.gzip ? gzipSync( code ).length : 0,\n\t\tbrotli: options.brotli ? brotliCompressSync( code ).length : 0\n\t};\n}\n\nfunction getContributions( sources: Array<string | null> ): Map<string, string> {\n\tconst contributions = new Map<string, string>();\n\n\t// Populate contributions with sources\n\tsources\n\t\t.filter( source => source !== null )\n\t\t.forEach( source => contributions.set( source, '' ) );\n\n\t// Add entry for the code that is not assigned to any source\n\tcontributions.set( UNASSIGNED, '' );\n\n\treturn contributions;\n}\n\n/**\n * Compression efficiency improves with the size of the file.\n *\n * However, what we have is the compressed size of the entire bundle (`actual`),\n * the sum of all files compressed individually (`sum`) and the compressed\n * size of a given file (`content`). The last value is essentially a “worst-case”\n * scenario, and the actual size of the file in the bundle is likely to be smaller.\n *\n * We use this information to estimate the actual size of the file in the bundle\n * after compression.\n */\nfunction adjustSizes(\n\tsources: Map<string, Sizes>,\n\tasset: Sizes,\n\tsums: Sizes,\n\toptions: Options\n): Map<string, Sizes> {\n\tconst gzipDelta = options.gzip ? asset.gzip / sums.gzip : 0;\n\tconst brotliDelta = options.brotli ? asset.brotli / sums.brotli : 0;\n\n\tfor ( const [ source, sizes ] of sources ) {\n\t\tsources.set( source, {\n\t\t\tuncompressed: sizes.uncompressed,\n\t\t\tgzip: options.gzip ? Math.round( sizes.gzip * gzipDelta ) : 0,\n\t\t\tbrotli: options.brotli ? Math.round( sizes.brotli * brotliDelta ) : 0\n\t\t} );\n\t}\n\n\treturn sources;\n}\n","import { readFileSync } from 'fs';\nimport { fileURLToPath } from 'url';\nimport { dirname, resolve } from 'path';\nimport { loadCodeAndMap } from 'load-source-map';\nimport { decode } from '@jridgewell/sourcemap-codec';\nimport { mapSourceMap } from './sourcemap/map.js';\nimport { getBytesPerSource, getSizes } from './sourcemap/bytes.js';\nimport type {\n JsonReport,\n MaybeCodeMap,\n ReportInput,\n ReportOutput,\n CodeMap,\n ReportOutputInput,\n Options\n} from './types.js';\nimport { normalizePath } from './utils.js';\n\nexport function generateJsonReport(\n assets: Array<string>,\n inputs: Record<string, ReportInput>,\n options: Options\n): JsonReport {\n const outputs = assets\n .filter( asset => !asset.endsWith( '.map' ) )\n .reduce( ( carry, asset ) => {\n const data = processAsset( asset, inputs, options );\n\n if ( data ) {\n carry[ normalizePath( asset ) ] = data;\n }\n\n return carry;\n }, {} as Record<string, ReportOutput> );\n\n return {\n inputs: sortObjectKeys( inputs ),\n outputs: sortObjectKeys( outputs )\n };\n}\n\nexport function generateHtmlReport(\n assets: Array<string>,\n inputs: Record<string, ReportInput>,\n options: Options\n): string {\n const json = generateJsonReport( assets, inputs, options );\n const __dirname = dirname( fileURLToPath( import.meta.url ) );\n const template = readFileSync( resolve( __dirname, './index.html' ), 'utf-8' );\n\n return template.replace( '__REPORT_DATA__', JSON.stringify( json ) );\n}\n\nfunction processAsset(\n asset: string,\n inputs: Record<string, ReportInput>,\n options: Options\n): ReportOutput | void {\n const maybeCodeMap = loadCodeAndMap( asset );\n\n if ( !hasCodeAndMap( maybeCodeMap ) ) {\n return;\n }\n\n const { code, map } = maybeCodeMap;\n const mapped = options.detailed\n ? mapSourceMap( map, dirname( asset ), inputs )\n : { ...map, mappings: decode( map.mappings ) };\n\n mapped.sources = mapped.sources.map( source => normalizePath( source! ) );\n\n const assetSizes = getSizes( code, options );\n const bytes = getBytesPerSource( code, mapped, assetSizes, options );\n const outputInputs = Array\n .from( bytes )\n .reduce( ( carry, [ source, sizes ] ) => {\n carry[ normalizePath( source ) ] = sizes;\n\n return carry;\n }, {} as Record<string, ReportOutputInput> );\n\n return {\n ...assetSizes,\n inputs: sortObjectKeys( outputInputs )\n };\n}\n\nfunction hasCodeAndMap( result: MaybeCodeMap ): result is Required<CodeMap> {\n return Boolean( result && result.code && result.map );\n}\n\nfunction sortObjectKeys<T extends unknown>( object: Record<string, T> ): Record<string, T> {\n return Object\n .keys( object )\n .sort()\n .reduce( ( carry, key ) => {\n carry[ key ] = object[ key ];\n\n return carry;\n }, {} as Record<string, T> );\n} \n","import { join } from 'path';\nimport { writeFileSync } from 'fs';\nimport { generateHtmlReport, generateJsonReport } from '../report.js';\nimport type { Options, JsonReport } from '../types.js';\nimport { normalizeOptions } from '../utils.js';\n\nexport async function generateReportFromAssets(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\tuserOptions: Partial<Options>\n): Promise<void> {\n\tconst options = normalizeOptions( userOptions );\n\tconst handler = options.format === 'html' ? saveHtml : saveJson;\n\tconst path = handler( assets, inputs, options );\n\n\tif ( !options.open || !path ) {\n\t\treturn;\n\t}\n\n\t/**\n\t * `open` is ESM-only package, so we need to import it\n\t * dynamically to make it work in CommonJS environment.\n\t */\n\tconst { default: open } = await import( 'open' );\n\n\topen( path );\n}\n\nfunction saveHtml(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\toptions: Options\n): string | null {\n\tconst report = generateHtmlReport( assets, inputs, options );\n\tconst path = join( process.cwd(), 'sonda-report.html' );\n\n\twriteFileSync( path, report );\n\n\treturn path;\n}\n\nfunction saveJson(\n\tassets: string[],\n\tinputs: JsonReport[ 'inputs' ],\n\toptions: Options\n): string | null {\n\tconst report = generateJsonReport( assets, inputs, options );\n\tconst path = join( process.cwd(), 'sonda-report.json' );\n\n\twriteFileSync( path, JSON.stringify( report, null, 2 ) );\n\n\treturn path;\n}\n","import { resolve } from 'path';\nimport { addSourcesToInputs } from '../sourcemap/map';\nimport { generateReportFromAssets } from '../report/generate';\nimport type { Plugin } from 'esbuild';\nimport type { Options, JsonReport } from '../types';\n\nexport function SondaEsbuildPlugin( options: Partial<Options> = {} ): Plugin {\n\treturn {\n\t\tname: 'sonda',\n\t\tsetup( build ) {\n\t\t\tbuild.initialOptions.metafile = true;\n\n\t\t\t// Esbuild already reads the existing source maps, so there's no need to do it again\n\t\t\toptions.detailed = false;\n\n\t\t\tbuild.onEnd( result => {\n\t\t\t\tif ( !result.metafile ) {\n\t\t\t\t\treturn console.error( 'Metafile is required for SondaEsbuildPlugin to work.' );\n\t\t\t\t}\n\n\t\t\t\tconst cwd = process.cwd();\n\t\t\t\tconst inputs = Object\n\t\t\t\t\t.entries( result.metafile.inputs )\n\t\t\t\t\t.reduce( ( acc, [ path, data ] ) => {\n\t\t\t\t\t\tacc[ path ] = {\n\t\t\t\t\t\t\tbytes: data.bytes,\n\t\t\t\t\t\t\tformat: data.format ?? 'unknown',\n\t\t\t\t\t\t\timports: data.imports.map( data => data.path ),\n\t\t\t\t\t\t\tbelongsTo: null,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Because esbuild already reads the existing source maps, there may be\n\t\t\t\t\t\t * cases where some report \"outputs\" include \"inputs\" don't exist in the\n\t\t\t\t\t\t * main \"inputs\" object. To avoid this, we parse each esbuild input and\n\t\t\t\t\t\t * add its sources to the \"inputs\" object.\n\t\t\t\t\t\t */\n\t\t\t\t\t\taddSourcesToInputs(\n\t\t\t\t\t\t\tresolve( cwd, path ),\n\t\t\t\t\t\t\tacc\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}, {} as JsonReport[ 'inputs' ] );\n\n\t\t\t\treturn generateReportFromAssets(\n\t\t\t\t\tObject.keys( result.metafile.outputs ).map( path => resolve( cwd, path ) ),\n\t\t\t\t\tinputs,\n\t\t\t\t\toptions\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\t};\n}\n","import { join, resolve, dirname } from 'path';\nimport { normalizePath, cjsRegex, jsRegexp } from '../utils.js';\nimport { generateReportFromAssets } from '../report/generate.js';\nimport type { Options, ModuleFormat, JsonReport } from '../types.js';\nimport type { Plugin, ModuleInfo, NormalizedOutputOptions, OutputBundle } from 'rollup';\n\nexport function SondaRollupPlugin( options: Partial<Options> = {} ): Plugin {\n\tlet inputs: JsonReport[ 'inputs' ] = {};\n\n\treturn {\n\t\tname: 'sonda',\n\n\t\twriteBundle(\n\t\t\t{ dir, file }: NormalizedOutputOptions,\n\t\t\tbundle: OutputBundle\n\t\t) {\n\t\t\tconst outputDir = resolve( process.cwd(), dir ?? dirname( file! ) );\n\t\t\tconst assets = Object.keys( bundle ).map( name => join( outputDir, name ) );\n\n\t\t\treturn generateReportFromAssets(\n\t\t\t\tassets,\n\t\t\t\tinputs,\n\t\t\t\toptions\n\t\t\t);\n\t\t},\n\n\t\tmoduleParsed( module: ModuleInfo ) {\n\t\t\tinputs[ normalizePath( module.id ) ] = {\n\t\t\t\tbytes: module.code ? Buffer.byteLength( module.code ) : 0,\n\t\t\t\tformat: getFormat( module.id, module.meta.commonjs?.isCommonJS ),\n\t\t\t\timports: module.importedIds.map( id => normalizePath( id ) ),\n\t\t\t\tbelongsTo: null,\n\t\t\t};\n\t\t}\n\t};\n}\n\nfunction getFormat( moduleId: string, isCommonJS: boolean | undefined ): ModuleFormat {\n\tif ( isCommonJS === true || cjsRegex.test( moduleId ) ) {\n\t\treturn 'cjs';\n\t}\n\n\tif ( isCommonJS === false || jsRegexp.test( moduleId ) ) {\n\t\treturn 'esm';\n\t}\n\n\treturn'unknown';\n}\n","import { join } from 'path';\nimport { normalizePath, jsRegexp } from '../utils';\nimport { generateReportFromAssets } from '../report/generate';\nimport type { Compiler, StatsModule } from 'webpack';\nimport type { Options, ModuleFormat, JsonReport } from '../types';\n\nexport class SondaWebpackPlugin {\n\toptions: Partial<Options>;\n\n\tconstructor ( options: Partial<Options> = {} ) {\n\t\tthis.options = options;\n\t}\n\n\tapply( compiler: Compiler ): void {\n\t\tcompiler.options.output.devtoolModuleFilenameTemplate = '[absolute-resource-path]';\n\n\t\tcompiler.hooks.afterEmit.tapPromise( 'SondaWebpackPlugin', compilation => {\n\t\t\tconst inputs: JsonReport[ 'inputs' ] = {};\n\t\t\tconst stats = compilation.getStats().toJson( {\n\t\t\t\tmodules: true,\n\t\t\t\tprovidedExports: true,\n\t\t\t} );\n\n\t\t\tconst outputPath = stats.outputPath || compiler.outputPath;\n\t\t\tconst modules: Array<StatsModule> = stats.modules\n\t\t\t\t?.flatMap( mod => mod.modules ? [ mod, ...mod.modules ] : mod )\n\t\t\t\t.filter( mod => mod.nameForCondition && !mod.codeGenerated )\n\t\t\t\t.filter( ( mod, index, self ) => self.findIndex( m => m.nameForCondition === mod.nameForCondition ) === index )\n\t\t\t\t|| [];\n\n\t\t\tmodules.forEach( module => {\n\t\t\t\tconst imports = modules.reduce( ( acc, { nameForCondition, issuerName, reasons } ) => {\n\t\t\t\t\tif ( issuerName === module.name || reasons?.some( reason => reason.resolvedModule === module.name ) ) {\n\t\t\t\t\t\tacc.push( normalizePath( nameForCondition! ) );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn acc;\n\t\t\t\t}, [] as Array<string> );\n\n\t\t\t\tinputs[ normalizePath( module.nameForCondition! ) ] = {\n\t\t\t\t\tbytes: module.size || 0,\n\t\t\t\t\tformat: getFormat( module ),\n\t\t\t\t\timports,\n\t\t\t\t\tbelongsTo: null\n\t\t\t\t};\n\t\t\t} );\n\n\t\t\treturn generateReportFromAssets(\n\t\t\t\tstats.assets?.map( asset => join( outputPath, asset.name ) ) || [],\n\t\t\t\tinputs,\n\t\t\t\tthis.options\n\t\t\t);\n\t\t} );\n\t}\n}\n\nfunction getFormat( module: StatsModule ): ModuleFormat {\n\tif ( !jsRegexp.test( module.nameForCondition! ) ) {\n\t\treturn 'unknown';\n\t}\n\n\t/**\n\t * Sometimes ESM modules have `moduleType` set as `javascript/auto`, so we\n\t * also need to check if the module has exports to determine if it's ESM.\n\t */\n\tif ( module.moduleType === 'javascript/esm' || !!module.providedExports?.length ) {\n\t\treturn 'esm';\n\t}\n\n\treturn 'cjs';\n}\n"],"names":["parseSourceMapInput","str","JSON","parse","replace","sourceMappingRegExp","loadCodeAndMap","codePath","existsSync","code","readFileSync","extractedComment","includes","Array","from","matchAll","at","length","maybeMap","loadMap","map","mapPath","sources","normalizeSourcesPaths","sourcesContent","loadMissingSourcesContent","sourceRoot","sourceMappingURL","startsWith","parseDataUrl","sourceMapFilename","URL","pathname","join","dirname","url","prefix","payload","split","encoding","Buffer","toString","decodeURIComponent","Error","mapDir","source","isAbsolute","resolve","index","cjsRegex","jsRegexp","normalizeOptions","options","defaultOptions","open","format","detailed","gzip","brotli","Object","assign","normalizePath","pathToNormalize","normalized","relativized","relative","process","cwd","replaceAll","win32","sep","posix","mapSourceMap","dirPath","inputs","alreadyRemapped","Set","remapped","remapping","file","ctx","has","add","codeMap","addSourcesToInputs","content","decodedMappings","path","parentPath","filter","forEach","normalizedPath","bytes","byteLength","imports","belongsTo","UNASSIGNED","getBytesPerSource","assetSizes","contributions","getContributions","codeLines","lineIndex","lineCode","mappings","currentColumn","i","mapping","startColumn","endColumn","set","get","slice","sourceIndex","codeSlice","undefined","sourceSizes","Map","contributionsSum","uncompressed","codeSegment","sizes","getSizes","adjustSizes","gzipSync","brotliCompressSync","asset","sums","gzipDelta","brotliDelta","Math","round","generateJsonReport","assets","outputs","endsWith","reduce","carry","data","processAsset","sortObjectKeys","generateHtmlReport","json","__dirname","fileURLToPath","template","stringify","maybeCodeMap","hasCodeAndMap","mapped","decode","outputInputs","result","Boolean","object","keys","sort","key","generateReportFromAssets","userOptions","handler","saveHtml","saveJson","default","report","writeFileSync","SondaEsbuildPlugin","name","setup","build","initialOptions","metafile","onEnd","console","error","entries","acc","SondaRollupPlugin","writeBundle","dir","bundle","outputDir","moduleParsed","module","id","getFormat","meta","commonjs","isCommonJS","importedIds","moduleId","test","SondaWebpackPlugin","apply","compiler","output","devtoolModuleFilenameTemplate","hooks","afterEmit","tapPromise","compilation","stats","getStats","toJson","modules","providedExports","outputPath","flatMap","mod","nameForCondition","codeGenerated","self","findIndex","m","issuerName","reasons","some","reason","resolvedModule","push","size","constructor","moduleType"],"mappings":";;;;;;;AAqBA;;;;;IAMA,SAASA,mBAAAA,CAAqBC,GAAW,EAAA;AACxC,IAAA,OAAOC,IAAKC,CAAAA,KAAK,CAAEF,GAAIG,CAAAA,OAAO,CAAE,gBAAkB,EAAA,EAAA,CAAA,CAAA,CAAA;AACnD,CAAA;AAEA;;;;;;AAMA,GACA,MAAMC,mBAAsB,GAAA,kCAAA,CAAA;AAErB,SAASC,cAAAA,CAAgBC,QAAgB,EAAA;AAC/C,IAAA,IAAK,CAACC,UAAAA,CAAYD,QAAa,CAAA,EAAA;AAC9B,QAAA,OAAO,IAAA,CAAA;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