@thehammer/template-verification 0.2.3 → 0.2.5
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/context.d.ts +11 -0
- package/dist/style.css +1 -1
- package/dist/template-verification.js +511 -501
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { DanxChip as
|
|
3
|
-
const
|
|
4
|
-
let
|
|
1
|
+
import { ref as R, watch as pe, defineComponent as G, computed as d, openBlock as l, createElementBlock as i, normalizeClass as A, createElementVNode as r, toDisplayString as m, createCommentVNode as b, createBlock as U, unref as s, withCtx as I, createTextVNode as T, createVNode as D, Fragment as L, renderList as B, withKeys as Re, withModifiers as ne, renderSlot as Ae, withDirectives as Le, isRef as ye, vModelCheckbox as je } from "vue";
|
|
2
|
+
import { DanxChip as Y, CodeViewer as be, useToast as ke, DanxDialog as ue, DanxProgressBar as $e, DanxAlert as he, DanxTabs as Ee, MarkdownEditor as ze, DanxFileViewer as _e, DanxButton as oe, DanxInput as Pe, DanxSkeleton as Se, DanxTooltip as Me, DanxIcon as Be, gearIcon as Fe, DanxBadge as qe, DanxToastContainer as Ye } from "@thehammer/danx-ui";
|
|
3
|
+
const E = "tv-chrome", Ce = "template-verification:enabled";
|
|
4
|
+
let se = null;
|
|
5
5
|
function Je(e) {
|
|
6
6
|
var t;
|
|
7
7
|
try {
|
|
@@ -18,46 +18,48 @@ function Ke(e, t) {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
function He(e) {
|
|
21
|
-
const t = Je(
|
|
21
|
+
const t = Je(Ce);
|
|
22
22
|
return t === null ? e : t === "true";
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
const t =
|
|
26
|
-
return
|
|
24
|
+
function Ve(e) {
|
|
25
|
+
const t = R(He((e == null ? void 0 : e.defaultEnabled) ?? !1));
|
|
26
|
+
return pe(
|
|
27
27
|
t,
|
|
28
|
-
(a) => Ke(
|
|
28
|
+
(a) => Ke(Ce, a ? "true" : "false")
|
|
29
29
|
), {
|
|
30
30
|
enabled: t,
|
|
31
31
|
data: (e == null ? void 0 : e.data) ?? {},
|
|
32
32
|
saveOverride: e == null ? void 0 : e.saveOverride,
|
|
33
33
|
workflowInputId: e == null ? void 0 : e.workflowInputId,
|
|
34
34
|
auditUrl: e == null ? void 0 : e.auditUrl,
|
|
35
|
-
|
|
35
|
+
loading: (e == null ? void 0 : e.loading) ?? !1,
|
|
36
|
+
comparisonOpen: R(!1)
|
|
36
37
|
};
|
|
37
38
|
}
|
|
38
|
-
function
|
|
39
|
-
return
|
|
39
|
+
function De() {
|
|
40
|
+
return se || (se = Ve()), se;
|
|
40
41
|
}
|
|
41
42
|
function ha(e) {
|
|
42
|
-
|
|
43
|
+
se = Ve(e);
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
-
const e =
|
|
45
|
+
function ie() {
|
|
46
|
+
const e = De();
|
|
46
47
|
return {
|
|
47
48
|
enabled: e.enabled,
|
|
48
49
|
data: e.data,
|
|
49
50
|
saveOverride: e.saveOverride,
|
|
50
51
|
workflowInputId: e.workflowInputId,
|
|
51
52
|
auditUrl: e.auditUrl,
|
|
53
|
+
loading: e.loading,
|
|
52
54
|
openComparison: () => {
|
|
53
55
|
e.comparisonOpen.value = !0;
|
|
54
56
|
}
|
|
55
57
|
};
|
|
56
58
|
}
|
|
57
59
|
function Ge() {
|
|
58
|
-
return
|
|
60
|
+
return De().comparisonOpen;
|
|
59
61
|
}
|
|
60
|
-
function
|
|
62
|
+
function me(e) {
|
|
61
63
|
return typeof e != "number" || Number.isNaN(e) ? "unverifiable" : e <= 2 ? "low" : e === 3 ? "medium" : "high";
|
|
62
64
|
}
|
|
63
65
|
const Qe = {
|
|
@@ -65,121 +67,121 @@ const Qe = {
|
|
|
65
67
|
medium: "bg-yellow-50 text-yellow-700 ring-1 ring-inset ring-yellow-600/20",
|
|
66
68
|
low: "bg-red-50 text-red-700 ring-1 ring-inset ring-red-600/20",
|
|
67
69
|
unverifiable: "bg-gray-50 text-gray-500 ring-1 ring-inset ring-gray-400/20"
|
|
68
|
-
},
|
|
70
|
+
}, re = {
|
|
69
71
|
high: "High",
|
|
70
72
|
medium: "Medium",
|
|
71
73
|
low: "Low",
|
|
72
74
|
unverifiable: "Unverifiable"
|
|
73
|
-
},
|
|
74
|
-
function
|
|
75
|
+
}, Oe = ["override", "extracted", "claim"];
|
|
76
|
+
function ge(e) {
|
|
75
77
|
return e ? e.resolved && e.resolved.source && e.resolved.source !== "none" ? e.resolved : We(e.candidates) : { value: null, source: "none" };
|
|
76
78
|
}
|
|
77
79
|
function We(e) {
|
|
78
80
|
if (e)
|
|
79
|
-
for (const t of
|
|
81
|
+
for (const t of Oe) {
|
|
80
82
|
const a = e[t];
|
|
81
83
|
if (a != null)
|
|
82
84
|
return { value: a.value, source: t };
|
|
83
85
|
}
|
|
84
86
|
return { value: null, source: "none" };
|
|
85
87
|
}
|
|
86
|
-
function
|
|
87
|
-
var g,
|
|
88
|
-
const t = (
|
|
88
|
+
function de(e) {
|
|
89
|
+
var g, x;
|
|
90
|
+
const t = (x = (g = e == null ? void 0 : e.candidates) == null ? void 0 : g.extracted) == null ? void 0 : x.reasoning;
|
|
89
91
|
if (t == null) return null;
|
|
90
92
|
const a = String(t).trim();
|
|
91
93
|
return a === "" ? null : a;
|
|
92
94
|
}
|
|
93
|
-
function
|
|
94
|
-
var g,
|
|
95
|
-
const t = (
|
|
95
|
+
function ce(e) {
|
|
96
|
+
var g, x;
|
|
97
|
+
const t = (x = (g = e == null ? void 0 : e.candidates) == null ? void 0 : g.extracted) == null ? void 0 : x.cited_text;
|
|
96
98
|
if (t == null) return null;
|
|
97
99
|
const a = String(t).trim();
|
|
98
100
|
return a === "" ? null : a;
|
|
99
101
|
}
|
|
100
|
-
function
|
|
102
|
+
function Ie(e) {
|
|
101
103
|
return e ? typeof e.discrepancy == "boolean" ? e.discrepancy : Xe(e.candidates) : !1;
|
|
102
104
|
}
|
|
103
105
|
function Xe(e) {
|
|
104
106
|
if (!e) return !1;
|
|
105
|
-
const t =
|
|
107
|
+
const t = Oe.map((a) => e[a]).filter((a) => a != null).map((a) => Ze(a.value));
|
|
106
108
|
return t.length < 2 ? !1 : new Set(t).size > 1;
|
|
107
109
|
}
|
|
108
110
|
function Ze(e) {
|
|
109
111
|
return JSON.stringify(e ?? null);
|
|
110
112
|
}
|
|
111
113
|
const et = /* @__PURE__ */ new Set(["name", "type"]);
|
|
112
|
-
function
|
|
114
|
+
function Te(e, t = "") {
|
|
113
115
|
const a = [];
|
|
114
|
-
return
|
|
116
|
+
return ve(e, t, a), a;
|
|
115
117
|
}
|
|
116
|
-
function
|
|
118
|
+
function ve(e, t, a) {
|
|
117
119
|
if (Array.isArray(e)) {
|
|
118
|
-
e.forEach((
|
|
120
|
+
e.forEach((o, c) => ve(o, `${t}[${c}]`, a));
|
|
119
121
|
return;
|
|
120
122
|
}
|
|
121
|
-
if (!
|
|
122
|
-
const
|
|
123
|
-
for (const [
|
|
124
|
-
if (
|
|
125
|
-
const
|
|
126
|
-
if (Array.isArray(
|
|
127
|
-
|
|
123
|
+
if (!we(e)) return;
|
|
124
|
+
const x = e.__meta ?? {};
|
|
125
|
+
for (const [o, c] of Object.entries(e)) {
|
|
126
|
+
if (o === "__meta") continue;
|
|
127
|
+
const n = t ? `${t}.${o}` : o;
|
|
128
|
+
if (Array.isArray(c) || we(c)) {
|
|
129
|
+
ve(c, n, a);
|
|
128
130
|
continue;
|
|
129
131
|
}
|
|
130
|
-
const
|
|
131
|
-
!
|
|
132
|
-
path:
|
|
133
|
-
label:
|
|
134
|
-
meta:
|
|
135
|
-
value:
|
|
136
|
-
unanchored: !
|
|
132
|
+
const w = x[o];
|
|
133
|
+
!w && et.has(o) || a.push({
|
|
134
|
+
path: n,
|
|
135
|
+
label: o,
|
|
136
|
+
meta: w ?? null,
|
|
137
|
+
value: c,
|
|
138
|
+
unanchored: !w
|
|
137
139
|
});
|
|
138
140
|
}
|
|
139
141
|
}
|
|
140
|
-
function
|
|
142
|
+
function we(e) {
|
|
141
143
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
142
144
|
}
|
|
143
|
-
function
|
|
145
|
+
function Ue(e) {
|
|
144
146
|
var a;
|
|
145
147
|
if (e.candidates.override) return !1;
|
|
146
148
|
const t = (a = e.candidates.extracted) == null ? void 0 : a.confidence;
|
|
147
149
|
return e.discrepancy || t == null || t <= 2;
|
|
148
150
|
}
|
|
149
151
|
function tt(e) {
|
|
150
|
-
const t =
|
|
151
|
-
(
|
|
152
|
+
const t = Te(e).filter(
|
|
153
|
+
(o) => o.meta !== null
|
|
152
154
|
), a = t.length;
|
|
153
|
-
let g = 0,
|
|
154
|
-
for (const
|
|
155
|
-
if (
|
|
155
|
+
let g = 0, x = 0;
|
|
156
|
+
for (const o of t) {
|
|
157
|
+
if (o.meta.candidates.override) {
|
|
156
158
|
g++;
|
|
157
159
|
continue;
|
|
158
160
|
}
|
|
159
|
-
|
|
161
|
+
Ue(o.meta) && x++;
|
|
160
162
|
}
|
|
161
163
|
return {
|
|
162
164
|
total: a,
|
|
163
165
|
verified: g,
|
|
164
|
-
needsReview:
|
|
166
|
+
needsReview: x,
|
|
165
167
|
percent: a === 0 ? 100 : Math.round(g / a * 100)
|
|
166
168
|
};
|
|
167
169
|
}
|
|
168
170
|
function at(e, t, a) {
|
|
169
|
-
var
|
|
170
|
-
const g = (
|
|
171
|
+
var o;
|
|
172
|
+
const g = (o = t.value) == null ? void 0 : o.anchor;
|
|
171
173
|
if (!e.saveOverride || !g) return null;
|
|
172
|
-
const
|
|
173
|
-
return async (
|
|
174
|
-
const
|
|
174
|
+
const x = e.saveOverride;
|
|
175
|
+
return async (c, n) => {
|
|
176
|
+
const w = await x({
|
|
175
177
|
workflow_input_id: e.workflowInputId,
|
|
176
178
|
object_ids: g.object_ids,
|
|
177
179
|
field: g.field,
|
|
178
180
|
field_path: g.field_path,
|
|
179
|
-
value:
|
|
180
|
-
source_choice:
|
|
181
|
+
value: c,
|
|
182
|
+
source_choice: n
|
|
181
183
|
});
|
|
182
|
-
return a(
|
|
184
|
+
return a(w), w;
|
|
183
185
|
};
|
|
184
186
|
}
|
|
185
187
|
const lt = ["data-status", "title"], nt = {
|
|
@@ -188,7 +190,7 @@ const lt = ["data-status", "title"], nt = {
|
|
|
188
190
|
}, st = {
|
|
189
191
|
key: 0,
|
|
190
192
|
class: "tv-confidence-label"
|
|
191
|
-
},
|
|
193
|
+
}, fe = /* @__PURE__ */ G({
|
|
192
194
|
__name: "ConfidenceIcon",
|
|
193
195
|
props: {
|
|
194
196
|
confidence: {},
|
|
@@ -197,7 +199,7 @@ const lt = ["data-status", "title"], nt = {
|
|
|
197
199
|
},
|
|
198
200
|
setup(e) {
|
|
199
201
|
const t = e, a = d(
|
|
200
|
-
() => t.status ??
|
|
202
|
+
() => t.status ?? me(t.confidence)
|
|
201
203
|
), g = {
|
|
202
204
|
high: "✔",
|
|
203
205
|
// check
|
|
@@ -206,14 +208,14 @@ const lt = ["data-status", "title"], nt = {
|
|
|
206
208
|
low: "✕",
|
|
207
209
|
// x
|
|
208
210
|
unverifiable: "?"
|
|
209
|
-
},
|
|
210
|
-
return (
|
|
211
|
-
class:
|
|
211
|
+
}, x = d(() => g[a.value]), o = d(() => Qe[a.value]), c = d(() => re[a.value]);
|
|
212
|
+
return (n, w) => (l(), i("span", {
|
|
213
|
+
class: A(["tv-confidence-icon inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[11px] font-semibold leading-none", o.value]),
|
|
212
214
|
"data-status": a.value,
|
|
213
|
-
title:
|
|
215
|
+
title: c.value
|
|
214
216
|
}, [
|
|
215
|
-
|
|
216
|
-
e.showLabel ? (l(),
|
|
217
|
+
r("span", nt, m(x.value), 1),
|
|
218
|
+
e.showLabel ? (l(), i("span", st, m(c.value), 1)) : b("", !0)
|
|
217
219
|
], 10, lt));
|
|
218
220
|
}
|
|
219
221
|
});
|
|
@@ -221,26 +223,26 @@ async function rt(e, t) {
|
|
|
221
223
|
const a = t.object_ids.at(-1), g = new URLSearchParams({
|
|
222
224
|
object_id: String(a),
|
|
223
225
|
field: t.field
|
|
224
|
-
}),
|
|
225
|
-
if (!
|
|
226
|
+
}), x = e.includes("?") ? "&" : "?", o = await fetch(`${e}${x}${g}`);
|
|
227
|
+
if (!o.ok)
|
|
226
228
|
throw new Error(
|
|
227
|
-
`data-point-audit ${
|
|
229
|
+
`data-point-audit ${o.status}: ${await o.text()}`
|
|
228
230
|
);
|
|
229
|
-
return (await
|
|
231
|
+
return (await o.json()).data ?? [];
|
|
230
232
|
}
|
|
231
|
-
function
|
|
232
|
-
var a, g,
|
|
233
|
+
function Ne(e) {
|
|
234
|
+
var a, g, x;
|
|
233
235
|
if (!e || e.length === 0) return [];
|
|
234
236
|
const t = /* @__PURE__ */ new Map();
|
|
235
|
-
for (const
|
|
236
|
-
const
|
|
237
|
-
let
|
|
238
|
-
|
|
239
|
-
fileLabel: ot(
|
|
240
|
-
fileUrl:
|
|
241
|
-
file:
|
|
237
|
+
for (const o of e) {
|
|
238
|
+
const c = it(o);
|
|
239
|
+
let n = t.get(c);
|
|
240
|
+
n || (n = {
|
|
241
|
+
fileLabel: ot(o),
|
|
242
|
+
fileUrl: o.file_url ?? ((a = o.file) == null ? void 0 : a.url),
|
|
243
|
+
file: o.file,
|
|
242
244
|
sources: []
|
|
243
|
-
}, t.set(
|
|
245
|
+
}, t.set(c, n)), !n.fileUrl && (o.file_url ?? ((g = o.file) == null ? void 0 : g.url)) && (n.fileUrl = o.file_url ?? ((x = o.file) == null ? void 0 : x.url)), !n.file && o.file && (n.file = o.file), n.sources.push(o);
|
|
244
246
|
}
|
|
245
247
|
return [...t.values()];
|
|
246
248
|
}
|
|
@@ -265,30 +267,30 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
|
|
|
265
267
|
}, pt = {
|
|
266
268
|
key: 5,
|
|
267
269
|
class: "text-[11px] text-gray-400"
|
|
268
|
-
}, mt = { class: "tv-audit-call-body flex flex-col gap-2 p-3" }, gt = /* @__PURE__ */
|
|
270
|
+
}, mt = { class: "tv-audit-call-body flex flex-col gap-2 p-3" }, gt = /* @__PURE__ */ G({
|
|
269
271
|
__name: "AuditCallCard",
|
|
270
272
|
props: {
|
|
271
273
|
call: {}
|
|
272
274
|
},
|
|
273
275
|
setup(e) {
|
|
274
276
|
const t = e, a = d(() => {
|
|
275
|
-
const
|
|
276
|
-
return
|
|
277
|
+
const n = t.call.status_code;
|
|
278
|
+
return n == null ? "muted" : n >= 200 && n < 300 ? "success" : n >= 400 ? "danger" : "warning";
|
|
277
279
|
}), g = d(() => {
|
|
278
|
-
const
|
|
279
|
-
return
|
|
280
|
-
}),
|
|
280
|
+
const n = t.call.run_time_ms;
|
|
281
|
+
return n == null ? null : n >= 1e3 ? `${(n / 1e3).toFixed(1)}s` : `${n}ms`;
|
|
282
|
+
}), x = d(() => {
|
|
281
283
|
if (!t.call.started_at) return null;
|
|
282
|
-
const
|
|
283
|
-
return Number.isNaN(
|
|
284
|
-
}),
|
|
284
|
+
const n = new Date(t.call.started_at);
|
|
285
|
+
return Number.isNaN(n.getTime()) ? t.call.started_at : n.toLocaleString();
|
|
286
|
+
}), o = d(
|
|
285
287
|
() => JSON.stringify(t.call.request ?? null, null, 2)
|
|
286
|
-
),
|
|
288
|
+
), c = d(
|
|
287
289
|
() => JSON.stringify(t.call.response ?? null, null, 2)
|
|
288
290
|
);
|
|
289
|
-
return (
|
|
290
|
-
|
|
291
|
-
e.call.stage ? (l(),
|
|
291
|
+
return (n, w) => (l(), i("div", dt, [
|
|
292
|
+
r("div", ct, [
|
|
293
|
+
e.call.stage ? (l(), U(s(Y), {
|
|
292
294
|
key: 0,
|
|
293
295
|
variant: "muted",
|
|
294
296
|
size: "xxs",
|
|
@@ -299,7 +301,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
|
|
|
299
301
|
]),
|
|
300
302
|
_: 1
|
|
301
303
|
})) : b("", !0),
|
|
302
|
-
e.call.model ? (l(),
|
|
304
|
+
e.call.model ? (l(), U(s(Y), {
|
|
303
305
|
key: 1,
|
|
304
306
|
variant: "info",
|
|
305
307
|
size: "xs",
|
|
@@ -310,7 +312,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
|
|
|
310
312
|
]),
|
|
311
313
|
_: 1
|
|
312
314
|
})) : b("", !0),
|
|
313
|
-
e.call.service ? (l(),
|
|
315
|
+
e.call.service ? (l(), U(s(Y), {
|
|
314
316
|
key: 2,
|
|
315
317
|
variant: "muted",
|
|
316
318
|
size: "xxs"
|
|
@@ -320,9 +322,9 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
|
|
|
320
322
|
]),
|
|
321
323
|
_: 1
|
|
322
324
|
})) : b("", !0),
|
|
323
|
-
e.call.endpoint ? (l(),
|
|
324
|
-
|
|
325
|
-
D(
|
|
325
|
+
e.call.endpoint ? (l(), i("span", vt, m(e.call.endpoint), 1)) : b("", !0),
|
|
326
|
+
w[0] || (w[0] = r("span", { class: "flex-1" }, null, -1)),
|
|
327
|
+
D(s(Y), {
|
|
326
328
|
variant: a.value,
|
|
327
329
|
size: "xxs",
|
|
328
330
|
class: "tv-audit-status"
|
|
@@ -332,24 +334,24 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
|
|
|
332
334
|
]),
|
|
333
335
|
_: 1
|
|
334
336
|
}, 8, ["variant"]),
|
|
335
|
-
g.value ? (l(),
|
|
336
|
-
|
|
337
|
+
g.value ? (l(), i("span", ft, m(g.value), 1)) : b("", !0),
|
|
338
|
+
x.value ? (l(), i("span", pt, m(x.value), 1)) : b("", !0)
|
|
337
339
|
]),
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
D(
|
|
342
|
-
"model-value":
|
|
340
|
+
r("div", mt, [
|
|
341
|
+
r("div", null, [
|
|
342
|
+
w[1] || (w[1] = r("div", { class: "mb-1 text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Request ", -1)),
|
|
343
|
+
D(s(be), {
|
|
344
|
+
"model-value": o.value,
|
|
343
345
|
format: "json",
|
|
344
346
|
collapsible: "",
|
|
345
347
|
"default-collapsed": "",
|
|
346
348
|
class: "tv-audit-request"
|
|
347
349
|
}, null, 8, ["model-value"])
|
|
348
350
|
]),
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
D(
|
|
352
|
-
"model-value":
|
|
351
|
+
r("div", null, [
|
|
352
|
+
w[2] || (w[2] = r("div", { class: "mb-1 text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Response ", -1)),
|
|
353
|
+
D(s(be), {
|
|
354
|
+
"model-value": c.value,
|
|
353
355
|
format: "json",
|
|
354
356
|
collapsible: "",
|
|
355
357
|
"default-collapsed": "",
|
|
@@ -398,7 +400,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
|
|
|
398
400
|
}, Ft = {
|
|
399
401
|
key: 2,
|
|
400
402
|
class: "tv-audit-empty rounded-lg border border-dashed border-gray-200 p-6 text-center text-sm text-gray-400"
|
|
401
|
-
}, qt = /* @__PURE__ */
|
|
403
|
+
}, qt = /* @__PURE__ */ G({
|
|
402
404
|
__name: "VerificationModal",
|
|
403
405
|
props: {
|
|
404
406
|
modelValue: { type: Boolean },
|
|
@@ -408,191 +410,191 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
|
|
|
408
410
|
},
|
|
409
411
|
emits: ["update:modelValue", "saved"],
|
|
410
412
|
setup(e, { emit: t }) {
|
|
411
|
-
const a = e, g = t,
|
|
413
|
+
const a = e, g = t, x = ie(), o = ke(), c = d({
|
|
412
414
|
get: () => a.modelValue,
|
|
413
|
-
set: (
|
|
414
|
-
}),
|
|
415
|
-
var
|
|
416
|
-
return ((
|
|
417
|
-
}),
|
|
418
|
-
var
|
|
419
|
-
return
|
|
420
|
-
}),
|
|
415
|
+
set: (f) => g("update:modelValue", f)
|
|
416
|
+
}), n = d(() => ge(a.meta)), w = d(() => a.meta.candidates.extracted), k = d(() => a.meta.candidates.claim), h = d(() => a.meta.candidates.override), y = d(() => {
|
|
417
|
+
var f;
|
|
418
|
+
return ((f = w.value) == null ? void 0 : f.confidence) ?? null;
|
|
419
|
+
}), $ = d(() => me(y.value)), S = d(() => de(a.meta)), N = d(() => ce(a.meta)), O = d(() => {
|
|
420
|
+
var f;
|
|
421
|
+
return Ne((f = w.value) == null ? void 0 : f.sources);
|
|
422
|
+
}), F = d(() => (a.meta.anchor.field_path || a.label || "Data point").split(".").map(
|
|
421
423
|
(u) => u.replace(/\[\d+\]/g, "").replace(/_/g, " ").replace(/^\w/, (C) => C.toUpperCase())
|
|
422
|
-
).join(" › ")),
|
|
424
|
+
).join(" › ")), Z = {
|
|
423
425
|
high: "success",
|
|
424
426
|
medium: "warning",
|
|
425
427
|
low: "danger",
|
|
426
428
|
unverifiable: "muted"
|
|
427
|
-
},
|
|
429
|
+
}, z = R("evidence"), J = d(() => !!x.auditUrl), ee = d(() => {
|
|
428
430
|
var u;
|
|
429
|
-
const
|
|
431
|
+
const f = [
|
|
430
432
|
{
|
|
431
433
|
value: "evidence",
|
|
432
434
|
label: "Evidence",
|
|
433
|
-
count: O.value.reduce((C,
|
|
435
|
+
count: O.value.reduce((C, v) => C + v.sources.length, 0)
|
|
434
436
|
},
|
|
435
437
|
{
|
|
436
438
|
value: "candidates",
|
|
437
439
|
label: "Candidates",
|
|
438
|
-
count:
|
|
440
|
+
count: _.value.length
|
|
439
441
|
}
|
|
440
442
|
];
|
|
441
|
-
return
|
|
443
|
+
return J.value && f.push({
|
|
442
444
|
value: "audit",
|
|
443
445
|
label: "Audit trail",
|
|
444
|
-
count: ((u =
|
|
445
|
-
}),
|
|
446
|
-
}),
|
|
447
|
-
() => O.value.map((
|
|
448
|
-
),
|
|
449
|
-
const
|
|
450
|
-
if (!
|
|
446
|
+
count: ((u = q.value) == null ? void 0 : u.length) ?? void 0
|
|
447
|
+
}), f;
|
|
448
|
+
}), P = d(
|
|
449
|
+
() => O.value.map((f) => f.file).filter((f) => !!f)
|
|
450
|
+
), K = R(null), Q = d(() => {
|
|
451
|
+
const f = K.value ?? P.value[0];
|
|
452
|
+
if (!f) return null;
|
|
451
453
|
const u = O.value.find(
|
|
452
|
-
(
|
|
454
|
+
(v) => v.file && String(v.file.id) === String(f.id)
|
|
453
455
|
);
|
|
454
456
|
if (!u) return null;
|
|
455
|
-
const C = u.sources.find((
|
|
457
|
+
const C = u.sources.find((v) => v.explanation);
|
|
456
458
|
return (C == null ? void 0 : C.explanation) ?? null;
|
|
457
|
-
}),
|
|
458
|
-
const
|
|
459
|
+
}), W = d(() => {
|
|
460
|
+
const f = /* @__PURE__ */ new Map();
|
|
459
461
|
for (const u of O.value)
|
|
460
462
|
for (const C of u.sources) {
|
|
461
|
-
const
|
|
462
|
-
|
|
463
|
+
const v = C.original_file;
|
|
464
|
+
v && !f.has(String(v.id)) && f.set(String(v.id), v);
|
|
463
465
|
}
|
|
464
|
-
return [...
|
|
465
|
-
}),
|
|
466
|
-
get: () =>
|
|
467
|
-
set: (
|
|
468
|
-
|
|
466
|
+
return [...f.values()];
|
|
467
|
+
}), M = R(null), p = d({
|
|
468
|
+
get: () => M.value !== null,
|
|
469
|
+
set: (f) => {
|
|
470
|
+
f || (M.value = null);
|
|
469
471
|
}
|
|
470
|
-
}),
|
|
471
|
-
const
|
|
472
|
-
return
|
|
472
|
+
}), _ = d(() => {
|
|
473
|
+
const f = [];
|
|
474
|
+
return h.value && f.push({
|
|
473
475
|
key: "override",
|
|
474
476
|
title: "Human override",
|
|
475
477
|
variant: "success",
|
|
476
|
-
value:
|
|
478
|
+
value: h.value.value,
|
|
477
479
|
detail: [
|
|
478
|
-
|
|
479
|
-
|
|
480
|
+
h.value.source_choice ? `basis: ${h.value.source_choice}` : null,
|
|
481
|
+
h.value.set_at ? new Date(h.value.set_at).toLocaleString() : null
|
|
480
482
|
].filter(Boolean).join(" · "),
|
|
481
|
-
winner:
|
|
482
|
-
}),
|
|
483
|
+
winner: n.value.source === "override"
|
|
484
|
+
}), w.value && f.push({
|
|
483
485
|
key: "extracted",
|
|
484
486
|
title: "Extracted",
|
|
485
|
-
variant:
|
|
486
|
-
value:
|
|
487
|
-
detail:
|
|
487
|
+
variant: Z[$.value],
|
|
488
|
+
value: w.value.value,
|
|
489
|
+
detail: y.value != null ? `Confidence ${y.value}/5 · ${re[$.value]}` : "No confidence recorded",
|
|
488
490
|
accept: a.save ? () => {
|
|
489
491
|
var u;
|
|
490
|
-
return
|
|
492
|
+
return H(X((u = w.value) == null ? void 0 : u.value), "extracted");
|
|
491
493
|
} : void 0,
|
|
492
|
-
winner:
|
|
493
|
-
}),
|
|
494
|
+
winner: n.value.source === "extracted"
|
|
495
|
+
}), k.value && f.push({
|
|
494
496
|
key: "claim",
|
|
495
497
|
title: "Claim",
|
|
496
498
|
variant: "info",
|
|
497
|
-
value:
|
|
498
|
-
detail:
|
|
499
|
+
value: k.value.value,
|
|
500
|
+
detail: k.value.claim_set_label ?? "Reference output",
|
|
499
501
|
accept: a.save ? () => {
|
|
500
502
|
var u;
|
|
501
|
-
return
|
|
503
|
+
return H(X((u = k.value) == null ? void 0 : u.value), "claim");
|
|
502
504
|
} : void 0,
|
|
503
|
-
winner:
|
|
504
|
-
}),
|
|
505
|
-
}),
|
|
506
|
-
async function
|
|
507
|
-
if (!(!a.save ||
|
|
508
|
-
|
|
505
|
+
winner: n.value.source === "claim"
|
|
506
|
+
}), f;
|
|
507
|
+
}), V = R(""), j = R(!1);
|
|
508
|
+
async function H(f, u) {
|
|
509
|
+
if (!(!a.save || j.value)) {
|
|
510
|
+
j.value = !0;
|
|
509
511
|
try {
|
|
510
|
-
const C = await a.save(
|
|
511
|
-
g("saved", C),
|
|
512
|
+
const C = await a.save(f, u);
|
|
513
|
+
g("saved", C), o.success(`Verified — ${F.value} locked in`);
|
|
512
514
|
} catch (C) {
|
|
513
|
-
console.error("template-verification: save failed", C),
|
|
515
|
+
console.error("template-verification: save failed", C), o.danger(`Could not save ${F.value} — try again`);
|
|
514
516
|
} finally {
|
|
515
|
-
|
|
517
|
+
j.value = !1;
|
|
516
518
|
}
|
|
517
519
|
}
|
|
518
520
|
}
|
|
519
|
-
const
|
|
520
|
-
function
|
|
521
|
-
return
|
|
521
|
+
const te = () => H(V.value, "custom");
|
|
522
|
+
function X(f) {
|
|
523
|
+
return f == null ? null : String(f);
|
|
522
524
|
}
|
|
523
|
-
function
|
|
524
|
-
return
|
|
525
|
+
function xe(f) {
|
|
526
|
+
return f == null ? "—" : String(f);
|
|
525
527
|
}
|
|
526
|
-
const
|
|
527
|
-
return
|
|
528
|
-
[
|
|
529
|
-
async ([
|
|
530
|
-
if (!(
|
|
531
|
-
|
|
528
|
+
const q = R(null), ae = R(!1), le = R(null);
|
|
529
|
+
return pe(
|
|
530
|
+
[z, c],
|
|
531
|
+
async ([f, u]) => {
|
|
532
|
+
if (!(f !== "audit" || !u || q.value !== null || ae.value) && x.auditUrl) {
|
|
533
|
+
ae.value = !0, le.value = null;
|
|
532
534
|
try {
|
|
533
|
-
|
|
534
|
-
|
|
535
|
+
q.value = await rt(
|
|
536
|
+
x.auditUrl,
|
|
535
537
|
a.meta.anchor
|
|
536
538
|
);
|
|
537
539
|
} catch (C) {
|
|
538
|
-
|
|
540
|
+
le.value = C instanceof Error ? C.message : String(C);
|
|
539
541
|
} finally {
|
|
540
|
-
|
|
542
|
+
ae.value = !1;
|
|
541
543
|
}
|
|
542
544
|
}
|
|
543
545
|
},
|
|
544
546
|
{ immediate: !0 }
|
|
545
|
-
), (
|
|
546
|
-
D(
|
|
547
|
-
modelValue:
|
|
548
|
-
"onUpdate:modelValue": u[3] || (u[3] = (C) =>
|
|
549
|
-
title:
|
|
547
|
+
), (f, u) => (l(), i(L, null, [
|
|
548
|
+
D(s(ue), {
|
|
549
|
+
modelValue: c.value,
|
|
550
|
+
"onUpdate:modelValue": u[3] || (u[3] = (C) => c.value = C),
|
|
551
|
+
title: F.value,
|
|
550
552
|
width: 90,
|
|
551
553
|
height: 90,
|
|
552
554
|
"close-x": "",
|
|
553
|
-
class:
|
|
555
|
+
class: A(s(E))
|
|
554
556
|
}, {
|
|
555
557
|
default: I(() => {
|
|
556
558
|
var C;
|
|
557
559
|
return [
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
u[6] || (u[6] =
|
|
563
|
-
|
|
564
|
-
|
|
560
|
+
r("div", xt, [
|
|
561
|
+
r("section", yt, [
|
|
562
|
+
r("div", bt, [
|
|
563
|
+
r("div", ht, [
|
|
564
|
+
u[6] || (u[6] = r("div", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Resolved value ", -1)),
|
|
565
|
+
r("div", _t, m(xe(n.value.value)), 1),
|
|
566
|
+
r("div", wt, [
|
|
565
567
|
u[5] || (u[5] = T(" source of truth: ", -1)),
|
|
566
|
-
|
|
568
|
+
r("span", kt, m(n.value.source), 1)
|
|
567
569
|
])
|
|
568
570
|
]),
|
|
569
|
-
|
|
570
|
-
u[7] || (u[7] =
|
|
571
|
-
|
|
572
|
-
|
|
571
|
+
r("div", $t, [
|
|
572
|
+
u[7] || (u[7] = r("div", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Extraction confidence ", -1)),
|
|
573
|
+
r("div", St, [
|
|
574
|
+
y.value != null ? (l(), U(s($e), {
|
|
573
575
|
key: 0,
|
|
574
|
-
value:
|
|
576
|
+
value: y.value,
|
|
575
577
|
max: 5,
|
|
576
578
|
size: "md",
|
|
577
|
-
variant:
|
|
579
|
+
variant: Z[$.value],
|
|
578
580
|
gradient: "",
|
|
579
581
|
shimmer: "",
|
|
580
582
|
"show-text": "",
|
|
581
583
|
"text-position": "beside",
|
|
582
|
-
label: `${
|
|
583
|
-
}, null, 8, ["value", "variant", "label"])) : (l(),
|
|
584
|
+
label: `${y.value}/5`
|
|
585
|
+
}, null, 8, ["value", "variant", "label"])) : (l(), i("div", Ct, " No confidence recorded "))
|
|
584
586
|
]),
|
|
585
|
-
|
|
586
|
-
class:
|
|
587
|
-
"text-green-600":
|
|
588
|
-
"text-yellow-600":
|
|
589
|
-
"text-red-600":
|
|
590
|
-
"text-gray-400":
|
|
587
|
+
r("div", {
|
|
588
|
+
class: A(["tv-confidence-label mt-1 text-right text-xs font-medium", {
|
|
589
|
+
"text-green-600": $.value === "high",
|
|
590
|
+
"text-yellow-600": $.value === "medium",
|
|
591
|
+
"text-red-600": $.value === "low",
|
|
592
|
+
"text-gray-400": $.value === "unverifiable"
|
|
591
593
|
}])
|
|
592
|
-
}, m(
|
|
594
|
+
}, m(s(re)[$.value]), 3)
|
|
593
595
|
])
|
|
594
596
|
]),
|
|
595
|
-
e.meta.discrepancy ? (l(),
|
|
597
|
+
e.meta.discrepancy ? (l(), U(s(he), {
|
|
596
598
|
key: 0,
|
|
597
599
|
variant: "warning",
|
|
598
600
|
class: "tv-discrepancy"
|
|
@@ -603,88 +605,88 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
|
|
|
603
605
|
_: 1
|
|
604
606
|
})) : b("", !0)
|
|
605
607
|
]),
|
|
606
|
-
D(
|
|
607
|
-
modelValue:
|
|
608
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
609
|
-
tabs:
|
|
608
|
+
D(s(Ee), {
|
|
609
|
+
modelValue: z.value,
|
|
610
|
+
"onUpdate:modelValue": u[0] || (u[0] = (v) => z.value = v),
|
|
611
|
+
tabs: ee.value,
|
|
610
612
|
class: "tv-modal-tabs"
|
|
611
613
|
}, null, 8, ["modelValue", "tabs"]),
|
|
612
|
-
|
|
613
|
-
S.value ? (l(),
|
|
614
|
-
u[9] || (u[9] =
|
|
615
|
-
D(
|
|
614
|
+
z.value === "evidence" ? (l(), i("section", Vt, [
|
|
615
|
+
S.value ? (l(), i("div", Dt, [
|
|
616
|
+
u[9] || (u[9] = r("div", { class: "mb-1 text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Reasoning ", -1)),
|
|
617
|
+
D(s(ze), {
|
|
616
618
|
"model-value": S.value,
|
|
617
619
|
readonly: "",
|
|
618
620
|
class: "tv-reasoning"
|
|
619
621
|
}, null, 8, ["model-value"])
|
|
620
622
|
])) : b("", !0),
|
|
621
|
-
|
|
622
|
-
T(" “" + m(
|
|
623
|
-
D(
|
|
624
|
-
variant: (C =
|
|
623
|
+
N.value ? (l(), i("blockquote", Ot, [
|
|
624
|
+
T(" “" + m(N.value) + "” ", 1),
|
|
625
|
+
D(s(Y), {
|
|
626
|
+
variant: (C = w.value) != null && C.cited_text_verified ? "success" : "muted",
|
|
625
627
|
size: "xxs",
|
|
626
628
|
class: "tv-cited-verified ml-2 not-italic"
|
|
627
629
|
}, {
|
|
628
630
|
default: I(() => {
|
|
629
|
-
var
|
|
631
|
+
var v;
|
|
630
632
|
return [
|
|
631
|
-
T(m((
|
|
633
|
+
T(m((v = w.value) != null && v.cited_text_verified ? "✔ verified in source" : "unverified"), 1)
|
|
632
634
|
];
|
|
633
635
|
}),
|
|
634
636
|
_: 1
|
|
635
637
|
}, 8, ["variant"])
|
|
636
638
|
])) : b("", !0),
|
|
637
|
-
|
|
638
|
-
D(
|
|
639
|
-
file:
|
|
640
|
-
"file-in-preview":
|
|
641
|
-
"onUpdate:fileInPreview": u[1] || (u[1] = (
|
|
642
|
-
"related-files":
|
|
639
|
+
P.value.length ? (l(), i("div", It, [
|
|
640
|
+
D(s(_e), {
|
|
641
|
+
file: P.value[0],
|
|
642
|
+
"file-in-preview": K.value,
|
|
643
|
+
"onUpdate:fileInPreview": u[1] || (u[1] = (v) => K.value = v),
|
|
644
|
+
"related-files": P.value,
|
|
643
645
|
"layout-toggles": ["sidebar", "continuous"],
|
|
644
646
|
"default-sidebar": "",
|
|
645
647
|
zoomable: "",
|
|
646
648
|
"storage-key": "tv-evidence-viewer",
|
|
647
649
|
class: "h-full min-h-0 flex-1"
|
|
648
650
|
}, null, 8, ["file", "file-in-preview", "related-files"]),
|
|
649
|
-
|
|
650
|
-
])) : (l(),
|
|
651
|
-
|
|
652
|
-
u[10] || (u[10] =
|
|
653
|
-
(l(!0),
|
|
654
|
-
key: String(
|
|
651
|
+
Q.value ? (l(), i("div", Tt, m(Q.value), 1)) : b("", !0)
|
|
652
|
+
])) : (l(), i("div", Ut, " No source pages recorded for this data point ")),
|
|
653
|
+
W.value.length ? (l(), i("div", Nt, [
|
|
654
|
+
u[10] || (u[10] = r("span", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, "Full documents:", -1)),
|
|
655
|
+
(l(!0), i(L, null, B(W.value, (v) => (l(), U(s(oe), {
|
|
656
|
+
key: String(v.id),
|
|
655
657
|
size: "sm",
|
|
656
658
|
variant: "info",
|
|
657
659
|
class: "tv-open-document",
|
|
658
|
-
onClick: (xa) =>
|
|
660
|
+
onClick: (xa) => M.value = v
|
|
659
661
|
}, {
|
|
660
662
|
default: I(() => [
|
|
661
|
-
T(m(
|
|
663
|
+
T(m(v.name), 1)
|
|
662
664
|
]),
|
|
663
665
|
_: 2
|
|
664
666
|
}, 1032, ["onClick"]))), 128))
|
|
665
667
|
])) : b("", !0)
|
|
666
668
|
])) : b("", !0),
|
|
667
|
-
|
|
668
|
-
(l(!0),
|
|
669
|
-
key:
|
|
670
|
-
class:
|
|
671
|
-
|
|
672
|
-
e.meta.discrepancy && !
|
|
669
|
+
z.value === "candidates" ? (l(), i("section", Rt, [
|
|
670
|
+
(l(!0), i(L, null, B(_.value, (v) => (l(), i("div", {
|
|
671
|
+
key: v.key,
|
|
672
|
+
class: A(["tv-candidate-row rounded-lg border p-4 transition-shadow", [
|
|
673
|
+
v.winner ? "border-gray-300 bg-gray-50 shadow-sm" : "border-gray-200",
|
|
674
|
+
e.meta.discrepancy && !v.winner ? "tv-candidate-disagrees border-amber-200" : ""
|
|
673
675
|
]])
|
|
674
676
|
}, [
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
D(
|
|
679
|
-
variant:
|
|
677
|
+
r("div", At, [
|
|
678
|
+
r("div", Lt, [
|
|
679
|
+
r("div", jt, [
|
|
680
|
+
D(s(Y), {
|
|
681
|
+
variant: v.variant,
|
|
680
682
|
size: "xs"
|
|
681
683
|
}, {
|
|
682
684
|
default: I(() => [
|
|
683
|
-
T(m(
|
|
685
|
+
T(m(v.title), 1)
|
|
684
686
|
]),
|
|
685
687
|
_: 2
|
|
686
688
|
}, 1032, ["variant"]),
|
|
687
|
-
|
|
689
|
+
v.winner ? (l(), U(s(Y), {
|
|
688
690
|
key: 0,
|
|
689
691
|
variant: "success",
|
|
690
692
|
size: "xxs",
|
|
@@ -696,16 +698,16 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
|
|
|
696
698
|
_: 1
|
|
697
699
|
})) : b("", !0)
|
|
698
700
|
]),
|
|
699
|
-
|
|
700
|
-
|
|
701
|
+
r("div", Et, m(xe(v.value)), 1),
|
|
702
|
+
r("div", zt, m(v.detail), 1)
|
|
701
703
|
]),
|
|
702
|
-
|
|
704
|
+
v.accept && !v.winner ? (l(), U(s(oe), {
|
|
703
705
|
key: 0,
|
|
704
706
|
size: "sm",
|
|
705
|
-
variant:
|
|
706
|
-
loading:
|
|
707
|
-
class:
|
|
708
|
-
onClick:
|
|
707
|
+
variant: v.variant,
|
|
708
|
+
loading: j.value,
|
|
709
|
+
class: A(`tv-accept-${v.key}`),
|
|
710
|
+
onClick: v.accept
|
|
709
711
|
}, {
|
|
710
712
|
default: I(() => [...u[12] || (u[12] = [
|
|
711
713
|
T("Accept this value", -1)
|
|
@@ -714,47 +716,47 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
|
|
|
714
716
|
}, 8, ["variant", "loading", "class", "onClick"])) : b("", !0)
|
|
715
717
|
])
|
|
716
718
|
], 2))), 128)),
|
|
717
|
-
e.save ? (l(),
|
|
718
|
-
D(
|
|
719
|
-
modelValue:
|
|
720
|
-
"onUpdate:modelValue": u[2] || (u[2] = (
|
|
719
|
+
e.save ? (l(), i("div", Pt, [
|
|
720
|
+
D(s(Pe), {
|
|
721
|
+
modelValue: V.value,
|
|
722
|
+
"onUpdate:modelValue": u[2] || (u[2] = (v) => V.value = v),
|
|
721
723
|
size: "sm",
|
|
722
724
|
class: "tv-custom-input flex-1",
|
|
723
725
|
placeholder: "Type the correct value…",
|
|
724
|
-
disabled:
|
|
726
|
+
disabled: j.value
|
|
725
727
|
}, null, 8, ["modelValue", "disabled"]),
|
|
726
|
-
D(
|
|
728
|
+
D(s(oe), {
|
|
727
729
|
variant: "success",
|
|
728
730
|
size: "sm",
|
|
729
731
|
class: "tv-accept-custom",
|
|
730
|
-
loading:
|
|
731
|
-
disabled: !
|
|
732
|
-
onClick:
|
|
732
|
+
loading: j.value,
|
|
733
|
+
disabled: !V.value,
|
|
734
|
+
onClick: te
|
|
733
735
|
}, {
|
|
734
736
|
default: I(() => [...u[13] || (u[13] = [
|
|
735
737
|
T("Save custom value", -1)
|
|
736
738
|
])]),
|
|
737
739
|
_: 1
|
|
738
740
|
}, 8, ["loading", "disabled"])
|
|
739
|
-
])) : (l(),
|
|
741
|
+
])) : (l(), i("div", Mt, " Read-only render — corrections are disabled here "))
|
|
740
742
|
])) : b("", !0),
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
key:
|
|
743
|
+
z.value === "audit" ? (l(), i("section", Bt, [
|
|
744
|
+
ae.value ? (l(), i(L, { key: 0 }, B(2, (v) => D(s(Se), {
|
|
745
|
+
key: v,
|
|
744
746
|
shape: "rounded",
|
|
745
747
|
class: "tv-audit-skeleton h-24 w-full"
|
|
746
|
-
})), 64)) :
|
|
748
|
+
})), 64)) : le.value ? (l(), U(s(he), {
|
|
747
749
|
key: 1,
|
|
748
750
|
variant: "danger",
|
|
749
751
|
class: "tv-audit-error"
|
|
750
752
|
}, {
|
|
751
753
|
default: I(() => [
|
|
752
|
-
T(" Could not load the audit trail: " + m(
|
|
754
|
+
T(" Could not load the audit trail: " + m(le.value), 1)
|
|
753
755
|
]),
|
|
754
756
|
_: 1
|
|
755
|
-
})) :
|
|
756
|
-
key: String(
|
|
757
|
-
call:
|
|
757
|
+
})) : q.value && q.value.length === 0 ? (l(), i("div", Ft, " No LLM calls recorded for this data point ")) : q.value ? (l(!0), i(L, { key: 3 }, B(q.value, (v) => (l(), U(gt, {
|
|
758
|
+
key: String(v.id),
|
|
759
|
+
call: v
|
|
758
760
|
}, null, 8, ["call"]))), 128)) : b("", !0)
|
|
759
761
|
])) : b("", !0)
|
|
760
762
|
])
|
|
@@ -762,19 +764,19 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
|
|
|
762
764
|
}),
|
|
763
765
|
_: 1
|
|
764
766
|
}, 8, ["modelValue", "title", "class"]),
|
|
765
|
-
|
|
767
|
+
M.value ? (l(), U(s(ue), {
|
|
766
768
|
key: 0,
|
|
767
|
-
modelValue:
|
|
768
|
-
"onUpdate:modelValue": u[4] || (u[4] = (C) =>
|
|
769
|
-
title:
|
|
769
|
+
modelValue: p.value,
|
|
770
|
+
"onUpdate:modelValue": u[4] || (u[4] = (C) => p.value = C),
|
|
771
|
+
title: M.value.name,
|
|
770
772
|
width: 90,
|
|
771
773
|
height: 90,
|
|
772
774
|
"close-x": "",
|
|
773
|
-
class:
|
|
775
|
+
class: A(s(E))
|
|
774
776
|
}, {
|
|
775
777
|
default: I(() => [
|
|
776
|
-
D(
|
|
777
|
-
file:
|
|
778
|
+
D(s(_e), {
|
|
779
|
+
file: M.value,
|
|
778
780
|
downloadable: "",
|
|
779
781
|
zoomable: "",
|
|
780
782
|
class: "tv-document-viewer h-full"
|
|
@@ -792,7 +794,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
|
|
|
792
794
|
key: 2,
|
|
793
795
|
class: "tv-discrepancy-indicator ml-0.5 text-amber-500",
|
|
794
796
|
"aria-label": "discrepancy"
|
|
795
|
-
}, _a = /* @__PURE__ */
|
|
797
|
+
}, _a = /* @__PURE__ */ G({
|
|
796
798
|
__name: "VerifiedField",
|
|
797
799
|
props: {
|
|
798
800
|
source: {},
|
|
@@ -801,106 +803,114 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
|
|
|
801
803
|
format: { type: Function }
|
|
802
804
|
},
|
|
803
805
|
setup(e) {
|
|
804
|
-
const t = e, a =
|
|
805
|
-
var
|
|
806
|
-
return
|
|
807
|
-
}),
|
|
806
|
+
const t = e, a = ie(), g = d(() => a.enabled.value), x = d(() => a.loading), o = R(null), c = d(() => {
|
|
807
|
+
var p;
|
|
808
|
+
return o.value ? o.value : t.source && t.field ? ((p = t.source.__meta) == null ? void 0 : p[t.field]) ?? null : null;
|
|
809
|
+
}), n = d(() => ge(c.value)), w = d(() => {
|
|
808
810
|
if (t.original !== void 0 && t.original !== null)
|
|
809
811
|
return t.original;
|
|
810
|
-
if (
|
|
811
|
-
return
|
|
812
|
+
if (c.value && n.value.value !== null && n.value.value !== void 0)
|
|
813
|
+
return n.value.value;
|
|
812
814
|
if (t.source && t.field) return t.source[t.field];
|
|
813
|
-
}),
|
|
814
|
-
const
|
|
815
|
-
return
|
|
816
|
-
}),
|
|
815
|
+
}), k = d(() => {
|
|
816
|
+
const p = w.value;
|
|
817
|
+
return p == null ? "" : typeof t.format == "function" ? t.format(p) : String(p);
|
|
818
|
+
}), h = d(
|
|
817
819
|
() => {
|
|
818
|
-
var
|
|
819
|
-
return
|
|
820
|
+
var p, _, V;
|
|
821
|
+
return me((V = (_ = (p = c.value) == null ? void 0 : p.candidates) == null ? void 0 : _.extracted) == null ? void 0 : V.confidence);
|
|
820
822
|
}
|
|
821
|
-
),
|
|
822
|
-
var
|
|
823
|
-
return !!((
|
|
824
|
-
}),
|
|
825
|
-
var
|
|
826
|
-
const
|
|
827
|
-
return !!(
|
|
828
|
-
}),
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
823
|
+
), y = d(() => Ie(c.value)), $ = d(() => {
|
|
824
|
+
var p, _;
|
|
825
|
+
return !!((_ = (p = c.value) == null ? void 0 : p.candidates) != null && _.override);
|
|
826
|
+
}), S = d(() => {
|
|
827
|
+
var _;
|
|
828
|
+
const p = (_ = c.value) == null ? void 0 : _.candidates;
|
|
829
|
+
return !!(p != null && p.override || p != null && p.extracted || p != null && p.claim);
|
|
830
|
+
}), N = d(() => g.value), O = d(() => !!c.value), F = d(() => {
|
|
831
|
+
const p = c.value;
|
|
832
|
+
return N.value && !!p && Ue(p);
|
|
833
|
+
}), Z = d(() => {
|
|
834
|
+
var H, te, X;
|
|
835
|
+
const p = (te = (H = c.value) == null ? void 0 : H.candidates) == null ? void 0 : te.extracted;
|
|
836
|
+
if (!p) return "No verification data";
|
|
837
|
+
const _ = [], V = re[h.value];
|
|
838
|
+
_.push(
|
|
839
|
+
p.confidence != null ? `${V} (${p.confidence}/5)` : V
|
|
837
840
|
);
|
|
838
|
-
const
|
|
839
|
-
return
|
|
841
|
+
const j = ((X = p.sources) == null ? void 0 : X.length) ?? 0;
|
|
842
|
+
return j > 0 && _.push(`${j} source ${j === 1 ? "page" : "pages"}`), y.value && _.push("sources disagree"), _.join(" · ");
|
|
840
843
|
});
|
|
841
|
-
function
|
|
842
|
-
var
|
|
843
|
-
|
|
844
|
+
function z(p) {
|
|
845
|
+
var _;
|
|
846
|
+
o.value = p, (_ = t.source) != null && _.__meta && t.field && (t.source.__meta[t.field] = p);
|
|
844
847
|
}
|
|
845
|
-
const
|
|
846
|
-
function
|
|
847
|
-
|
|
848
|
+
const J = d(() => at(a, c, z)), ee = d(() => !!J.value), P = R(!1), K = R(!1);
|
|
849
|
+
function Q() {
|
|
850
|
+
c.value && (P.value = !0);
|
|
848
851
|
}
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
852
|
+
const W = d(() => O.value);
|
|
853
|
+
async function M(p) {
|
|
854
|
+
K.value = !1;
|
|
855
|
+
const V = (p.target.textContent ?? "").trim();
|
|
856
|
+
!J.value || V === k.value || await J.value(V, "custom");
|
|
853
857
|
}
|
|
854
|
-
return (
|
|
855
|
-
class:
|
|
858
|
+
return (p, _) => (l(), i("span", {
|
|
859
|
+
class: A(["tv-field inline-flex items-baseline gap-1", F.value ? "tv-needs-review" : ""])
|
|
856
860
|
}, [
|
|
857
|
-
|
|
858
|
-
class: R([
|
|
859
|
-
"tv-field-value",
|
|
860
|
-
S.value && !k.value ? "tv-field-unverified cursor-pointer border-b border-dotted border-gray-300" : ""
|
|
861
|
-
]),
|
|
862
|
-
contenteditable: j.value,
|
|
863
|
-
"data-editable": j.value ? "true" : "false",
|
|
864
|
-
onFocus: w[0] || (w[0] = (V) => X.value = !0),
|
|
865
|
-
onBlur: Q,
|
|
866
|
-
onKeydown: w[1] || (w[1] = Ue(Ne((V) => V.target.blur(), ["prevent"]), ["enter"])),
|
|
867
|
-
onClick: w[2] || (w[2] = (V) => S.value && !k.value ? F() : void 0)
|
|
868
|
-
}, [
|
|
869
|
-
Re(f.$slots, "default", {
|
|
870
|
-
value: s.value,
|
|
871
|
-
formatted: h.value
|
|
872
|
-
}, () => [
|
|
873
|
-
T(m(h.value), 1)
|
|
874
|
-
])
|
|
875
|
-
], 42, Yt),
|
|
876
|
-
S.value && k.value ? (l(), N(r(Me), {
|
|
861
|
+
x.value ? (l(), U(s(Se), {
|
|
877
862
|
key: 0,
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
}, {
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
863
|
+
shape: "rounded",
|
|
864
|
+
class: "tv-field-skeleton inline-block h-[1em] w-16 align-middle"
|
|
865
|
+
})) : (l(), i(L, { key: 1 }, [
|
|
866
|
+
r("span", {
|
|
867
|
+
class: A([
|
|
868
|
+
"tv-field-value",
|
|
869
|
+
N.value && !S.value ? "tv-field-unverified cursor-pointer border-b border-dotted border-gray-300" : ""
|
|
870
|
+
]),
|
|
871
|
+
contenteditable: ee.value,
|
|
872
|
+
"data-editable": ee.value ? "true" : "false",
|
|
873
|
+
onFocus: _[0] || (_[0] = (V) => K.value = !0),
|
|
874
|
+
onBlur: M,
|
|
875
|
+
onKeydown: _[1] || (_[1] = Re(ne((V) => V.target.blur(), ["prevent"]), ["enter"])),
|
|
876
|
+
onClick: _[2] || (_[2] = (V) => N.value && !S.value ? Q() : void 0)
|
|
877
|
+
}, [
|
|
878
|
+
Ae(p.$slots, "default", {
|
|
879
|
+
value: w.value,
|
|
880
|
+
formatted: k.value
|
|
881
|
+
}, () => [
|
|
882
|
+
T(m(k.value), 1)
|
|
883
|
+
])
|
|
884
|
+
], 42, Yt),
|
|
885
|
+
N.value ? (l(), U(s(Me), {
|
|
886
|
+
key: 0,
|
|
887
|
+
tooltip: Z.value,
|
|
888
|
+
placement: "top"
|
|
889
|
+
}, {
|
|
890
|
+
trigger: I(() => [
|
|
891
|
+
r("button", {
|
|
892
|
+
type: "button",
|
|
893
|
+
class: A(["tv-overlay inline-flex items-center align-middle transition-transform duration-150", [s(E), W.value ? "cursor-pointer hover:scale-110" : "cursor-default"]]),
|
|
894
|
+
onClick: _[3] || (_[3] = (V) => W.value ? Q() : void 0)
|
|
895
|
+
}, [
|
|
896
|
+
$.value ? (l(), i("span", Jt, "✔")) : (l(), U(fe, {
|
|
897
|
+
key: 0,
|
|
898
|
+
status: h.value
|
|
899
|
+
}, null, 8, ["status"])),
|
|
900
|
+
y.value && !$.value ? (l(), i("span", Kt, "⚠")) : b("", !0)
|
|
901
|
+
], 2)
|
|
902
|
+
]),
|
|
903
|
+
_: 1
|
|
904
|
+
}, 8, ["tooltip"])) : b("", !0),
|
|
905
|
+
c.value ? (l(), U(qt, {
|
|
906
|
+
key: 1,
|
|
907
|
+
modelValue: P.value,
|
|
908
|
+
"onUpdate:modelValue": _[4] || (_[4] = (V) => P.value = V),
|
|
909
|
+
meta: c.value,
|
|
910
|
+
label: e.field,
|
|
911
|
+
save: J.value
|
|
912
|
+
}, null, 8, ["modelValue", "meta", "label", "save"])) : b("", !0)
|
|
913
|
+
], 64))
|
|
904
914
|
], 2));
|
|
905
915
|
}
|
|
906
916
|
}), Ht = { class: "tv-comparison-page flex flex-col gap-4" }, Gt = {
|
|
@@ -921,106 +931,106 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
|
|
|
921
931
|
}, sa = { class: "tv-datapoint-sources ml-4 text-xs text-gray-500" }, ra = ["href"], ia = { key: 1 }, oa = { class: "ml-1" }, ua = {
|
|
922
932
|
key: 2,
|
|
923
933
|
class: "tv-unanchored-group flex flex-col gap-1"
|
|
924
|
-
}, da = { class: "tv-datapoint-path font-mono text-xs text-gray-500" }, ca = { class: "tv-datapoint-value" }, va = /* @__PURE__ */
|
|
934
|
+
}, da = { class: "tv-datapoint-path font-mono text-xs text-gray-500" }, ca = { class: "tv-datapoint-value" }, va = /* @__PURE__ */ G({
|
|
925
935
|
__name: "ComparisonPage",
|
|
926
936
|
setup(e) {
|
|
927
|
-
const t =
|
|
928
|
-
function
|
|
929
|
-
const
|
|
930
|
-
return
|
|
937
|
+
const t = ie(), a = d(() => Te(t.data)), g = d(() => a.value.filter((k) => !k.unanchored)), x = d(() => a.value.filter((k) => k.unanchored));
|
|
938
|
+
function o(k) {
|
|
939
|
+
const h = ge(k).value;
|
|
940
|
+
return h == null ? "" : String(h);
|
|
931
941
|
}
|
|
932
|
-
function
|
|
933
|
-
return
|
|
942
|
+
function c(k) {
|
|
943
|
+
return k == null ? "" : String(k);
|
|
934
944
|
}
|
|
935
|
-
function
|
|
936
|
-
var
|
|
937
|
-
return (
|
|
945
|
+
function n(k) {
|
|
946
|
+
var h, y, $;
|
|
947
|
+
return ($ = (y = (h = k.meta) == null ? void 0 : h.candidates) == null ? void 0 : y.extracted) == null ? void 0 : $.confidence;
|
|
938
948
|
}
|
|
939
|
-
function
|
|
940
|
-
var
|
|
941
|
-
const
|
|
942
|
-
if (!
|
|
943
|
-
const
|
|
944
|
-
return
|
|
949
|
+
function w(k) {
|
|
950
|
+
var $;
|
|
951
|
+
const h = ($ = k.meta) == null ? void 0 : $.candidates;
|
|
952
|
+
if (!h) return [];
|
|
953
|
+
const y = [];
|
|
954
|
+
return h.override && y.push({ source: "override", value: h.override.value }), h.extracted && y.push({ source: "extracted", value: h.extracted.value }), h.claim && y.push({ source: "claim", value: h.claim.value }), y;
|
|
945
955
|
}
|
|
946
|
-
return (
|
|
947
|
-
|
|
948
|
-
a.value.length === 0 ? (l(),
|
|
949
|
-
g.value.length ? (l(),
|
|
950
|
-
(l(!0),
|
|
951
|
-
var
|
|
952
|
-
return l(),
|
|
953
|
-
key:
|
|
956
|
+
return (k, h) => (l(), i("div", Ht, [
|
|
957
|
+
h[1] || (h[1] = r("h2", { class: "tv-comparison-title text-lg font-semibold" }, "Verification comparison", -1)),
|
|
958
|
+
a.value.length === 0 ? (l(), i("p", Gt, " No data points to compare. ")) : b("", !0),
|
|
959
|
+
g.value.length ? (l(), i("section", Qt, [
|
|
960
|
+
(l(!0), i(L, null, B(g.value, (y) => {
|
|
961
|
+
var $, S, N;
|
|
962
|
+
return l(), i("div", {
|
|
963
|
+
key: y.path,
|
|
954
964
|
class: "tv-datapoint border-t border-gray-100 pt-2"
|
|
955
965
|
}, [
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
D(
|
|
960
|
-
confidence:
|
|
966
|
+
r("div", Wt, [
|
|
967
|
+
r("span", Xt, m(y.path), 1),
|
|
968
|
+
r("span", Zt, m(o(y.meta)), 1),
|
|
969
|
+
D(fe, {
|
|
970
|
+
confidence: n(y),
|
|
961
971
|
"show-label": ""
|
|
962
972
|
}, null, 8, ["confidence"]),
|
|
963
|
-
|
|
973
|
+
s(Ie)(y.meta) ? (l(), i("span", ea, "⚠ discrepancy")) : b("", !0)
|
|
964
974
|
]),
|
|
965
|
-
|
|
966
|
-
(l(!0),
|
|
975
|
+
r("ul", ta, [
|
|
976
|
+
(l(!0), i(L, null, B(w(y), (O) => (l(), i("li", {
|
|
967
977
|
key: O.source,
|
|
968
978
|
class: "tv-candidate"
|
|
969
979
|
}, [
|
|
970
|
-
|
|
971
|
-
T(" " + m(
|
|
980
|
+
r("span", aa, m(O.source) + ":", 1),
|
|
981
|
+
T(" " + m(c(O.value)), 1)
|
|
972
982
|
]))), 128))
|
|
973
983
|
]),
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
(l(!0),
|
|
978
|
-
key:
|
|
984
|
+
s(de)(y.meta) ? (l(), i("p", la, m(s(de)(y.meta)), 1)) : b("", !0),
|
|
985
|
+
s(ce)(y.meta) ? (l(), i("p", na, " “" + m(s(ce)(y.meta)) + "” ", 1)) : b("", !0),
|
|
986
|
+
r("ul", sa, [
|
|
987
|
+
(l(!0), i(L, null, B(s(Ne)((N = (S = ($ = y.meta) == null ? void 0 : $.candidates) == null ? void 0 : S.extracted) == null ? void 0 : N.sources), (O, F) => (l(), i("li", {
|
|
988
|
+
key: F,
|
|
979
989
|
class: "tv-source-group"
|
|
980
990
|
}, [
|
|
981
|
-
O.fileUrl ? (l(),
|
|
991
|
+
O.fileUrl ? (l(), i("a", {
|
|
982
992
|
key: 0,
|
|
983
993
|
href: O.fileUrl,
|
|
984
994
|
class: "tv-source-link text-blue-600 underline",
|
|
985
995
|
target: "_blank",
|
|
986
996
|
rel: "noopener"
|
|
987
|
-
}, m(O.fileLabel), 9, ra)) : (l(),
|
|
988
|
-
|
|
997
|
+
}, m(O.fileLabel), 9, ra)) : (l(), i("span", ia, m(O.fileLabel), 1)),
|
|
998
|
+
r("span", oa, "(" + m(O.sources.map(s(ut)).join(", ")) + ")", 1)
|
|
989
999
|
]))), 128))
|
|
990
1000
|
])
|
|
991
1001
|
]);
|
|
992
1002
|
}), 128))
|
|
993
1003
|
])) : b("", !0),
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
(l(!0),
|
|
997
|
-
key:
|
|
1004
|
+
x.value.length ? (l(), i("section", ua, [
|
|
1005
|
+
h[0] || (h[0] = r("h3", { class: "tv-unanchored-title text-sm font-semibold text-gray-500" }, " Unanchored / not from source ", -1)),
|
|
1006
|
+
(l(!0), i(L, null, B(x.value, (y) => (l(), i("div", {
|
|
1007
|
+
key: y.path,
|
|
998
1008
|
class: "tv-unanchored-datapoint flex items-center gap-2 text-sm"
|
|
999
1009
|
}, [
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
D(
|
|
1010
|
+
r("span", da, m(y.path), 1),
|
|
1011
|
+
r("span", ca, m(c(y.value)), 1),
|
|
1012
|
+
D(fe, { status: "unverifiable" })
|
|
1003
1013
|
]))), 128))
|
|
1004
1014
|
])) : b("", !0)
|
|
1005
1015
|
]));
|
|
1006
1016
|
}
|
|
1007
|
-
}), fa = { class: "tv-enable-toggle flex items-center justify-between text-sm font-medium text-gray-700" }, pa = { class: "tv-progress-block" }, ma = { class: "mb-1 flex items-baseline justify-between" }, ga = { class: "tv-progress-count text-xs font-semibold text-gray-600" }, wa = /* @__PURE__ */
|
|
1017
|
+
}), fa = { class: "tv-enable-toggle flex items-center justify-between text-sm font-medium text-gray-700" }, pa = { class: "tv-progress-block" }, ma = { class: "mb-1 flex items-baseline justify-between" }, ga = { class: "tv-progress-count text-xs font-semibold text-gray-600" }, wa = /* @__PURE__ */ G({
|
|
1008
1018
|
__name: "VerificationChrome",
|
|
1009
1019
|
setup(e) {
|
|
1010
|
-
const t =
|
|
1011
|
-
|
|
1012
|
-
() =>
|
|
1013
|
-
(
|
|
1014
|
-
|
|
1020
|
+
const t = ie(), { enabled: a, openComparison: g } = t, x = Ge(), o = ke(), c = R(!1), n = d(() => tt(t.data)), w = R(!1);
|
|
1021
|
+
pe(
|
|
1022
|
+
() => n.value.percent,
|
|
1023
|
+
($) => {
|
|
1024
|
+
$ === 100 && n.value.total > 0 && !w.value && (w.value = !0, o.success("All data points verified 🎯"));
|
|
1015
1025
|
}
|
|
1016
1026
|
);
|
|
1017
|
-
let
|
|
1018
|
-
function
|
|
1019
|
-
const
|
|
1020
|
-
if (
|
|
1021
|
-
|
|
1022
|
-
const S = k
|
|
1023
|
-
|
|
1027
|
+
let k = 0;
|
|
1028
|
+
function h() {
|
|
1029
|
+
const $ = document.querySelectorAll(".tv-needs-review");
|
|
1030
|
+
if (!$.length) return;
|
|
1031
|
+
k = k % $.length;
|
|
1032
|
+
const S = $[k];
|
|
1033
|
+
k++, S.scrollIntoView({ behavior: "smooth", block: "center" }), S.animate(
|
|
1024
1034
|
[
|
|
1025
1035
|
{ boxShadow: "0 0 0 0 rgba(245, 158, 11, 0.8)" },
|
|
1026
1036
|
{ boxShadow: "0 0 0 12px rgba(245, 158, 11, 0)" }
|
|
@@ -1028,116 +1038,116 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
|
|
|
1028
1038
|
{ duration: 900, iterations: 2 }
|
|
1029
1039
|
);
|
|
1030
1040
|
}
|
|
1031
|
-
function
|
|
1032
|
-
g(),
|
|
1041
|
+
function y() {
|
|
1042
|
+
g(), c.value = !1;
|
|
1033
1043
|
}
|
|
1034
|
-
return (
|
|
1035
|
-
|
|
1044
|
+
return ($, S) => (l(), i(L, null, [
|
|
1045
|
+
r("button", {
|
|
1036
1046
|
type: "button",
|
|
1037
|
-
class:
|
|
1047
|
+
class: A(["tv-settings-button fixed bottom-4 right-4 z-50 flex h-11 w-11 items-center justify-center rounded-full bg-gray-900 text-white shadow-lg transition-transform hover:scale-105", s(E)]),
|
|
1038
1048
|
title: "Verification",
|
|
1039
|
-
onClick: S[0] || (S[0] = (
|
|
1049
|
+
onClick: S[0] || (S[0] = ne((N) => c.value = !c.value, ["stop"]))
|
|
1040
1050
|
}, [
|
|
1041
|
-
D(
|
|
1042
|
-
icon:
|
|
1051
|
+
D(s(Be), {
|
|
1052
|
+
icon: s(Fe),
|
|
1043
1053
|
class: "h-5 w-5"
|
|
1044
1054
|
}, null, 8, ["icon"]),
|
|
1045
|
-
|
|
1055
|
+
s(a) && n.value.needsReview > 0 ? (l(), U(s(qe), {
|
|
1046
1056
|
key: 0,
|
|
1047
|
-
value:
|
|
1057
|
+
value: n.value.needsReview,
|
|
1048
1058
|
variant: "warning",
|
|
1049
1059
|
class: "tv-needs-review-badge absolute -right-1 -top-1"
|
|
1050
1060
|
}, null, 8, ["value"])) : b("", !0)
|
|
1051
1061
|
], 2),
|
|
1052
|
-
|
|
1062
|
+
c.value ? (l(), i("div", {
|
|
1053
1063
|
key: 0,
|
|
1054
|
-
class:
|
|
1064
|
+
class: A(["tv-settings-panel fixed bottom-20 right-4 z-50 flex w-72 flex-col gap-4 rounded-xl bg-white p-4 shadow-2xl ring-1 ring-gray-200", s(E)])
|
|
1055
1065
|
}, [
|
|
1056
|
-
|
|
1057
|
-
S[3] || (S[3] =
|
|
1058
|
-
|
|
1059
|
-
"onUpdate:modelValue": S[1] || (S[1] = (
|
|
1066
|
+
r("label", fa, [
|
|
1067
|
+
S[3] || (S[3] = r("span", null, "Verification overlay", -1)),
|
|
1068
|
+
Le(r("input", {
|
|
1069
|
+
"onUpdate:modelValue": S[1] || (S[1] = (N) => ye(a) ? a.value = N : null),
|
|
1060
1070
|
type: "checkbox",
|
|
1061
1071
|
class: "tv-enable-checkbox h-4 w-4 accent-gray-900"
|
|
1062
1072
|
}, null, 512), [
|
|
1063
|
-
[
|
|
1073
|
+
[je, s(a)]
|
|
1064
1074
|
])
|
|
1065
1075
|
]),
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
S[4] || (S[4] =
|
|
1070
|
-
|
|
1076
|
+
s(a) && n.value.total > 0 ? (l(), i(L, { key: 0 }, [
|
|
1077
|
+
r("div", pa, [
|
|
1078
|
+
r("div", ma, [
|
|
1079
|
+
S[4] || (S[4] = r("span", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, "Review progress", -1)),
|
|
1080
|
+
r("span", ga, m(n.value.verified) + " / " + m(n.value.total), 1)
|
|
1071
1081
|
]),
|
|
1072
|
-
D(
|
|
1073
|
-
value:
|
|
1074
|
-
max:
|
|
1082
|
+
D(s($e), {
|
|
1083
|
+
value: n.value.verified,
|
|
1084
|
+
max: n.value.total,
|
|
1075
1085
|
size: "md",
|
|
1076
|
-
variant:
|
|
1077
|
-
striped:
|
|
1078
|
-
"animate-stripes":
|
|
1079
|
-
glow:
|
|
1086
|
+
variant: n.value.percent === 100 ? "success" : "info",
|
|
1087
|
+
striped: n.value.percent < 100,
|
|
1088
|
+
"animate-stripes": n.value.percent < 100,
|
|
1089
|
+
glow: n.value.percent === 100,
|
|
1080
1090
|
gradient: ""
|
|
1081
1091
|
}, null, 8, ["value", "max", "variant", "striped", "animate-stripes", "glow"])
|
|
1082
1092
|
]),
|
|
1083
|
-
|
|
1093
|
+
n.value.needsReview > 0 ? (l(), i("button", {
|
|
1084
1094
|
key: 0,
|
|
1085
1095
|
type: "button",
|
|
1086
|
-
class:
|
|
1087
|
-
onClick:
|
|
1096
|
+
class: A(["tv-next-flagged flex items-center justify-between rounded-lg bg-amber-50 px-3 py-2 text-left text-xs font-medium text-amber-700 ring-1 ring-inset ring-amber-600/20 transition hover:bg-amber-100", s(E)]),
|
|
1097
|
+
onClick: ne(h, ["stop"])
|
|
1088
1098
|
}, [
|
|
1089
|
-
|
|
1090
|
-
S[5] || (S[5] =
|
|
1099
|
+
r("span", null, m(n.value.needsReview) + " need" + m(n.value.needsReview === 1 ? "s" : "") + " review", 1),
|
|
1100
|
+
S[5] || (S[5] = r("span", { "aria-hidden": "true" }, "→", -1))
|
|
1091
1101
|
], 2)) : b("", !0)
|
|
1092
1102
|
], 64)) : b("", !0),
|
|
1093
|
-
|
|
1103
|
+
r("button", {
|
|
1094
1104
|
type: "button",
|
|
1095
|
-
class:
|
|
1096
|
-
onClick:
|
|
1105
|
+
class: A(["tv-open-comparison rounded-lg border border-gray-200 px-3 py-2 text-sm font-medium text-gray-600 transition hover:bg-gray-50", s(E)]),
|
|
1106
|
+
onClick: ne(y, ["stop"])
|
|
1097
1107
|
}, " Open comparison page ", 2)
|
|
1098
1108
|
], 2)) : b("", !0),
|
|
1099
|
-
D(
|
|
1100
|
-
modelValue:
|
|
1101
|
-
"onUpdate:modelValue": S[2] || (S[2] = (
|
|
1109
|
+
D(s(ue), {
|
|
1110
|
+
modelValue: s(x),
|
|
1111
|
+
"onUpdate:modelValue": S[2] || (S[2] = (N) => ye(x) ? x.value = N : null),
|
|
1102
1112
|
title: "Verification comparison",
|
|
1103
1113
|
width: 80,
|
|
1104
1114
|
"close-x": "",
|
|
1105
|
-
class:
|
|
1115
|
+
class: A(s(E))
|
|
1106
1116
|
}, {
|
|
1107
1117
|
default: I(() => [
|
|
1108
1118
|
D(va)
|
|
1109
1119
|
]),
|
|
1110
1120
|
_: 1
|
|
1111
1121
|
}, 8, ["modelValue", "class"]),
|
|
1112
|
-
D(
|
|
1113
|
-
class:
|
|
1122
|
+
D(s(Ye), {
|
|
1123
|
+
class: A(s(E))
|
|
1114
1124
|
}, null, 8, ["class"])
|
|
1115
1125
|
], 64));
|
|
1116
1126
|
}
|
|
1117
1127
|
});
|
|
1118
1128
|
export {
|
|
1119
|
-
|
|
1129
|
+
E as CHROME_CLASS,
|
|
1120
1130
|
va as ComparisonPage,
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1131
|
+
fe as ConfidenceIcon,
|
|
1132
|
+
Ce as ENABLED_STORAGE_KEY,
|
|
1133
|
+
Oe as RESOLUTION_PRIORITY,
|
|
1124
1134
|
Qe as STATUS_COLORS,
|
|
1125
|
-
|
|
1135
|
+
re as STATUS_LABELS,
|
|
1126
1136
|
wa as VerificationChrome,
|
|
1127
1137
|
qt as VerificationModal,
|
|
1128
1138
|
_a as VerifiedField,
|
|
1129
|
-
|
|
1139
|
+
me as bucketConfidence,
|
|
1130
1140
|
Xe as candidatesDisagree,
|
|
1131
|
-
|
|
1141
|
+
ce as citedTextOf,
|
|
1132
1142
|
tt as computeProgress,
|
|
1133
1143
|
rt as fetchDataPointAudit,
|
|
1134
|
-
|
|
1135
|
-
|
|
1144
|
+
Ne as groupSources,
|
|
1145
|
+
Ie as hasDiscrepancy,
|
|
1136
1146
|
ha as initVerification,
|
|
1137
|
-
|
|
1147
|
+
de as reasoningOf,
|
|
1138
1148
|
We as resolveCandidates,
|
|
1139
|
-
|
|
1149
|
+
ge as resolveDataPoint,
|
|
1140
1150
|
ut as sourceRowLabel,
|
|
1141
|
-
|
|
1142
|
-
|
|
1151
|
+
ie as useVerification,
|
|
1152
|
+
Te as walkDataPoints
|
|
1143
1153
|
};
|