@bymaksym/loadline 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +182 -0
  3. package/bin/loadline.js +50 -0
  4. package/dist/cli/cli/args.js +324 -0
  5. package/dist/cli/cli/args.types.js +3 -0
  6. package/dist/cli/cli/gates.js +173 -0
  7. package/dist/cli/cli/gates.types.js +3 -0
  8. package/dist/cli/cli/main.js +156 -0
  9. package/dist/cli/cli/read-build.js +382 -0
  10. package/dist/cli/cli/read-build.types.js +3 -0
  11. package/dist/cli/cli/render-json.js +116 -0
  12. package/dist/cli/cli/render-json.types.js +10 -0
  13. package/dist/cli/cli/render-markdown.js +30 -0
  14. package/dist/cli/cli/render-pr.js +76 -0
  15. package/dist/cli/cli/render-sarif.js +83 -0
  16. package/dist/cli/cli/render-text.js +388 -0
  17. package/dist/cli/cli/report.js +196 -0
  18. package/dist/cli/cli/report.types.js +3 -0
  19. package/dist/cli/cli/self-check.js +85 -0
  20. package/dist/cli/cli/text.js +180 -0
  21. package/dist/cli/cli/text.types.js +10 -0
  22. package/dist/cli/src/app/core/analysis/analysis.js +661 -0
  23. package/dist/cli/src/app/core/analysis/analysis.types.js +6 -0
  24. package/dist/cli/src/app/core/analysis/barrels.js +128 -0
  25. package/dist/cli/src/app/core/analysis/blast.js +172 -0
  26. package/dist/cli/src/app/core/analysis/cycles.js +110 -0
  27. package/dist/cli/src/app/core/analysis/delivery.js +143 -0
  28. package/dist/cli/src/app/core/analysis/entries.js +217 -0
  29. package/dist/cli/src/app/core/analysis/exclusive.js +91 -0
  30. package/dist/cli/src/app/core/analysis/importers.js +38 -0
  31. package/dist/cli/src/app/core/analysis/insights.js +202 -0
  32. package/dist/cli/src/app/core/analysis/insights.types.js +10 -0
  33. package/dist/cli/src/app/core/analysis/invariant.js +69 -0
  34. package/dist/cli/src/app/core/analysis/metafile.types.js +44 -0
  35. package/dist/cli/src/app/core/analysis/module-graph.js +192 -0
  36. package/dist/cli/src/app/core/analysis/sourcemap.js +231 -0
  37. package/dist/cli/src/app/core/analysis/sourcemap.types.js +3 -0
  38. package/dist/cli/src/app/core/analysis/split-drift.js +47 -0
  39. package/dist/cli/src/app/core/assets/assets.js +296 -0
  40. package/dist/cli/src/app/core/assets/assets.types.js +11 -0
  41. package/dist/cli/src/app/core/baseline/baseline.js +0 -0
  42. package/dist/cli/src/app/core/baseline/baseline.types.js +3 -0
  43. package/dist/cli/src/app/core/caching/caching.js +241 -0
  44. package/dist/cli/src/app/core/caching/caching.types.js +10 -0
  45. package/dist/cli/src/app/core/caching/from-analysis.js +73 -0
  46. package/dist/cli/src/app/core/config/loadline-config.js +110 -0
  47. package/dist/cli/src/app/core/config/loadline-config.types.js +12 -0
  48. package/dist/cli/src/app/core/criteria/criteria.js +228 -0
  49. package/dist/cli/src/app/core/criteria/criteria.types.js +3 -0
  50. package/dist/cli/src/app/core/deps/deps.js +225 -0
  51. package/dist/cli/src/app/core/deps/deps.types.js +15 -0
  52. package/dist/cli/src/app/core/export/markdown-table.utils.js +40 -0
  53. package/dist/cli/src/app/core/export/summary.js +72 -0
  54. package/dist/cli/src/app/core/findings/actions.js +59 -0
  55. package/dist/cli/src/app/core/findings/assets.js +130 -0
  56. package/dist/cli/src/app/core/findings/caching.js +165 -0
  57. package/dist/cli/src/app/core/findings/compose.js +41 -0
  58. package/dist/cli/src/app/core/findings/deps.js +66 -0
  59. package/dist/cli/src/app/core/findings/effort.js +117 -0
  60. package/dist/cli/src/app/core/findings/finding-html.js +13 -0
  61. package/dist/cli/src/app/core/findings/finding-plain.js +26 -0
  62. package/dist/cli/src/app/core/findings/finding-text.js +1231 -0
  63. package/dist/cli/src/app/core/findings/finding.types.js +80 -0
  64. package/dist/cli/src/app/core/findings/findings.js +514 -0
  65. package/dist/cli/src/app/core/findings/graph.js +167 -0
  66. package/dist/cli/src/app/core/findings/own-in-boot.js +88 -0
  67. package/dist/cli/src/app/core/findings/page.js +49 -0
  68. package/dist/cli/src/app/core/findings/requests.js +185 -0
  69. package/dist/cli/src/app/core/findings/scan.js +126 -0
  70. package/dist/cli/src/app/core/findings/shipped.js +244 -0
  71. package/dist/cli/src/app/core/findings/situation.js +116 -0
  72. package/dist/cli/src/app/core/format/format.utils.js +204 -0
  73. package/dist/cli/src/app/core/i18n/en.js +819 -0
  74. package/dist/cli/src/app/core/i18n/es.js +822 -0
  75. package/dist/cli/src/app/core/i18n/ui-strings.js +11 -0
  76. package/dist/cli/src/app/core/i18n/ui.js +7 -0
  77. package/dist/cli/src/app/core/intake/bundle-graph.js +346 -0
  78. package/dist/cli/src/app/core/intake/bundle-graph.types.js +3 -0
  79. package/dist/cli/src/app/core/intake/dist-files.js +160 -0
  80. package/dist/cli/src/app/core/intake/index-html.js +292 -0
  81. package/dist/cli/src/app/core/json/json.utils.js +55 -0
  82. package/dist/cli/src/app/core/measurement/measurement.types.js +14 -0
  83. package/dist/cli/src/app/core/project/budget-advice.js +76 -0
  84. package/dist/cli/src/app/core/project/project-context.js +394 -0
  85. package/dist/cli/src/app/core/project/project-context.types.js +3 -0
  86. package/dist/cli/src/app/core/scan/catalog.js +67 -0
  87. package/dist/cli/src/app/core/scan/scan.js +280 -0
  88. package/dist/cli/src/app/core/scan/scan.types.js +10 -0
  89. package/dist/cli/src/app/core/scan/secrets.js +0 -0
  90. package/dist/cli/src/app/core/situation/situation.js +261 -0
  91. package/dist/cli/src/app/core/situation/situation.types.js +19 -0
  92. package/dist/cli/src/app/core/timing/timing.js +87 -0
  93. package/dist/cli/src/app/core/timing/timing.types.js +3 -0
  94. package/dist/cli/src/app/core/whatif/defer.js +68 -0
  95. package/dist/cli/src/app/state/report-messages.utils.js +73 -0
  96. package/docs/HOW-IT-WORKS.md +1087 -0
  97. package/loadline.html +78 -0
  98. package/package.json +154 -0
@@ -0,0 +1,819 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EN = void 0;
4
+ const ui_strings_1 = require("./ui-strings");
5
+ /**
6
+ * English UI strings. The contract they fill is `UiStrings`.
7
+ *
8
+ * The bundler's own vocabulary — chunk, bundle, bootstrap, eager, lazy, budget, tree-shaking,
9
+ * source map, barrel file, build — is used verbatim here and in `es.ts`, so both languages name
10
+ * the same thing the same way.
11
+ */
12
+ exports.EN = {
13
+ verdictGood: 'Good',
14
+ verdictOk: 'Fair',
15
+ verdictBad: 'Bad',
16
+ verdictRule: (ok, bad) => `Good up to ${ok} · Fair up to ${bad} · Bad above that`,
17
+ verdictRuleCoverage: (wide, global) => `Lightly shared below ${wide} % of screens · Widely shared up to ${global} % · Effectively bootstrap from ${global} %`,
18
+ tabCriteria: 'Criteria',
19
+ tabCompare: 'Compare',
20
+ secCompare: 'Several applications',
21
+ secCompareSub: 'Drop the stats.json of each one and see what they ship twice: the framework, the packages, and your own code.',
22
+ howToCompare: '<p>For microfrontends, and for anybody with five portals built from the same repository. Each build goes through exactly the same analysis as the report on the other tabs; this crosses the results.</p><p><strong>The figure at the top is the ceiling on a shared package.</strong> It adds up every copy past the largest one of each thing: one copy of a dependency is not waste, it is the dependency — what a shared package would save is the others.</p><p>Figures are raw bytes. A stats.json comes without the folder next to it, so there is nothing to compress, and comparing a compressed build against a raw one would show a saving that never happened.</p>',
23
+ compareAdd: 'Add stats.json files',
24
+ compareAddCurrent: 'Add the build on screen',
25
+ compareClear: 'Clear',
26
+ compareRemove: 'Remove',
27
+ compareEmpty: 'Nothing to compare yet. Add the stats.json of two or more applications.',
28
+ compareNeedsTwo: 'One application is not a comparison. Add at least one more.',
29
+ compareBuild: 'Application',
30
+ compareTotal: 'Whole build',
31
+ compareRaw: 'Raw bytes. A stats.json arrives without the folder next to it, so there is nothing to compress, and a compressed build against a raw one would read as a saving that never happened.',
32
+ compareIn: 'In',
33
+ compareOfN: (n, total) => `${n} of ${total}`,
34
+ compareCost: 'Extra copies',
35
+ compareCostHelp: 'Every copy past the largest one, added up. One copy of a dependency is not waste — it is the dependency. This is what a shared package would actually take off the total.',
36
+ compareInBootHelp: 'In how many of the applications that ship it, it lands in the bootstrap — where a copy is paid by every visit rather than by the screens that open it.',
37
+ compareDuplicatedLead: builds => `shipped more than once across these ${builds} applications`,
38
+ compareDuplicatedHelp: 'Packages and your own files, every copy past the largest one. It is the ceiling on what a shared package could save, not a promise: sharing has its own cost, and this is the number to weigh it against.',
39
+ compareFrameworks: 'The framework, more than once',
40
+ compareFrameworksNote: 'The expensive case. A row in red is the same framework in two different versions, which is the one that cannot be shared without deciding which version wins.',
41
+ comparePackages: 'Packages in more than one of them',
42
+ compareNoShared: 'Nothing they ship twice weighs anything worth naming.',
43
+ compareOwn: 'Your own code, in more than one of them',
44
+ compareNoOwn: 'No file of your own ships in more than one of these builds.',
45
+ compareRest: n => `and ${n} more, lighter than these.`,
46
+ compareVersions: 'Versions',
47
+ compareVersionsHelp: 'Read from the installed path, which only pnpm writes the version into. With npm or yarn the column is empty because nothing could be read — which is not the same as the versions agreeing.',
48
+ compareVersionUnknown: 'not readable',
49
+ compareVersionsNote: 'No installed path carried a version, so the versions could not be read at all. That is a gap in what these files say, not a finding that everything agrees: pnpm writes the version into the path, npm and yarn do not.',
50
+ compareRejected: files => `Not a build: ${files.join(', ')}. Each file has to be a stats.json (an esbuild metafile).`,
51
+ secCriteria: 'Rating criteria',
52
+ secCriteriaSub: 'The thresholds behind “good”, “fair” and “bad”, and the ones that fire each signal. You can change them.',
53
+ howToCriteria: '<p>Every rated figure in the report is compared against two thresholds: up to the first it is <strong>good</strong>, up to the second <strong>fair</strong>, above that <strong>bad</strong>. The criteria in the second and third sections are the ones that fire the signals.</p><p><strong>Where the recommended values come from.</strong> With compressed figures, 170 kB of initial JavaScript is the usual budget for a page to become responsive within a few seconds on a mid-range phone; 350 kB is twice that. With raw figures, 500 kB and 1 MB are the values Angular CLI writes by default into <code>angular.json</code>. Per-screen and own-code values are multiples of those. Signal thresholds that are proportions — coverage, number of importers — do not depend on the unit. The ones that are sizes do: a 50 kB minimum applied to compressed figures is three times stricter than the same minimum in raw, so they scale down with everything else.</p><p>Whatever you change is stored in this browser, separately for raw and compressed, and applies immediately to ratings and signals. A value equal to the recommended one stops counting as custom.</p>',
54
+ criteriaModeNote: mode => {
55
+ if (mode === 'brotli') {
56
+ return 'You are editing the criteria for brotli figures, the real ones from the .br files in the folder. They are lower than the gzip ones by the same margin brotli compresses better.';
57
+ }
58
+ if (mode === 'gzip') {
59
+ return 'You are editing the criteria for gzip-compressed figures (a build folder is loaded).';
60
+ }
61
+ return 'You are editing the criteria for raw figures. With the build folder loaded a different set applies: the bootstrap, for instance, becomes 170 / 350 kB.';
62
+ },
63
+ criteriaFigures: 'Figures',
64
+ criteriaGzipBtn: 'gzip',
65
+ criteriaBrotliBtn: 'brotli',
66
+ criteriaBrotliMissing: 'These are gzip figures. If your server serves brotli, what people download is 15 % to 20 % less, so a red just above the threshold may not be red in production. With the .js.br files in the build folder, Loadline uses the real figure.',
67
+ criteriaRecommended: value => `recommended: ${value}`,
68
+ criteriaReset: 'Restore recommended',
69
+ criteriaStatusRec: 'recommended criteria',
70
+ criteriaStatusCustom: n => (n === 1 ? '1 custom criterion' : `${n} custom criteria`),
71
+ criteriaEdit: 'edit',
72
+ critGroupSizes: 'Sizes',
73
+ critGroupShared: 'Shared chunks',
74
+ critGroupSignals: 'Signals',
75
+ critGroupShape: 'Shape of the split',
76
+ critGroupContext: 'Baseline and project context',
77
+ critOkUpTo: 'good up to',
78
+ critBadAbove: 'bad above',
79
+ blastTitle: 'If you change this file',
80
+ blastBody: (chunks, screens, everyone) => `${chunks === 1 ? '1 chunk is' : `${chunks} chunks are`} invalidated, and ${everyone ? 'every visitor who had the previous build' : `${screens} ${screens === 1 ? 'screen' : 'screens'}`} downloads again:`,
81
+ blastCascade: (chunks, screens, everyone, share) => `${chunks === 1 ? '1 more chunk carries' : `${chunks} more chunks carry`} the name of one of those inside, so ${chunks === 1 ? 'its hash' : 'their hashes'} move too${everyone
82
+ ? ', and that reaches every screen'
83
+ : screens > 0
84
+ ? `, reaching ${screens} more ${screens === 1 ? 'screen' : 'screens'}`
85
+ : ''}. Together that is ${share} of the build re-downloaded:`,
86
+ blastCascadeHelp: 'A bundler writes the hashed file name of every chunk it imports as a string inside the importing chunk, so changing a file changes the name of its chunk, which changes every chunk naming it, and so on outwards. It is how the specifiers are emitted, not something you did wrong. The shape is usually a hub rather than a chain — one shared chunk every route imports and that reaches every route back — which is why the figure jumps rather than growing with depth. Import maps move the specifiers into the HTML, breaking up the hub with manualChunks trades this against a bigger first load, and compression dictionaries make the re-download cheap rather than rarer. Note the tension: the cascade argues for finer chunks and the shared-dictionary and request-cost arguments both argue for coarser ones.',
87
+ blastHub: (file, names) => `${file} carries the names of ${names} other chunks inside it, so anything that moves one of them moves this file too, and this file moving moves everything that imports it.`,
88
+ historyTitle: 'Measurements kept in this browser',
89
+ historyNote: 'One figure against one baseline compares two points and says nothing about the shape between them. 950 → 1.017 is information; 820, 790, 910, 1.200, 970 is a story, and it shows which week the problem walked in. It is kept in THIS browser only — no account, no server — so the way to share it is to export the file.',
90
+ historyEmpty: 'Nothing kept yet. “Keep this one” adds the measurement on screen.',
91
+ historyKeep: 'Keep this one',
92
+ historyExport: 'Export the history',
93
+ historyForget: 'Forget it all',
94
+ historySignals: (high, mid) => `${high} important · ${mid} to review`,
95
+ historyScreenPick: 'And one screen:',
96
+ historyScreenNone: 'none — the bootstrap only',
97
+ historyScreenAbsent: 'this screen was not in that build',
98
+ actionsTitle: 'What to fix first',
99
+ actionsNote: 'An order over the signals below, not a selection: every one of them is still there.',
100
+ effortLabel: { config: 'configuration', import: 'one import', refactor: 'refactor', none: '' },
101
+ actionsTotal: count => `Acting on all ${count} would take`,
102
+ actionsTotalAfter: 'off the first load, leaving it at about',
103
+ actionsTotalNote: 'Raw minified bytes inside the chunk, and not added up: the graph is walked once with every file named above taken out together, so bytes reachable two ways are counted once.',
104
+ thExclusive: 'Exclusive',
105
+ helpExclusive: 'What the first load would lose without this row: the part of its weight that has no other way in. It is the figure that says whether removing it is worth an afternoon — chart.js weighing 310 kB means 70 when 240 of those are d3, which three other things also pull in. Raw minified bytes inside the chunk.',
106
+ helpExclusiveOf: percent => percent >= 100
107
+ ? 'Nothing else brings any of this in: all of it goes if this does.'
108
+ : `Only ${percent} % of this row has no other way in. The rest arrives anyway through something else, so removing this row does not take it off.`,
109
+ critLabel: {
110
+ bootOk: 'Bootstrap (declared and effective)',
111
+ bootBad: 'Bootstrap',
112
+ screenOk: 'Total per screen',
113
+ screenBad: 'Total per screen',
114
+ ownOk: 'A screen’s own code',
115
+ ownBad: 'A screen’s own code',
116
+ sharedRatio: 'Coverage to count as effective bootstrap',
117
+ wideRatio: 'Coverage for “widely shared”',
118
+ sharedMinBytes: 'Minimum size of a near-global chunk to be a signal',
119
+ bootPackageMinBytes: 'Minimum size of a bootstrap package to be a signal',
120
+ bootPackageMaxImporters: 'Maximum importing files to count as “single screen”',
121
+ heavyScreenFactor: 'Expensive screen: times the median own code',
122
+ heavyScreenMinBytes: 'Expensive screen: minimum own code',
123
+ growthRatio: 'Growth since the baseline to be a signal',
124
+ growthMinBytes: 'Minimum growth in size to be a signal',
125
+ budgetSlackFactor: 'Budget too high: times the current bootstrap',
126
+ theirsRatio: 'Share of the first load that can be somebody else’s code',
127
+ latencyMs: 'Round trip on a slow mobile connection, for the time estimate',
128
+ screenFilesMax: 'Files per screen from which the split is worth a look',
129
+ screenWavesMax: 'Round trips a screen takes before it is worth a line',
130
+ dominantRatio: 'Share of a chunk that makes it “that thing, basically”',
131
+ ownFolderMinBytes: 'Minimum weight of your folders held in the bootstrap',
132
+ bigOwnFileBytes: 'From this size, an own file in the bootstrap is named',
133
+ heavyScreenMinScreens: 'Screens needed before comparing against the median',
134
+ tinyChunkBytes: 'Under this, a file is mostly the cost of asking for it',
135
+ minTinyChunks: 'How many of those have to arrive together',
136
+ minLocales: 'Languages of a library before it counts as “all of them”',
137
+ shippedMinBytes: 'Minimum weight for what ships without being screen code',
138
+ barrelMinBytes: 'Exclusive weight from which a barrel file is a signal',
139
+ paidTwiceMinBytes: 'From this size, a module in two chunks is named',
140
+ crumbMaxBytes: 'Under this a chunk is a crumb',
141
+ manyCrumbs: 'Crumbs in a zone before it is a pattern',
142
+ concentratedRatio: 'Share of a zone in one chunk that makes the zone that chunk',
143
+ heavyInZoneRatio: 'Share of its zone from which a row is marked',
144
+ heavyShareRatio: 'Share of a download that counts as “most of it”',
145
+ grouperMaxBytes: 'What a file that only groups routes may weigh',
146
+ sharedGrowthTolerance: 'How alike two screens grow to blame one shared chunk',
147
+ sharedGrowthMinScreens: 'Screens growing alike before it is a shared chunk',
148
+ },
149
+ critHelp: {
150
+ bootOk: 'What downloads before anything is painted. It weighs most on the time until the app responds.',
151
+ bootBad: '',
152
+ screenOk: 'Bootstrap + shared + own: what someone landing directly on a screen downloads.',
153
+ screenBad: '',
154
+ ownOk: 'Chunks only that screen loads. Above this it is usually a heavy library that deserves a lazy block.',
155
+ ownBad: '',
156
+ sharedRatio: 'If at least this share of screens loads a lazy chunk, it downloads on practically every visit and is added to the effective bootstrap.',
157
+ wideRatio: 'Below the previous threshold but above this one, the chunk is labelled widely shared.',
158
+ sharedMinBytes: 'A near-global chunk smaller than this raises no signal: the difference would fall within the variation between two builds.',
159
+ bootPackageMinBytes: 'Bootstrap packages smaller than this are not examined for the “bootstrap for a lazy screen” signal.',
160
+ bootPackageMaxImporters: 'If more of your files than this import the package, it works as shared groundwork and is not flagged.',
161
+ heavyScreenFactor: 'A screen is expensive if its own code is this many times the median of all screens…',
162
+ heavyScreenMinBytes: '…and also exceeds this size.',
163
+ growthRatio: 'With a baseline loaded, the bootstrap or a screen has grown if it is up by at least this share…',
164
+ growthMinBytes: '…and by at least this size, so a 2 kB screen doubling does not fire.',
165
+ budgetSlackFactor: 'An error budget in angular.json this many times the current (raw) bootstrap is flagged as unreachable.',
166
+ theirsRatio: 'Above this share, the report says how much of the first load nobody here wrote. It is never a fault on its own — a framework is somebody else’s code too — so what it raises is context, not a problem.',
167
+ latencyMs: 'The three connection profiles scale with it, so moving it moves all of them instead of flattening them into one number. The only editable part of the time estimate. Throughput and parse cost belong to a device; latency belongs to where your users are, and they pay it once per round trip whatever the bytes compress to. Everything derived from it is an estimate and is labelled as one.',
168
+ screenFilesMax: 'How many files a screen needs before the split is worth looking at. It is context rather than a gate: under multiplexing a count cannot separate sixty well-sized files from sixty crumbs, and what does separate them is the granularity threshold below. It costs real seconds under HTTP/1.1, and a pasted measurement is what says whether that is happening.',
169
+ screenWavesMax: 'How many sequential round trips a screen takes before it is worth a line. The one threshold here with a first principle behind it: every round trip is at least one latency, no compression touches it, and multiplexing does not either — what limits it is sequential discovery, not transport. So it holds the same under HTTP/1.1, HTTP/2 and HTTP/3, and the figure to read is this number times your latency.',
170
+ dominantRatio: 'When one package or folder is at least this much of a shared chunk, the chunk is described as that thing and the advice points at it.',
171
+ ownFolderMinBytes: 'Folders of yours held in the bootstrap by a lazy screen, added up. Below this the coupling is real but not worth a line.',
172
+ bigOwnFileBytes: 'A file of yours inside the bootstrap above this size is listed one by one. It is usually a table of constants that comes in whole.',
173
+ heavyScreenMinScreens: 'With fewer screens than this there is no meaningful median own code, so no screen is called expensive.',
174
+ tinyChunkBytes: 'Headers, a cache entry and the module wrapper are comparable to the content below this size.',
175
+ minTinyChunks: 'A handful of tiny files arriving together is the shape of a split that went further than it helps. Two or three mean nothing.',
176
+ minLocales: 'Below this many language files, the library was not shipped whole: it is the one or two somebody registered.',
177
+ shippedMinBytes: 'Languages of a library and data embedded as code are only reported from this weight up.',
178
+ barrelMinBytes: 'Exclusive, not total: a barrel in front of code that also arrives through five other imports costs nothing, and only what has no other way in is counted here.',
179
+ paidTwiceMinBytes: 'The same module copied into two chunks. One copy was going to be downloaded anyway; this weighs the rest.',
180
+ crumbMaxBytes: 'Chunks under this are counted apart in the Tree tab and in each screen’s shape.',
181
+ manyCrumbs: 'Fewer crumbs than this in one zone is not a pattern, it is two files.',
182
+ concentratedRatio: 'When the largest chunk of a zone is at least this much of it, the zone is really that chunk and the tab says so.',
183
+ heavyInZoneRatio: 'A chunk holding at least this much of its zone is marked as where that weight is.',
184
+ heavyShareRatio: 'How much of a download the largest files have to cover before they are described as most of it.',
185
+ grouperMaxBytes: 'A file that only lists routes compiles to paths and arrow functions. Above this it carries something of its own and counts as a screen.',
186
+ sharedGrowthTolerance: 'Screens growing within this much of each other are read as one shared chunk growing under all of them, instead of as many separate screens.',
187
+ sharedGrowthMinScreens: 'Fewer screens than this growing alike is a coincidence, not a shared chunk.',
188
+ },
189
+ critScale: {
190
+ chunk: 'in the unit of the report',
191
+ file: 'always raw bytes',
192
+ request: 'the cost of one request',
193
+ },
194
+ critFrom: {
195
+ external: 'published figure',
196
+ derived: 'derived here',
197
+ convention: 'convention',
198
+ },
199
+ critFromHelp: {
200
+ external: 'A number somebody else published, copied here so it can be checked against its source rather than taken on trust. The raw first-load pair is what Angular CLI writes into angular.json by default; the round-trip time is the mobile profile Lighthouse throttles to. It is a published default, not a measurement of your build or your audience.',
201
+ derived: 'Arithmetic on another threshold in this list — a multiple of the first-load budget, or the same budget expressed in another unit. It has no independent justification: it moves when the number it comes from moves, and it is only as good as that one.',
202
+ convention: 'A line had to be drawn somewhere and this is where it was drawn. Nothing was measured to arrive at the number, and no source backs it. Most of this list is conventions, and saying so is more useful than inventing a justification after the fact — if your project has a reason for a different number, that reason beats this one.',
203
+ },
204
+ criteriaExport: 'Download criteria',
205
+ criteriaExportHelp: 'Saves what is set here as the JSON file the command reads with --criteria, so the pipeline judges the build by the same thresholds as this page.',
206
+ unitKb: 'kB',
207
+ unitPct: '%',
208
+ unitTimes: '×',
209
+ unitFiles: 'files',
210
+ unitChunks: 'chunks',
211
+ unitScreens: 'screens',
212
+ unitLangs: 'languages',
213
+ unitImporters: 'files',
214
+ unitTrips: 'round trips',
215
+ unitMs: 'ms',
216
+ treePin: 'Keep this chunk at the top, to compare it against another',
217
+ treeUnpin: 'Stop keeping it at the top',
218
+ tagline: 'weight per screen',
219
+ lede: 'What someone opening each screen of your app downloads, how much of it everyone else pays too, and what is worth moving.',
220
+ themeBtn: 'Switch theme',
221
+ densityCompact: 'Compact',
222
+ densityComfortable: 'Comfortable',
223
+ densityHelp: 'Tighter rows, for reading long tables on a wide screen. It changes the spacing and nothing else: no column, no figure and no colour goes away.',
224
+ columnsBtn: (shown, total) => `Columns ${shown}/${total}`,
225
+ copyRow: 'Copy this row',
226
+ copyRowHelp: 'This screen as one line of text, for pasting into a thread about it.',
227
+ explainBtn: 'Where this figure comes from',
228
+ paletteTitle: 'Jump to',
229
+ palettePlaceholder: 'A tab, a screen, a package, a file…',
230
+ paletteNone: 'Nothing by that name.',
231
+ paletteTab: 'tab',
232
+ paletteAction: 'action',
233
+ paletteCount: (shown, total) => total > shown ? `${shown} of ${total} — the Search tab names every one of them` : `${total}`,
234
+ paletteKeysHint: '? for the shortcuts',
235
+ keysTitle: 'Keyboard',
236
+ keyJump: 'Jump to a tab, a screen or a package',
237
+ keySearch: 'The same thing, from anywhere that is not a field',
238
+ keyMove: 'Move through the list and take what is on',
239
+ keyClose: 'Close this, and close an open explanation',
240
+ keyHelp: 'This list',
241
+ keyTabs: 'Between tabs, with a tab focused',
242
+ drop1Title: '1 · Drop your stats.json here',
243
+ drop1Body: 'Your bundler writes it with <code>ng build --stats-json</code> (Angular) or as an esbuild <code>metafile</code>. It is processed in your browser: nothing leaves your machine.',
244
+ drop1Btn: 'Choose stats.json',
245
+ sampleBtn: 'See an example',
246
+ sampleLoaded: outputs => `Example build · ${outputs} outputs · not your project`,
247
+ sampleRemove: 'Close the example',
248
+ diagnosticsBtn: 'Copy diagnostics',
249
+ diagnosticsCopied: 'Copied',
250
+ diagnosticsHint: 'About thirty lines describing the shape of this build and what Loadline decided about it. Package names are real; every path of your own code is replaced by a stable hash. Paste it into an issue.',
251
+ drop2Title: '2 · Optional: the build folder',
252
+ drop2Body: 'Add the <code>browser/</code> folder and every figure becomes <strong>compressed</strong>, which is what gets downloaded. Without it you get raw bytes. If the folder carries the <code>.js.map</code> files, they are also read to get what each file weighs inside each chunk, as a <strong>second measurement</strong> of what the metafile already says.',
253
+ drop2Btn: 'Choose folder',
254
+ statsRemove: 'Remove stats.json',
255
+ distRemove: 'Remove folder',
256
+ projectNameHelp: 'The project being analysed, read from the package.json or angular.json loaded as context.',
257
+ statsIdle: 'Nothing loaded',
258
+ distIdle: 'Nothing loaded · raw figures',
259
+ statsLoaded: (name, outputs) => `${name} · ${outputs} outputs`,
260
+ statsFromFolder: (name, outputs) => `${name} · ${outputs} chunks · graph read from the folder`,
261
+ statsError: message => `Could not read it: ${message}`,
262
+ distNoFiles: 'That folder has no build output in it',
263
+ distNoApi: 'Your browser cannot compress here; keeping raw figures',
264
+ distWorking: (done, total) => `Compressing ${done} of ${total} files…`,
265
+ distReading: 'Reading the import graph…',
266
+ distLoaded: files => `${files} files · compressed figures`,
267
+ distLoadedMaps: (files, maps) => `${files} files · compressed figures · ${maps} source maps read`,
268
+ distLoadedBrotli: 'real brotli from the .br files',
269
+ distLoadedIndex: 'index.html read',
270
+ splitExact: 'split from the source maps',
271
+ splitApprox: 'split from the metafile',
272
+ serverIgnored: n => `${n === 1 ? '1 server output' : `${n} server outputs`} left out`,
273
+ serverIgnoredHelp: 'The build also carries the server bundle (server-side rendering). Nobody downloads it and it is usually the larger of the two, so only the browser side is analysed.',
274
+ blocksNote: n => `${n === 1 ? '1 lazy block' : `${n} lazy blocks`} inside screens, which do not count as screens:`,
275
+ blocksHelp: 'An Angular @defer, or a lazy() inside a component, produces a lazy chunk exactly like a route does. It is not a screen: nobody enters it, it loads when its trigger fires inside the screen holding it. Counting it as a screen would raise the screen count and lower the median with something nobody opens. What the graph cannot say is WHEN that trigger fires: a block behind a button really is bytes nobody pays for until they press it, while one imported as the screen mounts comes down with the first paint, and then the screen weighs more than its row says. Both look identical here. The Measured tab is what settles it.',
276
+ groupersNote: n => `${n === 1 ? '1 lazy entry that only groups routes' : `${n} lazy entries that only group routes`}, which do not count as screens either:`,
277
+ groupersHelp: 'A file that adds practically nothing of its own to its chunk and holds nothing but dynamic imports is grouping routes, whatever it is called. What it loads are the screens; it is not one of them. That is measured rather than read off the file name, so it also holds in a project that does not name its files the Angular way.',
278
+ dataNote: n => `${n === 1 ? '1 lazy entry that is data' : `${n} lazy entries that are data`}, not code anybody navigates to:`,
279
+ dataHelp: 'A language file, a table of countries, a dictionary: an import() of a .json produces a lazy chunk exactly like a route does. Nobody navigates to one, and an application that lazy-loads fifty languages would otherwise report fifty screens. What to do about these is not "is this a screen" but whether the data has to travel inside the bundle at all.',
280
+ markScreen: 'Count as a screen',
281
+ markScreenHelp: 'Puts this entry in the table as a screen of its own. Telling a screen from a piece of one is partly read off file names, and no set of names fits every project: this is the way out that does not need Loadline to learn yours.',
282
+ markBlock: 'Not a screen',
283
+ markBlockHelp: 'Takes this row out of the table: it is a piece of another screen, not somewhere anybody navigates to. It moves to the list of entries that are not screens, above.',
284
+ marksNote: n => `${n === 1 ? '1 entry' : `${n} entries`} reclassified by hand.`,
285
+ marksReset: 'Back to the rules',
286
+ splitHelp: 'How much each file weighs inside a chunk. It normally comes from the metafile, and with esbuild that figure is already minified: checked against the source maps of a real build, the two agree within 1 %. If the folder brings the .js.map files, the figure from the maps is used instead — the same thing, measured on the generated file itself.',
287
+ intakeCompressed: unit => `${unit} figures`,
288
+ intakeRaw: 'raw figures (bytes on disk)',
289
+ intakeAddDist: 'Add the browser/ folder for compressed figures',
290
+ rereadBtn: 'Read the folder again',
291
+ rereadHelp: 'Reads the same build folder again, for after a rebuild. It is offered only where the browser can hold on to a folder, which is not from a file:// page and not in every browser; everywhere else, drop the folder again.',
292
+ intakeChangeStats: 'Change stats.json',
293
+ intakeShow: 'Show drop zones',
294
+ intakeHide: 'Hide drop zones',
295
+ intakeAddBaseline: 'Add a baseline to compare',
296
+ intakeAddContext: 'Add angular.json and pipeline',
297
+ drop3Title: '3 · Optional: the previous measurement',
298
+ drop3Body: 'The <code>stats.json</code> of the previous build, an analysis exported from Loadline, or the whole previous <code>browser/</code> folder (with its <code>stats.json</code>) to compare compressed figures. Every screen shows how much it changed, and a signal fires if something grew or entered the bootstrap.',
299
+ drop3Btn: 'Choose baseline',
300
+ drop3BtnDist: 'Choose previous folder',
301
+ baselineNoStats: 'The folder has no stats.json in it.',
302
+ baselineWorking: 'Compressing the previous folder…',
303
+ drop4Title: '4 · Optional: the project context',
304
+ drop4Body: '<code>angular.json</code>, <code>package.json</code> and the pipeline file (<code>.gitlab-ci.yml</code> or the GitHub workflow). With them Loadline checks where the size budget is and whether the configuration the pipeline builds applies it.',
305
+ drop4Btn: 'Choose files',
306
+ baselineIdle: 'Nothing loaded · no comparison',
307
+ baselineLoaded: (name, mode, screens) => `${name} · ${mode} · ${screens} screens`,
308
+ baselineError: message => `Could not read it: ${message}`,
309
+ baselineShort: name => `baseline: ${name}`,
310
+ baselineModeMismatch: 'The baseline has compressed figures and the current report is raw: add the build folder to compare.',
311
+ baselineRemove: 'Remove baseline',
312
+ contextIdle: 'Nothing loaded',
313
+ contextLoaded: files => files.join(' · '),
314
+ contextIgnored: files => `Not recognised: ${files.join(', ')}`,
315
+ contextShort: n => (n === 1 ? 'context: 1 file' : `context: ${n} files`),
316
+ contextRemove: 'Remove context',
317
+ restorePrompt: (name, date) => `This browser kept the last measurement: ${name} · ${date}`,
318
+ restoreBtn: 'Restore',
319
+ restoreForget: 'Forget',
320
+ exportJson: 'Export analysis (JSON)',
321
+ exportMarkdown: 'Copy table (Markdown)',
322
+ exportCopied: 'Copied',
323
+ exportHint: 'The JSON keeps the bootstrap, its packages and the cost per screen: it serves as the baseline on the next measurement. The Markdown table pastes into an issue or meeting notes.',
324
+ colDelta: 'Δ',
325
+ helpDelta: baseline => `Change of the total against the baseline (${baseline}).`,
326
+ deltaRaw: 'Δ in raw bytes: the baseline has no compressed figures.',
327
+ tileBootDelta: (diff, percent, baseline) => `${diff} (${percent} %) against ${baseline}`,
328
+ tileBootSame: baseline => `same as in ${baseline}`,
329
+ compareNewScreens: n => (n === 1 ? '1 new screen' : `${n} new screens`),
330
+ compareGoneScreens: n => (n === 1 ? '1 screen no longer there' : `${n} screens no longer there`),
331
+ compareNew: 'new',
332
+ tabProject: 'Project',
333
+ secProject: 'Project context',
334
+ secProjectSub: 'Where the size budgets are, what the pipeline builds and whether the budget applies.',
335
+ howToProject: '<p>Angular only checks the size budgets (<code>budgets</code>) of the configuration it builds with. If the budget is in <code>production</code> and the pipeline builds <code>preproduction</code>, the budget never applies. This tab crosses the two: the budgets of every configuration in <code>angular.json</code> and the build commands of the pipeline, following the scripts of <code>package.json</code> (<code>pnpm run build:pre</code> → <code>ng build --configuration=preproduction</code>).</p><p>The comparison with the bootstrap is raw and JavaScript only, which is what Angular measures. An error budget above twice the current bootstrap never fires.</p>',
336
+ projectEmpty: 'Drop angular.json, package.json and the pipeline file in the drop zone to see where the budgets are and whether they apply.',
337
+ projectEmptyBtn: 'Choose project files',
338
+ projectBudgets: project => `Bootstrap budgets by configuration · project ${project}`,
339
+ projectPick: 'Application',
340
+ projectPickHelp: n => `angular.json declares ${n} applications. The budgets below are the ones of the selected application; pick the one your stats.json came from.`,
341
+ projectNoBudgets: 'angular.json declares no build configuration.',
342
+ thConfiguration: 'Configuration',
343
+ thWarning: 'Warning',
344
+ thError: 'Error',
345
+ thBuiltBy: 'Built by the pipeline',
346
+ thAgainstBoot: 'Against the current bootstrap',
347
+ helpBuiltBy: 'Pipeline jobs whose build command resolves to this configuration.',
348
+ helpAgainstBoot: 'How much headroom the error budget leaves over the current raw bootstrap (JavaScript only).',
349
+ builtByNone: 'nobody',
350
+ builtByUnknown: 'no pipeline loaded',
351
+ budgetNoneRow: 'no budget',
352
+ budgetInherited: 'from options',
353
+ budgetDefaultTag: 'default',
354
+ budgetOver: percent => `already over by ${percent} %`,
355
+ budgetHeadroom: percent => `${percent} % headroom`,
356
+ projectPipeline: file => `Build commands in ${file}`,
357
+ projectNoBuilds: 'No build command found in this file.',
358
+ thJob: 'Job',
359
+ thCommand: 'Command',
360
+ thResolvesTo: 'Builds',
361
+ buildDefaultConfig: name => `${name} (default)`,
362
+ buildUnresolved: 'could not be followed to ng build',
363
+ projectZone: 'Change detection',
364
+ zoneYes: 'with zone.js',
365
+ zoneNo: 'without zone.js (zoneless): material about change detection cycles does not apply',
366
+ zoneUnknown: 'no data: load angular.json or package.json',
367
+ projectAngular: version => `Angular ${version}`,
368
+ projectBootRaw: size => `Current raw bootstrap (JavaScript only): ${size}`,
369
+ headLeadGzip: 'Before anything appears, people download (gzip)',
370
+ headLeadRaw: 'Before anything appears, people download (uncompressed)',
371
+ headFigure: (size, files) => `${size} · ${files} files`,
372
+ headNote: (s, unit) => `The most expensive screen is <strong>${s.label}</strong>, at ${s.total} across ${s.files} files — ${s.shared} of that is shared with other screens and only ${s.own} is its own. Figures are ${unit}.`,
373
+ unitGzip: 'gzip-compressed',
374
+ unitRaw: 'raw',
375
+ unitBrotli: 'brotli-compressed',
376
+ headLeadBrotli: 'Before anything appears, people download (brotli)',
377
+ howToAct: 'What can be done about these figures',
378
+ howToActBody: '<p><strong>First, who pays for it.</strong> A high figure only matters if somebody downloads it. Everybody downloads the bootstrap, whichever screen they land on; a chunk of one screen is only downloaded by whoever opens that screen. Getting 100 kB out of the bootstrap removes more total download than removing 100 kB from a screen 5 % of people ever open.</p>' +
379
+ '<p><strong>The four ways to bring it down, cheapest first.</strong></p>' +
380
+ '<ol>' +
381
+ '<li><strong>Move it to where it is used.</strong> A package only one screen needs leaves the bootstrap by changing where it is registered, not what it does. It removes the most for the least risk, and it is what almost every signal proposes.</li>' +
382
+ '<li><strong>Remove it.</strong> The dependency nobody uses any more, the second copy of the same library, or the barrel file that re-exports a whole folder and turns one import into twenty.</li>' +
383
+ '<li><strong>Replace it.</strong> Swap a heavy library for a small one, or for twenty lines of your own. It costs tests and review, so size has to justify it: if the row is not near the top of the table, it rarely pays off.</li>' +
384
+ '<li><strong>Split it.</strong> Break a file or a chunk in two. Last, because it touches the code the most and is the one that most often removes nothing: if both halves end up loading together anyway, all that changed was the file names.</li>' +
385
+ '</ol>' +
386
+ '<p><strong>Telling whether it is worth it, before touching anything.</strong> Look at how much moves and how many people it reaches. A few kB fall within the normal variation between any two builds: if the gain does not show up against a baseline, it cannot be defended either. And always compare in the same unit, preferably compressed, which is what gets downloaded.</p>' +
387
+ '<p><strong>When to stop optimising.</strong> Four cases that keep coming up:</p>' +
388
+ '<ul>' +
389
+ '<li>Almost every screen does load that shared chunk. Splitting it does not reduce what gets downloaded: the contents change file and still download.</li>' +
390
+ '<li>What is in red is brought in by a dependency of a dependency. It cannot be moved from your code: it has to be handled where it is imported, and sometimes there is no alternative.</li>' +
391
+ '<li>The figure is already green. Bringing down the next kB costs considerably more effort than the last one and changes nothing for the person opening the page.</li>' +
392
+ '<li>You are splitting into ever smaller chunks. Each chunk is one more request, and past a point twenty small files take longer than two large ones.</li>' +
393
+ '</ul>' +
394
+ '<p><strong>And check it.</strong> Save this build as the baseline, make the change and measure again. If it does not drop where you expected, the cause was another one, and knowing that helps too.</p>',
395
+ adviceBoot: 'It comes down by taking out of the bootstrap what only some screens use. The Bootstrap tab lists it by weight and marks in red the packages whose only consumer is in a lazy screen: start there.',
396
+ adviceEffective: 'The gap against the declared bootstrap is chunks the bundler marks as lazy and almost everybody downloads. It is not corrected in the bootstrap but in those chunks: the Shared tab.',
397
+ adviceScreens: 'It is bootstrap + shared + own. If the typical screen is expensive but its own code is small, what to look at is the bootstrap: bringing it down brings every screen down at once.',
398
+ adviceShared: 'A chunk almost every screen loads does not improve by splitting it alone. Taking out what a single screen uses pays off; what all of them use will download wherever it lives.',
399
+ adviceFindings: 'Each signal carries what to do and what not to do, with the actual files. The important ones are those affecting the bootstrap, that is, what always downloads; the ones to review are about one screen, or a size that may be justified.',
400
+ tileBoot: 'Declared bootstrap',
401
+ tileBootCss: (size, files, total) => `+ ${size} of CSS the page asks for${files > 1 ? ` in ${files} sheets` : ''} · ${total} before the first paint`,
402
+ tileBootSub: files => `what the bundler marks as initial · ${files} files`,
403
+ tileEffective: 'Effective bootstrap',
404
+ tileEffectiveSub: (extra, chunks, ratio) => `+${extra} in ${chunks === 1 ? 'one chunk marked lazy' : `${chunks} chunks marked lazy`} loaded by at least ${(0, ui_strings_1.pct)(ratio)} of screens`,
405
+ tileEffectiveSame: 'same as declared: no lazy chunk is near-global',
406
+ tileScreens: 'Lazy screens',
407
+ tileScreensTypical: 'the typical one costs',
408
+ tileScreensTop: (label, size) => `· the most expensive is ${label} · ${size}`,
409
+ tileScreensNone: 'the whole app is in the bootstrap',
410
+ tileShared: 'Shared chunks',
411
+ tileSharedSub: (global, partial) => `${global} near-global · ${partial} partial`,
412
+ tileSharedNone: 'no lazy chunk is shared by two screens',
413
+ tileFindings: 'Signals',
414
+ tileFindingsSub: (high, mid) => `${high} important · ${mid} to review`,
415
+ tileFindingsNone: 'no signal in the split',
416
+ tabFindings: 'Signals',
417
+ tabScreens: 'Screens',
418
+ tabBoot: 'Bootstrap',
419
+ tabShared: 'Shared',
420
+ tabTree: 'Tree',
421
+ howTo: 'How to read this tab',
422
+ howToFindings: '<p>Each signal is a concrete pattern found in <strong>your</strong> import graph, with its threshold and its fix. They are not generic performance rules.</p><p><strong>Important</strong> means weight everyone pays without needing to. <strong>To review</strong> flags something worth a look that may have a reason. The button on each signal leads to the report row it comes from.</p>',
423
+ howToScreens: '<p>Each row is a lazy screen, and the bar is what someone landing <strong>directly</strong> on it downloads: <strong>bootstrap</strong> (grey, identical everywhere), <strong>shared</strong> (orange: lazy chunks other screens also load) and <strong>own</strong> (green: this screen only). Bars share one scale, so if the orange segment is the same width on every row, the problem is in that common chunk, not in the screens.</p><p>These figures are <strong>computed</strong> by walking the import graph, not measured. They usually run a little low: entering at the root, the router may load an area’s chunks before a guard rejects it. For the definitive number, serve the build folder and watch the browser’s network tab.</p>',
424
+ howToBoot: '<p>The bootstrap is what arrives before anything is painted, grouped by npm package and by folder of your project. The <strong>imported by</strong> column says how many of your files use each package directly and where they are: if all of them are in lazy screens, that package should not be here.</p><p>Expand a package to see <strong>how it enters the bootstrap</strong>: the import chain from the entry point down to it, and which files of yours import it. The last file of yours in the chain holds the import to move.</p><p>A package “nobody imports directly” gets in because another package imports it: it is not removed from your code but from the package that brings it. The <strong>CommonJS</strong> tag marks packages the bundler cannot tree-shake.</p><p>The colour of the bar says what the row is: grey an npm package, green a folder of your own code, red a package with few importers, at least one of them in a lazy screen. The legend sits above the table, and hovering any figure, bar or tag says what it means.</p>',
425
+ howToShared: '<p>A shared chunk is one the bundler marks as lazy but several screens load. <strong>Coverage</strong> says how many: above 60 % it downloads on practically every visit, even though the bundler’s table classifies it as lazy. That is what this tab shows.</p><p>Expand a row to see exactly which screens load it and which packages it carries. What pays off in a chunk like this is pulling out the components a single screen uses; what nearly every screen uses will keep downloading wherever it lives.</p>',
426
+ howToTree: '<p>Every chunk the bundler produced, opened by package or folder and then by file. The bar measures size against the largest chunk; the colour says who pays for it: grey bootstrap, orange shared, green single screen.</p><p>Use it to answer “what exactly is inside this file?” once a signal or a table row has led you to a name.</p>',
427
+ secFindings: 'Worth a look',
428
+ secFindingsSub: 'Signals computed from your dependency graph, not generic rules.',
429
+ secScreens: 'Cost per screen',
430
+ secScreensSub: 'Click a row to see what makes it up. The bars share a scale.',
431
+ secTree: 'Inside the bundle',
432
+ secTreeSub: 'Chunk, package and file. Filter by zone to see only what everybody pays for.',
433
+ secBoot: 'What is in the bootstrap',
434
+ secBootSub: 'What downloads before anything appears, grouped by package and by your own folders.',
435
+ secShared: 'Shared chunks',
436
+ secSharedSub: 'Lazy according to the bundler; according to your screens, not so much.',
437
+ sevHigh: 'Important',
438
+ sevMid: 'To review',
439
+ sevOk: 'All good',
440
+ sevInfo: 'Good to know',
441
+ seeInShared: 'See the chunk',
442
+ seeInBoot: 'See in bootstrap',
443
+ seeInScreens: 'See the screen',
444
+ seeInProject: 'See the project',
445
+ seeInMeasured: 'See the measurement',
446
+ seeInSituation: 'See the answers',
447
+ findingsRest: 'Context',
448
+ findingsSee: 'Seen',
449
+ findingsUnsee: 'Seen ✓',
450
+ findingsSeenHelp: 'Tick it off: it drops to the end of the list and stops asking for attention.',
451
+ findingsSeenCount: n => (n === 1 ? '1 ticked off' : `${n} ticked off`),
452
+ findingsSeenReset: 'None ticked off',
453
+ findingsNoneHere: 'No signals of this kind.',
454
+ fixLabel: 'What to do',
455
+ legBoot: 'Bootstrap · always downloaded',
456
+ legShared: 'Shared · several screens pay for it',
457
+ legOwn: 'This screen only',
458
+ screensCaveat: 'These figures are <strong>computed</strong> by walking the import graph, not measured.',
459
+ filterBoot: 'Filter packages',
460
+ filterShared: 'Filter chunks',
461
+ filterScreens: 'Filter screens by name…',
462
+ sortByColumn: 'Sort by this column; again, the other way round',
463
+ shownCount: (shown, total) => (shown === total ? `${total} screens` : `${shown} of ${total} screens`),
464
+ shownRows: (shown, total) => (shown === total ? `${total} rows` : `${shown} of ${total} rows`),
465
+ noMatch: 'No screen matches the filter.',
466
+ colScreen: 'Screen',
467
+ colShared: 'Shared',
468
+ colOwn: 'Own',
469
+ colTotal: 'Total',
470
+ helpTotal: 'Bootstrap + shared + own: what someone landing directly on this screen downloads.',
471
+ helpOwnCol: 'Chunks only this screen loads. If it is large, the screen includes a library just for itself.',
472
+ helpSharedCol: 'Lazy chunks this screen shares with at least one other.',
473
+ whichScreens: 'which screens load it',
474
+ screenParts: 'Where it comes from',
475
+ screenShape: n => {
476
+ const heavy = `${n.files} files, and ${n.heavy} of them are ${n.share} % of the weight`;
477
+ return n.crumbs > 0 ? `${heavy}. ${n.crumbs} are under ${n.crumbMax} (${n.crumbSize}).` : `${heavy}.`;
478
+ },
479
+ origin: 'Source file',
480
+ filesCount: n => (n === 1 ? '1 file' : `${n} files`),
481
+ measureFromScreens: 'Measure it for real',
482
+ // --- eager, lazy and round trips ---
483
+ tagDelivery: { eager: 'eager', lazy: 'lazy' },
484
+ helpDelivery: {
485
+ eager: 'Eager: it downloads with the first load, whichever screen somebody lands on.',
486
+ lazy: 'Lazy: nothing downloads it until a dynamic import asks for it. How many screens do that is the figure next to it.',
487
+ },
488
+ colWaves: 'Trips',
489
+ helpWaves: 'The browser does not know a chunk exists until it has downloaded and parsed the one importing it. Two round trips means one part of this screen waits for the other to arrive first — the same bytes, later.',
490
+ screenWaves: n => (n <= 1 ? 'Arrives in one round trip' : `Arrives in ${n} round trips, one after the other`),
491
+ startupNote: startup => {
492
+ if (!startup) {
493
+ return 'Round trips of the first load: unknown. Drop the browser/ folder with its index.html and Loadline reads which chunks that page announces.';
494
+ }
495
+ if (startup.late === 0) {
496
+ const all = startup.chunks === 1 ? 'the only bootstrap chunk' : `all ${startup.chunks} bootstrap chunks`;
497
+ return `index.html announces ${all}: the first load is a single round trip.`;
498
+ }
499
+ const late = startup.late === 1 ? '1 chunk' : `${startup.late} chunks`;
500
+ return `The first load takes ${startup.waves} round trips: index.html does not announce ${late} of the bootstrap, so the browser only finds ${startup.late === 1 ? 'it' : 'them'} after parsing.`;
501
+ },
502
+ startupHelp: 'A chunk named by index.html — the entry script or a modulepreload link — is asked for straight away. One that is not is only discovered once the chunk importing it has arrived, which is another round trip.',
503
+ // --- measured tab ---
504
+ tabMeasured: 'Measured',
505
+ secMeasured: 'What the browser downloads',
506
+ secMeasuredSub: 'The only figure in the tool that is measured rather than computed. Paste what your browser downloaded and Loadline says where the two differ.',
507
+ howToMeasured: "<p>The rest of the report <strong>computes</strong>: it walks the graph of static imports and adds up. This tab <strong>measures</strong>, and the two figures do not match.</p><p>Entering through the root, the router loads an area's chunk in order to match the route, and only afterwards does the guard check the session and redirect. That chunk is already downloaded, and the computation does not count it. That is why the computed figure falls short.</p><p>What gets compared here is <strong>which chunks came down</strong>, not how many bytes either side reported: the set of chunks does not depend on the unit, so a gzip report and a browser reporting transfer bytes still compare cleanly. The difference is then priced with Loadline's own figures.</p>",
508
+ measureStep1: 'Serve the build you loaded and open the app the way people do: through the root, not straight into the route. Disable the cache in the network tab.',
509
+ measureStep2: 'With the screen loaded, paste this into the browser console:',
510
+ measureStep3: 'Paste what it gives you back here.',
511
+ measureCopy: 'Copy',
512
+ measureCopied: 'Copied',
513
+ measurePlaceholder: 'Paste the result here. A list of file names copied from the network tab works too.',
514
+ measureRun: 'Contrast',
515
+ measureClear: 'Forget the measurement',
516
+ measureErrEmpty: 'Nothing was pasted.',
517
+ measureErrNoFiles: 'No file name is recognisable in what was pasted.',
518
+ measureErrNoMatch: 'None of the pasted files belongs to this build. Names are hashed and change on every build: measure the same one you loaded.',
519
+ measureStale: 'The saved measurement does not match this stats.json: they are from different builds.',
520
+ measureScreen: 'Screen measured',
521
+ measureAuto: 'worked out from the chunks that came down',
522
+ measurePicked: 'picked by hand',
523
+ measureRootOnly: 'Bootstrap only: no screen chunk came down.',
524
+ measureFrom: url => `Measured at ${url}`,
525
+ measureComputed: 'Computed',
526
+ measureMeasured: 'Measured',
527
+ measureDiff: 'Difference',
528
+ measureSame: 'No difference',
529
+ measureTransfer: 'Bytes over the wire',
530
+ measureTransferHelp: "What the browser said the download cost, as it said it. The other figures are in the report's unit, so these two columns only agree when the report is compressed.",
531
+ measureFiles: n => (n === 1 ? '1 file' : `${n} files`),
532
+ measureExtra: 'Chunks that came down without being predicted',
533
+ measureExtraHelp: 'The computation only follows static imports. Anything here arrived some other way: the router, a preload, or a file that is not from this build.',
534
+ measureExtraNone: 'None: exactly what was predicted came down.',
535
+ measureMissing: 'Predicted chunks that never came down',
536
+ measureMissingHelp: 'Either the measurement was taken before the screen finished loading, or they came from the cache without showing up in the list, or the router never gets to request them.',
537
+ measureMissingNone: 'None.',
538
+ measureForeign: n => n === 1 ? 'One downloaded file is not from this build.' : `${n} downloaded files are not from this build.`,
539
+ measureOther: n => `${n} more downloads (CSS, fonts, images) are not counted: Loadline's figures are JavaScript.`,
540
+ measureBelongs: 'Whose it is',
541
+ measureNobody: 'No screen',
542
+ measureZone: { boot: 'bootstrap', shared: 'shared', own: 'single screen' },
543
+ measureNotes: 'What you paste stays in this browser, like everything else.',
544
+ measureObserved: 'Observed environment',
545
+ measureObservedHelp: 'What this one paste says about the deployment: what is served rather than what was built. It describes the machine that ran the snippet, on the connection it was on, on the day it ran — not your users. None of it moves a threshold in this report.',
546
+ measureTakenAt: date => `taken on ${date}`,
547
+ measureStaleFact: days => `more than ${days} days old — worth taking again`,
548
+ measureProtocol: 'Protocol',
549
+ measureRtt: 'Round trip',
550
+ measureTtfb: 'Document (wave zero)',
551
+ measureCompression: 'Compression served',
552
+ measureCompressionOff: n => (n === 1 ? '1 file uncompressed' : `${n} files uncompressed`),
553
+ measureCacheState: 'What the cache did',
554
+ measureCacheSplit: (fromCache, revalidated, network) => `${fromCache} from cache · ${revalidated} revalidated · ${network} downloaded`,
555
+ measureConnections: 'Connections opened',
556
+ measureThird: 'Third parties',
557
+ measureThirdValue: (requests, origins) => `${requests} requests to ${origins === 1 ? '1 host' : `${origins} hosts`}`,
558
+ measureSw: 'Service worker',
559
+ measureSwOn: 'controlling this load',
560
+ measureSwOff: 'not controlling this load',
561
+ measurePreloads: 'modulepreload tags',
562
+ measureBatches: 'Batches measured',
563
+ measureBatchesValue: (batches, widest) => `${batches} · widest brings ${widest}`,
564
+ measureUnknown: 'the paste does not say',
565
+ dataSource: {
566
+ measured: 'measured',
567
+ derived: 'from the build',
568
+ declared: 'you told us',
569
+ unknown: 'nobody looked',
570
+ },
571
+ dataSourceHelp: {
572
+ measured: 'A browser reported this. One browser, once, from one machine — a real measurement and a narrow one.',
573
+ derived: 'Computed from the build: the import graph, the chunk sizes, the file names. Exact about what was built, silent about what is served.',
574
+ declared: 'Somebody answered a question. Worth more than a guess and less than a measurement.',
575
+ unknown: 'Nobody looked. This never becomes an average: a figure assumed on your behalf is one nobody can check.',
576
+ },
577
+ // --- situation tab ---
578
+ tabSituation: 'Situation',
579
+ secSituation: 'Five questions the build cannot answer',
580
+ secSituationSub: 'Four claims in this report are grey on purpose, because what would settle them is in no folder anywhere. It is here.',
581
+ howToSituation: '<p>The rest of the report comes from two places: what the build says and what a browser measured. There is a third one neither of them has, and it is <strong>how your team works and who uses this</strong>. Without it the tool shows the raw fact and refuses to claim a colour, which is right and is not free: a cascade re-invalidating 87 % of the build stays a grey number.</p><p>These five questions are that third place. They are answered once, kept in <span class="mono">loadline.json</span> and read by the command too, so that the terminal and this page cannot say different things about the same build.</p><p><strong>What an answer can do is raise a severity; what it cannot do is lower one.</strong> If answering optimistically switched signals off, the cheap way to a clean report would be to answer optimistically. And “I don’t know” softens nothing: it leaves the report exactly where it was.</p>',
582
+ sitQuestion: {
583
+ navigation: 'How do people move around the application?',
584
+ deploys: 'How often does a new version reach production?',
585
+ returning: 'Of the people who open it on a given day, how many had already opened it this week?',
586
+ connection: 'Where do they connect from, and on what?',
587
+ priority: 'Which is worse: a slow first screen, or a slow move from one screen to another?',
588
+ },
589
+ sitOption: {
590
+ navigation: {
591
+ inAndOut: 'They come in, do one thing and leave',
592
+ allDay: 'They spend the day inside, moving between sections',
593
+ profiles: 'It depends — there are two or three distinct profiles',
594
+ unknown: 'I don’t know',
595
+ },
596
+ deploys: {
597
+ daily: 'Several times a day',
598
+ weekly: 'Weekly, more or less',
599
+ monthly: 'Every few weeks',
600
+ unknown: 'I don’t know',
601
+ },
602
+ returning: {
603
+ most: 'Nearly all of them — it is a work tool',
604
+ few: 'Almost none — most arrive from outside',
605
+ half: 'About half and half',
606
+ unknown: 'I don’t know',
607
+ },
608
+ connection: {
609
+ office: 'Office, laptop, good network',
610
+ mobile: 'Mobile, out and about, patchy coverage',
611
+ worldwide: 'Spread around the world, far from the server',
612
+ unknown: 'I don’t know',
613
+ },
614
+ priority: {
615
+ firstScreen: 'The first one — that is where people decide whether to stay',
616
+ navigation: 'Navigation — whoever gets in is staying anyway',
617
+ both: 'Both equally bad',
618
+ },
619
+ },
620
+ sitTechnical: {
621
+ navigation: 'Median distinct screens per session.',
622
+ deploys: 'Releases per week.',
623
+ returning: 'Share of returning visitors, or warm-cache rate.',
624
+ connection: 'p75 round-trip time and device class.',
625
+ priority: 'Entry LCP against route-transition latency.',
626
+ },
627
+ sitHowTo: {
628
+ navigation: 'Where to look: route-change events per session, in your analytics.',
629
+ deploys: 'Where to look: the tags or releases of the last quarter.',
630
+ returning: 'Where to look: the returning-visitor share in your analytics.',
631
+ connection: 'This is the one that lies most: people answer it the way they would like it to be. If you have RUM, do not answer it — import it.',
632
+ priority: 'This one is not looked up anywhere: it is which wait the team would rather pay, and it has to be decided.',
633
+ },
634
+ sitPanel: 'The raw controls',
635
+ sitPanelHelp: 'The same answer with less rounding, for whoever has it to hand. A figure typed here wins over the option above it.',
636
+ sitRawLabel: {
637
+ screensPerSession: 'Distinct screens per session',
638
+ deploysPerWeek: 'Releases per week',
639
+ returningPct: 'Returning',
640
+ },
641
+ sitRawUnit: { screensPerSession: 'screens', deploysPerWeek: 'per week', returningPct: '%' },
642
+ sitRawEmpty: '—',
643
+ sitOpen: 'unanswered',
644
+ sitLatency: ms => `The report turns bytes into seconds with a ${ms} ms round trip. That is the figure that really answers this question, and it is edited in Criteria.`,
645
+ sitLatencyGo: 'Edit the latency',
646
+ sitNoRaw: 'No raw equivalent: its unit is two measurements this tool does not take. It is a decision, not a datum.',
647
+ sitRum: 'We have RUM',
648
+ sitRumHelp: 'If you measure real sessions, the p75 of protocol and round trip comes from there rather than from a console paste or an option in this list. Ticking it retires the fourth question and leaves the latency as the thing to bring over from your own data.',
649
+ sitRumOn: 'The fourth question is not answered: it is imported from your RUM.',
650
+ sitWho: 'Answered by',
651
+ sitWhoPlaceholder: 'a name or a handle',
652
+ sitWhen: 'Date',
653
+ sitStale: days => `These answers are more than ${days} days old. Deploy cadence is exactly what changes when a team moves to continuous delivery: go through them again before trusting the figure.`,
654
+ sitNoDate: 'Without a date there is no way to know when they stopped being true.',
655
+ sitAnswered: (answered, total) => (answered === 0 ? 'Unanswered' : `${answered} of ${total} questions answered`),
656
+ sitReset: 'Clear the answers',
657
+ sitExport: 'Download loadline.json',
658
+ sitExportHelp: 'The situation block as a file, to commit next to the code. The command reads it, so the terminal stops disagreeing with this page.',
659
+ sitCost: (deploys, returning, perWeek) => `${deploys} releases a week × ${returning} returning = one person pays the update ${perWeek} times a week`,
660
+ sitCostNone: 'The two answers that turn an invalidation percentage into a cost are missing: how often you deploy, and how many people come back.',
661
+ sitExposure: {
662
+ high: 'the hash cascade is one of the expensive lines in this report',
663
+ moderate: 'the cascade does get paid for, neither every week nor for nothing',
664
+ low: 'the cascade is barely paid for: nearly everybody downloads all of it anyway',
665
+ unknown: 'without both answers, the fact is shown in full and the colour withheld',
666
+ },
667
+ sitBreadth: {
668
+ narrow: 'single-screen sessions: a deferred chunk’s coverage means what it looks like',
669
+ wide: 'sessions that move around: a shared chunk is downloaded by nearly everybody',
670
+ mixed: 'two or three profiles: the median describes none of them, and coverage has to be read per profile',
671
+ unknown: 'without knowing how wide sessions are, a deferred chunk’s coverage is not interpretable',
672
+ },
673
+ sitAsymmetry: 'Answering can raise a signal’s severity. It cannot lower one, and “I don’t know” softens nothing.',
674
+ sitDeclared: 'declared',
675
+ thSource: 'Source',
676
+ thSize: 'Size',
677
+ thChunk: 'Chunk',
678
+ thScreens: 'Screens',
679
+ chunkNoContent: 'nothing of its own to attribute',
680
+ thMain: 'Main contents',
681
+ thOwn: 'This screen only',
682
+ thSharedWith: 'Shared with others',
683
+ thCoverage: 'Coverage',
684
+ thImporters: 'Imported by',
685
+ helpScreens: 'How many lazy screens this chunk appears in.',
686
+ helpSize: 'Size of the file as downloaded: raw or compressed, depending on what you loaded.',
687
+ helpMain: 'The heaviest source file inside the chunk. Helps you recognise it.',
688
+ helpCoverage: 'How many of your screens load this chunk. Above 60 % it downloads on practically every visit.',
689
+ helpImporters: 'Files of your own code importing this package directly, and whether they are all in lazy screens.',
690
+ helpSource: 'npm package or folder of your project.',
691
+ covGlobal: 'effectively bootstrap',
692
+ covWide: 'widely shared',
693
+ covNarrow: 'lightly shared',
694
+ coverageOf: (n, total) => `${n} of ${total}`,
695
+ loadedBy: n => `Loaded by these ${n} screens`,
696
+ contents: 'What it carries',
697
+ pathRawHelp: 'The per-file breakdown is always uncompressed. Gzip compresses the whole file, using repetitions that cross from one module into the next, so “the compressed weight of this module” does not exist.',
698
+ pathUnattributed: size => `${size} unattributed`,
699
+ pathUnattributedHelp: 'How much more the chunk weighs than its files add up to: the code the bundler itself adds (the module wrapper, the banners). It belongs to no input file, so it is not shared out among them.',
700
+ treeRawHelp: 'The same chunk uncompressed: the unit of the breakdown inside it, and what other bundle tools show.',
701
+ pathExpandAll: 'Expand all',
702
+ pathCollapseAll: 'Collapse all',
703
+ worthTitle: 'What it costs and where it comes from',
704
+ worthTagSmall: 'Below the threshold',
705
+ worthTagOwn: 'Your own code',
706
+ worthTagPackage: importers => importers === 1 ? '1 package · 1 file of yours' : `1 package · ${importers} files of yours`,
707
+ worthTagCommon: 'No dominant source',
708
+ worthCost: (cost, share, without) => `It adds ${cost} to a typical visit, ${share} % of what people download today before seeing anything. If it disappeared entirely that visit would come down to ${without}: that is the most that can be gained here.`,
709
+ worthSmall: min => `It is below ${min}, the point from which the difference shows: the gain would fall within the normal variation between two builds.`,
710
+ worthOwn: (label, share) => `${share} % of it is your own code (${label}), so the change is yours to make. The usual case is a barrel file re-exporting a whole folder: importing one thing includes the rest, and importing from the actual file is enough.`,
711
+ worthPackage: (pkg, share, importers) => `${share} % of it is ${pkg}, and ${importers === 1 ? 'only 1 file of yours imports it' : `only ${importers} files of yours import it`}: there is one concrete place to check whether those screens need it, or whether it can load only where it is used.`,
712
+ worthCommon: 'No group reaches half the chunk, or the one that does is imported from a large part of the application: there is no single file to point at. The two ways out left are using less of that library or swapping it for a smaller one.',
713
+ worthNoSplit: 'Splitting it saves nothing: the bundler groups files by which screens reach them, so both halves would be loaded by exactly the same screens. The only things that bring this figure down are fewer screens importing it, or it weighing less.',
714
+ worthTriage: n => `Of the ${n.namedN + n.spreadN + n.smallN} shared chunks: ${n.namedN} with a named source (${n.namedCost} of a typical visit) · ${n.spreadN} with no dominant source (${n.spreadCost}) · ${n.smallN} below ${n.min}.`,
715
+ sharedSum: (size, chunks, ratio) => `${chunks === 1 ? 'The near-global chunk adds up to' : `The ${chunks} near-global chunks add up to`} <strong>${size}</strong>: whoever opens almost any screen downloads it along with the bootstrap. Minimum coverage to count: ${(0, ui_strings_1.pct)(ratio)}.`,
716
+ sharedSumNone: ratio => `No shared chunk reaches ${(0, ui_strings_1.pct)(ratio)} coverage: what is lazy only downloads when it is needed.`,
717
+ bootPackages: 'npm packages',
718
+ bootOwnCode: 'Your code',
719
+ entriesCount: n => `${n} entries`,
720
+ importersCount: n => (n === 1 ? '1 file of yours' : `${n} files of yours`),
721
+ importersNone: 'nobody directly · another package imports it',
722
+ importersLazyOnly: (lazy, total) => `${lazy} of ${total} in lazy screens`,
723
+ ownCodeRow: 'project folder',
724
+ legBootPkg: 'npm package',
725
+ legBootOwn: 'Folder of your code',
726
+ legBootBad: 'Few importers, at least one a lazy screen',
727
+ helpBootPackages: 'Third-party code that ends up in the bootstrap. Getting it down means not importing it from the bootstrap, or moving it into a lazy screen.',
728
+ helpBootOwnCode: 'Your own code, grouped by project folder. There is no package to remove here: you decide what stays and what becomes lazy.',
729
+ helpBootSplit: (pkg, own) => `${pkg} in npm packages · ${own} in your own code`,
730
+ helpBootPercent: 'The share of the bootstrap this entry takes.',
731
+ helpBootOfBoot: 'of the bootstrap',
732
+ helpBootLazyOnly: max => `At most ${max} files of yours import it and at least one is in a lazy screen, so they can be checked one by one. If they all turn out to be lazy, this package downloads on the first load for people who may never reach that screen.`,
733
+ helpImportersNone: 'No file of yours imports it directly: another package imports it. It is not removed from your code but from the package that brings it.',
734
+ bootChain: 'How it enters the bootstrap',
735
+ bootChainNone: 'Could not be followed from the entry point over static imports.',
736
+ tagCommonJs: 'CommonJS',
737
+ helpCommonJs: 'Shipped as CommonJS: the bundler cannot tree-shake it and every imported file comes in whole.',
738
+ loadedFrom: 'Loaded from',
739
+ treeAll: 'Everything',
740
+ treeBoot: 'Bootstrap',
741
+ treeLazy: 'Lazy',
742
+ treeShared: 'Shared',
743
+ treeOwn: 'Single screen',
744
+ treeScreens: n => (n === 1 ? '1 screen' : `${n} screens`),
745
+ filterTree: 'Filter by chunk, package or folder…',
746
+ treeCrumbs: (n, total, line) => `${n} chunks below ${line} · ${total} between them`,
747
+ treeNoMatch: 'Nothing matches the filter.',
748
+ shapeTitle: 'How it is divided',
749
+ treeShare: (share, zone) => zone === 'boot'
750
+ ? `${share} % of the bootstrap`
751
+ : zone === 'shared'
752
+ ? `${share} % of what is shared`
753
+ : `${share} % of what one screen loads`,
754
+ treeShareHelp: 'How much of its zone this one chunk holds. Marked from 25 %: that is where the weight is, and therefore what to look at before the rows below it.',
755
+ shapeSplit: eager => `${eager} % of it downloads on every load; the rest only when something asks for it.`,
756
+ shapeBoot: 'Everybody pays for it',
757
+ shapeShared: 'Several screens pay for it',
758
+ shapeOwn: 'One screen pays for it',
759
+ shapeNote: n => {
760
+ const of = { boot: 'of the bootstrap', shared: 'of what is shared', own: 'of what one screen loads' }[n.zone];
761
+ // The second half does not repeat the zone when the first one has already named it.
762
+ const heavy = n.heavy ? `${n.share} % ${of} sits in a single file` : '';
763
+ const which = heavy ? '' : ` files ${of}`;
764
+ const crumbs = n.crumbs > 0 ? `${n.crumbs} of the ${n.files}${which} are under ${n.crumbMax} (${n.crumbSize})` : '';
765
+ return `${[heavy, crumbs].filter(Boolean).join(', and ')}.`;
766
+ },
767
+ helpZoneAll: 'Every chunk the bundler produces, whoever ends up paying for it.',
768
+ helpZoneBoot: 'Bootstrap (grey): downloaded always, by everyone, whichever screen they land on.',
769
+ helpZoneShared: 'Shared (orange): several lazy screens load it, so more than one pays for it.',
770
+ helpZoneOwn: 'One screen (green): only somebody entering that screen downloads it.',
771
+ helpTreeBar: percent => `It takes ${percent} % of the largest chunk in the list.`,
772
+ tabSearch: 'Search',
773
+ secSearch: 'Search the bundle',
774
+ secSearchSub: 'Type the name of a package or a file and see where it is and what imports it.',
775
+ howToSearch: '<p>The rest of the report answers <strong>what is heavy</strong>. This answers the other question: <strong>is this in there?</strong> Type a name and see which chunks carry it, how much in each one, which screens pay for it and the chain of imports that brings it in.</p><p>Files of <code>node_modules</code> are grouped by package, because that is the unit a decision is taken about; project files stay one per file, because that is the unit that gets edited. A package also matches on the names of its files, so searching <code>md5</code> finds <code>crypto-js</code>.</p><p>If nothing comes up, that name is not in the bundle.</p>',
776
+ searchPlaceholder: 'Package or file name…',
777
+ searchHeaviest: (shown, total) => `The ${shown} heaviest names, out of ${total} in this build.`,
778
+ searchTooShort: 'Type at least two letters.',
779
+ searchNoMatch: query => `Nothing called “${query}” is in the bundle. It does not enter the build.`,
780
+ searchFound: (shown, total) => (shown === total ? `${total} matches` : `${shown} of ${total} matches`),
781
+ searchKindPackage: 'package',
782
+ searchKindFile: 'project file',
783
+ searchInBoot: 'in the bootstrap · every load of the app pays for it',
784
+ searchPartlyBoot: size => `${size} of it is in the bootstrap, and that every load pays for`,
785
+ searchScreensCount: n => (n === 1 ? 'loaded by 1 screen' : `loaded by ${n} screens`),
786
+ searchMatchedIn: n => (n === 1 ? 'matches in 1 file' : `matches in ${n} files`),
787
+ searchCopiesTag: n => `${n} copies`,
788
+ searchChain: 'How it gets in',
789
+ searchChainNone: 'Could not be followed from the entry point.',
790
+ whyHere: 'Why is this here',
791
+ whyHereOf: name => `Why ${name} is here`,
792
+ whyHereNone: 'Nothing reachable from the entry point imports it. It is in the build, and no chain of imports leads to it.',
793
+ searchPlaces: 'Which chunks carry it',
794
+ thZone: 'Which zone it is in',
795
+ helpZone: 'The bootstrap is paid by everyone; a shared chunk by the screens loading it; an own one only by its screen.',
796
+ searchTwice: 'It is in more than one chunk: paid once per chunk.',
797
+ seeInSearch: 'Search it in the bundle',
798
+ dupCopy: copy => copy.version ? `version ${copy.version}` : copy.under ? `copy inside ${copy.under}` : 'top-level copy',
799
+ dupZone: { boot: 'in the bootstrap', shared: 'in a shared chunk', own: 'in a single screen' },
800
+ dupBroughtBy: 'Comes in through',
801
+ dupImportedBy: 'Imported by',
802
+ dupNobody: 'nothing of yours directly',
803
+ noScreens: 'No lazy screens found. The whole app is in the bootstrap.',
804
+ noShared: 'No lazy chunk is shared by two screens.',
805
+ noExclusive: 'Nothing exclusive.',
806
+ noSharedRow: 'Nothing shared.',
807
+ footerSummary: 'Where do these figures come from?',
808
+ footer: 'Everything is computed in your browser from the metafile: nothing is uploaded anywhere. Raw figures are bytes on disk; compressed ones are gzipped from the real files, which is what your users actually pay. The browser cannot compress in brotli, so that figure only appears when the folder brings the pre-compressed .js.br files; without them, count on brotli being 15 % to 20 % below the gzip you see. Press ? for the keyboard shortcuts.',
809
+ errNoEntries: 'This does not look like an esbuild metafile: no entry points found.',
810
+ errNoMain: 'Could not identify the main entry point.',
811
+ errNoOutputs: 'The JSON is shaped like a metafile but has no "outputs" key.',
812
+ errNotMetafile: 'The JSON is not a metafile in any format this reads.',
813
+ errExpected: 'What is expected is the stats.json `ng build --stats-json` writes (an object with "outputs" and "inputs"), or the whole browser/ folder, which Loadline reads on its own.',
814
+ errNotEsmGraph: 'the chunks of this folder are webpack or Turbopack output, not ES modules: their imports are numbers resolved at run time by the loader, so there is no graph in the files to read. That is Next.js, Create React App and Angular 16 or earlier. Statoscope reads that format and does it better.',
815
+ errNoPage: 'The folder has no index.html naming the script the application starts at, and without it there is no way to tell the entry chunk from a shared one: a bundler writes the shared code into the entry chunk, so the entry ends up imported by its own children. Add the page to the folder, or load the stats.json of the build.',
816
+ errWebpackStats: 'this is not an esbuild metafile but a webpack stats.json. From Angular 17 on, the application builder writes one (`ng build --stats-json`); if the project is still on the browser builder, that is why. Loadline does not read the webpack format on purpose: Statoscope does that job better.',
817
+ errViteManifest: 'this is not an esbuild metafile but a Vite manifest.json. It is not needed: drop the build folder itself and Loadline reads the graph out of the chunks, which is where Vite actually writes it.',
818
+ errVisualizer: 'this is not an esbuild metafile but rollup-plugin-visualizer output. Loadline reads the esbuild metafile, which is a different thing.',
819
+ };