@intellectif/lk-core 0.17.0 → 0.19.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/CHANGELOG.md +61 -0
- package/README.md +3 -2
- package/dist/{activity-BmjBjXVJ.d.cts → activity-f0bgZSTP.d.cts} +175 -134
- package/dist/{activity-BmjBjXVJ.d.ts → activity-f0bgZSTP.d.ts} +175 -134
- package/dist/ai-check.cjs +283 -0
- package/dist/ai-check.cjs.map +1 -0
- package/dist/ai-check.d.cts +106 -0
- package/dist/ai-check.d.ts +106 -0
- package/dist/ai-check.js +283 -0
- package/dist/ai-check.js.map +1 -0
- package/dist/chunk-BIJCO2HM.js +443 -0
- package/dist/chunk-BIJCO2HM.js.map +1 -0
- package/dist/{chunk-XNMKDFPW.cjs → chunk-COBK2RUX.cjs} +44 -9
- package/dist/chunk-COBK2RUX.cjs.map +1 -0
- package/dist/chunk-FVZJ4X3Y.cjs +443 -0
- package/dist/chunk-FVZJ4X3Y.cjs.map +1 -0
- package/dist/{chunk-WXS5EB65.js → chunk-MMEQKFFQ.js} +43 -8
- package/dist/chunk-MMEQKFFQ.js.map +1 -0
- package/dist/{index-G_KusUcK.d.ts → index-DMCM3e3P.d.ts} +1 -1
- package/dist/{index-CvfeD_cU.d.cts → index-bpuDhvXV.d.cts} +1 -1
- package/dist/index.cjs +37 -422
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -11
- package/dist/index.d.ts +30 -11
- package/dist/index.js +37 -422
- package/dist/index.js.map +1 -1
- package/dist/schemas.d.cts +2 -2
- package/dist/schemas.d.ts +2 -2
- package/dist/scoring.cjs +2 -2
- package/dist/scoring.d.cts +33 -5
- package/dist/scoring.d.ts +33 -5
- package/dist/scoring.js +1 -1
- package/dist/xapi.d.cts +1 -1
- package/dist/xapi.d.ts +1 -1
- package/package.json +11 -1
- package/vectors/README.md +9 -3
- package/vectors/scoring.json +1258 -10
- package/dist/chunk-WXS5EB65.js.map +0 -1
- package/dist/chunk-XNMKDFPW.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
var _chunkEOFWSGLUcjs = require('./chunk-EOFWSGLU.cjs');
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
|
|
@@ -16,14 +17,12 @@
|
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
|
|
19
|
-
var _chunkXNMKDFPWcjs = require('./chunk-XNMKDFPW.cjs');
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var _chunkEOFWSGLUcjs = require('./chunk-EOFWSGLU.cjs');
|
|
27
26
|
|
|
28
27
|
|
|
29
28
|
|
|
@@ -31,6 +30,7 @@ var _chunkEOFWSGLUcjs = require('./chunk-EOFWSGLU.cjs');
|
|
|
31
30
|
|
|
32
31
|
|
|
33
32
|
|
|
33
|
+
var _chunk2CV6NU32cjs = require('./chunk-2CV6NU32.cjs');
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
@@ -45,11 +45,11 @@ var _chunkEOFWSGLUcjs = require('./chunk-EOFWSGLU.cjs');
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
48
|
+
var _chunkFVZJ4X3Ycjs = require('./chunk-FVZJ4X3Y.cjs');
|
|
48
49
|
|
|
49
50
|
|
|
50
51
|
|
|
51
52
|
|
|
52
|
-
var _chunk2CV6NU32cjs = require('./chunk-2CV6NU32.cjs');
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
|
|
@@ -64,6 +64,8 @@ var _chunk2CV6NU32cjs = require('./chunk-2CV6NU32.cjs');
|
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
|
|
67
|
+
var _chunkCOBK2RUXcjs = require('./chunk-COBK2RUX.cjs');
|
|
68
|
+
|
|
67
69
|
|
|
68
70
|
|
|
69
71
|
|
|
@@ -136,406 +138,19 @@ var _chunk2CV6NU32cjs = require('./chunk-2CV6NU32.cjs');
|
|
|
136
138
|
|
|
137
139
|
|
|
138
140
|
|
|
139
|
-
var _chunkD4TOPSHVcjs = require('./chunk-D4TOPSHV.cjs');
|
|
140
141
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
var AI_TEXT_MAX_LENGTH = 2e3;
|
|
154
|
-
function aiSupports(activityType, feature) {
|
|
155
|
-
const types = feature === "hint" ? AI_HINT_TYPES : AI_EXPLANATION_TYPES;
|
|
156
|
-
return types.includes(activityType);
|
|
157
|
-
}
|
|
158
|
-
function aiAllowedByContent(data, feature) {
|
|
159
|
-
const permissions = data.ai;
|
|
160
|
-
if (typeof permissions !== "object" || permissions === null) {
|
|
161
|
-
return true;
|
|
162
|
-
}
|
|
163
|
-
const key = feature === "hint" ? "hints" : "explanations";
|
|
164
|
-
return permissions[key] !== false;
|
|
165
|
-
}
|
|
166
|
-
function aiGradeOf(result) {
|
|
167
|
-
const ratio = result.maxScore > 0 ? result.score / result.maxScore : 0;
|
|
168
|
-
let category = "partly-correct";
|
|
169
|
-
if (ratio >= 1 - 1e-9) {
|
|
170
|
-
category = "correct";
|
|
171
|
-
} else if (ratio <= 1e-9) {
|
|
172
|
-
category = "incorrect";
|
|
173
|
-
}
|
|
174
|
-
return { score: result.score, maxScore: result.maxScore, passed: result.passed, category };
|
|
175
|
-
}
|
|
176
|
-
function placeholderOrder(passage) {
|
|
177
|
-
return [...passage.matchAll(_chunkD4TOPSHVcjs.PLACEHOLDER_RE)].map((match) => match[1]);
|
|
178
|
-
}
|
|
179
|
-
function numberedPassage(passage) {
|
|
180
|
-
let position = 0;
|
|
181
|
-
return passage.replace(_chunkD4TOPSHVcjs.PLACEHOLDER_RE, () => {
|
|
182
|
-
position += 1;
|
|
183
|
-
return `[${position}]`;
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
function isAnswerOption(detail, chosen) {
|
|
187
|
-
switch (detail.outcome) {
|
|
188
|
-
case "correct":
|
|
189
|
-
case "incorrect-omission":
|
|
190
|
-
return true;
|
|
191
|
-
case "incorrect":
|
|
192
|
-
case "correct-omission":
|
|
193
|
-
return false;
|
|
194
|
-
default:
|
|
195
|
-
return chosen ? detail.correct : !detail.correct;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
var firstString = (value) => Array.isArray(value) ? value[0] : value;
|
|
199
|
-
var listOf = (value) => value === void 0 ? null : Array.isArray(value) ? [...value] : [value];
|
|
200
|
-
function emptyResponse(type) {
|
|
201
|
-
switch (type) {
|
|
202
|
-
case "multiple-choice":
|
|
203
|
-
return { type: "multiple-choice", selectedOptionIds: [] };
|
|
204
|
-
case "fill-in-the-blanks":
|
|
205
|
-
return { type: "fill-in-the-blanks", answers: {} };
|
|
206
|
-
case "gap-select":
|
|
207
|
-
return { type: "gap-select", selections: {} };
|
|
208
|
-
case "dictation":
|
|
209
|
-
return { type: "dictation", text: "" };
|
|
210
|
-
default:
|
|
211
|
-
return null;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
var base = (data) => ({
|
|
215
|
-
activityId: data.id,
|
|
216
|
-
title: data.title,
|
|
217
|
-
...typeof data.locale === "string" ? { locale: data.locale } : {}
|
|
218
|
-
});
|
|
219
|
-
function buildAiFacts(data, response, details) {
|
|
220
|
-
const byId = new Map((_nullishCoalesce(details, () => ( []))).map((detail) => [detail.itemId, detail]));
|
|
221
|
-
const full = data.redacted !== true;
|
|
222
|
-
switch (data.type) {
|
|
223
|
-
case "multiple-choice": {
|
|
224
|
-
const item = data;
|
|
225
|
-
const chosen = new Set(
|
|
226
|
-
_optionalChain([response, 'optionalAccess', _ => _.type]) === "multiple-choice" ? response.selectedOptionIds : []
|
|
227
|
-
);
|
|
228
|
-
return {
|
|
229
|
-
...base(data),
|
|
230
|
-
activityType: "multiple-choice",
|
|
231
|
-
question: item.question,
|
|
232
|
-
mode: item.mode,
|
|
233
|
-
options: item.options.map((option) => {
|
|
234
|
-
const detail = byId.get(option.id);
|
|
235
|
-
const wasChosen = chosen.has(option.id);
|
|
236
|
-
let correct = null;
|
|
237
|
-
if (full && typeof option.isCorrect === "boolean") {
|
|
238
|
-
correct = option.isCorrect;
|
|
239
|
-
} else if (detail !== void 0) {
|
|
240
|
-
correct = isAnswerOption(detail, wasChosen);
|
|
241
|
-
}
|
|
242
|
-
return {
|
|
243
|
-
id: option.id,
|
|
244
|
-
text: option.text,
|
|
245
|
-
chosen: wasChosen,
|
|
246
|
-
correct,
|
|
247
|
-
...typeof option.feedback === "string" ? { feedback: option.feedback } : {}
|
|
248
|
-
};
|
|
249
|
-
})
|
|
250
|
-
};
|
|
251
|
-
}
|
|
252
|
-
case "fill-in-the-blanks": {
|
|
253
|
-
const item = data;
|
|
254
|
-
const answers = _optionalChain([response, 'optionalAccess', _2 => _2.type]) === "fill-in-the-blanks" ? response.answers : {};
|
|
255
|
-
const blanks = new Map(item.blanks.map((blank) => [blank.id, blank]));
|
|
256
|
-
return {
|
|
257
|
-
...base(data),
|
|
258
|
-
activityType: "fill-in-the-blanks",
|
|
259
|
-
passage: numberedPassage(item.passage),
|
|
260
|
-
blanks: placeholderOrder(item.passage).map((id, index) => {
|
|
261
|
-
const blank = blanks.get(id);
|
|
262
|
-
const detail = byId.get(id);
|
|
263
|
-
const accepted = full && Array.isArray(_optionalChain([blank, 'optionalAccess', _3 => _3.acceptedAnswers])) ? [...blank.acceptedAnswers] : listOf(_optionalChain([detail, 'optionalAccess', _4 => _4.correctResponse]));
|
|
264
|
-
return {
|
|
265
|
-
id,
|
|
266
|
-
position: index + 1,
|
|
267
|
-
typed: typeof answers[id] === "string" ? answers[id] : "",
|
|
268
|
-
accepted,
|
|
269
|
-
correct: detail === void 0 ? null : detail.correct,
|
|
270
|
-
...typeof _optionalChain([blank, 'optionalAccess', _5 => _5.hint]) === "string" ? { hint: blank.hint } : {},
|
|
271
|
-
...typeof _optionalChain([blank, 'optionalAccess', _6 => _6.feedback]) === "string" ? { feedback: blank.feedback } : {}
|
|
272
|
-
};
|
|
273
|
-
})
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
case "gap-select": {
|
|
277
|
-
const item = data;
|
|
278
|
-
const selections = _optionalChain([response, 'optionalAccess', _7 => _7.type]) === "gap-select" ? response.selections : {};
|
|
279
|
-
const gaps = new Map(item.gaps.map((gap) => [gap.id, gap]));
|
|
280
|
-
const banks = new Map((_nullishCoalesce(item.banks, () => ( []))).map((bank) => [bank.id, bank]));
|
|
281
|
-
return {
|
|
282
|
-
...base(data),
|
|
283
|
-
activityType: "gap-select",
|
|
284
|
-
passage: numberedPassage(item.passage),
|
|
285
|
-
gaps: placeholderOrder(item.passage).map((id, index) => {
|
|
286
|
-
const gap = gaps.get(id);
|
|
287
|
-
const choices = _nullishCoalesce(_optionalChain([gap, 'optionalAccess', _8 => _8.choices]), () => ( (_optionalChain([gap, 'optionalAccess', _9 => _9.bankId]) === void 0 ? [] : _nullishCoalesce(_optionalChain([banks, 'access', _10 => _10.get, 'call', _11 => _11(gap.bankId), 'optionalAccess', _12 => _12.choices]), () => ( [])))));
|
|
288
|
-
const textOf = (choiceId) => choiceId === void 0 ? null : _nullishCoalesce(_optionalChain([choices, 'access', _13 => _13.find, 'call', _14 => _14((choice) => choice.id === choiceId), 'optionalAccess', _15 => _15.text]), () => ( null));
|
|
289
|
-
const detail = byId.get(id);
|
|
290
|
-
const answerId = full && typeof _optionalChain([gap, 'optionalAccess', _16 => _16.correctChoiceId]) === "string" ? gap.correctChoiceId : firstString(_optionalChain([detail, 'optionalAccess', _17 => _17.correctResponse]));
|
|
291
|
-
return {
|
|
292
|
-
id,
|
|
293
|
-
position: index + 1,
|
|
294
|
-
choices: choices.map((choice) => choice.text),
|
|
295
|
-
chosen: textOf(selections[id]),
|
|
296
|
-
answer: textOf(answerId),
|
|
297
|
-
correct: detail === void 0 ? null : detail.correct,
|
|
298
|
-
...typeof _optionalChain([gap, 'optionalAccess', _18 => _18.feedback]) === "string" ? { feedback: gap.feedback } : {}
|
|
299
|
-
};
|
|
300
|
-
})
|
|
301
|
-
};
|
|
302
|
-
}
|
|
303
|
-
case "dictation": {
|
|
304
|
-
const item = data;
|
|
305
|
-
const typed = _optionalChain([response, 'optionalAccess', _19 => _19.type]) === "dictation" ? response.text : "";
|
|
306
|
-
const hasKey = full && typeof item.transcript === "string";
|
|
307
|
-
let words = null;
|
|
308
|
-
if (hasKey) {
|
|
309
|
-
words = _chunkD4TOPSHVcjs.alignDictation.call(void 0, item, typed).words.map((word) => ({
|
|
310
|
-
expected: word.reference,
|
|
311
|
-
typed: word.attempt,
|
|
312
|
-
status: word.status
|
|
313
|
-
}));
|
|
314
|
-
} else if (details !== null && details.length > 0) {
|
|
315
|
-
words = details.map((detail) => {
|
|
316
|
-
const expected = _nullishCoalesce(firstString(detail.correctResponse), () => ( ""));
|
|
317
|
-
const attempt = _nullishCoalesce(firstString(detail.learnerResponse), () => ( ""));
|
|
318
|
-
let status = "incorrect";
|
|
319
|
-
if (detail.correct) {
|
|
320
|
-
status = "correct";
|
|
321
|
-
} else if (attempt === "") {
|
|
322
|
-
status = "missing";
|
|
323
|
-
} else if (expected === "") {
|
|
324
|
-
status = "extra";
|
|
325
|
-
}
|
|
326
|
-
return { expected, typed: attempt, status };
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
|
-
return {
|
|
330
|
-
...base(data),
|
|
331
|
-
activityType: "dictation",
|
|
332
|
-
transcript: hasKey ? item.transcript : null,
|
|
333
|
-
typed,
|
|
334
|
-
words
|
|
335
|
-
};
|
|
336
|
-
}
|
|
337
|
-
default:
|
|
338
|
-
return null;
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
function gradeLocally(data, response) {
|
|
342
|
-
if (data.redacted === true) {
|
|
343
|
-
return null;
|
|
344
|
-
}
|
|
345
|
-
try {
|
|
346
|
-
const result = _chunkXNMKDFPWcjs.score.call(void 0, data.type, data, response);
|
|
347
|
-
return { details: result.details, grade: aiGradeOf(result) };
|
|
348
|
-
} catch (e) {
|
|
349
|
-
return null;
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
function aiExplanationRequest(input) {
|
|
353
|
-
const { data, response, outcome, learnerLocale } = input;
|
|
354
|
-
if (!aiSupports(data.type, "explanation") || !aiAllowedByContent(data, "explanation")) {
|
|
355
|
-
return null;
|
|
356
|
-
}
|
|
357
|
-
let details = null;
|
|
358
|
-
let grade = null;
|
|
359
|
-
if (_optionalChain([outcome, 'optionalAccess', _20 => _20.status]) === "scored") {
|
|
360
|
-
details = outcome.details;
|
|
361
|
-
grade = aiGradeOf(outcome);
|
|
362
|
-
} else if (response !== null) {
|
|
363
|
-
const local = gradeLocally(data, response);
|
|
364
|
-
if (local !== null) {
|
|
365
|
-
details = local.details;
|
|
366
|
-
grade = local.grade;
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
if (grade === null) {
|
|
370
|
-
return null;
|
|
371
|
-
}
|
|
372
|
-
const facts = buildAiFacts(data, response, details);
|
|
373
|
-
if (facts === null) {
|
|
374
|
-
return null;
|
|
375
|
-
}
|
|
376
|
-
return {
|
|
377
|
-
feature: "explanation",
|
|
378
|
-
facts,
|
|
379
|
-
grade,
|
|
380
|
-
...learnerLocale !== void 0 ? { learnerLocale } : {}
|
|
381
|
-
};
|
|
382
|
-
}
|
|
383
|
-
function aiHintRequest(input) {
|
|
384
|
-
const { data, previousHints, learnerLocale } = input;
|
|
385
|
-
if (!aiSupports(data.type, "hint") || !aiAllowedByContent(data, "hint") || data.redacted === true) {
|
|
386
|
-
return null;
|
|
387
|
-
}
|
|
388
|
-
const response = _nullishCoalesce(input.response, () => ( emptyResponse(data.type)));
|
|
389
|
-
const local = response === null ? null : gradeLocally(data, response);
|
|
390
|
-
const facts = buildAiFacts(data, response, _nullishCoalesce(_optionalChain([local, 'optionalAccess', _21 => _21.details]), () => ( null)));
|
|
391
|
-
if (facts === null) {
|
|
392
|
-
return null;
|
|
393
|
-
}
|
|
394
|
-
return {
|
|
395
|
-
feature: "hint",
|
|
396
|
-
facts,
|
|
397
|
-
hintNumber: previousHints.length + 1,
|
|
398
|
-
previousHints: [...previousHints],
|
|
399
|
-
...learnerLocale !== void 0 ? { learnerLocale } : {}
|
|
400
|
-
};
|
|
401
|
-
}
|
|
402
|
-
var VERDICTS = ["correct", "partly-correct", "incorrect"];
|
|
403
|
-
function provenanceOf(raw) {
|
|
404
|
-
if (typeof raw !== "object" || raw === null) {
|
|
405
|
-
return void 0;
|
|
406
|
-
}
|
|
407
|
-
const kept = {};
|
|
408
|
-
for (const key of ["model", "promptHash", "generatedAt"]) {
|
|
409
|
-
const value = raw[key];
|
|
410
|
-
if (typeof value === "string" && value.length > 0 && value.length <= 200) {
|
|
411
|
-
kept[key] = value;
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
return Object.keys(kept).length > 0 ? kept : void 0;
|
|
415
|
-
}
|
|
416
|
-
function cleanText(text) {
|
|
417
|
-
return text.replace(/\r\n?/g, "\n").replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F-\u009F\u2028\u2029]/g, "").replace(/\n{3,}/g, "\n\n").trim();
|
|
418
|
-
}
|
|
419
|
-
function readAiTextResult(raw) {
|
|
420
|
-
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
|
|
421
|
-
return { ok: false, refusal: "malformed" };
|
|
422
|
-
}
|
|
423
|
-
const record = raw;
|
|
424
|
-
if (typeof record.text !== "string") {
|
|
425
|
-
return { ok: false, refusal: "malformed" };
|
|
426
|
-
}
|
|
427
|
-
if (record.verdict !== void 0 && !VERDICTS.includes(record.verdict)) {
|
|
428
|
-
return { ok: false, refusal: "malformed" };
|
|
429
|
-
}
|
|
430
|
-
const text = cleanText(record.text);
|
|
431
|
-
if (text === "") {
|
|
432
|
-
return { ok: false, refusal: "empty" };
|
|
433
|
-
}
|
|
434
|
-
if ([...text].length > AI_TEXT_MAX_LENGTH) {
|
|
435
|
-
return { ok: false, refusal: "too-long" };
|
|
436
|
-
}
|
|
437
|
-
const provenance = provenanceOf(record.provenance);
|
|
438
|
-
return {
|
|
439
|
-
ok: true,
|
|
440
|
-
result: {
|
|
441
|
-
text,
|
|
442
|
-
...record.verdict !== void 0 ? { verdict: record.verdict } : {},
|
|
443
|
-
...provenance !== void 0 ? { provenance } : {}
|
|
444
|
-
}
|
|
445
|
-
};
|
|
446
|
-
}
|
|
447
|
-
function checkAiExplanation(raw, request) {
|
|
448
|
-
const read = readAiTextResult(raw);
|
|
449
|
-
if (!read.ok) {
|
|
450
|
-
return read;
|
|
451
|
-
}
|
|
452
|
-
if (read.result.verdict !== void 0 && read.result.verdict !== request.grade.category) {
|
|
453
|
-
return { ok: false, refusal: "contradicts-grade" };
|
|
454
|
-
}
|
|
455
|
-
return read;
|
|
456
|
-
}
|
|
457
|
-
function checkAiHint(raw, request) {
|
|
458
|
-
const read = readAiTextResult(raw);
|
|
459
|
-
if (!read.ok) {
|
|
460
|
-
return read;
|
|
461
|
-
}
|
|
462
|
-
if (hintRevealsAnswer(request.facts, read.result.text)) {
|
|
463
|
-
return { ok: false, refusal: "reveals-answer" };
|
|
464
|
-
}
|
|
465
|
-
return read;
|
|
466
|
-
}
|
|
467
|
-
function fold(text) {
|
|
468
|
-
const folded = text.normalize("NFKD").replace(/\p{M}/gu, "").toLowerCase().replace(/[^\p{L}\p{N}]+/gu, " ").trim();
|
|
469
|
-
return folded === "" ? [] : folded.split(" ");
|
|
470
|
-
}
|
|
471
|
-
function containsWords(haystack, needle) {
|
|
472
|
-
if (needle.length === 0 || needle.length > haystack.length) {
|
|
473
|
-
return false;
|
|
474
|
-
}
|
|
475
|
-
for (let start = 0; start + needle.length <= haystack.length; start += 1) {
|
|
476
|
-
let match = true;
|
|
477
|
-
for (let offset = 0; offset < needle.length; offset += 1) {
|
|
478
|
-
if (haystack[start + offset] !== needle[offset]) {
|
|
479
|
-
match = false;
|
|
480
|
-
break;
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
if (match) {
|
|
484
|
-
return true;
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
return false;
|
|
488
|
-
}
|
|
489
|
-
var isShort = (words) => words.length === 1 && [...words[0]].length < 4;
|
|
490
|
-
function neighbours(passage, position) {
|
|
491
|
-
const marker = `[${position}]`;
|
|
492
|
-
const at = passage.indexOf(marker);
|
|
493
|
-
if (at === -1) {
|
|
494
|
-
return {};
|
|
495
|
-
}
|
|
496
|
-
const strip = (text) => text.replace(/\[\d+\]/g, " ");
|
|
497
|
-
const left = fold(strip(passage.slice(0, at)));
|
|
498
|
-
const right = fold(strip(passage.slice(at + marker.length)));
|
|
499
|
-
const before = left[left.length - 1];
|
|
500
|
-
const after = right[0];
|
|
501
|
-
return {
|
|
502
|
-
...before !== void 0 ? { before } : {},
|
|
503
|
-
...after !== void 0 ? { after } : {}
|
|
504
|
-
};
|
|
505
|
-
}
|
|
506
|
-
function hintRevealsAnswer(facts, hint) {
|
|
507
|
-
const words = fold(hint);
|
|
508
|
-
const reveals = (answer, passage, position) => {
|
|
509
|
-
const needle = fold(answer);
|
|
510
|
-
if (needle.length === 0) {
|
|
511
|
-
return false;
|
|
512
|
-
}
|
|
513
|
-
if (!isShort(needle) || passage === void 0 || position === void 0) {
|
|
514
|
-
return containsWords(words, needle);
|
|
515
|
-
}
|
|
516
|
-
const { before, after } = neighbours(passage, position);
|
|
517
|
-
if (before === void 0 && after === void 0) {
|
|
518
|
-
return containsWords(words, needle);
|
|
519
|
-
}
|
|
520
|
-
return before !== void 0 && containsWords(words, [before, ...needle]) || after !== void 0 && containsWords(words, [...needle, after]);
|
|
521
|
-
};
|
|
522
|
-
switch (facts.activityType) {
|
|
523
|
-
case "multiple-choice":
|
|
524
|
-
return facts.options.some((option) => option.correct === true && reveals(option.text));
|
|
525
|
-
case "fill-in-the-blanks":
|
|
526
|
-
return facts.blanks.some(
|
|
527
|
-
(blank) => (_nullishCoalesce(blank.accepted, () => ( []))).some((answer) => reveals(answer, facts.passage, blank.position))
|
|
528
|
-
);
|
|
529
|
-
case "gap-select":
|
|
530
|
-
return facts.gaps.some(
|
|
531
|
-
(gap) => gap.answer !== null && reveals(gap.answer, facts.passage, gap.position)
|
|
532
|
-
);
|
|
533
|
-
case "dictation":
|
|
534
|
-
return false;
|
|
535
|
-
default:
|
|
536
|
-
return false;
|
|
537
|
-
}
|
|
538
|
-
}
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
var _chunkD4TOPSHVcjs = require('./chunk-D4TOPSHV.cjs');
|
|
539
154
|
|
|
540
155
|
// src/content-hash.ts
|
|
541
156
|
function canonicalJson(value, seen = /* @__PURE__ */ new Set()) {
|
|
@@ -684,7 +299,7 @@ function flattenSequence(entries, options = {}) {
|
|
|
684
299
|
const presented = timeline !== void 0 ? inQuizOrder(items, timeline) : entry.shuffle === "within-group" ? seededShuffle(items, `${seed}:group:${entry.id}`) : items;
|
|
685
300
|
const size = presented.length;
|
|
686
301
|
presented.forEach(({ item, itemIndex }, position) => {
|
|
687
|
-
const cue = _optionalChain([timeline, 'optionalAccess',
|
|
302
|
+
const cue = _optionalChain([timeline, 'optionalAccess', _ => _.cues, 'access', _2 => _2.find, 'call', _3 => _3((candidate) => candidate.itemIds.includes(item.id))]);
|
|
688
303
|
slots.push({
|
|
689
304
|
// Slot ids stay AUTHORED — the item's index or its key — whatever the
|
|
690
305
|
// presented order: moving a quiz must never re-map a stored answer.
|
|
@@ -738,16 +353,16 @@ function stimulusMediaKey(slotId) {
|
|
|
738
353
|
}
|
|
739
354
|
function resolvePlaybackPolicy(media) {
|
|
740
355
|
const p = media.playback;
|
|
741
|
-
const budgeted = typeof _optionalChain([p, 'optionalAccess',
|
|
742
|
-
const seek = _nullishCoalesce(_optionalChain([p, 'optionalAccess',
|
|
743
|
-
const rate = _nullishCoalesce(_optionalChain([p, 'optionalAccess',
|
|
744
|
-
const controls = _nullishCoalesce(_optionalChain([p, 'optionalAccess',
|
|
356
|
+
const budgeted = typeof _optionalChain([p, 'optionalAccess', _4 => _4.maxPlays]) === "number";
|
|
357
|
+
const seek = _nullishCoalesce(_optionalChain([p, 'optionalAccess', _5 => _5.seek]), () => ( (budgeted ? "none" : "allow")));
|
|
358
|
+
const rate = _nullishCoalesce(_optionalChain([p, 'optionalAccess', _6 => _6.rate]), () => ( "allow"));
|
|
359
|
+
const controls = _nullishCoalesce(_optionalChain([p, 'optionalAccess', _7 => _7.controls]), () => ( (budgeted || seek === "none" || rate === "fixed" ? "minimal" : "native")));
|
|
745
360
|
return {
|
|
746
361
|
controls,
|
|
747
|
-
maxPlays: budgeted ? _optionalChain([p, 'optionalAccess',
|
|
362
|
+
maxPlays: budgeted ? _optionalChain([p, 'optionalAccess', _8 => _8.maxPlays]) : null,
|
|
748
363
|
seek,
|
|
749
364
|
rate,
|
|
750
|
-
nativeControlHints: _nullishCoalesce(_optionalChain([p, 'optionalAccess',
|
|
365
|
+
nativeControlHints: _nullishCoalesce(_optionalChain([p, 'optionalAccess', _9 => _9.nativeControlHints]), () => ( []))
|
|
751
366
|
};
|
|
752
367
|
}
|
|
753
368
|
function planMediaBudgets(plan) {
|
|
@@ -762,7 +377,7 @@ function planMediaBudgets(plan) {
|
|
|
762
377
|
function assertEntry(key, entry) {
|
|
763
378
|
if (entry === null || typeof entry !== "object" || !Number.isInteger(entry.plays) || entry.plays < 0) {
|
|
764
379
|
throw new Error(
|
|
765
|
-
`serializeMediaPlayLedger: play count for ${JSON.stringify(key)} is ${JSON.stringify(_optionalChain([entry, 'optionalAccess',
|
|
380
|
+
`serializeMediaPlayLedger: play count for ${JSON.stringify(key)} is ${JSON.stringify(_optionalChain([entry, 'optionalAccess', _10 => _10.plays]))}. A count must be a non-negative integer; Number(a NULL column) is the usual cause.`
|
|
766
381
|
);
|
|
767
382
|
}
|
|
768
383
|
if (entry.at !== void 0 && (!Number.isFinite(entry.at) || entry.at < 0)) {
|
|
@@ -835,7 +450,7 @@ function mediaBudgetsOf(slot) {
|
|
|
835
450
|
budgets.push({ key: slotMediaKey(slot.slotId), maxPlays });
|
|
836
451
|
}
|
|
837
452
|
}
|
|
838
|
-
const stimulusMedia = _optionalChain([slot, 'access',
|
|
453
|
+
const stimulusMedia = _optionalChain([slot, 'access', _11 => _11.group, 'optionalAccess', _12 => _12.stimulus, 'access', _13 => _13.media]);
|
|
839
454
|
if (stimulusMedia !== void 0) {
|
|
840
455
|
const maxPlays = resolvePlaybackPolicy(stimulusMedia).maxPlays;
|
|
841
456
|
if (maxPlays !== null) {
|
|
@@ -901,7 +516,7 @@ function planAttempt(entries, options = {}) {
|
|
|
901
516
|
...seed !== void 0 ? { seed } : {}
|
|
902
517
|
});
|
|
903
518
|
assertNoSplitBudgets(slots);
|
|
904
|
-
const planned = slots.map((slot) => planSlot(slot, _nullishCoalesce(_optionalChain([points, 'optionalCall',
|
|
519
|
+
const planned = slots.map((slot) => planSlot(slot, _nullishCoalesce(_optionalChain([points, 'optionalCall', _14 => _14(slot)]), () => ( 1))));
|
|
905
520
|
const totalPoints = planned.reduce((sum, slot) => sum + slot.points, 0);
|
|
906
521
|
return {
|
|
907
522
|
planVersion: "1.0",
|
|
@@ -933,10 +548,10 @@ function verifyAttemptPlan(plan, current) {
|
|
|
933
548
|
if (now.contentHash !== slot.contentHash) {
|
|
934
549
|
changedSlotIds.push(slot.slotId);
|
|
935
550
|
}
|
|
936
|
-
if (_optionalChain([now, 'access',
|
|
551
|
+
if (_optionalChain([now, 'access', _15 => _15.group, 'optionalAccess', _16 => _16.stimulusHash]) !== _optionalChain([slot, 'access', _17 => _17.group, 'optionalAccess', _18 => _18.stimulusHash])) {
|
|
937
552
|
changedStimulusSlotIds.push(slot.slotId);
|
|
938
553
|
}
|
|
939
|
-
if (contentHash(_nullishCoalesce(_optionalChain([now, 'access',
|
|
554
|
+
if (contentHash(_nullishCoalesce(_optionalChain([now, 'access', _19 => _19.group, 'optionalAccess', _20 => _20.cue]), () => ( null))) !== contentHash(_nullishCoalesce(_optionalChain([slot, 'access', _21 => _21.group, 'optionalAccess', _22 => _22.cue]), () => ( null)))) {
|
|
940
555
|
changedCueSlotIds.push(slot.slotId);
|
|
941
556
|
}
|
|
942
557
|
if (now.points !== slot.points) {
|
|
@@ -1544,7 +1159,7 @@ function validateDraftInScope(type, draft) {
|
|
|
1544
1159
|
if (descriptor === void 0) {
|
|
1545
1160
|
throw new (0, _chunkD4TOPSHVcjs.UnknownActivityTypeError)(String(type));
|
|
1546
1161
|
}
|
|
1547
|
-
const reported = _chunkD4TOPSHVcjs.isRecord.call(void 0, draft) && _optionalChain([descriptor, 'access',
|
|
1162
|
+
const reported = _chunkD4TOPSHVcjs.isRecord.call(void 0, draft) && _optionalChain([descriptor, 'access', _23 => _23.authoring, 'optionalAccess', _24 => _24.checkDraft]) !== void 0 ? descriptor.authoring.checkDraft(draft).map(normalise) : [];
|
|
1548
1163
|
const issues = [...reported];
|
|
1549
1164
|
const parsed = descriptor.schema.safeParse(draft, { reportInput: true });
|
|
1550
1165
|
if (!parsed.success) {
|
|
@@ -1588,7 +1203,7 @@ function createDraft(type, context) {
|
|
|
1588
1203
|
if (descriptor === void 0) {
|
|
1589
1204
|
throw new (0, _chunkD4TOPSHVcjs.UnknownActivityTypeError)(String(type));
|
|
1590
1205
|
}
|
|
1591
|
-
const create = _optionalChain([descriptor, 'access',
|
|
1206
|
+
const create = _optionalChain([descriptor, 'access', _25 => _25.authoring, 'optionalAccess', _26 => _26.createDraft]);
|
|
1592
1207
|
if (create === void 0) {
|
|
1593
1208
|
throw new Error(
|
|
1594
1209
|
`Activity type "${String(type)}" declares no authoring.createDraft, so there is no empty draft to create. Build the draft yourself; validateDraft works for every registered type.`
|
|
@@ -1620,11 +1235,11 @@ function normalise(found) {
|
|
|
1620
1235
|
}
|
|
1621
1236
|
|
|
1622
1237
|
// src/redact.ts
|
|
1623
|
-
function mergePolicy(
|
|
1238
|
+
function mergePolicy(base, overrides) {
|
|
1624
1239
|
if (overrides === void 0) {
|
|
1625
|
-
return
|
|
1240
|
+
return base;
|
|
1626
1241
|
}
|
|
1627
|
-
const merged = { ...
|
|
1242
|
+
const merged = { ...base };
|
|
1628
1243
|
for (const [key, override] of Object.entries(overrides)) {
|
|
1629
1244
|
const current = merged[key];
|
|
1630
1245
|
merged[key] = typeof override === "object" && typeof current === "object" ? { ...current, ...override } : override;
|
|
@@ -1863,7 +1478,7 @@ function readMediaProgress(value, duration) {
|
|
|
1863
1478
|
return null;
|
|
1864
1479
|
}
|
|
1865
1480
|
({ progressVersion: version, at, furthest } = value);
|
|
1866
|
-
} catch (
|
|
1481
|
+
} catch (e) {
|
|
1867
1482
|
return null;
|
|
1868
1483
|
}
|
|
1869
1484
|
if (version !== "1.0" || typeof at !== "number" || !Number.isFinite(at)) {
|
|
@@ -1885,7 +1500,7 @@ function composeTimelineScore(entryKey, items, policy) {
|
|
|
1885
1500
|
`composeTimelineScore: no scored item belongs to entry "${entryKey}". Pass the video's slotKey (or its position in the sequence), and the items of the attempt that holds it.`
|
|
1886
1501
|
);
|
|
1887
1502
|
}
|
|
1888
|
-
return
|
|
1503
|
+
return _chunkCOBK2RUXcjs.composeAssessmentScore.call(void 0, [{ id: entryKey, weight: 1, items: own }], policy);
|
|
1889
1504
|
}
|
|
1890
1505
|
|
|
1891
1506
|
|
|
@@ -2047,5 +1662,5 @@ function composeTimelineScore(entryKey, items, policy) {
|
|
|
2047
1662
|
|
|
2048
1663
|
|
|
2049
1664
|
|
|
2050
|
-
exports.AI_EXPLANATION_TYPES = AI_EXPLANATION_TYPES; exports.AI_HINT_TYPES = AI_HINT_TYPES; exports.AI_TEXT_MAX_LENGTH = AI_TEXT_MAX_LENGTH; exports.ActivitySchemaError = _chunkD4TOPSHVcjs.ActivitySchemaError; exports.AiPermissionsSchema = _chunkD4TOPSHVcjs.AiPermissionsSchema; exports.BlankConfigSchema = _chunkD4TOPSHVcjs.BlankConfigSchema; exports.DEFAULT_PASS_THRESHOLD = _chunkXNMKDFPWcjs.DEFAULT_PASS_THRESHOLD; exports.DICTATION_MAX_ACCEPTED_TRANSCRIPTS = _chunkD4TOPSHVcjs.DICTATION_MAX_ACCEPTED_TRANSCRIPTS; exports.DICTATION_MAX_EQUIVALENCES = _chunkD4TOPSHVcjs.DICTATION_MAX_EQUIVALENCES; exports.DICTATION_MAX_EQUIVALENCE_LENGTH = _chunkD4TOPSHVcjs.DICTATION_MAX_EQUIVALENCE_LENGTH; exports.DICTATION_MAX_TEXT_LENGTH = _chunkD4TOPSHVcjs.DICTATION_MAX_TEXT_LENGTH; exports.DICTATION_MAX_TRANSCRIPT_LENGTH = _chunkD4TOPSHVcjs.DICTATION_MAX_TRANSCRIPT_LENGTH; exports.DeferredScoringError = _chunkD4TOPSHVcjs.DeferredScoringError; exports.DictationDataSchema = _chunkD4TOPSHVcjs.DictationDataSchema; exports.DictationEquivalenceSchema = _chunkD4TOPSHVcjs.DictationEquivalenceSchema; exports.DictationSlowMediaSchema = _chunkD4TOPSHVcjs.DictationSlowMediaSchema; exports.DictationToleranceSchema = _chunkD4TOPSHVcjs.DictationToleranceSchema; exports.FeedbackSchema = _chunkD4TOPSHVcjs.FeedbackSchema; exports.FillInTheBlanksDataSchema = _chunkD4TOPSHVcjs.FillInTheBlanksDataSchema; exports.GapSelectBankSchema = _chunkD4TOPSHVcjs.GapSelectBankSchema; exports.GapSelectChoiceSchema = _chunkD4TOPSHVcjs.GapSelectChoiceSchema; exports.GapSelectDataSchema = _chunkD4TOPSHVcjs.GapSelectDataSchema; exports.GapSelectGapSchema = _chunkD4TOPSHVcjs.GapSelectGapSchema; exports.INTERACTIVE_VIDEO_ITEM_TYPES = _chunk2CV6NU32cjs.INTERACTIVE_VIDEO_ITEM_TYPES; exports.ItemGroupSchema = _chunk2CV6NU32cjs.ItemGroupSchema; exports.MediaPlaybackSchema = _chunkD4TOPSHVcjs.MediaPlaybackSchema; exports.MediaSchema = _chunkD4TOPSHVcjs.MediaSchema; exports.MediaTimelineSchema = _chunk2CV6NU32cjs.MediaTimelineSchema; exports.MediaTrackSchema = _chunkD4TOPSHVcjs.MediaTrackSchema; exports.MediaUrlSchema = _chunkD4TOPSHVcjs.MediaUrlSchema; exports.MultipleChoiceDataSchema = _chunkD4TOPSHVcjs.MultipleChoiceDataSchema; exports.MultipleChoiceOptionMediaSchema = _chunkD4TOPSHVcjs.MultipleChoiceOptionMediaSchema; exports.MultipleChoiceOptionSchema = _chunkD4TOPSHVcjs.MultipleChoiceOptionSchema; exports.NativeControlHintSchema = _chunkD4TOPSHVcjs.NativeControlHintSchema; exports.READ_ALOUD_MAX_DIMENSION_WEIGHT = _chunkD4TOPSHVcjs.READ_ALOUD_MAX_DIMENSION_WEIGHT; exports.READ_ALOUD_MAX_REFERENCE_LENGTH = _chunkD4TOPSHVcjs.READ_ALOUD_MAX_REFERENCE_LENGTH; exports.READ_ALOUD_MAX_SECONDS = _chunkD4TOPSHVcjs.READ_ALOUD_MAX_SECONDS; exports.READ_ALOUD_MAX_TAKES = _chunkD4TOPSHVcjs.READ_ALOUD_MAX_TAKES; exports.ReadAloudDataSchema = _chunkD4TOPSHVcjs.ReadAloudDataSchema; exports.ReadAloudSlowMediaSchema = _chunkD4TOPSHVcjs.ReadAloudSlowMediaSchema; exports.RedactedBlankConfigSchema = _chunkD4TOPSHVcjs.RedactedBlankConfigSchema; exports.RedactedDictationDataSchema = _chunkD4TOPSHVcjs.RedactedDictationDataSchema; exports.RedactedDictationSlowMediaSchema = _chunkD4TOPSHVcjs.RedactedDictationSlowMediaSchema; exports.RedactedFillInTheBlanksDataSchema = _chunkD4TOPSHVcjs.RedactedFillInTheBlanksDataSchema; exports.RedactedGapSelectBankSchema = _chunkD4TOPSHVcjs.RedactedGapSelectBankSchema; exports.RedactedGapSelectChoiceSchema = _chunkD4TOPSHVcjs.RedactedGapSelectChoiceSchema; exports.RedactedGapSelectDataSchema = _chunkD4TOPSHVcjs.RedactedGapSelectDataSchema; exports.RedactedGapSelectGapSchema = _chunkD4TOPSHVcjs.RedactedGapSelectGapSchema; exports.RedactedItemGroupSchema = _chunk2CV6NU32cjs.RedactedItemGroupSchema; exports.RedactedMediaSchema = _chunkD4TOPSHVcjs.RedactedMediaSchema; exports.RedactedMultipleChoiceDataSchema = _chunkD4TOPSHVcjs.RedactedMultipleChoiceDataSchema; exports.RedactedMultipleChoiceOptionMediaSchema = _chunkD4TOPSHVcjs.RedactedMultipleChoiceOptionMediaSchema; exports.RedactedMultipleChoiceOptionSchema = _chunkD4TOPSHVcjs.RedactedMultipleChoiceOptionSchema; exports.RedactedReadAloudDataSchema = _chunkD4TOPSHVcjs.RedactedReadAloudDataSchema; exports.RedactedScoringError = _chunkD4TOPSHVcjs.RedactedScoringError; exports.RedactedStimulusSchema = _chunk2CV6NU32cjs.RedactedStimulusSchema; exports.RedactedWrittenResponseDataSchema = _chunkD4TOPSHVcjs.RedactedWrittenResponseDataSchema; exports.SPEECH_ASSESSMENT_MAX_WORDS = _chunkD4TOPSHVcjs.SPEECH_ASSESSMENT_MAX_WORDS; exports.StimulusSchema = _chunk2CV6NU32cjs.StimulusSchema; exports.TIMELINE_MAX_CHAPTERS = _chunk2CV6NU32cjs.TIMELINE_MAX_CHAPTERS; exports.TIMELINE_MAX_ITEMS = _chunk2CV6NU32cjs.TIMELINE_MAX_ITEMS; exports.TIMELINE_MAX_QUIZZES = _chunk2CV6NU32cjs.TIMELINE_MAX_QUIZZES; exports.TIMELINE_MAX_TITLE_LENGTH = _chunk2CV6NU32cjs.TIMELINE_MAX_TITLE_LENGTH; exports.TextMatchPolicySchema = _chunkD4TOPSHVcjs.TextMatchPolicySchema; exports.TimelineChapterSchema = _chunk2CV6NU32cjs.TimelineChapterSchema; exports.TimelineCueSchema = _chunk2CV6NU32cjs.TimelineCueSchema; exports.UnknownActivityTypeError = _chunkD4TOPSHVcjs.UnknownActivityTypeError; exports.WrittenResponseDataSchema = _chunkD4TOPSHVcjs.WrittenResponseDataSchema; exports.WrittenResponseRubricCriterionSchema = _chunkD4TOPSHVcjs.WrittenResponseRubricCriterionSchema; exports.WrittenResponseRubricSchema = _chunkD4TOPSHVcjs.WrittenResponseRubricSchema; exports.XAPIVerb = _chunkEOFWSGLUcjs.XAPIVerb; exports.XAPI_VERB_DISPLAY = _chunkEOFWSGLUcjs.XAPI_VERB_DISPLAY; exports.aiAllowedByContent = aiAllowedByContent; exports.aiExplanationRequest = aiExplanationRequest; exports.aiGradeOf = aiGradeOf; exports.aiHintRequest = aiHintRequest; exports.aiSupports = aiSupports; exports.alignDictation = _chunkD4TOPSHVcjs.alignDictation; exports.alignReadAloud = _chunkXNMKDFPWcjs.alignReadAloud; exports.assertRedacted = assertRedacted; exports.assertRedactedItemGroup = assertRedactedItemGroup; exports.buildAiFacts = buildAiFacts; exports.canonicalJson = canonicalJson; exports.checkAiExplanation = checkAiExplanation; exports.checkAiHint = checkAiHint; exports.classifyBand = _chunkXNMKDFPWcjs.classifyBand; exports.composeAssessmentScore = _chunkXNMKDFPWcjs.composeAssessmentScore; exports.composeTimelineScore = composeTimelineScore; exports.computePassThreshold = _chunkXNMKDFPWcjs.computePassThreshold; exports.contentHash = contentHash; exports.countWords = _chunkD4TOPSHVcjs.countWords; exports.createDraft = createDraft; exports.createInteractiveVideoDraft = createInteractiveVideoDraft; exports.createItemGroupDraft = createItemGroupDraft; exports.defineActivityType = _chunkD4TOPSHVcjs.defineActivityType; exports.dictationJsonSchema = _chunk2CV6NU32cjs.dictationJsonSchema; exports.dictationReferenceWords = _chunkD4TOPSHVcjs.dictationReferenceWords; exports.dictationType = _chunkD4TOPSHVcjs.dictationType; exports.diffDictationChars = _chunkXNMKDFPWcjs.diffDictationChars; exports.diffResponses = diffResponses; exports.entryKeyOf = entryKeyOf; exports.evaluate = _chunkXNMKDFPWcjs.evaluate; exports.fillInTheBlanksJsonSchema = _chunk2CV6NU32cjs.fillInTheBlanksJsonSchema; exports.fillInTheBlanksType = _chunkD4TOPSHVcjs.fillInTheBlanksType; exports.fingerprint = fingerprint; exports.flattenSequence = flattenSequence; exports.gapSelectJsonSchema = _chunk2CV6NU32cjs.gapSelectJsonSchema; exports.gapSelectType = _chunkD4TOPSHVcjs.gapSelectType; exports.getActivityTypeDescriptor = _chunkD4TOPSHVcjs.getActivityTypeDescriptor; exports.gradeFromRubric = _chunkXNMKDFPWcjs.gradeFromRubric; exports.gradeReadAloud = _chunkXNMKDFPWcjs.gradeReadAloud; exports.gte = _chunkXNMKDFPWcjs.gte; exports.hasGrade = _chunkXNMKDFPWcjs.hasGrade; exports.hashSeed = hashSeed; exports.hintRevealsAnswer = hintRevealsAnswer; exports.inspectWav = _chunkXNMKDFPWcjs.inspectWav; exports.isInteractiveVideoItemType = _chunk2CV6NU32cjs.isInteractiveVideoItemType; exports.isItemGroup = isItemGroup; exports.itemGroupJsonSchema = _chunk2CV6NU32cjs.itemGroupJsonSchema; exports.jsonSchemaFor = _chunk2CV6NU32cjs.jsonSchemaFor; exports.levenshteinDistance = _chunkD4TOPSHVcjs.levenshteinDistance; exports.matchText = _chunkD4TOPSHVcjs.matchText; exports.multipleChoiceJsonSchema = _chunk2CV6NU32cjs.multipleChoiceJsonSchema; exports.multipleChoiceType = _chunkD4TOPSHVcjs.multipleChoiceType; exports.outcomeFromGrade = _chunkXNMKDFPWcjs.outcomeFromGrade; exports.outcomeFromUnscorable = _chunkXNMKDFPWcjs.outcomeFromUnscorable; exports.planAttempt = planAttempt; exports.planMediaBudgets = planMediaBudgets; exports.readAiTextResult = readAiTextResult; exports.readAloudJsonSchema = _chunk2CV6NU32cjs.readAloudJsonSchema; exports.readAloudType = _chunkD4TOPSHVcjs.readAloudType; exports.readMediaProgress = readMediaProgress; exports.redact = redact; exports.redactItemGroup = redactItemGroup; exports.registerActivityType = _chunkD4TOPSHVcjs.registerActivityType; exports.registeredActivityTypes = _chunkD4TOPSHVcjs.registeredActivityTypes; exports.resolvePlaybackPolicy = resolvePlaybackPolicy; exports.restoreAttemptState = restoreAttemptState; exports.restoreMediaPlayLedger = restoreMediaPlayLedger; exports.roundGrade = _chunkXNMKDFPWcjs.roundGrade; exports.score = _chunkXNMKDFPWcjs.score; exports.scoredItemsFromPlan = scoredItemsFromPlan; exports.seededShuffle = seededShuffle; exports.serializeAttemptState = serializeAttemptState; exports.serializeMediaPlayLedger = serializeMediaPlayLedger; exports.slotMediaKey = slotMediaKey; exports.stimulusJsonSchema = _chunk2CV6NU32cjs.stimulusJsonSchema; exports.stimulusMediaKey = stimulusMediaKey; exports.validateActivity = _chunk2CV6NU32cjs.validateActivity; exports.validateDraft = validateDraft; exports.validateItemGroup = _chunk2CV6NU32cjs.validateItemGroup; exports.validateItemGroupDraft = validateItemGroupDraft; exports.validateSpeechAssessment = _chunkXNMKDFPWcjs.validateSpeechAssessment; exports.validateXAPIStatement = _chunkEOFWSGLUcjs.validateXAPIStatement; exports.verifyAttemptPlan = verifyAttemptPlan; exports.writtenResponseJsonSchema = _chunk2CV6NU32cjs.writtenResponseJsonSchema; exports.writtenResponseType = _chunkD4TOPSHVcjs.writtenResponseType; exports.xAPIBuilder = _chunkEOFWSGLUcjs.xAPIBuilder; exports.xapiDefinitionFor = _chunkEOFWSGLUcjs.xapiDefinitionFor;
|
|
1665
|
+
exports.AI_EXPLANATION_TYPES = _chunkFVZJ4X3Ycjs.AI_EXPLANATION_TYPES; exports.AI_HINT_TYPES = _chunkFVZJ4X3Ycjs.AI_HINT_TYPES; exports.AI_TEXT_MAX_LENGTH = _chunkFVZJ4X3Ycjs.AI_TEXT_MAX_LENGTH; exports.ActivitySchemaError = _chunkD4TOPSHVcjs.ActivitySchemaError; exports.AiPermissionsSchema = _chunkD4TOPSHVcjs.AiPermissionsSchema; exports.BlankConfigSchema = _chunkD4TOPSHVcjs.BlankConfigSchema; exports.DEFAULT_PASS_THRESHOLD = _chunkCOBK2RUXcjs.DEFAULT_PASS_THRESHOLD; exports.DICTATION_MAX_ACCEPTED_TRANSCRIPTS = _chunkD4TOPSHVcjs.DICTATION_MAX_ACCEPTED_TRANSCRIPTS; exports.DICTATION_MAX_EQUIVALENCES = _chunkD4TOPSHVcjs.DICTATION_MAX_EQUIVALENCES; exports.DICTATION_MAX_EQUIVALENCE_LENGTH = _chunkD4TOPSHVcjs.DICTATION_MAX_EQUIVALENCE_LENGTH; exports.DICTATION_MAX_TEXT_LENGTH = _chunkD4TOPSHVcjs.DICTATION_MAX_TEXT_LENGTH; exports.DICTATION_MAX_TRANSCRIPT_LENGTH = _chunkD4TOPSHVcjs.DICTATION_MAX_TRANSCRIPT_LENGTH; exports.DeferredScoringError = _chunkD4TOPSHVcjs.DeferredScoringError; exports.DictationDataSchema = _chunkD4TOPSHVcjs.DictationDataSchema; exports.DictationEquivalenceSchema = _chunkD4TOPSHVcjs.DictationEquivalenceSchema; exports.DictationSlowMediaSchema = _chunkD4TOPSHVcjs.DictationSlowMediaSchema; exports.DictationToleranceSchema = _chunkD4TOPSHVcjs.DictationToleranceSchema; exports.FeedbackSchema = _chunkD4TOPSHVcjs.FeedbackSchema; exports.FillInTheBlanksDataSchema = _chunkD4TOPSHVcjs.FillInTheBlanksDataSchema; exports.GapSelectBankSchema = _chunkD4TOPSHVcjs.GapSelectBankSchema; exports.GapSelectChoiceSchema = _chunkD4TOPSHVcjs.GapSelectChoiceSchema; exports.GapSelectDataSchema = _chunkD4TOPSHVcjs.GapSelectDataSchema; exports.GapSelectGapSchema = _chunkD4TOPSHVcjs.GapSelectGapSchema; exports.INTERACTIVE_VIDEO_ITEM_TYPES = _chunk2CV6NU32cjs.INTERACTIVE_VIDEO_ITEM_TYPES; exports.ItemGroupSchema = _chunk2CV6NU32cjs.ItemGroupSchema; exports.MediaPlaybackSchema = _chunkD4TOPSHVcjs.MediaPlaybackSchema; exports.MediaSchema = _chunkD4TOPSHVcjs.MediaSchema; exports.MediaTimelineSchema = _chunk2CV6NU32cjs.MediaTimelineSchema; exports.MediaTrackSchema = _chunkD4TOPSHVcjs.MediaTrackSchema; exports.MediaUrlSchema = _chunkD4TOPSHVcjs.MediaUrlSchema; exports.MultipleChoiceDataSchema = _chunkD4TOPSHVcjs.MultipleChoiceDataSchema; exports.MultipleChoiceOptionMediaSchema = _chunkD4TOPSHVcjs.MultipleChoiceOptionMediaSchema; exports.MultipleChoiceOptionSchema = _chunkD4TOPSHVcjs.MultipleChoiceOptionSchema; exports.NativeControlHintSchema = _chunkD4TOPSHVcjs.NativeControlHintSchema; exports.READ_ALOUD_MAX_DIMENSION_WEIGHT = _chunkD4TOPSHVcjs.READ_ALOUD_MAX_DIMENSION_WEIGHT; exports.READ_ALOUD_MAX_REFERENCE_LENGTH = _chunkD4TOPSHVcjs.READ_ALOUD_MAX_REFERENCE_LENGTH; exports.READ_ALOUD_MAX_SECONDS = _chunkD4TOPSHVcjs.READ_ALOUD_MAX_SECONDS; exports.READ_ALOUD_MAX_TAKES = _chunkD4TOPSHVcjs.READ_ALOUD_MAX_TAKES; exports.ReadAloudDataSchema = _chunkD4TOPSHVcjs.ReadAloudDataSchema; exports.ReadAloudSlowMediaSchema = _chunkD4TOPSHVcjs.ReadAloudSlowMediaSchema; exports.RedactedBlankConfigSchema = _chunkD4TOPSHVcjs.RedactedBlankConfigSchema; exports.RedactedDictationDataSchema = _chunkD4TOPSHVcjs.RedactedDictationDataSchema; exports.RedactedDictationSlowMediaSchema = _chunkD4TOPSHVcjs.RedactedDictationSlowMediaSchema; exports.RedactedFillInTheBlanksDataSchema = _chunkD4TOPSHVcjs.RedactedFillInTheBlanksDataSchema; exports.RedactedGapSelectBankSchema = _chunkD4TOPSHVcjs.RedactedGapSelectBankSchema; exports.RedactedGapSelectChoiceSchema = _chunkD4TOPSHVcjs.RedactedGapSelectChoiceSchema; exports.RedactedGapSelectDataSchema = _chunkD4TOPSHVcjs.RedactedGapSelectDataSchema; exports.RedactedGapSelectGapSchema = _chunkD4TOPSHVcjs.RedactedGapSelectGapSchema; exports.RedactedItemGroupSchema = _chunk2CV6NU32cjs.RedactedItemGroupSchema; exports.RedactedMediaSchema = _chunkD4TOPSHVcjs.RedactedMediaSchema; exports.RedactedMultipleChoiceDataSchema = _chunkD4TOPSHVcjs.RedactedMultipleChoiceDataSchema; exports.RedactedMultipleChoiceOptionMediaSchema = _chunkD4TOPSHVcjs.RedactedMultipleChoiceOptionMediaSchema; exports.RedactedMultipleChoiceOptionSchema = _chunkD4TOPSHVcjs.RedactedMultipleChoiceOptionSchema; exports.RedactedReadAloudDataSchema = _chunkD4TOPSHVcjs.RedactedReadAloudDataSchema; exports.RedactedScoringError = _chunkD4TOPSHVcjs.RedactedScoringError; exports.RedactedStimulusSchema = _chunk2CV6NU32cjs.RedactedStimulusSchema; exports.RedactedWrittenResponseDataSchema = _chunkD4TOPSHVcjs.RedactedWrittenResponseDataSchema; exports.SPEECH_ASSESSMENT_MAX_WORDS = _chunkD4TOPSHVcjs.SPEECH_ASSESSMENT_MAX_WORDS; exports.StimulusSchema = _chunk2CV6NU32cjs.StimulusSchema; exports.TIMELINE_MAX_CHAPTERS = _chunk2CV6NU32cjs.TIMELINE_MAX_CHAPTERS; exports.TIMELINE_MAX_ITEMS = _chunk2CV6NU32cjs.TIMELINE_MAX_ITEMS; exports.TIMELINE_MAX_QUIZZES = _chunk2CV6NU32cjs.TIMELINE_MAX_QUIZZES; exports.TIMELINE_MAX_TITLE_LENGTH = _chunk2CV6NU32cjs.TIMELINE_MAX_TITLE_LENGTH; exports.TextMatchPolicySchema = _chunkD4TOPSHVcjs.TextMatchPolicySchema; exports.TimelineChapterSchema = _chunk2CV6NU32cjs.TimelineChapterSchema; exports.TimelineCueSchema = _chunk2CV6NU32cjs.TimelineCueSchema; exports.UnknownActivityTypeError = _chunkD4TOPSHVcjs.UnknownActivityTypeError; exports.WrittenResponseDataSchema = _chunkD4TOPSHVcjs.WrittenResponseDataSchema; exports.WrittenResponseRubricCriterionSchema = _chunkD4TOPSHVcjs.WrittenResponseRubricCriterionSchema; exports.WrittenResponseRubricSchema = _chunkD4TOPSHVcjs.WrittenResponseRubricSchema; exports.XAPIVerb = _chunkEOFWSGLUcjs.XAPIVerb; exports.XAPI_VERB_DISPLAY = _chunkEOFWSGLUcjs.XAPI_VERB_DISPLAY; exports.aiAllowedByContent = _chunkFVZJ4X3Ycjs.aiAllowedByContent; exports.aiExplanationRequest = _chunkFVZJ4X3Ycjs.aiExplanationRequest; exports.aiGradeOf = _chunkFVZJ4X3Ycjs.aiGradeOf; exports.aiHintRequest = _chunkFVZJ4X3Ycjs.aiHintRequest; exports.aiSupports = _chunkFVZJ4X3Ycjs.aiSupports; exports.alignDictation = _chunkD4TOPSHVcjs.alignDictation; exports.alignReadAloud = _chunkCOBK2RUXcjs.alignReadAloud; exports.assertRedacted = assertRedacted; exports.assertRedactedItemGroup = assertRedactedItemGroup; exports.buildAiFacts = _chunkFVZJ4X3Ycjs.buildAiFacts; exports.canonicalJson = canonicalJson; exports.checkAiExplanation = _chunkFVZJ4X3Ycjs.checkAiExplanation; exports.checkAiHint = _chunkFVZJ4X3Ycjs.checkAiHint; exports.classifyBand = _chunkCOBK2RUXcjs.classifyBand; exports.composeAssessmentScore = _chunkCOBK2RUXcjs.composeAssessmentScore; exports.composeTimelineScore = composeTimelineScore; exports.computePassThreshold = _chunkCOBK2RUXcjs.computePassThreshold; exports.contentHash = contentHash; exports.countWords = _chunkD4TOPSHVcjs.countWords; exports.createDraft = createDraft; exports.createInteractiveVideoDraft = createInteractiveVideoDraft; exports.createItemGroupDraft = createItemGroupDraft; exports.defineActivityType = _chunkD4TOPSHVcjs.defineActivityType; exports.dictationJsonSchema = _chunk2CV6NU32cjs.dictationJsonSchema; exports.dictationReferenceWords = _chunkD4TOPSHVcjs.dictationReferenceWords; exports.dictationType = _chunkD4TOPSHVcjs.dictationType; exports.diffDictationChars = _chunkCOBK2RUXcjs.diffDictationChars; exports.diffResponses = diffResponses; exports.entryKeyOf = entryKeyOf; exports.evaluate = _chunkCOBK2RUXcjs.evaluate; exports.fillInTheBlanksJsonSchema = _chunk2CV6NU32cjs.fillInTheBlanksJsonSchema; exports.fillInTheBlanksType = _chunkD4TOPSHVcjs.fillInTheBlanksType; exports.fingerprint = fingerprint; exports.flattenSequence = flattenSequence; exports.gapSelectJsonSchema = _chunk2CV6NU32cjs.gapSelectJsonSchema; exports.gapSelectType = _chunkD4TOPSHVcjs.gapSelectType; exports.getActivityTypeDescriptor = _chunkD4TOPSHVcjs.getActivityTypeDescriptor; exports.gradeFromRubric = _chunkCOBK2RUXcjs.gradeFromRubric; exports.gradeReadAloud = _chunkCOBK2RUXcjs.gradeReadAloud; exports.gte = _chunkCOBK2RUXcjs.gte; exports.hasGrade = _chunkCOBK2RUXcjs.hasGrade; exports.hashSeed = hashSeed; exports.hintRevealsAnswer = _chunkFVZJ4X3Ycjs.hintRevealsAnswer; exports.inspectWav = _chunkCOBK2RUXcjs.inspectWav; exports.isInteractiveVideoItemType = _chunk2CV6NU32cjs.isInteractiveVideoItemType; exports.isItemGroup = isItemGroup; exports.itemGroupJsonSchema = _chunk2CV6NU32cjs.itemGroupJsonSchema; exports.jsonSchemaFor = _chunk2CV6NU32cjs.jsonSchemaFor; exports.levenshteinDistance = _chunkD4TOPSHVcjs.levenshteinDistance; exports.matchText = _chunkD4TOPSHVcjs.matchText; exports.multipleChoiceJsonSchema = _chunk2CV6NU32cjs.multipleChoiceJsonSchema; exports.multipleChoiceType = _chunkD4TOPSHVcjs.multipleChoiceType; exports.outcomeFromGrade = _chunkCOBK2RUXcjs.outcomeFromGrade; exports.outcomeFromUnscorable = _chunkCOBK2RUXcjs.outcomeFromUnscorable; exports.planAttempt = planAttempt; exports.planMediaBudgets = planMediaBudgets; exports.readAiTextResult = _chunkFVZJ4X3Ycjs.readAiTextResult; exports.readAloudJsonSchema = _chunk2CV6NU32cjs.readAloudJsonSchema; exports.readAloudType = _chunkD4TOPSHVcjs.readAloudType; exports.readMediaProgress = readMediaProgress; exports.redact = redact; exports.redactItemGroup = redactItemGroup; exports.registerActivityType = _chunkD4TOPSHVcjs.registerActivityType; exports.registeredActivityTypes = _chunkD4TOPSHVcjs.registeredActivityTypes; exports.resolvePlaybackPolicy = resolvePlaybackPolicy; exports.restoreAttemptState = restoreAttemptState; exports.restoreMediaPlayLedger = restoreMediaPlayLedger; exports.roundGrade = _chunkCOBK2RUXcjs.roundGrade; exports.score = _chunkCOBK2RUXcjs.score; exports.scoredItemsFromPlan = scoredItemsFromPlan; exports.seededShuffle = seededShuffle; exports.serializeAttemptState = serializeAttemptState; exports.serializeMediaPlayLedger = serializeMediaPlayLedger; exports.slotMediaKey = slotMediaKey; exports.stimulusJsonSchema = _chunk2CV6NU32cjs.stimulusJsonSchema; exports.stimulusMediaKey = stimulusMediaKey; exports.validateActivity = _chunk2CV6NU32cjs.validateActivity; exports.validateDraft = validateDraft; exports.validateItemGroup = _chunk2CV6NU32cjs.validateItemGroup; exports.validateItemGroupDraft = validateItemGroupDraft; exports.validateSpeechAssessment = _chunkCOBK2RUXcjs.validateSpeechAssessment; exports.validateXAPIStatement = _chunkEOFWSGLUcjs.validateXAPIStatement; exports.verifyAttemptPlan = verifyAttemptPlan; exports.writtenResponseJsonSchema = _chunk2CV6NU32cjs.writtenResponseJsonSchema; exports.writtenResponseType = _chunkD4TOPSHVcjs.writtenResponseType; exports.xAPIBuilder = _chunkEOFWSGLUcjs.xAPIBuilder; exports.xapiDefinitionFor = _chunkEOFWSGLUcjs.xapiDefinitionFor;
|
|
2051
1666
|
//# sourceMappingURL=index.cjs.map
|