@citolab/qti-components 7.27.2 → 7.27.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/index.global.js +1 -1
- package/cdn/index.js +216 -202
- package/dist/base.js +1 -1
- package/dist/{chunk-QUWFDFGZ.js → chunk-3XXXAWMZ.js} +18 -18
- package/dist/{chunk-TORB5UN2.js → chunk-A7HX4462.js} +291 -242
- package/dist/chunk-A7HX4462.js.map +1 -0
- package/dist/{chunk-KY3II5OX.js → chunk-CSYOTHK2.js} +220 -189
- package/dist/chunk-CSYOTHK2.js.map +1 -0
- package/dist/{chunk-G5ZUC3OT.js → chunk-CVB5ISWF.js} +23 -23
- package/dist/chunk-CVB5ISWF.js.map +1 -0
- package/dist/{chunk-TZMDZQFG.js → chunk-D6EHVZG2.js} +467 -217
- package/dist/chunk-D6EHVZG2.js.map +1 -0
- package/dist/{chunk-DG5TP35K.js → chunk-DGIXWHK3.js} +5 -5
- package/dist/{chunk-DG5TP35K.js.map → chunk-DGIXWHK3.js.map} +1 -1
- package/dist/{chunk-GG36UR7F.js → chunk-PHCCFYNE.js} +12 -12
- package/dist/{chunk-GG36UR7F.js.map → chunk-PHCCFYNE.js.map} +1 -1
- package/dist/{chunk-75ME6QG5.js → chunk-WMPG7ULB.js} +17 -17
- package/dist/elements.js +3 -3
- package/dist/index.js +8 -8
- package/dist/interactions.d.ts +8 -7
- package/dist/interactions.js +3 -3
- package/dist/item.js +3 -3
- package/dist/processing.js +2 -2
- package/dist/qti-components-jsx.d.ts +202 -202
- package/dist/test.js +5 -5
- package/package.json +11 -11
- package/dist/chunk-G5ZUC3OT.js.map +0 -1
- package/dist/chunk-KY3II5OX.js.map +0 -1
- package/dist/chunk-TORB5UN2.js.map +0 -1
- package/dist/chunk-TZMDZQFG.js.map +0 -1
- /package/dist/{chunk-QUWFDFGZ.js.map → chunk-3XXXAWMZ.js.map} +0 -0
- /package/dist/{chunk-75ME6QG5.js.map → chunk-WMPG7ULB.js.map} +0 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
QtiModalFeedback
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3XXXAWMZ.js";
|
|
4
4
|
import {
|
|
5
5
|
item_default,
|
|
6
6
|
m
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CVB5ISWF.js";
|
|
8
8
|
import {
|
|
9
9
|
qtiTransformItem,
|
|
10
10
|
qtiTransformTest
|
|
11
11
|
} from "./chunk-K7HR6ZAY.js";
|
|
12
12
|
import {
|
|
13
|
-
|
|
13
|
+
A,
|
|
14
14
|
INITIAL_SESSION_CONTEXT,
|
|
15
15
|
INITIAL_TEST_CONTEXT,
|
|
16
|
-
|
|
16
|
+
T,
|
|
17
17
|
c,
|
|
18
18
|
computedContext,
|
|
19
19
|
configContext,
|
|
@@ -26,10 +26,8 @@ import {
|
|
|
26
26
|
sessionContext,
|
|
27
27
|
t,
|
|
28
28
|
testContext,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
x
|
|
32
|
-
} from "./chunk-TORB5UN2.js";
|
|
29
|
+
watch
|
|
30
|
+
} from "./chunk-A7HX4462.js";
|
|
33
31
|
import {
|
|
34
32
|
__decorateClass,
|
|
35
33
|
__privateAdd,
|
|
@@ -94,15 +92,15 @@ var TestNavigationMixin = (superClass) => {
|
|
|
94
92
|
this.addEventListener("qti-assessment-item-connected", this._handleItemConnected.bind(this));
|
|
95
93
|
this.addEventListener("qti-assessment-stimulus-ref-connected", this._handleStimulusRefConnected.bind(this));
|
|
96
94
|
}
|
|
97
|
-
_handleTestConnected(
|
|
98
|
-
this._testElement =
|
|
95
|
+
_handleTestConnected(e3) {
|
|
96
|
+
this._testElement = e3.detail;
|
|
99
97
|
this._initializeNavigation();
|
|
100
98
|
}
|
|
101
99
|
/**
|
|
102
100
|
* Handle item connection events - track connected items and discover stimulus references
|
|
103
101
|
*/
|
|
104
|
-
_handleItemConnected(
|
|
105
|
-
const itemRef =
|
|
102
|
+
_handleItemConnected(e3) {
|
|
103
|
+
const itemRef = e3.detail;
|
|
106
104
|
this._loadingState.connectedItems++;
|
|
107
105
|
const stimulusRefs = itemRef.querySelectorAll("qti-assessment-stimulus-ref");
|
|
108
106
|
this._loadingState.expectedStimulus += stimulusRefs.length;
|
|
@@ -111,9 +109,9 @@ var TestNavigationMixin = (superClass) => {
|
|
|
111
109
|
/**
|
|
112
110
|
* Handle stimulus reference connection events with duplicate prevention
|
|
113
111
|
*/
|
|
114
|
-
async _handleStimulusRefConnected(
|
|
115
|
-
|
|
116
|
-
const { element, item } =
|
|
112
|
+
async _handleStimulusRefConnected(e3) {
|
|
113
|
+
e3.preventDefault();
|
|
114
|
+
const { element, item } = e3;
|
|
117
115
|
console.info("Stimulus ref connected:", {
|
|
118
116
|
identifier: element.identifier,
|
|
119
117
|
href: element.href,
|
|
@@ -357,7 +355,7 @@ var TestNavigationMixin = (superClass) => {
|
|
|
357
355
|
validResults.forEach(({ itemRef }) => {
|
|
358
356
|
const itemId = itemRef?.identifier;
|
|
359
357
|
if (!itemRef || !itemId) return;
|
|
360
|
-
const savedState = this.testContext.items.find((
|
|
358
|
+
const savedState = this.testContext.items.find((i5) => i5.identifier === itemId)?.state;
|
|
361
359
|
if (savedState === void 0) return;
|
|
362
360
|
itemRef.updateComplete.then(() => {
|
|
363
361
|
const assessmentItem = itemRef.assessmentItem;
|
|
@@ -511,16 +509,16 @@ var TestViewMixin = (superClass) => {
|
|
|
511
509
|
constructor(...args) {
|
|
512
510
|
super(...args);
|
|
513
511
|
this.sessionContext = { ...this.sessionContext, view: "candidate" };
|
|
514
|
-
this.addEventListener("on-test-switch-view", (
|
|
515
|
-
this.sessionContext = { ...this.sessionContext, view:
|
|
512
|
+
this.addEventListener("on-test-switch-view", (e3) => {
|
|
513
|
+
this.sessionContext = { ...this.sessionContext, view: e3.detail };
|
|
516
514
|
this._updateElementView();
|
|
517
515
|
});
|
|
518
516
|
this.addEventListener("qti-assessment-test-connected", () => {
|
|
519
517
|
this._updateElementView();
|
|
520
518
|
});
|
|
521
|
-
this.addEventListener("qti-assessment-item-connected", (
|
|
519
|
+
this.addEventListener("qti-assessment-item-connected", (e3) => {
|
|
522
520
|
this._updateElementView();
|
|
523
|
-
this._setCorrectResponseVisibility(
|
|
521
|
+
this._setCorrectResponseVisibility(e3.detail);
|
|
524
522
|
});
|
|
525
523
|
}
|
|
526
524
|
willUpdate(changedProperties) {
|
|
@@ -573,7 +571,7 @@ var TestBaseMixin = (superClass) => {
|
|
|
573
571
|
const context = assessmentItem._context;
|
|
574
572
|
const identifier = context.identifier;
|
|
575
573
|
const fullVariables = context.variables;
|
|
576
|
-
const itemContext = this.testContext.items.find((
|
|
574
|
+
const itemContext = this.testContext.items.find((i5) => i5?.identifier === identifier);
|
|
577
575
|
if (!itemContext) {
|
|
578
576
|
console.warn(`Item IDs between assessment.xml and item.xml should match: ${identifier} is not found!`);
|
|
579
577
|
return;
|
|
@@ -583,7 +581,7 @@ var TestBaseMixin = (superClass) => {
|
|
|
583
581
|
} else {
|
|
584
582
|
const newVariables = [...assessmentItem.variables];
|
|
585
583
|
for (const variable of itemContext.variables) {
|
|
586
|
-
const currentVariable = newVariables.find((
|
|
584
|
+
const currentVariable = newVariables.find((v2) => v2.identifier === variable.identifier);
|
|
587
585
|
if (currentVariable) {
|
|
588
586
|
currentVariable.value = variable.value;
|
|
589
587
|
} else {
|
|
@@ -599,7 +597,7 @@ var TestBaseMixin = (superClass) => {
|
|
|
599
597
|
const itemContext = this.testContext.items.find((item) => item.identifier === itemRefID);
|
|
600
598
|
if (itemContext) {
|
|
601
599
|
itemContext.variables = itemContext.variables.map((variable) => {
|
|
602
|
-
const updatedVariable = variables.find((
|
|
600
|
+
const updatedVariable = variables.find((v2) => v2.identifier === variable.identifier);
|
|
603
601
|
return updatedVariable ? { ...variable, ...updatedVariable } : variable;
|
|
604
602
|
});
|
|
605
603
|
}
|
|
@@ -611,11 +609,11 @@ var TestBaseMixin = (superClass) => {
|
|
|
611
609
|
}
|
|
612
610
|
}
|
|
613
611
|
_initializeEventListeners() {
|
|
614
|
-
this.addEventListener("qti-assessment-test-connected", (
|
|
612
|
+
this.addEventListener("qti-assessment-test-connected", (e3) => {
|
|
615
613
|
this.testContext = INITIAL_TEST_CONTEXT;
|
|
616
614
|
this.sessionContext = INITIAL_SESSION_CONTEXT;
|
|
617
615
|
if (this.testContext && this.testContext.items.length > 0) return;
|
|
618
|
-
this._testElement =
|
|
616
|
+
this._testElement = e3.detail;
|
|
619
617
|
const items = Array.from(this._testElement.querySelectorAll("qti-assessment-item-ref")).map((itemRef) => {
|
|
620
618
|
return {
|
|
621
619
|
href: itemRef.href,
|
|
@@ -632,19 +630,19 @@ var TestBaseMixin = (superClass) => {
|
|
|
632
630
|
});
|
|
633
631
|
this.testContext = { ...this.testContext, items };
|
|
634
632
|
});
|
|
635
|
-
this.addEventListener("qti-assessment-item-connected", (
|
|
636
|
-
const assessmentItem =
|
|
633
|
+
this.addEventListener("qti-assessment-item-connected", (e3) => {
|
|
634
|
+
const assessmentItem = e3.detail;
|
|
637
635
|
const assessmentRefId = assessmentItem.closest("qti-assessment-item-ref")?.identifier;
|
|
638
636
|
if (assessmentRefId) {
|
|
639
637
|
assessmentItem.assessmentItemRefId = assessmentRefId;
|
|
640
638
|
}
|
|
641
|
-
this._updateItemInTestContext(
|
|
639
|
+
this._updateItemInTestContext(e3.detail);
|
|
642
640
|
});
|
|
643
|
-
this.addEventListener("qti-item-context-updated", (
|
|
641
|
+
this.addEventListener("qti-item-context-updated", (e3) => {
|
|
644
642
|
this._updateItemVariablesInTestContext(
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
643
|
+
e3.detail.itemContext.identifier,
|
|
644
|
+
e3.detail.itemContext.variables,
|
|
645
|
+
e3.detail.itemContext.state
|
|
648
646
|
);
|
|
649
647
|
});
|
|
650
648
|
}
|
|
@@ -660,7 +658,7 @@ var TestBaseMixin = (superClass) => {
|
|
|
660
658
|
...itemContext,
|
|
661
659
|
// Keep other properties of the item context
|
|
662
660
|
variables: variables.map((variable) => {
|
|
663
|
-
const matchingVariable = itemContext.variables.find((
|
|
661
|
+
const matchingVariable = itemContext.variables.find((v2) => v2.identifier === variable.identifier);
|
|
664
662
|
return matchingVariable ? { ...matchingVariable, ...variable } : variable;
|
|
665
663
|
}),
|
|
666
664
|
...state !== void 0 ? { state: state ? { ...state } : void 0 } : {}
|
|
@@ -690,19 +688,19 @@ var TestProcessingMixin = (superClass) => {
|
|
|
690
688
|
class TestProcessingElement extends superClass {
|
|
691
689
|
constructor(...args) {
|
|
692
690
|
super(...args);
|
|
693
|
-
this.addEventListener("qti-register-variable", (
|
|
691
|
+
this.addEventListener("qti-register-variable", (e3) => {
|
|
694
692
|
this.testContext = {
|
|
695
693
|
...this.testContext,
|
|
696
|
-
testOutcomeVariables: [...this.testContext.testOutcomeVariables || [],
|
|
694
|
+
testOutcomeVariables: [...this.testContext.testOutcomeVariables || [], e3.detail.variable]
|
|
697
695
|
};
|
|
698
|
-
|
|
696
|
+
e3.stopPropagation();
|
|
699
697
|
});
|
|
700
698
|
this.addEventListener(
|
|
701
699
|
"qti-set-outcome-value",
|
|
702
|
-
(
|
|
703
|
-
const { outcomeIdentifier, value } =
|
|
700
|
+
(e3) => {
|
|
701
|
+
const { outcomeIdentifier, value } = e3.detail;
|
|
704
702
|
this.updateOutcomeVariable(outcomeIdentifier, value);
|
|
705
|
-
|
|
703
|
+
e3.stopPropagation();
|
|
706
704
|
}
|
|
707
705
|
);
|
|
708
706
|
}
|
|
@@ -721,13 +719,13 @@ var TestProcessingMixin = (superClass) => {
|
|
|
721
719
|
}
|
|
722
720
|
this.testContext = {
|
|
723
721
|
...this.testContext,
|
|
724
|
-
testOutcomeVariables: this.testContext.testOutcomeVariables?.map((
|
|
725
|
-
if (
|
|
726
|
-
return
|
|
722
|
+
testOutcomeVariables: this.testContext.testOutcomeVariables?.map((v2) => {
|
|
723
|
+
if (v2.identifier !== identifier) {
|
|
724
|
+
return v2;
|
|
727
725
|
}
|
|
728
726
|
return {
|
|
729
|
-
...
|
|
730
|
-
value: outcomeVariable.cardinality === "single" ? value : [...
|
|
727
|
+
...v2,
|
|
728
|
+
value: outcomeVariable.cardinality === "single" ? value : [...v2.value, value]
|
|
731
729
|
};
|
|
732
730
|
})
|
|
733
731
|
};
|
|
@@ -736,7 +734,7 @@ var TestProcessingMixin = (superClass) => {
|
|
|
736
734
|
return this.getVariable(identifier);
|
|
737
735
|
}
|
|
738
736
|
getVariable(identifier) {
|
|
739
|
-
return this.testContext.testOutcomeVariables?.find((
|
|
737
|
+
return this.testContext.testOutcomeVariables?.find((v2) => v2.identifier === identifier) || null;
|
|
740
738
|
}
|
|
741
739
|
/* --------------------------- ENABLED WHEN UNIT TESTING OUTCOME PROCESSING ------------------------------------ */
|
|
742
740
|
}
|
|
@@ -757,7 +755,7 @@ var QtiTest = class extends TestNavigationMixin(TestViewMixin(TestProcessingMixi
|
|
|
757
755
|
this.dispatchEvent(new CustomEvent("qti-test-connected", { detail: this }));
|
|
758
756
|
}
|
|
759
757
|
render() {
|
|
760
|
-
return
|
|
758
|
+
return T`<slot></slot>`;
|
|
761
759
|
}
|
|
762
760
|
};
|
|
763
761
|
QtiTest = __decorateClass([
|
|
@@ -855,7 +853,7 @@ var QtiAssessmentSection = class extends i2 {
|
|
|
855
853
|
);
|
|
856
854
|
}
|
|
857
855
|
render() {
|
|
858
|
-
return
|
|
856
|
+
return T`<slot name="qti-rubric-block"></slot><slot></slot>`;
|
|
859
857
|
}
|
|
860
858
|
};
|
|
861
859
|
__decorateClass([
|
|
@@ -907,7 +905,7 @@ var QtiAssessmentTest = class extends i2 {
|
|
|
907
905
|
);
|
|
908
906
|
}
|
|
909
907
|
render() {
|
|
910
|
-
return
|
|
908
|
+
return T` <slot></slot>`;
|
|
911
909
|
}
|
|
912
910
|
};
|
|
913
911
|
_title = new WeakMap();
|
|
@@ -954,7 +952,7 @@ var QtiTestPart = class extends i2 {
|
|
|
954
952
|
);
|
|
955
953
|
}
|
|
956
954
|
render() {
|
|
957
|
-
return
|
|
955
|
+
return T` <slot></slot>`;
|
|
958
956
|
}
|
|
959
957
|
};
|
|
960
958
|
_title2 = new WeakMap();
|
|
@@ -980,7 +978,7 @@ if (!customElements.get("qti-test-part")) {
|
|
|
980
978
|
// ../qti-test/src/components/qti-test-feedback/qti-test-feedback.ts
|
|
981
979
|
var QtiTestFeedback = class extends QtiModalFeedback {
|
|
982
980
|
render() {
|
|
983
|
-
return
|
|
981
|
+
return T``;
|
|
984
982
|
}
|
|
985
983
|
};
|
|
986
984
|
QtiTestFeedback.styles = i`
|
|
@@ -1038,7 +1036,7 @@ var TestNavigation = class extends i2 {
|
|
|
1038
1036
|
this.addEventListener("test-update-outcome-variable", __privateMethod(this, _TestNavigation_instances, handleTestUpdateOutcomeVariable_fn).bind(this));
|
|
1039
1037
|
}
|
|
1040
1038
|
render() {
|
|
1041
|
-
return
|
|
1039
|
+
return T`<slot></slot>`;
|
|
1042
1040
|
}
|
|
1043
1041
|
/* PK: on every change of the candidate we will recomputed the computedContext */
|
|
1044
1042
|
willUpdate(_changedProperties) {
|
|
@@ -1056,20 +1054,20 @@ var TestNavigation = class extends i2 {
|
|
|
1056
1054
|
...section,
|
|
1057
1055
|
active: this._sessionContext?.navSectionId === section.identifier || false,
|
|
1058
1056
|
completed: section.items.every(
|
|
1059
|
-
(item) => this._testContext.items.find((
|
|
1057
|
+
(item) => this._testContext.items.find((i5) => i5.identifier === item.identifier)?.variables.find((v2) => v2.identifier === "completionStatus").value === "completed"
|
|
1060
1058
|
),
|
|
1061
1059
|
items: section.items.map((item) => {
|
|
1062
|
-
const itemContext = this._testContext?.items.find((
|
|
1060
|
+
const itemContext = this._testContext?.items.find((i5) => i5.identifier === item.identifier);
|
|
1063
1061
|
const computedItem = {
|
|
1064
1062
|
...item,
|
|
1065
1063
|
...itemContext,
|
|
1066
|
-
...this.initContext?.find((
|
|
1064
|
+
...this.initContext?.find((i5) => i5.identifier === item.identifier)
|
|
1067
1065
|
};
|
|
1068
1066
|
const rawscore = computedItem.variables?.find((vr) => vr.identifier == "SCORE")?.value;
|
|
1069
1067
|
const score = rawscore === void 0 || rawscore === null ? null : parseFloat(rawscore?.toString());
|
|
1070
|
-
const completionStatus = computedItem.variables?.find((
|
|
1071
|
-
const response = computedItem.variables?.find((
|
|
1072
|
-
const numAttempts = computedItem.variables?.find((
|
|
1068
|
+
const completionStatus = computedItem.variables?.find((v2) => v2.identifier === "completionStatus")?.value;
|
|
1069
|
+
const response = computedItem.variables?.find((v2) => v2.identifier === "RESPONSE")?.value || "";
|
|
1070
|
+
const numAttempts = computedItem.variables?.find((v2) => v2.identifier === "numAttempts")?.value || 0;
|
|
1073
1071
|
const active = this._sessionContext?.navItemRefId === computedItem.identifier || false;
|
|
1074
1072
|
const index = item.categories.includes(this.configContext?.infoItemCategory) ? null : itemIndex++;
|
|
1075
1073
|
const rawMaxScore = item.variables?.find((vr) => vr.identifier == "MAXSCORE")?.value;
|
|
@@ -1170,7 +1168,7 @@ handleInteractionChanged_fn = function(_event) {
|
|
|
1170
1168
|
const assessmentItem = _event.composedPath()[0].closest(
|
|
1171
1169
|
"qti-assessment-item"
|
|
1172
1170
|
);
|
|
1173
|
-
const scoreOutcomeIdentifier = assessmentItem.variables.find((
|
|
1171
|
+
const scoreOutcomeIdentifier = assessmentItem.variables.find((v2) => v2.identifier === "SCORE");
|
|
1174
1172
|
if (scoreOutcomeIdentifier && scoreOutcomeIdentifier.externalScored === null && assessmentItem.adaptive === "false") {
|
|
1175
1173
|
const reportValidityAfterScoring = this.configContext?.reportValidityAfterScoring === true ? true : false;
|
|
1176
1174
|
assessmentItem.processResponse(true, reportValidityAfterScoring);
|
|
@@ -1227,7 +1225,7 @@ handleTestConnected_fn = function(event) {
|
|
|
1227
1225
|
identifier: section.identifier,
|
|
1228
1226
|
title: section.title,
|
|
1229
1227
|
items: itemElements.map((item) => ({
|
|
1230
|
-
...this.initContext?.find((
|
|
1228
|
+
...this.initContext?.find((i5) => i5.identifier === item.identifier),
|
|
1231
1229
|
active: false,
|
|
1232
1230
|
identifier: item.identifier,
|
|
1233
1231
|
categories: item.category ? item.category?.split(" ") : [],
|
|
@@ -1298,11 +1296,11 @@ handleItemConnected_fn = function(event) {
|
|
|
1298
1296
|
const externalScored = scoreOutcome?.getAttribute("externalScored");
|
|
1299
1297
|
const responseDeclarations = itemElement.querySelectorAll("qti-response-declaration");
|
|
1300
1298
|
const containsCorrectResponse = Array.from(responseDeclarations).some(
|
|
1301
|
-
(
|
|
1299
|
+
(r4) => r4.querySelector("qti-correct-response")
|
|
1302
1300
|
);
|
|
1303
|
-
const containsMapping = Array.from(responseDeclarations).some((
|
|
1304
|
-
const mapping =
|
|
1305
|
-
const areaMapping =
|
|
1301
|
+
const containsMapping = Array.from(responseDeclarations).some((r4) => {
|
|
1302
|
+
const mapping = r4.querySelector("qti-mapping");
|
|
1303
|
+
const areaMapping = r4.querySelector("qti-area-mapping");
|
|
1306
1304
|
return mapping?.querySelector("qti-map-entry") || areaMapping?.querySelector("qti-area-map-entry");
|
|
1307
1305
|
});
|
|
1308
1306
|
const hasCorrectResponse = containsCorrectResponse || containsMapping;
|
|
@@ -1391,8 +1389,8 @@ var TestNext = class extends i2 {
|
|
|
1391
1389
|
__privateSet(this, _internals, this.attachInternals());
|
|
1392
1390
|
__privateGet(this, _internals).role = "button";
|
|
1393
1391
|
__privateGet(this, _internals).ariaLabel = "Next item";
|
|
1394
|
-
this.addEventListener("click", (
|
|
1395
|
-
|
|
1392
|
+
this.addEventListener("click", (e3) => {
|
|
1393
|
+
e3.preventDefault();
|
|
1396
1394
|
if (!this._internalDisabled) this._requestItem(this.sectionItems[this.itemIndex + 1].identifier);
|
|
1397
1395
|
});
|
|
1398
1396
|
}
|
|
@@ -1429,7 +1427,7 @@ var TestNext = class extends i2 {
|
|
|
1429
1427
|
);
|
|
1430
1428
|
}
|
|
1431
1429
|
render() {
|
|
1432
|
-
return
|
|
1430
|
+
return T`<slot></slot>`;
|
|
1433
1431
|
}
|
|
1434
1432
|
};
|
|
1435
1433
|
_internals = new WeakMap();
|
|
@@ -1459,8 +1457,8 @@ var TestPrev = class extends i2 {
|
|
|
1459
1457
|
constructor() {
|
|
1460
1458
|
super();
|
|
1461
1459
|
this._internalDisabled = true;
|
|
1462
|
-
this.addEventListener("click", (
|
|
1463
|
-
|
|
1460
|
+
this.addEventListener("click", (e3) => {
|
|
1461
|
+
e3.preventDefault();
|
|
1464
1462
|
if (!this._internalDisabled) this._requestItem(this.sectionItems[this.itemIndex - 1].identifier);
|
|
1465
1463
|
});
|
|
1466
1464
|
}
|
|
@@ -1493,7 +1491,7 @@ var TestPrev = class extends i2 {
|
|
|
1493
1491
|
);
|
|
1494
1492
|
}
|
|
1495
1493
|
render() {
|
|
1496
|
-
return
|
|
1494
|
+
return T`<slot></slot>`;
|
|
1497
1495
|
}
|
|
1498
1496
|
};
|
|
1499
1497
|
TestPrev.styles = i`
|
|
@@ -1543,18 +1541,18 @@ var TestView = class extends i2 {
|
|
|
1543
1541
|
);
|
|
1544
1542
|
}
|
|
1545
1543
|
render() {
|
|
1546
|
-
return
|
|
1544
|
+
return T`
|
|
1547
1545
|
<label part="label" for="viewSelect">${this.label}</label>
|
|
1548
1546
|
<select
|
|
1549
1547
|
part="select"
|
|
1550
1548
|
id="viewSelect"
|
|
1551
|
-
@change=${(
|
|
1552
|
-
const el =
|
|
1549
|
+
@change=${(e3) => {
|
|
1550
|
+
const el = e3.target;
|
|
1553
1551
|
this._switchView(el.value);
|
|
1554
1552
|
}}
|
|
1555
1553
|
>
|
|
1556
1554
|
${this._viewOptions.map(
|
|
1557
|
-
(
|
|
1555
|
+
(v2) => T`<option value="${v2}" ?selected=${v2 === this.sessionContext.view}>${v2}</option>`
|
|
1558
1556
|
)}
|
|
1559
1557
|
</select>
|
|
1560
1558
|
`;
|
|
@@ -1609,7 +1607,7 @@ var TestItemLink = class extends i2 {
|
|
|
1609
1607
|
);
|
|
1610
1608
|
}
|
|
1611
1609
|
render() {
|
|
1612
|
-
return
|
|
1610
|
+
return T` <slot></slot> `;
|
|
1613
1611
|
}
|
|
1614
1612
|
};
|
|
1615
1613
|
TestItemLink.styles = i`
|
|
@@ -1634,7 +1632,7 @@ var TestEndAttempt = class extends i2 {
|
|
|
1634
1632
|
this.addEventListener("click", () => this.dispatchEvent(new CustomEvent("test-end-attempt", { bubbles: true })));
|
|
1635
1633
|
}
|
|
1636
1634
|
render() {
|
|
1637
|
-
return
|
|
1635
|
+
return T` <slot></slot> `;
|
|
1638
1636
|
}
|
|
1639
1637
|
};
|
|
1640
1638
|
TestEndAttempt.styles = i`
|
|
@@ -1670,9 +1668,9 @@ var TestShowCorrectResponse = class extends i2 {
|
|
|
1670
1668
|
__privateSet(this, _previousActiveItem, activeItem);
|
|
1671
1669
|
}
|
|
1672
1670
|
if (activeItem) {
|
|
1673
|
-
const containsCorrectResponse = !!activeItem?.variables?.some((
|
|
1674
|
-
const containsMapping = !!activeItem?.variables?.some((
|
|
1675
|
-
return
|
|
1671
|
+
const containsCorrectResponse = !!activeItem?.variables?.some((v2) => v2["correctResponse"]);
|
|
1672
|
+
const containsMapping = !!activeItem?.variables?.some((v2) => {
|
|
1673
|
+
return v2["mapping"]?.mapEntries?.length > 0 || v2["areaMapping"]?.areaMapEntries?.length > 0;
|
|
1676
1674
|
});
|
|
1677
1675
|
this.disabled = !containsCorrectResponse && !containsMapping;
|
|
1678
1676
|
} else {
|
|
@@ -1680,7 +1678,7 @@ var TestShowCorrectResponse = class extends i2 {
|
|
|
1680
1678
|
}
|
|
1681
1679
|
}
|
|
1682
1680
|
render() {
|
|
1683
|
-
return
|
|
1681
|
+
return T` <div @click="${__privateMethod(this, _TestShowCorrectResponse_instances, toggleState_fn)}">${__privateMethod(this, _TestShowCorrectResponse_instances, getDisplayedText_fn).call(this)}</div> `;
|
|
1684
1682
|
}
|
|
1685
1683
|
};
|
|
1686
1684
|
_previousActiveItem = new WeakMap();
|
|
@@ -1728,6 +1726,251 @@ TestShowCorrectResponse = __decorateClass([
|
|
|
1728
1726
|
t("test-show-correct-response")
|
|
1729
1727
|
], TestShowCorrectResponse);
|
|
1730
1728
|
|
|
1729
|
+
// ../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/node/lit-html.js
|
|
1730
|
+
var t2 = globalThis;
|
|
1731
|
+
var i3 = t2.trustedTypes;
|
|
1732
|
+
var s = i3 ? i3.createPolicy("lit-html", { createHTML: (t3) => t3 }) : void 0;
|
|
1733
|
+
var e2 = "$lit$";
|
|
1734
|
+
var h = `lit$${Math.random().toFixed(9).slice(2)}$`;
|
|
1735
|
+
var o = "?" + h;
|
|
1736
|
+
var n2 = `<${o}>`;
|
|
1737
|
+
var r2 = void 0 === t2.document ? { createTreeWalker: () => ({}) } : document;
|
|
1738
|
+
var l = () => r2.createComment("");
|
|
1739
|
+
var c2 = (t3) => null === t3 || "object" != typeof t3 && "function" != typeof t3;
|
|
1740
|
+
var a = Array.isArray;
|
|
1741
|
+
var u = (t3) => a(t3) || "function" == typeof t3?.[Symbol.iterator];
|
|
1742
|
+
var d = "[ \n\f\r]";
|
|
1743
|
+
var f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g;
|
|
1744
|
+
var v = /-->/g;
|
|
1745
|
+
var _ = />/g;
|
|
1746
|
+
var m2 = RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^
|
|
1747
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g");
|
|
1748
|
+
var p = /'/g;
|
|
1749
|
+
var g = /"/g;
|
|
1750
|
+
var $ = /^(?:script|style|textarea|title)$/i;
|
|
1751
|
+
var y = (t3) => (i5, ...s2) => ({ _$litType$: t3, strings: i5, values: s2 });
|
|
1752
|
+
var x = y(1);
|
|
1753
|
+
var T2 = y(2);
|
|
1754
|
+
var b = y(3);
|
|
1755
|
+
var w = /* @__PURE__ */ Symbol.for("lit-noChange");
|
|
1756
|
+
var E = /* @__PURE__ */ Symbol.for("lit-nothing");
|
|
1757
|
+
var A2 = /* @__PURE__ */ new WeakMap();
|
|
1758
|
+
var C = r2.createTreeWalker(r2, 129);
|
|
1759
|
+
function P(t3, i5) {
|
|
1760
|
+
if (!a(t3) || !t3.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
1761
|
+
return void 0 !== s ? s.createHTML(i5) : i5;
|
|
1762
|
+
}
|
|
1763
|
+
var V = (t3, i5) => {
|
|
1764
|
+
const s2 = t3.length - 1, o2 = [];
|
|
1765
|
+
let r4, l2 = 2 === i5 ? "<svg>" : 3 === i5 ? "<math>" : "", c3 = f;
|
|
1766
|
+
for (let i6 = 0; i6 < s2; i6++) {
|
|
1767
|
+
const s3 = t3[i6];
|
|
1768
|
+
let a2, u2, d2 = -1, y2 = 0;
|
|
1769
|
+
for (; y2 < s3.length && (c3.lastIndex = y2, u2 = c3.exec(s3), null !== u2); ) y2 = c3.lastIndex, c3 === f ? "!--" === u2[1] ? c3 = v : void 0 !== u2[1] ? c3 = _ : void 0 !== u2[2] ? ($.test(u2[2]) && (r4 = RegExp("</" + u2[2], "g")), c3 = m2) : void 0 !== u2[3] && (c3 = m2) : c3 === m2 ? ">" === u2[0] ? (c3 = r4 ?? f, d2 = -1) : void 0 === u2[1] ? d2 = -2 : (d2 = c3.lastIndex - u2[2].length, a2 = u2[1], c3 = void 0 === u2[3] ? m2 : '"' === u2[3] ? g : p) : c3 === g || c3 === p ? c3 = m2 : c3 === v || c3 === _ ? c3 = f : (c3 = m2, r4 = void 0);
|
|
1770
|
+
const x2 = c3 === m2 && t3[i6 + 1].startsWith("/>") ? " " : "";
|
|
1771
|
+
l2 += c3 === f ? s3 + n2 : d2 >= 0 ? (o2.push(a2), s3.slice(0, d2) + e2 + s3.slice(d2) + h + x2) : s3 + h + (-2 === d2 ? i6 : x2);
|
|
1772
|
+
}
|
|
1773
|
+
return [P(t3, l2 + (t3[s2] || "<?>") + (2 === i5 ? "</svg>" : 3 === i5 ? "</math>" : "")), o2];
|
|
1774
|
+
};
|
|
1775
|
+
var N = class _N {
|
|
1776
|
+
constructor({ strings: t3, _$litType$: s2 }, n3) {
|
|
1777
|
+
let r4;
|
|
1778
|
+
this.parts = [];
|
|
1779
|
+
let c3 = 0, a2 = 0;
|
|
1780
|
+
const u2 = t3.length - 1, d2 = this.parts, [f2, v2] = V(t3, s2);
|
|
1781
|
+
if (this.el = _N.createElement(f2, n3), C.currentNode = this.el.content, 2 === s2 || 3 === s2) {
|
|
1782
|
+
const t4 = this.el.content.firstChild;
|
|
1783
|
+
t4.replaceWith(...t4.childNodes);
|
|
1784
|
+
}
|
|
1785
|
+
for (; null !== (r4 = C.nextNode()) && d2.length < u2; ) {
|
|
1786
|
+
if (1 === r4.nodeType) {
|
|
1787
|
+
if (r4.hasAttributes()) for (const t4 of r4.getAttributeNames()) if (t4.endsWith(e2)) {
|
|
1788
|
+
const i5 = v2[a2++], s3 = r4.getAttribute(t4).split(h), e3 = /([.?@])?(.*)/.exec(i5);
|
|
1789
|
+
d2.push({ type: 1, index: c3, name: e3[2], strings: s3, ctor: "." === e3[1] ? H : "?" === e3[1] ? I : "@" === e3[1] ? L : R }), r4.removeAttribute(t4);
|
|
1790
|
+
} else t4.startsWith(h) && (d2.push({ type: 6, index: c3 }), r4.removeAttribute(t4));
|
|
1791
|
+
if ($.test(r4.tagName)) {
|
|
1792
|
+
const t4 = r4.textContent.split(h), s3 = t4.length - 1;
|
|
1793
|
+
if (s3 > 0) {
|
|
1794
|
+
r4.textContent = i3 ? i3.emptyScript : "";
|
|
1795
|
+
for (let i5 = 0; i5 < s3; i5++) r4.append(t4[i5], l()), C.nextNode(), d2.push({ type: 2, index: ++c3 });
|
|
1796
|
+
r4.append(t4[s3], l());
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
} else if (8 === r4.nodeType) if (r4.data === o) d2.push({ type: 2, index: c3 });
|
|
1800
|
+
else {
|
|
1801
|
+
let t4 = -1;
|
|
1802
|
+
for (; -1 !== (t4 = r4.data.indexOf(h, t4 + 1)); ) d2.push({ type: 7, index: c3 }), t4 += h.length - 1;
|
|
1803
|
+
}
|
|
1804
|
+
c3++;
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
static createElement(t3, i5) {
|
|
1808
|
+
const s2 = r2.createElement("template");
|
|
1809
|
+
return s2.innerHTML = t3, s2;
|
|
1810
|
+
}
|
|
1811
|
+
};
|
|
1812
|
+
function S(t3, i5, s2 = t3, e3) {
|
|
1813
|
+
if (i5 === w) return i5;
|
|
1814
|
+
let h2 = void 0 !== e3 ? s2._$Co?.[e3] : s2._$Cl;
|
|
1815
|
+
const o2 = c2(i5) ? void 0 : i5._$litDirective$;
|
|
1816
|
+
return h2?.constructor !== o2 && (h2?._$AO?.(false), void 0 === o2 ? h2 = void 0 : (h2 = new o2(t3), h2._$AT(t3, s2, e3)), void 0 !== e3 ? (s2._$Co ??= [])[e3] = h2 : s2._$Cl = h2), void 0 !== h2 && (i5 = S(t3, h2._$AS(t3, i5.values), h2, e3)), i5;
|
|
1817
|
+
}
|
|
1818
|
+
var M = class {
|
|
1819
|
+
constructor(t3, i5) {
|
|
1820
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t3, this._$AM = i5;
|
|
1821
|
+
}
|
|
1822
|
+
get parentNode() {
|
|
1823
|
+
return this._$AM.parentNode;
|
|
1824
|
+
}
|
|
1825
|
+
get _$AU() {
|
|
1826
|
+
return this._$AM._$AU;
|
|
1827
|
+
}
|
|
1828
|
+
u(t3) {
|
|
1829
|
+
const { el: { content: i5 }, parts: s2 } = this._$AD, e3 = (t3?.creationScope ?? r2).importNode(i5, true);
|
|
1830
|
+
C.currentNode = e3;
|
|
1831
|
+
let h2 = C.nextNode(), o2 = 0, n3 = 0, l2 = s2[0];
|
|
1832
|
+
for (; void 0 !== l2; ) {
|
|
1833
|
+
if (o2 === l2.index) {
|
|
1834
|
+
let i6;
|
|
1835
|
+
2 === l2.type ? i6 = new k(h2, h2.nextSibling, this, t3) : 1 === l2.type ? i6 = new l2.ctor(h2, l2.name, l2.strings, this, t3) : 6 === l2.type && (i6 = new z(h2, this, t3)), this._$AV.push(i6), l2 = s2[++n3];
|
|
1836
|
+
}
|
|
1837
|
+
o2 !== l2?.index && (h2 = C.nextNode(), o2++);
|
|
1838
|
+
}
|
|
1839
|
+
return C.currentNode = r2, e3;
|
|
1840
|
+
}
|
|
1841
|
+
p(t3) {
|
|
1842
|
+
let i5 = 0;
|
|
1843
|
+
for (const s2 of this._$AV) void 0 !== s2 && (void 0 !== s2.strings ? (s2._$AI(t3, s2, i5), i5 += s2.strings.length - 2) : s2._$AI(t3[i5])), i5++;
|
|
1844
|
+
}
|
|
1845
|
+
};
|
|
1846
|
+
var k = class _k {
|
|
1847
|
+
get _$AU() {
|
|
1848
|
+
return this._$AM?._$AU ?? this._$Cv;
|
|
1849
|
+
}
|
|
1850
|
+
constructor(t3, i5, s2, e3) {
|
|
1851
|
+
this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t3, this._$AB = i5, this._$AM = s2, this.options = e3, this._$Cv = e3?.isConnected ?? true;
|
|
1852
|
+
}
|
|
1853
|
+
get parentNode() {
|
|
1854
|
+
let t3 = this._$AA.parentNode;
|
|
1855
|
+
const i5 = this._$AM;
|
|
1856
|
+
return void 0 !== i5 && 11 === t3?.nodeType && (t3 = i5.parentNode), t3;
|
|
1857
|
+
}
|
|
1858
|
+
get startNode() {
|
|
1859
|
+
return this._$AA;
|
|
1860
|
+
}
|
|
1861
|
+
get endNode() {
|
|
1862
|
+
return this._$AB;
|
|
1863
|
+
}
|
|
1864
|
+
_$AI(t3, i5 = this) {
|
|
1865
|
+
t3 = S(this, t3, i5), c2(t3) ? t3 === E || null == t3 || "" === t3 ? (this._$AH !== E && this._$AR(), this._$AH = E) : t3 !== this._$AH && t3 !== w && this._(t3) : void 0 !== t3._$litType$ ? this.$(t3) : void 0 !== t3.nodeType ? this.T(t3) : u(t3) ? this.k(t3) : this._(t3);
|
|
1866
|
+
}
|
|
1867
|
+
O(t3) {
|
|
1868
|
+
return this._$AA.parentNode.insertBefore(t3, this._$AB);
|
|
1869
|
+
}
|
|
1870
|
+
T(t3) {
|
|
1871
|
+
this._$AH !== t3 && (this._$AR(), this._$AH = this.O(t3));
|
|
1872
|
+
}
|
|
1873
|
+
_(t3) {
|
|
1874
|
+
this._$AH !== E && c2(this._$AH) ? this._$AA.nextSibling.data = t3 : this.T(r2.createTextNode(t3)), this._$AH = t3;
|
|
1875
|
+
}
|
|
1876
|
+
$(t3) {
|
|
1877
|
+
const { values: i5, _$litType$: s2 } = t3, e3 = "number" == typeof s2 ? this._$AC(t3) : (void 0 === s2.el && (s2.el = N.createElement(P(s2.h, s2.h[0]), this.options)), s2);
|
|
1878
|
+
if (this._$AH?._$AD === e3) this._$AH.p(i5);
|
|
1879
|
+
else {
|
|
1880
|
+
const t4 = new M(e3, this), s3 = t4.u(this.options);
|
|
1881
|
+
t4.p(i5), this.T(s3), this._$AH = t4;
|
|
1882
|
+
}
|
|
1883
|
+
}
|
|
1884
|
+
_$AC(t3) {
|
|
1885
|
+
let i5 = A2.get(t3.strings);
|
|
1886
|
+
return void 0 === i5 && A2.set(t3.strings, i5 = new N(t3)), i5;
|
|
1887
|
+
}
|
|
1888
|
+
k(t3) {
|
|
1889
|
+
a(this._$AH) || (this._$AH = [], this._$AR());
|
|
1890
|
+
const i5 = this._$AH;
|
|
1891
|
+
let s2, e3 = 0;
|
|
1892
|
+
for (const h2 of t3) e3 === i5.length ? i5.push(s2 = new _k(this.O(l()), this.O(l()), this, this.options)) : s2 = i5[e3], s2._$AI(h2), e3++;
|
|
1893
|
+
e3 < i5.length && (this._$AR(s2 && s2._$AB.nextSibling, e3), i5.length = e3);
|
|
1894
|
+
}
|
|
1895
|
+
_$AR(t3 = this._$AA.nextSibling, i5) {
|
|
1896
|
+
for (this._$AP?.(false, true, i5); t3 !== this._$AB; ) {
|
|
1897
|
+
const i6 = t3.nextSibling;
|
|
1898
|
+
t3.remove(), t3 = i6;
|
|
1899
|
+
}
|
|
1900
|
+
}
|
|
1901
|
+
setConnected(t3) {
|
|
1902
|
+
void 0 === this._$AM && (this._$Cv = t3, this._$AP?.(t3));
|
|
1903
|
+
}
|
|
1904
|
+
};
|
|
1905
|
+
var R = class {
|
|
1906
|
+
get tagName() {
|
|
1907
|
+
return this.element.tagName;
|
|
1908
|
+
}
|
|
1909
|
+
get _$AU() {
|
|
1910
|
+
return this._$AM._$AU;
|
|
1911
|
+
}
|
|
1912
|
+
constructor(t3, i5, s2, e3, h2) {
|
|
1913
|
+
this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t3, this.name = i5, this._$AM = e3, this.options = h2, s2.length > 2 || "" !== s2[0] || "" !== s2[1] ? (this._$AH = Array(s2.length - 1).fill(new String()), this.strings = s2) : this._$AH = E;
|
|
1914
|
+
}
|
|
1915
|
+
_$AI(t3, i5 = this, s2, e3) {
|
|
1916
|
+
const h2 = this.strings;
|
|
1917
|
+
let o2 = false;
|
|
1918
|
+
if (void 0 === h2) t3 = S(this, t3, i5, 0), o2 = !c2(t3) || t3 !== this._$AH && t3 !== w, o2 && (this._$AH = t3);
|
|
1919
|
+
else {
|
|
1920
|
+
const e4 = t3;
|
|
1921
|
+
let n3, r4;
|
|
1922
|
+
for (t3 = h2[0], n3 = 0; n3 < h2.length - 1; n3++) r4 = S(this, e4[s2 + n3], i5, n3), r4 === w && (r4 = this._$AH[n3]), o2 ||= !c2(r4) || r4 !== this._$AH[n3], r4 === E ? t3 = E : t3 !== E && (t3 += (r4 ?? "") + h2[n3 + 1]), this._$AH[n3] = r4;
|
|
1923
|
+
}
|
|
1924
|
+
o2 && !e3 && this.j(t3);
|
|
1925
|
+
}
|
|
1926
|
+
j(t3) {
|
|
1927
|
+
t3 === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t3 ?? "");
|
|
1928
|
+
}
|
|
1929
|
+
};
|
|
1930
|
+
var H = class extends R {
|
|
1931
|
+
constructor() {
|
|
1932
|
+
super(...arguments), this.type = 3;
|
|
1933
|
+
}
|
|
1934
|
+
j(t3) {
|
|
1935
|
+
this.element[this.name] = t3 === E ? void 0 : t3;
|
|
1936
|
+
}
|
|
1937
|
+
};
|
|
1938
|
+
var I = class extends R {
|
|
1939
|
+
constructor() {
|
|
1940
|
+
super(...arguments), this.type = 4;
|
|
1941
|
+
}
|
|
1942
|
+
j(t3) {
|
|
1943
|
+
this.element.toggleAttribute(this.name, !!t3 && t3 !== E);
|
|
1944
|
+
}
|
|
1945
|
+
};
|
|
1946
|
+
var L = class extends R {
|
|
1947
|
+
constructor(t3, i5, s2, e3, h2) {
|
|
1948
|
+
super(t3, i5, s2, e3, h2), this.type = 5;
|
|
1949
|
+
}
|
|
1950
|
+
_$AI(t3, i5 = this) {
|
|
1951
|
+
if ((t3 = S(this, t3, i5, 0) ?? E) === w) return;
|
|
1952
|
+
const s2 = this._$AH, e3 = t3 === E && s2 !== E || t3.capture !== s2.capture || t3.once !== s2.once || t3.passive !== s2.passive, h2 = t3 !== E && (s2 === E || e3);
|
|
1953
|
+
e3 && this.element.removeEventListener(this.name, this, s2), h2 && this.element.addEventListener(this.name, this, t3), this._$AH = t3;
|
|
1954
|
+
}
|
|
1955
|
+
handleEvent(t3) {
|
|
1956
|
+
"function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t3) : this._$AH.handleEvent(t3);
|
|
1957
|
+
}
|
|
1958
|
+
};
|
|
1959
|
+
var z = class {
|
|
1960
|
+
constructor(t3, i5, s2) {
|
|
1961
|
+
this.element = t3, this.type = 6, this._$AN = void 0, this._$AM = i5, this.options = s2;
|
|
1962
|
+
}
|
|
1963
|
+
get _$AU() {
|
|
1964
|
+
return this._$AM._$AU;
|
|
1965
|
+
}
|
|
1966
|
+
_$AI(t3) {
|
|
1967
|
+
S(this, t3);
|
|
1968
|
+
}
|
|
1969
|
+
};
|
|
1970
|
+
var W = { M: e2, P: h, A: o, C: 1, L: V, R: M, D: u, V: S, I: k, H: R, N: I, U: L, B: H, F: z };
|
|
1971
|
+
var Z = t2.litHtmlPolyfillSupport;
|
|
1972
|
+
Z?.(N, k), (t2.litHtmlVersions ??= []).push("3.3.1");
|
|
1973
|
+
|
|
1731
1974
|
// ../../node_modules/.pnpm/@heximal+expressions@0.1.5/node_modules/@heximal/expressions/lib/constants.js
|
|
1732
1975
|
var KEYWORDS = ["this"];
|
|
1733
1976
|
var UNARY_OPERATORS = ["+", "-", "!"];
|
|
@@ -1892,11 +2135,11 @@ var Tokenizer = class {
|
|
|
1892
2135
|
}
|
|
1893
2136
|
}
|
|
1894
2137
|
#getValue(lookahead = 0) {
|
|
1895
|
-
const
|
|
2138
|
+
const v2 = this.#input.substring(this.#tokenStart, this.#index + lookahead);
|
|
1896
2139
|
if (lookahead === 0) {
|
|
1897
2140
|
this.#clearValue();
|
|
1898
2141
|
}
|
|
1899
|
-
return
|
|
2142
|
+
return v2;
|
|
1900
2143
|
}
|
|
1901
2144
|
#clearValue() {
|
|
1902
2145
|
this.#tokenStart = this.#index;
|
|
@@ -1915,9 +2158,9 @@ var Tokenizer = class {
|
|
|
1915
2158
|
}
|
|
1916
2159
|
this.#advance();
|
|
1917
2160
|
}
|
|
1918
|
-
const
|
|
2161
|
+
const t3 = token(Kind.STRING, escapeString(this.#getValue()));
|
|
1919
2162
|
this.#advance();
|
|
1920
|
-
return
|
|
2163
|
+
return t3;
|
|
1921
2164
|
}
|
|
1922
2165
|
#tokenizeIdentOrKeyword() {
|
|
1923
2166
|
do {
|
|
@@ -1977,9 +2220,9 @@ var Tokenizer = class {
|
|
|
1977
2220
|
}
|
|
1978
2221
|
#tokenizeGrouper() {
|
|
1979
2222
|
const value = String.fromCharCode(this.#next);
|
|
1980
|
-
const
|
|
2223
|
+
const t3 = token(Kind.GROUPER, value, PRECEDENCE[value]);
|
|
1981
2224
|
this.#advance(true);
|
|
1982
|
-
return
|
|
2225
|
+
return t3;
|
|
1983
2226
|
}
|
|
1984
2227
|
};
|
|
1985
2228
|
|
|
@@ -2003,10 +2246,10 @@ var Parser = class {
|
|
|
2003
2246
|
if (!this._matches(kind, value)) {
|
|
2004
2247
|
throw new Error(`Expected kind ${kind} (${value}), was ${this.#token?.kind} (${this.#token?.value})`);
|
|
2005
2248
|
}
|
|
2006
|
-
const
|
|
2007
|
-
this.#token =
|
|
2008
|
-
this.#kind =
|
|
2009
|
-
this.#value =
|
|
2249
|
+
const t3 = this.#tokenizer.nextToken();
|
|
2250
|
+
this.#token = t3;
|
|
2251
|
+
this.#kind = t3?.kind;
|
|
2252
|
+
this.#value = t3?.value;
|
|
2010
2253
|
}
|
|
2011
2254
|
_matches(kind, value) {
|
|
2012
2255
|
return !(kind && this.#kind !== kind || value && this.#value !== value);
|
|
@@ -2212,7 +2455,7 @@ var Parser = class {
|
|
|
2212
2455
|
if (this._matches(Kind.ARROW)) {
|
|
2213
2456
|
this.#advance();
|
|
2214
2457
|
const body = this.#parseExpression();
|
|
2215
|
-
const params = expressions?.map((
|
|
2458
|
+
const params = expressions?.map((e3) => e3.value) ?? [];
|
|
2216
2459
|
return this.#ast.arrowFunction(params, body);
|
|
2217
2460
|
} else {
|
|
2218
2461
|
return this.#ast.paren(expressions[0]);
|
|
@@ -2238,29 +2481,29 @@ var Parser = class {
|
|
|
2238
2481
|
// ../../node_modules/.pnpm/@heximal+expressions@0.1.5/node_modules/@heximal/expressions/lib/eval.js
|
|
2239
2482
|
var { hasOwn, fromEntries } = Object;
|
|
2240
2483
|
var _BINARY_OPERATORS = {
|
|
2241
|
-
"+": (
|
|
2242
|
-
"-": (
|
|
2243
|
-
"*": (
|
|
2244
|
-
"/": (
|
|
2245
|
-
"%": (
|
|
2246
|
-
"==": (
|
|
2247
|
-
"!=": (
|
|
2248
|
-
"===": (
|
|
2249
|
-
"!==": (
|
|
2250
|
-
">": (
|
|
2251
|
-
">=": (
|
|
2252
|
-
"<": (
|
|
2253
|
-
"<=": (
|
|
2254
|
-
"||": (
|
|
2255
|
-
"&&": (
|
|
2256
|
-
"??": (
|
|
2257
|
-
"|": (
|
|
2258
|
-
"|>": (
|
|
2484
|
+
"+": (a2, b2) => a2 + b2,
|
|
2485
|
+
"-": (a2, b2) => a2 - b2,
|
|
2486
|
+
"*": (a2, b2) => a2 * b2,
|
|
2487
|
+
"/": (a2, b2) => a2 / b2,
|
|
2488
|
+
"%": (a2, b2) => a2 % b2,
|
|
2489
|
+
"==": (a2, b2) => a2 == b2,
|
|
2490
|
+
"!=": (a2, b2) => a2 != b2,
|
|
2491
|
+
"===": (a2, b2) => a2 === b2,
|
|
2492
|
+
"!==": (a2, b2) => a2 !== b2,
|
|
2493
|
+
">": (a2, b2) => a2 > b2,
|
|
2494
|
+
">=": (a2, b2) => a2 >= b2,
|
|
2495
|
+
"<": (a2, b2) => a2 < b2,
|
|
2496
|
+
"<=": (a2, b2) => a2 <= b2,
|
|
2497
|
+
"||": (a2, b2) => a2 || b2,
|
|
2498
|
+
"&&": (a2, b2) => a2 && b2,
|
|
2499
|
+
"??": (a2, b2) => a2 ?? b2,
|
|
2500
|
+
"|": (a2, f2) => f2(a2),
|
|
2501
|
+
"|>": (a2, f2) => f2(a2)
|
|
2259
2502
|
};
|
|
2260
2503
|
var _UNARY_OPERATORS = {
|
|
2261
|
-
"+": (
|
|
2262
|
-
"-": (
|
|
2263
|
-
"!": (
|
|
2504
|
+
"+": (a2) => a2,
|
|
2505
|
+
"-": (a2) => -a2,
|
|
2506
|
+
"!": (a2) => !a2
|
|
2264
2507
|
};
|
|
2265
2508
|
var EvalAstFactory = class {
|
|
2266
2509
|
empty() {
|
|
@@ -2275,10 +2518,10 @@ var EvalAstFactory = class {
|
|
|
2275
2518
|
};
|
|
2276
2519
|
}
|
|
2277
2520
|
// TODO(justinfagnani): just use a JS literal?
|
|
2278
|
-
literal(
|
|
2521
|
+
literal(v2) {
|
|
2279
2522
|
return {
|
|
2280
2523
|
type: "Literal",
|
|
2281
|
-
value:
|
|
2524
|
+
value: v2,
|
|
2282
2525
|
evaluate(_scope) {
|
|
2283
2526
|
return this.value;
|
|
2284
2527
|
},
|
|
@@ -2287,10 +2530,10 @@ var EvalAstFactory = class {
|
|
|
2287
2530
|
}
|
|
2288
2531
|
};
|
|
2289
2532
|
}
|
|
2290
|
-
id(
|
|
2533
|
+
id(v2) {
|
|
2291
2534
|
return {
|
|
2292
2535
|
type: "ID",
|
|
2293
|
-
value:
|
|
2536
|
+
value: v2,
|
|
2294
2537
|
evaluate(scope) {
|
|
2295
2538
|
if (this.value === "this")
|
|
2296
2539
|
return scope;
|
|
@@ -2303,26 +2546,26 @@ var EvalAstFactory = class {
|
|
|
2303
2546
|
};
|
|
2304
2547
|
}
|
|
2305
2548
|
unary(op, expr) {
|
|
2306
|
-
const
|
|
2549
|
+
const f2 = _UNARY_OPERATORS[op];
|
|
2307
2550
|
return {
|
|
2308
2551
|
type: "Unary",
|
|
2309
2552
|
operator: op,
|
|
2310
2553
|
child: expr,
|
|
2311
2554
|
evaluate(scope) {
|
|
2312
|
-
return
|
|
2555
|
+
return f2(this.child.evaluate(scope));
|
|
2313
2556
|
},
|
|
2314
2557
|
getIds(idents) {
|
|
2315
2558
|
return this.child.getIds(idents);
|
|
2316
2559
|
}
|
|
2317
2560
|
};
|
|
2318
2561
|
}
|
|
2319
|
-
binary(
|
|
2320
|
-
const
|
|
2562
|
+
binary(l2, op, r4) {
|
|
2563
|
+
const f2 = _BINARY_OPERATORS[op];
|
|
2321
2564
|
return {
|
|
2322
2565
|
type: "Binary",
|
|
2323
2566
|
operator: op,
|
|
2324
|
-
left:
|
|
2325
|
-
right:
|
|
2567
|
+
left: l2,
|
|
2568
|
+
right: r4,
|
|
2326
2569
|
evaluate(scope) {
|
|
2327
2570
|
if (this.operator === "=") {
|
|
2328
2571
|
if (this.left.type !== "ID" && this.left.type !== "Getter" && this.left.type !== "Index") {
|
|
@@ -2343,7 +2586,7 @@ var EvalAstFactory = class {
|
|
|
2343
2586
|
}
|
|
2344
2587
|
return receiver === void 0 ? void 0 : receiver[property] = value;
|
|
2345
2588
|
}
|
|
2346
|
-
return
|
|
2589
|
+
return f2(this.left.evaluate(scope), this.right.evaluate(scope));
|
|
2347
2590
|
},
|
|
2348
2591
|
getIds(idents) {
|
|
2349
2592
|
this.left.getIds(idents);
|
|
@@ -2352,11 +2595,11 @@ var EvalAstFactory = class {
|
|
|
2352
2595
|
}
|
|
2353
2596
|
};
|
|
2354
2597
|
}
|
|
2355
|
-
getter(
|
|
2598
|
+
getter(g2, n3) {
|
|
2356
2599
|
return {
|
|
2357
2600
|
type: "Getter",
|
|
2358
|
-
receiver:
|
|
2359
|
-
name:
|
|
2601
|
+
receiver: g2,
|
|
2602
|
+
name: n3,
|
|
2360
2603
|
evaluate(scope) {
|
|
2361
2604
|
return this.receiver.evaluate(scope)?.[this.name];
|
|
2362
2605
|
},
|
|
@@ -2378,26 +2621,26 @@ var EvalAstFactory = class {
|
|
|
2378
2621
|
evaluate(scope) {
|
|
2379
2622
|
const receiver2 = this.receiver.evaluate(scope);
|
|
2380
2623
|
const _this = this.method ? receiver2 : scope?.["this"] ?? scope;
|
|
2381
|
-
const
|
|
2624
|
+
const f2 = this.method ? receiver2?.[method] : receiver2;
|
|
2382
2625
|
const args2 = this.arguments ?? [];
|
|
2383
|
-
const argValues = args2.map((
|
|
2384
|
-
return
|
|
2626
|
+
const argValues = args2.map((a2) => a2?.evaluate(scope));
|
|
2627
|
+
return f2?.apply?.(_this, argValues);
|
|
2385
2628
|
},
|
|
2386
2629
|
getIds(idents) {
|
|
2387
2630
|
this.receiver.getIds(idents);
|
|
2388
|
-
this.arguments?.forEach((
|
|
2631
|
+
this.arguments?.forEach((a2) => a2?.getIds(idents));
|
|
2389
2632
|
return idents;
|
|
2390
2633
|
}
|
|
2391
2634
|
};
|
|
2392
2635
|
}
|
|
2393
|
-
paren(
|
|
2394
|
-
return
|
|
2636
|
+
paren(e3) {
|
|
2637
|
+
return e3;
|
|
2395
2638
|
}
|
|
2396
|
-
index(
|
|
2639
|
+
index(e3, a2) {
|
|
2397
2640
|
return {
|
|
2398
2641
|
type: "Index",
|
|
2399
|
-
receiver:
|
|
2400
|
-
argument:
|
|
2642
|
+
receiver: e3,
|
|
2643
|
+
argument: a2,
|
|
2401
2644
|
evaluate(scope) {
|
|
2402
2645
|
return this.receiver.evaluate(scope)?.[this.argument.evaluate(scope)];
|
|
2403
2646
|
},
|
|
@@ -2407,15 +2650,15 @@ var EvalAstFactory = class {
|
|
|
2407
2650
|
}
|
|
2408
2651
|
};
|
|
2409
2652
|
}
|
|
2410
|
-
ternary(
|
|
2653
|
+
ternary(c3, t3, f2) {
|
|
2411
2654
|
return {
|
|
2412
2655
|
type: "Ternary",
|
|
2413
|
-
condition:
|
|
2414
|
-
trueExpr:
|
|
2415
|
-
falseExpr:
|
|
2656
|
+
condition: c3,
|
|
2657
|
+
trueExpr: t3,
|
|
2658
|
+
falseExpr: f2,
|
|
2416
2659
|
evaluate(scope) {
|
|
2417
|
-
const
|
|
2418
|
-
if (
|
|
2660
|
+
const c4 = this.condition.evaluate(scope);
|
|
2661
|
+
if (c4) {
|
|
2419
2662
|
return this.trueExpr.evaluate(scope);
|
|
2420
2663
|
} else {
|
|
2421
2664
|
return this.falseExpr.evaluate(scope);
|
|
@@ -2459,15 +2702,15 @@ var EvalAstFactory = class {
|
|
|
2459
2702
|
};
|
|
2460
2703
|
}
|
|
2461
2704
|
// TODO(justinfagnani): if the list is deeply literal
|
|
2462
|
-
list(
|
|
2705
|
+
list(l2) {
|
|
2463
2706
|
return {
|
|
2464
2707
|
type: "List",
|
|
2465
|
-
items:
|
|
2708
|
+
items: l2,
|
|
2466
2709
|
evaluate(scope) {
|
|
2467
|
-
return this.items?.map((
|
|
2710
|
+
return this.items?.map((a2) => a2?.evaluate(scope));
|
|
2468
2711
|
},
|
|
2469
2712
|
getIds(idents) {
|
|
2470
|
-
this.items?.forEach((
|
|
2713
|
+
this.items?.forEach((i5) => i5?.getIds(idents));
|
|
2471
2714
|
return idents;
|
|
2472
2715
|
}
|
|
2473
2716
|
};
|
|
@@ -2481,7 +2724,7 @@ var EvalAstFactory = class {
|
|
|
2481
2724
|
const params2 = this.params;
|
|
2482
2725
|
const body2 = this.body;
|
|
2483
2726
|
return function(...args) {
|
|
2484
|
-
const paramsObj = fromEntries(params2.map((
|
|
2727
|
+
const paramsObj = fromEntries(params2.map((p2, i5) => [p2, args[i5]]));
|
|
2485
2728
|
const newScope = new Proxy(scope ?? {}, {
|
|
2486
2729
|
set(target, prop, value) {
|
|
2487
2730
|
if (hasOwn(paramsObj, prop)) {
|
|
@@ -2507,40 +2750,40 @@ var EvalAstFactory = class {
|
|
|
2507
2750
|
};
|
|
2508
2751
|
|
|
2509
2752
|
// ../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/node/private-ssr-support.js
|
|
2510
|
-
var
|
|
2511
|
-
var
|
|
2512
|
-
_$AS(
|
|
2513
|
-
return
|
|
2514
|
-
}
|
|
2515
|
-
}, patchDirectiveResolve: (
|
|
2516
|
-
if (
|
|
2517
|
-
|
|
2518
|
-
for (let
|
|
2753
|
+
var r3 = null;
|
|
2754
|
+
var i4 = { boundAttributeSuffix: W.M, marker: W.P, markerMatch: W.A, HTML_RESULT: W.C, getTemplateHtml: W.L, overrideDirectiveResolve: (e3, t3) => class extends e3 {
|
|
2755
|
+
_$AS(e4, r4) {
|
|
2756
|
+
return t3(this, r4);
|
|
2757
|
+
}
|
|
2758
|
+
}, patchDirectiveResolve: (e3, t3) => {
|
|
2759
|
+
if (e3.prototype._$AS.name !== t3.name) {
|
|
2760
|
+
r3 ??= e3.prototype._$AS.name;
|
|
2761
|
+
for (let i5 = e3.prototype; i5 !== Object.prototype; i5 = Object.getPrototypeOf(i5)) if (i5.hasOwnProperty(r3)) return void (i5[r3] = t3);
|
|
2519
2762
|
throw Error("Internal error: It is possible that both dev mode and production mode Lit was mixed together during SSR. Please comment on the issue: https://github.com/lit/lit/issues/4527");
|
|
2520
2763
|
}
|
|
2521
|
-
}, setDirectiveClass(
|
|
2522
|
-
|
|
2523
|
-
}, getAttributePartCommittedValue: (
|
|
2524
|
-
let
|
|
2525
|
-
return
|
|
2526
|
-
}, connectedDisconnectable: (
|
|
2764
|
+
}, setDirectiveClass(e3, t3) {
|
|
2765
|
+
e3._$litDirective$ = t3;
|
|
2766
|
+
}, getAttributePartCommittedValue: (e3, r4, i5) => {
|
|
2767
|
+
let o2 = w;
|
|
2768
|
+
return e3.j = (e4) => o2 = e4, e3._$AI(r4, e3, i5), o2;
|
|
2769
|
+
}, connectedDisconnectable: (e3) => ({ ...e3, _$AU: true }), resolveDirective: W.V, AttributePart: W.H, PropertyPart: W.B, BooleanAttributePart: W.N, EventPart: W.U, ElementPart: W.F, TemplateInstance: W.R, isIterable: W.D, ChildPart: W.I };
|
|
2527
2770
|
|
|
2528
2771
|
// ../../node_modules/.pnpm/@heximal+templates@0.1.5/node_modules/@heximal/templates/index.js
|
|
2529
|
-
var { AttributePart, PropertyPart, BooleanAttributePart, EventPart } =
|
|
2772
|
+
var { AttributePart, PropertyPart, BooleanAttributePart, EventPart } = i4;
|
|
2530
2773
|
var astFactory = new EvalAstFactory();
|
|
2531
2774
|
var expressionCache = /* @__PURE__ */ new Map();
|
|
2532
|
-
var toCamelCase = (
|
|
2533
|
-
var getSingleValue = (
|
|
2534
|
-
let ast = expressionCache.get(
|
|
2775
|
+
var toCamelCase = (s2) => s2.replace(/-(-|\w)/g, (_2, p1) => p1.toUpperCase());
|
|
2776
|
+
var getSingleValue = (s2, model) => {
|
|
2777
|
+
let ast = expressionCache.get(s2);
|
|
2535
2778
|
if (ast === void 0) {
|
|
2536
|
-
if (expressionCache.has(
|
|
2779
|
+
if (expressionCache.has(s2)) {
|
|
2537
2780
|
return void 0;
|
|
2538
2781
|
}
|
|
2539
|
-
|
|
2540
|
-
if (
|
|
2541
|
-
const expression =
|
|
2782
|
+
s2 = s2.trim();
|
|
2783
|
+
if (s2.startsWith("{{") && s2.endsWith("}}")) {
|
|
2784
|
+
const expression = s2.substring(2, s2.length - 2).trim();
|
|
2542
2785
|
ast = new Parser(expression, astFactory).parse();
|
|
2543
|
-
expressionCache.set(
|
|
2786
|
+
expressionCache.set(s2, ast);
|
|
2544
2787
|
}
|
|
2545
2788
|
}
|
|
2546
2789
|
return ast?.evaluate(model);
|
|
@@ -2553,8 +2796,8 @@ var ifHandler = (template, model, handlers, renderers) => {
|
|
|
2553
2796
|
return void 0;
|
|
2554
2797
|
};
|
|
2555
2798
|
var bindingRegex = /(?<!\\){{(.*?)(?:(?<!\\)}})/g;
|
|
2556
|
-
var hasEscapedBindingMarkers = (
|
|
2557
|
-
var unescapeBindingMarkers = (
|
|
2799
|
+
var hasEscapedBindingMarkers = (s2) => /(?:\\{{)|(?:\\}})/g.test(s2);
|
|
2800
|
+
var unescapeBindingMarkers = (s2) => s2.replaceAll(/\\{{/g, "{{").replace(/\\}}/g, "}}");
|
|
2558
2801
|
var repeatHandler = (template, model, handlers, renderers) => {
|
|
2559
2802
|
const repeatAttribute = template.getAttribute("repeat");
|
|
2560
2803
|
if (repeatAttribute !== null) {
|
|
@@ -2763,10 +3006,10 @@ var makeLitTemplate = (template) => {
|
|
|
2763
3006
|
}
|
|
2764
3007
|
const strings = [unescapeBindingMarkers(splitValue[0])];
|
|
2765
3008
|
const exprs = [];
|
|
2766
|
-
for (let
|
|
2767
|
-
const exprText = splitValue[
|
|
3009
|
+
for (let i5 = 1; i5 < splitValue.length; i5 += 2) {
|
|
3010
|
+
const exprText = splitValue[i5];
|
|
2768
3011
|
exprs.push(parse(exprText, astFactory));
|
|
2769
|
-
strings.push(unescapeBindingMarkers(splitValue[
|
|
3012
|
+
strings.push(unescapeBindingMarkers(splitValue[i5 + 1]));
|
|
2770
3013
|
}
|
|
2771
3014
|
litTemplate.parts.push({
|
|
2772
3015
|
type: 1,
|
|
@@ -2789,15 +3032,15 @@ var makeLitTemplate = (template) => {
|
|
|
2789
3032
|
} else if (hasEscapedBindingMarkers(text)) {
|
|
2790
3033
|
textNode.textContent = unescapeBindingMarkers(text);
|
|
2791
3034
|
}
|
|
2792
|
-
for (let
|
|
2793
|
-
const exprText = strings[
|
|
3035
|
+
for (let i5 = 1; i5 < strings.length; i5 += 2) {
|
|
3036
|
+
const exprText = strings[i5];
|
|
2794
3037
|
const expr = parse(exprText, astFactory);
|
|
2795
3038
|
litTemplate.parts.push({
|
|
2796
3039
|
type: 2,
|
|
2797
3040
|
index: ++nodeIndex,
|
|
2798
3041
|
update: (model, _handlers) => expr.evaluate(model)
|
|
2799
3042
|
});
|
|
2800
|
-
const newTextNode = new Text(strings[
|
|
3043
|
+
const newTextNode = new Text(strings[i5 + 1].replace("\\{{", "{{"));
|
|
2801
3044
|
textNode.parentNode.insertBefore(newTextNode, textNode.nextSibling);
|
|
2802
3045
|
textNode.parentNode.insertBefore(document.createComment(""), textNode.nextSibling);
|
|
2803
3046
|
textNode = newTextNode;
|
|
@@ -2805,8 +3048,8 @@ var makeLitTemplate = (template) => {
|
|
|
2805
3048
|
}
|
|
2806
3049
|
}
|
|
2807
3050
|
}
|
|
2808
|
-
for (const
|
|
2809
|
-
|
|
3051
|
+
for (const e3 of elementsToRemove) {
|
|
3052
|
+
e3.remove();
|
|
2810
3053
|
}
|
|
2811
3054
|
return litTemplate;
|
|
2812
3055
|
};
|
|
@@ -2829,11 +3072,11 @@ var TestPagingButtonsStamp = class extends i2 {
|
|
|
2829
3072
|
this.myTemplate = prepareTemplate(templateElement);
|
|
2830
3073
|
}
|
|
2831
3074
|
render() {
|
|
2832
|
-
if (!this.computedContext) return
|
|
3075
|
+
if (!this.computedContext) return T``;
|
|
2833
3076
|
const items = this.computedContext.testParts.flatMap(
|
|
2834
3077
|
(testPart) => testPart.sections.flatMap((section) => section.items)
|
|
2835
3078
|
);
|
|
2836
|
-
return
|
|
3079
|
+
return T` ${items.map((item) => this.myTemplate({ item, view: this.computedContext.view }))} `;
|
|
2837
3080
|
}
|
|
2838
3081
|
};
|
|
2839
3082
|
_internals2 = new WeakMap();
|
|
@@ -2893,10 +3136,10 @@ var TestContainer = class extends i2 {
|
|
|
2893
3136
|
}
|
|
2894
3137
|
}
|
|
2895
3138
|
render() {
|
|
2896
|
-
return
|
|
3139
|
+
return T`
|
|
2897
3140
|
${__privateGet(this, _templateContent)}
|
|
2898
3141
|
<slot></slot>
|
|
2899
|
-
${m(this.testDoc,
|
|
3142
|
+
${m(this.testDoc, T`<span>Loading...</span>`)}
|
|
2900
3143
|
`;
|
|
2901
3144
|
}
|
|
2902
3145
|
};
|
|
@@ -2904,7 +3147,7 @@ _templateContent = new WeakMap();
|
|
|
2904
3147
|
_TestContainer_instances = new WeakSet();
|
|
2905
3148
|
initializeTemplateContent_fn = function() {
|
|
2906
3149
|
const template = this.querySelector("template");
|
|
2907
|
-
__privateSet(this, _templateContent, template ? template.content :
|
|
3150
|
+
__privateSet(this, _templateContent, template ? template.content : T``);
|
|
2908
3151
|
};
|
|
2909
3152
|
applyStyles_fn = function() {
|
|
2910
3153
|
const sheet = new CSSStyleSheet();
|
|
@@ -2934,10 +3177,10 @@ TestContainer = __decorateClass([
|
|
|
2934
3177
|
var TestPrintVariables = class extends i2 {
|
|
2935
3178
|
render() {
|
|
2936
3179
|
const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
|
|
2937
|
-
if (!activeItem || !activeItem.variables) return
|
|
2938
|
-
const responseVariables = activeItem.variables.filter((
|
|
2939
|
-
const outcomeVariables = activeItem.variables.filter((
|
|
2940
|
-
const renderTable = (variables, title) =>
|
|
3180
|
+
if (!activeItem || !activeItem.variables) return T``;
|
|
3181
|
+
const responseVariables = activeItem.variables.filter((v2) => v2.type === "response");
|
|
3182
|
+
const outcomeVariables = activeItem.variables.filter((v2) => v2.type === "outcome");
|
|
3183
|
+
const renderTable = (variables, title) => T`
|
|
2941
3184
|
<h3>${title}</h3>
|
|
2942
3185
|
<table>
|
|
2943
3186
|
<thead>
|
|
@@ -2950,16 +3193,16 @@ var TestPrintVariables = class extends i2 {
|
|
|
2950
3193
|
</tr>
|
|
2951
3194
|
</thead>
|
|
2952
3195
|
<tbody>
|
|
2953
|
-
${variables.map((
|
|
2954
|
-
const correctResponse =
|
|
2955
|
-
const mapEntries =
|
|
2956
|
-
const areaMapEntries =
|
|
2957
|
-
return
|
|
3196
|
+
${variables.map((v2) => {
|
|
3197
|
+
const correctResponse = v2.correctResponse ? Array.isArray(v2.correctResponse) ? v2.correctResponse.join(", ") : v2.correctResponse : "";
|
|
3198
|
+
const mapEntries = v2.mapping?.mapEntries?.map((m3) => `${m3.mapKey}=${m3.mappedValue}pt`).join(", ") || "";
|
|
3199
|
+
const areaMapEntries = v2.areaMapping?.areaMapEntries?.map((m3) => `${m3.shape}(${m3.coords})=${m3.mappedValue}pt`).join(", ") || "";
|
|
3200
|
+
return T`
|
|
2958
3201
|
<tr>
|
|
2959
|
-
<td>${
|
|
2960
|
-
<td>${Array.isArray(
|
|
2961
|
-
<td>${
|
|
2962
|
-
<td>${
|
|
3202
|
+
<td>${v2.identifier}</td>
|
|
3203
|
+
<td>${Array.isArray(v2.value) ? v2.value.join(", ") : v2.value}</td>
|
|
3204
|
+
<td>${v2.cardinality}</td>
|
|
3205
|
+
<td>${v2.baseType}</td>
|
|
2963
3206
|
<td>${correctResponse || mapEntries || areaMapEntries}</td>
|
|
2964
3207
|
</tr>
|
|
2965
3208
|
`;
|
|
@@ -2967,7 +3210,7 @@ var TestPrintVariables = class extends i2 {
|
|
|
2967
3210
|
</tbody>
|
|
2968
3211
|
</table>
|
|
2969
3212
|
`;
|
|
2970
|
-
return
|
|
3213
|
+
return T`
|
|
2971
3214
|
${renderTable(responseVariables, "Response Variables")} ${renderTable(outcomeVariables, "Outcome Variables")}
|
|
2972
3215
|
`;
|
|
2973
3216
|
}
|
|
@@ -3019,9 +3262,9 @@ var TestSectionButtonsStamp = class extends i2 {
|
|
|
3019
3262
|
this.myTemplate = prepareTemplate(templateElement);
|
|
3020
3263
|
}
|
|
3021
3264
|
render() {
|
|
3022
|
-
if (!this.computedContext) return
|
|
3265
|
+
if (!this.computedContext) return T``;
|
|
3023
3266
|
const sections = this.computedContext.testParts.flatMap((testPart) => testPart.sections);
|
|
3024
|
-
return
|
|
3267
|
+
return T` ${sections.map((item) => this.myTemplate({ item }))} `;
|
|
3025
3268
|
}
|
|
3026
3269
|
};
|
|
3027
3270
|
_internals3 = new WeakMap();
|
|
@@ -3042,7 +3285,7 @@ var TestSectionLink = class extends i2 {
|
|
|
3042
3285
|
this.addEventListener("click", () => __privateMethod(this, _TestSectionLink_instances, requestItem_fn).call(this, this.sectionId));
|
|
3043
3286
|
}
|
|
3044
3287
|
render() {
|
|
3045
|
-
return
|
|
3288
|
+
return T` <slot></slot> `;
|
|
3046
3289
|
}
|
|
3047
3290
|
};
|
|
3048
3291
|
_TestSectionLink_instances = new WeakSet();
|
|
@@ -3076,7 +3319,7 @@ TestSectionLink = __decorateClass([
|
|
|
3076
3319
|
// ../qti-test/src/components/test-print-context/test-print-context.ts
|
|
3077
3320
|
var TestPrintContext = class extends i2 {
|
|
3078
3321
|
render() {
|
|
3079
|
-
return
|
|
3322
|
+
return T` <small><pre>${JSON.stringify(this.computedContext, null, 2)}</pre></small> `;
|
|
3080
3323
|
}
|
|
3081
3324
|
};
|
|
3082
3325
|
__decorateClass([
|
|
@@ -3153,8 +3396,8 @@ var TestStamp = class extends i2 {
|
|
|
3153
3396
|
);
|
|
3154
3397
|
}
|
|
3155
3398
|
render() {
|
|
3156
|
-
return
|
|
3157
|
-
${this.myTemplate ? this.myTemplate(this.stampContext) :
|
|
3399
|
+
return T` ${this.debug ? T`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : A}
|
|
3400
|
+
${this.myTemplate ? this.myTemplate(this.stampContext) : A}`;
|
|
3158
3401
|
}
|
|
3159
3402
|
};
|
|
3160
3403
|
__decorateClass([
|
|
@@ -3180,8 +3423,8 @@ var TestScoringButtons = class extends i2 {
|
|
|
3180
3423
|
this.view = "";
|
|
3181
3424
|
this.disabled = false;
|
|
3182
3425
|
this.myTemplate = null;
|
|
3183
|
-
this.addEventListener("click", (
|
|
3184
|
-
const target =
|
|
3426
|
+
this.addEventListener("click", (e3) => {
|
|
3427
|
+
const target = e3.target;
|
|
3185
3428
|
const value = parseFloat(target.value);
|
|
3186
3429
|
if (target.tagName === "INPUT") {
|
|
3187
3430
|
__privateMethod(this, _TestScoringButtons_instances, changeOutcomeScore_fn).call(this, value);
|
|
@@ -3202,14 +3445,14 @@ var TestScoringButtons = class extends i2 {
|
|
|
3202
3445
|
}
|
|
3203
3446
|
render() {
|
|
3204
3447
|
const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
|
|
3205
|
-
if (!activeItem || !activeItem.variables) return
|
|
3448
|
+
if (!activeItem || !activeItem.variables) return T``;
|
|
3206
3449
|
const maxScore = activeItem.variables.find((vr) => vr.identifier == "MAXSCORE")?.value;
|
|
3207
3450
|
const scoreOutcome = activeItem.variables.find((vr) => vr.identifier == "SCORE");
|
|
3208
3451
|
const score = scoreOutcome?.value;
|
|
3209
3452
|
const disabled = !(scoreOutcome?.externalScored === "human");
|
|
3210
|
-
if (!maxScore || !scoreOutcome) return
|
|
3453
|
+
if (!maxScore || !scoreOutcome) return A;
|
|
3211
3454
|
const scores = [...Array(Number(maxScore) + 1).keys()];
|
|
3212
|
-
return
|
|
3455
|
+
return T`${this.myTemplate ? this.myTemplate({ scores, score, disabled }) : A}`;
|
|
3213
3456
|
}
|
|
3214
3457
|
};
|
|
3215
3458
|
_TestScoringButtons_instances = new WeakSet();
|
|
@@ -3274,9 +3517,9 @@ var TestViewToggle = class extends i2 {
|
|
|
3274
3517
|
});
|
|
3275
3518
|
}
|
|
3276
3519
|
render() {
|
|
3277
|
-
return
|
|
3520
|
+
return T`${this.myTemplate ? this.myTemplate({
|
|
3278
3521
|
view: this.sessionContext?.view
|
|
3279
|
-
}) :
|
|
3522
|
+
}) : A}`;
|
|
3280
3523
|
}
|
|
3281
3524
|
};
|
|
3282
3525
|
__decorateClass([
|
|
@@ -3294,9 +3537,9 @@ var TestScoringFeedback = class extends i2 {
|
|
|
3294
3537
|
}
|
|
3295
3538
|
render() {
|
|
3296
3539
|
const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
|
|
3297
|
-
if (!activeItem || !activeItem.variables) return
|
|
3298
|
-
if (activeItem["category"] === "dep-informational") return
|
|
3299
|
-
const completionStatus = activeItem?.variables.find((
|
|
3540
|
+
if (!activeItem || !activeItem.variables) return T``;
|
|
3541
|
+
if (activeItem["category"] === "dep-informational") return T`<div>${this.dataset.informational}</div>`;
|
|
3542
|
+
const completionStatus = activeItem?.variables.find((v2) => v2.identifier === "completionStatus")?.value;
|
|
3300
3543
|
const scoreOutcome = activeItem?.variables.find((vr) => vr.identifier == "SCORE");
|
|
3301
3544
|
const score = parseFloat(scoreOutcome?.value);
|
|
3302
3545
|
const externalScored = activeItem["externalScored"];
|
|
@@ -3315,7 +3558,7 @@ var TestScoringFeedback = class extends i2 {
|
|
|
3315
3558
|
}
|
|
3316
3559
|
return this.dataset.inProgress;
|
|
3317
3560
|
};
|
|
3318
|
-
return
|
|
3561
|
+
return T`<div>${feedbackText()}</div>`;
|
|
3319
3562
|
}
|
|
3320
3563
|
};
|
|
3321
3564
|
__decorateClass([
|
|
@@ -3349,7 +3592,7 @@ var TestCheckItem = class extends i2 {
|
|
|
3349
3592
|
});
|
|
3350
3593
|
}
|
|
3351
3594
|
render() {
|
|
3352
|
-
return
|
|
3595
|
+
return T` <slot></slot> `;
|
|
3353
3596
|
}
|
|
3354
3597
|
};
|
|
3355
3598
|
TestCheckItem.styles = i`
|
|
@@ -3392,6 +3635,13 @@ export {
|
|
|
3392
3635
|
};
|
|
3393
3636
|
/*! Bundled license information:
|
|
3394
3637
|
|
|
3638
|
+
lit-html/node/lit-html.js:
|
|
3639
|
+
(**
|
|
3640
|
+
* @license
|
|
3641
|
+
* Copyright 2017 Google LLC
|
|
3642
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3643
|
+
*)
|
|
3644
|
+
|
|
3395
3645
|
@heximal/expressions/lib/constants.js:
|
|
3396
3646
|
@heximal/expressions/lib/tokenizer.js:
|
|
3397
3647
|
@heximal/expressions/lib/parser.js:
|
|
@@ -3409,4 +3659,4 @@ lit-html/node/private-ssr-support.js:
|
|
|
3409
3659
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3410
3660
|
*)
|
|
3411
3661
|
*/
|
|
3412
|
-
//# sourceMappingURL=chunk-
|
|
3662
|
+
//# sourceMappingURL=chunk-D6EHVZG2.js.map
|