@action-state-group/capsule-viewer 0.4.0 → 0.5.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("c1e8c297610f0054af9424959bbcdd1709c362d6");
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.5.0",
14366
14870
  verifier: "@action-state-group/agent-action-capsule",
14367
14871
  verifierVersion: "0.10.0",
14368
14872
  cllVersion: "0.3.0",
@@ -14875,6 +15379,18 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
14875
15379
  "chart.evidence.records": "The records this value counts, each a link to its entry in this bundle's records",
14876
15380
  "chart.evidence.none": "Nothing counted: no record in this report's data falls here",
14877
15381
  "chart.refused": "This chart was not drawn: its spec does not match the report's data ({reason}).",
15382
+ "calendar.weekday.1": "Mon",
15383
+ "calendar.weekday.2": "Tue",
15384
+ "calendar.weekday.3": "Wed",
15385
+ "calendar.weekday.4": "Thu",
15386
+ "calendar.weekday.5": "Fri",
15387
+ "calendar.weekday.6": "Sat",
15388
+ "calendar.weekday.7": "Sun",
15389
+ "period.week": "Week of {date}",
15390
+ "period.not_run_days.one": "{n} day not run",
15391
+ "period.not_run_days.other": "{n} days not run",
15392
+ "view.unplaced.one": "{n} record is dated on a day that did not run, so it is in no cell",
15393
+ "view.unplaced.other": "{n} records are dated on days that did not run, so they are in no cell",
14878
15394
  "evidence.uncited.one": "{n} counted with no claim: this page's own reading, with no evidence to show",
14879
15395
  "evidence.uncited.other": "{n} counted with no claim: this page's own reading, with no evidence to show",
14880
15396
  "evidence.label.unsupported": "Unsupported: no record its claims cite is disclosed in this bundle",
@@ -15196,6 +15712,18 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
15196
15712
  "chart.evidence.records": "The records this value counts, each a link to its entry in this bundle's records",
15197
15713
  "chart.evidence.none": "Nothing counted: no record in this report's data falls here",
15198
15714
  "chart.refused": "This chart was not drawn: its spec does not match the report's data ({reason}).",
15715
+ "calendar.weekday.1": "Mon",
15716
+ "calendar.weekday.2": "Tue",
15717
+ "calendar.weekday.3": "Wed",
15718
+ "calendar.weekday.4": "Thu",
15719
+ "calendar.weekday.5": "Fri",
15720
+ "calendar.weekday.6": "Sat",
15721
+ "calendar.weekday.7": "Sun",
15722
+ "period.week": "Week of {date}",
15723
+ "period.not_run_days.one": "{n} day not run",
15724
+ "period.not_run_days.other": "{n} days not run",
15725
+ "view.unplaced.one": "{n} record is dated on a day that did not run, so it is in no cell",
15726
+ "view.unplaced.other": "{n} records are dated on days that did not run, so they are in no cell",
15199
15727
  "evidence.uncited.one": "{n} counted with no claim: this page's own reading, with no evidence to show",
15200
15728
  "evidence.uncited.other": "{n} counted with no claim: this page's own reading, with no evidence to show",
15201
15729
  "evidence.label.unsupported": "Unsupported: no record its claims cite is disclosed in this bundle",
@@ -15695,6 +16223,19 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
15695
16223
  "chart.evidence.records",
15696
16224
  "chart.evidence.none",
15697
16225
  "chart.refused",
16226
+ // Calendar and by-period views (report-view-render.ts): the same rule.
16227
+ "calendar.weekday.1",
16228
+ "calendar.weekday.2",
16229
+ "calendar.weekday.3",
16230
+ "calendar.weekday.4",
16231
+ "calendar.weekday.5",
16232
+ "calendar.weekday.6",
16233
+ "calendar.weekday.7",
16234
+ "period.week",
16235
+ "period.not_run_days.one",
16236
+ "period.not_run_days.other",
16237
+ "view.unplaced.one",
16238
+ "view.unplaced.other",
15698
16239
  // The Outcomes report.
15699
16240
  "lines.tier.unknown",
15700
16241
  "lines.wording.unstated",
@@ -16048,8 +16589,8 @@ ${key}`);
16048
16589
  return problems.map((p) => `${pack.id}: ${p}`);
16049
16590
  }
16050
16591
  var DEFAULT_PACK_SHA256 = Object.freeze({
16051
- lines: "e74efb3684df709b0ca3ff169c12eccfe8f492be45f32bf63e54cf66574f7165",
16052
- groups: "28ce67152b86ae8d492ad3b01e9ba1b7d7a8d746864cdcf49c73bcbd117314f6"
16592
+ lines: "5f72b1a7201f63d6f6519dbbcad7154e47f508d59edeaebce6a45f7306f62591",
16593
+ groups: "3f2d1dee87d888298073be8cd0ab39e63412fa38b60492c230f17118d1a7a28a"
16053
16594
  });
16054
16595
  function fill(key, text2, vars) {
16055
16596
  return text2.replace(PLACEHOLDER, (whole, name) => {
@@ -16109,7 +16650,7 @@ ${key}`);
16109
16650
  async function contractReportWords(grouping, wording, context = { singleContract: false }) {
16110
16651
  const defaults = DEFAULT_PACKS[grouping];
16111
16652
  if (wording === void 0) return wordsOf(defaults, void 0, context);
16112
- const refuse2 = (reason) => wordsOf(defaults, void 0, context, {
16653
+ const refuse3 = (reason) => wordsOf(defaults, void 0, context, {
16113
16654
  sha256: /^[0-9a-f]{64}$/u.test(wording.sha256) ? wording.sha256 : "(not a SHA-256)",
16114
16655
  reason
16115
16656
  });
@@ -16118,10 +16659,10 @@ ${key}`);
16118
16659
  pack = await checkWordingPackInput(wording);
16119
16660
  } catch (e) {
16120
16661
  if (!(e instanceof WordingPackError)) throw e;
16121
- return refuse2(/hash|sha256/u.test(e.message) ? "digest" : "shape");
16662
+ return refuse3(/hash|sha256/u.test(e.message) ? "digest" : "shape");
16122
16663
  }
16123
16664
  const problems = wordingProblems(pack, defaults);
16124
- if (problems.length > 0) return refuse2("fit");
16665
+ if (problems.length > 0) return refuse3("fit");
16125
16666
  return wordsOf(defaults, { pack, sha256: wording.sha256 }, context);
16126
16667
  }
16127
16668
  var DEFAULT_WORDS = Object.freeze({
@@ -16349,6 +16890,29 @@ ${key}`);
16349
16890
  };
16350
16891
  });
16351
16892
  }
16893
+ function checkedWitnessEntries(all, aac) {
16894
+ const results = aac !== void 0 && aac !== null && aac.receipts.length === all.length ? aac.receipts : void 0;
16895
+ return all.flatMap(
16896
+ (e, i) => e.stub || e.malformed ? [] : [{ ...e, passed: results?.[i]?.status === "pass" }]
16897
+ );
16898
+ }
16899
+ function witnessStatus(bundle, verified) {
16900
+ const aac = verified.strict?.witnesses ?? void 0;
16901
+ if (aac?.status === "fail") return "invalid";
16902
+ const checkpoint = isObject(bundle) ? bundle.checkpoint : void 0;
16903
+ const entries = checkedWitnessEntries(witnessEntries(checkpoint), aac);
16904
+ if (entries.length === 0) return "absent";
16905
+ return entries.some((e) => e.passed) ? "verified" : "not-checked";
16906
+ }
16907
+ var WITNESS_NOTICE_LINES = {
16908
+ "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.",
16909
+ "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."
16910
+ };
16911
+ function witnessNotice(bundle, verified) {
16912
+ const status2 = witnessStatus(bundle, verified);
16913
+ if (status2 === "verified" || status2 === "invalid") return void 0;
16914
+ return verified.strict === void 0 ? "witness-unreported" : "not-witnessed";
16915
+ }
16352
16916
  function witnessLine(bundle, verified, w = DEFAULT_WORDS.lines) {
16353
16917
  const checkpoint = isObject(bundle) ? bundle.checkpoint : void 0;
16354
16918
  const page = buildVerificationPageModel(bundle, verified);
@@ -16373,7 +16937,8 @@ ${key}`);
16373
16937
  const label = w.t("prov.witness.label");
16374
16938
  const aac = verified.strict?.witnesses ?? void 0;
16375
16939
  const all = witnessEntries(checkpoint);
16376
- if (aac?.status === "fail") {
16940
+ const status2 = witnessStatus(bundle, verified);
16941
+ if (status2 === "invalid" && aac !== void 0) {
16377
16942
  const failed2 = aac.receipts.filter((r) => r.status === "fail").map(
16378
16943
  (r) => w.t("prov.witness.failed-entry", {
16379
16944
  witness: quoted(r.tsUrl),
@@ -16408,10 +16973,7 @@ ${key}`);
16408
16973
  witness: "invalid"
16409
16974
  };
16410
16975
  }
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
- );
16976
+ const entries = checkedWitnessEntries(all, aac);
16415
16977
  const stubs = all.filter((e) => e.stub).length;
16416
16978
  const malformed = all.filter((e) => e.malformed).length;
16417
16979
  const others = [
@@ -16423,7 +16985,7 @@ ${key}`);
16423
16985
  others: others.length === 1 ? others[0] : w.t("prov.witness.both", { a: others[0], b: others[1] })
16424
16986
  })
16425
16987
  ];
16426
- if (entries.length === 0)
16988
+ if (status2 === "absent")
16427
16989
  return {
16428
16990
  key: "witness",
16429
16991
  label,
@@ -16451,7 +17013,7 @@ ${key}`);
16451
17013
  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
17014
  ),
16453
17015
  state: others.length === 0 ? "stated" : "mixed",
16454
- witness: passed.length > 0 ? "verified" : "not-checked"
17016
+ witness: status2
16455
17017
  };
16456
17018
  }
16457
17019
  function verifierLine(bundle, build = VIEWER_BUILD, w = DEFAULT_WORDS.lines) {
@@ -16521,14 +17083,14 @@ ${key}`);
16521
17083
  }
16522
17084
 
16523
17085
  // src/report-front.ts
16524
- function el3(tag, className, text2) {
17086
+ function el4(tag, className, text2) {
16525
17087
  const node = document.createElement(tag);
16526
17088
  if (className !== "") node.className = className;
16527
17089
  if (text2 !== void 0) node.textContent = text2;
16528
17090
  return node;
16529
17091
  }
16530
17092
  function leadWithProvenance(host, section, provenance) {
16531
- const row2 = el3("div", "prov-row");
17093
+ const row2 = el4("div", "prov-row");
16532
17094
  row2.append(provenance);
16533
17095
  if (section === null) host.prepend(frontCard(row2));
16534
17096
  else section.prepend(row2);
@@ -16539,14 +17101,14 @@ ${key}`);
16539
17101
  }
16540
17102
  function renderCheckYourself(bundle, w) {
16541
17103
  const b = bundleObject(bundle);
16542
- const section = el3("section", "check front-card");
17104
+ const section = el4("section", "check front-card");
16543
17105
  section.dataset.section = "check-yourself";
16544
- section.append(el3("h2", "", w.t("front.check.h")));
16545
- const anchors = el3("div", "anchors");
17106
+ section.append(el4("h2", "", w.t("front.check.h")));
17107
+ const anchors = el4("div", "anchors");
16546
17108
  const cell = (label, value, key) => {
16547
- const box = el3("div", "anchor");
17109
+ const box = el4("div", "anchor");
16548
17110
  box.dataset.anchor = key;
16549
- box.append(el3("span", "k", label), el3("code", "", value));
17111
+ box.append(el4("span", "k", label), el4("code", "", value));
16550
17112
  anchors.append(box);
16551
17113
  };
16552
17114
  const extensions2 = bundleObject(b.extensions);
@@ -16568,18 +17130,18 @@ ${key}`);
16568
17130
  const receipts2 = witnessEntries(b.checkpoint).filter(
16569
17131
  (entry) => !entry.stub && !entry.malformed
16570
17132
  );
16571
- const steps = el3("ol", "steps");
17133
+ const steps = el4("ol", "steps");
16572
17134
  steps.append(
16573
- el3("li", "", w.t("front.check.s1")),
16574
- el3("li", "", w.t("front.check.s2"))
17135
+ el4("li", "", w.t("front.check.s1")),
17136
+ el4("li", "", w.t("front.check.s2"))
16575
17137
  );
16576
- const compare2 = el3(
17138
+ const compare2 = el4(
16577
17139
  "li",
16578
17140
  "",
16579
17141
  w.t(receipts2.length > 0 ? "front.check.s3.receipt" : "front.check.s3.none")
16580
17142
  );
16581
17143
  compare2.dataset.receipt = receipts2.length > 0 ? "present" : "absent";
16582
- steps.append(compare2, el3("li", "", w.t("front.check.s4")));
17144
+ steps.append(compare2, el4("li", "", w.t("front.check.s4")));
16583
17145
  section.append(steps);
16584
17146
  return section;
16585
17147
  }
@@ -16606,7 +17168,7 @@ ${key}`);
16606
17168
  return toggle;
16607
17169
  }
16608
17170
  function frontCard(...children) {
16609
- const card = el3("div", "front-card");
17171
+ const card = el4("div", "front-card");
16610
17172
  card.append(...children);
16611
17173
  return card;
16612
17174
  }
@@ -16633,7 +17195,7 @@ ${key}`);
16633
17195
  if (text2 !== void 0) value.textContent = text2;
16634
17196
  return value;
16635
17197
  }
16636
- function el4(tag, className, text2) {
17198
+ function el5(tag, className, text2) {
16637
17199
  const value = element3(tag, text2);
16638
17200
  value.className = className;
16639
17201
  return value;
@@ -16714,7 +17276,7 @@ ${key}`);
16714
17276
  function editedBadge(model, ref, w) {
16715
17277
  const edited = model.options.editedCriteria?.find((e) => e.criterion === ref);
16716
17278
  if (edited === void 0) return void 0;
16717
- const badge = el4("span", "edited", edited.badge);
17279
+ const badge = el5("span", "edited", edited.badge);
16718
17280
  badge.dataset.edited = ref;
16719
17281
  badge.title = w.t("lines.edited.title");
16720
17282
  return badge;
@@ -16722,14 +17284,14 @@ ${key}`);
16722
17284
  function renderProducerNote(host, model, w) {
16723
17285
  const note = model.options.producerNote;
16724
17286
  if (note === void 0) return;
16725
- const box = el4("aside", "pnote");
17287
+ const box = el5("aside", "pnote");
16726
17288
  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")));
17289
+ box.append(el5("div", "pn-k", w.t("lines.producer-note.kicker")));
17290
+ box.append(el5("h2", "pn-t", note.title));
17291
+ const list2 = el5("ul", "pn-l");
17292
+ for (const line of note.lines) list2.append(element3("li", line));
17293
+ box.append(list2);
17294
+ box.append(el5("p", "pn-src", w.t("lines.producer-note.source")));
16733
17295
  host.append(box);
16734
17296
  }
16735
17297
  var fmtP = (p) => p.toFixed(2);
@@ -16791,15 +17353,15 @@ ${key}`);
16791
17353
  return w.t("lines.no-note.none");
16792
17354
  }
16793
17355
  }
16794
- function names(model, list, w) {
16795
- return list.map((c) => criterionLabel(model, c.checkId, c.criterionId, w).label).join(", ");
17356
+ function names(model, list2, w) {
17357
+ return list2.map((c) => criterionLabel(model, c.checkId, c.criterionId, w).label).join(", ");
16796
17358
  }
16797
17359
  function countWord(n, w) {
16798
17360
  return Number.isInteger(n) && n >= 0 && n <= 12 ? w.t(`lines.count.${n}`) : String(n);
16799
17361
  }
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");
17362
+ function unverifiedClause(model, list2, w, lower = false) {
17363
+ const failed2 = list2.filter((c) => c.verdict === "failed");
17364
+ const unsupported = list2.filter((c) => c.verdict === "unsupported");
16803
17365
  const parts = [];
16804
17366
  if (failed2.length > 0)
16805
17367
  parts.push(
@@ -16813,7 +17375,7 @@ ${key}`);
16813
17375
  names: names(model, unsupported, w)
16814
17376
  })
16815
17377
  );
16816
- const text2 = `${parts.join(", and ")}, so the records do not say whether ${w.p("lines.word.that-rule-was", list.length)} met.`;
17378
+ const text2 = `${parts.join(", and ")}, so the records do not say whether ${w.p("lines.word.that-rule-was", list2.length)} met.`;
16817
17379
  return lower ? text2 : text2.charAt(0).toUpperCase() + text2.slice(1);
16818
17380
  }
16819
17381
  function resultSentence(conversation, model, w) {
@@ -16861,13 +17423,13 @@ ${key}`);
16861
17423
  }
16862
17424
  function renderConversation(conversation, model, runInfo, w) {
16863
17425
  const status2 = conversationStatus(conversation);
16864
- const item = el4("article", "conv");
17426
+ const item = el5("article", "conv");
16865
17427
  item.dataset.conversation = conversation.conversationId;
16866
17428
  item.dataset.conversationVerdict = conversation.verdict;
16867
17429
  item.dataset.status = status2;
16868
- const head2 = el4("div", "conv-h");
17430
+ const head2 = el5("div", "conv-h");
16869
17431
  const parts = caseParts(conversation.conversationId, w);
16870
- head2.append(el4("span", "cid", parts.label));
17432
+ head2.append(el5("span", "cid", parts.label));
16871
17433
  head2.append(wordPill(statusWord(status2, conversation, w), status2));
16872
17434
  const misses = conversation.criteria.filter((c) => isMiss(c.verdict));
16873
17435
  const unverified = conversation.criteria.filter(
@@ -16880,7 +17442,7 @@ ${key}`);
16880
17442
  (c) => c.verdict === "out_of_scope"
16881
17443
  );
16882
17444
  head2.append(
16883
- el4(
17445
+ el5(
16884
17446
  "span",
16885
17447
  "cwhy",
16886
17448
  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 +17459,29 @@ ${key}`);
16897
17459
  )
16898
17460
  )
16899
17461
  );
16900
- head2.append(el4("span", "cmodel", parts.model ?? ""));
17462
+ head2.append(el5("span", "cmodel", parts.model ?? ""));
16901
17463
  item.append(head2);
16902
- const body = el4("div", "conv-slot");
17464
+ const body = el5("div", "conv-slot");
16903
17465
  item.append(body);
16904
17466
  lazyBody(body, () => conversationBody(conversation, model, runInfo, w));
16905
17467
  return item;
16906
17468
  }
16907
17469
  function conversationBody(conversation, model, runInfo, w) {
16908
- const body = el4("div", "conv-b");
16909
- const sentence = el4(
17470
+ const body = el5("div", "conv-b");
17471
+ const sentence = el5(
16910
17472
  "p",
16911
17473
  "verdict-line",
16912
17474
  resultSentence(conversation, model, w)
16913
17475
  );
16914
17476
  sentence.dataset.why = conversationStatus(conversation);
16915
17477
  body.append(sentence);
16916
- body.append(el4("h4", "", w.t("lines.h.rule-by-rule")));
17478
+ body.append(el5("h4", "", w.t("lines.h.rule-by-rule")));
16917
17479
  const hasNotes = conversation.criteria.some((c) => c.rationale !== void 0);
16918
17480
  const wordings = conversation.criteria.map(
16919
17481
  (c) => criterionLabel(model, c.checkId, c.criterionId, w).source
16920
17482
  );
16921
17483
  const anyWording = wordings.some((source) => source === "sealed");
16922
- const table2 = el4("table", "crit");
17484
+ const table2 = el5("table", "crit");
16923
17485
  table2.dataset.criteriaTable = conversation.conversationId;
16924
17486
  const head2 = element3("thead");
16925
17487
  const headRow = element3("tr");
@@ -16942,16 +17504,16 @@ ${key}`);
16942
17504
  criterion.criterionId,
16943
17505
  w
16944
17506
  );
16945
- const nameCell = el4("td", "cn");
16946
- nameCell.append(el4("b", "", label.label));
17507
+ const nameCell = el5("td", "cn");
17508
+ nameCell.append(el5("b", "", label.label));
16947
17509
  const rowBadge = editedBadge(model, ref, w);
16948
17510
  if (rowBadge !== void 0) nameCell.append(rowBadge);
16949
17511
  if (label.source === "sealed") {
16950
- const wording = el4("small", "", label.text);
17512
+ const wording = el5("small", "", label.text);
16951
17513
  wording.dataset.wording = label.source;
16952
17514
  nameCell.append(wording);
16953
17515
  } else if (anyWording) {
16954
- const wording = el4("small", "wsrc", wordingFallback(label.source, w));
17516
+ const wording = el5("small", "wsrc", wordingFallback(label.source, w));
16955
17517
  wording.dataset.wording = label.source;
16956
17518
  nameCell.append(wording);
16957
17519
  }
@@ -16965,12 +17527,12 @@ ${key}`);
16965
17527
  tbody.append(tr);
16966
17528
  continue;
16967
17529
  }
16968
- const noteCell = el4("td", "rat");
17530
+ const noteCell = el5("td", "rat");
16969
17531
  if (criterion.verdict === "not_applicable")
16970
- noteCell.append(el4("span", "muted", w.t("lines.note.not-applicable")));
17532
+ noteCell.append(el5("span", "muted", w.t("lines.note.not-applicable")));
16971
17533
  else if (criterion.rationale !== void 0)
16972
17534
  noteCell.append(
16973
- el4(
17535
+ el5(
16974
17536
  "span",
16975
17537
  "sealed",
16976
17538
  judgeNote(
@@ -16980,12 +17542,12 @@ ${key}`);
16980
17542
  )
16981
17543
  )
16982
17544
  );
16983
- else noteCell.append(el4("span", "muted", noNoteText(criterion, w)));
17545
+ else noteCell.append(el5("span", "muted", noNoteText(criterion, w)));
16984
17546
  tr.append(noteCell);
16985
17547
  tbody.append(tr);
16986
17548
  }
16987
17549
  table2.append(tbody);
16988
- const scroll = el4("div", "tscroll");
17550
+ const scroll = el5("div", "tscroll");
16989
17551
  scroll.append(table2);
16990
17552
  body.append(scroll);
16991
17553
  const gaps = [];
@@ -17005,7 +17567,7 @@ ${key}`);
17005
17567
  )
17006
17568
  );
17007
17569
  if (gaps.length > 0) {
17008
- const gap = el4("p", "small", gaps.join(" "));
17570
+ const gap = el5("p", "small", gaps.join(" "));
17009
17571
  gap.dataset.gaps = "true";
17010
17572
  body.append(gap);
17011
17573
  }
@@ -17061,7 +17623,7 @@ ${key}`);
17061
17623
  );
17062
17624
  }
17063
17625
  function conversationProofs(conversation, model, runInfo, w) {
17064
- const box = el4("div", "pf-b");
17626
+ const box = el5("div", "pf-b");
17065
17627
  box.dataset.proofsFor = conversation.conversationId;
17066
17628
  const rows = [];
17067
17629
  rows.push([w.t("lines.pf.case"), conversation.conversationId]);
@@ -17096,14 +17658,14 @@ ${key}`);
17096
17658
  const dl = proofList(rows);
17097
17659
  dl.dataset.checkIt = conversation.conversationId;
17098
17660
  box.append(dl);
17099
- box.append(el4("h5", "", w.t("lines.pf.h.each-report")));
17100
- const table2 = el4("table", "crit pft");
17661
+ box.append(el5("h5", "", w.t("lines.pf.h.each-report")));
17662
+ const table2 = el5("table", "crit pft");
17101
17663
  const head2 = element3("thead");
17102
17664
  const headRow = element3("tr");
17103
17665
  headRow.append(
17104
17666
  element3("th", w.t("lines.pf.col.rule")),
17105
17667
  element3("th", w.t("lines.pf.col.verdict")),
17106
- el4("th", "n", w.t("lines.pf.col.p")),
17668
+ el5("th", "n", w.t("lines.pf.col.p")),
17107
17669
  element3("th", w.t("lines.pf.col.report")),
17108
17670
  element3("th", w.t("lines.pf.col.rationale")),
17109
17671
  element3("th", w.t("card.pf.assurance"))
@@ -17123,24 +17685,24 @@ ${key}`);
17123
17685
  element3("td", verdictText(criterion.verdict, w))
17124
17686
  );
17125
17687
  const p = verdictProbability(criterion);
17126
- const pCell = el4("td", "n", p === void 0 ? "\u2013" : fmtP(p));
17688
+ const pCell = el5("td", "n", p === void 0 ? "\u2013" : fmtP(p));
17127
17689
  if (p !== void 0) pCell.dataset.p = fmtP(p);
17128
17690
  tr.append(pCell);
17129
17691
  tr.append(
17130
- el4(
17692
+ el5(
17131
17693
  "td",
17132
17694
  "mono",
17133
17695
  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
17696
  )
17135
17697
  );
17136
- const rationale = el4("td", "rat");
17698
+ const rationale = el5("td", "rat");
17137
17699
  if (criterion.rationale !== void 0) {
17138
- const sealed = el4("code", "sealed", criterion.rationale);
17700
+ const sealed = el5("code", "sealed", criterion.rationale);
17139
17701
  sealed.dataset.rationale = "sealed";
17140
17702
  rationale.append(sealed);
17141
- } else rationale.append(el4("span", "muted", "\u2013"));
17703
+ } else rationale.append(el5("span", "muted", "\u2013"));
17142
17704
  tr.append(rationale);
17143
- if (criterion.claim === void 0) tr.append(el4("td", "muted", "\u2013"));
17705
+ if (criterion.claim === void 0) tr.append(el5("td", "muted", "\u2013"));
17144
17706
  else {
17145
17707
  const [, text2, data] = assuranceRow(criterion.claim, w);
17146
17708
  const cell = element3("td", text2);
@@ -17151,21 +17713,21 @@ ${key}`);
17151
17713
  tbody.append(tr);
17152
17714
  }
17153
17715
  table2.append(tbody);
17154
- const scroll = el4("div", "tscroll");
17716
+ const scroll = el5("div", "tscroll");
17155
17717
  scroll.append(table2);
17156
17718
  box.append(scroll);
17157
17719
  const rationales = conversation.criteria.map((c) => c.rationale).filter((r) => r !== void 0);
17158
17720
  if (rationales.length > 0 && rationales.every((r) => /^jev choice:/u.test(r))) {
17159
- const derived = el4("p", "", w.t("lines.pf.derived"));
17721
+ const derived = el5("p", "", w.t("lines.pf.derived"));
17160
17722
  derived.dataset.rationaleLabel = "derived";
17161
17723
  box.append(derived);
17162
17724
  } else if (rationales.length > 0) {
17163
- const shown2 = el4("p", "", w.t("lines.pf.sealed-rationale"));
17725
+ const shown2 = el5("p", "", w.t("lines.pf.sealed-rationale"));
17164
17726
  shown2.dataset.rationaleLabel = "sealed";
17165
17727
  box.append(shown2);
17166
17728
  }
17167
17729
  box.append(
17168
- el4(
17730
+ el5(
17169
17731
  "p",
17170
17732
  "",
17171
17733
  w.t("lines.pf.recompute", {
@@ -17199,14 +17761,14 @@ ${key}`);
17199
17761
  return pinAbsence(runInfo, w) ?? w.t("lines.pin.not-stated");
17200
17762
  }
17201
17763
  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);
17764
+ const list2 = el5("div", "convs");
17765
+ list2.dataset.conversationsFor = key;
17766
+ list2.dataset.conversationCount = String(conversations.length);
17205
17767
  if (conversations.length === 0)
17206
- list.append(el4("p", "small", w.t("lines.list.empty")));
17768
+ list2.append(el5("p", "small", w.t("lines.list.empty")));
17207
17769
  for (const conversation of conversations)
17208
- list.append(renderConversation(conversation, model, runInfo, w));
17209
- return list;
17770
+ list2.append(renderConversation(conversation, model, runInfo, w));
17771
+ return list2;
17210
17772
  }
17211
17773
  function drill(label, build, key) {
17212
17774
  const details = levelToggle(1, label, build, { className: "line" });
@@ -17229,7 +17791,7 @@ ${key}`);
17229
17791
  return w.group(check.id) ?? check.question;
17230
17792
  }
17231
17793
  function groupMissedReasons(missed, terms, w) {
17232
- const labelledReasonCode = (code) => code === void 0 ? void 0 : terms.reasonCodes[code];
17794
+ const labelledReasonCode = (code2) => code2 === void 0 ? void 0 : terms.reasonCodes[code2];
17233
17795
  const groups = /* @__PURE__ */ new Map();
17234
17796
  const structured = /* @__PURE__ */ new Map();
17235
17797
  const labels = /* @__PURE__ */ new Map();
@@ -17238,9 +17800,9 @@ ${key}`);
17238
17800
  if (first === void 0) continue;
17239
17801
  const label = labelledReasonCode(first.reasonCode);
17240
17802
  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);
17803
+ const list2 = groups.get(key) ?? [];
17804
+ list2.push(conversation);
17805
+ groups.set(key, list2);
17244
17806
  structured.set(key, label !== void 0);
17245
17807
  labels.set(
17246
17808
  key,
@@ -17255,11 +17817,11 @@ ${key}`);
17255
17817
  })).sort((a, b) => b.conversations.length - a.conversations.length);
17256
17818
  }
17257
17819
  function whyMissed(missed, model, runInfo, w) {
17258
- const box = el4("div", "why-missed");
17820
+ const box = el5("div", "why-missed");
17259
17821
  box.dataset.section = "why-missed";
17260
17822
  const groups = groupMissedReasons(missed, model.terms, w);
17261
17823
  box.dataset.reasons = String(groups.length);
17262
- box.append(el4("h5", "", w.t("lines.why-missed.h")));
17824
+ box.append(el5("h5", "", w.t("lines.why-missed.h")));
17263
17825
  const table2 = element3("table");
17264
17826
  const tbody = element3("tbody");
17265
17827
  for (const group of groups) {
@@ -17269,7 +17831,7 @@ ${key}`);
17269
17831
  tr.dataset.count = String(group.conversations.length);
17270
17832
  tr.append(
17271
17833
  element3("td", group.label),
17272
- el4("td", "n", fmtCount(group.conversations.length))
17834
+ el5("td", "n", fmtCount(group.conversations.length))
17273
17835
  );
17274
17836
  tbody.append(tr);
17275
17837
  }
@@ -17277,7 +17839,7 @@ ${key}`);
17277
17839
  box.append(table2);
17278
17840
  const anyStructured = groups.some((g) => g.structured);
17279
17841
  box.append(
17280
- el4(
17842
+ el5(
17281
17843
  "p",
17282
17844
  "small",
17283
17845
  w.t(
@@ -17286,7 +17848,7 @@ ${key}`);
17286
17848
  )
17287
17849
  );
17288
17850
  for (const group of groups) {
17289
- const head2 = el4(
17851
+ const head2 = el5(
17290
17852
  "div",
17291
17853
  "rsn-h",
17292
17854
  w.t("lines.why-missed.reason", {
@@ -17351,20 +17913,20 @@ ${key}`);
17351
17913
  return parts.join(" ");
17352
17914
  }
17353
17915
  function renderMeta(host, model, w, notes) {
17354
- const section = el4("section", "");
17916
+ const section = el5("section", "");
17355
17917
  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)));
17918
+ const row1 = el5("div", "ih-row");
17919
+ const bill = el5("div", "party");
17920
+ bill.append(el5("div", "k", w.t("lines.meta.pack")));
17921
+ bill.append(el5("div", "v", packLine(model, w)));
17360
17922
  row1.append(bill);
17361
- const title = el4("div", "ih-title");
17362
- title.append(el4("h1", "inv-title", w.t("lines.title")));
17923
+ const title = el5("div", "ih-title");
17924
+ title.append(el5("h1", "inv-title", w.t("lines.title")));
17363
17925
  const summary = reportSummary(w);
17364
17926
  if (summary !== void 0) title.append(summary);
17365
17927
  if (model.terms.pack.locked !== NOT_STATED)
17366
17928
  title.append(
17367
- el4(
17929
+ el5(
17368
17930
  "div",
17369
17931
  "inv-sub",
17370
17932
  w.t("lines.meta.locked", { locked: model.terms.pack.locked })
@@ -17372,8 +17934,8 @@ ${key}`);
17372
17934
  );
17373
17935
  row1.append(title);
17374
17936
  section.append(row1);
17375
- const row2 = el4("div", "ih-row");
17376
- const details = el4("div", "meta");
17937
+ const row2 = el5("div", "ih-row");
17938
+ const details = el5("div", "meta");
17377
17939
  const first = model.days[0]?.date;
17378
17940
  const last = model.days[model.days.length - 1]?.date;
17379
17941
  const metaRow = (label, value) => {
@@ -17391,11 +17953,11 @@ ${key}`);
17391
17953
  details.lastElementChild.setAttribute("data-sealed", "");
17392
17954
  }
17393
17955
  metaRow(w.t("lines.meta.conversations"), fmtCount(model.totalCount));
17394
- const checked = el4("div", "party");
17956
+ const checked = el5("div", "party");
17395
17957
  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")));
17958
+ checked.append(el5("div", "k", w.t("lines.meta.what-checked")));
17397
17959
  const groups = model.terms.checks.length;
17398
- const what = el4(
17960
+ const what = el5(
17399
17961
  "div",
17400
17962
  "d",
17401
17963
  w.t("lines.meta.what-checked.text", {
@@ -17409,14 +17971,14 @@ ${key}`);
17409
17971
  row2.append(checked, details);
17410
17972
  section.append(row2);
17411
17973
  if (note !== void 0) {
17412
- const label = el4("p", "date-note", note);
17974
+ const label = el5("p", "date-note", note);
17413
17975
  label.dataset.dateNote = model.dating.basis;
17414
17976
  notes.append(label);
17415
17977
  }
17416
17978
  host.append(section);
17417
17979
  }
17418
17980
  function renderLines(host, model, runInfo, w, notes) {
17419
- const section = el4("section", "");
17981
+ const section = el5("section", "");
17420
17982
  section.dataset.section = "lines";
17421
17983
  const table2 = document.createElement("table");
17422
17984
  table2.className = "lines";
@@ -17425,7 +17987,7 @@ ${key}`);
17425
17987
  const headRow = document.createElement("tr");
17426
17988
  headRow.append(
17427
17989
  element3("th", w.t("lines.col.result")),
17428
- el4("th", "n", w.t("lines.lines.col.conversations"))
17990
+ el5("th", "n", w.t("lines.lines.col.conversations"))
17429
17991
  );
17430
17992
  thead.append(headRow);
17431
17993
  table2.append(thead);
@@ -17469,9 +18031,9 @@ ${key}`);
17469
18031
  const tr = document.createElement("tr");
17470
18032
  tr.dataset.line = line2.key;
17471
18033
  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));
18034
+ const desc = el5("td", "desc");
18035
+ desc.append(el5("b", "", line2.label));
18036
+ desc.append(el5("small", "", line2.help));
17475
18037
  if (line2.behind !== void 0 && line2.behind.length > 0) {
17476
18038
  const label = w.p("lines.drill.show", line2.behind.length, {
17477
18039
  n: fmtCount(line2.behind.length)
@@ -17481,12 +18043,12 @@ ${key}`);
17481
18043
  line2.key === "missed" ? drill(label, () => whyMissed(behind, model, runInfo, w), line2.key) : conversationsDrill(label, behind, model, runInfo, line2.key, w)
17482
18044
  );
17483
18045
  }
17484
- tr.append(desc, el4("td", "n", line2.shown));
18046
+ tr.append(desc, el5("td", "n", line2.shown));
17485
18047
  tbody.append(tr);
17486
18048
  }
17487
18049
  table2.append(tbody);
17488
18050
  section.append(table2);
17489
- const na = el4(
18051
+ const na = el5(
17490
18052
  "p",
17491
18053
  "na-note",
17492
18054
  w.p("lines.na-note", model.notApplicableCount, {
@@ -17497,7 +18059,7 @@ ${key}`);
17497
18059
  na.dataset.count = String(model.notApplicableCount);
17498
18060
  notes.append(na);
17499
18061
  if (model.outOfScopeCount > 0) {
17500
- const oos = el4(
18062
+ const oos = el5(
17501
18063
  "p",
17502
18064
  "na-note",
17503
18065
  w.p("lines.oos-note", model.outOfScopeCount, {
@@ -17511,11 +18073,11 @@ ${key}`);
17511
18073
  host.append(section);
17512
18074
  }
17513
18075
  function renderRules(host, model, runInfo, result, w) {
17514
- const section = el4("section", "sec");
18076
+ const section = el5("section", "sec");
17515
18077
  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");
18078
+ section.append(el5("h2", "", w.t("lines.rules.h")));
18079
+ section.append(el5("p", "lede", w.t("lines.rules.lede")));
18080
+ const table2 = el5("table", "rules");
17519
18081
  table2.dataset.rows = "rules";
17520
18082
  const thead = element3("thead");
17521
18083
  const headRow = element3("tr");
@@ -17528,25 +18090,25 @@ ${key}`);
17528
18090
  };
17529
18091
  headRow.append(
17530
18092
  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)
18093
+ el5("th", "n", columnWord.not_met),
18094
+ el5("th", "n", columnWord.met),
18095
+ el5("th", "n", columnWord.undecided)
17534
18096
  );
17535
18097
  const anyUnverified = model.conversations.some(
17536
18098
  (c) => c.criteria.some((cr) => isUnverified(cr.verdict))
17537
18099
  );
17538
- if (anyUnverified) headRow.append(el4("th", "n", columnWord.unverified));
18100
+ if (anyUnverified) headRow.append(el5("th", "n", columnWord.unverified));
17539
18101
  const anyOutOfScope = model.outOfScopeCount > 0;
17540
- if (anyOutOfScope) headRow.append(el4("th", "n", columnWord.out_of_scope));
18102
+ if (anyOutOfScope) headRow.append(el5("th", "n", columnWord.out_of_scope));
17541
18103
  const columns = String(4 + (anyUnverified ? 1 : 0) + (anyOutOfScope ? 1 : 0));
17542
18104
  thead.append(headRow);
17543
18105
  table2.append(thead);
17544
18106
  const tbody = element3("tbody");
17545
18107
  for (const check of model.terms.checks) {
17546
- const group = el4("tr", "grp");
18108
+ const group = el5("tr", "grp");
17547
18109
  group.dataset.checkId = check.id;
17548
18110
  group.dataset.passCount = String(model.checkPassCounts.get(check.id) ?? 0);
17549
- const cell = el4("td", "", groupTitle(check, w));
18111
+ const cell = el5("td", "", groupTitle(check, w));
17550
18112
  cell.setAttribute("colspan", columns);
17551
18113
  group.append(cell);
17552
18114
  tbody.append(group);
@@ -17572,9 +18134,9 @@ ${key}`);
17572
18134
  const undecided = of(picks.undecided);
17573
18135
  const countCell = (className, column, counted) => {
17574
18136
  const pick = picks[column];
17575
- const cell3 = el4("td", className);
18137
+ const cell3 = el5("td", className);
17576
18138
  cell3.dataset.column = column;
17577
- cell3.append(el4("span", "nv", fmtCount(counted.length)));
18139
+ cell3.append(el5("span", "nv", fmtCount(counted.length)));
17578
18140
  const action = evidenceAction(
17579
18141
  `rule:${ref}:${column}`,
17580
18142
  `${label.label} \xB7 ${columnWord[column]}: ${fmtCount(counted.length)}`,
@@ -17589,26 +18151,26 @@ ${key}`);
17589
18151
  if (action !== void 0) cell3.append(action);
17590
18152
  return cell3;
17591
18153
  };
17592
- const tr = el4("tr", "rule");
18154
+ const tr = el5("tr", "rule");
17593
18155
  tr.dataset.rule = ref;
17594
18156
  tr.dataset.tier = model.criterionTiers.get(ref) ?? "unknown";
17595
18157
  const label = criterionLabel(model, check.id, criterion.id, w);
17596
- const nameCell = el4("td", "cn");
17597
- const ruleName = el4("b", "", label.label);
18158
+ const nameCell = el5("td", "cn");
18159
+ const ruleName = el5("b", "", label.label);
17598
18160
  nameCell.append(ruleName);
17599
18161
  const badge = editedBadge(model, ref, w);
17600
18162
  if (badge !== void 0) nameCell.append(badge);
17601
18163
  if (label.source === "sealed")
17602
- nameCell.append(el4("small", "", label.text));
18164
+ nameCell.append(el5("small", "", label.text));
17603
18165
  const detail = w.row(ref, "detail");
17604
18166
  if (detail !== void 0) {
17605
- const line = el4("small", "rdet", detail);
18167
+ const line = el5("small", "rdet", detail);
17606
18168
  line.dataset.wording = "pack";
17607
18169
  nameCell.append(line);
17608
18170
  }
17609
18171
  const undecidedNote = w.row(ref, "not_evaluable");
17610
18172
  if (undecidedNote !== void 0 && undecided.length > 0) {
17611
- const line = el4("small", "rdet", undecidedNote);
18173
+ const line = el5("small", "rdet", undecidedNote);
17612
18174
  line.dataset.wording = "pack";
17613
18175
  line.dataset.note = "not-evaluable";
17614
18176
  nameCell.append(line);
@@ -17632,13 +18194,13 @@ ${key}`);
17632
18194
  tr.append(countCell("n", "out_of_scope", outOfScopeHere));
17633
18195
  tbody.append(tr);
17634
18196
  if (problems.length === 0 && na.length === 0) continue;
17635
- const drillRow = el4("tr", "drill-row");
18197
+ const drillRow = el5("tr", "drill-row");
17636
18198
  drillRow.dataset.drillFor = ref;
17637
18199
  const cell2 = element3("td");
17638
18200
  cell2.setAttribute("colspan", columns);
17639
18201
  drillRow.append(cell2);
17640
18202
  if (na.length > 0) {
17641
- const naLine = el4(
18203
+ const naLine = el5(
17642
18204
  "p",
17643
18205
  "rule-na",
17644
18206
  w.p("lines.rules.expand.na", na.length, {
@@ -17660,56 +18222,56 @@ ${key}`);
17660
18222
  }
17661
18223
  }
17662
18224
  if (model.notRun.length > 0) {
17663
- const group = el4("tr", "grp");
18225
+ const group = el5("tr", "grp");
17664
18226
  group.dataset.group = "not-run";
17665
- const heading = el4("td", "", w.t("lines.rules.not-run.h"));
18227
+ const heading = el5("td", "", w.t("lines.rules.not-run.h"));
17666
18228
  heading.setAttribute("colspan", columns);
17667
18229
  group.append(heading);
17668
18230
  tbody.append(group);
17669
18231
  for (const ref of model.notRun) {
17670
18232
  const [checkId = "", ...rest] = ref.split(".");
17671
18233
  const label = criterionLabel(model, checkId, rest.join("."), w);
17672
- const tr = el4("tr", "rule not-run");
18234
+ const tr = el5("tr", "rule not-run");
17673
18235
  tr.dataset.rule = ref;
17674
18236
  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"));
18237
+ const nameCell = el5("td", "cn");
18238
+ nameCell.append(el5("b", "", label.label));
18239
+ const status2 = el5("td", "nr", w.t("lines.rules.not-run"));
17678
18240
  status2.setAttribute("colspan", String(Number(columns) - 1));
17679
18241
  tr.append(nameCell, status2);
17680
18242
  tbody.append(tr);
17681
18243
  }
17682
18244
  }
17683
18245
  table2.append(tbody);
17684
- const scroll = el4("div", "tscroll");
18246
+ const scroll = el5("div", "tscroll");
17685
18247
  scroll.append(table2);
17686
18248
  section.append(scroll);
17687
18249
  host.append(section);
17688
18250
  }
17689
- function renderCalendar(host, model, w) {
17690
- const section = el4("section", "sec");
18251
+ function renderCalendar2(host, model, w) {
18252
+ const section = el5("section", "sec");
17691
18253
  section.dataset.section = "calendar";
17692
- section.append(el4("h2", "", w.t("lines.cal.h")));
18254
+ section.append(el5("h2", "", w.t("lines.cal.h")));
17693
18255
  const note = datingNote(model, w);
17694
18256
  section.append(
17695
- el4(
18257
+ el5(
17696
18258
  "p",
17697
18259
  "lede",
17698
18260
  w.t(note === void 0 ? "lines.cal.lede" : "lines.cal.lede.dated")
17699
18261
  )
17700
18262
  );
17701
- const list = el4("div", "cal");
17702
- list.dataset.days = String(model.days.length);
18263
+ const list2 = el5("div", "cal");
18264
+ list2.dataset.days = String(model.days.length);
17703
18265
  for (const day of model.days) {
17704
- const item = el4("div", "day");
18266
+ const item = el5("div", "day");
17705
18267
  item.dataset.day = day.date;
17706
18268
  item.dataset.resolved = String(day.resolvedCount);
17707
18269
  item.dataset.total = String(day.conversations.length);
17708
- item.append(el4("div", "dn", day.date));
18270
+ item.append(el5("div", "dn", day.date));
17709
18271
  if (note !== void 0) {
17710
18272
  const bases = new Set(day.conversations.map((c) => c.dated.basis));
17711
18273
  if (bases.has("source")) {
17712
- const chip = el4("div", "src-says", w.t("lines.cal.source-says"));
18274
+ const chip = el5("div", "src-says", w.t("lines.cal.source-says"));
17713
18275
  chip.dataset.sourceSays = String(
17714
18276
  day.conversations.filter((c) => c.dated.basis === "source").length
17715
18277
  );
@@ -17719,13 +18281,13 @@ ${key}`);
17719
18281
  (c) => c.dated.zone === "not-stated"
17720
18282
  ).length;
17721
18283
  if (notStated > 0) {
17722
- const tz = el4("div", "tz", w.t("lines.cal.tz"));
18284
+ const tz = el5("div", "tz", w.t("lines.cal.tz"));
17723
18285
  tz.dataset.tzMarker = "not-stated";
17724
18286
  item.append(tz);
17725
18287
  }
17726
18288
  }
17727
18289
  item.append(
17728
- el4(
18290
+ el5(
17729
18291
  "div",
17730
18292
  "v",
17731
18293
  fmtShare(
@@ -17736,14 +18298,14 @@ ${key}`);
17736
18298
  )
17737
18299
  )
17738
18300
  );
17739
- const mini = el4("div", "mini");
18301
+ const mini = el5("div", "mini");
17740
18302
  const share = day.conversations.length === 0 ? 0 : day.resolvedCount / day.conversations.length;
17741
18303
  const fill2 = element3("i");
17742
18304
  fill2.style.width = `${Math.round(share * 100)}%`;
17743
18305
  mini.append(fill2);
17744
18306
  item.append(mini);
17745
18307
  if (note !== void 0) {
17746
- const sealed = el4(
18308
+ const sealed = el5(
17747
18309
  "div",
17748
18310
  "sealed",
17749
18311
  w.t("lines.cal.sealed", { span: span(day.judgedDays, w) })
@@ -17752,22 +18314,22 @@ ${key}`);
17752
18314
  item.append(sealed);
17753
18315
  }
17754
18316
  if (day.policyChanged !== null) {
17755
- const flag = el4("div", "flag", w.t("lines.cal.policy-changed"));
18317
+ const flag = el5("div", "flag", w.t("lines.cal.policy-changed"));
17756
18318
  flag.dataset.policyChanged = day.policyChanged;
17757
18319
  item.append(flag);
17758
18320
  }
17759
- list.append(item);
18321
+ list2.append(item);
17760
18322
  }
17761
- section.append(list);
18323
+ section.append(list2);
17762
18324
  host.append(section);
17763
18325
  }
17764
18326
  function renderHumanChecks(host, calibration, w) {
17765
- const section = el4("section", "sec");
18327
+ const section = el5("section", "sec");
17766
18328
  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")));
18329
+ section.append(el5("h2", "", w.t("lines.hc.h")));
18330
+ section.append(el5("p", "lede", w.t("lines.hc.lede")));
17769
18331
  if (calibration.length === 0) {
17770
- section.append(el4("p", "", w.t("lines.hc.none")));
18332
+ section.append(el5("p", "", w.t("lines.hc.none")));
17771
18333
  host.append(section);
17772
18334
  return;
17773
18335
  }
@@ -17778,9 +18340,9 @@ ${key}`);
17778
18340
  const headRow = document.createElement("tr");
17779
18341
  headRow.append(
17780
18342
  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"))
18343
+ el5("th", "n", w.t("lines.hc.col.agreed")),
18344
+ el5("th", "n", w.t("lines.hc.col.held")),
18345
+ el5("th", "n", w.t("lines.hc.col.added"))
17784
18346
  );
17785
18347
  thead.append(headRow);
17786
18348
  table2.append(thead);
@@ -17790,9 +18352,9 @@ ${key}`);
17790
18352
  tr.dataset.week = week.weekId;
17791
18353
  tr.dataset.k = String(week.k);
17792
18354
  tr.dataset.n = String(week.n);
17793
- tr.append(el4("td", "", week.weekId));
18355
+ tr.append(el5("td", "", week.weekId));
17794
18356
  tr.append(
17795
- el4(
18357
+ el5(
17796
18358
  "td",
17797
18359
  "n",
17798
18360
  w.t("lines.hc.agreed", { k: String(week.k), n: String(week.n) })
@@ -17804,9 +18366,9 @@ ${key}`);
17804
18366
  const added = week.sample.filter(
17805
18367
  (s) => s.aiVerdict !== "met" && s.humanVerdict === "met"
17806
18368
  ).length;
17807
- const heldCell = el4("td", "n", String(held));
18369
+ const heldCell = el5("td", "n", String(held));
17808
18370
  heldCell.dataset.held = String(held);
17809
- const addedCell = el4("td", "n", String(added));
18371
+ const addedCell = el5("td", "n", String(added));
17810
18372
  addedCell.dataset.added = String(added);
17811
18373
  tr.append(heldCell, addedCell);
17812
18374
  tbody.append(tr);
@@ -17816,10 +18378,10 @@ ${key}`);
17816
18378
  host.append(section);
17817
18379
  }
17818
18380
  function renderTerms(host, model, w) {
17819
- const section = el4("div", "rp-s");
18381
+ const section = el5("div", "rp-s");
17820
18382
  section.dataset.section = "terms";
17821
- section.append(el4("h3", "", w.t("lines.terms.h")));
17822
- const lede = el4(
18383
+ section.append(el5("h3", "", w.t("lines.terms.h")));
18384
+ const lede = el5(
17823
18385
  "p",
17824
18386
  "lede",
17825
18387
  model.terms.pack.agreement === NOT_STATED ? w.t("lines.terms.lede") : w.t("lines.terms.lede.agreed", {
@@ -17828,10 +18390,10 @@ ${key}`);
17828
18390
  );
17829
18391
  lede.dataset.termsSource = "bundle";
17830
18392
  section.append(lede);
17831
- const pack = el4("div", "pack");
18393
+ const pack = el5("div", "pack");
17832
18394
  const packField = (label, value) => {
17833
- const box = el4("div", "pk");
17834
- box.append(el4("div", "k", label), el4("div", "v", value));
18395
+ const box = el5("div", "pk");
18396
+ box.append(el5("div", "k", label), el5("div", "v", value));
17835
18397
  pack.append(box);
17836
18398
  };
17837
18399
  packField(w.t("lines.meta.pack"), model.terms.pack.id);
@@ -17844,28 +18406,28 @@ ${key}`);
17844
18406
  if (model.terms.pack.locked !== NOT_STATED)
17845
18407
  packField(w.t("lines.terms.locked"), model.terms.pack.locked);
17846
18408
  section.append(pack);
17847
- const outcome = el4("div", "outcome");
17848
- const outcomeIcon = el4("div", "oic");
18409
+ const outcome = el5("div", "outcome");
18410
+ const outcomeIcon = el5("div", "oic");
17849
18411
  const target = icon("target");
17850
18412
  if (target !== void 0) outcomeIcon.append(target);
17851
18413
  outcome.append(outcomeIcon);
17852
18414
  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));
18415
+ outcomeBody.append(el5("div", "t", w.t("lines.terms.outcome")));
18416
+ outcomeBody.append(el5("div", "v", model.terms.pack.outcomeStatement));
17855
18417
  outcome.append(outcomeBody);
17856
18418
  section.append(outcome);
17857
- const checks = el4("div", "checks");
18419
+ const checks = el5("div", "checks");
17858
18420
  checks.dataset.checks = String(model.terms.checks.length);
17859
18421
  for (const check of model.terms.checks) {
17860
- const card = el4("section", "check");
18422
+ const card = el5("section", "check");
17861
18423
  card.dataset.checkId = check.id;
17862
- const checkIcon = el4("div", "ic");
18424
+ const checkIcon = el5("div", "ic");
17863
18425
  const drawn = icon(check.icon);
17864
18426
  if (drawn !== void 0) checkIcon.append(drawn);
17865
18427
  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");
18428
+ card.append(el5("div", "q", groupTitle(check, w)));
18429
+ card.append(el5("div", "d", check.description));
18430
+ const criteria = el5("ul", "subs");
17869
18431
  for (const criterion of check.criteria) {
17870
18432
  const ref = `${check.id}.${criterion.id}`;
17871
18433
  const tier = model.criterionTiers.get(ref) ?? "unknown";
@@ -17877,7 +18439,7 @@ ${key}`);
17877
18439
  source: "unstated"
17878
18440
  };
17879
18441
  item.dataset.wording = wording.source;
17880
- const label = el4("b", "", w.row(ref, "label") ?? criterion.label);
18442
+ const label = el5("b", "", w.row(ref, "label") ?? criterion.label);
17881
18443
  const termsBadge = editedBadge(model, ref, w);
17882
18444
  if (termsBadge !== void 0) label.append(termsBadge);
17883
18445
  item.append(label);
@@ -17891,32 +18453,32 @@ ${key}`);
17891
18453
  )
17892
18454
  );
17893
18455
  if (wording.source !== "sealed")
17894
- item.append(el4("small", "wsrc", wordingFallback(wording.source, w)));
18456
+ item.append(el5("small", "wsrc", wordingFallback(wording.source, w)));
17895
18457
  criteria.append(item);
17896
18458
  }
17897
18459
  card.append(criteria);
17898
18460
  checks.append(card);
17899
18461
  }
17900
18462
  section.append(checks);
17901
- const note = el4("p", "small", wordingNote(model, w));
18463
+ const note = el5("p", "small", wordingNote(model, w));
17902
18464
  note.dataset.wordingNote = "true";
17903
18465
  section.append(note);
17904
- section.append(el4("div", "rule", model.terms.pack.resolutionRule));
18466
+ section.append(el5("div", "rule", model.terms.pack.resolutionRule));
17905
18467
  host.append(section);
17906
18468
  }
17907
18469
  function renderWhatRan(host, runInfo, w) {
17908
- const section = el4("div", "rp-s");
18470
+ const section = el5("div", "rp-s");
17909
18471
  section.dataset.section = "what-ran";
17910
- section.append(el4("h3", "", w.t("lines.ran.h")));
17911
- const ran = el4("div", "ran");
18472
+ section.append(el5("h3", "", w.t("lines.ran.h")));
18473
+ const ran = el5("div", "ran");
17912
18474
  ran.dataset.pinned = String(runInfo.pinned);
17913
18475
  if (runInfo.judgePinRecomputes !== void 0)
17914
18476
  ran.dataset.pinRecomputes = String(runInfo.judgePinRecomputes);
17915
18477
  const box = (label, value, key) => {
17916
- const item = el4("div", "it");
18478
+ const item = el5("div", "it");
17917
18479
  item.dataset.ran = key;
17918
- item.append(el4("div", "k", label));
17919
- item.append(el4("div", "v", value));
18480
+ item.append(el5("div", "k", label));
18481
+ item.append(el5("div", "v", value));
17920
18482
  ran.append(item);
17921
18483
  };
17922
18484
  const pin = runInfo.judgePinRecomputes === true ? runInfo.judgePin : void 0;
@@ -17947,32 +18509,32 @@ ${key}`);
17947
18509
  box(w.t("lines.ran.agent"), w.t("lines.ran.agent.value"), "agent");
17948
18510
  section.append(ran);
17949
18511
  if (runInfo.judgePinRecomputes === false) {
17950
- const warning = el4("p", "", w.t("lines.ran.components-mismatch"));
18512
+ const warning = el5("p", "", w.t("lines.ran.components-mismatch"));
17951
18513
  warning.dataset.pinComponentsMismatch = "true";
17952
18514
  section.append(warning);
17953
18515
  }
17954
- const lock = el4("div", "lock", w.t("lines.ran.lock"));
18516
+ const lock = el5("div", "lock", w.t("lines.ran.lock"));
17955
18517
  section.append(lock);
17956
18518
  if (!runInfo.pinned) {
17957
- const warning = el4("p", "", w.t("lines.ran.pin-mismatch"));
18519
+ const warning = el5("p", "", w.t("lines.ran.pin-mismatch"));
17958
18520
  warning.dataset.pinMismatch = "true";
17959
18521
  section.append(warning);
17960
18522
  }
17961
18523
  host.append(section);
17962
18524
  }
17963
18525
  function renderVerificationDetails(host, bundle, verified, w) {
17964
- const section = el4("div", "rp-s");
18526
+ const section = el5("div", "rp-s");
17965
18527
  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")));
18528
+ section.append(el5("h3", "", w.t("card.vd.h")));
18529
+ section.append(el5("p", "lede", w.t("lines.vd.lede")));
17968
18530
  const model = buildVerificationPageModel(bundle, verified);
17969
- const tech = el4("div", "tech");
18531
+ const tech = el5("div", "tech");
17970
18532
  const field = (label, value) => {
17971
- tech.append(el4("div", "k", label), el4("div", "v", value));
18533
+ tech.append(el5("div", "k", label), el5("div", "v", value));
17972
18534
  };
17973
18535
  for (const [label, value] of verificationRows(model, w)) field(label, value);
17974
18536
  section.append(tech);
17975
- const note = el4("p", "note", w.t("lines.vd.note"));
18537
+ const note = el5("p", "note", w.t("lines.vd.note"));
17976
18538
  note.dataset.checkpointKind = "mmr";
17977
18539
  section.append(note);
17978
18540
  host.append(section);
@@ -18014,13 +18576,13 @@ ${key}`);
18014
18576
  ];
18015
18577
  }
18016
18578
  function renderReportProofs(host, model, runInfo, bundle, verified, w) {
18017
- const section = el4("section", "sec rp");
18579
+ const section = el5("section", "sec rp");
18018
18580
  section.dataset.section = "report-proofs";
18019
18581
  const toggle = levelToggle(
18020
18582
  2,
18021
18583
  w.t("lines.rp.toggle"),
18022
18584
  () => {
18023
- const box = el4("div", "pf-b");
18585
+ const box = el5("div", "pf-b");
18024
18586
  const ids = proofList([
18025
18587
  [w.t("card.pf.result-capsule"), model.capsuleId],
18026
18588
  [w.t("lines.meta.pack"), packLine(model, w)],
@@ -18031,7 +18593,7 @@ ${key}`);
18031
18593
  renderTerms(box, model, w);
18032
18594
  renderWhatRan(box, runInfo, w);
18033
18595
  renderVerificationDetails(box, bundle, verified, w);
18034
- const tamper = el4("p", "tamper-note", w.t("lines.rp.tamper"));
18596
+ const tamper = el5("p", "tamper-note", w.t("lines.rp.tamper"));
18035
18597
  tamper.dataset.tamperNote = "verify-first";
18036
18598
  box.append(tamper);
18037
18599
  return box;
@@ -18053,9 +18615,9 @@ ${key}`);
18053
18615
  const claims = model.conversations.flatMap(
18054
18616
  (c) => c.criteria.flatMap((cr) => cr.claim === void 0 ? [] : [cr.claim])
18055
18617
  );
18056
- const sheet = el4("div", "sheet");
18057
- const pad = el4("div", "pad");
18058
- const notes = el4("aside", "footnotes");
18618
+ const sheet = el5("div", "sheet");
18619
+ const pad = el5("div", "pad");
18620
+ const notes = el5("aside", "footnotes");
18059
18621
  notes.dataset.section = "footnotes";
18060
18622
  renderMeta(pad, model, w, notes);
18061
18623
  renderLines(pad, model, runInfo, w, notes);
@@ -18071,7 +18633,7 @@ ${key}`);
18071
18633
  )
18072
18634
  );
18073
18635
  levels.L2.append(renderCheckYourself(bundle, w));
18074
- renderCalendar(levels.L2, model, w);
18636
+ renderCalendar2(levels.L2, model, w);
18075
18637
  renderHumanChecks(levels.L2, model.calibration, w);
18076
18638
  renderProducerNote(levels.L2, model, w);
18077
18639
  renderReportProofs(levels.L2, model, runInfo, bundle, verified, w);
@@ -18083,7 +18645,7 @@ ${key}`);
18083
18645
  if (text2 !== void 0) value.textContent = text2;
18084
18646
  return value;
18085
18647
  }
18086
- function el5(tag, className, text2) {
18648
+ function el6(tag, className, text2) {
18087
18649
  const value = element4(tag, text2);
18088
18650
  value.className = className;
18089
18651
  return value;
@@ -18096,8 +18658,8 @@ ${key}`);
18096
18658
  return value;
18097
18659
  }
18098
18660
  function maybeProducer(w, tag, className, text2, producer) {
18099
- if (!producer) return el5(tag, className, text2);
18100
- const value = el5(tag, className);
18661
+ if (!producer) return el6(tag, className, text2);
18662
+ const value = el6(tag, className);
18101
18663
  value.append(producerText(w, text2));
18102
18664
  return value;
18103
18665
  }
@@ -18110,13 +18672,13 @@ ${key}`);
18110
18672
  };
18111
18673
  function severityPill(severity, w) {
18112
18674
  const cls = Object.hasOwn(SEVERITY_CLASS, severity) ? SEVERITY_CLASS[severity] : void 0;
18113
- const pill = el5("span", cls === void 0 ? "sev" : `sev ${cls}`);
18675
+ const pill = el6("span", cls === void 0 ? "sev" : `sev ${cls}`);
18114
18676
  pill.append(producerText(w, severity));
18115
18677
  return pill;
18116
18678
  }
18117
18679
  function tierBadge(tier, w) {
18118
18680
  const key = tier === "judged" || tier === "recomputed" || tier === "mixed" ? tier : "unstated";
18119
- const badge = el5(
18681
+ const badge = el6(
18120
18682
  "span",
18121
18683
  `kind ${tier === "judged" || tier === "recomputed" ? tier : "unstated"}`,
18122
18684
  w.t(`groups.tier.${key}`)
@@ -18126,10 +18688,10 @@ ${key}`);
18126
18688
  return badge;
18127
18689
  }
18128
18690
  function statusPill(statusClass, text2) {
18129
- return el5("span", `st ${statusClass}`, text2);
18691
+ return el6("span", `st ${statusClass}`, text2);
18130
18692
  }
18131
18693
  function packWord(tag, className, text2) {
18132
- const value = el5(tag, className, text2);
18694
+ const value = el6(tag, className, text2);
18133
18695
  value.dataset.wording = "pack";
18134
18696
  return value;
18135
18697
  }
@@ -18166,9 +18728,9 @@ ${key}`);
18166
18728
  return first === last ? first : w.t("card.span", { from: first, to: last });
18167
18729
  }
18168
18730
  function renderHeader(host, model, w) {
18169
- const hd = el5("div", "hd");
18731
+ const hd = el6("div", "hd");
18170
18732
  hd.dataset.section = "header";
18171
- hd.append(el5("h1", "", w.t("groups.kicker")));
18733
+ hd.append(el6("h1", "", w.t("groups.kicker")));
18172
18734
  const summary = reportSummary(w);
18173
18735
  if (summary !== void 0) hd.append(summary);
18174
18736
  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 +18741,7 @@ ${key}`);
18179
18741
  sessions: count(w, "session", model.totalSessions)
18180
18742
  };
18181
18743
  hd.append(
18182
- el5(
18744
+ el6(
18183
18745
  "div",
18184
18746
  "sub",
18185
18747
  period === void 0 ? w.t("groups.sub", vars) : w.t(
@@ -18343,14 +18905,14 @@ ${key}`);
18343
18905
  return model.sessions.filter((s) => !outside.has(s.conversationId)).map((s) => s.tests.find((t) => t.criterionId === row2.criterionId)?.claim);
18344
18906
  }
18345
18907
  function renderSummary(host, model, presentation, result, w) {
18346
- const section = el5("section", "");
18908
+ const section = el6("section", "");
18347
18909
  section.dataset.section = "summary";
18348
18910
  const regulation = maybeProducer(w, "p", "kicker", model.regulation, true);
18349
18911
  regulation.dataset.regulation = "";
18350
- section.append(regulation, el5("h2", "", w.t("groups.summary.h")));
18912
+ section.append(regulation, el6("h2", "", w.t("groups.summary.h")));
18351
18913
  const tests = model.obligations.reduce((n, o) => n + o.rows.length, 0);
18352
18914
  section.append(
18353
- el5(
18915
+ el6(
18354
18916
  "p",
18355
18917
  "lede",
18356
18918
  w.t("groups.summary.lede", {
@@ -18366,7 +18928,7 @@ ${key}`);
18366
18928
  const headRow = document.createElement("tr");
18367
18929
  headRow.append(
18368
18930
  element4("th", w.t("groups.summary.col.test")),
18369
- el5("th", "n", w.t("groups.summary.col.checked-in")),
18931
+ el6("th", "n", w.t("groups.summary.col.checked-in")),
18370
18932
  element4("th", w.t("groups.summary.col.result"))
18371
18933
  );
18372
18934
  thead.append(headRow);
@@ -18374,20 +18936,20 @@ ${key}`);
18374
18936
  for (const obligation of model.obligations) {
18375
18937
  const tbody = document.createElement("tbody");
18376
18938
  tbody.dataset.obligationGroup = obligation.key;
18377
- const row2 = el5("tr", "ob");
18939
+ const row2 = el6("tr", "ob");
18378
18940
  row2.dataset.obligation = obligation.key;
18379
- const title = el5("td", "");
18941
+ const title = el6("td", "");
18380
18942
  title.setAttribute("colspan", "3");
18381
- const name = el5("b", "obn");
18943
+ const name = el6("b", "obn");
18382
18944
  name.append(
18383
- ...obligationName(w, obligation, el5("span", "art", obligation.article))
18945
+ ...obligationName(w, obligation, el6("span", "art", obligation.article))
18384
18946
  );
18385
18947
  title.append(name);
18386
18948
  row2.append(title);
18387
18949
  tbody.append(row2);
18388
- const about = el5("tr", "drill-row ob-about");
18950
+ const about = el6("tr", "drill-row ob-about");
18389
18951
  about.dataset.aboutFor = obligation.key;
18390
- const aboutCell = el5("td", "");
18952
+ const aboutCell = el6("td", "");
18391
18953
  aboutCell.setAttribute("colspan", "3");
18392
18954
  about.append(aboutCell);
18393
18955
  expandableRow(
@@ -18395,7 +18957,7 @@ ${key}`);
18395
18957
  name,
18396
18958
  about,
18397
18959
  () => {
18398
- const body = el5("div", "ob-x");
18960
+ const body = el6("div", "ob-x");
18399
18961
  if (obligation.plain !== NOT_STATED)
18400
18962
  body.append(maybeProducer(w, "div", "plain", obligation.plain, true));
18401
18963
  body.append(
@@ -18414,7 +18976,7 @@ ${key}`);
18414
18976
  );
18415
18977
  tbody.append(about);
18416
18978
  for (const test of obligation.rows) {
18417
- const tr = el5("tr", "test");
18979
+ const tr = el6("tr", "test");
18418
18980
  tr.dataset.criterion = test.criterionId;
18419
18981
  const counted = population(test, model.totalSessions);
18420
18982
  tr.dataset.population = String(counted);
@@ -18423,8 +18985,8 @@ ${key}`);
18423
18985
  tr.dataset.exceptions = String(test.notMetCount);
18424
18986
  tr.dataset.notEvaluable = String(test.notEvaluableCount);
18425
18987
  tr.dataset.unverified = String(test.unverifiedCount);
18426
- const nameCell = el5("td", "tn");
18427
- const head2 = el5("div", "tnh");
18988
+ const nameCell = el6("td", "tn");
18989
+ const head2 = el6("div", "tnh");
18428
18990
  const testName = rowName2(w, "b", "", test);
18429
18991
  head2.append(testName, tierBadge(test.tier, w));
18430
18992
  nameCell.append(head2);
@@ -18436,9 +18998,9 @@ ${key}`);
18436
18998
  ...test.sessionsByVerdict.get("unverified") ?? [],
18437
18999
  ...test.sessionsByVerdict.get("not_evaluable") ?? []
18438
19000
  ];
18439
- const checkedIn = el5("td", "n");
19001
+ const checkedIn = el6("td", "n");
18440
19002
  checkedIn.dataset.column = "checked-in";
18441
- checkedIn.append(el5("span", "nv", count(w, "session", counted)));
19003
+ checkedIn.append(el6("span", "nv", count(w, "session", counted)));
18442
19004
  const action = evidenceAction(
18443
19005
  `test:${test.criterionId}:checked-in`,
18444
19006
  `${test.name} \xB7 ${w.t("groups.summary.col.checked-in")}: ${count(w, "session", counted)}`,
@@ -18450,7 +19012,7 @@ ${key}`);
18450
19012
  tr.append(nameCell, checkedIn, rowResult(test, model, result, w));
18451
19013
  tbody.append(tr);
18452
19014
  if (sessionIds.length > 0) {
18453
- const drillRow = el5("tr", "drill-row");
19015
+ const drillRow = el6("tr", "drill-row");
18454
19016
  drillRow.dataset.drillFor = test.criterionId;
18455
19017
  const cell = document.createElement("td");
18456
19018
  cell.setAttribute("colspan", "3");
@@ -18470,9 +19032,9 @@ ${key}`);
18470
19032
  table2.append(tbody);
18471
19033
  }
18472
19034
  section.append(table2);
18473
- const notes = el5("aside", "footnotes");
19035
+ const notes = el6("aside", "footnotes");
18474
19036
  notes.dataset.section = "footnotes";
18475
- const basis = el5("p", "", w.t("groups.summary.basis"));
19037
+ const basis = el6("p", "", w.t("groups.summary.basis"));
18476
19038
  basis.dataset.basis = "terms";
18477
19039
  notes.append(basis);
18478
19040
  section.append(notes);
@@ -18480,21 +19042,21 @@ ${key}`);
18480
19042
  }
18481
19043
  function renderFindings(host, model, w) {
18482
19044
  if (model.findings.length === 0) return;
18483
- const section = el5("section", "findings");
19045
+ const section = el6("section", "findings");
18484
19046
  section.dataset.section = "findings";
18485
19047
  section.dataset.producer = "";
18486
19048
  section.append(
18487
- el5("div", "plabel", w.t("front.findings.label")),
18488
- el5("h2", "", w.t("front.findings.h"))
19049
+ el6("div", "plabel", w.t("front.findings.label")),
19050
+ el6("h2", "", w.t("front.findings.h"))
18489
19051
  );
18490
19052
  for (const finding of model.findings)
18491
19053
  section.append(renderFinding(finding, w));
18492
19054
  host.append(section);
18493
19055
  }
18494
19056
  function renderFinding(finding, w) {
18495
- const box = el5("div", "fnd");
19057
+ const box = el6("div", "fnd");
18496
19058
  box.dataset.finding = finding.id;
18497
- const fh = el5("div", "fh");
19059
+ const fh = el6("div", "fh");
18498
19060
  fh.append(
18499
19061
  maybeProducer(w, "b", "", w.t("groups.finding", { id: finding.id }), true),
18500
19062
  severityPill(finding.severity, w),
@@ -18502,24 +19064,24 @@ ${key}`);
18502
19064
  );
18503
19065
  box.append(fh);
18504
19066
  box.append(maybeProducer(w, "div", "rec", finding.recommendation, true));
18505
- const own = el5("div", "own", w.t("groups.finding.owner"));
19067
+ const own = el6("div", "own", w.t("groups.finding.owner"));
18506
19068
  own.append(producerText(w, finding.ownerDue));
18507
19069
  box.append(own);
18508
19070
  return box;
18509
19071
  }
18510
19072
  function renderSessionList(conversationIds, model, presentation, w) {
18511
19073
  const byId = new Map(model.sessions.map((s) => [s.conversationId, s]));
18512
- const list = el5("div", "convs");
18513
- list.dataset.sessionCount = String(conversationIds.length);
19074
+ const list2 = el6("div", "convs");
19075
+ list2.dataset.sessionCount = String(conversationIds.length);
18514
19076
  for (const id of conversationIds) {
18515
19077
  const session = byId.get(id);
18516
19078
  if (session !== void 0)
18517
- list.append(renderSession(session, model, presentation, w));
19079
+ list2.append(renderSession(session, model, presentation, w));
18518
19080
  }
18519
- return list;
19081
+ return list2;
18520
19082
  }
18521
19083
  function laterNote(test, w, tag) {
18522
- const note = el5(
19084
+ const note = el6(
18523
19085
  tag,
18524
19086
  "applic",
18525
19087
  w.t("groups.later.note", { date: test.claim?.appliesFrom ?? "" })
@@ -18543,10 +19105,10 @@ ${key}`);
18543
19105
  const unverified = session.tests.filter(isUnverified2);
18544
19106
  const undecided = session.tests.filter((t) => t.verdict === "not_evaluable");
18545
19107
  const parts = caseParts(session.conversationId, w);
18546
- const item = el5("article", "conv session");
19108
+ const item = el6("article", "conv session");
18547
19109
  item.dataset.session = session.conversationId;
18548
- const head2 = el5("div", "conv-h");
18549
- head2.append(el5("span", "cid", parts.label));
19110
+ const head2 = el6("div", "conv-h");
19111
+ head2.append(el6("span", "cid", parts.label));
18550
19112
  head2.append(
18551
19113
  exceptions.length > 0 ? wordPill(
18552
19114
  { word: count(w, "exception", exceptions.length), tone: "bad" },
@@ -18562,28 +19124,28 @@ ${key}`);
18562
19124
  "none"
18563
19125
  )
18564
19126
  );
18565
- const why = el5("span", "cwhy");
19127
+ const why = el6("span", "cwhy");
18566
19128
  (exceptions.length > 0 ? exceptions : unverified.length > 0 ? unverified : undecided).forEach((t, i) => {
18567
19129
  if (i > 0) why.append(", ");
18568
19130
  why.append(names2(t.criterionId, "span", ""));
18569
19131
  });
18570
19132
  head2.append(why);
18571
- head2.append(el5("span", "cmodel", parts.model ?? session.day));
19133
+ head2.append(el6("span", "cmodel", parts.model ?? session.day));
18572
19134
  item.append(head2);
18573
- const body = el5("div", "conv-slot");
19135
+ const body = el6("div", "conv-slot");
18574
19136
  item.append(body);
18575
19137
  lazyBody(body, () => sessionBody(session, model, presentation, w));
18576
19138
  return item;
18577
19139
  }
18578
19140
  function sessionBody(session, model, presentation, w) {
18579
19141
  const names2 = testNames(model, w);
18580
- const body = el5("div", "conv-b");
18581
- body.append(el5("h4", "", w.t("groups.h.test-by-test")));
19142
+ const body = el6("div", "conv-b");
19143
+ body.append(el6("h4", "", w.t("groups.h.test-by-test")));
18582
19144
  for (const test of session.tests) {
18583
- const box = el5("div", "ck");
19145
+ const box = el6("div", "ck");
18584
19146
  box.dataset.crit = test.criterionId;
18585
19147
  box.dataset.critVerdict = test.verdict;
18586
- const h = el5("div", "h");
19148
+ const h = el6("div", "h");
18587
19149
  h.append(
18588
19150
  wordPill(
18589
19151
  ruleWord(
@@ -18598,13 +19160,13 @@ ${key}`);
18598
19160
  if (test.verdict !== "not_applicable" && test.verdict !== "not_yet_in_force")
18599
19161
  h.append(tierBadge(test.tier, w));
18600
19162
  if (test.verdict === "failed" || test.verdict === "unsupported")
18601
- h.append(el5("span", "applic", w.t("groups.unverified-note")));
19163
+ h.append(el6("span", "applic", w.t("groups.unverified-note")));
18602
19164
  if (test.verdict === "not_yet_in_force")
18603
19165
  h.append(laterNote(test, w, "span"));
18604
19166
  box.append(h);
18605
19167
  if (test.rationale !== void 0)
18606
19168
  box.append(
18607
- el5(
19169
+ el6(
18608
19170
  "div",
18609
19171
  "why",
18610
19172
  judgeNote(test.rationale, test.claim?.verdict ?? test.verdict, w)
@@ -18613,7 +19175,7 @@ ${key}`);
18613
19175
  body.append(box);
18614
19176
  }
18615
19177
  if (session.tests.every((t) => t.rationale === void 0)) {
18616
- const gap = el5(
19178
+ const gap = el6(
18617
19179
  "p",
18618
19180
  "small",
18619
19181
  notesGap(
@@ -18639,7 +19201,7 @@ ${key}`);
18639
19201
  }
18640
19202
  function sessionProofs(session, model, w) {
18641
19203
  const names2 = testNames(model, w);
18642
- const box = el5("div", "pf-b");
19204
+ const box = el6("div", "pf-b");
18643
19205
  box.dataset.proofsFor = session.conversationId;
18644
19206
  const dated = session.dated;
18645
19207
  const dating = dated.basis === "judged" ? [] : [
@@ -18668,9 +19230,9 @@ ${key}`);
18668
19230
  const dl = proofList(rows);
18669
19231
  dl.dataset.checkIt = session.conversationId;
18670
19232
  box.append(dl);
18671
- box.append(el5("h5", "", w.t("groups.pf.h.each-report")));
19233
+ box.append(el6("h5", "", w.t("groups.pf.h.each-report")));
18672
19234
  for (const test of session.tests) {
18673
- const ev = el5("div", "ev");
19235
+ const ev = el6("div", "ev");
18674
19236
  ev.dataset.proofCrit = test.criterionId;
18675
19237
  const label = names2(test.criterionId, "b", "");
18676
19238
  label.append(": ");
@@ -18692,7 +19254,7 @@ ${key}`);
18692
19254
  )
18693
19255
  );
18694
19256
  if (test.rationale !== void 0) {
18695
- const sealed = el5(
19257
+ const sealed = el6(
18696
19258
  "div",
18697
19259
  "sealed",
18698
19260
  w.t("groups.pf.rationale", { rationale: test.rationale })
@@ -18716,14 +19278,14 @@ ${key}`);
18716
19278
  return pinAbsence(model.runInfo, w) ?? w.t("groups.pin.none");
18717
19279
  }
18718
19280
  function renderReportProofs2(host, model, bundle, verified, w) {
18719
- const section = el5("section", "rp");
19281
+ const section = el6("section", "rp");
18720
19282
  section.dataset.section = "report-proofs";
18721
19283
  section.append(
18722
19284
  levelToggle(
18723
19285
  2,
18724
19286
  w.t("groups.rp.toggle"),
18725
19287
  () => {
18726
- const box = el5("div", "pf-b");
19288
+ const box = el6("div", "pf-b");
18727
19289
  renderObligationDetails(box, model, w);
18728
19290
  renderQuality(box, model, w);
18729
19291
  renderWhatRan2(box, model, w);
@@ -18736,11 +19298,11 @@ ${key}`);
18736
19298
  host.append(section);
18737
19299
  }
18738
19300
  function renderObligationDetails(host, model, w) {
18739
- const part = el5("div", "rp-s");
19301
+ const part = el6("div", "rp-s");
18740
19302
  part.dataset.section = "obligation-detail";
18741
- part.append(el5("h3", "", w.t("groups.od.h")));
19303
+ part.append(el6("h3", "", w.t("groups.od.h")));
18742
19304
  for (const obligation of model.obligations) {
18743
- const box = el5("div", "obd");
19305
+ const box = el6("div", "obd");
18744
19306
  box.dataset.obligationDetail = obligation.key;
18745
19307
  box.dataset.mapped = String(obligation.mapped);
18746
19308
  const heading = element4("h5");
@@ -18749,26 +19311,26 @@ ${key}`);
18749
19311
  );
18750
19312
  box.append(heading);
18751
19313
  box.append(
18752
- el5(
19314
+ el6(
18753
19315
  "p",
18754
19316
  "na",
18755
19317
  w.t(obligation.mapped ? "groups.od.mapped" : "groups.od.unmapped")
18756
19318
  )
18757
19319
  );
18758
19320
  if (obligation.judgedTerms.length > 0) {
18759
- const terms = el5("p", "applic", w.t("groups.od.judged-terms"));
19321
+ const terms = el6("p", "applic", w.t("groups.od.judged-terms"));
18760
19322
  terms.append(producerText(w, obligation.judgedTerms.join(", ")));
18761
19323
  box.append(terms);
18762
19324
  }
18763
19325
  box.append(maybeProducer(w, "p", "", obligation.method, obligation.mapped));
18764
19326
  for (const row2 of obligation.rows) {
18765
- const rowBox = el5("div", "ck");
19327
+ const rowBox = el6("div", "ck");
18766
19328
  rowBox.dataset.wording = row2.wording.source;
18767
- const h = el5("div", "h");
19329
+ const h = el6("div", "h");
18768
19330
  h.append(rowName2(w, "span", "", row2), tierBadge(row2.tier, w));
18769
19331
  rowBox.append(h);
18770
19332
  rowBox.append(
18771
- el5(
19333
+ el6(
18772
19334
  "div",
18773
19335
  "why",
18774
19336
  row2.wording.source === "sealed" ? w.t("groups.od.wording.sealed", { text: row2.wording.text }) : w.t(
@@ -18790,16 +19352,16 @@ ${key}`);
18790
19352
  host.append(part);
18791
19353
  }
18792
19354
  function renderQuality(host, model, w) {
18793
- const part = el5("div", "rp-s");
19355
+ const part = el6("div", "rp-s");
18794
19356
  part.dataset.section = "quality";
18795
- part.append(el5("h3", "", w.t("groups.q.h")));
19357
+ part.append(el6("h3", "", w.t("groups.q.h")));
18796
19358
  const protocol = model.qualityProtocol;
18797
19359
  if (protocol === void 0) {
18798
- part.append(el5("p", "", w.t("groups.q.none")));
19360
+ part.append(el6("p", "", w.t("groups.q.none")));
18799
19361
  host.append(part);
18800
19362
  return;
18801
19363
  }
18802
- const line = el5("p", "", w.t("groups.q.protocol"));
19364
+ const line = el6("p", "", w.t("groups.q.protocol"));
18803
19365
  line.append(
18804
19366
  protocol.protocol === void 0 ? w.t("groups.q.unspecified") : producerText(w, protocol.protocol)
18805
19367
  );
@@ -18812,9 +19374,9 @@ ${key}`);
18812
19374
  host.append(part);
18813
19375
  }
18814
19376
  function renderWhatRan2(host, model, w) {
18815
- const part = el5("div", "rp-s");
19377
+ const part = el6("div", "rp-s");
18816
19378
  part.dataset.section = "methodology";
18817
- part.append(el5("h3", "", w.t("groups.ran.h")));
19379
+ part.append(el6("h3", "", w.t("groups.ran.h")));
18818
19380
  const dl = proofList([
18819
19381
  [
18820
19382
  w.t("groups.ran.contract"),
@@ -18845,19 +19407,19 @@ ${key}`);
18845
19407
  part.append(dl);
18846
19408
  const note = datingStatement(model.dating, model.totalSessions, w);
18847
19409
  if (note !== void 0) {
18848
- const p = el5("p", "na", note);
19410
+ const p = el6("p", "na", note);
18849
19411
  p.dataset.dateNote = model.dating.basis;
18850
19412
  part.append(p);
18851
19413
  }
18852
19414
  host.append(part);
18853
19415
  }
18854
19416
  function renderVerificationDetails2(host, bundle, verified, w) {
18855
- const part = el5("div", "rp-s");
19417
+ const part = el6("div", "rp-s");
18856
19418
  part.dataset.section = "verification-details";
18857
- part.append(el5("h3", "", w.t("card.vd.h")));
19419
+ part.append(el6("h3", "", w.t("card.vd.h")));
18858
19420
  const model = buildVerificationPageModel(bundle, verified);
18859
19421
  part.append(proofList(verificationRows(model, w)));
18860
- part.append(el5("p", "", w.t("groups.vd.note")));
19422
+ part.append(el6("p", "", w.t("groups.vd.note")));
18861
19423
  host.append(part);
18862
19424
  }
18863
19425
  var GROUPS_FRAME = {
@@ -18871,7 +19433,7 @@ ${key}`);
18871
19433
  const claims = model.sessions.flatMap(
18872
19434
  (s) => s.tests.flatMap((t) => t.claim === void 0 ? [] : [t.claim])
18873
19435
  );
18874
- const sheet = el5("div", "l0-card");
19436
+ const sheet = el6("div", "l0-card");
18875
19437
  renderHeader(sheet, model, w);
18876
19438
  levels.L0.append(sheet);
18877
19439
  renderSummary(levels.L1, model, presentation, result, w);
@@ -18896,23 +19458,23 @@ ${key}`);
18896
19458
  const w = await contractReportWords(input.grouping, wording, {
18897
19459
  singleContract: citesOneContract(result)
18898
19460
  });
18899
- const frame = FRAMES[input.grouping];
19461
+ const frame2 = FRAMES[input.grouping];
18900
19462
  const regions = (
18901
19463
  // By shape, not instanceof: a host element may come from another
18902
19464
  // window (a static page drawn into its own document).
18903
19465
  "L0" in host ? host : { L0: host, L1: host, L2: host, depth: "L0" }
18904
19466
  );
18905
19467
  const wrap = (level) => {
18906
- const wrapper = document.createElement(frame.tag);
18907
- wrapper.className = frame.className;
18908
- wrapper.dataset.page = frame.page;
19468
+ const wrapper = document.createElement(frame2.tag);
19469
+ wrapper.className = frame2.className;
19470
+ wrapper.dataset.page = frame2.page;
18909
19471
  wrapper.dataset.level = level;
18910
19472
  wrapper.dataset.levels = "2";
18911
19473
  return wrapper;
18912
19474
  };
18913
19475
  const levels = { L0: wrap("L0"), L1: wrap("L1"), L2: wrap("L2") };
18914
19476
  const style = document.createElement("style");
18915
- style.textContent = frame.css;
19477
+ style.textContent = frame2.css;
18916
19478
  levels.L0.append(style);
18917
19479
  const refused = refusedWordingNotice(w);
18918
19480
  if (refused !== void 0) levels.L0.append(refused);
@@ -19030,27 +19592,27 @@ ${key}`);
19030
19592
  const body = element5("tbody");
19031
19593
  body.append(...rows);
19032
19594
  node.append(head2, body);
19033
- const frame = element5("div");
19034
- frame.className = "cv-composed-table";
19035
- frame.append(node);
19036
- return frame;
19595
+ const frame2 = element5("div");
19596
+ frame2.className = "cv-composed-table";
19597
+ frame2.append(node);
19598
+ return frame2;
19037
19599
  }
19038
19600
  var NOT_APPLICABLE = "\u2014";
19039
19601
  var findingsText = (findings) => findings.length === 0 ? "none" : findings.join(", ");
19040
19602
  var claimText = (claim) => claim === void 0 ? NOT_APPLICABLE : claim.findings.length === 0 ? claim.status : `${claim.status} (${claim.findings.join(", ")})`;
19041
19603
  var pairText = (members) => `${members[0]} \u2013 ${members[1]}`;
19042
19604
  function renderDifference(difference, host) {
19043
- const list = element5("dl");
19044
- list.dataset.pointer = difference.pointer;
19045
- list.append(element5("dt", difference.pointer));
19605
+ const list2 = element5("dl");
19606
+ list2.dataset.pointer = difference.pointer;
19607
+ list2.append(element5("dt", difference.pointer));
19046
19608
  for (const value of difference.values)
19047
- list.append(
19609
+ list2.append(
19048
19610
  element5(
19049
19611
  "dd",
19050
19612
  value.resolved ? `${value.member}: ${JSON.stringify(value.value)}` : `${value.member}: does not resolve`
19051
19613
  )
19052
19614
  );
19053
- host.append(list);
19615
+ host.append(list2);
19054
19616
  }
19055
19617
  function corroborationText(c) {
19056
19618
  switch (c.result) {
@@ -19239,7 +19801,7 @@ ${key}`);
19239
19801
  @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
19802
  @media print{.cv-strip{break-inside:avoid}}
19241
19803
  `;
19242
- function el6(tag, className, text2) {
19804
+ function el7(tag, className, text2) {
19243
19805
  const node = document.createElement(tag);
19244
19806
  if (className !== "") node.className = className;
19245
19807
  if (text2 !== void 0) node.textContent = text2;
@@ -19251,7 +19813,7 @@ ${key}`);
19251
19813
  (entry) => entry.field === field
19252
19814
  );
19253
19815
  if (mismatch === void 0) return void 0;
19254
- const marker = el6(
19816
+ const marker = el7(
19255
19817
  "span",
19256
19818
  "count mismatch",
19257
19819
  w.t("front.agg.mismatch", { recomputed: fmt4(mismatch.recomputed) })
@@ -19269,7 +19831,7 @@ ${key}`);
19269
19831
  (claim) => JSON.stringify([claim.contractRef, claim.requirementRef])
19270
19832
  )
19271
19833
  ).size;
19272
- const line = el6("p", "agg-line");
19834
+ const line = el7("p", "agg-line");
19273
19835
  const marked = (text2, field) => {
19274
19836
  line.append(text2);
19275
19837
  const marker = mismatchMarker(result, field, w);
@@ -19313,7 +19875,7 @@ ${key}`);
19313
19875
  line.dataset.excluded = String(stated.excludedNotApplicable);
19314
19876
  line.dataset.unknown = String(stated.unknownCount);
19315
19877
  out.append(line);
19316
- const buckets = el6("div", "agg-buckets");
19878
+ const buckets = el7("div", "agg-buckets");
19317
19879
  const of = w.t("front.agg.of", { n: fmt4(stated.evaluatedPopulation) });
19318
19880
  const entries = [
19319
19881
  ["met", result.buckets.met, "buckets.met"],
@@ -19323,13 +19885,13 @@ ${key}`);
19323
19885
  ];
19324
19886
  for (const [verdict2, ids, field] of entries) {
19325
19887
  if (ids === void 0) continue;
19326
- const box = el6("div", `agg-bucket ${verdict2}`);
19888
+ const box = el7("div", `agg-bucket ${verdict2}`);
19327
19889
  box.dataset.bucket = verdict2;
19328
19890
  box.dataset.count = String(ids.length);
19329
19891
  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));
19892
+ box.append(el7("b", "", fmt4(ids.length)));
19893
+ box.append(el7("span", "", w.t(`front.agg.bucket.${verdict2}`)));
19894
+ box.append(el7("span", "agg-of", of));
19333
19895
  const marker = mismatchMarker(result, field, w);
19334
19896
  if (marker !== void 0) box.append(marker);
19335
19897
  buckets.append(box);
@@ -19338,7 +19900,7 @@ ${key}`);
19338
19900
  const dated = result.claims.some((claim) => claim.appliesFrom !== void 0);
19339
19901
  const switched = result.buckets.outOfScope !== void 0;
19340
19902
  if (dated || switched) {
19341
- const copied = el6("p", "agg-note");
19903
+ const copied = el7("p", "agg-note");
19342
19904
  if (dated) {
19343
19905
  const date = utcDateOf(result.generatedAt) ?? result.generatedAt;
19344
19906
  copied.append(w.t("front.agg.as-of", { date }), " ");
@@ -19359,14 +19921,14 @@ ${key}`);
19359
19921
  return { result, words, mock: judgedByMock(tally) };
19360
19922
  }
19361
19923
  function renderCoreStrip(model) {
19362
- const strip = el6("section", "cv-strip");
19924
+ const strip = el7("section", "cv-strip");
19363
19925
  strip.setAttribute(CORE_STRIP_ATTRIBUTE, "");
19364
19926
  strip.dataset.section = "aggregate";
19365
19927
  const style = document.createElement("style");
19366
19928
  style.textContent = CORE_STRIP_CSS;
19367
19929
  strip.append(style);
19368
19930
  if (model.mock) {
19369
- const mark = el6("p", "mockmark", model.words.t("front.mock"));
19931
+ const mark = el7("p", "mockmark", model.words.t("front.mock"));
19370
19932
  mark.dataset.section = "mock-judge";
19371
19933
  strip.append(mark);
19372
19934
  }
@@ -19797,7 +20359,7 @@ ${pad.repeat(depth)}`;
19797
20359
  problems.push("requires two tokens of one profile key");
19798
20360
  return problems;
19799
20361
  }
19800
- async function resolveModules(modules, descriptor, audience, format, canRender, refuse2 = () => void 0) {
20362
+ async function resolveModules(modules, descriptor, audience, format, canRender, refuse3 = () => void 0) {
19801
20363
  if (!descriptor.verified) return { kind: "refusal" };
19802
20364
  const matched = modules.filter(
19803
20365
  (m) => manifestMatches(m.manifest, descriptor, audience, format)
@@ -19811,7 +20373,7 @@ ${pad.repeat(depth)}`;
19811
20373
  );
19812
20374
  const only = tier[0];
19813
20375
  if (only === void 0) continue;
19814
- const refusal = refuse2(only);
20376
+ const refusal = refuse3(only);
19815
20377
  if (refusal !== void 0) {
19816
20378
  refused.push(refusal);
19817
20379
  continue;
@@ -19967,7 +20529,7 @@ ${pad.repeat(depth)}`;
19967
20529
  parent2.append(cell);
19968
20530
  }
19969
20531
  var recordsWord2 = (count2) => `${count2} ${count2 === 1 ? "record" : "records"}`;
19970
- function renderVerificationBanner(root, model, coverage) {
20532
+ function renderVerificationBanner(root, model, coverage, witness) {
19971
20533
  const bar = element6("div");
19972
20534
  bar.className = model.state === "failed" ? "cv-shell-bar cv-failed" : model.state === "incomplete" ? "cv-shell-bar cv-incomplete" : "cv-shell-bar";
19973
20535
  const banner = element6("span", model.line);
@@ -20006,12 +20568,24 @@ ${pad.repeat(depth)}`;
20006
20568
  detail.dataset.bannerDetail = "";
20007
20569
  root.append(detail);
20008
20570
  }
20571
+ if (witness !== void 0) {
20572
+ const notice = element6("p", WITNESS_NOTICE_LINES[witness]);
20573
+ notice.className = "cv-banner-detail cv-witness-notice";
20574
+ notice.dataset.witnessNotice = witness;
20575
+ root.append(notice);
20576
+ }
20009
20577
  if (model.refusal === void 0) return bar;
20010
20578
  const refusal = element6("p", model.refusal);
20011
20579
  refusal.dataset.refusal = "unverified-bundle";
20012
20580
  root.append(refusal);
20013
20581
  return bar;
20014
20582
  }
20583
+ function bannerWitnessNotice(model, bundle, verification) {
20584
+ if (model.state !== "verified" && model.state !== "incomplete")
20585
+ return void 0;
20586
+ if (model.checkpoint !== "verified") return void 0;
20587
+ return witnessNotice(bundle, verification);
20588
+ }
20015
20589
  function renderChecking(root) {
20016
20590
  const bar = element6("div");
20017
20591
  bar.className = "cv-shell-bar";
@@ -20157,7 +20731,7 @@ ${pad.repeat(depth)}`;
20157
20731
  }
20158
20732
  function renderStamps(host, stamps) {
20159
20733
  host.append(element6("h4", "Countersignatures"));
20160
- const list = element6("ul");
20734
+ const list2 = element6("ul");
20161
20735
  stamps.forEach((stamp) => {
20162
20736
  const item = element6("li");
20163
20737
  item.dataset.stampKind = stamp.kind;
@@ -20169,9 +20743,9 @@ ${pad.repeat(depth)}`;
20169
20743
  } else if (stamp.kind === "unresolved-signer") {
20170
20744
  renderSignerStatement(item, "The unlisted signer", stamp.statement);
20171
20745
  }
20172
- list.append(item);
20746
+ list2.append(item);
20173
20747
  });
20174
- host.append(list);
20748
+ host.append(list2);
20175
20749
  }
20176
20750
  function renderReceipts(host, receipts2) {
20177
20751
  host.append(element6("h4", "Receipts"));
@@ -20179,16 +20753,16 @@ ${pad.repeat(depth)}`;
20179
20753
  host.append(element6("p", "no receipts disclosed"));
20180
20754
  return;
20181
20755
  }
20182
- const list = element6("ul");
20756
+ const list2 = element6("ul");
20183
20757
  receipts2.forEach((receipt) => {
20184
20758
  const item = element6(
20185
20759
  "li",
20186
20760
  `${receipt.witness} \xB7 ${RECEIPT_GRADE_DISPLAY[receipt.grade]} \xB7 `
20187
20761
  );
20188
20762
  item.append(renderTime(receipt.time));
20189
- list.append(item);
20763
+ list2.append(item);
20190
20764
  });
20191
- host.append(list);
20765
+ host.append(list2);
20192
20766
  }
20193
20767
  var COVERAGE_LABEL = Object.freeze({
20194
20768
  checkpointed: "checkpointed",
@@ -20240,8 +20814,8 @@ ${pad.repeat(depth)}`;
20240
20814
  note.dataset.records = "not-shown";
20241
20815
  details.append(note);
20242
20816
  }
20243
- const list = element6("ul");
20244
- list.dataset.records = "coverage";
20817
+ const list2 = element6("ul");
20818
+ list2.dataset.records = "coverage";
20245
20819
  const owners = /* @__PURE__ */ new Map();
20246
20820
  for (const record of records)
20247
20821
  if (entries.verified && entries.read.has(record.capsuleId)) {
@@ -20285,7 +20859,7 @@ ${pad.repeat(depth)}`;
20285
20859
  const read = entries.read.get(capsuleId);
20286
20860
  if (!entries.verified || read === void 0) {
20287
20861
  item.append(document.createTextNode(label), status2);
20288
- list.append(item);
20862
+ list2.append(item);
20289
20863
  continue;
20290
20864
  }
20291
20865
  const fold = document.createElement("details");
@@ -20303,9 +20877,9 @@ ${pad.repeat(depth)}`;
20303
20877
  if (fold.open && target !== void 0) target.scrollIntoView?.();
20304
20878
  });
20305
20879
  item.append(fold);
20306
- list.append(item);
20880
+ list2.append(item);
20307
20881
  }
20308
- details.append(list);
20882
+ details.append(list2);
20309
20883
  return details;
20310
20884
  }
20311
20885
  async function recordEntries(context, result) {
@@ -20362,8 +20936,8 @@ ${pad.repeat(depth)}`;
20362
20936
  for (const record of records) {
20363
20937
  counts.set(record.status, (counts.get(record.status) ?? 0) + 1);
20364
20938
  }
20365
- const list = element6("ul");
20366
- list.dataset.records = "coverage-summary";
20939
+ const list2 = element6("ul");
20940
+ list2.dataset.records = "coverage-summary";
20367
20941
  for (const status2 of Object.keys(COVERAGE_LABEL)) {
20368
20942
  const count2 = counts.get(status2) ?? 0;
20369
20943
  if (count2 === 0) continue;
@@ -20373,9 +20947,9 @@ ${pad.repeat(depth)}`;
20373
20947
  );
20374
20948
  item.dataset.coverageStatus = status2;
20375
20949
  item.dataset.count = String(count2);
20376
- list.append(item);
20950
+ list2.append(item);
20377
20951
  }
20378
- return list;
20952
+ return list2;
20379
20953
  }
20380
20954
  function renderCompletenessStatement(host, completeness2) {
20381
20955
  host.append(element6("h4", "Completeness statement"));
@@ -20400,15 +20974,15 @@ ${pad.repeat(depth)}`;
20400
20974
  }
20401
20975
  function renderChecks(host, checks) {
20402
20976
  host.append(element6("h4", "The ten checks"));
20403
- const list = element6("ol");
20977
+ const list2 = element6("ol");
20404
20978
  checks.forEach((check) => {
20405
20979
  const item = element6("li");
20406
20980
  item.dataset.checkStatus = check.status;
20407
20981
  item.append(element6("strong", check.name));
20408
20982
  item.append(element6("span", `: ${check.result}`));
20409
- list.append(item);
20983
+ list2.append(item);
20410
20984
  });
20411
- host.append(list);
20985
+ host.append(list2);
20412
20986
  }
20413
20987
  function renderExtensions(host, rows, refusals) {
20414
20988
  renderExtensionTable(host, rows);
@@ -20459,8 +21033,8 @@ ${pad.repeat(depth)}`;
20459
21033
  for (const [which, heading, ids] of groups) {
20460
21034
  if (ids.length === 0) continue;
20461
21035
  host.append(element6("h4", heading));
20462
- const list = element6("ul");
20463
- list.dataset.checks = which;
21036
+ const list2 = element6("ul");
21037
+ list2.dataset.checks = which;
20464
21038
  for (const id of ids) {
20465
21039
  const item = element6(
20466
21040
  "li",
@@ -20471,9 +21045,9 @@ ${pad.repeat(depth)}`;
20471
21045
  )
20472
21046
  );
20473
21047
  item.dataset.check = id;
20474
- list.append(item);
21048
+ list2.append(item);
20475
21049
  }
20476
- host.append(list);
21050
+ host.append(list2);
20477
21051
  if (which === "not-checked") {
20478
21052
  const pointer = element6("p", FULL_VERIFIER_LINE);
20479
21053
  pointer.dataset.checks = "full-verifier";
@@ -20890,21 +21464,21 @@ ${pad.repeat(depth)}`;
20890
21464
  renderCarriedInput(body, record);
20891
21465
  if (record.cites.length > 0) {
20892
21466
  body.append(element6("h5", "Cites"));
20893
- const list = element6("ul");
21467
+ const list2 = element6("ul");
20894
21468
  for (const id of record.cites) {
20895
21469
  const item = element6("li");
20896
21470
  const link = element6("a", id);
20897
21471
  link.setAttribute("href", `#${recordAddress(id)}`);
20898
21472
  link.addEventListener("click", () => revealRecord(link, id));
20899
21473
  item.append(link);
20900
- list.append(item);
21474
+ list2.append(item);
20901
21475
  }
20902
- body.append(list);
21476
+ body.append(list2);
20903
21477
  }
20904
21478
  return body;
20905
21479
  }
20906
21480
  function renderCitationList(ids, records, host) {
20907
- const list = element6("ul");
21481
+ const list2 = element6("ul");
20908
21482
  const detail = element6("section");
20909
21483
  for (const id of ids) {
20910
21484
  const item = element6("li");
@@ -20922,10 +21496,10 @@ ${pad.repeat(depth)}`;
20922
21496
  });
20923
21497
  item.append(button);
20924
21498
  }
20925
- list.append(item);
21499
+ list2.append(item);
20926
21500
  }
20927
- host.append(list, detail);
20928
- return list;
21501
+ host.append(list2, detail);
21502
+ return list2;
20929
21503
  }
20930
21504
  var CLAIM_TYPE_LABEL = (claim) => claim.recognized ? claim.type : `unrecognized (${claim.type})`;
20931
21505
  function countMismatchMarker(result, field) {
@@ -21001,7 +21575,7 @@ ${pad.repeat(depth)}`;
21001
21575
  }
21002
21576
  if (close.links.length > 0) {
21003
21577
  host.append(element6("h5", "Links to the cited Close"));
21004
- const list = element6("ul");
21578
+ const list2 = element6("ul");
21005
21579
  for (const link of close.links) {
21006
21580
  const item = element6(
21007
21581
  "li",
@@ -21009,13 +21583,13 @@ ${pad.repeat(depth)}`;
21009
21583
  );
21010
21584
  item.dataset.closeLink = link.type;
21011
21585
  item.dataset.linkRecord = link.recordId;
21012
- list.append(item);
21586
+ list2.append(item);
21013
21587
  }
21014
- host.append(list);
21588
+ host.append(list2);
21015
21589
  }
21016
21590
  if (close.ignored.length > 0) {
21017
21591
  host.append(element6("h5", "Links ignored (not from the counterparty)"));
21018
- const list = element6("ul");
21592
+ const list2 = element6("ul");
21019
21593
  for (const link of close.ignored) {
21020
21594
  const item = element6(
21021
21595
  "li",
@@ -21023,9 +21597,9 @@ ${pad.repeat(depth)}`;
21023
21597
  );
21024
21598
  item.dataset.ignoredLink = link.type;
21025
21599
  item.dataset.linkRecord = link.recordId;
21026
- list.append(item);
21600
+ list2.append(item);
21027
21601
  }
21028
- host.append(list);
21602
+ host.append(list2);
21029
21603
  }
21030
21604
  }
21031
21605
  function shownVerdict(claim) {
@@ -21105,12 +21679,12 @@ ${pad.repeat(depth)}`;
21105
21679
  host.append(carrier);
21106
21680
  if (claim.presentation.evidence !== void 0) {
21107
21681
  host.append(element6("h5", "Carrier evidence"));
21108
- const list = renderCitationList(
21682
+ const list2 = renderCitationList(
21109
21683
  claim.presentation.evidence,
21110
21684
  result.records,
21111
21685
  host
21112
21686
  );
21113
- list.dataset.carrierEvidence = String(claim.presentation.evidence.length);
21687
+ list2.dataset.carrierEvidence = String(claim.presentation.evidence.length);
21114
21688
  }
21115
21689
  host.append(element6("h4", "Proofs"));
21116
21690
  if (claim.proofs.length === 0) {
@@ -21167,8 +21741,8 @@ ${pad.repeat(depth)}`;
21167
21741
  buckets.append(element6("p", "none"));
21168
21742
  continue;
21169
21743
  }
21170
- const list = element6("ul");
21171
- list.dataset.bucket = key;
21744
+ const list2 = element6("ul");
21745
+ list2.dataset.bucket = key;
21172
21746
  for (const id of ids) {
21173
21747
  const claim = byId.get(id);
21174
21748
  const item = element6(
@@ -21179,9 +21753,9 @@ ${pad.repeat(depth)}`;
21179
21753
  if (claim?.failed) item.className = "claim-failed";
21180
21754
  else if (claim?.support === "unsupported")
21181
21755
  item.className = "claim-unsupported";
21182
- list.append(item);
21756
+ list2.append(item);
21183
21757
  }
21184
- buckets.append(list);
21758
+ buckets.append(list2);
21185
21759
  }
21186
21760
  const failedHeading = element6(
21187
21761
  "h3",
@@ -21193,23 +21767,23 @@ ${pad.repeat(depth)}`;
21193
21767
  const failedIds = result.claims.filter((claim) => claim.failed).map((claim) => claim.id);
21194
21768
  if (failedIds.length === 0) buckets.append(element6("p", "none"));
21195
21769
  else {
21196
- const list = element6("ul");
21197
- list.dataset.bucket = "failed";
21770
+ const list2 = element6("ul");
21771
+ list2.dataset.bucket = "failed";
21198
21772
  for (const id of failedIds) {
21199
21773
  const item = element6("li", id);
21200
21774
  item.dataset.claimRef = id;
21201
21775
  item.className = "claim-failed";
21202
- list.append(item);
21776
+ list2.append(item);
21203
21777
  }
21204
- buckets.append(list);
21778
+ buckets.append(list2);
21205
21779
  }
21206
21780
  if (later.length > 0) {
21207
21781
  const heading = element6("h3", `not yet in force: ${later.length}`);
21208
21782
  heading.dataset.bucketOf = "notYetInForce";
21209
21783
  heading.dataset.bucketCount = String(later.length);
21210
21784
  buckets.append(heading);
21211
- const list = element6("ul");
21212
- list.dataset.bucket = "notYetInForce";
21785
+ const list2 = element6("ul");
21786
+ list2.dataset.bucket = "notYetInForce";
21213
21787
  for (const claim of later) {
21214
21788
  const item = element6(
21215
21789
  "li",
@@ -21219,9 +21793,9 @@ ${pad.repeat(depth)}`;
21219
21793
  if (claim.failed) item.className = "claim-failed";
21220
21794
  else if (claim.support === "unsupported")
21221
21795
  item.className = "claim-unsupported";
21222
- list.append(item);
21796
+ list2.append(item);
21223
21797
  }
21224
- buckets.append(list);
21798
+ buckets.append(list2);
21225
21799
  }
21226
21800
  section.append(buckets);
21227
21801
  const table2 = document.createElement("table");
@@ -21572,12 +22146,7 @@ ${pad.repeat(depth)}`;
21572
22146
  const parts = charts.map((spec, i) => {
21573
22147
  try {
21574
22148
  if (invalid2 !== void 0) throw invalid2;
21575
- return renderChart(
21576
- checkChart(spec, dataset),
21577
- i,
21578
- digests[i].sha256,
21579
- words
21580
- );
22149
+ return isView(spec) ? renderView(checkView(spec, dataset), i, digests[i].sha256, words) : renderChart(checkChart(spec, dataset), i, digests[i].sha256, words);
21581
22150
  } catch (err) {
21582
22151
  if (!(err instanceof ChartRefusal)) throw err;
21583
22152
  digests[i].refused = err.reason;
@@ -21960,7 +22529,12 @@ ${pad.repeat(depth)}`;
21960
22529
  root.replaceChildren();
21961
22530
  root.classList.remove("cv-shell-chrome");
21962
22531
  renderPresentationHeader(root, bundle);
21963
- bar = renderVerificationBanner(root, bannerModel, coverage);
22532
+ bar = renderVerificationBanner(
22533
+ root,
22534
+ bannerModel,
22535
+ coverage,
22536
+ bannerWitnessNotice(bannerModel, bundle, withStrict(context))
22537
+ );
21964
22538
  const L2 = region("L2");
21965
22539
  const core = region("L2-core");
21966
22540
  const L2module = region("L2-module");
@@ -22080,11 +22654,11 @@ ${pad.repeat(depth)}`;
22080
22654
  return { look: seen, offsets, place, below, readable: words, clips };
22081
22655
  };
22082
22656
  const frameOf = () => {
22083
- const detail = bar.nextElementSibling;
22084
- const parts = [
22085
- bar,
22086
- ...detail?.hasAttribute("data-banner-detail") ? [detail] : []
22087
- ];
22657
+ const parts = [bar];
22658
+ for (const mark of ["data-banner-detail", "data-witness-notice"]) {
22659
+ const next = parts[parts.length - 1].nextElementSibling;
22660
+ if (next?.hasAttribute(mark)) parts.push(next);
22661
+ }
22088
22662
  const held = [...parts, ...stripNode === void 0 ? [] : [stripNode]];
22089
22663
  return {
22090
22664
  parts,
@@ -22097,23 +22671,24 @@ ${pad.repeat(depth)}`;
22097
22671
  }
22098
22672
  };
22099
22673
  };
22100
- let frame = selected !== void 0 || section !== void 0 ? frameOf() : void 0;
22674
+ let frame2 = selected !== void 0 || section !== void 0 ? frameOf() : void 0;
22101
22675
  const stripIntact = (last) => {
22102
22676
  if (stripNode === void 0)
22103
22677
  return root.querySelector(RESULT_COUNT_MARKS) === null;
22104
22678
  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
22679
  };
22106
22680
  const assertFrameIntact = () => {
22107
- const at = frame;
22108
- const [top, detail] = at.parts;
22681
+ const at = frame2;
22682
+ const [top, ...below] = at.parts;
22683
+ const last = at.parts[at.parts.length - 1];
22109
22684
  const pill = top.querySelector("[data-verify]");
22110
22685
  const banners = root.querySelectorAll(
22111
- "[data-verify], [data-banner-detail]"
22686
+ "[data-verify], [data-banner-detail], [data-witness-notice]"
22112
22687
  );
22113
- const expected = [pill, ...detail === void 0 ? [] : [detail]];
22688
+ const expected = [pill, ...below];
22114
22689
  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
22690
  // 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(
22691
+ 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
22692
  looks(at.held, root.classList.contains("cv-shell-chrome")),
22118
22693
  root.classList.contains("cv-shell-chrome") ? at.looks.chrome : at.looks.plain
22119
22694
  ))
@@ -22147,7 +22722,7 @@ ${pad.repeat(depth)}`;
22147
22722
  } catch {
22148
22723
  chrome = void 0;
22149
22724
  drawFrame();
22150
- frame = frameOf();
22725
+ frame2 = frameOf();
22151
22726
  refusal = "presentation-failed";
22152
22727
  }
22153
22728
  }
@@ -22238,9 +22813,9 @@ ${pad.repeat(depth)}`;
22238
22813
  for (const digest of (action.dataset.cites ?? "").split(" ")) {
22239
22814
  const entry = anchors.get(recordAddress(digest))?.closest("details.cv-record");
22240
22815
  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);
22816
+ const list2 = citing.get(entry) ?? [];
22817
+ if (!list2.includes(action)) list2.push(action);
22818
+ citing.set(entry, list2);
22244
22819
  }
22245
22820
  for (const [entry, actions] of citing) {
22246
22821
  const own = entry.querySelectorAll(":scope > .cv-record-anchor");