clearotron 0.6.0 → 0.7.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/architecture/04-configuration-reference.md +105 -8
- 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 +77 -0
- package/driver/cancel.mjs +19 -0
- package/driver/connotation-search.mjs +1 -1
- package/driver/contract-e3-backlog.mjs +41 -41
- package/driver/contract-vocabulary.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 +5 -5
- 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/engine/session-record.mjs +44 -2
- package/driver/findings-model.mjs +14 -2
- package/driver/follow-up-twins.mjs +86 -0
- package/driver/gateway.mjs +77 -12
- package/driver/jx-units.mjs +3 -1
- package/driver/jx.mjs +13 -5
- package/driver/manuals-inline.mjs +98 -0
- package/driver/manuals-seen.mjs +134 -0
- package/driver/mark-logos.mjs +174 -0
- package/driver/methodology-witness.mjs +2 -1
- package/driver/owner-use-check.mjs +8 -4
- package/driver/package.json +1 -1
- package/driver/pipeline-knockout.mjs +23 -4
- package/driver/pipeline.mjs +128 -15
- package/driver/portal-local-auth.mjs +6 -2
- package/driver/portal-report.mjs +45 -14
- package/driver/portal-routes/me.mjs +4 -1
- package/driver/portal-runs.mjs +19 -16
- package/driver/predelivery-lint.mjs +7 -5
- package/driver/profiles.mjs +4 -4
- package/driver/publish/README.md +9 -7
- package/driver/publish/email-conditions.mjs +22 -5
- package/driver/publish/evidence-words.mjs +21 -0
- package/driver/publish/index.mjs +304 -211
- package/driver/publish/knockout.mjs +297 -247
- package/driver/publish/office-record-links.mjs +11 -9
- package/driver/publish/page-shell.mjs +98 -0
- package/driver/publish/pool-admin.mjs +2 -2
- package/driver/publish/publish-inputs.mjs +4 -0
- package/driver/publish/regions.mjs +28 -3
- package/driver/publish/register-record-html.mjs +105 -0
- package/driver/publish/register-record.mjs +165 -0
- package/driver/publish/render-knockout.mjs +299 -671
- package/driver/publish/render.mjs +561 -492
- package/driver/publish/report-data.mjs +226 -13
- package/driver/publish/report-document.mjs +353 -0
- package/driver/publish/search-depth.mjs +88 -7
- package/driver/publish/shell.mjs +41 -1
- package/driver/publish/strings.mjs +810 -0
- package/driver/publish/templates/clearance-print.css +23 -0
- package/driver/publish/templates/knockout.css +224 -0
- package/driver/publish/templates/report.css +112 -53
- package/driver/publish/xlsx.mjs +158 -139
- package/driver/record-goods.mjs +42 -0
- package/driver/reference-score.mjs +4 -1
- package/driver/register-count.mjs +5 -1
- package/driver/register-reach.mjs +39 -0
- package/driver/registry-fidelity.mjs +155 -37
- package/driver/repair-composers.mjs +7 -3
- package/driver/repair-targets.mjs +4 -1
- package/driver/replay-archive.mjs +4 -3
- package/driver/run-delivered.mjs +14 -8
- package/driver/run-record.mjs +1 -0
- package/driver/runner.mjs +73 -29
- package/driver/scope-facts.mjs +27 -6
- package/driver/search-policy.mjs +9 -4
- package/driver/skills/clearance-search/report-prose.md +3 -0
- package/driver/skills/knockout-assess/SKILL.md +8 -0
- package/driver/stage-freshness.mjs +8 -5
- package/driver/stages.mjs +69 -43
- package/driver/steps/delivery.mjs +9 -5
- package/driver/steps/overview-and-cards.mjs +54 -15
- package/driver/steps/register-sweep.mjs +5 -4
- package/driver/steps/skeptic-and-follow-up.mjs +3 -2
- package/driver/steps/verdict-gate.mjs +35 -14
- package/driver/suite-census.json +579 -87
- package/driver/synthesis-record.mjs +4 -3
- package/driver/terminal-clamp.mjs +6 -1
- package/driver/withdrawn-rating.mjs +72 -0
- package/mcp-server/CHANGELOG.md +8 -0
- package/mcp-server/lib/audit-view.mjs +5 -2
- package/mcp-server/lib/brief.mjs +6 -2
- package/mcp-server/lib/evidence.mjs +94 -23
- package/mcp-server/lib/findings.mjs +19 -2
- package/mcp-server/lib/knockout.mjs +13 -4
- package/mcp-server/lib/scrub.mjs +1 -1
- package/mcp-server/package.json +1 -1
- package/mcp-server/server.mjs +22 -3
- package/package.json +4 -1
- package/portal-ui/dist/assets/{index-CYaO2ygd.js → index-BBlN4CYq.js} +238 -80
- 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/jx/src/core.js +4 -4
- package/providers/jx/src/judge.js +1 -3
- package/providers/jx/src/nativeread.js +1 -3
- package/providers/oauth-mcp-bridge/CHANGELOG.md +8 -0
- package/providers/oauth-mcp-bridge/package.json +1 -1
- package/scripts/README.md +147 -3
- package/scripts/added-reference-check.mjs +35 -7
- package/scripts/e2e-first-time.mjs +4 -4
- package/scripts/env-audit.mjs +16 -9
- package/scripts/freeze-example-run.mjs +3 -3
- package/scripts/mint-public-residue.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 +93 -6
- package/shared/inline-markdown.mjs +53 -0
- package/shared/names-in-force.mjs +0 -1
- package/shared/portal-tokens.mjs +2 -1
- package/shared/reference-guard-classes.mjs +43 -2
- package/shared/register-selection.mjs +8 -3
- package/shared/search-level-tags.json +25 -0
- package/shared/source-spans.mjs +91 -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,18 @@ 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, KNOCKOUT_PAGE } 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 { registerRecordView, RECORD_LABELS, registrationsCount } from './register-record.mjs';
|
|
41
|
+
import { recordEntryHtml, logoFigureHtml } from './register-record-html.mjs';
|
|
42
|
+
import { axisTwin, kindsForFollowUp } from '../follow-up-twins.mjs'; // when a written row stands in for a Follow-up row // a record entry and a logo, drawn once for both report pages
|
|
43
|
+
import { normalizeRecordUri } from '../registry-fidelity.mjs'; // the register's own record of a cited registration
|
|
44
|
+
import { readerRowHead } from '../coverage-ledger.mjs'; // an engine-token row head in the reader's words // the document shell, shared with the knockout template
|
|
45
|
+
import { EVIDENCE_LABEL, USE_EVIDENCE_LABEL, meterEvidence } from './evidence-words.mjs'; // the meters' evidence words, shared with the audit workbook
|
|
46
|
+
import { inlineMarkdown } from '../../shared/inline-markdown.mjs'; // the inline-markdown dialect, shared with the knockout template
|
|
39
47
|
import { isEntrypoint } from "../../shared/is-entrypoint.mjs"; // — realpath both sides, or a symlinked invocation exits 0 silently
|
|
40
48
|
|
|
41
49
|
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
@@ -50,7 +58,7 @@ let AS_OF = null; // C2 — publish-time clock for the priority-window flag;
|
|
|
50
58
|
// fallback only (archived runs with no sidecar render byte-identically).
|
|
51
59
|
let VERDICT_INFO = null;
|
|
52
60
|
// T6 (D4) — the machine-derived SEARCHED jurisdiction set (register-plan/instructed-scope,
|
|
53
|
-
// passed by publish). When present it IS the
|
|
61
|
+
// passed by publish). When present it IS the set the report names as searched; the coverage-regex /
|
|
54
62
|
// per-finding fallbacks below serve archived runs without the sidecars.
|
|
55
63
|
let SEARCHED_JUR = null;
|
|
56
64
|
// Did the register sweep run WORLDWIDE? Read off the frozen plan's `scope_basis` (publish passes it),
|
|
@@ -102,12 +110,8 @@ let NEGATIVES_GROUPED = false;
|
|
|
102
110
|
// ladder, the footer names it. Absent ⇒ every legacy (composite) surface renders byte-identically.
|
|
103
111
|
let FRAMEWORK = null;
|
|
104
112
|
let FRAMEWORK_METHOD = null; // the frozen method (framework-method.mjs), where the framework states one
|
|
105
|
-
//
|
|
106
|
-
//
|
|
107
|
-
// the two blocks the design gives the full country alone. Module-level for the same reason FRAMEWORK is:
|
|
108
|
-
// fullDetail is reached through four call sites and threading a flag through all of them to reach one
|
|
109
|
-
// `if` is how the other three drift out of step.
|
|
110
|
-
let FULL_COUNTRY = false;
|
|
113
|
+
let AUDIT_HREF = null; // the audit workbook's address, for the line a capped list ends with; null when the run has none
|
|
114
|
+
let LOGOS = new Map(); // registration → its saved logo ({ state, src }); empty on a run that fetched none
|
|
111
115
|
const GAUGE_STOP_BY_TONE = { minimal: 1, low: 1, medium: 2, high: 3, severe: 4 };
|
|
112
116
|
// Severity rank for sorting/worst-of: band index in the manifest (0 = most severe); legacy composite
|
|
113
117
|
// negated so higher composite = lower rank. Unrated items sink to the bottom.
|
|
@@ -170,11 +174,12 @@ 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;
|
|
177
181
|
if (fa) {
|
|
182
|
+
const shown = new Set((Array.isArray(findings) ? findings : []).map((f) => cardTarget(f?.ordinal)));
|
|
178
183
|
const rows = FOUR_ANSWER_LABELS.map(([key, label], i) => {
|
|
179
184
|
const a = fa[key];
|
|
180
185
|
if (!a || typeof a.read !== 'string' || !a.read.trim()) return '';
|
|
@@ -192,8 +197,11 @@ function ratingExtras(fm, findings, coverage, fourAnswers, opts, bandWord, condi
|
|
|
192
197
|
let tone = 'mid';
|
|
193
198
|
if (i < 2) tone = /weak|unlikely|none|low/.test(tok) ? 'good' : /strong|likely|high/.test(tok) ? 'bad' : 'mid';
|
|
194
199
|
else tone = /^(registrable|strong|clear)$/.test(tok) ? 'good' : /condition|moderate|medium|qualified|narrow/.test(tok) ? 'mid' : /not|weak|unlikely|blocked|obstructed/.test(tok) ? 'bad' : 'mid';
|
|
195
|
-
|
|
196
|
-
|
|
200
|
+
// A withdrawn finding renders nowhere, so its ordinal is not cited here either: the token would link to a card the
|
|
201
|
+
// page does not draw. `findings` arrives with the withdrawn ones already out.
|
|
202
|
+
const targets = (Array.isArray(a.ordinals) ? a.ordinals : []).map(cardTarget).filter((t) => t && shown.has(t));
|
|
203
|
+
const ords = targets.length
|
|
204
|
+
? ` <span class="fa-ords">${targets.map((t) => `<a href="#${t}">#${t.slice(1)}</a>`).join(' ')}</span>` : '';
|
|
197
205
|
const basis = a.basis ? inline(String(a.basis).trim()).trim() : '';
|
|
198
206
|
// THE PER-CLASS OBSTACLES RIDE WITH THE ANSWER THEY QUALIFY. An answer that reads "registrable with
|
|
199
207
|
// conditions" and does not say in which classes leaves the reader with the conclusion and none of
|
|
@@ -202,19 +210,19 @@ function ratingExtras(fm, findings, coverage, fourAnswers, opts, bandWord, condi
|
|
|
202
210
|
.map((o) => ({ cls: esc(String(o?.class ?? '')), note: inline(String(o?.note ?? '').trim()).trim() }))
|
|
203
211
|
.filter((o) => o.note && !isInternalLabelled(o.note));
|
|
204
212
|
const obstacles = obsRows.length
|
|
205
|
-
? `<ul class="fa-obstacles">${obsRows.map((o) => `<li><b
|
|
213
|
+
? `<ul class="fa-obstacles">${obsRows.map((o) => `<li><b>${R.rating.obstacleClass(o.cls)}</b> ${o.note}</li>`).join('')}</ul>` : '';
|
|
206
214
|
return `<div class="fa-row"><span class="fa-k">${label}</span><span class="fa-v">${
|
|
207
215
|
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"
|
|
216
|
+
basis ? `<div class="fa-based"><span class="fa-bk">${R.rating.basedOn}</span> ${basis}</div>` : ''}${obstacles}</span></div>`;
|
|
209
217
|
}).filter(Boolean);
|
|
210
|
-
if (rows.length) out.push(`<div class="gwhy"><div class="label"
|
|
218
|
+
if (rows.length) out.push(`<div class="gwhy"><div class="label">${esc(R.rating.why(bandWord || ''))}</div>${rows.join('')}</div>`);
|
|
211
219
|
}
|
|
212
220
|
const bestRank = findings.reduce((m, f) => Math.min(m, severityRank(f)), Number.MAX_SAFE_INTEGER);
|
|
213
221
|
const worstSet = bestRank === Number.MAX_SAFE_INTEGER ? [] : findings.filter((f) => severityRank(f) === bestRank);
|
|
214
222
|
const worst = worstSet.length
|
|
215
|
-
? [...new Set(worstSet.map((f) => regionCode(f)))].map((c) => c === COMMON_LAW ?
|
|
223
|
+
? [...new Set(worstSet.map((f) => regionCode(f)))].map((c) => c === COMMON_LAW ? R.rating.commonLawUse : esc(regionName(c) || c))
|
|
216
224
|
: [];
|
|
217
|
-
if (worst.length) out.push(`<div class="grow gexp"><span class="gk"
|
|
225
|
+
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
226
|
const sd = opts && opts.searchDepth;
|
|
219
227
|
if (sd && sd.counts) {
|
|
220
228
|
const parts = [];
|
|
@@ -222,23 +230,22 @@ function ratingExtras(fm, findings, coverage, fourAnswers, opts, bandWord, condi
|
|
|
222
230
|
const real = Object.entries(byC).filter(([c]) => c !== 'WO');
|
|
223
231
|
const intl = byC.WO || 0;
|
|
224
232
|
const records = real.reduce((s, [, n]) => s + n, 0);
|
|
225
|
-
if (records) parts.push(real.length === 1 ?
|
|
226
|
-
if (intl) parts.push(
|
|
233
|
+
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));
|
|
234
|
+
if (intl) parts.push(R.rating.internationalRead(intl.toLocaleString('en-GB')));
|
|
227
235
|
const cleared = ((sd.cleared && sd.cleared.register) || []).length;
|
|
228
|
-
if (cleared) parts.push(
|
|
236
|
+
if (cleared) parts.push(R.rating.nearNamesCleared(cleared.toLocaleString('en-GB')));
|
|
229
237
|
const rated = findings.filter((f) => f && f.band).length;
|
|
230
|
-
parts.push(
|
|
231
|
-
if (sd.counts.localScriptSearched) parts.push('the name searched in local script');
|
|
238
|
+
parts.push(R.rating.conflicts(rated));
|
|
232
239
|
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"
|
|
240
|
+
if (cd === 'found') parts.push(R.rating.courtChecked);
|
|
241
|
+
else if (cd === 'none-found') parts.push(R.rating.courtNoneTouch);
|
|
242
|
+
else if (cd === 'not-checked') parts.push(R.rating.courtNotChecked);
|
|
243
|
+
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
244
|
}
|
|
238
245
|
// ONE NAME FOR ONE FRAMEWORK. A manifest run already prints it in the card's own heading, beside the
|
|
239
246
|
// ladder whose words it governs; adding a second line here named it twice on the same card. The line
|
|
240
247
|
// 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"
|
|
248
|
+
if (!FRAMEWORK && fm.rated_under) out.push(`<div class="gframe">${esc(R.rating.ratedOn(fm.rated_under))}</div>`);
|
|
242
249
|
return out.join('');
|
|
243
250
|
}
|
|
244
251
|
|
|
@@ -249,13 +256,14 @@ function frameworkGauge(fm, findings, coverage = [], fourAnswers = null, opts =
|
|
|
249
256
|
const tick = frameworkTickIndex(findings);
|
|
250
257
|
const ticks = ladder.map((b, k) => `<span${k === tick ? ` class="on" style="color:var(${toneVar(b.tone)})"` : ''}>${esc(b.label)}</span>`).join('');
|
|
251
258
|
const grad = `linear-gradient(90deg,var(--clear) 0%,${ladder.map((b, k) => `var(${toneVar(b.tone)}) ${pct(k)}`).join(',')})`;
|
|
252
|
-
const
|
|
253
|
-
const
|
|
259
|
+
const stop = tick == null ? '--clear' : toneVar(ladder[tick].tone);
|
|
260
|
+
const mv = `var(${stop})`;
|
|
261
|
+
const label = VERDICT_INFO?.tier || (tick == null ? R.rating.clear : ladder[tick].label);
|
|
254
262
|
// Zero-state marker parks LEFT-ANCHORED at the scale origin (transform:none) so a long pill
|
|
255
263
|
// ("No rated conflicts") grows rightward over the scale instead of clipping off the page edge.
|
|
256
264
|
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>`;
|
|
265
|
+
? `<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>`
|
|
266
|
+
: `<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
267
|
// spec 64 — THE one risk statement (verdict.json.statement, composed once by the sidecar writer)
|
|
260
268
|
// replaces the bare recommendation line when present: band + stance read as ONE labelled sentence.
|
|
261
269
|
// Legacy sidecars (no statement) render today's line byte-identically.
|
|
@@ -264,7 +272,7 @@ function frameworkGauge(fm, findings, coverage = [], fourAnswers = null, opts =
|
|
|
264
272
|
: VERDICT_INFO
|
|
265
273
|
? (bindRecommendation(fm.recommendation, VERDICT_INFO.verdict, []) || VERDICT_INFO.tier || '')
|
|
266
274
|
: (fm.recommendation || fm.overall_label || '');
|
|
267
|
-
const recLabel = VERDICT_INFO?.statement ?
|
|
275
|
+
const recLabel = VERDICT_INFO?.statement ? R.rating.verdict : R.rating.recommendation;
|
|
268
276
|
// THE VERDICT CARRIES EVERY CONDITION, NOT THE FIRST AND A COUNT. The composed statement ends
|
|
269
277
|
// "(and N more)" because it is also a ONE-LINE surface — the email lede, the registry row — where a
|
|
270
278
|
// list cannot go. On the page there is room for all of them, and a condition a client is told exists
|
|
@@ -295,7 +303,7 @@ function frameworkGauge(fm, findings, coverage = [], fourAnswers = null, opts =
|
|
|
295
303
|
// frameworkGauge ONLY: the legacy `gauge()` branch below has no manifest to name, so it stays
|
|
296
304
|
// byte-identical for every archived run that has no framework sidecar.
|
|
297
305
|
return `<div class="panel gauge">
|
|
298
|
-
<div class="gauge-head"><div class="label"
|
|
306
|
+
<div class="gauge-head"><div class="label">${R.rating.overallRisk}</div><div class="gauge-fw">${esc(FRAMEWORK.title)}</div></div>
|
|
299
307
|
<div class="scale" style="background:${grad}">${marker}</div>
|
|
300
308
|
<div class="ticks">${ticks}</div>
|
|
301
309
|
<div class="gconc">${conc}</div>
|
|
@@ -305,12 +313,19 @@ function frameworkGauge(fm, findings, coverage = [], fourAnswers = null, opts =
|
|
|
305
313
|
|
|
306
314
|
const esc = s => String(s ?? '').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
|
307
315
|
const escAttr = s => esc(s).replace(/"/g, '"');
|
|
316
|
+
// A finding's card is the page's `c<ordinal>` target when its ordinal is a whole number, the shape the page script
|
|
317
|
+
// reveals and scrolls to. An absent or malformed ordinal has no target: its card draws no id and nothing links to it.
|
|
318
|
+
const cardTarget = (ordinal) => {
|
|
319
|
+
const n = typeof ordinal === 'string' && /^[0-9]+$/.test(ordinal) ? Number(ordinal) : ordinal;
|
|
320
|
+
return Number.isSafeInteger(n) && n >= 0 ? `c${n}` : null;
|
|
321
|
+
};
|
|
322
|
+
const cardId = (f) => { const t = cardTarget(f?.ordinal); return t ? ` id="${t}"` : ''; };
|
|
308
323
|
|
|
309
324
|
// A floating "home" pill that returns to the listing from a report. FULLY INLINE-STYLED on purpose: it is
|
|
310
325
|
// emitted natively here AND injected into already-rendered reports (pool-admin link-home) whose frozen CSS
|
|
311
326
|
// never knew the class — inline styles render identically on both. href is relative to the run dir:
|
|
312
327
|
// '../index.html' for the internal report, '../customer/<key>/index.html' for the client export. Absent ⇒ ''.
|
|
313
|
-
export function homeButton(href, label =
|
|
328
|
+
export function homeButton(href, label = R.allReports) {
|
|
314
329
|
if (!href) return '';
|
|
315
330
|
const style = "position:fixed;left:14px;bottom:14px;z-index:9999;display:inline-flex;align-items:center;"
|
|
316
331
|
+ "background:#4E030F;color:#f0e8d8;font:600 12px/1 'Plus Jakarta Sans','Helvetica Neue',Helvetica,Arial,sans-serif;"
|
|
@@ -340,29 +355,9 @@ export function homeButton(href, label = '← All reports') {
|
|
|
340
355
|
function inline(s) {
|
|
341
356
|
// T6 (H7): internal-note handling routes through the ONE choke point (publish/parse.mjs
|
|
342
357
|
// 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;
|
|
358
|
+
// Then the one inline-markdown dialect both report renderers read (shared/inline-markdown.mjs): links, bold,
|
|
359
|
+
// italic and code, with its link-target guard and the vendor-label check.
|
|
360
|
+
return inlineMarkdown(esc(stripInternal(s, { client: false })));
|
|
366
361
|
}
|
|
367
362
|
|
|
368
363
|
// Internal-labelled items get a class so the print stylesheet can honour the export promise
|
|
@@ -417,8 +412,8 @@ const STOP_VAR = ['--clear', '--low', '--med', '--high', '--severe'];
|
|
|
417
412
|
// layer only, gated on VERDICT_INFO: RISK_STOPS stays untouched (STOP_VAR CSS keys off it) and
|
|
418
413
|
// sidecar-less archived runs render byte-identically. Stop 1 covers composites 1–2 (GAUGE_BY_COMPOSITE),
|
|
419
414
|
// so its tick is labelled with both words.
|
|
420
|
-
const TIER_STOP_LABELS =
|
|
421
|
-
const TIER_STOP_PILL =
|
|
415
|
+
const TIER_STOP_LABELS = R.tierLabels;
|
|
416
|
+
const TIER_STOP_PILL = R.tierPills;
|
|
422
417
|
|
|
423
418
|
// Overall risk index (0-4) — the derived display verdict when present ( T2, one authority),
|
|
424
419
|
// else the report's stated overall, else the worst composite (legacy).
|
|
@@ -446,7 +441,7 @@ function sourceChip(st) {
|
|
|
446
441
|
function evidenceChips(f) {
|
|
447
442
|
const chips = [];
|
|
448
443
|
if ((f.owner?.registrations ?? []).length || /^register/.test(f.source?.source_type || '')) chips.push({ label: 'Register', cls: 'reg' });
|
|
449
|
-
if (f.use_check?.source || /^common-law/.test(f.source?.source_type || '')) chips.push({ label:
|
|
444
|
+
if (f.use_check?.source || /^common-law/.test(f.source?.source_type || '')) chips.push({ label: R.marketplaceWebChip, cls: 'cl' });
|
|
450
445
|
if (CASE_LAW_BY_ORD.has(f.ordinal)) chips.push({ label: 'Case-law', cls: 'cl' });
|
|
451
446
|
const use = f.meters?.use?.token;
|
|
452
447
|
if (use === 'confirmed') chips.push({ label: 'Use ✓', cls: 'reg' });
|
|
@@ -536,22 +531,17 @@ function groupByRegion(findings) {
|
|
|
536
531
|
// A4 — when the publish-time receipt join ran (joinEvidenceStatus stamped `_status`), every
|
|
537
532
|
// meter's caption carries the four-tuple: verified (source joins a fetch receipt) / assumed (claims
|
|
538
533
|
// verified, receipt missing) / inferred / not checked. Absent `_status` (direct renderHtml callers,
|
|
539
|
-
// archived replays) the caption is byte-identical to the legacy form.
|
|
540
|
-
|
|
534
|
+
// archived replays) the caption is byte-identical to the legacy form. The four words, and the two tables below, are
|
|
535
|
+
// defined once in evidence-words.mjs, which the audit workbook reads too, so both say the same word for one value.
|
|
541
536
|
// D4 — the meter's own `basis` enum, mapped to the SAME four client evidence words EVIDENCE_LABEL
|
|
542
537
|
// 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' };
|
|
538
|
+
// evidence position rather than in the fact position, and one page has ONE evidence vocabulary (EVIDENCE_BASIS_LABEL).
|
|
545
539
|
// D4 — the use-check SOURCE CLASS, one definition. It was declared twice with two different
|
|
546
540
|
// strings for the same member: fullDetail said 'register mirror — not evidence of use' and the
|
|
547
541
|
// common-law contribution list said 'register mirror — not use evidence'. Two copies of one
|
|
548
542
|
// vocabulary is the drift this file has been split apart to stop, so they are one const now, and the
|
|
549
543
|
// 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
|
-
};
|
|
544
|
+
const USE_SOURCE_LABEL = R.useSource;
|
|
555
545
|
// — THE USE LINE PRINTS NO VERIFICATION WORD (owner ruling, 2026-08-31, verbatim: "a
|
|
556
546
|
// website does not equal a citation on a register record — so how would that ever line up. So yes,
|
|
557
547
|
// drop it"). A use meter reaches `confirmed` only via the `/mark/…` fetch-receipt join, and an http
|
|
@@ -559,22 +549,21 @@ const USE_SOURCE_LABEL = {
|
|
|
559
549
|
// "Evidence: verified, from" ever. A label with one reachable value carries no information, and a
|
|
560
550
|
// lawyer reads "not yet verified" as doubt about the FACT. `inferred` and `not checked` are different
|
|
561
551
|
// 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' };
|
|
552
|
+
// register meters, where the join is real — only this line loses it (USE_EVIDENCE_LABEL).
|
|
564
553
|
// The evidence sentence for a use meter: where the page it rests on came from (and the non-receipt
|
|
565
554
|
// statuses that still say something).
|
|
566
555
|
const useEvidence = (m) => [USE_EVIDENCE_LABEL[m?._status], USE_SOURCE_LABEL[m?._useSourceClass]].filter(Boolean).join(', ');
|
|
567
556
|
// 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
|
|
557
|
+
// is a CODE-OWNED SENTINEL: stages.mjs dictates it and findings-model.mjs names it in two refusals (a third
|
|
558
|
+
// reader, use-check.mjs, was a dead gate and is deleted). It is not client prose and it is not a
|
|
570
559
|
// pattern — it is an enum member with one spelling, so it is mapped here, at the render boundary, by
|
|
571
560
|
// EXACT EQUALITY, exactly as EVIDENCE_LABEL maps `_status`. The sentinel itself does not move: archived
|
|
572
561
|
// runs carry the old value forever and a fourth spelling of it would have to be accepted everywhere.
|
|
573
562
|
const USE_CHECK_NO_RESULT = 'perplexity_research — no result';
|
|
574
|
-
const USE_CHECK_NO_RESULT_CITE =
|
|
563
|
+
const USE_CHECK_NO_RESULT_CITE = R.useCheckNothingFound;
|
|
575
564
|
// The same "searched, nothing found" line for a run whose company picked no marketplaces (the owner's
|
|
576
565
|
// 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 =
|
|
566
|
+
const USE_CHECK_NO_RESULT_CITE_NO_MARKETPLACES = R.useCheckNothingFoundNoMarketplaces;
|
|
578
567
|
// — MATCHED ON NORMALISED PUNCTUATION, NOT ONE SPELLING. The constant itself does not
|
|
579
568
|
// move (archived runs carry it forever, the validators name it), but the SEAT emitted a hyphen where
|
|
580
569
|
// the doctrine writes an em dash, and exact equality let the raw tool name through to a delivered
|
|
@@ -593,22 +582,21 @@ const isUseCheckNoResult = (s) => {
|
|
|
593
582
|
function meter(name, entry) {
|
|
594
583
|
const e = entry || {};
|
|
595
584
|
const tok = e.token || 'unknown';
|
|
596
|
-
const st = EVIDENCE_LABEL[e._status] || '';
|
|
597
|
-
const basis = EVIDENCE_BASIS_LABEL[e.basis] || '';
|
|
598
585
|
if (name === 'use') {
|
|
599
586
|
const cls = tok === 'confirmed' ? 'g3' : '';
|
|
600
|
-
const cap = tok === 'confirmed' ?
|
|
587
|
+
const cap = tok === 'confirmed' ? R.meters.confirmed : tok === 'not-confirmed' ? R.meters.notConfirmed : R.meters.unknown;
|
|
601
588
|
// — same rule as useEvidence: no verification word on the use surface (its receipt
|
|
602
589
|
// join is unreachable by construction); inferred / not checked still say something and stay.
|
|
603
|
-
return { label:
|
|
590
|
+
return { label: R.meters.use, cls, cap, ev: meterEvidence(name, e) };
|
|
604
591
|
}
|
|
605
592
|
const cls = tok === 'high' ? 'l3' : tok === 'medium' ? 'l2' : tok === 'low' ? 'l1' : '';
|
|
606
593
|
// The 2026-09-16 report redesign — "Enforcer" was a noun for the owner; the meter measures what the owner is
|
|
607
594
|
// likely to DO, which is what a reader is deciding about. The token under it is unchanged.
|
|
608
|
-
const label = name === 'mark_similarity' ?
|
|
595
|
+
const label = name === 'mark_similarity' ? R.meters.similarity : name === 'goods_proximity' ? R.meters.goodsProximity : R.meters.likelyToEnforce;
|
|
609
596
|
// 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
|
-
|
|
597
|
+
// receipt behind it is exactly the self-attestation A4 exists to demote. Similarity prints no evidence word
|
|
598
|
+
// (owner, 2026-11-18): the workbook dropped it too, so the two say the same.
|
|
599
|
+
return { label, cls, cap: humanize(tok), ev: meterEvidence(name, e) };
|
|
612
600
|
}
|
|
613
601
|
|
|
614
602
|
// Join a finding to its report.md prose card. Every card's first body line is `- ord: <ordinal>`
|
|
@@ -664,57 +652,38 @@ function gauge(fm, findings, coverage = [], fourAnswers = null, opts = {}) {
|
|
|
664
652
|
: VERDICT_INFO
|
|
665
653
|
? (bindRecommendation(fm.recommendation, VERDICT_INFO.verdict, []) || VERDICT_INFO.tier || '')
|
|
666
654
|
: (fm.recommendation || fm.overall_label || '');
|
|
667
|
-
const recLabel = VERDICT_INFO?.statement ?
|
|
655
|
+
const recLabel = VERDICT_INFO?.statement ? R.rating.verdict : R.rating.recommendation;
|
|
668
656
|
const conc = [
|
|
669
657
|
rec && `<div class="grow"><span class="gk">${recLabel}</span><span class="gv gv-rec">${esc(rec)}</span></div>`,
|
|
670
658
|
].filter(Boolean).join('');
|
|
671
659
|
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>
|
|
660
|
+
<div class="label">${R.rating.overallRisk}</div>
|
|
661
|
+
<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
662
|
<div class="ticks">${ticks}</div>
|
|
675
663
|
<div class="gconc">${conc}</div>
|
|
676
664
|
${ratingExtras(fm, findings, coverage, fourAnswers, opts, label)}
|
|
677
665
|
</div>`;
|
|
678
666
|
}
|
|
679
667
|
|
|
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
|
|
668
|
+
// The jurisdictions a report names as searched. Primary source = the coverage ledger's PER-JURISDICTION register
|
|
705
669
|
// rows ("register / US", "register / CN (make-or-break)", "register / TR") — the searched scope, carrying the
|
|
706
|
-
// coverage-limited/not-searched state the
|
|
670
|
+
// coverage-limited/not-searched state the reader is told of. The leading code must be an UPPERCASE office
|
|
707
671
|
// code at a word boundary, so an AXIS-style ledger (rows like "register / bare-MARK exact-in-class floor" or
|
|
708
672
|
// "register / priority markets NZ, IN, TR") matches nothing and we fall back to the findings' own regions —
|
|
709
673
|
// 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
|
|
674
|
+
// preserved (coverage order, else exposure order); common-law (C/L) is not a jurisdiction.
|
|
675
|
+
// ZZ IS NOWHERE (owner, 2026-11-18). It is the register's "unspecified", not a place, and it
|
|
676
|
+
// printed as a code in the lists of places a report gives. It leaves every one of them; a record filed under it still
|
|
677
|
+
// counts as read.
|
|
678
|
+
const UNSPECIFIED_REGION = 'ZZ';
|
|
679
|
+
|
|
711
680
|
function jurisdictionCodes(fm, coverage = [], findings = []) {
|
|
712
681
|
const order = [], meta = new Map();
|
|
713
682
|
// The plan's own answer when publish supplied one; otherwise the ledger-prose sniff below decides,
|
|
714
683
|
// exactly as before. A plan that says worldwide is never overridden by prose that forgot to say so.
|
|
715
684
|
let worldwide = SCOPE_WORLDWIDE === true;
|
|
716
685
|
const add = (code, limited) => {
|
|
717
|
-
if (!code || code === COMMON_LAW) return;
|
|
686
|
+
if (!code || code === COMMON_LAW || code === UNSPECIFIED_REGION) return;
|
|
718
687
|
if (!meta.has(code)) { meta.set(code, { limited: !!limited }); order.push(code); }
|
|
719
688
|
else if (limited) meta.get(code).limited = true;
|
|
720
689
|
};
|
|
@@ -777,65 +746,15 @@ function findingRegions(f) {
|
|
|
777
746
|
return [...out];
|
|
778
747
|
}
|
|
779
748
|
|
|
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
749
|
// ── ABOUT THIS REQUEST ─────────────────────────────────────────────────────────────────────────────
|
|
835
750
|
// The scope line, the facts card and the covers sentence were three places saying what was asked for.
|
|
836
751
|
// They are one labelled panel now, directly under the name, on every report type (the 2026-09-16 report redesign).
|
|
837
752
|
// Every row is a fact the run already carries: nothing here is composed.
|
|
838
|
-
|
|
753
|
+
// WHERE THE SEARCH RAN, as a count and as the list. On a worldwide search the About row gives the count of focus
|
|
754
|
+
// territories (owner, 2026-11-18), "Worldwide · 14 focus territories", where it listed every one
|
|
755
|
+
// of them; the list, in the words it had, moves to the What was searched section. A search of named places keeps
|
|
756
|
+
// its list in the About row, where it is the answer.
|
|
757
|
+
function placesSearched(fm, coverage = [], findings = []) {
|
|
839
758
|
const { order: codes, meta, worldwide } = jurisdictionCodes(fm, coverage, findings);
|
|
840
759
|
// A JURISDICTION SEARCHED WITH LIMITED COVERAGE SAYS SO HERE. The chips this row replaces carried that
|
|
841
760
|
// on the office's own chip; a plain list of country names would read as "all of these were searched"
|
|
@@ -844,23 +763,28 @@ function aboutPanel(fm, coverage = [], findings = [], opts = {}) {
|
|
|
844
763
|
const shown = (worldwide && !codes.includes('WO')) ? [...codes, 'WO'] : codes;
|
|
845
764
|
const where = shown.map((c) => {
|
|
846
765
|
const name = regionName(c) || c;
|
|
847
|
-
return meta.get(c)?.limited ?
|
|
766
|
+
return meta.get(c)?.limited ? R.scope.coverageLimited(name) : name;
|
|
848
767
|
}).filter(Boolean).join(', ');
|
|
768
|
+
return { worldwide, focus: codes.length, where, list: worldwide ? (where ? R.scope.worldwideFocusOn(where) : R.scope.worldwideList) : where };
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
function aboutPanel(fm, coverage = [], findings = [], opts = {}) {
|
|
772
|
+
const { worldwide, focus, list } = placesSearched(fm, coverage, findings);
|
|
849
773
|
// The type of search is the bolded head of the depth note the driver already composes; the rest of
|
|
850
774
|
// that sentence is the product's covers line, which the owner ruled off the page.
|
|
851
775
|
const note = String(opts.depthNote ?? '').trim();
|
|
852
776
|
const cut = note.lastIndexOf(' — ');
|
|
853
777
|
const stage = cut > 0 ? note.slice(0, cut).trim() : note;
|
|
854
778
|
const rows = [
|
|
855
|
-
[
|
|
856
|
-
[
|
|
857
|
-
[
|
|
858
|
-
[
|
|
859
|
-
[
|
|
860
|
-
[
|
|
779
|
+
[R.about.typeOfSearch, stage],
|
|
780
|
+
[R.about.instructedUse, fm.use || ''],
|
|
781
|
+
[R.about.classes, fm.classes || ''],
|
|
782
|
+
[R.about.whereSearched, worldwide && focus ? R.about.worldwideFocus(focus) : list],
|
|
783
|
+
[R.about.project, fm.run_under_project || ''],
|
|
784
|
+
[R.about.searchedOn, fm.searched || fm.run || ''],
|
|
861
785
|
].filter(([, v]) => String(v || '').trim());
|
|
862
786
|
if (!rows.length) return '';
|
|
863
|
-
return `<div class="panel about"><div class="label"
|
|
787
|
+
return `<div class="panel about"><div class="label">${R.about.title}</div>${
|
|
864
788
|
rows.map(([k, v]) => `<div class="row"><span class="k">${esc(k)}</span><span class="v">${esc(v)}</span></div>`).join('')
|
|
865
789
|
}</div>`;
|
|
866
790
|
}
|
|
@@ -872,7 +796,7 @@ function doFirst(secs) {
|
|
|
872
796
|
const head = nl < 0 ? t.trim() : t.slice(0, nl).trim();
|
|
873
797
|
const body = nl < 0 ? '' : t.slice(nl + 1).trim();
|
|
874
798
|
return `<div class="firstUp"><div class="ic">!</div><div>
|
|
875
|
-
<div class="tcrit"
|
|
799
|
+
<div class="tcrit">${R.doFirst}</div>
|
|
876
800
|
<h3>${inline(head)}</h3>${body ? `<p>${inline(body)}</p>` : ''}
|
|
877
801
|
</div></div>`;
|
|
878
802
|
}
|
|
@@ -968,7 +892,7 @@ function answersHtml(body) {
|
|
|
968
892
|
const head = `${label ? `${inline(label)} ` : ''}${inline(first)}`;
|
|
969
893
|
if (!rest && !tail) { rows.push(`<li>${head}</li>`); continue; }
|
|
970
894
|
if (!first && !rest) { rows.push(`<li class="int-note">${head}${inline(tail)}</li>`); continue; }
|
|
971
|
-
const fold = `<details class="ans-more"><summary
|
|
895
|
+
const fold = `<details class="ans-more"><summary>${R.more}</summary><p>${inline(rest && tail ? `${rest} ${tail}` : rest || tail)}</p></details>`;
|
|
972
896
|
rows.push(`<li>${head}${rest ? fold : `<div class="int-note">${fold}</div>`}</li>`);
|
|
973
897
|
}
|
|
974
898
|
return rows.length ? `<ul class="answers">${rows.join('')}</ul>` : '';
|
|
@@ -1063,14 +987,14 @@ export function actYouConditions(youBucket) {
|
|
|
1063
987
|
// meaning "different goods" appeared zero times, because such records are dropped by the batch screen
|
|
1064
988
|
// before they ever become a cleared near-name. Grouping on the engine's reasoning paragraph instead would
|
|
1065
989
|
// produce four groups and assert a reason the record does not support. Owner ruling, 2026-09-16.
|
|
1066
|
-
const CLEARED_GROUP_LABEL =
|
|
990
|
+
const CLEARED_GROUP_LABEL = R.cleared.groups;
|
|
1067
991
|
const CLEARED_GROUP_ORDER = ['different-goods', 'dead-filing', 'other'];
|
|
1068
992
|
const NAMES_CAP = 8;
|
|
1069
993
|
|
|
1070
994
|
function clearedGroupsHtml(searchDepth, auditFile) {
|
|
1071
995
|
const reg = (searchDepth && searchDepth.cleared && searchDepth.cleared.register) || [];
|
|
1072
996
|
if (!reg.length) return '';
|
|
1073
|
-
const link = (n) => hrefAttr(auditFile, { relative: true }) ? `<div class="cmore"><a class="wb" href="${hrefAttr(auditFile, { relative: true })}"
|
|
997
|
+
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
998
|
return CLEARED_GROUP_ORDER.map((g) => {
|
|
1075
999
|
const items = reg.filter((c) => c.group === g);
|
|
1076
1000
|
if (!items.length) return '';
|
|
@@ -1083,7 +1007,7 @@ function clearedGroupsHtml(searchDepth, auditFile) {
|
|
|
1083
1007
|
esc([c.owner, regionName(c.country) || c.country, c.classes ? `Cl. ${c.classes}` : '',
|
|
1084
1008
|
c.status ? String(c.status).toLowerCase() : ''].filter(Boolean).join(' \u00b7 '))}</span></div>`).join('');
|
|
1085
1009
|
return `<details class="cgroup"><summary><span class="gname">${esc(CLEARED_GROUP_LABEL[g] || g)}</span><span class="gcount">${
|
|
1086
|
-
items.length.toLocaleString('en-GB')
|
|
1010
|
+
R.cleared.names(items.length.toLocaleString('en-GB'), items.length)}</span></summary><div class="gbody">${rows}${
|
|
1087
1011
|
items.length > shown.length ? link(items.length) : ''}</div></details>`;
|
|
1088
1012
|
}).join('');
|
|
1089
1013
|
}
|
|
@@ -1093,7 +1017,7 @@ function clearedGroupsHtml(searchDepth, auditFile) {
|
|
|
1093
1017
|
// reference positively identified as that ledger is renamed; any other source keeps its exact reference until a
|
|
1094
1018
|
// truthful label exists for it. The run's record and the audit keep the original reference.
|
|
1095
1019
|
const RUN_COMMON_LAW_RECORD = /^(?:\.\/)?(?:_driver\/)?common-law-grid(?:\.half-[a-z0-9]+)?\.json$/i;
|
|
1096
|
-
const RUN_COMMON_LAW_RECORD_LABEL =
|
|
1020
|
+
const RUN_COMMON_LAW_RECORD_LABEL = R.cleared.runCommonLawRecord;
|
|
1097
1021
|
|
|
1098
1022
|
function webNamesHtml(searchDepth) {
|
|
1099
1023
|
const web = (searchDepth && searchDepth.cleared && searchDepth.cleared.web) || [];
|
|
@@ -1102,8 +1026,8 @@ function webNamesHtml(searchDepth) {
|
|
|
1102
1026
|
const rows = shown.map((w) => `<div class="crow"><span class="cm-mark">${esc(w.title || '')}</span>${
|
|
1103
1027
|
w.url && RUN_COMMON_LAW_RECORD.test(String(w.url).trim()) ? `<span class="curl">${esc(RUN_COMMON_LAW_RECORD_LABEL)}</span>`
|
|
1104
1028
|
: 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')
|
|
1029
|
+
return `<details class="cgroup"><summary><span class="gname">${R.cleared.webAndMarketplace}</span><span class="gcount">${
|
|
1030
|
+
R.cleared.names(web.length.toLocaleString('en-GB'), web.length)}</span></summary><div class="gbody">${rows}</div></details>`;
|
|
1107
1031
|
}
|
|
1108
1032
|
|
|
1109
1033
|
// ── WHERE IT STANDS, COURT DECISIONS, WHAT WAS SEARCHED ────────────────────────────────────────────
|
|
@@ -1167,7 +1091,7 @@ function whereItStandsSection(findings, opts) {
|
|
|
1167
1091
|
const planned = plan && Array.isArray(plan.searched) ? plan.searched.map(String) : null;
|
|
1168
1092
|
const codes = (planned
|
|
1169
1093
|
? [...new Set([...planned, ...bandBy.keys()])]
|
|
1170
|
-
: Object.keys(byC)).filter((c) => c !== 'WO');
|
|
1094
|
+
: Object.keys(byC)).filter((c) => c !== 'WO' && c !== UNSPECIFIED_REGION);
|
|
1171
1095
|
if (!codes.length) return '';
|
|
1172
1096
|
const alias = { EM: 'EU', GB: 'UK' };
|
|
1173
1097
|
// ONE ROW PER COUNTRY, DEDUPED AFTER THE ALIAS AND NOT BEFORE. The archive wrote each country once, so
|
|
@@ -1199,10 +1123,12 @@ function whereItStandsSection(findings, opts) {
|
|
|
1199
1123
|
}
|
|
1200
1124
|
if (!withF.length && !clean.length) return '';
|
|
1201
1125
|
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('');
|
|
1126
|
+
// THE CLEAN PLACES ARE ONE PARAGRAPH OF NAMES (owner, 2026-11-18). They were a chip each, and
|
|
1127
|
+
// past twelve the chips printed codes, with the name only on hover. A list of names reads in the names' order.
|
|
1202
1128
|
const cleanHtml = clean.length
|
|
1203
|
-
? `<div class="wclean"><span class="wk"
|
|
1129
|
+
? `<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
1130
|
: '';
|
|
1205
|
-
return `<div class="sec" id="countries"><span class="num"></span><h2
|
|
1131
|
+
return `<div class="sec" id="countries"><span class="num"></span><h2>${R.whereItStands}</h2></div>
|
|
1206
1132
|
<div class="panel where">${rows}${cleanHtml}</div>`;
|
|
1207
1133
|
}
|
|
1208
1134
|
|
|
@@ -1213,7 +1139,7 @@ function courtDecisionsSection(opts) {
|
|
|
1213
1139
|
if (!sd || !sd.counts || !isFullCountry(opts)) return '';
|
|
1214
1140
|
const line = courtLineFor(opts, sd.counts.courtDecisions);
|
|
1215
1141
|
if (!line) return '';
|
|
1216
|
-
return `<div class="sec" id="court"><span class="num"></span><h2
|
|
1142
|
+
return `<div class="sec" id="court"><span class="num"></span><h2>${R.court.title}</h2></div>
|
|
1217
1143
|
<div class="panel courtp"><p>${esc(line)}</p></div>`;
|
|
1218
1144
|
}
|
|
1219
1145
|
|
|
@@ -1228,14 +1154,54 @@ function courtLineFor(opts, state) {
|
|
|
1228
1154
|
// put here — and every branch below embedded it mid-sentence. The page then read "Case-law research
|
|
1229
1155
|
// could not be completed for ." Each clause is now attached to the name rather than assuming one:
|
|
1230
1156
|
// same words when there is a country, one clause shorter when there is not.
|
|
1231
|
-
const forWhere = where ?
|
|
1157
|
+
const forWhere = where ? R.court.forWhere(where) : '';
|
|
1232
1158
|
let line = '';
|
|
1233
|
-
if (state === 'not-checked') line =
|
|
1234
|
-
else if (state === 'none-found') line =
|
|
1235
|
-
else if (state === 'found') line =
|
|
1159
|
+
if (state === 'not-checked') line = R.court.notCompleted(forWhere);
|
|
1160
|
+
else if (state === 'none-found') line = R.court.noneFound(forWhere);
|
|
1161
|
+
else if (state === 'found') line = R.court.found(forWhere);
|
|
1236
1162
|
return line;
|
|
1237
1163
|
}
|
|
1238
1164
|
|
|
1165
|
+
// The scripts' reader names, in the table's order, for ISO 15924 codes the search-depth record keeps.
|
|
1166
|
+
const scriptNames = (codes) => Object.entries(R.searched.scriptName).filter(([k]) => codes.includes(k)).map(([, name]) => name);
|
|
1167
|
+
// A territory as the page names it, alphabetically in a list; inside a sentence it takes the article English gives it
|
|
1168
|
+
// ("the United States"), from the phrases the Knockout page already prints.
|
|
1169
|
+
const territoryNames = (codes) => codes.map((c) => regionName(c)).sort((a, b) => a.localeCompare(b, 'en-GB'));
|
|
1170
|
+
const territoryPhrase = (c) => KNOCKOUT_PAGE.registerNames[c]?.phrase ?? regionName(c);
|
|
1171
|
+
const byPhrase = (codes) => [...codes].sort((a, b) => regionName(a).localeCompare(regionName(b), 'en-GB')).map(territoryPhrase);
|
|
1172
|
+
// A script searched somewhere that still has a gap: its record by script, in the table's order.
|
|
1173
|
+
const partlySearched = (ls) => Object.keys(R.searched.scriptName).filter((k) => (ls?.searched ?? []).includes(k) && ls?.territories?.[k]);
|
|
1174
|
+
// The script row under "What was searched": each script a search completed in, and for one whose planned worldwide search
|
|
1175
|
+
// did not complete, the places a narrower search in it did complete, where the record names them.
|
|
1176
|
+
function scriptsSearchedLine(ls) {
|
|
1177
|
+
return R.searched.scriptsSearched(Object.entries(R.searched.scriptName).filter(([k]) => ls.searched.includes(k)).map(([k, name]) => {
|
|
1178
|
+
const t = ls.territories?.[k];
|
|
1179
|
+
return t?.worldwide === 'missed' && t.searched.length ? R.searched.scriptIn(name, byPhrase(t.searched)) : name;
|
|
1180
|
+
}));
|
|
1181
|
+
}
|
|
1182
|
+
// THE LOCAL-SCRIPT ROWS UNDER LEFT OPEN, one per distinct gap (design, 2026-11-19, under the owner's delegation). The
|
|
1183
|
+
// scripts planned with no search completed anywhere share the approved sentence's one row. A script searched somewhere
|
|
1184
|
+
// keeps a row for each gap it still has: the territories where none of its searches completed, named up to three and
|
|
1185
|
+
// counted from four with the full list in `detail`; a planned worldwide search that did not complete; and a planned
|
|
1186
|
+
// search whose territory the plan did not record, unless a worldwide search in that script completed. No territory is
|
|
1187
|
+
// guessed, and a run with no execution record draws none of these.
|
|
1188
|
+
function scriptGapRows(ls) {
|
|
1189
|
+
if (!ls) return [];
|
|
1190
|
+
const row = (note, detail) => ({ area: R.searched.localScript, state: 'not-searched', note, ...(detail ? { detail } : {}) });
|
|
1191
|
+
const rows = [];
|
|
1192
|
+
const missed = scriptNames(ls.missed ?? []);
|
|
1193
|
+
if (missed.length) rows.push(row(R.searched.scriptsNotCompleted(missed)));
|
|
1194
|
+
for (const k of partlySearched(ls)) {
|
|
1195
|
+
const t = ls.territories[k], name = R.searched.scriptName[k];
|
|
1196
|
+
const gaps = Array.isArray(t.missed) ? t.missed : [];
|
|
1197
|
+
if (gaps.length > 3) rows.push(row(R.searched.scriptNotCompletedInCount(name, gaps.length.toLocaleString('en-GB')), territoryNames(gaps)));
|
|
1198
|
+
else if (gaps.length) rows.push(row(R.searched.scriptNotCompletedIn(name, byPhrase(gaps))));
|
|
1199
|
+
if (t.worldwide === 'missed') rows.push(row(R.searched.worldwideNotCompleted(name)));
|
|
1200
|
+
if (t.unnamed === 'missed' && t.worldwide !== 'searched') rows.push(row(R.searched.territoryNotRecorded(name)));
|
|
1201
|
+
}
|
|
1202
|
+
return rows;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1239
1205
|
// Counts only, folded closed. A count of records read is engine activity rather than something a reader
|
|
1240
1206
|
// acts on (owner, 2026-09-16), so it lives here and not beside the outcome per country.
|
|
1241
1207
|
// THE OPEN ROWS STAY ON THE PAGE, and that is deliberate rather than a leftover of the old fold. The
|
|
@@ -1244,35 +1210,43 @@ function courtLineFor(opts, state) {
|
|
|
1244
1210
|
// disclosure the whole can't-close-then-disclose doctrine rests on, and it was measured reaching a
|
|
1245
1211
|
// client short by two rows only hours before this redesign (the 2026-09-16 report redesign). It renders here, in the
|
|
1246
1212
|
// 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()) {
|
|
1213
|
+
function whatWasSearchedSection(opts, coverage = [], findings = [], recordsByUri = new Map(), fm = {}) {
|
|
1248
1214
|
const sd = opts && opts.searchDepth;
|
|
1249
|
-
const open = (Array.isArray(coverage) ? coverage : []).filter((c) => COV_STATE[c?.state]?.cls !== 'ok');
|
|
1250
1215
|
const c = (sd && sd.counts) || {}, rows = [];
|
|
1216
|
+
const places = placesSearched(fm, coverage, findings);
|
|
1217
|
+
if (places.worldwide && places.focus) rows.push([R.searched.whereSearched, places.list]);
|
|
1251
1218
|
// THE REGISTER ROW, AS THE BOARDS DRAW IT: one line of totals — records read across the countries, plus
|
|
1252
1219
|
// the international registrations apart from them — and the per-country counts as chips under it, code
|
|
1253
1220
|
// first and the name on hover. One country is named in the line instead ("141 records read in Japan"),
|
|
1254
1221
|
// and draws no chips: a single chip would repeat the line.
|
|
1255
|
-
|
|
1222
|
+
// 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
|
|
1223
|
+
// country are one count, so no chip repeats and Madrid records counted under INT join the international line.
|
|
1224
|
+
const byC = {};
|
|
1225
|
+
for (const [k, n] of Object.entries(c.recordsByCountry || {})) { const key = normRegion(k); byC[key] = (byC[key] || 0) + (Number(n) || 0); }
|
|
1256
1226
|
const intl = Number(byC.WO) || 0;
|
|
1257
1227
|
const countries = Object.entries(byC).filter(([k, n]) => k !== 'WO' && Number(n) > 0).sort((a, b) => b[1] - a[1]);
|
|
1258
1228
|
const read = countries.reduce((t, [, n]) => t + Number(n), 0);
|
|
1259
1229
|
if (countries.length || intl) {
|
|
1260
|
-
const where = countries.length === 1 ?
|
|
1261
|
-
: countries.length ?
|
|
1262
|
-
const plus = intl ? `${countries.length ?
|
|
1263
|
-
const line = `${countries.length ?
|
|
1230
|
+
const where = countries.length === 1 ? R.searched.inPlace(regionName(countries[0][0]) || countries[0][0])
|
|
1231
|
+
: countries.length ? R.searched.acrossCountries(countries.length.toLocaleString('en-GB')) : '';
|
|
1232
|
+
const plus = intl ? `${countries.length ? R.searched.plus : ''}${R.searched.international(intl.toLocaleString('en-GB'), intl)}` : '';
|
|
1233
|
+
const line = `${countries.length ? R.searched.recordsRead(read.toLocaleString('en-GB'), read, where) : ''}${plus}`;
|
|
1264
1234
|
const chips = countries.length > 1
|
|
1265
|
-
|
|
1235
|
+
// ZZ draws no chip; its records stay in the totals, which the overall-risk panel states too.
|
|
1236
|
+
? `<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
1237
|
: '';
|
|
1267
1238
|
rows.push(['Register', { html: `${esc(line)}${chips}` }]);
|
|
1268
1239
|
}
|
|
1269
1240
|
const sw = c.sweep || {};
|
|
1270
|
-
if (sw.spellings) rows.push([
|
|
1241
|
+
if (sw.spellings) rows.push([R.searched.spellings, String(sw.spellings)]);
|
|
1271
1242
|
if (sw.checks) rows.push(['Marketplace and web', sw.noMarketplacesPicked
|
|
1272
|
-
?
|
|
1273
|
-
:
|
|
1274
|
-
if (sw.reputation) rows.push([
|
|
1275
|
-
|
|
1243
|
+
? R.searched.checksWebAndStores(sw.checks.toLocaleString('en-GB'))
|
|
1244
|
+
: R.searched.checksOnPlatforms(sw.checks.toLocaleString('en-GB'), sw.platforms)]);
|
|
1245
|
+
if (sw.reputation) rows.push([R.searched.reputation, R.searched.checks(sw.reputation.toLocaleString('en-GB'))]);
|
|
1246
|
+
// The local-script row says what the run's record shows ran (owner, 2026-11-19): the scripts a native-script search
|
|
1247
|
+
// completed in, by name, or not searched when the record shows none did, and no row when the run kept no execution
|
|
1248
|
+
// record to say either. The scripts planned with none completed are left open, in the grid below (`scriptGapRows`).
|
|
1249
|
+
if (c.localScripts) rows.push([R.searched.localScript, c.localScripts.searched.length ? scriptsSearchedLine(c.localScripts) : R.searched.notSearched]);
|
|
1276
1250
|
// HOW DEEP THE LOCAL-LANGUAGE INVESTIGATION WENT, which is a different question from the row above it.
|
|
1277
1251
|
// That one answers whether the spellings were searched; this one answers whether the investigation ran
|
|
1278
1252
|
// at the depth the matter configured. The engine can run it shallower than the account asked for, and
|
|
@@ -1280,7 +1254,7 @@ function whatWasSearchedSection(opts, coverage = [], findings = [], recordsByUri
|
|
|
1280
1254
|
// redesign replaced with named rows — so a run that went shallow said so on no page at all.
|
|
1281
1255
|
//
|
|
1282
1256
|
// 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
|
|
1257
|
+
// approved board's own values for this row; "Partially covered" and "Not searched" are the coverage
|
|
1284
1258
|
// vocabulary this file already renders, taken from COV_STATE rather than retyped so they cannot drift
|
|
1285
1259
|
// apart from it. Nothing here composes a sentence.
|
|
1286
1260
|
//
|
|
@@ -1289,10 +1263,10 @@ function whatWasSearchedSection(opts, coverage = [], findings = [], recordsByUri
|
|
|
1289
1263
|
// somebody adds: a row is a claim about a client's search, and the nearest word to an unknown state is
|
|
1290
1264
|
// a claim nobody checked.
|
|
1291
1265
|
const LL_WORD = {
|
|
1292
|
-
ran:
|
|
1266
|
+
ran: R.searched.included,
|
|
1293
1267
|
'ran-shallow': COV_STATE['coverage-limited'].word,
|
|
1294
1268
|
'not-run': COV_STATE['not-searched'].word,
|
|
1295
|
-
'not-in-scope':
|
|
1269
|
+
'not-in-scope': R.searched.notPartOfSearch,
|
|
1296
1270
|
};
|
|
1297
1271
|
//
|
|
1298
1272
|
// AND THE ROW NEEDS A LANE RECORD BEHIND IT, not just a state. The state folds to `not-in-scope` when
|
|
@@ -1311,12 +1285,13 @@ function whatWasSearchedSection(opts, coverage = [], findings = [], recordsByUri
|
|
|
1311
1285
|
// COURT DECISIONS, AS THE FULL COUNTRY BOARD DRAWS THE ROW: its state, and for a search that could not
|
|
1312
1286
|
// be completed, the same sentence the court section under it prints. A search that does not include
|
|
1313
1287
|
// court decisions draws no row, as the other boards draw none.
|
|
1314
|
-
const cdWord =
|
|
1288
|
+
const cdWord = R.searched.courtWords[c.courtDecisions];
|
|
1315
1289
|
if (cdWord && isFullCountry(opts)) {
|
|
1316
1290
|
const why = c.courtDecisions === 'not-checked' ? courtLineFor(opts, 'not-checked') : '';
|
|
1317
1291
|
rows.push(['Court decisions', { html: `<span class="wstate">${esc(cdWord)}</span>${why ? `<span class="wnote">${esc(why)}</span>` : ''}` }]);
|
|
1318
1292
|
}
|
|
1319
|
-
const
|
|
1293
|
+
const open = leftOpenRows({ coverage, localScripts: c.localScripts, followUpKinds: opts?.followUpKinds });
|
|
1294
|
+
const openHtml = open.length ? `<div class="openrows"><div class="rk">${R.searched.leftOpen}</div>${coverageGrid(open, { verdict: opts?.assessmentNotCompleted !== true, followUpKinds: opts?.followUpKinds })}</div>` : '';
|
|
1320
1295
|
// THE LEGEND FOR WHAT IS ON THE CARDS, kept when the scope fold went. It is not the engine narrating
|
|
1321
1296
|
// its own searching — it is what a linked registration number opens, why the rest are cited by number,
|
|
1322
1297
|
// and what a register-index entry means. A reader cannot read a card without it.
|
|
@@ -1325,15 +1300,15 @@ function whatWasSearchedSection(opts, coverage = [], findings = [], recordsByUri
|
|
|
1325
1300
|
const hasIndexEntry = (Array.isArray(findings) ? findings : []).some((f) => (f?.owner?.registrations ?? []).some((r) => r?.uri
|
|
1326
1301
|
&& (hasRecordSet || !(r.status || r.filed || r.expiry || (r.classes && r.classes.length)))));
|
|
1327
1302
|
const prov = (opts?.assessmentNotCompleted !== true && (hasRecordSet || hasCards))
|
|
1328
|
-
? `<div class="provwrap"><div class="rk"
|
|
1303
|
+
? `<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
1304
|
: '';
|
|
1330
1305
|
// THE BOARDS END THE SECTION WITH THE WORKBOOK: every search and its result are in the audit workbook,
|
|
1331
1306
|
// which is where a reader who wants the record goes.
|
|
1332
1307
|
const more = hrefAttr(opts?.auditFile, { relative: true })
|
|
1333
|
-
? `<div class="cmore"><a class="wb" href="${hrefAttr(opts.auditFile, { relative: true })}"
|
|
1308
|
+
? `<div class="cmore"><a class="wb" href="${hrefAttr(opts.auditFile, { relative: true })}">${R.searched.everySearch}</a></div>` : '';
|
|
1334
1309
|
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"
|
|
1310
|
+
return `<div class="sec" id="searched"><span class="num"></span><h2>${R.searched.title}</h2></div>
|
|
1311
|
+
<details class="searched"><summary><span class="gname">${R.searched.counts}</span></summary><div class="gbody">${
|
|
1337
1312
|
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
1313
|
}
|
|
1339
1314
|
|
|
@@ -1353,34 +1328,22 @@ function alsoConsideredSection(ruledOut, recordsByUri = new Map(), opts = {}) {
|
|
|
1353
1328
|
// The fixed line stays as the last resort, for a finding that carries neither.
|
|
1354
1329
|
const why = f.ruled_out_reason ? esc(f.ruled_out_reason)
|
|
1355
1330
|
: f.net ? esc(String(f.net))
|
|
1356
|
-
:
|
|
1357
|
-
const legal = f.legal_position ?
|
|
1358
|
-
const practical = f.practical_position ?
|
|
1331
|
+
: R.alsoConsidered.defaultWhy;
|
|
1332
|
+
const legal = f.legal_position ? inline(String(f.legal_position)) : '';
|
|
1333
|
+
const practical = f.practical_position ? inline(String(f.practical_position)) : '';
|
|
1359
1334
|
const fold = (legal || practical)
|
|
1360
|
-
? `<details class="roff"><summary
|
|
1361
|
-
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"
|
|
1335
|
+
? `<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>` : '';
|
|
1336
|
+
return `<div class="card ruled"${cardId(f)}><div class="top"><div class="rail"></div><div class="body"><div class="cardhead">${
|
|
1337
|
+
f.ordinal != null ? `<span class="fnum">${esc(String(f.ordinal))}</span>` : ''}<h3 class="who mark-first">${esc(f.mark || '')}</h3>${
|
|
1338
|
+
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
1339
|
}).join('');
|
|
1365
1340
|
const groups = clearedGroupsHtml(sd, opts.auditFile);
|
|
1366
1341
|
const web = webNamesHtml(sd);
|
|
1367
1342
|
if (!ruledCards && !groups && !web) return '';
|
|
1368
|
-
return `<div class="sec" id="also-considered"><span class="num"></span><h2
|
|
1343
|
+
return `<div class="sec" id="also-considered"><span class="num"></span><h2>${R.alsoConsidered.title}</h2></div>
|
|
1369
1344
|
<div class="panel alsocons">${ruledCards ? `<div class="ruled-cards">${ruledCards}</div>` : ''}${groups || web ? `<div class="cgroups">${groups}${web}</div>` : ''}</div>`;
|
|
1370
1345
|
}
|
|
1371
1346
|
|
|
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
1347
|
// doc-52 §4 — ONE collapsed "Scope & what we didn't search" section, LAST, replacing BOTH the top
|
|
1385
1348
|
// "Checks we ran" panel and the (previously dead) Methodology block: the search results we can state,
|
|
1386
1349
|
// the coverage grid, the plain scope note, and famous-neighbour diligence. Nothing here leads the report.
|
|
@@ -1458,32 +1421,39 @@ function dedupeScatter(findings) {
|
|
|
1458
1421
|
return placed;
|
|
1459
1422
|
}
|
|
1460
1423
|
|
|
1424
|
+
// THE CHART'S NAME (owner, 2026-11-18). A screen reader met an unnamed drawing and then a run
|
|
1425
|
+
// of "#1", "#2" links. The <title>, first in the <svg>, says what the drawing is; its count is the points drawn.
|
|
1426
|
+
const chartTitle = R.chartTitle;
|
|
1427
|
+
|
|
1461
1428
|
function quadrant(findings) {
|
|
1462
|
-
const
|
|
1429
|
+
const points = dedupeScatter(findings);
|
|
1430
|
+
const markers = points.map(({ f, cx, cy, on, r, pending }) => {
|
|
1463
1431
|
// Band hexes, hardcoded on purpose: the quadrant panel stays a FIXED LIGHT surface in dark mode
|
|
1464
1432
|
// (brand.mjs REPORT_DARK_RULES), so it cannot read var(--med)/var(--clear) — those flip. They are
|
|
1465
1433
|
// the LIGHT ramp's --med / --clear and must be recolored in lockstep with brand.mjs:90.
|
|
1466
|
-
const fill = on ?
|
|
1434
|
+
const fill = on ? QC.onField : QC.secondary;
|
|
1467
1435
|
const X = cx.toFixed(1), Y = cy.toFixed(1), fs = on ? 12.5 : 8;
|
|
1468
1436
|
const inner = pending
|
|
1469
|
-
? `<circle cx="${X}" cy="${Y}" r="${r}" fill="
|
|
1470
|
-
: `<circle cx="${X}" cy="${Y}" r="${r}" fill="${fill}" stroke="
|
|
1471
|
-
|
|
1437
|
+
? `<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}">${esc(f.ordinal)}</text>`
|
|
1438
|
+
: `<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">${esc(f.ordinal)}</text>`;
|
|
1439
|
+
const t = cardTarget(f.ordinal);
|
|
1440
|
+
return t ? `<a href="#${t}"><title>#${t.slice(1)}</title>${inner}</a>` : inner;
|
|
1472
1441
|
}).join('');
|
|
1473
1442
|
return `<div class="panel land">
|
|
1474
1443
|
<svg viewBox="0 0 560 430" xmlns="http://www.w3.org/2000/svg" font-family="Plus Jakarta Sans, sans-serif">
|
|
1475
|
-
<
|
|
1444
|
+
<title>${chartTitle(points.length)}</title>
|
|
1445
|
+
<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
1446
|
<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="
|
|
1447
|
+
<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>
|
|
1448
|
+
<text x="300" y="406" text-anchor="middle" font-size="12" font-weight="700" fill="${QC.axisText}">${R.chart.goodsAxis}</text>
|
|
1449
|
+
<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>
|
|
1450
|
+
<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
1451
|
${markers}
|
|
1482
1452
|
</svg>
|
|
1483
1453
|
<div class="legend">
|
|
1484
|
-
<span><i style="background
|
|
1485
|
-
<span><i style="background
|
|
1486
|
-
<span><i style="background
|
|
1454
|
+
<span><i style="background:${QC.onField}"></i>${R.chart.onField}</span>
|
|
1455
|
+
<span><i style="background:${QC.secondary}"></i>${FRAMEWORK ? R.chart.secondaryWatch : R.chart.secondaryManageable}</span>
|
|
1456
|
+
<span><i style="background:${QC.pendingFill};border:2px solid ${QC.secondary};width:7px;height:7px"></i>${R.chart.pending}</span>
|
|
1487
1457
|
</div>
|
|
1488
1458
|
</div>`;
|
|
1489
1459
|
}
|
|
@@ -1495,7 +1465,7 @@ function quadrant(findings) {
|
|
|
1495
1465
|
// keeps the house sentence case ('Register' / 'Common-law') and never wraps mid-word.
|
|
1496
1466
|
function keyRow(f, recordsByUri) {
|
|
1497
1467
|
const on = isOnField(f);
|
|
1498
|
-
const kn = on ?
|
|
1468
|
+
const kn = on ? QC.onField : QC.secondary; // matches this row's quadrant marker — light ramp, see quadrant()
|
|
1499
1469
|
const kc = on ? 'med' : 'low';
|
|
1500
1470
|
const cls = [...new Set((f.owner?.registrations || []).flatMap((r) => Array.isArray(r.classes) ? r.classes : []))]
|
|
1501
1471
|
.map(Number).filter((x) => !Number.isNaN(x)).sort((a, b) => a - b).join('/');
|
|
@@ -1505,9 +1475,10 @@ function keyRow(f, recordsByUri) {
|
|
|
1505
1475
|
const nrm = (s) => String(s || '').toLowerCase().replace(/[^a-z0-9]+/g, ' ').trim();
|
|
1506
1476
|
const subParts = [];
|
|
1507
1477
|
if (who && nrm(who) !== nrm(f.mark)) subParts.push(esc(who));
|
|
1508
|
-
if (cls) subParts.push(
|
|
1478
|
+
if (cls) subParts.push(R.key.classes(esc(cls)));
|
|
1509
1479
|
if (src) subParts.push(`<span style="white-space:nowrap">${esc(src)}</span>`);
|
|
1510
|
-
|
|
1480
|
+
const t = cardTarget(f.ordinal);
|
|
1481
|
+
return `<a class="keyrow"${t ? ` href="#${t}"` : ''}><span class="kn" style="background:${kn}">${esc(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
1482
|
}
|
|
1512
1483
|
|
|
1513
1484
|
// Rights-holder panel → cross-region groups (§2.3). Findings grouped by jurisdiction (region order = lowest
|
|
@@ -1537,12 +1508,16 @@ function keyPanel(findings, recordsByUri = new Map()) {
|
|
|
1537
1508
|
// + the dedicated Common-law & marketplace section carry the reading surface; a fully-open C/L list was
|
|
1538
1509
|
// the main driver of the key-panel height (doc-54 whitespace). Geographic regions: only the top
|
|
1539
1510
|
// (highest-risk) region opens; the rest collapse (doc-55).
|
|
1511
|
+
// The hint lands on the first common-law card the page draws, an on-field one before the rest, as the conflicts come
|
|
1512
|
+
// first. It linked to `#common-law`, which went with the section's heading on 2026-09-16 and left the link dead.
|
|
1513
|
+
const clFirst = cardTarget((findings.find((f) => regionCode(f) === COMMON_LAW && isOnField(f)) ?? clGroup?.findings[0])?.ordinal);
|
|
1514
|
+
const clLink = clFirst ? `<a href="#${clFirst}">${esc(R.key.commonLawSectionLink)}</a>` : esc(R.key.commonLawSectionLink);
|
|
1540
1515
|
const clBlock = clGroup
|
|
1541
|
-
? `<p class="keyhint" style="margin-top:10px"
|
|
1516
|
+
? `<p class="keyhint" style="margin-top:10px">${R.key.commonLawHint(clLink)}</p>${detail(clGroup, R.key.commonLawGroup, `<span style="white-space:nowrap">${R.key.unregisteredUse}</span>`, true)}`
|
|
1542
1517
|
: '';
|
|
1543
1518
|
return `<div class="panel keypanel">
|
|
1544
|
-
<div class="label"
|
|
1545
|
-
<p class="keyhint"
|
|
1519
|
+
<div class="label">${R.key.title}</div>
|
|
1520
|
+
<p class="keyhint">${R.key.hint}</p>
|
|
1546
1521
|
${groups}${clBlock}
|
|
1547
1522
|
</div>`;
|
|
1548
1523
|
}
|
|
@@ -1564,7 +1539,7 @@ function commonLawSection(clSecondary, clOnField, cardFor, recordsByUri = new Ma
|
|
|
1564
1539
|
// Nothing is lost with it: the cards it linked to sit directly below.
|
|
1565
1540
|
if (!clSecondary.length && !clOnField.length) return '';
|
|
1566
1541
|
const links = clOnField.length
|
|
1567
|
-
? `<p class="clx" style="margin:4px 0 10px;font-size:13.5px"
|
|
1542
|
+
? `<p class="clx" style="margin:4px 0 10px;font-size:13.5px">${R.onFieldCommonLaw}${clOnField.map(f => { const t = cardTarget(f.ordinal); return t ? `<a href="#${t}">#${t.slice(1)} ${esc(f.mark)}</a>` : esc(f.mark); }).join(' · ')}</p>`
|
|
1568
1543
|
: '';
|
|
1569
1544
|
const cards = clSecondary.map(f => compactCard(f, cardFor(f), recordsByUri)).join('\n ');
|
|
1570
1545
|
return links + cards;
|
|
@@ -1577,7 +1552,7 @@ function secondaryRegions(findings, cardFor, recordsByUri = new Map()) {
|
|
|
1577
1552
|
return groupByRegion(findings).map(g => {
|
|
1578
1553
|
const kc = g.hasOnField ? 'med' : 'low';
|
|
1579
1554
|
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">${
|
|
1555
|
+
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
1556
|
}).join('\n ');
|
|
1582
1557
|
}
|
|
1583
1558
|
|
|
@@ -1592,23 +1567,17 @@ function secondaryRegions(findings, cardFor, recordsByUri = new Map()) {
|
|
|
1592
1567
|
//
|
|
1593
1568
|
// The full card is not lost — each member is a <details> whose body is the same fullDetail block the
|
|
1594
1569
|
// compact card carries, so the drill-through is one click from the line.
|
|
1595
|
-
const GROUP_HEADING =
|
|
1596
|
-
distinguished: 'Argued apart on the mark',
|
|
1597
|
-
'coexistence-partner': 'Coexistence on the record',
|
|
1598
|
-
'off-field:different-field': 'A different commercial field',
|
|
1599
|
-
'off-field:no-material-risk': 'Clearly won',
|
|
1600
|
-
'off-field:unstated': 'Cleared — ground not stated on the record',
|
|
1601
|
-
};
|
|
1570
|
+
const GROUP_HEADING = R.setApart;
|
|
1602
1571
|
function negativeLine(f, recordsByUri) {
|
|
1603
1572
|
const who = recordOwner(f, recordsByUri) || f.owner?.name || '';
|
|
1604
1573
|
const regs = f.owner?.registrations || [];
|
|
1605
1574
|
const juris = [...new Set(regs.map(r => r.jurisdiction ? normRegion(r.jurisdiction) : null).filter(Boolean))].join(', ')
|
|
1606
|
-
|| (regionCode(f) === COMMON_LAW ?
|
|
1575
|
+
|| (regionCode(f) === COMMON_LAW ? R.commonLaw : normRegion(regionCode(f)));
|
|
1607
1576
|
const classes = [...new Set(regs.flatMap(r => Array.isArray(r.classes) ? r.classes : []))]
|
|
1608
1577
|
.map(Number).filter(x => !Number.isNaN(x)).sort((a, b) => a - b).join('/');
|
|
1609
1578
|
// Escaped per PART and joined with the entity, exactly as markClassChip does: a literal U+00A0 in
|
|
1610
1579
|
// source is invisible to a reader and to a grep, and esc() would turn a raw ` ` into `&nbsp;`.
|
|
1611
|
-
const facts = [esc(juris), classes ?
|
|
1580
|
+
const facts = [esc(juris), classes ? `${R.classesShort} ${esc(classes)}` : ''].filter(Boolean).join(' · ');
|
|
1612
1581
|
// The reason is the finding's OWN typed sentence, rendered whole like every other surface ( —
|
|
1613
1582
|
// there is no character budget any more). `net` stays OPTIONAL in the parser (an archived run has
|
|
1614
1583
|
// none), so the fallback is the finding's legal_position — which v6 DOES require on every negative.
|
|
@@ -1618,14 +1587,15 @@ function negativeLine(f, recordsByUri) {
|
|
|
1618
1587
|
const reason = clause(f.net) || clause(f.legal_position);
|
|
1619
1588
|
return `<span class="rn-mark">${esc(f.mark)}</span>${who ? `<span class="rn-who">${esc(who)}</span>` : ''}`
|
|
1620
1589
|
+ `${facts ? `<span class="rn-facts">${facts}</span>` : ''}`
|
|
1621
|
-
+ `${reason ? `<span class="rn-why">${inline(sentenceCaseLead(reason))}</span>` : ''}
|
|
1590
|
+
+ `${reason ? `<span class="rn-why">${inline(sentenceCaseLead(reason))}</span>` : ''}`
|
|
1591
|
+
+ logoLine(f, recordsByUri, { small: true });
|
|
1622
1592
|
}
|
|
1623
1593
|
function reasonedNegatives(groups, cardFor, recordsByUri) {
|
|
1624
1594
|
return groups.map(g => {
|
|
1625
1595
|
const members = g.findings.map(f =>
|
|
1626
|
-
`<details class="rgroup rn"><summary>${negativeLine(f, recordsByUri)}</summary><div class="gbody">${fullDetail(f, cardFor(f), recordsByUri)}</div></details>`
|
|
1596
|
+
`<details class="rgroup rn"${cardId(f)}><summary>${negativeLine(f, recordsByUri)}</summary><div class="gbody">${fullDetail(f, cardFor(f), recordsByUri)}</div></details>`
|
|
1627
1597
|
).join('\n ');
|
|
1628
|
-
return `<p class="fold-lead"><b>${esc(GROUP_HEADING[g.key] ?? g.key)}</b> (${esc(g.ground)}) — ${
|
|
1598
|
+
return `<p class="fold-lead"><b>${esc(GROUP_HEADING[g.key] ?? g.key)}</b> (${esc(g.ground)}) — ${R.marks(g.findings.length)}.</p>
|
|
1629
1599
|
${members}`;
|
|
1630
1600
|
}).join('\n ');
|
|
1631
1601
|
}
|
|
@@ -1634,7 +1604,7 @@ function meters(f) {
|
|
|
1634
1604
|
const order = ['mark_similarity', 'goods_proximity', 'use', 'enforcer'];
|
|
1635
1605
|
return `<div class="meters">${order.map(name => {
|
|
1636
1606
|
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"
|
|
1607
|
+
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
1608
|
}).join('')}</div>`;
|
|
1639
1609
|
}
|
|
1640
1610
|
|
|
@@ -1729,11 +1699,11 @@ function fullDetail(f, card, recordsByUri = new Map()) {
|
|
|
1729
1699
|
// link the number IS the link, and when there is not, the number still stands on its own. The
|
|
1730
1700
|
// workbook note stays: it tells a reader where the full record actually is.
|
|
1731
1701
|
const NO_LINK_NOTE = {
|
|
1732
|
-
workbook:
|
|
1702
|
+
workbook: R.detail.inWorkbook,
|
|
1733
1703
|
};
|
|
1734
1704
|
const regUri = (u, fb) => {
|
|
1735
1705
|
const h = regHref(u);
|
|
1736
|
-
const label = esc(u || fb ||
|
|
1706
|
+
const label = esc(u || fb || R.detail.registration);
|
|
1737
1707
|
if (hrefAttr(h)) return `<a href="${hrefAttr(h)}" target="_blank" rel="noopener noreferrer">${label}</a>`;
|
|
1738
1708
|
const note = RECORD_CITATION ? NO_LINK_NOTE[RECORD_CITATION] : null;
|
|
1739
1709
|
return note ? `${label}<span class="reg-nolink">${note}</span>` : label;
|
|
@@ -1749,62 +1719,27 @@ function fullDetail(f, card, recordsByUri = new Map()) {
|
|
|
1749
1719
|
// failure's cause is the record's (the persisted failure list and the stamp keep it), never the card's:
|
|
1750
1720
|
// it can be an exception's message.
|
|
1751
1721
|
const fetchFailLine = f._recordFetchFailure
|
|
1752
|
-
? `<li class="openitem"><b
|
|
1722
|
+
? `<li class="openitem"><b>${R.detail.recordNotRetrieved}</b>${R.detail.detailsUnverified}</li>`
|
|
1753
1723
|
: '';
|
|
1754
1724
|
const regs = (f.owner?.registrations || []).map(r => {
|
|
1755
1725
|
const uri = String(r.uri || '').toLowerCase();
|
|
1756
1726
|
const rec = uri ? recordsByUri.get(uri) : null;
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
const jur = r.jurisdiction || rec.jurisdiction || '';
|
|
1763
|
-
const ids = [appNum && `app. ${appNum}`, regNum && `reg. ${regNum}`].filter(Boolean).join(', ');
|
|
1764
|
-
const dates = [filingYear && `filed ${filingYear}`, regYear && `registered ${regYear}`].filter(Boolean).join(', ');
|
|
1765
|
-
const tail = [ids, dates].filter(Boolean).join('; ');
|
|
1766
|
-
// A5 (senior lawyer) — an international (WIPO/Madrid) registration's rights reach ONLY its
|
|
1767
|
-
// designated countries. A WO line NAMES them from the fetched record, or states honestly that
|
|
1768
|
-
// the record did not carry them — never lets "international" imply worldwide.
|
|
1769
|
-
const isWO = normRegion(jur) === 'WO' || /\/mark\/wo\//i.test(uri);
|
|
1770
|
-
const desig = isWO ? REC.designations(rec) : null;
|
|
1771
|
-
const desigHtml = !isWO ? ''
|
|
1772
|
-
: (desig ? ` · designating: ${esc(desig.join(', '))}`
|
|
1773
|
-
: ` · <i>designated countries not on the fetched record — rights reach only its designations</i>`);
|
|
1774
|
-
// C1 — the jurisdiction's registration system, labeled from DATA (unknown = unlabeled)
|
|
1775
|
-
const sys = registrationSystem(jur);
|
|
1776
|
-
// C2 — an application inside the 6-month Paris-priority window can be re-filed
|
|
1777
|
-
// elsewhere claiming THIS date; flag it so a fresh local filing is never read as local-only.
|
|
1778
|
-
const prio = AS_OF && inPriorityWindow(rec, AS_OF)
|
|
1779
|
-
? ` · <b>recent filing — Paris-priority window (potential global backdating)</b>` : '';
|
|
1780
|
-
// WP-receipts W2 — the PROVABLE verified label: when the record artifact carries its fetch
|
|
1781
|
-
// receipt (_receipt, embedded at assembly), say what was pulled and when — replacing the
|
|
1782
|
-
// "file exists on disk" inference. Absent receipt (archived runs) renders nothing.
|
|
1783
|
-
const receiptTail = rec._receipt?.fetched_at
|
|
1784
|
-
? ` · <i class="receipt">verified — ${esc(PROVIDER_LABEL || 'register')} record fetched ${esc(String(rec._receipt.fetched_at).slice(0, 10))}</i>` : '';
|
|
1785
|
-
// AS REGISTERED, AND THE DATES — the full country's two extra blocks (the 2026-09-16 report redesign). Both come
|
|
1786
|
-
// off the fetched record and neither is composed: the goods are the register's own wording in the
|
|
1787
|
-
// language it granted them in, and the dates are its own, to the day. The one-line summary above
|
|
1788
|
-
// carries YEARS, which cannot say whether a registration lapses this month.
|
|
1789
|
-
const goods = FULL_COUNTRY ? REC.goods(rec) : null;
|
|
1790
|
-
const recDates = FULL_COUNTRY ? REC.dates(rec) : null;
|
|
1791
|
-
const goodsHtml = !goods ? '' : `<div class="row"><span class="k">As registered</span><span class="v">${
|
|
1792
|
-
goods.map((g) => `${g.classes.length ? `${esc(g.classes.length === 1 ? 'Class' : 'Classes')} ${esc(g.classes.join(', '))}: ` : ''}${esc(g.description)}`).join('<br>')}</span></div>`;
|
|
1793
|
-
const datesHtml = !recDates ? '' : `<div class="row"><span class="k">Dates</span><span class="v">${
|
|
1794
|
-
esc(recDates.map(([k, v]) => `${k} ${v}`).join(' \u00b7 '))}</span></div>`;
|
|
1795
|
-
return `<li><b>${officeRecordCell(r.uri, regUri, RECORD_CITATION ? NO_LINK_NOTE[RECORD_CITATION] : null)}</b>${cls ? ` · Cl.${esc(cls)}` : ''}${status ? ` · ${esc(status)}` : ''}${tail ? ` (${esc(tail)})` : ''}${jur ? ` · ${esc(jur)}${sys ? ` <i class="jsys">(${sys})</i>` : ''}` : ''}${desigHtml}${prio}${receiptTail}${goodsHtml || datesHtml ? `<div class="record">${goodsHtml}${datesHtml}</div>` : ''}</li>`;
|
|
1796
|
-
}
|
|
1727
|
+
// A FETCHED RECORD IS NOT A LINE HERE ANY MORE. Its facts open the card as the register's own record, in
|
|
1728
|
+
// registerRecordBlock below, before this analysis; a line here would state them twice. What stays in Full
|
|
1729
|
+
// detail is what has no record to show: an index-only citation, and the back-compat render of a run that
|
|
1730
|
+
// fetched no records at all.
|
|
1731
|
+
if (rec) return '';
|
|
1797
1732
|
// (2)+(3): a cited record with NO fetched body. NEVER-INVENT when the run has a record set (this URI was
|
|
1798
1733
|
// not fetched ⇒ the model's fields are unconfirmed); also when there are no findings.json facts to show.
|
|
1799
1734
|
if (uri && (hasRecordSet || !(r.status || r.filed || r.expiry || (r.classes && r.classes.length)))) {
|
|
1800
1735
|
// wp50/wi7 + B3: this is a register-INDEX entry (the search saw it and enumerated it); no field
|
|
1801
1736
|
// renders as confirmed. What "register-index entry" means is stated once, in Scope — not per row.
|
|
1802
|
-
return `<li><b>${regUri(r.uri)}</b> <i
|
|
1737
|
+
return `<li><b>${regUri(r.uri)}</b> <i>${R.detail.indexEntry}</i></li>`;
|
|
1803
1738
|
}
|
|
1804
1739
|
// (3) back-compat field render — byte-identical to the prior behaviour for the no-record-set case
|
|
1805
1740
|
const dates = [r.filed && `filed ${r.filed}`, r.expiry && `expiry ${r.expiry}`].filter(Boolean).join(', ');
|
|
1806
1741
|
const cls = (r.classes || []).length ? ` · Cl.${r.classes.join('/')}` : '';
|
|
1807
|
-
return `<li><b>${regUri(r.uri,
|
|
1742
|
+
return `<li><b>${regUri(r.uri, R.detail.registration)}</b>${cls}${r.status ? ` · ${esc(r.status)}` : ''}${dates ? ` (${esc(dates)})` : ''}${r.jurisdiction ? ` · ${esc(r.jurisdiction)}` : ''}</li>`;
|
|
1808
1743
|
}).join('');
|
|
1809
1744
|
// CHANGE 5b — the enforcer basis line. verified-from-record stays stated as FACT (an enforcement record is
|
|
1810
1745
|
// on file). inferred-from-signal is rendered as an EXPLICIT inference — reputation/profile only, NO
|
|
@@ -1831,8 +1766,8 @@ function fullDetail(f, card, recordsByUri = new Map()) {
|
|
|
1831
1766
|
const enfSrc = enf && String(enf.source ?? '').trim();
|
|
1832
1767
|
const enfBasis = enf
|
|
1833
1768
|
? (enfVerified
|
|
1834
|
-
? `<li><b
|
|
1835
|
-
: `<li><b
|
|
1769
|
+
? `<li><b>${R.meters.likelyToEnforce}.</b> ${esc(R.detail.appetite(humanize(enf.token)))} — <b>${R.detail.verified}</b> (${enfSrc ? esc(R.detail.source(enfSrc.slice(0, 60))) : R.detail.enforcementOnFile}).</li>`
|
|
1770
|
+
: `<li><b>${R.meters.likelyToEnforce}.</b> ${esc(R.detail.appetite(humanize(enf.token)))} <i>${R.detail.inferred}</i>${R.detail.profileSignal}</li>`)
|
|
1836
1771
|
: '';
|
|
1837
1772
|
// Instance #5 — the use-check / own-rights cite is rendered FROM the JSON (no prose-regex), so it can never
|
|
1838
1773
|
// diverge from the structured field. The source string may hold ONE URL, SEVERAL (comma/space-separated —
|
|
@@ -1846,7 +1781,7 @@ function fullDetail(f, card, recordsByUri = new Map()) {
|
|
|
1846
1781
|
if (!src) return '';
|
|
1847
1782
|
// D4 — the status is LABELLED as what it is. A bare "· not yet verified" hung off the end of a
|
|
1848
1783
|
// cite with nothing saying which of the two facts on the line it qualified.
|
|
1849
|
-
const stat = status ? ` <i class="evstat"
|
|
1784
|
+
const stat = status ? ` <i class="evstat">${esc(R.evidence(status))}</i>` : '';
|
|
1850
1785
|
const urls = (String(src).match(/https?:\/\/[^\s,|]+/g) || []).map(u => u.replace(/[).,;:]+$/, ''));
|
|
1851
1786
|
if (!urls.length) return `<li><b>${label}</b> ${esc(src)}${stat}</li>`;
|
|
1852
1787
|
const links = urls.map(u => (hrefAttr(u) ? `<a href="${hrefAttr(u)}" target="_blank" rel="noopener noreferrer">${esc(u.replace(/^https?:\/\//, '').slice(0, 48))}</a>` : esc(u))).join(' · ');
|
|
@@ -1863,8 +1798,8 @@ function fullDetail(f, card, recordsByUri = new Map()) {
|
|
|
1863
1798
|
// found. Evidence: inferred", and "inferred" beside "no result" reads as a contradiction: it qualifies
|
|
1864
1799
|
// how a FINDING was established, and there is no finding here. Nothing was found, and that is the
|
|
1865
1800
|
// whole of what the line has to say.
|
|
1866
|
-
const useChk = cite(useSrc,
|
|
1867
|
-
const ownR = cite(f.own_rights?.source,
|
|
1801
|
+
const useChk = cite(useSrc, R.detail.useChecked, isUseCheckNoResult(f.use_check?.source) ? null : useStatus);
|
|
1802
|
+
const ownR = cite(f.own_rights?.source, R.detail.ownMarks, EVIDENCE_LABEL[f.own_rights?._status]);
|
|
1868
1803
|
const proseFull = cardBlock(card, /^full detail/i);
|
|
1869
1804
|
const proseFullShown = proseFull; // one report: the full prose; portal-report strips serve-time chrome, never analysis
|
|
1870
1805
|
const internalNote = cardBlock(card, /^full detail/i) ? '' : ''; // internal notes ride ::p:: inside prose
|
|
@@ -1880,7 +1815,7 @@ function fullDetail(f, card, recordsByUri = new Map()) {
|
|
|
1880
1815
|
.map((r) => ({ r, sig: ENFORCER_SIGNALS.get(String(r.uri ?? '').toLowerCase()) }))
|
|
1881
1816
|
.filter((x) => x.sig && (x.sig.aggression != null || x.sig.oppositions))
|
|
1882
1817
|
.slice(0, 1)
|
|
1883
|
-
.map(({ r, sig }) => `<li><b
|
|
1818
|
+
.map(({ r, sig }) => `<li><b>${R.detail.telemetry}</b> ${R.detail.corsearchRecords}${sig.aggression != null ? R.detail.aggression(esc(String(sig.aggression))) : ''}${sig.aggression != null && sig.oppositions ? R.detail.and : ''}${sig.oppositions ? R.detail.oppositions(sig.oppositions) : ''}${R.detail.onOwnersRecord(`<span class="mono">${esc(String(r.uri ?? ''))}</span>`)}</li>`)
|
|
1884
1819
|
.join('');
|
|
1885
1820
|
// T7 (E5) — the grounded case-law strand, deterministically joined (ordinal / mark+owner).
|
|
1886
1821
|
// The honest no-precedent state renders too: an explicit negative is a result the lawyer relies on.
|
|
@@ -1888,7 +1823,7 @@ function fullDetail(f, card, recordsByUri = new Map()) {
|
|
|
1888
1823
|
// doc-55 A3 (one-report form) — the strand renders its full body for the reviewing reader; ::p::-marked
|
|
1889
1824
|
// internal lines are handled by renderProse's stripInternal choke point, and serve-time client
|
|
1890
1825
|
// preparation is portal-report.mjs's job, never a second render fork here.
|
|
1891
|
-
const clHead = clProfile ? `<b
|
|
1826
|
+
const clHead = clProfile ? `<b>${R.detail.caseLaw}${clProfile.jurisdiction ? ` (${esc(clProfile.jurisdiction)})` : ''}.</b>` : '';
|
|
1892
1827
|
const clBody = !clProfile ? '' : renderProse(clProfile.body); // one report: the full body (renderProse handles ::p:: internal lines)
|
|
1893
1828
|
// Only a pass that FOUND precedent puts a strand on the card. Where none was found, or the research
|
|
1894
1829
|
// could not be completed, the body is the engine's account of the attempt and the Court decisions
|
|
@@ -1910,15 +1845,15 @@ function fullDetail(f, card, recordsByUri = new Map()) {
|
|
|
1910
1845
|
const sr = SENIOR_RIGHTS.get(f.ordinal);
|
|
1911
1846
|
const seniorLine = !sr || !sr.applicable || sr.verified ? ''
|
|
1912
1847
|
: sr.seniorUri
|
|
1913
|
-
? `<li class="openitem"><b
|
|
1914
|
-
: `<li class="openitem"><b
|
|
1848
|
+
? `<li class="openitem"><b>${R.detail.openItem}</b>${R.detail.seniorNotPulled(regUri(sr.seniorUri))}</li>`
|
|
1849
|
+
: `<li class="openitem"><b>${R.detail.openItem}</b>${R.detail.seniorUnknown}</li>`;
|
|
1915
1850
|
// spec 64 — f.impact is code-rendered (it was prompted + validated but reached no reader surface on
|
|
1916
1851
|
// structured-only cards; the prompt-lane IMPACT bullet is retired so it renders exactly once). Stated
|
|
1917
1852
|
// as consequences FOR THE CLIENT TO CONSIDER, never a conclusion; suppressed when the card's own prose
|
|
1918
1853
|
// already carries an "If enforced" bullet (the reasoned read wins — the enfLine dedupe pattern).
|
|
1919
1854
|
const proseHasImpact = /(^|\n)\s*-\s*(\*\*)?\s*If enforced\b/i.test(proseFull || '');
|
|
1920
1855
|
const impactLine = (f.impact && !proseHasImpact)
|
|
1921
|
-
? `<li><b
|
|
1856
|
+
? `<li><b>${R.detail.ifEnforced}</b> ${esc(f.impact)}</li>` : ''; // its "— for the client to consider." tail is gone (owner, 2026-11-18)
|
|
1922
1857
|
// — THE REASONING LEADS THE DRAWER, and this is where it now lives. legal_position /
|
|
1923
1858
|
// practical_position and the manageable category used to render uncut ABOVE the fold on every card:
|
|
1924
1859
|
// roughly 600 characters of prose per finding before a reader opened anything, while the one sentence
|
|
@@ -1974,7 +1909,83 @@ function fullDetail(f, card, recordsByUri = new Map()) {
|
|
|
1974
1909
|
const proseHasRead = READ_LEAD_RE.test(proseFull || '');
|
|
1975
1910
|
const positions = `${proseHasRead ? '' : lpSplit(f)}${manageableLine(f)}`;
|
|
1976
1911
|
const body = `${positions}${regs || seniorLine || fetchFailLine || enfLine || enfTelemetry || useChk || ownR || impactLine ? `<ul>${fetchFailLine}${seniorLine}${regs}${enfLine}${enfTelemetry}${useChk}${ownR}${impactLine}</ul>` : ''}${proseFullShown ? renderProse(proseFullShown) : ''}${caseLawStrand}${prov}`;
|
|
1977
|
-
|
|
1912
|
+
// The register number of each record entry: the office's label as plain text, the text a handle-cited record shows,
|
|
1913
|
+
// and the page's own cell for a label. Where the run's office links do not name a record, the record still holds its
|
|
1914
|
+
// office number, and the row prints that, opening the record where its handle did, rather than the bare handle.
|
|
1915
|
+
const numberOf = (u, rec) => {
|
|
1916
|
+
const office = RECORD_LINKS?.get(String(u || '').toLowerCase())?.label ?? null;
|
|
1917
|
+
const own = office ? null : (officeRecordLink(rec, u)?.label ?? null);
|
|
1918
|
+
const note = RECORD_CITATION ? NO_LINK_NOTE[RECORD_CITATION] : null;
|
|
1919
|
+
return {
|
|
1920
|
+
label: office ?? own,
|
|
1921
|
+
fallbackText: u || 'registration',
|
|
1922
|
+
cell: (label) => {
|
|
1923
|
+
if (!own) return officeRecordCell(u, regUri, note, label);
|
|
1924
|
+
const h = hrefAttr(regHref(u));
|
|
1925
|
+
return h ? `<a href="${h}" target="_blank" rel="noopener noreferrer">${esc(label)}</a>` : esc(label);
|
|
1926
|
+
},
|
|
1927
|
+
};
|
|
1928
|
+
};
|
|
1929
|
+
const recordBlock = registerRecordBlock(f, recordsByUri, numberOf);
|
|
1930
|
+
return `${recordBlock}<details class="drill"><summary>${R.detail.fold}</summary><div class="drillbody">${body}</div></details>`;
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1933
|
+
// THE REGISTER RECORD (owner, 2026-11-18). A reviewing lawyer checked every cited mark against the register by hand
|
|
1934
|
+
// before reading the analysis. Each cited registration whose record this run fetched now opens with the register's
|
|
1935
|
+
// own facts, in a closed drop-down placed before "Full detail": the mark and its type, the goods by class, the owner
|
|
1936
|
+
// and the owner's country, the country, the status with its dates, and the register number. Every fact is copied
|
|
1937
|
+
// from the saved record by registerRecordView; nothing here is composed by a model, and the words are the approved
|
|
1938
|
+
// labels and the report's own.
|
|
1939
|
+
//
|
|
1940
|
+
// THREE FACTS THE OLD LINE CARRIED KEEP THEIR WORDS AND MOVE TO THEIR ROW (design, 2026-11-19): an international
|
|
1941
|
+
// registration's designated countries, or the sentence saying the record did not carry them, and the registration
|
|
1942
|
+
// system go on the Country row; the Paris-priority flag goes beside the dates on the Status row, with its emphasis.
|
|
1943
|
+
//
|
|
1944
|
+
// AT MOST EIGHT ENTRIES, in the card's order, then the line that sends the reader to the audit workbook for all of
|
|
1945
|
+
// them (owner, 2026-11-18). A card citing dozens of registrations otherwise runs to pages.
|
|
1946
|
+
const RECORD_CAP = 8;
|
|
1947
|
+
function registerRecordBlock(f, recordsByUri, numberOf) {
|
|
1948
|
+
const cited = (f.owner?.registrations || [])
|
|
1949
|
+
.map((r) => ({ r, rec: r?.uri ? recordsByUri.get(String(r.uri).toLowerCase()) : null }))
|
|
1950
|
+
.filter((x) => x.rec);
|
|
1951
|
+
if (!cited.length) return '';
|
|
1952
|
+
const entries = cited.slice(0, RECORD_CAP).map(({ r, rec }) => recordEntry(f, r, rec, numberOf)).join('');
|
|
1953
|
+
const all = R.cleared.allInWorkbook(cited.length.toLocaleString('en-GB'));
|
|
1954
|
+
const more = cited.length > RECORD_CAP ? `<div class="cmore">${AUDIT_HREF ? `<a class="wb" href="${AUDIT_HREF}">${all}</a>` : all}</div>` : '';
|
|
1955
|
+
const count = cited.length > 1 ? ` <span class="rr-count">${esc(registrationsCount(cited.length))}</span>` : '';
|
|
1956
|
+
return `<details class="drill rr-drill"><summary>${esc(RECORD_LABELS.title)}${count}</summary><div class="drillbody">${entries}${more}</div></details>`;
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
// LOGOS ON THE CARD, ON A LINE OF THEIR OWN (owner, 2026-11-18). Under the owner line, one logo per registration
|
|
1960
|
+
// in the card's register record whose logo the run saved, each in a box of one fixed size captioned with its
|
|
1961
|
+
// register, so nothing in the card head moves when a card has logos. A logo the run tried and failed to fetch reads
|
|
1962
|
+
// "Logo not retrieved" and opens the office's record; a registration with no logo, or one the run never asked
|
|
1963
|
+
// about, draws nothing, so a run that fetched no logos draws no line. A grouped negative row shows up to three small
|
|
1964
|
+
// logos and "+N" under its text. The image travels inside the report; nothing points at the register's image.
|
|
1965
|
+
function logoLine(f, recordsByUri, { small = false } = {}) {
|
|
1966
|
+
if (!LOGOS.size) return '';
|
|
1967
|
+
const figures = (f.owner?.registrations || [])
|
|
1968
|
+
.filter((r) => r?.uri && recordsByUri.get(String(r.uri).toLowerCase()))
|
|
1969
|
+
.slice(0, RECORD_CAP)
|
|
1970
|
+
.map((r) => {
|
|
1971
|
+
const rec = recordsByUri.get(String(r.uri).toLowerCase());
|
|
1972
|
+
const href = hrefAttr(RECORD_LINKS?.get(String(r.uri).toLowerCase())?.href) || hrefAttr(registerRecordView(rec, { uri: r.uri }).logo.href);
|
|
1973
|
+
return logoFigureHtml(rec, { uri: r.uri, logo: LOGOS.get(normalizeRecordUri(r.uri)), href, caption: !small });
|
|
1974
|
+
})
|
|
1975
|
+
.filter(Boolean);
|
|
1976
|
+
if (!figures.length) return '';
|
|
1977
|
+
if (!small) return `<div class="rr-logos rr-band">${figures.join('')}</div>`;
|
|
1978
|
+
return `<div class="rr-logos rr-sm">${figures.slice(0, 3).join('')}${figures.length > 3 ? `<span class="rr-more">+${figures.length - 3}</span>` : ''}</div>`;
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
function recordEntry(f, r, rec, numberOf) {
|
|
1982
|
+
const uri = String(r.uri || '');
|
|
1983
|
+
const receipt = rec._receipt?.fetched_at
|
|
1984
|
+
? R.recordVerified(PROVIDER_LABEL || R.register, String(rec._receipt.fetched_at).slice(0, 10)) : null;
|
|
1985
|
+
// The owner by the card's own rule: a record's Latin owner is a romanisation when it also carries the native
|
|
1986
|
+
// form, and then the resolved name is the one a lawyer can read (recordOwner, above, decides the same way).
|
|
1987
|
+
const ownerName = ownerDisplayName({ raw: REC.owner(rec), native: REC.ownerNative(rec), resolved: f.owner?.name });
|
|
1988
|
+
return recordEntryHtml(rec, { uri, jurisdiction: r.jurisdiction, receipt, asOf: AS_OF, number: numberOf(uri, rec), ownerName });
|
|
1978
1989
|
}
|
|
1979
1990
|
|
|
1980
1991
|
// The contentious MARK + the classes it matched in, as a header chip next to the holder — so a card shows
|
|
@@ -1989,8 +2000,8 @@ function cardTitleParts(f, who) {
|
|
|
1989
2000
|
const code = regionCode(f);
|
|
1990
2001
|
const where = code && code !== COMMON_LAW ? (regionName(code) || code) : '';
|
|
1991
2002
|
const tail = [where, classes ? `Class ${classes}` : ''].filter(Boolean).join(' \u00b7 ');
|
|
1992
|
-
const title = `<
|
|
1993
|
-
const ownerLine = who ? `<div class="owner-line"><span class="ok"
|
|
2003
|
+
const title = `<h3 class="who mark-first">${esc(f.mark || who || '')}${tail ? ` <span class="where">\u2014 ${esc(tail)}</span>` : ''}</h3>`;
|
|
2004
|
+
const ownerLine = who ? `<div class="owner-line"><span class="ok">${R.card.owner}</span> ${esc(who)}</div>` : '';
|
|
1994
2005
|
return { title, ownerLine };
|
|
1995
2006
|
}
|
|
1996
2007
|
|
|
@@ -2020,7 +2031,7 @@ function riskChip(f) {
|
|
|
2020
2031
|
// already prints those headings, so the suffix was the section name repeated in engine vocabulary on
|
|
2021
2032
|
// every card in it — and "Adversarial" reads to a client as a claim about the owner's temper.
|
|
2022
2033
|
if (FRAMEWORK && f.composite == null) {
|
|
2023
|
-
if (f.band == null) return
|
|
2034
|
+
if (f.band == null) return R.card.notRatedAwareness;
|
|
2024
2035
|
// A framework that states a method shows its inputs beside the band, in its own labels and order:
|
|
2025
2036
|
// "High · Claim Grade R · Harbour". Every other framework's chip is the band alone.
|
|
2026
2037
|
const line = inputsLine(FRAMEWORK_METHOD, f.inputs);
|
|
@@ -2030,15 +2041,15 @@ function riskChip(f) {
|
|
|
2030
2041
|
// wp50: the internal chip leads with the SAME tier word every other surface uses — the reader can
|
|
2031
2042
|
// match a card against the email/summary at a glance; Level/Composite stays as the legal shorthand.
|
|
2032
2043
|
const tier = CLIENT_TIER_BY_COMPOSITE[f.composite];
|
|
2033
|
-
return `${tier ? `${esc(tier)} · ` : ''}<span class="lv"
|
|
2044
|
+
return `${tier ? `${esc(tier)} · ` : ''}<span class="lv">${R.card.level(esc(f.level))}</span>${R.card.composite(esc(String(f.composite ?? '')))}${esc(dt)}`;
|
|
2034
2045
|
}
|
|
2035
2046
|
// The one-liner fallback (model "- one:" absent): plain client words, reviewer shorthand internally.
|
|
2036
2047
|
function oneFallback(f, who) {
|
|
2037
2048
|
if (FRAMEWORK && f.composite == null) {
|
|
2038
|
-
const head = f.band != null ?
|
|
2049
|
+
const head = f.band != null ? R.card.bandRisk(f.band) : R.card.notRatedCommercial;
|
|
2039
2050
|
return `${head}.${who && who !== f.mark ? ` ${who}.` : ''}`;
|
|
2040
2051
|
}
|
|
2041
|
-
return `${CLIENT_TIER_BY_COMPOSITE[f.composite] ?? ''
|
|
2052
|
+
return `${R.card.tierRisk(CLIENT_TIER_BY_COMPOSITE[f.composite] ?? '', f.level, f.composite, humanize(f.dispute_type))}${who && who !== f.mark ? ` ${who}.` : ''}`;
|
|
2042
2053
|
}
|
|
2043
2054
|
|
|
2044
2055
|
// P5 (charter 2026-07-30, Reviewer §L) — the legal/practical SPLIT: the legal read (the one the band's
|
|
@@ -2065,13 +2076,13 @@ function lpSplit(f) {
|
|
|
2065
2076
|
const legal = inline(String(f.legal_position ?? '').trim()).trim();
|
|
2066
2077
|
const practical = inline(String(f.practical_position ?? '').trim()).trim();
|
|
2067
2078
|
if (!legal && !practical) return '';
|
|
2068
|
-
return `<div class="lp-split">${legal ? lpPara(
|
|
2079
|
+
return `<div class="lp-split">${legal ? lpPara(R.card.legalRisk, legal) : ''}${practical ? lpPara(R.card.practicalPosition, practical) : ''}</div>`;
|
|
2069
2080
|
}
|
|
2070
2081
|
// P5 (Reviewer §L) — WHY a notable finding is manageable: the closed category + the stated reason
|
|
2071
2082
|
// (promote-or-omit; a category-less manageable finding is a lint flag upstream). Absent ⇒ ''.
|
|
2072
2083
|
// The category is a CLOSED code-owned vocabulary (esc is right for it); the reason is model-authored
|
|
2073
2084
|
// free prose and routes through inline() with the two positions above.
|
|
2074
|
-
const MANAGEABLE_LABEL =
|
|
2085
|
+
const MANAGEABLE_LABEL = R.manageable;
|
|
2075
2086
|
function manageableLine(f) {
|
|
2076
2087
|
const m = f.manageable;
|
|
2077
2088
|
if (!m || !m.category) return '';
|
|
@@ -2117,18 +2128,18 @@ function findingCard(f, card, recordsByUri = new Map()) {
|
|
|
2117
2128
|
// `clause` block above for what replaced the defence it was providing.
|
|
2118
2129
|
const one = clause(f.net) || (card?.meta?.one) || oneFallback(f, who);
|
|
2119
2130
|
const readProse = cardBlock(card, /^the read$/i);
|
|
2120
|
-
const read = readProse ? `<details class="drill read" open><summary
|
|
2121
|
-
return `<div class="card"
|
|
2131
|
+
const read = readProse ? `<details class="drill read" open><summary>${R.card.theRead}</summary><div class="drillbody lead">${renderProse(readProse)}</div></details>` : '';
|
|
2132
|
+
return `<div class="card"${cardId(f)}>
|
|
2122
2133
|
<div class="top">
|
|
2123
2134
|
<div class="rail ${tierCls}"></div>
|
|
2124
2135
|
<div class="body">
|
|
2125
2136
|
<div class="cardhead">
|
|
2126
|
-
<label class="pick no-print"><input type="checkbox" class="pickbox" checked></label>
|
|
2127
|
-
<span class="fnum">${f.ordinal}</span>${cardTitleParts(f, who).title}${evidenceChips(f)}
|
|
2137
|
+
<label class="pick no-print"><input type="checkbox" class="pickbox" checked aria-label="${escAttr(R.card.includeInPdf(f.ordinal))}"></label>
|
|
2138
|
+
<span class="fnum">${esc(f.ordinal)}</span>${cardTitleParts(f, who).title}${evidenceChips(f)}
|
|
2128
2139
|
<span class="tier ${tierCls}">${riskChip(f)}</span>
|
|
2129
|
-
<button class="ask-fi no-print"
|
|
2140
|
+
<button class="ask-fi no-print">${R.card.askAi}</button>
|
|
2130
2141
|
</div>
|
|
2131
|
-
${cardTitleParts(f, who).ownerLine}
|
|
2142
|
+
${cardTitleParts(f, who).ownerLine}${logoLine(f, recordsByUri)}
|
|
2132
2143
|
<div class="oneline">${inline(sentenceCaseLead(one))}</div>
|
|
2133
2144
|
${meters(f)}
|
|
2134
2145
|
</div>
|
|
@@ -2138,7 +2149,34 @@ function findingCard(f, card, recordsByUri = new Map()) {
|
|
|
2138
2149
|
</div>`;
|
|
2139
2150
|
}
|
|
2140
2151
|
|
|
2141
|
-
|
|
2152
|
+
// THE CONFLICTS BELOW THE RISK SIT BEHIND ONE CLOSED HEADING (owner, 2026-11-18). Full cards stay for the conflicts
|
|
2153
|
+
// in the band that sets the report's risk, the highest band any conflict holds on the framework's own ladder. Every
|
|
2154
|
+
// conflict below it renders as the compact card, unticked for export, and the compact cards sit together behind
|
|
2155
|
+
// one closed heading carrying their count: "{N} more conflicts rated {band}", with the framework's band word, each
|
|
2156
|
+
// band named and joined by "or" where several sit below. A lawyer who ticks a card puts it back in the PDF; each compact
|
|
2157
|
+
// card still opens to its full detail.
|
|
2158
|
+
//
|
|
2159
|
+
// A single conflict below the risk folds too, under the singular, "1 more conflict rated Manageable" (owner,
|
|
2160
|
+
// 2026-11-19). A conflict with no band on the ladder keeps its full card, since nothing says it is below the risk. A
|
|
2161
|
+
// run with no framework renders every card in full, as it always has.
|
|
2162
|
+
function conflictCards(onField, cardFor, recordsByUri) {
|
|
2163
|
+
const full = (list) => list.map((f) => findingCard(f, cardFor(f), recordsByUri)).join('\n ');
|
|
2164
|
+
if (!FRAMEWORK) return full(onField);
|
|
2165
|
+
const rated = onField.filter((f) => severityRank(f) < FRAMEWORK.bands.length);
|
|
2166
|
+
if (!rated.length) return full(onField);
|
|
2167
|
+
const top = Math.min(...rated.map(severityRank));
|
|
2168
|
+
const below = onField.filter((f) => severityRank(f) > top && severityRank(f) < FRAMEWORK.bands.length);
|
|
2169
|
+
if (!below.length) return full(onField);
|
|
2170
|
+
const kept = onField.filter((f) => !below.includes(f));
|
|
2171
|
+
const bands = [...new Set(below.map(severityRank))].sort((a, b) => a - b).map((i) => FRAMEWORK.bands[i].label);
|
|
2172
|
+
const cards = below.map((f) => compactCard(f, cardFor(f), recordsByUri, { ticked: false })).join('\n ');
|
|
2173
|
+
return `${full(kept)}
|
|
2174
|
+
<details class="rgroup lowerband"><summary><span class="gname">${esc(R.lowerBand(below.length, bands))}</span></summary><div class="gbody">
|
|
2175
|
+
${cards}
|
|
2176
|
+
</div></details>`;
|
|
2177
|
+
}
|
|
2178
|
+
|
|
2179
|
+
function compactCard(f, card, recordsByUri = new Map(), { ticked = true } = {}) {
|
|
2142
2180
|
const who = recordOwner(f, recordsByUri) || f.owner?.name || f.mark; // doc-31 step 4: bound from the record
|
|
2143
2181
|
// — the SAME fallback chain findingCard has carried since item 9b, and this line is why the issue
|
|
2144
2182
|
// exists. The eleventh break pointed findingCard at the typed record and left compactCard behind, so a
|
|
@@ -2150,9 +2188,9 @@ function compactCard(f, card, recordsByUri = new Map()) {
|
|
|
2150
2188
|
// — verbatim here too; the two card renderers must never disagree about one sentence.
|
|
2151
2189
|
const one = clause(f.net) || (card?.meta?.one) || oneFallback(f, '');
|
|
2152
2190
|
const markChip = markClassChip(f, who);
|
|
2153
|
-
return `<div class="card compact"
|
|
2191
|
+
return `<div class="card compact"${cardId(f)}>
|
|
2154
2192
|
<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"
|
|
2193
|
+
<div class="cardhead"><label class="pick no-print"><input type="checkbox" class="pickbox"${ticked ? ' checked' : ''} aria-label="${escAttr(R.card.includeInPdf(f.ordinal))}"></label><span class="fnum">${esc(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}${logoLine(f, recordsByUri)}
|
|
2156
2194
|
<div class="oneline">${inline(sentenceCaseLead(one))}</div>
|
|
2157
2195
|
</div></div>
|
|
2158
2196
|
${fullDetail(f, card, recordsByUri)}
|
|
@@ -2165,11 +2203,11 @@ function compactCard(f, card, recordsByUri = new Map()) {
|
|
|
2165
2203
|
// splits "covered" from "next steps & monitoring". Every row still renders (doc-35: a not-searched row
|
|
2166
2204
|
// is the reader's only deterministic signal a layer didn't run — nothing is hidden).
|
|
2167
2205
|
const COV_STATE = {
|
|
2168
|
-
'confirmed-clean': { cls: 'ok', ic: '✓', word: '
|
|
2169
|
-
'coverage-limited': { cls: 'todo', ic: '→', word: '
|
|
2170
|
-
open: { cls: 'todo', ic: '→', word:
|
|
2171
|
-
'not-searched': { cls: 'todo', ic: '→', word: 'Not run this run
|
|
2172
|
-
note: { cls: 'info', ic: 'i', word:
|
|
2206
|
+
'confirmed-clean': { cls: 'ok', ic: '✓', word: R.coverageStates['confirmed-clean'] },
|
|
2207
|
+
'coverage-limited': { cls: 'todo', ic: '→', word: R.coverageStates['coverage-limited'] },
|
|
2208
|
+
open: { cls: 'todo', ic: '→', word: R.coverageStates.open },
|
|
2209
|
+
'not-searched': { cls: 'todo', ic: '→', word: R.coverageStates['not-searched'] }, // owner, 2026-11-18: it read "Not run this run"
|
|
2210
|
+
note: { cls: 'info', ic: 'i', word: R.coverageStates.note },
|
|
2173
2211
|
};
|
|
2174
2212
|
/**
|
|
2175
2213
|
* ONE ROW PER GAP, where the driver's follow-up row and the model's own row are the same search.
|
|
@@ -2188,19 +2226,23 @@ const COV_STATE = {
|
|
|
2188
2226
|
* from the reader, which is the failure worth avoiding. So the driver's row goes only when another row
|
|
2189
2227
|
* carries EVERY significant word of the directive it names — a near-match keeps both.
|
|
2190
2228
|
*/
|
|
2191
|
-
const FOLLOW_UP_PREFIX =
|
|
2229
|
+
const FOLLOW_UP_PREFIX = R.followUpPrefix;
|
|
2192
2230
|
// `<axis> / <what was swept>` — the shape unitLabel composes for a plan-derived coverage unit.
|
|
2193
2231
|
const AXIS_LABELLED = /\s\/\s/;
|
|
2194
2232
|
const COV_STOPWORDS = new Set(['the', 'a', 'an', 'as', 'for', 'of', 'in', 'on', 'and', 'or', 'to', 'is',
|
|
2195
2233
|
'was', 'it', 'its', 'this', 'that', 'with', 'by', 'at', 'be', 'been', 'run', 'search', 'searched']);
|
|
2196
2234
|
const covWords = (t) => new Set(String(t || '').toLowerCase().match(/[a-z0-9]+/g)?.filter((w) => !COV_STOPWORDS.has(w)) ?? []);
|
|
2197
2235
|
|
|
2198
|
-
function dedupeFollowUps(coverage) {
|
|
2236
|
+
function dedupeFollowUps(coverage, followUpKinds = null) {
|
|
2199
2237
|
const composed = (c) => String(c?.area || '').startsWith(FOLLOW_UP_PREFIX);
|
|
2200
2238
|
const written = coverage.filter((c) => !composed(c));
|
|
2201
2239
|
if (!written.length) return coverage;
|
|
2202
2240
|
return coverage.filter((c) => {
|
|
2203
2241
|
if (!composed(c)) return true;
|
|
2242
|
+
// AN AXIS-LABELLED ROW STANDS IN ONLY ON THE SEARCH THE RUN RECORDED (design, 2026-11-19): the directive's
|
|
2243
|
+
// recorded questions name one kind of search, and exactly one open row of that kind carries the directive's
|
|
2244
|
+
// words. follow-up-twins.mjs holds the rule; the driver and the lint ask it too.
|
|
2245
|
+
if (axisTwin(String(c.note || '').split('—')[0], kindsForFollowUp(c, followUpKinds), written)) return false;
|
|
2204
2246
|
// The directive is the note's opening clause — the same string the area was clipped from, unclipped.
|
|
2205
2247
|
const directive = covWords(String(c.note || '').split('—')[0]);
|
|
2206
2248
|
if (!directive.size) return true;
|
|
@@ -2250,10 +2292,40 @@ function dedupeFollowUps(coverage) {
|
|
|
2250
2292
|
});
|
|
2251
2293
|
}
|
|
2252
2294
|
|
|
2295
|
+
// A REPORT WHOSE ASSESSMENT DID NOT COMPLETE STATES A SHARED NOTE ONCE (owner, 2026-11-18). Its grid is the page's whole
|
|
2296
|
+
// body, and most of its rows carry the one fallback note, so the page was one lower-case sentence many times over
|
|
2297
|
+
// (17 on the measured run). Rows of one state that share a note are one cell: the note once, its first letter
|
|
2298
|
+
// capitalised, then the searches it covers. A row with a note of its own renders as it always did, and the group's
|
|
2299
|
+
// count still counts every row.
|
|
2300
|
+
function sharedNoteCells(rows, cell) {
|
|
2301
|
+
const byNote = new Map();
|
|
2302
|
+
for (const r of rows) { const k = String(r.note ?? ''); byNote.set(k, [...(byNote.get(k) ?? []), r]); }
|
|
2303
|
+
return [...byNote.values()].map((same) => {
|
|
2304
|
+
if (same.length < 2) return cell(same[0]);
|
|
2305
|
+
const s = COV_STATE[same[0].state] || COV_STATE.note;
|
|
2306
|
+
return `<div class="covcell ${s.cls}"><div class="ck">${s.ic}</div><div><div class="ct">${inline(cap(same[0].note || ''))}</div>`
|
|
2307
|
+
+ `<ul class="covlist">${same.map((r) => `<li>${esc(cap(readerRowHead(r.area)))}</li>`).join('')}</ul></div></div>`;
|
|
2308
|
+
});
|
|
2309
|
+
}
|
|
2310
|
+
|
|
2311
|
+
/**
|
|
2312
|
+
* THE ROWS UNDER "LEFT OPEN", as the page draws them: the run's coverage rows that are not clean, then the rows for the
|
|
2313
|
+
* native scripts whose planned search did not complete, less any follow-up row another open row restates
|
|
2314
|
+
* (`dedupeFollowUps`). One list for every surface that prints it, so the page and a delivered document cannot disagree.
|
|
2315
|
+
* `localScripts` is the search-depth record's `counts.localScripts`. PURE.
|
|
2316
|
+
* @returns {{ area: string, state: string, note: string, detail?: string[] }[]} `detail` is the list a note counts, printed
|
|
2317
|
+
* after it; coverage rows keep their other fields
|
|
2318
|
+
*/
|
|
2319
|
+
export function leftOpenRows({ coverage = [], localScripts = null, followUpKinds = null } = {}) {
|
|
2320
|
+
const open = (Array.isArray(coverage) ? coverage : []).filter((c) => COV_STATE[c?.state]?.cls !== 'ok');
|
|
2321
|
+
return dedupeFollowUps([...open, ...scriptGapRows(localScripts)], followUpKinds);
|
|
2322
|
+
}
|
|
2323
|
+
|
|
2253
2324
|
// `verdict: false` — a report whose overall assessment was not completed has no verdict above the grid, so the open
|
|
2254
2325
|
// rows' lead line, which says the material ones are carried in it, is not printed. The rows are.
|
|
2255
|
-
|
|
2256
|
-
|
|
2326
|
+
// Exported for the Knockout's own Left open grid (render-knockout.mjs): one grid, in the clearance's words, on both pages.
|
|
2327
|
+
export function coverageGrid(coverage, { verdict = true, followUpKinds = null } = {}) {
|
|
2328
|
+
coverage = dedupeFollowUps(coverage, followUpKinds);
|
|
2257
2329
|
if (!coverage.length) return '';
|
|
2258
2330
|
const cell = (c) => {
|
|
2259
2331
|
const s = COV_STATE[c.state] || COV_STATE.note;
|
|
@@ -2263,15 +2335,22 @@ function coverageGrid(coverage, { verdict = true } = {}) {
|
|
|
2263
2335
|
// mark that does not exist, inside the report that clears it. Measured across the nine delivered
|
|
2264
2336
|
// runs in the pool, `coverage[]` carries no axis identifier at all; the ones that leaked were the
|
|
2265
2337
|
// coverage_judgment rows, which now carry a driver-emitted `areaLabel` and fold through it.
|
|
2266
|
-
|
|
2338
|
+
// A row's `detail` is the list its note counts, such as the territories a script's search did not complete in.
|
|
2339
|
+
const detail = Array.isArray(c.detail) && c.detail.length ? `<div class="cd">${esc(c.detail.join(', '))}</div>` : '';
|
|
2340
|
+
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>${detail}</div></div>`;
|
|
2267
2341
|
};
|
|
2268
2342
|
const covered = coverage.filter(c => c.state === 'confirmed-clean');
|
|
2269
2343
|
const rest = coverage.filter(c => c.state !== 'confirmed-clean');
|
|
2270
2344
|
const parts = [];
|
|
2271
2345
|
if (covered.length) parts.push(`<div class="cov">${covered.map(cell).join('')}</div>`);
|
|
2346
|
+
// THE OPEN ROWS GROUP UNDER THEIR STATE WORDS, EACH WITH ITS COUNT (owner, 2026-11-18). A report could list 23 to 65
|
|
2347
|
+
// open rows that all looked alike, so a lawyer read every one to find which bore on the advice. Every row stays,
|
|
2348
|
+
// and stays as it was; the groups take the states' own words, in the order the states are declared above.
|
|
2349
|
+
const groups = Object.keys(COV_STATE).map((state) => [state, rest.filter((c) => (COV_STATE[c.state] ? c.state : 'note') === state)])
|
|
2350
|
+
.filter(([, rows]) => rows.length);
|
|
2272
2351
|
if (rest.length) parts.push(
|
|
2273
|
-
(verdict ? `<p class="covnext"><b
|
|
2274
|
-
+ `<div class="cov">${
|
|
2352
|
+
(verdict ? `<p class="covnext"><b>${esc(R.nextStepsHead)}</b></p>` : '') // the head alone (owner, 2026-11-18)
|
|
2353
|
+
+ 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
2354
|
return parts.join('');
|
|
2276
2355
|
}
|
|
2277
2356
|
|
|
@@ -2295,41 +2374,40 @@ function method(_text) {
|
|
|
2295
2374
|
// controls and rendered nothing without them, so took it with them.
|
|
2296
2375
|
|
|
2297
2376
|
|
|
2298
|
-
//
|
|
2299
|
-
//
|
|
2300
|
-
// + the shared floating-nav CSS, with a report-only override: the report already has a sticky .topbar at
|
|
2377
|
+
// The report's base sheet (brand tokens + report.css) and its print rule are the page shell's (page-shell.mjs);
|
|
2378
|
+
// this file adds the shared floating-nav CSS, with a report-only override: the report already has a sticky .topbar at
|
|
2301
2379
|
// top:0, so the cross-page nav renders STATIC (a band above it that scrolls away) — two stacked sticky bars
|
|
2302
2380
|
// would overlap. Internal report only (stripped on the client export, like every internal control).
|
|
2303
2381
|
// The report wraps the cross-page nav + its own action bar in ONE sticky container (.rep-stickyhead), so
|
|
2304
2382
|
// the nav no longer scrolls away while the topbar stays (the "nav disappears on scroll" bug). Inside the
|
|
2305
2383
|
// wrapper the nav is static and drops its own shadow — the wrapper/topbar border provides the separation.
|
|
2306
2384
|
// 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):
|
|
2385
|
+
// (D — <pool>/assets/chrome.css, written by regenIndex): the shell's base sheet + REP_OVERRIDE stay
|
|
2308
2386
|
// inline on every variant; NAV_SHEET (the shared nav/toggle/fab chrome) is inlined on the client export (a
|
|
2309
2387
|
// portable, self-contained deliverable) but LINKED on the internal report so a chrome tweak reaches every
|
|
2310
2388
|
// already-published internal report on the next view with no re-render. The <link> is emitted AFTER the inline
|
|
2311
2389
|
// <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
2390
|
const NAV_SHEET = NAV_CSS;
|
|
2391
|
+
// How a clearance prints (owner, 2026-11-19): ticked cards whole, every other fold as it reads on screen. The clearance's
|
|
2392
|
+
// own sheet, after the base sheet whose print rule opens every fold, which the Knockout keeps. The verdict caption is not a
|
|
2393
|
+
// fold the reader chose: the page opens it before printing, and its label stays off the paper.
|
|
2394
|
+
const CLEARANCE_PRINT = readFileSync(join(HERE, 'templates', 'clearance-print.css'), 'utf8');
|
|
2314
2395
|
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
2396
|
const PAGE_JS = `var _hidden=[];
|
|
2319
|
-
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();}
|
|
2397
|
+
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);}});document.querySelectorAll('details.lowerband').forEach(function(d){if(!d.querySelector('.card:not(.print-hidden)')){d.classList.add('print-hidden');_hidden.push(d);}});window.print();}
|
|
2320
2398
|
function pickAll(v){document.querySelectorAll('input.pickbox').forEach(function(cb){cb.checked=v;});}
|
|
2321
2399
|
function openAll(v){document.querySelectorAll('details.drill,details.method,details.scope,details.rgroup,details.rrow').forEach(function(d){d.open=v;});}
|
|
2322
2400
|
// doc-55 A1: a rights-holder / marker / cross-link click targets a card by #c<ordinal>. When that card sits
|
|
2323
2401
|
// inside a collapsed <details> (a secondary region's .rgroup, a .rrow), a plain anchor jump lands wrong or
|
|
2324
2402
|
// nowhere. Open every <details> ancestor of the target FIRST, then land on the card top — scroll-margin-top
|
|
2325
2403
|
// offsets the sticky topbar so the mark headline + risk band read first. Covers click, hashchange and a
|
|
2326
|
-
// deep-link load;
|
|
2404
|
+
// deep-link load; any other #-link falls through to native nav.
|
|
2327
2405
|
function _cardReveal(el){var p=el.parentElement;while(p){if(p.tagName==='DETAILS'&&!p.open)p.open=true;p=p.parentElement;}}
|
|
2328
2406
|
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'});});
|
|
2407
|
+
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
2408
|
window.addEventListener('hashchange',_cardHashGo);
|
|
2331
2409
|
window.addEventListener('load',_cardHashGo);
|
|
2332
|
-
window.addEventListener('beforeprint',function(){document.querySelectorAll('details').forEach(function(d){d.dataset.o=d.open?'1':'';d.open=true;});});
|
|
2410
|
+
window.addEventListener('beforeprint',function(){document.querySelectorAll('details').forEach(function(d){d.dataset.o=d.open?'1':'';});document.querySelectorAll('details.sub-more').forEach(function(d){d.open=true;});document.querySelectorAll('.card').forEach(function(c){var b=c.querySelector('input.pickbox');if(b&&!b.checked)return;c.querySelectorAll('details').forEach(function(d){d.open=true;});for(var p=c.parentElement;p;p=p.parentElement)if(p.tagName==='DETAILS')p.open=true;});});
|
|
2333
2411
|
window.addEventListener('afterprint',function(){document.querySelectorAll('details').forEach(function(d){d.open=d.dataset.o==='1';});_hidden.forEach(function(c){c.classList.remove('print-hidden');});_hidden=[];});
|
|
2334
2412
|
${EXPORT_MENU_JS}`;
|
|
2335
2413
|
|
|
@@ -2351,14 +2429,14 @@ ${EXPORT_MENU_JS}`;
|
|
|
2351
2429
|
function markAssessmentBlock(ma) {
|
|
2352
2430
|
if (ma == null) return '';
|
|
2353
2431
|
const structured = typeof ma.distinctiveness === 'object' || typeof ma.connotation === 'object';
|
|
2354
|
-
const SEC = `<div class="sec"><span class="num"></span><h2
|
|
2432
|
+
const SEC = `<div class="sec"><span class="num"></span><h2>${R.markItself.title}</h2></div>`;
|
|
2355
2433
|
if (!structured) {
|
|
2356
2434
|
const dist = String(ma?.distinctiveness ?? '').trim(), conn = String(ma?.connotation ?? '').trim();
|
|
2357
2435
|
if (!dist && !conn) return '';
|
|
2358
2436
|
return `${SEC}
|
|
2359
2437
|
<div class="markassess">
|
|
2360
|
-
${dist ? `<p><strong
|
|
2361
|
-
${conn ? `<p><strong
|
|
2438
|
+
${dist ? `<p><strong>${R.markItself.distinctiveness}</strong> ${esc(dist)}</p>` : ''}
|
|
2439
|
+
${conn ? `<p><strong>${esc(R.markItself.connotation)}</strong> ${esc(conn)}</p>` : ''}
|
|
2362
2440
|
</div>`;
|
|
2363
2441
|
}
|
|
2364
2442
|
const lead = (v) => {
|
|
@@ -2367,16 +2445,16 @@ function markAssessmentBlock(ma) {
|
|
|
2367
2445
|
const dot = (s) => { const t = String(s ?? '').trim(); return t ? (/[.!?…]$/.test(t) ? t : `${t}.`) : ''; };
|
|
2368
2446
|
const out = (typeof v.read === 'string' && v.read.trim())
|
|
2369
2447
|
? dot(v.read)
|
|
2370
|
-
: [dot(v.spectrum), dot(v.acquired &&
|
|
2448
|
+
: [dot(v.spectrum), dot(v.acquired && R.markItself.acquired(String(v.acquired).trim().replace(/[.\s]+$/, ''))), dot(v.note)].filter(Boolean).join(' ');
|
|
2371
2449
|
return out ? out.charAt(0).toUpperCase() + out.slice(1) : '';
|
|
2372
2450
|
};
|
|
2373
2451
|
const cmRows = [], crRows = [];
|
|
2374
2452
|
for (const v of [ma.distinctiveness, ma.connotation]) {
|
|
2375
2453
|
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> ${
|
|
2454
|
+
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>`);
|
|
2455
|
+
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
2456
|
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 ? ` — ${
|
|
2457
|
+
crRows.push(`<li><b>${esc(r.mark || r.uri || '')}</b>${r.owner ? ` — ${esc(r.owner)}` : ''}${r.note ? ` — ${inline(r.note)}` : ''}</li>`);
|
|
2380
2458
|
}
|
|
2381
2459
|
}
|
|
2382
2460
|
const dist = lead(ma.distinctiveness), conn = lead(ma.connotation);
|
|
@@ -2384,10 +2462,10 @@ function markAssessmentBlock(ma) {
|
|
|
2384
2462
|
const toggle = (label, rows) => rows.length ? `<details class="ma-more"><summary>${label} (${rows.length})</summary><ul class="ma-rows">${rows.join('')}</ul></details>` : '';
|
|
2385
2463
|
return `${SEC}
|
|
2386
2464
|
<div class="markassess">
|
|
2387
|
-
${dist ? `<p><strong
|
|
2388
|
-
${conn ? `<p><strong
|
|
2389
|
-
${toggle(
|
|
2390
|
-
${toggle(
|
|
2465
|
+
${dist ? `<p><strong>${R.markItself.distinctiveness}</strong> ${esc(dist)}</p>` : ''}
|
|
2466
|
+
${conn ? `<p><strong>${esc(R.markItself.connotation)}</strong> ${esc(conn)}</p>` : ''}
|
|
2467
|
+
${toggle(R.markItself.byClassAndMarket, cmRows)}
|
|
2468
|
+
${toggle(R.markItself.registrationsConsidered, crRows)}
|
|
2391
2469
|
</div>`;
|
|
2392
2470
|
}
|
|
2393
2471
|
|
|
@@ -2397,12 +2475,7 @@ function markAssessmentBlock(ma) {
|
|
|
2397
2475
|
// with the basis as a quiet tail. It NEVER carries a verdict sentence of its own — riskStatement()
|
|
2398
2476
|
// stays the single assembler; this panel decomposes it, never competes with it. Absent (every
|
|
2399
2477
|
// 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
|
-
];
|
|
2478
|
+
const FOUR_ANSWER_LABELS = Object.entries(R.rating.fourAnswers);
|
|
2406
2479
|
// CLIENT SAFETY (review 2026-07-31, blocking): read / basis / obstacles[].note are model-authored free
|
|
2407
2480
|
// strings and route through inline() with every other reader-facing string on this page (see lpSplit).
|
|
2408
2481
|
// The tokens and the class numbers are closed/typed values — esc() is right for those. A read that was
|
|
@@ -2421,7 +2494,7 @@ function contextNotesList(notes = []) {
|
|
|
2421
2494
|
// the findings-section assembly below.
|
|
2422
2495
|
function contextNotesBlock(notes = []) {
|
|
2423
2496
|
if (!notes.length) return '';
|
|
2424
|
-
return `<div class="sec"><span class="num"></span><h2
|
|
2497
|
+
return `<div class="sec"><span class="num"></span><h2>${R.famousNeighbours}</h2></div>
|
|
2425
2498
|
${contextNotesList(notes)}`;
|
|
2426
2499
|
}
|
|
2427
2500
|
|
|
@@ -2490,7 +2563,7 @@ function heroCaptionHtml(text, { whole = false } = {}) {
|
|
|
2490
2563
|
// `sub-lead` marks the FOLDED first sentence so the stylesheet can tighten its bottom margin without a
|
|
2491
2564
|
// positional selector: `.sub:first-of-type` would have caught an UNFOLDED one-sentence caption too and
|
|
2492
2565
|
// changed the spacing of every archived report that has no fold.
|
|
2493
|
-
return `<p class="sub sub-lead">${inline(first)}</p><details class="sub-more"><summary
|
|
2566
|
+
return `<p class="sub sub-lead">${inline(first)}</p><details class="sub-more"><summary>${R.dependsOn}</summary><p class="sub">${inline(rest)}</p></details>`;
|
|
2494
2567
|
}
|
|
2495
2568
|
|
|
2496
2569
|
// The hero's confidentiality line: the delivery posture and the PRODUCT, joined, and nothing else.
|
|
@@ -2534,8 +2607,7 @@ export function demoBannerHtml(isDemo) {
|
|
|
2534
2607
|
+ 'border-radius:6px;background:#fffbeb;color:#3f2d0b;font-size:13px;line-height:1.45;'
|
|
2535
2608
|
+ '-webkit-print-color-adjust:exact;print-color-adjust:exact;';
|
|
2536
2609
|
return `<div style="${box}" role="note">`
|
|
2537
|
-
+
|
|
2538
|
-
+ 'The register records, the searches behind them and the risk assessment are real.'
|
|
2610
|
+
+ `<b>${R.demoBanner.title}</b> ${R.demoBanner.text}`
|
|
2539
2611
|
+ '</div>';
|
|
2540
2612
|
}
|
|
2541
2613
|
|
|
@@ -2557,20 +2629,47 @@ function depthStripHtml(note) {
|
|
|
2557
2629
|
}
|
|
2558
2630
|
|
|
2559
2631
|
// Signature: renderHtml(parsed, findings, coverage, opts). ONE render path — there is no client variant.
|
|
2560
|
-
// THE
|
|
2561
|
-
// the
|
|
2632
|
+
// THE FIVE ENTRIES, in their order, each in the words of the heading it opens (owner, 2026-11-18). "Conflicts"
|
|
2633
|
+
// opens the Conflicts heading, not the landscape above it. The rule that filters them lives in shared/brand.mjs,
|
|
2634
|
+
// because the knockout renderer draws a strip from its own board and the filtering is the half worth having once.
|
|
2562
2635
|
const STRIP = Object.freeze([
|
|
2563
|
-
['summary', 'Summary'], ['
|
|
2564
|
-
['
|
|
2636
|
+
['summary', 'Summary'], ['next', R.next.title], ['conflicts', R.strip.conflicts], ['also-considered', R.alsoConsidered.title],
|
|
2637
|
+
['searched', R.searched.title],
|
|
2565
2638
|
]);
|
|
2566
2639
|
|
|
2640
|
+
// THE CLEARANCE PAGE FROM ITS REPORT DOCUMENT (C14). The run's report document (publish/report-document.mjs, written to
|
|
2641
|
+
// `_driver/report-document.json`) holds every fact the page prints. This reads it, as written, and hands the page the
|
|
2642
|
+
// arguments publish hands it today, so the page is byte for byte the page it was. What the document does not hold is
|
|
2643
|
+
// the page's surface: its two addresses, the confidentiality posture and the demo flag, which publish passes beside the
|
|
2644
|
+
// document as it always has; and the two sets the document holds by reference, the saved records' bodies by uri and the
|
|
2645
|
+
// saved logos' images by ref, which publish resolves from the run. PURE given its inputs.
|
|
2646
|
+
export function renderClearanceDocument(doc, { recordsByUri = new Map(), logos = new Map(), homeHref, chromeHref, delivery, demoData } = {}) {
|
|
2647
|
+
const run = doc?.run ?? {}, scope = doc?.scope ?? {}, client = doc?.client ?? {}, verdict = doc?.verdict ?? {};
|
|
2648
|
+
const framework = doc?.framework ?? {}, prose = doc?.prose ?? {};
|
|
2649
|
+
const asMap = (pairs) => (Array.isArray(pairs) ? new Map(pairs) : null);
|
|
2650
|
+
return renderHtml({ fm: prose.frontMatter ?? {}, secs: prose.sections ?? {}, cards: prose.cards ?? [] }, client.findings ?? [], client.coverage ?? [], {
|
|
2651
|
+
demoData, frameworkMethod: framework.method, servedModels: client.servedModels, productName: run.product?.name,
|
|
2652
|
+
depthNote: run.product?.depthNote, scopeBasis: scope.scopeBasis, auditFile: run.auditFile || undefined, runId: run.runId,
|
|
2653
|
+
delivery, recordsByUri, contextNotes: client.contextNotes, coverageJudgment: client.coverageJudgment,
|
|
2654
|
+
markAssessment: client.markAssessment, fourAnswers: client.fourAnswers, homeHref, chromeHref, issued: run.issued,
|
|
2655
|
+
asOf: run.asOf, verdictInfo: verdict.record, framework: framework.manifest, searchedJurisdictions: scope.searchedJurisdictions,
|
|
2656
|
+
planTerritories: scope.planTerritories, caseLawByOrdinal: asMap(client.caseLaw?.byOrdinal) ?? new Map(),
|
|
2657
|
+
enforcerSignals: client.enforcerSignals, recordOrigin: run.provider?.origin,
|
|
2658
|
+
recordOrigins: run.provider?.origins, recordCitation: run.provider?.citation ?? null, recordLinks: asMap(client.recordLinks?.byUri),
|
|
2659
|
+
providerLabel: run.provider?.label, seniorRights: client.seniorRights, findingsSchemaVersion: run.findingsVersion,
|
|
2660
|
+
searchDepth: scope.searchDepth, assessmentNotCompleted: verdict.assessmentNotCompleted, logos,
|
|
2661
|
+
followUpKinds: new Map((client.followUpKinds ?? []).map(([k, kinds]) => [k, new Set(Array.isArray(kinds) ? kinds : [])])),
|
|
2662
|
+
});
|
|
2663
|
+
}
|
|
2664
|
+
|
|
2567
2665
|
export function renderHtml(parsed, findings = [], coverage = [], opts = {}) {
|
|
2568
2666
|
if (findings && !Array.isArray(findings)) { opts = findings; findings = []; coverage = []; } // tolerate legacy (parsed, opts)
|
|
2569
2667
|
AS_OF = opts.asOf ?? null; // C2
|
|
2570
2668
|
VERDICT_INFO = (opts.verdictInfo && opts.verdictInfo.tier != null) ? opts.verdictInfo : null; // T2 — only an enriched sidecar is an authority
|
|
2571
2669
|
FRAMEWORK = opts.framework ?? null; // doc 50 — the frozen manifest; null on archived/legacy runs
|
|
2572
2670
|
FRAMEWORK_METHOD = opts.frameworkMethod ?? null;
|
|
2573
|
-
|
|
2671
|
+
AUDIT_HREF = hrefAttr(opts.auditFile, { relative: true }) || null;
|
|
2672
|
+
LOGOS = opts.logos instanceof Map ? opts.logos : new Map();
|
|
2574
2673
|
SEARCHED_JUR = Array.isArray(opts.searchedJurisdictions) && opts.searchedJurisdictions.length ? opts.searchedJurisdictions : null; // T6 (D4)
|
|
2575
2674
|
SCOPE_WORLDWIDE = opts.scopeBasis === 'worldwide' ? true : null; // the plan's scope_basis; null ⇒ fall back to the ledger-prose sniff
|
|
2576
2675
|
CASE_LAW_BY_ORD = opts.caseLawByOrdinal instanceof Map ? opts.caseLawByOrdinal : new Map(); // T7 (E5)
|
|
@@ -2668,7 +2767,7 @@ export function renderHtml(parsed, findings = [], coverage = [], opts = {}) {
|
|
|
2668
2767
|
const riskLabel = VERDICT_INFO ? (VERDICT_INFO.tier || TIER_STOP_PILL[i]) : RISK_STOPS[i].toUpperCase();
|
|
2669
2768
|
|
|
2670
2769
|
// 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>⬇
|
|
2770
|
+
const excelBtn2 = !hrefAttr(opts.auditFile, { relative: true }) ? '' : `<a class="util" href="${hrefAttr(opts.auditFile, { relative: true })}" download>⬇ ${R.topbar.downloadAudit}</a>`;
|
|
2672
2771
|
|
|
2673
2772
|
const cardFor = f => matchCard(f, cards);
|
|
2674
2773
|
const recordsByUri = opts.recordsByUri || new Map(); // Instance #6 — the run's _records/ set (publishReport loads it)
|
|
@@ -2696,30 +2795,19 @@ export function renderHtml(parsed, findings = [], coverage = [], opts = {}) {
|
|
|
2696
2795
|
// T7 (E4): the section also renders when the ONLY common-law content is the layer's
|
|
2697
2796
|
// contributions to register findings — the layer's work is visible even with zero CL findings.
|
|
2698
2797
|
const clBody = commonLawSection(secCL, clOnField, cardFor, recordsByUri, sorted);
|
|
2699
|
-
// The case-law stage's session-wide preamble (source outages etc.) renders ONCE here — the per-finding
|
|
2700
|
-
// strands cite 'as § Session-wide notice above', which used to point at nothing (the preamble was
|
|
2701
|
-
// discarded at parse). Rendered only when case-law strands exist to reference it.
|
|
2702
|
-
// doc-55 A3 — INTERNAL ONLY: this preamble is operational session narration (which case-law sources were
|
|
2703
|
-
// reachable this run — MCP wiring, tool status, HTTP/quota) = process exhaust, not legal product (doc-52).
|
|
2704
|
-
// It leaked those internals to the client. The client's per-finding case-law lines carry the plain result;
|
|
2705
|
-
// the reviewer keeps the full session note here.
|
|
2706
|
-
const clNoticeText = String(opts.caseLawNotice || '').trim();
|
|
2707
|
-
const clNotice = (clNoticeText && CASE_LAW_BY_ORD.size)
|
|
2708
|
-
? `<div class="panel" style="padding:12px 16px;margin:0 0 12px"><p style="margin:0 0 4px;font-weight:700;font-size:13px">Session-wide notice</p><div style="font-size:13px">${renderProse(clNoticeText)}</div></div>`
|
|
2709
|
-
: '';
|
|
2710
2798
|
// The 2026-09-16 report redesign — the section heading and the session-wide notice are off the page: the heading
|
|
2711
2799
|
// named a layer rather than a thing a reader looks for, and the notice was operational narration. The
|
|
2712
2800
|
// CARDS are not: a rated common-law finding is a finding, and it renders in place with the others.
|
|
2713
2801
|
const hasCL = Boolean(clBody);
|
|
2714
2802
|
let findingsSections, covNum;
|
|
2715
2803
|
if (!DISPOSITION_MODE) {
|
|
2716
|
-
findingsSections = `${onField.length ? `<div class="sec" id="findings"><span class="num"></span><h2
|
|
2804
|
+
findingsSections = `${onField.length ? `<div class="sec" id="findings"><span class="num"></span><h2>${R.findings.landscape}</h2></div>
|
|
2717
2805
|
<div class="landwrap">${quadrant(sorted)}${keyPanel(sorted, recordsByUri)}</div>
|
|
2718
2806
|
|
|
2719
|
-
<div class="sec"><span class="num"></span><h2
|
|
2720
|
-
${onField
|
|
2807
|
+
<div class="sec" id="conflicts"><span class="num"></span><h2>${R.strip.conflicts}</h2></div>
|
|
2808
|
+
${conflictCards(onField, cardFor, recordsByUri)}` : ''}
|
|
2721
2809
|
|
|
2722
|
-
${secReg.length ? `<div class="sec"><span class="num"></span><h2
|
|
2810
|
+
${secReg.length ? `<div class="sec"><span class="num"></span><h2>${esc(R.findings.secondaryWatch)}</h2></div>
|
|
2723
2811
|
${secondaryRegions(secReg, cardFor, recordsByUri)}` : ''}${hasCL ? `
|
|
2724
2812
|
|
|
2725
2813
|
${clBody}` : ''}`;
|
|
@@ -2728,11 +2816,11 @@ export function renderHtml(parsed, findings = [], coverage = [], opts = {}) {
|
|
|
2728
2816
|
let secNum = 0;
|
|
2729
2817
|
const num = () => String(++secNum).padStart(2, '0');
|
|
2730
2818
|
const landscape = onField.length
|
|
2731
|
-
? `<div class="sec" id="findings"><span class="num"></span><h2
|
|
2819
|
+
? `<div class="sec" id="findings"><span class="num"></span><h2>${R.findings.landscape}</h2></div>
|
|
2732
2820
|
<div class="landwrap">${quadrant(sorted)}${keyPanel(sorted, recordsByUri)}</div>
|
|
2733
2821
|
|
|
2734
|
-
<div class="sec"><span class="num"></span><h2
|
|
2735
|
-
${onField
|
|
2822
|
+
<div class="sec" id="conflicts"><span class="num"></span><h2>${R.strip.conflicts}</h2></div>
|
|
2823
|
+
${conflictCards(onField, cardFor, recordsByUri)}`
|
|
2736
2824
|
: '';
|
|
2737
2825
|
// THE COMMON-LAW CARDS GO WITH THE CONFLICTS, NOT UNDER THE NEXT HEADING. Appended at the end they
|
|
2738
2826
|
// landed beneath "Notable but manageable", which says something about a finding that is not true of
|
|
@@ -2755,20 +2843,20 @@ export function renderHtml(parsed, findings = [], coverage = [], opts = {}) {
|
|
|
2755
2843
|
// reader guessing. That is right for a working record and wrong for a client's page, where a
|
|
2756
2844
|
// heading followed by a sentence explaining that there is nothing under it is the "nothing here"
|
|
2757
2845
|
// line the owner ruled out. Whether the grouping ran is answered by the counts, not by a paragraph.
|
|
2758
|
-
const notes = contextNotes.length ? `\n <p class="fold-lead"><b
|
|
2846
|
+
const notes = contextNotes.length ? `\n <p class="fold-lead"><b>${R.findings.famousLead}</b> ${R.findings.famousNote}</p>
|
|
2759
2847
|
${contextNotesList(contextNotes)}` : '';
|
|
2760
2848
|
if (negatives.total || notes) {
|
|
2761
|
-
tail += `\n\n <div class="sec"><span class="num"></span><h2>
|
|
2849
|
+
tail += `\n\n <div class="sec"><span class="num"></span><h2>Marks that can coexist</h2></div>
|
|
2762
2850
|
${negatives.total ? reasonedNegatives(negatives.groups, cardFor, recordsByUri) : ''}${notes}`;
|
|
2763
2851
|
}
|
|
2764
2852
|
} else if (band2r.length || band3r.length || contextNotes.length) {
|
|
2765
2853
|
const parts = [];
|
|
2766
2854
|
if (band2r.length) parts.push(secondaryRegions(band2r, cardFor, recordsByUri));
|
|
2767
|
-
if (band3r.length) parts.push(`<p class="fold-lead"><b
|
|
2855
|
+
if (band3r.length) parts.push(`<p class="fold-lead"><b>${R.findings.sameNameLead}</b> ${R.findings.sameNameNote}</p>
|
|
2768
2856
|
${secondaryRegions(band3r, cardFor, recordsByUri)}`);
|
|
2769
|
-
if (contextNotes.length) parts.push(`<p class="fold-lead"><b
|
|
2857
|
+
if (contextNotes.length) parts.push(`<p class="fold-lead"><b>${R.findings.famousLead}</b> ${R.findings.famousNote}</p>
|
|
2770
2858
|
${contextNotesList(contextNotes)}`);
|
|
2771
|
-
tail += `\n\n <div class="sec"><span class="num"></span><h2>
|
|
2859
|
+
tail += `\n\n <div class="sec"><span class="num"></span><h2>Marks that can coexist</h2></div>
|
|
2772
2860
|
${parts.join('\n ')}`;
|
|
2773
2861
|
}
|
|
2774
2862
|
// The 2026-09-16 report redesign — the section heading and its routing notice go; the CARDS stay, or a
|
|
@@ -2778,40 +2866,24 @@ export function renderHtml(parsed, findings = [], coverage = [], opts = {}) {
|
|
|
2778
2866
|
covNum = num();
|
|
2779
2867
|
}
|
|
2780
2868
|
|
|
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;
|
|
2869
|
+
// The explicit dark pair, the typefaces, the favicon, the base sheet and the print rule are the shell's
|
|
2870
|
+
// (page-shell.mjs, which says why the dark pair is explicit only).
|
|
2796
2871
|
// D: the report LINKS the shared chrome (opts.chromeHref → <pool>/assets/chrome.css); direct callers with
|
|
2797
2872
|
// no chromeHref keep it inline. Link emitted after the <style> so chrome stays last in the cascade.
|
|
2798
2873
|
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">
|
|
2874
|
+
const doc = pageShell({
|
|
2875
|
+
title: `${productName ? `${esc(productName)} — ` : ''}${esc(fm.title || '')}`,
|
|
2876
|
+
css: (linkChrome ? '' : NAV_SHEET) + '\n' + REP_OVERRIDE + '\n' + CLEARANCE_PRINT,
|
|
2877
|
+
chromeHref: opts.chromeHref,
|
|
2878
|
+
body: `<div class="rep-stickyhead no-print" data-report-chrome>
|
|
2807
2879
|
<div class="topbar no-print">
|
|
2808
2880
|
${/* ONE BAR (the 2026-09-16 report redesign). The site bar is not rendered on a report, so the brand belongs here:
|
|
2809
2881
|
a reader met two stacked headers, and the lower one carried the only brand. */''}
|
|
2810
2882
|
${logoLockup({ mark: 16, cls: 'tb-lockup' })}
|
|
2811
|
-
${opts.homeHref ? `<a class="homebtn tb-back no-print" href="${escAttr(opts.homeHref)}" title="
|
|
2883
|
+
${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
2884
|
<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(--
|
|
2885
|
+
${/* 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>`}
|
|
2886
|
+
<span class="mono tb-matter" style="font-size:11px;color:var(--slate)">${esc(fm.matter || opts.runId || '')}${fm.title ? ' / ' + esc(fm.title) : ''}</span>
|
|
2815
2887
|
${/* A DATE, NOT A TIMESTAMP. This read "Issued on 2026-09-17 · 08:36 GMT+2" — the minute the file
|
|
2816
2888
|
was written, and the zone the machine that wrote it happened to be in. Neither tells a reader
|
|
2817
2889
|
anything, and on work that spans days it implies a precision the work does not have. Every mock
|
|
@@ -2820,19 +2892,19 @@ ${REPORT_FONT_STYLE}${FAVICON_LINK}${themeInitScript}
|
|
|
2820
2892
|
there — an archived run's stamp is not this publisher's to assume. */''}
|
|
2821
2893
|
${(() => {
|
|
2822
2894
|
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
|
|
2895
|
+
return d ? `<span class="mono tb-issued"><span aria-hidden="true">🗓 </span>${esc(R.topbar.issuedOn(d))}</span>` : '';
|
|
2824
2896
|
})()}
|
|
2825
|
-
<button type="button" class="tbbtn tb-ask no-print">✦ <span class="tb-lbl"
|
|
2897
|
+
<button type="button" class="tbbtn tb-ask no-print">✦ <span class="tb-lbl">${R.topbar.askAi}</span></button>
|
|
2826
2898
|
<div class="tb-menu">
|
|
2827
2899
|
${EXPORT_TOGGLE}
|
|
2828
2900
|
${exportPopover(`
|
|
2829
|
-
<div class="tb-pop-title"
|
|
2830
|
-
<button class="util primary" onclick="exportPDF()">⬇
|
|
2901
|
+
<div class="tb-pop-title">${esc(R.topbar.exportAndAudit)}</div>
|
|
2902
|
+
<button class="util primary" onclick="exportPDF()">⬇ ${R.exportPdfTicked}</button>
|
|
2831
2903
|
${excelBtn2}
|
|
2832
2904
|
<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"
|
|
2905
|
+
<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>
|
|
2906
|
+
<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>
|
|
2907
|
+
<p class="tb-hint">${R.topbar.exportHint}</p>
|
|
2836
2908
|
`)}
|
|
2837
2909
|
</div>
|
|
2838
2910
|
</div>
|
|
@@ -2840,6 +2912,7 @@ ${REPORT_FONT_STYLE}${FAVICON_LINK}${themeInitScript}
|
|
|
2840
2912
|
</div>
|
|
2841
2913
|
|
|
2842
2914
|
<div class="wrap">
|
|
2915
|
+
<main>
|
|
2843
2916
|
<!-- doc-52 §1 THE VERDICT — the answer leads: mark · band · one plain "subject to" line · the lawyer's
|
|
2844
2917
|
questions answered · the time-critical alert. Process + coverage detail are below and collapsible. -->
|
|
2845
2918
|
<header class="hero" id="summary">
|
|
@@ -2853,6 +2926,24 @@ ${REPORT_FONT_STYLE}${FAVICON_LINK}${themeInitScript}
|
|
|
2853
2926
|
${actionGroup(buckets.ans, 'ans')}
|
|
2854
2927
|
</header>
|
|
2855
2928
|
|
|
2929
|
+
<!-- doc-52 §3 WHAT ONLY YOU CAN CLOSE — forward decisions, plain English, directly after the verdict (owner, 2026-11-18:
|
|
2930
|
+
a reader who forwards the first pages forwards the actions with the conditions). Words unchanged. -->
|
|
2931
|
+
${buckets.you ? `<div class="sec" id="next"><span class="num"></span><h2>${R.next.title}</h2></div>
|
|
2932
|
+
<div class="panel actions"><div class="actgrp act-you">${renderProse(buckets.you.body)
|
|
2933
|
+
.replace(/\[Time-critical\]\s*/gi, `<span class="src cl" style="margin-right:6px">${R.next.timeCritical}</span> `)
|
|
2934
|
+
.replace(/\[Open question\]\s*/gi, `<span class="src" style="margin-right:6px">${R.next.openQuestion}</span> `)
|
|
2935
|
+
.replace(/\[Your decision\]\s*/gi, `<span class="src" style="margin-right:6px">${R.next.yourDecision}</span> `)
|
|
2936
|
+
.replace(/\[Monitor\]\s*/gi, `<span class="src" style="margin-right:6px">${R.next.monitor}</span> `)
|
|
2937
|
+
// — the fifth token. `filing-routine` was schema-valid and unreachable until the pipeline's
|
|
2938
|
+
// ADVISORY_TAG gained its fourth entry; without this replace the client reads the literal "[Filing
|
|
2939
|
+
// step]". A run assembled before that lands carries none and this replace is inert on it.
|
|
2940
|
+
.replace(/\[Filing step\]\s*/gi, `<span class="src" style="margin-right:6px">${R.next.filingStep}</span> `)
|
|
2941
|
+
// — the fourth token, and the one whose ABSENCE was the defect: an undated condition carried no
|
|
2942
|
+
// tag at all, so the items that block reliance were the only items in this section with no chip.
|
|
2943
|
+
// buildOnlyYouSection now mints it beside the other three; a run assembled before that lands has none
|
|
2944
|
+
// and this replace is inert on it.
|
|
2945
|
+
.replace(/\[Before you can rely\]\s*/gi, `<span class="src cl" style="margin-right:6px">${R.next.beforeYouCanRely}</span> `)}</div></div>` : ''}
|
|
2946
|
+
|
|
2856
2947
|
<!-- WP-56 B2 — THE MARK ITSELF: the standing distinctiveness + connotation read (EN and non-EN). It
|
|
2857
2948
|
frames everything below, so it sits with the verdict, above the conflict landscape. Advisory only —
|
|
2858
2949
|
carries no rating; legacy runs (no mark_assessment) render without it. Both variants. -->
|
|
@@ -2867,40 +2958,21 @@ ${REPORT_FONT_STYLE}${FAVICON_LINK}${themeInitScript}
|
|
|
2867
2958
|
|
|
2868
2959
|
${alsoConsideredSection(ruledOut, recordsByUri, opts)}
|
|
2869
2960
|
|
|
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
2961
|
<!-- The 2026-09-16 report redesign — WHAT WAS SEARCHED. The scope fold and the checks-we-ran narrative are gone
|
|
2888
2962
|
(owner, 2026-09-16: no coverage narrative on the page). What is left is counts, folded closed:
|
|
2889
2963
|
completed work appears as numbers and cleared names, never as the engine's account of itself. -->
|
|
2890
|
-
${whatWasSearchedSection(opts, coverage, findings, recordsByUri)}
|
|
2964
|
+
${whatWasSearchedSection(opts, coverage, findings, recordsByUri, fm)}
|
|
2965
|
+
</main>
|
|
2891
2966
|
|
|
2892
2967
|
<footer>
|
|
2893
2968
|
${/* 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.
|
|
2969
|
+
"Rated under" and "Run under project" are no longer written (owner, 2026-11-18). They were kept
|
|
2970
|
+
on the document as the reviewer's provenance and stripped from it at serve time, but every
|
|
2971
|
+
reader has reached a report through the portal since the 2026-07-20 cutover, so the lines
|
|
2972
|
+
served nobody and stayed hidden only while a markup-matched strip kept matching. The same facts
|
|
2973
|
+
stay in the run's own front matter (rated_under, run_under_project) and record. portal-report
|
|
2974
|
+
keeps its two strips for stored reports that carry the lines, which are served from their own
|
|
2975
|
+
bytes.
|
|
2904
2976
|
The product name lead goes: the identity line already says which search this is.
|
|
2905
2977
|
The run string is composed as "<date> · <provider>", and it was printed with neither part
|
|
2906
2978
|
labelled, so a bare date sat next to a matter identifier meaning nothing in particular. It is
|
|
@@ -2924,22 +2996,18 @@ ${REPORT_FONT_STYLE}${FAVICON_LINK}${themeInitScript}
|
|
|
2924
2996
|
const issuedOn = (String(opts.issued ?? '').match(/^\d{4}-\d{2}-\d{2}/) || [])[0] ?? opts.issued ?? null;
|
|
2925
2997
|
const parts = [
|
|
2926
2998
|
fm.matter ? `Matter ${esc(fm.matter)}` : '',
|
|
2927
|
-
searchedOn ?
|
|
2928
|
-
issuedOn ?
|
|
2999
|
+
searchedOn ? esc(R.searchedOn(searchedOn)) : '',
|
|
3000
|
+
issuedOn ? esc(R.issuedOn(issuedOn)) : '',
|
|
2929
3001
|
provider ? esc(provider) : '',
|
|
2930
3002
|
].filter(Boolean);
|
|
2931
3003
|
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>.` : '');
|
|
3004
|
+
return line;
|
|
2937
3005
|
})()}</span>
|
|
2938
3006
|
${logoLockup({ mark: 16 })}
|
|
2939
3007
|
</footer>
|
|
2940
3008
|
</div>
|
|
2941
|
-
<script>${PAGE_JS}</script
|
|
2942
|
-
|
|
3009
|
+
<script>${PAGE_JS}</script>`,
|
|
3010
|
+
});
|
|
2943
3011
|
return doc.replace('<!--SECTION-STRIP-->', sectionStrip(doc, STRIP));
|
|
2944
3012
|
}
|
|
2945
3013
|
|
|
@@ -2961,16 +3029,17 @@ if (isEntrypoint(import.meta.url)) {
|
|
|
2961
3029
|
// ── The office's own page for a fetched record, where the run's register publishes none of its own ─────
|
|
2962
3030
|
// publish addresses each fetched record from its own numbers (office-record-links.mjs) and hands the map
|
|
2963
3031
|
// in as `recordLinks`. Kept down here, below every line the rest of the tree cites by number.
|
|
2964
|
-
import { officeReasonSentences } from './office-record-links.mjs';
|
|
3032
|
+
import { officeReasonSentences, officeRecordLink } from './office-record-links.mjs';
|
|
2965
3033
|
|
|
2966
3034
|
// The label is the office and the number, linked where the office has a page. The handle names the
|
|
2967
3035
|
// vendor's record, not the office's, and a reader can look it up nowhere. With no link the number stands
|
|
2968
3036
|
// on its own beside the workbook note, and Scope says once, per office, why it is not a link.
|
|
2969
|
-
function officeRecordCell(uri, regUri, note) {
|
|
3037
|
+
function officeRecordCell(uri, regUri, note, label = null) { // `label` prints in place of the office's own, escaped like it
|
|
2970
3038
|
const l = RECORD_LINKS?.get(String(uri || '').toLowerCase());
|
|
2971
3039
|
if (!l?.label) return regUri(uri);
|
|
2972
|
-
|
|
2973
|
-
return
|
|
3040
|
+
const text = esc(label ?? l.label);
|
|
3041
|
+
if (hrefAttr(l.href)) return `<a href="${hrefAttr(l.href)}" target="_blank" rel="noopener noreferrer">${text}</a>`;
|
|
3042
|
+
return note ? `${text}<span class="reg-nolink">${note}</span>` : text;
|
|
2974
3043
|
}
|
|
2975
3044
|
|
|
2976
3045
|
// What a linked registration number opens and, once per office, why the rest are cited by number. Said
|
|
@@ -2979,7 +3048,7 @@ function officeRecordCell(uri, regUri, note) {
|
|
|
2979
3048
|
function officeLinkNote() {
|
|
2980
3049
|
if (!RECORD_LINKS) return '';
|
|
2981
3050
|
const linked = [...RECORD_LINKS.values()].some((l) => l?.href);
|
|
2982
|
-
return (linked ?
|
|
3051
|
+
return (linked ? `${LINK_WORDS.opensOfficePage} ` : '')
|
|
2983
3052
|
+ officeReasonSentences(RECORD_LINKS).map((s) => `${esc(s)} `).join('');
|
|
2984
3053
|
}
|
|
2985
3054
|
|
|
@@ -3000,6 +3069,6 @@ export function servedModelsLine(ids) {
|
|
|
3000
3069
|
const list = (Array.isArray(ids) ? ids : []).map((s) => String(s ?? '').trim()).filter(Boolean);
|
|
3001
3070
|
if (!list.length) return '';
|
|
3002
3071
|
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"
|
|
3072
|
+
const shown = claude ? list : list.map((id) => (CLAUDE_TIER_WORD_RE.test(id) ? R.claudeModel(id) : id));
|
|
3073
|
+
return `<p class="servedby" style="margin:10px 0 0;font-size:13px">${R.preparedWith(claude, shown.map(esc).join(', '))}</p>`;
|
|
3005
3074
|
}
|