@intellectif/lk-core 1.13.0 → 1.14.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.
Files changed (75) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/dist/ai-check.cjs +2 -2
  4. package/dist/ai-check.d.cts +1 -1
  5. package/dist/ai-check.d.ts +1 -1
  6. package/dist/ai-check.js +2 -2
  7. package/dist/{ai-hC5pGYeu.d.cts → ai-mC-5XhBc.d.cts} +92 -2
  8. package/dist/ai-mC-5XhBc.d.cts.map +1 -0
  9. package/dist/{ai-hC5pGYeu.d.ts → ai-mC-5XhBc.d.ts} +92 -2
  10. package/dist/ai-mC-5XhBc.d.ts.map +1 -0
  11. package/dist/{ai-writing-BDSYuifR.cjs → ai-writing-Bm2TUWQ-.cjs} +10 -4
  12. package/dist/ai-writing-Bm2TUWQ-.cjs.map +1 -0
  13. package/dist/{ai-writing-Dsmvv4T-.js → ai-writing-D3oREPsp.js} +10 -4
  14. package/dist/ai-writing-D3oREPsp.js.map +1 -0
  15. package/dist/{index-Dlei-7PX.d.ts → index-2UQ5v6NZ.d.ts} +2 -2
  16. package/dist/{index-Dlei-7PX.d.ts.map → index-2UQ5v6NZ.d.ts.map} +1 -1
  17. package/dist/{index-Du9Kx_H6.d.ts → index-BudO4ES2.d.ts} +2 -2
  18. package/dist/{index-Du9Kx_H6.d.ts.map → index-BudO4ES2.d.ts.map} +1 -1
  19. package/dist/{index-BlJU10O4.d.cts → index-CFKxHXAY.d.ts} +11 -4
  20. package/dist/{index-DVW_N4pJ.d.ts.map → index-CFKxHXAY.d.ts.map} +1 -1
  21. package/dist/{index-DVW_N4pJ.d.ts → index-CagMlF4b.d.cts} +11 -4
  22. package/dist/{index-BlJU10O4.d.cts.map → index-CagMlF4b.d.cts.map} +1 -1
  23. package/dist/{index-4x0auNOv.d.cts → index-CqmNcMFM.d.cts} +2 -2
  24. package/dist/{index-4x0auNOv.d.cts.map → index-CqmNcMFM.d.cts.map} +1 -1
  25. package/dist/{index-DohEHH10.d.cts → index-MgPVCiSJ.d.cts} +2 -2
  26. package/dist/{index-DohEHH10.d.cts.map → index-MgPVCiSJ.d.cts.map} +1 -1
  27. package/dist/index.cjs +12 -6
  28. package/dist/index.d.cts +86 -10
  29. package/dist/index.d.cts.map +1 -1
  30. package/dist/index.d.ts +86 -10
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +7 -7
  33. package/dist/{item-group-vTcNy2JF.js → item-group-BIl1ZJHg.js} +7 -6
  34. package/dist/item-group-BIl1ZJHg.js.map +1 -0
  35. package/dist/{item-group-CqdByaLR.cjs → item-group-DOk562oI.cjs} +7 -6
  36. package/dist/item-group-DOk562oI.cjs.map +1 -0
  37. package/dist/{registry-Cn2it-y7.js → registry-CroAI5nc.js} +517 -11
  38. package/dist/registry-CroAI5nc.js.map +1 -0
  39. package/dist/{registry-DUTE1vtq.cjs → registry-Dw19lNo2.cjs} +552 -10
  40. package/dist/registry-Dw19lNo2.cjs.map +1 -0
  41. package/dist/{schemas-BrA6CFWz.cjs → schemas-CEv2otNw.cjs} +3 -3
  42. package/dist/{schemas-BrA6CFWz.cjs.map → schemas-CEv2otNw.cjs.map} +1 -1
  43. package/dist/{schemas-DlxeS7Lu.js → schemas-COw7muXH.js} +3 -3
  44. package/dist/{schemas-DlxeS7Lu.js.map → schemas-COw7muXH.js.map} +1 -1
  45. package/dist/schemas.cjs +3 -3
  46. package/dist/schemas.d.cts +2 -2
  47. package/dist/schemas.d.ts +2 -2
  48. package/dist/schemas.js +3 -3
  49. package/dist/{scoring-weQ4SzwB.js → scoring-BxvOhHE0.js} +2 -2
  50. package/dist/{scoring-weQ4SzwB.js.map → scoring-BxvOhHE0.js.map} +1 -1
  51. package/dist/{scoring-IjLi2fYF.cjs → scoring-EpNBJ8Fs.cjs} +2 -2
  52. package/dist/{scoring-IjLi2fYF.cjs.map → scoring-EpNBJ8Fs.cjs.map} +1 -1
  53. package/dist/scoring.cjs +2 -2
  54. package/dist/scoring.d.cts +2 -2
  55. package/dist/scoring.d.ts +2 -2
  56. package/dist/scoring.js +2 -2
  57. package/dist/{xapi-BqEbpWag.cjs → xapi-C-cQgWRX.cjs} +2 -2
  58. package/dist/{xapi-BqEbpWag.cjs.map → xapi-C-cQgWRX.cjs.map} +1 -1
  59. package/dist/{xapi-DbRVH_RB.js → xapi-DHHm7Os9.js} +2 -2
  60. package/dist/{xapi-DbRVH_RB.js.map → xapi-DHHm7Os9.js.map} +1 -1
  61. package/dist/xapi.cjs +1 -1
  62. package/dist/xapi.d.cts +1 -1
  63. package/dist/xapi.d.ts +1 -1
  64. package/dist/xapi.js +1 -1
  65. package/package.json +1 -1
  66. package/vectors/scoring.json +833 -0
  67. package/vectors/validation.json +631 -0
  68. package/dist/ai-hC5pGYeu.d.cts.map +0 -1
  69. package/dist/ai-hC5pGYeu.d.ts.map +0 -1
  70. package/dist/ai-writing-BDSYuifR.cjs.map +0 -1
  71. package/dist/ai-writing-Dsmvv4T-.js.map +0 -1
  72. package/dist/item-group-CqdByaLR.cjs.map +0 -1
  73. package/dist/item-group-vTcNy2JF.js.map +0 -1
  74. package/dist/registry-Cn2it-y7.js.map +0 -1
  75. package/dist/registry-DUTE1vtq.cjs.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { $ as AiSpeakingGradingFacts, $n as MatchingLearnerResponse, $r as TextMatchResult, $t as RouteMoveId, A as AiGapSelectFacts, An as ActivityResult, Ar as WrittenResponseRubricCriterion, At as SequenceSlot, B as AiGroupInput, Bn as FillInTheBlanksData, Br as XAPIStatement, Bt as PlannedPair, C as AiDraftsCall, Cn as VersionFinding, Cr as SpeakingRubric, Ct as AiWritingFeedback, D as AiFeature, Dn as ActivityDataMap, Dr as WrittenResponseData, Dt as MediaProgress, E as AiExplanationRequest, En as ActivityData, Er as ValidationResult, Et as ItemGroup, F as AiGradingCriterionFact, Fn as DictationData, Fr as XAPIContextActivities, Ft as TimelineCue, G as AiOptionFact, Gn as GapSelectGap, Gr as GradeRoutingReason, Gt as RouteAnswer, H as AiItemFacts, Hn as GapSelectBank, Hr as CriterionScore, Ht as PlannedTrap, I as AiGradingFacts, In as DictationEquivalence, Ir as XAPIError, It as PassageLayout, J as AiReadingWordFact, Jn as InteractionKind, Jr as GraderKind, Jt as RouteFadingOptions, K as AiProvenance, Kn as GapSelectLearnerResponse, Kr as Grader, Kt as RouteCause, L as AiGradingJudgement, Ln as DictationLearnerResponse, Lr as XAPIObject, Lt as PassageParagraph, M as AiGeneratedVariant, Mn as BlankConfig, Mr as XAPIActor, Mt as Stimulus, N as AiGrade, Nn as DeferredReason, Nr as XAPIConfig, Nt as StimulusKind, O as AiFillInTheBlanksFacts, On as ActivityFeedback, Or as WrittenResponseLearnerResponse, Ot as MediaTimeline, P as AiGradedCriterion, Pn as DeferredScoringPartial, Pr as XAPIContext, Pt as TimelineChapter, Q as AiSpeakingCriterionFact, Qn as MatchingData, Qr as TextMatchPolicy, Qt as RouteLink, R as AiGradingRequest, Rn as DictationSlowMedia, Rr as XAPIResult, Rt as PassageSection, S as AiDrafts, Sn as VersionComparison, Sr as SpeakingResponseLearnerResponse, St as AiWritingFacts, T as AiDraftsRun, Tn as VersionSlot, Tr as ValidationError, Tt as AiWritingFeedbackResult, U as AiMaterialFacts, Un as GapSelectChoice, Ur as GradeRecord, Ut as QuotedRange, V as AiHintRequest, Vn as FillInTheBlanksLearnerResponse, Vr as XAPIVerbObject, Vt as PlannedQuestion, W as AiMultipleChoiceFacts, Wn as GapSelectData, Wr as GradeRouting, Wt as ReadingRoute, X as AiRubricCriterionFact, Xn as LearnerResponse, Xr as GradingState, Xt as RouteLearnerState, Y as AiRefusal, Yn as ItemOutcome, Yr as GraderUsage, Yt as RouteKeyword, Z as AiSoundFact, Zn as LearnerResponseMap, Zr as InlineCorrection, Zt as RouteLevel, _ as AiDraftCaption, _n as DraftNotComplete, _r as ScoringOutcome, _t as AiVariantsRun, a as AiCoachingRequest, an as RouteSection, ar as MultipleChoiceLearnerResponse, at as AiVariantDifficulty, b as AiDraftSource, bn as ItemFinding, br as SpeakingMeasure, bt as AiWordFact, c as AiCriterionJudgement, cn as RouteStrategySummary, cr as NativeControlHint, ct as AiVariantLevelFacts, d as AiCritiqueFinding, dn as RouteTrap, dr as ReadAloudDimensionWeight, dt as AiVariantPair, ei as levenshteinDistance, en as RoutePlan, er as MatchingOption, et as AiSpeakingGradingRequest, f as AiCritiqueFindingResult, fn as RouteTrapKind, fr as ReadAloudLearnerResponse, ft as AiVariantSkip, g as AiDictationFacts, gn as DraftIssue, gr as ScoringDetail, gt as AiVariantsRequest, h as AiCritiqueResult, hn as DraftContext, hr as RecordingRef, ht as AiVariants, i as AiCoaching, in as RouteQuote, ir as MultipleChoiceData, it as AiTextResult, j as AiGeneratedDraft, jn as ActivityType, jr as WrittenResponseRubricLevel, jt as SequenceSlotGroup, k as AiGapFact, kn as ActivityMedia, kr as WrittenResponseRubric, kt as SequenceEntry, l as AiCritique, ln as RouteSummary, lr as ReadAloudData, lt as AiVariantMismatch, m as AiCritiqueRequest, mn as DraftComplete, mr as RecordingBounds, mt as AiVariantTargets, n as AiActivityInput, nn as RouteQuestionPart, nr as MediaPlaybackPolicy, nt as AiSpeakingMeasureFact, o as AiCoachingResult, on as RouteStep, or as MultipleChoiceOption, ot as AiVariantExemplarFacts, p as AiCritiqueKind, pn as TextRange, pr as ReadAloudSlowMedia, pt as AiVariantSkipCode, q as AiReadingFacts, qn as InteractionEvent, qr as GraderConfiguration, qt as RouteEvent, r as AiBlankFact, rn as RouteQuestionSummary, rr as MediaTrack, rt as AiSupportedActivityType, s as AiCoachingWord, sn as RouteStrategyId, sr as MultipleChoiceOptionMedia, st as AiVariantImage, t as ActivityAiPermissions, ti as matchText, tn as RouteQuestion, tr as MatchingPrompt, tt as AiSpeakingGradingRequestProblem, u as AiCritiqueField, un as RouteTrace, ur as ReadAloudDimension, ut as AiVariantMissing, v as AiDraftProblem, vn as DraftSeverity, vr as ScoringResult, vt as AiVerdict, w as AiDraftsRequest, wn as VersionPaper, wr as SpeakingRubricCriterion, wt as AiWritingFeedbackRequest, x as AiDraftType, xn as ItemFindingSeverity, xr as SpeakingResponseData, xt as AiWritingCorrection, y as AiDraftSettings, yn as DraftValidationResult, yr as ScriptTurn, yt as AiVideoDraft, z as AiGradingRequestProblem, zn as DictationTolerance, zr as XAPIScore, zt as PassageSentence } from "./ai-hC5pGYeu.js";
2
- import { $ as gradeFromRubric, A as DictationCharOp, At as SpeechWordError, B as inAuditSample, C as scoreTries, Ct as SpeechPhoneme, D as DICTATION_MAX_EQUIVALENCE_LENGTH, Dt as SpeechUnscorable, E as DICTATION_MAX_EQUIVALENCES, Et as SpeechSyllable, F as alignDictation, Ft as RoundingPolicy, G as CalibrationPair, H as routeGrade, I as dictationReferenceWords, It as classifyBand, J as CriterionCalibration, K as CalibrationReport, L as CalibrationThresholds, Lt as gte, M as DictationAlignment, Mt as WavInspectionPolicy, N as DictationReference, Nt as Band, O as DICTATION_MAX_TEXT_LENGTH, Ot as SpeechUnscorableCode, P as DictationWordAlignment, Pt as RoundingMode, Q as GradeFromRubricOptions, R as GradeRoutingContext, Rt as roundGrade, S as resolveItemScoringPolicy, St as SpeechMeasurement, T as DICTATION_MAX_ACCEPTED_TRANSCRIPTS, Tt as SpeechPlausibilityPolicy, U as GradeFromJudgementOptions, V as outcomeFromRoutedGrade, W as gradeFromJudgement, X as calibrationReport, Y as TotalCalibration, Z as graderConfiguration, _ as alignReadAloud, _t as GradeSpeakingResponseOptions, a as evaluateTries, at as ItemTriesScore, b as DEFAULT_ITEM_SCORING_POLICY, bt as SpeakingEvidence, c as inspectWav, ct as ResolvedItemScoringPolicy, d as READ_ALOUD_MAX_SECONDS, dt as CompositionPolicy, et as hasGrade, f as READ_ALOUD_MAX_TAKES, ft as PassFailureReason, g as validateSpeechAssessment, gt as GradeReadAloudOptions, h as gradeReadAloud, ht as composeAssessmentScore, i as evaluate, it as ItemScoringPolicyIssue, j as diffDictationChars, jt as WavInspection, k as DICTATION_MAX_TRANSCRIPT_LENGTH, kt as SpeechWord, l as READ_ALOUD_MAX_DIMENSION_WEIGHT, lt as AssessmentScore, m as gradeSpeakingResponse, mt as SectionScore, n as ItemTriesOutcome, nt as ItemScoringCount, o as score, ot as ItemTry, p as SPEECH_ASSESSMENT_MAX_WORDS, pt as ScoredItem, q as CalibrationScope, r as ScoringOptions, rt as ItemScoringPolicy, s as outcomeFromUnscorable, st as ItemTryScore, t as EvaluateOptions, tt as outcomeFromGrade, u as READ_ALOUD_MAX_REFERENCE_LENGTH, ut as AssessmentSectionInput, v as DEFAULT_PASS_THRESHOLD, vt as ReadAloudWordAlignment, w as validateItemScoringPolicy, wt as SpeechPhonemeCandidate, x as ITEM_SCORING_MAX_RETRIES, xt as SpeechAssessment, y as computePassThreshold, yt as ReadAloudWordState, z as GradeRoutingPolicy } from "./index-Du9Kx_H6.js";
3
- import { A as RedactedMultipleChoiceOption, C as RedactedGapSelectChoice, D as RedactedMatchingOption, E as RedactedMatchingData, M as RedactedReadAloudData, N as RedactedStimulus, O as RedactedMatchingPrompt, P as RedactedWrittenResponseData, S as RedactedGapSelectBank, T as RedactedGapSelectGap, _ as RedactedActivity, a as JsonSchemaTarget, b as RedactedDictationSlowMedia, c as fillInTheBlanksJsonSchema, d as jsonSchemaFor, f as multipleChoiceJsonSchema, g as validateItemGroup, h as writtenResponseJsonSchema, i as SCRIPT_MAX_TURNS, j as RedactedMultipleChoiceOptionMedia, k as RedactedMultipleChoiceData, l as gapSelectJsonSchema, m as stimulusJsonSchema, n as validateMedia, o as contentJsonSchema, p as readAloudJsonSchema, r as validateOptionMedia, s as dictationJsonSchema, t as validateActivity, u as itemGroupJsonSchema, v as RedactedBlankConfig, w as RedactedGapSelectData, x as RedactedFillInTheBlanksData, y as RedactedDictationData } from "./index-DVW_N4pJ.js";
4
- import { a as XAPIObjectParams, c as xapiDefinitionFor, d as XAPI_VERB_DISPLAY, i as SubmittedStatementParams, l as XAPIVerb, n as AnsweredStatementParams, o as XAPIStatementParams, r as CompletedStatementParams, s as xAPIBuilder, t as validateXAPIStatement, u as XAPIVerbKey } from "./index-Dlei-7PX.js";
1
+ import { $ as AiSpeakingGradingFacts, $n as MarkTheWordsLearnerResponse, $r as GradingState, $t as RouteMoveId, A as AiGapSelectFacts, An as ActivityResult, Ar as WrittenResponseData, At as SequenceSlot, B as AiGroupInput, Bn as FillInTheBlanksData, Br as XAPIObject, Bt as PlannedPair, C as AiDraftsCall, Cn as VersionFinding, Cr as SpeakingMeasure, Ct as AiWritingFeedback, D as AiFeature, Dn as ActivityDataMap, Dr as SpeakingRubricCriterion, Dt as MediaProgress, E as AiExplanationRequest, En as ActivityData, Er as SpeakingRubric, Et as ItemGroup, F as AiGradingCriterionFact, Fn as DictationData, Fr as XAPIActor, Ft as TimelineCue, G as AiOptionFact, Gn as GapSelectGap, Gr as CriterionScore, Gt as RouteAnswer, H as AiItemFacts, Hn as GapSelectBank, Hr as XAPIScore, Ht as PlannedTrap, I as AiGradingFacts, In as DictationEquivalence, Ir as XAPIConfig, It as PassageLayout, J as AiReadingWordFact, Jn as InteractionKind, Jr as GradeRoutingReason, Jt as RouteFadingOptions, K as AiProvenance, Kn as GapSelectLearnerResponse, Kr as GradeRecord, Kt as RouteCause, L as AiGradingJudgement, Ln as DictationLearnerResponse, Lr as XAPIContext, Lt as PassageParagraph, M as AiGeneratedVariant, Mn as BlankConfig, Mr as WrittenResponseRubric, Mt as Stimulus, N as AiGrade, Nn as DeferredReason, Nr as WrittenResponseRubricCriterion, Nt as StimulusKind, O as AiFillInTheBlanksFacts, On as ActivityFeedback, Or as ValidationError, Ot as MediaTimeline, P as AiGradedCriterion, Pn as DeferredScoringPartial, Pr as WrittenResponseRubricLevel, Pt as TimelineChapter, Q as AiSpeakingCriterionFact, Qn as MarkTheWordsData, Qr as GraderUsage, Qt as RouteLink, R as AiGradingRequest, Rn as DictationSlowMedia, Rr as XAPIContextActivities, Rt as PassageSection, S as AiDrafts, Sn as VersionComparison, Sr as ScriptTurn, St as AiWritingFacts, T as AiDraftsRun, Tn as VersionSlot, Tr as SpeakingResponseLearnerResponse, Tt as AiWritingFeedbackResult, U as AiMaterialFacts, Un as GapSelectChoice, Ur as XAPIStatement, Ut as QuotedRange, V as AiHintRequest, Vn as FillInTheBlanksLearnerResponse, Vr as XAPIResult, Vt as PlannedQuestion, W as AiMultipleChoiceFacts, Wn as GapSelectData, Wr as XAPIVerbObject, Wt as ReadingRoute, X as AiRubricCriterionFact, Xn as LearnerResponse, Xr as GraderConfiguration, Xt as RouteLearnerState, Y as AiRefusal, Yn as ItemOutcome, Yr as Grader, Yt as RouteKeyword, Z as AiSoundFact, Zn as LearnerResponseMap, Zr as GraderKind, Zt as RouteLevel, _ as AiDraftCaption, _n as DraftNotComplete, _r as RecordingBounds, _t as AiVariantsRun, a as AiCoachingRequest, an as RouteSection, ar as MediaPlaybackPolicy, at as AiVariantDifficulty, b as AiDraftSource, bn as ItemFinding, br as ScoringOutcome, bt as AiWordFact, c as AiCriterionJudgement, cn as RouteStrategySummary, cr as MultipleChoiceLearnerResponse, ct as AiVariantLevelFacts, d as AiCritiqueFinding, dn as RouteTrap, dr as NativeControlHint, dt as AiVariantPair, ei as InlineCorrection, en as RoutePlan, er as MarkTheWordsTarget, et as AiSpeakingGradingRequest, f as AiCritiqueFindingResult, fn as RouteTrapKind, fr as ReadAloudData, ft as AiVariantSkip, g as AiDictationFacts, gn as DraftIssue, gr as ReadAloudSlowMedia, gt as AiVariantsRequest, h as AiCritiqueResult, hn as DraftContext, hr as ReadAloudLearnerResponse, ht as AiVariants, i as AiCoaching, ii as matchText, in as RouteQuote, ir as MatchingPrompt, it as AiTextResult, j as AiGeneratedDraft, jn as ActivityType, jr as WrittenResponseLearnerResponse, jt as SequenceSlotGroup, k as AiGapFact, kn as ActivityMedia, kr as ValidationResult, kt as SequenceEntry, l as AiCritique, ln as RouteSummary, lr as MultipleChoiceOption, lt as AiVariantMismatch, m as AiCritiqueRequest, mn as DraftComplete, mr as ReadAloudDimensionWeight, mt as AiVariantTargets, n as AiActivityInput, ni as TextMatchResult, nn as RouteQuestionPart, nr as MatchingLearnerResponse, nt as AiSpeakingMeasureFact, o as AiCoachingResult, on as RouteStep, or as MediaTrack, ot as AiVariantExemplarFacts, p as AiCritiqueKind, pn as TextRange, pr as ReadAloudDimension, pt as AiVariantSkipCode, q as AiReadingFacts, qn as InteractionEvent, qr as GradeRouting, qt as RouteEvent, r as AiBlankFact, ri as levenshteinDistance, rn as RouteQuestionSummary, rr as MatchingOption, rt as AiSupportedActivityType, s as AiCoachingWord, sn as RouteStrategyId, sr as MultipleChoiceData, st as AiVariantImage, t as ActivityAiPermissions, ti as TextMatchPolicy, tn as RouteQuestion, tr as MatchingData, tt as AiSpeakingGradingRequestProblem, u as AiCritiqueField, un as RouteTrace, ur as MultipleChoiceOptionMedia, ut as AiVariantMissing, v as AiDraftProblem, vn as DraftSeverity, vr as RecordingRef, vt as AiVerdict, w as AiDraftsRequest, wn as VersionPaper, wr as SpeakingResponseData, wt as AiWritingFeedbackRequest, x as AiDraftType, xn as ItemFindingSeverity, xr as ScoringResult, xt as AiWritingCorrection, y as AiDraftSettings, yn as DraftValidationResult, yr as ScoringDetail, yt as AiVideoDraft, z as AiGradingRequestProblem, zn as DictationTolerance, zr as XAPIError, zt as PassageSentence } from "./ai-mC-5XhBc.js";
2
+ import { $ as gradeFromRubric, A as DictationCharOp, At as SpeechWordError, B as inAuditSample, C as scoreTries, Ct as SpeechPhoneme, D as DICTATION_MAX_EQUIVALENCE_LENGTH, Dt as SpeechUnscorable, E as DICTATION_MAX_EQUIVALENCES, Et as SpeechSyllable, F as alignDictation, Ft as RoundingPolicy, G as CalibrationPair, H as routeGrade, I as dictationReferenceWords, It as classifyBand, J as CriterionCalibration, K as CalibrationReport, L as CalibrationThresholds, Lt as gte, M as DictationAlignment, Mt as WavInspectionPolicy, N as DictationReference, Nt as Band, O as DICTATION_MAX_TEXT_LENGTH, Ot as SpeechUnscorableCode, P as DictationWordAlignment, Pt as RoundingMode, Q as GradeFromRubricOptions, R as GradeRoutingContext, Rt as roundGrade, S as resolveItemScoringPolicy, St as SpeechMeasurement, T as DICTATION_MAX_ACCEPTED_TRANSCRIPTS, Tt as SpeechPlausibilityPolicy, U as GradeFromJudgementOptions, V as outcomeFromRoutedGrade, W as gradeFromJudgement, X as calibrationReport, Y as TotalCalibration, Z as graderConfiguration, _ as alignReadAloud, _t as GradeSpeakingResponseOptions, a as evaluateTries, at as ItemTriesScore, b as DEFAULT_ITEM_SCORING_POLICY, bt as SpeakingEvidence, c as inspectWav, ct as ResolvedItemScoringPolicy, d as READ_ALOUD_MAX_SECONDS, dt as CompositionPolicy, et as hasGrade, f as READ_ALOUD_MAX_TAKES, ft as PassFailureReason, g as validateSpeechAssessment, gt as GradeReadAloudOptions, h as gradeReadAloud, ht as composeAssessmentScore, i as evaluate, it as ItemScoringPolicyIssue, j as diffDictationChars, jt as WavInspection, k as DICTATION_MAX_TRANSCRIPT_LENGTH, kt as SpeechWord, l as READ_ALOUD_MAX_DIMENSION_WEIGHT, lt as AssessmentScore, m as gradeSpeakingResponse, mt as SectionScore, n as ItemTriesOutcome, nt as ItemScoringCount, o as score, ot as ItemTry, p as SPEECH_ASSESSMENT_MAX_WORDS, pt as ScoredItem, q as CalibrationScope, r as ScoringOptions, rt as ItemScoringPolicy, s as outcomeFromUnscorable, st as ItemTryScore, t as EvaluateOptions, tt as outcomeFromGrade, u as READ_ALOUD_MAX_REFERENCE_LENGTH, ut as AssessmentSectionInput, v as DEFAULT_PASS_THRESHOLD, vt as ReadAloudWordAlignment, w as validateItemScoringPolicy, wt as SpeechPhonemeCandidate, x as ITEM_SCORING_MAX_RETRIES, xt as SpeechAssessment, y as computePassThreshold, yt as ReadAloudWordState, z as GradeRoutingPolicy } from "./index-BudO4ES2.js";
3
+ import { A as RedactedMultipleChoiceData, C as RedactedGapSelectChoice, D as RedactedMatchingData, E as RedactedMarkTheWordsData, F as RedactedWrittenResponseData, M as RedactedMultipleChoiceOptionMedia, N as RedactedReadAloudData, O as RedactedMatchingOption, P as RedactedStimulus, S as RedactedGapSelectBank, T as RedactedGapSelectGap, _ as RedactedActivity, a as JsonSchemaTarget, b as RedactedDictationSlowMedia, c as fillInTheBlanksJsonSchema, d as jsonSchemaFor, f as multipleChoiceJsonSchema, g as validateItemGroup, h as writtenResponseJsonSchema, i as SCRIPT_MAX_TURNS, j as RedactedMultipleChoiceOption, k as RedactedMatchingPrompt, l as gapSelectJsonSchema, m as stimulusJsonSchema, n as validateMedia, o as contentJsonSchema, p as readAloudJsonSchema, r as validateOptionMedia, s as dictationJsonSchema, t as validateActivity, u as itemGroupJsonSchema, v as RedactedBlankConfig, w as RedactedGapSelectData, x as RedactedFillInTheBlanksData, y as RedactedDictationData } from "./index-CFKxHXAY.js";
4
+ import { a as XAPIObjectParams, c as xapiDefinitionFor, d as XAPI_VERB_DISPLAY, i as SubmittedStatementParams, l as XAPIVerb, n as AnsweredStatementParams, o as XAPIStatementParams, r as CompletedStatementParams, s as xAPIBuilder, t as validateXAPIStatement, u as XAPIVerbKey } from "./index-2UQ5v6NZ.js";
5
5
  /**
6
6
  * What a model is told about the group a question sits in: the material the
7
7
  * learner reads and sees beside it.
@@ -1355,7 +1355,7 @@ export declare function critiqueDraft(type: ActivityType, draft: unknown): ItemF
1355
1355
  * The SDK's own registry holds exactly these, in this order, before a host
1356
1356
  * registers anything.
1357
1357
  */
1358
- export declare const BUILT_IN_ACTIVITY_TYPES: readonly ["multiple-choice", "fill-in-the-blanks", "written-response", "gap-select", "dictation", "read-aloud", "speaking-response", "matching"];
1358
+ export declare const BUILT_IN_ACTIVITY_TYPES: readonly ["multiple-choice", "fill-in-the-blanks", "written-response", "gap-select", "dictation", "read-aloud", "speaking-response", "matching", "mark-the-words"];
1359
1359
  /** One of {@link BUILT_IN_ACTIVITY_TYPES}: an activity type the SDK ships, not one a host registered. */
1360
1360
  type BuiltInActivityType = (typeof BUILT_IN_ACTIVITY_TYPES)[number];
1361
1361
  /** Whether `type` names an activity type the SDK ships. */
@@ -1518,6 +1518,82 @@ export declare function flattenSequence<TItem extends {
1518
1518
  id: string;
1519
1519
  type: string;
1520
1520
  }>(entries: readonly SequenceEntry<TItem>[], options?: FlattenSequenceOptions): SequenceSlot<TItem>[];
1521
+ /**
1522
+ * The words of a mark-the-words text, and where an author's targets fall
1523
+ * among them. A leaf module: the schema, the scorer, the draft checks and the
1524
+ * component all read it, and it imports nothing.
1525
+ *
1526
+ * A learner marks words, never characters, and a response records a word by
1527
+ * its position — so how a text is cut into words is part of every stored
1528
+ * answer. The cut is the SDK's own (`lk-words@1`), not `Intl.Segmenter`,
1529
+ * whose word boundaries change with the ICU a runtime ships: the same text
1530
+ * must be the same words in every browser and on every server, now and when
1531
+ * the answer is graded again later.
1532
+ */
1533
+ /** The name of the word cut. A change to it is a major: stored answers name words by position. */
1534
+ export declare const MARK_THE_WORDS_TOKENIZER = "lk-words@1";
1535
+ /** The most words a mark-the-words text may have. */
1536
+ export declare const MARK_THE_WORDS_MAX_WORDS = 1500;
1537
+ /** One markable word of a text. */
1538
+ interface MarkableWord {
1539
+ /** 0-based position among the text's words: what a response records. */
1540
+ index: number;
1541
+ /** The word as written. */
1542
+ text: string;
1543
+ /** Where it starts and ends in the text, in UTF-16 units. */
1544
+ start: number;
1545
+ end: number;
1546
+ }
1547
+ /** Every markable word of `text`, in order, cut by `lk-words@1`. */
1548
+ export declare function markableWords(text: string): MarkableWord[];
1549
+ /** One word, or several in a row, that the learner should mark. */
1550
+ interface MarkTargetQuote {
1551
+ /** The word or words, copied from the text. */
1552
+ text: string;
1553
+ /** Which appearance, 1-based, where they appear more than once. */
1554
+ occurrence?: number;
1555
+ }
1556
+ /** Why a target names no words of the text. */
1557
+ type MarkTargetProblem = 'no-words' | 'not-found' | 'ambiguous' | 'no-such-occurrence';
1558
+ /** Where a target falls: the positions of its words, or why it falls nowhere. */
1559
+ type MarkTargetResolution = {
1560
+ ok: true;
1561
+ indices: number[];
1562
+ } | {
1563
+ ok: false;
1564
+ problem: MarkTargetProblem;
1565
+ found: number;
1566
+ };
1567
+ /**
1568
+ * Where a target falls among `words`. Its text must be whole words of the text,
1569
+ * in order — case, accents and punctuation as written, apart from the kind of
1570
+ * apostrophe — and must say which appearance it means when there are several.
1571
+ */
1572
+ export declare function resolveMarkTarget(words: readonly MarkableWord[], target: {
1573
+ text?: unknown;
1574
+ occurrence?: unknown;
1575
+ }): MarkTargetResolution;
1576
+ /**
1577
+ * The word positions of each target of an item, in target order; a target
1578
+ * that falls nowhere has none. Read defensively: the scorer is reachable with
1579
+ * content an older build stored.
1580
+ */
1581
+ export declare function markTargetIndices(data: {
1582
+ text?: unknown;
1583
+ targets?: unknown;
1584
+ }): number[][];
1585
+ /**
1586
+ * A text and its targets from markup that stars each target, as an H5P "Mark
1587
+ * the Words" text does: `I *went* home and *had gone* to bed.` A `\*` is a
1588
+ * literal star. Each target names its appearance only where its words appear
1589
+ * more than once in the text.
1590
+ *
1591
+ * @throws Error when a star is left open.
1592
+ */
1593
+ export declare function markTheWordsFromMarkup(markup: string): {
1594
+ text: string;
1595
+ targets: MarkTargetQuote[];
1596
+ };
1521
1597
  /**
1522
1598
  * What one budgeted recording has cost the learner so far.
1523
1599
  */
@@ -2505,11 +2581,11 @@ export declare function composeTimelineScore(entryKey: string, items: readonly S
2505
2581
  * plays only when the learner presses play while the video is paused. A
2506
2582
  * dictation must carry its own recording (the timeline rule).
2507
2583
  *
2508
- * `speaking-response` joined in 1.10.0, and `matching` in 1.13.0: a host with
2509
- * an exhaustive `switch` or `Record` over {@link InteractiveVideoItemType}
2510
- * needs one more entry for each.
2584
+ * `speaking-response` joined in 1.10.0, `matching` in 1.13.0 and
2585
+ * `mark-the-words` in 1.14.0: a host with an exhaustive `switch` or `Record`
2586
+ * over {@link InteractiveVideoItemType} needs one more entry for each.
2511
2587
  */
2512
- export declare const INTERACTIVE_VIDEO_ITEM_TYPES: readonly ["multiple-choice", "fill-in-the-blanks", "gap-select", "dictation", "read-aloud", "speaking-response", "matching"];
2588
+ export declare const INTERACTIVE_VIDEO_ITEM_TYPES: readonly ["multiple-choice", "fill-in-the-blanks", "gap-select", "dictation", "read-aloud", "speaking-response", "matching", "mark-the-words"];
2513
2589
  /** One of {@link INTERACTIVE_VIDEO_ITEM_TYPES}. */
2514
2590
  export type InteractiveVideoItemType = (typeof INTERACTIVE_VIDEO_ITEM_TYPES)[number];
2515
2591
  /** Whether `type` is one of the item types an interactive video may present. */
@@ -2633,5 +2709,5 @@ export declare function critiqueVersions(a: VersionPaper, b: VersionPaper, optio
2633
2709
  lengthTolerance?: LengthTolerance;
2634
2710
  allowSharedImages?: boolean;
2635
2711
  }): VersionComparison;
2636
- export { type ActivityAiPermissions, type ActivityData, type ActivityDataMap, type ActivityFeedback, type ActivityMedia, type ActivityResult, type ActivityType, type ActivityTypeAuthoring, type ActivityTypeDescriptor, type ActivityTypeInterop, type ActivityTypeScoring, type AiActivityInput, type AiBlankFact, type AiCoaching, type AiCoachingRequest, type AiCoachingResult, type AiCoachingWord, type AiCriterionJudgement, type AiCritique, type AiCritiqueField, type AiCritiqueFinding, type AiCritiqueFindingResult, type AiCritiqueKind, type AiCritiqueRequest, type AiCritiqueResult, type AiDictationFacts, type AiDraftCaption, type AiDraftProblem, type AiDraftSettings, type AiDraftSource, type AiDraftType, type AiDrafts, type AiDraftsCall, type AiDraftsRequest, type AiDraftsRun, type AiExplanationRequest, type AiFeature, type AiFillInTheBlanksFacts, type AiGapFact, type AiGapSelectFacts, type AiGeneratedDraft, type AiGeneratedVariant, type AiGrade, type AiGradedCriterion, type AiGradingCriterionFact, type AiGradingFacts, type AiGradingJudgement, type AiGradingRequest, type AiGradingRequestProblem, type AiGroupInput, type AiHintRequest, type AiItemFacts, type AiMaterialFacts, type AiMultipleChoiceFacts, type AiOptionFact, type AiProvenance, type AiReadingFacts, type AiReadingWordFact, type AiRefusal, type AiRubricCriterionFact, type AiSoundFact, type AiSpeakingCriterionFact, type AiSpeakingGradingFacts, type AiSpeakingGradingRequest, type AiSpeakingGradingRequestProblem, type AiSpeakingMeasureFact, type AiSupportedActivityType, type AiTextResult, type AiVariantDifficulty, type AiVariantExemplarFacts, type AiVariantImage, type AiVariantLevelFacts, type AiVariantMismatch, type AiVariantMissing, type AiVariantPair, type AiVariantSkip, type AiVariantSkipCode, type AiVariantTargets, type AiVariants, type AiVariantsRequest, type AiVariantsRun, type AiVerdict, type AiVideoDraft, type AiWordFact, type AiWritingCorrection, type AiWritingFacts, type AiWritingFeedback, type AiWritingFeedbackRequest, type AiWritingFeedbackResult, type AnsweredStatementParams, type AssessmentScore, type AssessmentSectionInput, type AttemptPlan, type AttemptPlanDrift, type AttemptPlanSlot, type AttemptState, type Band, type BlankConfig, type BuiltInActivityType, type CalibrationPair, type CalibrationReport, type CalibrationScope, type CalibrationThresholds, type CompletedStatementParams, type CompositionPolicy, type CriterionCalibration, type CriterionScore, DEFAULT_ITEM_SCORING_POLICY, DEFAULT_PASS_THRESHOLD, DICTATION_MAX_ACCEPTED_TRANSCRIPTS, DICTATION_MAX_EQUIVALENCES, DICTATION_MAX_EQUIVALENCE_LENGTH, DICTATION_MAX_TEXT_LENGTH, DICTATION_MAX_TRANSCRIPT_LENGTH, type DeferredReason, type DeferredScoringPartial, type DeliveryPolicy, type DeliveryPolicyIssue, type DictationAlignment, type DictationCharOp, type DictationData, type DictationEquivalence, type DictationLearnerResponse, type DictationReference, type DictationSlowMedia, type DictationTolerance, type DictationWordAlignment, type DraftComplete, type DraftContext, type DraftIssue, type DraftNotComplete, type DraftSeverity, type DraftValidationResult, EvaluateOptions, type FieldPolicy, type FillInTheBlanksData, type FillInTheBlanksLearnerResponse, type GapSelectBank, type GapSelectChoice, type GapSelectData, type GapSelectGap, type GapSelectLearnerResponse, type GradeFromJudgementOptions, GradeFromRubricOptions, type GradeReadAloudOptions, type GradeRecord, type GradeRouting, type GradeRoutingContext, type GradeRoutingPolicy, type GradeRoutingReason, type GradeSpeakingResponseOptions, type Grader, type GraderConfiguration, type GraderKind, type GraderUsage, type GradingState, ITEM_SCORING_MAX_RETRIES, type InlineCorrection, type InteractionEvent, type InteractionKind, type ItemFinding, type ItemFindingSeverity, type ItemGroup, type ItemOutcome, type ItemScoringCount, type ItemScoringPolicy, type ItemScoringPolicyIssue, ItemTriesOutcome, type ItemTriesScore, type ItemTry, type ItemTryScore, type JsonSchemaTarget, type LearnerResponse, type LearnerResponseMap, type LengthTolerance, type MatchingData, type MatchingLearnerResponse, type MatchingOption, type MatchingPrompt, type MediaBudgetRef, type MediaPlayClaim, type MediaPlayGrant, type MediaPlayLedger, type MediaPlayLedgerEntry, type MediaPlaybackPolicy, type MediaProgress, type MediaSlot, type MediaTimeline, type MediaTrack, type MultipleChoiceData, type MultipleChoiceLearnerResponse, type MultipleChoiceOption, type MultipleChoiceOptionMedia, type NativeControlHint, type PartialScoringResult, type PassFailureReason, type PassageLayout, type PassageParagraph, type PassageSection, type PassageSentence, type PlanRouteOptions, type PlannedPair, type PlannedQuestion, type PlannedTrap, type QuoteMatch, type QuotedRange, READ_ALOUD_MAX_DIMENSION_WEIGHT, READ_ALOUD_MAX_REFERENCE_LENGTH, READ_ALOUD_MAX_SECONDS, READ_ALOUD_MAX_TAKES, type ReadAloudData, type ReadAloudDimension, type ReadAloudDimensionWeight, type ReadAloudLearnerResponse, type ReadAloudSlowMedia, type ReadAloudWordAlignment, type ReadAloudWordState, type ReadingRoute, type ReadingRouteItemType, type RecordingBounds, type RecordingRef, type RedactedActivity, type RedactedBlankConfig, type RedactedDictationData, type RedactedDictationSlowMedia, type RedactedFillInTheBlanksData, type RedactedGapSelectBank, type RedactedGapSelectChoice, type RedactedGapSelectData, type RedactedGapSelectGap, type RedactedMatchingData, type RedactedMatchingOption, type RedactedMatchingPrompt, type RedactedMultipleChoiceData, type RedactedMultipleChoiceOption, type RedactedMultipleChoiceOptionMedia, type RedactedReadAloudData, type RedactedStimulus, type RedactedWrittenResponseData, type RegisteredActivityTypeDescriptor, type ResolvedDeliveryPolicy, type ResolvedItemScoringPolicy, type ResponseDiffEntry, type RoundingMode, type RoundingPolicy, type RouteAnswer, type RouteCause, type RouteEvent, type RouteFadingOptions, type RouteIssue, type RouteIssueCode, type RouteKeyword, type RouteLearnerState, type RouteLevel, type RouteLink, type RouteMoveId, type RoutePlan, type RouteQuestion, type RouteQuestionPart, type RouteQuestionSummary, type RouteQuote, type RouteSection, type RouteStep, type RouteStrategy, type RouteStrategyId, type RouteStrategySummary, type RouteSummary, type RouteTrace, type RouteTrap, type RouteTrapKind, SCRIPT_MAX_TURNS, SPEECH_ASSESSMENT_MAX_WORDS, type ScoredItem, type ScoringDetail, ScoringOptions, type ScoringOutcome, type ScoringResult, type ScriptTurn, type SectionScore, type Sensitivity, type SequenceEntry, type SequenceSlot, type SequenceSlotGroup, type SpeakingEvidence, type SpeakingMeasure, type SpeakingResponseData, type SpeakingResponseLearnerResponse, type SpeakingRubric, type SpeakingRubricCriterion, type SpeechAssessment, type SpeechMeasurement, type SpeechPhoneme, type SpeechPhonemeCandidate, type SpeechPlausibilityPolicy, type SpeechSyllable, type SpeechUnscorable, type SpeechUnscorableCode, type SpeechWord, type SpeechWordError, type StandardSchemaV1, type Stimulus, type StimulusKind, type SubmittedStatementParams, type TextMatchPolicy, type TextMatchResult, type TextRange, type ThemeTokens, type TimelineChapter, type TimelineCue, type TotalCalibration, type ValidationError, type ValidationResult, type VersionComparison, type VersionFinding, type VersionPaper, type VersionSlot, type WavInspection, type WavInspectionPolicy, type WrittenResponseData, type WrittenResponseLearnerResponse, type WrittenResponseRubric, type WrittenResponseRubricCriterion, type WrittenResponseRubricLevel, type XAPIActor, type XAPIConfig, type XAPIContext, type XAPIContextActivities, type XAPIError, type XAPIInteractionType, type XAPIObject, type XAPIObjectParams, type XAPIResult, type XAPIScore, type XAPIStatement, type XAPIStatementParams, XAPIVerb, type XAPIVerbKey, type XAPIVerbObject, XAPI_VERB_DISPLAY, alignDictation, alignReadAloud, calibrationReport, classifyBand, composeAssessmentScore, computePassThreshold, contentJsonSchema, dictationJsonSchema, dictationReferenceWords, diffDictationChars, evaluate, evaluateTries, fillInTheBlanksJsonSchema, gapSelectJsonSchema, gradeFromJudgement, gradeFromRubric, gradeReadAloud, gradeSpeakingResponse, graderConfiguration, gte, hasGrade, inAuditSample, inspectWav, itemGroupJsonSchema, jsonSchemaFor, levenshteinDistance, matchText, multipleChoiceJsonSchema, outcomeFromGrade, outcomeFromRoutedGrade, outcomeFromUnscorable, readAloudJsonSchema, resolveItemScoringPolicy, roundGrade, routeGrade, score, scoreTries, stimulusJsonSchema, validateActivity, validateItemGroup, validateItemScoringPolicy, validateMedia, validateOptionMedia, validateSpeechAssessment, validateXAPIStatement, writtenResponseJsonSchema, xAPIBuilder, xapiDefinitionFor };
2712
+ export { type ActivityAiPermissions, type ActivityData, type ActivityDataMap, type ActivityFeedback, type ActivityMedia, type ActivityResult, type ActivityType, type ActivityTypeAuthoring, type ActivityTypeDescriptor, type ActivityTypeInterop, type ActivityTypeScoring, type AiActivityInput, type AiBlankFact, type AiCoaching, type AiCoachingRequest, type AiCoachingResult, type AiCoachingWord, type AiCriterionJudgement, type AiCritique, type AiCritiqueField, type AiCritiqueFinding, type AiCritiqueFindingResult, type AiCritiqueKind, type AiCritiqueRequest, type AiCritiqueResult, type AiDictationFacts, type AiDraftCaption, type AiDraftProblem, type AiDraftSettings, type AiDraftSource, type AiDraftType, type AiDrafts, type AiDraftsCall, type AiDraftsRequest, type AiDraftsRun, type AiExplanationRequest, type AiFeature, type AiFillInTheBlanksFacts, type AiGapFact, type AiGapSelectFacts, type AiGeneratedDraft, type AiGeneratedVariant, type AiGrade, type AiGradedCriterion, type AiGradingCriterionFact, type AiGradingFacts, type AiGradingJudgement, type AiGradingRequest, type AiGradingRequestProblem, type AiGroupInput, type AiHintRequest, type AiItemFacts, type AiMaterialFacts, type AiMultipleChoiceFacts, type AiOptionFact, type AiProvenance, type AiReadingFacts, type AiReadingWordFact, type AiRefusal, type AiRubricCriterionFact, type AiSoundFact, type AiSpeakingCriterionFact, type AiSpeakingGradingFacts, type AiSpeakingGradingRequest, type AiSpeakingGradingRequestProblem, type AiSpeakingMeasureFact, type AiSupportedActivityType, type AiTextResult, type AiVariantDifficulty, type AiVariantExemplarFacts, type AiVariantImage, type AiVariantLevelFacts, type AiVariantMismatch, type AiVariantMissing, type AiVariantPair, type AiVariantSkip, type AiVariantSkipCode, type AiVariantTargets, type AiVariants, type AiVariantsRequest, type AiVariantsRun, type AiVerdict, type AiVideoDraft, type AiWordFact, type AiWritingCorrection, type AiWritingFacts, type AiWritingFeedback, type AiWritingFeedbackRequest, type AiWritingFeedbackResult, type AnsweredStatementParams, type AssessmentScore, type AssessmentSectionInput, type AttemptPlan, type AttemptPlanDrift, type AttemptPlanSlot, type AttemptState, type Band, type BlankConfig, type BuiltInActivityType, type CalibrationPair, type CalibrationReport, type CalibrationScope, type CalibrationThresholds, type CompletedStatementParams, type CompositionPolicy, type CriterionCalibration, type CriterionScore, DEFAULT_ITEM_SCORING_POLICY, DEFAULT_PASS_THRESHOLD, DICTATION_MAX_ACCEPTED_TRANSCRIPTS, DICTATION_MAX_EQUIVALENCES, DICTATION_MAX_EQUIVALENCE_LENGTH, DICTATION_MAX_TEXT_LENGTH, DICTATION_MAX_TRANSCRIPT_LENGTH, type DeferredReason, type DeferredScoringPartial, type DeliveryPolicy, type DeliveryPolicyIssue, type DictationAlignment, type DictationCharOp, type DictationData, type DictationEquivalence, type DictationLearnerResponse, type DictationReference, type DictationSlowMedia, type DictationTolerance, type DictationWordAlignment, type DraftComplete, type DraftContext, type DraftIssue, type DraftNotComplete, type DraftSeverity, type DraftValidationResult, EvaluateOptions, type FieldPolicy, type FillInTheBlanksData, type FillInTheBlanksLearnerResponse, type GapSelectBank, type GapSelectChoice, type GapSelectData, type GapSelectGap, type GapSelectLearnerResponse, type GradeFromJudgementOptions, GradeFromRubricOptions, type GradeReadAloudOptions, type GradeRecord, type GradeRouting, type GradeRoutingContext, type GradeRoutingPolicy, type GradeRoutingReason, type GradeSpeakingResponseOptions, type Grader, type GraderConfiguration, type GraderKind, type GraderUsage, type GradingState, ITEM_SCORING_MAX_RETRIES, type InlineCorrection, type InteractionEvent, type InteractionKind, type ItemFinding, type ItemFindingSeverity, type ItemGroup, type ItemOutcome, type ItemScoringCount, type ItemScoringPolicy, type ItemScoringPolicyIssue, ItemTriesOutcome, type ItemTriesScore, type ItemTry, type ItemTryScore, type JsonSchemaTarget, type LearnerResponse, type LearnerResponseMap, type LengthTolerance, type MarkTargetProblem, type MarkTargetResolution, type MarkTheWordsData, type MarkTheWordsLearnerResponse, type MarkTheWordsTarget, type MarkableWord, type MatchingData, type MatchingLearnerResponse, type MatchingOption, type MatchingPrompt, type MediaBudgetRef, type MediaPlayClaim, type MediaPlayGrant, type MediaPlayLedger, type MediaPlayLedgerEntry, type MediaPlaybackPolicy, type MediaProgress, type MediaSlot, type MediaTimeline, type MediaTrack, type MultipleChoiceData, type MultipleChoiceLearnerResponse, type MultipleChoiceOption, type MultipleChoiceOptionMedia, type NativeControlHint, type PartialScoringResult, type PassFailureReason, type PassageLayout, type PassageParagraph, type PassageSection, type PassageSentence, type PlanRouteOptions, type PlannedPair, type PlannedQuestion, type PlannedTrap, type QuoteMatch, type QuotedRange, READ_ALOUD_MAX_DIMENSION_WEIGHT, READ_ALOUD_MAX_REFERENCE_LENGTH, READ_ALOUD_MAX_SECONDS, READ_ALOUD_MAX_TAKES, type ReadAloudData, type ReadAloudDimension, type ReadAloudDimensionWeight, type ReadAloudLearnerResponse, type ReadAloudSlowMedia, type ReadAloudWordAlignment, type ReadAloudWordState, type ReadingRoute, type ReadingRouteItemType, type RecordingBounds, type RecordingRef, type RedactedActivity, type RedactedBlankConfig, type RedactedDictationData, type RedactedDictationSlowMedia, type RedactedFillInTheBlanksData, type RedactedGapSelectBank, type RedactedGapSelectChoice, type RedactedGapSelectData, type RedactedGapSelectGap, type RedactedMarkTheWordsData, type RedactedMatchingData, type RedactedMatchingOption, type RedactedMatchingPrompt, type RedactedMultipleChoiceData, type RedactedMultipleChoiceOption, type RedactedMultipleChoiceOptionMedia, type RedactedReadAloudData, type RedactedStimulus, type RedactedWrittenResponseData, type RegisteredActivityTypeDescriptor, type ResolvedDeliveryPolicy, type ResolvedItemScoringPolicy, type ResponseDiffEntry, type RoundingMode, type RoundingPolicy, type RouteAnswer, type RouteCause, type RouteEvent, type RouteFadingOptions, type RouteIssue, type RouteIssueCode, type RouteKeyword, type RouteLearnerState, type RouteLevel, type RouteLink, type RouteMoveId, type RoutePlan, type RouteQuestion, type RouteQuestionPart, type RouteQuestionSummary, type RouteQuote, type RouteSection, type RouteStep, type RouteStrategy, type RouteStrategyId, type RouteStrategySummary, type RouteSummary, type RouteTrace, type RouteTrap, type RouteTrapKind, SCRIPT_MAX_TURNS, SPEECH_ASSESSMENT_MAX_WORDS, type ScoredItem, type ScoringDetail, ScoringOptions, type ScoringOutcome, type ScoringResult, type ScriptTurn, type SectionScore, type Sensitivity, type SequenceEntry, type SequenceSlot, type SequenceSlotGroup, type SpeakingEvidence, type SpeakingMeasure, type SpeakingResponseData, type SpeakingResponseLearnerResponse, type SpeakingRubric, type SpeakingRubricCriterion, type SpeechAssessment, type SpeechMeasurement, type SpeechPhoneme, type SpeechPhonemeCandidate, type SpeechPlausibilityPolicy, type SpeechSyllable, type SpeechUnscorable, type SpeechUnscorableCode, type SpeechWord, type SpeechWordError, type StandardSchemaV1, type Stimulus, type StimulusKind, type SubmittedStatementParams, type TextMatchPolicy, type TextMatchResult, type TextRange, type ThemeTokens, type TimelineChapter, type TimelineCue, type TotalCalibration, type ValidationError, type ValidationResult, type VersionComparison, type VersionFinding, type VersionPaper, type VersionSlot, type WavInspection, type WavInspectionPolicy, type WrittenResponseData, type WrittenResponseLearnerResponse, type WrittenResponseRubric, type WrittenResponseRubricCriterion, type WrittenResponseRubricLevel, type XAPIActor, type XAPIConfig, type XAPIContext, type XAPIContextActivities, type XAPIError, type XAPIInteractionType, type XAPIObject, type XAPIObjectParams, type XAPIResult, type XAPIScore, type XAPIStatement, type XAPIStatementParams, XAPIVerb, type XAPIVerbKey, type XAPIVerbObject, XAPI_VERB_DISPLAY, alignDictation, alignReadAloud, calibrationReport, classifyBand, composeAssessmentScore, computePassThreshold, contentJsonSchema, dictationJsonSchema, dictationReferenceWords, diffDictationChars, evaluate, evaluateTries, fillInTheBlanksJsonSchema, gapSelectJsonSchema, gradeFromJudgement, gradeFromRubric, gradeReadAloud, gradeSpeakingResponse, graderConfiguration, gte, hasGrade, inAuditSample, inspectWav, itemGroupJsonSchema, jsonSchemaFor, levenshteinDistance, matchText, multipleChoiceJsonSchema, outcomeFromGrade, outcomeFromRoutedGrade, outcomeFromUnscorable, readAloudJsonSchema, resolveItemScoringPolicy, roundGrade, routeGrade, score, scoreTries, stimulusJsonSchema, validateActivity, validateItemGroup, validateItemScoringPolicy, validateMedia, validateOptionMedia, validateSpeechAssessment, validateXAPIStatement, writtenResponseJsonSchema, xAPIBuilder, xapiDefinitionFor };
2637
2713
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":["_$__registry_js0.ActivityTypeDescriptor"],"sources":["../src/ai-material.ts","../src/ai.ts","../src/ai-coaching.ts","../src/ai-critique.ts","../src/ai-drafts.ts","../src/ai-grading.ts","../src/variant-rules.ts","../src/ai-variants.ts","../src/ai-written.ts","../src/ai-writing.ts","../src/types/delivery.ts","../src/types/attempt-plan.ts","../src/attempt-plan.ts","../src/types/attempt-state.ts","../src/attempt-state.ts","../src/authoring/item-group.ts","../src/authoring/index.ts","../src/built-in-types.ts","../src/content-hash.ts","../src/count-words.ts","../src/delivery.ts","../src/errors.ts","../src/item-group.ts","../src/types/media-budget.ts","../src/media-budget.ts","../src/media-refs.ts","../src/reading-route/check.ts","../src/reading-route/layout.ts","../src/reading-route/plan.ts","../src/reading-route/progress.ts","../src/reading-route/questions.ts","../src/reading-route/quotes.ts","../src/reading-route/strategies.ts","../src/reading-route/text.ts","../src/standard-schema.ts","../src/registry/define.ts","../src/registry/registry.ts","../src/redact.ts","../src/registry/builtins.ts","../src/shuffle.ts","../src/timeline.ts","../src/timeline-limits.ts","../src/types/theme.ts","../src/versions.ts"],"mappings":";;;;;;;;;;;;;;;;qBAiBa;;;;;;qBCoBA,+BAA+B;qBAM/B,wBAAwB;;qBAOxB;;;;;;wBASG,WAAW,sBAAsB,SAAS;;;;;;;;;wBAmB1C,mBAAmB,MAAM,iBAAiB,SAAS;;wBAUnD,UAAU;EAAU;EAAe;EAAkB;IAAoB;;;;;;;;;;wBAoFzE,aACd,MAAM,iBACN,UAAU,wBACV,kBAAkB,yBACjB;;;;;;;;;;;;;;;;;wBAyKa,qBAAqB;EACnC,MAAM;EACN,UAAU;EACV,UAAU;EACV,QAAQ;EACR;IACE;;;;;;;;;;;;;;wBAoDY,cAAc;EAC5B,MAAM;EACN,UAAU;EACV;EACA,QAAQ;EACR;IACE;;;;;;wBAmCY,iBACd;EACG;EAAU,QAAQ;;EAAmB;EAAW,SAAS;;;;;;;;wBAqC9C,mBACd,cACA,SAAS;EACN;EAAU,QAAQ;;EAAmB;EAAW,SAAS;;;;;;;wBAgB9C,YACd,cACA,SAAS;EACN;EAAU,QAAQ;;EAAmB;EAAW,SAAS;;;;;;;;;;;;;;;;;wBA4B9C,kBAAkB,OAAO,aAAa;;qBCngBzC;;qBAGA;;;;;;;;;;;;;;;;;wBA4JG,kBAAkB;EAChC,MAAM;EACN,aAAa;EACb,QAAQ;EACR;IACE;;;;;;;;;;;;;;;;;;;;;;;;wBAmFY,gBACd,cACA,SAAS;EACN;EAAU,UAAU;;EAAiB;EAAW,SAAS;;;qBC7PjD;;qBAGA;;;;;;;;;;;;;;;;wBAqFG,kBAAkB;EAChC,MAAM;EACN;EACA;EACA;IACE;;;;;;;;;;;;;;;;;;wBAmDY,gBACd,cACA,SAAS;EACN;EAAU,UAAU;;EAAiB;EAAW,SAAS;;;qBCxIjD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;;;qBAsDb,eAAaA,uBAAA,eAAA;;;;;;;qBA4Gb,eAAaA,uBAAA,eAAA;;;;;;;;;;;;;;;wBC5lBV,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAwCb;;iBAGK;;;;;;;EAOf,UAAU;;;;;;;;;;;wBA0BI,cAAc,GAC5B,gBAAgB,KAChB,cACA,SAAS;EAAyB,SAAS;IAC1C;;;;;;wBAMa,cAAc,GAC5B,gBAAgB,KAChB,cACA,UAAU,uBACT;;;;;;;;;;;;wBCrFa,kBAAkB,gBAAgB,oBAAoB;;;;;;;;;;;;;;;;;wBA8CtD,qBACd,kBACA,gBAAgB,cAChB,QAAQ,oBACP;;;;;;;;;;;;;;;;;;;;;;;qBC/CU;;YAWD,mCAAmC;;wBAG/B,2BAA2B,gBAAgB,QAAQ;;qBAKtD;;;;;;qBAOA;;qBAGA;;qBAGA;;;;;;UClDI;EAEf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;;;;EAOA;;;;;;;;;;EAUA;EACA;EACA;EACA;;;;;;;;EAQA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EAGA;EACA;;;;;;;qBCjDW;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAsLG,iBACd,GAAG,cACH,GAAG,cACH;EACE;IAAmB;IAAsB;;EACzC,kBAAkB;EAClB;IAED"}
1
+ {"version":3,"file":"index.d.ts","names":["_$__registry_js0.ActivityTypeDescriptor"],"sources":["../src/ai-material.ts","../src/ai.ts","../src/ai-coaching.ts","../src/ai-critique.ts","../src/ai-drafts.ts","../src/ai-grading.ts","../src/variant-rules.ts","../src/ai-variants.ts","../src/ai-written.ts","../src/ai-writing.ts","../src/types/delivery.ts","../src/types/attempt-plan.ts","../src/attempt-plan.ts","../src/types/attempt-state.ts","../src/attempt-state.ts","../src/authoring/item-group.ts","../src/authoring/index.ts","../src/built-in-types.ts","../src/content-hash.ts","../src/count-words.ts","../src/delivery.ts","../src/errors.ts","../src/item-group.ts","../src/mark-the-words.ts","../src/types/media-budget.ts","../src/media-budget.ts","../src/media-refs.ts","../src/reading-route/check.ts","../src/reading-route/layout.ts","../src/reading-route/plan.ts","../src/reading-route/progress.ts","../src/reading-route/questions.ts","../src/reading-route/quotes.ts","../src/reading-route/strategies.ts","../src/reading-route/text.ts","../src/standard-schema.ts","../src/registry/define.ts","../src/registry/registry.ts","../src/redact.ts","../src/registry/builtins.ts","../src/shuffle.ts","../src/timeline.ts","../src/timeline-limits.ts","../src/types/theme.ts","../src/versions.ts"],"mappings":";;;;;;;;;;;;;;;;qBAiBa;;;;;;qBCoBA,+BAA+B;qBAM/B,wBAAwB;;qBAOxB;;;;;;wBASG,WAAW,sBAAsB,SAAS;;;;;;;;;wBAmB1C,mBAAmB,MAAM,iBAAiB,SAAS;;wBAUnD,UAAU;EAAU;EAAe;EAAkB;IAAoB;;;;;;;;;;wBAoFzE,aACd,MAAM,iBACN,UAAU,wBACV,kBAAkB,yBACjB;;;;;;;;;;;;;;;;;wBAyKa,qBAAqB;EACnC,MAAM;EACN,UAAU;EACV,UAAU;EACV,QAAQ;EACR;IACE;;;;;;;;;;;;;;wBAoDY,cAAc;EAC5B,MAAM;EACN,UAAU;EACV;EACA,QAAQ;EACR;IACE;;;;;;wBAmCY,iBACd;EACG;EAAU,QAAQ;;EAAmB;EAAW,SAAS;;;;;;;;wBAqC9C,mBACd,cACA,SAAS;EACN;EAAU,QAAQ;;EAAmB;EAAW,SAAS;;;;;;;wBAgB9C,YACd,cACA,SAAS;EACN;EAAU,QAAQ;;EAAmB;EAAW,SAAS;;;;;;;;;;;;;;;;;wBA4B9C,kBAAkB,OAAO,aAAa;;qBCngBzC;;qBAGA;;;;;;;;;;;;;;;;;wBA4JG,kBAAkB;EAChC,MAAM;EACN,aAAa;EACb,QAAQ;EACR;IACE;;;;;;;;;;;;;;;;;;;;;;;;wBAmFY,gBAC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ACA;EAGA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EAGA;EACA;;;;;;;qBCjDW;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAsLG,iBACd,GAAG,cACH,GAAG,cACH;EACE;IAAmB;IAAsB;;EACzC,kBAAkB;EAClB;IAED"}
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { $ as checkAiCoaching, A as validateDraft, B as lengthMisses, C as interactiveVideoFromDrafts, D as checkAiCritique, E as aiCritiqueRequest, F as critiqueItemGroupDraft, G as textSimilarity, H as sharedAnswers, I as validateItemGroupDraft, J as mapMediaRefs, K as textsOf, L as AI_VARIANT_LENGTH_BANDS, M as createItemGroupDraft, N as createReadingRouteDraft, O as createDraft, P as critiqueDrafts, Q as aiCoachingRequest, R as AI_VARIANT_NEAR_COPY_THRESHOLD, S as generateDrafts, T as AI_CRITIQUE_MAX_FINDINGS, U as shownScore, V as optionSet, W as structureMisses, X as AI_COACHING_MAX_TIP_LENGTH, Y as transcriptOf, Z as AI_COACHING_MAX_WORDS, _ as AI_DRAFTS_MAX_COUNT, a as AI_VARIANTS_MAX_REPAIRS, at as aiGradeOf, b as aiDraftsRequest, c as aiVariantsRequest, ct as buildAiFacts, d as AI_GRADING_PROBABILITY_TOLERANCE, dt as hintRevealsAnswer, et as AI_EXPLANATION_TYPES, f as aiGradingRequest, ft as readAiTextResult, g as AI_WRITING_MAX_FIELD_LENGTH, h as AI_WRITING_MAX_CORRECTIONS, i as AI_VARIANTS_MAX_MATERIAL_LENGTH, it as aiExplanationRequest, j as createInteractiveVideoDraft, k as critiqueDraft, l as checkAiVariants, lt as checkAiExplanation, m as checkAiGrading, n as checkAiWritingFeedback, nt as AI_TEXT_MAX_LENGTH, o as AI_VARIANT_CODE_SEVERITY, ot as aiHintRequest, p as aiSpeakingGradingRequest, pt as AI_MATERIAL_MAX_LENGTH, q as listMediaRefs, r as AI_VARIANTS_MAX_EXEMPLARS, rt as aiAllowedByContent, s as aiVariantsRepairRequest, st as aiSupports, t as aiWritingFeedbackRequest, tt as AI_HINT_TYPES, u as generateVariants, ut as checkAiHint, v as AI_DRAFTS_MAX_REPAIRS, w as AI_CRITIQUE_MAX_FIELD_LENGTH, x as checkAiDrafts, y as aiDraftsRepairRequest, z as keysOf } from "./ai-writing-Dsmvv4T-.js";
2
- import { At as SCRIPT_MAX_TURNS, B as countWords, C as READ_ALOUD_MAX_REFERENCE_LENGTH, D as SPEECH_ASSESSMENT_MAX_WORDS, F as matchText, P as levenshteinDistance, S as READ_ALOUD_MAX_DIMENSION_WEIGHT, T as READ_ALOUD_MAX_TAKES, _t as BUILT_IN_ACTIVITY_TYPES, a as readSchema, c as dictationType, ct as dictationReferenceWords, d as multipleChoiceType, dt as DICTATION_MAX_EQUIVALENCE_LENGTH, f as readAloudType, ft as DICTATION_MAX_TEXT_LENGTH, h as defineActivityType, it as UnknownActivityTypeError, l as fillInTheBlanksType, lt as DICTATION_MAX_ACCEPTED_TRANSCRIPTS, m as guardOf, n as registerActivityType, nt as DeferredScoringError, ot as alignDictation, p as writtenResponseType, pt as DICTATION_MAX_TRANSCRIPT_LENGTH, r as registeredActivityTypes, rt as RedactedScoringError, s as MEDIA_FIELD_POLICY, t as getActivityTypeDescriptor, tt as ActivitySchemaError, u as gapSelectType, ut as DICTATION_MAX_EQUIVALENCES, w as READ_ALOUD_MAX_SECONDS, yt as isBuiltInActivityType } from "./registry-Cn2it-y7.js";
3
- import { A as roundGrade, C as canonicalJson, D as computePassThreshold, E as DEFAULT_PASS_THRESHOLD, F as validateItemScoringPolicy, M as ITEM_SCORING_MAX_RETRIES, N as resolveItemScoringPolicy, O as classifyBand, P as scoreTries, S as graderConfiguration, T as fingerprint, _ as gradeFromJudgement, a as inspectWav, b as outcomeFromGrade, c as alignReadAloud, d as composeAssessmentScore, f as inAuditSample, g as seededShuffle, h as hashSeed, i as outcomeFromUnscorable, j as DEFAULT_ITEM_SCORING_POLICY, k as gte, l as validateSpeechAssessment, m as routeGrade, n as evaluateTries, o as gradeSpeakingResponse, p as outcomeFromRoutedGrade, r as score, s as gradeReadAloud, t as evaluate, u as diffDictationChars, v as gradeFromRubric, w as contentHash, x as calibrationReport, y as hasGrade } from "./scoring-weQ4SzwB.js";
4
- import { C as itemQuestions, D as overlaps, E as countParagraphs, O as passageLayout, S as choicesOf, T as ROUTE_SEGMENTER, _ as ROUTE_WORD_LIMIT_MAX, a as INTERACTIVE_VIDEO_ITEM_TYPES, b as findQuote, c as TIMELINE_MAX_QUIZZES, d as readingQuizzes, f as routeIssues, g as ROUTE_STRATEGY_IDS, h as ROUTE_STRATEGIES, i as validateItemGroup, k as sentencesTouching, l as TIMELINE_MAX_TITLE_LENGTH, m as ROUTE_NOTE_MAX_LENGTH, n as RedactedItemGroupSchema, o as TIMELINE_MAX_CHAPTERS, p as READING_ROUTE_ITEM_TYPES, s as TIMELINE_MAX_ITEMS, u as isInteractiveVideoItemType, v as isReadingRouteItemType, w as questionKey, x as quoteText, y as isRouteStrategyId } from "./item-group-vTcNy2JF.js";
5
- import { a as dictationJsonSchema, c as itemGroupJsonSchema, d as readAloudJsonSchema, f as stimulusJsonSchema, i as contentJsonSchema, l as jsonSchemaFor, n as validateMedia, o as fillInTheBlanksJsonSchema, p as writtenResponseJsonSchema, r as validateOptionMedia, s as gapSelectJsonSchema, t as validateActivity, u as multipleChoiceJsonSchema } from "./schemas-DlxeS7Lu.js";
6
- import { a as validateXAPIStatement, i as XAPI_VERB_DISPLAY, n as xapiDefinitionFor, r as XAPIVerb, t as xAPIBuilder } from "./xapi-DbRVH_RB.js";
1
+ import { $ as checkAiCoaching, A as validateDraft, B as lengthMisses, C as interactiveVideoFromDrafts, D as checkAiCritique, E as aiCritiqueRequest, F as critiqueItemGroupDraft, G as textSimilarity, H as sharedAnswers, I as validateItemGroupDraft, J as mapMediaRefs, K as textsOf, L as AI_VARIANT_LENGTH_BANDS, M as createItemGroupDraft, N as createReadingRouteDraft, O as createDraft, P as critiqueDrafts, Q as aiCoachingRequest, R as AI_VARIANT_NEAR_COPY_THRESHOLD, S as generateDrafts, T as AI_CRITIQUE_MAX_FINDINGS, U as shownScore, V as optionSet, W as structureMisses, X as AI_COACHING_MAX_TIP_LENGTH, Y as transcriptOf, Z as AI_COACHING_MAX_WORDS, _ as AI_DRAFTS_MAX_COUNT, a as AI_VARIANTS_MAX_REPAIRS, at as aiGradeOf, b as aiDraftsRequest, c as aiVariantsRequest, ct as buildAiFacts, d as AI_GRADING_PROBABILITY_TOLERANCE, dt as hintRevealsAnswer, et as AI_EXPLANATION_TYPES, f as aiGradingRequest, ft as readAiTextResult, g as AI_WRITING_MAX_FIELD_LENGTH, h as AI_WRITING_MAX_CORRECTIONS, i as AI_VARIANTS_MAX_MATERIAL_LENGTH, it as aiExplanationRequest, j as createInteractiveVideoDraft, k as critiqueDraft, l as checkAiVariants, lt as checkAiExplanation, m as checkAiGrading, n as checkAiWritingFeedback, nt as AI_TEXT_MAX_LENGTH, o as AI_VARIANT_CODE_SEVERITY, ot as aiHintRequest, p as aiSpeakingGradingRequest, pt as AI_MATERIAL_MAX_LENGTH, q as listMediaRefs, r as AI_VARIANTS_MAX_EXEMPLARS, rt as aiAllowedByContent, s as aiVariantsRepairRequest, st as aiSupports, t as aiWritingFeedbackRequest, tt as AI_HINT_TYPES, u as generateVariants, ut as checkAiHint, v as AI_DRAFTS_MAX_REPAIRS, w as AI_CRITIQUE_MAX_FIELD_LENGTH, x as checkAiDrafts, y as aiDraftsRepairRequest, z as keysOf } from "./ai-writing-D3oREPsp.js";
2
+ import { A as MARK_THE_WORDS_MAX_WORDS, B as levenshteinDistance, C as READ_ALOUD_MAX_REFERENCE_LENGTH, Ct as BUILT_IN_ACTIVITY_TYPES, D as SPEECH_ASSESSMENT_MAX_WORDS, F as resolveMarkTarget, It as SCRIPT_MAX_TURNS, K as countWords, M as markTargetIndices, N as markTheWordsFromMarkup, P as markableWords, S as READ_ALOUD_MAX_DIMENSION_WEIGHT, T as READ_ALOUD_MAX_TAKES, Tt as isBuiltInActivityType, V as matchText, _t as DICTATION_MAX_EQUIVALENCE_LENGTH, a as readSchema, c as dictationType, ct as DeferredScoringError, d as multipleChoiceType, f as readAloudType, ft as alignDictation, gt as DICTATION_MAX_EQUIVALENCES, h as defineActivityType, ht as DICTATION_MAX_ACCEPTED_TRANSCRIPTS, j as MARK_THE_WORDS_TOKENIZER, l as fillInTheBlanksType, lt as RedactedScoringError, m as guardOf, mt as dictationReferenceWords, n as registerActivityType, p as writtenResponseType, r as registeredActivityTypes, s as MEDIA_FIELD_POLICY, st as ActivitySchemaError, t as getActivityTypeDescriptor, u as gapSelectType, ut as UnknownActivityTypeError, vt as DICTATION_MAX_TEXT_LENGTH, w as READ_ALOUD_MAX_SECONDS, yt as DICTATION_MAX_TRANSCRIPT_LENGTH } from "./registry-CroAI5nc.js";
3
+ import { A as roundGrade, C as canonicalJson, D as computePassThreshold, E as DEFAULT_PASS_THRESHOLD, F as validateItemScoringPolicy, M as ITEM_SCORING_MAX_RETRIES, N as resolveItemScoringPolicy, O as classifyBand, P as scoreTries, S as graderConfiguration, T as fingerprint, _ as gradeFromJudgement, a as inspectWav, b as outcomeFromGrade, c as alignReadAloud, d as composeAssessmentScore, f as inAuditSample, g as seededShuffle, h as hashSeed, i as outcomeFromUnscorable, j as DEFAULT_ITEM_SCORING_POLICY, k as gte, l as validateSpeechAssessment, m as routeGrade, n as evaluateTries, o as gradeSpeakingResponse, p as outcomeFromRoutedGrade, r as score, s as gradeReadAloud, t as evaluate, u as diffDictationChars, v as gradeFromRubric, w as contentHash, x as calibrationReport, y as hasGrade } from "./scoring-BxvOhHE0.js";
4
+ import { C as itemQuestions, D as overlaps, E as countParagraphs, O as passageLayout, S as choicesOf, T as ROUTE_SEGMENTER, _ as ROUTE_WORD_LIMIT_MAX, a as INTERACTIVE_VIDEO_ITEM_TYPES, b as findQuote, c as TIMELINE_MAX_QUIZZES, d as readingQuizzes, f as routeIssues, g as ROUTE_STRATEGY_IDS, h as ROUTE_STRATEGIES, i as validateItemGroup, k as sentencesTouching, l as TIMELINE_MAX_TITLE_LENGTH, m as ROUTE_NOTE_MAX_LENGTH, n as RedactedItemGroupSchema, o as TIMELINE_MAX_CHAPTERS, p as READING_ROUTE_ITEM_TYPES, s as TIMELINE_MAX_ITEMS, u as isInteractiveVideoItemType, v as isReadingRouteItemType, w as questionKey, x as quoteText, y as isRouteStrategyId } from "./item-group-BIl1ZJHg.js";
5
+ import { a as dictationJsonSchema, c as itemGroupJsonSchema, d as readAloudJsonSchema, f as stimulusJsonSchema, i as contentJsonSchema, l as jsonSchemaFor, n as validateMedia, o as fillInTheBlanksJsonSchema, p as writtenResponseJsonSchema, r as validateOptionMedia, s as gapSelectJsonSchema, t as validateActivity, u as multipleChoiceJsonSchema } from "./schemas-COw7muXH.js";
6
+ import { a as validateXAPIStatement, i as XAPI_VERB_DISPLAY, n as xapiDefinitionFor, r as XAPIVerb, t as xAPIBuilder } from "./xapi-DHHm7Os9.js";
7
7
  // src/delivery.ts
8
8
  /**
9
9
  * The policy that restricts nothing: every setting `true`. It is what an absent
@@ -2086,6 +2086,6 @@ function critiqueVersions(a, b, options = {}) {
2086
2086
  }
2087
2087
  };
2088
2088
  }
2089
- export { AI_COACHING_MAX_TIP_LENGTH, AI_COACHING_MAX_WORDS, AI_CRITIQUE_MAX_FIELD_LENGTH, AI_CRITIQUE_MAX_FINDINGS, AI_DRAFTS_MAX_COUNT, AI_DRAFTS_MAX_REPAIRS, AI_EXPLANATION_TYPES, AI_GRADING_PROBABILITY_TOLERANCE, AI_HINT_TYPES, AI_MATERIAL_MAX_LENGTH, AI_TEXT_MAX_LENGTH, AI_VARIANTS_MAX_EXEMPLARS, AI_VARIANTS_MAX_MATERIAL_LENGTH, AI_VARIANTS_MAX_REPAIRS, AI_VARIANT_CODE_SEVERITY, AI_VARIANT_LENGTH_BANDS, AI_VARIANT_NEAR_COPY_THRESHOLD, AI_WRITING_MAX_CORRECTIONS, AI_WRITING_MAX_FIELD_LENGTH, ActivitySchemaError, BUILT_IN_ACTIVITY_TYPES, DEFAULT_ITEM_SCORING_POLICY, DEFAULT_PASS_THRESHOLD, DICTATION_MAX_ACCEPTED_TRANSCRIPTS, DICTATION_MAX_EQUIVALENCES, DICTATION_MAX_EQUIVALENCE_LENGTH, DICTATION_MAX_TEXT_LENGTH, DICTATION_MAX_TRANSCRIPT_LENGTH, DeferredScoringError, INTERACTIVE_VIDEO_ITEM_TYPES, ITEM_SCORING_MAX_RETRIES, OPEN_DELIVERY_POLICY, READING_ROUTE_ITEM_TYPES, READ_ALOUD_MAX_DIMENSION_WEIGHT, READ_ALOUD_MAX_REFERENCE_LENGTH, READ_ALOUD_MAX_SECONDS, READ_ALOUD_MAX_TAKES, ROUTE_NOTE_MAX_LENGTH, ROUTE_SEGMENTER, ROUTE_STRATEGIES, ROUTE_STRATEGY_IDS, ROUTE_WORD_LIMIT_MAX, RedactedScoringError, SCRIPT_MAX_TURNS, SPEECH_ASSESSMENT_MAX_WORDS, TIMELINE_MAX_CHAPTERS, TIMELINE_MAX_ITEMS, TIMELINE_MAX_QUIZZES, TIMELINE_MAX_TITLE_LENGTH, UnknownActivityTypeError, VERSION_FINDING_SEVERITY, XAPIVerb, XAPI_VERB_DISPLAY, aiAllowedByContent, aiCoachingRequest, aiCritiqueRequest, aiDraftsRepairRequest, aiDraftsRequest, aiExplanationRequest, aiGradeOf, aiGradingRequest, aiHintRequest, aiSpeakingGradingRequest, aiSupports, aiVariantsRepairRequest, aiVariantsRequest, aiWritingFeedbackRequest, alignDictation, alignReadAloud, assertRedacted, assertRedactedItemGroup, buildAiFacts, calibrationReport, canonicalJson, checkAiCoaching, checkAiCritique, checkAiDrafts, checkAiExplanation, checkAiGrading, checkAiHint, checkAiVariants, checkAiWritingFeedback, classifyBand, combineDeliveryPolicies, composeAssessmentScore, composeTimelineScore, computePassThreshold, contentHash, contentJsonSchema, countParagraphs, countWords, createDraft, createInteractiveVideoDraft, createItemGroupDraft, createReadingRouteDraft, critiqueDraft, critiqueDrafts, critiqueItemGroupDraft, critiqueVersions, defineActivityType, dictationJsonSchema, dictationReferenceWords, dictationType, diffDictationChars, diffResponses, entryKeyOf, evaluate, evaluateTries, fillInTheBlanksJsonSchema, fillInTheBlanksType, findQuote, fingerprint, flattenSequence, gapSelectJsonSchema, gapSelectType, generateDrafts, generateVariants, getActivityTypeDescriptor, gradeFromJudgement, gradeFromRubric, gradeReadAloud, gradeSpeakingResponse, graderConfiguration, gte, hasGrade, hashSeed, hintRevealsAnswer, inAuditSample, inspectWav, interactiveVideoFromDrafts, isBuiltInActivityType, isInteractiveVideoItemType, isItemGroup, isReadingRouteItemType, isRouteStrategyId, itemGroupJsonSchema, jsonSchemaFor, levenshteinDistance, listMediaRefs, mapMediaRefs, markedSentences, marksFindEvidence, matchText, multipleChoiceJsonSchema, multipleChoiceType, nextRouteLearnerState, outcomeFromGrade, outcomeFromRoutedGrade, outcomeFromUnscorable, overlaps, passageLayout, planAttempt, planMediaBudgets, planRoute, questionKey, quoteText, readAiTextResult, readAloudJsonSchema, readAloudType, readMediaProgress, readRouteLearnerState, readRouteTrace, readingQuizzes, redact, redactItemGroup, registerActivityType, registeredActivityTypes, resolveDeliveryPolicy, resolveItemScoringPolicy, resolvePlaybackPolicy, restoreAttemptState, restoreMediaPlayLedger, roundGrade, routeAnswers, routeGrade, routeIssues, routeLevels, routePassageFingerprint, routeStepText, routeTrapText, score, scoreTries, scoredItemsFromPlan, seededShuffle, sentencesTouching, serializeAttemptState, serializeMediaPlayLedger, slotMediaKey, stimulusJsonSchema, stimulusMediaKey, summarizeRoute, transcriptOf, validateActivity, validateDeliveryPolicy, validateDraft, validateItemGroup, validateItemGroupDraft, validateItemScoringPolicy, validateMedia, validateOptionMedia, validateSpeechAssessment, validateXAPIStatement, verifyAttemptPlan, withoutAuthorOnly, writtenResponseJsonSchema, writtenResponseType, xAPIBuilder, xapiDefinitionFor };
2089
+ export { AI_COACHING_MAX_TIP_LENGTH, AI_COACHING_MAX_WORDS, AI_CRITIQUE_MAX_FIELD_LENGTH, AI_CRITIQUE_MAX_FINDINGS, AI_DRAFTS_MAX_COUNT, AI_DRAFTS_MAX_REPAIRS, AI_EXPLANATION_TYPES, AI_GRADING_PROBABILITY_TOLERANCE, AI_HINT_TYPES, AI_MATERIAL_MAX_LENGTH, AI_TEXT_MAX_LENGTH, AI_VARIANTS_MAX_EXEMPLARS, AI_VARIANTS_MAX_MATERIAL_LENGTH, AI_VARIANTS_MAX_REPAIRS, AI_VARIANT_CODE_SEVERITY, AI_VARIANT_LENGTH_BANDS, AI_VARIANT_NEAR_COPY_THRESHOLD, AI_WRITING_MAX_CORRECTIONS, AI_WRITING_MAX_FIELD_LENGTH, ActivitySchemaError, BUILT_IN_ACTIVITY_TYPES, DEFAULT_ITEM_SCORING_POLICY, DEFAULT_PASS_THRESHOLD, DICTATION_MAX_ACCEPTED_TRANSCRIPTS, DICTATION_MAX_EQUIVALENCES, DICTATION_MAX_EQUIVALENCE_LENGTH, DICTATION_MAX_TEXT_LENGTH, DICTATION_MAX_TRANSCRIPT_LENGTH, DeferredScoringError, INTERACTIVE_VIDEO_ITEM_TYPES, ITEM_SCORING_MAX_RETRIES, MARK_THE_WORDS_MAX_WORDS, MARK_THE_WORDS_TOKENIZER, OPEN_DELIVERY_POLICY, READING_ROUTE_ITEM_TYPES, READ_ALOUD_MAX_DIMENSION_WEIGHT, READ_ALOUD_MAX_REFERENCE_LENGTH, READ_ALOUD_MAX_SECONDS, READ_ALOUD_MAX_TAKES, ROUTE_NOTE_MAX_LENGTH, ROUTE_SEGMENTER, ROUTE_STRATEGIES, ROUTE_STRATEGY_IDS, ROUTE_WORD_LIMIT_MAX, RedactedScoringError, SCRIPT_MAX_TURNS, SPEECH_ASSESSMENT_MAX_WORDS, TIMELINE_MAX_CHAPTERS, TIMELINE_MAX_ITEMS, TIMELINE_MAX_QUIZZES, TIMELINE_MAX_TITLE_LENGTH, UnknownActivityTypeError, VERSION_FINDING_SEVERITY, XAPIVerb, XAPI_VERB_DISPLAY, aiAllowedByContent, aiCoachingRequest, aiCritiqueRequest, aiDraftsRepairRequest, aiDraftsRequest, aiExplanationRequest, aiGradeOf, aiGradingRequest, aiHintRequest, aiSpeakingGradingRequest, aiSupports, aiVariantsRepairRequest, aiVariantsRequest, aiWritingFeedbackRequest, alignDictation, alignReadAloud, assertRedacted, assertRedactedItemGroup, buildAiFacts, calibrationReport, canonicalJson, checkAiCoaching, checkAiCritique, checkAiDrafts, checkAiExplanation, checkAiGrading, checkAiHint, checkAiVariants, checkAiWritingFeedback, classifyBand, combineDeliveryPolicies, composeAssessmentScore, composeTimelineScore, computePassThreshold, contentHash, contentJsonSchema, countParagraphs, countWords, createDraft, createInteractiveVideoDraft, createItemGroupDraft, createReadingRouteDraft, critiqueDraft, critiqueDrafts, critiqueItemGroupDraft, critiqueVersions, defineActivityType, dictationJsonSchema, dictationReferenceWords, dictationType, diffDictationChars, diffResponses, entryKeyOf, evaluate, evaluateTries, fillInTheBlanksJsonSchema, fillInTheBlanksType, findQuote, fingerprint, flattenSequence, gapSelectJsonSchema, gapSelectType, generateDrafts, generateVariants, getActivityTypeDescriptor, gradeFromJudgement, gradeFromRubric, gradeReadAloud, gradeSpeakingResponse, graderConfiguration, gte, hasGrade, hashSeed, hintRevealsAnswer, inAuditSample, inspectWav, interactiveVideoFromDrafts, isBuiltInActivityType, isInteractiveVideoItemType, isItemGroup, isReadingRouteItemType, isRouteStrategyId, itemGroupJsonSchema, jsonSchemaFor, levenshteinDistance, listMediaRefs, mapMediaRefs, markTargetIndices, markTheWordsFromMarkup, markableWords, markedSentences, marksFindEvidence, matchText, multipleChoiceJsonSchema, multipleChoiceType, nextRouteLearnerState, outcomeFromGrade, outcomeFromRoutedGrade, outcomeFromUnscorable, overlaps, passageLayout, planAttempt, planMediaBudgets, planRoute, questionKey, quoteText, readAiTextResult, readAloudJsonSchema, readAloudType, readMediaProgress, readRouteLearnerState, readRouteTrace, readingQuizzes, redact, redactItemGroup, registerActivityType, registeredActivityTypes, resolveDeliveryPolicy, resolveItemScoringPolicy, resolveMarkTarget, resolvePlaybackPolicy, restoreAttemptState, restoreMediaPlayLedger, roundGrade, routeAnswers, routeGrade, routeIssues, routeLevels, routePassageFingerprint, routeStepText, routeTrapText, score, scoreTries, scoredItemsFromPlan, seededShuffle, sentencesTouching, serializeAttemptState, serializeMediaPlayLedger, slotMediaKey, stimulusJsonSchema, stimulusMediaKey, summarizeRoute, transcriptOf, validateActivity, validateDeliveryPolicy, validateDraft, validateItemGroup, validateItemGroupDraft, validateItemScoringPolicy, validateMedia, validateOptionMedia, validateSpeechAssessment, validateXAPIStatement, verifyAttemptPlan, withoutAuthorOnly, writtenResponseJsonSchema, writtenResponseType, xAPIBuilder, xapiDefinitionFor };
2090
2090
 
2091
2091
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { $ as GROUP_CAPTIONS_REVEAL_DICTATION, B as countWords, Ct as passageWithoutPlaceholders, Mt as maxUnits, Ot as MediaSchema, St as numberedPassage, Tt as revealsAnswer, a as readSchema, bt as containsWords, et as groupCaptionsField, jt as ScriptSchema, kt as RedactedMediaSchema, t as getActivityTypeDescriptor, wt as placeholderOrder, xt as fold$1 } from "./registry-Cn2it-y7.js";
1
+ import { At as placeholderOrder, Dt as fold$1, Et as containsWords, Ft as RedactedMediaSchema, K as countWords, Lt as ScriptSchema, Ot as numberedPassage, Pt as MediaSchema, Rt as maxUnits, a as readSchema, at as GROUP_CAPTIONS_REVEAL_DICTATION, jt as revealsAnswer, kt as passageWithoutPlaceholders, ot as groupCaptionsField, t as getActivityTypeDescriptor } from "./registry-CroAI5nc.js";
2
2
  import * as z from "zod/v4";
3
3
  // src/reading-route/layout.ts
4
4
  /** Names the segmentation rules below. A change to them is a new name. */
@@ -875,9 +875,9 @@ function routeIssues(group, scope = "content") {
875
875
  * plays only when the learner presses play while the video is paused. A
876
876
  * dictation must carry its own recording (the timeline rule).
877
877
  *
878
- * `speaking-response` joined in 1.10.0, and `matching` in 1.13.0: a host with
879
- * an exhaustive `switch` or `Record` over {@link InteractiveVideoItemType}
880
- * needs one more entry for each.
878
+ * `speaking-response` joined in 1.10.0, `matching` in 1.13.0 and
879
+ * `mark-the-words` in 1.14.0: a host with an exhaustive `switch` or `Record`
880
+ * over {@link InteractiveVideoItemType} needs one more entry for each.
881
881
  */
882
882
  const INTERACTIVE_VIDEO_ITEM_TYPES = [
883
883
  "multiple-choice",
@@ -886,7 +886,8 @@ const INTERACTIVE_VIDEO_ITEM_TYPES = [
886
886
  "dictation",
887
887
  "read-aloud",
888
888
  "speaking-response",
889
- "matching"
889
+ "matching",
890
+ "mark-the-words"
890
891
  ];
891
892
  /** Whether `type` is one of the item types an interactive video may present. */
892
893
  function isInteractiveVideoItemType(type) {
@@ -1403,4 +1404,4 @@ function validateItemGroup(data) {
1403
1404
  }
1404
1405
  export { itemQuestions as C, overlaps as D, countParagraphs as E, passageLayout as O, choicesOf as S, ROUTE_SEGMENTER as T, ROUTE_WORD_LIMIT_MAX as _, INTERACTIVE_VIDEO_ITEM_TYPES as a, findQuote as b, TIMELINE_MAX_QUIZZES as c, readingQuizzes as d, routeIssues as f, ROUTE_STRATEGY_IDS as g, ROUTE_STRATEGIES as h, validateItemGroup as i, sentencesTouching as k, TIMELINE_MAX_TITLE_LENGTH as l, ROUTE_NOTE_MAX_LENGTH as m, RedactedItemGroupSchema as n, TIMELINE_MAX_CHAPTERS as o, READING_ROUTE_ITEM_TYPES as p, StimulusSchema as r, TIMELINE_MAX_ITEMS as s, ItemGroupSchema as t, isInteractiveVideoItemType as u, isReadingRouteItemType as v, questionKey as w, quoteText as x, isRouteStrategyId as y };
1405
1406
 
1406
- //# sourceMappingURL=item-group-vTcNy2JF.js.map
1407
+ //# sourceMappingURL=item-group-BIl1ZJHg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item-group-BIl1ZJHg.js","names":["isFields","list","fold"],"sources":["../src/reading-route/layout.ts","../src/reading-route/questions.ts","../src/reading-route/quotes.ts","../src/reading-route/strategies.ts","../src/reading-route/check.ts","../src/timeline-limits.ts","../src/schemas/item-group.ts"],"sourcesContent":["/**\n * The passage cut into paragraphs and sentences, by rules of the SDK's own.\n *\n * `Intl.Segmenter` would be shorter, and wrong here: engines segment\n * differently and change between versions, and a learner's \"found the\n * evidence\" must not depend on their browser. These rules are plain code, so\n * a server and every browser cut the same passage the same way, and a trace's\n * sentence numbers mean one thing. They change only with\n * {@link ROUTE_SEGMENTER}.\n */\n\nimport type {\n PassageLayout,\n PassageParagraph,\n PassageSection,\n PassageSentence,\n RouteSection,\n TextRange,\n} from '../types/reading-route.js';\n\n/** Names the segmentation rules below. A change to them is a new name. */\nexport const ROUTE_SEGMENTER = 'lk-sentences@1';\n\nconst TERMINALS = new Set(['.', '!', '?', '…', '‼', '⁇', '⁈', '⁉']);\n/** Terminals of scripts written without spaces: a sentence ends at them outright. */\nconst CLOSED_TERMINALS = new Set(['。', '!', '?', '。']);\nconst CLOSERS = new Set(['\"', \"'\", '”', '’', ')', ']', '}', '»', '›', '」', '』', ')']);\n\n/**\n * Words a full stop follows without ending a sentence. Lower case, without\n * their dots. `etc` is not one: it ends sentences as often as not, and a\n * capital after it says which.\n */\nconst ABBREVIATIONS = new Set([\n 'mr',\n 'mrs',\n 'ms',\n 'dr',\n 'prof',\n 'sr',\n 'jr',\n 'st',\n 'mt',\n 'vs',\n 'fig',\n 'figs',\n 'vol',\n 'approx',\n 'ca',\n 'cf',\n 'eg',\n 'ie',\n 'inc',\n 'ltd',\n 'co',\n 'corp',\n 'jan',\n 'feb',\n 'mar',\n 'apr',\n 'jun',\n 'jul',\n 'aug',\n 'sep',\n 'sept',\n 'oct',\n 'nov',\n 'dec',\n 'gen',\n 'gov',\n 'rev',\n 'ed',\n 'eds',\n 'pp',\n 'no',\n]);\n\nconst isSpace = (char: string | undefined): boolean => char !== undefined && /\\s/u.test(char);\nconst isLower = (char: string | undefined): boolean => char !== undefined && /\\p{Ll}/u.test(char);\n\n/** The word before a full stop at `dot`, letters and inner dots only (\"e.g\", \"U.S\"). */\nfunction wordBefore(text: string, dot: number): string {\n let start = dot;\n while (start > 0 && /[\\p{L}.]/u.test(text[start - 1] as string)) {\n start -= 1;\n }\n return text.slice(start, dot);\n}\n\n/** Whether the full stop at `dot` follows an abbreviation or an initial (\"J. K.\", \"U.S.\"). */\nfunction abbreviated(text: string, dot: number): boolean {\n const word = wordBefore(text, dot);\n if (word === '') {\n return false;\n }\n const last = word.split('.').at(-1) as string;\n if (last.length === 1 && /\\p{Lu}/u.test(last)) {\n return true;\n }\n return ABBREVIATIONS.has(word.replaceAll('.', '').toLowerCase());\n}\n\n/** `range` with whitespace trimmed off both ends; `null` when nothing is left. */\nfunction trimmed(text: string, start: number, end: number): TextRange | null {\n let from = start;\n let to = end;\n while (from < to && isSpace(text[from])) {\n from += 1;\n }\n while (to > from && isSpace(text[to - 1])) {\n to -= 1;\n }\n return from < to ? { start: from, end: to } : null;\n}\n\n/** The sentences of `text.slice(start, end)`: one paragraph. A line break always ends one. */\nfunction sentencesIn(text: string, start: number, end: number): TextRange[] {\n const found: TextRange[] = [];\n let from = start;\n const close = (to: number, next: number): void => {\n const range = trimmed(text, from, to);\n if (range !== null) {\n found.push(range);\n }\n from = next;\n };\n let index = start;\n while (index < end) {\n const char = text[index] as string;\n if (char === '\\n') {\n close(index, index + 1);\n index += 1;\n continue;\n }\n if (CLOSED_TERMINALS.has(char)) {\n let after = index + 1;\n while (after < end && CLOSERS.has(text[after] as string)) {\n after += 1;\n }\n close(after, after);\n index = after;\n continue;\n }\n if (!TERMINALS.has(char)) {\n index += 1;\n continue;\n }\n let after = index + 1;\n while (after < end && TERMINALS.has(text[after] as string)) {\n after += 1;\n }\n while (after < end && CLOSERS.has(text[after] as string)) {\n after += 1;\n }\n if (after >= end) {\n close(end, end);\n index = end;\n continue;\n }\n if (!isSpace(text[after])) {\n // \"3.5\", \"e.g.,\", \"www.example.org\": no space, no sentence end.\n index = after;\n continue;\n }\n let next = after;\n while (next < end && text[next] !== '\\n' && isSpace(text[next])) {\n next += 1;\n }\n const continues =\n isLower(text[next]) || (char === '.' && after === index + 1 && abbreviated(text, index));\n if (!continues) {\n close(after, after);\n }\n index = after;\n }\n close(end, end);\n return found;\n}\n\n/** The paragraphs of `body`: runs of text between blank lines. */\nfunction paragraphRanges(body: string): TextRange[] {\n const ranges: TextRange[] = [];\n const blank = /\\n[^\\S\\n]*\\n\\s*/gu;\n let from = 0;\n for (const match of body.matchAll(blank)) {\n const range = trimmed(body, from, match.index);\n if (range !== null) {\n ranges.push(range);\n }\n from = match.index + match[0].length;\n }\n const last = trimmed(body, from, body.length);\n if (last !== null) {\n ranges.push(last);\n }\n return ranges;\n}\n\n/** How many paragraphs `body` has, by the rules {@link passageLayout} uses. */\nexport function countParagraphs(body: string): number {\n return paragraphRanges(body).length;\n}\n\n/**\n * The passage cut into paragraphs and sentences. Paragraph labels and sections\n * are applied when they fit; the checks report when they do not.\n */\nexport function passageLayout(\n body: string,\n route?: { paragraphLabels?: readonly string[]; sections?: readonly RouteSection[] },\n): PassageLayout {\n const ranges = paragraphRanges(body);\n const labels = route?.paragraphLabels;\n const sectionList = route?.sections ?? [];\n const sections: PassageSection[] = [];\n const sectionOf: number[] = [];\n const fits =\n sectionList.reduce((total, section) => total + section.paragraphs, 0) === ranges.length;\n if (fits) {\n let first = 0;\n sectionList.forEach((section, index) => {\n const last = first + section.paragraphs - 1;\n sections.push({\n label: section.label,\n ...(section.title !== undefined ? { title: section.title } : {}),\n first,\n last,\n });\n for (let paragraph = first; paragraph <= last; paragraph += 1) {\n sectionOf[paragraph] = index;\n }\n first = last + 1;\n });\n }\n const labelled = labels !== undefined && labels.length === ranges.length;\n const paragraphs: PassageParagraph[] = [];\n const sentences: PassageSentence[] = [];\n ranges.forEach((range, index) => {\n const label = labelled ? (labels[index] as string) : '';\n const section = sectionOf[index];\n paragraphs.push({\n index,\n start: range.start,\n end: range.end,\n ...(label !== '' ? { label } : {}),\n ...(section !== undefined ? { section } : {}),\n });\n for (const sentence of sentencesIn(body, range.start, range.end)) {\n sentences.push({ index: sentences.length, paragraph: index, ...sentence });\n }\n });\n return { paragraphs, sentences, sections };\n}\n\n/** Whether two ranges share at least one character. */\nexport function overlaps(a: TextRange, b: TextRange): boolean {\n return a.start < b.end && b.start < a.end;\n}\n\n/** The sentences a range touches, in order. */\nexport function sentencesTouching(layout: PassageLayout, range: TextRange): number[] {\n return layout.sentences.filter((sentence) => overlaps(sentence, range)).map((s) => s.index);\n}\n","/**\n * The questions of a routed group, read off its items: one per multiple-choice\n * item, one per blank, gap or prompt of the others, numbered as on the paper. Read\n * defensively, because the checks run on drafts and on redacted items.\n */\n\nimport { passageWithoutPlaceholders, placeholderOrder } from '../answer-leak.js';\n\n/** A question as the items define it, before the route says anything about it. */\nexport interface ItemQuestion {\n key: string;\n itemId: string;\n partId?: string;\n itemIndex: number;\n /** 0-based position among the group's questions. */\n position: number;\n type: string;\n}\n\ntype Fields = Record<string, unknown>;\n\nconst isFields = (value: unknown): value is Fields =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\nconst text = (value: unknown): string => (typeof value === 'string' ? value : '');\n\nconst list = (value: unknown): Fields[] => (Array.isArray(value) ? value.filter(isFields) : []);\n\n/** `itemId`, or `itemId#partId`: a question's name in traces and summaries. */\nexport function questionKey(itemId: string, partId?: string): string {\n return partId === undefined ? itemId : `${itemId}#${partId}`;\n}\n\n/**\n * The ids of an item's parts in the order the learner answers them: its blanks\n * or gaps in passage order, its prompts in list order, or none for multiple\n * choice.\n */\nexport function partIdsOf(item: unknown): string[] | null {\n if (!isFields(item)) {\n return null;\n }\n if (item.type === 'multiple-choice') {\n return null;\n }\n if (item.type === 'matching') {\n const ids = list(item.prompts)\n .map((prompt) => prompt.id)\n .filter((id): id is string => typeof id === 'string' && id !== '');\n return [...new Set(ids)];\n }\n const declared = list(item.type === 'gap-select' ? item.gaps : item.blanks)\n .map((part) => part.id)\n .filter((id): id is string => typeof id === 'string' && id !== '');\n const order = placeholderOrder(text(item.passage)).filter((id) => declared.includes(id));\n const rest = declared.filter((id) => !order.includes(id));\n return [...new Set([...order, ...rest])];\n}\n\n/** Every question of the group's items, in paper order. */\nexport function itemQuestions(items: readonly unknown[]): ItemQuestion[] {\n const found: ItemQuestion[] = [];\n items.forEach((item, itemIndex) => {\n if (!isFields(item) || typeof item.id !== 'string') {\n return;\n }\n const type = text(item.type);\n const parts = partIdsOf(item);\n if (parts === null) {\n found.push({\n key: questionKey(item.id),\n itemId: item.id,\n itemIndex,\n position: found.length,\n type,\n });\n return;\n }\n for (const partId of parts) {\n found.push({\n key: questionKey(item.id, partId),\n itemId: item.id,\n partId,\n itemIndex,\n position: found.length,\n type,\n });\n }\n });\n return found;\n}\n\n/** What the learner reads of an item: its instructions, question, passage or prompts, and its options or choices. */\nexport function learnerTextOf(item: unknown): string {\n if (!isFields(item)) {\n return '';\n }\n const parts = [text(item.instructions)];\n if (item.type === 'multiple-choice') {\n parts.push(text(item.question), ...list(item.options).map((option) => text(option.text)));\n } else if (item.type === 'matching') {\n parts.push(\n text(item.optionsTitle),\n ...list(item.prompts).map((prompt) => text(prompt.text)),\n ...list(item.options).map((option) => text(option.text)),\n );\n } else {\n parts.push(passageWithoutPlaceholders(text(item.passage)));\n for (const gap of list(item.gaps)) {\n parts.push(...list(gap.choices).map((choice) => text(choice.text)));\n }\n for (const bank of list(item.banks)) {\n parts.push(...list(bank.choices).map((choice) => text(choice.text)));\n }\n }\n return parts.filter((part) => part !== '').join('\\n');\n}\n\n/** The options or choices a question offers, by id, with their text and whether each is right. */\nexport function choicesOf(\n item: unknown,\n partId?: string,\n): { id: string; text: string; correct: boolean }[] {\n if (!isFields(item)) {\n return [];\n }\n if (item.type === 'multiple-choice') {\n return list(item.options)\n .filter((option) => typeof option.id === 'string')\n .map((option) => ({\n id: option.id as string,\n text: text(option.text),\n correct: option.isCorrect === true,\n }));\n }\n if (item.type === 'matching') {\n const prompt = list(item.prompts).find((candidate) => candidate.id === partId);\n if (prompt === undefined) {\n return [];\n }\n return list(item.options)\n .filter((option) => typeof option.id === 'string')\n .map((option) => ({\n id: option.id as string,\n text: text(option.text),\n correct: option.id === prompt.correctOptionId,\n }));\n }\n if (item.type !== 'gap-select') {\n return [];\n }\n const gap = list(item.gaps).find((candidate) => candidate.id === partId);\n if (gap === undefined) {\n return [];\n }\n const bank = list(item.banks).find((candidate) => candidate.id === gap.bankId);\n const offered = gap.choices !== undefined ? list(gap.choices) : list(bank?.choices);\n return offered\n .filter((choice) => typeof choice.id === 'string')\n .map((choice) => ({\n id: choice.id as string,\n text: text(choice.text),\n correct: choice.id === gap.correctChoiceId,\n }));\n}\n\n/** The accepted answers of a blank. */\nexport function acceptedAnswersOf(item: unknown, partId?: string): string[] {\n if (!isFields(item) || item.type !== 'fill-in-the-blanks') {\n return [];\n }\n const blank = list(item.blanks).find((candidate) => candidate.id === partId);\n return Array.isArray(blank?.acceptedAnswers)\n ? blank.acceptedAnswers.filter((answer): answer is string => typeof answer === 'string')\n : [];\n}\n\n/** 1-based position of a blank or gap among its item's placeholders, for the leak check. */\nexport function placeholderPosition(item: unknown, partId?: string): number | undefined {\n if (!isFields(item) || partId === undefined) {\n return undefined;\n }\n const index = placeholderOrder(text(item.passage)).indexOf(partId);\n return index === -1 ? undefined : index + 1;\n}\n","/**\n * Finding a route's quotes in the passage. A quote is the words themselves,\n * so it survives an edit elsewhere in the passage; it is matched ignoring\n * runs of whitespace and the difference between curly and straight quotation\n * marks — what copying words out of a document changes — and nothing else.\n */\n\nimport type { RouteQuote, TextRange } from '../types/reading-route.js';\n\nconst FOLDED: Readonly<Record<string, string>> = {\n '‘': \"'\",\n '’': \"'\",\n '‛': \"'\",\n '′': \"'\",\n '“': '\"',\n '”': '\"',\n '„': '\"',\n '″': '\"',\n};\n\n/** A text folded for matching, and for each folded character the index it came from. */\ninterface Folded {\n text: string;\n origin: number[];\n}\n\nfunction fold(text: string): Folded {\n let folded = '';\n const origin: number[] = [];\n let space = false;\n for (let index = 0; index < text.length; index += 1) {\n const char = text[index] as string;\n if (/\\s/u.test(char)) {\n if (!space && folded !== '') {\n folded += ' ';\n origin.push(index);\n }\n space = true;\n continue;\n }\n space = false;\n folded += FOLDED[char] ?? char;\n origin.push(index);\n }\n if (folded.endsWith(' ')) {\n folded = folded.slice(0, -1);\n origin.pop();\n }\n return { text: folded, origin };\n}\n\n/** The text of a quote, whichever form it takes. Non-strings read as empty. */\nexport function quoteText(quote: RouteQuote | unknown): string {\n if (typeof quote === 'string') {\n return quote;\n }\n if (\n typeof quote === 'object' &&\n quote !== null &&\n typeof (quote as { text?: unknown }).text === 'string'\n ) {\n return (quote as { text: string }).text;\n }\n return '';\n}\n\nfunction occurrenceOf(quote: RouteQuote | unknown): number | undefined {\n if (typeof quote !== 'object' || quote === null) {\n return undefined;\n }\n const occurrence = (quote as { occurrence?: unknown }).occurrence;\n return typeof occurrence === 'number' ? occurrence : undefined;\n}\n\n/** What finding a quote came to. */\nexport type QuoteMatch =\n | { found: true; range: TextRange }\n | { found: false; reason: 'empty' | 'missing' | 'ambiguous' | 'occurrence'; count: number };\n\n/**\n * Where `quote` is in `body`. Every occurrence is counted, overlapping ones\n * included, so \"a a\" in \"a a a\" is ambiguous rather than silently the first.\n */\nexport function findQuote(body: string, quote: RouteQuote | unknown): QuoteMatch {\n const needle = fold(quoteText(quote)).text;\n if (needle === '') {\n return { found: false, reason: 'empty', count: 0 };\n }\n const hay = fold(body);\n const starts: number[] = [];\n let at = hay.text.indexOf(needle);\n while (at !== -1) {\n starts.push(at);\n at = hay.text.indexOf(needle, at + 1);\n }\n if (starts.length === 0) {\n return { found: false, reason: 'missing', count: 0 };\n }\n const occurrence = occurrenceOf(quote);\n if (occurrence === undefined && starts.length > 1) {\n return { found: false, reason: 'ambiguous', count: starts.length };\n }\n const chosen = starts[(occurrence ?? 1) - 1];\n if (chosen === undefined) {\n return { found: false, reason: 'occurrence', count: starts.length };\n }\n const start = hay.origin[chosen] as number;\n const end = (hay.origin[chosen + needle.length - 1] as number) + 1;\n return { found: true, range: { start, end } };\n}\n\n/** Whether `phrase` occurs in `text`, by the same folding as quotes, ignoring case. */\nexport function containsPhrase(text: string, phrase: string): boolean {\n const needle = fold(phrase).text.toLowerCase();\n return needle !== '' && fold(text).text.toLowerCase().includes(needle);\n}\n","/**\n * The strategy library: for each exam reading task, the order in which a\n * skilled candidate looks, and what they do at each look. A leaf module: the\n * schemas, the checks and the planner read it, and it imports none of them.\n *\n * What the steps rest on (the guide, `docs/reading-route.md`, cites each):\n * successful candidates find a small relevant part of the text and read it\n * carefully, where weaker ones read larger chunks for longer; exam reading\n * interleaves fast search with careful reading of what was found; answers are\n * hidden behind paraphrase, and a word-for-word match is the classic\n * distractor; skimming keeps the gist and structure, not details.\n */\n\nimport type { RouteMoveId, RouteStrategyId } from '../types/reading-route.js';\n\n/**\n * The item types a reading route may hold: the ones every common exam reading\n * task is written in. CLOSED on purpose, as an interactive video's list is: a\n * type added later is not silently routable.\n */\nexport const READING_ROUTE_ITEM_TYPES = [\n 'multiple-choice',\n 'fill-in-the-blanks',\n 'gap-select',\n 'matching',\n] as const;\n\n/** One of {@link READING_ROUTE_ITEM_TYPES}. */\nexport type ReadingRouteItemType = (typeof READING_ROUTE_ITEM_TYPES)[number];\n\n/** Whether `type` is one of the item types a reading route may hold. */\nexport function isReadingRouteItemType(type: unknown): type is ReadingRouteItemType {\n return (READING_ROUTE_ITEM_TYPES as readonly unknown[]).includes(type);\n}\n\n/** How a strategy is planned. */\nexport interface RouteStrategy {\n id: RouteStrategyId;\n /** Its name, in English, as a learner meets it. */\n title: string;\n /** The exam tasks it serves, in English, for authors. */\n serves: string;\n /** The item types it can be written in. */\n itemTypes: readonly ReadingRouteItemType[];\n /** Its steps, in order. `survey` is planned once, before the route's first question. */\n moves: readonly RouteMoveId[];\n /** Whether the answers come in the order of the text, so each search starts after the previous answer. */\n followsOrder: boolean;\n}\n\nconst CHOICE: readonly ReadingRouteItemType[] = ['multiple-choice', 'gap-select'];\n\n/** The tasks that match prompts to a shared list: written one question per item, or as one matching item. */\nconst MATCHING: readonly ReadingRouteItemType[] = ['multiple-choice', 'gap-select', 'matching'];\n\n/**\n * The built-in strategies. Data, versioned with lk-core: a route stores only\n * a strategy's id, so a learner always meets the current steps.\n */\nexport const ROUTE_STRATEGIES: Readonly<Record<RouteStrategyId, RouteStrategy>> = Object.freeze({\n tfng: {\n id: 'tfng',\n title: 'True / False / Not Given',\n serves: 'IELTS identifying information.',\n itemTypes: CHOICE,\n moves: ['read-instructions', 'keywords', 'locate', 'read-around', 'paraphrase', 'decide'],\n followsOrder: true,\n },\n ynng: {\n id: 'ynng',\n title: 'Yes / No / Not Given',\n serves: \"IELTS identifying the writer's views or claims.\",\n itemTypes: CHOICE,\n moves: ['read-instructions', 'keywords', 'locate', 'read-around', 'paraphrase', 'decide'],\n followsOrder: true,\n },\n 'multiple-choice': {\n id: 'multiple-choice',\n title: 'Multiple choice',\n serves: 'IELTS multiple choice; Cambridge C1 Advanced and C2 Proficiency Part 5.',\n itemTypes: ['multiple-choice'],\n moves: ['keywords', 'predict', 'locate', 'read-around', 'paraphrase', 'eliminate'],\n followsOrder: true,\n },\n 'matching-headings': {\n id: 'matching-headings',\n title: 'Matching headings',\n serves: 'IELTS matching headings.',\n itemTypes: MATCHING,\n moves: ['survey', 'locate', 'paraphrase', 'eliminate'],\n followsOrder: false,\n },\n 'matching-information': {\n id: 'matching-information',\n title: 'Matching information',\n serves: 'IELTS matching information (\"Which paragraph contains...\").',\n itemTypes: MATCHING,\n moves: ['keywords', 'locate', 'read-around', 'paraphrase'],\n followsOrder: false,\n },\n 'matching-features': {\n id: 'matching-features',\n title: 'Matching features',\n serves: 'IELTS matching features (people, dates, places to statements).',\n itemTypes: MATCHING,\n moves: ['keywords', 'locate', 'read-around', 'paraphrase'],\n followsOrder: false,\n },\n 'multiple-matching': {\n id: 'multiple-matching',\n title: 'Multiple matching',\n serves: 'Cambridge C1 Advanced Part 8 and C2 Proficiency Part 7.',\n itemTypes: MATCHING,\n moves: ['survey', 'keywords', 'locate', 'read-around', 'paraphrase'],\n followsOrder: false,\n },\n 'sentence-endings': {\n id: 'sentence-endings',\n title: 'Matching sentence endings',\n serves: 'IELTS matching sentence endings.',\n itemTypes: MATCHING,\n moves: ['keywords', 'predict', 'locate', 'read-around', 'eliminate'],\n followsOrder: true,\n },\n completion: {\n id: 'completion',\n title: 'Completion',\n serves: 'IELTS sentence, note, table and flow-chart completion, and short answers.',\n itemTypes: ['fill-in-the-blanks'],\n moves: ['read-instructions', 'keywords', 'predict', 'locate', 'read-around', 'check-answer'],\n followsOrder: true,\n },\n 'summary-word-list': {\n id: 'summary-word-list',\n title: 'Summary completion from a list',\n serves: 'IELTS summary completion with a list of words.',\n itemTypes: ['gap-select'],\n moves: ['keywords', 'predict', 'locate', 'read-around', 'paraphrase', 'check-answer'],\n followsOrder: false,\n },\n 'gapped-text': {\n id: 'gapped-text',\n title: 'Gapped text',\n serves: 'Cambridge C1 Advanced Part 7 and C2 Proficiency Part 6.',\n itemTypes: MATCHING,\n moves: ['survey', 'locate', 'cohesion', 'eliminate'],\n followsOrder: false,\n },\n 'cross-text': {\n id: 'cross-text',\n title: 'Cross-text matching',\n serves: 'Cambridge C1 Advanced Part 6.',\n itemTypes: MATCHING,\n moves: ['survey', 'keywords', 'locate', 'compare-views'],\n followsOrder: false,\n },\n});\n\n/** Every built-in strategy id, in the library's order. */\nexport const ROUTE_STRATEGY_IDS = Object.freeze(\n Object.keys(ROUTE_STRATEGIES),\n) as readonly RouteStrategyId[];\n\n/** Whether `id` names a built-in strategy. */\nexport function isRouteStrategyId(id: unknown): id is RouteStrategyId {\n return typeof id === 'string' && Object.hasOwn(ROUTE_STRATEGIES, id);\n}\n\n/** The most characters an author's note on a step may have. */\nexport const ROUTE_NOTE_MAX_LENGTH = 280;\n\n/** The longest word limit a completion question may set. */\nexport const ROUTE_WORD_LIMIT_MAX = 10;\n","/**\n * The rules a reading route keeps, beyond its shape: every question of the\n * group has exactly one entry, every quote is in the passage once, the words\n * an author adds never give the answer away, and the strategy fits the item.\n *\n * One list of rules serves the stored schema (every rule refuses) and the\n * draft checks (each code with its own severity), so the two cannot drift.\n * Read defensively: drafts and redacted groups reach it as they are.\n */\n\nimport { containsWords, fold, numberedPassage, revealsAnswer } from '../answer-leak.js';\nimport { countWords } from '../count-words.js';\nimport { countParagraphs } from './layout.js';\nimport {\n acceptedAnswersOf,\n choicesOf,\n itemQuestions,\n learnerTextOf,\n partIdsOf,\n placeholderPosition,\n questionKey,\n} from './questions.js';\nimport { containsPhrase, findQuote, quoteText } from './quotes.js';\nimport {\n isReadingRouteItemType,\n isRouteStrategyId,\n READING_ROUTE_ITEM_TYPES,\n ROUTE_NOTE_MAX_LENGTH,\n ROUTE_STRATEGIES,\n} from './strategies.js';\n\n/** The codes a route's rules report. Each one's severity is in `DRAFT_ISSUE_SEVERITY`. */\nexport type RouteIssueCode =\n | 'ig_route_stimulus_kind'\n | 'ig_route_body_required'\n /**\n * @deprecated Reported by 1.11.0 only, for a route in an interactive video,\n * which 1.12.0 allows: a video's reading quizzes. Never reported since;\n * kept so code that names it still compiles.\n */\n | 'ig_route_with_timeline'\n | 'ig_route_quiz_mixed'\n | 'ig_route_shuffle'\n | 'ig_route_item_type'\n | 'ig_route_question_item_unknown'\n | 'ig_route_question_part_required'\n | 'ig_route_question_part_unknown'\n | 'ig_route_question_part_not_allowed'\n | 'ig_route_question_duplicate'\n | 'ig_route_question_missing'\n | 'ig_route_strategy_required'\n | 'ig_route_strategy_unknown'\n | 'ig_route_strategy_item_type'\n | 'ig_route_evidence_required'\n | 'ig_route_quote_not_found'\n | 'ig_route_quote_ambiguous'\n | 'ig_route_keyword_not_in_question'\n | 'ig_route_trap_option_unknown'\n | 'ig_route_trap_on_answer'\n | 'ig_route_note_move_unknown'\n | 'ig_route_note_too_long'\n | 'ig_route_note_reveals_answer'\n | 'ig_route_word_limit_type'\n | 'ig_route_answer_over_limit'\n | 'ig_route_paragraph_labels'\n | 'ig_route_sections';\n\nexport interface RouteIssue {\n code: RouteIssueCode;\n path: (string | number)[];\n message: string;\n}\n\ntype Fields = Record<string, unknown>;\n\nconst isFields = (value: unknown): value is Fields =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\nconst unset = (value: unknown): boolean =>\n value === undefined || value === null || (typeof value === 'string' && value.trim() === '');\n\nconst list = (value: unknown): unknown[] => (Array.isArray(value) ? value : []);\n\n/**\n * Whether an author's note gives a question's answer away. For a choice, a\n * note that names the right option and not every other one; naming them all —\n * \"True if it agrees, False if it contradicts, Not Given if it is silent\" — is\n * the rule, not the answer.\n */\n/** What one question of an item with parts is called: a blank, a gap or a prompt. */\nfunction partNoun(type: unknown, capital: boolean): string {\n const noun = type === 'fill-in-the-blanks' ? 'blank' : type === 'matching' ? 'prompt' : 'gap';\n return capital ? `${noun[0]?.toUpperCase()}${noun.slice(1)}` : noun;\n}\n\nfunction noteRevealsAnswer(item: unknown, partId: string | undefined, note: string): boolean {\n const accepted = acceptedAnswersOf(item, partId);\n if (accepted.length > 0) {\n const passage = numberedPassage(\n typeof (item as Fields).passage === 'string' ? ((item as Fields).passage as string) : '',\n );\n const position = placeholderPosition(item, partId);\n return accepted.some((answer) => revealsAnswer(note, answer, passage, position));\n }\n const choices = choicesOf(item, partId);\n const words = fold(note);\n const named = choices.filter((choice) => containsWords(words, fold(choice.text)));\n return named.some((choice) => choice.correct) && named.length < choices.length;\n}\n\n/**\n * The quizzes of an interactive video that are reading quizzes: every question\n * in them has a route entry. In practice the player opens each as a reading\n * route over the stimulus's text; in an exam or a review, as an ordinary quiz.\n * Empty for a group with no timeline or no route.\n */\nexport function readingQuizzes(group: unknown): string[] {\n if (!isFields(group) || !isFields(group.route) || !isFields(group.timeline)) {\n return [];\n }\n const routed = new Set(\n list(group.route.questions).flatMap((question) =>\n isFields(question) && typeof question.itemId === 'string' ? [question.itemId] : [],\n ),\n );\n return list(group.timeline.cues).flatMap((cue) => {\n if (!isFields(cue) || typeof cue.id !== 'string') {\n return [];\n }\n const ids = list(cue.itemIds);\n return ids.length > 0 && ids.every((id) => routed.has(id as string)) ? [cue.id] : [];\n });\n}\n\n/**\n * Every rule the route of `group` breaks. `scope: 'redacted'` checks only what\n * a learner's copy still carries: the evidence, key words, traps and notes are\n * gone from it.\n */\nexport function routeIssues(\n group: unknown,\n scope: 'content' | 'redacted' = 'content',\n): RouteIssue[] {\n if (!isFields(group) || !isFields(group.route)) {\n return [];\n }\n const route = group.route;\n const issues: RouteIssue[] = [];\n const add = (code: RouteIssueCode, path: (string | number)[], message: string): void => {\n issues.push({ code, path, message });\n };\n\n const stimulus = isFields(group.stimulus) ? group.stimulus : undefined;\n const body = typeof stimulus?.body === 'string' ? stimulus.body : '';\n // In an interactive video the passage is the video stimulus's `body`, read in\n // the quizzes the route covers (see `readingQuizzes`).\n const timeline = isFields(group.timeline) ? group.timeline : undefined;\n const kinds = timeline === undefined ? ['text', 'mixed'] : ['text', 'mixed', 'video'];\n if (stimulus !== undefined && !unset(stimulus.kind) && !kinds.includes(stimulus.kind as string)) {\n add(\n 'ig_route_stimulus_kind',\n ['stimulus', 'kind'],\n 'A reading route needs a text to read: make the stimulus a text.',\n );\n } else if (stimulus !== undefined && body.trim() === '') {\n add(\n 'ig_route_body_required',\n ['stimulus', 'body'],\n timeline === undefined\n ? 'Add the passage the questions are about.'\n : \"Add the passage the video's reading quizzes are about, as the stimulus's text.\",\n );\n }\n if (group.shuffle === 'within-group') {\n add(\n 'ig_route_shuffle',\n ['shuffle'],\n 'A reading route keeps its questions in paper order: many answers follow the order of the text.',\n );\n }\n\n const items = list(group.items);\n // In a video, only the items of its reading quizzes are the route's; the\n // other quizzes hold whatever a video may.\n const routed = new Set(\n list(route.questions).flatMap((question) =>\n isFields(question) && typeof question.itemId === 'string' ? [question.itemId] : [],\n ),\n );\n const covered = (itemId: unknown): boolean => {\n if (timeline === undefined) {\n return true;\n }\n return list(timeline.cues).some(\n (cue) =>\n isFields(cue) &&\n list(cue.itemIds).includes(itemId) &&\n list(cue.itemIds).some((id) => routed.has(id as string)),\n );\n };\n if (timeline !== undefined) {\n list(timeline.cues).forEach((cue, index) => {\n if (!isFields(cue)) {\n return;\n }\n const ids = list(cue.itemIds);\n const inRoute = ids.filter((id) => routed.has(id as string)).length;\n if (inRoute > 0 && inRoute < ids.length) {\n add(\n 'ig_route_quiz_mixed',\n ['timeline', 'cues', index, 'itemIds'],\n 'A quiz is a reading quiz when the route covers all of its questions, or an ordinary one when it covers none.',\n );\n }\n });\n }\n items.forEach((item, index) => {\n if (\n isFields(item) &&\n !unset(item.type) &&\n !isReadingRouteItemType(item.type) &&\n covered(item.id)\n ) {\n add(\n 'ig_route_item_type',\n ['items', index, 'type'],\n `A reading route holds ${READING_ROUTE_ITEM_TYPES.join(', ')} questions; \"${String(item.type)}\" is not one of them.`,\n );\n }\n });\n const itemsById = new Map<string, unknown>();\n for (const item of items) {\n if (isFields(item) && typeof item.id === 'string') {\n itemsById.set(item.id, item);\n }\n }\n\n if (body !== '' && route.paragraphLabels !== undefined) {\n const paragraphs = countParagraphs(body);\n if (!Array.isArray(route.paragraphLabels) || route.paragraphLabels.length !== paragraphs) {\n add(\n 'ig_route_paragraph_labels',\n ['route', 'paragraphLabels'],\n `The passage has ${paragraphs} paragraphs (separated by blank lines); give one label for each, or \"\" to leave one unlabelled.`,\n );\n }\n }\n if (body !== '' && Array.isArray(route.sections)) {\n const paragraphs = countParagraphs(body);\n const covered = route.sections.reduce<number>(\n (total, section) =>\n total +\n (isFields(section) && typeof section.paragraphs === 'number' ? section.paragraphs : 0),\n 0,\n );\n if (covered !== paragraphs) {\n add(\n 'ig_route_sections',\n ['route', 'sections'],\n `The sections cover ${covered} paragraphs, but the passage has ${paragraphs}.`,\n );\n }\n }\n\n const seen = new Set<string>();\n const questions = list(route.questions);\n questions.forEach((raw, index) => {\n const at = (...rest: (string | number)[]): (string | number)[] => [\n 'route',\n 'questions',\n index,\n ...rest,\n ];\n if (!isFields(raw)) {\n return;\n }\n const itemId = typeof raw.itemId === 'string' ? raw.itemId : undefined;\n const item = itemId === undefined ? undefined : itemsById.get(itemId);\n if (itemId === undefined || item === undefined) {\n add(\n 'ig_route_question_item_unknown',\n at('itemId'),\n `No item of this group has the id \"${String(raw.itemId)}\".`,\n );\n return;\n }\n const parts = partIdsOf(item);\n const partId = typeof raw.partId === 'string' && raw.partId !== '' ? raw.partId : undefined;\n if (parts === null && partId !== undefined) {\n add(\n 'ig_route_question_part_not_allowed',\n at('partId'),\n 'A multiple-choice item is one question: leave out partId.',\n );\n return;\n }\n if (parts !== null && partId === undefined) {\n add(\n 'ig_route_question_part_required',\n at('partId'),\n `Name the ${partNoun((item as Fields).type, false)} this question is: each one is a question of its own.`,\n );\n return;\n }\n if (parts !== null && partId !== undefined && !parts.includes(partId)) {\n add(\n 'ig_route_question_part_unknown',\n at('partId'),\n `Item \"${itemId}\" has no ${partNoun((item as Fields).type, false)} \"${partId}\".`,\n );\n return;\n }\n const key = questionKey(itemId, partId);\n if (seen.has(key)) {\n add('ig_route_question_duplicate', at(), `Question \"${key}\" has two entries; keep one.`);\n return;\n }\n seen.add(key);\n\n const type = (item as Fields).type;\n if (unset(raw.strategy)) {\n add(\n 'ig_route_strategy_required',\n at('strategy'),\n 'Choose the reading strategy this question practises.',\n );\n } else if (!isRouteStrategyId(raw.strategy)) {\n add(\n 'ig_route_strategy_unknown',\n at('strategy'),\n `\"${String(raw.strategy)}\" is not a reading strategy.`,\n );\n } else if (\n isReadingRouteItemType(type) &&\n !ROUTE_STRATEGIES[raw.strategy].itemTypes.includes(type)\n ) {\n add(\n 'ig_route_strategy_item_type',\n at('strategy'),\n `The ${ROUTE_STRATEGIES[raw.strategy].title} strategy is written as ${ROUTE_STRATEGIES[raw.strategy].itemTypes.join(' or ')}, not ${String(type)}.`,\n );\n }\n\n if (raw.wordLimit !== undefined) {\n if (type !== 'fill-in-the-blanks') {\n add(\n 'ig_route_word_limit_type',\n at('wordLimit'),\n 'Only a question the learner writes has a word limit.',\n );\n } else if (typeof raw.wordLimit === 'number') {\n const limit = raw.wordLimit;\n for (const answer of acceptedAnswersOf(item, partId)) {\n if (countWords(answer) > limit) {\n add(\n 'ig_route_answer_over_limit',\n at('wordLimit'),\n `The accepted answer \"${answer}\" is longer than ${limit} word${limit === 1 ? '' : 's'}: a learner who writes it would lose the mark.`,\n );\n }\n }\n }\n }\n\n if (scope === 'redacted') {\n return;\n }\n const quote = (value: unknown, path: (string | number)[]): void => {\n if (body === '') {\n return;\n }\n const match = findQuote(body, value);\n if (match.found) {\n return;\n }\n const words = quoteText(value);\n if (match.reason === 'ambiguous') {\n add(\n 'ig_route_quote_ambiguous',\n path,\n `\"${words}\" appears ${match.count} times in the passage. Quote more words, or say which occurrence: { \"text\": ..., \"occurrence\": 2 }.`,\n );\n } else {\n add(\n 'ig_route_quote_not_found',\n path,\n match.reason === 'occurrence'\n ? `\"${words}\" appears only ${match.count} time${match.count === 1 ? '' : 's'} in the passage.`\n : `\"${words}\" is not in the passage. Copy the words exactly as the passage writes them.`,\n );\n }\n };\n\n const evidence = list(raw.evidence);\n if (evidence.length === 0) {\n add(\n 'ig_route_evidence_required',\n at('evidence'),\n 'Quote where the passage justifies the answer — for a Not Given answer, where it discusses the topic.',\n );\n }\n evidence.forEach((value, at2) => {\n quote(value, at('evidence', at2));\n });\n\n const visible = learnerTextOf(item);\n list(raw.keywords).forEach((keyword, at2) => {\n if (!isFields(keyword)) {\n return;\n }\n if (typeof keyword.question === 'string' && !containsPhrase(visible, keyword.question)) {\n add(\n 'ig_route_keyword_not_in_question',\n at('keywords', at2, 'question'),\n `\"${keyword.question}\" is not in the question. Copy the words as the question writes them.`,\n );\n }\n if (keyword.passage !== undefined) {\n quote(keyword.passage, at('keywords', at2, 'passage'));\n }\n });\n list(raw.links).forEach((link, at2) => {\n if (isFields(link)) {\n quote(link.from, at('links', at2, 'from'));\n quote(link.to, at('links', at2, 'to'));\n }\n });\n\n const choices = choicesOf(item, partId);\n list(raw.traps).forEach((trap, at2) => {\n if (!isFields(trap)) {\n return;\n }\n const choice = choices.find((candidate) => candidate.id === trap.optionId);\n if (choice === undefined) {\n add(\n 'ig_route_trap_option_unknown',\n at('traps', at2, 'optionId'),\n `This question has no option or choice \"${String(trap.optionId)}\".`,\n );\n } else if (choice.correct) {\n add(\n 'ig_route_trap_on_answer',\n at('traps', at2, 'optionId'),\n 'A trap is a wrong option; this one is the answer.',\n );\n }\n if (trap.lure !== undefined) {\n quote(trap.lure, at('traps', at2, 'lure'));\n }\n });\n\n if (isFields(raw.notes) && isRouteStrategyId(raw.strategy)) {\n const moves = ROUTE_STRATEGIES[raw.strategy].moves;\n for (const [move, note] of Object.entries(raw.notes)) {\n const path = at('notes', move);\n if (!(moves as readonly string[]).includes(move) || move === 'survey') {\n add(\n 'ig_route_note_move_unknown',\n path,\n `The ${ROUTE_STRATEGIES[raw.strategy].title} strategy has no \"${move}\" step for a question.`,\n );\n continue;\n }\n if (typeof note !== 'string') {\n continue;\n }\n if (note.length > ROUTE_NOTE_MAX_LENGTH) {\n add(\n 'ig_route_note_too_long',\n path,\n `Keep a step's note to ${ROUTE_NOTE_MAX_LENGTH} characters.`,\n );\n } else if (noteRevealsAnswer(item, partId, note)) {\n add(\n 'ig_route_note_reveals_answer',\n path,\n 'This note gives the answer away. Say where to look and why, not what to answer.',\n );\n }\n }\n }\n });\n\n for (const question of itemQuestions(items)) {\n if (\n !seen.has(question.key) &&\n itemsById.has(question.itemId) &&\n isReadingRouteItemType(question.type) &&\n covered(question.itemId)\n ) {\n add(\n 'ig_route_question_missing',\n ['route', 'questions'],\n question.partId === undefined\n ? `Question \"${question.itemId}\" has no route entry.`\n : `${partNoun(question.type, true)} \"${question.partId}\" of \"${question.itemId}\" has no route entry.`,\n );\n }\n }\n return issues;\n}\n","/**\n * The bounds of an interactive video — an item group with a `timeline`.\n *\n * A leaf module on purpose: the schemas, the authoring checks and the timeline\n * helpers all read these, and nothing here may import any of them back.\n */\n\n/**\n * The item types an interactive video may present. CLOSED on purpose: a type\n * added to the SDK later, or a custom type a host registers, is not silently\n * embeddable. Each one here was chosen, and each works inside a paused video —\n * a read-aloud's and a spoken answer's microphone included, because every quiz\n * pauses the video first.\n *\n * A question's own media is allowed as on any other item, under its own\n * playback policy: a picture to describe, or a recording to answer, which\n * plays only when the learner presses play while the video is paused. A\n * dictation must carry its own recording (the timeline rule).\n *\n * `speaking-response` joined in 1.10.0, `matching` in 1.13.0 and\n * `mark-the-words` in 1.14.0: a host with an exhaustive `switch` or `Record`\n * over {@link InteractiveVideoItemType} needs one more entry for each.\n */\nexport const INTERACTIVE_VIDEO_ITEM_TYPES = [\n 'multiple-choice',\n 'fill-in-the-blanks',\n 'gap-select',\n 'dictation',\n 'read-aloud',\n 'speaking-response',\n 'matching',\n 'mark-the-words',\n] as const;\n\n/** One of {@link INTERACTIVE_VIDEO_ITEM_TYPES}. */\nexport type InteractiveVideoItemType = (typeof INTERACTIVE_VIDEO_ITEM_TYPES)[number];\n\n/** Whether `type` is one of the item types an interactive video may present. */\nexport function isInteractiveVideoItemType(type: unknown): type is InteractiveVideoItemType {\n return (INTERACTIVE_VIDEO_ITEM_TYPES as readonly unknown[]).includes(type);\n}\n\n/** The most quizzes one video may hold. */\nexport const TIMELINE_MAX_QUIZZES = 100;\n\n/**\n * The most questions one interactive video may hold, across all its quizzes.\n * The player keeps every one of them mounted, so an answer survives the\n * learner rewinding past its quiz.\n */\nexport const TIMELINE_MAX_ITEMS = 200;\n\n/** The most chapters one video may hold. */\nexport const TIMELINE_MAX_CHAPTERS = 100;\n\n/** The longest quiz or chapter title, in UTF-16 units. A title sits on one line of the player. */\nexport const TIMELINE_MAX_TITLE_LENGTH = 120;\n","import * as z from 'zod/v4';\nimport { routeIssues } from '../reading-route/check.js';\nimport {\n ROUTE_NOTE_MAX_LENGTH,\n ROUTE_STRATEGY_IDS,\n ROUTE_WORD_LIMIT_MAX,\n} from '../reading-route/strategies.js';\nimport { getActivityTypeDescriptor } from '../registry/index.js';\nimport {\n INTERACTIVE_VIDEO_ITEM_TYPES,\n isInteractiveVideoItemType,\n TIMELINE_MAX_CHAPTERS,\n TIMELINE_MAX_ITEMS,\n TIMELINE_MAX_QUIZZES,\n TIMELINE_MAX_TITLE_LENGTH,\n} from '../timeline-limits.js';\nimport type { ActivityData, ValidationError, ValidationResult } from '../types/activity.js';\nimport type { ItemGroup, StimulusKind } from '../types/item-group.js';\nimport { GROUP_CAPTIONS_REVEAL_DICTATION, groupCaptionsField } from './dictation.js';\nimport { MediaSchema, RedactedMediaSchema, ScriptSchema } from './media.js';\nimport { readSchema } from './read-schema.js';\nimport { maxUnits } from './text-length.js';\n\n/**\n * An authored slot key.\n *\n * A `.` is rejected here, not at render time: `flattenSequence` uses the first\n * `.` to separate a group from its item, so a key containing one would produce\n * an ambiguous slot id. `keyOf` already threw on it — this moves the rejection\n * to `validateItemGroup`, where an author finds it, instead of leaving it to\n * surface when a learner opens the paper. Content that would newly fail\n * validation already threw at flatten time, so it can never have been sat.\n */\nconst SlotKeySchema = z\n .string()\n .min(1)\n .refine((key) => !key.includes('.'), {\n error:\n 'slotKey must not contain \".\" — that character separates a group from its item in a slot id, so a key containing one would make the slot ambiguous.',\n });\n\nfunction hasBody(stimulus: { body?: string | undefined }): boolean {\n return typeof stimulus.body === 'string' && stimulus.body.trim().length > 0;\n}\n\n/** Which media types can carry a stimulus of each kind. `text`/`mixed` accept any. */\nfunction mediaFits(kind: StimulusKind, mediaType: string | undefined): boolean {\n switch (kind) {\n case 'audio':\n return mediaType === 'audio';\n case 'video':\n return mediaType === 'video' || mediaType === 'embed';\n case 'image':\n return mediaType === 'image';\n default:\n return true;\n }\n}\n\n/**\n * Zod schema for a {@link Stimulus}. Loose: unknown keys preserved.\n *\n * The semantic guards exist because a stimulus that does not carry what its\n * `kind` promises is an authoring error that must not reach an exam: an\n * \"audio\" stimulus with no recording renders as a blank panel above six\n * listening questions. Unrepresentable in JSON Schema; dropped from\n * `stimulusJsonSchema` by design.\n */\nexport const StimulusSchema = z\n .looseObject({\n id: z.string().min(1),\n kind: z.enum(['text', 'audio', 'video', 'image', 'mixed']),\n title: z.string().optional(),\n body: z.string().optional(),\n bodyHtml: z.string().optional(),\n media: MediaSchema.optional(),\n transcript: z.string().optional(),\n script: ScriptSchema.optional(),\n locale: z.string().optional(),\n attribution: z.string().optional(),\n })\n .refine((stimulus) => stimulus.bodyHtml === undefined || hasBody(stimulus), {\n error:\n 'bodyHtml requires a plain-text body: it is the accessible fallback rendered when no sanitiser is supplied.',\n path: ['body'],\n })\n .refine(\n (stimulus) => (stimulus.kind !== 'text' && stimulus.kind !== 'mixed') || hasBody(stimulus),\n {\n error: 'A text or mixed stimulus needs a non-empty body.',\n path: ['body'],\n },\n )\n .refine((stimulus) => stimulus.kind === 'text' || stimulus.media !== undefined, {\n error: 'An audio, video, image or mixed stimulus needs media.',\n path: ['media'],\n })\n .refine(\n (stimulus) => stimulus.media === undefined || mediaFits(stimulus.kind, stimulus.media.type),\n {\n error:\n 'media.type does not fit the stimulus kind: audio needs audio; video needs video or embed; image needs image.',\n path: ['media', 'type'],\n },\n );\n\nconst TimelineTitleSchema = maxUnits(z.string(), TIMELINE_MAX_TITLE_LENGTH).refine(\n (title) => title.trim().length > 0,\n { error: 'A title must not be empty.' },\n);\n\n/** Seconds from the start of the video. zod rejects NaN and ±Infinity itself. */\nconst TimelineTimeSchema = z.number().min(0, { error: 'A time is 0 seconds or more.' });\n\n/**\n * A quiz. STRICT, like every part of a timeline: a misspelt `requried` would\n * otherwise be kept and the quiz silently optional on a paper that believed it\n * was required.\n */\nexport const TimelineCueSchema = z.strictObject({\n id: maxUnits(z.string().min(1), 64),\n at: TimelineTimeSchema,\n itemIds: z.array(z.string().min(1)).min(1).max(TIMELINE_MAX_ITEMS),\n title: TimelineTitleSchema.optional(),\n required: z.boolean().optional(),\n});\n\nexport const TimelineChapterSchema = z.strictObject({\n at: TimelineTimeSchema,\n title: TimelineTitleSchema,\n});\n\n/**\n * A timeline on its own: its quizzes, chapters and navigation. The rules that\n * need the group — every item in exactly one quiz, a video stimulus, the five\n * item types — are {@link timelineIssues}, which both group schemas run.\n */\nexport const MediaTimelineSchema = z\n .strictObject({\n cues: z.array(TimelineCueSchema).max(TIMELINE_MAX_QUIZZES),\n chapters: z.array(TimelineChapterSchema).max(TIMELINE_MAX_CHAPTERS).optional(),\n navigation: z.enum(['free', 'no-skip-ahead']).optional(),\n })\n .check((ctx) => {\n const seen = new Set<string>();\n ctx.value.cues.forEach((cue, index) => {\n if (seen.has(cue.id)) {\n ctx.issues.push({\n code: 'custom',\n input: cue.id,\n message: `Quiz id \"${cue.id}\" is used twice: events, drafts and the contents panel name a quiz by its id.`,\n path: ['cues', index, 'id'],\n });\n }\n seen.add(cue.id);\n });\n // Strictly increasing, not merely sorted: two chapters starting at one\n // moment leave the first with no length, and the scrubber no room to draw it.\n const chapters = ctx.value.chapters ?? [];\n chapters.forEach((chapter, index) => {\n const previous = chapters[index - 1];\n if (previous !== undefined && chapter.at <= previous.at) {\n ctx.issues.push({\n code: 'custom',\n input: chapter.at,\n message: 'Chapter times must be strictly increasing.',\n path: ['chapters', index, 'at'],\n });\n }\n });\n });\n\n/** Words copied from the passage: the words, or the words and which occurrence of them. */\nconst RouteQuoteSchema = z.union([\n z.string().min(1),\n z.strictObject({ text: z.string().min(1), occurrence: z.number().int().min(1).optional() }),\n]);\n\nconst ROUTE_TRAP_KINDS = [\n 'word-match',\n 'opposite',\n 'partial',\n 'outside-knowledge',\n 'too-general',\n 'too-specific',\n 'not-the-question',\n] as const;\n\nconst ROUTE_MOVE_IDS = [\n 'read-instructions',\n 'survey',\n 'keywords',\n 'predict',\n 'locate',\n 'read-around',\n 'paraphrase',\n 'decide',\n 'eliminate',\n 'cohesion',\n 'check-answer',\n 'compare-views',\n] as const;\n\nconst RouteSectionSchema = z.strictObject({\n label: z.string().min(1),\n title: z.string().optional(),\n paragraphs: z.number().int().min(1),\n});\n\n/**\n * One question of a route. STRICT, like every part of a route: a misspelt\n * `evidense` would otherwise leave a question with no evidence and no error.\n * The rules that need the passage or the items are {@link routeIssues}.\n */\nconst RouteQuestionSchema = z.strictObject({\n itemId: z.string().min(1),\n partId: z.string().min(1).optional(),\n strategy: z.enum(ROUTE_STRATEGY_IDS as unknown as [string, ...string[]]),\n evidence: z.array(RouteQuoteSchema).min(1),\n evidenceMatch: z.enum(['any', 'all']).optional(),\n keywords: z\n .array(z.strictObject({ question: z.string().min(1), passage: RouteQuoteSchema.optional() }))\n .optional(),\n links: z.array(z.strictObject({ from: RouteQuoteSchema, to: RouteQuoteSchema })).optional(),\n wordLimit: z.number().int().min(1).max(ROUTE_WORD_LIMIT_MAX).optional(),\n traps: z\n .array(\n z.strictObject({\n optionId: z.string().min(1),\n kind: z.enum(ROUTE_TRAP_KINDS),\n lure: RouteQuoteSchema.optional(),\n }),\n )\n .optional(),\n notes: z\n .partialRecord(z.enum(ROUTE_MOVE_IDS), maxUnits(z.string().min(1), ROUTE_NOTE_MAX_LENGTH))\n .optional(),\n});\n\n/** A route on its own. The rules that span the route, the passage and the items are {@link routeIssues}, which both group schemas run. */\nexport const ReadingRouteSchema = z.strictObject({\n routeVersion: z.literal('1.0'),\n startAt: z.number().int().min(1).optional(),\n paragraphLabels: z.array(z.string()).optional(),\n sections: z.array(RouteSectionSchema).min(1).optional(),\n questions: z.array(RouteQuestionSchema),\n});\n\n/** A route as a learner's copy carries it: which question practises which strategy, and nothing that locates an answer. */\nexport const RedactedReadingRouteSchema = z.strictObject({\n routeVersion: z.literal('1.0'),\n startAt: z.number().int().min(1).optional(),\n paragraphLabels: z.array(z.string()).optional(),\n sections: z.array(RouteSectionSchema).min(1).optional(),\n questions: z.array(\n z.strictObject({\n itemId: z.string().min(1),\n partId: z.string().min(1).optional(),\n strategy: z.enum(ROUTE_STRATEGY_IDS as unknown as [string, ...string[]]),\n wordLimit: z.number().int().min(1).max(ROUTE_WORD_LIMIT_MAX).optional(),\n }),\n ),\n});\n\n/** A URL only this document can resolve, or one that inlines the bytes. */\nfunction isLocalOnlyUrl(url: unknown): boolean {\n return typeof url === 'string' && /^(data|blob):/i.test(url);\n}\n\n/**\n * The rules of an interactive video that span the timeline, the stimulus and\n * the items. Run by the content schema and, for everything but the two\n * authoring-only rules, by the strict redacted schema — a projection built by\n * hand never passed through the content schema.\n *\n * Items are read defensively: the redacted schema leaves them opaque, and each\n * is proven against its own type's schema elsewhere.\n */\nfunction timelineIssues(\n group: {\n stimulus: {\n kind: string;\n media?:\n | {\n type: string;\n url: string;\n poster?: string | undefined;\n tracks?: readonly { src: string }[] | undefined;\n }\n | undefined;\n };\n items: readonly unknown[];\n shuffle?: string | undefined;\n timeline?: { cues: readonly { itemIds: readonly string[] }[] } | undefined;\n },\n scope: 'content' | 'redacted',\n): { path: (string | number)[]; message: string; input: unknown }[] {\n const timeline = group.timeline;\n if (timeline === undefined) {\n return [];\n }\n const issues: { path: (string | number)[]; message: string; input: unknown }[] = [];\n const media = group.stimulus.media;\n\n // Reported at the field that is wrong, so an editor's own check at that path\n // can stand in for it without hiding anything else about the stimulus.\n if (group.stimulus.kind !== 'video') {\n issues.push({\n path: ['stimulus', 'kind'],\n input: group.stimulus.kind,\n message:\n 'An interactive video needs a video stimulus: quizzes open at moments of a video, and nothing else has them.',\n });\n } else if (media !== undefined && media.type !== 'video') {\n issues.push({\n path: ['stimulus', 'media', 'type'],\n input: media.type,\n message:\n 'An interactive video needs a video file. An embedded provider player cannot be paused at the moment a quiz opens.',\n });\n }\n if (group.shuffle === 'within-group') {\n issues.push({\n path: ['shuffle'],\n input: group.shuffle,\n message:\n 'An interactive video presents its questions in the order its quizzes open; shuffle: \"within-group\" cannot apply to it.',\n });\n }\n if (group.items.length > TIMELINE_MAX_ITEMS) {\n issues.push({\n path: ['items'],\n input: group.items.length,\n message: `An interactive video holds at most ${TIMELINE_MAX_ITEMS} questions.`,\n });\n }\n\n const itemIds = new Map<string, number>();\n group.items.forEach((item, index) => {\n const {\n id,\n type,\n media: itemMedia,\n } = (item ?? {}) as { id?: unknown; type?: unknown; media?: unknown };\n if (typeof id === 'string') {\n itemIds.set(id, index);\n }\n if (!isInteractiveVideoItemType(type)) {\n issues.push({\n path: ['items', index, 'type'],\n input: type,\n message: `An interactive video may hold only ${INTERACTIVE_VIDEO_ITEM_TYPES.join(', ')} questions.`,\n });\n }\n // The \"play the stimulus\" fallback a dictation has in a listening group\n // means nothing halfway through a video.\n if (scope === 'content' && type === 'dictation' && itemMedia === undefined) {\n issues.push({\n path: ['items', index, 'media'],\n input: itemMedia,\n message: 'A dictation inside an interactive video needs its own recording.',\n });\n }\n });\n\n const placed = new Set<string>();\n timeline.cues.forEach((cue, cueIndex) => {\n cue.itemIds.forEach((itemId, position) => {\n const path = ['timeline', 'cues', cueIndex, 'itemIds', position];\n if (!itemIds.has(itemId)) {\n issues.push({\n path,\n input: itemId,\n message: `No item in this group has the id \"${itemId}\".`,\n });\n } else if (placed.has(itemId)) {\n issues.push({\n path,\n input: itemId,\n message: `Item \"${itemId}\" is placed twice: every question belongs to exactly one quiz.`,\n });\n }\n placed.add(itemId);\n });\n });\n for (const [itemId, index] of itemIds) {\n if (!placed.has(itemId)) {\n issues.push({\n path: ['items', index],\n input: itemId,\n message: `Item \"${itemId}\" is in no quiz, so the video would never show it.`,\n });\n }\n }\n\n // A `data:` video swells the payload and every fingerprint over it; a stored\n // `blob:` URL means nothing in another document.\n if (scope === 'content' && media !== undefined) {\n const urls: [unknown, (string | number)[]][] = [\n [media.url, ['stimulus', 'media', 'url']],\n [media.poster, ['stimulus', 'media', 'poster']],\n ...(media.tracks ?? []).map((track, index): [unknown, (string | number)[]] => [\n track.src,\n ['stimulus', 'media', 'tracks', index, 'src'],\n ]),\n ];\n for (const [url, path] of urls) {\n if (isLocalOnlyUrl(url)) {\n issues.push({\n path,\n input: url,\n message:\n 'An interactive video is stored and served: its URLs cannot be data: or blob: URLs.',\n });\n }\n }\n }\n return issues;\n}\n\n/**\n * The structural minimum of an item as seen by the CONTAINER schema. Each\n * item's own contract is checked against its registered schema by\n * {@link validateItemGroup} — a zod schema cannot dispatch on a registry\n * that consumers extend at runtime.\n */\nconst ItemShapeSchema = z.looseObject({\n type: z.string().min(1),\n id: z.string().min(1),\n slotKey: SlotKeySchema.optional(),\n});\n\n/**\n * Zod schema for an {@link ItemGroup} CONTAINER. Loose: unknown keys\n * preserved. Validates the group's own fields and the stimulus in full, and\n * each item only structurally (`type` and `id`); use {@link validateItemGroup}\n * to validate the items against their registered schemas as well.\n */\nexport const ItemGroupSchema = z\n .looseObject({\n schemaVersion: z.literal('1.0'),\n type: z.literal('item-group'),\n id: z.string().min(1),\n title: z.string().optional(),\n slotKey: SlotKeySchema.optional(),\n stimulus: StimulusSchema,\n items: z.array(ItemShapeSchema).min(1),\n shuffle: z.enum(['none', 'within-group']).optional(),\n timeline: MediaTimelineSchema.optional(),\n route: ReadingRouteSchema.optional(),\n })\n .refine((group) => group.items.every((item) => item.type !== 'item-group'), {\n error: 'Item groups do not nest: every item must be an activity.',\n path: ['items'],\n })\n .refine((group) => new Set(group.items.map((item) => item.id)).size === group.items.length, {\n error: 'Item ids must be unique within a group.',\n path: ['items'],\n })\n .check((ctx) => {\n for (const issue of timelineIssues(ctx.value, 'content')) {\n ctx.issues.push({ code: 'custom', ...issue });\n }\n for (const { path, message } of routeIssues(ctx.value, 'content')) {\n ctx.issues.push({ code: 'custom', input: ctx.value.route, path, message });\n }\n });\n\n/** Strict learner-safe stimulus: everything but the author-only `transcript`. */\nexport const RedactedStimulusSchema = z.strictObject({\n id: z.string().min(1),\n kind: z.enum(['text', 'audio', 'video', 'image', 'mixed']),\n title: z.string().optional(),\n body: z.string().optional(),\n bodyHtml: z.string().optional(),\n media: RedactedMediaSchema.optional(),\n locale: z.string().optional(),\n attribution: z.string().optional(),\n});\n\n/**\n * Strict learner-safe item group. Items are left opaque here — each is proven\n * learner-safe by `assertRedacted` against its OWN type's redacted schema,\n * which is the only place that knowledge lives. The one exception is the one\n * rule that spans the container and an item: a captioned stimulus recording\n * played to a dictation is not learner-safe, because the captions are the\n * dictation's answer.\n */\nexport const RedactedItemGroupSchema = z\n .strictObject({\n redacted: z.literal(true),\n schemaVersion: z.literal('1.0'),\n type: z.literal('item-group'),\n id: z.string().min(1),\n title: z.string().optional(),\n slotKey: SlotKeySchema.optional(),\n stimulus: RedactedStimulusSchema,\n items: z.array(z.unknown()).min(1),\n shuffle: z.enum(['none', 'within-group']).optional(),\n timeline: MediaTimelineSchema.optional(),\n route: RedactedReadingRouteSchema.optional(),\n })\n .check((ctx) => {\n for (const issue of timelineIssues(ctx.value, 'redacted')) {\n ctx.issues.push({ code: 'custom', ...issue });\n }\n for (const { path, message } of routeIssues(ctx.value, 'redacted')) {\n ctx.issues.push({ code: 'custom', input: ctx.value.route, path, message });\n }\n const captions = groupCaptionsField(ctx.value);\n if (captions !== undefined) {\n ctx.issues.push({\n code: 'custom',\n input: ctx.value.stimulus.media?.[captions],\n message: GROUP_CAPTIONS_REVEAL_DICTATION,\n path: ['stimulus', 'media', captions],\n });\n }\n });\n\nfunction toValidationErrors(\n issues: readonly { path: readonly PropertyKey[]; message: string; code: string }[],\n prefix: string[],\n): ValidationError[] {\n return issues.map((issue) => ({\n path: [...prefix, ...issue.path.map(String)],\n message: issue.message,\n code: issue.code,\n }));\n}\n\n/**\n * Validates an item group in full: the container and stimulus against\n * {@link ItemGroupSchema}, then every item against the schema registered for\n * its `type`. Errors from items are reported at `items.<index>.…`.\n *\n * Unlike `validateActivity`, an item whose type is not registered is REPORTED\n * (code `unknown_activity_type`) rather than thrown: a group is validated as\n * a whole, and an author fixing a six-item group wants every problem listed,\n * not the first one that happened to throw.\n */\nexport function validateItemGroup(data: unknown): ValidationResult<ItemGroup> {\n const container = ItemGroupSchema.safeParse(data);\n if (!container.success) {\n return { success: false, errors: toValidationErrors(container.error.issues, []) };\n }\n\n const errors: ValidationError[] = [];\n const items: ActivityData[] = [];\n container.data.items.forEach((item, index) => {\n const descriptor = getActivityTypeDescriptor(item.type);\n if (descriptor === undefined) {\n errors.push({\n path: ['items', String(index), 'type'],\n message: `Activity type \"${item.type}\" is not registered`,\n code: 'unknown_activity_type',\n });\n return;\n }\n const parsed = readSchema(descriptor.schema, item, `Activity type \"${descriptor.type}\"`);\n if (!parsed.success) {\n errors.push(...toValidationErrors(parsed.issues, ['items', String(index)]));\n return;\n }\n items.push(parsed.data as ActivityData);\n });\n const captions = groupCaptionsField(container.data);\n if (captions !== undefined) {\n errors.push({\n path: ['stimulus', 'media', captions],\n message: GROUP_CAPTIONS_REVEAL_DICTATION,\n code: 'custom',\n });\n }\n\n if (errors.length > 0) {\n return { success: false, errors };\n }\n // zod4 optional outputs are `T | undefined`; the wire type uses exact\n // optionals. Structurally identical at runtime — the cast is type-level.\n return { success: true, data: { ...container.data, items } as unknown as ItemGroup };\n}\n"],"mappings":";;;;AAqBA,MAAa,kBAAkB;AAE/B,MAAM,4BAAY,IAAI,IAAI;CAAC;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;AAAG,CAAC;;AAElE,MAAM,mCAAmB,IAAI,IAAI;CAAC;CAAK;CAAK;CAAK;AAAG,CAAC;AACrD,MAAM,0BAAU,IAAI,IAAI;CAAC;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;AAAG,CAAC;;;;;;AAOpF,MAAM,gCAAgB,IAAI,IAAI;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AAED,MAAM,WAAW,SAAsC,SAAS,KAAA,KAAa,MAAM,KAAK,IAAI;AAC5F,MAAM,WAAW,SAAsC,SAAS,KAAA,KAAa,UAAU,KAAK,IAAI;;AAGhG,SAAS,WAAW,MAAc,KAAqB;CACr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