clearotron 0.6.0 → 0.7.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/INSTALL.md +7 -4
- package/QUICKSTART.md +1 -0
- package/README.md +5 -2
- package/THIRD-PARTY-NOTICES.md +1 -1
- package/bin/clearotron.mjs +4 -2
- package/bin/onboard.mjs +158 -29
- package/build-info.json +2 -2
- package/docs/CLIENT-MCP.md +3 -1
- package/docs/DELIVERY.md +6 -3
- package/docs/architecture/02-architecture.md +1 -1
- package/docs/branding.md +4 -4
- package/docs/report-data/clearance-1.schema.json +320 -0
- package/docs/report-data/knockout-1.schema.json +268 -0
- package/driver/CHANGELOG.md +39 -0
- package/driver/connotation-search.mjs +1 -1
- package/driver/contract-e3-backlog.mjs +1 -1
- package/driver/coverage-ledger.mjs +18 -2
- package/driver/deferral-row.mjs +1 -1
- package/driver/degraded-parts.mjs +1 -0
- package/driver/driver.config.mjs +4 -3
- package/driver/effective-scope.mjs +3 -1
- package/driver/engagement-receipt.mjs +3 -3
- package/driver/engine/anthropic-agent.mjs +15 -1
- package/driver/engine/common.mjs +7 -0
- package/driver/engine/mcp/band-server.mjs +7 -16
- package/driver/engine/mcp/codex-config.mjs +3 -0
- package/driver/engine/mcp/recording-server.mjs +45 -34
- package/driver/engine/openai-agent.mjs +74 -7
- package/driver/gateway.mjs +67 -10
- package/driver/jx.mjs +13 -5
- package/driver/manuals-seen.mjs +146 -0
- package/driver/mark-logos.mjs +144 -0
- package/driver/methodology-witness.mjs +2 -1
- package/driver/owner-use-check.mjs +3 -3
- package/driver/package.json +1 -1
- package/driver/pipeline-knockout.mjs +4 -0
- package/driver/pipeline.mjs +92 -7
- package/driver/portal-local-auth.mjs +6 -2
- package/driver/portal-report.mjs +43 -12
- package/driver/portal-routes/me.mjs +4 -1
- package/driver/portal-runs.mjs +6 -9
- package/driver/profiles.mjs +4 -4
- package/driver/publish/README.md +9 -7
- package/driver/publish/email-conditions.mjs +2 -2
- package/driver/publish/evidence-words.mjs +21 -0
- package/driver/publish/index.mjs +104 -90
- package/driver/publish/knockout.mjs +75 -49
- package/driver/publish/office-record-links.mjs +11 -9
- package/driver/publish/page-shell.mjs +98 -0
- package/driver/publish/publish-inputs.mjs +4 -0
- package/driver/publish/regions.mjs +24 -3
- package/driver/publish/register-record.mjs +150 -0
- package/driver/publish/render-knockout.mjs +195 -642
- package/driver/publish/render.mjs +270 -363
- package/driver/publish/report-data.mjs +225 -12
- package/driver/publish/strings.mjs +662 -0
- package/driver/publish/templates/knockout.css +200 -0
- package/driver/publish/templates/report.css +72 -52
- package/driver/publish/xlsx.mjs +148 -125
- package/driver/record-goods.mjs +42 -0
- package/driver/reference-score.mjs +4 -1
- package/driver/register-reach.mjs +39 -0
- package/driver/registry-fidelity.mjs +3 -8
- package/driver/repair-composers.mjs +6 -2
- package/driver/repair-targets.mjs +4 -1
- package/driver/run-delivered.mjs +6 -1
- package/driver/runner.mjs +73 -29
- package/driver/scope-facts.mjs +27 -6
- package/driver/search-policy.mjs +9 -4
- package/driver/stages.mjs +3 -3
- package/driver/steps/overview-and-cards.mjs +50 -14
- package/driver/steps/verdict-gate.mjs +33 -13
- package/driver/suite-census.json +368 -68
- package/driver/terminal-clamp.mjs +6 -1
- package/mcp-server/CHANGELOG.md +4 -0
- package/mcp-server/lib/audit-view.mjs +5 -2
- package/mcp-server/lib/brief.mjs +2 -1
- package/mcp-server/lib/evidence.mjs +31 -4
- package/mcp-server/lib/knockout.mjs +1 -1
- package/mcp-server/lib/scrub.mjs +1 -1
- package/mcp-server/package.json +1 -1
- package/mcp-server/server.mjs +5 -3
- package/package.json +4 -1
- package/portal-ui/dist/assets/{index-CYaO2ygd.js → index-CtkllKJ2.js} +225 -77
- package/portal-ui/dist/assets/{index-izLa9apq.css → index-CxAkJXIT.css} +25 -5
- package/portal-ui/dist/index.html +2 -2
- package/portal-ui/package.json +3 -3
- package/providers/_shared/ledger.mjs +30 -2
- package/providers/_shared/record-uri.mjs +15 -0
- package/providers/clarivate/src/adapter.js +11 -0
- package/providers/clarivate/src/core.js +17 -1
- package/providers/oauth-mcp-bridge/CHANGELOG.md +4 -0
- package/providers/oauth-mcp-bridge/package.json +1 -1
- package/scripts/README.md +147 -3
- package/scripts/e2e-first-time.mjs +3 -3
- package/scripts/freeze-example-run.mjs +3 -3
- package/scripts/mint-search-level-tags.mjs +61 -0
- package/scripts/mint-source-pin-census.mjs +89 -0
- package/scripts/release-note-required.mjs +65 -6
- package/scripts/test-durations-reporter.mjs +25 -0
- package/scripts/test-full.mjs +72 -18
- package/scripts/test-run.mjs +18 -1
- package/shared/brand.mjs +85 -5
- package/shared/inline-markdown.mjs +53 -0
- package/shared/portal-tokens.mjs +2 -1
- package/shared/register-selection.mjs +8 -3
- package/shared/search-level-tags.json +25 -0
- package/shared/tools/derive-band-pairs.mjs +10 -0
- package/driver/own-rights.mjs +0 -83
- package/driver/use-check.mjs +0 -85
|
@@ -32,10 +32,14 @@ import { COMMON_LAW, normRegion, regionName, REGION_NAMES } from './regions.mjs'
|
|
|
32
32
|
import { parseFindingsJson, bindRecommendation, sentenceCaseLead, CLIENT_TIER_BY_COMPOSITE, bandOf, compareBlockingPower, inDispositionMode, reasonedNegativeGroups } from '../findings-model.mjs';
|
|
33
33
|
import { REC, inPriorityWindow, ownerDisplayName } from '../registry-fidelity.mjs';
|
|
34
34
|
import { registrationSystem } from '../jurisdiction-systems.mjs';
|
|
35
|
+
import { REPORT_PAGE as R, RECORD_LINKS as LINK_WORDS } from './strings.mjs';
|
|
35
36
|
import { READ_LEAD_RE } from '../report-card-record.mjs'; // D3 — the dedupe gate and the card's acceptance are ONE predicate
|
|
36
|
-
import {
|
|
37
|
+
import { logoLockup, BRAND, confPosture, sectionStrip, PALETTE, QUADRANT_COLOURS as QC } from '../../shared/brand.mjs';
|
|
37
38
|
import { NAV_CSS } from '../../shared/site-nav.mjs';
|
|
38
|
-
import {
|
|
39
|
+
import { pageShell } from './page-shell.mjs';
|
|
40
|
+
import { readerRowHead } from '../coverage-ledger.mjs'; // an engine-token row head in the reader's words // the document shell, shared with the knockout template
|
|
41
|
+
import { EVIDENCE_LABEL, USE_EVIDENCE_LABEL, meterEvidence } from './evidence-words.mjs'; // the meters' evidence words, shared with the audit workbook
|
|
42
|
+
import { inlineMarkdown } from '../../shared/inline-markdown.mjs'; // the inline-markdown dialect, shared with the knockout template
|
|
39
43
|
import { isEntrypoint } from "../../shared/is-entrypoint.mjs"; // — realpath both sides, or a symlinked invocation exits 0 silently
|
|
40
44
|
|
|
41
45
|
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
@@ -50,7 +54,7 @@ let AS_OF = null; // C2 — publish-time clock for the priority-window flag;
|
|
|
50
54
|
// fallback only (archived runs with no sidecar render byte-identically).
|
|
51
55
|
let VERDICT_INFO = null;
|
|
52
56
|
// T6 (D4) — the machine-derived SEARCHED jurisdiction set (register-plan/instructed-scope,
|
|
53
|
-
// passed by publish). When present it IS the
|
|
57
|
+
// passed by publish). When present it IS the set the report names as searched; the coverage-regex /
|
|
54
58
|
// per-finding fallbacks below serve archived runs without the sidecars.
|
|
55
59
|
let SEARCHED_JUR = null;
|
|
56
60
|
// Did the register sweep run WORLDWIDE? Read off the frozen plan's `scope_basis` (publish passes it),
|
|
@@ -170,7 +174,7 @@ function ratingExtras(fm, findings, coverage, fourAnswers, opts, bandWord, condi
|
|
|
170
174
|
// condition on precisely the archived runs that cannot be re-rendered with better text.
|
|
171
175
|
if (!conditionsInVerdict) {
|
|
172
176
|
const conds = clientConditions(VERDICT_INFO || {});
|
|
173
|
-
if (conds.length) out.push(`<div class="gconds-wrap"><span class="gk"
|
|
177
|
+
if (conds.length) out.push(`<div class="gconds-wrap"><span class="gk">${R.rating.conditions}</span><ul class="gconds">${
|
|
174
178
|
conds.map((c) => `<li>${esc(c)}</li>`).join('')}</ul></div>`);
|
|
175
179
|
}
|
|
176
180
|
const fa = fourAnswers && typeof fourAnswers === 'object' ? fourAnswers : null;
|
|
@@ -202,19 +206,19 @@ function ratingExtras(fm, findings, coverage, fourAnswers, opts, bandWord, condi
|
|
|
202
206
|
.map((o) => ({ cls: esc(String(o?.class ?? '')), note: inline(String(o?.note ?? '').trim()).trim() }))
|
|
203
207
|
.filter((o) => o.note && !isInternalLabelled(o.note));
|
|
204
208
|
const obstacles = obsRows.length
|
|
205
|
-
? `<ul class="fa-obstacles">${obsRows.map((o) => `<li><b
|
|
209
|
+
? `<ul class="fa-obstacles">${obsRows.map((o) => `<li><b>${R.rating.obstacleClass(o.cls)}</b> ${o.note}</li>`).join('')}</ul>` : '';
|
|
206
210
|
return `<div class="fa-row"><span class="fa-k">${label}</span><span class="fa-v">${
|
|
207
211
|
a.token ? `<span class="fa-token tone-${tone}">${esc(humanize(a.token))}</span> — ` : ''}${read}${ords}${
|
|
208
|
-
basis ? `<div class="fa-based"><span class="fa-bk"
|
|
212
|
+
basis ? `<div class="fa-based"><span class="fa-bk">${R.rating.basedOn}</span> ${basis}</div>` : ''}${obstacles}</span></div>`;
|
|
209
213
|
}).filter(Boolean);
|
|
210
|
-
if (rows.length) out.push(`<div class="gwhy"><div class="label"
|
|
214
|
+
if (rows.length) out.push(`<div class="gwhy"><div class="label">${esc(R.rating.why(bandWord || ''))}</div>${rows.join('')}</div>`);
|
|
211
215
|
}
|
|
212
216
|
const bestRank = findings.reduce((m, f) => Math.min(m, severityRank(f)), Number.MAX_SAFE_INTEGER);
|
|
213
217
|
const worstSet = bestRank === Number.MAX_SAFE_INTEGER ? [] : findings.filter((f) => severityRank(f) === bestRank);
|
|
214
218
|
const worst = worstSet.length
|
|
215
|
-
? [...new Set(worstSet.map((f) => regionCode(f)))].map((c) => c === COMMON_LAW ?
|
|
219
|
+
? [...new Set(worstSet.map((f) => regionCode(f)))].map((c) => c === COMMON_LAW ? R.rating.commonLawUse : esc(regionName(c) || c))
|
|
216
220
|
: [];
|
|
217
|
-
if (worst.length) out.push(`<div class="grow gexp"><span class="gk"
|
|
221
|
+
if (worst.length) out.push(`<div class="grow gexp"><span class="gk">${R.rating.highestExposure}</span><span class="gv">${worst.join(' \u00b7 ')}</span></div>`);
|
|
218
222
|
const sd = opts && opts.searchDepth;
|
|
219
223
|
if (sd && sd.counts) {
|
|
220
224
|
const parts = [];
|
|
@@ -222,23 +226,23 @@ function ratingExtras(fm, findings, coverage, fourAnswers, opts, bandWord, condi
|
|
|
222
226
|
const real = Object.entries(byC).filter(([c]) => c !== 'WO');
|
|
223
227
|
const intl = byC.WO || 0;
|
|
224
228
|
const records = real.reduce((s, [, n]) => s + n, 0);
|
|
225
|
-
if (records) parts.push(real.length === 1 ?
|
|
226
|
-
if (intl) parts.push(
|
|
229
|
+
if (records) parts.push(real.length === 1 ? R.rating.recordsReadIn(records.toLocaleString('en-GB'), regionName(real[0][0]) || real[0][0]) : R.rating.recordsReadAcross(records.toLocaleString('en-GB'), real.length));
|
|
230
|
+
if (intl) parts.push(R.rating.internationalRead(intl.toLocaleString('en-GB')));
|
|
227
231
|
const cleared = ((sd.cleared && sd.cleared.register) || []).length;
|
|
228
|
-
if (cleared) parts.push(
|
|
232
|
+
if (cleared) parts.push(R.rating.nearNamesCleared(cleared.toLocaleString('en-GB')));
|
|
229
233
|
const rated = findings.filter((f) => f && f.band).length;
|
|
230
|
-
parts.push(
|
|
231
|
-
if (sd.counts.localScriptSearched) parts.push(
|
|
234
|
+
parts.push(R.rating.conflicts(rated));
|
|
235
|
+
if (sd.counts.localScriptSearched) parts.push(R.rating.localScript);
|
|
232
236
|
const cd = sd.counts.courtDecisions;
|
|
233
|
-
if (cd === 'found') parts.push(
|
|
234
|
-
else if (cd === 'none-found') parts.push(
|
|
235
|
-
else if (cd === 'not-checked') parts.push(
|
|
236
|
-
if (parts.length) out.push(`<div class="grow gconf"><span class="gk"
|
|
237
|
+
if (cd === 'found') parts.push(R.rating.courtChecked);
|
|
238
|
+
else if (cd === 'none-found') parts.push(R.rating.courtNoneTouch);
|
|
239
|
+
else if (cd === 'not-checked') parts.push(R.rating.courtNotChecked);
|
|
240
|
+
if (parts.length) out.push(`<div class="grow gconf"><span class="gk">${R.rating.searchCoverage}</span><span class="gv">${parts.map(esc).join(' \u00b7 ')}</span></div>`);
|
|
237
241
|
}
|
|
238
242
|
// ONE NAME FOR ONE FRAMEWORK. A manifest run already prints it in the card's own heading, beside the
|
|
239
243
|
// ladder whose words it governs; adding a second line here named it twice on the same card. The line
|
|
240
244
|
// is for the run that records a framework by name without carrying its manifest.
|
|
241
|
-
if (!FRAMEWORK && fm.rated_under) out.push(`<div class="gframe"
|
|
245
|
+
if (!FRAMEWORK && fm.rated_under) out.push(`<div class="gframe">${esc(R.rating.ratedOn(fm.rated_under))}</div>`);
|
|
242
246
|
return out.join('');
|
|
243
247
|
}
|
|
244
248
|
|
|
@@ -249,13 +253,14 @@ function frameworkGauge(fm, findings, coverage = [], fourAnswers = null, opts =
|
|
|
249
253
|
const tick = frameworkTickIndex(findings);
|
|
250
254
|
const ticks = ladder.map((b, k) => `<span${k === tick ? ` class="on" style="color:var(${toneVar(b.tone)})"` : ''}>${esc(b.label)}</span>`).join('');
|
|
251
255
|
const grad = `linear-gradient(90deg,var(--clear) 0%,${ladder.map((b, k) => `var(${toneVar(b.tone)}) ${pct(k)}`).join(',')})`;
|
|
252
|
-
const
|
|
253
|
-
const
|
|
256
|
+
const stop = tick == null ? '--clear' : toneVar(ladder[tick].tone);
|
|
257
|
+
const mv = `var(${stop})`;
|
|
258
|
+
const label = VERDICT_INFO?.tier || (tick == null ? R.rating.clear : ladder[tick].label);
|
|
254
259
|
// Zero-state marker parks LEFT-ANCHORED at the scale origin (transform:none) so a long pill
|
|
255
260
|
// ("No rated conflicts") grows rightward over the scale instead of clipping off the page edge.
|
|
256
261
|
const marker = tick == null
|
|
257
|
-
? `<div class="marker" style="left:0;transform:none;text-align:left"><div class="pill" style="background:${mv}">${esc(label)}</div><div class="needle" style="background:${mv};margin-left:14px"></div></div>`
|
|
258
|
-
: `<div class="marker" style="left:${pct(tick)}"><div class="pill" style="background:${mv}">${esc(label)}</div><div class="needle" style="background:${mv}"></div></div>`;
|
|
262
|
+
? `<div class="marker" style="left:0;transform:none;text-align:left"><div class="pill" style="background:${mv};color:var(${stop}-on)">${esc(label)}</div><div class="needle" style="background:${mv};margin-left:14px"></div></div>`
|
|
263
|
+
: `<div class="marker" style="left:${pct(tick)}"><div class="pill" style="background:${mv};color:var(${stop}-on)">${esc(label)}</div><div class="needle" style="background:${mv}"></div></div>`;
|
|
259
264
|
// spec 64 — THE one risk statement (verdict.json.statement, composed once by the sidecar writer)
|
|
260
265
|
// replaces the bare recommendation line when present: band + stance read as ONE labelled sentence.
|
|
261
266
|
// Legacy sidecars (no statement) render today's line byte-identically.
|
|
@@ -264,7 +269,7 @@ function frameworkGauge(fm, findings, coverage = [], fourAnswers = null, opts =
|
|
|
264
269
|
: VERDICT_INFO
|
|
265
270
|
? (bindRecommendation(fm.recommendation, VERDICT_INFO.verdict, []) || VERDICT_INFO.tier || '')
|
|
266
271
|
: (fm.recommendation || fm.overall_label || '');
|
|
267
|
-
const recLabel = VERDICT_INFO?.statement ?
|
|
272
|
+
const recLabel = VERDICT_INFO?.statement ? R.rating.verdict : R.rating.recommendation;
|
|
268
273
|
// THE VERDICT CARRIES EVERY CONDITION, NOT THE FIRST AND A COUNT. The composed statement ends
|
|
269
274
|
// "(and N more)" because it is also a ONE-LINE surface — the email lede, the registry row — where a
|
|
270
275
|
// list cannot go. On the page there is room for all of them, and a condition a client is told exists
|
|
@@ -295,7 +300,7 @@ function frameworkGauge(fm, findings, coverage = [], fourAnswers = null, opts =
|
|
|
295
300
|
// frameworkGauge ONLY: the legacy `gauge()` branch below has no manifest to name, so it stays
|
|
296
301
|
// byte-identical for every archived run that has no framework sidecar.
|
|
297
302
|
return `<div class="panel gauge">
|
|
298
|
-
<div class="gauge-head"><div class="label"
|
|
303
|
+
<div class="gauge-head"><div class="label">${R.rating.overallRisk}</div><div class="gauge-fw">${esc(FRAMEWORK.title)}</div></div>
|
|
299
304
|
<div class="scale" style="background:${grad}">${marker}</div>
|
|
300
305
|
<div class="ticks">${ticks}</div>
|
|
301
306
|
<div class="gconc">${conc}</div>
|
|
@@ -310,7 +315,7 @@ const escAttr = s => esc(s).replace(/"/g, '"');
|
|
|
310
315
|
// emitted natively here AND injected into already-rendered reports (pool-admin link-home) whose frozen CSS
|
|
311
316
|
// never knew the class — inline styles render identically on both. href is relative to the run dir:
|
|
312
317
|
// '../index.html' for the internal report, '../customer/<key>/index.html' for the client export. Absent ⇒ ''.
|
|
313
|
-
export function homeButton(href, label =
|
|
318
|
+
export function homeButton(href, label = R.allReports) {
|
|
314
319
|
if (!href) return '';
|
|
315
320
|
const style = "position:fixed;left:14px;bottom:14px;z-index:9999;display:inline-flex;align-items:center;"
|
|
316
321
|
+ "background:#4E030F;color:#f0e8d8;font:600 12px/1 'Plus Jakarta Sans','Helvetica Neue',Helvetica,Arial,sans-serif;"
|
|
@@ -340,29 +345,9 @@ export function homeButton(href, label = '← All reports') {
|
|
|
340
345
|
function inline(s) {
|
|
341
346
|
// T6 (H7): internal-note handling routes through the ONE choke point (publish/parse.mjs
|
|
342
347
|
// stripInternal) BEFORE escaping — global, wrapped-marker-aware; nothing raw survives on any surface.
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
// Provenance honesty: an authored 'Corsearch · <name>' label whose href is NOT a Corsearch page
|
|
347
|
-
// (live case: Steam storefront links labelled as the register vendor) gets its vendor token replaced
|
|
348
|
-
// by the link's actual host — a lawyer must never cite a storefront as a register record.
|
|
349
|
-
s = s.replace(/\[([^\]]+)\]\(([^)]+)\)/g, (mm, txt, href) => {
|
|
350
|
-
let label = txt;
|
|
351
|
-
const vend = /^(Corsearch)\s*·\s*(.+)$/i.exec(txt);
|
|
352
|
-
if (vend && /^https?:\/\//i.test(href) && !/corsearch\./i.test(href)) {
|
|
353
|
-
try { label = `${new URL(href.replace(/&/g, '&')).host.replace(/^www\./, '')} · ${vend[2]}`; } catch { /* keep authored label */ }
|
|
354
|
-
}
|
|
355
|
-
// XSS: href was already esc()'d above (& < >), but esc() does NOT escape quotes — a `"` in href would
|
|
356
|
-
// break out of the attribute. Quote-escape it here. NOT escAttr(), which re-runs esc() and would
|
|
357
|
-
// double-encode `&` in query strings (?a=1&b=2 -> &amp;). Also allow only safe schemes
|
|
358
|
-
// (http/https/mailto/#fragment); anything else (javascript:, data:, vbscript:, …) renders as PLAIN TEXT.
|
|
359
|
-
if (!(/^https?:\/\//i.test(href) || /^mailto:/i.test(href) || href.startsWith('#'))) return label;
|
|
360
|
-
const safeHref = href.replace(/"/g, '"');
|
|
361
|
-
return /^https?:\/\//i.test(href) ? `<a href="${safeHref}" target="_blank" rel="noopener noreferrer">${label}</a>` : `<a href="${safeHref}">${label}</a>`;
|
|
362
|
-
});
|
|
363
|
-
s = s.replace(/\*\*([^*]+)\*\*/g, '<b>$1</b>');
|
|
364
|
-
s = s.replace(/\*([^*]+)\*/g, '<i>$1</i>');
|
|
365
|
-
return s;
|
|
348
|
+
// Then the one inline-markdown dialect both report renderers read (shared/inline-markdown.mjs): links, bold,
|
|
349
|
+
// italic and code, with its link-target guard and the vendor-label check.
|
|
350
|
+
return inlineMarkdown(esc(stripInternal(s, { client: false })));
|
|
366
351
|
}
|
|
367
352
|
|
|
368
353
|
// Internal-labelled items get a class so the print stylesheet can honour the export promise
|
|
@@ -417,8 +402,8 @@ const STOP_VAR = ['--clear', '--low', '--med', '--high', '--severe'];
|
|
|
417
402
|
// layer only, gated on VERDICT_INFO: RISK_STOPS stays untouched (STOP_VAR CSS keys off it) and
|
|
418
403
|
// sidecar-less archived runs render byte-identically. Stop 1 covers composites 1–2 (GAUGE_BY_COMPOSITE),
|
|
419
404
|
// so its tick is labelled with both words.
|
|
420
|
-
const TIER_STOP_LABELS =
|
|
421
|
-
const TIER_STOP_PILL =
|
|
405
|
+
const TIER_STOP_LABELS = R.tierLabels;
|
|
406
|
+
const TIER_STOP_PILL = R.tierPills;
|
|
422
407
|
|
|
423
408
|
// Overall risk index (0-4) — the derived display verdict when present ( T2, one authority),
|
|
424
409
|
// else the report's stated overall, else the worst composite (legacy).
|
|
@@ -536,22 +521,17 @@ function groupByRegion(findings) {
|
|
|
536
521
|
// A4 — when the publish-time receipt join ran (joinEvidenceStatus stamped `_status`), every
|
|
537
522
|
// meter's caption carries the four-tuple: verified (source joins a fetch receipt) / assumed (claims
|
|
538
523
|
// verified, receipt missing) / inferred / not checked. Absent `_status` (direct renderHtml callers,
|
|
539
|
-
// archived replays) the caption is byte-identical to the legacy form.
|
|
540
|
-
|
|
524
|
+
// archived replays) the caption is byte-identical to the legacy form. The four words, and the two tables below, are
|
|
525
|
+
// defined once in evidence-words.mjs, which the audit workbook reads too, so both say the same word for one value.
|
|
541
526
|
// D4 — the meter's own `basis` enum, mapped to the SAME four client evidence words EVIDENCE_LABEL
|
|
542
527
|
// uses. It is the fallback for a run with no receipt join, so a legacy enforcer's basis lands in the
|
|
543
|
-
// evidence position rather than in the fact position, and one page has ONE evidence vocabulary.
|
|
544
|
-
const EVIDENCE_BASIS_LABEL = { 'verified-from-record': 'verified', 'inferred-from-signal': 'inferred' };
|
|
528
|
+
// evidence position rather than in the fact position, and one page has ONE evidence vocabulary (EVIDENCE_BASIS_LABEL).
|
|
545
529
|
// D4 — the use-check SOURCE CLASS, one definition. It was declared twice with two different
|
|
546
530
|
// strings for the same member: fullDetail said 'register mirror — not evidence of use' and the
|
|
547
531
|
// common-law contribution list said 'register mirror — not use evidence'. Two copies of one
|
|
548
532
|
// vocabulary is the drift this file has been split apart to stop, so they are one const now, and the
|
|
549
533
|
// words say what they are — a SOURCE phrase, readable after "Evidence: verified,".
|
|
550
|
-
const USE_SOURCE_LABEL =
|
|
551
|
-
'owner-site': "from the owner's own site",
|
|
552
|
-
independent: 'from an independent source',
|
|
553
|
-
'register-mirror': 'from a register mirror, which is not evidence of use',
|
|
554
|
-
};
|
|
534
|
+
const USE_SOURCE_LABEL = R.useSource;
|
|
555
535
|
// — THE USE LINE PRINTS NO VERIFICATION WORD (owner ruling, 2026-08-31, verbatim: "a
|
|
556
536
|
// website does not equal a citation on a register record — so how would that ever line up. So yes,
|
|
557
537
|
// drop it"). A use meter reaches `confirmed` only via the `/mark/…` fetch-receipt join, and an http
|
|
@@ -559,22 +539,21 @@ const USE_SOURCE_LABEL = {
|
|
|
559
539
|
// "Evidence: verified, from" ever. A label with one reachable value carries no information, and a
|
|
560
540
|
// lawyer reads "not yet verified" as doubt about the FACT. `inferred` and `not checked` are different
|
|
561
541
|
// facts (a mirror's not-checked is the honesty) and stay. The receipt vocabulary is UNCHANGED on the
|
|
562
|
-
// register meters, where the join is real — only this line loses it.
|
|
563
|
-
const USE_EVIDENCE_LABEL = { inferred: 'inferred', 'not-checked': 'not checked' };
|
|
542
|
+
// register meters, where the join is real — only this line loses it (USE_EVIDENCE_LABEL).
|
|
564
543
|
// The evidence sentence for a use meter: where the page it rests on came from (and the non-receipt
|
|
565
544
|
// statuses that still say something).
|
|
566
545
|
const useEvidence = (m) => [USE_EVIDENCE_LABEL[m?._status], USE_SOURCE_LABEL[m?._useSourceClass]].filter(Boolean).join(', ');
|
|
567
546
|
// D7 — `use_check.source` carries exactly ONE legal "we searched and found nothing" value, and it
|
|
568
|
-
// is a CODE-OWNED SENTINEL: stages.mjs dictates it
|
|
569
|
-
// use-check.mjs
|
|
547
|
+
// is a CODE-OWNED SENTINEL: stages.mjs dictates it and findings-model.mjs names it in two refusals (a third
|
|
548
|
+
// reader, use-check.mjs, was a dead gate and is deleted). It is not client prose and it is not a
|
|
570
549
|
// pattern — it is an enum member with one spelling, so it is mapped here, at the render boundary, by
|
|
571
550
|
// EXACT EQUALITY, exactly as EVIDENCE_LABEL maps `_status`. The sentinel itself does not move: archived
|
|
572
551
|
// runs carry the old value forever and a fourth spelling of it would have to be accepted everywhere.
|
|
573
552
|
const USE_CHECK_NO_RESULT = 'perplexity_research — no result';
|
|
574
|
-
const USE_CHECK_NO_RESULT_CITE =
|
|
553
|
+
const USE_CHECK_NO_RESULT_CITE = R.useCheckNothingFound;
|
|
575
554
|
// The same "searched, nothing found" line for a run whose company picked no marketplaces (the owner's
|
|
576
555
|
// ruling of 2026-09-23): there was no marketplace search to name, and the general web still ran.
|
|
577
|
-
const USE_CHECK_NO_RESULT_CITE_NO_MARKETPLACES =
|
|
556
|
+
const USE_CHECK_NO_RESULT_CITE_NO_MARKETPLACES = R.useCheckNothingFoundNoMarketplaces;
|
|
578
557
|
// — MATCHED ON NORMALISED PUNCTUATION, NOT ONE SPELLING. The constant itself does not
|
|
579
558
|
// move (archived runs carry it forever, the validators name it), but the SEAT emitted a hyphen where
|
|
580
559
|
// the doctrine writes an em dash, and exact equality let the raw tool name through to a delivered
|
|
@@ -593,22 +572,21 @@ const isUseCheckNoResult = (s) => {
|
|
|
593
572
|
function meter(name, entry) {
|
|
594
573
|
const e = entry || {};
|
|
595
574
|
const tok = e.token || 'unknown';
|
|
596
|
-
const st = EVIDENCE_LABEL[e._status] || '';
|
|
597
|
-
const basis = EVIDENCE_BASIS_LABEL[e.basis] || '';
|
|
598
575
|
if (name === 'use') {
|
|
599
576
|
const cls = tok === 'confirmed' ? 'g3' : '';
|
|
600
|
-
const cap = tok === 'confirmed' ?
|
|
577
|
+
const cap = tok === 'confirmed' ? R.meters.confirmed : tok === 'not-confirmed' ? R.meters.notConfirmed : R.meters.unknown;
|
|
601
578
|
// — same rule as useEvidence: no verification word on the use surface (its receipt
|
|
602
579
|
// join is unreachable by construction); inferred / not checked still say something and stay.
|
|
603
|
-
return { label:
|
|
580
|
+
return { label: R.meters.use, cls, cap, ev: meterEvidence(name, e) };
|
|
604
581
|
}
|
|
605
582
|
const cls = tok === 'high' ? 'l3' : tok === 'medium' ? 'l2' : tok === 'low' ? 'l1' : '';
|
|
606
583
|
// The 2026-09-16 report redesign — "Enforcer" was a noun for the owner; the meter measures what the owner is
|
|
607
584
|
// likely to DO, which is what a reader is deciding about. The token under it is unchanged.
|
|
608
|
-
const label = name === 'mark_similarity' ?
|
|
585
|
+
const label = name === 'mark_similarity' ? R.meters.similarity : name === 'goods_proximity' ? R.meters.goodsProximity : R.meters.likelyToEnforce;
|
|
609
586
|
// With a joined status the status REPLACES the raw basis word on the enforcer — "verified" with no
|
|
610
|
-
// receipt behind it is exactly the self-attestation A4 exists to demote.
|
|
611
|
-
|
|
587
|
+
// receipt behind it is exactly the self-attestation A4 exists to demote. Similarity prints no evidence word
|
|
588
|
+
// (owner, 2026-11-18): the workbook dropped it too, so the two say the same.
|
|
589
|
+
return { label, cls, cap: humanize(tok), ev: meterEvidence(name, e) };
|
|
612
590
|
}
|
|
613
591
|
|
|
614
592
|
// Join a finding to its report.md prose card. Every card's first body line is `- ord: <ordinal>`
|
|
@@ -664,57 +642,38 @@ function gauge(fm, findings, coverage = [], fourAnswers = null, opts = {}) {
|
|
|
664
642
|
: VERDICT_INFO
|
|
665
643
|
? (bindRecommendation(fm.recommendation, VERDICT_INFO.verdict, []) || VERDICT_INFO.tier || '')
|
|
666
644
|
: (fm.recommendation || fm.overall_label || '');
|
|
667
|
-
const recLabel = VERDICT_INFO?.statement ?
|
|
645
|
+
const recLabel = VERDICT_INFO?.statement ? R.rating.verdict : R.rating.recommendation;
|
|
668
646
|
const conc = [
|
|
669
647
|
rec && `<div class="grow"><span class="gk">${recLabel}</span><span class="gv gv-rec">${esc(rec)}</span></div>`,
|
|
670
648
|
].filter(Boolean).join('');
|
|
671
649
|
return `<div class="panel gauge">
|
|
672
|
-
<div class="label"
|
|
673
|
-
<div class="scale"><div class="marker" style="left:${STOP_LEFT[i]}"><div class="pill" style="background:var(${STOP_VAR[i]})">${label}</div><div class="needle" style="background:var(${STOP_VAR[i]})"></div></div></div>
|
|
650
|
+
<div class="label">${R.rating.overallRisk}</div>
|
|
651
|
+
<div class="scale"><div class="marker" style="left:${STOP_LEFT[i]}"><div class="pill" style="background:var(${STOP_VAR[i]});color:var(${STOP_VAR[i]}-on)">${label}</div><div class="needle" style="background:var(${STOP_VAR[i]})"></div></div></div>
|
|
674
652
|
<div class="ticks">${ticks}</div>
|
|
675
653
|
<div class="gconc">${conc}</div>
|
|
676
654
|
${ratingExtras(fm, findings, coverage, fourAnswers, opts, label)}
|
|
677
655
|
</div>`;
|
|
678
656
|
}
|
|
679
657
|
|
|
680
|
-
//
|
|
681
|
-
// wrapping mono chips, §2.8) · Searched (date + source). The verdict (recommendation + open conditions) now
|
|
682
|
-
// lives with the dial, so this card is scope-only.
|
|
683
|
-
function facts(fm, findings, coverage) {
|
|
684
|
-
const chips = jurisdictionChips(fm, coverage, findings);
|
|
685
|
-
// T6 (H10) — the worst-exposure jurisdiction(s), derived honestly from the highest-rated
|
|
686
|
-
// LIVE finding(s): the one geographic answer a reader asks first ("where does this bite hardest?").
|
|
687
|
-
// Suppressed when there are no rated findings. C/L reads as "common-law use".
|
|
688
|
-
const bestRank = findings.reduce((m, f) => Math.min(m, severityRank(f)), Number.MAX_SAFE_INTEGER);
|
|
689
|
-
const worstSet = bestRank === Number.MAX_SAFE_INTEGER ? [] : findings.filter((f) => severityRank(f) === bestRank);
|
|
690
|
-
const worst = worstSet.length
|
|
691
|
-
? [...new Set(worstSet.map((f) => regionCode(f)))]
|
|
692
|
-
.map((c) => c === COMMON_LAW ? 'Common-law use' : `<span title="${escAttr(regionName(c))}">${esc(c)}</span>`)
|
|
693
|
-
: [];
|
|
694
|
-
const rows = [
|
|
695
|
-
fm.classes && `<div class="row"><span class="k">Classes</span><span class="v">${esc(fm.classes)}</span></div>`,
|
|
696
|
-
chips ? `<div class="row jrow"><span class="k">Jurisdictions searched</span>${chips}</div>`
|
|
697
|
-
: (fm.jurisdiction && `<div class="row"><span class="k">Jurisdictions searched</span><span class="v">${esc(fm.jurisdiction)}</span></div>`),
|
|
698
|
-
worst.length && `<div class="row"><span class="k">Highest exposure</span><span class="v">${worst.join(' ')} <span style="font-size:10.5px;color:var(--faint,#8a8a8a)">— from the highest-rated finding${worst.length > 1 || worstSet.length > 1 ? 's' : ''}</span></span></div>`,
|
|
699
|
-
(fm.run || fm.searched) && `<div class="row"><span class="k">Searched</span><span class="v"><span class="mono" style="font-size:12px">${esc(fm.searched || fm.run)}</span></span></div>`,
|
|
700
|
-
].filter(Boolean);
|
|
701
|
-
return `<div class="panel facts">${rows.join('')}</div>`;
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
// Jurisdiction chips for the scope card. Primary source = the coverage ledger's PER-JURISDICTION register
|
|
658
|
+
// The jurisdictions a report names as searched. Primary source = the coverage ledger's PER-JURISDICTION register
|
|
705
659
|
// rows ("register / US", "register / CN (make-or-break)", "register / TR") — the searched scope, carrying the
|
|
706
|
-
// coverage-limited/not-searched state the
|
|
660
|
+
// coverage-limited/not-searched state the reader is told of. The leading code must be an UPPERCASE office
|
|
707
661
|
// code at a word boundary, so an AXIS-style ledger (rows like "register / bare-MARK exact-in-class floor" or
|
|
708
662
|
// "register / priority markets NZ, IN, TR") matches nothing and we fall back to the findings' own regions —
|
|
709
663
|
// a sensible searched-set for those runs (and for coverage-less / single-finding runs). Insertion order is
|
|
710
|
-
// preserved (coverage order, else exposure order); common-law (C/L) is not a jurisdiction
|
|
664
|
+
// preserved (coverage order, else exposure order); common-law (C/L) is not a jurisdiction.
|
|
665
|
+
// ZZ IS NOWHERE (owner, 2026-11-18). It is the register's "unspecified", not a place, and it
|
|
666
|
+
// printed as a code in the lists of places a report gives. It leaves every one of them; a record filed under it still
|
|
667
|
+
// counts as read.
|
|
668
|
+
const UNSPECIFIED_REGION = 'ZZ';
|
|
669
|
+
|
|
711
670
|
function jurisdictionCodes(fm, coverage = [], findings = []) {
|
|
712
671
|
const order = [], meta = new Map();
|
|
713
672
|
// The plan's own answer when publish supplied one; otherwise the ledger-prose sniff below decides,
|
|
714
673
|
// exactly as before. A plan that says worldwide is never overridden by prose that forgot to say so.
|
|
715
674
|
let worldwide = SCOPE_WORLDWIDE === true;
|
|
716
675
|
const add = (code, limited) => {
|
|
717
|
-
if (!code || code === COMMON_LAW) return;
|
|
676
|
+
if (!code || code === COMMON_LAW || code === UNSPECIFIED_REGION) return;
|
|
718
677
|
if (!meta.has(code)) { meta.set(code, { limited: !!limited }); order.push(code); }
|
|
719
678
|
else if (limited) meta.get(code).limited = true;
|
|
720
679
|
};
|
|
@@ -777,65 +736,15 @@ function findingRegions(f) {
|
|
|
777
736
|
return [...out];
|
|
778
737
|
}
|
|
779
738
|
|
|
780
|
-
function jurisdictionChips(fm, coverage = [], findings = []) {
|
|
781
|
-
const { order, meta, worldwide } = jurisdictionCodes(fm, coverage, findings);
|
|
782
|
-
if (!order.length && !worldwide) return '';
|
|
783
|
-
// doc-55 B — the WIPO/Madrid international register is ALWAYS in scope for a worldwide sweep (corsearch
|
|
784
|
-
// returns /mark/int/ records in-sweep), so WO is ALWAYS shown for a worldwide run — consistently, whether
|
|
785
|
-
// or not a Madrid conflict happened to surface (one recent run showed WO, another omitted it). A Madrid
|
|
786
|
-
// FINDING already contributes WO via the INT→WO normalization; this guarantees the register SOURCE reads
|
|
787
|
-
// as covered even when the sweep found nothing there. Never forced on a non-worldwide (targeted) run.
|
|
788
|
-
const codes = (worldwide && !order.includes('WO')) ? [...order, 'WO'] : order;
|
|
789
|
-
const chips = codes.map(code => { const v = meta.get(code) || { limited: false };
|
|
790
|
-
return `<span class="jchip${v.limited ? ' lim' : ''}" title="${escAttr(regionName(code))}${v.limited ? ' — coverage-limited' : ''}">${esc(code)}${v.limited ? '*' : ''}</span>`; }).join('');
|
|
791
|
-
// wp50: a worldwide sweep leads the chips and gets its own plain-language note.
|
|
792
|
-
const wwChip = worldwide ? `<span class="jchip ww" title="the register sweep ran worldwide — chips show the citation focus and the jurisdictions where conflicts live">worldwide</span>` : '';
|
|
793
|
-
const limited = order.filter(code => meta.get(code).limited);
|
|
794
|
-
const notes = [
|
|
795
|
-
worldwide ? `<div class="jnote">register sweep ran worldwide — chips show the citation focus and where the conflicts live</div>` : '',
|
|
796
|
-
// doc-55 B — honest source completeness: a worldwide register search covers, for every jurisdiction in
|
|
797
|
-
// scope, its national register, the EU regional register where one applies, AND WIPO/Madrid international
|
|
798
|
-
// registrations designating it — not one source per territory.
|
|
799
|
-
worldwide ? `<div class="jnote">every jurisdiction cleared across its national register, the EU regional register where applicable, and WIPO/Madrid (WO) international registrations designating it</div>` : '',
|
|
800
|
-
// — THE POINTER NAMES THE HEADING VERBATIM. It said “What we covered”, and the heading it points
|
|
801
|
-
// at reads "What we covered — and what's open" (scopeSection). A reader who ctrl-Fs the quoted words
|
|
802
|
-
// lands on a prefix of a title rather than the title, and there is no anchor to follow instead: the
|
|
803
|
-
// report is served in a null-origin iframe where fragment jumps go nowhere (the same fact the B1 note
|
|
804
|
-
// below gives for deleting the Subject-to line). A cross-reference is only worth its bytes if the
|
|
805
|
-
// words it quotes are the words on the page.
|
|
806
|
-
//
|
|
807
|
-
// IT CANNOT DANGLE. `limited` is populated only from coverage rows carrying a coverage-limited /
|
|
808
|
-
// not-searched state, so a limited chip implies at least one coverage row, which is the exact
|
|
809
|
-
// condition the heading renders under. Checked rather than assumed — the alternative was a
|
|
810
|
-
// `coverage.length` guard here that no input can reach, and a guard that cannot fire is a claim
|
|
811
|
-
// nobody can check.
|
|
812
|
-
limited.length ? `<div class="jnote">* ${esc(limited.join(', '))} — coverage-limited (see “What we covered — and what's open”)</div>` : '',
|
|
813
|
-
].join('');
|
|
814
|
-
return `<div class="jchips">${wwChip}${chips}</div>${notes}`;
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
// spec 47 UX: the title heading carries the matter's scope at a glance — classes + searched countries —
|
|
818
|
-
// with the full country name on hover. Inline-styled (like homeButton) so frozen template CSS needs no change.
|
|
819
|
-
function headScope(fm, coverage = [], findings = []) {
|
|
820
|
-
const { order: codes, worldwide } = jurisdictionCodes(fm, coverage, findings);
|
|
821
|
-
if (!fm.classes && !codes.length && !worldwide) return '';
|
|
822
|
-
const cls = fm.classes ? `<span>Cl. ${esc(fm.classes)}</span>` : '';
|
|
823
|
-
const jur = codes.map(c => `<span title="${escAttr(regionName(c))}">${esc(c)}</span>`).join(' ');
|
|
824
|
-
const style = "margin:4px 0 0;font:600 13px/1.5 'Plus Jakarta Sans','Helvetica Neue',Helvetica,Arial,sans-serif;"
|
|
825
|
-
+ "letter-spacing:.05em;opacity:.75";
|
|
826
|
-
// wp50: a worldwide sweep leads the scope line; the codes read as the focus set, never as the
|
|
827
|
-
// whole scope ("Cl. 5 · US EU UK CH JP" under a worldwide search reads as a narrow search).
|
|
828
|
-
const parts = worldwide
|
|
829
|
-
? [cls, `<span title="the register sweep ran worldwide (all reachable registers)">worldwide register sweep</span>`, jur ? `<span style="opacity:.85">focus:</span> ${jur}` : '']
|
|
830
|
-
: [cls, jur];
|
|
831
|
-
return `<div class="mark-scope" style="${style}">${parts.filter(Boolean).join(' · ')}</div>`;
|
|
832
|
-
}
|
|
833
|
-
|
|
834
739
|
// ── ABOUT THIS REQUEST ─────────────────────────────────────────────────────────────────────────────
|
|
835
740
|
// The scope line, the facts card and the covers sentence were three places saying what was asked for.
|
|
836
741
|
// They are one labelled panel now, directly under the name, on every report type (the 2026-09-16 report redesign).
|
|
837
742
|
// Every row is a fact the run already carries: nothing here is composed.
|
|
838
|
-
|
|
743
|
+
// WHERE THE SEARCH RAN, as a count and as the list. On a worldwide search the About row gives the count of focus
|
|
744
|
+
// territories (owner, 2026-11-18), "Worldwide · 14 focus territories", where it listed every one
|
|
745
|
+
// of them; the list, in the words it had, moves to the What was searched section. A search of named places keeps
|
|
746
|
+
// its list in the About row, where it is the answer.
|
|
747
|
+
function placesSearched(fm, coverage = [], findings = []) {
|
|
839
748
|
const { order: codes, meta, worldwide } = jurisdictionCodes(fm, coverage, findings);
|
|
840
749
|
// A JURISDICTION SEARCHED WITH LIMITED COVERAGE SAYS SO HERE. The chips this row replaces carried that
|
|
841
750
|
// on the office's own chip; a plain list of country names would read as "all of these were searched"
|
|
@@ -844,23 +753,28 @@ function aboutPanel(fm, coverage = [], findings = [], opts = {}) {
|
|
|
844
753
|
const shown = (worldwide && !codes.includes('WO')) ? [...codes, 'WO'] : codes;
|
|
845
754
|
const where = shown.map((c) => {
|
|
846
755
|
const name = regionName(c) || c;
|
|
847
|
-
return meta.get(c)?.limited ?
|
|
756
|
+
return meta.get(c)?.limited ? R.scope.coverageLimited(name) : name;
|
|
848
757
|
}).filter(Boolean).join(', ');
|
|
758
|
+
return { worldwide, focus: codes.length, where, list: worldwide ? (where ? R.scope.worldwideFocusOn(where) : R.scope.worldwideList) : where };
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
function aboutPanel(fm, coverage = [], findings = [], opts = {}) {
|
|
762
|
+
const { worldwide, focus, list } = placesSearched(fm, coverage, findings);
|
|
849
763
|
// The type of search is the bolded head of the depth note the driver already composes; the rest of
|
|
850
764
|
// that sentence is the product's covers line, which the owner ruled off the page.
|
|
851
765
|
const note = String(opts.depthNote ?? '').trim();
|
|
852
766
|
const cut = note.lastIndexOf(' — ');
|
|
853
767
|
const stage = cut > 0 ? note.slice(0, cut).trim() : note;
|
|
854
768
|
const rows = [
|
|
855
|
-
[
|
|
856
|
-
[
|
|
857
|
-
[
|
|
858
|
-
[
|
|
859
|
-
[
|
|
860
|
-
[
|
|
769
|
+
[R.about.typeOfSearch, stage],
|
|
770
|
+
[R.about.instructedUse, fm.use || ''],
|
|
771
|
+
[R.about.classes, fm.classes || ''],
|
|
772
|
+
[R.about.whereSearched, worldwide && focus ? R.about.worldwideFocus(focus) : list],
|
|
773
|
+
[R.about.project, fm.run_under_project || ''],
|
|
774
|
+
[R.about.searchedOn, fm.searched || fm.run || ''],
|
|
861
775
|
].filter(([, v]) => String(v || '').trim());
|
|
862
776
|
if (!rows.length) return '';
|
|
863
|
-
return `<div class="panel about"><div class="label"
|
|
777
|
+
return `<div class="panel about"><div class="label">${R.about.title}</div>${
|
|
864
778
|
rows.map(([k, v]) => `<div class="row"><span class="k">${esc(k)}</span><span class="v">${esc(v)}</span></div>`).join('')
|
|
865
779
|
}</div>`;
|
|
866
780
|
}
|
|
@@ -872,7 +786,7 @@ function doFirst(secs) {
|
|
|
872
786
|
const head = nl < 0 ? t.trim() : t.slice(0, nl).trim();
|
|
873
787
|
const body = nl < 0 ? '' : t.slice(nl + 1).trim();
|
|
874
788
|
return `<div class="firstUp"><div class="ic">!</div><div>
|
|
875
|
-
<div class="tcrit"
|
|
789
|
+
<div class="tcrit">${R.doFirst}</div>
|
|
876
790
|
<h3>${inline(head)}</h3>${body ? `<p>${inline(body)}</p>` : ''}
|
|
877
791
|
</div></div>`;
|
|
878
792
|
}
|
|
@@ -968,7 +882,7 @@ function answersHtml(body) {
|
|
|
968
882
|
const head = `${label ? `${inline(label)} ` : ''}${inline(first)}`;
|
|
969
883
|
if (!rest && !tail) { rows.push(`<li>${head}</li>`); continue; }
|
|
970
884
|
if (!first && !rest) { rows.push(`<li class="int-note">${head}${inline(tail)}</li>`); continue; }
|
|
971
|
-
const fold = `<details class="ans-more"><summary
|
|
885
|
+
const fold = `<details class="ans-more"><summary>${R.more}</summary><p>${inline(rest && tail ? `${rest} ${tail}` : rest || tail)}</p></details>`;
|
|
972
886
|
rows.push(`<li>${head}${rest ? fold : `<div class="int-note">${fold}</div>`}</li>`);
|
|
973
887
|
}
|
|
974
888
|
return rows.length ? `<ul class="answers">${rows.join('')}</ul>` : '';
|
|
@@ -1063,14 +977,14 @@ export function actYouConditions(youBucket) {
|
|
|
1063
977
|
// meaning "different goods" appeared zero times, because such records are dropped by the batch screen
|
|
1064
978
|
// before they ever become a cleared near-name. Grouping on the engine's reasoning paragraph instead would
|
|
1065
979
|
// produce four groups and assert a reason the record does not support. Owner ruling, 2026-09-16.
|
|
1066
|
-
const CLEARED_GROUP_LABEL =
|
|
980
|
+
const CLEARED_GROUP_LABEL = R.cleared.groups;
|
|
1067
981
|
const CLEARED_GROUP_ORDER = ['different-goods', 'dead-filing', 'other'];
|
|
1068
982
|
const NAMES_CAP = 8;
|
|
1069
983
|
|
|
1070
984
|
function clearedGroupsHtml(searchDepth, auditFile) {
|
|
1071
985
|
const reg = (searchDepth && searchDepth.cleared && searchDepth.cleared.register) || [];
|
|
1072
986
|
if (!reg.length) return '';
|
|
1073
|
-
const link = (n) => hrefAttr(auditFile, { relative: true }) ? `<div class="cmore"><a class="wb" href="${hrefAttr(auditFile, { relative: true })}"
|
|
987
|
+
const link = (n) => hrefAttr(auditFile, { relative: true }) ? `<div class="cmore"><a class="wb" href="${hrefAttr(auditFile, { relative: true })}">${R.cleared.allInWorkbook(n.toLocaleString('en-GB'))}</a></div>` : '';
|
|
1074
988
|
return CLEARED_GROUP_ORDER.map((g) => {
|
|
1075
989
|
const items = reg.filter((c) => c.group === g);
|
|
1076
990
|
if (!items.length) return '';
|
|
@@ -1083,7 +997,7 @@ function clearedGroupsHtml(searchDepth, auditFile) {
|
|
|
1083
997
|
esc([c.owner, regionName(c.country) || c.country, c.classes ? `Cl. ${c.classes}` : '',
|
|
1084
998
|
c.status ? String(c.status).toLowerCase() : ''].filter(Boolean).join(' \u00b7 '))}</span></div>`).join('');
|
|
1085
999
|
return `<details class="cgroup"><summary><span class="gname">${esc(CLEARED_GROUP_LABEL[g] || g)}</span><span class="gcount">${
|
|
1086
|
-
items.length.toLocaleString('en-GB')
|
|
1000
|
+
R.cleared.names(items.length.toLocaleString('en-GB'), items.length)}</span></summary><div class="gbody">${rows}${
|
|
1087
1001
|
items.length > shown.length ? link(items.length) : ''}</div></details>`;
|
|
1088
1002
|
}).join('');
|
|
1089
1003
|
}
|
|
@@ -1093,7 +1007,7 @@ function clearedGroupsHtml(searchDepth, auditFile) {
|
|
|
1093
1007
|
// reference positively identified as that ledger is renamed; any other source keeps its exact reference until a
|
|
1094
1008
|
// truthful label exists for it. The run's record and the audit keep the original reference.
|
|
1095
1009
|
const RUN_COMMON_LAW_RECORD = /^(?:\.\/)?(?:_driver\/)?common-law-grid(?:\.half-[a-z0-9]+)?\.json$/i;
|
|
1096
|
-
const RUN_COMMON_LAW_RECORD_LABEL =
|
|
1010
|
+
const RUN_COMMON_LAW_RECORD_LABEL = R.cleared.runCommonLawRecord;
|
|
1097
1011
|
|
|
1098
1012
|
function webNamesHtml(searchDepth) {
|
|
1099
1013
|
const web = (searchDepth && searchDepth.cleared && searchDepth.cleared.web) || [];
|
|
@@ -1102,8 +1016,8 @@ function webNamesHtml(searchDepth) {
|
|
|
1102
1016
|
const rows = shown.map((w) => `<div class="crow"><span class="cm-mark">${esc(w.title || '')}</span>${
|
|
1103
1017
|
w.url && RUN_COMMON_LAW_RECORD.test(String(w.url).trim()) ? `<span class="curl">${esc(RUN_COMMON_LAW_RECORD_LABEL)}</span>`
|
|
1104
1018
|
: w.url ? `<a class="curl" href="${escAttr(w.url)}">${esc(String(w.url).replace(/^https?:\/\//, '').replace(/\/$/, ''))}</a>` : '<span class="cwho"></span>'}</div>`).join('');
|
|
1105
|
-
return `<details class="cgroup"><summary><span class="gname"
|
|
1106
|
-
web.length.toLocaleString('en-GB')
|
|
1019
|
+
return `<details class="cgroup"><summary><span class="gname">${R.cleared.webAndMarketplace}</span><span class="gcount">${
|
|
1020
|
+
R.cleared.names(web.length.toLocaleString('en-GB'), web.length)}</span></summary><div class="gbody">${rows}</div></details>`;
|
|
1107
1021
|
}
|
|
1108
1022
|
|
|
1109
1023
|
// ── WHERE IT STANDS, COURT DECISIONS, WHAT WAS SEARCHED ────────────────────────────────────────────
|
|
@@ -1167,7 +1081,7 @@ function whereItStandsSection(findings, opts) {
|
|
|
1167
1081
|
const planned = plan && Array.isArray(plan.searched) ? plan.searched.map(String) : null;
|
|
1168
1082
|
const codes = (planned
|
|
1169
1083
|
? [...new Set([...planned, ...bandBy.keys()])]
|
|
1170
|
-
: Object.keys(byC)).filter((c) => c !== 'WO');
|
|
1084
|
+
: Object.keys(byC)).filter((c) => c !== 'WO' && c !== UNSPECIFIED_REGION);
|
|
1171
1085
|
if (!codes.length) return '';
|
|
1172
1086
|
const alias = { EM: 'EU', GB: 'UK' };
|
|
1173
1087
|
// ONE ROW PER COUNTRY, DEDUPED AFTER THE ALIAS AND NOT BEFORE. The archive wrote each country once, so
|
|
@@ -1199,10 +1113,12 @@ function whereItStandsSection(findings, opts) {
|
|
|
1199
1113
|
}
|
|
1200
1114
|
if (!withF.length && !clean.length) return '';
|
|
1201
1115
|
const rows = withF.map((c) => `<div class="wrow"><span class="rcode">${esc(c.code)}</span><span class="wname">${esc(c.name)}</span><span class="kc">${esc(c.band)}</span></div>`).join('');
|
|
1116
|
+
// THE CLEAN PLACES ARE ONE PARAGRAPH OF NAMES (owner, 2026-11-18). They were a chip each, and
|
|
1117
|
+
// past twelve the chips printed codes, with the name only on hover. A list of names reads in the names' order.
|
|
1202
1118
|
const cleanHtml = clean.length
|
|
1203
|
-
? `<div class="wclean"><span class="wk"
|
|
1119
|
+
? `<div class="wclean"><span class="wk">${R.nothingFound}</span><p class="wnames">${esc(clean.map((c) => c.name).sort((a, b) => a.localeCompare(b, 'en')).join(', '))}</p></div>`
|
|
1204
1120
|
: '';
|
|
1205
|
-
return `<div class="sec" id="countries"><span class="num"></span><h2
|
|
1121
|
+
return `<div class="sec" id="countries"><span class="num"></span><h2>${R.whereItStands}</h2></div>
|
|
1206
1122
|
<div class="panel where">${rows}${cleanHtml}</div>`;
|
|
1207
1123
|
}
|
|
1208
1124
|
|
|
@@ -1213,7 +1129,7 @@ function courtDecisionsSection(opts) {
|
|
|
1213
1129
|
if (!sd || !sd.counts || !isFullCountry(opts)) return '';
|
|
1214
1130
|
const line = courtLineFor(opts, sd.counts.courtDecisions);
|
|
1215
1131
|
if (!line) return '';
|
|
1216
|
-
return `<div class="sec" id="court"><span class="num"></span><h2
|
|
1132
|
+
return `<div class="sec" id="court"><span class="num"></span><h2>${R.court.title}</h2></div>
|
|
1217
1133
|
<div class="panel courtp"><p>${esc(line)}</p></div>`;
|
|
1218
1134
|
}
|
|
1219
1135
|
|
|
@@ -1228,11 +1144,11 @@ function courtLineFor(opts, state) {
|
|
|
1228
1144
|
// put here — and every branch below embedded it mid-sentence. The page then read "Case-law research
|
|
1229
1145
|
// could not be completed for ." Each clause is now attached to the name rather than assuming one:
|
|
1230
1146
|
// same words when there is a country, one clause shorter when there is not.
|
|
1231
|
-
const forWhere = where ?
|
|
1147
|
+
const forWhere = where ? R.court.forWhere(where) : '';
|
|
1232
1148
|
let line = '';
|
|
1233
|
-
if (state === 'not-checked') line =
|
|
1234
|
-
else if (state === 'none-found') line =
|
|
1235
|
-
else if (state === 'found') line =
|
|
1149
|
+
if (state === 'not-checked') line = R.court.notCompleted(forWhere);
|
|
1150
|
+
else if (state === 'none-found') line = R.court.noneFound(forWhere);
|
|
1151
|
+
else if (state === 'found') line = R.court.found(forWhere);
|
|
1236
1152
|
return line;
|
|
1237
1153
|
}
|
|
1238
1154
|
|
|
@@ -1244,35 +1160,41 @@ function courtLineFor(opts, state) {
|
|
|
1244
1160
|
// disclosure the whole can't-close-then-disclose doctrine rests on, and it was measured reaching a
|
|
1245
1161
|
// client short by two rows only hours before this redesign (the 2026-09-16 report redesign). It renders here, in the
|
|
1246
1162
|
// reader's own words, with the counts — never the query text, the refusals or the provider faults.
|
|
1247
|
-
function whatWasSearchedSection(opts, coverage = [], findings = [], recordsByUri = new Map()) {
|
|
1163
|
+
function whatWasSearchedSection(opts, coverage = [], findings = [], recordsByUri = new Map(), fm = {}) {
|
|
1248
1164
|
const sd = opts && opts.searchDepth;
|
|
1249
1165
|
const open = (Array.isArray(coverage) ? coverage : []).filter((c) => COV_STATE[c?.state]?.cls !== 'ok');
|
|
1250
1166
|
const c = (sd && sd.counts) || {}, rows = [];
|
|
1167
|
+
const places = placesSearched(fm, coverage, findings);
|
|
1168
|
+
if (places.worldwide && places.focus) rows.push([R.searched.whereSearched, places.list]);
|
|
1251
1169
|
// THE REGISTER ROW, AS THE BOARDS DRAW IT: one line of totals — records read across the countries, plus
|
|
1252
1170
|
// the international registrations apart from them — and the per-country counts as chips under it, code
|
|
1253
1171
|
// first and the name on hover. One country is named in the line instead ("141 records read in Japan"),
|
|
1254
1172
|
// and draws no chips: a single chip would repeat the line.
|
|
1255
|
-
|
|
1173
|
+
// A register's own key (EM, GB, INT) is read as the country the band rows name (EU, UK, WO), and two keys for one
|
|
1174
|
+
// country are one count, so no chip repeats and Madrid records counted under INT join the international line.
|
|
1175
|
+
const byC = {};
|
|
1176
|
+
for (const [k, n] of Object.entries(c.recordsByCountry || {})) { const key = normRegion(k); byC[key] = (byC[key] || 0) + (Number(n) || 0); }
|
|
1256
1177
|
const intl = Number(byC.WO) || 0;
|
|
1257
1178
|
const countries = Object.entries(byC).filter(([k, n]) => k !== 'WO' && Number(n) > 0).sort((a, b) => b[1] - a[1]);
|
|
1258
1179
|
const read = countries.reduce((t, [, n]) => t + Number(n), 0);
|
|
1259
1180
|
if (countries.length || intl) {
|
|
1260
|
-
const where = countries.length === 1 ?
|
|
1261
|
-
: countries.length ?
|
|
1262
|
-
const plus = intl ? `${countries.length ?
|
|
1263
|
-
const line = `${countries.length ?
|
|
1181
|
+
const where = countries.length === 1 ? R.searched.inPlace(regionName(countries[0][0]) || countries[0][0])
|
|
1182
|
+
: countries.length ? R.searched.acrossCountries(countries.length.toLocaleString('en-GB')) : '';
|
|
1183
|
+
const plus = intl ? `${countries.length ? R.searched.plus : ''}${R.searched.international(intl.toLocaleString('en-GB'), intl)}` : '';
|
|
1184
|
+
const line = `${countries.length ? R.searched.recordsRead(read.toLocaleString('en-GB'), read, where) : ''}${plus}`;
|
|
1264
1185
|
const chips = countries.length > 1
|
|
1265
|
-
|
|
1186
|
+
// ZZ draws no chip; its records stay in the totals, which the overall-risk panel states too.
|
|
1187
|
+
? `<div class="wchips">${countries.filter(([k]) => k !== UNSPECIFIED_REGION).map(([k, n]) => `<span class="wchip" title="${escAttr(regionName(k) || k)}">${esc(k)} <b>${Number(n).toLocaleString('en-GB')}</b></span>`).join('')}</div>`
|
|
1266
1188
|
: '';
|
|
1267
1189
|
rows.push(['Register', { html: `${esc(line)}${chips}` }]);
|
|
1268
1190
|
}
|
|
1269
1191
|
const sw = c.sweep || {};
|
|
1270
|
-
if (sw.spellings) rows.push([
|
|
1192
|
+
if (sw.spellings) rows.push([R.searched.spellings, String(sw.spellings)]);
|
|
1271
1193
|
if (sw.checks) rows.push(['Marketplace and web', sw.noMarketplacesPicked
|
|
1272
|
-
?
|
|
1273
|
-
:
|
|
1274
|
-
if (sw.reputation) rows.push([
|
|
1275
|
-
rows.push([
|
|
1194
|
+
? R.searched.checksWebAndStores(sw.checks.toLocaleString('en-GB'))
|
|
1195
|
+
: R.searched.checksOnPlatforms(sw.checks.toLocaleString('en-GB'), sw.platforms)]);
|
|
1196
|
+
if (sw.reputation) rows.push([R.searched.reputation, R.searched.checks(sw.reputation.toLocaleString('en-GB'))]);
|
|
1197
|
+
rows.push([R.searched.localScript, c.localScriptSearched ? R.searched.searched : R.searched.notSearched]);
|
|
1276
1198
|
// HOW DEEP THE LOCAL-LANGUAGE INVESTIGATION WENT, which is a different question from the row above it.
|
|
1277
1199
|
// That one answers whether the spellings were searched; this one answers whether the investigation ran
|
|
1278
1200
|
// at the depth the matter configured. The engine can run it shallower than the account asked for, and
|
|
@@ -1280,7 +1202,7 @@ function whatWasSearchedSection(opts, coverage = [], findings = [], recordsByUri
|
|
|
1280
1202
|
// redesign replaced with named rows — so a run that went shallow said so on no page at all.
|
|
1281
1203
|
//
|
|
1282
1204
|
// EVERY ONE OF THE FOUR WORDS IS ALREADY ON THE PAGE. "Included" and "Not part of this search" are the
|
|
1283
|
-
// approved board's own values for this row; "Partially covered" and "Not
|
|
1205
|
+
// approved board's own values for this row; "Partially covered" and "Not searched" are the coverage
|
|
1284
1206
|
// vocabulary this file already renders, taken from COV_STATE rather than retyped so they cannot drift
|
|
1285
1207
|
// apart from it. Nothing here composes a sentence.
|
|
1286
1208
|
//
|
|
@@ -1289,10 +1211,10 @@ function whatWasSearchedSection(opts, coverage = [], findings = [], recordsByUri
|
|
|
1289
1211
|
// somebody adds: a row is a claim about a client's search, and the nearest word to an unknown state is
|
|
1290
1212
|
// a claim nobody checked.
|
|
1291
1213
|
const LL_WORD = {
|
|
1292
|
-
ran:
|
|
1214
|
+
ran: R.searched.included,
|
|
1293
1215
|
'ran-shallow': COV_STATE['coverage-limited'].word,
|
|
1294
1216
|
'not-run': COV_STATE['not-searched'].word,
|
|
1295
|
-
'not-in-scope':
|
|
1217
|
+
'not-in-scope': R.searched.notPartOfSearch,
|
|
1296
1218
|
};
|
|
1297
1219
|
//
|
|
1298
1220
|
// AND THE ROW NEEDS A LANE RECORD BEHIND IT, not just a state. The state folds to `not-in-scope` when
|
|
@@ -1311,12 +1233,12 @@ function whatWasSearchedSection(opts, coverage = [], findings = [], recordsByUri
|
|
|
1311
1233
|
// COURT DECISIONS, AS THE FULL COUNTRY BOARD DRAWS THE ROW: its state, and for a search that could not
|
|
1312
1234
|
// be completed, the same sentence the court section under it prints. A search that does not include
|
|
1313
1235
|
// court decisions draws no row, as the other boards draw none.
|
|
1314
|
-
const cdWord =
|
|
1236
|
+
const cdWord = R.searched.courtWords[c.courtDecisions];
|
|
1315
1237
|
if (cdWord && isFullCountry(opts)) {
|
|
1316
1238
|
const why = c.courtDecisions === 'not-checked' ? courtLineFor(opts, 'not-checked') : '';
|
|
1317
1239
|
rows.push(['Court decisions', { html: `<span class="wstate">${esc(cdWord)}</span>${why ? `<span class="wnote">${esc(why)}</span>` : ''}` }]);
|
|
1318
1240
|
}
|
|
1319
|
-
const openHtml = open.length ? `<div class="openrows"><div class="rk"
|
|
1241
|
+
const openHtml = open.length ? `<div class="openrows"><div class="rk">${R.searched.leftOpen}</div>${coverageGrid(open, { verdict: opts?.assessmentNotCompleted !== true })}</div>` : '';
|
|
1320
1242
|
// THE LEGEND FOR WHAT IS ON THE CARDS, kept when the scope fold went. It is not the engine narrating
|
|
1321
1243
|
// its own searching — it is what a linked registration number opens, why the rest are cited by number,
|
|
1322
1244
|
// and what a register-index entry means. A reader cannot read a card without it.
|
|
@@ -1325,15 +1247,15 @@ function whatWasSearchedSection(opts, coverage = [], findings = [], recordsByUri
|
|
|
1325
1247
|
const hasIndexEntry = (Array.isArray(findings) ? findings : []).some((f) => (f?.owner?.registrations ?? []).some((r) => r?.uri
|
|
1326
1248
|
&& (hasRecordSet || !(r.status || r.filed || r.expiry || (r.classes && r.classes.length)))));
|
|
1327
1249
|
const prov = (opts?.assessmentNotCompleted !== true && (hasRecordSet || hasCards))
|
|
1328
|
-
? `<div class="provwrap"><div class="rk"
|
|
1250
|
+
? `<div class="provwrap"><div class="rk">${R.searched.provenance}</div><p class="provnote">${hasRecordSet ? R.searched.numbersRead : ''}${officeLinkNote()}${hasIndexEntry ? R.searched.indexEntry : ''}${R.searched.inferred}</p></div>`
|
|
1329
1251
|
: '';
|
|
1330
1252
|
// THE BOARDS END THE SECTION WITH THE WORKBOOK: every search and its result are in the audit workbook,
|
|
1331
1253
|
// which is where a reader who wants the record goes.
|
|
1332
1254
|
const more = hrefAttr(opts?.auditFile, { relative: true })
|
|
1333
|
-
? `<div class="cmore"><a class="wb" href="${hrefAttr(opts.auditFile, { relative: true })}"
|
|
1255
|
+
? `<div class="cmore"><a class="wb" href="${hrefAttr(opts.auditFile, { relative: true })}">${R.searched.everySearch}</a></div>` : '';
|
|
1334
1256
|
if (!rows.length && !openHtml && !prov) return '';
|
|
1335
|
-
return `<div class="sec" id="searched"><span class="num"></span><h2
|
|
1336
|
-
<details class="searched"><summary><span class="gname"
|
|
1257
|
+
return `<div class="sec" id="searched"><span class="num"></span><h2>${R.searched.title}</h2></div>
|
|
1258
|
+
<details class="searched"><summary><span class="gname">${R.searched.counts}</span></summary><div class="gbody">${
|
|
1337
1259
|
rows.map(([k, v]) => `<div class="row"><span class="k">${esc(k)}</span><span class="v">${typeof v === 'object' ? v.html : esc(v)}</span></div>`).join('')}${openHtml}${prov}${more}</div></details>`;
|
|
1338
1260
|
}
|
|
1339
1261
|
|
|
@@ -1353,34 +1275,22 @@ function alsoConsideredSection(ruledOut, recordsByUri = new Map(), opts = {}) {
|
|
|
1353
1275
|
// The fixed line stays as the last resort, for a finding that carries neither.
|
|
1354
1276
|
const why = f.ruled_out_reason ? esc(f.ruled_out_reason)
|
|
1355
1277
|
: f.net ? esc(String(f.net))
|
|
1356
|
-
:
|
|
1357
|
-
const legal = f.legal_position ?
|
|
1358
|
-
const practical = f.practical_position ?
|
|
1278
|
+
: R.alsoConsidered.defaultWhy;
|
|
1279
|
+
const legal = f.legal_position ? inline(String(f.legal_position)) : '';
|
|
1280
|
+
const practical = f.practical_position ? inline(String(f.practical_position)) : '';
|
|
1359
1281
|
const fold = (legal || practical)
|
|
1360
|
-
? `<details class="roff"><summary
|
|
1282
|
+
? `<details class="roff"><summary>${R.alsoConsidered.whyRuledOut}</summary>${legal ? `<p><b>${R.alsoConsidered.legal}</b> ${legal}</p>` : ''}${practical ? `<p><b>${R.alsoConsidered.practical}</b> ${practical}</p>` : ''}</details>` : '';
|
|
1361
1283
|
return `<div class="card ruled"><div class="top"><div class="rail"></div><div class="body"><div class="cardhead">${
|
|
1362
|
-
f.ordinal != null ? `<span class="fnum">${esc(String(f.ordinal))}</span>` : ''}<
|
|
1363
|
-
who ? `<span class="cwho">${esc(who)}</span>` : ''}<span class="tier ruled"
|
|
1284
|
+
f.ordinal != null ? `<span class="fnum">${esc(String(f.ordinal))}</span>` : ''}<h3 class="who mark-first">${esc(f.mark || '')}</h3>${
|
|
1285
|
+
who ? `<span class="cwho">${esc(who)}</span>` : ''}<span class="tier ruled">${R.alsoConsidered.ruledOut}</span><button class="ask-fi no-print">${R.alsoConsidered.askAi}</button></div><div class="oneline">${why}</div>${fold}</div></div></div>`;
|
|
1364
1286
|
}).join('');
|
|
1365
1287
|
const groups = clearedGroupsHtml(sd, opts.auditFile);
|
|
1366
1288
|
const web = webNamesHtml(sd);
|
|
1367
1289
|
if (!ruledCards && !groups && !web) return '';
|
|
1368
|
-
return `<div class="sec" id="also-considered"><span class="num"></span><h2
|
|
1290
|
+
return `<div class="sec" id="also-considered"><span class="num"></span><h2>${R.alsoConsidered.title}</h2></div>
|
|
1369
1291
|
<div class="panel alsocons">${ruledCards ? `<div class="ruled-cards">${ruledCards}</div>` : ''}${groups || web ? `<div class="cgroups">${groups}${web}</div>` : ''}</div>`;
|
|
1370
1292
|
}
|
|
1371
1293
|
|
|
1372
|
-
function ruledOutSection(ruledOut, recordsByUri = new Map()) {
|
|
1373
|
-
if (!ruledOut.length) return '';
|
|
1374
|
-
const rows = ruledOut.map(f => {
|
|
1375
|
-
const who = recordOwner(f, recordsByUri) || f.owner?.name || '';
|
|
1376
|
-
const why = f.ruled_out_reason ? esc(f.ruled_out_reason) : 'a different name in a related field — not a conflict with your mark';
|
|
1377
|
-
// The ordinal renders here too — ruled-out findings keep their persisted number, so a reader who
|
|
1378
|
-
// sees #1–#8, #10, #11 in the landscape finds #9 accounted for instead of unexplainably missing.
|
|
1379
|
-
return `<li style="margin:4px 0"><b>${f.ordinal != null ? `#${f.ordinal} ` : ''}${esc(f.mark)}</b>${who ? ` — ${esc(who)}` : ''} · <span style="color:var(--muted,#6b5d50)">${why}</span></li>`;
|
|
1380
|
-
}).join('');
|
|
1381
|
-
return `<details class="rgroup ruledout"><summary><span class="gname">Also considered — ruled out</span><span class="gcount">${ruledOut.length} name${ruledOut.length === 1 ? '' : 's'}</span></summary><div class="gbody"><p class="note" style="margin:2px 0 8px">Names that surfaced in the search but share no word or sound with your mark — listed for completeness; not conflicts.</p><ul style="margin:0;padding-left:20px;font-size:13px">${rows}</ul></div></details>`;
|
|
1382
|
-
}
|
|
1383
|
-
|
|
1384
1294
|
// doc-52 §4 — ONE collapsed "Scope & what we didn't search" section, LAST, replacing BOTH the top
|
|
1385
1295
|
// "Checks we ran" panel and the (previously dead) Methodology block: the search results we can state,
|
|
1386
1296
|
// the coverage grid, the plain scope note, and famous-neighbour diligence. Nothing here leads the report.
|
|
@@ -1458,32 +1368,38 @@ function dedupeScatter(findings) {
|
|
|
1458
1368
|
return placed;
|
|
1459
1369
|
}
|
|
1460
1370
|
|
|
1371
|
+
// THE CHART'S NAME (owner, 2026-11-18). A screen reader met an unnamed drawing and then a run
|
|
1372
|
+
// of "#1", "#2" links. The <title>, first in the <svg>, says what the drawing is; its count is the points drawn.
|
|
1373
|
+
const chartTitle = (n) => `Chart of ${n} conflict${n === 1 ? '' : 's'}, placed by how similar each mark is and how close its goods are; each number links to its card below.`;
|
|
1374
|
+
|
|
1461
1375
|
function quadrant(findings) {
|
|
1462
|
-
const
|
|
1376
|
+
const points = dedupeScatter(findings);
|
|
1377
|
+
const markers = points.map(({ f, cx, cy, on, r, pending }) => {
|
|
1463
1378
|
// Band hexes, hardcoded on purpose: the quadrant panel stays a FIXED LIGHT surface in dark mode
|
|
1464
1379
|
// (brand.mjs REPORT_DARK_RULES), so it cannot read var(--med)/var(--clear) — those flip. They are
|
|
1465
1380
|
// the LIGHT ramp's --med / --clear and must be recolored in lockstep with brand.mjs:90.
|
|
1466
|
-
const fill = on ?
|
|
1381
|
+
const fill = on ? QC.onField : QC.secondary;
|
|
1467
1382
|
const X = cx.toFixed(1), Y = cy.toFixed(1), fs = on ? 12.5 : 8;
|
|
1468
1383
|
const inner = pending
|
|
1469
|
-
? `<circle cx="${X}" cy="${Y}" r="${r}" fill="
|
|
1470
|
-
: `<circle cx="${X}" cy="${Y}" r="${r}" fill="${fill}" stroke="
|
|
1384
|
+
? `<circle cx="${X}" cy="${Y}" r="${r}" fill="${QC.pendingFill}" stroke="${fill}" stroke-width="2.5"/><text x="${X}" y="${Y}" text-anchor="middle" dominant-baseline="central" font-size="${fs}" font-weight="900" fill="${fill}">${f.ordinal}</text>`
|
|
1385
|
+
: `<circle cx="${X}" cy="${Y}" r="${r}" fill="${fill}" stroke="${PALETTE.ink}" stroke-opacity=".22" stroke-width="1"/><text x="${X}" y="${Y}" text-anchor="middle" dominant-baseline="central" font-size="${fs}" font-weight="900" fill="#fff">${f.ordinal}</text>`;
|
|
1471
1386
|
return `<a href="#c${f.ordinal}"><title>#${f.ordinal}</title>${inner}</a>`;
|
|
1472
1387
|
}).join('');
|
|
1473
1388
|
return `<div class="panel land">
|
|
1474
1389
|
<svg viewBox="0 0 560 430" xmlns="http://www.w3.org/2000/svg" font-family="Plus Jakarta Sans, sans-serif">
|
|
1475
|
-
<
|
|
1390
|
+
<title>${chartTitle(points.length)}</title>
|
|
1391
|
+
<defs><linearGradient id="rz" x1="0" y1="1" x2="1" y2="0"><stop offset="0" stop-color="${PALETTE.crimson}" stop-opacity="0"/><stop offset="1" stop-color="${PALETTE.crimson}" stop-opacity=".09"/></linearGradient></defs>
|
|
1476
1392
|
<rect x="70" y="30" width="460" height="342" fill="url(#rz)"/>
|
|
1477
|
-
<g stroke="
|
|
1478
|
-
<text x="300" y="406" text-anchor="middle" font-size="12" font-weight="700" fill="
|
|
1479
|
-
<text x="40" y="201" font-size="12" font-weight="700" fill="
|
|
1480
|
-
<text x="520" y="46" text-anchor="end" font-size="9.5" font-weight="700" letter-spacing=".08em" fill="
|
|
1393
|
+
<g stroke="${QC.grid}" stroke-width="1"><line x1="70" y1="30" x2="70" y2="372"/><line x1="300" y1="30" x2="300" y2="372" stroke-dasharray="3 4"/><line x1="530" y1="30" x2="530" y2="372"/><line x1="70" y1="372" x2="530" y2="372"/><line x1="70" y1="201" x2="530" y2="201" stroke-dasharray="3 4"/><line x1="70" y1="30" x2="530" y2="30"/></g>
|
|
1394
|
+
<text x="300" y="406" text-anchor="middle" font-size="12" font-weight="700" fill="${QC.axisText}">${R.chart.goodsAxis}</text>
|
|
1395
|
+
<text x="40" y="201" font-size="12" font-weight="700" fill="${QC.axisText}" transform="rotate(-90 40 201)" text-anchor="middle">${R.chart.markAxis}</text>
|
|
1396
|
+
<text x="520" y="46" text-anchor="end" font-size="9.5" font-weight="700" letter-spacing=".08em" fill="${QC.zoneLabel}">${R.chart.zone}</text>
|
|
1481
1397
|
${markers}
|
|
1482
1398
|
</svg>
|
|
1483
1399
|
<div class="legend">
|
|
1484
|
-
<span><i style="background
|
|
1485
|
-
<span><i style="background
|
|
1486
|
-
<span><i style="background
|
|
1400
|
+
<span><i style="background:${QC.onField}"></i>${R.chart.onField}</span>
|
|
1401
|
+
<span><i style="background:${QC.secondary}"></i>${FRAMEWORK ? R.chart.secondaryWatch : R.chart.secondaryManageable}</span>
|
|
1402
|
+
<span><i style="background:${QC.pendingFill};border:2px solid ${QC.secondary};width:7px;height:7px"></i>${R.chart.pending}</span>
|
|
1487
1403
|
</div>
|
|
1488
1404
|
</div>`;
|
|
1489
1405
|
}
|
|
@@ -1495,7 +1411,7 @@ function quadrant(findings) {
|
|
|
1495
1411
|
// keeps the house sentence case ('Register' / 'Common-law') and never wraps mid-word.
|
|
1496
1412
|
function keyRow(f, recordsByUri) {
|
|
1497
1413
|
const on = isOnField(f);
|
|
1498
|
-
const kn = on ?
|
|
1414
|
+
const kn = on ? QC.onField : QC.secondary; // matches this row's quadrant marker — light ramp, see quadrant()
|
|
1499
1415
|
const kc = on ? 'med' : 'low';
|
|
1500
1416
|
const cls = [...new Set((f.owner?.registrations || []).flatMap((r) => Array.isArray(r.classes) ? r.classes : []))]
|
|
1501
1417
|
.map(Number).filter((x) => !Number.isNaN(x)).sort((a, b) => a - b).join('/');
|
|
@@ -1505,7 +1421,7 @@ function keyRow(f, recordsByUri) {
|
|
|
1505
1421
|
const nrm = (s) => String(s || '').toLowerCase().replace(/[^a-z0-9]+/g, ' ').trim();
|
|
1506
1422
|
const subParts = [];
|
|
1507
1423
|
if (who && nrm(who) !== nrm(f.mark)) subParts.push(esc(who));
|
|
1508
|
-
if (cls) subParts.push(
|
|
1424
|
+
if (cls) subParts.push(R.key.classes(esc(cls)));
|
|
1509
1425
|
if (src) subParts.push(`<span style="white-space:nowrap">${esc(src)}</span>`);
|
|
1510
1426
|
return `<a class="keyrow" href="#c${f.ordinal}"><span class="kn" style="background:${kn}">${f.ordinal}</span><span class="kw"><span class="cm-mark">${esc(f.mark)}</span><em>${subParts.join(' · ')}</em></span><span class="kc ${kc}">${chip}</span><span class="arr">→</span></a>`;
|
|
1511
1427
|
}
|
|
@@ -1538,11 +1454,11 @@ function keyPanel(findings, recordsByUri = new Map()) {
|
|
|
1538
1454
|
// the main driver of the key-panel height (doc-54 whitespace). Geographic regions: only the top
|
|
1539
1455
|
// (highest-risk) region opens; the rest collapse (doc-55).
|
|
1540
1456
|
const clBlock = clGroup
|
|
1541
|
-
? `<p class="keyhint" style="margin-top:10px"
|
|
1457
|
+
? `<p class="keyhint" style="margin-top:10px">${R.key.commonLawHint(`<a href="#common-law">${esc(R.key.commonLawSectionLink)}</a>`)}</p>${detail(clGroup, R.key.commonLawGroup, `<span style="white-space:nowrap">${R.key.unregisteredUse}</span>`, true)}`
|
|
1542
1458
|
: '';
|
|
1543
1459
|
return `<div class="panel keypanel">
|
|
1544
|
-
<div class="label"
|
|
1545
|
-
<p class="keyhint"
|
|
1460
|
+
<div class="label">${R.key.title}</div>
|
|
1461
|
+
<p class="keyhint">${R.key.hint}</p>
|
|
1546
1462
|
${groups}${clBlock}
|
|
1547
1463
|
</div>`;
|
|
1548
1464
|
}
|
|
@@ -1564,7 +1480,7 @@ function commonLawSection(clSecondary, clOnField, cardFor, recordsByUri = new Ma
|
|
|
1564
1480
|
// Nothing is lost with it: the cards it linked to sit directly below.
|
|
1565
1481
|
if (!clSecondary.length && !clOnField.length) return '';
|
|
1566
1482
|
const links = clOnField.length
|
|
1567
|
-
? `<p class="clx" style="margin:4px 0 10px;font-size:13.5px"
|
|
1483
|
+
? `<p class="clx" style="margin:4px 0 10px;font-size:13.5px">${R.onFieldCommonLaw}${clOnField.map(f => `<a href="#c${f.ordinal}">#${f.ordinal} ${esc(f.mark)}</a>`).join(' · ')}</p>`
|
|
1568
1484
|
: '';
|
|
1569
1485
|
const cards = clSecondary.map(f => compactCard(f, cardFor(f), recordsByUri)).join('\n ');
|
|
1570
1486
|
return links + cards;
|
|
@@ -1577,7 +1493,7 @@ function secondaryRegions(findings, cardFor, recordsByUri = new Map()) {
|
|
|
1577
1493
|
return groupByRegion(findings).map(g => {
|
|
1578
1494
|
const kc = g.hasOnField ? 'med' : 'low';
|
|
1579
1495
|
const cards = g.findings.map(f => compactCard(f, cardFor(f), recordsByUri)).join('\n ');
|
|
1580
|
-
return `<details class="rgroup"><summary><span class="rcode">${esc(g.code)}</span><span class="gname">${esc(g.name)}</span><span class="kc ${kc}">${g.chip}</span><span class="gsub">${esc(cap(registrationSystem(g.code) ?? ''))}</span><span class="gcount">${
|
|
1496
|
+
return `<details class="rgroup"><summary><span class="rcode">${esc(g.code)}</span><span class="gname">${esc(g.name)}</span><span class="kc ${kc}">${g.chip}</span><span class="gsub">${esc(cap(registrationSystem(g.code) ?? ''))}</span><span class="gcount">${R.marks(g.count)}</span></summary><div class="gbody">${cards}</div></details>`;
|
|
1581
1497
|
}).join('\n ');
|
|
1582
1498
|
}
|
|
1583
1499
|
|
|
@@ -1634,7 +1550,7 @@ function meters(f) {
|
|
|
1634
1550
|
const order = ['mark_similarity', 'goods_proximity', 'use', 'enforcer'];
|
|
1635
1551
|
return `<div class="meters">${order.map(name => {
|
|
1636
1552
|
const m = meter(name, f.meters?.[name]);
|
|
1637
|
-
return `<div class="meter"><div class="ml">${m.label}</div><div class="pips ${m.cls}"><i></i><i></i><i></i></div><div class="mv">${esc(m.cap)}</div>${m.ev ? `<div class="mev"
|
|
1553
|
+
return `<div class="meter"><div class="ml">${m.label}</div><div class="pips ${m.cls}"><i></i><i></i><i></i></div><div class="mv">${esc(m.cap)}</div>${m.ev ? `<div class="mev">${esc(R.evidence(m.ev))}</div>` : ''}</div>`;
|
|
1638
1554
|
}).join('')}</div>`;
|
|
1639
1555
|
}
|
|
1640
1556
|
|
|
@@ -1864,7 +1780,7 @@ function fullDetail(f, card, recordsByUri = new Map()) {
|
|
|
1864
1780
|
// how a FINDING was established, and there is no finding here. Nothing was found, and that is the
|
|
1865
1781
|
// whole of what the line has to say.
|
|
1866
1782
|
const useChk = cite(useSrc, 'Use checked.', isUseCheckNoResult(f.use_check?.source) ? null : useStatus);
|
|
1867
|
-
const ownR = cite(f.own_rights?.source, '
|
|
1783
|
+
const ownR = cite(f.own_rights?.source, "Search of the client's own marks.", EVIDENCE_LABEL[f.own_rights?._status]); // owner, 2026-11-18
|
|
1868
1784
|
const proseFull = cardBlock(card, /^full detail/i);
|
|
1869
1785
|
const proseFullShown = proseFull; // one report: the full prose; portal-report strips serve-time chrome, never analysis
|
|
1870
1786
|
const internalNote = cardBlock(card, /^full detail/i) ? '' : ''; // internal notes ride ::p:: inside prose
|
|
@@ -1918,7 +1834,7 @@ function fullDetail(f, card, recordsByUri = new Map()) {
|
|
|
1918
1834
|
// already carries an "If enforced" bullet (the reasoned read wins — the enfLine dedupe pattern).
|
|
1919
1835
|
const proseHasImpact = /(^|\n)\s*-\s*(\*\*)?\s*If enforced\b/i.test(proseFull || '');
|
|
1920
1836
|
const impactLine = (f.impact && !proseHasImpact)
|
|
1921
|
-
? `<li><b>If enforced:</b> ${esc(f.impact)} — for the client to consider
|
|
1837
|
+
? `<li><b>If enforced:</b> ${esc(f.impact)}</li>` : ''; // its "— for the client to consider." tail is gone (owner, 2026-11-18)
|
|
1922
1838
|
// — THE REASONING LEADS THE DRAWER, and this is where it now lives. legal_position /
|
|
1923
1839
|
// practical_position and the manageable category used to render uncut ABOVE the fold on every card:
|
|
1924
1840
|
// roughly 600 characters of prose per finding before a reader opened anything, while the one sentence
|
|
@@ -1989,8 +1905,8 @@ function cardTitleParts(f, who) {
|
|
|
1989
1905
|
const code = regionCode(f);
|
|
1990
1906
|
const where = code && code !== COMMON_LAW ? (regionName(code) || code) : '';
|
|
1991
1907
|
const tail = [where, classes ? `Class ${classes}` : ''].filter(Boolean).join(' \u00b7 ');
|
|
1992
|
-
const title = `<
|
|
1993
|
-
const ownerLine = who ? `<div class="owner-line"><span class="ok"
|
|
1908
|
+
const title = `<h3 class="who mark-first">${esc(f.mark || who || '')}${tail ? ` <span class="where">\u2014 ${esc(tail)}</span>` : ''}</h3>`;
|
|
1909
|
+
const ownerLine = who ? `<div class="owner-line"><span class="ok">${R.card.owner}</span> ${esc(who)}</div>` : '';
|
|
1994
1910
|
return { title, ownerLine };
|
|
1995
1911
|
}
|
|
1996
1912
|
|
|
@@ -2020,7 +1936,7 @@ function riskChip(f) {
|
|
|
2020
1936
|
// already prints those headings, so the suffix was the section name repeated in engine vocabulary on
|
|
2021
1937
|
// every card in it — and "Adversarial" reads to a client as a claim about the owner's temper.
|
|
2022
1938
|
if (FRAMEWORK && f.composite == null) {
|
|
2023
|
-
if (f.band == null) return
|
|
1939
|
+
if (f.band == null) return R.card.notRatedAwareness;
|
|
2024
1940
|
// A framework that states a method shows its inputs beside the band, in its own labels and order:
|
|
2025
1941
|
// "High · Claim Grade R · Harbour". Every other framework's chip is the band alone.
|
|
2026
1942
|
const line = inputsLine(FRAMEWORK_METHOD, f.inputs);
|
|
@@ -2030,15 +1946,15 @@ function riskChip(f) {
|
|
|
2030
1946
|
// wp50: the internal chip leads with the SAME tier word every other surface uses — the reader can
|
|
2031
1947
|
// match a card against the email/summary at a glance; Level/Composite stays as the legal shorthand.
|
|
2032
1948
|
const tier = CLIENT_TIER_BY_COMPOSITE[f.composite];
|
|
2033
|
-
return `${tier ? `${esc(tier)} · ` : ''}<span class="lv"
|
|
1949
|
+
return `${tier ? `${esc(tier)} · ` : ''}<span class="lv">${R.card.level(esc(f.level))}</span>${R.card.composite(esc(String(f.composite ?? '')))}${esc(dt)}`;
|
|
2034
1950
|
}
|
|
2035
1951
|
// The one-liner fallback (model "- one:" absent): plain client words, reviewer shorthand internally.
|
|
2036
1952
|
function oneFallback(f, who) {
|
|
2037
1953
|
if (FRAMEWORK && f.composite == null) {
|
|
2038
|
-
const head = f.band != null ?
|
|
1954
|
+
const head = f.band != null ? R.card.bandRisk(f.band) : R.card.notRatedCommercial;
|
|
2039
1955
|
return `${head}.${who && who !== f.mark ? ` ${who}.` : ''}`;
|
|
2040
1956
|
}
|
|
2041
|
-
return `${CLIENT_TIER_BY_COMPOSITE[f.composite] ?? ''
|
|
1957
|
+
return `${R.card.tierRisk(CLIENT_TIER_BY_COMPOSITE[f.composite] ?? '', f.level, f.composite, humanize(f.dispute_type))}${who && who !== f.mark ? ` ${who}.` : ''}`;
|
|
2042
1958
|
}
|
|
2043
1959
|
|
|
2044
1960
|
// P5 (charter 2026-07-30, Reviewer §L) — the legal/practical SPLIT: the legal read (the one the band's
|
|
@@ -2065,7 +1981,7 @@ function lpSplit(f) {
|
|
|
2065
1981
|
const legal = inline(String(f.legal_position ?? '').trim()).trim();
|
|
2066
1982
|
const practical = inline(String(f.practical_position ?? '').trim()).trim();
|
|
2067
1983
|
if (!legal && !practical) return '';
|
|
2068
|
-
return `<div class="lp-split">${legal ? lpPara(
|
|
1984
|
+
return `<div class="lp-split">${legal ? lpPara(R.card.legalRisk, legal) : ''}${practical ? lpPara(R.card.practicalPosition, practical) : ''}</div>`;
|
|
2069
1985
|
}
|
|
2070
1986
|
// P5 (Reviewer §L) — WHY a notable finding is manageable: the closed category + the stated reason
|
|
2071
1987
|
// (promote-or-omit; a category-less manageable finding is a lint flag upstream). Absent ⇒ ''.
|
|
@@ -2117,16 +2033,16 @@ function findingCard(f, card, recordsByUri = new Map()) {
|
|
|
2117
2033
|
// `clause` block above for what replaced the defence it was providing.
|
|
2118
2034
|
const one = clause(f.net) || (card?.meta?.one) || oneFallback(f, who);
|
|
2119
2035
|
const readProse = cardBlock(card, /^the read$/i);
|
|
2120
|
-
const read = readProse ? `<details class="drill read" open><summary
|
|
2036
|
+
const read = readProse ? `<details class="drill read" open><summary>${R.card.theRead}</summary><div class="drillbody lead">${renderProse(readProse)}</div></details>` : '';
|
|
2121
2037
|
return `<div class="card" id="c${f.ordinal}">
|
|
2122
2038
|
<div class="top">
|
|
2123
2039
|
<div class="rail ${tierCls}"></div>
|
|
2124
2040
|
<div class="body">
|
|
2125
2041
|
<div class="cardhead">
|
|
2126
|
-
<label class="pick no-print"><input type="checkbox" class="pickbox" checked></label>
|
|
2042
|
+
<label class="pick no-print"><input type="checkbox" class="pickbox" checked aria-label="${R.card.includeInPdf(f.ordinal)}"></label>
|
|
2127
2043
|
<span class="fnum">${f.ordinal}</span>${cardTitleParts(f, who).title}${evidenceChips(f)}
|
|
2128
2044
|
<span class="tier ${tierCls}">${riskChip(f)}</span>
|
|
2129
|
-
<button class="ask-fi no-print"
|
|
2045
|
+
<button class="ask-fi no-print">${R.card.askAi}</button>
|
|
2130
2046
|
</div>
|
|
2131
2047
|
${cardTitleParts(f, who).ownerLine}
|
|
2132
2048
|
<div class="oneline">${inline(sentenceCaseLead(one))}</div>
|
|
@@ -2152,7 +2068,7 @@ function compactCard(f, card, recordsByUri = new Map()) {
|
|
|
2152
2068
|
const markChip = markClassChip(f, who);
|
|
2153
2069
|
return `<div class="card compact" id="c${f.ordinal}">
|
|
2154
2070
|
<div class="top"><div class="rail low"></div><div class="body">
|
|
2155
|
-
<div class="cardhead"><label class="pick no-print"><input type="checkbox" class="pickbox" checked></label><span class="fnum">${f.ordinal}</span>${cardTitleParts(f, who).title}${evidenceChips(f)}<span class="tier low">${riskChip(f)}</span><button class="ask-fi no-print"
|
|
2071
|
+
<div class="cardhead"><label class="pick no-print"><input type="checkbox" class="pickbox" checked aria-label="${R.card.includeInPdf(f.ordinal)}"></label><span class="fnum">${f.ordinal}</span>${cardTitleParts(f, who).title}${evidenceChips(f)}<span class="tier low">${riskChip(f)}</span><button class="ask-fi no-print">${R.card.askAi}</button></div>${cardTitleParts(f, who).ownerLine}
|
|
2156
2072
|
<div class="oneline">${inline(sentenceCaseLead(one))}</div>
|
|
2157
2073
|
</div></div>
|
|
2158
2074
|
${fullDetail(f, card, recordsByUri)}
|
|
@@ -2168,7 +2084,7 @@ const COV_STATE = {
|
|
|
2168
2084
|
'confirmed-clean': { cls: 'ok', ic: '✓', word: 'Searched — clean' },
|
|
2169
2085
|
'coverage-limited': { cls: 'todo', ic: '→', word: 'Partially covered' },
|
|
2170
2086
|
open: { cls: 'todo', ic: '→', word: 'Open item' },
|
|
2171
|
-
'not-searched': { cls: 'todo', ic: '→', word: 'Not run this run
|
|
2087
|
+
'not-searched': { cls: 'todo', ic: '→', word: 'Not searched' }, // owner, 2026-11-18: it read "Not run this run"
|
|
2172
2088
|
note: { cls: 'info', ic: 'i', word: 'Note' },
|
|
2173
2089
|
};
|
|
2174
2090
|
/**
|
|
@@ -2250,9 +2166,26 @@ function dedupeFollowUps(coverage) {
|
|
|
2250
2166
|
});
|
|
2251
2167
|
}
|
|
2252
2168
|
|
|
2169
|
+
// A REPORT WHOSE ASSESSMENT DID NOT COMPLETE STATES A SHARED NOTE ONCE (owner, 2026-11-18). Its grid is the page's whole
|
|
2170
|
+
// body, and most of its rows carry the one fallback note, so the page was one lower-case sentence many times over
|
|
2171
|
+
// (17 on the measured run). Rows of one state that share a note are one cell: the note once, its first letter
|
|
2172
|
+
// capitalised, then the searches it covers. A row with a note of its own renders as it always did, and the group's
|
|
2173
|
+
// count still counts every row.
|
|
2174
|
+
function sharedNoteCells(rows, cell) {
|
|
2175
|
+
const byNote = new Map();
|
|
2176
|
+
for (const r of rows) { const k = String(r.note ?? ''); byNote.set(k, [...(byNote.get(k) ?? []), r]); }
|
|
2177
|
+
return [...byNote.values()].map((same) => {
|
|
2178
|
+
if (same.length < 2) return cell(same[0]);
|
|
2179
|
+
const s = COV_STATE[same[0].state] || COV_STATE.note;
|
|
2180
|
+
return `<div class="covcell ${s.cls}"><div class="ck">${s.ic}</div><div><div class="ct">${inline(cap(same[0].note || ''))}</div>`
|
|
2181
|
+
+ `<ul class="covlist">${same.map((r) => `<li>${esc(cap(readerRowHead(r.area)))}</li>`).join('')}</ul></div></div>`;
|
|
2182
|
+
});
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2253
2185
|
// `verdict: false` — a report whose overall assessment was not completed has no verdict above the grid, so the open
|
|
2254
2186
|
// rows' lead line, which says the material ones are carried in it, is not printed. The rows are.
|
|
2255
|
-
|
|
2187
|
+
// Exported for the Knockout's own Left open grid (render-knockout.mjs): one grid, in the clearance's words, on both pages.
|
|
2188
|
+
export function coverageGrid(coverage, { verdict = true } = {}) {
|
|
2256
2189
|
coverage = dedupeFollowUps(coverage);
|
|
2257
2190
|
if (!coverage.length) return '';
|
|
2258
2191
|
const cell = (c) => {
|
|
@@ -2263,15 +2196,20 @@ function coverageGrid(coverage, { verdict = true } = {}) {
|
|
|
2263
2196
|
// mark that does not exist, inside the report that clears it. Measured across the nine delivered
|
|
2264
2197
|
// runs in the pool, `coverage[]` carries no axis identifier at all; the ones that leaked were the
|
|
2265
2198
|
// coverage_judgment rows, which now carry a driver-emitted `areaLabel` and fold through it.
|
|
2266
|
-
return `<div class="covcell ${s.cls}"><div class="ck">${s.ic}</div><div><div class="ct">${esc(cap(c.area))}${tag}</div><div class="cd">${
|
|
2199
|
+
return `<div class="covcell ${s.cls}"><div class="ck">${s.ic}</div><div><div class="ct">${esc(cap(readerRowHead(c.area)))}${tag}</div><div class="cd">${inline(c.note || '')}</div></div></div>`;
|
|
2267
2200
|
};
|
|
2268
2201
|
const covered = coverage.filter(c => c.state === 'confirmed-clean');
|
|
2269
2202
|
const rest = coverage.filter(c => c.state !== 'confirmed-clean');
|
|
2270
2203
|
const parts = [];
|
|
2271
2204
|
if (covered.length) parts.push(`<div class="cov">${covered.map(cell).join('')}</div>`);
|
|
2205
|
+
// THE OPEN ROWS GROUP UNDER THEIR STATE WORDS, EACH WITH ITS COUNT (owner, 2026-11-18). A report could list 23 to 65
|
|
2206
|
+
// open rows that all looked alike, so a lawyer read every one to find which bore on the advice. Every row stays,
|
|
2207
|
+
// and stays as it was; the groups take the states' own words, in the order the states are declared above.
|
|
2208
|
+
const groups = Object.keys(COV_STATE).map((state) => [state, rest.filter((c) => (COV_STATE[c.state] ? c.state : 'note') === state)])
|
|
2209
|
+
.filter(([, rows]) => rows.length);
|
|
2272
2210
|
if (rest.length) parts.push(
|
|
2273
|
-
(verdict ? `<p class="covnext"><b>Next steps & monitoring</b
|
|
2274
|
-
+ `<div class="cov">${
|
|
2211
|
+
(verdict ? `<p class="covnext"><b>Next steps & monitoring</b></p>` : '') // the head alone (owner, 2026-11-18)
|
|
2212
|
+
+ groups.map(([state, rows]) => `<div class="covgrp"><div class="covgh">${esc(COV_STATE[state].word)} <span class="covgn">(${rows.length})</span></div><div class="cov">${(verdict ? rows.map(cell) : sharedNoteCells(rows, cell)).join('')}</div></div>`).join(''));
|
|
2275
2213
|
return parts.join('');
|
|
2276
2214
|
}
|
|
2277
2215
|
|
|
@@ -2295,26 +2233,21 @@ function method(_text) {
|
|
|
2295
2233
|
// controls and rendered nothing without them, so took it with them.
|
|
2296
2234
|
|
|
2297
2235
|
|
|
2298
|
-
//
|
|
2299
|
-
//
|
|
2300
|
-
// + the shared floating-nav CSS, with a report-only override: the report already has a sticky .topbar at
|
|
2236
|
+
// The report's base sheet (brand tokens + report.css) and its print rule are the page shell's (page-shell.mjs);
|
|
2237
|
+
// this file adds the shared floating-nav CSS, with a report-only override: the report already has a sticky .topbar at
|
|
2301
2238
|
// top:0, so the cross-page nav renders STATIC (a band above it that scrolls away) — two stacked sticky bars
|
|
2302
2239
|
// would overlap. Internal report only (stripped on the client export, like every internal control).
|
|
2303
2240
|
// The report wraps the cross-page nav + its own action bar in ONE sticky container (.rep-stickyhead), so
|
|
2304
2241
|
// the nav no longer scrolls away while the topbar stays (the "nav disappears on scroll" bug). Inside the
|
|
2305
2242
|
// wrapper the nav is static and drops its own shadow — the wrapper/topbar border provides the separation.
|
|
2306
2243
|
// The report's CSS in three parts so the INTERNAL report can LINK the shared chrome instead of inlining it
|
|
2307
|
-
// (D — <pool>/assets/chrome.css, written by regenIndex):
|
|
2244
|
+
// (D — <pool>/assets/chrome.css, written by regenIndex): the shell's base sheet + REP_OVERRIDE stay
|
|
2308
2245
|
// inline on every variant; NAV_SHEET (the shared nav/toggle/fab chrome) is inlined on the client export (a
|
|
2309
2246
|
// portable, self-contained deliverable) but LINKED on the internal report so a chrome tweak reaches every
|
|
2310
2247
|
// already-published internal report on the next view with no re-render. The <link> is emitted AFTER the inline
|
|
2311
2248
|
// <style> so the cascade order (chrome after report.css, as today) is identical to the all-inline export.
|
|
2312
|
-
const REPORT_BASE = REPORT_ROOT + '\n' + readFileSync(join(HERE, 'templates', 'report.css'), 'utf8');
|
|
2313
2249
|
const NAV_SHEET = NAV_CSS;
|
|
2314
2250
|
const REP_OVERRIDE = '.rep-stickyhead .sitenav{position:static;box-shadow:none;border-bottom:none;background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none}';
|
|
2315
|
-
// Print always renders light: re-assert the REPORT_ROOT light tokens under [data-theme=dark] inside @media
|
|
2316
|
-
// print (a dark-toggled report must never print on near-black — ink/banding + legal-document convention).
|
|
2317
|
-
const PRINT_LIGHT = '\n@media print{' + REPORT_ROOT.replace(':root{', ':root[data-theme="dark"]{color-scheme:light;') + '}';
|
|
2318
2251
|
const PAGE_JS = `var _hidden=[];
|
|
2319
2252
|
function exportPDF(){_hidden=[];document.querySelectorAll('.card').forEach(function(card){var cb=card.querySelector('input.pickbox');if(cb&&!cb.checked){card.classList.add('print-hidden');_hidden.push(card);}});window.print();}
|
|
2320
2253
|
function pickAll(v){document.querySelectorAll('input.pickbox').forEach(function(cb){cb.checked=v;});}
|
|
@@ -2326,7 +2259,7 @@ function openAll(v){document.querySelectorAll('details.drill,details.method,deta
|
|
|
2326
2259
|
// deep-link load; non-card #-links (#common-law) fall through to native nav.
|
|
2327
2260
|
function _cardReveal(el){var p=el.parentElement;while(p){if(p.tagName==='DETAILS'&&!p.open)p.open=true;p=p.parentElement;}}
|
|
2328
2261
|
function _cardHashGo(){var id=location.hash.slice(1);if(id.charAt(0)!=='c'||!/^[0-9]+$/.test(id.slice(1)))return;var el=document.getElementById(id);if(!el)return;_cardReveal(el);el.scrollIntoView({block:'start'});}
|
|
2329
|
-
document.addEventListener('click',function(e){var a=e.target.closest?e.target.closest('a[href^="#c"]'):null;if(!a)return;var id=(a.getAttribute('href')||'').slice(1);if(id.charAt(0)!=='c'||!/^[0-9]+$/.test(id.slice(1)))return;var el=document.getElementById(id);if(!el)return;_cardReveal(el);e.preventDefault();try{if(history.replaceState)history.replaceState(null,'','#'+id);}catch(err){}el.scrollIntoView({behavior:'smooth',block:'start'});});
|
|
2262
|
+
document.addEventListener('click',function(e){var a=e.target.closest?e.target.closest('a[href^="#c"]'):null;if(!a)return;var id=(a.getAttribute('href')||'').slice(1);if(id.charAt(0)!=='c'||!/^[0-9]+$/.test(id.slice(1)))return;var el=document.getElementById(id);if(!el)return;_cardReveal(el);e.preventDefault();try{if(history.replaceState)history.replaceState(null,'','#'+id);}catch(err){}el.scrollIntoView({behavior:(window.matchMedia&&matchMedia('(prefers-reduced-motion: reduce)').matches)?'auto':'smooth',block:'start'});});
|
|
2330
2263
|
window.addEventListener('hashchange',_cardHashGo);
|
|
2331
2264
|
window.addEventListener('load',_cardHashGo);
|
|
2332
2265
|
window.addEventListener('beforeprint',function(){document.querySelectorAll('details').forEach(function(d){d.dataset.o=d.open?'1':'';d.open=true;});});
|
|
@@ -2351,14 +2284,14 @@ ${EXPORT_MENU_JS}`;
|
|
|
2351
2284
|
function markAssessmentBlock(ma) {
|
|
2352
2285
|
if (ma == null) return '';
|
|
2353
2286
|
const structured = typeof ma.distinctiveness === 'object' || typeof ma.connotation === 'object';
|
|
2354
|
-
const SEC = `<div class="sec"><span class="num"></span><h2
|
|
2287
|
+
const SEC = `<div class="sec"><span class="num"></span><h2>${R.markItself.title}</h2></div>`;
|
|
2355
2288
|
if (!structured) {
|
|
2356
2289
|
const dist = String(ma?.distinctiveness ?? '').trim(), conn = String(ma?.connotation ?? '').trim();
|
|
2357
2290
|
if (!dist && !conn) return '';
|
|
2358
2291
|
return `${SEC}
|
|
2359
2292
|
<div class="markassess">
|
|
2360
|
-
${dist ? `<p><strong
|
|
2361
|
-
${conn ? `<p><strong
|
|
2293
|
+
${dist ? `<p><strong>${R.markItself.distinctiveness}</strong> ${esc(dist)}</p>` : ''}
|
|
2294
|
+
${conn ? `<p><strong>${esc(R.markItself.connotation)}</strong> ${esc(conn)}</p>` : ''}
|
|
2362
2295
|
</div>`;
|
|
2363
2296
|
}
|
|
2364
2297
|
const lead = (v) => {
|
|
@@ -2367,16 +2300,16 @@ function markAssessmentBlock(ma) {
|
|
|
2367
2300
|
const dot = (s) => { const t = String(s ?? '').trim(); return t ? (/[.!?…]$/.test(t) ? t : `${t}.`) : ''; };
|
|
2368
2301
|
const out = (typeof v.read === 'string' && v.read.trim())
|
|
2369
2302
|
? dot(v.read)
|
|
2370
|
-
: [dot(v.spectrum), dot(v.acquired &&
|
|
2303
|
+
: [dot(v.spectrum), dot(v.acquired && R.markItself.acquired(String(v.acquired).trim().replace(/[.\s]+$/, ''))), dot(v.note)].filter(Boolean).join(' ');
|
|
2371
2304
|
return out ? out.charAt(0).toUpperCase() + out.slice(1) : '';
|
|
2372
2305
|
};
|
|
2373
2306
|
const cmRows = [], crRows = [];
|
|
2374
2307
|
for (const v of [ma.distinctiveness, ma.connotation]) {
|
|
2375
2308
|
if (!v || typeof v !== 'object') continue;
|
|
2376
|
-
for (const r of Array.isArray(v.per_class) ? v.per_class : []) cmRows.push(`<li><b
|
|
2377
|
-
for (const r of Array.isArray(v.per_market) ? v.per_market : []) cmRows.push(`<li><b>${esc(r.market)}.</b> ${
|
|
2309
|
+
for (const r of Array.isArray(v.per_class) ? v.per_class : []) cmRows.push(`<li><b>${R.markItself.perClass(esc(String(r.class)))}</b> ${inline(r.note)}</li>`);
|
|
2310
|
+
for (const r of Array.isArray(v.per_market) ? v.per_market : []) cmRows.push(`<li><b>${esc(r.market)}.</b> ${inline(r.note)}</li>`);
|
|
2378
2311
|
for (const r of Array.isArray(v.counter_registrations) ? v.counter_registrations : []) {
|
|
2379
|
-
crRows.push(`<li><b>${esc(r.mark || r.uri || '')}</b>${r.owner ? ` — ${esc(r.owner)}` : ''}${r.note ? ` — ${
|
|
2312
|
+
crRows.push(`<li><b>${esc(r.mark || r.uri || '')}</b>${r.owner ? ` — ${esc(r.owner)}` : ''}${r.note ? ` — ${inline(r.note)}` : ''}</li>`);
|
|
2380
2313
|
}
|
|
2381
2314
|
}
|
|
2382
2315
|
const dist = lead(ma.distinctiveness), conn = lead(ma.connotation);
|
|
@@ -2384,10 +2317,10 @@ function markAssessmentBlock(ma) {
|
|
|
2384
2317
|
const toggle = (label, rows) => rows.length ? `<details class="ma-more"><summary>${label} (${rows.length})</summary><ul class="ma-rows">${rows.join('')}</ul></details>` : '';
|
|
2385
2318
|
return `${SEC}
|
|
2386
2319
|
<div class="markassess">
|
|
2387
|
-
${dist ? `<p><strong
|
|
2388
|
-
${conn ? `<p><strong
|
|
2389
|
-
${toggle(
|
|
2390
|
-
${toggle(
|
|
2320
|
+
${dist ? `<p><strong>${R.markItself.distinctiveness}</strong> ${esc(dist)}</p>` : ''}
|
|
2321
|
+
${conn ? `<p><strong>${esc(R.markItself.connotation)}</strong> ${esc(conn)}</p>` : ''}
|
|
2322
|
+
${toggle(R.markItself.byClassAndMarket, cmRows)}
|
|
2323
|
+
${toggle(R.markItself.registrationsConsidered, crRows)}
|
|
2391
2324
|
</div>`;
|
|
2392
2325
|
}
|
|
2393
2326
|
|
|
@@ -2397,12 +2330,7 @@ function markAssessmentBlock(ma) {
|
|
|
2397
2330
|
// with the basis as a quiet tail. It NEVER carries a verdict sentence of its own — riskStatement()
|
|
2398
2331
|
// stays the single assembler; this panel decomposes it, never competes with it. Absent (every
|
|
2399
2332
|
// archived run) ⇒ '' ⇒ byte-identical hero.
|
|
2400
|
-
const FOUR_ANSWER_LABELS =
|
|
2401
|
-
['third_party_rights', 'Third-party rights'],
|
|
2402
|
-
['objection_likelihood', 'Likelihood of objection'],
|
|
2403
|
-
['registrability', 'Registrability'],
|
|
2404
|
-
['client_enforceability', 'Your own enforceability'],
|
|
2405
|
-
];
|
|
2333
|
+
const FOUR_ANSWER_LABELS = Object.entries(R.rating.fourAnswers);
|
|
2406
2334
|
// CLIENT SAFETY (review 2026-07-31, blocking): read / basis / obstacles[].note are model-authored free
|
|
2407
2335
|
// strings and route through inline() with every other reader-facing string on this page (see lpSplit).
|
|
2408
2336
|
// The tokens and the class numbers are closed/typed values — esc() is right for those. A read that was
|
|
@@ -2421,7 +2349,7 @@ function contextNotesList(notes = []) {
|
|
|
2421
2349
|
// the findings-section assembly below.
|
|
2422
2350
|
function contextNotesBlock(notes = []) {
|
|
2423
2351
|
if (!notes.length) return '';
|
|
2424
|
-
return `<div class="sec"><span class="num"></span><h2
|
|
2352
|
+
return `<div class="sec"><span class="num"></span><h2>${R.famousNeighbours}</h2></div>
|
|
2425
2353
|
${contextNotesList(notes)}`;
|
|
2426
2354
|
}
|
|
2427
2355
|
|
|
@@ -2534,8 +2462,7 @@ export function demoBannerHtml(isDemo) {
|
|
|
2534
2462
|
+ 'border-radius:6px;background:#fffbeb;color:#3f2d0b;font-size:13px;line-height:1.45;'
|
|
2535
2463
|
+ '-webkit-print-color-adjust:exact;print-color-adjust:exact;';
|
|
2536
2464
|
return `<div style="${box}" role="note">`
|
|
2537
|
-
+
|
|
2538
|
-
+ 'The register records, the searches behind them and the risk assessment are real.'
|
|
2465
|
+
+ `<b>${R.demoBanner.title}</b> ${R.demoBanner.text}`
|
|
2539
2466
|
+ '</div>';
|
|
2540
2467
|
}
|
|
2541
2468
|
|
|
@@ -2560,8 +2487,8 @@ function depthStripHtml(note) {
|
|
|
2560
2487
|
// THE BOARD'S FIVE ENTRIES, in its order. The rule that filters them lives in shared/brand.mjs, because
|
|
2561
2488
|
// the knockout renderer draws a strip from its own board and the filtering is the half worth having once.
|
|
2562
2489
|
const STRIP = Object.freeze([
|
|
2563
|
-
['summary', 'Summary'], ['findings', 'Findings'], ['also-considered', 'Also considered'],
|
|
2564
|
-
['
|
|
2490
|
+
['summary', 'Summary'], ['next', 'Next steps'], ['findings', 'Findings'], ['also-considered', 'Also considered'],
|
|
2491
|
+
['searched', 'What was searched'],
|
|
2565
2492
|
]);
|
|
2566
2493
|
|
|
2567
2494
|
export function renderHtml(parsed, findings = [], coverage = [], opts = {}) {
|
|
@@ -2668,7 +2595,7 @@ export function renderHtml(parsed, findings = [], coverage = [], opts = {}) {
|
|
|
2668
2595
|
const riskLabel = VERDICT_INFO ? (VERDICT_INFO.tier || TIER_STOP_PILL[i]) : RISK_STOPS[i].toUpperCase();
|
|
2669
2596
|
|
|
2670
2597
|
// Excel/audit download — lives inside the topbar Export popover (portal-report strips the link at serve time for non-staff).
|
|
2671
|
-
const excelBtn2 = !hrefAttr(opts.auditFile, { relative: true }) ? '' : `<a class="util" href="${hrefAttr(opts.auditFile, { relative: true })}" download>⬇
|
|
2598
|
+
const excelBtn2 = !hrefAttr(opts.auditFile, { relative: true }) ? '' : `<a class="util" href="${hrefAttr(opts.auditFile, { relative: true })}" download>⬇ ${R.topbar.downloadAudit}</a>`;
|
|
2672
2599
|
|
|
2673
2600
|
const cardFor = f => matchCard(f, cards);
|
|
2674
2601
|
const recordsByUri = opts.recordsByUri || new Map(); // Instance #6 — the run's _records/ set (publishReport loads it)
|
|
@@ -2778,40 +2705,24 @@ export function renderHtml(parsed, findings = [], coverage = [], opts = {}) {
|
|
|
2778
2705
|
covNum = num();
|
|
2779
2706
|
}
|
|
2780
2707
|
|
|
2781
|
-
//
|
|
2782
|
-
//
|
|
2783
|
-
//
|
|
2784
|
-
// EXPLICIT ONLY. This said "full gating: dark block WITH the @media auto-dark +
|
|
2785
|
-
// the OS-aware init", and that predates the client-surface ruling. A clearance report is the product's
|
|
2786
|
-
// most client-facing artefact — it is opened in front of a client, and the portal frames it for one —
|
|
2787
|
-
// and a client surface must never follow the OS colour preference. It went dark on a dark-mode laptop,
|
|
2788
|
-
// as a delivered legal document, on the standalone file AND framed in the portal, because the shell
|
|
2789
|
-
// does not strip the rule.
|
|
2790
|
-
//
|
|
2791
|
-
// The knockout renderer already took the explicit pair; the two report lanes disagreed and the wrong
|
|
2792
|
-
// one was the bigger deliverable. Dark is still fully reachable, by the toggle and by a choice carried
|
|
2793
|
-
// from any other surface — this removes the automatic part only.
|
|
2794
|
-
const darkCss = REPORT_ROOT_DARK_EXPLICIT;
|
|
2795
|
-
const themeInitScript = THEME_INIT_EXPLICIT;
|
|
2708
|
+
// The explicit dark pair, the typefaces, the favicon, the base sheet and the print rule are the shell's
|
|
2709
|
+
// (page-shell.mjs, which says why the dark pair is explicit only).
|
|
2796
2710
|
// D: the report LINKS the shared chrome (opts.chromeHref → <pool>/assets/chrome.css); direct callers with
|
|
2797
2711
|
// no chromeHref keep it inline. Link emitted after the <style> so chrome stays last in the cascade.
|
|
2798
2712
|
const linkChrome = !!opts.chromeHref;
|
|
2799
|
-
const
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
${REPORT_FONT_STYLE}${FAVICON_LINK}${themeInitScript}
|
|
2805
|
-
<style>${cssInline}${darkCss}${PRINT_LIGHT}</style>${chromeLinkTag}</head><body class="has-glow">
|
|
2806
|
-
<div class="rep-stickyhead no-print">
|
|
2713
|
+
const doc = pageShell({
|
|
2714
|
+
title: `${productName ? `${esc(productName)} — ` : ''}${esc(fm.title || '')}`,
|
|
2715
|
+
css: (linkChrome ? '' : NAV_SHEET) + '\n' + REP_OVERRIDE,
|
|
2716
|
+
chromeHref: opts.chromeHref,
|
|
2717
|
+
body: `<div class="rep-stickyhead no-print" data-report-chrome>
|
|
2807
2718
|
<div class="topbar no-print">
|
|
2808
2719
|
${/* ONE BAR (the 2026-09-16 report redesign). The site bar is not rendered on a report, so the brand belongs here:
|
|
2809
2720
|
a reader met two stacked headers, and the lower one carried the only brand. */''}
|
|
2810
2721
|
${logoLockup({ mark: 16, cls: 'tb-lockup' })}
|
|
2811
|
-
${opts.homeHref ? `<a class="homebtn tb-back no-print" href="${escAttr(opts.homeHref)}" title="
|
|
2722
|
+
${opts.homeHref ? `<a class="homebtn tb-back no-print" href="${escAttr(opts.homeHref)}" title="${R.topbar.allReports}"><span aria-hidden="true">←</span> <span class="tb-back-lbl">${R.topbar.allReports}</span></a>` : ''}
|
|
2812
2723
|
<span class="sp"></span>
|
|
2813
|
-
${/* With no assessment there is no rating, and with no rating this pill falls back to the CLEAR stop. */''}${opts.assessmentNotCompleted === true ? '' : `<span class="tb-risk" style="background:var(${STOP_VAR[i]})">${riskLabel}</span>`}
|
|
2814
|
-
<span class="mono tb-matter" style="font-size:11px;color:var(--
|
|
2724
|
+
${/* With no assessment there is no rating, and with no rating this pill falls back to the CLEAR stop. */''}${opts.assessmentNotCompleted === true ? '' : `<span class="tb-risk" style="background:var(${STOP_VAR[i]});color:var(${STOP_VAR[i]}-on)">${riskLabel}</span>`}
|
|
2725
|
+
<span class="mono tb-matter" style="font-size:11px;color:var(--slate)">${esc(fm.matter || opts.runId || '')}${fm.title ? ' / ' + esc(fm.title) : ''}</span>
|
|
2815
2726
|
${/* A DATE, NOT A TIMESTAMP. This read "Issued on 2026-09-17 · 08:36 GMT+2" — the minute the file
|
|
2816
2727
|
was written, and the zone the machine that wrote it happened to be in. Neither tells a reader
|
|
2817
2728
|
anything, and on work that spans days it implies a precision the work does not have. Every mock
|
|
@@ -2820,19 +2731,19 @@ ${REPORT_FONT_STYLE}${FAVICON_LINK}${themeInitScript}
|
|
|
2820
2731
|
there — an archived run's stamp is not this publisher's to assume. */''}
|
|
2821
2732
|
${(() => {
|
|
2822
2733
|
const d = (String(opts.issued ?? '').match(/^\d{4}-\d{2}-\d{2}/) || [])[0] ?? opts.issued;
|
|
2823
|
-
return d ? `<span class="mono tb-issued"><span aria-hidden="true">🗓 </span
|
|
2734
|
+
return d ? `<span class="mono tb-issued"><span aria-hidden="true">🗓 </span>${esc(R.topbar.issuedOn(d))}</span>` : '';
|
|
2824
2735
|
})()}
|
|
2825
|
-
<button type="button" class="tbbtn tb-ask no-print">✦ <span class="tb-lbl"
|
|
2736
|
+
<button type="button" class="tbbtn tb-ask no-print">✦ <span class="tb-lbl">${R.topbar.askAi}</span></button>
|
|
2826
2737
|
<div class="tb-menu">
|
|
2827
2738
|
${EXPORT_TOGGLE}
|
|
2828
2739
|
${exportPopover(`
|
|
2829
|
-
<div class="tb-pop-title"
|
|
2740
|
+
<div class="tb-pop-title">${esc(R.topbar.exportAndAudit)}</div>
|
|
2830
2741
|
<button class="util primary" onclick="exportPDF()">⬇ Export PDF (ticked findings)</button>
|
|
2831
2742
|
${excelBtn2}
|
|
2832
2743
|
<div class="tb-sep"></div>
|
|
2833
|
-
<div class="tb-row"><button class="util" onclick="pickAll(true)"
|
|
2834
|
-
<div class="tb-row"><button class="util" onclick="openAll(true)"
|
|
2835
|
-
<p class="tb-hint"
|
|
2744
|
+
<div class="tb-row"><button class="util" onclick="pickAll(true)">${R.topbar.selectAll}</button><button class="util" onclick="pickAll(false)">${R.topbar.selectNone}</button></div>
|
|
2745
|
+
<div class="tb-row"><button class="util" onclick="openAll(true)">${R.topbar.expandAll}</button><button class="util" onclick="openAll(false)">${R.topbar.collapseAll}</button></div>
|
|
2746
|
+
<p class="tb-hint">${R.topbar.exportHint}</p>
|
|
2836
2747
|
`)}
|
|
2837
2748
|
</div>
|
|
2838
2749
|
</div>
|
|
@@ -2840,6 +2751,7 @@ ${REPORT_FONT_STYLE}${FAVICON_LINK}${themeInitScript}
|
|
|
2840
2751
|
</div>
|
|
2841
2752
|
|
|
2842
2753
|
<div class="wrap">
|
|
2754
|
+
<main>
|
|
2843
2755
|
<!-- doc-52 §1 THE VERDICT — the answer leads: mark · band · one plain "subject to" line · the lawyer's
|
|
2844
2756
|
questions answered · the time-critical alert. Process + coverage detail are below and collapsible. -->
|
|
2845
2757
|
<header class="hero" id="summary">
|
|
@@ -2853,6 +2765,24 @@ ${REPORT_FONT_STYLE}${FAVICON_LINK}${themeInitScript}
|
|
|
2853
2765
|
${actionGroup(buckets.ans, 'ans')}
|
|
2854
2766
|
</header>
|
|
2855
2767
|
|
|
2768
|
+
<!-- doc-52 §3 WHAT ONLY YOU CAN CLOSE — forward decisions, plain English, directly after the verdict (owner, 2026-11-18:
|
|
2769
|
+
a reader who forwards the first pages forwards the actions with the conditions). Words unchanged. -->
|
|
2770
|
+
${buckets.you ? `<div class="sec" id="next"><span class="num"></span><h2>${R.next.title}</h2></div>
|
|
2771
|
+
<div class="panel actions"><div class="actgrp act-you">${renderProse(buckets.you.body)
|
|
2772
|
+
.replace(/\[Time-critical\]\s*/gi, `<span class="src cl" style="margin-right:6px">${R.next.timeCritical}</span> `)
|
|
2773
|
+
.replace(/\[Open question\]\s*/gi, `<span class="src" style="margin-right:6px">${R.next.openQuestion}</span> `)
|
|
2774
|
+
.replace(/\[Your decision\]\s*/gi, `<span class="src" style="margin-right:6px">${R.next.yourDecision}</span> `)
|
|
2775
|
+
.replace(/\[Monitor\]\s*/gi, `<span class="src" style="margin-right:6px">${R.next.monitor}</span> `)
|
|
2776
|
+
// — the fifth token. `filing-routine` was schema-valid and unreachable until the pipeline's
|
|
2777
|
+
// ADVISORY_TAG gained its fourth entry; without this replace the client reads the literal "[Filing
|
|
2778
|
+
// step]". A run assembled before that lands carries none and this replace is inert on it.
|
|
2779
|
+
.replace(/\[Filing step\]\s*/gi, `<span class="src" style="margin-right:6px">${R.next.filingStep}</span> `)
|
|
2780
|
+
// — the fourth token, and the one whose ABSENCE was the defect: an undated condition carried no
|
|
2781
|
+
// tag at all, so the items that block reliance were the only items in this section with no chip.
|
|
2782
|
+
// buildOnlyYouSection now mints it beside the other three; a run assembled before that lands has none
|
|
2783
|
+
// and this replace is inert on it.
|
|
2784
|
+
.replace(/\[Before you can rely\]\s*/gi, `<span class="src cl" style="margin-right:6px">${R.next.beforeYouCanRely}</span> `)}</div></div>` : ''}
|
|
2785
|
+
|
|
2856
2786
|
<!-- WP-56 B2 — THE MARK ITSELF: the standing distinctiveness + connotation read (EN and non-EN). It
|
|
2857
2787
|
frames everything below, so it sits with the verdict, above the conflict landscape. Advisory only —
|
|
2858
2788
|
carries no rating; legacy runs (no mark_assessment) render without it. Both variants. -->
|
|
@@ -2867,40 +2797,21 @@ ${REPORT_FONT_STYLE}${FAVICON_LINK}${themeInitScript}
|
|
|
2867
2797
|
|
|
2868
2798
|
${alsoConsideredSection(ruledOut, recordsByUri, opts)}
|
|
2869
2799
|
|
|
2870
|
-
<!-- doc-52 §3 WHAT ONLY YOU CAN CLOSE — forward decisions, plain English, after the findings. -->
|
|
2871
|
-
${buckets.you ? `<div class="sec" id="next"><span class="num"></span><h2>What happens next</h2></div>
|
|
2872
|
-
<div class="panel actions"><div class="actgrp act-you">${renderProse(buckets.you.body)
|
|
2873
|
-
.replace(/\[Time-critical\]\s*/gi, '<span class="src cl" style="margin-right:6px">Time-critical</span> ')
|
|
2874
|
-
.replace(/\[Open question\]\s*/gi, '<span class="src" style="margin-right:6px">Open question</span> ')
|
|
2875
|
-
.replace(/\[Your decision\]\s*/gi, '<span class="src" style="margin-right:6px">Your decision</span> ')
|
|
2876
|
-
.replace(/\[Monitor\]\s*/gi, '<span class="src" style="margin-right:6px">Monitor</span> ')
|
|
2877
|
-
// — the fifth token. `filing-routine` was schema-valid and unreachable until the pipeline's
|
|
2878
|
-
// ADVISORY_TAG gained its fourth entry; without this replace the client reads the literal "[Filing
|
|
2879
|
-
// step]". A run assembled before that lands carries none and this replace is inert on it.
|
|
2880
|
-
.replace(/\[Filing step\]\s*/gi, '<span class="src" style="margin-right:6px">Filing step</span> ')
|
|
2881
|
-
// — the fourth token, and the one whose ABSENCE was the defect: an undated condition carried no
|
|
2882
|
-
// tag at all, so the items that block reliance were the only items in this section with no chip.
|
|
2883
|
-
// buildOnlyYouSection now mints it beside the other three; a run assembled before that lands has none
|
|
2884
|
-
// and this replace is inert on it.
|
|
2885
|
-
.replace(/\[Before you can rely\]\s*/gi, '<span class="src cl" style="margin-right:6px">Before you can rely</span> ')}</div></div>` : ''}
|
|
2886
|
-
|
|
2887
2800
|
<!-- The 2026-09-16 report redesign — WHAT WAS SEARCHED. The scope fold and the checks-we-ran narrative are gone
|
|
2888
2801
|
(owner, 2026-09-16: no coverage narrative on the page). What is left is counts, folded closed:
|
|
2889
2802
|
completed work appears as numbers and cleared names, never as the engine's account of itself. -->
|
|
2890
|
-
${whatWasSearchedSection(opts, coverage, findings, recordsByUri)}
|
|
2803
|
+
${whatWasSearchedSection(opts, coverage, findings, recordsByUri, fm)}
|
|
2804
|
+
</main>
|
|
2891
2805
|
|
|
2892
2806
|
<footer>
|
|
2893
2807
|
${/* ONE CLIENT LINE, AND IT NAMES WHAT EACH DATE IS. It ran to four.
|
|
2894
|
-
"Rated under"
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
removed it at serve time. It does now, beside the provenance line, so the document keeps what
|
|
2902
|
-
review needs and the client reads neither. Deleting it here would have taken provenance off
|
|
2903
|
-
the internal copy to fix a leak that belongs in the same place the other one is fixed.
|
|
2808
|
+
"Rated under" and "Run under project" are no longer written (owner, 2026-11-18). They were kept
|
|
2809
|
+
on the document as the reviewer's provenance and stripped from it at serve time, but every
|
|
2810
|
+
reader has reached a report through the portal since the 2026-07-20 cutover, so the lines
|
|
2811
|
+
served nobody and stayed hidden only while a markup-matched strip kept matching. The same facts
|
|
2812
|
+
stay in the run's own front matter (rated_under, run_under_project) and record. portal-report
|
|
2813
|
+
keeps its two strips for stored reports that carry the lines, which are served from their own
|
|
2814
|
+
bytes.
|
|
2904
2815
|
The product name lead goes: the identity line already says which search this is.
|
|
2905
2816
|
The run string is composed as "<date> · <provider>", and it was printed with neither part
|
|
2906
2817
|
labelled, so a bare date sat next to a matter identifier meaning nothing in particular. It is
|
|
@@ -2929,17 +2840,13 @@ ${REPORT_FONT_STYLE}${FAVICON_LINK}${themeInitScript}
|
|
|
2929
2840
|
provider ? esc(provider) : '',
|
|
2930
2841
|
].filter(Boolean);
|
|
2931
2842
|
const line = parts.length ? `${parts.join(' \u00b7 ')}.` : '';
|
|
2932
|
-
|
|
2933
|
-
// Both provenance lines ride BELOW the client line, where portal-report removes them.
|
|
2934
|
-
return line
|
|
2935
|
-
+ (fm.rated_under ? `<br>Rated under: <span class="mono">${esc(fm.rated_under)}</span>.` : '')
|
|
2936
|
-
+ (fm.run_under_project ? `<br>Run under project: <span class="mono">${esc(fm.run_under_project)}</span>.` : '');
|
|
2843
|
+
return line;
|
|
2937
2844
|
})()}</span>
|
|
2938
2845
|
${logoLockup({ mark: 16 })}
|
|
2939
2846
|
</footer>
|
|
2940
2847
|
</div>
|
|
2941
|
-
<script>${PAGE_JS}</script
|
|
2942
|
-
|
|
2848
|
+
<script>${PAGE_JS}</script>`,
|
|
2849
|
+
});
|
|
2943
2850
|
return doc.replace('<!--SECTION-STRIP-->', sectionStrip(doc, STRIP));
|
|
2944
2851
|
}
|
|
2945
2852
|
|
|
@@ -2979,7 +2886,7 @@ function officeRecordCell(uri, regUri, note) {
|
|
|
2979
2886
|
function officeLinkNote() {
|
|
2980
2887
|
if (!RECORD_LINKS) return '';
|
|
2981
2888
|
const linked = [...RECORD_LINKS.values()].some((l) => l?.href);
|
|
2982
|
-
return (linked ?
|
|
2889
|
+
return (linked ? `${LINK_WORDS.opensOfficePage} ` : '')
|
|
2983
2890
|
+ officeReasonSentences(RECORD_LINKS).map((s) => `${esc(s)} `).join('');
|
|
2984
2891
|
}
|
|
2985
2892
|
|
|
@@ -3000,6 +2907,6 @@ export function servedModelsLine(ids) {
|
|
|
3000
2907
|
const list = (Array.isArray(ids) ? ids : []).map((s) => String(s ?? '').trim()).filter(Boolean);
|
|
3001
2908
|
if (!list.length) return '';
|
|
3002
2909
|
const claude = list.every((id) => /^claude-/i.test(id) || CLAUDE_TIER_WORD_RE.test(id));
|
|
3003
|
-
const shown = claude ? list : list.map((id) => (CLAUDE_TIER_WORD_RE.test(id) ?
|
|
3004
|
-
return `<p class="servedby" style="margin:10px 0 0;font-size:13px"
|
|
2910
|
+
const shown = claude ? list : list.map((id) => (CLAUDE_TIER_WORD_RE.test(id) ? R.claudeModel(id) : id));
|
|
2911
|
+
return `<p class="servedby" style="margin:10px 0 0;font-size:13px">${R.preparedWith(claude, shown.map(esc).join(', '))}</p>`;
|
|
3005
2912
|
}
|