@action-state-group/capsule-viewer 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compliance-styles.js +7 -0
- package/dist/compliance-styles.js.map +1 -1
- package/dist/compliance-view.d.ts +4 -3
- package/dist/compliance-view.js +139 -88
- package/dist/compliance-view.js.map +1 -1
- package/dist/contract-report-wording.d.ts +2 -1
- package/dist/contract-report-wording.js +32 -3
- package/dist/contract-report-wording.js.map +1 -1
- package/dist/contract-report.d.ts +16 -1
- package/dist/contract-report.js +31 -3
- package/dist/contract-report.js.map +1 -1
- package/dist/core-strip.d.ts +1 -1
- package/dist/core-strip.js +7 -4
- package/dist/core-strip.js.map +1 -1
- package/dist/emitter-shell.html +16 -0
- package/dist/evidence-contract.d.ts +61 -0
- package/dist/evidence-contract.js +83 -0
- package/dist/evidence-contract.js.map +1 -0
- package/dist/evidence-graph-view.d.ts +10 -0
- package/dist/evidence-graph-view.js +35 -5
- package/dist/evidence-graph-view.js.map +1 -1
- package/dist/evidence-graph.iife.js +1657 -786
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/outcome-report-styles.js +9 -0
- package/dist/outcome-report-styles.js.map +1 -1
- package/dist/outcome-report-view.d.ts +19 -4
- package/dist/outcome-report-view.js +307 -127
- package/dist/outcome-report-view.js.map +1 -1
- package/dist/presentation-builder.d.ts +14 -0
- package/dist/presentation-builder.js +45 -1
- package/dist/presentation-builder.js.map +1 -1
- package/dist/presentation-fragment.d.ts +3 -0
- package/dist/presentation-fragment.js +9 -0
- package/dist/presentation-fragment.js.map +1 -1
- package/dist/presentation-mount.d.ts +3 -0
- package/dist/presentation-mount.js +2 -0
- package/dist/presentation-mount.js.map +1 -1
- package/dist/report-legend.d.ts +6 -7
- package/dist/report-legend.js +16 -9
- package/dist/report-legend.js.map +1 -1
- package/dist/report-levels.js +2 -1
- package/dist/report-levels.js.map +1 -1
- package/dist/spot-check.js +10 -5
- package/dist/spot-check.js.map +1 -1
- package/dist/subject-history.d.ts +77 -0
- package/dist/subject-history.js +439 -0
- package/dist/subject-history.js.map +1 -0
- package/dist/viewer-build.js +1 -1
- package/dist/wording/contract-report-eu-ai-act.en.json +16 -1
- package/dist/wording/contract-report-outcomes.en.json +61 -2
- package/package.json +1 -1
|
@@ -193,18 +193,18 @@ var EvidenceGraph = (() => {
|
|
|
193
193
|
}
|
|
194
194
|
return 0;
|
|
195
195
|
}
|
|
196
|
-
function utf8ToBytes(
|
|
196
|
+
function utf8ToBytes(str3) {
|
|
197
197
|
const out = [];
|
|
198
198
|
let p = 0;
|
|
199
|
-
for (let i = 0; i <
|
|
200
|
-
let c =
|
|
199
|
+
for (let i = 0; i < str3.length; i++) {
|
|
200
|
+
let c = str3.charCodeAt(i);
|
|
201
201
|
if (c < 128) {
|
|
202
202
|
out[p++] = c;
|
|
203
203
|
} else if (c < 2048) {
|
|
204
204
|
out[p++] = c >> 6 | 192;
|
|
205
205
|
out[p++] = c & 63 | 128;
|
|
206
|
-
} else if ((c & 64512) === 55296 && i + 1 <
|
|
207
|
-
c = 65536 + ((c & 1023) << 10) + (
|
|
206
|
+
} else if ((c & 64512) === 55296 && i + 1 < str3.length && (str3.charCodeAt(i + 1) & 64512) === 56320) {
|
|
207
|
+
c = 65536 + ((c & 1023) << 10) + (str3.charCodeAt(++i) & 1023);
|
|
208
208
|
out[p++] = c >> 18 | 240;
|
|
209
209
|
out[p++] = c >> 12 & 63 | 128;
|
|
210
210
|
out[p++] = c >> 6 & 63 | 128;
|
|
@@ -749,15 +749,15 @@ var EvidenceGraph = (() => {
|
|
|
749
749
|
function toStr(bytes, start, end) {
|
|
750
750
|
const len = end - start;
|
|
751
751
|
if (len < ASCII_THRESHOLD) {
|
|
752
|
-
let
|
|
752
|
+
let str3 = "";
|
|
753
753
|
for (let i = start; i < end; i++) {
|
|
754
754
|
const c = bytes[i];
|
|
755
755
|
if (c & 128) {
|
|
756
756
|
return textDecoder.decode(bytes.subarray(start, end));
|
|
757
757
|
}
|
|
758
|
-
|
|
758
|
+
str3 += String.fromCharCode(c);
|
|
759
759
|
}
|
|
760
|
-
return
|
|
760
|
+
return str3;
|
|
761
761
|
}
|
|
762
762
|
return textDecoder.decode(bytes.subarray(start, end));
|
|
763
763
|
}
|
|
@@ -3309,12 +3309,12 @@ var EvidenceGraph = (() => {
|
|
|
3309
3309
|
digits.push(Number(power & _15n));
|
|
3310
3310
|
power >>= _4n;
|
|
3311
3311
|
}
|
|
3312
|
-
const
|
|
3313
|
-
|
|
3314
|
-
|
|
3312
|
+
const table3 = new Array(16);
|
|
3313
|
+
table3[0] = _1n2;
|
|
3314
|
+
table3[1] = d;
|
|
3315
3315
|
for (let i = 2; i < 16; i++)
|
|
3316
|
-
|
|
3317
|
-
let p =
|
|
3316
|
+
table3[i] = table3[i - 1] * d % modulo;
|
|
3317
|
+
let p = table3[digits[digits.length - 1]];
|
|
3318
3318
|
for (let w = digits.length - 2; w >= 0; w--) {
|
|
3319
3319
|
p = p * p % modulo;
|
|
3320
3320
|
p = p * p % modulo;
|
|
@@ -3322,7 +3322,7 @@ var EvidenceGraph = (() => {
|
|
|
3322
3322
|
p = p * p % modulo;
|
|
3323
3323
|
const digit = digits[w];
|
|
3324
3324
|
if (digit !== 0)
|
|
3325
|
-
p = p *
|
|
3325
|
+
p = p * table3[digit] % modulo;
|
|
3326
3326
|
}
|
|
3327
3327
|
return p;
|
|
3328
3328
|
}
|
|
@@ -4040,10 +4040,10 @@ var EvidenceGraph = (() => {
|
|
|
4040
4040
|
const W2 = FW_WINDOW;
|
|
4041
4041
|
const size = 1 << W2;
|
|
4042
4042
|
const mask = bitMask(W2);
|
|
4043
|
-
const
|
|
4044
|
-
|
|
4043
|
+
const table3 = new Array(size);
|
|
4044
|
+
table3[0] = this.ZERO;
|
|
4045
4045
|
for (let i = 1; i < size; i++)
|
|
4046
|
-
|
|
4046
|
+
table3[i] = table3[i - 1].add(point);
|
|
4047
4047
|
const windows = Math.ceil(bits / W2);
|
|
4048
4048
|
let acc = this.ZERO;
|
|
4049
4049
|
for (let window = windows - 1; window >= 0; window--) {
|
|
@@ -4051,9 +4051,9 @@ var EvidenceGraph = (() => {
|
|
|
4051
4051
|
for (let d = 0; d < W2; d++)
|
|
4052
4052
|
acc = acc.double();
|
|
4053
4053
|
const digit = Number(n >> BigInt(window * W2) & mask);
|
|
4054
|
-
let sel =
|
|
4054
|
+
let sel = table3[0];
|
|
4055
4055
|
for (let i = 1; i < size; i++)
|
|
4056
|
-
sel = i === digit ?
|
|
4056
|
+
sel = i === digit ? table3[i] : sel;
|
|
4057
4057
|
acc = acc.add(sel);
|
|
4058
4058
|
}
|
|
4059
4059
|
return { p: acc, f: acc };
|
|
@@ -5098,6 +5098,7 @@ var EvidenceGraph = (() => {
|
|
|
5098
5098
|
renderUnableToVerify: () => renderUnableToVerify,
|
|
5099
5099
|
resolvePresentation: () => resolvePresentation,
|
|
5100
5100
|
rowStatus: () => rowStatus,
|
|
5101
|
+
tierReader: () => tierReader,
|
|
5101
5102
|
verifiedPayload: () => verifiedPayload,
|
|
5102
5103
|
verifyDisclosureEnvelope: () => verifyDisclosureEnvelope,
|
|
5103
5104
|
verifyProducerEnvelope: () => verifyProducerEnvelope,
|
|
@@ -10857,13 +10858,13 @@ ${body}
|
|
|
10857
10858
|
}
|
|
10858
10859
|
const contracts = claimContracts.size > 0 ? claimContracts : reportContracts;
|
|
10859
10860
|
const pinned = contracts.size <= 1 && pins.size <= 1 && components.size <= 1;
|
|
10860
|
-
const
|
|
10861
|
+
const counted2 = withheldReports(result.records, conversations.flatMap((c) => c.criteria.flatMap((cr) => cr.claim === void 0 ? [] : [cr.claim])));
|
|
10861
10862
|
return {
|
|
10862
|
-
...
|
|
10863
|
-
...
|
|
10864
|
-
...
|
|
10865
|
-
...
|
|
10866
|
-
...
|
|
10863
|
+
...counted2.withheld > 0 ? { reportsWithheld: counted2.withheld } : {},
|
|
10864
|
+
...counted2.mismatched > 0 ? { reportsMismatched: counted2.mismatched } : {},
|
|
10865
|
+
...counted2.unreadable > 0 ? { reportsUnreadable: counted2.unreadable } : {},
|
|
10866
|
+
...counted2.invalid > 0 ? { reportsInvalid: counted2.invalid } : {},
|
|
10867
|
+
...counted2.withheld + counted2.mismatched + counted2.unreadable + counted2.invalid > 0 ? { reportsCited: counted2.total } : {},
|
|
10867
10868
|
...contracts.size === 1 ? { contract: [...contracts][0] } : {},
|
|
10868
10869
|
...pins.size === 1 ? { judgePinDigest: [...pins][0] } : {},
|
|
10869
10870
|
...pins.size === 1 && components.size === 1 ? { judgePin: [...components.values()][0] } : {},
|
|
@@ -12567,16 +12568,16 @@ ${body}
|
|
|
12567
12568
|
const groups = [];
|
|
12568
12569
|
const product = (i, key) => {
|
|
12569
12570
|
if (i === keys.length) {
|
|
12570
|
-
const
|
|
12571
|
+
const counted2 = rowsByKey.get(keyText(keys, key)) ?? [];
|
|
12571
12572
|
const unit = temporal === void 0 ? void 0 : key[temporal];
|
|
12572
12573
|
const runRows = unit === void 0 ? [] : runRowsOf.get(unit) ?? [];
|
|
12573
12574
|
const notRun = drawsRuns && runRows.length === 0;
|
|
12574
|
-
const value2 = aggregate.aggregate === "count" ?
|
|
12575
|
+
const value2 = aggregate.aggregate === "count" ? counted2.length : counted2.reduce((sum, row2) => sum + amountOf.get(row2), 0);
|
|
12575
12576
|
groups.push({
|
|
12576
12577
|
key: { ...key },
|
|
12577
12578
|
...notRun ? {} : { value: value2 },
|
|
12578
12579
|
notRun,
|
|
12579
|
-
rows:
|
|
12580
|
+
rows: counted2,
|
|
12580
12581
|
runRows
|
|
12581
12582
|
});
|
|
12582
12583
|
return;
|
|
@@ -13167,11 +13168,23 @@ ${body}
|
|
|
13167
13168
|
var OUTCOME_FRAME_VARS = "--navy:#232F42;--gold:#E8A33D;--gold-l:#FBEFD9;--cream:#F6F2EA;--line:#E3DED3;--slate:#6B7482;--ink:#1F2733;--ok:#2E7D5B;--ok-l:#E3F1EA;--bad:#B5462F;--bad-l:#F8E6E1;--person:#5B4BA0;--person-l:#ECE8F7;--r:14px;";
|
|
13168
13169
|
|
|
13169
13170
|
// src/report-legend.ts
|
|
13170
|
-
var
|
|
13171
|
+
var WORD_SOURCES = [
|
|
13172
|
+
"core",
|
|
13173
|
+
"pack",
|
|
13174
|
+
"field",
|
|
13175
|
+
"payload",
|
|
13176
|
+
"producer"
|
|
13177
|
+
];
|
|
13171
13178
|
function tagSource(node, source) {
|
|
13172
13179
|
node.dataset.src = source;
|
|
13173
13180
|
return node;
|
|
13174
13181
|
}
|
|
13182
|
+
function fieldText(path2, value) {
|
|
13183
|
+
const node = tagSource(document.createElement("code"), "field");
|
|
13184
|
+
node.dataset.path = path2;
|
|
13185
|
+
node.textContent = `${path2}: ${value}`;
|
|
13186
|
+
return node;
|
|
13187
|
+
}
|
|
13175
13188
|
function el(tag, className, text2) {
|
|
13176
13189
|
const node = document.createElement(tag);
|
|
13177
13190
|
if (className !== "") node.className = className;
|
|
@@ -13197,7 +13210,7 @@ ${body}
|
|
|
13197
13210
|
const strip = el("p", "cv-legend-sources");
|
|
13198
13211
|
strip.dataset.legend = "sources";
|
|
13199
13212
|
strip.append(el("span", "cv-legend-lead", w.t("legend.src.lead")));
|
|
13200
|
-
for (const source of
|
|
13213
|
+
for (const source of WORD_SOURCES) {
|
|
13201
13214
|
const entry = el("span", "cv-legend-item");
|
|
13202
13215
|
const chip = el("span", "cv-src");
|
|
13203
13216
|
chip.dataset.src = source;
|
|
@@ -13228,7 +13241,7 @@ ${s} .cv-src[data-src="field"]{background:#FBEFD2;color:#8A5A0B}
|
|
|
13228
13241
|
${s} .cv-src[data-src="payload"]{background:#F2EEE8;color:#4A4339;border:1px solid #D9D2C6}
|
|
13229
13242
|
${s} .cv-src[data-src="producer"]{background:#ECE6F8;color:#5B3FA0}
|
|
13230
13243
|
${s} [data-src="core"]:not(.cv-src){font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#1F5C99}
|
|
13231
|
-
${s} [data-src="field"]:not(.cv-src){font-family:ui-monospace,Menlo,monospace;color:#1F5C99}
|
|
13244
|
+
${s} [data-src="field"]:not(.cv-src){font-family:ui-monospace,Menlo,monospace;font-size:.92em;color:#1F5C99}
|
|
13232
13245
|
${s} [data-src="payload"]:not(.cv-src){background:#F2EEE8;border:1px solid #E3DCCF;border-radius:6px;padding:2px 6px;color:var(--ink)}
|
|
13233
13246
|
${s} [data-src="payload"][data-kind="tool-call"]:not(.cv-src){border-style:dashed;font-family:ui-monospace,Menlo,monospace}
|
|
13234
13247
|
${s} [data-src="producer"]:not(.cv-src){font-style:italic}
|
|
@@ -13504,9 +13517,9 @@ ${s} [data-src="producer"]:not(.cv-src){font-style:italic}
|
|
|
13504
13517
|
const found = globalThis.CapsuleViewerShowEvidence;
|
|
13505
13518
|
return typeof found?.resolve === "function" && typeof found.render === "function" ? found : void 0;
|
|
13506
13519
|
}
|
|
13507
|
-
function evidenceAction(key, name,
|
|
13508
|
-
if (
|
|
13509
|
-
const claims =
|
|
13520
|
+
function evidenceAction(key, name, counted2, result, w, summary = w.t("evidence.show")) {
|
|
13521
|
+
if (counted2.length === 0) return void 0;
|
|
13522
|
+
const claims = counted2.filter((c) => c !== void 0);
|
|
13510
13523
|
const cited = /* @__PURE__ */ new Set();
|
|
13511
13524
|
const missing = /* @__PURE__ */ new Set();
|
|
13512
13525
|
for (const claim of claims)
|
|
@@ -13554,7 +13567,7 @@ ${s} [data-src="producer"]:not(.cv-src){font-style:italic}
|
|
|
13554
13567
|
item.dataset.noEvidence = String(citeNothing);
|
|
13555
13568
|
list2.append(item);
|
|
13556
13569
|
}
|
|
13557
|
-
const uncited =
|
|
13570
|
+
const uncited = counted2.length - claims.length;
|
|
13558
13571
|
if (uncited > 0) {
|
|
13559
13572
|
const item = element2("li", w.p("evidence.uncited", uncited));
|
|
13560
13573
|
item.dataset.uncited = String(uncited);
|
|
@@ -13673,7 +13686,7 @@ ${s} [data-src="producer"]:not(.cv-src){font-style:italic}
|
|
|
13673
13686
|
}
|
|
13674
13687
|
function refusedWordingNotice(w) {
|
|
13675
13688
|
if (w.source.refused === void 0) return void 0;
|
|
13676
|
-
const p = el2("p", "wref", w.t("card.wording.refused"));
|
|
13689
|
+
const p = tagSource(el2("p", "wref", w.t("card.wording.refused")), "core");
|
|
13677
13690
|
p.dataset.wording = "refused";
|
|
13678
13691
|
p.dataset.refusal = w.source.refused.reason;
|
|
13679
13692
|
return p;
|
|
@@ -13698,6 +13711,7 @@ ${s} details.lv > summary .tg{display:inline-block;width:1em;margin-right:6px;co
|
|
|
13698
13711
|
${s} details.lv > summary .tg:before{content:"\\25B8"}
|
|
13699
13712
|
${s} details.lv[open] > summary .tg:before{content:"\\25BE"}
|
|
13700
13713
|
${s} details.lv[data-opened-by="view"] > summary .tg{color:var(--navy)}
|
|
13714
|
+
${s} .wref:before{content:"\\25A0";content:"\\25A0" / "";display:inline-block;width:1em;margin-right:6px;font-size:12px;color:#8A93A0}
|
|
13701
13715
|
${s} details.lv1.line{border:0;background:transparent;margin-top:4px}
|
|
13702
13716
|
${s} details.lv1.line > summary{padding:2px 0;font-size:13px}
|
|
13703
13717
|
${s} details.lv1.line > .convs,${s} details.lv1.line > .why-missed{margin-top:8px}
|
|
@@ -14134,8 +14148,8 @@ path.cv-tl-good{fill:var(--person)}path.cv-tl-bad{fill:var(--bad)}path.cv-tl-ope
|
|
|
14134
14148
|
figure.append(note);
|
|
14135
14149
|
}
|
|
14136
14150
|
const wrap = el3("div", "cv-chart-table");
|
|
14137
|
-
const
|
|
14138
|
-
|
|
14151
|
+
const table3 = el3("table");
|
|
14152
|
+
table3.append(el3("caption", void 0, w.t("chart.table.caption")));
|
|
14139
14153
|
const head2 = el3("tr");
|
|
14140
14154
|
for (const name of chart.keys) {
|
|
14141
14155
|
const th = el3("th");
|
|
@@ -14171,8 +14185,8 @@ path.cv-tl-good{fill:var(--person)}path.cv-tl-bad{fill:var(--bad)}path.cv-tl-ope
|
|
|
14171
14185
|
row2.append(cell2);
|
|
14172
14186
|
tbody.append(row2);
|
|
14173
14187
|
});
|
|
14174
|
-
|
|
14175
|
-
wrap.append(
|
|
14188
|
+
table3.append(thead, tbody);
|
|
14189
|
+
wrap.append(table3);
|
|
14176
14190
|
figure.append(wrap);
|
|
14177
14191
|
return figure;
|
|
14178
14192
|
}
|
|
@@ -14246,8 +14260,8 @@ path.cv-tl-good{fill:var(--person)}path.cv-tl-bad{fill:var(--bad)}path.cv-tl-ope
|
|
|
14246
14260
|
wrap.dataset.lane = lane.id;
|
|
14247
14261
|
wrap.append(code(lane.id), " ");
|
|
14248
14262
|
const groups = groupsOn(lane.chart, day);
|
|
14249
|
-
const
|
|
14250
|
-
const shown2 =
|
|
14263
|
+
const counted2 = groups.filter((g) => (g.value ?? 0) > 0);
|
|
14264
|
+
const shown2 = counted2.length > 0 ? counted2 : groups.length > 0 ? groups.slice(0, 1) : [{ key: {}, value: 0, notRun: false, rows: [], runRows: [] }];
|
|
14251
14265
|
shown2.forEach((g, i) => {
|
|
14252
14266
|
const key = `view-${String(index)}-${lane.id}-${day}-${String(i)}`;
|
|
14253
14267
|
const extra = lane.chart.keys.filter((k) => k !== "x");
|
|
@@ -14413,7 +14427,7 @@ path.cv-tl-good{fill:var(--person)}path.cv-tl-bad{fill:var(--bad)}path.cv-tl-ope
|
|
|
14413
14427
|
for (const g of groupsOn(activity.chart, day))
|
|
14414
14428
|
for (const row2 of g.rows) rows.set(row2.seq, row2);
|
|
14415
14429
|
if (rows.size > 0) {
|
|
14416
|
-
const
|
|
14430
|
+
const table3 = el4("table", "cv-day-table");
|
|
14417
14431
|
const head2 = el4("tr");
|
|
14418
14432
|
for (const key of ["calendar.day.time", "calendar.day.record"]) {
|
|
14419
14433
|
const th = el4("th", void 0, w.t(key));
|
|
@@ -14440,9 +14454,9 @@ path.cv-tl-good{fill:var(--person)}path.cv-tl-bad{fill:var(--bad)}path.cv-tl-ope
|
|
|
14440
14454
|
tr.append(td);
|
|
14441
14455
|
tbody.append(tr);
|
|
14442
14456
|
}
|
|
14443
|
-
|
|
14457
|
+
table3.append(thead, tbody);
|
|
14444
14458
|
const wrap = el4("div", "cv-view-table");
|
|
14445
|
-
wrap.append(
|
|
14459
|
+
wrap.append(table3);
|
|
14446
14460
|
section.append(wrap);
|
|
14447
14461
|
}
|
|
14448
14462
|
return section;
|
|
@@ -14461,9 +14475,9 @@ path.cv-tl-good{fill:var(--person)}path.cv-tl-bad{fill:var(--bad)}path.cv-tl-ope
|
|
|
14461
14475
|
}
|
|
14462
14476
|
const scroll = el4("div", "cv-view-table");
|
|
14463
14477
|
for (const month of months) {
|
|
14464
|
-
const
|
|
14465
|
-
|
|
14466
|
-
|
|
14478
|
+
const table3 = el4("table", "cv-cal");
|
|
14479
|
+
table3.dataset.month = month;
|
|
14480
|
+
table3.append(el4("caption", void 0, month));
|
|
14467
14481
|
const head2 = el4("tr");
|
|
14468
14482
|
for (let d = 1; d <= 7; d++) {
|
|
14469
14483
|
const th = el4("th", void 0, w.t(`calendar.weekday.${String(d)}`));
|
|
@@ -14501,8 +14515,8 @@ path.cv-tl-good{fill:var(--person)}path.cv-tl-bad{fill:var(--bad)}path.cv-tl-ope
|
|
|
14501
14515
|
row2 = el4("tr");
|
|
14502
14516
|
}
|
|
14503
14517
|
}
|
|
14504
|
-
|
|
14505
|
-
scroll.append(
|
|
14518
|
+
table3.append(thead, tbody);
|
|
14519
|
+
scroll.append(table3);
|
|
14506
14520
|
}
|
|
14507
14521
|
figure.append(scroll);
|
|
14508
14522
|
if (hasRoles) {
|
|
@@ -14546,7 +14560,7 @@ path.cv-tl-good{fill:var(--person)}path.cv-tl-bad{fill:var(--bad)}path.cv-tl-ope
|
|
|
14546
14560
|
).length;
|
|
14547
14561
|
const windowDays = (view.count.chart.units ?? []).length;
|
|
14548
14562
|
const mondays = [...weeks.keys()].sort();
|
|
14549
|
-
const
|
|
14563
|
+
const table3 = el4("table", "cv-period");
|
|
14550
14564
|
const top = el4("tr");
|
|
14551
14565
|
const reqHead = el4("th");
|
|
14552
14566
|
reqHead.setAttribute("scope", "col");
|
|
@@ -14660,9 +14674,9 @@ path.cv-tl-good{fill:var(--person)}path.cv-tl-bad{fill:var(--bad)}path.cv-tl-ope
|
|
|
14660
14674
|
});
|
|
14661
14675
|
tbody.append(tr);
|
|
14662
14676
|
});
|
|
14663
|
-
|
|
14677
|
+
table3.append(thead, tbody);
|
|
14664
14678
|
const scroll = el4("div", "cv-view-table");
|
|
14665
|
-
scroll.append(
|
|
14679
|
+
scroll.append(table3);
|
|
14666
14680
|
figure.append(scroll);
|
|
14667
14681
|
return figure;
|
|
14668
14682
|
}
|
|
@@ -14800,7 +14814,7 @@ path.cv-tl-good{fill:var(--person)}path.cv-tl-bad{fill:var(--bad)}path.cv-tl-ope
|
|
|
14800
14814
|
figure.append(
|
|
14801
14815
|
el4("p", "cv-cofail-total", w.p("cofail.failing", view.failing))
|
|
14802
14816
|
);
|
|
14803
|
-
const
|
|
14817
|
+
const table3 = el4("table", "cv-cofail");
|
|
14804
14818
|
const head2 = el4("tr");
|
|
14805
14819
|
const corner = el4("th");
|
|
14806
14820
|
corner.append(code(view.subject));
|
|
@@ -14846,9 +14860,9 @@ path.cv-tl-good{fill:var(--person)}path.cv-tl-bad{fill:var(--bad)}path.cv-tl-ope
|
|
|
14846
14860
|
});
|
|
14847
14861
|
tbody.append(tr);
|
|
14848
14862
|
});
|
|
14849
|
-
|
|
14863
|
+
table3.append(thead, tbody);
|
|
14850
14864
|
const scroll = el4("div", "cv-view-table");
|
|
14851
|
-
scroll.append(
|
|
14865
|
+
scroll.append(table3);
|
|
14852
14866
|
figure.append(scroll);
|
|
14853
14867
|
return figure;
|
|
14854
14868
|
}
|
|
@@ -15175,18 +15189,18 @@ path.cv-tl-good{fill:var(--person)}path.cv-tl-bad{fill:var(--bad)}path.cv-tl-ope
|
|
|
15175
15189
|
};
|
|
15176
15190
|
}
|
|
15177
15191
|
function withheldOf(result, sessions) {
|
|
15178
|
-
const
|
|
15192
|
+
const counted2 = withheldReports(
|
|
15179
15193
|
result.records,
|
|
15180
15194
|
sessions.flatMap(
|
|
15181
15195
|
(s) => s.tests.flatMap((t) => t.claim === void 0 ? [] : [t.claim])
|
|
15182
15196
|
)
|
|
15183
15197
|
);
|
|
15184
15198
|
return {
|
|
15185
|
-
...
|
|
15186
|
-
...
|
|
15187
|
-
...
|
|
15188
|
-
...
|
|
15189
|
-
...
|
|
15199
|
+
...counted2.withheld > 0 ? { reportsWithheld: counted2.withheld } : {},
|
|
15200
|
+
...counted2.mismatched > 0 ? { reportsMismatched: counted2.mismatched } : {},
|
|
15201
|
+
...counted2.unreadable > 0 ? { reportsUnreadable: counted2.unreadable } : {},
|
|
15202
|
+
...counted2.invalid > 0 ? { reportsInvalid: counted2.invalid } : {},
|
|
15203
|
+
...counted2.withheld + counted2.mismatched + counted2.unreadable + counted2.invalid > 0 ? { reportsCited: counted2.total } : {}
|
|
15190
15204
|
};
|
|
15191
15205
|
}
|
|
15192
15206
|
function buildFindings(obligations) {
|
|
@@ -15383,6 +15397,408 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
|
|
|
15383
15397
|
.cc > section{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:32px var(--inset);margin:0 0 16px}
|
|
15384
15398
|
.cc > section.findings{padding:32px calc(var(--inset) - 3px)}
|
|
15385
15399
|
@media (min-width:821px){.cc table.grid th{white-space:nowrap}}
|
|
15400
|
+
.cc table.sum tbody tr.tier td{padding:28px 10px 8px;border-bottom:2px solid var(--navy)}
|
|
15401
|
+
.cc table.sum tr.tier b{display:block;font-family:Georgia,Cambria,serif;font-size:19px;color:var(--navy)}
|
|
15402
|
+
.cc table.sum tr.tier small{display:block;color:var(--slate);font-size:12.5px;margin-top:3px}
|
|
15403
|
+
.cc .rtier{display:inline-block;font-size:11px;font-weight:700;padding:2px 8px;border-radius:99px;margin-left:6px;background:var(--cream);color:var(--slate)}
|
|
15404
|
+
.cc .rtier[data-requirement-tier="must_have"]{background:#E6EEF6;color:#2B5A85}
|
|
15405
|
+
.cc .rtier[data-requirement-tier="informational"]{background:#FBEFD9;color:#8A5A00}
|
|
15406
|
+
.cc .tier-note{margin:0 0 12px;font-size:13px;color:var(--slate)}
|
|
15407
|
+
`;
|
|
15408
|
+
|
|
15409
|
+
// src/subject-history.ts
|
|
15410
|
+
var HEX642 = /^[0-9a-f]{64}$/u;
|
|
15411
|
+
var BAND = /^e\+(\d{1,2})$/u;
|
|
15412
|
+
var MAX_LABELS = 8;
|
|
15413
|
+
var MAX_LABEL = 60;
|
|
15414
|
+
var EXTENSION = /^x-[a-z0-9][a-z0-9._-]*$/u;
|
|
15415
|
+
var isObj4 = (v) => v !== null && typeof v === "object" && !Array.isArray(v);
|
|
15416
|
+
function str(value, max) {
|
|
15417
|
+
return typeof value === "string" && value.length > 0 && value.length <= max ? value : void 0;
|
|
15418
|
+
}
|
|
15419
|
+
function readScope(value) {
|
|
15420
|
+
if (!isObj4(value)) return void 0;
|
|
15421
|
+
const pack = str(value.pack, 120);
|
|
15422
|
+
const salting = str(value.salting, 60);
|
|
15423
|
+
const saltId = str(value.salt_id, 120);
|
|
15424
|
+
if (pack === void 0 || salting === void 0 || saltId === void 0 || value.tier !== "operator" && value.tier !== "shared")
|
|
15425
|
+
return void 0;
|
|
15426
|
+
return { pack, tier: value.tier, salting, saltId };
|
|
15427
|
+
}
|
|
15428
|
+
function readEntry2(value, operator) {
|
|
15429
|
+
if (!isObj4(value)) return void 0;
|
|
15430
|
+
const labels = value.request_labels;
|
|
15431
|
+
if (!Array.isArray(labels) || labels.length > MAX_LABELS || labels.some((l) => str(l, MAX_LABEL) === void 0))
|
|
15432
|
+
return void 0;
|
|
15433
|
+
let bandExponent;
|
|
15434
|
+
if (value.usd_band !== void 0) {
|
|
15435
|
+
const band = typeof value.usd_band === "string" ? BAND.exec(value.usd_band) : null;
|
|
15436
|
+
if (band === null) return void 0;
|
|
15437
|
+
bandExponent = Number(band[1]);
|
|
15438
|
+
}
|
|
15439
|
+
let halves;
|
|
15440
|
+
if (value.halves !== void 0) {
|
|
15441
|
+
const h = value.halves;
|
|
15442
|
+
if (!isObj4(h) || !Number.isSafeInteger(h.present) || !Number.isSafeInteger(h.of) || h.present < 0 || h.of < 1 || h.present > h.of)
|
|
15443
|
+
return void 0;
|
|
15444
|
+
halves = { present: h.present, of: h.of };
|
|
15445
|
+
}
|
|
15446
|
+
let handle;
|
|
15447
|
+
let followUpOf;
|
|
15448
|
+
if (operator) {
|
|
15449
|
+
if (value.customer_handle !== void 0) {
|
|
15450
|
+
if (typeof value.customer_handle !== "string" || !HEX642.test(value.customer_handle))
|
|
15451
|
+
return void 0;
|
|
15452
|
+
handle = value.customer_handle;
|
|
15453
|
+
}
|
|
15454
|
+
if (value.follow_up_of !== void 0) {
|
|
15455
|
+
followUpOf = str(value.follow_up_of, 200);
|
|
15456
|
+
if (followUpOf === void 0) return void 0;
|
|
15457
|
+
}
|
|
15458
|
+
}
|
|
15459
|
+
return {
|
|
15460
|
+
requestLabels: labels,
|
|
15461
|
+
...bandExponent === void 0 ? {} : { bandExponent },
|
|
15462
|
+
...halves === void 0 ? {} : { halves },
|
|
15463
|
+
...handle === void 0 ? {} : { handle },
|
|
15464
|
+
...followUpOf === void 0 ? {} : { followUpOf }
|
|
15465
|
+
};
|
|
15466
|
+
}
|
|
15467
|
+
function readSubjectHistory(document2) {
|
|
15468
|
+
if (!isObj4(document2)) return void 0;
|
|
15469
|
+
const found = Object.entries(document2).filter(
|
|
15470
|
+
([key, member]) => EXTENSION.test(key) && isObj4(member) && isObj4(member.subject_history)
|
|
15471
|
+
);
|
|
15472
|
+
if (found.length !== 1) return void 0;
|
|
15473
|
+
const block = found[0][1].subject_history;
|
|
15474
|
+
if (!isObj4(block.conversations)) return void 0;
|
|
15475
|
+
const scope = readScope(block.handle_scope);
|
|
15476
|
+
const operator = scope?.tier === "operator";
|
|
15477
|
+
const entries = /* @__PURE__ */ new Map();
|
|
15478
|
+
for (const [id, value] of Object.entries(block.conversations)) {
|
|
15479
|
+
const entry = readEntry2(value, operator);
|
|
15480
|
+
if (entry !== void 0) entries.set(id, entry);
|
|
15481
|
+
}
|
|
15482
|
+
if (entries.size === 0) return void 0;
|
|
15483
|
+
return {
|
|
15484
|
+
tier: operator ? "operator" : "shared",
|
|
15485
|
+
...operator && scope !== void 0 ? { scope } : {},
|
|
15486
|
+
entries
|
|
15487
|
+
};
|
|
15488
|
+
}
|
|
15489
|
+
function usdRange(exponent) {
|
|
15490
|
+
const low = 10n ** BigInt(exponent);
|
|
15491
|
+
const high = 10n ** BigInt(exponent + 1) - 1n;
|
|
15492
|
+
return `$${low.toLocaleString("en-US")}-${high.toLocaleString("en-US")}`;
|
|
15493
|
+
}
|
|
15494
|
+
function el5(tag, className, text2) {
|
|
15495
|
+
const node = document.createElement(tag);
|
|
15496
|
+
if (className !== "") node.className = className;
|
|
15497
|
+
if (text2 !== void 0) node.textContent = text2;
|
|
15498
|
+
return node;
|
|
15499
|
+
}
|
|
15500
|
+
var fmt = (n) => n.toLocaleString("en-US");
|
|
15501
|
+
function dayNumber(date) {
|
|
15502
|
+
return Date.parse(`${date}T00:00:00Z`) / 864e5;
|
|
15503
|
+
}
|
|
15504
|
+
function dateWords(date, w) {
|
|
15505
|
+
const m = /^(\d{4})-(\d{2})-(\d{2})$/u.exec(date);
|
|
15506
|
+
if (m === null) return date;
|
|
15507
|
+
return `${w.t(`calendar.month.${Number(m[2])}`)} ${Number(m[3])}`;
|
|
15508
|
+
}
|
|
15509
|
+
var when = (c, w) => c.time === void 0 ? dateWords(c.date, w) : `${dateWords(c.date, w)} \xB7 ${c.time}`;
|
|
15510
|
+
var requestOf = (e, w) => e.requestLabels.length === 0 ? w.t("lines.subject.request.none") : e.requestLabels.join(", ");
|
|
15511
|
+
var bandOf = (e, w) => e.bandExponent === void 0 ? w.t("lines.subject.band.none") : w.t("lines.subject.band", { range: usdRange(e.bandExponent) });
|
|
15512
|
+
var halvesOf = (e, w) => e.halves === void 0 ? w.t("lines.subject.halves.none") : w.t("lines.subject.halves", {
|
|
15513
|
+
present: fmt(e.halves.present),
|
|
15514
|
+
of: fmt(e.halves.of)
|
|
15515
|
+
});
|
|
15516
|
+
var shortHandle = (handle) => `${handle.slice(0, 6)}\u2026${handle.slice(-4)}`;
|
|
15517
|
+
function squares(c) {
|
|
15518
|
+
const box = el5("span", "sh-sq");
|
|
15519
|
+
for (const term of c.terms) {
|
|
15520
|
+
const sq = el5("i", `sq ${term.tone}`);
|
|
15521
|
+
sq.dataset.term = term.ref;
|
|
15522
|
+
sq.title = term.label;
|
|
15523
|
+
box.append(sq);
|
|
15524
|
+
}
|
|
15525
|
+
return box;
|
|
15526
|
+
}
|
|
15527
|
+
function card(c, w) {
|
|
15528
|
+
const body = el5("div", "sh-card");
|
|
15529
|
+
const happened2 = el5("div", "sh-col");
|
|
15530
|
+
happened2.append(el5("h5", "sh-h", w.t("lines.subject.card.happened")));
|
|
15531
|
+
happened2.append(
|
|
15532
|
+
el5(
|
|
15533
|
+
"p",
|
|
15534
|
+
"",
|
|
15535
|
+
c.turns === void 0 || c.calls === void 0 ? w.t("lines.subject.card.no-transcript") : w.t("lines.subject.card.counts", {
|
|
15536
|
+
turns: w.p("spot.turns", c.turns, { n: fmt(c.turns) }),
|
|
15537
|
+
calls: w.p("chat.calls", c.calls, { n: fmt(c.calls) })
|
|
15538
|
+
})
|
|
15539
|
+
)
|
|
15540
|
+
);
|
|
15541
|
+
const terms = el5("div", "sh-col");
|
|
15542
|
+
terms.append(el5("h5", "sh-h", w.t("lines.subject.card.terms")));
|
|
15543
|
+
if (c.open.length === 0)
|
|
15544
|
+
terms.append(el5("p", "", w.t("lines.subject.card.all-met")));
|
|
15545
|
+
for (const o of c.open) {
|
|
15546
|
+
terms.append(el5("p", "sh-term", o.label));
|
|
15547
|
+
if (o.wording !== "") terms.append(el5("p", "sh-sub", o.wording));
|
|
15548
|
+
}
|
|
15549
|
+
const verdict2 = el5("div", "sh-col");
|
|
15550
|
+
verdict2.append(el5("h5", "sh-h", w.t("lines.subject.card.verdict")));
|
|
15551
|
+
if (c.open.length === 0) verdict2.append(el5("p", "", c.outcome.word));
|
|
15552
|
+
for (const o of c.open) {
|
|
15553
|
+
const line = el5("p", "");
|
|
15554
|
+
line.append(el5("span", `pill ${o.tone}`, o.verdict), " ", o.note);
|
|
15555
|
+
verdict2.append(line);
|
|
15556
|
+
}
|
|
15557
|
+
body.append(happened2, terms, verdict2);
|
|
15558
|
+
return body;
|
|
15559
|
+
}
|
|
15560
|
+
function tile(className, big2, caption) {
|
|
15561
|
+
const box = el5("div", `sh-tile ${className}`);
|
|
15562
|
+
box.append(el5("b", "", big2), el5("span", "", caption));
|
|
15563
|
+
return box;
|
|
15564
|
+
}
|
|
15565
|
+
function customerBlock(handle, rows, history, reportTotal, w) {
|
|
15566
|
+
const block = el5("article", "sh-cust");
|
|
15567
|
+
block.dataset.handle = handle;
|
|
15568
|
+
const n = rows.length;
|
|
15569
|
+
const count2 = (s) => rows.filter((r) => r.status === s).length;
|
|
15570
|
+
const core = el5("p", "sh-core");
|
|
15571
|
+
core.append(
|
|
15572
|
+
el5(
|
|
15573
|
+
"b",
|
|
15574
|
+
"",
|
|
15575
|
+
w.t("lines.subject.core.customer", { handle: shortHandle(handle) })
|
|
15576
|
+
)
|
|
15577
|
+
);
|
|
15578
|
+
const scope = history.scope;
|
|
15579
|
+
if (scope !== void 0)
|
|
15580
|
+
core.append(
|
|
15581
|
+
` \xB7 ${w.t("lines.subject.core.scope", {
|
|
15582
|
+
pack: scope.pack,
|
|
15583
|
+
tier: scope.tier,
|
|
15584
|
+
salting: scope.salting,
|
|
15585
|
+
salt: scope.saltId
|
|
15586
|
+
})}`
|
|
15587
|
+
);
|
|
15588
|
+
const halves = rows.flatMap((r) => {
|
|
15589
|
+
const h = history.entries.get(r.id)?.halves;
|
|
15590
|
+
return h === void 0 ? [] : [h];
|
|
15591
|
+
});
|
|
15592
|
+
if (halves.length > 0)
|
|
15593
|
+
core.append(
|
|
15594
|
+
` \xB7 ${w.t("lines.subject.core.halves", {
|
|
15595
|
+
present: fmt(halves.reduce((a, h) => a + h.present, 0)),
|
|
15596
|
+
of: fmt(halves.reduce((a, h) => a + h.of, 0)),
|
|
15597
|
+
k: fmt(halves.length),
|
|
15598
|
+
n: fmt(n)
|
|
15599
|
+
})}`
|
|
15600
|
+
);
|
|
15601
|
+
block.append(core);
|
|
15602
|
+
const dates = rows.map((r) => r.date).sort();
|
|
15603
|
+
const tiles = el5("div", "sh-tiles");
|
|
15604
|
+
const of = (k) => w.t("lines.subject.share", { count: fmt(k), total: fmt(n) });
|
|
15605
|
+
tiles.append(
|
|
15606
|
+
tile(
|
|
15607
|
+
"all",
|
|
15608
|
+
fmt(n),
|
|
15609
|
+
w.t("lines.subject.tile.conversations", {
|
|
15610
|
+
first: dateWords(dates[0], w),
|
|
15611
|
+
last: dateWords(dates[dates.length - 1], w),
|
|
15612
|
+
total: fmt(reportTotal)
|
|
15613
|
+
})
|
|
15614
|
+
),
|
|
15615
|
+
tile("ok", of(count2("resolved")), w.t("lines.subject.tile.resolved")),
|
|
15616
|
+
tile("bad", of(count2("missed")), w.t("lines.subject.tile.missed")),
|
|
15617
|
+
tile("ne", of(count2("undecided")), w.t("lines.subject.tile.undecided"))
|
|
15618
|
+
);
|
|
15619
|
+
block.append(tiles);
|
|
15620
|
+
const unverified = count2("unverified");
|
|
15621
|
+
const nothing = count2("nothing-applied");
|
|
15622
|
+
if (unverified + nothing > 0) {
|
|
15623
|
+
const rest = [
|
|
15624
|
+
...unverified > 0 ? [
|
|
15625
|
+
w.t("lines.subject.note.unverified", {
|
|
15626
|
+
n: fmt(unverified),
|
|
15627
|
+
total: fmt(n)
|
|
15628
|
+
})
|
|
15629
|
+
] : [],
|
|
15630
|
+
...nothing > 0 ? [
|
|
15631
|
+
w.t("lines.subject.note.nothing-applied", {
|
|
15632
|
+
n: fmt(nothing),
|
|
15633
|
+
total: fmt(n)
|
|
15634
|
+
})
|
|
15635
|
+
] : []
|
|
15636
|
+
];
|
|
15637
|
+
block.append(el5("p", "sh-note", rest.join(" ")));
|
|
15638
|
+
}
|
|
15639
|
+
block.append(
|
|
15640
|
+
el5("h3", "sh-head", w.t("lines.subject.headline", { n: fmt(n) }))
|
|
15641
|
+
);
|
|
15642
|
+
block.append(el5("p", "sh-lede", w.t("lines.subject.explain", { n: fmt(n) })));
|
|
15643
|
+
block.append(timeline(rows, history, w));
|
|
15644
|
+
block.append(table(rows, history, w));
|
|
15645
|
+
const legend = el5("p", "sh-legend");
|
|
15646
|
+
for (const [tone, key] of [
|
|
15647
|
+
["ok", "met"],
|
|
15648
|
+
["bad", "not-met"],
|
|
15649
|
+
["ne", "undecided"]
|
|
15650
|
+
]) {
|
|
15651
|
+
const item = el5("span", "sh-key");
|
|
15652
|
+
item.append(el5("i", `sq ${tone}`), w.t(`lines.subject.legend.${key}`));
|
|
15653
|
+
legend.append(item);
|
|
15654
|
+
}
|
|
15655
|
+
legend.append(el5("span", "sh-key", w.t("lines.subject.legend.order")));
|
|
15656
|
+
block.append(legend);
|
|
15657
|
+
return block;
|
|
15658
|
+
}
|
|
15659
|
+
function timeline(rows, history, w) {
|
|
15660
|
+
const section = el5("div", "sh-time");
|
|
15661
|
+
section.append(el5("h3", "sh-head", w.t("lines.subject.timeline.title")));
|
|
15662
|
+
const first = dayNumber(rows[0].date);
|
|
15663
|
+
const span2 = dayNumber(rows[rows.length - 1].date) - first;
|
|
15664
|
+
const at = (c) => span2 <= 0 ? 50 : (dayNumber(c.date) - first) / span2 * 100;
|
|
15665
|
+
const track = el5("div", "sh-track");
|
|
15666
|
+
const byId = new Map(rows.map((r) => [r.id, r]));
|
|
15667
|
+
const list2 = el5("ol", "sh-steps");
|
|
15668
|
+
for (const c of rows) {
|
|
15669
|
+
const dot = el5("i", `sh-dot ${c.outcome.tone}`);
|
|
15670
|
+
dot.style.setProperty("--at", `${at(c).toFixed(2)}%`);
|
|
15671
|
+
dot.dataset.conversation = c.id;
|
|
15672
|
+
track.append(dot);
|
|
15673
|
+
const entry = history.entries.get(c.id);
|
|
15674
|
+
const step = el5("li", "", `${when(c, w)} \xB7 ${requestOf(entry, w)} \xB7 `);
|
|
15675
|
+
step.append(el5("span", `pill ${c.outcome.tone}`, c.outcome.word));
|
|
15676
|
+
list2.append(step);
|
|
15677
|
+
}
|
|
15678
|
+
for (const c of rows) {
|
|
15679
|
+
const target = byId.get(history.entries.get(c.id)?.followUpOf ?? "");
|
|
15680
|
+
if (target === void 0 || target.id === c.id || target.date > c.date)
|
|
15681
|
+
continue;
|
|
15682
|
+
const days = dayNumber(c.date) - dayNumber(target.date);
|
|
15683
|
+
const link = el5("span", "sh-link");
|
|
15684
|
+
link.dataset.followUp = c.id;
|
|
15685
|
+
link.dataset.of = target.id;
|
|
15686
|
+
link.style.setProperty("--from", `${at(target).toFixed(2)}%`);
|
|
15687
|
+
link.style.setProperty("--to", `${at(c).toFixed(2)}%`);
|
|
15688
|
+
link.append(
|
|
15689
|
+
el5(
|
|
15690
|
+
"em",
|
|
15691
|
+
"",
|
|
15692
|
+
days === 0 ? w.t("lines.subject.follow.same-day") : w.p("lines.subject.follow", days, { n: fmt(days) })
|
|
15693
|
+
)
|
|
15694
|
+
);
|
|
15695
|
+
track.append(link);
|
|
15696
|
+
}
|
|
15697
|
+
section.append(
|
|
15698
|
+
track,
|
|
15699
|
+
list2,
|
|
15700
|
+
el5("p", "sh-note", w.t("lines.subject.timeline.note"))
|
|
15701
|
+
);
|
|
15702
|
+
return section;
|
|
15703
|
+
}
|
|
15704
|
+
function table(rows, history, w) {
|
|
15705
|
+
const section = el5("div", "sh-table");
|
|
15706
|
+
section.append(el5("h3", "sh-head", w.t("lines.subject.table.title")));
|
|
15707
|
+
const head2 = el5("div", "sh-row sh-thead");
|
|
15708
|
+
for (const key of ["when", "request", "terms", "band", "halves", "outcome"])
|
|
15709
|
+
head2.append(
|
|
15710
|
+
el5(
|
|
15711
|
+
"span",
|
|
15712
|
+
"",
|
|
15713
|
+
key === "terms" ? w.t("lines.subject.col.terms", {
|
|
15714
|
+
n: fmt(Math.max(...rows.map((r) => r.terms.length)))
|
|
15715
|
+
}) : w.t(`lines.subject.col.${key}`)
|
|
15716
|
+
)
|
|
15717
|
+
);
|
|
15718
|
+
section.append(head2);
|
|
15719
|
+
for (const c of rows) {
|
|
15720
|
+
const entry = history.entries.get(c.id);
|
|
15721
|
+
const summary = el5("span", "sh-row");
|
|
15722
|
+
summary.append(
|
|
15723
|
+
el5("span", "", when(c, w)),
|
|
15724
|
+
el5("span", "", requestOf(entry, w)),
|
|
15725
|
+
squares(c),
|
|
15726
|
+
el5("span", "sh-band", bandOf(entry, w)),
|
|
15727
|
+
el5("span", "", halvesOf(entry, w))
|
|
15728
|
+
);
|
|
15729
|
+
const outcome = el5("span", `pill ${c.outcome.tone}`, c.outcome.word);
|
|
15730
|
+
summary.append(outcome);
|
|
15731
|
+
const row2 = levelToggle(2, summary, () => card(c, w), {
|
|
15732
|
+
className: "sh-conv"
|
|
15733
|
+
});
|
|
15734
|
+
row2.dataset.conversation = c.id;
|
|
15735
|
+
section.append(row2);
|
|
15736
|
+
}
|
|
15737
|
+
return section;
|
|
15738
|
+
}
|
|
15739
|
+
function renderSubjectHistory(rows, history, reportTotal, w) {
|
|
15740
|
+
const drawn = rows.filter((r) => history.entries.has(r.id)).sort(
|
|
15741
|
+
(a, b) => a.date === b.date ? a.id < b.id ? -1 : 1 : a.date < b.date ? -1 : 1
|
|
15742
|
+
);
|
|
15743
|
+
if (drawn.length === 0) return void 0;
|
|
15744
|
+
const section = el5("section", "sec sh");
|
|
15745
|
+
section.dataset.section = "subject-history";
|
|
15746
|
+
section.dataset.tier = history.tier;
|
|
15747
|
+
section.append(el5("h2", "sh-title", w.t("lines.subject.title")));
|
|
15748
|
+
if (history.tier === "operator") {
|
|
15749
|
+
const groups = /* @__PURE__ */ new Map();
|
|
15750
|
+
for (const r of drawn) {
|
|
15751
|
+
const handle = history.entries.get(r.id)?.handle;
|
|
15752
|
+
if (handle === void 0) continue;
|
|
15753
|
+
groups.set(handle, [...groups.get(handle) ?? [], r]);
|
|
15754
|
+
}
|
|
15755
|
+
const repeat = [...groups].filter(([, list2]) => list2.length >= 2);
|
|
15756
|
+
section.append(el5("p", "sh-slice", w.t("lines.subject.slice.operator")));
|
|
15757
|
+
if (repeat.length === 0)
|
|
15758
|
+
section.append(el5("p", "sh-lede", w.t("lines.subject.none")));
|
|
15759
|
+
repeat.sort((a, b) => b[1].length - a[1].length || (a[0] < b[0] ? -1 : 1));
|
|
15760
|
+
for (const [handle, list2] of repeat)
|
|
15761
|
+
section.append(customerBlock(handle, list2, history, reportTotal, w));
|
|
15762
|
+
} else {
|
|
15763
|
+
section.append(el5("p", "sh-slice", w.t("lines.subject.slice.shared")));
|
|
15764
|
+
section.append(table(drawn, history, w));
|
|
15765
|
+
}
|
|
15766
|
+
section.append(el5("p", "sh-gap", w.t("lines.subject.gap")));
|
|
15767
|
+
return section;
|
|
15768
|
+
}
|
|
15769
|
+
var SUBJECT_HISTORY_CSS = `
|
|
15770
|
+
.oi .sh{max-width:1080px;margin:16px auto;padding:22px 24px;background:#fff;border:1px solid var(--line);border-radius:var(--r)}
|
|
15771
|
+
.oi .sh-title{font-family:Georgia,"Iowan Old Style",Cambria,serif;font-size:22px;margin:0 0 10px}
|
|
15772
|
+
.oi .sh-slice{background:var(--gold-l);border:1px solid #F0D7A8;border-radius:8px;padding:8px 12px;font-size:13px;margin:0 0 14px}
|
|
15773
|
+
.oi .sh-cust{margin:0 0 22px;padding:14px 0 0;border-top:1px solid var(--line)}
|
|
15774
|
+
.oi .sh-core{font-family:ui-monospace,Menlo,monospace;font-size:12px;color:var(--slate);margin:0 0 10px;overflow-wrap:anywhere}
|
|
15775
|
+
.oi .sh-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:0 0 12px}
|
|
15776
|
+
.oi .sh-tile{display:flex;flex-direction:column;gap:4px;background:var(--cream);border-radius:10px;padding:10px 14px}
|
|
15777
|
+
.oi .sh-tile b{font-family:Georgia,"Iowan Old Style",Cambria,serif;font-size:28px;line-height:1.1;font-variant-numeric:tabular-nums}
|
|
15778
|
+
.oi .sh-tile span{font-size:12.5px;color:var(--slate)}
|
|
15779
|
+
.oi .sh-tile.ok b{color:var(--ok)}.oi .sh-tile.bad b{color:var(--bad)}
|
|
15780
|
+
.oi .sh-head{font-family:Georgia,"Iowan Old Style",Cambria,serif;font-size:18px;margin:16px 0 8px}
|
|
15781
|
+
.oi .sh-lede,.oi .sh-note,.oi .sh-gap{font-size:13px;color:var(--slate);margin:6px 0}
|
|
15782
|
+
.oi .sh-track{position:relative;height:34px;margin:8px 12px 4px;border-bottom:2px solid var(--line)}
|
|
15783
|
+
.oi .sh-dot{position:absolute;bottom:-7px;left:var(--at);width:12px;height:12px;margin-left:-6px;border-radius:50%;border:2px solid var(--slate);background:#fff}
|
|
15784
|
+
.oi .sh-dot.ok{border-color:var(--ok)}.oi .sh-dot.bad{border-color:var(--bad)}
|
|
15785
|
+
.oi .sh-link{position:absolute;bottom:2px;left:var(--from);width:calc(var(--to) - var(--from));border-top:2px dashed var(--bad);text-align:center}
|
|
15786
|
+
.oi .sh-link em{position:relative;top:-20px;font-size:11px;font-style:normal;color:var(--slate);white-space:nowrap}
|
|
15787
|
+
.oi .sh-steps{margin:10px 0 0;padding-left:18px;font-size:13px}
|
|
15788
|
+
.oi .sh-row{display:grid;grid-template-columns:minmax(110px,1fr) minmax(110px,1.4fr) minmax(130px,2fr) minmax(70px,.8fr) minmax(60px,.7fr) minmax(80px,.8fr);gap:8px;align-items:center;font-size:13px}
|
|
15789
|
+
.oi .sh-thead{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--slate);border-bottom:2px solid var(--ink);padding:6px 0}
|
|
15790
|
+
.oi .sh-conv{border-bottom:1px solid var(--line)}
|
|
15791
|
+
.oi .sh-conv>summary{padding:8px 0;cursor:pointer;list-style:none}
|
|
15792
|
+
.oi .sh-sq{display:inline-flex;gap:3px;flex-wrap:wrap}
|
|
15793
|
+
.oi .sq{display:inline-block;width:14px;height:14px;border:1px solid var(--slate);border-radius:3px;background:#fff}
|
|
15794
|
+
.oi .sq.ok{background:var(--ok-l);border-color:var(--ok)}.oi .sq.bad{background:var(--bad-l);border-color:var(--bad)}.oi .sq.ne,.oi .sq.na{background:#ECEAE4}
|
|
15795
|
+
.oi .sh-band{font-family:ui-monospace,Menlo,monospace}
|
|
15796
|
+
.oi .sh-card{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px;margin:4px 0 10px;padding:12px 14px;background:var(--cream);border:1px solid var(--line);border-radius:8px;font-size:13px}
|
|
15797
|
+
.oi .sh-h{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--slate);margin:0 0 6px}
|
|
15798
|
+
.oi .sh-term{font-weight:600;margin:0}.oi .sh-sub{margin:0 0 6px;color:var(--slate)}
|
|
15799
|
+
.oi .sh-legend{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:12px;color:var(--slate);margin:10px 0 0}
|
|
15800
|
+
.oi .sh-key{display:inline-flex;gap:6px;align-items:center}
|
|
15801
|
+
@media (max-width:640px){.oi .sh{padding:16px}.oi .sh-row{grid-template-columns:1fr 1fr}.oi .sh-thead{display:none}}
|
|
15386
15802
|
`;
|
|
15387
15803
|
|
|
15388
15804
|
// src/outcome-report-styles.ts
|
|
@@ -15577,7 +15993,7 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
|
|
|
15577
15993
|
.oi{background:#fff}
|
|
15578
15994
|
.oi .sheet,.oi .sec{box-shadow:none;margin:0 0 12px}
|
|
15579
15995
|
}
|
|
15580
|
-
` + levelCss("oi") + legendCss("oi") + frontCss(".oi") + // The page layout (one left edge, bordered cards 16px apart): last, so
|
|
15996
|
+
` + levelCss("oi") + legendCss("oi") + frontCss(".oi") + SUBJECT_HISTORY_CSS + // The page layout (one left edge, bordered cards 16px apart): last, so
|
|
15581
15997
|
// it wins over the card's older rules above. The page colour is the
|
|
15582
15998
|
// shell's (emitter-shell.html), so the frame itself stays transparent.
|
|
15583
15999
|
`
|
|
@@ -15590,6 +16006,13 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
|
|
|
15590
16006
|
@media (min-width:821px){.oi table.rules th{white-space:nowrap}}
|
|
15591
16007
|
.oi table.rules tr.grp td{font-family:inherit;font-size:12px;letter-spacing:.08em;text-transform:uppercase;font-weight:700;color:var(--slate);padding-top:22px;border-bottom:1px solid var(--line)}
|
|
15592
16008
|
@media (max-width:820px){.oi .sheet .pad,.oi .sec,.oi .sec.rp{padding:24px var(--inset)}}
|
|
16009
|
+
.oi table.rules tr.tier td{padding-top:28px;border-bottom:2px solid var(--navy)}
|
|
16010
|
+
.oi table.rules tr.tier b{display:block;font-family:Georgia,Cambria,serif;font-size:19px;color:var(--navy)}
|
|
16011
|
+
.oi table.rules tr.tier small{display:block;color:var(--slate);font-size:12.5px;margin-top:3px}
|
|
16012
|
+
.oi .rtier{display:inline-block;font-size:11px;font-weight:700;padding:1px 8px;border-radius:99px;margin-top:3px;background:var(--cream);color:var(--slate)}
|
|
16013
|
+
.oi .rtier[data-requirement-tier="must_have"]{background:#E6EEF6;color:#2B5A85}
|
|
16014
|
+
.oi .rtier[data-requirement-tier="informational"]{background:#FBEFD9;color:#8A5A00}
|
|
16015
|
+
.oi .tier-note{margin:0 0 12px;font-size:13px;color:var(--slate)}
|
|
15593
16016
|
`;
|
|
15594
16017
|
|
|
15595
16018
|
// src/viewer-build.ts
|
|
@@ -15599,13 +16022,13 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
|
|
|
15599
16022
|
}
|
|
15600
16023
|
function builtCommit() {
|
|
15601
16024
|
if (false) return void 0;
|
|
15602
|
-
return commitPrefix("
|
|
16025
|
+
return commitPrefix("7852ee1bf564b9eb2d32cfad8dcc1c7bcb315ae2");
|
|
15603
16026
|
}
|
|
15604
16027
|
var commit = builtCommit();
|
|
15605
16028
|
var unreleased = false;
|
|
15606
16029
|
var VIEWER_BUILD = {
|
|
15607
16030
|
viewer: "@action-state-group/capsule-viewer",
|
|
15608
|
-
viewerVersion: "0.
|
|
16031
|
+
viewerVersion: "0.8.0",
|
|
15609
16032
|
verifier: "@action-state-group/agent-action-capsule",
|
|
15610
16033
|
verifierVersion: "0.10.0",
|
|
15611
16034
|
cllVersion: "0.3.0",
|
|
@@ -15664,6 +16087,7 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
|
|
|
15664
16087
|
"title",
|
|
15665
16088
|
"theme_css",
|
|
15666
16089
|
"wording",
|
|
16090
|
+
"contract",
|
|
15667
16091
|
"core_runtime_sha256",
|
|
15668
16092
|
"module_sha256",
|
|
15669
16093
|
"bundle"
|
|
@@ -15695,6 +16119,11 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
|
|
|
15695
16119
|
if (!isObject2(w) || Object.keys(w).some((k) => k !== "pack" && k !== "sha256") || typeof w.pack !== "string" || !isHex64(w.sha256))
|
|
15696
16120
|
fail2("wording is not {pack, sha256}");
|
|
15697
16121
|
}
|
|
16122
|
+
if (v.contract !== void 0) {
|
|
16123
|
+
const c = v.contract;
|
|
16124
|
+
if (!isObject2(c) || Object.keys(c).some((k) => k !== "text" && k !== "sha256") || typeof c.text !== "string" || !isHex64(c.sha256))
|
|
16125
|
+
fail2("contract is not {text, sha256}");
|
|
16126
|
+
}
|
|
15698
16127
|
if (!isHex64(v.core_runtime_sha256))
|
|
15699
16128
|
fail2("core_runtime_sha256 is not a lowercase hex SHA-256");
|
|
15700
16129
|
if (!Array.isArray(v.module_sha256) || !v.module_sha256.every((pin) => isHex64(pin)))
|
|
@@ -15714,6 +16143,13 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
|
|
|
15714
16143
|
locale: "en",
|
|
15715
16144
|
entries: {
|
|
15716
16145
|
"layout.grouping": "lines",
|
|
16146
|
+
"lines.rtier.must_have.title": "Must-have terms \xB7 {n}",
|
|
16147
|
+
"lines.rtier.must_have.note": "These count in the answer.",
|
|
16148
|
+
"lines.rtier.informational.title": "Informational terms \xB7 {n}",
|
|
16149
|
+
"lines.rtier.informational.note": "Reported, never in the answer: a term not met here changes nothing above it.",
|
|
16150
|
+
"lines.rtier.unstated.title": "Terms with no stated tier \xB7 {n}",
|
|
16151
|
+
"lines.rtier.unstated.note": "The contract given for this page states no tier for these, so they stay in the answer.",
|
|
16152
|
+
"lines.rtier.sealed-note": "The sealed result counts informational terms too; the lines this report derives leave them out.",
|
|
15717
16153
|
"lines.title": "Outcome report",
|
|
15718
16154
|
"lines.share": "{count} of {total}",
|
|
15719
16155
|
"lines.share.percent": "{p}%",
|
|
@@ -15945,7 +16381,6 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
|
|
|
15945
16381
|
"spot.term.unstated": "The rule's wording is not in this bundle: no report in it states the wording.",
|
|
15946
16382
|
"spot.term.mixed": "The rule's wording is not shown: the reports in this bundle state different wordings.",
|
|
15947
16383
|
"spot.says": "The judge's words",
|
|
15948
|
-
"spot.pin": "judge pin {digest}",
|
|
15949
16384
|
"spot.confidence": "confidence {c}",
|
|
15950
16385
|
"spot.gap.produced": "Who produced each message (model, tools used, effects) is not in this bundle: a message here carries only who spoke, what was said and the tool calls.",
|
|
15951
16386
|
"spot.gap.when": "This report states only each rule's wording, not when it counts as met or when it cannot be decided.",
|
|
@@ -16082,6 +16517,9 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
|
|
|
16082
16517
|
"status.contradicted": "contradicted",
|
|
16083
16518
|
"status.not_applicable": "not applicable",
|
|
16084
16519
|
"status.unknown": "unknown",
|
|
16520
|
+
"requirement_tier.must_have": "Must-have",
|
|
16521
|
+
"requirement_tier.informational": "Informational",
|
|
16522
|
+
"requirement_tier.unstated": "Tier not stated",
|
|
16085
16523
|
"card.pf.assurance": "Assurance (as sealed on the claim)",
|
|
16086
16524
|
"card.pf.assurance.line": "tier {tier} \xB7 grade {grade} \xB7 sufficiency {sufficiency} \xB7 carrier status {status}",
|
|
16087
16525
|
"card.wording.refused": "The wording pack supplied with this page was refused, so this card is drawn with the viewer's built-in words only.",
|
|
@@ -16211,6 +16649,12 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
|
|
|
16211
16649
|
"legend.toggle.core": "no toggle, the core always draws it",
|
|
16212
16650
|
"legend.toggle.note": "Every toggle's glyph sits at the left edge of the line it opens. Opening is a click; the page records nothing about it.",
|
|
16213
16651
|
"legend.src.lead": "Where every word comes from",
|
|
16652
|
+
"legend.src.core": "core",
|
|
16653
|
+
"legend.src.core.is": "the viewer's own words",
|
|
16654
|
+
"legend.src.pack": "wording pack",
|
|
16655
|
+
"legend.src.pack.is": "the report's words",
|
|
16656
|
+
"legend.src.field": "capsule field",
|
|
16657
|
+
"legend.src.field.is": "a field as recorded, with its path",
|
|
16214
16658
|
"legend.src.payload": "payload",
|
|
16215
16659
|
"legend.src.payload.is": "the record's content",
|
|
16216
16660
|
"legend.src.producer": "producer",
|
|
@@ -16326,7 +16770,51 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
|
|
|
16326
16770
|
"record.foot.sdk": "Four implementations, in Go, Rust, Python and TypeScript, pass one vector corpus.",
|
|
16327
16771
|
"record.rung.7.note-unread": "this page could not read the witness receipts here",
|
|
16328
16772
|
"record.rung.5.other": "the bundle's membership claim did not hold, and its findings do not name this record",
|
|
16329
|
-
"record.rung.5.unanchored": "the checkpoint is not authenticated on this page"
|
|
16773
|
+
"record.rung.5.unanchored": "the checkpoint is not authenticated on this page",
|
|
16774
|
+
"lines.subject.title": "Same customer in this report",
|
|
16775
|
+
"lines.subject.slice.operator": "Slice: this report, filtered to one customer handle. Nothing is re-judged; the page shows what the report's Result already holds for the handle.",
|
|
16776
|
+
"lines.subject.slice.shared": "This page does not group conversations by customer, so it does not say which are one customer's. Each conversation shows its requests, its band and the halves present, and nothing else about the customer.",
|
|
16777
|
+
"lines.subject.none": "No customer handle in this report has more than one conversation.",
|
|
16778
|
+
"lines.subject.core.customer": "Customer {handle}",
|
|
16779
|
+
"lines.subject.core.scope": "handle scope: {pack}, {tier} tier, salted {salting}, salt {salt}",
|
|
16780
|
+
"lines.subject.core.halves": "the customer's halves: {present} of {of} present, in {k} of {n} conversations that state them",
|
|
16781
|
+
"lines.subject.share": "{count} of {total}",
|
|
16782
|
+
"lines.subject.tile.conversations": "conversations \xB7 {first} to {last} \xB7 of the report's {total}",
|
|
16783
|
+
"lines.subject.tile.resolved": "resolved \xB7 every term met",
|
|
16784
|
+
"lines.subject.tile.missed": "missed \xB7 one or more terms not met",
|
|
16785
|
+
"lines.subject.tile.undecided": "could not decide",
|
|
16786
|
+
"lines.subject.headline": "One customer, {n} conversations",
|
|
16787
|
+
"lines.subject.explain": "The handle is a salted commitment to the customer id, stable within this pack's scope and your tier. It tells you these {n} are the same customer; the handle alone does not say who.",
|
|
16788
|
+
"lines.subject.timeline.title": "Over time",
|
|
16789
|
+
"lines.subject.timeline.note": "The dashed link joins a conversation to the earlier one it follows up: the later record cites the earlier one (the producer's follow_up_of).",
|
|
16790
|
+
"lines.subject.follow.one": "{n} day to the follow-up",
|
|
16791
|
+
"lines.subject.follow.other": "{n} days to the follow-up",
|
|
16792
|
+
"lines.subject.follow.same-day": "the same day",
|
|
16793
|
+
"lines.subject.table.title": "Each conversation, each term",
|
|
16794
|
+
"lines.subject.col.when": "When",
|
|
16795
|
+
"lines.subject.col.request": "Requested",
|
|
16796
|
+
"lines.subject.col.terms": "Terms ({n})",
|
|
16797
|
+
"lines.subject.col.band": "Band",
|
|
16798
|
+
"lines.subject.col.halves": "Halves",
|
|
16799
|
+
"lines.subject.col.outcome": "Outcome",
|
|
16800
|
+
"lines.subject.request.none": "not stated",
|
|
16801
|
+
"lines.subject.band": "USD {range}",
|
|
16802
|
+
"lines.subject.band.none": "no band",
|
|
16803
|
+
"lines.subject.halves": "{present} of {of}",
|
|
16804
|
+
"lines.subject.halves.none": "not stated",
|
|
16805
|
+
"lines.subject.card.happened": "What happened",
|
|
16806
|
+
"lines.subject.card.counts": "{turns}, {calls}.",
|
|
16807
|
+
"lines.subject.card.no-transcript": "The conversation is not in this bundle.",
|
|
16808
|
+
"lines.subject.card.terms": "The terms not met",
|
|
16809
|
+
"lines.subject.card.all-met": "Every term was met.",
|
|
16810
|
+
"lines.subject.card.verdict": "The verdict, and why",
|
|
16811
|
+
"lines.subject.legend.met": "met",
|
|
16812
|
+
"lines.subject.legend.not-met": "not met",
|
|
16813
|
+
"lines.subject.legend.undecided": "could not decide",
|
|
16814
|
+
"lines.subject.legend.order": "terms are in the contract's order",
|
|
16815
|
+
"lines.subject.gap": "Not drawn: which terms are must-have and which informational, when each term is met, and the adjudication. This bundle does not carry them.",
|
|
16816
|
+
"lines.subject.note.unverified": "{n} of {total} could not be verified.",
|
|
16817
|
+
"lines.subject.note.nothing-applied": "{n} of {total} had no term that applied."
|
|
16330
16818
|
}
|
|
16331
16819
|
};
|
|
16332
16820
|
|
|
@@ -16337,6 +16825,13 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
|
|
|
16337
16825
|
locale: "en",
|
|
16338
16826
|
entries: {
|
|
16339
16827
|
"layout.grouping": "groups",
|
|
16828
|
+
"groups.rtier.must_have.title": "Must-have tests \xB7 {n}",
|
|
16829
|
+
"groups.rtier.must_have.note": "These count in the answer.",
|
|
16830
|
+
"groups.rtier.informational.title": "Informational tests \xB7 {n}",
|
|
16831
|
+
"groups.rtier.informational.note": "Reported, never in the answer: a test not met here changes nothing above it.",
|
|
16832
|
+
"groups.rtier.unstated.title": "Tests with no stated tier \xB7 {n}",
|
|
16833
|
+
"groups.rtier.unstated.note": "The contract given for this page states no tier for these, so they stay in the answer.",
|
|
16834
|
+
"groups.rtier.sealed-note": "The sealed result counts informational tests too; the lines this report derives leave them out.",
|
|
16340
16835
|
"groups.producer.title": "The producer's mapping, not a sealed record",
|
|
16341
16836
|
"groups.count.obligation.one": "{n} obligation",
|
|
16342
16837
|
"groups.count.obligation.other": "{n} obligations",
|
|
@@ -16469,7 +16964,6 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
|
|
|
16469
16964
|
"spot.term.unstated": "The rule's wording is not in this bundle: no report in it states the wording.",
|
|
16470
16965
|
"spot.term.mixed": "The rule's wording is not shown: the reports in this bundle state different wordings.",
|
|
16471
16966
|
"spot.says": "The judge's words",
|
|
16472
|
-
"spot.pin": "judge pin {digest}",
|
|
16473
16967
|
"spot.confidence": "confidence {c}",
|
|
16474
16968
|
"spot.gap.produced": "Who produced each message (model, tools used, effects) is not in this bundle: a message here carries only who spoke, what was said and the tool calls.",
|
|
16475
16969
|
"spot.gap.when": "This report states only each rule's wording, not when it counts as met or when it cannot be decided.",
|
|
@@ -16610,6 +17104,9 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
|
|
|
16610
17104
|
"status.contradicted": "contradicted",
|
|
16611
17105
|
"status.not_applicable": "not applicable",
|
|
16612
17106
|
"status.unknown": "unknown",
|
|
17107
|
+
"requirement_tier.must_have": "Must-have",
|
|
17108
|
+
"requirement_tier.informational": "Informational",
|
|
17109
|
+
"requirement_tier.unstated": "Tier not stated",
|
|
16613
17110
|
"card.pf.assurance": "Assurance (as sealed on the claim)",
|
|
16614
17111
|
"card.pf.assurance.line": "tier {tier} \xB7 grade {grade} \xB7 sufficiency {sufficiency} \xB7 carrier status {status}",
|
|
16615
17112
|
"card.wording.refused": "The wording pack supplied with this page was refused, so this card is drawn with the viewer's built-in words only.",
|
|
@@ -16739,6 +17236,12 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
|
|
|
16739
17236
|
"legend.toggle.core": "no toggle, the core always draws it",
|
|
16740
17237
|
"legend.toggle.note": "Every toggle's glyph sits at the left edge of the line it opens. Opening is a click; the page records nothing about it.",
|
|
16741
17238
|
"legend.src.lead": "Where every word comes from",
|
|
17239
|
+
"legend.src.core": "core",
|
|
17240
|
+
"legend.src.core.is": "the viewer's own words",
|
|
17241
|
+
"legend.src.pack": "wording pack",
|
|
17242
|
+
"legend.src.pack.is": "the report's words",
|
|
17243
|
+
"legend.src.field": "capsule field",
|
|
17244
|
+
"legend.src.field.is": "a field as recorded, with its path",
|
|
16742
17245
|
"legend.src.payload": "payload",
|
|
16743
17246
|
"legend.src.payload.is": "the record's content",
|
|
16744
17247
|
"legend.src.producer": "producer",
|
|
@@ -16928,7 +17431,11 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
|
|
|
16928
17431
|
tier: TIERS.map((v) => v.toLowerCase()),
|
|
16929
17432
|
grade: GRADES2.map((v) => v.toLowerCase()),
|
|
16930
17433
|
sufficiency: SUFFICIENCIES.map((v) => v.toLowerCase()),
|
|
16931
|
-
status: EVIDENCE_STATUSES.map((v) => v.toLowerCase())
|
|
17434
|
+
status: EVIDENCE_STATUSES.map((v) => v.toLowerCase()),
|
|
17435
|
+
// A row's requirement tier from the page's contract (evidence-contract.ts
|
|
17436
|
+
// RowTier): the contract's two values, and `unstated` where nothing
|
|
17437
|
+
// given states one.
|
|
17438
|
+
requirement_tier: ["must_have", "informational", "unstated"]
|
|
16932
17439
|
});
|
|
16933
17440
|
var SECTION3_PREFIXES = Object.freeze([
|
|
16934
17441
|
"report.",
|
|
@@ -16940,7 +17447,8 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
|
|
|
16940
17447
|
"grade.",
|
|
16941
17448
|
"status.",
|
|
16942
17449
|
"applicability.",
|
|
16943
|
-
"contract_fact."
|
|
17450
|
+
"contract_fact.",
|
|
17451
|
+
"requirement_tier."
|
|
16944
17452
|
]);
|
|
16945
17453
|
var SECTION3_ALIASES = Object.freeze({
|
|
16946
17454
|
lines: {
|
|
@@ -17104,7 +17612,20 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
|
|
|
17104
17612
|
// one whose claim could not be verified (Outcomes card).
|
|
17105
17613
|
["lines.rules.col.undecided", "lines.rules.col.unverified"],
|
|
17106
17614
|
// A test row's undecided and unverified counts (EU card).
|
|
17107
|
-
["groups.row.undecided-note", "groups.row.unverified-note"]
|
|
17615
|
+
["groups.row.undecided-note", "groups.row.unverified-note"],
|
|
17616
|
+
// A tier section's heading: a pack must not make the informational
|
|
17617
|
+
// section read as the must-have one, or the reverse. The tier words
|
|
17618
|
+
// themselves are locked (LOCKED_ENTRIES).
|
|
17619
|
+
[
|
|
17620
|
+
"lines.rtier.must_have.title",
|
|
17621
|
+
"lines.rtier.informational.title",
|
|
17622
|
+
"lines.rtier.unstated.title"
|
|
17623
|
+
],
|
|
17624
|
+
[
|
|
17625
|
+
"groups.rtier.must_have.title",
|
|
17626
|
+
"groups.rtier.informational.title",
|
|
17627
|
+
"groups.rtier.unstated.title"
|
|
17628
|
+
]
|
|
17108
17629
|
];
|
|
17109
17630
|
var GUARDED_CATEGORY = {
|
|
17110
17631
|
// met/clean: a rule was met, a row resolved, or nothing exceptioned.
|
|
@@ -17220,6 +17741,15 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
|
|
|
17220
17741
|
...SECTION3_ENUMS.status.map((v) => `status.${v}`),
|
|
17221
17742
|
...SECTION3_ENUMS.grade.map((v) => `grade.${v}`),
|
|
17222
17743
|
...SECTION3_ENUMS.sufficiency.map((v) => `sufficiency.${v}`),
|
|
17744
|
+
// A row's requirement tier, as the page's contract states it, and the
|
|
17745
|
+
// lines that say a row's tier is not stated and that the sealed
|
|
17746
|
+
// aggregate counts informational rows the derived lines leave out: a
|
|
17747
|
+
// pack cannot make an informational row read as must-have.
|
|
17748
|
+
...SECTION3_ENUMS.requirement_tier.map((v) => `requirement_tier.${v}`),
|
|
17749
|
+
"lines.rtier.unstated.note",
|
|
17750
|
+
"groups.rtier.unstated.note",
|
|
17751
|
+
"lines.rtier.sealed-note",
|
|
17752
|
+
"groups.rtier.sealed-note",
|
|
17223
17753
|
// The shared front (report-front.ts): the mock-judge line, what the
|
|
17224
17754
|
// aggregate's unknown count is, what the page and the bundle carry, and
|
|
17225
17755
|
// the producer's findings label.
|
|
@@ -17335,6 +17865,8 @@ ${s} .check .steps{margin:12px 0 0;padding-left:20px;font-size:14px;line-height:
|
|
|
17335
17865
|
"spot.gap.produced",
|
|
17336
17866
|
"spot.gap.when",
|
|
17337
17867
|
"spot.gap.adjudication",
|
|
17868
|
+
// Same customer in this report (subject-history.ts): what the bundle does not carry.
|
|
17869
|
+
"lines.subject.gap",
|
|
17338
17870
|
// Both cards: a rule or conversation nobody could decide, by why.
|
|
17339
17871
|
"lines.status.undecided.unjudged",
|
|
17340
17872
|
"lines.status.undecided.withheld",
|
|
@@ -17794,8 +18326,8 @@ ${key}`);
|
|
|
17794
18326
|
return problems.map((p) => `${pack.id}: ${p}`);
|
|
17795
18327
|
}
|
|
17796
18328
|
var DEFAULT_PACK_SHA256 = Object.freeze({
|
|
17797
|
-
lines: "
|
|
17798
|
-
groups: "
|
|
18329
|
+
lines: "047b4938c07e05a7d122246e0e80a11b9db2fc65edf02286e8f49f4bc618ac6c",
|
|
18330
|
+
groups: "3d269d31a57915293bb7f81cefb93b450e845aa07be26bd9a7e203defd560784"
|
|
17799
18331
|
});
|
|
17800
18332
|
function fill(key, text2, vars) {
|
|
17801
18333
|
return text2.replace(PLACEHOLDER, (whole, name) => {
|
|
@@ -17950,7 +18482,7 @@ ${key}`);
|
|
|
17950
18482
|
}
|
|
17951
18483
|
unnamed += 1;
|
|
17952
18484
|
}
|
|
17953
|
-
const
|
|
18485
|
+
const counted2 = [];
|
|
17954
18486
|
for (const [digest, entry] of pins) {
|
|
17955
18487
|
let model;
|
|
17956
18488
|
let modelNotShown;
|
|
@@ -17970,18 +18502,18 @@ ${key}`);
|
|
|
17970
18502
|
);
|
|
17971
18503
|
else modelNotShown = "does_not_recompute";
|
|
17972
18504
|
}
|
|
17973
|
-
|
|
18505
|
+
counted2.push({
|
|
17974
18506
|
digest,
|
|
17975
18507
|
count: entry.count,
|
|
17976
18508
|
...model === void 0 ? {} : { model },
|
|
17977
18509
|
...modelNotShown === void 0 ? {} : { modelNotShown }
|
|
17978
18510
|
});
|
|
17979
18511
|
}
|
|
17980
|
-
|
|
18512
|
+
counted2.sort((a, b) => b.count - a.count || (a.digest < b.digest ? -1 : 1));
|
|
17981
18513
|
return {
|
|
17982
18514
|
cited,
|
|
17983
18515
|
notCarried,
|
|
17984
|
-
pins:
|
|
18516
|
+
pins: counted2,
|
|
17985
18517
|
withheld,
|
|
17986
18518
|
unread,
|
|
17987
18519
|
checkers: [...checkers].map(([ref, count2]) => ({ ref, count: count2 })).sort((a, b) => b.count - a.count || (a.ref < b.ref ? -1 : 1)),
|
|
@@ -17989,7 +18521,7 @@ ${key}`);
|
|
|
17989
18521
|
unnamed
|
|
17990
18522
|
};
|
|
17991
18523
|
}
|
|
17992
|
-
var
|
|
18524
|
+
var fmt2 = (n) => n.toLocaleString();
|
|
17993
18525
|
var quoted = (value) => JSON.stringify(value.length > 120 ? `${value.slice(0, 120)}\u2026` : value);
|
|
17994
18526
|
var HEX_DIGEST = /^[0-9a-f]+$/iu;
|
|
17995
18527
|
var short = (digest) => HEX_DIGEST.test(digest) ? digest.length > 12 ? `${digest.slice(0, 12)}\u2026` : digest : quoted(digest);
|
|
@@ -18000,7 +18532,7 @@ ${key}`);
|
|
|
18000
18532
|
}
|
|
18001
18533
|
function judgeLine(tally, w = DEFAULT_WORDS.lines) {
|
|
18002
18534
|
const label = w.t("prov.judge.label");
|
|
18003
|
-
const of = (n) => w.t("prov.of", { count:
|
|
18535
|
+
const of = (n) => w.t("prov.of", { count: fmt2(n), total: fmt2(tally.cited) });
|
|
18004
18536
|
if (tally.cited === 0)
|
|
18005
18537
|
return {
|
|
18006
18538
|
key: "judge",
|
|
@@ -18038,13 +18570,13 @@ ${key}`);
|
|
|
18038
18570
|
const by = tally.checkers.map(
|
|
18039
18571
|
(c) => w.t("prov.judge.checker", {
|
|
18040
18572
|
checker: quoted(c.ref),
|
|
18041
|
-
count:
|
|
18573
|
+
count: fmt2(c.count)
|
|
18042
18574
|
})
|
|
18043
18575
|
);
|
|
18044
18576
|
if (tally.recomputedUnnamed > 0)
|
|
18045
18577
|
by.push(
|
|
18046
18578
|
w.t("prov.judge.checker-not-stated", {
|
|
18047
|
-
count:
|
|
18579
|
+
count: fmt2(tally.recomputedUnnamed)
|
|
18048
18580
|
})
|
|
18049
18581
|
);
|
|
18050
18582
|
parts.push(
|
|
@@ -18126,7 +18658,7 @@ ${key}`);
|
|
|
18126
18658
|
if (logId !== void 0)
|
|
18127
18659
|
facts.push(w.t("prov.witness.log", { log: quoted(logId) }));
|
|
18128
18660
|
if (page.checkpointSize !== void 0)
|
|
18129
|
-
facts.push(w.t("prov.witness.size", { size:
|
|
18661
|
+
facts.push(w.t("prov.witness.size", { size: fmt2(page.checkpointSize) }));
|
|
18130
18662
|
if (page.checkpointRoot !== void 0)
|
|
18131
18663
|
facts.push(w.t("prov.witness.root", { root: short(page.checkpointRoot) }));
|
|
18132
18664
|
const unchecked = [
|
|
@@ -18158,7 +18690,7 @@ ${key}`);
|
|
|
18158
18690
|
...failed2.length === 0 ? [] : [w.t("prov.witness.failed", { witnesses: failed2.join("; ") })],
|
|
18159
18691
|
...unreadable === 0 ? [] : [
|
|
18160
18692
|
w.p("prov.witness.invalid.unreadable", unreadable, {
|
|
18161
|
-
n:
|
|
18693
|
+
n: fmt2(unreadable)
|
|
18162
18694
|
})
|
|
18163
18695
|
],
|
|
18164
18696
|
// AAC fails only on a failed receipt or an unreadable entry; should
|
|
@@ -18182,8 +18714,8 @@ ${key}`);
|
|
|
18182
18714
|
const stubs = all.filter((e) => e.stub).length;
|
|
18183
18715
|
const malformed = all.filter((e) => e.malformed).length;
|
|
18184
18716
|
const others = [
|
|
18185
|
-
stubs === 0 ? "" : w.p("prov.witness.stubs", stubs, { n:
|
|
18186
|
-
malformed === 0 ? "" : w.p("prov.witness.malformed", malformed, { n:
|
|
18717
|
+
stubs === 0 ? "" : w.p("prov.witness.stubs", stubs, { n: fmt2(stubs) }),
|
|
18718
|
+
malformed === 0 ? "" : w.p("prov.witness.malformed", malformed, { n: fmt2(malformed) })
|
|
18187
18719
|
].filter((t) => t !== "");
|
|
18188
18720
|
const besides = others.length === 0 ? [] : [
|
|
18189
18721
|
w.t("prov.witness.besides", {
|
|
@@ -18201,7 +18733,7 @@ ${key}`);
|
|
|
18201
18733
|
};
|
|
18202
18734
|
const name = (e) => {
|
|
18203
18735
|
const url = e.url === void 0 ? w.t("prov.witness.receipt-not-stated") : quoted(e.url);
|
|
18204
|
-
return e.treeSize === void 0 ? url : w.t("prov.witness.entry", { witness: url, size:
|
|
18736
|
+
return e.treeSize === void 0 ? url : w.t("prov.witness.entry", { witness: url, size: fmt2(e.treeSize) });
|
|
18205
18737
|
};
|
|
18206
18738
|
const passed = entries.filter((e) => e.passed).map(name);
|
|
18207
18739
|
const stated = entries.filter((e) => !e.passed).map(name);
|
|
@@ -18288,32 +18820,32 @@ ${key}`);
|
|
|
18288
18820
|
}
|
|
18289
18821
|
|
|
18290
18822
|
// src/report-front.ts
|
|
18291
|
-
function
|
|
18823
|
+
function el6(tag, className, text2) {
|
|
18292
18824
|
const node = document.createElement(tag);
|
|
18293
18825
|
if (className !== "") node.className = className;
|
|
18294
18826
|
if (text2 !== void 0) node.textContent = text2;
|
|
18295
18827
|
return node;
|
|
18296
18828
|
}
|
|
18297
18829
|
function leadWithProvenance(host, section, provenance) {
|
|
18298
|
-
const row2 =
|
|
18830
|
+
const row2 = el6("div", "prov-row");
|
|
18299
18831
|
row2.append(provenance);
|
|
18300
18832
|
if (section === null) host.prepend(frontCard(row2));
|
|
18301
18833
|
else section.prepend(row2);
|
|
18302
18834
|
}
|
|
18303
|
-
var
|
|
18835
|
+
var fmt3 = (n) => n.toLocaleString("en-US");
|
|
18304
18836
|
function bundleObject(bundle) {
|
|
18305
18837
|
return typeof bundle === "object" && bundle !== null && !Array.isArray(bundle) ? bundle : {};
|
|
18306
18838
|
}
|
|
18307
18839
|
function renderCheckYourself(bundle, w) {
|
|
18308
18840
|
const b = bundleObject(bundle);
|
|
18309
|
-
const section =
|
|
18841
|
+
const section = el6("section", "check front-card");
|
|
18310
18842
|
section.dataset.section = "check-yourself";
|
|
18311
|
-
section.append(
|
|
18312
|
-
const anchors =
|
|
18843
|
+
section.append(el6("h2", "", w.t("front.check.h")));
|
|
18844
|
+
const anchors = el6("div", "anchors");
|
|
18313
18845
|
const cell2 = (label, value, key) => {
|
|
18314
|
-
const box =
|
|
18846
|
+
const box = el6("div", "anchor");
|
|
18315
18847
|
box.dataset.anchor = key;
|
|
18316
|
-
box.append(
|
|
18848
|
+
box.append(el6("span", "k", label), el6("code", "", value));
|
|
18317
18849
|
anchors.append(box);
|
|
18318
18850
|
};
|
|
18319
18851
|
const extensions2 = bundleObject(b.extensions);
|
|
@@ -18326,27 +18858,27 @@ ${key}`);
|
|
|
18326
18858
|
if (typeof checkpoint.root === "string" && typeof checkpoint.mmr_size === "number")
|
|
18327
18859
|
cell2(
|
|
18328
18860
|
w.t("front.check.root"),
|
|
18329
|
-
`${checkpoint.root} \xB7 ${
|
|
18861
|
+
`${checkpoint.root} \xB7 ${fmt3(checkpoint.mmr_size)}`,
|
|
18330
18862
|
"checkpoint"
|
|
18331
18863
|
);
|
|
18332
18864
|
if (Array.isArray(b.records))
|
|
18333
|
-
cell2(w.t("front.check.records"),
|
|
18865
|
+
cell2(w.t("front.check.records"), fmt3(b.records.length), "records");
|
|
18334
18866
|
section.append(anchors);
|
|
18335
18867
|
const receipts2 = witnessEntries(b.checkpoint).filter(
|
|
18336
18868
|
(entry) => !entry.stub && !entry.malformed
|
|
18337
18869
|
);
|
|
18338
|
-
const steps =
|
|
18870
|
+
const steps = el6("ol", "steps");
|
|
18339
18871
|
steps.append(
|
|
18340
|
-
|
|
18341
|
-
|
|
18872
|
+
el6("li", "", w.t("front.check.s1")),
|
|
18873
|
+
el6("li", "", w.t("front.check.s2"))
|
|
18342
18874
|
);
|
|
18343
|
-
const compare2 =
|
|
18875
|
+
const compare2 = el6(
|
|
18344
18876
|
"li",
|
|
18345
18877
|
"",
|
|
18346
18878
|
w.t(receipts2.length > 0 ? "front.check.s3.receipt" : "front.check.s3.none")
|
|
18347
18879
|
);
|
|
18348
18880
|
compare2.dataset.receipt = receipts2.length > 0 ? "present" : "absent";
|
|
18349
|
-
steps.append(compare2,
|
|
18881
|
+
steps.append(compare2, el6("li", "", w.t("front.check.s4")));
|
|
18350
18882
|
section.append(steps);
|
|
18351
18883
|
return section;
|
|
18352
18884
|
}
|
|
@@ -18373,9 +18905,9 @@ ${key}`);
|
|
|
18373
18905
|
return toggle;
|
|
18374
18906
|
}
|
|
18375
18907
|
function frontCard(...children) {
|
|
18376
|
-
const
|
|
18377
|
-
|
|
18378
|
-
return
|
|
18908
|
+
const card2 = el6("div", "front-card");
|
|
18909
|
+
card2.append(...children);
|
|
18910
|
+
return card2;
|
|
18379
18911
|
}
|
|
18380
18912
|
function applyDepth(levels) {
|
|
18381
18913
|
if (levels.depth === "L0") return;
|
|
@@ -18397,17 +18929,17 @@ ${key}`);
|
|
|
18397
18929
|
}
|
|
18398
18930
|
|
|
18399
18931
|
// src/spot-check.ts
|
|
18400
|
-
function
|
|
18932
|
+
function el7(tag, className, text2) {
|
|
18401
18933
|
const value = document.createElement(tag);
|
|
18402
18934
|
value.className = className;
|
|
18403
18935
|
if (text2 !== void 0) value.textContent = text2;
|
|
18404
18936
|
return value;
|
|
18405
18937
|
}
|
|
18406
18938
|
function cell(kind, heading, rule) {
|
|
18407
|
-
const col =
|
|
18939
|
+
const col = el7("div", `sc-col sc-${kind}`);
|
|
18408
18940
|
col.dataset.column = kind;
|
|
18409
18941
|
if (rule !== void 0) col.dataset.spotRule = rule;
|
|
18410
|
-
col.append(
|
|
18942
|
+
col.append(el7("h5", "sc-h", heading));
|
|
18411
18943
|
return col;
|
|
18412
18944
|
}
|
|
18413
18945
|
function happened(s, w) {
|
|
@@ -18427,26 +18959,26 @@ ${key}`);
|
|
|
18427
18959
|
const record = s.transcript.transcriptRecordId;
|
|
18428
18960
|
if (record !== void 0) {
|
|
18429
18961
|
col.dataset.record = record;
|
|
18430
|
-
const link =
|
|
18962
|
+
const link = el7("a", "chat-static", w.t("chat.read"));
|
|
18431
18963
|
link.setAttribute("href", `#${recordAddress(record)}`);
|
|
18432
18964
|
link.hidden = true;
|
|
18433
18965
|
col.append(link);
|
|
18434
18966
|
}
|
|
18435
|
-
col.append(
|
|
18967
|
+
col.append(el7("p", "sc-gap", w.t("spot.gap.produced")));
|
|
18436
18968
|
}
|
|
18437
18969
|
return col;
|
|
18438
18970
|
}
|
|
18439
18971
|
function criterion(r, w) {
|
|
18440
18972
|
const col = cell("criterion", w.t("spot.col.criterion"), r.ref);
|
|
18441
|
-
col.append(
|
|
18442
|
-
const term =
|
|
18973
|
+
col.append(el7("div", "sc-name", r.name));
|
|
18974
|
+
const term = el7("div", "sc-box");
|
|
18443
18975
|
term.dataset.wording = r.wording.source;
|
|
18444
18976
|
if (r.wording.source === "sealed") {
|
|
18445
|
-
term.append(
|
|
18446
|
-
term.append(
|
|
18977
|
+
term.append(tagSource(el7("div", "sc-k", w.t("spot.term")), "pack"));
|
|
18978
|
+
term.append(el7("blockquote", "sc-q", r.wording.text));
|
|
18447
18979
|
} else
|
|
18448
18980
|
term.append(
|
|
18449
|
-
|
|
18981
|
+
el7(
|
|
18450
18982
|
"p",
|
|
18451
18983
|
"sc-gap",
|
|
18452
18984
|
w.t(
|
|
@@ -18459,30 +18991,42 @@ ${key}`);
|
|
|
18459
18991
|
}
|
|
18460
18992
|
function verdictCell(r, w) {
|
|
18461
18993
|
const col = cell("verdict", w.t("spot.col.verdict"), r.ref);
|
|
18462
|
-
const head2 =
|
|
18994
|
+
const head2 = el7("div", `sc-box sc-v ${r.worded.tone}`);
|
|
18463
18995
|
head2.append(wordPill(r.worded, r.verdict));
|
|
18464
18996
|
if (r.rationale !== void 0) {
|
|
18465
|
-
head2.append(
|
|
18466
|
-
head2.append(
|
|
18467
|
-
} else head2.append(
|
|
18997
|
+
head2.append(tagSource(el7("div", "sc-k", w.t("spot.says")), "pack"));
|
|
18998
|
+
head2.append(el7("p", "sc-q", judgeNote(r.rationale, r.drawnVerdict, w)));
|
|
18999
|
+
} else head2.append(el7("p", "sc-gap", r.noNote));
|
|
18468
19000
|
col.append(head2);
|
|
18469
19001
|
const parsed = r.rationale === void 0 ? {} : parseJudgeProbabilities(r.rationale);
|
|
18470
19002
|
const facts = [];
|
|
18471
19003
|
if (r.judgePinDigest !== void 0)
|
|
18472
|
-
facts.push(
|
|
19004
|
+
facts.push(fieldText("judge_pin_digest", r.judgePinDigest));
|
|
18473
19005
|
if (parsed.confidence !== void 0)
|
|
18474
|
-
facts.push(
|
|
19006
|
+
facts.push(
|
|
19007
|
+
tagSource(
|
|
19008
|
+
el7(
|
|
19009
|
+
"span",
|
|
19010
|
+
"",
|
|
19011
|
+
w.t("spot.confidence", { c: parsed.confidence.toFixed(2) })
|
|
19012
|
+
),
|
|
19013
|
+
"pack"
|
|
19014
|
+
)
|
|
19015
|
+
);
|
|
18475
19016
|
if (facts.length > 0) {
|
|
18476
|
-
const line =
|
|
19017
|
+
const line = el7("p", "sc-facts");
|
|
19018
|
+
facts.forEach(
|
|
19019
|
+
(fact, i) => line.append(...i > 0 ? [" \xB7 ", fact] : [fact])
|
|
19020
|
+
);
|
|
18477
19021
|
line.dataset.judge = "";
|
|
18478
19022
|
col.append(line);
|
|
18479
19023
|
}
|
|
18480
19024
|
return col;
|
|
18481
19025
|
}
|
|
18482
19026
|
function spotCheckCard(s, w) {
|
|
18483
|
-
const
|
|
18484
|
-
|
|
18485
|
-
const grid =
|
|
19027
|
+
const card2 = el7("article", "sc-card");
|
|
19028
|
+
card2.dataset.spotCheck = "";
|
|
19029
|
+
const grid = el7("div", "sc-grid");
|
|
18486
19030
|
grid.append(happened(s, w));
|
|
18487
19031
|
s.rules.forEach((rule, index) => {
|
|
18488
19032
|
const row2 = index + 1;
|
|
@@ -18492,19 +19036,19 @@ ${key}`);
|
|
|
18492
19036
|
v.style.setProperty("--row", String(row2));
|
|
18493
19037
|
grid.append(c, v);
|
|
18494
19038
|
});
|
|
18495
|
-
|
|
18496
|
-
const gaps =
|
|
19039
|
+
card2.append(grid);
|
|
19040
|
+
const gaps = el7("div", "sc-gaps");
|
|
18497
19041
|
gaps.append(
|
|
18498
|
-
|
|
18499
|
-
|
|
19042
|
+
el7("p", "sc-gap", w.t("spot.gap.when")),
|
|
19043
|
+
el7("p", "sc-gap", w.t("spot.gap.adjudication"))
|
|
18500
19044
|
);
|
|
18501
|
-
|
|
18502
|
-
return
|
|
19045
|
+
card2.append(gaps);
|
|
19046
|
+
return card2;
|
|
18503
19047
|
}
|
|
18504
19048
|
function spotCheckToggle(s, w) {
|
|
18505
19049
|
if (s.rules.length === 0) return void 0;
|
|
18506
19050
|
const toggle = levelToggle(2, w.t("spot.toggle"), () => {
|
|
18507
|
-
const body =
|
|
19051
|
+
const body = el7("div", "sc-body");
|
|
18508
19052
|
body.append(spotCheckCard(s, w));
|
|
18509
19053
|
return body;
|
|
18510
19054
|
});
|
|
@@ -18512,13 +19056,82 @@ ${key}`);
|
|
|
18512
19056
|
return toggle;
|
|
18513
19057
|
}
|
|
18514
19058
|
|
|
19059
|
+
// src/evidence-contract.ts
|
|
19060
|
+
var ROW_TIERS = [
|
|
19061
|
+
"must_have",
|
|
19062
|
+
"informational",
|
|
19063
|
+
"unstated"
|
|
19064
|
+
];
|
|
19065
|
+
var REQUIREMENT_TIERS = ["must_have", "informational"];
|
|
19066
|
+
var ContractError = class extends Error {
|
|
19067
|
+
constructor(message) {
|
|
19068
|
+
super(message);
|
|
19069
|
+
this.name = "ContractError";
|
|
19070
|
+
}
|
|
19071
|
+
};
|
|
19072
|
+
var isObject3 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
19073
|
+
async function checkContractInput(contract) {
|
|
19074
|
+
if (!/^[0-9a-f]{64}$/u.test(contract.sha256))
|
|
19075
|
+
throw new ContractError("contract sha256 is not a lowercase hex SHA-256");
|
|
19076
|
+
const digest = await sha256Hex(new TextEncoder().encode(contract.text));
|
|
19077
|
+
if (digest !== contract.sha256)
|
|
19078
|
+
throw new ContractError(
|
|
19079
|
+
"contract bytes do not hash to its contract_sha256"
|
|
19080
|
+
);
|
|
19081
|
+
let parsed;
|
|
19082
|
+
try {
|
|
19083
|
+
parsed = JSON.parse(contract.text);
|
|
19084
|
+
} catch {
|
|
19085
|
+
throw new ContractError("contract is not JSON");
|
|
19086
|
+
}
|
|
19087
|
+
const bad2 = (why) => {
|
|
19088
|
+
throw new ContractError(
|
|
19089
|
+
`contract is not a compiled Evidence Contract: ${why}`
|
|
19090
|
+
);
|
|
19091
|
+
};
|
|
19092
|
+
if (!isObject3(parsed)) return bad2("not a JSON object");
|
|
19093
|
+
const { id, version, requirements } = parsed;
|
|
19094
|
+
if (typeof id !== "string" || id === "")
|
|
19095
|
+
return bad2("id is not a non-empty string");
|
|
19096
|
+
if (typeof version !== "string" || version === "")
|
|
19097
|
+
return bad2("version is not a non-empty string");
|
|
19098
|
+
if (!Array.isArray(requirements)) return bad2("requirements is not a list");
|
|
19099
|
+
const tiers = /* @__PURE__ */ new Map();
|
|
19100
|
+
requirements.forEach((requirement, i) => {
|
|
19101
|
+
if (!isObject3(requirement))
|
|
19102
|
+
return bad2(`requirement ${i + 1} is not an object`);
|
|
19103
|
+
const rid = requirement.id;
|
|
19104
|
+
if (typeof rid !== "string" || rid === "")
|
|
19105
|
+
return bad2(`requirement ${i + 1} id is not a non-empty string`);
|
|
19106
|
+
if (tiers.has(rid))
|
|
19107
|
+
return bad2(`requirement id ${JSON.stringify(rid)} is listed twice`);
|
|
19108
|
+
const tier = requirement.tier;
|
|
19109
|
+
if (tier !== void 0 && (typeof tier !== "string" || !REQUIREMENT_TIERS.includes(tier)))
|
|
19110
|
+
return bad2(
|
|
19111
|
+
`requirement ${JSON.stringify(rid)} tier is not must_have or informational`
|
|
19112
|
+
);
|
|
19113
|
+
tiers.set(rid, tier);
|
|
19114
|
+
});
|
|
19115
|
+
return {
|
|
19116
|
+
id,
|
|
19117
|
+
version,
|
|
19118
|
+
ref: `${id}@${version}`,
|
|
19119
|
+
sha256: contract.sha256,
|
|
19120
|
+
tiers
|
|
19121
|
+
};
|
|
19122
|
+
}
|
|
19123
|
+
function rowTier(contract, contractRef, requirementRef) {
|
|
19124
|
+
if (contract === void 0 || contractRef !== contract.ref) return "unstated";
|
|
19125
|
+
return contract.tiers.get(requirementRef) ?? "unstated";
|
|
19126
|
+
}
|
|
19127
|
+
|
|
18515
19128
|
// src/outcome-report-view.ts
|
|
18516
19129
|
function element3(tag, text2) {
|
|
18517
19130
|
const value = document.createElement(tag);
|
|
18518
19131
|
if (text2 !== void 0) value.textContent = text2;
|
|
18519
19132
|
return value;
|
|
18520
19133
|
}
|
|
18521
|
-
function
|
|
19134
|
+
function el8(tag, className, text2) {
|
|
18522
19135
|
const value = element3(tag, text2);
|
|
18523
19136
|
value.className = className;
|
|
18524
19137
|
return value;
|
|
@@ -18599,7 +19212,7 @@ ${key}`);
|
|
|
18599
19212
|
function editedBadge(model, ref, w) {
|
|
18600
19213
|
const edited = model.options.editedCriteria?.find((e) => e.criterion === ref);
|
|
18601
19214
|
if (edited === void 0) return void 0;
|
|
18602
|
-
const badge =
|
|
19215
|
+
const badge = el8("span", "edited", edited.badge);
|
|
18603
19216
|
badge.dataset.edited = ref;
|
|
18604
19217
|
badge.title = w.t("lines.edited.title");
|
|
18605
19218
|
return badge;
|
|
@@ -18607,14 +19220,14 @@ ${key}`);
|
|
|
18607
19220
|
function renderProducerNote(host, model, w) {
|
|
18608
19221
|
const note = model.options.producerNote;
|
|
18609
19222
|
if (note === void 0) return;
|
|
18610
|
-
const box =
|
|
19223
|
+
const box = el8("aside", "pnote");
|
|
18611
19224
|
box.dataset.producerNote = "true";
|
|
18612
|
-
box.append(
|
|
18613
|
-
box.append(
|
|
18614
|
-
const list2 = tagSource(
|
|
19225
|
+
box.append(el8("div", "pn-k", w.t("lines.producer-note.kicker")));
|
|
19226
|
+
box.append(el8("h2", "pn-t", note.title));
|
|
19227
|
+
const list2 = tagSource(el8("ul", "pn-l"), "producer");
|
|
18615
19228
|
for (const line of note.lines) list2.append(element3("li", line));
|
|
18616
19229
|
box.append(list2);
|
|
18617
|
-
box.append(
|
|
19230
|
+
box.append(el8("p", "pn-src", w.t("lines.producer-note.source")));
|
|
18618
19231
|
host.append(box);
|
|
18619
19232
|
}
|
|
18620
19233
|
var fmtP = (p) => p.toFixed(2);
|
|
@@ -18634,7 +19247,46 @@ ${key}`);
|
|
|
18634
19247
|
function notApplying(verdict2) {
|
|
18635
19248
|
return verdict2 === "not_applicable" || verdict2 === "out_of_scope";
|
|
18636
19249
|
}
|
|
18637
|
-
function
|
|
19250
|
+
function counted(conversation, gating2) {
|
|
19251
|
+
return gating2?.counted.get(conversation) ?? conversation;
|
|
19252
|
+
}
|
|
19253
|
+
function tierChip(tier, w) {
|
|
19254
|
+
const chip = el8("span", "rtier", w.t(`requirement_tier.${tier}`));
|
|
19255
|
+
chip.dataset.requirementTier = tier;
|
|
19256
|
+
return chip;
|
|
19257
|
+
}
|
|
19258
|
+
function criterionTier(c, gating2) {
|
|
19259
|
+
return gating2?.tierOf(c.claim?.contractRef, `${c.checkId}.${c.criterionId}`);
|
|
19260
|
+
}
|
|
19261
|
+
function rollUp2(verdicts) {
|
|
19262
|
+
if (verdicts.length === 0) return "not_evaluable";
|
|
19263
|
+
if (verdicts.some((v) => v === "not_met" || isUnverified(v)))
|
|
19264
|
+
return "not_met";
|
|
19265
|
+
if (verdicts.some((v) => v === "not_evaluable" || v === "no_claim"))
|
|
19266
|
+
return "not_evaluable";
|
|
19267
|
+
if (!verdicts.some((v) => v === "met")) return "not_evaluable";
|
|
19268
|
+
return "met";
|
|
19269
|
+
}
|
|
19270
|
+
function gating(conversations, tierOf) {
|
|
19271
|
+
const map = /* @__PURE__ */ new Map();
|
|
19272
|
+
const out = { tierOf, counted: map };
|
|
19273
|
+
for (const conversation of conversations) {
|
|
19274
|
+
const kept = conversation.criteria.filter(
|
|
19275
|
+
(c) => criterionTier(c, out) !== "informational"
|
|
19276
|
+
);
|
|
19277
|
+
if (kept.length === conversation.criteria.length) continue;
|
|
19278
|
+
map.set(conversation, {
|
|
19279
|
+
...conversation,
|
|
19280
|
+
criteria: kept,
|
|
19281
|
+
verdict: rollUp2(kept.map((c) => c.verdict))
|
|
19282
|
+
});
|
|
19283
|
+
}
|
|
19284
|
+
return out;
|
|
19285
|
+
}
|
|
19286
|
+
function conversationStatus(given, gating2) {
|
|
19287
|
+
const conversation = counted(given, gating2);
|
|
19288
|
+
if (conversation !== given && conversation.criteria.length === 0)
|
|
19289
|
+
return "nothing-applied";
|
|
18638
19290
|
if (conversation.verdict === "met") return "resolved";
|
|
18639
19291
|
if (conversation.criteria.some((c) => isMiss(c.verdict))) return "missed";
|
|
18640
19292
|
if (conversation.criteria.some((c) => isUnverified(c.verdict)))
|
|
@@ -18642,7 +19294,7 @@ ${key}`);
|
|
|
18642
19294
|
if (conversation.verdict === "not_met") return "missed";
|
|
18643
19295
|
return conversation.criteria.length > 0 && conversation.criteria.every((c) => notApplying(c.verdict)) ? "nothing-applied" : "undecided";
|
|
18644
19296
|
}
|
|
18645
|
-
function statusWord(status2, conversation, w) {
|
|
19297
|
+
function statusWord(status2, conversation, w, gating2) {
|
|
18646
19298
|
if (status2 === "resolved")
|
|
18647
19299
|
return { word: w.t("lines.status.resolved"), tone: "ok" };
|
|
18648
19300
|
if (status2 === "missed")
|
|
@@ -18651,7 +19303,9 @@ ${key}`);
|
|
|
18651
19303
|
return { word: w.t("lines.status.unverified"), tone: "ne" };
|
|
18652
19304
|
if (status2 === "nothing-applied")
|
|
18653
19305
|
return { word: w.t("lines.status.nothing-applied"), tone: "na" };
|
|
18654
|
-
const judged = conversation.criteria.filter(
|
|
19306
|
+
const judged = counted(conversation, gating2).criteria.filter(
|
|
19307
|
+
(c) => c.verdict === "not_evaluable" || c.verdict === "no_claim"
|
|
19308
|
+
).map(
|
|
18655
19309
|
(c) => c.verdict === "no_claim" ? "no" : judgedOf(c.reportState, c.judgePinDigest)
|
|
18656
19310
|
);
|
|
18657
19311
|
if (judged.includes("yes"))
|
|
@@ -18702,7 +19356,7 @@ ${key}`);
|
|
|
18702
19356
|
return lower ? text2 : text2.charAt(0).toUpperCase() + text2.slice(1);
|
|
18703
19357
|
}
|
|
18704
19358
|
function resultSentence(conversation, model, w) {
|
|
18705
|
-
const all = conversation.criteria;
|
|
19359
|
+
const all = counted(conversation, model.gating).criteria;
|
|
18706
19360
|
const applied = all.filter((c) => !notApplying(c.verdict));
|
|
18707
19361
|
const outOfScope = all.filter((c) => c.verdict === "out_of_scope").length;
|
|
18708
19362
|
const na = all.length - applied.length - outOfScope;
|
|
@@ -18715,7 +19369,7 @@ ${key}`);
|
|
|
18715
19369
|
}) : "";
|
|
18716
19370
|
const naText = `${na > 0 ? ` ${w.t("lines.sentence.na", { n: String(na) })}` : ""}${outOfScope > 0 ? ` ${w.t("lines.sentence.out-of-scope", { n: String(outOfScope) })}` : ""}`;
|
|
18717
19371
|
const unverifiedText = unverified.length > 0 ? ` ${unverifiedClause(model, unverified, w)}` : "";
|
|
18718
|
-
switch (conversationStatus(conversation)) {
|
|
19372
|
+
switch (conversationStatus(conversation, model.gating)) {
|
|
18719
19373
|
case "resolved":
|
|
18720
19374
|
return `${w.p("lines.sentence.resolved", applied.length, { n: String(applied.length) })}${naText}`;
|
|
18721
19375
|
case "missed":
|
|
@@ -18745,67 +19399,66 @@ ${key}`);
|
|
|
18745
19399
|
}
|
|
18746
19400
|
}
|
|
18747
19401
|
function renderConversation(conversation, model, runInfo, w) {
|
|
18748
|
-
const status2 = conversationStatus(conversation);
|
|
18749
|
-
const item =
|
|
19402
|
+
const status2 = conversationStatus(conversation, model.gating);
|
|
19403
|
+
const item = el8("article", "conv");
|
|
18750
19404
|
item.dataset.conversation = conversation.conversationId;
|
|
18751
|
-
|
|
19405
|
+
const inAnswer = counted(conversation, model.gating);
|
|
19406
|
+
item.dataset.conversationVerdict = inAnswer.verdict;
|
|
18752
19407
|
item.dataset.status = status2;
|
|
18753
|
-
const head2 =
|
|
19408
|
+
const head2 = el8("div", "conv-h");
|
|
18754
19409
|
const parts = caseParts(conversation.conversationId, w);
|
|
18755
|
-
head2.append(
|
|
18756
|
-
head2.append(
|
|
18757
|
-
|
|
18758
|
-
const unverified = conversation.criteria.filter(
|
|
18759
|
-
(c) => isUnverified(c.verdict)
|
|
19410
|
+
head2.append(el8("span", "cid", parts.label));
|
|
19411
|
+
head2.append(
|
|
19412
|
+
wordPill(statusWord(status2, conversation, w, model.gating), status2)
|
|
18760
19413
|
);
|
|
18761
|
-
const
|
|
19414
|
+
const misses = inAnswer.criteria.filter((c) => isMiss(c.verdict));
|
|
19415
|
+
const unverified = inAnswer.criteria.filter((c) => isUnverified(c.verdict));
|
|
19416
|
+
const undecided = inAnswer.criteria.filter(
|
|
18762
19417
|
(c) => c.verdict === "not_evaluable" || c.verdict === "no_claim"
|
|
18763
19418
|
);
|
|
18764
|
-
const outOfScope =
|
|
19419
|
+
const outOfScope = inAnswer.criteria.filter(
|
|
18765
19420
|
(c) => c.verdict === "out_of_scope"
|
|
18766
19421
|
);
|
|
18767
19422
|
head2.append(
|
|
18768
|
-
|
|
19423
|
+
el8(
|
|
18769
19424
|
"span",
|
|
18770
19425
|
"cwhy",
|
|
18771
19426
|
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", {
|
|
18772
19427
|
names: names(model, undecided, w)
|
|
18773
19428
|
}) : status2 === "nothing-applied" ? w.t("lines.why.nothing-applied") : outOfScope.length === 0 ? w.t("lines.why.resolved") : w.p(
|
|
18774
19429
|
"lines.why.resolved-out-of-scope",
|
|
18775
|
-
|
|
19430
|
+
inAnswer.criteria.length - outOfScope.length,
|
|
18776
19431
|
{
|
|
18777
|
-
n: fmtCount(
|
|
18778
|
-
conversation.criteria.length - outOfScope.length
|
|
18779
|
-
),
|
|
19432
|
+
n: fmtCount(inAnswer.criteria.length - outOfScope.length),
|
|
18780
19433
|
oos: fmtCount(outOfScope.length)
|
|
18781
19434
|
}
|
|
18782
19435
|
)
|
|
18783
19436
|
)
|
|
18784
19437
|
);
|
|
18785
|
-
head2.append(
|
|
19438
|
+
head2.append(el8("span", "cmodel", parts.model ?? ""));
|
|
18786
19439
|
item.append(head2);
|
|
18787
|
-
const body =
|
|
19440
|
+
const body = el8("div", "conv-slot");
|
|
18788
19441
|
item.append(body);
|
|
18789
19442
|
lazyBody(body, () => conversationBody(conversation, model, runInfo, w));
|
|
18790
19443
|
return item;
|
|
18791
19444
|
}
|
|
18792
19445
|
function conversationBody(conversation, model, runInfo, w) {
|
|
18793
|
-
const body =
|
|
18794
|
-
const sentence =
|
|
19446
|
+
const body = el8("div", "conv-b");
|
|
19447
|
+
const sentence = el8(
|
|
18795
19448
|
"p",
|
|
18796
19449
|
"verdict-line",
|
|
18797
19450
|
resultSentence(conversation, model, w)
|
|
18798
19451
|
);
|
|
18799
|
-
sentence.dataset.why = conversationStatus(conversation);
|
|
19452
|
+
sentence.dataset.why = conversationStatus(conversation, model.gating);
|
|
18800
19453
|
body.append(sentence);
|
|
18801
|
-
body.append(
|
|
19454
|
+
body.append(el8("h4", "", w.t("lines.h.rule-by-rule")));
|
|
18802
19455
|
const hasNotes = conversation.criteria.some((c) => c.rationale !== void 0);
|
|
18803
19456
|
const wordings = conversation.criteria.map(
|
|
18804
19457
|
(c) => criterionLabel(model, c.checkId, c.criterionId, w).source
|
|
18805
19458
|
);
|
|
18806
19459
|
const anyWording = wordings.some((source) => source === "sealed");
|
|
18807
|
-
const
|
|
18808
|
-
|
|
19460
|
+
const table3 = el8("table", "crit");
|
|
19461
|
+
table3.dataset.criteriaTable = conversation.conversationId;
|
|
18809
19462
|
const head2 = element3("thead");
|
|
18810
19463
|
const headRow = element3("tr");
|
|
18811
19464
|
headRow.append(
|
|
@@ -18814,7 +19467,7 @@ ${key}`);
|
|
|
18814
19467
|
);
|
|
18815
19468
|
if (hasNotes) headRow.append(element3("th", w.t("lines.col.note")));
|
|
18816
19469
|
head2.append(headRow);
|
|
18817
|
-
|
|
19470
|
+
table3.append(head2);
|
|
18818
19471
|
const tbody = element3("tbody");
|
|
18819
19472
|
for (const criterion2 of conversation.criteria) {
|
|
18820
19473
|
const ref = `${criterion2.checkId}.${criterion2.criterionId}`;
|
|
@@ -18827,16 +19480,21 @@ ${key}`);
|
|
|
18827
19480
|
criterion2.criterionId,
|
|
18828
19481
|
w
|
|
18829
19482
|
);
|
|
18830
|
-
const nameCell =
|
|
18831
|
-
nameCell.append(
|
|
19483
|
+
const nameCell = el8("td", "cn");
|
|
19484
|
+
nameCell.append(el8("b", "", label.label));
|
|
18832
19485
|
const rowBadge = editedBadge(model, ref, w);
|
|
18833
19486
|
if (rowBadge !== void 0) nameCell.append(rowBadge);
|
|
19487
|
+
const tier = criterionTier(criterion2, model.gating);
|
|
19488
|
+
if (tier !== void 0) {
|
|
19489
|
+
tr.dataset.requirementTier = tier;
|
|
19490
|
+
nameCell.append(tierChip(tier, w));
|
|
19491
|
+
}
|
|
18834
19492
|
if (label.source === "sealed") {
|
|
18835
|
-
const wording = tagSource(
|
|
19493
|
+
const wording = tagSource(el8("small", "", label.text), "producer");
|
|
18836
19494
|
wording.dataset.wording = label.source;
|
|
18837
19495
|
nameCell.append(wording);
|
|
18838
19496
|
} else if (anyWording) {
|
|
18839
|
-
const wording =
|
|
19497
|
+
const wording = el8("small", "wsrc", wordingFallback(label.source, w));
|
|
18840
19498
|
wording.dataset.wording = label.source;
|
|
18841
19499
|
nameCell.append(wording);
|
|
18842
19500
|
}
|
|
@@ -18850,12 +19508,12 @@ ${key}`);
|
|
|
18850
19508
|
tbody.append(tr);
|
|
18851
19509
|
continue;
|
|
18852
19510
|
}
|
|
18853
|
-
const noteCell =
|
|
19511
|
+
const noteCell = el8("td", "rat");
|
|
18854
19512
|
if (criterion2.verdict === "not_applicable")
|
|
18855
|
-
noteCell.append(
|
|
19513
|
+
noteCell.append(el8("span", "muted", w.t("lines.note.not-applicable")));
|
|
18856
19514
|
else if (criterion2.rationale !== void 0)
|
|
18857
19515
|
noteCell.append(
|
|
18858
|
-
|
|
19516
|
+
el8(
|
|
18859
19517
|
"span",
|
|
18860
19518
|
"sealed",
|
|
18861
19519
|
judgeNote(
|
|
@@ -18865,13 +19523,13 @@ ${key}`);
|
|
|
18865
19523
|
)
|
|
18866
19524
|
)
|
|
18867
19525
|
);
|
|
18868
|
-
else noteCell.append(
|
|
19526
|
+
else noteCell.append(el8("span", "muted", noNoteText(criterion2, w)));
|
|
18869
19527
|
tr.append(noteCell);
|
|
18870
19528
|
tbody.append(tr);
|
|
18871
19529
|
}
|
|
18872
|
-
|
|
18873
|
-
const scroll =
|
|
18874
|
-
scroll.append(
|
|
19530
|
+
table3.append(tbody);
|
|
19531
|
+
const scroll = el8("div", "tscroll");
|
|
19532
|
+
scroll.append(table3);
|
|
18875
19533
|
body.append(scroll);
|
|
18876
19534
|
const gaps = [];
|
|
18877
19535
|
if (!anyWording)
|
|
@@ -18890,7 +19548,7 @@ ${key}`);
|
|
|
18890
19548
|
)
|
|
18891
19549
|
);
|
|
18892
19550
|
if (gaps.length > 0) {
|
|
18893
|
-
const gap =
|
|
19551
|
+
const gap = el8("p", "small", gaps.join(" "));
|
|
18894
19552
|
gap.dataset.gaps = "true";
|
|
18895
19553
|
body.append(gap);
|
|
18896
19554
|
}
|
|
@@ -18977,7 +19635,7 @@ ${key}`);
|
|
|
18977
19635
|
);
|
|
18978
19636
|
}
|
|
18979
19637
|
function conversationProofs(conversation, model, runInfo, w) {
|
|
18980
|
-
const box =
|
|
19638
|
+
const box = el8("div", "pf-b");
|
|
18981
19639
|
box.dataset.proofsFor = conversation.conversationId;
|
|
18982
19640
|
const rows = [];
|
|
18983
19641
|
rows.push([w.t("lines.pf.case"), conversation.conversationId]);
|
|
@@ -19012,20 +19670,20 @@ ${key}`);
|
|
|
19012
19670
|
const dl = proofList(rows);
|
|
19013
19671
|
dl.dataset.checkIt = conversation.conversationId;
|
|
19014
19672
|
box.append(dl);
|
|
19015
|
-
box.append(
|
|
19016
|
-
const
|
|
19673
|
+
box.append(el8("h5", "", w.t("lines.pf.h.each-report")));
|
|
19674
|
+
const table3 = el8("table", "crit pft");
|
|
19017
19675
|
const head2 = element3("thead");
|
|
19018
19676
|
const headRow = element3("tr");
|
|
19019
19677
|
headRow.append(
|
|
19020
19678
|
element3("th", w.t("lines.pf.col.rule")),
|
|
19021
19679
|
element3("th", w.t("lines.pf.col.verdict")),
|
|
19022
|
-
|
|
19680
|
+
el8("th", "n", w.t("lines.pf.col.p")),
|
|
19023
19681
|
element3("th", w.t("lines.pf.col.report")),
|
|
19024
19682
|
element3("th", w.t("lines.pf.col.rationale")),
|
|
19025
19683
|
element3("th", w.t("card.pf.assurance"))
|
|
19026
19684
|
);
|
|
19027
19685
|
head2.append(headRow);
|
|
19028
|
-
|
|
19686
|
+
table3.append(head2);
|
|
19029
19687
|
const tbody = element3("tbody");
|
|
19030
19688
|
for (const criterion2 of conversation.criteria) {
|
|
19031
19689
|
const tr = element3("tr");
|
|
@@ -19039,24 +19697,24 @@ ${key}`);
|
|
|
19039
19697
|
element3("td", verdictText(criterion2.verdict, w))
|
|
19040
19698
|
);
|
|
19041
19699
|
const p = verdictProbability(criterion2);
|
|
19042
|
-
const pCell =
|
|
19700
|
+
const pCell = el8("td", "n", p === void 0 ? "\u2013" : fmtP(p));
|
|
19043
19701
|
if (p !== void 0) pCell.dataset.p = fmtP(p);
|
|
19044
19702
|
tr.append(pCell);
|
|
19045
19703
|
tr.append(
|
|
19046
|
-
|
|
19704
|
+
el8(
|
|
19047
19705
|
"td",
|
|
19048
19706
|
"mono",
|
|
19049
19707
|
criterion2.claim === void 0 ? w.t("lines.pf.no-claim") : `${criterion2.reportCapsuleId ?? w.t("lines.pf.not-cited")}${criterion2.reportRecordId === void 0 ? "" : ` (${criterion2.reportRecordId})`}`
|
|
19050
19708
|
)
|
|
19051
19709
|
);
|
|
19052
|
-
const rationale =
|
|
19710
|
+
const rationale = el8("td", "rat");
|
|
19053
19711
|
if (criterion2.rationale !== void 0) {
|
|
19054
|
-
const sealed =
|
|
19712
|
+
const sealed = el8("code", "sealed", criterion2.rationale);
|
|
19055
19713
|
sealed.dataset.rationale = "sealed";
|
|
19056
19714
|
rationale.append(sealed);
|
|
19057
|
-
} else rationale.append(
|
|
19715
|
+
} else rationale.append(el8("span", "muted", "\u2013"));
|
|
19058
19716
|
tr.append(rationale);
|
|
19059
|
-
if (criterion2.claim === void 0) tr.append(
|
|
19717
|
+
if (criterion2.claim === void 0) tr.append(el8("td", "muted", "\u2013"));
|
|
19060
19718
|
else {
|
|
19061
19719
|
const [, text2, data] = assuranceRow(criterion2.claim, w);
|
|
19062
19720
|
const cell2 = element3("td", text2);
|
|
@@ -19066,22 +19724,22 @@ ${key}`);
|
|
|
19066
19724
|
}
|
|
19067
19725
|
tbody.append(tr);
|
|
19068
19726
|
}
|
|
19069
|
-
|
|
19070
|
-
const scroll =
|
|
19071
|
-
scroll.append(
|
|
19727
|
+
table3.append(tbody);
|
|
19728
|
+
const scroll = el8("div", "tscroll");
|
|
19729
|
+
scroll.append(table3);
|
|
19072
19730
|
box.append(scroll);
|
|
19073
19731
|
const rationales = conversation.criteria.map((c) => c.rationale).filter((r) => r !== void 0);
|
|
19074
19732
|
if (rationales.length > 0 && rationales.every((r) => /^jev choice:/u.test(r))) {
|
|
19075
|
-
const derived =
|
|
19733
|
+
const derived = el8("p", "", w.t("lines.pf.derived"));
|
|
19076
19734
|
derived.dataset.rationaleLabel = "derived";
|
|
19077
19735
|
box.append(derived);
|
|
19078
19736
|
} else if (rationales.length > 0) {
|
|
19079
|
-
const shown2 =
|
|
19737
|
+
const shown2 = el8("p", "", w.t("lines.pf.sealed-rationale"));
|
|
19080
19738
|
shown2.dataset.rationaleLabel = "sealed";
|
|
19081
19739
|
box.append(shown2);
|
|
19082
19740
|
}
|
|
19083
19741
|
box.append(
|
|
19084
|
-
|
|
19742
|
+
el8(
|
|
19085
19743
|
"p",
|
|
19086
19744
|
"",
|
|
19087
19745
|
w.t("lines.pf.recompute", {
|
|
@@ -19115,11 +19773,11 @@ ${key}`);
|
|
|
19115
19773
|
return pinAbsence(runInfo, w) ?? w.t("lines.pin.not-stated");
|
|
19116
19774
|
}
|
|
19117
19775
|
function renderConversationList(conversations, model, runInfo, key, w) {
|
|
19118
|
-
const list2 =
|
|
19776
|
+
const list2 = el8("div", "convs");
|
|
19119
19777
|
list2.dataset.conversationsFor = key;
|
|
19120
19778
|
list2.dataset.conversationCount = String(conversations.length);
|
|
19121
19779
|
if (conversations.length === 0)
|
|
19122
|
-
list2.append(
|
|
19780
|
+
list2.append(el8("p", "small", w.t("lines.list.empty")));
|
|
19123
19781
|
for (const conversation of conversations)
|
|
19124
19782
|
list2.append(renderConversation(conversation, model, runInfo, w));
|
|
19125
19783
|
return list2;
|
|
@@ -19144,13 +19802,15 @@ ${key}`);
|
|
|
19144
19802
|
function groupTitle(check, w) {
|
|
19145
19803
|
return w.group(check.id) ?? check.question;
|
|
19146
19804
|
}
|
|
19147
|
-
function groupMissedReasons(missed, terms, w) {
|
|
19805
|
+
function groupMissedReasons(missed, terms, w, gating2) {
|
|
19148
19806
|
const labelledReasonCode = (code2) => code2 === void 0 ? void 0 : terms.reasonCodes[code2];
|
|
19149
19807
|
const groups = /* @__PURE__ */ new Map();
|
|
19150
19808
|
const structured = /* @__PURE__ */ new Map();
|
|
19151
19809
|
const labels = /* @__PURE__ */ new Map();
|
|
19152
19810
|
for (const conversation of missed) {
|
|
19153
|
-
const first = conversation.criteria.find(
|
|
19811
|
+
const first = counted(conversation, gating2).criteria.find(
|
|
19812
|
+
(c) => isMiss(c.verdict)
|
|
19813
|
+
);
|
|
19154
19814
|
if (first === void 0) continue;
|
|
19155
19815
|
const label = labelledReasonCode(first.reasonCode);
|
|
19156
19816
|
const key = label !== void 0 ? first.reasonCode : `${first.checkId}.${first.criterionId}`;
|
|
@@ -19171,12 +19831,12 @@ ${key}`);
|
|
|
19171
19831
|
})).sort((a, b) => b.conversations.length - a.conversations.length);
|
|
19172
19832
|
}
|
|
19173
19833
|
function whyMissed(missed, model, runInfo, w) {
|
|
19174
|
-
const box =
|
|
19834
|
+
const box = el8("div", "why-missed");
|
|
19175
19835
|
box.dataset.section = "why-missed";
|
|
19176
|
-
const groups = groupMissedReasons(missed, model.terms, w);
|
|
19836
|
+
const groups = groupMissedReasons(missed, model.terms, w, model.gating);
|
|
19177
19837
|
box.dataset.reasons = String(groups.length);
|
|
19178
|
-
box.append(
|
|
19179
|
-
const
|
|
19838
|
+
box.append(el8("h5", "", w.t("lines.why-missed.h")));
|
|
19839
|
+
const table3 = element3("table");
|
|
19180
19840
|
const tbody = element3("tbody");
|
|
19181
19841
|
for (const group of groups) {
|
|
19182
19842
|
const tr = element3("tr");
|
|
@@ -19185,15 +19845,15 @@ ${key}`);
|
|
|
19185
19845
|
tr.dataset.count = String(group.conversations.length);
|
|
19186
19846
|
tr.append(
|
|
19187
19847
|
element3("td", group.label),
|
|
19188
|
-
|
|
19848
|
+
el8("td", "n", fmtCount(group.conversations.length))
|
|
19189
19849
|
);
|
|
19190
19850
|
tbody.append(tr);
|
|
19191
19851
|
}
|
|
19192
|
-
|
|
19193
|
-
box.append(
|
|
19852
|
+
table3.append(tbody);
|
|
19853
|
+
box.append(table3);
|
|
19194
19854
|
const anyStructured = groups.some((g) => g.structured);
|
|
19195
19855
|
box.append(
|
|
19196
|
-
|
|
19856
|
+
el8(
|
|
19197
19857
|
"p",
|
|
19198
19858
|
"small",
|
|
19199
19859
|
w.t(
|
|
@@ -19202,7 +19862,7 @@ ${key}`);
|
|
|
19202
19862
|
)
|
|
19203
19863
|
);
|
|
19204
19864
|
for (const group of groups) {
|
|
19205
|
-
const head2 =
|
|
19865
|
+
const head2 = el8(
|
|
19206
19866
|
"div",
|
|
19207
19867
|
"rsn-h",
|
|
19208
19868
|
w.t("lines.why-missed.reason", {
|
|
@@ -19267,20 +19927,20 @@ ${key}`);
|
|
|
19267
19927
|
return parts.join(" ");
|
|
19268
19928
|
}
|
|
19269
19929
|
function renderMeta(host, model, w, notes) {
|
|
19270
|
-
const section =
|
|
19930
|
+
const section = el8("section", "");
|
|
19271
19931
|
section.dataset.section = "meta";
|
|
19272
|
-
const row1 =
|
|
19273
|
-
const bill =
|
|
19274
|
-
bill.append(
|
|
19275
|
-
bill.append(
|
|
19932
|
+
const row1 = el8("div", "ih-row");
|
|
19933
|
+
const bill = el8("div", "party");
|
|
19934
|
+
bill.append(el8("div", "k", w.t("lines.meta.pack")));
|
|
19935
|
+
bill.append(el8("div", "v", packLine(model, w)));
|
|
19276
19936
|
row1.append(bill);
|
|
19277
|
-
const title =
|
|
19278
|
-
title.append(
|
|
19937
|
+
const title = el8("div", "ih-title");
|
|
19938
|
+
title.append(el8("h1", "inv-title", w.t("lines.title")));
|
|
19279
19939
|
const summary = reportSummary(w);
|
|
19280
19940
|
if (summary !== void 0) title.append(summary);
|
|
19281
19941
|
if (model.terms.pack.locked !== NOT_STATED)
|
|
19282
19942
|
title.append(
|
|
19283
|
-
|
|
19943
|
+
el8(
|
|
19284
19944
|
"div",
|
|
19285
19945
|
"inv-sub",
|
|
19286
19946
|
w.t("lines.meta.locked", { locked: model.terms.pack.locked })
|
|
@@ -19288,8 +19948,8 @@ ${key}`);
|
|
|
19288
19948
|
);
|
|
19289
19949
|
row1.append(title);
|
|
19290
19950
|
section.append(row1);
|
|
19291
|
-
const row2 =
|
|
19292
|
-
const details =
|
|
19951
|
+
const row2 = el8("div", "ih-row");
|
|
19952
|
+
const details = el8("div", "meta");
|
|
19293
19953
|
const first = model.days[0]?.date;
|
|
19294
19954
|
const last = model.days[model.days.length - 1]?.date;
|
|
19295
19955
|
const metaRow = (label, value) => {
|
|
@@ -19307,11 +19967,11 @@ ${key}`);
|
|
|
19307
19967
|
details.lastElementChild.setAttribute("data-sealed", "");
|
|
19308
19968
|
}
|
|
19309
19969
|
metaRow(w.t("lines.meta.conversations"), fmtCount(model.totalCount));
|
|
19310
|
-
const checked =
|
|
19970
|
+
const checked = el8("div", "party");
|
|
19311
19971
|
const rules = model.terms.checks.reduce((n, c) => n + c.criteria.length, 0);
|
|
19312
|
-
checked.append(
|
|
19972
|
+
checked.append(el8("div", "k", w.t("lines.meta.what-checked")));
|
|
19313
19973
|
const groups = model.terms.checks.length;
|
|
19314
|
-
const what =
|
|
19974
|
+
const what = el8(
|
|
19315
19975
|
"div",
|
|
19316
19976
|
"d",
|
|
19317
19977
|
w.t("lines.meta.what-checked.text", {
|
|
@@ -19325,31 +19985,33 @@ ${key}`);
|
|
|
19325
19985
|
row2.append(checked, details);
|
|
19326
19986
|
section.append(row2);
|
|
19327
19987
|
if (note !== void 0) {
|
|
19328
|
-
const label =
|
|
19988
|
+
const label = el8("p", "date-note", note);
|
|
19329
19989
|
label.dataset.dateNote = model.dating.basis;
|
|
19330
19990
|
notes.append(label);
|
|
19331
19991
|
}
|
|
19332
19992
|
host.append(section);
|
|
19333
19993
|
}
|
|
19334
19994
|
function renderLines(host, model, runInfo, w, notes) {
|
|
19335
|
-
const section =
|
|
19995
|
+
const section = el8("section", "");
|
|
19336
19996
|
section.dataset.section = "lines";
|
|
19337
|
-
const
|
|
19338
|
-
|
|
19339
|
-
|
|
19340
|
-
const headline =
|
|
19997
|
+
const table3 = document.createElement("table");
|
|
19998
|
+
table3.className = "lines";
|
|
19999
|
+
table3.dataset.rows = "report-lines";
|
|
20000
|
+
const headline = el8("p", "headline");
|
|
19341
20001
|
headline.dataset.headline = "lines";
|
|
19342
20002
|
section.append(headline);
|
|
19343
20003
|
const thead = document.createElement("thead");
|
|
19344
20004
|
const headRow = document.createElement("tr");
|
|
19345
20005
|
headRow.append(
|
|
19346
20006
|
element3("th", w.t("lines.col.result")),
|
|
19347
|
-
|
|
20007
|
+
el8("th", "n", w.t("lines.lines.col.conversations"))
|
|
19348
20008
|
);
|
|
19349
20009
|
thead.append(headRow);
|
|
19350
|
-
|
|
20010
|
+
table3.append(thead);
|
|
19351
20011
|
const tbody = document.createElement("tbody");
|
|
19352
|
-
const byStatus = (status2) => model.conversations.filter(
|
|
20012
|
+
const byStatus = (status2) => model.conversations.filter(
|
|
20013
|
+
(c) => conversationStatus(c, model.gating) === status2
|
|
20014
|
+
);
|
|
19353
20015
|
const resolved = byStatus("resolved");
|
|
19354
20016
|
const missed = byStatus("missed");
|
|
19355
20017
|
const unverified = byStatus("unverified");
|
|
@@ -19415,9 +20077,9 @@ ${key}`);
|
|
|
19415
20077
|
const tr = document.createElement("tr");
|
|
19416
20078
|
tr.dataset.line = line2.key;
|
|
19417
20079
|
tr.dataset.count = String(line2.count);
|
|
19418
|
-
const desc =
|
|
19419
|
-
desc.append(
|
|
19420
|
-
desc.append(
|
|
20080
|
+
const desc = el8("td", "desc");
|
|
20081
|
+
desc.append(el8("b", "", line2.label));
|
|
20082
|
+
desc.append(el8("small", "", line2.help));
|
|
19421
20083
|
if (line2.behind !== void 0 && line2.behind.length > 0) {
|
|
19422
20084
|
const label = w.p("lines.drill.show", line2.behind.length, {
|
|
19423
20085
|
n: fmtCount(line2.behind.length)
|
|
@@ -19427,12 +20089,12 @@ ${key}`);
|
|
|
19427
20089
|
line2.key === "missed" ? drill(label, () => whyMissed(behind, model, runInfo, w), line2.key) : conversationsDrill(label, behind, model, runInfo, line2.key, w)
|
|
19428
20090
|
);
|
|
19429
20091
|
}
|
|
19430
|
-
tr.append(desc,
|
|
20092
|
+
tr.append(desc, el8("td", "n", line2.shown));
|
|
19431
20093
|
tbody.append(tr);
|
|
19432
20094
|
}
|
|
19433
|
-
|
|
19434
|
-
section.append(
|
|
19435
|
-
const na =
|
|
20095
|
+
table3.append(tbody);
|
|
20096
|
+
section.append(table3);
|
|
20097
|
+
const na = el8(
|
|
19436
20098
|
"p",
|
|
19437
20099
|
"na-note",
|
|
19438
20100
|
w.p("lines.na-note", model.notApplicableCount, {
|
|
@@ -19443,7 +20105,7 @@ ${key}`);
|
|
|
19443
20105
|
na.dataset.count = String(model.notApplicableCount);
|
|
19444
20106
|
notes.append(na);
|
|
19445
20107
|
if (model.outOfScopeCount > 0) {
|
|
19446
|
-
const oos =
|
|
20108
|
+
const oos = el8(
|
|
19447
20109
|
"p",
|
|
19448
20110
|
"na-note",
|
|
19449
20111
|
w.p("lines.oos-note", model.outOfScopeCount, {
|
|
@@ -19457,12 +20119,13 @@ ${key}`);
|
|
|
19457
20119
|
host.append(section);
|
|
19458
20120
|
}
|
|
19459
20121
|
function renderRules(host, model, runInfo, result, w) {
|
|
19460
|
-
const
|
|
20122
|
+
const tierOf = model.gating?.tierOf;
|
|
20123
|
+
const section = el8("section", "sec");
|
|
19461
20124
|
section.dataset.section = "rules";
|
|
19462
|
-
section.append(
|
|
19463
|
-
section.append(
|
|
19464
|
-
const
|
|
19465
|
-
|
|
20125
|
+
section.append(el8("h2", "", w.t("lines.rules.h")));
|
|
20126
|
+
section.append(el8("p", "lede", w.t("lines.rules.lede")));
|
|
20127
|
+
const table3 = el8("table", "rules");
|
|
20128
|
+
table3.dataset.rows = "rules";
|
|
19466
20129
|
const thead = element3("thead");
|
|
19467
20130
|
const headRow = element3("tr");
|
|
19468
20131
|
const columnWord = {
|
|
@@ -19474,188 +20137,234 @@ ${key}`);
|
|
|
19474
20137
|
};
|
|
19475
20138
|
headRow.append(
|
|
19476
20139
|
element3("th", w.t("lines.col.rule")),
|
|
19477
|
-
|
|
19478
|
-
|
|
19479
|
-
|
|
20140
|
+
el8("th", "n", columnWord.not_met),
|
|
20141
|
+
el8("th", "n", columnWord.met),
|
|
20142
|
+
el8("th", "n", columnWord.undecided)
|
|
19480
20143
|
);
|
|
19481
20144
|
const anyUnverified = model.conversations.some(
|
|
19482
20145
|
(c) => c.criteria.some((cr) => isUnverified(cr.verdict))
|
|
19483
20146
|
);
|
|
19484
|
-
if (anyUnverified) headRow.append(
|
|
20147
|
+
if (anyUnverified) headRow.append(el8("th", "n", columnWord.unverified));
|
|
19485
20148
|
const anyOutOfScope = model.outOfScopeCount > 0;
|
|
19486
|
-
if (anyOutOfScope) headRow.append(
|
|
20149
|
+
if (anyOutOfScope) headRow.append(el8("th", "n", columnWord.out_of_scope));
|
|
19487
20150
|
const columns = String(4 + (anyUnverified ? 1 : 0) + (anyOutOfScope ? 1 : 0));
|
|
19488
20151
|
thead.append(headRow);
|
|
19489
|
-
|
|
20152
|
+
table3.append(thead);
|
|
19490
20153
|
const tbody = element3("tbody");
|
|
19491
|
-
|
|
19492
|
-
|
|
19493
|
-
|
|
19494
|
-
|
|
19495
|
-
|
|
19496
|
-
|
|
19497
|
-
|
|
19498
|
-
tbody.append(group);
|
|
20154
|
+
const ruleTier = (ref) => {
|
|
20155
|
+
if (tierOf === void 0) return void 0;
|
|
20156
|
+
const claim = model.conversations.flatMap((c) => c.criteria).find((c) => `${c.checkId}.${c.criterionId}` === ref && c.claim)?.claim;
|
|
20157
|
+
return tierOf(claim?.contractRef, ref);
|
|
20158
|
+
};
|
|
20159
|
+
const tiers = /* @__PURE__ */ new Map();
|
|
20160
|
+
for (const check of model.terms.checks)
|
|
19499
20161
|
for (const criterion2 of check.criteria) {
|
|
19500
20162
|
const ref = `${check.id}.${criterion2.id}`;
|
|
19501
|
-
|
|
19502
|
-
|
|
19503
|
-
|
|
19504
|
-
|
|
20163
|
+
tiers.set(ref, ruleTier(ref));
|
|
20164
|
+
}
|
|
20165
|
+
const sections = tierOf === void 0 ? [void 0] : ROW_TIERS.filter((tier) => [...tiers.values()].includes(tier));
|
|
20166
|
+
for (const tier of sections) {
|
|
20167
|
+
if (tier !== void 0) {
|
|
20168
|
+
const inTier = [...tiers.values()].filter((t) => t === tier).length;
|
|
20169
|
+
const heading = el8("tr", "tier");
|
|
20170
|
+
heading.dataset.requirementTier = tier;
|
|
20171
|
+
const cell2 = el8("td", "");
|
|
20172
|
+
cell2.setAttribute("colspan", columns);
|
|
20173
|
+
cell2.append(
|
|
20174
|
+
el8("b", "", w.t(`lines.rtier.${tier}.title`, { n: fmtCount(inTier) })),
|
|
20175
|
+
el8("small", "", w.t(`lines.rtier.${tier}.note`))
|
|
19505
20176
|
);
|
|
19506
|
-
|
|
19507
|
-
|
|
19508
|
-
|
|
19509
|
-
|
|
19510
|
-
|
|
19511
|
-
|
|
19512
|
-
};
|
|
19513
|
-
const met = of(picks.met);
|
|
19514
|
-
const notMet = of(picks.not_met);
|
|
19515
|
-
const unverifiedHere = of(picks.unverified);
|
|
19516
|
-
const na = of((v) => v === "not_applicable");
|
|
19517
|
-
const outOfScopeHere = of(picks.out_of_scope);
|
|
19518
|
-
const undecided = of(picks.undecided);
|
|
19519
|
-
const countCell = (className, column, counted) => {
|
|
19520
|
-
const pick = picks[column];
|
|
19521
|
-
const cell4 = el7("td", className);
|
|
19522
|
-
cell4.dataset.column = column;
|
|
19523
|
-
cell4.append(el7("span", "nv", fmtCount(counted.length)));
|
|
19524
|
-
const action = evidenceAction(
|
|
19525
|
-
`rule:${ref}:${column}`,
|
|
19526
|
-
`${label.label} \xB7 ${columnWord[column]}: ${fmtCount(counted.length)}`,
|
|
19527
|
-
counted.map(
|
|
19528
|
-
(c) => c.criteria.find(
|
|
19529
|
-
(cr) => cr.checkId === check.id && cr.criterionId === criterion2.id && pick(cr.verdict)
|
|
19530
|
-
)?.claim
|
|
19531
|
-
),
|
|
19532
|
-
result,
|
|
19533
|
-
w
|
|
19534
|
-
);
|
|
19535
|
-
if (action !== void 0) cell4.append(action);
|
|
19536
|
-
return cell4;
|
|
19537
|
-
};
|
|
19538
|
-
const tr = el7("tr", "rule");
|
|
19539
|
-
tr.dataset.rule = ref;
|
|
19540
|
-
tr.dataset.tier = model.criterionTiers.get(ref) ?? "unknown";
|
|
19541
|
-
const label = criterionLabel(model, check.id, criterion2.id, w);
|
|
19542
|
-
const nameCell = el7("td", "cn");
|
|
19543
|
-
const ruleName = el7("b", "", label.label);
|
|
19544
|
-
nameCell.append(ruleName);
|
|
19545
|
-
const badge = editedBadge(model, ref, w);
|
|
19546
|
-
if (badge !== void 0) nameCell.append(badge);
|
|
19547
|
-
if (label.source === "sealed")
|
|
19548
|
-
nameCell.append(el7("small", "", label.text));
|
|
19549
|
-
const detail = w.row(ref, "detail");
|
|
19550
|
-
if (detail !== void 0) {
|
|
19551
|
-
const line = el7("small", "rdet", detail);
|
|
19552
|
-
line.dataset.wording = "pack";
|
|
19553
|
-
nameCell.append(line);
|
|
19554
|
-
}
|
|
19555
|
-
const undecidedNote = w.row(ref, "not_evaluable");
|
|
19556
|
-
if (undecidedNote !== void 0 && undecided.length > 0) {
|
|
19557
|
-
const line = el7("small", "rdet", undecidedNote);
|
|
19558
|
-
line.dataset.wording = "pack";
|
|
19559
|
-
line.dataset.note = "not-evaluable";
|
|
19560
|
-
nameCell.append(line);
|
|
19561
|
-
}
|
|
19562
|
-
const problems = [
|
|
19563
|
-
...notMet,
|
|
19564
|
-
...unverifiedHere.filter((c) => !notMet.includes(c)),
|
|
19565
|
-
...undecided.filter(
|
|
19566
|
-
(c) => !notMet.includes(c) && !unverifiedHere.includes(c)
|
|
19567
|
-
)
|
|
19568
|
-
];
|
|
19569
|
-
tr.append(
|
|
19570
|
-
nameCell,
|
|
19571
|
-
countCell(`n${notMet.length > 0 ? " bad" : ""}`, "not_met", notMet),
|
|
19572
|
-
countCell("n ok", "met", met),
|
|
19573
|
-
countCell("n", "undecided", undecided)
|
|
20177
|
+
heading.append(cell2);
|
|
20178
|
+
tbody.append(heading);
|
|
20179
|
+
}
|
|
20180
|
+
for (const check of model.terms.checks) {
|
|
20181
|
+
const criteria = check.criteria.filter(
|
|
20182
|
+
(criterion2) => tiers.get(`${check.id}.${criterion2.id}`) === tier
|
|
19574
20183
|
);
|
|
19575
|
-
if (
|
|
19576
|
-
|
|
19577
|
-
|
|
19578
|
-
|
|
19579
|
-
|
|
19580
|
-
|
|
19581
|
-
const
|
|
19582
|
-
|
|
19583
|
-
|
|
19584
|
-
|
|
19585
|
-
|
|
19586
|
-
|
|
19587
|
-
const
|
|
19588
|
-
|
|
19589
|
-
|
|
19590
|
-
|
|
19591
|
-
|
|
19592
|
-
|
|
20184
|
+
if (criteria.length === 0) continue;
|
|
20185
|
+
const group = el8("tr", "grp");
|
|
20186
|
+
group.dataset.checkId = check.id;
|
|
20187
|
+
group.dataset.passCount = String(
|
|
20188
|
+
model.checkPassCounts.get(check.id) ?? 0
|
|
20189
|
+
);
|
|
20190
|
+
const cell2 = el8("td", "", groupTitle(check, w));
|
|
20191
|
+
cell2.setAttribute("colspan", columns);
|
|
20192
|
+
group.append(cell2);
|
|
20193
|
+
tbody.append(group);
|
|
20194
|
+
for (const criterion2 of criteria) {
|
|
20195
|
+
const ref = `${check.id}.${criterion2.id}`;
|
|
20196
|
+
const of = (pick) => model.conversations.filter(
|
|
20197
|
+
(c) => c.criteria.some(
|
|
20198
|
+
(cr) => cr.checkId === check.id && cr.criterionId === criterion2.id && pick(cr.verdict)
|
|
20199
|
+
)
|
|
20200
|
+
);
|
|
20201
|
+
const picks = {
|
|
20202
|
+
not_met: isMiss,
|
|
20203
|
+
met: (v) => v === "met",
|
|
20204
|
+
undecided: (v) => v === "not_evaluable" || v === "no_claim",
|
|
20205
|
+
unverified: isUnverified,
|
|
20206
|
+
out_of_scope: (v) => v === "out_of_scope"
|
|
20207
|
+
};
|
|
20208
|
+
const met = of(picks.met);
|
|
20209
|
+
const notMet = of(picks.not_met);
|
|
20210
|
+
const unverifiedHere = of(picks.unverified);
|
|
20211
|
+
const na = of((v) => v === "not_applicable");
|
|
20212
|
+
const outOfScopeHere = of(picks.out_of_scope);
|
|
20213
|
+
const undecided = of(picks.undecided);
|
|
20214
|
+
const countCell = (className, column, counted2) => {
|
|
20215
|
+
const pick = picks[column];
|
|
20216
|
+
const cell4 = el8("td", className);
|
|
20217
|
+
cell4.dataset.column = column;
|
|
20218
|
+
cell4.append(el8("span", "nv", fmtCount(counted2.length)));
|
|
20219
|
+
const action = evidenceAction(
|
|
20220
|
+
`rule:${ref}:${column}`,
|
|
20221
|
+
`${label.label} \xB7 ${columnWord[column]}: ${fmtCount(counted2.length)}`,
|
|
20222
|
+
counted2.map(
|
|
20223
|
+
(c) => c.criteria.find(
|
|
20224
|
+
(cr) => cr.checkId === check.id && cr.criterionId === criterion2.id && pick(cr.verdict)
|
|
20225
|
+
)?.claim
|
|
20226
|
+
),
|
|
20227
|
+
result,
|
|
20228
|
+
w
|
|
20229
|
+
);
|
|
20230
|
+
if (action !== void 0) cell4.append(action);
|
|
20231
|
+
return cell4;
|
|
20232
|
+
};
|
|
20233
|
+
const tr = el8("tr", "rule");
|
|
20234
|
+
tr.dataset.rule = ref;
|
|
20235
|
+
tr.dataset.tier = model.criterionTiers.get(ref) ?? "unknown";
|
|
20236
|
+
const label = criterionLabel(model, check.id, criterion2.id, w);
|
|
20237
|
+
const nameCell = el8("td", "cn");
|
|
20238
|
+
const ruleName = el8("b", "", label.label);
|
|
20239
|
+
nameCell.append(ruleName);
|
|
20240
|
+
const badge = editedBadge(model, ref, w);
|
|
20241
|
+
if (badge !== void 0) nameCell.append(badge);
|
|
20242
|
+
if (tier !== void 0) {
|
|
20243
|
+
tr.dataset.requirementTier = tier;
|
|
20244
|
+
nameCell.append(tierChip(tier, w));
|
|
20245
|
+
}
|
|
20246
|
+
if (label.source === "sealed")
|
|
20247
|
+
nameCell.append(el8("small", "", label.text));
|
|
20248
|
+
const detail = w.row(ref, "detail");
|
|
20249
|
+
if (detail !== void 0) {
|
|
20250
|
+
const line = el8("small", "rdet", detail);
|
|
20251
|
+
line.dataset.wording = "pack";
|
|
20252
|
+
nameCell.append(line);
|
|
20253
|
+
}
|
|
20254
|
+
const undecidedNote = w.row(ref, "not_evaluable");
|
|
20255
|
+
if (undecidedNote !== void 0 && undecided.length > 0) {
|
|
20256
|
+
const line = el8("small", "rdet", undecidedNote);
|
|
20257
|
+
line.dataset.wording = "pack";
|
|
20258
|
+
line.dataset.note = "not-evaluable";
|
|
20259
|
+
nameCell.append(line);
|
|
20260
|
+
}
|
|
20261
|
+
const problems = [
|
|
20262
|
+
...notMet,
|
|
20263
|
+
...unverifiedHere.filter((c) => !notMet.includes(c)),
|
|
20264
|
+
...undecided.filter(
|
|
20265
|
+
(c) => !notMet.includes(c) && !unverifiedHere.includes(c)
|
|
20266
|
+
)
|
|
20267
|
+
];
|
|
20268
|
+
tr.append(
|
|
20269
|
+
nameCell,
|
|
20270
|
+
countCell(`n${notMet.length > 0 ? " bad" : ""}`, "not_met", notMet),
|
|
20271
|
+
countCell("n ok", "met", met),
|
|
20272
|
+
countCell("n", "undecided", undecided)
|
|
19593
20273
|
);
|
|
19594
|
-
|
|
19595
|
-
|
|
20274
|
+
if (anyUnverified)
|
|
20275
|
+
tr.append(countCell("n", "unverified", unverifiedHere));
|
|
20276
|
+
if (anyOutOfScope)
|
|
20277
|
+
tr.append(countCell("n", "out_of_scope", outOfScopeHere));
|
|
20278
|
+
tbody.append(tr);
|
|
20279
|
+
if (problems.length === 0 && na.length === 0) continue;
|
|
20280
|
+
const drillRow = el8("tr", "drill-row");
|
|
20281
|
+
drillRow.dataset.drillFor = ref;
|
|
20282
|
+
const cell3 = element3("td");
|
|
20283
|
+
cell3.setAttribute("colspan", columns);
|
|
20284
|
+
drillRow.append(cell3);
|
|
20285
|
+
if (na.length > 0) {
|
|
20286
|
+
const naLine = el8(
|
|
20287
|
+
"p",
|
|
20288
|
+
"rule-na",
|
|
20289
|
+
w.p("lines.rules.expand.na", na.length, {
|
|
20290
|
+
n: fmtCount(na.length)
|
|
20291
|
+
})
|
|
20292
|
+
);
|
|
20293
|
+
naLine.dataset.count = String(na.length);
|
|
20294
|
+
cell3.append(naLine);
|
|
20295
|
+
}
|
|
20296
|
+
const toggle = expandableRow(
|
|
20297
|
+
tr,
|
|
20298
|
+
ruleName,
|
|
20299
|
+
drillRow,
|
|
20300
|
+
() => problems.length > 0 ? renderConversationList(
|
|
20301
|
+
problems,
|
|
20302
|
+
model,
|
|
20303
|
+
runInfo,
|
|
20304
|
+
`rule:${ref}`,
|
|
20305
|
+
w
|
|
20306
|
+
) : document.createDocumentFragment(),
|
|
20307
|
+
`rule-${ref}`
|
|
20308
|
+
);
|
|
20309
|
+
toggle.dataset.drill = `rule:${ref}`;
|
|
20310
|
+
tbody.append(drillRow);
|
|
19596
20311
|
}
|
|
19597
|
-
const toggle = expandableRow(
|
|
19598
|
-
tr,
|
|
19599
|
-
ruleName,
|
|
19600
|
-
drillRow,
|
|
19601
|
-
() => problems.length > 0 ? renderConversationList(problems, model, runInfo, `rule:${ref}`, w) : document.createDocumentFragment(),
|
|
19602
|
-
`rule-${ref}`
|
|
19603
|
-
);
|
|
19604
|
-
toggle.dataset.drill = `rule:${ref}`;
|
|
19605
|
-
tbody.append(drillRow);
|
|
19606
20312
|
}
|
|
19607
20313
|
}
|
|
19608
20314
|
if (model.notRun.length > 0) {
|
|
19609
|
-
const group =
|
|
20315
|
+
const group = el8("tr", "grp");
|
|
19610
20316
|
group.dataset.group = "not-run";
|
|
19611
|
-
const heading =
|
|
20317
|
+
const heading = el8("td", "", w.t("lines.rules.not-run.h"));
|
|
19612
20318
|
heading.setAttribute("colspan", columns);
|
|
19613
20319
|
group.append(heading);
|
|
19614
20320
|
tbody.append(group);
|
|
19615
20321
|
for (const ref of model.notRun) {
|
|
19616
20322
|
const [checkId = "", ...rest] = ref.split(".");
|
|
19617
20323
|
const label = criterionLabel(model, checkId, rest.join("."), w);
|
|
19618
|
-
const tr =
|
|
20324
|
+
const tr = el8("tr", "rule not-run");
|
|
19619
20325
|
tr.dataset.rule = ref;
|
|
19620
20326
|
tr.dataset.notRun = "true";
|
|
19621
|
-
const nameCell =
|
|
19622
|
-
nameCell.append(
|
|
19623
|
-
const status2 =
|
|
20327
|
+
const nameCell = el8("td", "cn");
|
|
20328
|
+
nameCell.append(el8("b", "", label.label));
|
|
20329
|
+
const status2 = el8("td", "nr", w.t("lines.rules.not-run"));
|
|
19624
20330
|
status2.setAttribute("colspan", String(Number(columns) - 1));
|
|
19625
20331
|
tr.append(nameCell, status2);
|
|
19626
20332
|
tbody.append(tr);
|
|
19627
20333
|
}
|
|
19628
20334
|
}
|
|
19629
|
-
|
|
19630
|
-
const scroll =
|
|
19631
|
-
scroll.append(
|
|
20335
|
+
table3.append(tbody);
|
|
20336
|
+
const scroll = el8("div", "tscroll");
|
|
20337
|
+
scroll.append(table3);
|
|
19632
20338
|
section.append(scroll);
|
|
19633
20339
|
host.append(section);
|
|
19634
20340
|
}
|
|
19635
20341
|
function renderCalendar2(host, model, w) {
|
|
19636
|
-
const section =
|
|
20342
|
+
const section = el8("section", "sec");
|
|
19637
20343
|
section.dataset.section = "calendar";
|
|
19638
|
-
section.append(
|
|
20344
|
+
section.append(el8("h2", "", w.t("lines.cal.h")));
|
|
19639
20345
|
const note = datingNote(model, w);
|
|
19640
20346
|
section.append(
|
|
19641
|
-
|
|
20347
|
+
el8(
|
|
19642
20348
|
"p",
|
|
19643
20349
|
"lede",
|
|
19644
20350
|
w.t(note === void 0 ? "lines.cal.lede" : "lines.cal.lede.dated")
|
|
19645
20351
|
)
|
|
19646
20352
|
);
|
|
19647
|
-
const list2 =
|
|
20353
|
+
const list2 = el8("div", "cal");
|
|
19648
20354
|
list2.dataset.days = String(model.days.length);
|
|
19649
20355
|
for (const day of model.days) {
|
|
19650
|
-
const
|
|
20356
|
+
const resolved = day.conversations.filter(
|
|
20357
|
+
(c) => conversationStatus(c, model.gating) === "resolved"
|
|
20358
|
+
).length;
|
|
20359
|
+
const item = el8("div", "day");
|
|
19651
20360
|
item.dataset.day = day.date;
|
|
19652
|
-
item.dataset.resolved = String(
|
|
20361
|
+
item.dataset.resolved = String(resolved);
|
|
19653
20362
|
item.dataset.total = String(day.conversations.length);
|
|
19654
|
-
item.append(
|
|
20363
|
+
item.append(el8("div", "dn", day.date));
|
|
19655
20364
|
if (note !== void 0) {
|
|
19656
20365
|
const bases = new Set(day.conversations.map((c) => c.dated.basis));
|
|
19657
20366
|
if (bases.has("source")) {
|
|
19658
|
-
const chip =
|
|
20367
|
+
const chip = el8("div", "src-says", w.t("lines.cal.source-says"));
|
|
19659
20368
|
chip.dataset.sourceSays = String(
|
|
19660
20369
|
day.conversations.filter((c) => c.dated.basis === "source").length
|
|
19661
20370
|
);
|
|
@@ -19665,31 +20374,31 @@ ${key}`);
|
|
|
19665
20374
|
(c) => c.dated.zone === "not-stated"
|
|
19666
20375
|
).length;
|
|
19667
20376
|
if (notStated > 0) {
|
|
19668
|
-
const tz =
|
|
20377
|
+
const tz = el8("div", "tz", w.t("lines.cal.tz"));
|
|
19669
20378
|
tz.dataset.tzMarker = "not-stated";
|
|
19670
20379
|
item.append(tz);
|
|
19671
20380
|
}
|
|
19672
20381
|
}
|
|
19673
20382
|
item.append(
|
|
19674
|
-
|
|
20383
|
+
el8(
|
|
19675
20384
|
"div",
|
|
19676
20385
|
"v",
|
|
19677
20386
|
fmtShare(
|
|
19678
|
-
|
|
20387
|
+
resolved,
|
|
19679
20388
|
day.conversations.length,
|
|
19680
20389
|
model.options.percentages,
|
|
19681
20390
|
w
|
|
19682
20391
|
)
|
|
19683
20392
|
)
|
|
19684
20393
|
);
|
|
19685
|
-
const mini =
|
|
19686
|
-
const share = day.conversations.length === 0 ? 0 :
|
|
20394
|
+
const mini = el8("div", "mini");
|
|
20395
|
+
const share = day.conversations.length === 0 ? 0 : resolved / day.conversations.length;
|
|
19687
20396
|
const fill2 = element3("i");
|
|
19688
20397
|
fill2.style.width = `${Math.round(share * 100)}%`;
|
|
19689
20398
|
mini.append(fill2);
|
|
19690
20399
|
item.append(mini);
|
|
19691
20400
|
if (note !== void 0) {
|
|
19692
|
-
const sealed =
|
|
20401
|
+
const sealed = el8(
|
|
19693
20402
|
"div",
|
|
19694
20403
|
"sealed",
|
|
19695
20404
|
w.t("lines.cal.sealed", { span: span(day.judgedDays, w) })
|
|
@@ -19698,7 +20407,7 @@ ${key}`);
|
|
|
19698
20407
|
item.append(sealed);
|
|
19699
20408
|
}
|
|
19700
20409
|
if (day.policyChanged !== null) {
|
|
19701
|
-
const flag =
|
|
20410
|
+
const flag = el8("div", "flag", w.t("lines.cal.policy-changed"));
|
|
19702
20411
|
flag.dataset.policyChanged = day.policyChanged;
|
|
19703
20412
|
item.append(flag);
|
|
19704
20413
|
}
|
|
@@ -19708,37 +20417,37 @@ ${key}`);
|
|
|
19708
20417
|
host.append(section);
|
|
19709
20418
|
}
|
|
19710
20419
|
function renderHumanChecks(host, calibration, w) {
|
|
19711
|
-
const section =
|
|
20420
|
+
const section = el8("section", "sec");
|
|
19712
20421
|
section.dataset.section = "human-checks";
|
|
19713
|
-
section.append(
|
|
19714
|
-
section.append(
|
|
20422
|
+
section.append(el8("h2", "", w.t("lines.hc.h")));
|
|
20423
|
+
section.append(el8("p", "lede", w.t("lines.hc.lede")));
|
|
19715
20424
|
if (calibration.length === 0) {
|
|
19716
|
-
section.append(
|
|
20425
|
+
section.append(el8("p", "", w.t("lines.hc.none")));
|
|
19717
20426
|
host.append(section);
|
|
19718
20427
|
return;
|
|
19719
20428
|
}
|
|
19720
|
-
const
|
|
19721
|
-
|
|
19722
|
-
|
|
20429
|
+
const table3 = document.createElement("table");
|
|
20430
|
+
table3.className = "hct";
|
|
20431
|
+
table3.dataset.weeks = String(calibration.length);
|
|
19723
20432
|
const thead = document.createElement("thead");
|
|
19724
20433
|
const headRow = document.createElement("tr");
|
|
19725
20434
|
headRow.append(
|
|
19726
20435
|
element3("th", w.t("lines.hc.col.week")),
|
|
19727
|
-
|
|
19728
|
-
|
|
19729
|
-
|
|
20436
|
+
el8("th", "n", w.t("lines.hc.col.agreed")),
|
|
20437
|
+
el8("th", "n", w.t("lines.hc.col.held")),
|
|
20438
|
+
el8("th", "n", w.t("lines.hc.col.added"))
|
|
19730
20439
|
);
|
|
19731
20440
|
thead.append(headRow);
|
|
19732
|
-
|
|
20441
|
+
table3.append(thead);
|
|
19733
20442
|
const tbody = document.createElement("tbody");
|
|
19734
20443
|
for (const week of calibration) {
|
|
19735
20444
|
const tr = document.createElement("tr");
|
|
19736
20445
|
tr.dataset.week = week.weekId;
|
|
19737
20446
|
tr.dataset.k = String(week.k);
|
|
19738
20447
|
tr.dataset.n = String(week.n);
|
|
19739
|
-
tr.append(
|
|
20448
|
+
tr.append(el8("td", "", week.weekId));
|
|
19740
20449
|
tr.append(
|
|
19741
|
-
|
|
20450
|
+
el8(
|
|
19742
20451
|
"td",
|
|
19743
20452
|
"n",
|
|
19744
20453
|
w.t("lines.hc.agreed", { k: String(week.k), n: String(week.n) })
|
|
@@ -19750,22 +20459,22 @@ ${key}`);
|
|
|
19750
20459
|
const added = week.sample.filter(
|
|
19751
20460
|
(s) => s.aiVerdict !== "met" && s.humanVerdict === "met"
|
|
19752
20461
|
).length;
|
|
19753
|
-
const heldCell =
|
|
20462
|
+
const heldCell = el8("td", "n", String(held));
|
|
19754
20463
|
heldCell.dataset.held = String(held);
|
|
19755
|
-
const addedCell =
|
|
20464
|
+
const addedCell = el8("td", "n", String(added));
|
|
19756
20465
|
addedCell.dataset.added = String(added);
|
|
19757
20466
|
tr.append(heldCell, addedCell);
|
|
19758
20467
|
tbody.append(tr);
|
|
19759
20468
|
}
|
|
19760
|
-
|
|
19761
|
-
section.append(
|
|
20469
|
+
table3.append(tbody);
|
|
20470
|
+
section.append(table3);
|
|
19762
20471
|
host.append(section);
|
|
19763
20472
|
}
|
|
19764
20473
|
function renderTerms(host, model, w) {
|
|
19765
|
-
const section =
|
|
20474
|
+
const section = el8("div", "rp-s");
|
|
19766
20475
|
section.dataset.section = "terms";
|
|
19767
|
-
section.append(
|
|
19768
|
-
const lede =
|
|
20476
|
+
section.append(el8("h3", "", w.t("lines.terms.h")));
|
|
20477
|
+
const lede = el8(
|
|
19769
20478
|
"p",
|
|
19770
20479
|
"lede",
|
|
19771
20480
|
model.terms.pack.agreement === NOT_STATED ? w.t("lines.terms.lede") : w.t("lines.terms.lede.agreed", {
|
|
@@ -19774,10 +20483,10 @@ ${key}`);
|
|
|
19774
20483
|
);
|
|
19775
20484
|
lede.dataset.termsSource = "bundle";
|
|
19776
20485
|
section.append(lede);
|
|
19777
|
-
const pack =
|
|
20486
|
+
const pack = el8("div", "pack");
|
|
19778
20487
|
const packField = (label, value) => {
|
|
19779
|
-
const box =
|
|
19780
|
-
box.append(
|
|
20488
|
+
const box = el8("div", "pk");
|
|
20489
|
+
box.append(el8("div", "k", label), el8("div", "v", value));
|
|
19781
20490
|
pack.append(box);
|
|
19782
20491
|
};
|
|
19783
20492
|
packField(w.t("lines.meta.pack"), model.terms.pack.id);
|
|
@@ -19790,28 +20499,28 @@ ${key}`);
|
|
|
19790
20499
|
if (model.terms.pack.locked !== NOT_STATED)
|
|
19791
20500
|
packField(w.t("lines.terms.locked"), model.terms.pack.locked);
|
|
19792
20501
|
section.append(pack);
|
|
19793
|
-
const outcome =
|
|
19794
|
-
const outcomeIcon =
|
|
20502
|
+
const outcome = el8("div", "outcome");
|
|
20503
|
+
const outcomeIcon = el8("div", "oic");
|
|
19795
20504
|
const target = icon("target");
|
|
19796
20505
|
if (target !== void 0) outcomeIcon.append(target);
|
|
19797
20506
|
outcome.append(outcomeIcon);
|
|
19798
20507
|
const outcomeBody = element3("div");
|
|
19799
|
-
outcomeBody.append(
|
|
19800
|
-
outcomeBody.append(
|
|
20508
|
+
outcomeBody.append(el8("div", "t", w.t("lines.terms.outcome")));
|
|
20509
|
+
outcomeBody.append(el8("div", "v", model.terms.pack.outcomeStatement));
|
|
19801
20510
|
outcome.append(outcomeBody);
|
|
19802
20511
|
section.append(outcome);
|
|
19803
|
-
const checks =
|
|
20512
|
+
const checks = el8("div", "checks");
|
|
19804
20513
|
checks.dataset.checks = String(model.terms.checks.length);
|
|
19805
20514
|
for (const check of model.terms.checks) {
|
|
19806
|
-
const
|
|
19807
|
-
|
|
19808
|
-
const checkIcon =
|
|
20515
|
+
const card2 = el8("section", "check");
|
|
20516
|
+
card2.dataset.checkId = check.id;
|
|
20517
|
+
const checkIcon = el8("div", "ic");
|
|
19809
20518
|
const drawn = icon(check.icon);
|
|
19810
20519
|
if (drawn !== void 0) checkIcon.append(drawn);
|
|
19811
|
-
|
|
19812
|
-
|
|
19813
|
-
|
|
19814
|
-
const criteria =
|
|
20520
|
+
card2.append(checkIcon);
|
|
20521
|
+
card2.append(el8("div", "q", groupTitle(check, w)));
|
|
20522
|
+
card2.append(el8("div", "d", check.description));
|
|
20523
|
+
const criteria = el8("ul", "subs");
|
|
19815
20524
|
for (const criterion2 of check.criteria) {
|
|
19816
20525
|
const ref = `${check.id}.${criterion2.id}`;
|
|
19817
20526
|
const tier = model.criterionTiers.get(ref) ?? "unknown";
|
|
@@ -19823,7 +20532,7 @@ ${key}`);
|
|
|
19823
20532
|
source: "unstated"
|
|
19824
20533
|
};
|
|
19825
20534
|
item.dataset.wording = wording.source;
|
|
19826
|
-
const label =
|
|
20535
|
+
const label = el8("b", "", w.row(ref, "label") ?? criterion2.label);
|
|
19827
20536
|
const termsBadge = editedBadge(model, ref, w);
|
|
19828
20537
|
if (termsBadge !== void 0) label.append(termsBadge);
|
|
19829
20538
|
item.append(label);
|
|
@@ -19837,32 +20546,32 @@ ${key}`);
|
|
|
19837
20546
|
)
|
|
19838
20547
|
);
|
|
19839
20548
|
if (wording.source !== "sealed")
|
|
19840
|
-
item.append(
|
|
20549
|
+
item.append(el8("small", "wsrc", wordingFallback(wording.source, w)));
|
|
19841
20550
|
criteria.append(item);
|
|
19842
20551
|
}
|
|
19843
|
-
|
|
19844
|
-
checks.append(
|
|
20552
|
+
card2.append(criteria);
|
|
20553
|
+
checks.append(card2);
|
|
19845
20554
|
}
|
|
19846
20555
|
section.append(checks);
|
|
19847
|
-
const note =
|
|
20556
|
+
const note = el8("p", "small", wordingNote(model, w));
|
|
19848
20557
|
note.dataset.wordingNote = "true";
|
|
19849
20558
|
section.append(note);
|
|
19850
|
-
section.append(
|
|
20559
|
+
section.append(el8("div", "rule", model.terms.pack.resolutionRule));
|
|
19851
20560
|
host.append(section);
|
|
19852
20561
|
}
|
|
19853
20562
|
function renderWhatRan(host, runInfo, w) {
|
|
19854
|
-
const section =
|
|
20563
|
+
const section = el8("div", "rp-s");
|
|
19855
20564
|
section.dataset.section = "what-ran";
|
|
19856
|
-
section.append(
|
|
19857
|
-
const ran =
|
|
20565
|
+
section.append(el8("h3", "", w.t("lines.ran.h")));
|
|
20566
|
+
const ran = el8("div", "ran");
|
|
19858
20567
|
ran.dataset.pinned = String(runInfo.pinned);
|
|
19859
20568
|
if (runInfo.judgePinRecomputes !== void 0)
|
|
19860
20569
|
ran.dataset.pinRecomputes = String(runInfo.judgePinRecomputes);
|
|
19861
20570
|
const box = (label, value, key) => {
|
|
19862
|
-
const item =
|
|
20571
|
+
const item = el8("div", "it");
|
|
19863
20572
|
item.dataset.ran = key;
|
|
19864
|
-
item.append(
|
|
19865
|
-
item.append(
|
|
20573
|
+
item.append(el8("div", "k", label));
|
|
20574
|
+
item.append(el8("div", "v", value));
|
|
19866
20575
|
ran.append(item);
|
|
19867
20576
|
};
|
|
19868
20577
|
const pin = runInfo.judgePinRecomputes === true ? runInfo.judgePin : void 0;
|
|
@@ -19893,32 +20602,32 @@ ${key}`);
|
|
|
19893
20602
|
box(w.t("lines.ran.agent"), w.t("lines.ran.agent.value"), "agent");
|
|
19894
20603
|
section.append(ran);
|
|
19895
20604
|
if (runInfo.judgePinRecomputes === false) {
|
|
19896
|
-
const warning =
|
|
20605
|
+
const warning = el8("p", "", w.t("lines.ran.components-mismatch"));
|
|
19897
20606
|
warning.dataset.pinComponentsMismatch = "true";
|
|
19898
20607
|
section.append(warning);
|
|
19899
20608
|
}
|
|
19900
|
-
const lock =
|
|
20609
|
+
const lock = el8("div", "lock", w.t("lines.ran.lock"));
|
|
19901
20610
|
section.append(lock);
|
|
19902
20611
|
if (!runInfo.pinned) {
|
|
19903
|
-
const warning =
|
|
20612
|
+
const warning = el8("p", "", w.t("lines.ran.pin-mismatch"));
|
|
19904
20613
|
warning.dataset.pinMismatch = "true";
|
|
19905
20614
|
section.append(warning);
|
|
19906
20615
|
}
|
|
19907
20616
|
host.append(section);
|
|
19908
20617
|
}
|
|
19909
20618
|
function renderVerificationDetails(host, bundle, verified, w) {
|
|
19910
|
-
const section =
|
|
20619
|
+
const section = el8("div", "rp-s");
|
|
19911
20620
|
section.dataset.section = "verification-details";
|
|
19912
|
-
section.append(
|
|
19913
|
-
section.append(
|
|
20621
|
+
section.append(el8("h3", "", w.t("card.vd.h")));
|
|
20622
|
+
section.append(el8("p", "lede", w.t("lines.vd.lede")));
|
|
19914
20623
|
const model = buildVerificationPageModel(bundle, verified);
|
|
19915
|
-
const tech =
|
|
20624
|
+
const tech = el8("div", "tech");
|
|
19916
20625
|
const field = (label, value) => {
|
|
19917
|
-
tech.append(
|
|
20626
|
+
tech.append(el8("div", "k", label), el8("div", "v", value));
|
|
19918
20627
|
};
|
|
19919
20628
|
for (const [label, value] of verificationRows(model, w)) field(label, value);
|
|
19920
20629
|
section.append(tech);
|
|
19921
|
-
const note =
|
|
20630
|
+
const note = el8("p", "note", w.t("lines.vd.note"));
|
|
19922
20631
|
note.dataset.checkpointKind = "mmr";
|
|
19923
20632
|
section.append(note);
|
|
19924
20633
|
host.append(section);
|
|
@@ -19960,13 +20669,13 @@ ${key}`);
|
|
|
19960
20669
|
];
|
|
19961
20670
|
}
|
|
19962
20671
|
function renderReportProofs(host, model, runInfo, bundle, verified, w) {
|
|
19963
|
-
const section =
|
|
20672
|
+
const section = el8("section", "sec rp");
|
|
19964
20673
|
section.dataset.section = "report-proofs";
|
|
19965
20674
|
const toggle = levelToggle(
|
|
19966
20675
|
2,
|
|
19967
20676
|
w.t("lines.rp.toggle"),
|
|
19968
20677
|
() => {
|
|
19969
|
-
const box =
|
|
20678
|
+
const box = el8("div", "pf-b");
|
|
19970
20679
|
const ids = proofList([
|
|
19971
20680
|
[w.t("card.pf.result-capsule"), model.capsuleId],
|
|
19972
20681
|
[w.t("lines.meta.pack"), packLine(model, w)],
|
|
@@ -19977,7 +20686,7 @@ ${key}`);
|
|
|
19977
20686
|
renderTerms(box, model, w);
|
|
19978
20687
|
renderWhatRan(box, runInfo, w);
|
|
19979
20688
|
renderVerificationDetails(box, bundle, verified, w);
|
|
19980
|
-
const tamper =
|
|
20689
|
+
const tamper = el8("p", "tamper-note", w.t("lines.rp.tamper"));
|
|
19981
20690
|
tamper.dataset.tamperNote = "verify-first";
|
|
19982
20691
|
box.append(tamper);
|
|
19983
20692
|
return box;
|
|
@@ -19987,28 +20696,85 @@ ${key}`);
|
|
|
19987
20696
|
section.append(toggle);
|
|
19988
20697
|
host.append(section);
|
|
19989
20698
|
}
|
|
20699
|
+
async function resultDocument3(result, bundle) {
|
|
20700
|
+
try {
|
|
20701
|
+
const context = await verifiedBundleContext(bundle);
|
|
20702
|
+
const member = disclosureOf(context, result.capsuleId, result.member);
|
|
20703
|
+
if (member.state !== "disclosed") return void 0;
|
|
20704
|
+
const payload = member.payload;
|
|
20705
|
+
return result.form === "book" && payload !== null && typeof payload === "object" ? payload.statement : payload;
|
|
20706
|
+
} catch {
|
|
20707
|
+
return void 0;
|
|
20708
|
+
}
|
|
20709
|
+
}
|
|
20710
|
+
function subjectConversations(model, w) {
|
|
20711
|
+
return model.conversations.map((c) => {
|
|
20712
|
+
const status2 = conversationStatus(c, model.gating);
|
|
20713
|
+
const outcome = statusWord(status2, c, w, model.gating);
|
|
20714
|
+
const time = /T(\d{2}:\d{2})/u.exec(c.dated.stated ?? "")?.[1];
|
|
20715
|
+
const turns = c.transcript.state === "verified" || c.transcript.state === "cited" ? c.transcript.turns : void 0;
|
|
20716
|
+
return {
|
|
20717
|
+
id: c.conversationId,
|
|
20718
|
+
date: c.day,
|
|
20719
|
+
...time === void 0 ? {} : { time },
|
|
20720
|
+
status: status2,
|
|
20721
|
+
outcome,
|
|
20722
|
+
terms: c.criteria.map((cr) => ({
|
|
20723
|
+
ref: `${cr.checkId}.${cr.criterionId}`,
|
|
20724
|
+
label: criterionLabel(model, cr.checkId, cr.criterionId, w).label,
|
|
20725
|
+
tone: criterionWord(cr, w).tone
|
|
20726
|
+
})),
|
|
20727
|
+
open: c.criteria.filter((cr) => cr.verdict !== "met" && cr.verdict !== "not_applicable").map((cr) => {
|
|
20728
|
+
const label = criterionLabel(model, cr.checkId, cr.criterionId, w);
|
|
20729
|
+
const worded = criterionWord(cr, w);
|
|
20730
|
+
return {
|
|
20731
|
+
label: label.label,
|
|
20732
|
+
wording: label.source === "sealed" ? label.text : "",
|
|
20733
|
+
verdict: worded.word,
|
|
20734
|
+
tone: worded.tone,
|
|
20735
|
+
note: cr.rationale === void 0 ? noNoteText(cr, w) : judgeNote(cr.rationale, cr.claim?.verdict ?? cr.verdict, w)
|
|
20736
|
+
};
|
|
20737
|
+
}),
|
|
20738
|
+
...turns === void 0 ? {} : {
|
|
20739
|
+
turns: turns.length,
|
|
20740
|
+
calls: turns.reduce((n, t) => n + t.toolCalls.length, 0)
|
|
20741
|
+
}
|
|
20742
|
+
};
|
|
20743
|
+
});
|
|
20744
|
+
}
|
|
19990
20745
|
var LINES_FRAME = {
|
|
19991
20746
|
tag: "section",
|
|
19992
20747
|
className: "oi",
|
|
19993
20748
|
page: "outcome-report",
|
|
19994
20749
|
css: OUTCOME_REPORT_CSS
|
|
19995
20750
|
};
|
|
19996
|
-
async function drawLines(levels, result, options, bundle, verified, w) {
|
|
19997
|
-
const
|
|
20751
|
+
async function drawLines(levels, result, options, bundle, verified, w, tierOf) {
|
|
20752
|
+
const built = buildOutcomeReportModel(result, options);
|
|
20753
|
+
const model = tierOf === void 0 ? built : { ...built, gating: gating(built.conversations, tierOf) };
|
|
19998
20754
|
const runInfo = await verifyJudgePin(model.runInfo);
|
|
19999
20755
|
const claims = model.conversations.flatMap(
|
|
20000
20756
|
(c) => c.criteria.flatMap((cr) => cr.claim === void 0 ? [] : [cr.claim])
|
|
20001
20757
|
);
|
|
20002
20758
|
levels.L0.append(renderLegend(w));
|
|
20003
|
-
const sheet =
|
|
20004
|
-
const pad =
|
|
20005
|
-
const notes =
|
|
20759
|
+
const sheet = el8("div", "sheet");
|
|
20760
|
+
const pad = el8("div", "pad");
|
|
20761
|
+
const notes = el8("aside", "footnotes");
|
|
20006
20762
|
notes.dataset.section = "footnotes";
|
|
20007
20763
|
renderMeta(pad, model, w, notes);
|
|
20008
20764
|
renderLines(pad, model, runInfo, w, notes);
|
|
20009
20765
|
if (notes.childElementCount > 0) pad.append(notes);
|
|
20010
20766
|
sheet.append(pad);
|
|
20011
20767
|
levels.L0.append(sheet);
|
|
20768
|
+
const slice2 = readSubjectHistory(await resultDocument3(result, bundle));
|
|
20769
|
+
if (slice2 !== void 0) {
|
|
20770
|
+
const subject = renderSubjectHistory(
|
|
20771
|
+
subjectConversations(model, w),
|
|
20772
|
+
slice2,
|
|
20773
|
+
model.totalCount,
|
|
20774
|
+
w
|
|
20775
|
+
);
|
|
20776
|
+
if (subject !== void 0) levels.L0.append(subject);
|
|
20777
|
+
}
|
|
20012
20778
|
renderRules(levels.L1, model, runInfo, result, w);
|
|
20013
20779
|
leadWithProvenance(
|
|
20014
20780
|
levels.L1,
|
|
@@ -20030,7 +20796,7 @@ ${key}`);
|
|
|
20030
20796
|
if (text2 !== void 0) value.textContent = text2;
|
|
20031
20797
|
return value;
|
|
20032
20798
|
}
|
|
20033
|
-
function
|
|
20799
|
+
function el9(tag, className, text2) {
|
|
20034
20800
|
const value = element4(tag, text2);
|
|
20035
20801
|
value.className = className;
|
|
20036
20802
|
return value;
|
|
@@ -20043,13 +20809,13 @@ ${key}`);
|
|
|
20043
20809
|
return value;
|
|
20044
20810
|
}
|
|
20045
20811
|
function maybeProducer(w, tag, className, text2, producer) {
|
|
20046
|
-
if (!producer) return
|
|
20047
|
-
const value =
|
|
20812
|
+
if (!producer) return el9(tag, className, text2);
|
|
20813
|
+
const value = el9(tag, className);
|
|
20048
20814
|
value.append(producerText(w, text2));
|
|
20049
20815
|
return value;
|
|
20050
20816
|
}
|
|
20051
|
-
var
|
|
20052
|
-
var count = (w, noun, n) => w.p(`groups.count.${noun}`, n, { n:
|
|
20817
|
+
var fmt4 = (n) => n.toLocaleString();
|
|
20818
|
+
var count = (w, noun, n) => w.p(`groups.count.${noun}`, n, { n: fmt4(n) });
|
|
20053
20819
|
var SEVERITY_CLASS = {
|
|
20054
20820
|
High: "high",
|
|
20055
20821
|
Medium: "medium",
|
|
@@ -20057,13 +20823,13 @@ ${key}`);
|
|
|
20057
20823
|
};
|
|
20058
20824
|
function severityPill(severity, w) {
|
|
20059
20825
|
const cls = Object.hasOwn(SEVERITY_CLASS, severity) ? SEVERITY_CLASS[severity] : void 0;
|
|
20060
|
-
const pill =
|
|
20826
|
+
const pill = el9("span", cls === void 0 ? "sev" : `sev ${cls}`);
|
|
20061
20827
|
pill.append(producerText(w, severity));
|
|
20062
20828
|
return pill;
|
|
20063
20829
|
}
|
|
20064
20830
|
function tierBadge(tier, w) {
|
|
20065
20831
|
const key = tier === "judged" || tier === "recomputed" || tier === "mixed" ? tier : "unstated";
|
|
20066
|
-
const badge =
|
|
20832
|
+
const badge = el9(
|
|
20067
20833
|
"span",
|
|
20068
20834
|
`kind ${tier === "judged" || tier === "recomputed" ? tier : "unstated"}`,
|
|
20069
20835
|
w.t(`groups.tier.${key}`)
|
|
@@ -20073,10 +20839,10 @@ ${key}`);
|
|
|
20073
20839
|
return badge;
|
|
20074
20840
|
}
|
|
20075
20841
|
function statusPill(statusClass, text2) {
|
|
20076
|
-
return
|
|
20842
|
+
return el9("span", `st ${statusClass}`, text2);
|
|
20077
20843
|
}
|
|
20078
20844
|
function packWord(tag, className, text2) {
|
|
20079
|
-
const value =
|
|
20845
|
+
const value = el9(tag, className, text2);
|
|
20080
20846
|
value.dataset.wording = "pack";
|
|
20081
20847
|
return value;
|
|
20082
20848
|
}
|
|
@@ -20112,9 +20878,9 @@ ${key}`);
|
|
|
20112
20878
|
if (first === void 0 || last === void 0) return void 0;
|
|
20113
20879
|
return first === last ? first : w.t("card.span", { from: first, to: last });
|
|
20114
20880
|
}
|
|
20115
|
-
function sessionStatus(session) {
|
|
20881
|
+
function sessionStatus(session, tierOf) {
|
|
20116
20882
|
const applied = session.tests.filter(
|
|
20117
|
-
(t) => t.verdict !== "not_applicable" && t.verdict !== "out_of_scope" && t.verdict !== "not_yet_in_force"
|
|
20883
|
+
(t) => (tierOf === void 0 || tierOf(t.claim?.contractRef, t.criterionId) !== "informational") && t.verdict !== "not_applicable" && t.verdict !== "out_of_scope" && t.verdict !== "not_yet_in_force"
|
|
20118
20884
|
);
|
|
20119
20885
|
if (applied.some((t) => t.verdict === "not_met")) return "missed";
|
|
20120
20886
|
if (applied.some((t) => t.verdict === "failed" || t.verdict === "unsupported"))
|
|
@@ -20122,22 +20888,22 @@ ${key}`);
|
|
|
20122
20888
|
if (applied.some((t) => t.verdict === "not_evaluable")) return "undecided";
|
|
20123
20889
|
return applied.length === 0 ? "nothing-applied" : "met";
|
|
20124
20890
|
}
|
|
20125
|
-
function headlineSentence(model, w) {
|
|
20891
|
+
function headlineSentence(model, w, tierOf) {
|
|
20126
20892
|
if (model.totalSessions === 0) return "";
|
|
20127
|
-
const by = (status2) => model.sessions.filter((s) => sessionStatus(s) === status2).length;
|
|
20893
|
+
const by = (status2) => model.sessions.filter((s) => sessionStatus(s, tierOf) === status2).length;
|
|
20128
20894
|
const parts = [
|
|
20129
20895
|
w.p("groups.headline", model.totalSessions, {
|
|
20130
|
-
met:
|
|
20131
|
-
n:
|
|
20896
|
+
met: fmt4(by("met")),
|
|
20897
|
+
n: fmt4(model.totalSessions)
|
|
20132
20898
|
}),
|
|
20133
|
-
w.t("groups.headline.missed", { n:
|
|
20899
|
+
w.t("groups.headline.missed", { n: fmt4(by("missed")) })
|
|
20134
20900
|
];
|
|
20135
20901
|
for (const [status2, key] of [
|
|
20136
20902
|
["unverified", "groups.headline.unverified"],
|
|
20137
20903
|
["undecided", "groups.headline.undecided"],
|
|
20138
20904
|
["nothing-applied", "groups.headline.nothing-applied"]
|
|
20139
20905
|
])
|
|
20140
|
-
if (by(status2) > 0) parts.push(w.t(key, { n:
|
|
20906
|
+
if (by(status2) > 0) parts.push(w.t(key, { n: fmt4(by(status2)) }));
|
|
20141
20907
|
return parts.join(" ");
|
|
20142
20908
|
}
|
|
20143
20909
|
function obligationWorst(obligation, totalSessions, w) {
|
|
@@ -20158,7 +20924,7 @@ ${key}`);
|
|
|
20158
20924
|
return {
|
|
20159
20925
|
kind,
|
|
20160
20926
|
text: w.t(key, {
|
|
20161
|
-
n:
|
|
20927
|
+
n: fmt4(countOf2(row2)),
|
|
20162
20928
|
sessions: count(w, "session", population(row2, totalSessions))
|
|
20163
20929
|
})
|
|
20164
20930
|
};
|
|
@@ -20166,10 +20932,10 @@ ${key}`);
|
|
|
20166
20932
|
if (inForce.some((r) => r.metCount === 0)) return void 0;
|
|
20167
20933
|
return { kind: "clean", text: w.t("groups.ob.worst.clean") };
|
|
20168
20934
|
}
|
|
20169
|
-
function renderHeader(host, model, w) {
|
|
20170
|
-
const hd =
|
|
20935
|
+
function renderHeader(host, model, w, tierOf) {
|
|
20936
|
+
const hd = el9("div", "hd");
|
|
20171
20937
|
hd.dataset.section = "header";
|
|
20172
|
-
hd.append(
|
|
20938
|
+
hd.append(el9("h1", "", w.t("groups.kicker")));
|
|
20173
20939
|
const summary = reportSummary(w);
|
|
20174
20940
|
if (summary !== void 0) hd.append(summary);
|
|
20175
20941
|
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 });
|
|
@@ -20180,7 +20946,7 @@ ${key}`);
|
|
|
20180
20946
|
sessions: count(w, "session", model.totalSessions)
|
|
20181
20947
|
};
|
|
20182
20948
|
hd.append(
|
|
20183
|
-
|
|
20949
|
+
el9(
|
|
20184
20950
|
"div",
|
|
20185
20951
|
"sub",
|
|
20186
20952
|
period === void 0 ? w.t("groups.sub", vars) : w.t(
|
|
@@ -20189,9 +20955,9 @@ ${key}`);
|
|
|
20189
20955
|
)
|
|
20190
20956
|
)
|
|
20191
20957
|
);
|
|
20192
|
-
const sentence = headlineSentence(model, w);
|
|
20958
|
+
const sentence = headlineSentence(model, w, tierOf);
|
|
20193
20959
|
if (sentence !== "") {
|
|
20194
|
-
const headline =
|
|
20960
|
+
const headline = el9("p", "sub headline", sentence);
|
|
20195
20961
|
headline.dataset.headline = "groups";
|
|
20196
20962
|
hd.append(headline);
|
|
20197
20963
|
}
|
|
@@ -20221,7 +20987,7 @@ ${key}`);
|
|
|
20221
20987
|
);
|
|
20222
20988
|
const total = inForce.length;
|
|
20223
20989
|
const uncheckedText = unchecked > 0 ? w.t("groups.ob.unchecked-of", {
|
|
20224
|
-
unchecked:
|
|
20990
|
+
unchecked: fmt4(unchecked),
|
|
20225
20991
|
total: count(w, "test", total)
|
|
20226
20992
|
}) : "";
|
|
20227
20993
|
if (exceptions > 0)
|
|
@@ -20247,15 +21013,15 @@ ${key}`);
|
|
|
20247
21013
|
return {
|
|
20248
21014
|
cls: "na",
|
|
20249
21015
|
text: w.t("groups.row.later"),
|
|
20250
|
-
note: w.t("groups.row.later-note", { n:
|
|
21016
|
+
note: w.t("groups.row.later-note", { n: fmt4(row2.notYetInForceCount) })
|
|
20251
21017
|
};
|
|
20252
21018
|
if (nothingChecked(row2))
|
|
20253
21019
|
return { cls: "ne", text: w.t("groups.row.nothing") };
|
|
20254
21020
|
if (noneDecided(row2)) {
|
|
20255
21021
|
const packNotEvaluable = row2.notEvaluableCount > 0 ? w.row(row2.criterionId, "not_evaluable") : void 0;
|
|
20256
21022
|
const moduleNotes = [
|
|
20257
|
-
...row2.unverifiedCount > 0 ? [w.t("groups.row.unverified-note", { n:
|
|
20258
|
-
...row2.notYetInForceCount > 0 ? [w.t("groups.row.later-note", { n:
|
|
21023
|
+
...row2.unverifiedCount > 0 ? [w.t("groups.row.unverified-note", { n: fmt4(row2.unverifiedCount) })] : [],
|
|
21024
|
+
...row2.notYetInForceCount > 0 ? [w.t("groups.row.later-note", { n: fmt4(row2.notYetInForceCount) })] : []
|
|
20259
21025
|
];
|
|
20260
21026
|
if (packNotEvaluable !== void 0)
|
|
20261
21027
|
return {
|
|
@@ -20277,17 +21043,17 @@ ${key}`);
|
|
|
20277
21043
|
};
|
|
20278
21044
|
}
|
|
20279
21045
|
const notes = [
|
|
20280
|
-
...row2.notEvaluableCount > 0 ? [w.t("groups.row.undecided-note", { n:
|
|
20281
|
-
...row2.unverifiedCount > 0 ? [w.t("groups.row.unverified-note", { n:
|
|
20282
|
-
...row2.outOfScopeCount > 0 ? [w.t("groups.row.out-of-scope-note", { n:
|
|
20283
|
-
...row2.notYetInForceCount > 0 ? [w.t("groups.row.later-note", { n:
|
|
21046
|
+
...row2.notEvaluableCount > 0 ? [w.t("groups.row.undecided-note", { n: fmt4(row2.notEvaluableCount) })] : [],
|
|
21047
|
+
...row2.unverifiedCount > 0 ? [w.t("groups.row.unverified-note", { n: fmt4(row2.unverifiedCount) })] : [],
|
|
21048
|
+
...row2.outOfScopeCount > 0 ? [w.t("groups.row.out-of-scope-note", { n: fmt4(row2.outOfScopeCount) })] : [],
|
|
21049
|
+
...row2.notYetInForceCount > 0 ? [w.t("groups.row.later-note", { n: fmt4(row2.notYetInForceCount) })] : []
|
|
20284
21050
|
];
|
|
20285
21051
|
const undecided = notes.length > 0 ? { note: notes.join("; ") } : {};
|
|
20286
21052
|
if (row2.notMetCount > 0)
|
|
20287
21053
|
return {
|
|
20288
21054
|
cls: "exc",
|
|
20289
21055
|
text: w.p("groups.row.exceptions", row2.notMetCount, {
|
|
20290
|
-
n:
|
|
21056
|
+
n: fmt4(row2.notMetCount)
|
|
20291
21057
|
}),
|
|
20292
21058
|
...undecided
|
|
20293
21059
|
};
|
|
@@ -20329,7 +21095,7 @@ ${key}`);
|
|
|
20329
21095
|
const ids = row2.sessionsByVerdict.get(bucket) ?? [];
|
|
20330
21096
|
const action = evidenceAction(
|
|
20331
21097
|
`test:${row2.criterionId}:${bucket}`,
|
|
20332
|
-
`${row2.name} \xB7 ${word}: ${
|
|
21098
|
+
`${row2.name} \xB7 ${word}: ${fmt4(ids.length)}`,
|
|
20333
21099
|
ids.map((id) => claimOf(model, id, row2.criterionId)),
|
|
20334
21100
|
result,
|
|
20335
21101
|
w,
|
|
@@ -20349,15 +21115,15 @@ ${key}`);
|
|
|
20349
21115
|
]);
|
|
20350
21116
|
return model.sessions.filter((s) => !outside.has(s.conversationId)).map((s) => s.tests.find((t) => t.criterionId === row2.criterionId)?.claim);
|
|
20351
21117
|
}
|
|
20352
|
-
function renderSummary(host, model, presentation, result, w) {
|
|
20353
|
-
const section =
|
|
21118
|
+
function renderSummary(host, model, presentation, result, w, tierOf) {
|
|
21119
|
+
const section = el9("section", "");
|
|
20354
21120
|
section.dataset.section = "summary";
|
|
20355
21121
|
const regulation = maybeProducer(w, "p", "kicker", model.regulation, true);
|
|
20356
21122
|
regulation.dataset.regulation = "";
|
|
20357
|
-
section.append(regulation,
|
|
21123
|
+
section.append(regulation, el9("h2", "", w.t("groups.summary.h")));
|
|
20358
21124
|
const tests = model.obligations.reduce((n, o) => n + o.rows.length, 0);
|
|
20359
21125
|
section.append(
|
|
20360
|
-
|
|
21126
|
+
el9(
|
|
20361
21127
|
"p",
|
|
20362
21128
|
"lede",
|
|
20363
21129
|
w.t("groups.summary.lede", {
|
|
@@ -20366,126 +21132,165 @@ ${key}`);
|
|
|
20366
21132
|
})
|
|
20367
21133
|
)
|
|
20368
21134
|
);
|
|
20369
|
-
const
|
|
20370
|
-
|
|
20371
|
-
|
|
21135
|
+
const table3 = document.createElement("table");
|
|
21136
|
+
table3.className = "grid sum";
|
|
21137
|
+
table3.dataset.rows = "summary";
|
|
20372
21138
|
const thead = document.createElement("thead");
|
|
20373
21139
|
const headRow = document.createElement("tr");
|
|
20374
21140
|
headRow.append(
|
|
20375
21141
|
element4("th", w.t("groups.summary.col.test")),
|
|
20376
|
-
|
|
21142
|
+
el9("th", "n", w.t("groups.summary.col.checked-in")),
|
|
20377
21143
|
element4("th", w.t("groups.summary.col.result"))
|
|
20378
21144
|
);
|
|
20379
21145
|
thead.append(headRow);
|
|
20380
|
-
|
|
20381
|
-
|
|
20382
|
-
|
|
20383
|
-
|
|
20384
|
-
|
|
20385
|
-
|
|
20386
|
-
|
|
20387
|
-
|
|
20388
|
-
|
|
20389
|
-
|
|
20390
|
-
|
|
20391
|
-
|
|
20392
|
-
|
|
20393
|
-
|
|
20394
|
-
|
|
20395
|
-
|
|
20396
|
-
|
|
20397
|
-
|
|
20398
|
-
|
|
20399
|
-
|
|
20400
|
-
|
|
20401
|
-
|
|
20402
|
-
|
|
20403
|
-
|
|
20404
|
-
aboutCell.setAttribute("colspan", "3");
|
|
20405
|
-
about.append(aboutCell);
|
|
20406
|
-
expandableRow(
|
|
20407
|
-
row2,
|
|
20408
|
-
name,
|
|
20409
|
-
about,
|
|
20410
|
-
() => {
|
|
20411
|
-
const body = el8("div", "ob-x");
|
|
20412
|
-
if (obligation.plain !== NOT_STATED)
|
|
20413
|
-
body.append(maybeProducer(w, "div", "plain", obligation.plain, true));
|
|
20414
|
-
body.append(
|
|
20415
|
-
maybeProducer(
|
|
20416
|
-
w,
|
|
20417
|
-
"div",
|
|
20418
|
-
"applic",
|
|
20419
|
-
obligation.applicability.note,
|
|
20420
|
-
obligation.mapped
|
|
20421
|
-
)
|
|
20422
|
-
);
|
|
20423
|
-
return body;
|
|
20424
|
-
},
|
|
20425
|
-
`ob-${obligation.key}`,
|
|
20426
|
-
true
|
|
20427
|
-
);
|
|
20428
|
-
tbody.append(about);
|
|
20429
|
-
for (const test of obligation.rows) {
|
|
20430
|
-
const tr = el8("tr", "test");
|
|
20431
|
-
tr.dataset.criterion = test.criterionId;
|
|
20432
|
-
const counted = population(test, model.totalSessions);
|
|
20433
|
-
tr.dataset.population = String(counted);
|
|
20434
|
-
tr.dataset.outOfScope = String(test.outOfScopeCount);
|
|
20435
|
-
tr.dataset.notYetInForce = String(test.notYetInForceCount);
|
|
20436
|
-
tr.dataset.exceptions = String(test.notMetCount);
|
|
20437
|
-
tr.dataset.notEvaluable = String(test.notEvaluableCount);
|
|
20438
|
-
tr.dataset.unverified = String(test.unverifiedCount);
|
|
20439
|
-
const nameCell = el8("td", "tn");
|
|
20440
|
-
const head2 = el8("div", "tnh");
|
|
20441
|
-
const testName = rowName2(w, "b", "", test);
|
|
20442
|
-
head2.append(testName, tierBadge(test.tier, w));
|
|
20443
|
-
nameCell.append(head2);
|
|
20444
|
-
const detail = w.row(test.criterionId, "detail");
|
|
20445
|
-
if (detail !== void 0)
|
|
20446
|
-
nameCell.append(packWord("div", "plain", detail));
|
|
20447
|
-
const sessionIds = [
|
|
20448
|
-
...test.sessionsByVerdict.get("not_met") ?? [],
|
|
20449
|
-
...test.sessionsByVerdict.get("unverified") ?? [],
|
|
20450
|
-
...test.sessionsByVerdict.get("not_evaluable") ?? []
|
|
20451
|
-
];
|
|
20452
|
-
const checkedIn = el8("td", "n");
|
|
20453
|
-
checkedIn.dataset.column = "checked-in";
|
|
20454
|
-
checkedIn.append(el8("span", "nv", count(w, "session", counted)));
|
|
20455
|
-
const action = evidenceAction(
|
|
20456
|
-
`test:${test.criterionId}:checked-in`,
|
|
20457
|
-
`${test.name} \xB7 ${w.t("groups.summary.col.checked-in")}: ${count(w, "session", counted)}`,
|
|
20458
|
-
populationClaims(test, model),
|
|
20459
|
-
result,
|
|
20460
|
-
w
|
|
21146
|
+
table3.append(thead);
|
|
21147
|
+
const tierOfRow = (row2) => tierOf?.(
|
|
21148
|
+
model.sessions.flatMap((s) => s.tests).find((t) => t.criterionId === row2.criterionId && t.claim)?.claim?.contractRef,
|
|
21149
|
+
row2.criterionId
|
|
21150
|
+
);
|
|
21151
|
+
const allRows = model.obligations.flatMap((o) => o.rows);
|
|
21152
|
+
const sections = tierOf === void 0 ? [void 0] : ROW_TIERS.filter((tier) => allRows.some((r) => tierOfRow(r) === tier));
|
|
21153
|
+
for (const tier of sections) {
|
|
21154
|
+
if (tier !== void 0) {
|
|
21155
|
+
const head2 = document.createElement("tbody");
|
|
21156
|
+
head2.dataset.requirementTier = tier;
|
|
21157
|
+
const tr = el9("tr", "tier");
|
|
21158
|
+
tr.dataset.requirementTier = tier;
|
|
21159
|
+
const cell2 = el9("td", "");
|
|
21160
|
+
cell2.setAttribute("colspan", "3");
|
|
21161
|
+
cell2.append(
|
|
21162
|
+
el9(
|
|
21163
|
+
"b",
|
|
21164
|
+
"",
|
|
21165
|
+
w.t(`groups.rtier.${tier}.title`, {
|
|
21166
|
+
n: fmt4(allRows.filter((r) => tierOfRow(r) === tier).length)
|
|
21167
|
+
})
|
|
21168
|
+
),
|
|
21169
|
+
el9("small", "", w.t(`groups.rtier.${tier}.note`))
|
|
20461
21170
|
);
|
|
20462
|
-
|
|
20463
|
-
|
|
20464
|
-
|
|
20465
|
-
|
|
20466
|
-
|
|
20467
|
-
|
|
20468
|
-
|
|
20469
|
-
|
|
20470
|
-
|
|
20471
|
-
|
|
20472
|
-
|
|
20473
|
-
|
|
20474
|
-
|
|
20475
|
-
|
|
20476
|
-
|
|
21171
|
+
tr.append(cell2);
|
|
21172
|
+
head2.append(tr);
|
|
21173
|
+
table3.append(head2);
|
|
21174
|
+
}
|
|
21175
|
+
for (const given of model.obligations) {
|
|
21176
|
+
const obligation = tier === void 0 ? given : { ...given, rows: given.rows.filter((r) => tierOfRow(r) === tier) };
|
|
21177
|
+
if (obligation.rows.length === 0) continue;
|
|
21178
|
+
const tbody = document.createElement("tbody");
|
|
21179
|
+
tbody.dataset.obligationGroup = obligation.key;
|
|
21180
|
+
const row2 = el9("tr", "ob");
|
|
21181
|
+
row2.dataset.obligation = obligation.key;
|
|
21182
|
+
const title = el9("td", "");
|
|
21183
|
+
title.setAttribute("colspan", "3");
|
|
21184
|
+
const name = el9("b", "obn");
|
|
21185
|
+
name.append(
|
|
21186
|
+
...obligationName(w, obligation, el9("span", "art", obligation.article))
|
|
21187
|
+
);
|
|
21188
|
+
title.append(name);
|
|
21189
|
+
const worst = obligationWorst(obligation, model.totalSessions, w);
|
|
21190
|
+
if (worst !== void 0) {
|
|
21191
|
+
const line = el9("div", "applic worst", worst.text);
|
|
21192
|
+
line.dataset.worst = worst.kind;
|
|
21193
|
+
title.append(line);
|
|
21194
|
+
}
|
|
21195
|
+
row2.append(title);
|
|
21196
|
+
tbody.append(row2);
|
|
21197
|
+
const about = el9("tr", "drill-row ob-about");
|
|
21198
|
+
about.dataset.aboutFor = obligation.key;
|
|
21199
|
+
const aboutCell = el9("td", "");
|
|
21200
|
+
aboutCell.setAttribute("colspan", "3");
|
|
21201
|
+
about.append(aboutCell);
|
|
21202
|
+
expandableRow(
|
|
21203
|
+
row2,
|
|
21204
|
+
name,
|
|
21205
|
+
about,
|
|
21206
|
+
() => {
|
|
21207
|
+
const body = el9("div", "ob-x");
|
|
21208
|
+
if (obligation.plain !== NOT_STATED)
|
|
21209
|
+
body.append(
|
|
21210
|
+
maybeProducer(w, "div", "plain", obligation.plain, true)
|
|
21211
|
+
);
|
|
21212
|
+
body.append(
|
|
21213
|
+
maybeProducer(
|
|
21214
|
+
w,
|
|
21215
|
+
"div",
|
|
21216
|
+
"applic",
|
|
21217
|
+
obligation.applicability.note,
|
|
21218
|
+
obligation.mapped
|
|
21219
|
+
)
|
|
21220
|
+
);
|
|
21221
|
+
return body;
|
|
21222
|
+
},
|
|
21223
|
+
tier === void 0 ? `ob-${obligation.key}` : `ob-${obligation.key}-${tier}`,
|
|
21224
|
+
true
|
|
21225
|
+
);
|
|
21226
|
+
tbody.append(about);
|
|
21227
|
+
for (const test of obligation.rows) {
|
|
21228
|
+
const tr = el9("tr", "test");
|
|
21229
|
+
tr.dataset.criterion = test.criterionId;
|
|
21230
|
+
const counted2 = population(test, model.totalSessions);
|
|
21231
|
+
tr.dataset.population = String(counted2);
|
|
21232
|
+
tr.dataset.outOfScope = String(test.outOfScopeCount);
|
|
21233
|
+
tr.dataset.notYetInForce = String(test.notYetInForceCount);
|
|
21234
|
+
tr.dataset.exceptions = String(test.notMetCount);
|
|
21235
|
+
tr.dataset.notEvaluable = String(test.notEvaluableCount);
|
|
21236
|
+
tr.dataset.unverified = String(test.unverifiedCount);
|
|
21237
|
+
const nameCell = el9("td", "tn");
|
|
21238
|
+
const head2 = el9("div", "tnh");
|
|
21239
|
+
const testName = rowName2(w, "b", "", test);
|
|
21240
|
+
head2.append(testName, tierBadge(test.tier, w));
|
|
21241
|
+
if (tier !== void 0) {
|
|
21242
|
+
tr.dataset.requirementTier = tier;
|
|
21243
|
+
const chip = el9("span", "rtier", w.t(`requirement_tier.${tier}`));
|
|
21244
|
+
chip.dataset.requirementTier = tier;
|
|
21245
|
+
head2.append(chip);
|
|
21246
|
+
}
|
|
21247
|
+
nameCell.append(head2);
|
|
21248
|
+
const detail = w.row(test.criterionId, "detail");
|
|
21249
|
+
if (detail !== void 0)
|
|
21250
|
+
nameCell.append(packWord("div", "plain", detail));
|
|
21251
|
+
const sessionIds = [
|
|
21252
|
+
...test.sessionsByVerdict.get("not_met") ?? [],
|
|
21253
|
+
...test.sessionsByVerdict.get("unverified") ?? [],
|
|
21254
|
+
...test.sessionsByVerdict.get("not_evaluable") ?? []
|
|
21255
|
+
];
|
|
21256
|
+
const checkedIn = el9("td", "n");
|
|
21257
|
+
checkedIn.dataset.column = "checked-in";
|
|
21258
|
+
checkedIn.append(el9("span", "nv", count(w, "session", counted2)));
|
|
21259
|
+
const action = evidenceAction(
|
|
21260
|
+
`test:${test.criterionId}:checked-in`,
|
|
21261
|
+
`${test.name} \xB7 ${w.t("groups.summary.col.checked-in")}: ${count(w, "session", counted2)}`,
|
|
21262
|
+
populationClaims(test, model),
|
|
21263
|
+
result,
|
|
21264
|
+
w
|
|
20477
21265
|
);
|
|
20478
|
-
|
|
20479
|
-
|
|
20480
|
-
tbody.append(
|
|
21266
|
+
if (action !== void 0) checkedIn.append(action);
|
|
21267
|
+
tr.append(nameCell, checkedIn, rowResult(test, model, result, w));
|
|
21268
|
+
tbody.append(tr);
|
|
21269
|
+
if (sessionIds.length > 0) {
|
|
21270
|
+
const drillRow = el9("tr", "drill-row");
|
|
21271
|
+
drillRow.dataset.drillFor = test.criterionId;
|
|
21272
|
+
const cell2 = document.createElement("td");
|
|
21273
|
+
cell2.setAttribute("colspan", "3");
|
|
21274
|
+
drillRow.append(cell2);
|
|
21275
|
+
const toggle = expandableRow(
|
|
21276
|
+
tr,
|
|
21277
|
+
testName,
|
|
21278
|
+
drillRow,
|
|
21279
|
+
() => renderSessionList(sessionIds, model, presentation, w),
|
|
21280
|
+
`test-${obligation.key}-${test.criterionId}`
|
|
21281
|
+
);
|
|
21282
|
+
toggle.dataset.records = "sessions";
|
|
21283
|
+
toggle.dataset.drill = test.criterionId;
|
|
21284
|
+
tbody.append(drillRow);
|
|
21285
|
+
}
|
|
20481
21286
|
}
|
|
21287
|
+
table3.append(tbody);
|
|
20482
21288
|
}
|
|
20483
|
-
table2.append(tbody);
|
|
20484
21289
|
}
|
|
20485
|
-
section.append(
|
|
20486
|
-
const notes =
|
|
21290
|
+
section.append(table3);
|
|
21291
|
+
const notes = el9("aside", "footnotes");
|
|
20487
21292
|
notes.dataset.section = "footnotes";
|
|
20488
|
-
const basis =
|
|
21293
|
+
const basis = el9("p", "", w.t("groups.summary.basis"));
|
|
20489
21294
|
basis.dataset.basis = "terms";
|
|
20490
21295
|
notes.append(basis);
|
|
20491
21296
|
section.append(notes);
|
|
@@ -20493,21 +21298,21 @@ ${key}`);
|
|
|
20493
21298
|
}
|
|
20494
21299
|
function renderFindings(host, model, w) {
|
|
20495
21300
|
if (model.findings.length === 0) return;
|
|
20496
|
-
const section =
|
|
21301
|
+
const section = el9("section", "findings");
|
|
20497
21302
|
section.dataset.section = "findings";
|
|
20498
21303
|
section.dataset.producer = "";
|
|
20499
21304
|
section.append(
|
|
20500
|
-
|
|
20501
|
-
|
|
21305
|
+
el9("div", "plabel", w.t("front.findings.label")),
|
|
21306
|
+
el9("h2", "", w.t("front.findings.h"))
|
|
20502
21307
|
);
|
|
20503
21308
|
for (const finding of model.findings)
|
|
20504
21309
|
section.append(renderFinding(finding, w));
|
|
20505
21310
|
host.append(section);
|
|
20506
21311
|
}
|
|
20507
21312
|
function renderFinding(finding, w) {
|
|
20508
|
-
const box =
|
|
21313
|
+
const box = el9("div", "fnd");
|
|
20509
21314
|
box.dataset.finding = finding.id;
|
|
20510
|
-
const fh =
|
|
21315
|
+
const fh = el9("div", "fh");
|
|
20511
21316
|
fh.append(
|
|
20512
21317
|
maybeProducer(w, "b", "", w.t("groups.finding", { id: finding.id }), true),
|
|
20513
21318
|
severityPill(finding.severity, w),
|
|
@@ -20515,14 +21320,14 @@ ${key}`);
|
|
|
20515
21320
|
);
|
|
20516
21321
|
box.append(fh);
|
|
20517
21322
|
box.append(maybeProducer(w, "div", "rec", finding.recommendation, true));
|
|
20518
|
-
const own =
|
|
21323
|
+
const own = el9("div", "own", w.t("groups.finding.owner"));
|
|
20519
21324
|
own.append(producerText(w, finding.ownerDue));
|
|
20520
21325
|
box.append(own);
|
|
20521
21326
|
return box;
|
|
20522
21327
|
}
|
|
20523
21328
|
function renderSessionList(conversationIds, model, presentation, w) {
|
|
20524
21329
|
const byId = new Map(model.sessions.map((s) => [s.conversationId, s]));
|
|
20525
|
-
const list2 =
|
|
21330
|
+
const list2 = el9("div", "convs");
|
|
20526
21331
|
list2.dataset.sessionCount = String(conversationIds.length);
|
|
20527
21332
|
for (const id of conversationIds) {
|
|
20528
21333
|
const session = byId.get(id);
|
|
@@ -20532,7 +21337,7 @@ ${key}`);
|
|
|
20532
21337
|
return list2;
|
|
20533
21338
|
}
|
|
20534
21339
|
function laterNote(test, w, tag) {
|
|
20535
|
-
const note =
|
|
21340
|
+
const note = el9(
|
|
20536
21341
|
tag,
|
|
20537
21342
|
"applic",
|
|
20538
21343
|
w.t("groups.later.note", { date: test.claim?.appliesFrom ?? "" })
|
|
@@ -20556,10 +21361,10 @@ ${key}`);
|
|
|
20556
21361
|
const unverified = session.tests.filter(isUnverified2);
|
|
20557
21362
|
const undecided = session.tests.filter((t) => t.verdict === "not_evaluable");
|
|
20558
21363
|
const parts = caseParts(session.conversationId, w);
|
|
20559
|
-
const item =
|
|
21364
|
+
const item = el9("article", "conv session");
|
|
20560
21365
|
item.dataset.session = session.conversationId;
|
|
20561
|
-
const head2 =
|
|
20562
|
-
head2.append(
|
|
21366
|
+
const head2 = el9("div", "conv-h");
|
|
21367
|
+
head2.append(el9("span", "cid", parts.label));
|
|
20563
21368
|
head2.append(
|
|
20564
21369
|
exceptions.length > 0 ? wordPill(
|
|
20565
21370
|
{ word: count(w, "exception", exceptions.length), tone: "bad" },
|
|
@@ -20575,28 +21380,28 @@ ${key}`);
|
|
|
20575
21380
|
"none"
|
|
20576
21381
|
)
|
|
20577
21382
|
);
|
|
20578
|
-
const why =
|
|
21383
|
+
const why = el9("span", "cwhy");
|
|
20579
21384
|
(exceptions.length > 0 ? exceptions : unverified.length > 0 ? unverified : undecided).forEach((t, i) => {
|
|
20580
21385
|
if (i > 0) why.append(", ");
|
|
20581
21386
|
why.append(names2(t.criterionId, "span", ""));
|
|
20582
21387
|
});
|
|
20583
21388
|
head2.append(why);
|
|
20584
|
-
head2.append(
|
|
21389
|
+
head2.append(el9("span", "cmodel", parts.model ?? session.day));
|
|
20585
21390
|
item.append(head2);
|
|
20586
|
-
const body =
|
|
21391
|
+
const body = el9("div", "conv-slot");
|
|
20587
21392
|
item.append(body);
|
|
20588
21393
|
lazyBody(body, () => sessionBody(session, model, presentation, w));
|
|
20589
21394
|
return item;
|
|
20590
21395
|
}
|
|
20591
21396
|
function sessionBody(session, model, presentation, w) {
|
|
20592
21397
|
const names2 = testNames(model, w);
|
|
20593
|
-
const body =
|
|
20594
|
-
body.append(
|
|
21398
|
+
const body = el9("div", "conv-b");
|
|
21399
|
+
body.append(el9("h4", "", w.t("groups.h.test-by-test")));
|
|
20595
21400
|
for (const test of session.tests) {
|
|
20596
|
-
const box =
|
|
21401
|
+
const box = el9("div", "ck");
|
|
20597
21402
|
box.dataset.crit = test.criterionId;
|
|
20598
21403
|
box.dataset.critVerdict = test.verdict;
|
|
20599
|
-
const h =
|
|
21404
|
+
const h = el9("div", "h");
|
|
20600
21405
|
h.append(
|
|
20601
21406
|
wordPill(
|
|
20602
21407
|
ruleWord(
|
|
@@ -20611,13 +21416,13 @@ ${key}`);
|
|
|
20611
21416
|
if (test.verdict !== "not_applicable" && test.verdict !== "not_yet_in_force")
|
|
20612
21417
|
h.append(tierBadge(test.tier, w));
|
|
20613
21418
|
if (test.verdict === "failed" || test.verdict === "unsupported")
|
|
20614
|
-
h.append(
|
|
21419
|
+
h.append(el9("span", "applic", w.t("groups.unverified-note")));
|
|
20615
21420
|
if (test.verdict === "not_yet_in_force")
|
|
20616
21421
|
h.append(laterNote(test, w, "span"));
|
|
20617
21422
|
box.append(h);
|
|
20618
21423
|
if (test.rationale !== void 0)
|
|
20619
21424
|
box.append(
|
|
20620
|
-
|
|
21425
|
+
el9(
|
|
20621
21426
|
"div",
|
|
20622
21427
|
"why",
|
|
20623
21428
|
judgeNote(test.rationale, test.claim?.verdict ?? test.verdict, w)
|
|
@@ -20626,7 +21431,7 @@ ${key}`);
|
|
|
20626
21431
|
body.append(box);
|
|
20627
21432
|
}
|
|
20628
21433
|
if (session.tests.every((t) => t.rationale === void 0)) {
|
|
20629
|
-
const gap =
|
|
21434
|
+
const gap = el9(
|
|
20630
21435
|
"p",
|
|
20631
21436
|
"small",
|
|
20632
21437
|
notesGap(
|
|
@@ -20689,7 +21494,7 @@ ${key}`);
|
|
|
20689
21494
|
}
|
|
20690
21495
|
function sessionProofs(session, model, w) {
|
|
20691
21496
|
const names2 = testNames(model, w);
|
|
20692
|
-
const box =
|
|
21497
|
+
const box = el9("div", "pf-b");
|
|
20693
21498
|
box.dataset.proofsFor = session.conversationId;
|
|
20694
21499
|
const dated = session.dated;
|
|
20695
21500
|
const dating = dated.basis === "judged" ? [] : [
|
|
@@ -20718,9 +21523,9 @@ ${key}`);
|
|
|
20718
21523
|
const dl = proofList(rows);
|
|
20719
21524
|
dl.dataset.checkIt = session.conversationId;
|
|
20720
21525
|
box.append(dl);
|
|
20721
|
-
box.append(
|
|
21526
|
+
box.append(el9("h5", "", w.t("groups.pf.h.each-report")));
|
|
20722
21527
|
for (const test of session.tests) {
|
|
20723
|
-
const ev =
|
|
21528
|
+
const ev = el9("div", "ev");
|
|
20724
21529
|
ev.dataset.proofCrit = test.criterionId;
|
|
20725
21530
|
const label = names2(test.criterionId, "b", "");
|
|
20726
21531
|
label.append(": ");
|
|
@@ -20742,7 +21547,7 @@ ${key}`);
|
|
|
20742
21547
|
)
|
|
20743
21548
|
);
|
|
20744
21549
|
if (test.rationale !== void 0) {
|
|
20745
|
-
const sealed =
|
|
21550
|
+
const sealed = el9(
|
|
20746
21551
|
"div",
|
|
20747
21552
|
"sealed",
|
|
20748
21553
|
w.t("groups.pf.rationale", { rationale: test.rationale })
|
|
@@ -20766,14 +21571,14 @@ ${key}`);
|
|
|
20766
21571
|
return pinAbsence(model.runInfo, w) ?? w.t("groups.pin.none");
|
|
20767
21572
|
}
|
|
20768
21573
|
function renderReportProofs2(host, model, bundle, verified, w) {
|
|
20769
|
-
const section =
|
|
21574
|
+
const section = el9("section", "rp");
|
|
20770
21575
|
section.dataset.section = "report-proofs";
|
|
20771
21576
|
section.append(
|
|
20772
21577
|
levelToggle(
|
|
20773
21578
|
2,
|
|
20774
21579
|
w.t("groups.rp.toggle"),
|
|
20775
21580
|
() => {
|
|
20776
|
-
const box =
|
|
21581
|
+
const box = el9("div", "pf-b");
|
|
20777
21582
|
renderObligationDetails(box, model, w);
|
|
20778
21583
|
renderQuality(box, model, w);
|
|
20779
21584
|
renderWhatRan2(box, model, w);
|
|
@@ -20786,11 +21591,11 @@ ${key}`);
|
|
|
20786
21591
|
host.append(section);
|
|
20787
21592
|
}
|
|
20788
21593
|
function renderObligationDetails(host, model, w) {
|
|
20789
|
-
const part =
|
|
21594
|
+
const part = el9("div", "rp-s");
|
|
20790
21595
|
part.dataset.section = "obligation-detail";
|
|
20791
|
-
part.append(
|
|
21596
|
+
part.append(el9("h3", "", w.t("groups.od.h")));
|
|
20792
21597
|
for (const obligation of model.obligations) {
|
|
20793
|
-
const box =
|
|
21598
|
+
const box = el9("div", "obd");
|
|
20794
21599
|
box.dataset.obligationDetail = obligation.key;
|
|
20795
21600
|
box.dataset.mapped = String(obligation.mapped);
|
|
20796
21601
|
const heading = element4("h5");
|
|
@@ -20799,26 +21604,26 @@ ${key}`);
|
|
|
20799
21604
|
);
|
|
20800
21605
|
box.append(heading);
|
|
20801
21606
|
box.append(
|
|
20802
|
-
|
|
21607
|
+
el9(
|
|
20803
21608
|
"p",
|
|
20804
21609
|
"na",
|
|
20805
21610
|
w.t(obligation.mapped ? "groups.od.mapped" : "groups.od.unmapped")
|
|
20806
21611
|
)
|
|
20807
21612
|
);
|
|
20808
21613
|
if (obligation.judgedTerms.length > 0) {
|
|
20809
|
-
const terms =
|
|
21614
|
+
const terms = el9("p", "applic", w.t("groups.od.judged-terms"));
|
|
20810
21615
|
terms.append(producerText(w, obligation.judgedTerms.join(", ")));
|
|
20811
21616
|
box.append(terms);
|
|
20812
21617
|
}
|
|
20813
21618
|
box.append(maybeProducer(w, "p", "", obligation.method, obligation.mapped));
|
|
20814
21619
|
for (const row2 of obligation.rows) {
|
|
20815
|
-
const rowBox =
|
|
21620
|
+
const rowBox = el9("div", "ck");
|
|
20816
21621
|
rowBox.dataset.wording = row2.wording.source;
|
|
20817
|
-
const h =
|
|
21622
|
+
const h = el9("div", "h");
|
|
20818
21623
|
h.append(rowName2(w, "span", "", row2), tierBadge(row2.tier, w));
|
|
20819
21624
|
rowBox.append(h);
|
|
20820
21625
|
rowBox.append(
|
|
20821
|
-
|
|
21626
|
+
el9(
|
|
20822
21627
|
"div",
|
|
20823
21628
|
"why",
|
|
20824
21629
|
row2.wording.source === "sealed" ? w.t("groups.od.wording.sealed", { text: row2.wording.text }) : w.t(
|
|
@@ -20840,16 +21645,16 @@ ${key}`);
|
|
|
20840
21645
|
host.append(part);
|
|
20841
21646
|
}
|
|
20842
21647
|
function renderQuality(host, model, w) {
|
|
20843
|
-
const part =
|
|
21648
|
+
const part = el9("div", "rp-s");
|
|
20844
21649
|
part.dataset.section = "quality";
|
|
20845
|
-
part.append(
|
|
21650
|
+
part.append(el9("h3", "", w.t("groups.q.h")));
|
|
20846
21651
|
const protocol = model.qualityProtocol;
|
|
20847
21652
|
if (protocol === void 0) {
|
|
20848
|
-
part.append(
|
|
21653
|
+
part.append(el9("p", "", w.t("groups.q.none")));
|
|
20849
21654
|
host.append(part);
|
|
20850
21655
|
return;
|
|
20851
21656
|
}
|
|
20852
|
-
const line =
|
|
21657
|
+
const line = el9("p", "", w.t("groups.q.protocol"));
|
|
20853
21658
|
line.append(
|
|
20854
21659
|
protocol.protocol === void 0 ? w.t("groups.q.unspecified") : producerText(w, protocol.protocol)
|
|
20855
21660
|
);
|
|
@@ -20862,9 +21667,9 @@ ${key}`);
|
|
|
20862
21667
|
host.append(part);
|
|
20863
21668
|
}
|
|
20864
21669
|
function renderWhatRan2(host, model, w) {
|
|
20865
|
-
const part =
|
|
21670
|
+
const part = el9("div", "rp-s");
|
|
20866
21671
|
part.dataset.section = "methodology";
|
|
20867
|
-
part.append(
|
|
21672
|
+
part.append(el9("h3", "", w.t("groups.ran.h")));
|
|
20868
21673
|
const dl = proofList([
|
|
20869
21674
|
[
|
|
20870
21675
|
w.t("groups.ran.contract"),
|
|
@@ -20873,7 +21678,7 @@ ${key}`);
|
|
|
20873
21678
|
)
|
|
20874
21679
|
],
|
|
20875
21680
|
[w.t("groups.ran.judge-pin"), pinText(model, w)],
|
|
20876
|
-
[w.t("groups.ran.sessions"),
|
|
21681
|
+
[w.t("groups.ran.sessions"), fmt4(model.totalSessions)],
|
|
20877
21682
|
...model.dating.from === void 0 || model.dating.to === void 0 ? [] : [
|
|
20878
21683
|
[
|
|
20879
21684
|
w.t("groups.ran.period"),
|
|
@@ -20895,19 +21700,19 @@ ${key}`);
|
|
|
20895
21700
|
part.append(dl);
|
|
20896
21701
|
const note = datingStatement(model.dating, model.totalSessions, w);
|
|
20897
21702
|
if (note !== void 0) {
|
|
20898
|
-
const p =
|
|
21703
|
+
const p = el9("p", "na", note);
|
|
20899
21704
|
p.dataset.dateNote = model.dating.basis;
|
|
20900
21705
|
part.append(p);
|
|
20901
21706
|
}
|
|
20902
21707
|
host.append(part);
|
|
20903
21708
|
}
|
|
20904
21709
|
function renderVerificationDetails2(host, bundle, verified, w) {
|
|
20905
|
-
const part =
|
|
21710
|
+
const part = el9("div", "rp-s");
|
|
20906
21711
|
part.dataset.section = "verification-details";
|
|
20907
|
-
part.append(
|
|
21712
|
+
part.append(el9("h3", "", w.t("card.vd.h")));
|
|
20908
21713
|
const model = buildVerificationPageModel(bundle, verified);
|
|
20909
21714
|
part.append(proofList(verificationRows(model, w)));
|
|
20910
|
-
part.append(
|
|
21715
|
+
part.append(el9("p", "", w.t("groups.vd.note")));
|
|
20911
21716
|
host.append(part);
|
|
20912
21717
|
}
|
|
20913
21718
|
var GROUPS_FRAME = {
|
|
@@ -20916,16 +21721,16 @@ ${key}`);
|
|
|
20916
21721
|
page: "compliance",
|
|
20917
21722
|
css: COMPLIANCE_CSS
|
|
20918
21723
|
};
|
|
20919
|
-
async function drawGroups(levels, result, presentation, bundle, verified, w) {
|
|
21724
|
+
async function drawGroups(levels, result, presentation, bundle, verified, w, tierOf) {
|
|
20920
21725
|
const model = buildComplianceModel(result, presentation);
|
|
20921
21726
|
const claims = model.sessions.flatMap(
|
|
20922
21727
|
(s) => s.tests.flatMap((t) => t.claim === void 0 ? [] : [t.claim])
|
|
20923
21728
|
);
|
|
20924
21729
|
levels.L0.append(renderLegend(w));
|
|
20925
|
-
const sheet =
|
|
20926
|
-
renderHeader(sheet, model, w);
|
|
21730
|
+
const sheet = el9("div", "l0-card");
|
|
21731
|
+
renderHeader(sheet, model, w, tierOf);
|
|
20927
21732
|
levels.L0.append(sheet);
|
|
20928
|
-
renderSummary(levels.L1, model, presentation, result, w);
|
|
21733
|
+
renderSummary(levels.L1, model, presentation, result, w, tierOf);
|
|
20929
21734
|
leadWithProvenance(
|
|
20930
21735
|
levels.L1,
|
|
20931
21736
|
levels.L1.querySelector('[data-section="summary"]'),
|
|
@@ -20940,10 +21745,16 @@ ${key}`);
|
|
|
20940
21745
|
|
|
20941
21746
|
// src/contract-report.ts
|
|
20942
21747
|
var FRAMES = { lines: LINES_FRAME, groups: GROUPS_FRAME };
|
|
21748
|
+
function tierReader(result, contract) {
|
|
21749
|
+
if (contract === void 0) return void 0;
|
|
21750
|
+
const single = citesOneContract(result) ? result.claims[0]?.contractRef : void 0;
|
|
21751
|
+
return (contractRef, requirementRef) => rowTier(contract, contractRef ?? single ?? "", requirementRef);
|
|
21752
|
+
}
|
|
20943
21753
|
function citesOneContract(result) {
|
|
20944
21754
|
return new Set(result.claims.map((claim) => claim.contractRef)).size <= 1;
|
|
20945
21755
|
}
|
|
20946
|
-
async function renderContractReport(result, input, bundle, verified, host, wording) {
|
|
21756
|
+
async function renderContractReport(result, input, bundle, verified, host, wording, contract) {
|
|
21757
|
+
const tierOf = tierReader(result, contract);
|
|
20947
21758
|
const w = await contractReportWords(input.grouping, wording, {
|
|
20948
21759
|
singleContract: citesOneContract(result)
|
|
20949
21760
|
});
|
|
@@ -20967,10 +21778,27 @@ ${key}`);
|
|
|
20967
21778
|
levels.L0.append(style);
|
|
20968
21779
|
const refused = refusedWordingNotice(w);
|
|
20969
21780
|
if (refused !== void 0) levels.L0.append(refused);
|
|
21781
|
+
if (tierOf !== void 0 && result.claims.some(
|
|
21782
|
+
(claim) => tierOf(claim.contractRef, claim.requirementRef) === "informational"
|
|
21783
|
+
)) {
|
|
21784
|
+
const note = document.createElement("p");
|
|
21785
|
+
note.className = "tier-note";
|
|
21786
|
+
note.dataset.sealedCounts = "informational";
|
|
21787
|
+
note.textContent = w.t(`${input.grouping}.rtier.sealed-note`);
|
|
21788
|
+
levels.L0.append(note);
|
|
21789
|
+
}
|
|
20970
21790
|
if (input.grouping === "lines")
|
|
20971
|
-
await drawLines(levels, result, input.options, bundle, verified, w);
|
|
21791
|
+
await drawLines(levels, result, input.options, bundle, verified, w, tierOf);
|
|
20972
21792
|
else
|
|
20973
|
-
await drawGroups(
|
|
21793
|
+
await drawGroups(
|
|
21794
|
+
levels,
|
|
21795
|
+
result,
|
|
21796
|
+
input.presentation,
|
|
21797
|
+
bundle,
|
|
21798
|
+
verified,
|
|
21799
|
+
w,
|
|
21800
|
+
tierOf
|
|
21801
|
+
);
|
|
20974
21802
|
regions.L0.append(levels.L0);
|
|
20975
21803
|
regions.L1.append(levels.L1);
|
|
20976
21804
|
regions.L2.append(levels.L2);
|
|
@@ -21073,7 +21901,7 @@ ${key}`);
|
|
|
21073
21901
|
for (const cell2 of cells) tr.append(element5(header ? "th" : "td", cell2));
|
|
21074
21902
|
return tr;
|
|
21075
21903
|
}
|
|
21076
|
-
function
|
|
21904
|
+
function table2(name, columns, rows) {
|
|
21077
21905
|
const node = element5("table");
|
|
21078
21906
|
node.setAttribute(`data-${name}`, "");
|
|
21079
21907
|
const head2 = element5("thead");
|
|
@@ -21148,7 +21976,7 @@ ${key}`);
|
|
|
21148
21976
|
section.append(digest);
|
|
21149
21977
|
section.append(element5("h3", "Members"));
|
|
21150
21978
|
section.append(
|
|
21151
|
-
|
|
21979
|
+
table2(
|
|
21152
21980
|
"composition-members",
|
|
21153
21981
|
[
|
|
21154
21982
|
"member",
|
|
@@ -21184,7 +22012,7 @@ ${key}`);
|
|
|
21184
22012
|
);
|
|
21185
22013
|
section.append(element5("h3", "Observers"));
|
|
21186
22014
|
section.append(
|
|
21187
|
-
|
|
22015
|
+
table2(
|
|
21188
22016
|
"composition-observers",
|
|
21189
22017
|
["observer", "role", "custody domain"],
|
|
21190
22018
|
result.observers.map((o) => {
|
|
@@ -21211,7 +22039,7 @@ ${key}`);
|
|
|
21211
22039
|
if (result.joins.length === 0) section.append(element5("p", "No joins."));
|
|
21212
22040
|
else {
|
|
21213
22041
|
section.append(
|
|
21214
|
-
|
|
22042
|
+
table2(
|
|
21215
22043
|
"composition-joins",
|
|
21216
22044
|
["members", "basis", "declared", "derived", "result"],
|
|
21217
22045
|
result.joins.map((j) => {
|
|
@@ -21242,7 +22070,7 @@ ${key}`);
|
|
|
21242
22070
|
}
|
|
21243
22071
|
section.append(element5("h3", "Agreement"));
|
|
21244
22072
|
section.append(
|
|
21245
|
-
|
|
22073
|
+
table2(
|
|
21246
22074
|
"composition-agreement",
|
|
21247
22075
|
["members", "result"],
|
|
21248
22076
|
result.corroboration.map((c) => {
|
|
@@ -21574,7 +22402,7 @@ ${key}`);
|
|
|
21574
22402
|
);
|
|
21575
22403
|
return rungs;
|
|
21576
22404
|
}
|
|
21577
|
-
function
|
|
22405
|
+
function el10(tag, className, text2) {
|
|
21578
22406
|
const node = document.createElement(tag);
|
|
21579
22407
|
if (className !== void 0) node.className = className;
|
|
21580
22408
|
if (text2 !== void 0) node.textContent = text2;
|
|
@@ -21587,36 +22415,36 @@ ${key}`);
|
|
|
21587
22415
|
const { context, capsuleId } = input;
|
|
21588
22416
|
const voice = input.voice;
|
|
21589
22417
|
const raw = object10(context.recordIndex.get(capsuleId));
|
|
21590
|
-
const
|
|
21591
|
-
|
|
21592
|
-
|
|
22418
|
+
const card2 = el10("section", "l3-card");
|
|
22419
|
+
card2.dataset.l3 = "envelope";
|
|
22420
|
+
card2.append(el10("h4", "l3-k", w.t("record.envelope.title")));
|
|
21593
22421
|
const hex5 = typeof raw.signature === "string" ? raw.signature : void 0;
|
|
21594
22422
|
const view = hex5 === void 0 ? void 0 : readEnvelope(hex5);
|
|
21595
22423
|
if (hex5 === void 0) {
|
|
21596
|
-
const none =
|
|
22424
|
+
const none = el10("p", "l3-note", w.t("record.envelope.none"));
|
|
21597
22425
|
none.dataset.l3 = "no-envelope";
|
|
21598
|
-
|
|
22426
|
+
card2.append(none);
|
|
21599
22427
|
} else if (view === void 0) {
|
|
21600
|
-
const bad2 =
|
|
22428
|
+
const bad2 = el10("p", "l3-note", w.t("record.envelope.unreadable"));
|
|
21601
22429
|
bad2.dataset.l3 = "unreadable-envelope";
|
|
21602
|
-
|
|
22430
|
+
card2.append(bad2);
|
|
21603
22431
|
} else {
|
|
21604
22432
|
const covered = (cls, tag) => {
|
|
21605
|
-
const chip =
|
|
22433
|
+
const chip = el10("span", `l3-chip ${cls}`, tag);
|
|
21606
22434
|
return chip;
|
|
21607
22435
|
};
|
|
21608
|
-
const prot =
|
|
22436
|
+
const prot = el10("div", "l3-box l3-prot");
|
|
21609
22437
|
prot.dataset.l3 = "protected";
|
|
21610
|
-
const ph =
|
|
22438
|
+
const ph = el10("p", "l3-h");
|
|
21611
22439
|
ph.append(
|
|
21612
|
-
|
|
22440
|
+
el10("b", "", w.t("record.env.protected")),
|
|
21613
22441
|
" ",
|
|
21614
22442
|
covered("l3-green", w.t("record.env.covered"))
|
|
21615
22443
|
);
|
|
21616
22444
|
prot.append(ph);
|
|
21617
|
-
const dl =
|
|
22445
|
+
const dl = el10("dl", "l3-kv");
|
|
21618
22446
|
const row2 = (k, v) => {
|
|
21619
|
-
dl.append(
|
|
22447
|
+
dl.append(el10("dt", "", k), el10("dd", "", v));
|
|
21620
22448
|
};
|
|
21621
22449
|
if (view.alg !== void 0)
|
|
21622
22450
|
row2(
|
|
@@ -21634,17 +22462,17 @@ ${key}`);
|
|
|
21634
22462
|
})
|
|
21635
22463
|
);
|
|
21636
22464
|
prot.append(dl);
|
|
21637
|
-
const un =
|
|
22465
|
+
const un = el10("div", "l3-box l3-unprot");
|
|
21638
22466
|
un.dataset.l3 = "unprotected";
|
|
21639
|
-
const uh =
|
|
22467
|
+
const uh = el10("p", "l3-h");
|
|
21640
22468
|
uh.append(
|
|
21641
|
-
|
|
22469
|
+
el10("b", "", w.t("record.env.unprotected")),
|
|
21642
22470
|
" ",
|
|
21643
22471
|
covered("l3-grey", w.t("record.env.not-signed"))
|
|
21644
22472
|
);
|
|
21645
22473
|
un.append(
|
|
21646
22474
|
uh,
|
|
21647
|
-
|
|
22475
|
+
el10(
|
|
21648
22476
|
"p",
|
|
21649
22477
|
"",
|
|
21650
22478
|
view.unprotectedEntries === 0 ? w.t("record.env.unprotected.empty") : w.t("record.env.unprotected.entries", {
|
|
@@ -21652,17 +22480,17 @@ ${key}`);
|
|
|
21652
22480
|
})
|
|
21653
22481
|
)
|
|
21654
22482
|
);
|
|
21655
|
-
const pay =
|
|
22483
|
+
const pay = el10("div", "l3-box l3-payload");
|
|
21656
22484
|
pay.dataset.l3 = "payload";
|
|
21657
|
-
const yh =
|
|
22485
|
+
const yh = el10("p", "l3-h");
|
|
21658
22486
|
yh.append(
|
|
21659
|
-
|
|
22487
|
+
el10("b", "", w.t("record.env.payload")),
|
|
21660
22488
|
" ",
|
|
21661
22489
|
covered("l3-green", w.t("record.env.covered"))
|
|
21662
22490
|
);
|
|
21663
22491
|
pay.append(
|
|
21664
22492
|
yh,
|
|
21665
|
-
|
|
22493
|
+
el10(
|
|
21666
22494
|
"p",
|
|
21667
22495
|
"",
|
|
21668
22496
|
view.payloadHex !== void 0 && view.payloadHex === capsuleId ? w.t("record.env.payload.is-id", {
|
|
@@ -21670,48 +22498,48 @@ ${key}`);
|
|
|
21670
22498
|
}) : w.t("record.env.payload.other")
|
|
21671
22499
|
)
|
|
21672
22500
|
);
|
|
21673
|
-
const sig =
|
|
22501
|
+
const sig = el10("div", "l3-box l3-sig");
|
|
21674
22502
|
sig.dataset.l3 = "signature";
|
|
21675
22503
|
sig.append(
|
|
21676
|
-
|
|
22504
|
+
el10("p", "", w.t("record.env.signature", { bytes: view.signatureBytes }))
|
|
21677
22505
|
);
|
|
21678
|
-
|
|
22506
|
+
card2.append(prot, un, pay, sig);
|
|
21679
22507
|
}
|
|
21680
|
-
|
|
21681
|
-
return
|
|
22508
|
+
card2.append(el10("p", "l3-note", w.t(`record.envelope.foot.${voice}`)));
|
|
22509
|
+
return card2;
|
|
21682
22510
|
}
|
|
21683
22511
|
function tagWord(tag, w) {
|
|
21684
22512
|
return w.t(`record.tag.${tag}`);
|
|
21685
22513
|
}
|
|
21686
22514
|
function capsuleCard(input, w) {
|
|
21687
22515
|
const raw = object10(input.context.recordIndex.get(input.capsuleId));
|
|
21688
|
-
const
|
|
21689
|
-
|
|
21690
|
-
|
|
21691
|
-
const dl =
|
|
22516
|
+
const card2 = el10("section", "l3-card");
|
|
22517
|
+
card2.dataset.l3 = "capsule";
|
|
22518
|
+
card2.append(el10("h4", "l3-k", w.t("record.capsule.title")));
|
|
22519
|
+
const dl = el10("dl", "l3-fields");
|
|
21692
22520
|
for (const row2 of fieldRows(raw)) {
|
|
21693
|
-
const dt =
|
|
21694
|
-
const dd =
|
|
22521
|
+
const dt = el10("dt", "", row2.label);
|
|
22522
|
+
const dd = el10("dd");
|
|
21695
22523
|
dd.append(row2.value);
|
|
21696
22524
|
if (row2.note === "recomputed")
|
|
21697
22525
|
dd.append(" \xB7 ", w.t("record.capsule.recomputed"));
|
|
21698
22526
|
for (const tag of row2.tags) {
|
|
21699
|
-
const chip =
|
|
22527
|
+
const chip = el10("span", `l3-chip l3-tag-${tag}`, tagWord(tag, w));
|
|
21700
22528
|
chip.dataset.tag = tag;
|
|
21701
22529
|
dd.append(" ", chip);
|
|
21702
22530
|
}
|
|
21703
22531
|
dl.append(dt, dd);
|
|
21704
22532
|
}
|
|
21705
|
-
|
|
21706
|
-
return
|
|
22533
|
+
card2.append(dl);
|
|
22534
|
+
return card2;
|
|
21707
22535
|
}
|
|
21708
22536
|
function ladderCard(input, w) {
|
|
21709
22537
|
const voice = input.voice;
|
|
21710
|
-
const
|
|
21711
|
-
|
|
21712
|
-
|
|
21713
|
-
const
|
|
21714
|
-
const head2 =
|
|
22538
|
+
const card2 = el10("section", "l3-card l3-ladder");
|
|
22539
|
+
card2.dataset.l3 = "ladder";
|
|
22540
|
+
card2.append(el10("h3", "l3-title", w.t("record.ladder.title")));
|
|
22541
|
+
const table3 = el10("table", "l3-table");
|
|
22542
|
+
const head2 = el10("tr");
|
|
21715
22543
|
for (const key of [
|
|
21716
22544
|
"record.ladder.col.n",
|
|
21717
22545
|
"record.ladder.col.proof",
|
|
@@ -21719,41 +22547,41 @@ ${key}`);
|
|
|
21719
22547
|
"record.ladder.col.status",
|
|
21720
22548
|
"record.ladder.col.check"
|
|
21721
22549
|
])
|
|
21722
|
-
head2.append(
|
|
21723
|
-
const thead =
|
|
22550
|
+
head2.append(el10("th", "", w.t(key)));
|
|
22551
|
+
const thead = el10("thead");
|
|
21724
22552
|
thead.append(head2);
|
|
21725
|
-
|
|
21726
|
-
const body =
|
|
22553
|
+
table3.append(thead);
|
|
22554
|
+
const body = el10("tbody");
|
|
21727
22555
|
for (const rung of ladder(input, w)) {
|
|
21728
|
-
const tr =
|
|
22556
|
+
const tr = el10("tr");
|
|
21729
22557
|
tr.dataset.rung = String(rung.n);
|
|
21730
22558
|
tr.dataset.rungStatus = rung.status;
|
|
21731
|
-
tr.append(
|
|
21732
|
-
const name =
|
|
22559
|
+
tr.append(el10("td", "l3-n", String(rung.n)));
|
|
22560
|
+
const name = el10("td");
|
|
21733
22561
|
name.append(
|
|
21734
|
-
|
|
21735
|
-
|
|
22562
|
+
el10("b", "", w.t(`record.rung.${rung.n}.title`)),
|
|
22563
|
+
el10("div", "l3-sub", rung.sub)
|
|
21736
22564
|
);
|
|
21737
|
-
tr.append(name,
|
|
21738
|
-
const status2 =
|
|
21739
|
-
const chip =
|
|
22565
|
+
tr.append(name, el10("td", "", w.t(`record.rung.${rung.n}.proves.${voice}`)));
|
|
22566
|
+
const status2 = el10("td");
|
|
22567
|
+
const chip = el10("span", `l3-status l3-s-${rung.status}`, rung.status);
|
|
21740
22568
|
chip.dataset.status = rung.status;
|
|
21741
22569
|
status2.append(chip);
|
|
21742
22570
|
if (rung.note !== void 0) status2.append(" ", rung.note);
|
|
21743
|
-
tr.append(status2,
|
|
22571
|
+
tr.append(status2, el10("td", "l3-cmd", w.t(`record.rung.${rung.n}.check`)));
|
|
21744
22572
|
body.append(tr);
|
|
21745
22573
|
}
|
|
21746
|
-
|
|
21747
|
-
|
|
21748
|
-
return
|
|
22574
|
+
table3.append(body);
|
|
22575
|
+
card2.append(table3);
|
|
22576
|
+
return card2;
|
|
21749
22577
|
}
|
|
21750
22578
|
function footer(w) {
|
|
21751
|
-
const foot =
|
|
22579
|
+
const foot = el10("section", "l3-card l3-foot");
|
|
21752
22580
|
foot.dataset.l3 = "foot";
|
|
21753
22581
|
for (const key of ["order", "status", "sdk"]) {
|
|
21754
|
-
const col =
|
|
22582
|
+
const col = el10("p");
|
|
21755
22583
|
col.append(
|
|
21756
|
-
|
|
22584
|
+
el10("b", "", w.t(`record.foot.${key}.k`)),
|
|
21757
22585
|
` ${w.t(`record.foot.${key}`)}`
|
|
21758
22586
|
);
|
|
21759
22587
|
foot.append(col);
|
|
@@ -21762,19 +22590,19 @@ ${key}`);
|
|
|
21762
22590
|
}
|
|
21763
22591
|
function renderRecordPage(input, w) {
|
|
21764
22592
|
const raw = object10(input.context.recordIndex.get(input.capsuleId));
|
|
21765
|
-
const page =
|
|
22593
|
+
const page = el10("div", "cv-l3");
|
|
21766
22594
|
page.dataset.level = "3";
|
|
21767
22595
|
page.dataset.recordPage = input.capsuleId;
|
|
21768
22596
|
page.dataset.voice = input.voice;
|
|
21769
22597
|
const actionId = typeof raw.action_id === "string" ? raw.action_id : "";
|
|
21770
22598
|
page.append(
|
|
21771
|
-
|
|
22599
|
+
el10(
|
|
21772
22600
|
"p",
|
|
21773
22601
|
"l3-banner",
|
|
21774
22602
|
w.t(`record.banner.${input.voice}`, { action: actionId })
|
|
21775
22603
|
)
|
|
21776
22604
|
);
|
|
21777
|
-
const cols =
|
|
22605
|
+
const cols = el10("div", "l3-cols");
|
|
21778
22606
|
cols.append(envelopeCard(input, w), capsuleCard(input, w));
|
|
21779
22607
|
page.append(cols, ladderCard(input, w), footer(w));
|
|
21780
22608
|
return page;
|
|
@@ -21815,7 +22643,9 @@ ${key}`);
|
|
|
21815
22643
|
// src/core-strip.ts
|
|
21816
22644
|
var CORE_STRIP_ATTRIBUTE = "data-core-strip";
|
|
21817
22645
|
var CORE_STRIP_CSS = `
|
|
21818
|
-
.cv-strip{${OUTCOME_FRAME_VARS}max-width:1080px;margin:0 auto 16px;padding:14px 16px;border:1px solid var(--line);border-radius:10px;background:#FAF8F4;color:var(--ink);font-family:system-ui,-apple-system,"Segoe UI",sans-serif}
|
|
22646
|
+
.cv-strip{${OUTCOME_FRAME_VARS}position:relative;max-width:1080px;margin:0 auto 16px;padding:14px 16px 14px 34px;border:1px solid var(--line);border-radius:10px;background:#FAF8F4;color:var(--ink);font-family:system-ui,-apple-system,"Segoe UI",sans-serif}
|
|
22647
|
+
.cv-strip:before{content:"\\25A0";content:"\\25A0" / "";position:absolute;left:13px;top:16px;font-size:12px;line-height:1;color:#8A93A0}
|
|
22648
|
+
.cv-strip .agg-note[data-src="core"],.cv-strip [data-src="core"]{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#1F5C99}
|
|
21819
22649
|
.cv-strip .mockmark{display:inline-block;margin:0 0 10px;padding:3px 10px;border:1px solid #F0D7A8;background:var(--gold-l);color:#8A5A0B;border-radius:8px;font-weight:600;font-size:13px;line-height:1.45}
|
|
21820
22650
|
.cv-strip .agg-line{font-size:14px;margin:0 0 12px}
|
|
21821
22651
|
.cv-strip .agg-buckets{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
|
|
@@ -21830,22 +22660,22 @@ ${key}`);
|
|
|
21830
22660
|
@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}}
|
|
21831
22661
|
@media print{.cv-strip{break-inside:avoid}}
|
|
21832
22662
|
`;
|
|
21833
|
-
function
|
|
22663
|
+
function el11(tag, className, text2) {
|
|
21834
22664
|
const node = document.createElement(tag);
|
|
21835
22665
|
if (className !== "") node.className = className;
|
|
21836
22666
|
if (text2 !== void 0) node.textContent = text2;
|
|
21837
22667
|
return node;
|
|
21838
22668
|
}
|
|
21839
|
-
var
|
|
22669
|
+
var fmt5 = (n) => n.toLocaleString("en-US");
|
|
21840
22670
|
function mismatchMarker(result, field, w) {
|
|
21841
22671
|
const mismatch = result.countMismatches.find(
|
|
21842
22672
|
(entry) => entry.field === field
|
|
21843
22673
|
);
|
|
21844
22674
|
if (mismatch === void 0) return void 0;
|
|
21845
|
-
const marker =
|
|
22675
|
+
const marker = el11(
|
|
21846
22676
|
"span",
|
|
21847
22677
|
"count mismatch",
|
|
21848
|
-
w.t("front.agg.mismatch", { recomputed:
|
|
22678
|
+
w.t("front.agg.mismatch", { recomputed: fmt5(mismatch.recomputed) })
|
|
21849
22679
|
);
|
|
21850
22680
|
marker.dataset.countMismatch = field;
|
|
21851
22681
|
marker.dataset.stated = String(mismatch.stated);
|
|
@@ -21860,7 +22690,7 @@ ${key}`);
|
|
|
21860
22690
|
(claim) => JSON.stringify([claim.contractRef, claim.requirementRef])
|
|
21861
22691
|
)
|
|
21862
22692
|
).size;
|
|
21863
|
-
const line =
|
|
22693
|
+
const line = el11("p", "agg-line");
|
|
21864
22694
|
const marked = (text2, field) => {
|
|
21865
22695
|
line.append(text2);
|
|
21866
22696
|
const marker = mismatchMarker(result, field, w);
|
|
@@ -21869,10 +22699,10 @@ ${key}`);
|
|
|
21869
22699
|
marked(
|
|
21870
22700
|
w.t("front.agg.evaluated", {
|
|
21871
22701
|
evaluations: w.p("front.agg.evaluations", stated.evaluatedPopulation, {
|
|
21872
|
-
n:
|
|
22702
|
+
n: fmt5(stated.evaluatedPopulation)
|
|
21873
22703
|
}),
|
|
21874
22704
|
requirements: w.p("front.agg.requirements", requirements, {
|
|
21875
|
-
n:
|
|
22705
|
+
n: fmt5(requirements)
|
|
21876
22706
|
})
|
|
21877
22707
|
}),
|
|
21878
22708
|
"evaluated_population"
|
|
@@ -21880,13 +22710,13 @@ ${key}`);
|
|
|
21880
22710
|
line.append(
|
|
21881
22711
|
" \xB7 ",
|
|
21882
22712
|
w.t("front.agg.excluded", {
|
|
21883
|
-
excluded:
|
|
22713
|
+
excluded: fmt5(stated.excludedNotApplicable)
|
|
21884
22714
|
}),
|
|
21885
22715
|
" \xB7 "
|
|
21886
22716
|
);
|
|
21887
22717
|
marked(
|
|
21888
22718
|
w.p("front.agg.unknown", stated.unknownCount, {
|
|
21889
|
-
n:
|
|
22719
|
+
n: fmt5(stated.unknownCount)
|
|
21890
22720
|
}),
|
|
21891
22721
|
"unknown_count"
|
|
21892
22722
|
);
|
|
@@ -21894,7 +22724,7 @@ ${key}`);
|
|
|
21894
22724
|
if (later !== void 0 || result.countMismatches.some((m) => m.field === "not_yet_in_force")) {
|
|
21895
22725
|
line.append(" \xB7 ");
|
|
21896
22726
|
marked(
|
|
21897
|
-
w.p("front.agg.later", later ?? 0, { n:
|
|
22727
|
+
w.p("front.agg.later", later ?? 0, { n: fmt5(later ?? 0) }),
|
|
21898
22728
|
"not_yet_in_force"
|
|
21899
22729
|
);
|
|
21900
22730
|
line.dataset.notYetInForce = String(later ?? 0);
|
|
@@ -21904,8 +22734,8 @@ ${key}`);
|
|
|
21904
22734
|
line.dataset.excluded = String(stated.excludedNotApplicable);
|
|
21905
22735
|
line.dataset.unknown = String(stated.unknownCount);
|
|
21906
22736
|
out.append(line);
|
|
21907
|
-
const buckets =
|
|
21908
|
-
const of = w.t("front.agg.of", { n:
|
|
22737
|
+
const buckets = el11("div", "agg-buckets");
|
|
22738
|
+
const of = w.t("front.agg.of", { n: fmt5(stated.evaluatedPopulation) });
|
|
21909
22739
|
const entries = [
|
|
21910
22740
|
["met", result.buckets.met, "buckets.met"],
|
|
21911
22741
|
["not_met", result.buckets.notMet, "buckets.not_met"],
|
|
@@ -21914,16 +22744,16 @@ ${key}`);
|
|
|
21914
22744
|
];
|
|
21915
22745
|
for (const [verdict2, ids, field] of entries) {
|
|
21916
22746
|
if (ids === void 0) continue;
|
|
21917
|
-
const box =
|
|
22747
|
+
const box = el11("div", `agg-bucket ${verdict2}`);
|
|
21918
22748
|
box.dataset.bucket = verdict2;
|
|
21919
22749
|
box.dataset.count = String(ids.length);
|
|
21920
22750
|
box.dataset.of = String(stated.evaluatedPopulation);
|
|
21921
|
-
box.append(
|
|
21922
|
-
const caption =
|
|
22751
|
+
box.append(el11("b", "", fmt5(ids.length)));
|
|
22752
|
+
const caption = el11("div", "agg-cap");
|
|
21923
22753
|
caption.append(
|
|
21924
|
-
|
|
22754
|
+
tagSource(el11("span", "", w.t(`front.agg.bucket.${verdict2}`)), "pack"),
|
|
21925
22755
|
document.createTextNode(" \xB7 "),
|
|
21926
|
-
|
|
22756
|
+
el11("span", "agg-of", of)
|
|
21927
22757
|
);
|
|
21928
22758
|
box.append(caption);
|
|
21929
22759
|
const marker = mismatchMarker(result, field, w);
|
|
@@ -21934,7 +22764,7 @@ ${key}`);
|
|
|
21934
22764
|
const dated = result.claims.some((claim) => claim.appliesFrom !== void 0);
|
|
21935
22765
|
const switched = result.buckets.outOfScope !== void 0;
|
|
21936
22766
|
if (dated || switched) {
|
|
21937
|
-
const copied =
|
|
22767
|
+
const copied = el11("p", "agg-note");
|
|
21938
22768
|
if (dated) {
|
|
21939
22769
|
const date = utcDateOf(result.generatedAt) ?? result.generatedAt;
|
|
21940
22770
|
copied.append(w.t("front.agg.as-of", { date }), " ");
|
|
@@ -21966,7 +22796,7 @@ ${key}`);
|
|
|
21966
22796
|
}) : refs[0]
|
|
21967
22797
|
);
|
|
21968
22798
|
} else if (refs.length > 1)
|
|
21969
|
-
kicker.push(w.t("front.core.packs", { n:
|
|
22799
|
+
kicker.push(w.t("front.core.packs", { n: fmt5(refs.length) }));
|
|
21970
22800
|
const generated = utcDateOf(result.generatedAt) === void 0 ? void 0 : result.generatedAt;
|
|
21971
22801
|
if (generated !== void 0)
|
|
21972
22802
|
kicker.push(w.t("front.core.generated", { time: generated }));
|
|
@@ -21976,12 +22806,18 @@ ${key}`);
|
|
|
21976
22806
|
if (model.pins.length === 1)
|
|
21977
22807
|
facts.push(w.t("front.core.pin", { digest: shortDigest(model.pins[0]) }));
|
|
21978
22808
|
else if (model.pins.length > 1)
|
|
21979
|
-
facts.push(w.t("front.core.pins", { n:
|
|
21980
|
-
const block =
|
|
22809
|
+
facts.push(w.t("front.core.pins", { n: fmt5(model.pins.length) }));
|
|
22810
|
+
const block = el11("div", "core-id");
|
|
21981
22811
|
block.dataset.section = "core-identity";
|
|
21982
|
-
const top =
|
|
22812
|
+
const top = tagSource(
|
|
22813
|
+
el11("p", "agg-note core-kicker", kicker.join(" \xB7 ")),
|
|
22814
|
+
"core"
|
|
22815
|
+
);
|
|
21983
22816
|
top.dataset.coreKicker = "";
|
|
21984
|
-
const rest =
|
|
22817
|
+
const rest = tagSource(
|
|
22818
|
+
el11("p", "agg-note core-facts", facts.join(" \xB7 ")),
|
|
22819
|
+
"core"
|
|
22820
|
+
);
|
|
21985
22821
|
rest.dataset.coreFacts = "";
|
|
21986
22822
|
block.append(top, rest);
|
|
21987
22823
|
return block;
|
|
@@ -21996,14 +22832,14 @@ ${key}`);
|
|
|
21996
22832
|
};
|
|
21997
22833
|
}
|
|
21998
22834
|
function renderCoreStrip(model) {
|
|
21999
|
-
const strip =
|
|
22835
|
+
const strip = el11("section", "cv-strip");
|
|
22000
22836
|
strip.setAttribute(CORE_STRIP_ATTRIBUTE, "");
|
|
22001
22837
|
strip.dataset.section = "aggregate";
|
|
22002
22838
|
const style = document.createElement("style");
|
|
22003
22839
|
style.textContent = CORE_STRIP_CSS;
|
|
22004
22840
|
strip.append(style);
|
|
22005
22841
|
if (model.mock) {
|
|
22006
|
-
const mark =
|
|
22842
|
+
const mark = el11("p", "mockmark", model.words.t("front.mock"));
|
|
22007
22843
|
mark.dataset.section = "mock-judge";
|
|
22008
22844
|
strip.append(mark);
|
|
22009
22845
|
}
|
|
@@ -22013,7 +22849,7 @@ ${key}`);
|
|
|
22013
22849
|
}
|
|
22014
22850
|
|
|
22015
22851
|
// src/record-content.ts
|
|
22016
|
-
var
|
|
22852
|
+
var isObject4 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
22017
22853
|
function canonicalJson(value, indent) {
|
|
22018
22854
|
const pad = indent === void 0 ? "" : " ".repeat(indent);
|
|
22019
22855
|
const write = (v, depth) => {
|
|
@@ -22024,7 +22860,7 @@ ${pad.repeat(depth)}`;
|
|
|
22024
22860
|
const colon = pad === "" ? ":" : ": ";
|
|
22025
22861
|
if (Array.isArray(v))
|
|
22026
22862
|
return v.length === 0 ? "[]" : `[${v.map((item) => open + write(item, depth + 1)).join(",")}${close}]`;
|
|
22027
|
-
if (
|
|
22863
|
+
if (isObject4(v)) {
|
|
22028
22864
|
const keys = Object.keys(v).sort(byCodeUnits);
|
|
22029
22865
|
return keys.length === 0 ? "{}" : `{${keys.map(
|
|
22030
22866
|
(key) => `${open}${JSON.stringify(key)}${colon}${write(v[key], depth + 1)}`
|
|
@@ -22038,12 +22874,12 @@ ${pad.repeat(depth)}`;
|
|
|
22038
22874
|
return a < b ? -1 : a > b ? 1 : 0;
|
|
22039
22875
|
}
|
|
22040
22876
|
function conversationTurns(content) {
|
|
22041
|
-
if (!
|
|
22042
|
-
const interaction =
|
|
22877
|
+
if (!isObject4(content)) return void 0;
|
|
22878
|
+
const interaction = isObject4(content.agent_interaction) ? content.agent_interaction : void 0;
|
|
22043
22879
|
if (interaction === void 0 || !Array.isArray(interaction.messages))
|
|
22044
22880
|
return void 0;
|
|
22045
22881
|
return interaction.messages.flatMap((m) => {
|
|
22046
|
-
if (!
|
|
22882
|
+
if (!isObject4(m)) return [];
|
|
22047
22883
|
const role = typeof m.role === "string" ? m.role : "unknown";
|
|
22048
22884
|
const text2 = typeof m.content === "string" ? m.content : void 0;
|
|
22049
22885
|
const calls = Array.isArray(m.tool_calls) ? m.tool_calls : [];
|
|
@@ -22052,7 +22888,7 @@ ${pad.repeat(depth)}`;
|
|
|
22052
22888
|
role,
|
|
22053
22889
|
...text2 === void 0 ? {} : { content: text2 },
|
|
22054
22890
|
toolCalls: calls.flatMap(
|
|
22055
|
-
(call) =>
|
|
22891
|
+
(call) => isObject4(call) ? [
|
|
22056
22892
|
{
|
|
22057
22893
|
name: typeof call.name === "string" ? call.name : "unnamed",
|
|
22058
22894
|
// Re-serialised as there, but in canonical member order,
|
|
@@ -22121,7 +22957,7 @@ ${pad.repeat(depth)}`;
|
|
|
22121
22957
|
function object11(value) {
|
|
22122
22958
|
return value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
22123
22959
|
}
|
|
22124
|
-
function
|
|
22960
|
+
function str2(value) {
|
|
22125
22961
|
return typeof value === "string" ? value : void 0;
|
|
22126
22962
|
}
|
|
22127
22963
|
function strArray(value) {
|
|
@@ -22129,20 +22965,20 @@ ${pad.repeat(depth)}`;
|
|
|
22129
22965
|
}
|
|
22130
22966
|
function readFinding(value) {
|
|
22131
22967
|
const obj = object11(value);
|
|
22132
|
-
const id =
|
|
22133
|
-
const severity =
|
|
22134
|
-
const recommendation =
|
|
22135
|
-
const ownerDue =
|
|
22968
|
+
const id = str2(obj?.id);
|
|
22969
|
+
const severity = str2(obj?.severity);
|
|
22970
|
+
const recommendation = str2(obj?.recommendation);
|
|
22971
|
+
const ownerDue = str2(obj?.owner_due);
|
|
22136
22972
|
if (id === void 0 || severity === void 0 || recommendation === void 0 || ownerDue === void 0)
|
|
22137
22973
|
return void 0;
|
|
22138
22974
|
return { id, severity, recommendation, ownerDue };
|
|
22139
22975
|
}
|
|
22140
22976
|
function readRow(value) {
|
|
22141
22977
|
const obj = object11(value);
|
|
22142
|
-
const criterionId =
|
|
22143
|
-
const name =
|
|
22978
|
+
const criterionId = str2(obj?.criterion_id);
|
|
22979
|
+
const name = str2(obj?.name);
|
|
22144
22980
|
if (criterionId === void 0 || name === void 0) return void 0;
|
|
22145
|
-
const notEvaluableNote =
|
|
22981
|
+
const notEvaluableNote = str2(obj?.not_evaluable_note);
|
|
22146
22982
|
const finding = obj?.finding === void 0 ? void 0 : readFinding(obj.finding);
|
|
22147
22983
|
return {
|
|
22148
22984
|
criterionId,
|
|
@@ -22154,17 +22990,17 @@ ${pad.repeat(depth)}`;
|
|
|
22154
22990
|
function readApplicability(value) {
|
|
22155
22991
|
const obj = object11(value);
|
|
22156
22992
|
const status2 = obj?.status === "in_force" || obj?.status === "future" ? obj.status : void 0;
|
|
22157
|
-
const note =
|
|
22993
|
+
const note = str2(obj?.note);
|
|
22158
22994
|
if (status2 === void 0 || note === void 0) return void 0;
|
|
22159
22995
|
return { status: status2, note };
|
|
22160
22996
|
}
|
|
22161
22997
|
function readObligation(value) {
|
|
22162
22998
|
const obj = object11(value);
|
|
22163
|
-
const key =
|
|
22164
|
-
const article =
|
|
22165
|
-
const title =
|
|
22166
|
-
const plain2 =
|
|
22167
|
-
const method =
|
|
22999
|
+
const key = str2(obj?.key);
|
|
23000
|
+
const article = str2(obj?.article);
|
|
23001
|
+
const title = str2(obj?.title);
|
|
23002
|
+
const plain2 = str2(obj?.plain);
|
|
23003
|
+
const method = str2(obj?.method);
|
|
22168
23004
|
const applicability = readApplicability(obj?.applicability);
|
|
22169
23005
|
if (key === void 0 || article === void 0 || title === void 0 || plain2 === void 0 || method === void 0 || applicability === void 0)
|
|
22170
23006
|
return void 0;
|
|
@@ -22186,9 +23022,9 @@ ${pad.repeat(depth)}`;
|
|
|
22186
23022
|
function readQualityProtocol(value) {
|
|
22187
23023
|
const obj = object11(value);
|
|
22188
23024
|
if (obj === void 0) return void 0;
|
|
22189
|
-
const protocol =
|
|
22190
|
-
const cadence =
|
|
22191
|
-
const note =
|
|
23025
|
+
const protocol = str2(obj.protocol);
|
|
23026
|
+
const cadence = str2(obj.cadence);
|
|
23027
|
+
const note = str2(obj.note);
|
|
22192
23028
|
if (protocol === void 0 && cadence === void 0 && note === void 0)
|
|
22193
23029
|
return void 0;
|
|
22194
23030
|
return {
|
|
@@ -22202,7 +23038,7 @@ ${pad.repeat(depth)}`;
|
|
|
22202
23038
|
const extensions2 = object11(top?.extensions);
|
|
22203
23039
|
const block = object11(extensions2?.["eu-ai-act-compliance/v1"]);
|
|
22204
23040
|
if (block === void 0 || block.enabled !== true) return void 0;
|
|
22205
|
-
const regulation =
|
|
23041
|
+
const regulation = str2(block.regulation) ?? "Regulation (EU) 2024/1689";
|
|
22206
23042
|
const obligations = Array.isArray(block.obligations) ? block.obligations.flatMap((o) => {
|
|
22207
23043
|
const obligation = readObligation(o);
|
|
22208
23044
|
return obligation === void 0 ? [] : [obligation];
|
|
@@ -23072,8 +23908,8 @@ ${pad.repeat(depth)}`;
|
|
|
23072
23908
|
function renderExtensionTable(host, rows) {
|
|
23073
23909
|
if (rows.length === 0) return;
|
|
23074
23910
|
host.append(element6("h4", "Extensions"));
|
|
23075
|
-
const
|
|
23076
|
-
|
|
23911
|
+
const table3 = element6("table");
|
|
23912
|
+
table3.dataset.extensions = "";
|
|
23077
23913
|
const head2 = element6("tr");
|
|
23078
23914
|
for (const label of ["extension", "integrity", "semantics"])
|
|
23079
23915
|
head2.append(element6("th", label));
|
|
@@ -23097,8 +23933,8 @@ ${pad.repeat(depth)}`;
|
|
|
23097
23933
|
);
|
|
23098
23934
|
body.append(tr);
|
|
23099
23935
|
}
|
|
23100
|
-
|
|
23101
|
-
host.append(
|
|
23936
|
+
table3.append(thead, body);
|
|
23937
|
+
host.append(table3);
|
|
23102
23938
|
}
|
|
23103
23939
|
function renderCheckLists(host, lists, verifierHint) {
|
|
23104
23940
|
const groups = [
|
|
@@ -23139,7 +23975,7 @@ ${pad.repeat(depth)}`;
|
|
|
23139
23975
|
scope.dataset.checks = "scope";
|
|
23140
23976
|
host.append(scope);
|
|
23141
23977
|
}
|
|
23142
|
-
async function renderVerificationPage(root, context, styled, applied, refused, citedSigners, verifierHint, depth, stamps, charts, l3) {
|
|
23978
|
+
async function renderVerificationPage(root, context, styled, applied, refused, citedSigners, verifierHint, depth, stamps, charts, contract, l3) {
|
|
23143
23979
|
const { bundle, verification: verified } = context;
|
|
23144
23980
|
const section = element6("section");
|
|
23145
23981
|
section.dataset.page = "verification";
|
|
@@ -23176,6 +24012,19 @@ ${pad.repeat(depth)}`;
|
|
|
23176
24012
|
chart.refused === void 0 ? chart.sha256 : `${chart.sha256} (not drawn: ${chart.refused})`
|
|
23177
24013
|
)
|
|
23178
24014
|
);
|
|
24015
|
+
if (contract.checked !== void 0) {
|
|
24016
|
+
appendValue(
|
|
24017
|
+
summary,
|
|
24018
|
+
"contract",
|
|
24019
|
+
`${contract.checked.id}@${contract.checked.version}`
|
|
24020
|
+
);
|
|
24021
|
+
appendValue(summary, "contract sha256", contract.checked.sha256);
|
|
24022
|
+
} else if (contract.refused !== void 0)
|
|
24023
|
+
appendValue(
|
|
24024
|
+
summary,
|
|
24025
|
+
"contract sha256",
|
|
24026
|
+
`${contract.refused.sha256} (not read: ${contract.refused.reason})`
|
|
24027
|
+
);
|
|
23179
24028
|
page.append(summary);
|
|
23180
24029
|
renderReceipts(page, model.receipts);
|
|
23181
24030
|
if (model.selfWitnessed) {
|
|
@@ -23450,7 +24299,7 @@ ${pad.repeat(depth)}`;
|
|
|
23450
24299
|
const section = element6("section");
|
|
23451
24300
|
section.dataset.page = "report-rows";
|
|
23452
24301
|
section.append(element6("h1", reportRows.title ?? "Report"));
|
|
23453
|
-
const
|
|
24302
|
+
const table3 = document.createElement("table");
|
|
23454
24303
|
const detail = element6("section");
|
|
23455
24304
|
reportRows.rows.forEach((row2) => {
|
|
23456
24305
|
const tr = document.createElement("tr");
|
|
@@ -23463,10 +24312,10 @@ ${pad.repeat(depth)}`;
|
|
|
23463
24312
|
const statusCell = element6("td", row2.status.replaceAll("_", " "));
|
|
23464
24313
|
statusCell.dataset.rowStatus = row2.status;
|
|
23465
24314
|
tr.append(labelCell, statusCell);
|
|
23466
|
-
|
|
24315
|
+
table3.append(tr);
|
|
23467
24316
|
});
|
|
23468
24317
|
section.append(
|
|
23469
|
-
|
|
24318
|
+
table3,
|
|
23470
24319
|
detail,
|
|
23471
24320
|
renderProvenance2(
|
|
23472
24321
|
reportRows.capsuleId,
|
|
@@ -23887,8 +24736,8 @@ ${pad.repeat(depth)}`;
|
|
|
23887
24736
|
buckets.append(list2);
|
|
23888
24737
|
}
|
|
23889
24738
|
section.append(buckets);
|
|
23890
|
-
const
|
|
23891
|
-
|
|
24739
|
+
const table3 = document.createElement("table");
|
|
24740
|
+
table3.dataset.claims = "rows";
|
|
23892
24741
|
const detail = element6("section");
|
|
23893
24742
|
for (const claim of result.claims) {
|
|
23894
24743
|
const tr = document.createElement("tr");
|
|
@@ -23920,10 +24769,10 @@ ${pad.repeat(depth)}`;
|
|
|
23920
24769
|
appendCloseState(type, claim.close, "span");
|
|
23921
24770
|
}
|
|
23922
24771
|
tr.append(tier, grade, type);
|
|
23923
|
-
|
|
24772
|
+
table3.append(tr);
|
|
23924
24773
|
}
|
|
23925
24774
|
section.append(
|
|
23926
|
-
|
|
24775
|
+
table3,
|
|
23927
24776
|
detail,
|
|
23928
24777
|
renderProvenance2(result.capsuleId, result.logCoordinates, result)
|
|
23929
24778
|
);
|
|
@@ -23941,15 +24790,15 @@ ${pad.repeat(depth)}`;
|
|
|
23941
24790
|
calendar.append(element6("h2", "Daily reports"));
|
|
23942
24791
|
const detail = element6("section");
|
|
23943
24792
|
[...graph2.reports].sort((left, right) => left.date.localeCompare(right.date)).forEach((report) => {
|
|
23944
|
-
const
|
|
23945
|
-
|
|
23946
|
-
|
|
23947
|
-
|
|
23948
|
-
|
|
24793
|
+
const tile2 = element6("button");
|
|
24794
|
+
tile2.append(renderTime(report.date), `: ${metRate(report)}`);
|
|
24795
|
+
tile2.setAttribute("type", "button");
|
|
24796
|
+
tile2.dataset.reportDate = report.date;
|
|
24797
|
+
tile2.addEventListener(
|
|
23949
24798
|
"click",
|
|
23950
24799
|
() => renderReport(report, detail, records)
|
|
23951
24800
|
);
|
|
23952
|
-
calendar.append(
|
|
24801
|
+
calendar.append(tile2);
|
|
23953
24802
|
});
|
|
23954
24803
|
root.append(calendar, detail);
|
|
23955
24804
|
}
|
|
@@ -24013,7 +24862,8 @@ ${pad.repeat(depth)}`;
|
|
|
24013
24862
|
model.bundle,
|
|
24014
24863
|
model.verification,
|
|
24015
24864
|
{ L0: host.L0, L1: host.L1, L2: host.L2, depth: host.depth },
|
|
24016
|
-
host.wording
|
|
24865
|
+
host.wording,
|
|
24866
|
+
host.contract
|
|
24017
24867
|
);
|
|
24018
24868
|
}
|
|
24019
24869
|
};
|
|
@@ -24040,7 +24890,8 @@ ${pad.repeat(depth)}`;
|
|
|
24040
24890
|
model.bundle,
|
|
24041
24891
|
model.verification,
|
|
24042
24892
|
{ L0: host.L0, L1: host.L1, L2: host.L2, depth: host.depth },
|
|
24043
|
-
host.wording
|
|
24893
|
+
host.wording,
|
|
24894
|
+
host.contract
|
|
24044
24895
|
);
|
|
24045
24896
|
}
|
|
24046
24897
|
};
|
|
@@ -24121,7 +24972,8 @@ ${pad.repeat(depth)}`;
|
|
|
24121
24972
|
model.bundle,
|
|
24122
24973
|
model.verification,
|
|
24123
24974
|
{ L0: host.L0, L1: host.L1, L2: host.L2, depth: host.depth },
|
|
24124
|
-
host.wording
|
|
24975
|
+
host.wording,
|
|
24976
|
+
host.contract
|
|
24125
24977
|
);
|
|
24126
24978
|
}
|
|
24127
24979
|
};
|
|
@@ -24210,6 +25062,20 @@ ${pad.repeat(depth)}`;
|
|
|
24210
25062
|
}
|
|
24211
25063
|
var DEFAULT_AUDIENCE = "*";
|
|
24212
25064
|
var DEFAULT_FORMAT = "html";
|
|
25065
|
+
async function pageContract(given) {
|
|
25066
|
+
if (given === void 0) return {};
|
|
25067
|
+
try {
|
|
25068
|
+
return { checked: await checkContractInput(given) };
|
|
25069
|
+
} catch (err) {
|
|
25070
|
+
if (!(err instanceof ContractError)) throw err;
|
|
25071
|
+
return {
|
|
25072
|
+
refused: {
|
|
25073
|
+
sha256: /^[0-9a-f]{64}$/u.test(given.sha256) ? given.sha256 : "(not a SHA-256)",
|
|
25074
|
+
reason: err.message
|
|
25075
|
+
}
|
|
25076
|
+
};
|
|
25077
|
+
}
|
|
25078
|
+
}
|
|
24213
25079
|
async function chartDigestsOf(charts) {
|
|
24214
25080
|
const out = [];
|
|
24215
25081
|
for (const spec of charts ?? []) {
|
|
@@ -24581,6 +25447,7 @@ ${pad.repeat(depth)}`;
|
|
|
24581
25447
|
let strip;
|
|
24582
25448
|
let chartsNode;
|
|
24583
25449
|
const chartDigests = await chartDigestsOf(options.charts);
|
|
25450
|
+
const contract = await pageContract(options.contract);
|
|
24584
25451
|
const charted = options.charts !== void 0 && options.charts.length > 0;
|
|
24585
25452
|
if (verified) {
|
|
24586
25453
|
const result = await resultRootOf(context);
|
|
@@ -24794,6 +25661,7 @@ ${pad.repeat(depth)}`;
|
|
|
24794
25661
|
L2: regions.L2,
|
|
24795
25662
|
depth,
|
|
24796
25663
|
...options.wording === void 0 ? {} : { wording: options.wording },
|
|
25664
|
+
...contract.checked === void 0 ? {} : { contract: contract.checked },
|
|
24797
25665
|
setChromeClass(name) {
|
|
24798
25666
|
if (name !== OUTCOME_CHROME && name !== COMPLIANCE_CHROME)
|
|
24799
25667
|
throw new Error(`unknown chrome class ${JSON.stringify(name)}`);
|
|
@@ -24885,6 +25753,7 @@ ${pad.repeat(depth)}`;
|
|
|
24885
25753
|
depth,
|
|
24886
25754
|
stamps,
|
|
24887
25755
|
chartDigests,
|
|
25756
|
+
contract,
|
|
24888
25757
|
verified ? {
|
|
24889
25758
|
words: await contractReportWords(
|
|
24890
25759
|
contractReportGroupingOf(bundle) ?? "lines",
|
|
@@ -24936,6 +25805,7 @@ ${pad.repeat(depth)}`;
|
|
|
24936
25805
|
format: input.format,
|
|
24937
25806
|
...input.depth === void 0 ? {} : { depth: input.depth },
|
|
24938
25807
|
...input.wording === void 0 ? {} : { wording: input.wording },
|
|
25808
|
+
...input.contract === void 0 ? {} : { contract: input.contract },
|
|
24939
25809
|
...input.charts === void 0 ? {} : { charts: input.charts },
|
|
24940
25810
|
...input.registry === void 0 ? {} : { registry: input.registry }
|
|
24941
25811
|
});
|
|
@@ -24956,7 +25826,8 @@ ${pad.repeat(depth)}`;
|
|
|
24956
25826
|
audience: payload.audience,
|
|
24957
25827
|
format: "fragment",
|
|
24958
25828
|
...payload.depth === void 0 ? {} : { depth: payload.depth },
|
|
24959
|
-
...payload.wording === void 0 ? {} : { wording: payload.wording }
|
|
25829
|
+
...payload.wording === void 0 ? {} : { wording: payload.wording },
|
|
25830
|
+
...payload.contract === void 0 ? {} : { contract: payload.contract }
|
|
24960
25831
|
});
|
|
24961
25832
|
}
|
|
24962
25833
|
return __toCommonJS(browser_exports2);
|