@action-state-group/capsule-viewer 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2566,9 +2566,9 @@ var EvidenceGraph = (() => {
2566
2566
  scanMax: 1e3
2567
2567
  });
2568
2568
  CllError = class extends Error {
2569
- constructor(code, message, options) {
2569
+ constructor(code2, message, options) {
2570
2570
  super(message, options);
2571
- this.code = code;
2571
+ this.code = code2;
2572
2572
  this.name = "CllError";
2573
2573
  }
2574
2574
  code;
@@ -5073,6 +5073,7 @@ var EvidenceGraph = (() => {
5073
5073
  WORDING_PACK_VERSION: () => WORDING_PACK_VERSION,
5074
5074
  WordingPackError: () => WordingPackError,
5075
5075
  buildResultRoot: () => buildResultRoot,
5076
+ buildVerifiedBundleContext: () => buildVerifiedBundleContext,
5076
5077
  checkWordingPackInput: () => checkWordingPackInput,
5077
5078
  checkedSummaryLine: () => checkedSummaryLine,
5078
5079
  citesOneContract: () => citesOneContract,
@@ -5831,8 +5832,8 @@ var EvidenceGraph = (() => {
5831
5832
  if (!("references" in capsule))
5832
5833
  return [];
5833
5834
  const findings = [];
5834
- const add2 = (code, detail, check, severity = "error") => {
5835
- findings.push({ code, detail, check, severity });
5835
+ const add2 = (code2, detail, check, severity = "error") => {
5836
+ findings.push({ code: code2, detail, check, severity });
5836
5837
  };
5837
5838
  if (!Array.isArray(capsule.references)) {
5838
5839
  add2("references_malformed", "references MUST be an array (\xA75.5.5)", 1);
@@ -6054,8 +6055,8 @@ var EvidenceGraph = (() => {
6054
6055
  ];
6055
6056
  async function verifyClass1(capsule, store, extensions2 = {}) {
6056
6057
  const findings = [];
6057
- const add2 = (code, detail, check, severity = "error") => {
6058
- findings.push(check === void 0 ? { code, detail, severity } : { code, detail, severity, check });
6058
+ const add2 = (code2, detail, check, severity = "error") => {
6059
+ findings.push(check === void 0 ? { code: code2, detail, severity } : { code: code2, detail, severity, check });
6059
6060
  };
6060
6061
  const top = object2(capsule);
6061
6062
  if (top === void 0)
@@ -6432,11 +6433,11 @@ var EvidenceGraph = (() => {
6432
6433
  return Array.isArray(raw) ? raw : null;
6433
6434
  }
6434
6435
  function labelArray(value, key) {
6435
- const list = optionalArray(value, key);
6436
- if (list === null)
6436
+ const list2 = optionalArray(value, key);
6437
+ if (list2 === null)
6437
6438
  return bad(key);
6438
6439
  const labels = [];
6439
- for (const raw of list ?? []) {
6440
+ for (const raw of list2 ?? []) {
6440
6441
  if (!isLabel(raw))
6441
6442
  return bad(key);
6442
6443
  labels.push(raw);
@@ -6529,10 +6530,10 @@ var EvidenceGraph = (() => {
6529
6530
  const compare2 = [];
6530
6531
  let compareCarried = false;
6531
6532
  if (Object.hasOwn(raw, "compare")) {
6532
- const list = raw.compare;
6533
- if (!Array.isArray(list) || list.length === 0)
6533
+ const list2 = raw.compare;
6534
+ if (!Array.isArray(list2) || list2.length === 0)
6534
6535
  return bad("compare");
6535
- for (const item of list) {
6536
+ for (const item of list2) {
6536
6537
  if (!isString(item) || !validPointer(item))
6537
6538
  return bad("compare");
6538
6539
  compare2.push(item);
@@ -7179,9 +7180,9 @@ var EvidenceGraph = (() => {
7179
7180
  return headers;
7180
7181
  }
7181
7182
  async function verifyProducerEnvelope(capsuleId, data) {
7182
- const fail2 = (code, detail) => ({
7183
+ const fail2 = (code2, detail) => ({
7183
7184
  ok: false,
7184
- findings: [{ code, detail }],
7185
+ findings: [{ code: code2, detail }],
7185
7186
  capsuleId
7186
7187
  });
7187
7188
  if (!hex64.test(capsuleId))
@@ -8974,25 +8975,25 @@ ${body}
8974
8975
  };
8975
8976
  const root = copyOf(value);
8976
8977
  while (frames.length > 0) {
8977
- const frame = frames[frames.length - 1];
8978
- if ("keys" in frame) {
8979
- if (frame.index === frame.keys.length) {
8978
+ const frame2 = frames[frames.length - 1];
8979
+ if ("keys" in frame2) {
8980
+ if (frame2.index === frame2.keys.length) {
8980
8981
  frames.pop();
8981
8982
  continue;
8982
8983
  }
8983
- const key = frame.keys[frame.index++];
8984
- Object.defineProperty(frame.out, key, {
8985
- value: copyOf(frame.source[key]),
8984
+ const key = frame2.keys[frame2.index++];
8985
+ Object.defineProperty(frame2.out, key, {
8986
+ value: copyOf(frame2.source[key]),
8986
8987
  enumerable: true,
8987
8988
  writable: true,
8988
8989
  configurable: true
8989
8990
  });
8990
8991
  } else {
8991
- if (frame.index >= frame.source.length) {
8992
+ if (frame2.index >= frame2.source.length) {
8992
8993
  frames.pop();
8993
8994
  continue;
8994
8995
  }
8995
- frame.out.push(copyOf(frame.source[frame.index++]));
8996
+ frame2.out.push(copyOf(frame2.source[frame2.index++]));
8996
8997
  }
8997
8998
  }
8998
8999
  return root;
@@ -9869,14 +9870,14 @@ ${body}
9869
9870
  const target = asString(link.target);
9870
9871
  if (target === void 0)
9871
9872
  continue;
9872
- const list = inbound.get(target) ?? [];
9873
- list.push({
9873
+ const list2 = inbound.get(target) ?? [];
9874
+ list2.push({
9874
9875
  type: link.type,
9875
9876
  recordId: record.capsule_id,
9876
9877
  ...bookId === void 0 ? {} : { bookId },
9877
9878
  ...signer
9878
9879
  });
9879
- inbound.set(target, list);
9880
+ inbound.set(target, list2);
9880
9881
  }
9881
9882
  }
9882
9883
  return inbound;
@@ -10674,9 +10675,9 @@ ${body}
10674
10675
  const grouping = parseClaimGrouping(claim);
10675
10676
  if (grouping === void 0 || !order.has(grouping.checkId))
10676
10677
  continue;
10677
- const list = byConversation.get(grouping.conversationId) ?? [];
10678
- list.push(claim);
10679
- byConversation.set(grouping.conversationId, list);
10678
+ const list2 = byConversation.get(grouping.conversationId) ?? [];
10679
+ list2.push(claim);
10680
+ byConversation.set(grouping.conversationId, list2);
10680
10681
  }
10681
10682
  const contractRef = packRef(terms);
10682
10683
  const cited = new Set(result.claims.map((claim) => JSON.stringify([claim.contractRef, claim.requirementRef])));
@@ -10944,7 +10945,7 @@ ${body}
10944
10945
  const criterion = check?.criteria.find((c) => c.id === criterionId);
10945
10946
  return criterion === void 0 ? `${checkId}.${criterionId}` : `${criterion.label} (${check.question})`;
10946
10947
  };
10947
- const labelledReasonCode = (code) => code === void 0 ? void 0 : terms.reasonCodes[code];
10948
+ const labelledReasonCode = (code2) => code2 === void 0 ? void 0 : terms.reasonCodes[code2];
10948
10949
  const groups = /* @__PURE__ */ new Map();
10949
10950
  const structured = /* @__PURE__ */ new Map();
10950
10951
  const labels = /* @__PURE__ */ new Map();
@@ -10958,9 +10959,9 @@ ${body}
10958
10959
  continue;
10959
10960
  const label = labelledReasonCode(first.reasonCode);
10960
10961
  const key = label !== void 0 ? first.reasonCode : `${first.checkId}.${first.criterionId}`;
10961
- const list = groups.get(key) ?? [];
10962
- list.push(conversation);
10963
- groups.set(key, list);
10962
+ const list2 = groups.get(key) ?? [];
10963
+ list2.push(conversation);
10964
+ groups.set(key, list2);
10964
10965
  structured.set(key, label !== void 0);
10965
10966
  labels.set(key, label ?? labelOf(first.checkId, first.criterionId));
10966
10967
  }
@@ -11508,9 +11509,9 @@ ${body}
11508
11509
  "countersignature-receipts": "countersignature receipts"
11509
11510
  });
11510
11511
  var CHECKPOINT_NOT_CHECKED_NOTE = "This page could not check it, so the range and membership checks rest on a checkpoint the producer asserted.";
11511
- function verificationCheckWords(id, list, lists) {
11512
+ function verificationCheckWords(id, list2, lists) {
11512
11513
  const words = VERIFICATION_CHECK_WORDS[id];
11513
- return id === "checkpoint-signature" && list === "notChecked" && lists.passedWithoutCheckpoint ? `${words} ${CHECKPOINT_NOT_CHECKED_NOTE}` : words;
11514
+ return id === "checkpoint-signature" && list2 === "notChecked" && lists.passedWithoutCheckpoint ? `${words} ${CHECKPOINT_NOT_CHECKED_NOTE}` : words;
11514
11515
  }
11515
11516
  var STOPPED_BEFORE_CHECKPOINT = /* @__PURE__ */ new Set([
11516
11517
  "bundle_malformed",
@@ -12533,9 +12534,9 @@ ${body}
12533
12534
  const day = timestamp(row2, runs.field);
12534
12535
  if (day < window.from || day > window.to) continue;
12535
12536
  const u = unitOf(day, unit);
12536
- const list = runRowsOf.get(u);
12537
- if (list === void 0) runRowsOf.set(u, [row2]);
12538
- else list.push(row2);
12537
+ const list2 = runRowsOf.get(u);
12538
+ if (list2 === void 0) runRowsOf.set(u, [row2]);
12539
+ else list2.push(row2);
12539
12540
  }
12540
12541
  }
12541
12542
  if (selected.length !== statement.population)
@@ -12559,9 +12560,9 @@ ${body}
12559
12560
  const rowsByKey = /* @__PURE__ */ new Map();
12560
12561
  for (const row2 of selected) {
12561
12562
  const text2 = keyText(keys, keyOf.get(row2));
12562
- const list = rowsByKey.get(text2);
12563
- if (list === void 0) rowsByKey.set(text2, [row2]);
12564
- else list.push(row2);
12563
+ const list2 = rowsByKey.get(text2);
12564
+ if (list2 === void 0) rowsByKey.set(text2, [row2]);
12565
+ else list2.push(row2);
12565
12566
  }
12566
12567
  const groups = [];
12567
12568
  const product = (i, key) => {
@@ -12627,12 +12628,218 @@ ${body}
12627
12628
  population: selected.length,
12628
12629
  ...window === void 0 ? {} : { window },
12629
12630
  runs: drawsRuns,
12631
+ ...temporal === void 0 ? {} : {
12632
+ units: units.map((unit) => ({
12633
+ unit,
12634
+ notRun: drawsRuns && (runRowsOf.get(unit) ?? []).length === 0
12635
+ }))
12636
+ },
12630
12637
  groups
12631
12638
  };
12632
12639
  }
12633
12640
 
12634
- // src/chart-dataset.ts
12641
+ // src/report-view.ts
12635
12642
  var isObj2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
12643
+ var refuse2 = (reason, message, pointer) => {
12644
+ throw new ChartRefusal(reason, message, pointer);
12645
+ };
12646
+ var ID = /^[a-z][a-z0-9_]{0,31}$/u;
12647
+ var isView = (value) => isObj2(value) && Object.hasOwn(value, "view");
12648
+ var keyChannel = (chart) => chart.keys.find((k) => k !== "x");
12649
+ function onlyKeys2(value, allowed, at) {
12650
+ for (const key of Object.keys(value))
12651
+ if (!allowed.includes(key))
12652
+ refuse2(
12653
+ "view-unsupported-member",
12654
+ `${at}/${key} is not in the accepted subset`,
12655
+ `${at}/${key}`
12656
+ );
12657
+ }
12658
+ function readEntry(value, at, seen) {
12659
+ if (!isObj2(value))
12660
+ return refuse2("view-unsupported-member", `${at} must be an object`, at);
12661
+ onlyKeys2(value, ["id", "chart"], at);
12662
+ const { id, chart } = value;
12663
+ if (typeof id !== "string" || !ID.test(id))
12664
+ refuse2(
12665
+ "view-unsupported-member",
12666
+ `${at}/id must match ${ID.source}`,
12667
+ `${at}/id`
12668
+ );
12669
+ if (seen.has(id))
12670
+ refuse2("view-unsupported-member", `${at}/id ${String(id)} is repeated`, at);
12671
+ seen.add(id);
12672
+ if (chart === void 0)
12673
+ refuse2("view-unsupported-member", `${at}/chart is missing`, `${at}/chart`);
12674
+ return { id, spec: chart };
12675
+ }
12676
+ var list = (value, at, min) => {
12677
+ if (!Array.isArray(value) || value.length < min)
12678
+ refuse2(
12679
+ "view-unsupported-member",
12680
+ `${at} must be a list of at least ${String(min)}`,
12681
+ at
12682
+ );
12683
+ return value;
12684
+ };
12685
+ var monthDays = (year, month) => month === 2 ? year % 4 === 0 && year % 100 !== 0 || year % 400 === 0 ? 29 : 28 : [4, 6, 9, 11].includes(month) ? 30 : 31;
12686
+ function wholeMonths(window) {
12687
+ const [ty, tm, td] = window.to.split("-").map(Number);
12688
+ return window.from.endsWith("-01") && td === monthDays(ty, tm);
12689
+ }
12690
+ function daysOf(chart) {
12691
+ return new Map((chart.units ?? []).map((u) => [u.unit, u.notRun]));
12692
+ }
12693
+ function unplacedOf(parts) {
12694
+ const seqs = /* @__PURE__ */ new Set();
12695
+ for (const { chart } of parts)
12696
+ for (const g of chart.groups)
12697
+ if (g.notRun) for (const row2 of g.rows) seqs.add(row2.seq);
12698
+ return seqs.size;
12699
+ }
12700
+ function checkFit(id, chart, extraKeys, extraWhat) {
12701
+ const x = chart.channels.x;
12702
+ if (chart.temporal !== "x" || x === void 0 || x.timeUnit !== "utcyearmonthdate")
12703
+ refuse2(
12704
+ "view-chart-shape",
12705
+ `${id}: x must be a temporal field in the unit utcyearmonthdate, so each group is one UTC day`
12706
+ );
12707
+ if (chart.channels[chart.aggregate]?.aggregate !== "count")
12708
+ refuse2("view-chart-shape", `${id}: the aggregate must be count`);
12709
+ if (!extraKeys(chart.keys.filter((k) => k !== "x").length))
12710
+ refuse2(
12711
+ "view-chart-shape",
12712
+ `${id}: ${extraWhat} besides x, or the chart fits no grid`
12713
+ );
12714
+ if (!chart.runs || chart.window === void 0)
12715
+ refuse2(
12716
+ "view-runs-unsealed",
12717
+ `${id}: the plan does not say which days ran (it needs exactly one window node and the chart's runs), so a day nothing ran would read 0`
12718
+ );
12719
+ }
12720
+ function checkTogether(parts, disjoint) {
12721
+ const first = parts[0];
12722
+ const window = first.chart.window;
12723
+ const days = daysOf(first.chart);
12724
+ const owner = /* @__PURE__ */ new Map();
12725
+ for (const { id, chart } of parts) {
12726
+ const mine = daysOf(chart);
12727
+ for (const [day, notRun] of days)
12728
+ if (mine.get(day) !== notRun)
12729
+ refuse2(
12730
+ "view-runs-mismatch",
12731
+ `${id} and ${first.id} disagree on whether ${day} ran`
12732
+ );
12733
+ if (!disjoint) continue;
12734
+ for (const g of chart.groups)
12735
+ for (const row2 of g.rows) {
12736
+ const was = owner.get(row2.seq);
12737
+ if (was !== void 0 && was !== id)
12738
+ refuse2(
12739
+ "view-overlap",
12740
+ `record seq ${String(row2.seq)} is counted by both ${was} and ${id}`
12741
+ );
12742
+ owner.set(row2.seq, id);
12743
+ }
12744
+ }
12745
+ return window;
12746
+ }
12747
+ function checkView(value, dataset) {
12748
+ if (!isObj2(value))
12749
+ return refuse2("view-unsupported-member", "a view must be an object", "");
12750
+ const kind = value.view;
12751
+ const checkOne = (id, spec, at) => {
12752
+ try {
12753
+ return { id, chart: checkChart(spec, dataset) };
12754
+ } catch (err) {
12755
+ if (err instanceof ChartRefusal)
12756
+ throw new ChartRefusal(
12757
+ err.reason,
12758
+ `${id}: ${err.message.slice(err.reason.length + 2)}`,
12759
+ err.pointer === void 0 ? at : `${at}${err.pointer}`
12760
+ );
12761
+ throw err;
12762
+ }
12763
+ };
12764
+ const seen = /* @__PURE__ */ new Set();
12765
+ if (kind === "calendar") {
12766
+ onlyKeys2(value, ["view", "lanes"], "");
12767
+ const lanes = list(value.lanes, "/lanes", 1).map(
12768
+ (raw, i) => readEntry(raw, `/lanes/${String(i)}`, seen)
12769
+ );
12770
+ const checked = lanes.map(
12771
+ (l, i) => checkOne(l.id, l.spec, `/lanes/${String(i)}/chart`)
12772
+ );
12773
+ for (const lane of checked)
12774
+ checkFit(lane.id, lane.chart, (n) => n <= 1, "at most one key channel");
12775
+ const window = checkTogether(checked, false);
12776
+ if (!wholeMonths(window))
12777
+ refuse2(
12778
+ "view-window-not-months",
12779
+ `a calendar's window runs from a month's first day to a month's last day; ${window.from} to ${window.to} does not`
12780
+ );
12781
+ return {
12782
+ view: "calendar",
12783
+ window,
12784
+ unplaced: unplacedOf(checked),
12785
+ lanes: checked
12786
+ };
12787
+ }
12788
+ if (kind === "by-period") {
12789
+ onlyKeys2(value, ["view", "count", "columns"], "");
12790
+ const count2 = readEntry(value.count, "/count", seen);
12791
+ const columns = (value.columns === void 0 ? [] : list(value.columns, "/columns", 0)).map((raw, i) => readEntry(raw, `/columns/${String(i)}`, seen));
12792
+ const all = [count2, ...columns].map(
12793
+ (e, i) => checkOne(
12794
+ e.id,
12795
+ e.spec,
12796
+ i === 0 ? "/count/chart" : `/columns/${String(i - 1)}/chart`
12797
+ )
12798
+ );
12799
+ for (const part of all)
12800
+ checkFit(
12801
+ part.id,
12802
+ part.chart,
12803
+ (n) => n === 1,
12804
+ "exactly one key channel, the requirement,"
12805
+ );
12806
+ const field = all[0].chart.channels[all[0].chart.keys.find((k) => k !== "x")].field;
12807
+ for (const part of all) {
12808
+ const mine = part.chart.channels[part.chart.keys.find((k) => k !== "x")];
12809
+ if (mine.field !== field)
12810
+ refuse2(
12811
+ "view-chart-shape",
12812
+ `${part.id} groups by ${String(mine.field)}, not ${String(field)}`
12813
+ );
12814
+ }
12815
+ const types = new Set(
12816
+ all.flatMap(
12817
+ (p) => p.chart.groups.map((g) => typeof g.key[keyChannel(p.chart)])
12818
+ )
12819
+ );
12820
+ if (types.size > 1)
12821
+ refuse2(
12822
+ "view-chart-shape",
12823
+ `the charts' ${String(field)} values are of more than one type (${[...types].sort().join(", ")}), so a row would join unlike values`
12824
+ );
12825
+ const window = checkTogether(all, true);
12826
+ return {
12827
+ view: "by-period",
12828
+ window,
12829
+ unplaced: unplacedOf(all),
12830
+ count: all[0],
12831
+ columns: all.slice(1)
12832
+ };
12833
+ }
12834
+ return refuse2(
12835
+ "view-unsupported-member",
12836
+ 'view must be "calendar" or "by-period"',
12837
+ "/view"
12838
+ );
12839
+ }
12840
+
12841
+ // src/chart-dataset.ts
12842
+ var isObj3 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
12636
12843
  var RECORD_HEADER_MEMBER = "evidence_record_header";
12637
12844
  var DATASET_VERSION = "evidence-dataset-v0";
12638
12845
  var HEX64 = /^[0-9a-f]{64}$/u;
@@ -12641,15 +12848,15 @@ ${body}
12641
12848
  };
12642
12849
  function digestRef(value, what) {
12643
12850
  if (value === void 0) return void 0;
12644
- if (!isObj2(value) || value.digest_alg !== "SHA-256" || typeof value.digest !== "string" || !HEX64.test(value.digest))
12851
+ if (!isObj3(value) || value.digest_alg !== "SHA-256" || typeof value.digest !== "string" || !HEX64.test(value.digest))
12645
12852
  return invalid(`${what} is not {digest_alg: "SHA-256", digest: <64-hex>}`);
12646
12853
  return value.digest;
12647
12854
  }
12648
12855
  function resultDocument2(context, result) {
12649
12856
  const member = disclosureOf(context, result.capsuleId, result.member);
12650
- if (member.state !== "disclosed" || !isObj2(member.payload)) return void 0;
12857
+ if (member.state !== "disclosed" || !isObj3(member.payload)) return void 0;
12651
12858
  const document2 = result.form === "book" ? member.payload.statement : member.payload;
12652
- return isObj2(document2) ? document2 : void 0;
12859
+ return isObj3(document2) ? document2 : void 0;
12653
12860
  }
12654
12861
  async function digestOf(value) {
12655
12862
  try {
@@ -12663,7 +12870,7 @@ ${body}
12663
12870
  async function documentsByDigest(context) {
12664
12871
  const found = /* @__PURE__ */ new Map();
12665
12872
  const consider = async (value) => {
12666
- if (!isObj2(value) || value.dataset_version === void 0 && !(isObj2(value.header) && value.header.ir_version !== void 0))
12873
+ if (!isObj3(value) || value.dataset_version === void 0 && !(isObj3(value.header) && value.header.ir_version !== void 0))
12667
12874
  return;
12668
12875
  const digest = await digestOf(value);
12669
12876
  if (digest !== void 0) found.set(digest, value);
@@ -12673,10 +12880,10 @@ ${body}
12673
12880
  const disclosed = disclosureOf(context, record.capsule_id, member);
12674
12881
  if (disclosed.state !== "disclosed") continue;
12675
12882
  await consider(disclosed.payload);
12676
- if (isObj2(disclosed.payload)) await consider(disclosed.payload.statement);
12883
+ if (isObj3(disclosed.payload)) await consider(disclosed.payload.statement);
12677
12884
  }
12678
12885
  const inline = record[RECORD_HEADER_MEMBER];
12679
- if (isObj2(inline)) await consider(inline.statement);
12886
+ if (isObj3(inline)) await consider(inline.statement);
12680
12887
  }
12681
12888
  return found;
12682
12889
  }
@@ -12684,7 +12891,7 @@ ${body}
12684
12891
  const found = /* @__PURE__ */ new Map();
12685
12892
  for (const record of context.records) {
12686
12893
  const inline = record[RECORD_HEADER_MEMBER];
12687
- if (isObj2(inline)) {
12894
+ if (isObj3(inline)) {
12688
12895
  const digest2 = await digestOf(inline);
12689
12896
  if (digest2 !== void 0)
12690
12897
  found.set(digest2, { header: inline, recordId: record.capsule_id });
@@ -12692,7 +12899,7 @@ ${body}
12692
12899
  }
12693
12900
  const digest = committedDigest(record, "agent_input");
12694
12901
  const disclosed = disclosureOf(context, record.capsule_id, "agent_input");
12695
- if (digest !== void 0 && disclosed.state === "disclosed" && isObj2(disclosed.payload))
12902
+ if (digest !== void 0 && disclosed.state === "disclosed" && isObj3(disclosed.payload))
12696
12903
  found.set(digest, {
12697
12904
  header: disclosed.payload,
12698
12905
  recordId: record.capsule_id
@@ -12723,7 +12930,7 @@ ${body}
12723
12930
  const rows = [];
12724
12931
  let last = -1;
12725
12932
  for (const raw of dataset.rows) {
12726
- if (!isObj2(raw) || Object.keys(raw).sort().join(",") !== "digest,digest_alg,record_type,seq" || !Number.isSafeInteger(raw.seq) || raw.seq <= last || typeof raw.record_type !== "string" || raw.digest_alg !== "SHA-256" || typeof raw.digest !== "string" || !HEX64.test(raw.digest))
12933
+ if (!isObj3(raw) || Object.keys(raw).sort().join(",") !== "digest,digest_alg,record_type,seq" || !Number.isSafeInteger(raw.seq) || raw.seq <= last || typeof raw.record_type !== "string" || raw.digest_alg !== "SHA-256" || typeof raw.digest !== "string" || !HEX64.test(raw.digest))
12727
12934
  return invalid(
12728
12935
  "a dataset row is not {seq, record_type, digest_alg, digest}, in seq order"
12729
12936
  );
@@ -12962,7 +13169,7 @@ ${body}
12962
13169
  return wrap;
12963
13170
  }
12964
13171
  function renderTurns(turns, w) {
12965
- const list = el("ol", "turns");
13172
+ const list2 = el("ol", "turns");
12966
13173
  turns.forEach((turn, index) => {
12967
13174
  const role = turn.role === "user" || turn.role === "assistant" || turn.role === "tool" || turn.role === "system" ? turn.role : "other";
12968
13175
  const item = el("li", `turn ${role}`);
@@ -12989,9 +13196,9 @@ ${body}
12989
13196
  }
12990
13197
  item.append(line);
12991
13198
  }
12992
- list.append(item);
13199
+ list2.append(item);
12993
13200
  });
12994
- return list;
13201
+ return list2;
12995
13202
  }
12996
13203
  function recordAddress(recordId) {
12997
13204
  return `record-${recordId}`;
@@ -13032,7 +13239,7 @@ ${body}
13032
13239
  details.append(element2("summary", summary));
13033
13240
  const body = el("div", "cv-ev-body");
13034
13241
  body.append(el("p", "cv-ev-k", w.t("evidence.records")));
13035
- const list = el("ul", "cv-ev-list");
13242
+ const list2 = el("ul", "cv-ev-list");
13036
13243
  for (const digest of cited) {
13037
13244
  const item = element2("li");
13038
13245
  item.dataset.cited = digest;
@@ -13040,26 +13247,26 @@ ${body}
13040
13247
  link.setAttribute("href", `#${recordAddress(digest)}`);
13041
13248
  link.append(element2("code", digest));
13042
13249
  item.append(link);
13043
- list.append(item);
13250
+ list2.append(item);
13044
13251
  }
13045
13252
  for (const digest of missing) {
13046
13253
  const item = element2("li");
13047
13254
  item.dataset.missing = digest;
13048
13255
  item.append(element2("code", digest), ` ${w.t("evidence.not-in-bundle")}`);
13049
- list.append(item);
13256
+ list2.append(item);
13050
13257
  }
13051
13258
  if (citeNothing > 0) {
13052
13259
  const item = element2("li", w.p("evidence.no-evidence", citeNothing));
13053
13260
  item.dataset.noEvidence = String(citeNothing);
13054
- list.append(item);
13261
+ list2.append(item);
13055
13262
  }
13056
13263
  const uncited = counted.length - claims.length;
13057
13264
  if (uncited > 0) {
13058
13265
  const item = element2("li", w.p("evidence.uncited", uncited));
13059
13266
  item.dataset.uncited = String(uncited);
13060
- list.append(item);
13267
+ list2.append(item);
13061
13268
  }
13062
- body.append(list);
13269
+ body.append(list2);
13063
13270
  details.append(body);
13064
13271
  details.addEventListener("toggle", () => {
13065
13272
  const component = showEvidenceComponent();
@@ -13284,6 +13491,21 @@ ${s} dl.prov dd{margin:0;color:var(--ink);word-break:break-word}
13284
13491
  .cv-chart .cv-ev-label{font-size:12px;color:var(--slate)}
13285
13492
  .cv-chart-refused{margin:0 0 16px;padding:10px 14px;border:1px solid var(--bad);border-radius:10px;background:var(--bad-l);font-size:14px}
13286
13493
  @media print{.cv-chart{break-inside:avoid}}
13494
+ .cv-view{margin:0 0 16px;padding:14px 16px;border:1px solid var(--line);border-radius:10px;background:#fff}
13495
+ .cv-view figcaption{font-size:13px;color:var(--slate);margin:6px 0 8px}
13496
+ .cv-view .cv-chart-derived{display:inline-block;margin:0 0 8px;padding:2px 8px;border:1px solid var(--line);border-radius:8px;background:var(--cream);font-size:12px}
13497
+ .cv-view .cv-view-legend{margin:0 0 8px;padding:0;list-style:none;font-size:12px;color:var(--slate)}
13498
+ .cv-view .cv-unplaced{margin:0 0 8px;font-size:13px;color:var(--slate)}
13499
+ .cv-view .cv-view-table{overflow-x:auto;margin:0 0 8px}
13500
+ .cv-view table{border-collapse:collapse;font-size:13px;min-width:100%}
13501
+ .cv-view caption{text-align:left;font-weight:600;margin:0 0 4px}
13502
+ .cv-view th,.cv-view td{text-align:left;padding:3px 8px;border:1px solid var(--line);vertical-align:top}
13503
+ .cv-cal{table-layout:fixed;min-width:560px}
13504
+ .cv-cal .cv-dn{font-weight:600;font-size:12px}
13505
+ .cv-cal .cv-lane{margin:2px 0;overflow-wrap:anywhere}
13506
+ .cv-cal td[data-not-run],.cv-period td[data-not-run]{color:var(--slate);font-style:italic;background:repeating-linear-gradient(45deg,var(--cream),var(--cream) 4px,#fff 4px,#fff 8px)}
13507
+ .cv-view .cv-ev-label,.cv-view .cv-nr{font-size:12px;color:var(--slate)}
13508
+ @media print{.cv-view{break-inside:avoid}}
13287
13509
  `;
13288
13510
  var SERIES = [
13289
13511
  "#232F42",
@@ -13536,7 +13758,7 @@ ${s} dl.prov dd{margin:0;color:var(--ink);word-break:break-word}
13536
13758
  details.append(el2("summary", void 0, w.t("evidence.show")));
13537
13759
  const body = el2("div", "cv-ev-body");
13538
13760
  body.append(el2("p", "cv-ev-k", w.t("chart.evidence.records")));
13539
- const list = el2("ul", "cv-ev-list");
13761
+ const list2 = el2("ul", "cv-ev-list");
13540
13762
  for (const id of ids) {
13541
13763
  const item = el2("li");
13542
13764
  item.dataset.cited = id;
@@ -13544,9 +13766,9 @@ ${s} dl.prov dd{margin:0;color:var(--ink);word-break:break-word}
13544
13766
  link.setAttribute("href", `#${recordAddress(id)}`);
13545
13767
  link.append(el2("code", void 0, id));
13546
13768
  item.append(link);
13547
- list.append(item);
13769
+ list2.append(item);
13548
13770
  }
13549
- body.append(list);
13771
+ body.append(list2);
13550
13772
  details.append(body);
13551
13773
  return details;
13552
13774
  }
@@ -13623,6 +13845,288 @@ ${s} dl.prov dd{margin:0;color:var(--ink);word-break:break-word}
13623
13845
  return section;
13624
13846
  }
13625
13847
 
13848
+ // src/report-view-render.ts
13849
+ function el3(tag, className, text2) {
13850
+ const node = document.createElement(tag);
13851
+ if (className !== void 0) node.className = className;
13852
+ if (text2 !== void 0) node.textContent = text2;
13853
+ return node;
13854
+ }
13855
+ var code = (text2) => el3("code", void 0, text2);
13856
+ var scalarText2 = (value) => value === void 0 ? "" : String(value);
13857
+ function utcMs(day) {
13858
+ const [y, m, d] = day.split("-").map(Number);
13859
+ const date = /* @__PURE__ */ new Date(0);
13860
+ date.setUTCFullYear(y, m - 1, d);
13861
+ return date.getTime();
13862
+ }
13863
+ var DAY = 864e5;
13864
+ var isoOf = (ms) => new Date(ms).toISOString().slice(0, 10);
13865
+ var weekdayOf = (day) => (new Date(utcMs(day)).getUTCDay() + 6) % 7;
13866
+ var mondayOf = (day) => isoOf(utcMs(day) - weekdayOf(day) * DAY);
13867
+ function frame(view, index, sha2564, w, parts) {
13868
+ const figure = el3("figure", "cv-view");
13869
+ figure.setAttribute(CHART_ATTRIBUTE, String(index));
13870
+ figure.dataset.view = view.view;
13871
+ figure.dataset.chartSha256 = sha2564;
13872
+ const caption = el3(
13873
+ "figcaption",
13874
+ void 0,
13875
+ w.t("chart.window", { from: view.window.from, to: view.window.to })
13876
+ );
13877
+ figure.append(caption);
13878
+ figure.append(el3("p", "cv-chart-derived", w.t("chart.derived")));
13879
+ const legend = el3("ul", "cv-view-legend");
13880
+ for (const { id, chart } of parts) {
13881
+ const item = el3("li");
13882
+ item.dataset.viewChart = id;
13883
+ item.append(code(id), ` ${w.p("chart.population", chart.population)}`);
13884
+ legend.append(item);
13885
+ }
13886
+ figure.append(legend);
13887
+ if (view.unplaced > 0) {
13888
+ const note = el3("p", "cv-unplaced", w.p("view.unplaced", view.unplaced));
13889
+ note.dataset.unplaced = String(view.unplaced);
13890
+ figure.append(note);
13891
+ }
13892
+ return figure;
13893
+ }
13894
+ function groupsOn(chart, day) {
13895
+ return chart.groups.filter((g) => g.key.x === day);
13896
+ }
13897
+ function laneCell(lane, index, day, w) {
13898
+ const wrap = el3("div", "cv-lane");
13899
+ wrap.dataset.lane = lane.id;
13900
+ wrap.append(code(lane.id), " ");
13901
+ const groups = groupsOn(lane.chart, day);
13902
+ const counted = groups.filter((g) => (g.value ?? 0) > 0);
13903
+ const shown2 = counted.length > 0 ? counted : groups.length > 0 ? groups.slice(0, 1) : [{ key: {}, value: 0, notRun: false, rows: [], runRows: [] }];
13904
+ shown2.forEach((g, i) => {
13905
+ const key = `view-${String(index)}-${lane.id}-${day}-${String(i)}`;
13906
+ const extra = lane.chart.keys.filter((k) => k !== "x");
13907
+ const name = extra.map((k) => scalarText2(g.key[k])).join(" \xB7 ");
13908
+ if (extra.length > 0 && (g.value ?? 0) > 0)
13909
+ wrap.append(el3("span", "cv-lane-key", `${name} \xD7 `));
13910
+ const value = el3("span", void 0, String(g.value));
13911
+ value.dataset.chartValue = key;
13912
+ wrap.append(value, " ", valueEvidence(key, `${lane.id} ${day}`, g, w));
13913
+ });
13914
+ return wrap;
13915
+ }
13916
+ function renderCalendar(view, index, sha2564, w) {
13917
+ const figure = frame(view, index, sha2564, w, view.lanes);
13918
+ const first = view.lanes[0];
13919
+ const notRun = new Set(
13920
+ (first.chart.units ?? []).filter((u) => u.notRun).map((u) => u.unit)
13921
+ );
13922
+ const months = [];
13923
+ for (let ms = utcMs(view.window.from); ms <= utcMs(view.window.to); ms += DAY) {
13924
+ const month = isoOf(ms).slice(0, 7);
13925
+ if (months[months.length - 1] !== month) months.push(month);
13926
+ }
13927
+ const scroll = el3("div", "cv-view-table");
13928
+ for (const month of months) {
13929
+ const table2 = el3("table", "cv-cal");
13930
+ table2.dataset.month = month;
13931
+ table2.append(el3("caption", void 0, month));
13932
+ const head2 = el3("tr");
13933
+ for (let d = 1; d <= 7; d++) {
13934
+ const th = el3("th", void 0, w.t(`calendar.weekday.${String(d)}`));
13935
+ th.setAttribute("scope", "col");
13936
+ head2.append(th);
13937
+ }
13938
+ const thead = el3("thead");
13939
+ thead.append(head2);
13940
+ const tbody = el3("tbody");
13941
+ const first1 = `${month}-01`;
13942
+ const last = (() => {
13943
+ const [y, m] = month.split("-").map(Number);
13944
+ const d = /* @__PURE__ */ new Date(0);
13945
+ d.setUTCFullYear(y, m, 0);
13946
+ return d.getUTCDate();
13947
+ })();
13948
+ let row2 = el3("tr");
13949
+ for (let pad = 0; pad < weekdayOf(first1); pad++)
13950
+ row2.append(el3("td", "cv-pad"));
13951
+ for (let n = 1; n <= last; n++) {
13952
+ const day = `${month}-${String(n).padStart(2, "0")}`;
13953
+ const cell = el3("td", "cv-day");
13954
+ cell.dataset.day = day;
13955
+ cell.append(el3("div", "cv-dn", String(n).padStart(2, "0")));
13956
+ if (notRun.has(day)) {
13957
+ cell.dataset.notRun = "";
13958
+ cell.append(el3("div", "cv-nr", w.t("chart.not_run")));
13959
+ } else
13960
+ for (const lane of view.lanes)
13961
+ cell.append(laneCell(lane, index, day, w));
13962
+ row2.append(cell);
13963
+ if (weekdayOf(day) === 6 || n === last) {
13964
+ tbody.append(row2);
13965
+ row2 = el3("tr");
13966
+ }
13967
+ }
13968
+ table2.append(thead, tbody);
13969
+ scroll.append(table2);
13970
+ }
13971
+ figure.append(scroll);
13972
+ return figure;
13973
+ }
13974
+ var groupOf = (sum) => ({
13975
+ key: {},
13976
+ value: sum.value,
13977
+ notRun: false,
13978
+ rows: sum.rows,
13979
+ runRows: []
13980
+ });
13981
+ function renderByPeriod(view, index, sha2564, w) {
13982
+ const parts = [view.count, ...view.columns];
13983
+ const figure = frame(view, index, sha2564, w, parts);
13984
+ const keyOf = (chart) => chart.keys.find((k) => k !== "x");
13985
+ const field = view.count.chart.channels[keyOf(view.count.chart)].field;
13986
+ const requirements = [];
13987
+ for (const p of parts)
13988
+ for (const g of p.chart.groups) {
13989
+ const v = g.key[keyOf(p.chart)];
13990
+ if (!requirements.some((r) => r === v)) requirements.push(v);
13991
+ }
13992
+ requirements.sort(compareScalar);
13993
+ const weeks = /* @__PURE__ */ new Map();
13994
+ for (const u of view.count.chart.units ?? []) {
13995
+ const monday = mondayOf(u.unit);
13996
+ const week = weeks.get(monday) ?? { days: [], notRun: /* @__PURE__ */ new Set() };
13997
+ week.days.push(u.unit);
13998
+ if (u.notRun) week.notRun.add(u.unit);
13999
+ weeks.set(monday, week);
14000
+ }
14001
+ const windowNotRun = (view.count.chart.units ?? []).filter(
14002
+ (u) => u.notRun
14003
+ ).length;
14004
+ const windowDays = (view.count.chart.units ?? []).length;
14005
+ const mondays = [...weeks.keys()].sort();
14006
+ const table2 = el3("table", "cv-period");
14007
+ const top = el3("tr");
14008
+ const reqHead = el3("th");
14009
+ reqHead.setAttribute("scope", "col");
14010
+ reqHead.setAttribute("rowspan", "2");
14011
+ reqHead.append(code(field));
14012
+ const countHead = el3("th");
14013
+ countHead.setAttribute("scope", "colgroup");
14014
+ countHead.setAttribute("colspan", String(mondays.length));
14015
+ countHead.append(code(view.count.id));
14016
+ top.append(reqHead, countHead);
14017
+ for (const col of view.columns) {
14018
+ const th = el3("th");
14019
+ th.setAttribute("scope", "col");
14020
+ th.setAttribute("rowspan", "2");
14021
+ th.append(code(col.id));
14022
+ top.append(th);
14023
+ }
14024
+ const second = el3("tr");
14025
+ for (const monday of mondays) {
14026
+ const th = el3("th", void 0, w.t("period.week", { date: monday }));
14027
+ th.setAttribute("scope", "col");
14028
+ th.dataset.week = monday;
14029
+ second.append(th);
14030
+ }
14031
+ const thead = el3("thead");
14032
+ thead.append(top, second);
14033
+ const sumOver = (chart, requirement, days) => {
14034
+ const sum = { value: 0, rows: [] };
14035
+ for (const g of chart.groups) {
14036
+ if (g.key[keyOf(chart)] !== requirement || g.notRun) continue;
14037
+ if (days !== void 0 && !days.has(g.key.x)) continue;
14038
+ sum.value += g.value ?? 0;
14039
+ sum.rows.push(...g.rows);
14040
+ }
14041
+ return sum;
14042
+ };
14043
+ const tbody = el3("tbody");
14044
+ requirements.forEach((requirement, r) => {
14045
+ const tr = el3("tr");
14046
+ tr.dataset.requirement = String(requirement);
14047
+ const th = el3("th", void 0, String(requirement));
14048
+ th.setAttribute("scope", "row");
14049
+ tr.append(th);
14050
+ mondays.forEach((monday, m) => {
14051
+ const week = weeks.get(monday);
14052
+ const td = el3("td");
14053
+ td.dataset.week = monday;
14054
+ if (week.notRun.size === week.days.length) {
14055
+ td.dataset.notRun = "";
14056
+ td.textContent = w.t("chart.not_run");
14057
+ } else {
14058
+ const key = `view-${String(index)}-r${String(r)}-w${String(m)}`;
14059
+ const live = new Set(week.days.filter((d) => !week.notRun.has(d)));
14060
+ const sum = sumOver(view.count.chart, requirement, live);
14061
+ const value = el3("span", void 0, String(sum.value));
14062
+ value.dataset.chartValue = key;
14063
+ td.append(
14064
+ value,
14065
+ " ",
14066
+ valueEvidence(
14067
+ key,
14068
+ `${String(requirement)} ${monday}`,
14069
+ groupOf(sum),
14070
+ w
14071
+ )
14072
+ );
14073
+ if (week.notRun.size > 0) {
14074
+ const note = el3(
14075
+ "small",
14076
+ "cv-nr",
14077
+ w.p("period.not_run_days", week.notRun.size)
14078
+ );
14079
+ note.dataset.notRunDays = String(week.notRun.size);
14080
+ td.append(" ", note);
14081
+ }
14082
+ }
14083
+ tr.append(td);
14084
+ });
14085
+ view.columns.forEach((col, c) => {
14086
+ const td = el3("td");
14087
+ td.dataset.column = col.id;
14088
+ if (windowNotRun === windowDays) {
14089
+ td.dataset.notRun = "";
14090
+ td.textContent = w.t("chart.not_run");
14091
+ } else {
14092
+ const key = `view-${String(index)}-r${String(r)}-c${String(c)}`;
14093
+ const sum = sumOver(col.chart, requirement, void 0);
14094
+ const value = el3("span", void 0, String(sum.value));
14095
+ value.dataset.chartValue = key;
14096
+ td.append(
14097
+ value,
14098
+ " ",
14099
+ valueEvidence(
14100
+ key,
14101
+ `${String(requirement)} ${col.id}`,
14102
+ groupOf(sum),
14103
+ w
14104
+ )
14105
+ );
14106
+ if (windowNotRun > 0) {
14107
+ const note = el3(
14108
+ "small",
14109
+ "cv-nr",
14110
+ w.p("period.not_run_days", windowNotRun)
14111
+ );
14112
+ note.dataset.notRunDays = String(windowNotRun);
14113
+ td.append(" ", note);
14114
+ }
14115
+ }
14116
+ tr.append(td);
14117
+ });
14118
+ tbody.append(tr);
14119
+ });
14120
+ table2.append(thead, tbody);
14121
+ const scroll = el3("div", "cv-view-table");
14122
+ scroll.append(table2);
14123
+ figure.append(scroll);
14124
+ return figure;
14125
+ }
14126
+ function renderView(view, index, sha2564, w) {
14127
+ return view.view === "calendar" ? renderCalendar(view, index, sha2564, w) : renderByPeriod(view, index, sha2564, w);
14128
+ }
14129
+
13626
14130
  // src/record-dating.ts
13627
14131
  var STATED_DAY2 = /^(\d{4}-\d{2}-\d{2})/u;
13628
14132
  function caseRecord2(result, claims, sourceCapsuleId) {
@@ -13751,9 +14255,9 @@ ${s} dl.prov dd{margin:0;color:var(--ink);word-break:break-word}
13751
14255
  function buildSessions(result, claims, testIds) {
13752
14256
  const byConversation = /* @__PURE__ */ new Map();
13753
14257
  for (const p of claims) {
13754
- const list = byConversation.get(p.conversationId) ?? [];
13755
- list.push(p.claim);
13756
- byConversation.set(p.conversationId, list);
14258
+ const list2 = byConversation.get(p.conversationId) ?? [];
14259
+ list2.push(p.claim);
14260
+ byConversation.set(p.conversationId, list2);
13757
14261
  }
13758
14262
  const sessions = [];
13759
14263
  for (const [conversationId, conversationClaims] of byConversation) {
@@ -13977,10 +14481,10 @@ ${s} dl.prov dd{margin:0;color:var(--ink);word-break:break-word}
13977
14481
  const { claims, pack } = countedClaims(result, presentation);
13978
14482
  const tests = /* @__PURE__ */ new Map();
13979
14483
  for (const p of claims) {
13980
- const list = tests.get(p.obligationKey) ?? [];
13981
- if (!list.includes(p.claim.requirementRef))
13982
- list.push(p.claim.requirementRef);
13983
- tests.set(p.obligationKey, list);
14484
+ const list2 = tests.get(p.obligationKey) ?? [];
14485
+ if (!list2.includes(p.claim.requirementRef))
14486
+ list2.push(p.claim.requirementRef);
14487
+ tests.set(p.obligationKey, list2);
13984
14488
  }
13985
14489
  const testIds = [...tests.values()].flat();
13986
14490
  const sessions = buildSessions(result, claims, testIds);
@@ -14356,13 +14860,13 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
14356
14860
  }
14357
14861
  function builtCommit() {
14358
14862
  if (false) return void 0;
14359
- return commitPrefix("8e7f43c1ecae1d82d156f6f3b84b051587621ac3");
14863
+ return commitPrefix("89a6b6b7a2020b7ae8087e4fa1ed3f4b3bf5392c");
14360
14864
  }
14361
14865
  var commit = builtCommit();
14362
14866
  var unreleased = false;
14363
14867
  var VIEWER_BUILD = {
14364
14868
  viewer: "@action-state-group/capsule-viewer",
14365
- viewerVersion: "0.4.0",
14869
+ viewerVersion: "0.6.0",
14366
14870
  verifier: "@action-state-group/agent-action-capsule",
14367
14871
  verifierVersion: "0.10.0",
14368
14872
  cllVersion: "0.3.0",
@@ -14596,6 +15100,12 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
14596
15100
  "lines.line.held.help": "A person's spot check disagreed with a resolved result.",
14597
15101
  "lines.line.added": "Added after a person's check",
14598
15102
  "lines.line.added.help": "a person's spot check graded a missed result as resolved",
15103
+ "lines.headline.one": "{resolved} of {n} conversation resolved: every rule that applied was met.",
15104
+ "lines.headline.other": "{resolved} of {n} conversations resolved: every rule that applied was met.",
15105
+ "lines.headline.missed": "{n} missed at least one.",
15106
+ "lines.headline.unverified": "{n} could not be verified.",
15107
+ "lines.headline.undecided": "{n} could not be decided.",
15108
+ "lines.headline.nothing-applied": "{n} had no rule that applied.",
14599
15109
  "lines.drill.show.one": "Show the {n} conversation",
14600
15110
  "lines.drill.show.other": "Show the {n} conversations",
14601
15111
  "lines.na-note.one": "{n} rule check did not apply to the conversation and count as met beside a met rule.",
@@ -14843,7 +15353,7 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
14843
15353
  "front.agg.excluded": "{excluded} excluded as not applicable",
14844
15354
  "front.agg.bucket.met": "Met (evaluations)",
14845
15355
  "front.agg.bucket.not_met": "Not met (evaluations)",
14846
- "front.agg.bucket.not_evaluable": "Not evaluable (evaluations)",
15356
+ "front.agg.bucket.not_evaluable": "Could not decide (evaluations)",
14847
15357
  "front.agg.bucket.out_of_scope": "Out of scope (evaluations)",
14848
15358
  "front.agg.of": "of {n}",
14849
15359
  "front.check.h": "Check this report yourself",
@@ -14875,6 +15385,18 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
14875
15385
  "chart.evidence.records": "The records this value counts, each a link to its entry in this bundle's records",
14876
15386
  "chart.evidence.none": "Nothing counted: no record in this report's data falls here",
14877
15387
  "chart.refused": "This chart was not drawn: its spec does not match the report's data ({reason}).",
15388
+ "calendar.weekday.1": "Mon",
15389
+ "calendar.weekday.2": "Tue",
15390
+ "calendar.weekday.3": "Wed",
15391
+ "calendar.weekday.4": "Thu",
15392
+ "calendar.weekday.5": "Fri",
15393
+ "calendar.weekday.6": "Sat",
15394
+ "calendar.weekday.7": "Sun",
15395
+ "period.week": "Week of {date}",
15396
+ "period.not_run_days.one": "{n} day not run",
15397
+ "period.not_run_days.other": "{n} days not run",
15398
+ "view.unplaced.one": "{n} record is dated on a day that did not run, so it is in no cell",
15399
+ "view.unplaced.other": "{n} records are dated on days that did not run, so they are in no cell",
14878
15400
  "evidence.uncited.one": "{n} counted with no claim: this page's own reading, with no evidence to show",
14879
15401
  "evidence.uncited.other": "{n} counted with no claim: this page's own reading, with no evidence to show",
14880
15402
  "evidence.label.unsupported": "Unsupported: no record its claims cite is disclosed in this bundle",
@@ -15164,7 +15686,7 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
15164
15686
  "front.agg.excluded": "{excluded} excluded as not applicable",
15165
15687
  "front.agg.bucket.met": "Met (evaluations)",
15166
15688
  "front.agg.bucket.not_met": "Not met (evaluations)",
15167
- "front.agg.bucket.not_evaluable": "Not evaluable (evaluations)",
15689
+ "front.agg.bucket.not_evaluable": "Could not decide (evaluations)",
15168
15690
  "front.agg.bucket.out_of_scope": "Out of scope (evaluations)",
15169
15691
  "front.agg.of": "of {n}",
15170
15692
  "front.check.h": "Check this report yourself",
@@ -15196,6 +15718,18 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
15196
15718
  "chart.evidence.records": "The records this value counts, each a link to its entry in this bundle's records",
15197
15719
  "chart.evidence.none": "Nothing counted: no record in this report's data falls here",
15198
15720
  "chart.refused": "This chart was not drawn: its spec does not match the report's data ({reason}).",
15721
+ "calendar.weekday.1": "Mon",
15722
+ "calendar.weekday.2": "Tue",
15723
+ "calendar.weekday.3": "Wed",
15724
+ "calendar.weekday.4": "Thu",
15725
+ "calendar.weekday.5": "Fri",
15726
+ "calendar.weekday.6": "Sat",
15727
+ "calendar.weekday.7": "Sun",
15728
+ "period.week": "Week of {date}",
15729
+ "period.not_run_days.one": "{n} day not run",
15730
+ "period.not_run_days.other": "{n} days not run",
15731
+ "view.unplaced.one": "{n} record is dated on a day that did not run, so it is in no cell",
15732
+ "view.unplaced.other": "{n} records are dated on days that did not run, so they are in no cell",
15199
15733
  "evidence.uncited.one": "{n} counted with no claim: this page's own reading, with no evidence to show",
15200
15734
  "evidence.uncited.other": "{n} counted with no claim: this page's own reading, with no evidence to show",
15201
15735
  "evidence.label.unsupported": "Unsupported: no record its claims cite is disclosed in this bundle",
@@ -15695,6 +16229,19 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
15695
16229
  "chart.evidence.records",
15696
16230
  "chart.evidence.none",
15697
16231
  "chart.refused",
16232
+ // Calendar and by-period views (report-view-render.ts): the same rule.
16233
+ "calendar.weekday.1",
16234
+ "calendar.weekday.2",
16235
+ "calendar.weekday.3",
16236
+ "calendar.weekday.4",
16237
+ "calendar.weekday.5",
16238
+ "calendar.weekday.6",
16239
+ "calendar.weekday.7",
16240
+ "period.week",
16241
+ "period.not_run_days.one",
16242
+ "period.not_run_days.other",
16243
+ "view.unplaced.one",
16244
+ "view.unplaced.other",
15698
16245
  // The Outcomes report.
15699
16246
  "lines.tier.unknown",
15700
16247
  "lines.wording.unstated",
@@ -16048,8 +16595,8 @@ ${key}`);
16048
16595
  return problems.map((p) => `${pack.id}: ${p}`);
16049
16596
  }
16050
16597
  var DEFAULT_PACK_SHA256 = Object.freeze({
16051
- lines: "e74efb3684df709b0ca3ff169c12eccfe8f492be45f32bf63e54cf66574f7165",
16052
- groups: "28ce67152b86ae8d492ad3b01e9ba1b7d7a8d746864cdcf49c73bcbd117314f6"
16598
+ lines: "818fbebb5a0fe1644d5c63cd2effac138fe648f828f847608f9d387dde399f0e",
16599
+ groups: "49d3f98b8336daf02d620ff63dce036003eb49802ba07c208287006f6db080d3"
16053
16600
  });
16054
16601
  function fill(key, text2, vars) {
16055
16602
  return text2.replace(PLACEHOLDER, (whole, name) => {
@@ -16109,7 +16656,7 @@ ${key}`);
16109
16656
  async function contractReportWords(grouping, wording, context = { singleContract: false }) {
16110
16657
  const defaults = DEFAULT_PACKS[grouping];
16111
16658
  if (wording === void 0) return wordsOf(defaults, void 0, context);
16112
- const refuse2 = (reason) => wordsOf(defaults, void 0, context, {
16659
+ const refuse3 = (reason) => wordsOf(defaults, void 0, context, {
16113
16660
  sha256: /^[0-9a-f]{64}$/u.test(wording.sha256) ? wording.sha256 : "(not a SHA-256)",
16114
16661
  reason
16115
16662
  });
@@ -16118,10 +16665,10 @@ ${key}`);
16118
16665
  pack = await checkWordingPackInput(wording);
16119
16666
  } catch (e) {
16120
16667
  if (!(e instanceof WordingPackError)) throw e;
16121
- return refuse2(/hash|sha256/u.test(e.message) ? "digest" : "shape");
16668
+ return refuse3(/hash|sha256/u.test(e.message) ? "digest" : "shape");
16122
16669
  }
16123
16670
  const problems = wordingProblems(pack, defaults);
16124
- if (problems.length > 0) return refuse2("fit");
16671
+ if (problems.length > 0) return refuse3("fit");
16125
16672
  return wordsOf(defaults, { pack, sha256: wording.sha256 }, context);
16126
16673
  }
16127
16674
  var DEFAULT_WORDS = Object.freeze({
@@ -16349,6 +16896,29 @@ ${key}`);
16349
16896
  };
16350
16897
  });
16351
16898
  }
16899
+ function checkedWitnessEntries(all, aac) {
16900
+ const results = aac !== void 0 && aac !== null && aac.receipts.length === all.length ? aac.receipts : void 0;
16901
+ return all.flatMap(
16902
+ (e, i) => e.stub || e.malformed ? [] : [{ ...e, passed: results?.[i]?.status === "pass" }]
16903
+ );
16904
+ }
16905
+ function witnessStatus(bundle, verified) {
16906
+ const aac = verified.strict?.witnesses ?? void 0;
16907
+ if (aac?.status === "fail") return "invalid";
16908
+ const checkpoint = isObject(bundle) ? bundle.checkpoint : void 0;
16909
+ const entries = checkedWitnessEntries(witnessEntries(checkpoint), aac);
16910
+ if (entries.length === 0) return "absent";
16911
+ return entries.some((e) => e.passed) ? "verified" : "not-checked";
16912
+ }
16913
+ var WITNESS_NOTICE_LINES = {
16914
+ "not-witnessed": "No witness this verifier trusts has vouched for this log: this file checks only against its holder's own signatures. Without such a receipt for its checkpoint, it could be a private copy of the log.",
16915
+ "witness-unreported": "No witness result: none was reported to this page, so it does not show whether any witness has seen this log. What it shows was checked only against its holder's own signatures."
16916
+ };
16917
+ function witnessNotice(bundle, verified) {
16918
+ const status2 = witnessStatus(bundle, verified);
16919
+ if (status2 === "verified" || status2 === "invalid") return void 0;
16920
+ return verified.strict === void 0 ? "witness-unreported" : "not-witnessed";
16921
+ }
16352
16922
  function witnessLine(bundle, verified, w = DEFAULT_WORDS.lines) {
16353
16923
  const checkpoint = isObject(bundle) ? bundle.checkpoint : void 0;
16354
16924
  const page = buildVerificationPageModel(bundle, verified);
@@ -16373,7 +16943,8 @@ ${key}`);
16373
16943
  const label = w.t("prov.witness.label");
16374
16944
  const aac = verified.strict?.witnesses ?? void 0;
16375
16945
  const all = witnessEntries(checkpoint);
16376
- if (aac?.status === "fail") {
16946
+ const status2 = witnessStatus(bundle, verified);
16947
+ if (status2 === "invalid" && aac !== void 0) {
16377
16948
  const failed2 = aac.receipts.filter((r) => r.status === "fail").map(
16378
16949
  (r) => w.t("prov.witness.failed-entry", {
16379
16950
  witness: quoted(r.tsUrl),
@@ -16408,10 +16979,7 @@ ${key}`);
16408
16979
  witness: "invalid"
16409
16980
  };
16410
16981
  }
16411
- const results = aac !== void 0 && aac.receipts.length === all.length ? aac.receipts : void 0;
16412
- const entries = all.flatMap(
16413
- (e, i) => e.stub || e.malformed ? [] : [{ ...e, passed: results?.[i]?.status === "pass" }]
16414
- );
16982
+ const entries = checkedWitnessEntries(all, aac);
16415
16983
  const stubs = all.filter((e) => e.stub).length;
16416
16984
  const malformed = all.filter((e) => e.malformed).length;
16417
16985
  const others = [
@@ -16423,7 +16991,7 @@ ${key}`);
16423
16991
  others: others.length === 1 ? others[0] : w.t("prov.witness.both", { a: others[0], b: others[1] })
16424
16992
  })
16425
16993
  ];
16426
- if (entries.length === 0)
16994
+ if (status2 === "absent")
16427
16995
  return {
16428
16996
  key: "witness",
16429
16997
  label,
@@ -16451,7 +17019,7 @@ ${key}`);
16451
17019
  passed.length > 0 ? stated.length === 0 && others.length === 0 ? "prov.brief.witness.verified" : "prov.brief.witness.partly-checked" : others.length === 0 ? "prov.brief.witness.stated" : "prov.brief.witness.mixed"
16452
17020
  ),
16453
17021
  state: others.length === 0 ? "stated" : "mixed",
16454
- witness: passed.length > 0 ? "verified" : "not-checked"
17022
+ witness: status2
16455
17023
  };
16456
17024
  }
16457
17025
  function verifierLine(bundle, build = VIEWER_BUILD, w = DEFAULT_WORDS.lines) {
@@ -16521,14 +17089,14 @@ ${key}`);
16521
17089
  }
16522
17090
 
16523
17091
  // src/report-front.ts
16524
- function el3(tag, className, text2) {
17092
+ function el4(tag, className, text2) {
16525
17093
  const node = document.createElement(tag);
16526
17094
  if (className !== "") node.className = className;
16527
17095
  if (text2 !== void 0) node.textContent = text2;
16528
17096
  return node;
16529
17097
  }
16530
17098
  function leadWithProvenance(host, section, provenance) {
16531
- const row2 = el3("div", "prov-row");
17099
+ const row2 = el4("div", "prov-row");
16532
17100
  row2.append(provenance);
16533
17101
  if (section === null) host.prepend(frontCard(row2));
16534
17102
  else section.prepend(row2);
@@ -16539,14 +17107,14 @@ ${key}`);
16539
17107
  }
16540
17108
  function renderCheckYourself(bundle, w) {
16541
17109
  const b = bundleObject(bundle);
16542
- const section = el3("section", "check front-card");
17110
+ const section = el4("section", "check front-card");
16543
17111
  section.dataset.section = "check-yourself";
16544
- section.append(el3("h2", "", w.t("front.check.h")));
16545
- const anchors = el3("div", "anchors");
17112
+ section.append(el4("h2", "", w.t("front.check.h")));
17113
+ const anchors = el4("div", "anchors");
16546
17114
  const cell = (label, value, key) => {
16547
- const box = el3("div", "anchor");
17115
+ const box = el4("div", "anchor");
16548
17116
  box.dataset.anchor = key;
16549
- box.append(el3("span", "k", label), el3("code", "", value));
17117
+ box.append(el4("span", "k", label), el4("code", "", value));
16550
17118
  anchors.append(box);
16551
17119
  };
16552
17120
  const extensions2 = bundleObject(b.extensions);
@@ -16568,18 +17136,18 @@ ${key}`);
16568
17136
  const receipts2 = witnessEntries(b.checkpoint).filter(
16569
17137
  (entry) => !entry.stub && !entry.malformed
16570
17138
  );
16571
- const steps = el3("ol", "steps");
17139
+ const steps = el4("ol", "steps");
16572
17140
  steps.append(
16573
- el3("li", "", w.t("front.check.s1")),
16574
- el3("li", "", w.t("front.check.s2"))
17141
+ el4("li", "", w.t("front.check.s1")),
17142
+ el4("li", "", w.t("front.check.s2"))
16575
17143
  );
16576
- const compare2 = el3(
17144
+ const compare2 = el4(
16577
17145
  "li",
16578
17146
  "",
16579
17147
  w.t(receipts2.length > 0 ? "front.check.s3.receipt" : "front.check.s3.none")
16580
17148
  );
16581
17149
  compare2.dataset.receipt = receipts2.length > 0 ? "present" : "absent";
16582
- steps.append(compare2, el3("li", "", w.t("front.check.s4")));
17150
+ steps.append(compare2, el4("li", "", w.t("front.check.s4")));
16583
17151
  section.append(steps);
16584
17152
  return section;
16585
17153
  }
@@ -16606,7 +17174,7 @@ ${key}`);
16606
17174
  return toggle;
16607
17175
  }
16608
17176
  function frontCard(...children) {
16609
- const card = el3("div", "front-card");
17177
+ const card = el4("div", "front-card");
16610
17178
  card.append(...children);
16611
17179
  return card;
16612
17180
  }
@@ -16633,7 +17201,7 @@ ${key}`);
16633
17201
  if (text2 !== void 0) value.textContent = text2;
16634
17202
  return value;
16635
17203
  }
16636
- function el4(tag, className, text2) {
17204
+ function el5(tag, className, text2) {
16637
17205
  const value = element3(tag, text2);
16638
17206
  value.className = className;
16639
17207
  return value;
@@ -16714,7 +17282,7 @@ ${key}`);
16714
17282
  function editedBadge(model, ref, w) {
16715
17283
  const edited = model.options.editedCriteria?.find((e) => e.criterion === ref);
16716
17284
  if (edited === void 0) return void 0;
16717
- const badge = el4("span", "edited", edited.badge);
17285
+ const badge = el5("span", "edited", edited.badge);
16718
17286
  badge.dataset.edited = ref;
16719
17287
  badge.title = w.t("lines.edited.title");
16720
17288
  return badge;
@@ -16722,14 +17290,14 @@ ${key}`);
16722
17290
  function renderProducerNote(host, model, w) {
16723
17291
  const note = model.options.producerNote;
16724
17292
  if (note === void 0) return;
16725
- const box = el4("aside", "pnote");
17293
+ const box = el5("aside", "pnote");
16726
17294
  box.dataset.producerNote = "true";
16727
- box.append(el4("div", "pn-k", w.t("lines.producer-note.kicker")));
16728
- box.append(el4("h2", "pn-t", note.title));
16729
- const list = el4("ul", "pn-l");
16730
- for (const line of note.lines) list.append(element3("li", line));
16731
- box.append(list);
16732
- box.append(el4("p", "pn-src", w.t("lines.producer-note.source")));
17295
+ box.append(el5("div", "pn-k", w.t("lines.producer-note.kicker")));
17296
+ box.append(el5("h2", "pn-t", note.title));
17297
+ const list2 = el5("ul", "pn-l");
17298
+ for (const line of note.lines) list2.append(element3("li", line));
17299
+ box.append(list2);
17300
+ box.append(el5("p", "pn-src", w.t("lines.producer-note.source")));
16733
17301
  host.append(box);
16734
17302
  }
16735
17303
  var fmtP = (p) => p.toFixed(2);
@@ -16791,15 +17359,15 @@ ${key}`);
16791
17359
  return w.t("lines.no-note.none");
16792
17360
  }
16793
17361
  }
16794
- function names(model, list, w) {
16795
- return list.map((c) => criterionLabel(model, c.checkId, c.criterionId, w).label).join(", ");
17362
+ function names(model, list2, w) {
17363
+ return list2.map((c) => criterionLabel(model, c.checkId, c.criterionId, w).label).join(", ");
16796
17364
  }
16797
17365
  function countWord(n, w) {
16798
17366
  return Number.isInteger(n) && n >= 0 && n <= 12 ? w.t(`lines.count.${n}`) : String(n);
16799
17367
  }
16800
- function unverifiedClause(model, list, w, lower = false) {
16801
- const failed2 = list.filter((c) => c.verdict === "failed");
16802
- const unsupported = list.filter((c) => c.verdict === "unsupported");
17368
+ function unverifiedClause(model, list2, w, lower = false) {
17369
+ const failed2 = list2.filter((c) => c.verdict === "failed");
17370
+ const unsupported = list2.filter((c) => c.verdict === "unsupported");
16803
17371
  const parts = [];
16804
17372
  if (failed2.length > 0)
16805
17373
  parts.push(
@@ -16813,7 +17381,7 @@ ${key}`);
16813
17381
  names: names(model, unsupported, w)
16814
17382
  })
16815
17383
  );
16816
- const text2 = `${parts.join(", and ")}, so the records do not say whether ${w.p("lines.word.that-rule-was", list.length)} met.`;
17384
+ const text2 = `${parts.join(", and ")}, so the records do not say whether ${w.p("lines.word.that-rule-was", list2.length)} met.`;
16817
17385
  return lower ? text2 : text2.charAt(0).toUpperCase() + text2.slice(1);
16818
17386
  }
16819
17387
  function resultSentence(conversation, model, w) {
@@ -16861,13 +17429,13 @@ ${key}`);
16861
17429
  }
16862
17430
  function renderConversation(conversation, model, runInfo, w) {
16863
17431
  const status2 = conversationStatus(conversation);
16864
- const item = el4("article", "conv");
17432
+ const item = el5("article", "conv");
16865
17433
  item.dataset.conversation = conversation.conversationId;
16866
17434
  item.dataset.conversationVerdict = conversation.verdict;
16867
17435
  item.dataset.status = status2;
16868
- const head2 = el4("div", "conv-h");
17436
+ const head2 = el5("div", "conv-h");
16869
17437
  const parts = caseParts(conversation.conversationId, w);
16870
- head2.append(el4("span", "cid", parts.label));
17438
+ head2.append(el5("span", "cid", parts.label));
16871
17439
  head2.append(wordPill(statusWord(status2, conversation, w), status2));
16872
17440
  const misses = conversation.criteria.filter((c) => isMiss(c.verdict));
16873
17441
  const unverified = conversation.criteria.filter(
@@ -16880,7 +17448,7 @@ ${key}`);
16880
17448
  (c) => c.verdict === "out_of_scope"
16881
17449
  );
16882
17450
  head2.append(
16883
- el4(
17451
+ el5(
16884
17452
  "span",
16885
17453
  "cwhy",
16886
17454
  status2 === "missed" ? w.t("lines.why.missed", { names: names(model, misses, w) }) : status2 === "unverified" ? w.t("lines.why.unverified", { names: names(model, unverified, w) }) : status2 === "undecided" ? undecided.length === 0 ? w.t("lines.why.undecided.none") : w.t("lines.why.undecided", {
@@ -16897,29 +17465,29 @@ ${key}`);
16897
17465
  )
16898
17466
  )
16899
17467
  );
16900
- head2.append(el4("span", "cmodel", parts.model ?? ""));
17468
+ head2.append(el5("span", "cmodel", parts.model ?? ""));
16901
17469
  item.append(head2);
16902
- const body = el4("div", "conv-slot");
17470
+ const body = el5("div", "conv-slot");
16903
17471
  item.append(body);
16904
17472
  lazyBody(body, () => conversationBody(conversation, model, runInfo, w));
16905
17473
  return item;
16906
17474
  }
16907
17475
  function conversationBody(conversation, model, runInfo, w) {
16908
- const body = el4("div", "conv-b");
16909
- const sentence = el4(
17476
+ const body = el5("div", "conv-b");
17477
+ const sentence = el5(
16910
17478
  "p",
16911
17479
  "verdict-line",
16912
17480
  resultSentence(conversation, model, w)
16913
17481
  );
16914
17482
  sentence.dataset.why = conversationStatus(conversation);
16915
17483
  body.append(sentence);
16916
- body.append(el4("h4", "", w.t("lines.h.rule-by-rule")));
17484
+ body.append(el5("h4", "", w.t("lines.h.rule-by-rule")));
16917
17485
  const hasNotes = conversation.criteria.some((c) => c.rationale !== void 0);
16918
17486
  const wordings = conversation.criteria.map(
16919
17487
  (c) => criterionLabel(model, c.checkId, c.criterionId, w).source
16920
17488
  );
16921
17489
  const anyWording = wordings.some((source) => source === "sealed");
16922
- const table2 = el4("table", "crit");
17490
+ const table2 = el5("table", "crit");
16923
17491
  table2.dataset.criteriaTable = conversation.conversationId;
16924
17492
  const head2 = element3("thead");
16925
17493
  const headRow = element3("tr");
@@ -16942,16 +17510,16 @@ ${key}`);
16942
17510
  criterion.criterionId,
16943
17511
  w
16944
17512
  );
16945
- const nameCell = el4("td", "cn");
16946
- nameCell.append(el4("b", "", label.label));
17513
+ const nameCell = el5("td", "cn");
17514
+ nameCell.append(el5("b", "", label.label));
16947
17515
  const rowBadge = editedBadge(model, ref, w);
16948
17516
  if (rowBadge !== void 0) nameCell.append(rowBadge);
16949
17517
  if (label.source === "sealed") {
16950
- const wording = el4("small", "", label.text);
17518
+ const wording = el5("small", "", label.text);
16951
17519
  wording.dataset.wording = label.source;
16952
17520
  nameCell.append(wording);
16953
17521
  } else if (anyWording) {
16954
- const wording = el4("small", "wsrc", wordingFallback(label.source, w));
17522
+ const wording = el5("small", "wsrc", wordingFallback(label.source, w));
16955
17523
  wording.dataset.wording = label.source;
16956
17524
  nameCell.append(wording);
16957
17525
  }
@@ -16965,12 +17533,12 @@ ${key}`);
16965
17533
  tbody.append(tr);
16966
17534
  continue;
16967
17535
  }
16968
- const noteCell = el4("td", "rat");
17536
+ const noteCell = el5("td", "rat");
16969
17537
  if (criterion.verdict === "not_applicable")
16970
- noteCell.append(el4("span", "muted", w.t("lines.note.not-applicable")));
17538
+ noteCell.append(el5("span", "muted", w.t("lines.note.not-applicable")));
16971
17539
  else if (criterion.rationale !== void 0)
16972
17540
  noteCell.append(
16973
- el4(
17541
+ el5(
16974
17542
  "span",
16975
17543
  "sealed",
16976
17544
  judgeNote(
@@ -16980,12 +17548,12 @@ ${key}`);
16980
17548
  )
16981
17549
  )
16982
17550
  );
16983
- else noteCell.append(el4("span", "muted", noNoteText(criterion, w)));
17551
+ else noteCell.append(el5("span", "muted", noNoteText(criterion, w)));
16984
17552
  tr.append(noteCell);
16985
17553
  tbody.append(tr);
16986
17554
  }
16987
17555
  table2.append(tbody);
16988
- const scroll = el4("div", "tscroll");
17556
+ const scroll = el5("div", "tscroll");
16989
17557
  scroll.append(table2);
16990
17558
  body.append(scroll);
16991
17559
  const gaps = [];
@@ -17005,7 +17573,7 @@ ${key}`);
17005
17573
  )
17006
17574
  );
17007
17575
  if (gaps.length > 0) {
17008
- const gap = el4("p", "small", gaps.join(" "));
17576
+ const gap = el5("p", "small", gaps.join(" "));
17009
17577
  gap.dataset.gaps = "true";
17010
17578
  body.append(gap);
17011
17579
  }
@@ -17061,7 +17629,7 @@ ${key}`);
17061
17629
  );
17062
17630
  }
17063
17631
  function conversationProofs(conversation, model, runInfo, w) {
17064
- const box = el4("div", "pf-b");
17632
+ const box = el5("div", "pf-b");
17065
17633
  box.dataset.proofsFor = conversation.conversationId;
17066
17634
  const rows = [];
17067
17635
  rows.push([w.t("lines.pf.case"), conversation.conversationId]);
@@ -17096,14 +17664,14 @@ ${key}`);
17096
17664
  const dl = proofList(rows);
17097
17665
  dl.dataset.checkIt = conversation.conversationId;
17098
17666
  box.append(dl);
17099
- box.append(el4("h5", "", w.t("lines.pf.h.each-report")));
17100
- const table2 = el4("table", "crit pft");
17667
+ box.append(el5("h5", "", w.t("lines.pf.h.each-report")));
17668
+ const table2 = el5("table", "crit pft");
17101
17669
  const head2 = element3("thead");
17102
17670
  const headRow = element3("tr");
17103
17671
  headRow.append(
17104
17672
  element3("th", w.t("lines.pf.col.rule")),
17105
17673
  element3("th", w.t("lines.pf.col.verdict")),
17106
- el4("th", "n", w.t("lines.pf.col.p")),
17674
+ el5("th", "n", w.t("lines.pf.col.p")),
17107
17675
  element3("th", w.t("lines.pf.col.report")),
17108
17676
  element3("th", w.t("lines.pf.col.rationale")),
17109
17677
  element3("th", w.t("card.pf.assurance"))
@@ -17123,24 +17691,24 @@ ${key}`);
17123
17691
  element3("td", verdictText(criterion.verdict, w))
17124
17692
  );
17125
17693
  const p = verdictProbability(criterion);
17126
- const pCell = el4("td", "n", p === void 0 ? "\u2013" : fmtP(p));
17694
+ const pCell = el5("td", "n", p === void 0 ? "\u2013" : fmtP(p));
17127
17695
  if (p !== void 0) pCell.dataset.p = fmtP(p);
17128
17696
  tr.append(pCell);
17129
17697
  tr.append(
17130
- el4(
17698
+ el5(
17131
17699
  "td",
17132
17700
  "mono",
17133
17701
  criterion.claim === void 0 ? w.t("lines.pf.no-claim") : `${criterion.reportCapsuleId ?? w.t("lines.pf.not-cited")}${criterion.reportRecordId === void 0 ? "" : ` (${criterion.reportRecordId})`}`
17134
17702
  )
17135
17703
  );
17136
- const rationale = el4("td", "rat");
17704
+ const rationale = el5("td", "rat");
17137
17705
  if (criterion.rationale !== void 0) {
17138
- const sealed = el4("code", "sealed", criterion.rationale);
17706
+ const sealed = el5("code", "sealed", criterion.rationale);
17139
17707
  sealed.dataset.rationale = "sealed";
17140
17708
  rationale.append(sealed);
17141
- } else rationale.append(el4("span", "muted", "\u2013"));
17709
+ } else rationale.append(el5("span", "muted", "\u2013"));
17142
17710
  tr.append(rationale);
17143
- if (criterion.claim === void 0) tr.append(el4("td", "muted", "\u2013"));
17711
+ if (criterion.claim === void 0) tr.append(el5("td", "muted", "\u2013"));
17144
17712
  else {
17145
17713
  const [, text2, data] = assuranceRow(criterion.claim, w);
17146
17714
  const cell = element3("td", text2);
@@ -17151,21 +17719,21 @@ ${key}`);
17151
17719
  tbody.append(tr);
17152
17720
  }
17153
17721
  table2.append(tbody);
17154
- const scroll = el4("div", "tscroll");
17722
+ const scroll = el5("div", "tscroll");
17155
17723
  scroll.append(table2);
17156
17724
  box.append(scroll);
17157
17725
  const rationales = conversation.criteria.map((c) => c.rationale).filter((r) => r !== void 0);
17158
17726
  if (rationales.length > 0 && rationales.every((r) => /^jev choice:/u.test(r))) {
17159
- const derived = el4("p", "", w.t("lines.pf.derived"));
17727
+ const derived = el5("p", "", w.t("lines.pf.derived"));
17160
17728
  derived.dataset.rationaleLabel = "derived";
17161
17729
  box.append(derived);
17162
17730
  } else if (rationales.length > 0) {
17163
- const shown2 = el4("p", "", w.t("lines.pf.sealed-rationale"));
17731
+ const shown2 = el5("p", "", w.t("lines.pf.sealed-rationale"));
17164
17732
  shown2.dataset.rationaleLabel = "sealed";
17165
17733
  box.append(shown2);
17166
17734
  }
17167
17735
  box.append(
17168
- el4(
17736
+ el5(
17169
17737
  "p",
17170
17738
  "",
17171
17739
  w.t("lines.pf.recompute", {
@@ -17199,14 +17767,14 @@ ${key}`);
17199
17767
  return pinAbsence(runInfo, w) ?? w.t("lines.pin.not-stated");
17200
17768
  }
17201
17769
  function renderConversationList(conversations, model, runInfo, key, w) {
17202
- const list = el4("div", "convs");
17203
- list.dataset.conversationsFor = key;
17204
- list.dataset.conversationCount = String(conversations.length);
17770
+ const list2 = el5("div", "convs");
17771
+ list2.dataset.conversationsFor = key;
17772
+ list2.dataset.conversationCount = String(conversations.length);
17205
17773
  if (conversations.length === 0)
17206
- list.append(el4("p", "small", w.t("lines.list.empty")));
17774
+ list2.append(el5("p", "small", w.t("lines.list.empty")));
17207
17775
  for (const conversation of conversations)
17208
- list.append(renderConversation(conversation, model, runInfo, w));
17209
- return list;
17776
+ list2.append(renderConversation(conversation, model, runInfo, w));
17777
+ return list2;
17210
17778
  }
17211
17779
  function drill(label, build, key) {
17212
17780
  const details = levelToggle(1, label, build, { className: "line" });
@@ -17229,7 +17797,7 @@ ${key}`);
17229
17797
  return w.group(check.id) ?? check.question;
17230
17798
  }
17231
17799
  function groupMissedReasons(missed, terms, w) {
17232
- const labelledReasonCode = (code) => code === void 0 ? void 0 : terms.reasonCodes[code];
17800
+ const labelledReasonCode = (code2) => code2 === void 0 ? void 0 : terms.reasonCodes[code2];
17233
17801
  const groups = /* @__PURE__ */ new Map();
17234
17802
  const structured = /* @__PURE__ */ new Map();
17235
17803
  const labels = /* @__PURE__ */ new Map();
@@ -17238,9 +17806,9 @@ ${key}`);
17238
17806
  if (first === void 0) continue;
17239
17807
  const label = labelledReasonCode(first.reasonCode);
17240
17808
  const key = label !== void 0 ? first.reasonCode : `${first.checkId}.${first.criterionId}`;
17241
- const list = groups.get(key) ?? [];
17242
- list.push(conversation);
17243
- groups.set(key, list);
17809
+ const list2 = groups.get(key) ?? [];
17810
+ list2.push(conversation);
17811
+ groups.set(key, list2);
17244
17812
  structured.set(key, label !== void 0);
17245
17813
  labels.set(
17246
17814
  key,
@@ -17255,11 +17823,11 @@ ${key}`);
17255
17823
  })).sort((a, b) => b.conversations.length - a.conversations.length);
17256
17824
  }
17257
17825
  function whyMissed(missed, model, runInfo, w) {
17258
- const box = el4("div", "why-missed");
17826
+ const box = el5("div", "why-missed");
17259
17827
  box.dataset.section = "why-missed";
17260
17828
  const groups = groupMissedReasons(missed, model.terms, w);
17261
17829
  box.dataset.reasons = String(groups.length);
17262
- box.append(el4("h5", "", w.t("lines.why-missed.h")));
17830
+ box.append(el5("h5", "", w.t("lines.why-missed.h")));
17263
17831
  const table2 = element3("table");
17264
17832
  const tbody = element3("tbody");
17265
17833
  for (const group of groups) {
@@ -17269,7 +17837,7 @@ ${key}`);
17269
17837
  tr.dataset.count = String(group.conversations.length);
17270
17838
  tr.append(
17271
17839
  element3("td", group.label),
17272
- el4("td", "n", fmtCount(group.conversations.length))
17840
+ el5("td", "n", fmtCount(group.conversations.length))
17273
17841
  );
17274
17842
  tbody.append(tr);
17275
17843
  }
@@ -17277,7 +17845,7 @@ ${key}`);
17277
17845
  box.append(table2);
17278
17846
  const anyStructured = groups.some((g) => g.structured);
17279
17847
  box.append(
17280
- el4(
17848
+ el5(
17281
17849
  "p",
17282
17850
  "small",
17283
17851
  w.t(
@@ -17286,7 +17854,7 @@ ${key}`);
17286
17854
  )
17287
17855
  );
17288
17856
  for (const group of groups) {
17289
- const head2 = el4(
17857
+ const head2 = el5(
17290
17858
  "div",
17291
17859
  "rsn-h",
17292
17860
  w.t("lines.why-missed.reason", {
@@ -17351,20 +17919,20 @@ ${key}`);
17351
17919
  return parts.join(" ");
17352
17920
  }
17353
17921
  function renderMeta(host, model, w, notes) {
17354
- const section = el4("section", "");
17922
+ const section = el5("section", "");
17355
17923
  section.dataset.section = "meta";
17356
- const row1 = el4("div", "ih-row");
17357
- const bill = el4("div", "party");
17358
- bill.append(el4("div", "k", w.t("lines.meta.pack")));
17359
- bill.append(el4("div", "v", packLine(model, w)));
17924
+ const row1 = el5("div", "ih-row");
17925
+ const bill = el5("div", "party");
17926
+ bill.append(el5("div", "k", w.t("lines.meta.pack")));
17927
+ bill.append(el5("div", "v", packLine(model, w)));
17360
17928
  row1.append(bill);
17361
- const title = el4("div", "ih-title");
17362
- title.append(el4("h1", "inv-title", w.t("lines.title")));
17929
+ const title = el5("div", "ih-title");
17930
+ title.append(el5("h1", "inv-title", w.t("lines.title")));
17363
17931
  const summary = reportSummary(w);
17364
17932
  if (summary !== void 0) title.append(summary);
17365
17933
  if (model.terms.pack.locked !== NOT_STATED)
17366
17934
  title.append(
17367
- el4(
17935
+ el5(
17368
17936
  "div",
17369
17937
  "inv-sub",
17370
17938
  w.t("lines.meta.locked", { locked: model.terms.pack.locked })
@@ -17372,8 +17940,8 @@ ${key}`);
17372
17940
  );
17373
17941
  row1.append(title);
17374
17942
  section.append(row1);
17375
- const row2 = el4("div", "ih-row");
17376
- const details = el4("div", "meta");
17943
+ const row2 = el5("div", "ih-row");
17944
+ const details = el5("div", "meta");
17377
17945
  const first = model.days[0]?.date;
17378
17946
  const last = model.days[model.days.length - 1]?.date;
17379
17947
  const metaRow = (label, value) => {
@@ -17391,11 +17959,11 @@ ${key}`);
17391
17959
  details.lastElementChild.setAttribute("data-sealed", "");
17392
17960
  }
17393
17961
  metaRow(w.t("lines.meta.conversations"), fmtCount(model.totalCount));
17394
- const checked = el4("div", "party");
17962
+ const checked = el5("div", "party");
17395
17963
  const rules = model.terms.checks.reduce((n, c) => n + c.criteria.length, 0);
17396
- checked.append(el4("div", "k", w.t("lines.meta.what-checked")));
17964
+ checked.append(el5("div", "k", w.t("lines.meta.what-checked")));
17397
17965
  const groups = model.terms.checks.length;
17398
- const what = el4(
17966
+ const what = el5(
17399
17967
  "div",
17400
17968
  "d",
17401
17969
  w.t("lines.meta.what-checked.text", {
@@ -17409,23 +17977,26 @@ ${key}`);
17409
17977
  row2.append(checked, details);
17410
17978
  section.append(row2);
17411
17979
  if (note !== void 0) {
17412
- const label = el4("p", "date-note", note);
17980
+ const label = el5("p", "date-note", note);
17413
17981
  label.dataset.dateNote = model.dating.basis;
17414
17982
  notes.append(label);
17415
17983
  }
17416
17984
  host.append(section);
17417
17985
  }
17418
17986
  function renderLines(host, model, runInfo, w, notes) {
17419
- const section = el4("section", "");
17987
+ const section = el5("section", "");
17420
17988
  section.dataset.section = "lines";
17421
17989
  const table2 = document.createElement("table");
17422
17990
  table2.className = "lines";
17423
17991
  table2.dataset.rows = "report-lines";
17992
+ const headline = el5("p", "headline");
17993
+ headline.dataset.headline = "lines";
17994
+ section.append(headline);
17424
17995
  const thead = document.createElement("thead");
17425
17996
  const headRow = document.createElement("tr");
17426
17997
  headRow.append(
17427
17998
  element3("th", w.t("lines.col.result")),
17428
- el4("th", "n", w.t("lines.lines.col.conversations"))
17999
+ el5("th", "n", w.t("lines.lines.col.conversations"))
17429
18000
  );
17430
18001
  thead.append(headRow);
17431
18002
  table2.append(thead);
@@ -17444,6 +18015,33 @@ ${key}`);
17444
18015
  shown: shown2,
17445
18016
  ...behind === void 0 ? {} : { behind }
17446
18017
  });
18018
+ const headlineParts = [
18019
+ w.p("lines.headline", model.totalCount, {
18020
+ resolved: fmtCount(resolved.length),
18021
+ n: fmtCount(model.totalCount)
18022
+ }),
18023
+ w.t("lines.headline.missed", { n: fmtCount(missed.length) })
18024
+ ];
18025
+ const judgedUndecided = byStatus("undecided");
18026
+ const nothingApplied = byStatus("nothing-applied");
18027
+ if (unverified.length > 0)
18028
+ headlineParts.push(
18029
+ w.t("lines.headline.unverified", { n: fmtCount(unverified.length) })
18030
+ );
18031
+ if (judgedUndecided.length > 0)
18032
+ headlineParts.push(
18033
+ w.t("lines.headline.undecided", {
18034
+ n: fmtCount(judgedUndecided.length)
18035
+ })
18036
+ );
18037
+ if (nothingApplied.length > 0)
18038
+ headlineParts.push(
18039
+ w.t("lines.headline.nothing-applied", {
18040
+ n: fmtCount(nothingApplied.length)
18041
+ })
18042
+ );
18043
+ headline.textContent = model.totalCount === 0 ? "" : headlineParts.join(" ");
18044
+ headline.hidden = model.totalCount === 0;
17447
18045
  const lines = [
17448
18046
  line("resolved", resolved.length, share(resolved.length), resolved),
17449
18047
  line("missed", missed.length, share(missed.length), missed)
@@ -17469,9 +18067,9 @@ ${key}`);
17469
18067
  const tr = document.createElement("tr");
17470
18068
  tr.dataset.line = line2.key;
17471
18069
  tr.dataset.count = String(line2.count);
17472
- const desc = el4("td", "desc");
17473
- desc.append(el4("b", "", line2.label));
17474
- desc.append(el4("small", "", line2.help));
18070
+ const desc = el5("td", "desc");
18071
+ desc.append(el5("b", "", line2.label));
18072
+ desc.append(el5("small", "", line2.help));
17475
18073
  if (line2.behind !== void 0 && line2.behind.length > 0) {
17476
18074
  const label = w.p("lines.drill.show", line2.behind.length, {
17477
18075
  n: fmtCount(line2.behind.length)
@@ -17481,12 +18079,12 @@ ${key}`);
17481
18079
  line2.key === "missed" ? drill(label, () => whyMissed(behind, model, runInfo, w), line2.key) : conversationsDrill(label, behind, model, runInfo, line2.key, w)
17482
18080
  );
17483
18081
  }
17484
- tr.append(desc, el4("td", "n", line2.shown));
18082
+ tr.append(desc, el5("td", "n", line2.shown));
17485
18083
  tbody.append(tr);
17486
18084
  }
17487
18085
  table2.append(tbody);
17488
18086
  section.append(table2);
17489
- const na = el4(
18087
+ const na = el5(
17490
18088
  "p",
17491
18089
  "na-note",
17492
18090
  w.p("lines.na-note", model.notApplicableCount, {
@@ -17497,7 +18095,7 @@ ${key}`);
17497
18095
  na.dataset.count = String(model.notApplicableCount);
17498
18096
  notes.append(na);
17499
18097
  if (model.outOfScopeCount > 0) {
17500
- const oos = el4(
18098
+ const oos = el5(
17501
18099
  "p",
17502
18100
  "na-note",
17503
18101
  w.p("lines.oos-note", model.outOfScopeCount, {
@@ -17511,11 +18109,11 @@ ${key}`);
17511
18109
  host.append(section);
17512
18110
  }
17513
18111
  function renderRules(host, model, runInfo, result, w) {
17514
- const section = el4("section", "sec");
18112
+ const section = el5("section", "sec");
17515
18113
  section.dataset.section = "rules";
17516
- section.append(el4("h2", "", w.t("lines.rules.h")));
17517
- section.append(el4("p", "lede", w.t("lines.rules.lede")));
17518
- const table2 = el4("table", "rules");
18114
+ section.append(el5("h2", "", w.t("lines.rules.h")));
18115
+ section.append(el5("p", "lede", w.t("lines.rules.lede")));
18116
+ const table2 = el5("table", "rules");
17519
18117
  table2.dataset.rows = "rules";
17520
18118
  const thead = element3("thead");
17521
18119
  const headRow = element3("tr");
@@ -17528,25 +18126,25 @@ ${key}`);
17528
18126
  };
17529
18127
  headRow.append(
17530
18128
  element3("th", w.t("lines.col.rule")),
17531
- el4("th", "n", columnWord.not_met),
17532
- el4("th", "n", columnWord.met),
17533
- el4("th", "n", columnWord.undecided)
18129
+ el5("th", "n", columnWord.not_met),
18130
+ el5("th", "n", columnWord.met),
18131
+ el5("th", "n", columnWord.undecided)
17534
18132
  );
17535
18133
  const anyUnverified = model.conversations.some(
17536
18134
  (c) => c.criteria.some((cr) => isUnverified(cr.verdict))
17537
18135
  );
17538
- if (anyUnverified) headRow.append(el4("th", "n", columnWord.unverified));
18136
+ if (anyUnverified) headRow.append(el5("th", "n", columnWord.unverified));
17539
18137
  const anyOutOfScope = model.outOfScopeCount > 0;
17540
- if (anyOutOfScope) headRow.append(el4("th", "n", columnWord.out_of_scope));
18138
+ if (anyOutOfScope) headRow.append(el5("th", "n", columnWord.out_of_scope));
17541
18139
  const columns = String(4 + (anyUnverified ? 1 : 0) + (anyOutOfScope ? 1 : 0));
17542
18140
  thead.append(headRow);
17543
18141
  table2.append(thead);
17544
18142
  const tbody = element3("tbody");
17545
18143
  for (const check of model.terms.checks) {
17546
- const group = el4("tr", "grp");
18144
+ const group = el5("tr", "grp");
17547
18145
  group.dataset.checkId = check.id;
17548
18146
  group.dataset.passCount = String(model.checkPassCounts.get(check.id) ?? 0);
17549
- const cell = el4("td", "", groupTitle(check, w));
18147
+ const cell = el5("td", "", groupTitle(check, w));
17550
18148
  cell.setAttribute("colspan", columns);
17551
18149
  group.append(cell);
17552
18150
  tbody.append(group);
@@ -17572,9 +18170,9 @@ ${key}`);
17572
18170
  const undecided = of(picks.undecided);
17573
18171
  const countCell = (className, column, counted) => {
17574
18172
  const pick = picks[column];
17575
- const cell3 = el4("td", className);
18173
+ const cell3 = el5("td", className);
17576
18174
  cell3.dataset.column = column;
17577
- cell3.append(el4("span", "nv", fmtCount(counted.length)));
18175
+ cell3.append(el5("span", "nv", fmtCount(counted.length)));
17578
18176
  const action = evidenceAction(
17579
18177
  `rule:${ref}:${column}`,
17580
18178
  `${label.label} \xB7 ${columnWord[column]}: ${fmtCount(counted.length)}`,
@@ -17589,26 +18187,26 @@ ${key}`);
17589
18187
  if (action !== void 0) cell3.append(action);
17590
18188
  return cell3;
17591
18189
  };
17592
- const tr = el4("tr", "rule");
18190
+ const tr = el5("tr", "rule");
17593
18191
  tr.dataset.rule = ref;
17594
18192
  tr.dataset.tier = model.criterionTiers.get(ref) ?? "unknown";
17595
18193
  const label = criterionLabel(model, check.id, criterion.id, w);
17596
- const nameCell = el4("td", "cn");
17597
- const ruleName = el4("b", "", label.label);
18194
+ const nameCell = el5("td", "cn");
18195
+ const ruleName = el5("b", "", label.label);
17598
18196
  nameCell.append(ruleName);
17599
18197
  const badge = editedBadge(model, ref, w);
17600
18198
  if (badge !== void 0) nameCell.append(badge);
17601
18199
  if (label.source === "sealed")
17602
- nameCell.append(el4("small", "", label.text));
18200
+ nameCell.append(el5("small", "", label.text));
17603
18201
  const detail = w.row(ref, "detail");
17604
18202
  if (detail !== void 0) {
17605
- const line = el4("small", "rdet", detail);
18203
+ const line = el5("small", "rdet", detail);
17606
18204
  line.dataset.wording = "pack";
17607
18205
  nameCell.append(line);
17608
18206
  }
17609
18207
  const undecidedNote = w.row(ref, "not_evaluable");
17610
18208
  if (undecidedNote !== void 0 && undecided.length > 0) {
17611
- const line = el4("small", "rdet", undecidedNote);
18209
+ const line = el5("small", "rdet", undecidedNote);
17612
18210
  line.dataset.wording = "pack";
17613
18211
  line.dataset.note = "not-evaluable";
17614
18212
  nameCell.append(line);
@@ -17632,13 +18230,13 @@ ${key}`);
17632
18230
  tr.append(countCell("n", "out_of_scope", outOfScopeHere));
17633
18231
  tbody.append(tr);
17634
18232
  if (problems.length === 0 && na.length === 0) continue;
17635
- const drillRow = el4("tr", "drill-row");
18233
+ const drillRow = el5("tr", "drill-row");
17636
18234
  drillRow.dataset.drillFor = ref;
17637
18235
  const cell2 = element3("td");
17638
18236
  cell2.setAttribute("colspan", columns);
17639
18237
  drillRow.append(cell2);
17640
18238
  if (na.length > 0) {
17641
- const naLine = el4(
18239
+ const naLine = el5(
17642
18240
  "p",
17643
18241
  "rule-na",
17644
18242
  w.p("lines.rules.expand.na", na.length, {
@@ -17660,56 +18258,56 @@ ${key}`);
17660
18258
  }
17661
18259
  }
17662
18260
  if (model.notRun.length > 0) {
17663
- const group = el4("tr", "grp");
18261
+ const group = el5("tr", "grp");
17664
18262
  group.dataset.group = "not-run";
17665
- const heading = el4("td", "", w.t("lines.rules.not-run.h"));
18263
+ const heading = el5("td", "", w.t("lines.rules.not-run.h"));
17666
18264
  heading.setAttribute("colspan", columns);
17667
18265
  group.append(heading);
17668
18266
  tbody.append(group);
17669
18267
  for (const ref of model.notRun) {
17670
18268
  const [checkId = "", ...rest] = ref.split(".");
17671
18269
  const label = criterionLabel(model, checkId, rest.join("."), w);
17672
- const tr = el4("tr", "rule not-run");
18270
+ const tr = el5("tr", "rule not-run");
17673
18271
  tr.dataset.rule = ref;
17674
18272
  tr.dataset.notRun = "true";
17675
- const nameCell = el4("td", "cn");
17676
- nameCell.append(el4("b", "", label.label));
17677
- const status2 = el4("td", "nr", w.t("lines.rules.not-run"));
18273
+ const nameCell = el5("td", "cn");
18274
+ nameCell.append(el5("b", "", label.label));
18275
+ const status2 = el5("td", "nr", w.t("lines.rules.not-run"));
17678
18276
  status2.setAttribute("colspan", String(Number(columns) - 1));
17679
18277
  tr.append(nameCell, status2);
17680
18278
  tbody.append(tr);
17681
18279
  }
17682
18280
  }
17683
18281
  table2.append(tbody);
17684
- const scroll = el4("div", "tscroll");
18282
+ const scroll = el5("div", "tscroll");
17685
18283
  scroll.append(table2);
17686
18284
  section.append(scroll);
17687
18285
  host.append(section);
17688
18286
  }
17689
- function renderCalendar(host, model, w) {
17690
- const section = el4("section", "sec");
18287
+ function renderCalendar2(host, model, w) {
18288
+ const section = el5("section", "sec");
17691
18289
  section.dataset.section = "calendar";
17692
- section.append(el4("h2", "", w.t("lines.cal.h")));
18290
+ section.append(el5("h2", "", w.t("lines.cal.h")));
17693
18291
  const note = datingNote(model, w);
17694
18292
  section.append(
17695
- el4(
18293
+ el5(
17696
18294
  "p",
17697
18295
  "lede",
17698
18296
  w.t(note === void 0 ? "lines.cal.lede" : "lines.cal.lede.dated")
17699
18297
  )
17700
18298
  );
17701
- const list = el4("div", "cal");
17702
- list.dataset.days = String(model.days.length);
18299
+ const list2 = el5("div", "cal");
18300
+ list2.dataset.days = String(model.days.length);
17703
18301
  for (const day of model.days) {
17704
- const item = el4("div", "day");
18302
+ const item = el5("div", "day");
17705
18303
  item.dataset.day = day.date;
17706
18304
  item.dataset.resolved = String(day.resolvedCount);
17707
18305
  item.dataset.total = String(day.conversations.length);
17708
- item.append(el4("div", "dn", day.date));
18306
+ item.append(el5("div", "dn", day.date));
17709
18307
  if (note !== void 0) {
17710
18308
  const bases = new Set(day.conversations.map((c) => c.dated.basis));
17711
18309
  if (bases.has("source")) {
17712
- const chip = el4("div", "src-says", w.t("lines.cal.source-says"));
18310
+ const chip = el5("div", "src-says", w.t("lines.cal.source-says"));
17713
18311
  chip.dataset.sourceSays = String(
17714
18312
  day.conversations.filter((c) => c.dated.basis === "source").length
17715
18313
  );
@@ -17719,13 +18317,13 @@ ${key}`);
17719
18317
  (c) => c.dated.zone === "not-stated"
17720
18318
  ).length;
17721
18319
  if (notStated > 0) {
17722
- const tz = el4("div", "tz", w.t("lines.cal.tz"));
18320
+ const tz = el5("div", "tz", w.t("lines.cal.tz"));
17723
18321
  tz.dataset.tzMarker = "not-stated";
17724
18322
  item.append(tz);
17725
18323
  }
17726
18324
  }
17727
18325
  item.append(
17728
- el4(
18326
+ el5(
17729
18327
  "div",
17730
18328
  "v",
17731
18329
  fmtShare(
@@ -17736,14 +18334,14 @@ ${key}`);
17736
18334
  )
17737
18335
  )
17738
18336
  );
17739
- const mini = el4("div", "mini");
18337
+ const mini = el5("div", "mini");
17740
18338
  const share = day.conversations.length === 0 ? 0 : day.resolvedCount / day.conversations.length;
17741
18339
  const fill2 = element3("i");
17742
18340
  fill2.style.width = `${Math.round(share * 100)}%`;
17743
18341
  mini.append(fill2);
17744
18342
  item.append(mini);
17745
18343
  if (note !== void 0) {
17746
- const sealed = el4(
18344
+ const sealed = el5(
17747
18345
  "div",
17748
18346
  "sealed",
17749
18347
  w.t("lines.cal.sealed", { span: span(day.judgedDays, w) })
@@ -17752,22 +18350,22 @@ ${key}`);
17752
18350
  item.append(sealed);
17753
18351
  }
17754
18352
  if (day.policyChanged !== null) {
17755
- const flag = el4("div", "flag", w.t("lines.cal.policy-changed"));
18353
+ const flag = el5("div", "flag", w.t("lines.cal.policy-changed"));
17756
18354
  flag.dataset.policyChanged = day.policyChanged;
17757
18355
  item.append(flag);
17758
18356
  }
17759
- list.append(item);
18357
+ list2.append(item);
17760
18358
  }
17761
- section.append(list);
18359
+ section.append(list2);
17762
18360
  host.append(section);
17763
18361
  }
17764
18362
  function renderHumanChecks(host, calibration, w) {
17765
- const section = el4("section", "sec");
18363
+ const section = el5("section", "sec");
17766
18364
  section.dataset.section = "human-checks";
17767
- section.append(el4("h2", "", w.t("lines.hc.h")));
17768
- section.append(el4("p", "lede", w.t("lines.hc.lede")));
18365
+ section.append(el5("h2", "", w.t("lines.hc.h")));
18366
+ section.append(el5("p", "lede", w.t("lines.hc.lede")));
17769
18367
  if (calibration.length === 0) {
17770
- section.append(el4("p", "", w.t("lines.hc.none")));
18368
+ section.append(el5("p", "", w.t("lines.hc.none")));
17771
18369
  host.append(section);
17772
18370
  return;
17773
18371
  }
@@ -17778,9 +18376,9 @@ ${key}`);
17778
18376
  const headRow = document.createElement("tr");
17779
18377
  headRow.append(
17780
18378
  element3("th", w.t("lines.hc.col.week")),
17781
- el4("th", "n", w.t("lines.hc.col.agreed")),
17782
- el4("th", "n", w.t("lines.hc.col.held")),
17783
- el4("th", "n", w.t("lines.hc.col.added"))
18379
+ el5("th", "n", w.t("lines.hc.col.agreed")),
18380
+ el5("th", "n", w.t("lines.hc.col.held")),
18381
+ el5("th", "n", w.t("lines.hc.col.added"))
17784
18382
  );
17785
18383
  thead.append(headRow);
17786
18384
  table2.append(thead);
@@ -17790,9 +18388,9 @@ ${key}`);
17790
18388
  tr.dataset.week = week.weekId;
17791
18389
  tr.dataset.k = String(week.k);
17792
18390
  tr.dataset.n = String(week.n);
17793
- tr.append(el4("td", "", week.weekId));
18391
+ tr.append(el5("td", "", week.weekId));
17794
18392
  tr.append(
17795
- el4(
18393
+ el5(
17796
18394
  "td",
17797
18395
  "n",
17798
18396
  w.t("lines.hc.agreed", { k: String(week.k), n: String(week.n) })
@@ -17804,9 +18402,9 @@ ${key}`);
17804
18402
  const added = week.sample.filter(
17805
18403
  (s) => s.aiVerdict !== "met" && s.humanVerdict === "met"
17806
18404
  ).length;
17807
- const heldCell = el4("td", "n", String(held));
18405
+ const heldCell = el5("td", "n", String(held));
17808
18406
  heldCell.dataset.held = String(held);
17809
- const addedCell = el4("td", "n", String(added));
18407
+ const addedCell = el5("td", "n", String(added));
17810
18408
  addedCell.dataset.added = String(added);
17811
18409
  tr.append(heldCell, addedCell);
17812
18410
  tbody.append(tr);
@@ -17816,10 +18414,10 @@ ${key}`);
17816
18414
  host.append(section);
17817
18415
  }
17818
18416
  function renderTerms(host, model, w) {
17819
- const section = el4("div", "rp-s");
18417
+ const section = el5("div", "rp-s");
17820
18418
  section.dataset.section = "terms";
17821
- section.append(el4("h3", "", w.t("lines.terms.h")));
17822
- const lede = el4(
18419
+ section.append(el5("h3", "", w.t("lines.terms.h")));
18420
+ const lede = el5(
17823
18421
  "p",
17824
18422
  "lede",
17825
18423
  model.terms.pack.agreement === NOT_STATED ? w.t("lines.terms.lede") : w.t("lines.terms.lede.agreed", {
@@ -17828,10 +18426,10 @@ ${key}`);
17828
18426
  );
17829
18427
  lede.dataset.termsSource = "bundle";
17830
18428
  section.append(lede);
17831
- const pack = el4("div", "pack");
18429
+ const pack = el5("div", "pack");
17832
18430
  const packField = (label, value) => {
17833
- const box = el4("div", "pk");
17834
- box.append(el4("div", "k", label), el4("div", "v", value));
18431
+ const box = el5("div", "pk");
18432
+ box.append(el5("div", "k", label), el5("div", "v", value));
17835
18433
  pack.append(box);
17836
18434
  };
17837
18435
  packField(w.t("lines.meta.pack"), model.terms.pack.id);
@@ -17844,28 +18442,28 @@ ${key}`);
17844
18442
  if (model.terms.pack.locked !== NOT_STATED)
17845
18443
  packField(w.t("lines.terms.locked"), model.terms.pack.locked);
17846
18444
  section.append(pack);
17847
- const outcome = el4("div", "outcome");
17848
- const outcomeIcon = el4("div", "oic");
18445
+ const outcome = el5("div", "outcome");
18446
+ const outcomeIcon = el5("div", "oic");
17849
18447
  const target = icon("target");
17850
18448
  if (target !== void 0) outcomeIcon.append(target);
17851
18449
  outcome.append(outcomeIcon);
17852
18450
  const outcomeBody = element3("div");
17853
- outcomeBody.append(el4("div", "t", w.t("lines.terms.outcome")));
17854
- outcomeBody.append(el4("div", "v", model.terms.pack.outcomeStatement));
18451
+ outcomeBody.append(el5("div", "t", w.t("lines.terms.outcome")));
18452
+ outcomeBody.append(el5("div", "v", model.terms.pack.outcomeStatement));
17855
18453
  outcome.append(outcomeBody);
17856
18454
  section.append(outcome);
17857
- const checks = el4("div", "checks");
18455
+ const checks = el5("div", "checks");
17858
18456
  checks.dataset.checks = String(model.terms.checks.length);
17859
18457
  for (const check of model.terms.checks) {
17860
- const card = el4("section", "check");
18458
+ const card = el5("section", "check");
17861
18459
  card.dataset.checkId = check.id;
17862
- const checkIcon = el4("div", "ic");
18460
+ const checkIcon = el5("div", "ic");
17863
18461
  const drawn = icon(check.icon);
17864
18462
  if (drawn !== void 0) checkIcon.append(drawn);
17865
18463
  card.append(checkIcon);
17866
- card.append(el4("div", "q", groupTitle(check, w)));
17867
- card.append(el4("div", "d", check.description));
17868
- const criteria = el4("ul", "subs");
18464
+ card.append(el5("div", "q", groupTitle(check, w)));
18465
+ card.append(el5("div", "d", check.description));
18466
+ const criteria = el5("ul", "subs");
17869
18467
  for (const criterion of check.criteria) {
17870
18468
  const ref = `${check.id}.${criterion.id}`;
17871
18469
  const tier = model.criterionTiers.get(ref) ?? "unknown";
@@ -17877,7 +18475,7 @@ ${key}`);
17877
18475
  source: "unstated"
17878
18476
  };
17879
18477
  item.dataset.wording = wording.source;
17880
- const label = el4("b", "", w.row(ref, "label") ?? criterion.label);
18478
+ const label = el5("b", "", w.row(ref, "label") ?? criterion.label);
17881
18479
  const termsBadge = editedBadge(model, ref, w);
17882
18480
  if (termsBadge !== void 0) label.append(termsBadge);
17883
18481
  item.append(label);
@@ -17891,32 +18489,32 @@ ${key}`);
17891
18489
  )
17892
18490
  );
17893
18491
  if (wording.source !== "sealed")
17894
- item.append(el4("small", "wsrc", wordingFallback(wording.source, w)));
18492
+ item.append(el5("small", "wsrc", wordingFallback(wording.source, w)));
17895
18493
  criteria.append(item);
17896
18494
  }
17897
18495
  card.append(criteria);
17898
18496
  checks.append(card);
17899
18497
  }
17900
18498
  section.append(checks);
17901
- const note = el4("p", "small", wordingNote(model, w));
18499
+ const note = el5("p", "small", wordingNote(model, w));
17902
18500
  note.dataset.wordingNote = "true";
17903
18501
  section.append(note);
17904
- section.append(el4("div", "rule", model.terms.pack.resolutionRule));
18502
+ section.append(el5("div", "rule", model.terms.pack.resolutionRule));
17905
18503
  host.append(section);
17906
18504
  }
17907
18505
  function renderWhatRan(host, runInfo, w) {
17908
- const section = el4("div", "rp-s");
18506
+ const section = el5("div", "rp-s");
17909
18507
  section.dataset.section = "what-ran";
17910
- section.append(el4("h3", "", w.t("lines.ran.h")));
17911
- const ran = el4("div", "ran");
18508
+ section.append(el5("h3", "", w.t("lines.ran.h")));
18509
+ const ran = el5("div", "ran");
17912
18510
  ran.dataset.pinned = String(runInfo.pinned);
17913
18511
  if (runInfo.judgePinRecomputes !== void 0)
17914
18512
  ran.dataset.pinRecomputes = String(runInfo.judgePinRecomputes);
17915
18513
  const box = (label, value, key) => {
17916
- const item = el4("div", "it");
18514
+ const item = el5("div", "it");
17917
18515
  item.dataset.ran = key;
17918
- item.append(el4("div", "k", label));
17919
- item.append(el4("div", "v", value));
18516
+ item.append(el5("div", "k", label));
18517
+ item.append(el5("div", "v", value));
17920
18518
  ran.append(item);
17921
18519
  };
17922
18520
  const pin = runInfo.judgePinRecomputes === true ? runInfo.judgePin : void 0;
@@ -17947,32 +18545,32 @@ ${key}`);
17947
18545
  box(w.t("lines.ran.agent"), w.t("lines.ran.agent.value"), "agent");
17948
18546
  section.append(ran);
17949
18547
  if (runInfo.judgePinRecomputes === false) {
17950
- const warning = el4("p", "", w.t("lines.ran.components-mismatch"));
18548
+ const warning = el5("p", "", w.t("lines.ran.components-mismatch"));
17951
18549
  warning.dataset.pinComponentsMismatch = "true";
17952
18550
  section.append(warning);
17953
18551
  }
17954
- const lock = el4("div", "lock", w.t("lines.ran.lock"));
18552
+ const lock = el5("div", "lock", w.t("lines.ran.lock"));
17955
18553
  section.append(lock);
17956
18554
  if (!runInfo.pinned) {
17957
- const warning = el4("p", "", w.t("lines.ran.pin-mismatch"));
18555
+ const warning = el5("p", "", w.t("lines.ran.pin-mismatch"));
17958
18556
  warning.dataset.pinMismatch = "true";
17959
18557
  section.append(warning);
17960
18558
  }
17961
18559
  host.append(section);
17962
18560
  }
17963
18561
  function renderVerificationDetails(host, bundle, verified, w) {
17964
- const section = el4("div", "rp-s");
18562
+ const section = el5("div", "rp-s");
17965
18563
  section.dataset.section = "verification-details";
17966
- section.append(el4("h3", "", w.t("card.vd.h")));
17967
- section.append(el4("p", "lede", w.t("lines.vd.lede")));
18564
+ section.append(el5("h3", "", w.t("card.vd.h")));
18565
+ section.append(el5("p", "lede", w.t("lines.vd.lede")));
17968
18566
  const model = buildVerificationPageModel(bundle, verified);
17969
- const tech = el4("div", "tech");
18567
+ const tech = el5("div", "tech");
17970
18568
  const field = (label, value) => {
17971
- tech.append(el4("div", "k", label), el4("div", "v", value));
18569
+ tech.append(el5("div", "k", label), el5("div", "v", value));
17972
18570
  };
17973
18571
  for (const [label, value] of verificationRows(model, w)) field(label, value);
17974
18572
  section.append(tech);
17975
- const note = el4("p", "note", w.t("lines.vd.note"));
18573
+ const note = el5("p", "note", w.t("lines.vd.note"));
17976
18574
  note.dataset.checkpointKind = "mmr";
17977
18575
  section.append(note);
17978
18576
  host.append(section);
@@ -18014,13 +18612,13 @@ ${key}`);
18014
18612
  ];
18015
18613
  }
18016
18614
  function renderReportProofs(host, model, runInfo, bundle, verified, w) {
18017
- const section = el4("section", "sec rp");
18615
+ const section = el5("section", "sec rp");
18018
18616
  section.dataset.section = "report-proofs";
18019
18617
  const toggle = levelToggle(
18020
18618
  2,
18021
18619
  w.t("lines.rp.toggle"),
18022
18620
  () => {
18023
- const box = el4("div", "pf-b");
18621
+ const box = el5("div", "pf-b");
18024
18622
  const ids = proofList([
18025
18623
  [w.t("card.pf.result-capsule"), model.capsuleId],
18026
18624
  [w.t("lines.meta.pack"), packLine(model, w)],
@@ -18031,7 +18629,7 @@ ${key}`);
18031
18629
  renderTerms(box, model, w);
18032
18630
  renderWhatRan(box, runInfo, w);
18033
18631
  renderVerificationDetails(box, bundle, verified, w);
18034
- const tamper = el4("p", "tamper-note", w.t("lines.rp.tamper"));
18632
+ const tamper = el5("p", "tamper-note", w.t("lines.rp.tamper"));
18035
18633
  tamper.dataset.tamperNote = "verify-first";
18036
18634
  box.append(tamper);
18037
18635
  return box;
@@ -18053,9 +18651,9 @@ ${key}`);
18053
18651
  const claims = model.conversations.flatMap(
18054
18652
  (c) => c.criteria.flatMap((cr) => cr.claim === void 0 ? [] : [cr.claim])
18055
18653
  );
18056
- const sheet = el4("div", "sheet");
18057
- const pad = el4("div", "pad");
18058
- const notes = el4("aside", "footnotes");
18654
+ const sheet = el5("div", "sheet");
18655
+ const pad = el5("div", "pad");
18656
+ const notes = el5("aside", "footnotes");
18059
18657
  notes.dataset.section = "footnotes";
18060
18658
  renderMeta(pad, model, w, notes);
18061
18659
  renderLines(pad, model, runInfo, w, notes);
@@ -18071,7 +18669,7 @@ ${key}`);
18071
18669
  )
18072
18670
  );
18073
18671
  levels.L2.append(renderCheckYourself(bundle, w));
18074
- renderCalendar(levels.L2, model, w);
18672
+ renderCalendar2(levels.L2, model, w);
18075
18673
  renderHumanChecks(levels.L2, model.calibration, w);
18076
18674
  renderProducerNote(levels.L2, model, w);
18077
18675
  renderReportProofs(levels.L2, model, runInfo, bundle, verified, w);
@@ -18083,7 +18681,7 @@ ${key}`);
18083
18681
  if (text2 !== void 0) value.textContent = text2;
18084
18682
  return value;
18085
18683
  }
18086
- function el5(tag, className, text2) {
18684
+ function el6(tag, className, text2) {
18087
18685
  const value = element4(tag, text2);
18088
18686
  value.className = className;
18089
18687
  return value;
@@ -18096,8 +18694,8 @@ ${key}`);
18096
18694
  return value;
18097
18695
  }
18098
18696
  function maybeProducer(w, tag, className, text2, producer) {
18099
- if (!producer) return el5(tag, className, text2);
18100
- const value = el5(tag, className);
18697
+ if (!producer) return el6(tag, className, text2);
18698
+ const value = el6(tag, className);
18101
18699
  value.append(producerText(w, text2));
18102
18700
  return value;
18103
18701
  }
@@ -18110,13 +18708,13 @@ ${key}`);
18110
18708
  };
18111
18709
  function severityPill(severity, w) {
18112
18710
  const cls = Object.hasOwn(SEVERITY_CLASS, severity) ? SEVERITY_CLASS[severity] : void 0;
18113
- const pill = el5("span", cls === void 0 ? "sev" : `sev ${cls}`);
18711
+ const pill = el6("span", cls === void 0 ? "sev" : `sev ${cls}`);
18114
18712
  pill.append(producerText(w, severity));
18115
18713
  return pill;
18116
18714
  }
18117
18715
  function tierBadge(tier, w) {
18118
18716
  const key = tier === "judged" || tier === "recomputed" || tier === "mixed" ? tier : "unstated";
18119
- const badge = el5(
18717
+ const badge = el6(
18120
18718
  "span",
18121
18719
  `kind ${tier === "judged" || tier === "recomputed" ? tier : "unstated"}`,
18122
18720
  w.t(`groups.tier.${key}`)
@@ -18126,10 +18724,10 @@ ${key}`);
18126
18724
  return badge;
18127
18725
  }
18128
18726
  function statusPill(statusClass, text2) {
18129
- return el5("span", `st ${statusClass}`, text2);
18727
+ return el6("span", `st ${statusClass}`, text2);
18130
18728
  }
18131
18729
  function packWord(tag, className, text2) {
18132
- const value = el5(tag, className, text2);
18730
+ const value = el6(tag, className, text2);
18133
18731
  value.dataset.wording = "pack";
18134
18732
  return value;
18135
18733
  }
@@ -18166,9 +18764,9 @@ ${key}`);
18166
18764
  return first === last ? first : w.t("card.span", { from: first, to: last });
18167
18765
  }
18168
18766
  function renderHeader(host, model, w) {
18169
- const hd = el5("div", "hd");
18767
+ const hd = el6("div", "hd");
18170
18768
  hd.dataset.section = "header";
18171
- hd.append(el5("h1", "", w.t("groups.kicker")));
18769
+ hd.append(el6("h1", "", w.t("groups.kicker")));
18172
18770
  const summary = reportSummary(w);
18173
18771
  if (summary !== void 0) hd.append(summary);
18174
18772
  const pack = model.pack.id === NOT_STATED ? w.t("groups.pack.not-stated") : w.t("groups.pack", { id: model.pack.id, version: model.pack.version });
@@ -18179,7 +18777,7 @@ ${key}`);
18179
18777
  sessions: count(w, "session", model.totalSessions)
18180
18778
  };
18181
18779
  hd.append(
18182
- el5(
18780
+ el6(
18183
18781
  "div",
18184
18782
  "sub",
18185
18783
  period === void 0 ? w.t("groups.sub", vars) : w.t(
@@ -18343,14 +18941,14 @@ ${key}`);
18343
18941
  return model.sessions.filter((s) => !outside.has(s.conversationId)).map((s) => s.tests.find((t) => t.criterionId === row2.criterionId)?.claim);
18344
18942
  }
18345
18943
  function renderSummary(host, model, presentation, result, w) {
18346
- const section = el5("section", "");
18944
+ const section = el6("section", "");
18347
18945
  section.dataset.section = "summary";
18348
18946
  const regulation = maybeProducer(w, "p", "kicker", model.regulation, true);
18349
18947
  regulation.dataset.regulation = "";
18350
- section.append(regulation, el5("h2", "", w.t("groups.summary.h")));
18948
+ section.append(regulation, el6("h2", "", w.t("groups.summary.h")));
18351
18949
  const tests = model.obligations.reduce((n, o) => n + o.rows.length, 0);
18352
18950
  section.append(
18353
- el5(
18951
+ el6(
18354
18952
  "p",
18355
18953
  "lede",
18356
18954
  w.t("groups.summary.lede", {
@@ -18366,7 +18964,7 @@ ${key}`);
18366
18964
  const headRow = document.createElement("tr");
18367
18965
  headRow.append(
18368
18966
  element4("th", w.t("groups.summary.col.test")),
18369
- el5("th", "n", w.t("groups.summary.col.checked-in")),
18967
+ el6("th", "n", w.t("groups.summary.col.checked-in")),
18370
18968
  element4("th", w.t("groups.summary.col.result"))
18371
18969
  );
18372
18970
  thead.append(headRow);
@@ -18374,20 +18972,20 @@ ${key}`);
18374
18972
  for (const obligation of model.obligations) {
18375
18973
  const tbody = document.createElement("tbody");
18376
18974
  tbody.dataset.obligationGroup = obligation.key;
18377
- const row2 = el5("tr", "ob");
18975
+ const row2 = el6("tr", "ob");
18378
18976
  row2.dataset.obligation = obligation.key;
18379
- const title = el5("td", "");
18977
+ const title = el6("td", "");
18380
18978
  title.setAttribute("colspan", "3");
18381
- const name = el5("b", "obn");
18979
+ const name = el6("b", "obn");
18382
18980
  name.append(
18383
- ...obligationName(w, obligation, el5("span", "art", obligation.article))
18981
+ ...obligationName(w, obligation, el6("span", "art", obligation.article))
18384
18982
  );
18385
18983
  title.append(name);
18386
18984
  row2.append(title);
18387
18985
  tbody.append(row2);
18388
- const about = el5("tr", "drill-row ob-about");
18986
+ const about = el6("tr", "drill-row ob-about");
18389
18987
  about.dataset.aboutFor = obligation.key;
18390
- const aboutCell = el5("td", "");
18988
+ const aboutCell = el6("td", "");
18391
18989
  aboutCell.setAttribute("colspan", "3");
18392
18990
  about.append(aboutCell);
18393
18991
  expandableRow(
@@ -18395,7 +18993,7 @@ ${key}`);
18395
18993
  name,
18396
18994
  about,
18397
18995
  () => {
18398
- const body = el5("div", "ob-x");
18996
+ const body = el6("div", "ob-x");
18399
18997
  if (obligation.plain !== NOT_STATED)
18400
18998
  body.append(maybeProducer(w, "div", "plain", obligation.plain, true));
18401
18999
  body.append(
@@ -18414,7 +19012,7 @@ ${key}`);
18414
19012
  );
18415
19013
  tbody.append(about);
18416
19014
  for (const test of obligation.rows) {
18417
- const tr = el5("tr", "test");
19015
+ const tr = el6("tr", "test");
18418
19016
  tr.dataset.criterion = test.criterionId;
18419
19017
  const counted = population(test, model.totalSessions);
18420
19018
  tr.dataset.population = String(counted);
@@ -18423,8 +19021,8 @@ ${key}`);
18423
19021
  tr.dataset.exceptions = String(test.notMetCount);
18424
19022
  tr.dataset.notEvaluable = String(test.notEvaluableCount);
18425
19023
  tr.dataset.unverified = String(test.unverifiedCount);
18426
- const nameCell = el5("td", "tn");
18427
- const head2 = el5("div", "tnh");
19024
+ const nameCell = el6("td", "tn");
19025
+ const head2 = el6("div", "tnh");
18428
19026
  const testName = rowName2(w, "b", "", test);
18429
19027
  head2.append(testName, tierBadge(test.tier, w));
18430
19028
  nameCell.append(head2);
@@ -18436,9 +19034,9 @@ ${key}`);
18436
19034
  ...test.sessionsByVerdict.get("unverified") ?? [],
18437
19035
  ...test.sessionsByVerdict.get("not_evaluable") ?? []
18438
19036
  ];
18439
- const checkedIn = el5("td", "n");
19037
+ const checkedIn = el6("td", "n");
18440
19038
  checkedIn.dataset.column = "checked-in";
18441
- checkedIn.append(el5("span", "nv", count(w, "session", counted)));
19039
+ checkedIn.append(el6("span", "nv", count(w, "session", counted)));
18442
19040
  const action = evidenceAction(
18443
19041
  `test:${test.criterionId}:checked-in`,
18444
19042
  `${test.name} \xB7 ${w.t("groups.summary.col.checked-in")}: ${count(w, "session", counted)}`,
@@ -18450,7 +19048,7 @@ ${key}`);
18450
19048
  tr.append(nameCell, checkedIn, rowResult(test, model, result, w));
18451
19049
  tbody.append(tr);
18452
19050
  if (sessionIds.length > 0) {
18453
- const drillRow = el5("tr", "drill-row");
19051
+ const drillRow = el6("tr", "drill-row");
18454
19052
  drillRow.dataset.drillFor = test.criterionId;
18455
19053
  const cell = document.createElement("td");
18456
19054
  cell.setAttribute("colspan", "3");
@@ -18470,9 +19068,9 @@ ${key}`);
18470
19068
  table2.append(tbody);
18471
19069
  }
18472
19070
  section.append(table2);
18473
- const notes = el5("aside", "footnotes");
19071
+ const notes = el6("aside", "footnotes");
18474
19072
  notes.dataset.section = "footnotes";
18475
- const basis = el5("p", "", w.t("groups.summary.basis"));
19073
+ const basis = el6("p", "", w.t("groups.summary.basis"));
18476
19074
  basis.dataset.basis = "terms";
18477
19075
  notes.append(basis);
18478
19076
  section.append(notes);
@@ -18480,21 +19078,21 @@ ${key}`);
18480
19078
  }
18481
19079
  function renderFindings(host, model, w) {
18482
19080
  if (model.findings.length === 0) return;
18483
- const section = el5("section", "findings");
19081
+ const section = el6("section", "findings");
18484
19082
  section.dataset.section = "findings";
18485
19083
  section.dataset.producer = "";
18486
19084
  section.append(
18487
- el5("div", "plabel", w.t("front.findings.label")),
18488
- el5("h2", "", w.t("front.findings.h"))
19085
+ el6("div", "plabel", w.t("front.findings.label")),
19086
+ el6("h2", "", w.t("front.findings.h"))
18489
19087
  );
18490
19088
  for (const finding of model.findings)
18491
19089
  section.append(renderFinding(finding, w));
18492
19090
  host.append(section);
18493
19091
  }
18494
19092
  function renderFinding(finding, w) {
18495
- const box = el5("div", "fnd");
19093
+ const box = el6("div", "fnd");
18496
19094
  box.dataset.finding = finding.id;
18497
- const fh = el5("div", "fh");
19095
+ const fh = el6("div", "fh");
18498
19096
  fh.append(
18499
19097
  maybeProducer(w, "b", "", w.t("groups.finding", { id: finding.id }), true),
18500
19098
  severityPill(finding.severity, w),
@@ -18502,24 +19100,24 @@ ${key}`);
18502
19100
  );
18503
19101
  box.append(fh);
18504
19102
  box.append(maybeProducer(w, "div", "rec", finding.recommendation, true));
18505
- const own = el5("div", "own", w.t("groups.finding.owner"));
19103
+ const own = el6("div", "own", w.t("groups.finding.owner"));
18506
19104
  own.append(producerText(w, finding.ownerDue));
18507
19105
  box.append(own);
18508
19106
  return box;
18509
19107
  }
18510
19108
  function renderSessionList(conversationIds, model, presentation, w) {
18511
19109
  const byId = new Map(model.sessions.map((s) => [s.conversationId, s]));
18512
- const list = el5("div", "convs");
18513
- list.dataset.sessionCount = String(conversationIds.length);
19110
+ const list2 = el6("div", "convs");
19111
+ list2.dataset.sessionCount = String(conversationIds.length);
18514
19112
  for (const id of conversationIds) {
18515
19113
  const session = byId.get(id);
18516
19114
  if (session !== void 0)
18517
- list.append(renderSession(session, model, presentation, w));
19115
+ list2.append(renderSession(session, model, presentation, w));
18518
19116
  }
18519
- return list;
19117
+ return list2;
18520
19118
  }
18521
19119
  function laterNote(test, w, tag) {
18522
- const note = el5(
19120
+ const note = el6(
18523
19121
  tag,
18524
19122
  "applic",
18525
19123
  w.t("groups.later.note", { date: test.claim?.appliesFrom ?? "" })
@@ -18543,10 +19141,10 @@ ${key}`);
18543
19141
  const unverified = session.tests.filter(isUnverified2);
18544
19142
  const undecided = session.tests.filter((t) => t.verdict === "not_evaluable");
18545
19143
  const parts = caseParts(session.conversationId, w);
18546
- const item = el5("article", "conv session");
19144
+ const item = el6("article", "conv session");
18547
19145
  item.dataset.session = session.conversationId;
18548
- const head2 = el5("div", "conv-h");
18549
- head2.append(el5("span", "cid", parts.label));
19146
+ const head2 = el6("div", "conv-h");
19147
+ head2.append(el6("span", "cid", parts.label));
18550
19148
  head2.append(
18551
19149
  exceptions.length > 0 ? wordPill(
18552
19150
  { word: count(w, "exception", exceptions.length), tone: "bad" },
@@ -18562,28 +19160,28 @@ ${key}`);
18562
19160
  "none"
18563
19161
  )
18564
19162
  );
18565
- const why = el5("span", "cwhy");
19163
+ const why = el6("span", "cwhy");
18566
19164
  (exceptions.length > 0 ? exceptions : unverified.length > 0 ? unverified : undecided).forEach((t, i) => {
18567
19165
  if (i > 0) why.append(", ");
18568
19166
  why.append(names2(t.criterionId, "span", ""));
18569
19167
  });
18570
19168
  head2.append(why);
18571
- head2.append(el5("span", "cmodel", parts.model ?? session.day));
19169
+ head2.append(el6("span", "cmodel", parts.model ?? session.day));
18572
19170
  item.append(head2);
18573
- const body = el5("div", "conv-slot");
19171
+ const body = el6("div", "conv-slot");
18574
19172
  item.append(body);
18575
19173
  lazyBody(body, () => sessionBody(session, model, presentation, w));
18576
19174
  return item;
18577
19175
  }
18578
19176
  function sessionBody(session, model, presentation, w) {
18579
19177
  const names2 = testNames(model, w);
18580
- const body = el5("div", "conv-b");
18581
- body.append(el5("h4", "", w.t("groups.h.test-by-test")));
19178
+ const body = el6("div", "conv-b");
19179
+ body.append(el6("h4", "", w.t("groups.h.test-by-test")));
18582
19180
  for (const test of session.tests) {
18583
- const box = el5("div", "ck");
19181
+ const box = el6("div", "ck");
18584
19182
  box.dataset.crit = test.criterionId;
18585
19183
  box.dataset.critVerdict = test.verdict;
18586
- const h = el5("div", "h");
19184
+ const h = el6("div", "h");
18587
19185
  h.append(
18588
19186
  wordPill(
18589
19187
  ruleWord(
@@ -18598,13 +19196,13 @@ ${key}`);
18598
19196
  if (test.verdict !== "not_applicable" && test.verdict !== "not_yet_in_force")
18599
19197
  h.append(tierBadge(test.tier, w));
18600
19198
  if (test.verdict === "failed" || test.verdict === "unsupported")
18601
- h.append(el5("span", "applic", w.t("groups.unverified-note")));
19199
+ h.append(el6("span", "applic", w.t("groups.unverified-note")));
18602
19200
  if (test.verdict === "not_yet_in_force")
18603
19201
  h.append(laterNote(test, w, "span"));
18604
19202
  box.append(h);
18605
19203
  if (test.rationale !== void 0)
18606
19204
  box.append(
18607
- el5(
19205
+ el6(
18608
19206
  "div",
18609
19207
  "why",
18610
19208
  judgeNote(test.rationale, test.claim?.verdict ?? test.verdict, w)
@@ -18613,7 +19211,7 @@ ${key}`);
18613
19211
  body.append(box);
18614
19212
  }
18615
19213
  if (session.tests.every((t) => t.rationale === void 0)) {
18616
- const gap = el5(
19214
+ const gap = el6(
18617
19215
  "p",
18618
19216
  "small",
18619
19217
  notesGap(
@@ -18639,7 +19237,7 @@ ${key}`);
18639
19237
  }
18640
19238
  function sessionProofs(session, model, w) {
18641
19239
  const names2 = testNames(model, w);
18642
- const box = el5("div", "pf-b");
19240
+ const box = el6("div", "pf-b");
18643
19241
  box.dataset.proofsFor = session.conversationId;
18644
19242
  const dated = session.dated;
18645
19243
  const dating = dated.basis === "judged" ? [] : [
@@ -18668,9 +19266,9 @@ ${key}`);
18668
19266
  const dl = proofList(rows);
18669
19267
  dl.dataset.checkIt = session.conversationId;
18670
19268
  box.append(dl);
18671
- box.append(el5("h5", "", w.t("groups.pf.h.each-report")));
19269
+ box.append(el6("h5", "", w.t("groups.pf.h.each-report")));
18672
19270
  for (const test of session.tests) {
18673
- const ev = el5("div", "ev");
19271
+ const ev = el6("div", "ev");
18674
19272
  ev.dataset.proofCrit = test.criterionId;
18675
19273
  const label = names2(test.criterionId, "b", "");
18676
19274
  label.append(": ");
@@ -18692,7 +19290,7 @@ ${key}`);
18692
19290
  )
18693
19291
  );
18694
19292
  if (test.rationale !== void 0) {
18695
- const sealed = el5(
19293
+ const sealed = el6(
18696
19294
  "div",
18697
19295
  "sealed",
18698
19296
  w.t("groups.pf.rationale", { rationale: test.rationale })
@@ -18716,14 +19314,14 @@ ${key}`);
18716
19314
  return pinAbsence(model.runInfo, w) ?? w.t("groups.pin.none");
18717
19315
  }
18718
19316
  function renderReportProofs2(host, model, bundle, verified, w) {
18719
- const section = el5("section", "rp");
19317
+ const section = el6("section", "rp");
18720
19318
  section.dataset.section = "report-proofs";
18721
19319
  section.append(
18722
19320
  levelToggle(
18723
19321
  2,
18724
19322
  w.t("groups.rp.toggle"),
18725
19323
  () => {
18726
- const box = el5("div", "pf-b");
19324
+ const box = el6("div", "pf-b");
18727
19325
  renderObligationDetails(box, model, w);
18728
19326
  renderQuality(box, model, w);
18729
19327
  renderWhatRan2(box, model, w);
@@ -18736,11 +19334,11 @@ ${key}`);
18736
19334
  host.append(section);
18737
19335
  }
18738
19336
  function renderObligationDetails(host, model, w) {
18739
- const part = el5("div", "rp-s");
19337
+ const part = el6("div", "rp-s");
18740
19338
  part.dataset.section = "obligation-detail";
18741
- part.append(el5("h3", "", w.t("groups.od.h")));
19339
+ part.append(el6("h3", "", w.t("groups.od.h")));
18742
19340
  for (const obligation of model.obligations) {
18743
- const box = el5("div", "obd");
19341
+ const box = el6("div", "obd");
18744
19342
  box.dataset.obligationDetail = obligation.key;
18745
19343
  box.dataset.mapped = String(obligation.mapped);
18746
19344
  const heading = element4("h5");
@@ -18749,26 +19347,26 @@ ${key}`);
18749
19347
  );
18750
19348
  box.append(heading);
18751
19349
  box.append(
18752
- el5(
19350
+ el6(
18753
19351
  "p",
18754
19352
  "na",
18755
19353
  w.t(obligation.mapped ? "groups.od.mapped" : "groups.od.unmapped")
18756
19354
  )
18757
19355
  );
18758
19356
  if (obligation.judgedTerms.length > 0) {
18759
- const terms = el5("p", "applic", w.t("groups.od.judged-terms"));
19357
+ const terms = el6("p", "applic", w.t("groups.od.judged-terms"));
18760
19358
  terms.append(producerText(w, obligation.judgedTerms.join(", ")));
18761
19359
  box.append(terms);
18762
19360
  }
18763
19361
  box.append(maybeProducer(w, "p", "", obligation.method, obligation.mapped));
18764
19362
  for (const row2 of obligation.rows) {
18765
- const rowBox = el5("div", "ck");
19363
+ const rowBox = el6("div", "ck");
18766
19364
  rowBox.dataset.wording = row2.wording.source;
18767
- const h = el5("div", "h");
19365
+ const h = el6("div", "h");
18768
19366
  h.append(rowName2(w, "span", "", row2), tierBadge(row2.tier, w));
18769
19367
  rowBox.append(h);
18770
19368
  rowBox.append(
18771
- el5(
19369
+ el6(
18772
19370
  "div",
18773
19371
  "why",
18774
19372
  row2.wording.source === "sealed" ? w.t("groups.od.wording.sealed", { text: row2.wording.text }) : w.t(
@@ -18790,16 +19388,16 @@ ${key}`);
18790
19388
  host.append(part);
18791
19389
  }
18792
19390
  function renderQuality(host, model, w) {
18793
- const part = el5("div", "rp-s");
19391
+ const part = el6("div", "rp-s");
18794
19392
  part.dataset.section = "quality";
18795
- part.append(el5("h3", "", w.t("groups.q.h")));
19393
+ part.append(el6("h3", "", w.t("groups.q.h")));
18796
19394
  const protocol = model.qualityProtocol;
18797
19395
  if (protocol === void 0) {
18798
- part.append(el5("p", "", w.t("groups.q.none")));
19396
+ part.append(el6("p", "", w.t("groups.q.none")));
18799
19397
  host.append(part);
18800
19398
  return;
18801
19399
  }
18802
- const line = el5("p", "", w.t("groups.q.protocol"));
19400
+ const line = el6("p", "", w.t("groups.q.protocol"));
18803
19401
  line.append(
18804
19402
  protocol.protocol === void 0 ? w.t("groups.q.unspecified") : producerText(w, protocol.protocol)
18805
19403
  );
@@ -18812,9 +19410,9 @@ ${key}`);
18812
19410
  host.append(part);
18813
19411
  }
18814
19412
  function renderWhatRan2(host, model, w) {
18815
- const part = el5("div", "rp-s");
19413
+ const part = el6("div", "rp-s");
18816
19414
  part.dataset.section = "methodology";
18817
- part.append(el5("h3", "", w.t("groups.ran.h")));
19415
+ part.append(el6("h3", "", w.t("groups.ran.h")));
18818
19416
  const dl = proofList([
18819
19417
  [
18820
19418
  w.t("groups.ran.contract"),
@@ -18845,19 +19443,19 @@ ${key}`);
18845
19443
  part.append(dl);
18846
19444
  const note = datingStatement(model.dating, model.totalSessions, w);
18847
19445
  if (note !== void 0) {
18848
- const p = el5("p", "na", note);
19446
+ const p = el6("p", "na", note);
18849
19447
  p.dataset.dateNote = model.dating.basis;
18850
19448
  part.append(p);
18851
19449
  }
18852
19450
  host.append(part);
18853
19451
  }
18854
19452
  function renderVerificationDetails2(host, bundle, verified, w) {
18855
- const part = el5("div", "rp-s");
19453
+ const part = el6("div", "rp-s");
18856
19454
  part.dataset.section = "verification-details";
18857
- part.append(el5("h3", "", w.t("card.vd.h")));
19455
+ part.append(el6("h3", "", w.t("card.vd.h")));
18858
19456
  const model = buildVerificationPageModel(bundle, verified);
18859
19457
  part.append(proofList(verificationRows(model, w)));
18860
- part.append(el5("p", "", w.t("groups.vd.note")));
19458
+ part.append(el6("p", "", w.t("groups.vd.note")));
18861
19459
  host.append(part);
18862
19460
  }
18863
19461
  var GROUPS_FRAME = {
@@ -18871,7 +19469,7 @@ ${key}`);
18871
19469
  const claims = model.sessions.flatMap(
18872
19470
  (s) => s.tests.flatMap((t) => t.claim === void 0 ? [] : [t.claim])
18873
19471
  );
18874
- const sheet = el5("div", "l0-card");
19472
+ const sheet = el6("div", "l0-card");
18875
19473
  renderHeader(sheet, model, w);
18876
19474
  levels.L0.append(sheet);
18877
19475
  renderSummary(levels.L1, model, presentation, result, w);
@@ -18896,23 +19494,23 @@ ${key}`);
18896
19494
  const w = await contractReportWords(input.grouping, wording, {
18897
19495
  singleContract: citesOneContract(result)
18898
19496
  });
18899
- const frame = FRAMES[input.grouping];
19497
+ const frame2 = FRAMES[input.grouping];
18900
19498
  const regions = (
18901
19499
  // By shape, not instanceof: a host element may come from another
18902
19500
  // window (a static page drawn into its own document).
18903
19501
  "L0" in host ? host : { L0: host, L1: host, L2: host, depth: "L0" }
18904
19502
  );
18905
19503
  const wrap = (level) => {
18906
- const wrapper = document.createElement(frame.tag);
18907
- wrapper.className = frame.className;
18908
- wrapper.dataset.page = frame.page;
19504
+ const wrapper = document.createElement(frame2.tag);
19505
+ wrapper.className = frame2.className;
19506
+ wrapper.dataset.page = frame2.page;
18909
19507
  wrapper.dataset.level = level;
18910
19508
  wrapper.dataset.levels = "2";
18911
19509
  return wrapper;
18912
19510
  };
18913
19511
  const levels = { L0: wrap("L0"), L1: wrap("L1"), L2: wrap("L2") };
18914
19512
  const style = document.createElement("style");
18915
- style.textContent = frame.css;
19513
+ style.textContent = frame2.css;
18916
19514
  levels.L0.append(style);
18917
19515
  const refused = refusedWordingNotice(w);
18918
19516
  if (refused !== void 0) levels.L0.append(refused);
@@ -19030,27 +19628,27 @@ ${key}`);
19030
19628
  const body = element5("tbody");
19031
19629
  body.append(...rows);
19032
19630
  node.append(head2, body);
19033
- const frame = element5("div");
19034
- frame.className = "cv-composed-table";
19035
- frame.append(node);
19036
- return frame;
19631
+ const frame2 = element5("div");
19632
+ frame2.className = "cv-composed-table";
19633
+ frame2.append(node);
19634
+ return frame2;
19037
19635
  }
19038
19636
  var NOT_APPLICABLE = "\u2014";
19039
19637
  var findingsText = (findings) => findings.length === 0 ? "none" : findings.join(", ");
19040
19638
  var claimText = (claim) => claim === void 0 ? NOT_APPLICABLE : claim.findings.length === 0 ? claim.status : `${claim.status} (${claim.findings.join(", ")})`;
19041
19639
  var pairText = (members) => `${members[0]} \u2013 ${members[1]}`;
19042
19640
  function renderDifference(difference, host) {
19043
- const list = element5("dl");
19044
- list.dataset.pointer = difference.pointer;
19045
- list.append(element5("dt", difference.pointer));
19641
+ const list2 = element5("dl");
19642
+ list2.dataset.pointer = difference.pointer;
19643
+ list2.append(element5("dt", difference.pointer));
19046
19644
  for (const value of difference.values)
19047
- list.append(
19645
+ list2.append(
19048
19646
  element5(
19049
19647
  "dd",
19050
19648
  value.resolved ? `${value.member}: ${JSON.stringify(value.value)}` : `${value.member}: does not resolve`
19051
19649
  )
19052
19650
  );
19053
- host.append(list);
19651
+ host.append(list2);
19054
19652
  }
19055
19653
  function corroborationText(c) {
19056
19654
  switch (c.result) {
@@ -19239,7 +19837,7 @@ ${key}`);
19239
19837
  @media (max-width:640px){.cv-strip .agg-buckets{grid-template-columns:minmax(0,1fr)}.cv-strip .agg-bucket{flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:4px 10px}.cv-strip .agg-bucket b{font-size:22px}}
19240
19838
  @media print{.cv-strip{break-inside:avoid}}
19241
19839
  `;
19242
- function el6(tag, className, text2) {
19840
+ function el7(tag, className, text2) {
19243
19841
  const node = document.createElement(tag);
19244
19842
  if (className !== "") node.className = className;
19245
19843
  if (text2 !== void 0) node.textContent = text2;
@@ -19251,7 +19849,7 @@ ${key}`);
19251
19849
  (entry) => entry.field === field
19252
19850
  );
19253
19851
  if (mismatch === void 0) return void 0;
19254
- const marker = el6(
19852
+ const marker = el7(
19255
19853
  "span",
19256
19854
  "count mismatch",
19257
19855
  w.t("front.agg.mismatch", { recomputed: fmt4(mismatch.recomputed) })
@@ -19269,7 +19867,7 @@ ${key}`);
19269
19867
  (claim) => JSON.stringify([claim.contractRef, claim.requirementRef])
19270
19868
  )
19271
19869
  ).size;
19272
- const line = el6("p", "agg-line");
19870
+ const line = el7("p", "agg-line");
19273
19871
  const marked = (text2, field) => {
19274
19872
  line.append(text2);
19275
19873
  const marker = mismatchMarker(result, field, w);
@@ -19313,7 +19911,7 @@ ${key}`);
19313
19911
  line.dataset.excluded = String(stated.excludedNotApplicable);
19314
19912
  line.dataset.unknown = String(stated.unknownCount);
19315
19913
  out.append(line);
19316
- const buckets = el6("div", "agg-buckets");
19914
+ const buckets = el7("div", "agg-buckets");
19317
19915
  const of = w.t("front.agg.of", { n: fmt4(stated.evaluatedPopulation) });
19318
19916
  const entries = [
19319
19917
  ["met", result.buckets.met, "buckets.met"],
@@ -19323,13 +19921,13 @@ ${key}`);
19323
19921
  ];
19324
19922
  for (const [verdict2, ids, field] of entries) {
19325
19923
  if (ids === void 0) continue;
19326
- const box = el6("div", `agg-bucket ${verdict2}`);
19924
+ const box = el7("div", `agg-bucket ${verdict2}`);
19327
19925
  box.dataset.bucket = verdict2;
19328
19926
  box.dataset.count = String(ids.length);
19329
19927
  box.dataset.of = String(stated.evaluatedPopulation);
19330
- box.append(el6("b", "", fmt4(ids.length)));
19331
- box.append(el6("span", "", w.t(`front.agg.bucket.${verdict2}`)));
19332
- box.append(el6("span", "agg-of", of));
19928
+ box.append(el7("b", "", fmt4(ids.length)));
19929
+ box.append(el7("span", "", w.t(`front.agg.bucket.${verdict2}`)));
19930
+ box.append(el7("span", "agg-of", of));
19333
19931
  const marker = mismatchMarker(result, field, w);
19334
19932
  if (marker !== void 0) box.append(marker);
19335
19933
  buckets.append(box);
@@ -19338,7 +19936,7 @@ ${key}`);
19338
19936
  const dated = result.claims.some((claim) => claim.appliesFrom !== void 0);
19339
19937
  const switched = result.buckets.outOfScope !== void 0;
19340
19938
  if (dated || switched) {
19341
- const copied = el6("p", "agg-note");
19939
+ const copied = el7("p", "agg-note");
19342
19940
  if (dated) {
19343
19941
  const date = utcDateOf(result.generatedAt) ?? result.generatedAt;
19344
19942
  copied.append(w.t("front.agg.as-of", { date }), " ");
@@ -19359,14 +19957,14 @@ ${key}`);
19359
19957
  return { result, words, mock: judgedByMock(tally) };
19360
19958
  }
19361
19959
  function renderCoreStrip(model) {
19362
- const strip = el6("section", "cv-strip");
19960
+ const strip = el7("section", "cv-strip");
19363
19961
  strip.setAttribute(CORE_STRIP_ATTRIBUTE, "");
19364
19962
  strip.dataset.section = "aggregate";
19365
19963
  const style = document.createElement("style");
19366
19964
  style.textContent = CORE_STRIP_CSS;
19367
19965
  strip.append(style);
19368
19966
  if (model.mock) {
19369
- const mark = el6("p", "mockmark", model.words.t("front.mock"));
19967
+ const mark = el7("p", "mockmark", model.words.t("front.mock"));
19370
19968
  mark.dataset.section = "mock-judge";
19371
19969
  strip.append(mark);
19372
19970
  }
@@ -19797,7 +20395,7 @@ ${pad.repeat(depth)}`;
19797
20395
  problems.push("requires two tokens of one profile key");
19798
20396
  return problems;
19799
20397
  }
19800
- async function resolveModules(modules, descriptor, audience, format, canRender, refuse2 = () => void 0) {
20398
+ async function resolveModules(modules, descriptor, audience, format, canRender, refuse3 = () => void 0) {
19801
20399
  if (!descriptor.verified) return { kind: "refusal" };
19802
20400
  const matched = modules.filter(
19803
20401
  (m) => manifestMatches(m.manifest, descriptor, audience, format)
@@ -19811,7 +20409,7 @@ ${pad.repeat(depth)}`;
19811
20409
  );
19812
20410
  const only = tier[0];
19813
20411
  if (only === void 0) continue;
19814
- const refusal = refuse2(only);
20412
+ const refusal = refuse3(only);
19815
20413
  if (refusal !== void 0) {
19816
20414
  refused.push(refusal);
19817
20415
  continue;
@@ -19967,7 +20565,7 @@ ${pad.repeat(depth)}`;
19967
20565
  parent2.append(cell);
19968
20566
  }
19969
20567
  var recordsWord2 = (count2) => `${count2} ${count2 === 1 ? "record" : "records"}`;
19970
- function renderVerificationBanner(root, model, coverage) {
20568
+ function renderVerificationBanner(root, model, coverage, witness) {
19971
20569
  const bar = element6("div");
19972
20570
  bar.className = model.state === "failed" ? "cv-shell-bar cv-failed" : model.state === "incomplete" ? "cv-shell-bar cv-incomplete" : "cv-shell-bar";
19973
20571
  const banner = element6("span", model.line);
@@ -20006,12 +20604,24 @@ ${pad.repeat(depth)}`;
20006
20604
  detail.dataset.bannerDetail = "";
20007
20605
  root.append(detail);
20008
20606
  }
20607
+ if (witness !== void 0) {
20608
+ const notice = element6("p", WITNESS_NOTICE_LINES[witness]);
20609
+ notice.className = "cv-banner-detail cv-witness-notice";
20610
+ notice.dataset.witnessNotice = witness;
20611
+ root.append(notice);
20612
+ }
20009
20613
  if (model.refusal === void 0) return bar;
20010
20614
  const refusal = element6("p", model.refusal);
20011
20615
  refusal.dataset.refusal = "unverified-bundle";
20012
20616
  root.append(refusal);
20013
20617
  return bar;
20014
20618
  }
20619
+ function bannerWitnessNotice(model, bundle, verification) {
20620
+ if (model.state !== "verified" && model.state !== "incomplete")
20621
+ return void 0;
20622
+ if (model.checkpoint !== "verified") return void 0;
20623
+ return witnessNotice(bundle, verification);
20624
+ }
20015
20625
  function renderChecking(root) {
20016
20626
  const bar = element6("div");
20017
20627
  bar.className = "cv-shell-bar";
@@ -20157,7 +20767,7 @@ ${pad.repeat(depth)}`;
20157
20767
  }
20158
20768
  function renderStamps(host, stamps) {
20159
20769
  host.append(element6("h4", "Countersignatures"));
20160
- const list = element6("ul");
20770
+ const list2 = element6("ul");
20161
20771
  stamps.forEach((stamp) => {
20162
20772
  const item = element6("li");
20163
20773
  item.dataset.stampKind = stamp.kind;
@@ -20169,9 +20779,9 @@ ${pad.repeat(depth)}`;
20169
20779
  } else if (stamp.kind === "unresolved-signer") {
20170
20780
  renderSignerStatement(item, "The unlisted signer", stamp.statement);
20171
20781
  }
20172
- list.append(item);
20782
+ list2.append(item);
20173
20783
  });
20174
- host.append(list);
20784
+ host.append(list2);
20175
20785
  }
20176
20786
  function renderReceipts(host, receipts2) {
20177
20787
  host.append(element6("h4", "Receipts"));
@@ -20179,16 +20789,16 @@ ${pad.repeat(depth)}`;
20179
20789
  host.append(element6("p", "no receipts disclosed"));
20180
20790
  return;
20181
20791
  }
20182
- const list = element6("ul");
20792
+ const list2 = element6("ul");
20183
20793
  receipts2.forEach((receipt) => {
20184
20794
  const item = element6(
20185
20795
  "li",
20186
20796
  `${receipt.witness} \xB7 ${RECEIPT_GRADE_DISPLAY[receipt.grade]} \xB7 `
20187
20797
  );
20188
20798
  item.append(renderTime(receipt.time));
20189
- list.append(item);
20799
+ list2.append(item);
20190
20800
  });
20191
- host.append(list);
20801
+ host.append(list2);
20192
20802
  }
20193
20803
  var COVERAGE_LABEL = Object.freeze({
20194
20804
  checkpointed: "checkpointed",
@@ -20240,8 +20850,8 @@ ${pad.repeat(depth)}`;
20240
20850
  note.dataset.records = "not-shown";
20241
20851
  details.append(note);
20242
20852
  }
20243
- const list = element6("ul");
20244
- list.dataset.records = "coverage";
20853
+ const list2 = element6("ul");
20854
+ list2.dataset.records = "coverage";
20245
20855
  const owners = /* @__PURE__ */ new Map();
20246
20856
  for (const record of records)
20247
20857
  if (entries.verified && entries.read.has(record.capsuleId)) {
@@ -20285,7 +20895,7 @@ ${pad.repeat(depth)}`;
20285
20895
  const read = entries.read.get(capsuleId);
20286
20896
  if (!entries.verified || read === void 0) {
20287
20897
  item.append(document.createTextNode(label), status2);
20288
- list.append(item);
20898
+ list2.append(item);
20289
20899
  continue;
20290
20900
  }
20291
20901
  const fold = document.createElement("details");
@@ -20303,9 +20913,9 @@ ${pad.repeat(depth)}`;
20303
20913
  if (fold.open && target !== void 0) target.scrollIntoView?.();
20304
20914
  });
20305
20915
  item.append(fold);
20306
- list.append(item);
20916
+ list2.append(item);
20307
20917
  }
20308
- details.append(list);
20918
+ details.append(list2);
20309
20919
  return details;
20310
20920
  }
20311
20921
  async function recordEntries(context, result) {
@@ -20362,8 +20972,8 @@ ${pad.repeat(depth)}`;
20362
20972
  for (const record of records) {
20363
20973
  counts.set(record.status, (counts.get(record.status) ?? 0) + 1);
20364
20974
  }
20365
- const list = element6("ul");
20366
- list.dataset.records = "coverage-summary";
20975
+ const list2 = element6("ul");
20976
+ list2.dataset.records = "coverage-summary";
20367
20977
  for (const status2 of Object.keys(COVERAGE_LABEL)) {
20368
20978
  const count2 = counts.get(status2) ?? 0;
20369
20979
  if (count2 === 0) continue;
@@ -20373,9 +20983,9 @@ ${pad.repeat(depth)}`;
20373
20983
  );
20374
20984
  item.dataset.coverageStatus = status2;
20375
20985
  item.dataset.count = String(count2);
20376
- list.append(item);
20986
+ list2.append(item);
20377
20987
  }
20378
- return list;
20988
+ return list2;
20379
20989
  }
20380
20990
  function renderCompletenessStatement(host, completeness2) {
20381
20991
  host.append(element6("h4", "Completeness statement"));
@@ -20400,15 +21010,15 @@ ${pad.repeat(depth)}`;
20400
21010
  }
20401
21011
  function renderChecks(host, checks) {
20402
21012
  host.append(element6("h4", "The ten checks"));
20403
- const list = element6("ol");
21013
+ const list2 = element6("ol");
20404
21014
  checks.forEach((check) => {
20405
21015
  const item = element6("li");
20406
21016
  item.dataset.checkStatus = check.status;
20407
21017
  item.append(element6("strong", check.name));
20408
21018
  item.append(element6("span", `: ${check.result}`));
20409
- list.append(item);
21019
+ list2.append(item);
20410
21020
  });
20411
- host.append(list);
21021
+ host.append(list2);
20412
21022
  }
20413
21023
  function renderExtensions(host, rows, refusals) {
20414
21024
  renderExtensionTable(host, rows);
@@ -20459,8 +21069,8 @@ ${pad.repeat(depth)}`;
20459
21069
  for (const [which, heading, ids] of groups) {
20460
21070
  if (ids.length === 0) continue;
20461
21071
  host.append(element6("h4", heading));
20462
- const list = element6("ul");
20463
- list.dataset.checks = which;
21072
+ const list2 = element6("ul");
21073
+ list2.dataset.checks = which;
20464
21074
  for (const id of ids) {
20465
21075
  const item = element6(
20466
21076
  "li",
@@ -20471,9 +21081,9 @@ ${pad.repeat(depth)}`;
20471
21081
  )
20472
21082
  );
20473
21083
  item.dataset.check = id;
20474
- list.append(item);
21084
+ list2.append(item);
20475
21085
  }
20476
- host.append(list);
21086
+ host.append(list2);
20477
21087
  if (which === "not-checked") {
20478
21088
  const pointer = element6("p", FULL_VERIFIER_LINE);
20479
21089
  pointer.dataset.checks = "full-verifier";
@@ -20890,21 +21500,21 @@ ${pad.repeat(depth)}`;
20890
21500
  renderCarriedInput(body, record);
20891
21501
  if (record.cites.length > 0) {
20892
21502
  body.append(element6("h5", "Cites"));
20893
- const list = element6("ul");
21503
+ const list2 = element6("ul");
20894
21504
  for (const id of record.cites) {
20895
21505
  const item = element6("li");
20896
21506
  const link = element6("a", id);
20897
21507
  link.setAttribute("href", `#${recordAddress(id)}`);
20898
21508
  link.addEventListener("click", () => revealRecord(link, id));
20899
21509
  item.append(link);
20900
- list.append(item);
21510
+ list2.append(item);
20901
21511
  }
20902
- body.append(list);
21512
+ body.append(list2);
20903
21513
  }
20904
21514
  return body;
20905
21515
  }
20906
21516
  function renderCitationList(ids, records, host) {
20907
- const list = element6("ul");
21517
+ const list2 = element6("ul");
20908
21518
  const detail = element6("section");
20909
21519
  for (const id of ids) {
20910
21520
  const item = element6("li");
@@ -20922,10 +21532,10 @@ ${pad.repeat(depth)}`;
20922
21532
  });
20923
21533
  item.append(button);
20924
21534
  }
20925
- list.append(item);
21535
+ list2.append(item);
20926
21536
  }
20927
- host.append(list, detail);
20928
- return list;
21537
+ host.append(list2, detail);
21538
+ return list2;
20929
21539
  }
20930
21540
  var CLAIM_TYPE_LABEL = (claim) => claim.recognized ? claim.type : `unrecognized (${claim.type})`;
20931
21541
  function countMismatchMarker(result, field) {
@@ -21001,7 +21611,7 @@ ${pad.repeat(depth)}`;
21001
21611
  }
21002
21612
  if (close.links.length > 0) {
21003
21613
  host.append(element6("h5", "Links to the cited Close"));
21004
- const list = element6("ul");
21614
+ const list2 = element6("ul");
21005
21615
  for (const link of close.links) {
21006
21616
  const item = element6(
21007
21617
  "li",
@@ -21009,13 +21619,13 @@ ${pad.repeat(depth)}`;
21009
21619
  );
21010
21620
  item.dataset.closeLink = link.type;
21011
21621
  item.dataset.linkRecord = link.recordId;
21012
- list.append(item);
21622
+ list2.append(item);
21013
21623
  }
21014
- host.append(list);
21624
+ host.append(list2);
21015
21625
  }
21016
21626
  if (close.ignored.length > 0) {
21017
21627
  host.append(element6("h5", "Links ignored (not from the counterparty)"));
21018
- const list = element6("ul");
21628
+ const list2 = element6("ul");
21019
21629
  for (const link of close.ignored) {
21020
21630
  const item = element6(
21021
21631
  "li",
@@ -21023,9 +21633,9 @@ ${pad.repeat(depth)}`;
21023
21633
  );
21024
21634
  item.dataset.ignoredLink = link.type;
21025
21635
  item.dataset.linkRecord = link.recordId;
21026
- list.append(item);
21636
+ list2.append(item);
21027
21637
  }
21028
- host.append(list);
21638
+ host.append(list2);
21029
21639
  }
21030
21640
  }
21031
21641
  function shownVerdict(claim) {
@@ -21105,12 +21715,12 @@ ${pad.repeat(depth)}`;
21105
21715
  host.append(carrier);
21106
21716
  if (claim.presentation.evidence !== void 0) {
21107
21717
  host.append(element6("h5", "Carrier evidence"));
21108
- const list = renderCitationList(
21718
+ const list2 = renderCitationList(
21109
21719
  claim.presentation.evidence,
21110
21720
  result.records,
21111
21721
  host
21112
21722
  );
21113
- list.dataset.carrierEvidence = String(claim.presentation.evidence.length);
21723
+ list2.dataset.carrierEvidence = String(claim.presentation.evidence.length);
21114
21724
  }
21115
21725
  host.append(element6("h4", "Proofs"));
21116
21726
  if (claim.proofs.length === 0) {
@@ -21167,8 +21777,8 @@ ${pad.repeat(depth)}`;
21167
21777
  buckets.append(element6("p", "none"));
21168
21778
  continue;
21169
21779
  }
21170
- const list = element6("ul");
21171
- list.dataset.bucket = key;
21780
+ const list2 = element6("ul");
21781
+ list2.dataset.bucket = key;
21172
21782
  for (const id of ids) {
21173
21783
  const claim = byId.get(id);
21174
21784
  const item = element6(
@@ -21179,9 +21789,9 @@ ${pad.repeat(depth)}`;
21179
21789
  if (claim?.failed) item.className = "claim-failed";
21180
21790
  else if (claim?.support === "unsupported")
21181
21791
  item.className = "claim-unsupported";
21182
- list.append(item);
21792
+ list2.append(item);
21183
21793
  }
21184
- buckets.append(list);
21794
+ buckets.append(list2);
21185
21795
  }
21186
21796
  const failedHeading = element6(
21187
21797
  "h3",
@@ -21193,23 +21803,23 @@ ${pad.repeat(depth)}`;
21193
21803
  const failedIds = result.claims.filter((claim) => claim.failed).map((claim) => claim.id);
21194
21804
  if (failedIds.length === 0) buckets.append(element6("p", "none"));
21195
21805
  else {
21196
- const list = element6("ul");
21197
- list.dataset.bucket = "failed";
21806
+ const list2 = element6("ul");
21807
+ list2.dataset.bucket = "failed";
21198
21808
  for (const id of failedIds) {
21199
21809
  const item = element6("li", id);
21200
21810
  item.dataset.claimRef = id;
21201
21811
  item.className = "claim-failed";
21202
- list.append(item);
21812
+ list2.append(item);
21203
21813
  }
21204
- buckets.append(list);
21814
+ buckets.append(list2);
21205
21815
  }
21206
21816
  if (later.length > 0) {
21207
21817
  const heading = element6("h3", `not yet in force: ${later.length}`);
21208
21818
  heading.dataset.bucketOf = "notYetInForce";
21209
21819
  heading.dataset.bucketCount = String(later.length);
21210
21820
  buckets.append(heading);
21211
- const list = element6("ul");
21212
- list.dataset.bucket = "notYetInForce";
21821
+ const list2 = element6("ul");
21822
+ list2.dataset.bucket = "notYetInForce";
21213
21823
  for (const claim of later) {
21214
21824
  const item = element6(
21215
21825
  "li",
@@ -21219,9 +21829,9 @@ ${pad.repeat(depth)}`;
21219
21829
  if (claim.failed) item.className = "claim-failed";
21220
21830
  else if (claim.support === "unsupported")
21221
21831
  item.className = "claim-unsupported";
21222
- list.append(item);
21832
+ list2.append(item);
21223
21833
  }
21224
- buckets.append(list);
21834
+ buckets.append(list2);
21225
21835
  }
21226
21836
  section.append(buckets);
21227
21837
  const table2 = document.createElement("table");
@@ -21572,12 +22182,7 @@ ${pad.repeat(depth)}`;
21572
22182
  const parts = charts.map((spec, i) => {
21573
22183
  try {
21574
22184
  if (invalid2 !== void 0) throw invalid2;
21575
- return renderChart(
21576
- checkChart(spec, dataset),
21577
- i,
21578
- digests[i].sha256,
21579
- words
21580
- );
22185
+ return isView(spec) ? renderView(checkView(spec, dataset), i, digests[i].sha256, words) : renderChart(checkChart(spec, dataset), i, digests[i].sha256, words);
21581
22186
  } catch (err) {
21582
22187
  if (!(err instanceof ChartRefusal)) throw err;
21583
22188
  digests[i].refused = err.reason;
@@ -21960,7 +22565,12 @@ ${pad.repeat(depth)}`;
21960
22565
  root.replaceChildren();
21961
22566
  root.classList.remove("cv-shell-chrome");
21962
22567
  renderPresentationHeader(root, bundle);
21963
- bar = renderVerificationBanner(root, bannerModel, coverage);
22568
+ bar = renderVerificationBanner(
22569
+ root,
22570
+ bannerModel,
22571
+ coverage,
22572
+ bannerWitnessNotice(bannerModel, bundle, withStrict(context))
22573
+ );
21964
22574
  const L2 = region("L2");
21965
22575
  const core = region("L2-core");
21966
22576
  const L2module = region("L2-module");
@@ -22080,11 +22690,11 @@ ${pad.repeat(depth)}`;
22080
22690
  return { look: seen, offsets, place, below, readable: words, clips };
22081
22691
  };
22082
22692
  const frameOf = () => {
22083
- const detail = bar.nextElementSibling;
22084
- const parts = [
22085
- bar,
22086
- ...detail?.hasAttribute("data-banner-detail") ? [detail] : []
22087
- ];
22693
+ const parts = [bar];
22694
+ for (const mark of ["data-banner-detail", "data-witness-notice"]) {
22695
+ const next = parts[parts.length - 1].nextElementSibling;
22696
+ if (next?.hasAttribute(mark)) parts.push(next);
22697
+ }
22088
22698
  const held = [...parts, ...stripNode === void 0 ? [] : [stripNode]];
22089
22699
  return {
22090
22700
  parts,
@@ -22097,23 +22707,24 @@ ${pad.repeat(depth)}`;
22097
22707
  }
22098
22708
  };
22099
22709
  };
22100
- let frame = selected !== void 0 || section !== void 0 ? frameOf() : void 0;
22710
+ let frame2 = selected !== void 0 || section !== void 0 ? frameOf() : void 0;
22101
22711
  const stripIntact = (last) => {
22102
22712
  if (stripNode === void 0)
22103
22713
  return root.querySelector(RESULT_COUNT_MARKS) === null;
22104
22714
  return regions.L0.parentNode === root && regions.L0.previousSibling === last && regions.L0.firstChild === stripNode && !stripNode.hidden && root.querySelectorAll(`[${CORE_STRIP_ATTRIBUTE}], .cv-strip`).length === 1;
22105
22715
  };
22106
22716
  const assertFrameIntact = () => {
22107
- const at = frame;
22108
- const [top, detail] = at.parts;
22717
+ const at = frame2;
22718
+ const [top, ...below] = at.parts;
22719
+ const last = at.parts[at.parts.length - 1];
22109
22720
  const pill = top.querySelector("[data-verify]");
22110
22721
  const banners = root.querySelectorAll(
22111
- "[data-verify], [data-banner-detail]"
22722
+ "[data-verify], [data-banner-detail], [data-witness-notice]"
22112
22723
  );
22113
- const expected = [pill, ...detail === void 0 ? [] : [detail]];
22724
+ const expected = [pill, ...below];
22114
22725
  if (pill === null || banners.length !== expected.length || expected.some((part, i) => banners[i] !== part) || // Nodes, not elements: a bare text node before the banner is words
22115
22726
  // too. The core draws no text node at the root.
22116
- root.firstChild !== (at.header ?? top) || top.previousSibling !== at.header || at.header !== null && at.header.parentNode !== root || detail !== void 0 && detail.previousElementSibling !== top || top.parentNode !== root || top.hidden || !stripIntact(detail ?? top) || snapshot(at.held) !== at.words || !sameLook(
22727
+ root.firstChild !== (at.header ?? top) || top.previousSibling !== at.header || at.header !== null && at.header.parentNode !== root || below.some((part, i) => part.previousElementSibling !== at.parts[i]) || top.parentNode !== root || top.hidden || !stripIntact(last) || snapshot(at.held) !== at.words || !sameLook(
22117
22728
  looks(at.held, root.classList.contains("cv-shell-chrome")),
22118
22729
  root.classList.contains("cv-shell-chrome") ? at.looks.chrome : at.looks.plain
22119
22730
  ))
@@ -22147,7 +22758,7 @@ ${pad.repeat(depth)}`;
22147
22758
  } catch {
22148
22759
  chrome = void 0;
22149
22760
  drawFrame();
22150
- frame = frameOf();
22761
+ frame2 = frameOf();
22151
22762
  refusal = "presentation-failed";
22152
22763
  }
22153
22764
  }
@@ -22238,9 +22849,9 @@ ${pad.repeat(depth)}`;
22238
22849
  for (const digest of (action.dataset.cites ?? "").split(" ")) {
22239
22850
  const entry = anchors.get(recordAddress(digest))?.closest("details.cv-record");
22240
22851
  if (entry === void 0 || entry === null) continue;
22241
- const list = citing.get(entry) ?? [];
22242
- if (!list.includes(action)) list.push(action);
22243
- citing.set(entry, list);
22852
+ const list2 = citing.get(entry) ?? [];
22853
+ if (!list2.includes(action)) list2.push(action);
22854
+ citing.set(entry, list2);
22244
22855
  }
22245
22856
  for (const [entry, actions] of citing) {
22246
22857
  const own = entry.querySelectorAll(":scope > .cv-record-anchor");