@yungu-fed/question-editor 0.2.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.js +2002 -1981
- package/dist/index.mjs +694 -682
- package/dist/question/content-editor/QuestionContentSubquestionChildEditor.d.ts +2 -2
- package/dist/question/content-editor/QuestionContentSubquestionChildEditor.d.ts.map +1 -1
- package/dist/question/player/QuestionPlayer.d.ts.map +1 -1
- package/dist/question/player/QuestionPlayerComposite.d.ts +4 -3
- package/dist/question/player/QuestionPlayerComposite.d.ts.map +1 -1
- package/dist/question/player/types.d.ts +1 -0
- package/dist/question/player/types.d.ts.map +1 -1
- package/dist/question/preview/QuestionCompositePreview.d.ts +4 -3
- package/dist/question/preview/QuestionCompositePreview.d.ts.map +1 -1
- package/dist/question/preview/QuestionPreview.d.ts +1 -0
- package/dist/question/preview/QuestionPreview.d.ts.map +1 -1
- package/dist/question/shared/SubquestionNumberedContent.d.ts +2 -1
- package/dist/question/shared/SubquestionNumberedContent.d.ts.map +1 -1
- package/dist/question/shared/subquestion-numbering.d.ts +3 -2
- package/dist/question/shared/subquestion-numbering.d.ts.map +1 -1
- package/package.json +15 -15
package/dist/index.mjs
CHANGED
|
@@ -4763,36 +4763,41 @@ function Fo({ disabled: e, hasAnswer: t, onAddChild: n, questionTypeTemplates: r
|
|
|
4763
4763
|
}
|
|
4764
4764
|
//#endregion
|
|
4765
4765
|
//#region src/question/shared/subquestion-numbering.ts
|
|
4766
|
-
function Io(e) {
|
|
4767
|
-
|
|
4766
|
+
function Io(e, t) {
|
|
4767
|
+
let n = e.map((e) => e + 1);
|
|
4768
|
+
return (t === void 0 ? n : [t, ...n]).join(".");
|
|
4768
4769
|
}
|
|
4769
4770
|
function Lo(e, t) {
|
|
4770
4771
|
return e.length > 1 || t > 1;
|
|
4771
4772
|
}
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4773
|
+
function Ro(e, t, n) {
|
|
4774
|
+
return Lo(e, t) ? Io(e, n) : null;
|
|
4775
|
+
}
|
|
4776
|
+
var zo = {
|
|
4777
|
+
root: "_root_1phv3_1",
|
|
4778
|
+
indented: "_indented_1phv3_9",
|
|
4779
|
+
number: "_number_1phv3_14",
|
|
4780
|
+
content: "_content_1phv3_22"
|
|
4776
4781
|
};
|
|
4777
4782
|
//#endregion
|
|
4778
4783
|
//#region src/question/shared/SubquestionNumberedContent.tsx
|
|
4779
|
-
function
|
|
4780
|
-
return
|
|
4781
|
-
className:
|
|
4784
|
+
function Bo({ children: e, indented: t = !1, number: n }) {
|
|
4785
|
+
return n === null ? /* @__PURE__ */ a(i, { children: e }) : /* @__PURE__ */ o("div", {
|
|
4786
|
+
className: t ? `${zo.root} ${zo.indented}` : zo.root,
|
|
4782
4787
|
"data-subquestion-numbered-content": !0,
|
|
4783
4788
|
children: [/* @__PURE__ */ a("span", {
|
|
4784
|
-
className:
|
|
4789
|
+
className: zo.number,
|
|
4785
4790
|
"data-subquestion-number": !0,
|
|
4786
|
-
children:
|
|
4791
|
+
children: n
|
|
4787
4792
|
}), /* @__PURE__ */ a("div", {
|
|
4788
|
-
className:
|
|
4793
|
+
className: zo.content,
|
|
4789
4794
|
children: e
|
|
4790
4795
|
})]
|
|
4791
4796
|
});
|
|
4792
4797
|
}
|
|
4793
4798
|
//#endregion
|
|
4794
4799
|
//#region src/question/content-editor/QuestionContentSubquestionChildElements.tsx
|
|
4795
|
-
function
|
|
4800
|
+
function Vo({ child: e, disabled: t, onChange: n, richTextControls: r, structure: i, translator: s }) {
|
|
4796
4801
|
let { t: c } = s;
|
|
4797
4802
|
function l(t, r) {
|
|
4798
4803
|
n(k(k({}, e), vn(e, t, r)));
|
|
@@ -4820,9 +4825,9 @@ function Bo({ child: e, disabled: t, onChange: n, richTextControls: r, structure
|
|
|
4820
4825
|
className: "flex min-w-0 flex-col gap-3 border-t border-slate-100 py-3 first:border-t-0 first:pt-0 last:pb-0",
|
|
4821
4826
|
children: /* @__PURE__ */ a(Oo, {
|
|
4822
4827
|
disabled: t,
|
|
4823
|
-
element:
|
|
4828
|
+
element: Ho(n),
|
|
4824
4829
|
hasAnswer: i.hasAnswer,
|
|
4825
|
-
item:
|
|
4830
|
+
item: Uo(c),
|
|
4826
4831
|
onChange: (e) => u(o, {
|
|
4827
4832
|
content: e.content,
|
|
4828
4833
|
type: n.type
|
|
@@ -4835,14 +4840,14 @@ function Bo({ child: e, disabled: t, onChange: n, richTextControls: r, structure
|
|
|
4835
4840
|
})]
|
|
4836
4841
|
});
|
|
4837
4842
|
}
|
|
4838
|
-
function
|
|
4843
|
+
function Ho(e) {
|
|
4839
4844
|
return {
|
|
4840
4845
|
config: {},
|
|
4841
4846
|
name: e.name,
|
|
4842
4847
|
type: "richText"
|
|
4843
4848
|
};
|
|
4844
4849
|
}
|
|
4845
|
-
function
|
|
4850
|
+
function Uo(e) {
|
|
4846
4851
|
return {
|
|
4847
4852
|
content: e.content,
|
|
4848
4853
|
type: "richText"
|
|
@@ -4850,37 +4855,37 @@ function Ho(e) {
|
|
|
4850
4855
|
}
|
|
4851
4856
|
//#endregion
|
|
4852
4857
|
//#region src/question/content-editor/subquestion-editable-children.ts
|
|
4853
|
-
var
|
|
4854
|
-
function
|
|
4858
|
+
var Wo = /* @__PURE__ */ new WeakMap(), Go = 0;
|
|
4859
|
+
function Ko(e) {
|
|
4855
4860
|
return e.map((e) => ({
|
|
4856
4861
|
draft: e,
|
|
4857
|
-
runtimeId:
|
|
4862
|
+
runtimeId: Yo(e)
|
|
4858
4863
|
}));
|
|
4859
4864
|
}
|
|
4860
|
-
function Ko(e, t) {
|
|
4861
|
-
Uo.set(t, Jo(e));
|
|
4862
|
-
}
|
|
4863
4865
|
function qo(e, t) {
|
|
4866
|
+
Wo.set(t, Yo(e));
|
|
4867
|
+
}
|
|
4868
|
+
function Jo(e, t) {
|
|
4864
4869
|
if (e.length !== t.length) throw Error(`\u9898\u76ee\u5b50\u9898\u8fd0\u884c\u65f6\u8eab\u4efd\u4f20\u9012\u5931\u8d25\uff0cexpected=${e.length}\uff0cactual=${t.length}`);
|
|
4865
4870
|
let n = t[Symbol.iterator]();
|
|
4866
4871
|
e.forEach((e) => {
|
|
4867
4872
|
let t = n.next();
|
|
4868
4873
|
if (t.done) throw Error("\u9898\u76ee\u5b50\u9898\u8fd0\u884c\u65f6\u8eab\u4efd\u4f20\u9012\u5931\u8d25\uff0cnextChildren \u63d0\u524d\u7ed3\u675f");
|
|
4869
4874
|
let r = t.value;
|
|
4870
|
-
|
|
4875
|
+
qo(e, r), Jo(e.children, r.children);
|
|
4871
4876
|
});
|
|
4872
4877
|
}
|
|
4873
|
-
function
|
|
4874
|
-
let t =
|
|
4878
|
+
function Yo(e) {
|
|
4879
|
+
let t = Wo.get(e);
|
|
4875
4880
|
if (t) return t;
|
|
4876
|
-
|
|
4877
|
-
let n = `question-content-child-${
|
|
4878
|
-
return
|
|
4881
|
+
Go += 1;
|
|
4882
|
+
let n = `question-content-child-${Go}`;
|
|
4883
|
+
return Wo.set(e, n), n;
|
|
4879
4884
|
}
|
|
4880
4885
|
//#endregion
|
|
4881
4886
|
//#region src/question/content-editor/QuestionContentSubquestionChildEditor.tsx
|
|
4882
|
-
function
|
|
4883
|
-
let { t: m } = p, h =
|
|
4887
|
+
function Xo({ child: e, childIndex: t, childIndexPath: n, disabled: r, hasAnswer: i, onChange: s, onDelete: c, onMove: l, richTextControls: u, siblingCount: d, questionTypeTemplates: f, translator: p }) {
|
|
4888
|
+
let { t: m } = p, h = n == null ? [t] : n, g = Io(h), _ = Zo(e, f), v = _ ? ia(_.structure, i) : void 0, y = v ? _n(v, e) : e, b = Ko(v ? y.children : []);
|
|
4884
4889
|
if (!v) return /* @__PURE__ */ o("section", {
|
|
4885
4890
|
className: "flex min-w-0 flex-col gap-3 border-b border-l-2 border-slate-200 border-l-blue-600 bg-white py-4 pr-0 pl-3 last:border-b-0 sm:pl-4",
|
|
4886
4891
|
children: [w(null), te(/* @__PURE__ */ a(Oa, { description: m("questionContentEditor.subquestion.missingTemplate") }))]
|
|
@@ -4889,30 +4894,30 @@ function Yo({ child: e, childIndex: t, disabled: n, hasAnswer: r, numberPath: i,
|
|
|
4889
4894
|
s(k(k({}, y), {}, { children: [...y.children, e] }));
|
|
4890
4895
|
}
|
|
4891
4896
|
function S(e, t) {
|
|
4892
|
-
let n =
|
|
4893
|
-
n < 0 || (
|
|
4897
|
+
let n = es(b, e);
|
|
4898
|
+
n < 0 || (qo(y.children[n], t), s(k(k({}, y), {}, { children: y.children.map((e, r) => r === n ? t : e) })));
|
|
4894
4899
|
}
|
|
4895
4900
|
function ee(e) {
|
|
4896
|
-
let t =
|
|
4901
|
+
let t = es(b, e);
|
|
4897
4902
|
t < 0 || s(k(k({}, y), {}, { children: y.children.filter((e, n) => n !== t) }));
|
|
4898
4903
|
}
|
|
4899
4904
|
function C(e, t) {
|
|
4900
|
-
let n =
|
|
4905
|
+
let n = es(b, e);
|
|
4901
4906
|
n < 0 || s(k(k({}, y), {}, { children: Po(y.children, n, t) }));
|
|
4902
4907
|
}
|
|
4903
4908
|
return /* @__PURE__ */ o("section", {
|
|
4904
4909
|
className: "flex min-w-0 flex-col gap-3 border-b border-l-2 border-slate-200 border-l-blue-600 bg-white py-4 pr-0 pl-3 last:border-b-0 sm:pl-4",
|
|
4905
4910
|
children: [
|
|
4906
4911
|
w(x),
|
|
4907
|
-
te(
|
|
4912
|
+
te($o(r, y, s, u, v, p)),
|
|
4908
4913
|
y.children.length === 0 ? null : /* @__PURE__ */ a("div", {
|
|
4909
4914
|
className: "ml-3 flex min-w-0 flex-col pl-3 sm:ml-4 sm:pl-4",
|
|
4910
|
-
children: b.map((e, t) => /* @__PURE__ */ a(
|
|
4915
|
+
children: b.map((e, t) => /* @__PURE__ */ a(Xo, {
|
|
4911
4916
|
child: e.draft,
|
|
4912
4917
|
childIndex: t,
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4918
|
+
childIndexPath: [...h, t],
|
|
4919
|
+
disabled: r,
|
|
4920
|
+
hasAnswer: i,
|
|
4916
4921
|
onChange: (t) => S(e.runtimeId, t),
|
|
4917
4922
|
onDelete: () => ee(e.runtimeId),
|
|
4918
4923
|
onMove: (t) => C(e.runtimeId, t),
|
|
@@ -4924,7 +4929,7 @@ function Yo({ child: e, childIndex: t, disabled: n, hasAnswer: r, numberPath: i,
|
|
|
4924
4929
|
})
|
|
4925
4930
|
]
|
|
4926
4931
|
});
|
|
4927
|
-
function w(
|
|
4932
|
+
function w(n) {
|
|
4928
4933
|
return /* @__PURE__ */ o("div", {
|
|
4929
4934
|
className: "flex min-w-0 flex-wrap items-start justify-between gap-3",
|
|
4930
4935
|
children: [/* @__PURE__ */ a("span", {
|
|
@@ -4935,30 +4940,30 @@ function Yo({ child: e, childIndex: t, disabled: n, hasAnswer: r, numberPath: i,
|
|
|
4935
4940
|
m("questionContentEditor.subquestion.questionKind"),
|
|
4936
4941
|
" \u00b7",
|
|
4937
4942
|
" ",
|
|
4938
|
-
|
|
4943
|
+
Qo(_, e)
|
|
4939
4944
|
]
|
|
4940
4945
|
})
|
|
4941
4946
|
}), /* @__PURE__ */ o(ka, {
|
|
4942
4947
|
size: 4,
|
|
4943
4948
|
wrap: !0,
|
|
4944
4949
|
children: [
|
|
4945
|
-
|
|
4946
|
-
disabled:
|
|
4947
|
-
hasAnswer:
|
|
4948
|
-
onAddChild:
|
|
4950
|
+
n ? /* @__PURE__ */ a(Fo, {
|
|
4951
|
+
disabled: r,
|
|
4952
|
+
hasAnswer: i,
|
|
4953
|
+
onAddChild: n,
|
|
4949
4954
|
questionTypeTemplates: f,
|
|
4950
4955
|
translator: p
|
|
4951
4956
|
}) : null,
|
|
4952
4957
|
/* @__PURE__ */ a(I, {
|
|
4953
4958
|
"aria-label": m("questionContentEditor.subquestion.moveChildUp", { index: g }),
|
|
4954
|
-
disabled:
|
|
4959
|
+
disabled: r || t === 0,
|
|
4955
4960
|
icon: "\u2191",
|
|
4956
4961
|
onClick: () => l(-1),
|
|
4957
4962
|
size: "small"
|
|
4958
4963
|
}),
|
|
4959
4964
|
/* @__PURE__ */ a(I, {
|
|
4960
4965
|
"aria-label": m("questionContentEditor.subquestion.moveChildDown", { index: g }),
|
|
4961
|
-
disabled:
|
|
4966
|
+
disabled: r || t === d - 1,
|
|
4962
4967
|
icon: "\u2193",
|
|
4963
4968
|
onClick: () => l(1),
|
|
4964
4969
|
size: "small"
|
|
@@ -4966,7 +4971,7 @@ function Yo({ child: e, childIndex: t, disabled: n, hasAnswer: r, numberPath: i,
|
|
|
4966
4971
|
/* @__PURE__ */ a(I, {
|
|
4967
4972
|
"aria-label": m("questionContentEditor.subquestion.deleteChild", { index: g }),
|
|
4968
4973
|
danger: !0,
|
|
4969
|
-
disabled:
|
|
4974
|
+
disabled: r,
|
|
4970
4975
|
icon: "\u00d7",
|
|
4971
4976
|
onClick: c,
|
|
4972
4977
|
size: "small"
|
|
@@ -4976,20 +4981,20 @@ function Yo({ child: e, childIndex: t, disabled: n, hasAnswer: r, numberPath: i,
|
|
|
4976
4981
|
});
|
|
4977
4982
|
}
|
|
4978
4983
|
function te(e) {
|
|
4979
|
-
return /* @__PURE__ */ a(
|
|
4984
|
+
return /* @__PURE__ */ a(Bo, {
|
|
4980
4985
|
number: Lo(h, d) ? g : null,
|
|
4981
4986
|
children: e
|
|
4982
4987
|
});
|
|
4983
4988
|
}
|
|
4984
4989
|
}
|
|
4985
|
-
function
|
|
4990
|
+
function Zo(e, t) {
|
|
4986
4991
|
return sa(t, e.questionTypeKey);
|
|
4987
4992
|
}
|
|
4988
|
-
function
|
|
4993
|
+
function Qo(e, t) {
|
|
4989
4994
|
return e ? e.label : t.questionTypeKey;
|
|
4990
4995
|
}
|
|
4991
|
-
function
|
|
4992
|
-
return i.elements.length === 0 && i.extras.length === 0 ? null : /* @__PURE__ */ a(
|
|
4996
|
+
function $o(e, t, n, r, i, o) {
|
|
4997
|
+
return i.elements.length === 0 && i.extras.length === 0 ? null : /* @__PURE__ */ a(Vo, {
|
|
4993
4998
|
child: t,
|
|
4994
4999
|
disabled: e,
|
|
4995
5000
|
onChange: n,
|
|
@@ -4998,13 +5003,13 @@ function Qo(e, t, n, r, i, o) {
|
|
|
4998
5003
|
translator: o
|
|
4999
5004
|
});
|
|
5000
5005
|
}
|
|
5001
|
-
function
|
|
5006
|
+
function es(e, t) {
|
|
5002
5007
|
return e.findIndex((e) => e.runtimeId === t);
|
|
5003
5008
|
}
|
|
5004
5009
|
//#endregion
|
|
5005
5010
|
//#region src/question/content-editor/QuestionContentSubquestionGroupEditor.tsx
|
|
5006
|
-
function
|
|
5007
|
-
let { t: l } = c, u =
|
|
5011
|
+
function ts({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls: i, questionTypeTemplates: s, translator: c }) {
|
|
5012
|
+
let { t: l } = c, u = Ko(n.children), d = n.children.length;
|
|
5008
5013
|
function f(e) {
|
|
5009
5014
|
r(k(k({}, n), {}, { children: e }));
|
|
5010
5015
|
}
|
|
@@ -5012,19 +5017,19 @@ function es({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
|
|
|
5012
5017
|
f([...n.children, e]);
|
|
5013
5018
|
}
|
|
5014
5019
|
function m(e, t) {
|
|
5015
|
-
let r =
|
|
5016
|
-
r < 0 || (
|
|
5020
|
+
let r = ns(u, e);
|
|
5021
|
+
r < 0 || (qo(n.children[r], t), f(n.children.map((e, n) => n === r ? t : e)));
|
|
5017
5022
|
}
|
|
5018
5023
|
function h(e) {
|
|
5019
|
-
let t =
|
|
5024
|
+
let t = ns(u, e);
|
|
5020
5025
|
t < 0 || f(n.children.filter((e, n) => n !== t));
|
|
5021
5026
|
}
|
|
5022
5027
|
function g(e, t) {
|
|
5023
|
-
let r =
|
|
5028
|
+
let r = ns(u, e);
|
|
5024
5029
|
r < 0 || f(Po(n.children, r, t));
|
|
5025
5030
|
}
|
|
5026
5031
|
function _(r, o) {
|
|
5027
|
-
return /* @__PURE__ */ a(
|
|
5032
|
+
return /* @__PURE__ */ a(Xo, {
|
|
5028
5033
|
child: r.draft,
|
|
5029
5034
|
childIndex: o,
|
|
5030
5035
|
disabled: e,
|
|
@@ -5069,14 +5074,14 @@ function es({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
|
|
|
5069
5074
|
})]
|
|
5070
5075
|
});
|
|
5071
5076
|
}
|
|
5072
|
-
function
|
|
5077
|
+
function ns(e, t) {
|
|
5073
5078
|
return e.findIndex((e) => e.runtimeId === t);
|
|
5074
5079
|
}
|
|
5075
5080
|
//#endregion
|
|
5076
5081
|
//#region src/question/content-editor/QuestionContentEditor.tsx
|
|
5077
|
-
function
|
|
5082
|
+
function rs({ disabled: t = !1, locale: n = "zh-CN", onChange: r, questionTypeTemplates: i, uploadImage: s, value: c }) {
|
|
5078
5083
|
let l = ca(c, i);
|
|
5079
|
-
|
|
5084
|
+
Jo(c.children, l.children);
|
|
5080
5085
|
let u = ga(n), { t: d } = u, p = aa(i, l), m = f(() => ({
|
|
5081
5086
|
plugins: [Ft, da],
|
|
5082
5087
|
uploadImage: s
|
|
@@ -5103,9 +5108,9 @@ function ns({ disabled: t = !1, locale: n = "zh-CN", onChange: r, questionTypeTe
|
|
|
5103
5108
|
let i = an(l, n, e);
|
|
5104
5109
|
return /* @__PURE__ */ a(Oo, {
|
|
5105
5110
|
disabled: t,
|
|
5106
|
-
element:
|
|
5111
|
+
element: is(e),
|
|
5107
5112
|
hasAnswer: r,
|
|
5108
|
-
item:
|
|
5113
|
+
item: as(i),
|
|
5109
5114
|
onChange: (t) => g(n, {
|
|
5110
5115
|
content: t.content,
|
|
5111
5116
|
type: e.type
|
|
@@ -5122,7 +5127,7 @@ function ns({ disabled: t = !1, locale: n = "zh-CN", onChange: r, questionTypeTe
|
|
|
5122
5127
|
className: "flex min-w-0 flex-col gap-3 rounded-md border border-slate-200 bg-white p-4",
|
|
5123
5128
|
children: _(e, t, p.hasAnswer)
|
|
5124
5129
|
}, `${e.type}-${t}`)),
|
|
5125
|
-
Kt(p) || l.children.length > 0 ? /* @__PURE__ */ a(
|
|
5130
|
+
Kt(p) || l.children.length > 0 ? /* @__PURE__ */ a(ts, {
|
|
5126
5131
|
disabled: t,
|
|
5127
5132
|
hasAnswer: p.hasAnswer,
|
|
5128
5133
|
item: l,
|
|
@@ -5154,14 +5159,14 @@ function ns({ disabled: t = !1, locale: n = "zh-CN", onChange: r, questionTypeTe
|
|
|
5154
5159
|
})]
|
|
5155
5160
|
});
|
|
5156
5161
|
}
|
|
5157
|
-
function
|
|
5162
|
+
function is(e) {
|
|
5158
5163
|
return {
|
|
5159
5164
|
config: {},
|
|
5160
5165
|
name: e.name,
|
|
5161
5166
|
type: "richText"
|
|
5162
5167
|
};
|
|
5163
5168
|
}
|
|
5164
|
-
function
|
|
5169
|
+
function as(e) {
|
|
5165
5170
|
return {
|
|
5166
5171
|
content: e.content,
|
|
5167
5172
|
type: "richText"
|
|
@@ -5169,40 +5174,40 @@ function is(e) {
|
|
|
5169
5174
|
}
|
|
5170
5175
|
//#endregion
|
|
5171
5176
|
//#region src/question/content-editor/structure.ts
|
|
5172
|
-
function
|
|
5177
|
+
function os(e, t) {
|
|
5173
5178
|
return {
|
|
5174
|
-
elements: e.elements.map((e) =>
|
|
5179
|
+
elements: e.elements.map((e) => _s(e, t)),
|
|
5175
5180
|
extras: e.extras.map((e) => ({
|
|
5176
|
-
name:
|
|
5181
|
+
name: ys(e, we(e.type), Te(e.type), t),
|
|
5177
5182
|
type: e.type
|
|
5178
5183
|
})),
|
|
5179
5184
|
hasAnswer: e.globalConfig.hasAnswer,
|
|
5180
5185
|
isComposite: !1
|
|
5181
5186
|
};
|
|
5182
5187
|
}
|
|
5183
|
-
function
|
|
5188
|
+
function ss(e, t) {
|
|
5184
5189
|
if (!e) return null;
|
|
5185
5190
|
let n = ra(t, e.questionTypeKey);
|
|
5186
|
-
return n ? k(k({}, gn(n,
|
|
5187
|
-
let n =
|
|
5191
|
+
return n ? k(k({}, gn(n, us(e))), {}, { children: e.children.map((e) => {
|
|
5192
|
+
let n = ss(e, t);
|
|
5188
5193
|
if (!n) throw Error("\u5b50\u9898\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a");
|
|
5189
5194
|
return n;
|
|
5190
5195
|
}) }) : null;
|
|
5191
5196
|
}
|
|
5192
|
-
function
|
|
5197
|
+
function cs(e) {
|
|
5193
5198
|
return {
|
|
5194
5199
|
description: e.description,
|
|
5195
|
-
elements: e.elements.map(
|
|
5196
|
-
extras: e.extras.map(
|
|
5200
|
+
elements: e.elements.map(ps),
|
|
5201
|
+
extras: e.extras.map(gs),
|
|
5197
5202
|
globalConfig: k({}, e.globalConfig),
|
|
5198
5203
|
isSubjective: e.isSubjective,
|
|
5199
5204
|
version: e.version
|
|
5200
5205
|
};
|
|
5201
5206
|
}
|
|
5202
|
-
function
|
|
5203
|
-
return e.globalConfig.hasAnswer !== t.globalConfig.hasAnswer || e.elements.length !== t.elements.length || e.extras.length !== t.extras.length ||
|
|
5207
|
+
function ls(e, t) {
|
|
5208
|
+
return e.globalConfig.hasAnswer !== t.globalConfig.hasAnswer || e.elements.length !== t.elements.length || e.extras.length !== t.extras.length || ds(e.elements, t.elements) || fs(e.extras, t.extras) ? "shape" : "metadata";
|
|
5204
5209
|
}
|
|
5205
|
-
function
|
|
5210
|
+
function us(e) {
|
|
5206
5211
|
return {
|
|
5207
5212
|
questionTypeKey: e.questionTypeKey,
|
|
5208
5213
|
children: [],
|
|
@@ -5212,22 +5217,22 @@ function ls(e) {
|
|
|
5212
5217
|
version: e.version
|
|
5213
5218
|
};
|
|
5214
5219
|
}
|
|
5215
|
-
function
|
|
5220
|
+
function ds(e, t) {
|
|
5216
5221
|
return e.some((e, n) => {
|
|
5217
5222
|
let r = t.slice(n, n + 1)[0];
|
|
5218
5223
|
return !r || e.clientId !== r.clientId || e.type !== r.type || JSON.stringify(e.config) !== JSON.stringify(r.config);
|
|
5219
5224
|
});
|
|
5220
5225
|
}
|
|
5221
|
-
function
|
|
5226
|
+
function fs(e, t) {
|
|
5222
5227
|
return e.some((e, n) => {
|
|
5223
5228
|
let r = t.slice(n, n + 1)[0];
|
|
5224
5229
|
return !r || e.clientId !== r.clientId || e.type !== r.type;
|
|
5225
5230
|
});
|
|
5226
5231
|
}
|
|
5227
|
-
function fs(e) {
|
|
5228
|
-
return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" || e.type === "textResponse" ? ms(e) : ps(e);
|
|
5229
|
-
}
|
|
5230
5232
|
function ps(e) {
|
|
5233
|
+
return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" || e.type === "textResponse" ? hs(e) : ms(e);
|
|
5234
|
+
}
|
|
5235
|
+
function ms(e) {
|
|
5231
5236
|
switch (e.type) {
|
|
5232
5237
|
case "inlineFill": return {
|
|
5233
5238
|
config: k({}, e.config),
|
|
@@ -5267,7 +5272,7 @@ function ps(e) {
|
|
|
5267
5272
|
};
|
|
5268
5273
|
}
|
|
5269
5274
|
}
|
|
5270
|
-
function
|
|
5275
|
+
function hs(e) {
|
|
5271
5276
|
return {
|
|
5272
5277
|
config: {},
|
|
5273
5278
|
enName: e.enName,
|
|
@@ -5275,38 +5280,38 @@ function ms(e) {
|
|
|
5275
5280
|
type: e.type
|
|
5276
5281
|
};
|
|
5277
5282
|
}
|
|
5278
|
-
function
|
|
5283
|
+
function gs(e) {
|
|
5279
5284
|
return {
|
|
5280
5285
|
enName: e.enName,
|
|
5281
5286
|
name: e.name,
|
|
5282
5287
|
type: e.type
|
|
5283
5288
|
};
|
|
5284
5289
|
}
|
|
5285
|
-
function
|
|
5290
|
+
function _s(e, t) {
|
|
5286
5291
|
return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" || e.type === "textResponse" ? {
|
|
5287
5292
|
config: {},
|
|
5288
|
-
name:
|
|
5293
|
+
name: ys(e, A(e.type), j(e.type), t),
|
|
5289
5294
|
type: e.type
|
|
5290
|
-
} :
|
|
5295
|
+
} : vs(e, t);
|
|
5291
5296
|
}
|
|
5292
|
-
function
|
|
5297
|
+
function vs(e, t) {
|
|
5293
5298
|
switch (e.type) {
|
|
5294
5299
|
case "inlineFill": return {
|
|
5295
5300
|
config: {
|
|
5296
5301
|
allowCandidateReuse: !!e.config.allowCandidateReuse,
|
|
5297
5302
|
candidateMode: e.config.candidateMode
|
|
5298
5303
|
},
|
|
5299
|
-
name:
|
|
5304
|
+
name: ys(e, A("inlineFill"), j("inlineFill"), t),
|
|
5300
5305
|
type: "inlineFill"
|
|
5301
5306
|
};
|
|
5302
5307
|
case "wordBuilder": return {
|
|
5303
5308
|
config: { builderMode: e.config.builderMode },
|
|
5304
|
-
name:
|
|
5309
|
+
name: ys(e, A("wordBuilder"), j("wordBuilder"), t),
|
|
5305
5310
|
type: "wordBuilder"
|
|
5306
5311
|
};
|
|
5307
5312
|
case "judgement": return {
|
|
5308
5313
|
config: { judgeAnswerMode: e.config.judgeAnswerMode },
|
|
5309
|
-
name:
|
|
5314
|
+
name: ys(e, A("judgement"), j("judgement"), t),
|
|
5310
5315
|
type: "judgement"
|
|
5311
5316
|
};
|
|
5312
5317
|
case "choice": return {
|
|
@@ -5315,22 +5320,22 @@ function _s(e, t) {
|
|
|
5315
5320
|
renderer: e.config.renderer,
|
|
5316
5321
|
selectionType: e.config.selectionType
|
|
5317
5322
|
},
|
|
5318
|
-
name:
|
|
5323
|
+
name: ys(e, A("choice"), j("choice"), t),
|
|
5319
5324
|
type: "choice"
|
|
5320
5325
|
};
|
|
5321
5326
|
case "lineConnect": return {
|
|
5322
5327
|
config: { columns: e.config.columns.map((e) => k({}, e)) },
|
|
5323
|
-
name:
|
|
5328
|
+
name: ys(e, A("lineConnect"), j("lineConnect"), t),
|
|
5324
5329
|
type: "lineConnect"
|
|
5325
5330
|
};
|
|
5326
5331
|
case "matching": return {
|
|
5327
5332
|
config: { columns: e.config.columns.map((e) => k({}, e)) },
|
|
5328
|
-
name:
|
|
5333
|
+
name: ys(e, A("matching"), j("matching"), t),
|
|
5329
5334
|
type: "matching"
|
|
5330
5335
|
};
|
|
5331
5336
|
}
|
|
5332
5337
|
}
|
|
5333
|
-
function
|
|
5338
|
+
function ys(e, t, n, r) {
|
|
5334
5339
|
var i;
|
|
5335
5340
|
if (r === "en-US") {
|
|
5336
5341
|
var a;
|
|
@@ -5340,65 +5345,65 @@ function vs(e, t, n, r) {
|
|
|
5340
5345
|
}
|
|
5341
5346
|
//#endregion
|
|
5342
5347
|
//#region src/question/presentation-contract.ts
|
|
5343
|
-
function
|
|
5344
|
-
return ca(
|
|
5348
|
+
function bs(e, t) {
|
|
5349
|
+
return ca(xs(e), t);
|
|
5345
5350
|
}
|
|
5346
|
-
function
|
|
5351
|
+
function xs(e) {
|
|
5347
5352
|
return {
|
|
5348
5353
|
questionTypeKey: e.questionTypeKey,
|
|
5349
|
-
children: e.children.map(
|
|
5350
|
-
elements: e.elements.map(
|
|
5354
|
+
children: e.children.map(xs),
|
|
5355
|
+
elements: e.elements.map(Ss),
|
|
5351
5356
|
extras: [...e.extras],
|
|
5352
5357
|
id: e.id,
|
|
5353
5358
|
version: e.version
|
|
5354
5359
|
};
|
|
5355
5360
|
}
|
|
5356
|
-
function
|
|
5361
|
+
function Ss(e) {
|
|
5357
5362
|
return e.type === "choice" ? k(k({}, e), {}, { answers: e.answers === void 0 ? { optionIds: [] } : e.answers }) : e;
|
|
5358
5363
|
}
|
|
5359
5364
|
//#endregion
|
|
5360
5365
|
//#region src/question/player/response-contract.ts
|
|
5361
|
-
var
|
|
5366
|
+
var Cs = {
|
|
5362
5367
|
html: "",
|
|
5363
5368
|
json: [],
|
|
5364
5369
|
text: ""
|
|
5365
5370
|
};
|
|
5366
|
-
function
|
|
5367
|
-
|
|
5371
|
+
function ws(e, t) {
|
|
5372
|
+
Bs(e, t);
|
|
5368
5373
|
let n = t.elements.filter((e) => e.type !== "richText");
|
|
5369
|
-
return
|
|
5370
|
-
children: e.children.map((e, n) =>
|
|
5371
|
-
elementAnswers: e.items.map((e, t) =>
|
|
5374
|
+
return Us("elementAnswers", e.items.length, n.length), Us("children", e.children.length, t.children.length), {
|
|
5375
|
+
children: e.children.map((e, n) => ws(e, t.children[n])),
|
|
5376
|
+
elementAnswers: e.items.map((e, t) => Es(e, n[t])),
|
|
5372
5377
|
id: t.id,
|
|
5373
5378
|
questionTypeKey: t.questionTypeKey,
|
|
5374
5379
|
version: t.version
|
|
5375
5380
|
};
|
|
5376
5381
|
}
|
|
5377
|
-
function
|
|
5378
|
-
|
|
5382
|
+
function Ts(e, t) {
|
|
5383
|
+
Bs(e, t);
|
|
5379
5384
|
let n = t.elements.filter((e) => e.type !== "richText");
|
|
5380
|
-
return
|
|
5381
|
-
children: e.children.map((e, n) =>
|
|
5385
|
+
return Us("elementAnswers", e.elementAnswers.length, n.length), Us("children", e.children.length, t.children.length), {
|
|
5386
|
+
children: e.children.map((e, n) => Ts(e, t.children[n])),
|
|
5382
5387
|
id: t.id,
|
|
5383
|
-
items: e.elementAnswers.map((e, t) =>
|
|
5388
|
+
items: e.elementAnswers.map((e, t) => ks(e, n[t])),
|
|
5384
5389
|
questionTypeKey: t.questionTypeKey,
|
|
5385
5390
|
version: t.version
|
|
5386
5391
|
};
|
|
5387
5392
|
}
|
|
5388
|
-
function
|
|
5389
|
-
switch (
|
|
5390
|
-
case "fill": return
|
|
5391
|
-
answers:
|
|
5393
|
+
function Es(e, t) {
|
|
5394
|
+
switch (Vs(e.type, t.type), e.type) {
|
|
5395
|
+
case "fill": return Hs(t, "fill"), {
|
|
5396
|
+
answers: Ms(t, e.answers),
|
|
5392
5397
|
type: e.type
|
|
5393
5398
|
};
|
|
5394
|
-
case "inlineFill": return
|
|
5395
|
-
answers:
|
|
5399
|
+
case "inlineFill": return Hs(t, "inlineFill"), {
|
|
5400
|
+
answers: Ns(t, e.answers),
|
|
5396
5401
|
type: e.type
|
|
5397
5402
|
};
|
|
5398
|
-
default: return
|
|
5403
|
+
default: return Ds(e);
|
|
5399
5404
|
}
|
|
5400
5405
|
}
|
|
5401
|
-
function
|
|
5406
|
+
function Ds(e) {
|
|
5402
5407
|
switch (e.type) {
|
|
5403
5408
|
case "choice": return {
|
|
5404
5409
|
answers: { optionIds: e.selectedOptionIds },
|
|
@@ -5421,10 +5426,10 @@ function Es(e) {
|
|
|
5421
5426
|
answers: e.connections,
|
|
5422
5427
|
type: e.type
|
|
5423
5428
|
};
|
|
5424
|
-
default: return
|
|
5429
|
+
default: return Os(e);
|
|
5425
5430
|
}
|
|
5426
5431
|
}
|
|
5427
|
-
function
|
|
5432
|
+
function Os(e) {
|
|
5428
5433
|
switch (e.type) {
|
|
5429
5434
|
case "ordering": return {
|
|
5430
5435
|
answers: e.orderedOptionIds,
|
|
@@ -5440,20 +5445,20 @@ function Ds(e) {
|
|
|
5440
5445
|
};
|
|
5441
5446
|
}
|
|
5442
5447
|
}
|
|
5443
|
-
function
|
|
5444
|
-
switch (
|
|
5448
|
+
function ks(e, t) {
|
|
5449
|
+
switch (Vs(e.type, t.type), e.type) {
|
|
5445
5450
|
case "fill": return {
|
|
5446
|
-
answers:
|
|
5451
|
+
answers: Is(e.answers),
|
|
5447
5452
|
type: e.type
|
|
5448
5453
|
};
|
|
5449
|
-
case "inlineFill": return
|
|
5450
|
-
answers:
|
|
5454
|
+
case "inlineFill": return Hs(t, "inlineFill"), {
|
|
5455
|
+
answers: Ls(t, e.answers),
|
|
5451
5456
|
type: e.type
|
|
5452
5457
|
};
|
|
5453
|
-
default: return
|
|
5458
|
+
default: return As(e);
|
|
5454
5459
|
}
|
|
5455
5460
|
}
|
|
5456
|
-
function
|
|
5461
|
+
function As(e) {
|
|
5457
5462
|
switch (e.type) {
|
|
5458
5463
|
case "choice": return {
|
|
5459
5464
|
selectedOptionIds: [...e.answers.optionIds],
|
|
@@ -5473,13 +5478,13 @@ function ks(e) {
|
|
|
5473
5478
|
};
|
|
5474
5479
|
case "lineConnect":
|
|
5475
5480
|
case "matching": return {
|
|
5476
|
-
connections:
|
|
5481
|
+
connections: Rs(e.answers),
|
|
5477
5482
|
type: e.type
|
|
5478
5483
|
};
|
|
5479
|
-
default: return
|
|
5484
|
+
default: return js(e);
|
|
5480
5485
|
}
|
|
5481
5486
|
}
|
|
5482
|
-
function
|
|
5487
|
+
function js(e) {
|
|
5483
5488
|
switch (e.type) {
|
|
5484
5489
|
case "ordering": return {
|
|
5485
5490
|
orderedOptionIds: [...e.answers],
|
|
@@ -5495,11 +5500,11 @@ function As(e) {
|
|
|
5495
5500
|
};
|
|
5496
5501
|
}
|
|
5497
5502
|
}
|
|
5498
|
-
function
|
|
5503
|
+
function Ms(e, t) {
|
|
5499
5504
|
return N(e.answers, e.blanks).map((e) => {
|
|
5500
5505
|
var n;
|
|
5501
5506
|
return {
|
|
5502
|
-
answerPools: [
|
|
5507
|
+
answerPools: [zs((n = e.blankIds.map((e) => {
|
|
5503
5508
|
var n;
|
|
5504
5509
|
return (n = t[e]) == null ? "" : n;
|
|
5505
5510
|
}).find(Boolean)) == null ? "" : n)],
|
|
@@ -5507,32 +5512,32 @@ function js(e, t) {
|
|
|
5507
5512
|
};
|
|
5508
5513
|
});
|
|
5509
5514
|
}
|
|
5510
|
-
function
|
|
5515
|
+
function Ns(e, t) {
|
|
5511
5516
|
return e.blanks.map((n) => ({
|
|
5512
|
-
answerPools: [
|
|
5517
|
+
answerPools: [zs(Ps(e, n, t[n]))],
|
|
5513
5518
|
blankIds: [n]
|
|
5514
5519
|
}));
|
|
5515
5520
|
}
|
|
5516
|
-
function
|
|
5521
|
+
function Ps(e, t, n) {
|
|
5517
5522
|
var r;
|
|
5518
5523
|
if (!n) return "";
|
|
5519
5524
|
if (n.kind === "text") return n.value;
|
|
5520
|
-
let i =
|
|
5525
|
+
let i = Fs(e, t).find((e) => n.optionIds.includes(e.optionId));
|
|
5521
5526
|
return (r = i == null ? void 0 : i.content.text) == null ? "" : r;
|
|
5522
5527
|
}
|
|
5523
|
-
function
|
|
5528
|
+
function Fs(e, t) {
|
|
5524
5529
|
var n, r;
|
|
5525
5530
|
let i = (n = e.blankOptionGroups) == null || (n = n.find((e) => e.blankId === t)) == null ? void 0 : n.options;
|
|
5526
5531
|
return [...i == null ? [] : i, ...(r = e.candidateOptions) == null ? [] : r];
|
|
5527
5532
|
}
|
|
5528
|
-
function
|
|
5533
|
+
function Is(e) {
|
|
5529
5534
|
return e.reduce((e, t) => t.blankIds.reduce((e, n) => {
|
|
5530
5535
|
var r, i;
|
|
5531
5536
|
return k(k({}, e), {}, { [n]: (r = (i = t.answerPools[0]) == null ? void 0 : i.text) == null ? "" : r });
|
|
5532
5537
|
}, e), {});
|
|
5533
5538
|
}
|
|
5534
|
-
function
|
|
5535
|
-
return Object.entries(
|
|
5539
|
+
function Ls(e, t) {
|
|
5540
|
+
return Object.entries(Is(t)).reduce((t, [n, r]) => {
|
|
5536
5541
|
var i, a, o;
|
|
5537
5542
|
let s = [...(i = (a = e.blankOptionGroups) == null || (a = a.find((e) => e.blankId === n)) == null ? void 0 : a.options) == null ? [] : i, ...(o = e.candidateOptions) == null ? [] : o].find((e) => e.content.text === r), c = s ? {
|
|
5538
5543
|
kind: "option",
|
|
@@ -5544,238 +5549,238 @@ function Is(e, t) {
|
|
|
5544
5549
|
return k(k({}, t), {}, { [n]: c });
|
|
5545
5550
|
}, {});
|
|
5546
5551
|
}
|
|
5547
|
-
function
|
|
5552
|
+
function Rs(e) {
|
|
5548
5553
|
return Object.keys(e).reduce((t, n) => k(k({}, t), {}, { [n]: [...e[n]] }), {});
|
|
5549
5554
|
}
|
|
5550
|
-
function
|
|
5551
|
-
return e.length === 0 ?
|
|
5555
|
+
function zs(e) {
|
|
5556
|
+
return e.length === 0 ? Cs : {
|
|
5552
5557
|
html: e,
|
|
5553
5558
|
json: [],
|
|
5554
5559
|
text: e
|
|
5555
5560
|
};
|
|
5556
5561
|
}
|
|
5557
|
-
function
|
|
5562
|
+
function Bs(e, t) {
|
|
5558
5563
|
if (e.id !== t.id || e.questionTypeKey !== t.questionTypeKey || e.version !== t.version) throw Error(`QuestionPlayer response identity mismatch: questionId=${String(t.id)}, responseId=${String(e.id)}, questionTypeKey=${String(t.questionTypeKey)}, responseQuestionTypeKey=${String(e.questionTypeKey)}, questionVersion=${t.version}, responseVersion=${e.version}`);
|
|
5559
5564
|
}
|
|
5560
|
-
function
|
|
5565
|
+
function Vs(e, t) {
|
|
5561
5566
|
if (e !== t) throw Error(`QuestionPlayer response element mismatch: expected=${t}, actual=${e}`);
|
|
5562
5567
|
}
|
|
5563
|
-
function
|
|
5568
|
+
function Hs(e, t) {
|
|
5564
5569
|
if (e.type !== t) throw Error(`QuestionPlayer content element mismatch: expected=${t}, actual=${e.type}`);
|
|
5565
5570
|
}
|
|
5566
|
-
function
|
|
5571
|
+
function Us(e, t, n) {
|
|
5567
5572
|
if (t !== n) throw Error(`QuestionPlayer response ${e} length mismatch: expected=${n}, actual=${t}`);
|
|
5568
5573
|
}
|
|
5569
5574
|
//#endregion
|
|
5570
5575
|
//#region src/question/player/helpers.ts
|
|
5571
|
-
function Us(e, t) {
|
|
5572
|
-
let n = ys(e, t);
|
|
5573
|
-
return Cs(Ws(n, t), n);
|
|
5574
|
-
}
|
|
5575
5576
|
function Ws(e, t) {
|
|
5577
|
+
let n = bs(e, t);
|
|
5578
|
+
return ws(Gs(n, t), n);
|
|
5579
|
+
}
|
|
5580
|
+
function Gs(e, t) {
|
|
5576
5581
|
let n = ra(t, e.questionTypeKey), r = n ? Kt(n) : !1;
|
|
5577
5582
|
return {
|
|
5578
5583
|
questionTypeKey: e.questionTypeKey,
|
|
5579
|
-
children: e.children.map((e) =>
|
|
5584
|
+
children: e.children.map((e) => Gs(e, t)),
|
|
5580
5585
|
id: e.id,
|
|
5581
5586
|
items: !n || r ? [] : n.elements.reduce((t, n, r) => {
|
|
5582
|
-
let i =
|
|
5587
|
+
let i = fc(n, rn(e, r, n));
|
|
5583
5588
|
return i ? [...t, i] : t;
|
|
5584
5589
|
}, []),
|
|
5585
5590
|
version: e.version
|
|
5586
5591
|
};
|
|
5587
5592
|
}
|
|
5588
|
-
function
|
|
5593
|
+
function Ks(e, t) {
|
|
5589
5594
|
var n;
|
|
5590
|
-
return (n =
|
|
5595
|
+
return (n = Dc(e, t, "choice")) == null ? {
|
|
5591
5596
|
selectedOptionIds: [],
|
|
5592
5597
|
type: "choice"
|
|
5593
5598
|
} : n;
|
|
5594
5599
|
}
|
|
5595
|
-
function
|
|
5600
|
+
function qs(e, t, n) {
|
|
5596
5601
|
var r;
|
|
5597
|
-
return (r =
|
|
5598
|
-
answers:
|
|
5602
|
+
return (r = Dc(e, t, "fill")) == null ? {
|
|
5603
|
+
answers: Tc(n),
|
|
5599
5604
|
type: "fill"
|
|
5600
5605
|
} : r;
|
|
5601
5606
|
}
|
|
5602
|
-
function
|
|
5607
|
+
function Js(e, t, n, r) {
|
|
5603
5608
|
var i;
|
|
5604
|
-
return (i =
|
|
5605
|
-
answers:
|
|
5609
|
+
return (i = Dc(e, t, "inlineFill")) == null ? {
|
|
5610
|
+
answers: Ec(n, r),
|
|
5606
5611
|
type: "inlineFill"
|
|
5607
5612
|
} : i;
|
|
5608
5613
|
}
|
|
5609
|
-
function
|
|
5614
|
+
function Ys(e, t, n) {
|
|
5610
5615
|
var r;
|
|
5611
|
-
return (r =
|
|
5612
|
-
answers:
|
|
5616
|
+
return (r = Dc(e, t, "wordBuilder")) == null ? {
|
|
5617
|
+
answers: Tc(n),
|
|
5613
5618
|
type: "wordBuilder"
|
|
5614
5619
|
} : r;
|
|
5615
5620
|
}
|
|
5616
|
-
function
|
|
5621
|
+
function Xs(e, t) {
|
|
5617
5622
|
var n;
|
|
5618
|
-
return (n =
|
|
5623
|
+
return (n = Dc(e, t, "judgement")) == null ? {
|
|
5619
5624
|
selectedValues: [],
|
|
5620
5625
|
type: "judgement"
|
|
5621
5626
|
} : n;
|
|
5622
5627
|
}
|
|
5623
|
-
function
|
|
5628
|
+
function Zs(e, t) {
|
|
5624
5629
|
var n;
|
|
5625
|
-
return (n =
|
|
5630
|
+
return (n = Dc(e, t, "classification")) == null ? {
|
|
5626
5631
|
placements: {},
|
|
5627
5632
|
type: "classification"
|
|
5628
5633
|
} : n;
|
|
5629
5634
|
}
|
|
5630
|
-
function
|
|
5635
|
+
function Qs(e, t) {
|
|
5631
5636
|
var n;
|
|
5632
|
-
return (n =
|
|
5637
|
+
return (n = Dc(e, t, "lineConnect")) == null ? {
|
|
5633
5638
|
connections: {},
|
|
5634
5639
|
type: "lineConnect"
|
|
5635
5640
|
} : n;
|
|
5636
5641
|
}
|
|
5637
|
-
function
|
|
5642
|
+
function $s(e, t) {
|
|
5638
5643
|
var n;
|
|
5639
|
-
return (n =
|
|
5644
|
+
return (n = Dc(e, t, "matching")) == null ? {
|
|
5640
5645
|
connections: {},
|
|
5641
5646
|
type: "matching"
|
|
5642
5647
|
} : n;
|
|
5643
5648
|
}
|
|
5644
|
-
function
|
|
5649
|
+
function ec(e, t, n) {
|
|
5645
5650
|
var r;
|
|
5646
|
-
return (r =
|
|
5651
|
+
return (r = Dc(e, t, "ordering")) == null ? {
|
|
5647
5652
|
orderedOptionIds: n.sortOptions.map((e) => e.id),
|
|
5648
5653
|
type: "ordering"
|
|
5649
5654
|
} : r;
|
|
5650
5655
|
}
|
|
5651
|
-
function
|
|
5656
|
+
function tc(e, t) {
|
|
5652
5657
|
var n;
|
|
5653
|
-
return (n =
|
|
5658
|
+
return (n = Dc(e, t, "textMarker")) == null ? {
|
|
5654
5659
|
selectedMarkers: [],
|
|
5655
5660
|
type: "textMarker"
|
|
5656
5661
|
} : n;
|
|
5657
5662
|
}
|
|
5658
|
-
function
|
|
5663
|
+
function nc(e, t) {
|
|
5659
5664
|
var n;
|
|
5660
|
-
return (n =
|
|
5665
|
+
return (n = Dc(e, t, "textResponse")) == null ? {
|
|
5661
5666
|
content: M(),
|
|
5662
5667
|
type: "textResponse"
|
|
5663
5668
|
} : n;
|
|
5664
5669
|
}
|
|
5665
|
-
function
|
|
5670
|
+
function rc(e, t, n) {
|
|
5666
5671
|
return k(k({}, e), {}, { items: e.items.map((e, r) => r === t ? n : e) });
|
|
5667
5672
|
}
|
|
5668
|
-
function
|
|
5673
|
+
function ic(e, t, n) {
|
|
5669
5674
|
return k(k({}, e), {}, { children: e.children.map((e, r) => r === t ? n : e) });
|
|
5670
5675
|
}
|
|
5671
|
-
function
|
|
5676
|
+
function ac(e, t, n) {
|
|
5672
5677
|
return Ue(e, t, n);
|
|
5673
5678
|
}
|
|
5674
|
-
function
|
|
5679
|
+
function oc(e, t, n = "single") {
|
|
5675
5680
|
return {
|
|
5676
5681
|
kind: "option",
|
|
5677
5682
|
optionIds: Ue((e == null ? void 0 : e.kind) === "option" ? e.optionIds : [], t, n)
|
|
5678
5683
|
};
|
|
5679
5684
|
}
|
|
5680
|
-
function
|
|
5685
|
+
function sc(e, t, n) {
|
|
5681
5686
|
return ut(e, t, n);
|
|
5682
5687
|
}
|
|
5683
|
-
function
|
|
5688
|
+
function cc(e, t, n) {
|
|
5684
5689
|
return yt(e, t, n);
|
|
5685
5690
|
}
|
|
5686
|
-
function
|
|
5691
|
+
function lc(e, t, n) {
|
|
5687
5692
|
return et(e, t, n);
|
|
5688
5693
|
}
|
|
5689
|
-
function
|
|
5694
|
+
function uc(e, t, n, r) {
|
|
5690
5695
|
return Br(e, t.sortOptions, n, r);
|
|
5691
5696
|
}
|
|
5692
|
-
function
|
|
5697
|
+
function dc(e, t) {
|
|
5693
5698
|
return e.includes(t) ? e.filter((e) => e !== t) : [...e, t];
|
|
5694
5699
|
}
|
|
5695
|
-
function
|
|
5700
|
+
function fc(e, t) {
|
|
5696
5701
|
return e.type === "richText" ? null : e.type === "textResponse" ? {
|
|
5697
5702
|
content: M(),
|
|
5698
5703
|
type: "textResponse"
|
|
5699
|
-
} : e.type === "ordering" ?
|
|
5704
|
+
} : e.type === "ordering" ? Cc(t) : e.type === "classification" ? mc(t) : e.type === "fill" ? _c(t) : pc(e, t);
|
|
5700
5705
|
}
|
|
5701
|
-
function
|
|
5706
|
+
function pc(e, t) {
|
|
5702
5707
|
switch (e.type) {
|
|
5703
|
-
case "choice": return
|
|
5704
|
-
case "inlineFill": return
|
|
5705
|
-
case "wordBuilder": return
|
|
5706
|
-
case "judgement": return
|
|
5707
|
-
case "lineConnect": return
|
|
5708
|
-
case "matching": return
|
|
5709
|
-
case "textMarker": return
|
|
5708
|
+
case "choice": return gc();
|
|
5709
|
+
case "inlineFill": return vc(e, t);
|
|
5710
|
+
case "wordBuilder": return hc(t);
|
|
5711
|
+
case "judgement": return yc();
|
|
5712
|
+
case "lineConnect": return bc();
|
|
5713
|
+
case "matching": return xc();
|
|
5714
|
+
case "textMarker": return wc();
|
|
5710
5715
|
}
|
|
5711
5716
|
}
|
|
5712
|
-
function
|
|
5717
|
+
function mc(e) {
|
|
5713
5718
|
return e.type === "classification" ? {
|
|
5714
|
-
placements:
|
|
5719
|
+
placements: Sc({}, e),
|
|
5715
5720
|
type: "classification"
|
|
5716
5721
|
} : null;
|
|
5717
5722
|
}
|
|
5718
|
-
function
|
|
5723
|
+
function hc(e) {
|
|
5719
5724
|
return e.type === "wordBuilder" ? {
|
|
5720
|
-
answers:
|
|
5725
|
+
answers: Tc(e.blanks),
|
|
5721
5726
|
type: "wordBuilder"
|
|
5722
5727
|
} : null;
|
|
5723
5728
|
}
|
|
5724
|
-
function
|
|
5729
|
+
function gc() {
|
|
5725
5730
|
return {
|
|
5726
5731
|
selectedOptionIds: [],
|
|
5727
5732
|
type: "choice"
|
|
5728
5733
|
};
|
|
5729
5734
|
}
|
|
5730
|
-
function
|
|
5735
|
+
function _c(e) {
|
|
5731
5736
|
return e.type === "fill" ? {
|
|
5732
|
-
answers:
|
|
5737
|
+
answers: Tc(e.blanks),
|
|
5733
5738
|
type: "fill"
|
|
5734
5739
|
} : null;
|
|
5735
5740
|
}
|
|
5736
|
-
function
|
|
5741
|
+
function vc(e, t) {
|
|
5737
5742
|
return t.type === "inlineFill" ? {
|
|
5738
|
-
answers:
|
|
5743
|
+
answers: Ec(e, t.blanks),
|
|
5739
5744
|
type: "inlineFill"
|
|
5740
5745
|
} : null;
|
|
5741
5746
|
}
|
|
5742
|
-
function
|
|
5747
|
+
function yc() {
|
|
5743
5748
|
return {
|
|
5744
5749
|
selectedValues: [],
|
|
5745
5750
|
type: "judgement"
|
|
5746
5751
|
};
|
|
5747
5752
|
}
|
|
5748
|
-
function
|
|
5753
|
+
function bc() {
|
|
5749
5754
|
return {
|
|
5750
5755
|
connections: {},
|
|
5751
5756
|
type: "lineConnect"
|
|
5752
5757
|
};
|
|
5753
5758
|
}
|
|
5754
|
-
function
|
|
5759
|
+
function xc() {
|
|
5755
5760
|
return {
|
|
5756
5761
|
connections: {},
|
|
5757
5762
|
type: "matching"
|
|
5758
5763
|
};
|
|
5759
5764
|
}
|
|
5760
|
-
function
|
|
5765
|
+
function Sc(e, t) {
|
|
5761
5766
|
return $e(e, t.categories, t.items);
|
|
5762
5767
|
}
|
|
5763
|
-
function
|
|
5768
|
+
function Cc(e) {
|
|
5764
5769
|
return e.type === "ordering" ? {
|
|
5765
5770
|
orderedOptionIds: e.sortOptions.map((e) => e.id),
|
|
5766
5771
|
type: "ordering"
|
|
5767
5772
|
} : null;
|
|
5768
5773
|
}
|
|
5769
|
-
function
|
|
5774
|
+
function wc() {
|
|
5770
5775
|
return {
|
|
5771
5776
|
selectedMarkers: [],
|
|
5772
5777
|
type: "textMarker"
|
|
5773
5778
|
};
|
|
5774
5779
|
}
|
|
5775
|
-
function
|
|
5780
|
+
function Tc(e) {
|
|
5776
5781
|
return e.reduce((e, t) => k(k({}, e), {}, { [t]: "" }), {});
|
|
5777
5782
|
}
|
|
5778
|
-
function
|
|
5783
|
+
function Ec(e, t) {
|
|
5779
5784
|
return t.reduce((t, n) => k(k({}, t), {}, { [n]: e.config.candidateMode === "none" ? {
|
|
5780
5785
|
kind: "text",
|
|
5781
5786
|
value: ""
|
|
@@ -5784,16 +5789,16 @@ function Tc(e, t) {
|
|
|
5784
5789
|
optionIds: []
|
|
5785
5790
|
} }), {});
|
|
5786
5791
|
}
|
|
5787
|
-
function
|
|
5792
|
+
function Dc(e, t, n) {
|
|
5788
5793
|
let r = e.items[t];
|
|
5789
|
-
return r &&
|
|
5794
|
+
return r && Oc(r, n) ? r : void 0;
|
|
5790
5795
|
}
|
|
5791
|
-
function
|
|
5796
|
+
function Oc(e, t) {
|
|
5792
5797
|
return e.type === t;
|
|
5793
5798
|
}
|
|
5794
5799
|
//#endregion
|
|
5795
5800
|
//#region src/question/i18n/messages.ts
|
|
5796
|
-
var
|
|
5801
|
+
var kc = {
|
|
5797
5802
|
"en-US": {
|
|
5798
5803
|
addBlank: "Add blank",
|
|
5799
5804
|
addCard: "Add card",
|
|
@@ -5923,10 +5928,10 @@ var Oc = {
|
|
|
5923
5928
|
previewEmpty: "\u6682\u65e0\u9898\u76ee\u5185\u5bb9\u3002"
|
|
5924
5929
|
}
|
|
5925
5930
|
};
|
|
5926
|
-
function
|
|
5931
|
+
function Ac(e = "zh-CN") {
|
|
5927
5932
|
switch (e) {
|
|
5928
|
-
case "en-US": return
|
|
5929
|
-
case "zh-CN": return
|
|
5933
|
+
case "en-US": return kc["en-US"];
|
|
5934
|
+
case "zh-CN": return kc["zh-CN"];
|
|
5930
5935
|
}
|
|
5931
5936
|
}
|
|
5932
5937
|
//#endregion
|
|
@@ -5934,42 +5939,42 @@ function kc(e = "zh-CN") {
|
|
|
5934
5939
|
function U(...e) {
|
|
5935
5940
|
return e.filter(Boolean).join(" ");
|
|
5936
5941
|
}
|
|
5937
|
-
function
|
|
5942
|
+
function jc(e, t, n) {
|
|
5938
5943
|
return e.map((e) => t.indexOf(e) + 1).filter((e) => e > 0).map((e) => `${n}${e}`).join(" ");
|
|
5939
5944
|
}
|
|
5940
|
-
function
|
|
5945
|
+
function Mc(e) {
|
|
5941
5946
|
return "answerPools" in e;
|
|
5942
5947
|
}
|
|
5943
|
-
function
|
|
5948
|
+
function Nc(e) {
|
|
5944
5949
|
return "answerOptionId" in e;
|
|
5945
5950
|
}
|
|
5946
|
-
function
|
|
5951
|
+
function Pc(e) {
|
|
5947
5952
|
return "answerOptionIds" in e;
|
|
5948
5953
|
}
|
|
5949
|
-
function
|
|
5954
|
+
function Fc(e, t) {
|
|
5950
5955
|
var n, r;
|
|
5951
5956
|
return (n = e == null || (r = e.find((e) => e.optionId === t)) == null ? void 0 : r.content) == null ? null : n;
|
|
5952
5957
|
}
|
|
5953
|
-
function
|
|
5958
|
+
function Ic(e, t, n) {
|
|
5954
5959
|
var r, i;
|
|
5955
5960
|
return (r = e == null || (i = e.find((e) => e.blankId === t)) == null || (i = i.options.find((e) => e.optionId === n)) == null ? void 0 : i.content) == null ? null : r;
|
|
5956
5961
|
}
|
|
5957
|
-
function
|
|
5962
|
+
function Lc(e) {
|
|
5958
5963
|
return e.answers.reduce((t, n) => {
|
|
5959
|
-
if (
|
|
5964
|
+
if (Mc(n)) return Rc(t, {
|
|
5960
5965
|
blankIds: n.blankIds,
|
|
5961
5966
|
contents: n.answerPools
|
|
5962
5967
|
});
|
|
5963
|
-
if (
|
|
5964
|
-
let r =
|
|
5965
|
-
return
|
|
5968
|
+
if (Nc(n)) {
|
|
5969
|
+
let r = Ic(e.blankOptionGroups, n.blankId, n.answerOptionId);
|
|
5970
|
+
return Rc(t, {
|
|
5966
5971
|
blankIds: [n.blankId],
|
|
5967
5972
|
contents: r ? [r] : []
|
|
5968
5973
|
});
|
|
5969
5974
|
}
|
|
5970
|
-
if (
|
|
5971
|
-
let r = n.answerOptionIds.map((t) =>
|
|
5972
|
-
return
|
|
5975
|
+
if (Pc(n)) {
|
|
5976
|
+
let r = n.answerOptionIds.map((t) => Fc(e.candidateOptions, t)).filter((e) => !!e);
|
|
5977
|
+
return Rc(t, {
|
|
5973
5978
|
blankIds: n.blankIds,
|
|
5974
5979
|
contents: r
|
|
5975
5980
|
});
|
|
@@ -5977,56 +5982,57 @@ function Ic(e) {
|
|
|
5977
5982
|
return t;
|
|
5978
5983
|
}, []);
|
|
5979
5984
|
}
|
|
5980
|
-
function
|
|
5985
|
+
function Rc(e, t) {
|
|
5981
5986
|
let n = t.contents.filter((e) => e.text.trim() !== "");
|
|
5982
5987
|
return n.length > 0 ? [...e, {
|
|
5983
5988
|
blankIds: t.blankIds,
|
|
5984
5989
|
contents: n
|
|
5985
5990
|
}] : e;
|
|
5986
5991
|
}
|
|
5987
|
-
var
|
|
5992
|
+
var zc = { title: "_title_hrc5o_1" };
|
|
5988
5993
|
//#endregion
|
|
5989
5994
|
//#region src/question/renderers/QuestionSectionTitle.tsx
|
|
5990
|
-
function
|
|
5995
|
+
function Bc({ children: e }) {
|
|
5991
5996
|
return /* @__PURE__ */ a("h3", {
|
|
5992
|
-
className:
|
|
5997
|
+
className: zc.title,
|
|
5993
5998
|
children: e
|
|
5994
5999
|
});
|
|
5995
6000
|
}
|
|
5996
6001
|
var W = {
|
|
5997
|
-
root: "
|
|
5998
|
-
"element-list": "_element-
|
|
5999
|
-
children: "
|
|
6000
|
-
"control-list": "_control-
|
|
6001
|
-
"fill-text": "_fill-
|
|
6002
|
-
element: "
|
|
6003
|
-
extra: "
|
|
6004
|
-
child: "
|
|
6005
|
-
"field-label": "_field-
|
|
6006
|
-
empty: "
|
|
6007
|
-
input: "
|
|
6008
|
-
field: "
|
|
6002
|
+
root: "_root_1owdb_1",
|
|
6003
|
+
"element-list": "_element-list_1owdb_19",
|
|
6004
|
+
children: "_children_1owdb_20",
|
|
6005
|
+
"control-list": "_control-list_1owdb_21",
|
|
6006
|
+
"fill-text": "_fill-text_1owdb_22",
|
|
6007
|
+
element: "_element_1owdb_19",
|
|
6008
|
+
extra: "_extra_1owdb_32",
|
|
6009
|
+
child: "_child_1owdb_20",
|
|
6010
|
+
"field-label": "_field-label_1owdb_44",
|
|
6011
|
+
empty: "_empty_1owdb_50",
|
|
6012
|
+
input: "_input_1owdb_62",
|
|
6013
|
+
field: "_field_1owdb_44"
|
|
6009
6014
|
};
|
|
6010
6015
|
//#endregion
|
|
6011
6016
|
//#region src/question/player/QuestionPlayerComposite.tsx
|
|
6012
|
-
function
|
|
6013
|
-
return
|
|
6017
|
+
function Vc({ childIndexPath: e = [], messages: t, onChildResponseChange: n, renderChild: r, response: i, rootQuestionNumber: o, value: s }) {
|
|
6018
|
+
return s.children.length === 0 ? /* @__PURE__ */ a("div", {
|
|
6014
6019
|
className: W.empty,
|
|
6015
|
-
children:
|
|
6020
|
+
children: t.previewEmpty
|
|
6016
6021
|
}) : /* @__PURE__ */ a("div", {
|
|
6017
6022
|
className: W.children,
|
|
6018
|
-
children:
|
|
6019
|
-
let
|
|
6023
|
+
children: s.children.map((c, l) => {
|
|
6024
|
+
let u = [...e, l], d = i.children.slice(l, l + 1)[0], f = Ro(u, s.children.length, o);
|
|
6020
6025
|
return /* @__PURE__ */ a("section", {
|
|
6021
6026
|
className: W.child,
|
|
6022
|
-
children: /* @__PURE__ */ a(
|
|
6023
|
-
|
|
6024
|
-
|
|
6027
|
+
children: /* @__PURE__ */ a(Bo, {
|
|
6028
|
+
indented: !0,
|
|
6029
|
+
number: f,
|
|
6030
|
+
children: d ? r(c, d, (e) => n(l, e), u) : /* @__PURE__ */ a("div", {
|
|
6025
6031
|
className: W.empty,
|
|
6026
|
-
children:
|
|
6032
|
+
children: t.missingQuestionTypeTemplate
|
|
6027
6033
|
})
|
|
6028
6034
|
})
|
|
6029
|
-
},
|
|
6035
|
+
}, c.id || l);
|
|
6030
6036
|
})
|
|
6031
6037
|
});
|
|
6032
6038
|
}
|
|
@@ -6056,7 +6062,7 @@ function K({ className: e, content: t }) {
|
|
|
6056
6062
|
}
|
|
6057
6063
|
//#endregion
|
|
6058
6064
|
//#region src/question/renderers/QuestionStandardAnswerPanel.module.css
|
|
6059
|
-
var
|
|
6065
|
+
var Hc = {
|
|
6060
6066
|
"answer-panel": "_answer-panel_1bkkd_1",
|
|
6061
6067
|
"answer-list": "_answer-list_1bkkd_8",
|
|
6062
6068
|
"answer-row": "_answer-row_1bkkd_16",
|
|
@@ -6071,18 +6077,18 @@ function q({ groups: e, title: t }) {
|
|
|
6071
6077
|
let n = e.filter((e) => e.kind === "markerOnly" || e.contents.length > 0);
|
|
6072
6078
|
return n.length === 0 ? null : /* @__PURE__ */ o("section", {
|
|
6073
6079
|
"aria-label": t,
|
|
6074
|
-
className:
|
|
6075
|
-
children: [/* @__PURE__ */ a(
|
|
6076
|
-
className:
|
|
6080
|
+
className: Hc["answer-panel"],
|
|
6081
|
+
children: [/* @__PURE__ */ a(Bc, { children: t }), /* @__PURE__ */ a("ol", {
|
|
6082
|
+
className: Hc["answer-list"],
|
|
6077
6083
|
children: n.map((e, t) => /* @__PURE__ */ o("li", {
|
|
6078
|
-
className:
|
|
6084
|
+
className: Hc["answer-row"],
|
|
6079
6085
|
children: [e.marker ? /* @__PURE__ */ a("span", {
|
|
6080
|
-
className: e.kind === "markerOnly" ? `${
|
|
6086
|
+
className: e.kind === "markerOnly" ? `${Hc["answer-marker"]} ${Hc["answer-marker-only"]}` : Hc["answer-marker"],
|
|
6081
6087
|
children: e.marker
|
|
6082
6088
|
}) : null, e.kind === "detailed" ? /* @__PURE__ */ a("div", {
|
|
6083
|
-
className:
|
|
6089
|
+
className: Hc["answer-content-list"],
|
|
6084
6090
|
children: e.contents.map((e, t) => /* @__PURE__ */ a("div", {
|
|
6085
|
-
className:
|
|
6091
|
+
className: Hc["answer-value"],
|
|
6086
6092
|
children: e
|
|
6087
6093
|
}, `answer-${t}`))
|
|
6088
6094
|
}) : null]
|
|
@@ -6092,11 +6098,11 @@ function q({ groups: e, title: t }) {
|
|
|
6092
6098
|
}
|
|
6093
6099
|
//#endregion
|
|
6094
6100
|
//#region src/question/player/QuestionBlankGroupPlayer.tsx
|
|
6095
|
-
function
|
|
6096
|
-
let l =
|
|
6101
|
+
function Uc({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
|
|
6102
|
+
let l = qs(i, s, t.blanks), u = N(t.answers, t.blanks).map((e, r) => ({
|
|
6097
6103
|
kind: "detailed",
|
|
6098
6104
|
contents: e.answerPools.map((e, t) => /* @__PURE__ */ a(K, { content: e }, `group-${r}-answer-${t}`)),
|
|
6099
|
-
marker:
|
|
6105
|
+
marker: jc(e.blankIds, t.blanks, n.blankLabel)
|
|
6100
6106
|
}));
|
|
6101
6107
|
function d(e, t) {
|
|
6102
6108
|
r(k(k({}, l), {}, { answers: k(k({}, l.answers), {}, { [e]: t }) }));
|
|
@@ -6116,24 +6122,24 @@ function Hc({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
|
|
|
6116
6122
|
className: W.input,
|
|
6117
6123
|
disabled: e,
|
|
6118
6124
|
onChange: (e) => d(t, e.target.value),
|
|
6119
|
-
value:
|
|
6125
|
+
value: Gc(l.answers, t)
|
|
6120
6126
|
})]
|
|
6121
|
-
},
|
|
6127
|
+
}, Wc(t, r))), c ? /* @__PURE__ */ a(q, {
|
|
6122
6128
|
groups: u,
|
|
6123
6129
|
title: n.standardAnswer
|
|
6124
6130
|
}) : null]
|
|
6125
6131
|
});
|
|
6126
6132
|
}
|
|
6127
|
-
function
|
|
6133
|
+
function Wc(e, t) {
|
|
6128
6134
|
return e || `blank-${t + 1}`;
|
|
6129
6135
|
}
|
|
6130
|
-
function
|
|
6136
|
+
function Gc(e, t) {
|
|
6131
6137
|
var n, r;
|
|
6132
6138
|
return (n = (r = Object.entries(e).find(([e]) => e === t)) == null ? void 0 : r[1]) == null ? "" : n;
|
|
6133
6139
|
}
|
|
6134
6140
|
//#endregion
|
|
6135
6141
|
//#region src/question/renderers/classificationAnswers.tsx
|
|
6136
|
-
function
|
|
6142
|
+
function Kc(e) {
|
|
6137
6143
|
return e.categories.map((t) => ({
|
|
6138
6144
|
kind: "detailed",
|
|
6139
6145
|
contents: e.items.filter((n) => e.answers[n.id] === t.id).map((e) => /* @__PURE__ */ a(K, { content: e.content }, `${t.id}-${e.id}`)),
|
|
@@ -6155,10 +6161,10 @@ var J = {
|
|
|
6155
6161
|
};
|
|
6156
6162
|
//#endregion
|
|
6157
6163
|
//#region src/question/player/QuestionClassificationPlayer.tsx
|
|
6158
|
-
function
|
|
6159
|
-
let [l, u] = m(""), d =
|
|
6164
|
+
function qc({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
|
|
6165
|
+
let [l, u] = m(""), d = Zs(i, s), f = Yc(d.placements, t), p = t.items.find((e) => e.id === l);
|
|
6160
6166
|
function h(e, n) {
|
|
6161
|
-
r(k(k({}, d), {}, { placements:
|
|
6167
|
+
r(k(k({}, d), {}, { placements: Yc(lc(f, e, n), t) })), u("");
|
|
6162
6168
|
}
|
|
6163
6169
|
function g(t, n) {
|
|
6164
6170
|
t.preventDefault();
|
|
@@ -6166,7 +6172,7 @@ function Kc({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
|
|
|
6166
6172
|
!e && r && h(r, n);
|
|
6167
6173
|
}
|
|
6168
6174
|
function _(n) {
|
|
6169
|
-
let r = l === n.id, i =
|
|
6175
|
+
let r = l === n.id, i = Jc(n.id, f, t, c);
|
|
6170
6176
|
return /* @__PURE__ */ a("button", {
|
|
6171
6177
|
"aria-pressed": r,
|
|
6172
6178
|
className: U(J.item, r && J.selected, i === "correct" && J.correct, i === "incorrect" && J.incorrect, i === "unanswered" && J.unanswered),
|
|
@@ -6216,62 +6222,62 @@ function Kc({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
|
|
|
6216
6222
|
children: t.items.filter((e) => !f[e.id]).map((e) => _(e))
|
|
6217
6223
|
})]
|
|
6218
6224
|
}), c ? /* @__PURE__ */ a(q, {
|
|
6219
|
-
groups:
|
|
6225
|
+
groups: Kc(t),
|
|
6220
6226
|
title: n.standardAnswer
|
|
6221
6227
|
}) : null]
|
|
6222
6228
|
});
|
|
6223
6229
|
}
|
|
6224
|
-
function
|
|
6230
|
+
function Jc(e, t, n, r) {
|
|
6225
6231
|
var i, a;
|
|
6226
6232
|
let o = (i = t[e]) == null ? "" : i, s = (a = n.answers[e]) == null ? "" : a;
|
|
6227
6233
|
if (!(!r || !s)) return o ? s === o ? "correct" : "incorrect" : "unanswered";
|
|
6228
6234
|
}
|
|
6229
|
-
function
|
|
6235
|
+
function Yc(e, t) {
|
|
6230
6236
|
return $e(e, t.categories, t.items);
|
|
6231
6237
|
}
|
|
6232
6238
|
//#endregion
|
|
6233
6239
|
//#region src/question/renderers/QuestionRichContentWithBlankView.tsx
|
|
6234
|
-
function
|
|
6240
|
+
function Xc({ className: e, content: t, renderBlank: n }) {
|
|
6235
6241
|
let r = /* @__PURE__ */ new Map();
|
|
6236
6242
|
return /* @__PURE__ */ a("div", {
|
|
6237
6243
|
className: [G["rich-content"], e == null ? "" : e].filter(Boolean).join(" "),
|
|
6238
|
-
children: t.json.map((e, t) =>
|
|
6244
|
+
children: t.json.map((e, t) => Zc(e, {
|
|
6239
6245
|
blankIndexes: r,
|
|
6240
6246
|
key: `node-${t}`,
|
|
6241
6247
|
renderBlank: n
|
|
6242
6248
|
}))
|
|
6243
6249
|
});
|
|
6244
6250
|
}
|
|
6245
|
-
function
|
|
6251
|
+
function Zc(e, t) {
|
|
6246
6252
|
if (typeof e.text == "string") return /* @__PURE__ */ a(s, { children: e.text }, t.key);
|
|
6247
|
-
if (e.type === "blank") return /* @__PURE__ */ a(s, { children:
|
|
6248
|
-
let n =
|
|
6253
|
+
if (e.type === "blank") return /* @__PURE__ */ a(s, { children: Qc(e, t) }, t.key);
|
|
6254
|
+
let n = el(e.children, t);
|
|
6249
6255
|
switch (e.type) {
|
|
6250
|
-
case "heading": return
|
|
6256
|
+
case "heading": return tl(e, n, t.key);
|
|
6251
6257
|
case "table": return /* @__PURE__ */ a("table", { children: n }, t.key);
|
|
6252
6258
|
case "table-row": return /* @__PURE__ */ a("tr", { children: n }, t.key);
|
|
6253
6259
|
case "table-cell": return /* @__PURE__ */ a("td", { children: n }, t.key);
|
|
6254
6260
|
default: return /* @__PURE__ */ a("p", { children: n }, t.key);
|
|
6255
6261
|
}
|
|
6256
6262
|
}
|
|
6257
|
-
function
|
|
6258
|
-
let n =
|
|
6263
|
+
function Qc(e, t) {
|
|
6264
|
+
let n = nl(e.blankId), r = $c(t.blankIndexes, n);
|
|
6259
6265
|
return t.renderBlank({
|
|
6260
6266
|
blankId: n,
|
|
6261
6267
|
index: r,
|
|
6262
|
-
label:
|
|
6268
|
+
label: nl(e.label)
|
|
6263
6269
|
});
|
|
6264
6270
|
}
|
|
6265
|
-
function
|
|
6271
|
+
function $c(e, t) {
|
|
6266
6272
|
let n = e.get(t);
|
|
6267
6273
|
if (n !== void 0) return n;
|
|
6268
6274
|
let r = e.size;
|
|
6269
6275
|
return e.set(t, r), r;
|
|
6270
6276
|
}
|
|
6271
|
-
function
|
|
6272
|
-
return (e == null ? [] : e).map((e, n) =>
|
|
6277
|
+
function el(e, t) {
|
|
6278
|
+
return (e == null ? [] : e).map((e, n) => Zc(e, k(k({}, t), {}, { key: `${t.key}-${n}` })));
|
|
6273
6279
|
}
|
|
6274
|
-
function
|
|
6280
|
+
function tl(e, t, n) {
|
|
6275
6281
|
switch (e.level) {
|
|
6276
6282
|
case 1: return /* @__PURE__ */ a("h1", { children: t }, n);
|
|
6277
6283
|
case 2: return /* @__PURE__ */ a("h2", { children: t }, n);
|
|
@@ -6279,7 +6285,7 @@ function el(e, t, n) {
|
|
|
6279
6285
|
default: return /* @__PURE__ */ a("p", { children: t }, n);
|
|
6280
6286
|
}
|
|
6281
6287
|
}
|
|
6282
|
-
function
|
|
6288
|
+
function nl(e) {
|
|
6283
6289
|
return typeof e == "string" ? e : "";
|
|
6284
6290
|
}
|
|
6285
6291
|
var Y = {
|
|
@@ -6300,10 +6306,10 @@ var Y = {
|
|
|
6300
6306
|
};
|
|
6301
6307
|
//#endregion
|
|
6302
6308
|
//#region src/question/player/QuestionFillTextContentPlayer.tsx
|
|
6303
|
-
function
|
|
6304
|
-
return /* @__PURE__ */ a(
|
|
6309
|
+
function rl({ answers: e, disabled: t, item: n, messages: r, onAnswerChange: i, structure: o }) {
|
|
6310
|
+
return /* @__PURE__ */ a(Xc, {
|
|
6305
6311
|
content: n.content,
|
|
6306
|
-
renderBlank: (a) =>
|
|
6312
|
+
renderBlank: (a) => il(a, {
|
|
6307
6313
|
answers: e,
|
|
6308
6314
|
blankLabel: r.blankLabel,
|
|
6309
6315
|
disabled: t,
|
|
@@ -6313,10 +6319,10 @@ function nl({ answers: e, disabled: t, item: n, messages: r, onAnswerChange: i,
|
|
|
6313
6319
|
})
|
|
6314
6320
|
});
|
|
6315
6321
|
}
|
|
6316
|
-
function
|
|
6317
|
-
let { blankId: n } = e, r = t.item.blanks.indexOf(n), i =
|
|
6322
|
+
function il(e, t) {
|
|
6323
|
+
let { blankId: n } = e, r = t.item.blanks.indexOf(n), i = ul(e.label, t.blankLabel, r);
|
|
6318
6324
|
if (t.structure.config.candidateMode === "none") {
|
|
6319
|
-
let e =
|
|
6325
|
+
let e = ol(t.answers, n);
|
|
6320
6326
|
return /* @__PURE__ */ a("input", {
|
|
6321
6327
|
"aria-label": i,
|
|
6322
6328
|
className: Y["inline-input"],
|
|
@@ -6328,8 +6334,8 @@ function rl(e, t) {
|
|
|
6328
6334
|
value: (e == null ? void 0 : e.kind) === "text" ? e.value : ""
|
|
6329
6335
|
});
|
|
6330
6336
|
}
|
|
6331
|
-
if (t.structure.config.candidateMode === "sharedPool") return
|
|
6332
|
-
let o =
|
|
6337
|
+
if (t.structure.config.candidateMode === "sharedPool") return al(n, i, t);
|
|
6338
|
+
let o = ol(t.answers, n), s = cl(t.item, n, t.structure.config.candidateMode, o);
|
|
6333
6339
|
return /* @__PURE__ */ a("span", {
|
|
6334
6340
|
"aria-label": i,
|
|
6335
6341
|
className: Y["inline-blank-underline"],
|
|
@@ -6339,9 +6345,9 @@ function rl(e, t) {
|
|
|
6339
6345
|
}) : i
|
|
6340
6346
|
});
|
|
6341
6347
|
}
|
|
6342
|
-
function
|
|
6348
|
+
function al(e, t, n) {
|
|
6343
6349
|
var r, i;
|
|
6344
|
-
let s =
|
|
6350
|
+
let s = ol(n.answers, e), c = (r = ((s == null ? void 0 : s.kind) === "option" ? s.optionIds : []).slice(0, 1)[0]) == null ? "" : r, l = ll(n.answers, e);
|
|
6345
6351
|
return /* @__PURE__ */ o("select", {
|
|
6346
6352
|
"aria-label": t,
|
|
6347
6353
|
className: Y["inline-select"],
|
|
@@ -6361,11 +6367,11 @@ function il(e, t, n) {
|
|
|
6361
6367
|
}, e.optionId))]
|
|
6362
6368
|
});
|
|
6363
6369
|
}
|
|
6364
|
-
function
|
|
6370
|
+
function ol(e, t) {
|
|
6365
6371
|
var n;
|
|
6366
6372
|
return (n = Object.entries(e).find(([e]) => e === t)) == null ? void 0 : n[1];
|
|
6367
6373
|
}
|
|
6368
|
-
function
|
|
6374
|
+
function sl(e, t, n) {
|
|
6369
6375
|
var r, i;
|
|
6370
6376
|
if (n === "sharedPool") {
|
|
6371
6377
|
var a;
|
|
@@ -6373,25 +6379,25 @@ function ol(e, t, n) {
|
|
|
6373
6379
|
}
|
|
6374
6380
|
return (r = (i = e.blankOptionGroups) == null || (i = i.find((e) => e.blankId === t)) == null ? void 0 : i.options) == null ? [] : r;
|
|
6375
6381
|
}
|
|
6376
|
-
function
|
|
6382
|
+
function cl(e, t, n, r) {
|
|
6377
6383
|
let i = (r == null ? void 0 : r.kind) === "option" ? r.optionIds[0] : void 0;
|
|
6378
|
-
if (i) return
|
|
6384
|
+
if (i) return sl(e, t, n).find((e) => e.optionId === i);
|
|
6379
6385
|
}
|
|
6380
|
-
function
|
|
6386
|
+
function ll(e, t) {
|
|
6381
6387
|
let n = /* @__PURE__ */ new Set(), r = Object.entries(e);
|
|
6382
6388
|
for (let [e, i] of r) if (e !== t && i.kind === "option") for (let e of i.optionIds) n.add(e);
|
|
6383
6389
|
return n;
|
|
6384
6390
|
}
|
|
6385
|
-
function
|
|
6391
|
+
function ul(e, t, n) {
|
|
6386
6392
|
return e || `${t} ${n + 1}`;
|
|
6387
6393
|
}
|
|
6388
6394
|
//#endregion
|
|
6389
6395
|
//#region src/question/player/QuestionFillTextPlayer.tsx
|
|
6390
|
-
function
|
|
6391
|
-
let u = En(n, t, !0), d =
|
|
6396
|
+
function dl({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
|
|
6397
|
+
let u = En(n, t, !0), d = Lc(u), f = Js(s, c, t, u.blanks), p = d.map((e, t) => ({
|
|
6392
6398
|
kind: "detailed",
|
|
6393
6399
|
contents: e.contents.map((e, n) => /* @__PURE__ */ a(K, { content: e }, `group-${t}-answer-${n}`)),
|
|
6394
|
-
marker:
|
|
6400
|
+
marker: jc(e.blankIds, u.blanks, r.blankLabel)
|
|
6395
6401
|
}));
|
|
6396
6402
|
function m(e, t) {
|
|
6397
6403
|
i(k(k({}, f), {}, { answers: k(k({}, f.answers), {}, { [e]: t }) }));
|
|
@@ -6399,7 +6405,7 @@ function ul({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
|
|
|
6399
6405
|
return /* @__PURE__ */ o("div", {
|
|
6400
6406
|
className: W["fill-text"],
|
|
6401
6407
|
children: [
|
|
6402
|
-
/* @__PURE__ */ a(
|
|
6408
|
+
/* @__PURE__ */ a(rl, {
|
|
6403
6409
|
answers: f.answers,
|
|
6404
6410
|
disabled: e,
|
|
6405
6411
|
item: u,
|
|
@@ -6407,8 +6413,8 @@ function ul({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
|
|
|
6407
6413
|
onAnswerChange: m,
|
|
6408
6414
|
structure: t
|
|
6409
6415
|
}),
|
|
6410
|
-
|
|
6411
|
-
|
|
6416
|
+
fl(u, t.config.candidateMode, r.candidateOptions),
|
|
6417
|
+
pl({
|
|
6412
6418
|
disabled: e,
|
|
6413
6419
|
item: u,
|
|
6414
6420
|
onAnswerChange: m,
|
|
@@ -6421,7 +6427,7 @@ function ul({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
|
|
|
6421
6427
|
]
|
|
6422
6428
|
});
|
|
6423
6429
|
}
|
|
6424
|
-
function
|
|
6430
|
+
function fl(e, t, n) {
|
|
6425
6431
|
var r;
|
|
6426
6432
|
let i = (r = e.candidateOptions) == null ? [] : r;
|
|
6427
6433
|
return t !== "sharedPool" || i.length === 0 ? null : /* @__PURE__ */ o("div", {
|
|
@@ -6441,7 +6447,7 @@ function dl(e, t, n) {
|
|
|
6441
6447
|
})]
|
|
6442
6448
|
});
|
|
6443
6449
|
}
|
|
6444
|
-
function
|
|
6450
|
+
function pl({ disabled: e, item: t, onAnswerChange: n, responseItem: r }) {
|
|
6445
6451
|
let i = t.blanks.reduce((e, n, r) => {
|
|
6446
6452
|
var i;
|
|
6447
6453
|
let a = (i = t.blankOptionGroups) == null ? void 0 : i.find((e) => e.blankId === n);
|
|
@@ -6452,7 +6458,7 @@ function fl({ disabled: e, item: t, onAnswerChange: n, responseItem: r }) {
|
|
|
6452
6458
|
}, []);
|
|
6453
6459
|
return i.length === 0 ? null : /* @__PURE__ */ a("div", {
|
|
6454
6460
|
className: Y["per-blank-candidate-options"],
|
|
6455
|
-
children: i.map(({ group: t, marker: i }) =>
|
|
6461
|
+
children: i.map(({ group: t, marker: i }) => ml({
|
|
6456
6462
|
disabled: e,
|
|
6457
6463
|
group: t,
|
|
6458
6464
|
marker: i,
|
|
@@ -6461,7 +6467,7 @@ function fl({ disabled: e, item: t, onAnswerChange: n, responseItem: r }) {
|
|
|
6461
6467
|
}))
|
|
6462
6468
|
});
|
|
6463
6469
|
}
|
|
6464
|
-
function
|
|
6470
|
+
function ml({ disabled: e, group: t, marker: n, onAnswerChange: r, responseItem: i }) {
|
|
6465
6471
|
let s = i.answers[t.blankId];
|
|
6466
6472
|
return /* @__PURE__ */ o("section", {
|
|
6467
6473
|
"aria-label": n,
|
|
@@ -6471,7 +6477,7 @@ function pl({ disabled: e, group: t, marker: n, onAnswerChange: r, responseItem:
|
|
|
6471
6477
|
children: n
|
|
6472
6478
|
}), /* @__PURE__ */ a("div", {
|
|
6473
6479
|
className: Y["per-blank-candidate-list"],
|
|
6474
|
-
children: t.options.map((n) =>
|
|
6480
|
+
children: t.options.map((n) => hl({
|
|
6475
6481
|
activeAnswer: s,
|
|
6476
6482
|
blankId: t.blankId,
|
|
6477
6483
|
disabled: e,
|
|
@@ -6481,14 +6487,14 @@ function pl({ disabled: e, group: t, marker: n, onAnswerChange: r, responseItem:
|
|
|
6481
6487
|
})]
|
|
6482
6488
|
}, t.blankId);
|
|
6483
6489
|
}
|
|
6484
|
-
function
|
|
6490
|
+
function hl({ activeAnswer: e, blankId: t, disabled: n, onAnswerChange: r, option: i }) {
|
|
6485
6491
|
let o = (e == null ? void 0 : e.kind) === "option" && e.optionIds.includes(i.optionId);
|
|
6486
6492
|
return /* @__PURE__ */ a("button", {
|
|
6487
6493
|
"aria-pressed": o,
|
|
6488
6494
|
className: o ? Y.selected : void 0,
|
|
6489
6495
|
"data-selected": o ? "true" : void 0,
|
|
6490
6496
|
disabled: n,
|
|
6491
|
-
onClick: () => r(t,
|
|
6497
|
+
onClick: () => r(t, oc(e, i.optionId, "single")),
|
|
6492
6498
|
type: "button",
|
|
6493
6499
|
children: /* @__PURE__ */ a(K, { content: i.content })
|
|
6494
6500
|
}, i.optionId);
|
|
@@ -6508,8 +6514,8 @@ var X = {
|
|
|
6508
6514
|
};
|
|
6509
6515
|
//#endregion
|
|
6510
6516
|
//#region src/question/player/QuestionJudgementGroupPlayer.tsx
|
|
6511
|
-
function
|
|
6512
|
-
let u =
|
|
6517
|
+
function gl({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
|
|
6518
|
+
let u = Xs(s, c), d = un(t.config.judgeAnswerMode), f = [{
|
|
6513
6519
|
kind: "detailed",
|
|
6514
6520
|
contents: dn(t.config.judgeAnswerMode, n.answers),
|
|
6515
6521
|
marker: ""
|
|
@@ -6544,8 +6550,8 @@ function hl({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
|
|
|
6544
6550
|
}
|
|
6545
6551
|
//#endregion
|
|
6546
6552
|
//#region src/question/renderers/lineConnectAnswers.tsx
|
|
6547
|
-
function
|
|
6548
|
-
let t =
|
|
6553
|
+
function _l(e) {
|
|
6554
|
+
let t = vl(e);
|
|
6549
6555
|
return e.columns.reduce((n, r, i) => {
|
|
6550
6556
|
let o = r.items.map((n, o) => {
|
|
6551
6557
|
var s;
|
|
@@ -6561,7 +6567,7 @@ function gl(e) {
|
|
|
6561
6567
|
return [...n, ...o];
|
|
6562
6568
|
}, []);
|
|
6563
6569
|
}
|
|
6564
|
-
function
|
|
6570
|
+
function vl(e) {
|
|
6565
6571
|
return e.columns.reduce((e, t, n) => (t.items.forEach((t) => e.set(t.itemId, {
|
|
6566
6572
|
columnIndex: n,
|
|
6567
6573
|
item: t
|
|
@@ -6569,8 +6575,8 @@ function _l(e) {
|
|
|
6569
6575
|
}
|
|
6570
6576
|
//#endregion
|
|
6571
6577
|
//#region src/question/player/QuestionLineConnectPlayer.tsx
|
|
6572
|
-
function
|
|
6573
|
-
let [u, h] = m(null), [g, _] = m(null), v = p(null), y = p(/* @__PURE__ */ new Map()), b =
|
|
6578
|
+
function yl({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
|
|
6579
|
+
let [u, h] = m(null), [g, _] = m(null), v = p(null), y = p(/* @__PURE__ */ new Map()), b = Qs(i, s), x = { gridTemplateColumns: `repeat(${t.columns.length}, minmax(12rem, 1fr))` }, S = f(() => Za(t, b.connections), [t, b.connections]), ee = f(() => JSON.stringify({
|
|
6574
6580
|
columns: t.columns.map((e) => e.items.map((e) => e.itemId)),
|
|
6575
6581
|
connections: b.connections
|
|
6576
6582
|
}), [t.columns, b.connections]), C = l(() => {
|
|
@@ -6621,7 +6627,7 @@ function vl({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
|
|
|
6621
6627
|
itemId: n
|
|
6622
6628
|
}) : null;
|
|
6623
6629
|
if (i) {
|
|
6624
|
-
r(k(k({}, b), {}, { connections:
|
|
6630
|
+
r(k(k({}, b), {}, { connections: sc(b.connections, i.fromItemId, i.toItemId) })), h(null);
|
|
6625
6631
|
return;
|
|
6626
6632
|
}
|
|
6627
6633
|
h({
|
|
@@ -6686,14 +6692,14 @@ function vl({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
|
|
|
6686
6692
|
}, t.columnId))
|
|
6687
6693
|
})]
|
|
6688
6694
|
}), c ? /* @__PURE__ */ a(q, {
|
|
6689
|
-
groups:
|
|
6695
|
+
groups: _l(t),
|
|
6690
6696
|
title: n.standardAnswer
|
|
6691
6697
|
}) : null]
|
|
6692
6698
|
});
|
|
6693
6699
|
}
|
|
6694
6700
|
//#endregion
|
|
6695
6701
|
//#region src/question/renderers/matchingAnswers.tsx
|
|
6696
|
-
function
|
|
6702
|
+
function bl(e) {
|
|
6697
6703
|
var t, n;
|
|
6698
6704
|
let r = e.columns[0], i = e.columns[1], o = new Map((t = i == null ? void 0 : i.items.map((e) => [e.itemId, e])) == null ? [] : t);
|
|
6699
6705
|
return ((n = r == null ? void 0 : r.items) == null ? [] : n).map((t, n) => {
|
|
@@ -6708,7 +6714,7 @@ function yl(e) {
|
|
|
6708
6714
|
};
|
|
6709
6715
|
});
|
|
6710
6716
|
}
|
|
6711
|
-
var
|
|
6717
|
+
var xl = {
|
|
6712
6718
|
board: "_board_1q6ar_1",
|
|
6713
6719
|
"matched-rows": "_matched-rows_1q6ar_6",
|
|
6714
6720
|
"matched-row": "_matched-row_1q6ar_6",
|
|
@@ -6721,8 +6727,8 @@ var bl = {
|
|
|
6721
6727
|
};
|
|
6722
6728
|
//#endregion
|
|
6723
6729
|
//#region src/question/player/QuestionMatchingPlayer.tsx
|
|
6724
|
-
function
|
|
6725
|
-
let [l, u] = m(null), d =
|
|
6730
|
+
function Sl({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
|
|
6731
|
+
let [l, u] = m(null), d = $s(i, s), f = Cl(t, d.connections);
|
|
6726
6732
|
function p(t, n) {
|
|
6727
6733
|
if (e) return;
|
|
6728
6734
|
let i = l ? gt(l, {
|
|
@@ -6730,7 +6736,7 @@ function xl({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
|
|
|
6730
6736
|
itemId: n
|
|
6731
6737
|
}) : null;
|
|
6732
6738
|
if (i) {
|
|
6733
|
-
r(k(k({}, d), {}, { connections:
|
|
6739
|
+
r(k(k({}, d), {}, { connections: cc(d.connections, i.fromItemId, i.toItemId) })), u(null);
|
|
6734
6740
|
return;
|
|
6735
6741
|
}
|
|
6736
6742
|
u((l == null ? void 0 : l.itemId) === n ? null : {
|
|
@@ -6742,13 +6748,13 @@ function xl({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
|
|
|
6742
6748
|
let r = (l == null ? void 0 : l.itemId) === t.item.itemId;
|
|
6743
6749
|
return /* @__PURE__ */ o("button", {
|
|
6744
6750
|
"aria-pressed": r,
|
|
6745
|
-
className: U(
|
|
6751
|
+
className: U(xl.item, r && xl.selected, n && xl.matched),
|
|
6746
6752
|
"data-testid": `matching-player-item-${t.item.itemId}`,
|
|
6747
6753
|
disabled: e,
|
|
6748
6754
|
onClick: () => p(t.columnIndex, t.item.itemId),
|
|
6749
6755
|
type: "button",
|
|
6750
6756
|
children: [t.marker ? /* @__PURE__ */ a("span", {
|
|
6751
|
-
className:
|
|
6757
|
+
className: xl.marker,
|
|
6752
6758
|
children: t.marker
|
|
6753
6759
|
}) : null, /* @__PURE__ */ a(K, { content: t.item.content })]
|
|
6754
6760
|
}, t.item.itemId);
|
|
@@ -6756,31 +6762,31 @@ function xl({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
|
|
|
6756
6762
|
return /* @__PURE__ */ o("div", {
|
|
6757
6763
|
className: G.element,
|
|
6758
6764
|
children: [/* @__PURE__ */ o("div", {
|
|
6759
|
-
className:
|
|
6765
|
+
className: xl.board,
|
|
6760
6766
|
children: [f.rows.length > 0 ? /* @__PURE__ */ a("div", {
|
|
6761
|
-
className:
|
|
6767
|
+
className: xl["matched-rows"],
|
|
6762
6768
|
children: f.rows.map((e) => /* @__PURE__ */ o("div", {
|
|
6763
|
-
className:
|
|
6769
|
+
className: xl["matched-row"],
|
|
6764
6770
|
"data-testid": `matching-player-row-${e.from.item.itemId}-${e.to.item.itemId}`,
|
|
6765
6771
|
children: [h(e.from, !0), h(e.to, !0)]
|
|
6766
6772
|
}, `${e.from.item.itemId}-${e.to.item.itemId}`))
|
|
6767
6773
|
}) : null, f.unmatchedColumns.some((e) => e.length > 0) ? /* @__PURE__ */ a("div", {
|
|
6768
|
-
className:
|
|
6774
|
+
className: xl.columns,
|
|
6769
6775
|
children: f.unmatchedColumns.map((e, n) => {
|
|
6770
6776
|
var r, i;
|
|
6771
6777
|
return /* @__PURE__ */ a("section", {
|
|
6772
|
-
className:
|
|
6778
|
+
className: xl.column,
|
|
6773
6779
|
children: e.map((e) => h(e, !1))
|
|
6774
6780
|
}, (r = (i = t.columns[n]) == null ? void 0 : i.columnId) == null ? n : r);
|
|
6775
6781
|
})
|
|
6776
6782
|
}) : null]
|
|
6777
6783
|
}), c ? /* @__PURE__ */ a(q, {
|
|
6778
|
-
groups:
|
|
6784
|
+
groups: bl(t),
|
|
6779
6785
|
title: n.standardAnswer
|
|
6780
6786
|
}) : null]
|
|
6781
6787
|
});
|
|
6782
6788
|
}
|
|
6783
|
-
function
|
|
6789
|
+
function Cl(e, t) {
|
|
6784
6790
|
var n;
|
|
6785
6791
|
let r = e.columns.map((e, t) => e.items.map((n, r) => ({
|
|
6786
6792
|
columnIndex: t,
|
|
@@ -6801,13 +6807,13 @@ function Sl(e, t) {
|
|
|
6801
6807
|
}
|
|
6802
6808
|
//#endregion
|
|
6803
6809
|
//#region src/question/renderers/optionGroupAnswers.tsx
|
|
6804
|
-
function
|
|
6810
|
+
function wl(e, t) {
|
|
6805
6811
|
return pn(t, e.config.optionLabelStyle).map((e) => ({
|
|
6806
6812
|
kind: "markerOnly",
|
|
6807
6813
|
marker: e.marker
|
|
6808
6814
|
}));
|
|
6809
6815
|
}
|
|
6810
|
-
var
|
|
6816
|
+
var Tl = {
|
|
6811
6817
|
"table-wrap": "_table-wrap_n67ah_1",
|
|
6812
6818
|
table: "_table_n67ah_1",
|
|
6813
6819
|
"table-option-column": "_table-option-column_n67ah_17",
|
|
@@ -6815,21 +6821,21 @@ var wl = {
|
|
|
6815
6821
|
};
|
|
6816
6822
|
//#endregion
|
|
6817
6823
|
//#region src/question/player/QuestionOptionGroupPlayer.tsx
|
|
6818
|
-
function
|
|
6819
|
-
let u =
|
|
6824
|
+
function El({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
|
|
6825
|
+
let u = Ks(s, c), d = fn(n, t.config.optionLabelStyle);
|
|
6820
6826
|
function f(e) {
|
|
6821
|
-
i(k(k({}, u), {}, { selectedOptionIds:
|
|
6827
|
+
i(k(k({}, u), {}, { selectedOptionIds: ac(u.selectedOptionIds, e, t.config.selectionType) }));
|
|
6822
6828
|
}
|
|
6823
6829
|
if (t.config.renderer === "table") {
|
|
6824
|
-
let i =
|
|
6830
|
+
let i = wl(t, n);
|
|
6825
6831
|
return /* @__PURE__ */ o("div", {
|
|
6826
6832
|
className: G.element,
|
|
6827
6833
|
children: [/* @__PURE__ */ a("div", {
|
|
6828
|
-
className:
|
|
6834
|
+
className: Tl["table-wrap"],
|
|
6829
6835
|
children: /* @__PURE__ */ o("table", {
|
|
6830
|
-
className:
|
|
6836
|
+
className: Tl.table,
|
|
6831
6837
|
children: [
|
|
6832
|
-
/* @__PURE__ */ o("colgroup", { children: [/* @__PURE__ */ a("col", { className:
|
|
6838
|
+
/* @__PURE__ */ o("colgroup", { children: [/* @__PURE__ */ a("col", { className: Tl["table-option-column"] }), n.columns.map((e) => /* @__PURE__ */ a("col", {}, e.id))] }),
|
|
6833
6839
|
/* @__PURE__ */ a("thead", { children: /* @__PURE__ */ o("tr", { children: [/* @__PURE__ */ a("th", { children: r.option }), n.columns.map((e) => /* @__PURE__ */ a("th", { children: /* @__PURE__ */ a(K, { content: e.content }) }, e.id))] }) }),
|
|
6834
6840
|
/* @__PURE__ */ a("tbody", { children: d.map((t) => {
|
|
6835
6841
|
let n = u.selectedOptionIds.includes(t.optionId);
|
|
@@ -6865,7 +6871,7 @@ function Tl({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
|
|
|
6865
6871
|
}) : null]
|
|
6866
6872
|
});
|
|
6867
6873
|
}
|
|
6868
|
-
let p =
|
|
6874
|
+
let p = wl(t, n);
|
|
6869
6875
|
return /* @__PURE__ */ o("div", {
|
|
6870
6876
|
className: G.element,
|
|
6871
6877
|
children: [/* @__PURE__ */ a("ol", {
|
|
@@ -6897,7 +6903,7 @@ function Tl({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
|
|
|
6897
6903
|
}
|
|
6898
6904
|
//#endregion
|
|
6899
6905
|
//#region src/question/renderers/orderingAnswerGroups.tsx
|
|
6900
|
-
function
|
|
6906
|
+
function Dl(e) {
|
|
6901
6907
|
let t = new Map(e.sortOptions.map((e) => [e.id, e]));
|
|
6902
6908
|
return e.answers.map((e, n) => {
|
|
6903
6909
|
let r = t.get(e);
|
|
@@ -6910,10 +6916,10 @@ function El(e) {
|
|
|
6910
6916
|
}
|
|
6911
6917
|
//#endregion
|
|
6912
6918
|
//#region src/question/player/QuestionOrderingPlayer.tsx
|
|
6913
|
-
function
|
|
6914
|
-
let l =
|
|
6919
|
+
function Ol({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
|
|
6920
|
+
let l = ec(i, s, t), u = new Map(t.sortOptions.map((e) => [e.id, e])), d = l.orderedOptionIds.map((e) => u.get(e)).filter((e) => !!e);
|
|
6915
6921
|
function f(e, n) {
|
|
6916
|
-
r(k(k({}, l), {}, { orderedOptionIds:
|
|
6922
|
+
r(k(k({}, l), {}, { orderedOptionIds: uc(l.orderedOptionIds, t, e, n) }));
|
|
6917
6923
|
}
|
|
6918
6924
|
return /* @__PURE__ */ o("div", {
|
|
6919
6925
|
className: G.element,
|
|
@@ -6948,12 +6954,12 @@ function Dl({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
|
|
|
6948
6954
|
]
|
|
6949
6955
|
}, t.id))
|
|
6950
6956
|
}), c ? /* @__PURE__ */ a(q, {
|
|
6951
|
-
groups:
|
|
6957
|
+
groups: Dl(t),
|
|
6952
6958
|
title: n.standardAnswer
|
|
6953
6959
|
}) : null]
|
|
6954
6960
|
});
|
|
6955
6961
|
}
|
|
6956
|
-
var
|
|
6962
|
+
var kl = {
|
|
6957
6963
|
content: "_content_63948_1",
|
|
6958
6964
|
paragraph: "_paragraph_63948_10",
|
|
6959
6965
|
marker: "_marker_63948_14",
|
|
@@ -6963,21 +6969,21 @@ var Ol = {
|
|
|
6963
6969
|
};
|
|
6964
6970
|
//#endregion
|
|
6965
6971
|
//#region src/question/renderers/QuestionTextMarkerContent.tsx
|
|
6966
|
-
function
|
|
6972
|
+
function Al({ answerMarkers: e = [], content: t, disabled: n = !1, onMarkerClick: r, selectedMarkers: i = [], showAnswer: o = !1 }) {
|
|
6967
6973
|
let c = t.json.length ? t.json : [{
|
|
6968
6974
|
children: [{ text: t.text }],
|
|
6969
6975
|
type: "paragraph"
|
|
6970
6976
|
}];
|
|
6971
6977
|
return /* @__PURE__ */ a("div", {
|
|
6972
|
-
className:
|
|
6978
|
+
className: kl.content,
|
|
6973
6979
|
children: c.map((e, t) => l(e, `node-${t}`))
|
|
6974
6980
|
});
|
|
6975
6981
|
function l(e, t) {
|
|
6976
|
-
if (
|
|
6977
|
-
if (!
|
|
6982
|
+
if (Ml(e)) return u(e, t);
|
|
6983
|
+
if (!jl(e)) return null;
|
|
6978
6984
|
let n = e.children.map((e, n) => l(e, `${t}-${n}`));
|
|
6979
6985
|
return e.type === "paragraph" ? /* @__PURE__ */ a("p", {
|
|
6980
|
-
className:
|
|
6986
|
+
className: kl.paragraph,
|
|
6981
6987
|
children: n
|
|
6982
6988
|
}, t) : /* @__PURE__ */ a("span", { children: n }, t);
|
|
6983
6989
|
}
|
|
@@ -6991,7 +6997,7 @@ function kl({ answerMarkers: e = [], content: t, disabled: n = !1, onMarkerClick
|
|
|
6991
6997
|
let n = i.includes(t), a = o && e.includes(t);
|
|
6992
6998
|
return {
|
|
6993
6999
|
answer: a,
|
|
6994
|
-
className: Ja(
|
|
7000
|
+
className: Ja(kl.marker, r ? kl["marker-button"] : "", n ? kl["marker-selected"] : "", a ? kl["marker-answer"] : ""),
|
|
6995
7001
|
selected: n
|
|
6996
7002
|
};
|
|
6997
7003
|
}
|
|
@@ -7017,17 +7023,17 @@ function kl({ answerMarkers: e = [], content: t, disabled: n = !1, onMarkerClick
|
|
|
7017
7023
|
}, n);
|
|
7018
7024
|
}
|
|
7019
7025
|
}
|
|
7020
|
-
function
|
|
7026
|
+
function jl(e) {
|
|
7021
7027
|
return !!(e && typeof e == "object" && "children" in e && Array.isArray(e.children));
|
|
7022
7028
|
}
|
|
7023
|
-
function
|
|
7029
|
+
function Ml(e) {
|
|
7024
7030
|
return !!(e && typeof e == "object" && "text" in e && typeof e.text == "string");
|
|
7025
7031
|
}
|
|
7026
7032
|
//#endregion
|
|
7027
7033
|
//#region src/question/renderers/QuestionTextMarkerView.tsx
|
|
7028
|
-
function
|
|
7034
|
+
function Nl({ item: e, messages: t, showAnswer: n }) {
|
|
7029
7035
|
let r = Dt(e.content.json).filter((t) => e.answers.includes(t.markerId)).map((e) => e.text);
|
|
7030
|
-
return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(
|
|
7036
|
+
return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(Al, {
|
|
7031
7037
|
answerMarkers: e.answers,
|
|
7032
7038
|
content: e.content,
|
|
7033
7039
|
showAnswer: n
|
|
@@ -7042,35 +7048,35 @@ function Ml({ item: e, messages: t, showAnswer: n }) {
|
|
|
7042
7048
|
}
|
|
7043
7049
|
//#endregion
|
|
7044
7050
|
//#region src/question/player/QuestionTextMarkerPlayer.tsx
|
|
7045
|
-
function
|
|
7046
|
-
let c =
|
|
7047
|
-
return s ? /* @__PURE__ */ a(
|
|
7051
|
+
function Pl({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: o, showAnswer: s }) {
|
|
7052
|
+
let c = tc(i, o);
|
|
7053
|
+
return s ? /* @__PURE__ */ a(Nl, {
|
|
7048
7054
|
item: t,
|
|
7049
7055
|
messages: n,
|
|
7050
7056
|
showAnswer: s
|
|
7051
|
-
}) : /* @__PURE__ */ a(
|
|
7057
|
+
}) : /* @__PURE__ */ a(Al, {
|
|
7052
7058
|
answerMarkers: t.answers,
|
|
7053
7059
|
content: t.content,
|
|
7054
7060
|
disabled: e,
|
|
7055
|
-
onMarkerClick: (e) => r(k(k({}, c), {}, { selectedMarkers:
|
|
7061
|
+
onMarkerClick: (e) => r(k(k({}, c), {}, { selectedMarkers: dc(c.selectedMarkers, e) })),
|
|
7056
7062
|
selectedMarkers: c.selectedMarkers
|
|
7057
7063
|
});
|
|
7058
7064
|
}
|
|
7059
|
-
var
|
|
7065
|
+
var Fl = { placeholder: "_placeholder_xde95_1" };
|
|
7060
7066
|
//#endregion
|
|
7061
7067
|
//#region src/question/shared/QuestionTextResponsePlaceholder.tsx
|
|
7062
|
-
function
|
|
7068
|
+
function Il({ label: e }) {
|
|
7063
7069
|
return /* @__PURE__ */ a("div", {
|
|
7064
7070
|
"aria-label": e,
|
|
7065
|
-
className:
|
|
7071
|
+
className: Fl.placeholder,
|
|
7066
7072
|
children: e
|
|
7067
7073
|
});
|
|
7068
7074
|
}
|
|
7069
7075
|
//#endregion
|
|
7070
7076
|
//#region src/question/player/QuestionTextResponsePlayer.tsx
|
|
7071
|
-
function
|
|
7072
|
-
let l =
|
|
7073
|
-
return e ? P(l.content) ? /* @__PURE__ */ a(
|
|
7077
|
+
function Ll({ disabled: e, locale: t, label: n, messages: r, onChange: i, response: o, responseIndex: s, uploadImage: c }) {
|
|
7078
|
+
let l = nc(o, s);
|
|
7079
|
+
return e ? P(l.content) ? /* @__PURE__ */ a(Il, { label: r.textResponsePlaceholder }) : /* @__PURE__ */ a(K, { content: l.content }) : /* @__PURE__ */ a(Fa, {
|
|
7074
7080
|
ariaLabel: n,
|
|
7075
7081
|
locale: t,
|
|
7076
7082
|
onChange: (e) => i({
|
|
@@ -7085,27 +7091,27 @@ function Il({ disabled: e, locale: t, label: n, messages: r, onChange: i, respon
|
|
|
7085
7091
|
}
|
|
7086
7092
|
//#endregion
|
|
7087
7093
|
//#region src/question/renderers/wordBuilderAnswers.tsx
|
|
7088
|
-
function
|
|
7094
|
+
function Rl(e, t) {
|
|
7089
7095
|
return e.blanks.reduce((n, r) => {
|
|
7090
7096
|
var i;
|
|
7091
7097
|
let o = (i = e.answers[r]) == null ? void 0 : i.trim();
|
|
7092
7098
|
return o ? [...n, {
|
|
7093
7099
|
kind: "detailed",
|
|
7094
7100
|
contents: [/* @__PURE__ */ a(K, { content: M(o) }, `${r}-answer`)],
|
|
7095
|
-
marker:
|
|
7101
|
+
marker: jc([r], e.blanks, t)
|
|
7096
7102
|
}] : n;
|
|
7097
7103
|
}, []);
|
|
7098
7104
|
}
|
|
7099
7105
|
//#endregion
|
|
7100
7106
|
//#region src/question/player/QuestionPlayerWordBuilder.module.css
|
|
7101
|
-
var
|
|
7107
|
+
var zl = {
|
|
7102
7108
|
"word-builder-blank": "_word-builder-blank_ftw6q_1",
|
|
7103
7109
|
"word-builder-candidate-list": "_word-builder-candidate-list_ftw6q_30"
|
|
7104
7110
|
};
|
|
7105
7111
|
//#endregion
|
|
7106
7112
|
//#region src/question/player/QuestionWordBuilderPlayer.tsx
|
|
7107
|
-
function
|
|
7108
|
-
let u = Tn(n, !0, t), d =
|
|
7113
|
+
function Bl({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
|
|
7114
|
+
let u = Tn(n, !0, t), d = Ys(s, c, u.blanks), f = Rl(u, r.blankLabel);
|
|
7109
7115
|
function p(e, t) {
|
|
7110
7116
|
i(k(k({}, d), {}, { answers: k(k({}, d.answers), {}, { [e]: t }) }));
|
|
7111
7117
|
}
|
|
@@ -7133,11 +7139,11 @@ function zl({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
|
|
|
7133
7139
|
return /* @__PURE__ */ o("div", {
|
|
7134
7140
|
className: W["fill-text"],
|
|
7135
7141
|
children: [
|
|
7136
|
-
/* @__PURE__ */ a(
|
|
7142
|
+
/* @__PURE__ */ a(Xc, {
|
|
7137
7143
|
content: u.content,
|
|
7138
7144
|
renderBlank: ({ blankId: t, index: n, label: i }) => {
|
|
7139
7145
|
var o, s;
|
|
7140
|
-
let c = (o = d.answers[t]) == null ? "" : o, l =
|
|
7146
|
+
let c = (o = d.answers[t]) == null ? "" : o, l = Vl({
|
|
7141
7147
|
answers: c,
|
|
7142
7148
|
blankLabel: r.blankLabel,
|
|
7143
7149
|
canClear: !e && !!c.trim(),
|
|
@@ -7146,7 +7152,7 @@ function zl({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
|
|
|
7146
7152
|
});
|
|
7147
7153
|
return /* @__PURE__ */ a("button", {
|
|
7148
7154
|
"aria-label": l,
|
|
7149
|
-
className:
|
|
7155
|
+
className: zl["word-builder-blank"],
|
|
7150
7156
|
disabled: e,
|
|
7151
7157
|
onClick: () => m(t),
|
|
7152
7158
|
onDragOver: (e) => e.preventDefault(),
|
|
@@ -7158,7 +7164,7 @@ function zl({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
|
|
|
7158
7164
|
}
|
|
7159
7165
|
}),
|
|
7160
7166
|
/* @__PURE__ */ a("div", {
|
|
7161
|
-
className:
|
|
7167
|
+
className: zl["word-builder-candidate-list"],
|
|
7162
7168
|
children: u.candidateOptions.map((t, n) => /* @__PURE__ */ a("button", {
|
|
7163
7169
|
disabled: e,
|
|
7164
7170
|
draggable: !e,
|
|
@@ -7177,15 +7183,15 @@ function zl({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
|
|
|
7177
7183
|
]
|
|
7178
7184
|
});
|
|
7179
7185
|
}
|
|
7180
|
-
function
|
|
7186
|
+
function Vl({ answers: e, blankLabel: t, canClear: n, index: r, label: i }) {
|
|
7181
7187
|
let a = i || `${t}${r + 1}`;
|
|
7182
7188
|
return !n || !e.trim() ? a : t === "\u7a7a" ? `${a}\uff0c\u70b9\u51fb\u6e05\u7a7a` : `${a}, click to clear`;
|
|
7183
7189
|
}
|
|
7184
7190
|
//#endregion
|
|
7185
7191
|
//#region src/question/player/QuestionPlayerElement.tsx
|
|
7186
|
-
function
|
|
7192
|
+
function Hl({ disabled: e, element: t, item: n, locale: r, messages: i, onResponseItemChange: o, response: s, responseIndex: c, showAnswer: l, uploadImage: u }) {
|
|
7187
7193
|
if (t.type !== n.type) throw Error(`\u9898\u76ee\u5143\u7d20\u7ed3\u6784\u4e0d\u5339\u914d\uff0cexpected=${t.type}\uff0cactual=${n.type}`);
|
|
7188
|
-
return t.type === "richText" ? /* @__PURE__ */ a(K, { content: n.content }) : t.type === "textResponse" ? /* @__PURE__ */ a(
|
|
7194
|
+
return t.type === "richText" ? /* @__PURE__ */ a(K, { content: n.content }) : t.type === "textResponse" ? /* @__PURE__ */ a(Ll, {
|
|
7189
7195
|
disabled: e,
|
|
7190
7196
|
label: t.name,
|
|
7191
7197
|
locale: r,
|
|
@@ -7194,7 +7200,7 @@ function Vl({ disabled: e, element: t, item: n, locale: r, messages: i, onRespon
|
|
|
7194
7200
|
response: s,
|
|
7195
7201
|
responseIndex: c,
|
|
7196
7202
|
uploadImage: u
|
|
7197
|
-
}) : t.type === "ordering" ? /* @__PURE__ */ a(
|
|
7203
|
+
}) : t.type === "ordering" ? /* @__PURE__ */ a(Ol, {
|
|
7198
7204
|
disabled: e,
|
|
7199
7205
|
item: n,
|
|
7200
7206
|
messages: i,
|
|
@@ -7202,7 +7208,7 @@ function Vl({ disabled: e, element: t, item: n, locale: r, messages: i, onRespon
|
|
|
7202
7208
|
response: s,
|
|
7203
7209
|
responseIndex: c,
|
|
7204
7210
|
showAnswer: l
|
|
7205
|
-
}) : t.type === "classification" ? /* @__PURE__ */ a(
|
|
7211
|
+
}) : t.type === "classification" ? /* @__PURE__ */ a(qc, {
|
|
7206
7212
|
disabled: e,
|
|
7207
7213
|
item: n,
|
|
7208
7214
|
messages: i,
|
|
@@ -7210,7 +7216,7 @@ function Vl({ disabled: e, element: t, item: n, locale: r, messages: i, onRespon
|
|
|
7210
7216
|
response: s,
|
|
7211
7217
|
responseIndex: c,
|
|
7212
7218
|
showAnswer: l
|
|
7213
|
-
}) : t.type === "textMarker" ? /* @__PURE__ */ a(
|
|
7219
|
+
}) : t.type === "textMarker" ? /* @__PURE__ */ a(Pl, {
|
|
7214
7220
|
disabled: e,
|
|
7215
7221
|
item: n,
|
|
7216
7222
|
messages: i,
|
|
@@ -7218,7 +7224,7 @@ function Vl({ disabled: e, element: t, item: n, locale: r, messages: i, onRespon
|
|
|
7218
7224
|
response: s,
|
|
7219
7225
|
responseIndex: c,
|
|
7220
7226
|
showAnswer: l
|
|
7221
|
-
}) :
|
|
7227
|
+
}) : Ul({
|
|
7222
7228
|
disabled: e,
|
|
7223
7229
|
element: t,
|
|
7224
7230
|
item: n,
|
|
@@ -7231,9 +7237,9 @@ function Vl({ disabled: e, element: t, item: n, locale: r, messages: i, onRespon
|
|
|
7231
7237
|
uploadImage: u
|
|
7232
7238
|
});
|
|
7233
7239
|
}
|
|
7234
|
-
function
|
|
7240
|
+
function Ul({ disabled: e, element: t, item: n, messages: r, onResponseItemChange: i, response: o, responseIndex: s, showAnswer: c }) {
|
|
7235
7241
|
switch (t.type) {
|
|
7236
|
-
case "choice": return /* @__PURE__ */ a(
|
|
7242
|
+
case "choice": return /* @__PURE__ */ a(El, {
|
|
7237
7243
|
disabled: e,
|
|
7238
7244
|
element: t,
|
|
7239
7245
|
item: n,
|
|
@@ -7243,7 +7249,7 @@ function Hl({ disabled: e, element: t, item: n, messages: r, onResponseItemChang
|
|
|
7243
7249
|
responseIndex: s,
|
|
7244
7250
|
showAnswer: c
|
|
7245
7251
|
});
|
|
7246
|
-
case "fill": return /* @__PURE__ */ a(
|
|
7252
|
+
case "fill": return /* @__PURE__ */ a(Uc, {
|
|
7247
7253
|
disabled: e,
|
|
7248
7254
|
item: n,
|
|
7249
7255
|
messages: r,
|
|
@@ -7252,7 +7258,7 @@ function Hl({ disabled: e, element: t, item: n, messages: r, onResponseItemChang
|
|
|
7252
7258
|
responseIndex: s,
|
|
7253
7259
|
showAnswer: c
|
|
7254
7260
|
});
|
|
7255
|
-
case "inlineFill": return /* @__PURE__ */ a(
|
|
7261
|
+
case "inlineFill": return /* @__PURE__ */ a(dl, {
|
|
7256
7262
|
disabled: e,
|
|
7257
7263
|
element: t,
|
|
7258
7264
|
item: n,
|
|
@@ -7262,7 +7268,7 @@ function Hl({ disabled: e, element: t, item: n, messages: r, onResponseItemChang
|
|
|
7262
7268
|
responseIndex: s,
|
|
7263
7269
|
showAnswer: c
|
|
7264
7270
|
});
|
|
7265
|
-
case "wordBuilder": return /* @__PURE__ */ a(
|
|
7271
|
+
case "wordBuilder": return /* @__PURE__ */ a(Bl, {
|
|
7266
7272
|
disabled: e,
|
|
7267
7273
|
element: t,
|
|
7268
7274
|
item: n,
|
|
@@ -7272,7 +7278,7 @@ function Hl({ disabled: e, element: t, item: n, messages: r, onResponseItemChang
|
|
|
7272
7278
|
responseIndex: s,
|
|
7273
7279
|
showAnswer: c
|
|
7274
7280
|
});
|
|
7275
|
-
case "judgement": return /* @__PURE__ */ a(
|
|
7281
|
+
case "judgement": return /* @__PURE__ */ a(gl, {
|
|
7276
7282
|
disabled: e,
|
|
7277
7283
|
element: t,
|
|
7278
7284
|
item: n,
|
|
@@ -7282,7 +7288,7 @@ function Hl({ disabled: e, element: t, item: n, messages: r, onResponseItemChang
|
|
|
7282
7288
|
responseIndex: s,
|
|
7283
7289
|
showAnswer: c
|
|
7284
7290
|
});
|
|
7285
|
-
case "lineConnect": return /* @__PURE__ */ a(
|
|
7291
|
+
case "lineConnect": return /* @__PURE__ */ a(yl, {
|
|
7286
7292
|
disabled: e,
|
|
7287
7293
|
item: n,
|
|
7288
7294
|
messages: r,
|
|
@@ -7291,7 +7297,7 @@ function Hl({ disabled: e, element: t, item: n, messages: r, onResponseItemChang
|
|
|
7291
7297
|
responseIndex: s,
|
|
7292
7298
|
showAnswer: c
|
|
7293
7299
|
});
|
|
7294
|
-
case "matching": return /* @__PURE__ */ a(
|
|
7300
|
+
case "matching": return /* @__PURE__ */ a(Sl, {
|
|
7295
7301
|
disabled: e,
|
|
7296
7302
|
item: n,
|
|
7297
7303
|
messages: r,
|
|
@@ -7304,70 +7310,71 @@ function Hl({ disabled: e, element: t, item: n, messages: r, onResponseItemChang
|
|
|
7304
7310
|
}
|
|
7305
7311
|
//#endregion
|
|
7306
7312
|
//#region src/question/player/QuestionPlayer.tsx
|
|
7307
|
-
var
|
|
7308
|
-
function
|
|
7309
|
-
let { locale: t = "zh-CN" } = e, n = Sa(e,
|
|
7310
|
-
return /* @__PURE__ */ a(
|
|
7313
|
+
var Wl = ["locale"];
|
|
7314
|
+
function Gl(e) {
|
|
7315
|
+
let { locale: t = "zh-CN" } = e, n = Sa(e, Wl), r = bs(n.value, n.questionTypeTemplates), i = Ts(n.response, r);
|
|
7316
|
+
return /* @__PURE__ */ a(Kl, k(k({}, n), {}, {
|
|
7317
|
+
childIndexPath: [],
|
|
7311
7318
|
locale: t,
|
|
7312
|
-
messages:
|
|
7313
|
-
|
|
7314
|
-
onResponseChange: (e) => n.onResponseChange(Cs(e, r)),
|
|
7319
|
+
messages: Ac(t),
|
|
7320
|
+
onResponseChange: (e) => n.onResponseChange(ws(e, r)),
|
|
7315
7321
|
response: i,
|
|
7316
7322
|
value: r
|
|
7317
7323
|
}));
|
|
7318
7324
|
}
|
|
7319
|
-
function
|
|
7320
|
-
let
|
|
7321
|
-
if (!
|
|
7322
|
-
className: U(W.root,
|
|
7325
|
+
function Kl({ childIndexPath: e, className: t, disabled: n = !1, locale: r = "zh-CN", messages: i, onResponseChange: o, response: s, rootQuestionNumber: c, showAnswer: l = !1, showExtraAttributes: u = !1, questionTypeTemplates: d, uploadImage: f, value: p }) {
|
|
7326
|
+
let m = aa(d, p);
|
|
7327
|
+
if (!m) return /* @__PURE__ */ a("div", {
|
|
7328
|
+
className: U(W.root, t),
|
|
7323
7329
|
children: /* @__PURE__ */ a("div", {
|
|
7324
7330
|
className: W.empty,
|
|
7325
|
-
children:
|
|
7331
|
+
children: i.missingQuestionTypeTemplate
|
|
7326
7332
|
})
|
|
7327
7333
|
});
|
|
7328
|
-
let
|
|
7329
|
-
|
|
7330
|
-
|
|
7331
|
-
|
|
7332
|
-
|
|
7334
|
+
let h = ql({
|
|
7335
|
+
childIndexPath: e,
|
|
7336
|
+
disabled: n,
|
|
7337
|
+
locale: r,
|
|
7338
|
+
messages: i,
|
|
7333
7339
|
onResponseChange: o,
|
|
7334
7340
|
response: s,
|
|
7335
|
-
|
|
7336
|
-
|
|
7337
|
-
|
|
7338
|
-
|
|
7339
|
-
|
|
7340
|
-
|
|
7341
|
+
rootQuestionNumber: c,
|
|
7342
|
+
showAnswer: l,
|
|
7343
|
+
showExtraAttributes: u,
|
|
7344
|
+
structure: m,
|
|
7345
|
+
uploadImage: f,
|
|
7346
|
+
questionTypeTemplates: d,
|
|
7347
|
+
value: p
|
|
7341
7348
|
});
|
|
7342
7349
|
return /* @__PURE__ */ a("div", {
|
|
7343
|
-
className: U(W.root,
|
|
7344
|
-
children:
|
|
7350
|
+
className: U(W.root, t),
|
|
7351
|
+
children: Zl(m, p) ? /* @__PURE__ */ a("div", {
|
|
7345
7352
|
className: W.empty,
|
|
7346
|
-
children:
|
|
7347
|
-
}) :
|
|
7353
|
+
children: i.previewEmpty
|
|
7354
|
+
}) : h
|
|
7348
7355
|
});
|
|
7349
7356
|
}
|
|
7350
|
-
function
|
|
7357
|
+
function ql(e) {
|
|
7351
7358
|
return /* @__PURE__ */ o(i, { children: [
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7359
|
+
Jl(e),
|
|
7360
|
+
Xl(e),
|
|
7361
|
+
Yl(e)
|
|
7355
7362
|
] });
|
|
7356
7363
|
}
|
|
7357
|
-
function
|
|
7358
|
-
return /* @__PURE__ */ a("div", {
|
|
7364
|
+
function Jl({ disabled: e, locale: t, messages: n, onResponseChange: r, response: i, showAnswer: o, structure: s, uploadImage: c, value: l }) {
|
|
7365
|
+
return s.elements.length === 0 ? null : /* @__PURE__ */ a("div", {
|
|
7359
7366
|
className: W["element-list"],
|
|
7360
7367
|
children: s.elements.map((u, d) => {
|
|
7361
7368
|
let f = rn(l, d, u), p = s.elements.slice(0, d).filter((e) => e.type !== "richText").length;
|
|
7362
7369
|
return /* @__PURE__ */ a("section", {
|
|
7363
7370
|
className: W.element,
|
|
7364
|
-
children: /* @__PURE__ */ a(
|
|
7371
|
+
children: /* @__PURE__ */ a(Hl, {
|
|
7365
7372
|
disabled: e,
|
|
7366
7373
|
element: u,
|
|
7367
7374
|
item: f,
|
|
7368
7375
|
locale: t,
|
|
7369
7376
|
messages: n,
|
|
7370
|
-
onResponseItemChange: (e) => r(
|
|
7377
|
+
onResponseItemChange: (e) => r(rc(i, p, e)),
|
|
7371
7378
|
response: i,
|
|
7372
7379
|
responseIndex: p,
|
|
7373
7380
|
showAnswer: o && s.hasAnswer,
|
|
@@ -7377,17 +7384,17 @@ function ql({ disabled: e, locale: t, messages: n, onResponseChange: r, response
|
|
|
7377
7384
|
})
|
|
7378
7385
|
});
|
|
7379
7386
|
}
|
|
7380
|
-
function
|
|
7387
|
+
function Yl({ disabled: e, locale: t, messages: n, response: r, showExtraAttributes: i, structure: s, uploadImage: c, value: l }) {
|
|
7381
7388
|
return i ? /* @__PURE__ */ a("div", {
|
|
7382
7389
|
className: W["element-list"],
|
|
7383
7390
|
children: s.extras.map((i, s) => {
|
|
7384
7391
|
let u = an(l, s, i);
|
|
7385
7392
|
return P(u.content) ? null : /* @__PURE__ */ o("section", {
|
|
7386
7393
|
className: W.extra,
|
|
7387
|
-
children: [/* @__PURE__ */ a(
|
|
7394
|
+
children: [/* @__PURE__ */ a(Bc, { children: i.name }), /* @__PURE__ */ a(Hl, {
|
|
7388
7395
|
disabled: e,
|
|
7389
|
-
element:
|
|
7390
|
-
item:
|
|
7396
|
+
element: Ql(i),
|
|
7397
|
+
item: $l(u),
|
|
7391
7398
|
locale: t,
|
|
7392
7399
|
messages: n,
|
|
7393
7400
|
onResponseItemChange: () => void 0,
|
|
@@ -7400,40 +7407,42 @@ function Jl({ disabled: e, locale: t, messages: n, response: r, showExtraAttribu
|
|
|
7400
7407
|
})
|
|
7401
7408
|
}) : null;
|
|
7402
7409
|
}
|
|
7403
|
-
function
|
|
7404
|
-
return
|
|
7405
|
-
|
|
7406
|
-
|
|
7407
|
-
|
|
7408
|
-
onChildResponseChange: (e, t) => i(
|
|
7410
|
+
function Xl({ childIndexPath: e, disabled: t, locale: n, messages: r, onResponseChange: i, response: o, rootQuestionNumber: s, showAnswer: c, showExtraAttributes: l, questionTypeTemplates: u, uploadImage: d, value: f }) {
|
|
7411
|
+
return f.children.length === 0 ? null : /* @__PURE__ */ a(Vc, {
|
|
7412
|
+
childIndexPath: e,
|
|
7413
|
+
disabled: t,
|
|
7414
|
+
messages: r,
|
|
7415
|
+
onChildResponseChange: (e, t) => i(ic(o, e, t)),
|
|
7409
7416
|
response: o,
|
|
7410
|
-
renderChild: (
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
|
|
7417
|
+
renderChild: (e, i, o, f) => /* @__PURE__ */ a(Kl, {
|
|
7418
|
+
childIndexPath: f,
|
|
7419
|
+
disabled: t,
|
|
7420
|
+
locale: n,
|
|
7421
|
+
messages: r,
|
|
7415
7422
|
onResponseChange: o,
|
|
7416
7423
|
response: i,
|
|
7417
|
-
|
|
7418
|
-
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
|
|
7424
|
+
rootQuestionNumber: s,
|
|
7425
|
+
showAnswer: c,
|
|
7426
|
+
showExtraAttributes: l,
|
|
7427
|
+
questionTypeTemplates: u,
|
|
7428
|
+
uploadImage: d,
|
|
7429
|
+
value: e
|
|
7422
7430
|
}),
|
|
7423
|
-
|
|
7431
|
+
rootQuestionNumber: s,
|
|
7432
|
+
value: f
|
|
7424
7433
|
});
|
|
7425
7434
|
}
|
|
7426
|
-
function
|
|
7435
|
+
function Zl(e, t) {
|
|
7427
7436
|
return t.elements.length === 0 && t.extras.length === 0 && t.children.length === 0;
|
|
7428
7437
|
}
|
|
7429
|
-
function
|
|
7438
|
+
function Ql(e) {
|
|
7430
7439
|
return {
|
|
7431
7440
|
config: {},
|
|
7432
7441
|
name: e.name,
|
|
7433
7442
|
type: "richText"
|
|
7434
7443
|
};
|
|
7435
7444
|
}
|
|
7436
|
-
function
|
|
7445
|
+
function $l(e) {
|
|
7437
7446
|
return {
|
|
7438
7447
|
content: e.content,
|
|
7439
7448
|
type: "richText"
|
|
@@ -7441,46 +7450,46 @@ function Ql(e) {
|
|
|
7441
7450
|
}
|
|
7442
7451
|
//#endregion
|
|
7443
7452
|
//#region src/question/renderers/QuestionBlankGroupView.module.css
|
|
7444
|
-
var
|
|
7453
|
+
var eu = {
|
|
7445
7454
|
"blank-list": "_blank-list_12ccp_1",
|
|
7446
7455
|
"blank-item": "_blank-item_12ccp_11",
|
|
7447
7456
|
"blank-field": "_blank-field_12ccp_17"
|
|
7448
7457
|
};
|
|
7449
7458
|
//#endregion
|
|
7450
7459
|
//#region src/question/renderers/QuestionBlankGroupView.tsx
|
|
7451
|
-
function
|
|
7460
|
+
function tu({ item: e, messages: t, showAnswer: n }) {
|
|
7452
7461
|
let r = N(e.answers, e.blanks).map((n, r) => ({
|
|
7453
7462
|
kind: "detailed",
|
|
7454
7463
|
contents: n.answerPools.map((e, t) => /* @__PURE__ */ a(K, { content: e }, `group-${r}-answer-${t}`)),
|
|
7455
|
-
marker:
|
|
7464
|
+
marker: jc(n.blankIds, e.blanks, t.blankLabel)
|
|
7456
7465
|
}));
|
|
7457
7466
|
return /* @__PURE__ */ o("div", {
|
|
7458
7467
|
className: G.element,
|
|
7459
7468
|
children: [/* @__PURE__ */ a("ol", {
|
|
7460
|
-
className:
|
|
7469
|
+
className: eu["blank-list"],
|
|
7461
7470
|
children: e.blanks.map((e, n) => /* @__PURE__ */ a("li", {
|
|
7462
|
-
className:
|
|
7471
|
+
className: eu["blank-item"],
|
|
7463
7472
|
children: /* @__PURE__ */ o("span", {
|
|
7464
|
-
className:
|
|
7473
|
+
className: eu["blank-field"],
|
|
7465
7474
|
children: [
|
|
7466
7475
|
t.blankLabel,
|
|
7467
7476
|
" ",
|
|
7468
7477
|
n + 1
|
|
7469
7478
|
]
|
|
7470
7479
|
})
|
|
7471
|
-
},
|
|
7480
|
+
}, nu(e, n)))
|
|
7472
7481
|
}), n ? /* @__PURE__ */ a(q, {
|
|
7473
7482
|
groups: r,
|
|
7474
7483
|
title: t.standardAnswer
|
|
7475
7484
|
}) : null]
|
|
7476
7485
|
});
|
|
7477
7486
|
}
|
|
7478
|
-
function
|
|
7487
|
+
function nu(e, t) {
|
|
7479
7488
|
return e || `blank-${t + 1}`;
|
|
7480
7489
|
}
|
|
7481
7490
|
//#endregion
|
|
7482
7491
|
//#region src/question/renderers/QuestionClassificationView.tsx
|
|
7483
|
-
function
|
|
7492
|
+
function ru({ item: e, messages: t, showAnswer: n }) {
|
|
7484
7493
|
return /* @__PURE__ */ o("div", {
|
|
7485
7494
|
className: G.element,
|
|
7486
7495
|
children: [/* @__PURE__ */ o("div", {
|
|
@@ -7505,24 +7514,24 @@ function nu({ item: e, messages: t, showAnswer: n }) {
|
|
|
7505
7514
|
}, e.id))
|
|
7506
7515
|
})]
|
|
7507
7516
|
}), n ? /* @__PURE__ */ a(q, {
|
|
7508
|
-
groups:
|
|
7517
|
+
groups: Kc(e),
|
|
7509
7518
|
title: t.standardAnswer
|
|
7510
7519
|
}) : null]
|
|
7511
7520
|
});
|
|
7512
7521
|
}
|
|
7513
7522
|
//#endregion
|
|
7514
7523
|
//#region src/question/renderers/QuestionFillTextView.tsx
|
|
7515
|
-
function
|
|
7516
|
-
let i = En(t, e, !0), s =
|
|
7524
|
+
function iu({ element: e, item: t, messages: n, showAnswer: r }) {
|
|
7525
|
+
let i = En(t, e, !0), s = Lc(i).map((e, t) => ({
|
|
7517
7526
|
kind: "detailed",
|
|
7518
7527
|
contents: e.contents.map((e, n) => /* @__PURE__ */ a(K, { content: e }, `group-${t}-answer-${n}`)),
|
|
7519
|
-
marker:
|
|
7528
|
+
marker: jc(e.blankIds, i.blanks, n.blankLabel)
|
|
7520
7529
|
}));
|
|
7521
7530
|
return /* @__PURE__ */ o("div", {
|
|
7522
7531
|
className: G.element,
|
|
7523
7532
|
children: [
|
|
7524
7533
|
/* @__PURE__ */ a(K, { content: i.content }),
|
|
7525
|
-
|
|
7534
|
+
au(i, n.candidateOptions),
|
|
7526
7535
|
r ? /* @__PURE__ */ a(q, {
|
|
7527
7536
|
groups: s,
|
|
7528
7537
|
title: n.standardAnswer
|
|
@@ -7530,7 +7539,7 @@ function ru({ element: e, item: t, messages: n, showAnswer: r }) {
|
|
|
7530
7539
|
]
|
|
7531
7540
|
});
|
|
7532
7541
|
}
|
|
7533
|
-
function
|
|
7542
|
+
function au(e, t) {
|
|
7534
7543
|
var n, r;
|
|
7535
7544
|
let i = (n = e.candidateOptions) == null ? [] : n, s = (r = e.blankOptionGroups) == null ? [] : r;
|
|
7536
7545
|
return !i.length && !s.length ? null : /* @__PURE__ */ o("div", {
|
|
@@ -7552,7 +7561,7 @@ function iu(e, t) {
|
|
|
7552
7561
|
}
|
|
7553
7562
|
//#endregion
|
|
7554
7563
|
//#region src/question/renderers/QuestionJudgementGroupView.tsx
|
|
7555
|
-
function
|
|
7564
|
+
function ou({ element: e, item: t, messages: n, showAnswer: r }) {
|
|
7556
7565
|
let i = un(e.config.judgeAnswerMode), s = [{
|
|
7557
7566
|
kind: "detailed",
|
|
7558
7567
|
contents: dn(e.config.judgeAnswerMode, t.answers),
|
|
@@ -7574,7 +7583,7 @@ function au({ element: e, item: t, messages: n, showAnswer: r }) {
|
|
|
7574
7583
|
}
|
|
7575
7584
|
//#endregion
|
|
7576
7585
|
//#region src/question/renderers/QuestionLineConnectView.tsx
|
|
7577
|
-
function
|
|
7586
|
+
function su({ item: e, messages: t, showAnswer: n }) {
|
|
7578
7587
|
let r = { gridTemplateColumns: `repeat(${e.columns.length}, minmax(12rem, 1fr))` };
|
|
7579
7588
|
return /* @__PURE__ */ o("div", {
|
|
7580
7589
|
className: G.element,
|
|
@@ -7605,12 +7614,12 @@ function ou({ item: e, messages: t, showAnswer: n }) {
|
|
|
7605
7614
|
}, e.columnId))
|
|
7606
7615
|
})
|
|
7607
7616
|
}), n ? /* @__PURE__ */ a(q, {
|
|
7608
|
-
groups:
|
|
7617
|
+
groups: _l(e),
|
|
7609
7618
|
title: t.standardAnswer
|
|
7610
7619
|
}) : null]
|
|
7611
7620
|
});
|
|
7612
7621
|
}
|
|
7613
|
-
var
|
|
7622
|
+
var cu = {
|
|
7614
7623
|
board: "_board_5xarh_1",
|
|
7615
7624
|
columns: "_columns_5xarh_6",
|
|
7616
7625
|
column: "_column_5xarh_6",
|
|
@@ -7619,21 +7628,21 @@ var su = {
|
|
|
7619
7628
|
};
|
|
7620
7629
|
//#endregion
|
|
7621
7630
|
//#region src/question/renderers/QuestionMatchingView.tsx
|
|
7622
|
-
function
|
|
7631
|
+
function lu({ item: e, messages: t, showAnswer: n }) {
|
|
7623
7632
|
return /* @__PURE__ */ o("div", {
|
|
7624
7633
|
className: G.element,
|
|
7625
7634
|
children: [/* @__PURE__ */ a("div", {
|
|
7626
|
-
className:
|
|
7635
|
+
className: cu.board,
|
|
7627
7636
|
children: /* @__PURE__ */ a("div", {
|
|
7628
|
-
className:
|
|
7637
|
+
className: cu.columns,
|
|
7629
7638
|
children: e.columns.map((e) => /* @__PURE__ */ a("section", {
|
|
7630
|
-
className:
|
|
7639
|
+
className: cu.column,
|
|
7631
7640
|
children: e.items.map((t, n) => {
|
|
7632
7641
|
let r = cn(e.labelStyle, n);
|
|
7633
7642
|
return /* @__PURE__ */ o("div", {
|
|
7634
|
-
className:
|
|
7643
|
+
className: cu.item,
|
|
7635
7644
|
children: [r ? /* @__PURE__ */ a("span", {
|
|
7636
|
-
className:
|
|
7645
|
+
className: cu.marker,
|
|
7637
7646
|
children: r
|
|
7638
7647
|
}) : null, /* @__PURE__ */ a(K, { content: t.content })]
|
|
7639
7648
|
}, t.itemId);
|
|
@@ -7641,28 +7650,28 @@ function cu({ item: e, messages: t, showAnswer: n }) {
|
|
|
7641
7650
|
}, e.columnId))
|
|
7642
7651
|
})
|
|
7643
7652
|
}), n ? /* @__PURE__ */ a(q, {
|
|
7644
|
-
groups:
|
|
7653
|
+
groups: bl(e),
|
|
7645
7654
|
title: t.standardAnswer
|
|
7646
7655
|
}) : null]
|
|
7647
7656
|
});
|
|
7648
7657
|
}
|
|
7649
7658
|
//#endregion
|
|
7650
7659
|
//#region src/question/renderers/QuestionOptionGroupView.tsx
|
|
7651
|
-
function
|
|
7660
|
+
function uu({ element: e, item: t, messages: n, showAnswer: r }) {
|
|
7652
7661
|
let i = fn(t, e.config.optionLabelStyle);
|
|
7653
7662
|
if (e.config.renderer === "table") {
|
|
7654
|
-
let s =
|
|
7663
|
+
let s = wl(e, t);
|
|
7655
7664
|
return /* @__PURE__ */ o("div", {
|
|
7656
7665
|
className: G.element,
|
|
7657
7666
|
children: [/* @__PURE__ */ a("div", {
|
|
7658
|
-
className:
|
|
7667
|
+
className: Tl["table-wrap"],
|
|
7659
7668
|
children: /* @__PURE__ */ o("table", {
|
|
7660
|
-
className:
|
|
7669
|
+
className: Tl.table,
|
|
7661
7670
|
children: [
|
|
7662
|
-
/* @__PURE__ */ o("colgroup", { children: [/* @__PURE__ */ a("col", { className:
|
|
7671
|
+
/* @__PURE__ */ o("colgroup", { children: [/* @__PURE__ */ a("col", { className: Tl["table-option-column"] }), t.columns.map((e) => /* @__PURE__ */ a("col", {}, e.id))] }),
|
|
7663
7672
|
/* @__PURE__ */ a("thead", { children: /* @__PURE__ */ o("tr", { children: [/* @__PURE__ */ a("th", { children: n.option }), t.columns.map((e) => /* @__PURE__ */ a("th", { children: /* @__PURE__ */ a(K, { content: e.content }) }, e.id))] }) }),
|
|
7664
7673
|
/* @__PURE__ */ a("tbody", { children: i.map((e) => /* @__PURE__ */ o("tr", { children: [/* @__PURE__ */ a("td", { children: /* @__PURE__ */ a("span", {
|
|
7665
|
-
className:
|
|
7674
|
+
className: Tl["table-option-marker"],
|
|
7666
7675
|
children: e.marker
|
|
7667
7676
|
}) }), e.cells.map((t, n) => /* @__PURE__ */ a("td", { children: /* @__PURE__ */ a(K, { content: t }) }, `${e.optionId}-cell-${n}`))] }, e.optionId)) })
|
|
7668
7677
|
]
|
|
@@ -7673,7 +7682,7 @@ function lu({ element: e, item: t, messages: n, showAnswer: r }) {
|
|
|
7673
7682
|
}) : null]
|
|
7674
7683
|
});
|
|
7675
7684
|
}
|
|
7676
|
-
let s =
|
|
7685
|
+
let s = wl(e, t);
|
|
7677
7686
|
return /* @__PURE__ */ o("div", {
|
|
7678
7687
|
className: G.element,
|
|
7679
7688
|
children: [/* @__PURE__ */ a("ol", {
|
|
@@ -7693,7 +7702,7 @@ function lu({ element: e, item: t, messages: n, showAnswer: r }) {
|
|
|
7693
7702
|
}
|
|
7694
7703
|
//#endregion
|
|
7695
7704
|
//#region src/question/renderers/QuestionOrderingView.tsx
|
|
7696
|
-
function
|
|
7705
|
+
function du({ item: e, messages: t, showAnswer: n }) {
|
|
7697
7706
|
return /* @__PURE__ */ o("div", {
|
|
7698
7707
|
className: G.element,
|
|
7699
7708
|
children: [/* @__PURE__ */ a("ol", {
|
|
@@ -7706,19 +7715,19 @@ function uu({ item: e, messages: t, showAnswer: n }) {
|
|
|
7706
7715
|
}), /* @__PURE__ */ a(K, { content: e.content })]
|
|
7707
7716
|
}, e.id))
|
|
7708
7717
|
}), n ? /* @__PURE__ */ a(q, {
|
|
7709
|
-
groups:
|
|
7718
|
+
groups: Dl(e),
|
|
7710
7719
|
title: t.standardAnswer
|
|
7711
7720
|
}) : null]
|
|
7712
7721
|
});
|
|
7713
7722
|
}
|
|
7714
7723
|
//#endregion
|
|
7715
7724
|
//#region src/question/renderers/QuestionWordBuilderView.tsx
|
|
7716
|
-
function
|
|
7717
|
-
let i = Tn(t, !0, e), s =
|
|
7725
|
+
function fu({ element: e, item: t, messages: n, showAnswer: r }) {
|
|
7726
|
+
let i = Tn(t, !0, e), s = Rl(i, n.blankLabel);
|
|
7718
7727
|
return /* @__PURE__ */ o("div", {
|
|
7719
7728
|
className: G.element,
|
|
7720
7729
|
children: [
|
|
7721
|
-
/* @__PURE__ */ a(
|
|
7730
|
+
/* @__PURE__ */ a(Xc, {
|
|
7722
7731
|
content: i.content,
|
|
7723
7732
|
renderBlank: ({ blankId: e, index: t, label: r }) => /* @__PURE__ */ a("span", {
|
|
7724
7733
|
"aria-label": r || `${n.blankLabel}${t + 1}`,
|
|
@@ -7748,189 +7757,192 @@ function du({ element: e, item: t, messages: n, showAnswer: r }) {
|
|
|
7748
7757
|
}
|
|
7749
7758
|
//#endregion
|
|
7750
7759
|
//#region src/question/renderers/QuestionContentElementView.tsx
|
|
7751
|
-
function
|
|
7760
|
+
function pu({ element: e, item: t, messages: n, showAnswer: r }) {
|
|
7752
7761
|
if (e.type !== t.type) throw Error(`\u9898\u76ee\u5143\u7d20\u7ed3\u6784\u4e0d\u5339\u914d\uff0cexpected=${e.type}\uff0cactual=${t.type}`);
|
|
7753
|
-
return e.type === "richText" ? /* @__PURE__ */ a(K, { content: t.content }) : e.type === "textResponse" ? null : e.type === "ordering" ? /* @__PURE__ */ a(
|
|
7762
|
+
return e.type === "richText" ? /* @__PURE__ */ a(K, { content: t.content }) : e.type === "textResponse" ? null : e.type === "ordering" ? /* @__PURE__ */ a(du, {
|
|
7754
7763
|
item: t,
|
|
7755
7764
|
messages: n,
|
|
7756
7765
|
showAnswer: r
|
|
7757
|
-
}) : e.type === "classification" ? /* @__PURE__ */ a(
|
|
7766
|
+
}) : e.type === "classification" ? /* @__PURE__ */ a(ru, {
|
|
7758
7767
|
item: t,
|
|
7759
7768
|
messages: n,
|
|
7760
7769
|
showAnswer: r
|
|
7761
|
-
}) : e.type === "textMarker" ? /* @__PURE__ */ a(
|
|
7770
|
+
}) : e.type === "textMarker" ? /* @__PURE__ */ a(Nl, {
|
|
7762
7771
|
item: t,
|
|
7763
7772
|
messages: n,
|
|
7764
7773
|
showAnswer: r
|
|
7765
|
-
}) :
|
|
7774
|
+
}) : mu({
|
|
7766
7775
|
element: e,
|
|
7767
7776
|
item: t,
|
|
7768
7777
|
messages: n,
|
|
7769
7778
|
showAnswer: r
|
|
7770
7779
|
});
|
|
7771
7780
|
}
|
|
7772
|
-
function
|
|
7781
|
+
function mu({ element: e, item: t, messages: n, showAnswer: r }) {
|
|
7773
7782
|
switch (e.type) {
|
|
7774
|
-
case "choice": return /* @__PURE__ */ a(
|
|
7783
|
+
case "choice": return /* @__PURE__ */ a(uu, {
|
|
7775
7784
|
element: e,
|
|
7776
7785
|
item: t,
|
|
7777
7786
|
messages: n,
|
|
7778
7787
|
showAnswer: r
|
|
7779
7788
|
});
|
|
7780
|
-
case "fill": return /* @__PURE__ */ a(
|
|
7789
|
+
case "fill": return /* @__PURE__ */ a(tu, {
|
|
7781
7790
|
item: t,
|
|
7782
7791
|
messages: n,
|
|
7783
7792
|
showAnswer: r
|
|
7784
7793
|
});
|
|
7785
|
-
case "inlineFill": return /* @__PURE__ */ a(
|
|
7794
|
+
case "inlineFill": return /* @__PURE__ */ a(iu, {
|
|
7786
7795
|
element: e,
|
|
7787
7796
|
item: t,
|
|
7788
7797
|
messages: n,
|
|
7789
7798
|
showAnswer: r
|
|
7790
7799
|
});
|
|
7791
|
-
case "wordBuilder": return /* @__PURE__ */ a(
|
|
7800
|
+
case "wordBuilder": return /* @__PURE__ */ a(fu, {
|
|
7792
7801
|
element: e,
|
|
7793
7802
|
item: t,
|
|
7794
7803
|
messages: n,
|
|
7795
7804
|
showAnswer: r
|
|
7796
7805
|
});
|
|
7797
|
-
case "judgement": return /* @__PURE__ */ a(
|
|
7806
|
+
case "judgement": return /* @__PURE__ */ a(ou, {
|
|
7798
7807
|
element: e,
|
|
7799
7808
|
item: t,
|
|
7800
7809
|
messages: n,
|
|
7801
7810
|
showAnswer: r
|
|
7802
7811
|
});
|
|
7803
|
-
case "lineConnect": return /* @__PURE__ */ a(
|
|
7812
|
+
case "lineConnect": return /* @__PURE__ */ a(su, {
|
|
7804
7813
|
item: t,
|
|
7805
7814
|
messages: n,
|
|
7806
7815
|
showAnswer: r
|
|
7807
7816
|
});
|
|
7808
|
-
case "matching": return /* @__PURE__ */ a(
|
|
7817
|
+
case "matching": return /* @__PURE__ */ a(lu, {
|
|
7809
7818
|
item: t,
|
|
7810
7819
|
messages: n,
|
|
7811
7820
|
showAnswer: r
|
|
7812
7821
|
});
|
|
7813
7822
|
}
|
|
7814
7823
|
}
|
|
7815
|
-
var
|
|
7816
|
-
root: "
|
|
7817
|
-
empty: "
|
|
7818
|
-
"element-list": "_element-
|
|
7819
|
-
children: "
|
|
7820
|
-
element: "
|
|
7821
|
-
extra: "
|
|
7822
|
-
child: "
|
|
7824
|
+
var hu = {
|
|
7825
|
+
root: "_root_1jseb_1",
|
|
7826
|
+
empty: "_empty_1jseb_18",
|
|
7827
|
+
"element-list": "_element-list_1jseb_30",
|
|
7828
|
+
children: "_children_1jseb_31",
|
|
7829
|
+
element: "_element_1jseb_30",
|
|
7830
|
+
extra: "_extra_1jseb_41",
|
|
7831
|
+
child: "_child_1jseb_31"
|
|
7823
7832
|
};
|
|
7824
7833
|
//#endregion
|
|
7825
7834
|
//#region src/question/preview/QuestionCompositePreview.tsx
|
|
7826
|
-
function
|
|
7827
|
-
return
|
|
7828
|
-
className:
|
|
7829
|
-
children:
|
|
7835
|
+
function gu({ childIndexPath: e = [], messages: t, renderChild: n, rootQuestionNumber: r, value: i }) {
|
|
7836
|
+
return i.children.length === 0 ? /* @__PURE__ */ a("div", {
|
|
7837
|
+
className: hu.empty,
|
|
7838
|
+
children: t.previewEmpty
|
|
7830
7839
|
}) : /* @__PURE__ */ a("div", {
|
|
7831
|
-
className:
|
|
7832
|
-
children:
|
|
7833
|
-
let
|
|
7840
|
+
className: hu.children,
|
|
7841
|
+
children: i.children.map((t, o) => {
|
|
7842
|
+
let s = [...e, o], c = Ro(s, i.children.length, r);
|
|
7834
7843
|
return /* @__PURE__ */ a("section", {
|
|
7835
|
-
className:
|
|
7836
|
-
children: /* @__PURE__ */ a(
|
|
7837
|
-
|
|
7838
|
-
|
|
7844
|
+
className: hu.child,
|
|
7845
|
+
children: /* @__PURE__ */ a(Bo, {
|
|
7846
|
+
indented: !0,
|
|
7847
|
+
number: c,
|
|
7848
|
+
children: n(t, s)
|
|
7839
7849
|
})
|
|
7840
|
-
},
|
|
7850
|
+
}, t.id || o);
|
|
7841
7851
|
})
|
|
7842
7852
|
});
|
|
7843
7853
|
}
|
|
7844
7854
|
//#endregion
|
|
7845
7855
|
//#region src/question/preview/QuestionPreview.tsx
|
|
7846
|
-
var
|
|
7847
|
-
function
|
|
7848
|
-
let { locale: t = "zh-CN" } = e, n = Sa(e,
|
|
7849
|
-
return /* @__PURE__ */ a(
|
|
7850
|
-
|
|
7851
|
-
|
|
7856
|
+
var _u = ["locale"];
|
|
7857
|
+
function vu(e) {
|
|
7858
|
+
let { locale: t = "zh-CN" } = e, n = Sa(e, _u), r = bs(n.value, n.questionTypeTemplates);
|
|
7859
|
+
return /* @__PURE__ */ a(yu, k(k({}, n), {}, {
|
|
7860
|
+
childIndexPath: [],
|
|
7861
|
+
messages: Ac(t),
|
|
7852
7862
|
value: r
|
|
7853
7863
|
}));
|
|
7854
7864
|
}
|
|
7855
|
-
function
|
|
7856
|
-
let
|
|
7857
|
-
if (!
|
|
7858
|
-
className: U(
|
|
7865
|
+
function yu({ childIndexPath: e, className: t, messages: n, rootQuestionNumber: r, showAnswer: s = !1, showExtraAttributes: c = !1, questionTypeTemplates: l, value: u }) {
|
|
7866
|
+
let d = aa(l, u);
|
|
7867
|
+
if (!d) return /* @__PURE__ */ a("div", {
|
|
7868
|
+
className: U(hu.root, t),
|
|
7859
7869
|
children: /* @__PURE__ */ a("div", {
|
|
7860
|
-
className:
|
|
7861
|
-
children:
|
|
7870
|
+
className: hu.empty,
|
|
7871
|
+
children: n.missingQuestionTypeTemplate
|
|
7862
7872
|
})
|
|
7863
7873
|
});
|
|
7864
|
-
let
|
|
7865
|
-
className:
|
|
7866
|
-
children:
|
|
7867
|
-
let
|
|
7874
|
+
let f = d.elements.length === 0 ? null : /* @__PURE__ */ a("div", {
|
|
7875
|
+
className: hu["element-list"],
|
|
7876
|
+
children: d.elements.map((e, t) => {
|
|
7877
|
+
let r = rn(u, t, e);
|
|
7868
7878
|
return /* @__PURE__ */ a("section", {
|
|
7869
|
-
className:
|
|
7870
|
-
children: /* @__PURE__ */ a(
|
|
7879
|
+
className: hu.element,
|
|
7880
|
+
children: /* @__PURE__ */ a(pu, {
|
|
7871
7881
|
element: e,
|
|
7872
|
-
item:
|
|
7873
|
-
messages:
|
|
7874
|
-
showAnswer:
|
|
7882
|
+
item: r,
|
|
7883
|
+
messages: n,
|
|
7884
|
+
showAnswer: s && d.hasAnswer
|
|
7875
7885
|
})
|
|
7876
|
-
}, `${e.type}-${
|
|
7886
|
+
}, `${e.type}-${t}`);
|
|
7877
7887
|
})
|
|
7878
|
-
}),
|
|
7879
|
-
className:
|
|
7880
|
-
children:
|
|
7881
|
-
let r = an(
|
|
7888
|
+
}), p = c ? /* @__PURE__ */ a("div", {
|
|
7889
|
+
className: hu["element-list"],
|
|
7890
|
+
children: d.extras.map((e, t) => {
|
|
7891
|
+
let r = an(u, t, e);
|
|
7882
7892
|
return P(r.content) ? null : /* @__PURE__ */ o("section", {
|
|
7883
|
-
className:
|
|
7884
|
-
children: [/* @__PURE__ */ a(
|
|
7885
|
-
element:
|
|
7886
|
-
item:
|
|
7887
|
-
messages:
|
|
7893
|
+
className: hu.extra,
|
|
7894
|
+
children: [/* @__PURE__ */ a(Bc, { children: e.name }), /* @__PURE__ */ a(pu, {
|
|
7895
|
+
element: xu(e),
|
|
7896
|
+
item: Su(r),
|
|
7897
|
+
messages: n,
|
|
7888
7898
|
showAnswer: !1
|
|
7889
7899
|
})]
|
|
7890
|
-
}, `${e.type}-${
|
|
7900
|
+
}, `${e.type}-${t}`);
|
|
7891
7901
|
})
|
|
7892
|
-
}) : null,
|
|
7893
|
-
|
|
7894
|
-
|
|
7895
|
-
|
|
7896
|
-
|
|
7897
|
-
renderChild: (e,
|
|
7898
|
-
|
|
7899
|
-
messages:
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
|
|
7902
|
+
}) : null, m = /* @__PURE__ */ o(i, { children: [
|
|
7903
|
+
f,
|
|
7904
|
+
u.children.length === 0 ? null : /* @__PURE__ */ a(gu, {
|
|
7905
|
+
childIndexPath: e,
|
|
7906
|
+
messages: n,
|
|
7907
|
+
renderChild: (e, t) => /* @__PURE__ */ a(yu, {
|
|
7908
|
+
childIndexPath: t,
|
|
7909
|
+
messages: n,
|
|
7910
|
+
rootQuestionNumber: r,
|
|
7911
|
+
showAnswer: s,
|
|
7912
|
+
showExtraAttributes: c,
|
|
7913
|
+
questionTypeTemplates: l,
|
|
7903
7914
|
value: e
|
|
7904
7915
|
}),
|
|
7905
|
-
|
|
7916
|
+
rootQuestionNumber: r,
|
|
7917
|
+
value: u
|
|
7906
7918
|
}),
|
|
7907
|
-
|
|
7919
|
+
p
|
|
7908
7920
|
] });
|
|
7909
7921
|
return /* @__PURE__ */ a("div", {
|
|
7910
|
-
className: U(
|
|
7911
|
-
children:
|
|
7912
|
-
className:
|
|
7913
|
-
children:
|
|
7914
|
-
}) :
|
|
7922
|
+
className: U(hu.root, t),
|
|
7923
|
+
children: bu(d, u) ? /* @__PURE__ */ a("div", {
|
|
7924
|
+
className: hu.empty,
|
|
7925
|
+
children: n.previewEmpty
|
|
7926
|
+
}) : m
|
|
7915
7927
|
});
|
|
7916
7928
|
}
|
|
7917
|
-
function
|
|
7929
|
+
function bu(e, t) {
|
|
7918
7930
|
return t.elements.length === 0 && t.extras.length === 0 && t.children.length === 0;
|
|
7919
7931
|
}
|
|
7920
|
-
function
|
|
7932
|
+
function xu(e) {
|
|
7921
7933
|
return {
|
|
7922
7934
|
config: {},
|
|
7923
7935
|
name: e.name,
|
|
7924
7936
|
type: "richText"
|
|
7925
7937
|
};
|
|
7926
7938
|
}
|
|
7927
|
-
function
|
|
7939
|
+
function Su(e) {
|
|
7928
7940
|
return {
|
|
7929
7941
|
content: e.content,
|
|
7930
7942
|
type: "richText"
|
|
7931
7943
|
};
|
|
7932
7944
|
}
|
|
7933
|
-
var
|
|
7945
|
+
var Cu = {
|
|
7934
7946
|
root: "_root_17bqr_1",
|
|
7935
7947
|
toolbar: "_toolbar_17bqr_26",
|
|
7936
7948
|
"toolbar-title": "_toolbar-title_17bqr_36",
|
|
@@ -7982,7 +7994,7 @@ var Su = {
|
|
|
7982
7994
|
"palette-section": "_palette-section_vhj2r_56",
|
|
7983
7995
|
"palette-section-title": "_palette-section-title_vhj2r_62",
|
|
7984
7996
|
"palette-button": "_palette-button_vhj2r_70"
|
|
7985
|
-
},
|
|
7997
|
+
}, wu = {
|
|
7986
7998
|
"en-US": {
|
|
7987
7999
|
addElement: "Add element",
|
|
7988
8000
|
addExtra: "Add extra attribute",
|
|
@@ -8204,24 +8216,24 @@ var Su = {
|
|
|
8204
8216
|
wordBuilderLabel: "\u7ec4\u8bcd\u62fc\u5199"
|
|
8205
8217
|
}
|
|
8206
8218
|
};
|
|
8207
|
-
function
|
|
8219
|
+
function Tu(e, t) {
|
|
8208
8220
|
var n;
|
|
8209
8221
|
return (n = e.extraDescriptions.get(t)) == null ? t : n;
|
|
8210
8222
|
}
|
|
8211
|
-
function
|
|
8223
|
+
function Eu(e, t) {
|
|
8212
8224
|
var n;
|
|
8213
8225
|
return (n = e.extraLabels.get(t)) == null ? t : n;
|
|
8214
8226
|
}
|
|
8215
|
-
function
|
|
8227
|
+
function Du(e) {
|
|
8216
8228
|
switch (e) {
|
|
8217
|
-
case "en-US": return
|
|
8218
|
-
case "zh-CN": return
|
|
8229
|
+
case "en-US": return wu["en-US"];
|
|
8230
|
+
case "zh-CN": return wu["zh-CN"];
|
|
8219
8231
|
}
|
|
8220
8232
|
}
|
|
8221
|
-
function
|
|
8222
|
-
return t === "richText" ? e.richTextDescription : t === "ordering" ? e.orderingDescription :
|
|
8233
|
+
function Ou(e, t) {
|
|
8234
|
+
return t === "richText" ? e.richTextDescription : t === "ordering" ? e.orderingDescription : ju(e, t);
|
|
8223
8235
|
}
|
|
8224
|
-
var
|
|
8236
|
+
var ku = {
|
|
8225
8237
|
choice: (e) => e.optionGroupDescription,
|
|
8226
8238
|
classification: (e) => e.classificationDescription,
|
|
8227
8239
|
fill: (e) => e.blankGroupDescription,
|
|
@@ -8232,7 +8244,7 @@ var Ou = {
|
|
|
8232
8244
|
textMarker: (e) => e.textMarkerDescription,
|
|
8233
8245
|
textResponse: (e) => e.textResponseDescription,
|
|
8234
8246
|
wordBuilder: (e) => e.wordBuilderDescription
|
|
8235
|
-
},
|
|
8247
|
+
}, Au = {
|
|
8236
8248
|
choice: (e) => e.optionGroupLabel,
|
|
8237
8249
|
classification: (e) => e.classificationLabel,
|
|
8238
8250
|
fill: (e) => e.blankGroupLabel,
|
|
@@ -8244,30 +8256,30 @@ var Ou = {
|
|
|
8244
8256
|
textResponse: (e) => e.textResponseLabel,
|
|
8245
8257
|
wordBuilder: (e) => e.wordBuilderLabel
|
|
8246
8258
|
};
|
|
8247
|
-
function Au(e, t) {
|
|
8248
|
-
return Ou[t](e);
|
|
8249
|
-
}
|
|
8250
8259
|
function ju(e, t) {
|
|
8251
|
-
return t
|
|
8260
|
+
return ku[t](e);
|
|
8252
8261
|
}
|
|
8253
8262
|
function Mu(e, t) {
|
|
8254
|
-
return
|
|
8263
|
+
return t === "richText" ? e.richTextLabel : t === "ordering" ? e.orderingLabel : Nu(e, t);
|
|
8255
8264
|
}
|
|
8256
8265
|
function Nu(e, t) {
|
|
8266
|
+
return Au[t](e);
|
|
8267
|
+
}
|
|
8268
|
+
function Pu(e, t) {
|
|
8257
8269
|
var n;
|
|
8258
8270
|
return (n = e.optionValueLabels.get(t)) == null ? t : n;
|
|
8259
8271
|
}
|
|
8260
|
-
function
|
|
8272
|
+
function Fu(e, t) {
|
|
8261
8273
|
var n;
|
|
8262
8274
|
return (n = e.candidateModeValueLabels.get(t)) == null ? t : n;
|
|
8263
8275
|
}
|
|
8264
|
-
function
|
|
8276
|
+
function Iu(e, t) {
|
|
8265
8277
|
var n;
|
|
8266
8278
|
return (n = e.lineConnectLabelStyleLabels.get(t)) == null ? t : n;
|
|
8267
8279
|
}
|
|
8268
8280
|
//#endregion
|
|
8269
8281
|
//#region src/question/structure-editor/QuestionStructureCanvas.tsx
|
|
8270
|
-
function
|
|
8282
|
+
function Lu({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExtra: i, onMoveElement: s, onSelectElement: c, selectedElementClientId: l }) {
|
|
8271
8283
|
let [u, d] = m(null);
|
|
8272
8284
|
return /* @__PURE__ */ o("section", {
|
|
8273
8285
|
className: Q.panel,
|
|
@@ -8287,7 +8299,7 @@ function Iu({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExt
|
|
|
8287
8299
|
className: Z["element-list"],
|
|
8288
8300
|
children: [
|
|
8289
8301
|
e.map((t, i) => {
|
|
8290
|
-
let f = t.clientId === l, p =
|
|
8302
|
+
let f = t.clientId === l, p = Mu(n, t.type);
|
|
8291
8303
|
return /* @__PURE__ */ o("div", {
|
|
8292
8304
|
className: `${Z["element-card"]} ${f ? Z.active : ""}`,
|
|
8293
8305
|
onClick: () => c(t.clientId),
|
|
@@ -8351,7 +8363,7 @@ function Iu({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExt
|
|
|
8351
8363
|
children: n.extraTitle
|
|
8352
8364
|
}) : null,
|
|
8353
8365
|
t.map((t, r) => {
|
|
8354
|
-
let s = t.clientId === l, f =
|
|
8366
|
+
let s = t.clientId === l, f = Eu(n, t.type);
|
|
8355
8367
|
return /* @__PURE__ */ o("div", {
|
|
8356
8368
|
className: `${Z["element-card"]} ${s ? Z.active : ""}`,
|
|
8357
8369
|
onClick: () => c(t.clientId),
|
|
@@ -8400,7 +8412,7 @@ function Iu({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExt
|
|
|
8400
8412
|
}
|
|
8401
8413
|
//#endregion
|
|
8402
8414
|
//#region src/question/structure-editor/QuestionStructurePalette.tsx
|
|
8403
|
-
function
|
|
8415
|
+
function Ru({ addedExtraTypes: e, labels: t, onAddElement: n, onAddExtra: r }) {
|
|
8404
8416
|
let i = new Set(e);
|
|
8405
8417
|
return /* @__PURE__ */ o("aside", {
|
|
8406
8418
|
className: Q.panel,
|
|
@@ -8415,11 +8427,11 @@ function Lu({ addedExtraTypes: e, labels: t, onAddElement: n, onAddExtra: r }) {
|
|
|
8415
8427
|
/* @__PURE__ */ a("div", {
|
|
8416
8428
|
className: Q.palette,
|
|
8417
8429
|
children: oe.map((e) => /* @__PURE__ */ o("button", {
|
|
8418
|
-
"aria-label": `${t.addElement}: ${
|
|
8430
|
+
"aria-label": `${t.addElement}: ${Mu(t, e)}`,
|
|
8419
8431
|
className: Q["palette-button"],
|
|
8420
8432
|
onClick: () => n(e),
|
|
8421
8433
|
type: "button",
|
|
8422
|
-
children: [/* @__PURE__ */ a("strong", { children:
|
|
8434
|
+
children: [/* @__PURE__ */ a("strong", { children: Mu(t, e) }), /* @__PURE__ */ a("small", { children: Ou(t, e) })]
|
|
8423
8435
|
}, e))
|
|
8424
8436
|
}),
|
|
8425
8437
|
/* @__PURE__ */ o("div", {
|
|
@@ -8432,12 +8444,12 @@ function Lu({ addedExtraTypes: e, labels: t, onAddElement: n, onAddExtra: r }) {
|
|
|
8432
8444
|
children: se.map((e) => {
|
|
8433
8445
|
let n = i.has(e);
|
|
8434
8446
|
return /* @__PURE__ */ o("button", {
|
|
8435
|
-
"aria-label": `${t.addExtra}: ${
|
|
8447
|
+
"aria-label": `${t.addExtra}: ${Eu(t, e)}`,
|
|
8436
8448
|
className: Q["palette-button"],
|
|
8437
8449
|
disabled: n,
|
|
8438
8450
|
onClick: () => r(e),
|
|
8439
8451
|
type: "button",
|
|
8440
|
-
children: [/* @__PURE__ */ a("strong", { children:
|
|
8452
|
+
children: [/* @__PURE__ */ a("strong", { children: Eu(t, e) }), /* @__PURE__ */ a("small", { children: Tu(t, e) })]
|
|
8441
8453
|
}, e);
|
|
8442
8454
|
})
|
|
8443
8455
|
})]
|
|
@@ -8454,27 +8466,27 @@ var $ = {
|
|
|
8454
8466
|
select: "_select_tgswd_27",
|
|
8455
8467
|
textarea: "_textarea_tgswd_28",
|
|
8456
8468
|
empty: "_empty_tgswd_61"
|
|
8457
|
-
},
|
|
8469
|
+
}, zu = [
|
|
8458
8470
|
"none",
|
|
8459
8471
|
"sharedPool",
|
|
8460
8472
|
"perBlankOptions"
|
|
8461
|
-
],
|
|
8473
|
+
], Bu = [
|
|
8462
8474
|
"upperAlpha",
|
|
8463
8475
|
"lowerAlpha",
|
|
8464
8476
|
"number"
|
|
8465
|
-
],
|
|
8477
|
+
], Vu = [
|
|
8466
8478
|
"number",
|
|
8467
8479
|
"upperAlpha",
|
|
8468
8480
|
"lowerAlpha",
|
|
8469
8481
|
"lowerRoman",
|
|
8470
8482
|
"chineseNumber",
|
|
8471
8483
|
"none"
|
|
8472
|
-
],
|
|
8484
|
+
], Hu = [
|
|
8473
8485
|
2,
|
|
8474
8486
|
3,
|
|
8475
8487
|
4,
|
|
8476
8488
|
5
|
|
8477
|
-
],
|
|
8489
|
+
], Uu = ["standard", "table"], Wu = ["single", "multiple"], Gu = ["spelling", "sentence"], Ku = [
|
|
8478
8490
|
"correctWrong",
|
|
8479
8491
|
"yesNo",
|
|
8480
8492
|
"validInvalid",
|
|
@@ -8482,8 +8494,8 @@ var $ = {
|
|
|
8482
8494
|
"rightWrong",
|
|
8483
8495
|
"checkCross"
|
|
8484
8496
|
];
|
|
8485
|
-
function
|
|
8486
|
-
let f =
|
|
8497
|
+
function qu({ description: e, globalConfig: t, isSubjective: n, labels: r, onElementChange: i, onExtraChange: s, onGlobalConfigChange: c, onMetadataChange: l, selectedExtra: u, selectedElement: d }) {
|
|
8498
|
+
let f = Ju({
|
|
8487
8499
|
labels: r,
|
|
8488
8500
|
onElementChange: i,
|
|
8489
8501
|
onExtraChange: s,
|
|
@@ -8565,7 +8577,7 @@ function Ku({ description: e, globalConfig: t, isSubjective: n, labels: r, onEle
|
|
|
8565
8577
|
})]
|
|
8566
8578
|
});
|
|
8567
8579
|
}
|
|
8568
|
-
function
|
|
8580
|
+
function Ju({ labels: e, onElementChange: t, onExtraChange: n, selectedElement: r, selectedExtra: i }) {
|
|
8569
8581
|
return r ? /* @__PURE__ */ o("div", {
|
|
8570
8582
|
className: $["form-stack"],
|
|
8571
8583
|
children: [
|
|
@@ -8585,7 +8597,7 @@ function qu({ labels: e, onElementChange: t, onExtraChange: n, selectedElement:
|
|
|
8585
8597
|
value: r.enName
|
|
8586
8598
|
})]
|
|
8587
8599
|
}),
|
|
8588
|
-
|
|
8600
|
+
Yu(r, e, t)
|
|
8589
8601
|
]
|
|
8590
8602
|
}) : i ? /* @__PURE__ */ o("div", {
|
|
8591
8603
|
className: $["form-stack"],
|
|
@@ -8609,10 +8621,10 @@ function qu({ labels: e, onElementChange: t, onExtraChange: n, selectedElement:
|
|
|
8609
8621
|
children: e.noElement
|
|
8610
8622
|
});
|
|
8611
8623
|
}
|
|
8612
|
-
function Ju(e, t, n) {
|
|
8613
|
-
return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" || e.type === "textResponse" ? null : Yu(e, t, n);
|
|
8614
|
-
}
|
|
8615
8624
|
function Yu(e, t, n) {
|
|
8625
|
+
return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" || e.type === "textResponse" ? null : Xu(e, t, n);
|
|
8626
|
+
}
|
|
8627
|
+
function Xu(e, t, n) {
|
|
8616
8628
|
switch (e.type) {
|
|
8617
8629
|
case "inlineFill": return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ o("label", {
|
|
8618
8630
|
className: $["form-row"],
|
|
@@ -8620,9 +8632,9 @@ function Yu(e, t, n) {
|
|
|
8620
8632
|
className: $.select,
|
|
8621
8633
|
onChange: (t) => n(k(k({}, e), {}, { config: k(k({}, e.config), {}, { candidateMode: t.target.value }) })),
|
|
8622
8634
|
value: e.config.candidateMode,
|
|
8623
|
-
children:
|
|
8635
|
+
children: zu.map((e) => /* @__PURE__ */ a("option", {
|
|
8624
8636
|
value: e,
|
|
8625
|
-
children:
|
|
8637
|
+
children: Fu(t, e)
|
|
8626
8638
|
}, e))
|
|
8627
8639
|
})]
|
|
8628
8640
|
}), /* @__PURE__ */ o("label", {
|
|
@@ -8639,9 +8651,9 @@ function Yu(e, t, n) {
|
|
|
8639
8651
|
className: $.select,
|
|
8640
8652
|
onChange: (t) => n(k(k({}, e), {}, { config: { builderMode: t.target.value } })),
|
|
8641
8653
|
value: e.config.builderMode,
|
|
8642
|
-
children:
|
|
8654
|
+
children: Gu.map((e) => /* @__PURE__ */ a("option", {
|
|
8643
8655
|
value: e,
|
|
8644
|
-
children:
|
|
8656
|
+
children: Pu(t, e)
|
|
8645
8657
|
}, e))
|
|
8646
8658
|
})]
|
|
8647
8659
|
});
|
|
@@ -8651,18 +8663,18 @@ function Yu(e, t, n) {
|
|
|
8651
8663
|
className: $.select,
|
|
8652
8664
|
onChange: (t) => n(k(k({}, e), {}, { config: { judgeAnswerMode: t.target.value } })),
|
|
8653
8665
|
value: e.config.judgeAnswerMode,
|
|
8654
|
-
children:
|
|
8666
|
+
children: Ku.map((e) => /* @__PURE__ */ a("option", {
|
|
8655
8667
|
value: e,
|
|
8656
|
-
children:
|
|
8668
|
+
children: Pu(t, e)
|
|
8657
8669
|
}, e))
|
|
8658
8670
|
})]
|
|
8659
8671
|
});
|
|
8660
|
-
case "choice": return
|
|
8661
|
-
case "lineConnect": return
|
|
8662
|
-
case "matching": return
|
|
8672
|
+
case "choice": return Zu(e, t, n);
|
|
8673
|
+
case "lineConnect": return Qu(e, t, n);
|
|
8674
|
+
case "matching": return $u(e, t, n);
|
|
8663
8675
|
}
|
|
8664
8676
|
}
|
|
8665
|
-
function
|
|
8677
|
+
function Zu(e, t, n) {
|
|
8666
8678
|
return /* @__PURE__ */ o(i, { children: [
|
|
8667
8679
|
/* @__PURE__ */ o("label", {
|
|
8668
8680
|
className: $["form-row"],
|
|
@@ -8670,9 +8682,9 @@ function Xu(e, t, n) {
|
|
|
8670
8682
|
className: $.select,
|
|
8671
8683
|
onChange: (t) => n(k(k({}, e), {}, { config: k(k({}, e.config), {}, { selectionType: t.target.value }) })),
|
|
8672
8684
|
value: e.config.selectionType,
|
|
8673
|
-
children:
|
|
8685
|
+
children: Wu.map((e) => /* @__PURE__ */ a("option", {
|
|
8674
8686
|
value: e,
|
|
8675
|
-
children:
|
|
8687
|
+
children: Pu(t, e)
|
|
8676
8688
|
}, e))
|
|
8677
8689
|
})]
|
|
8678
8690
|
}),
|
|
@@ -8682,9 +8694,9 @@ function Xu(e, t, n) {
|
|
|
8682
8694
|
className: $.select,
|
|
8683
8695
|
onChange: (t) => n(k(k({}, e), {}, { config: k(k({}, e.config), {}, { optionLabelStyle: t.target.value }) })),
|
|
8684
8696
|
value: e.config.optionLabelStyle,
|
|
8685
|
-
children:
|
|
8697
|
+
children: Bu.map((e) => /* @__PURE__ */ a("option", {
|
|
8686
8698
|
value: e,
|
|
8687
|
-
children:
|
|
8699
|
+
children: Pu(t, e)
|
|
8688
8700
|
}, e))
|
|
8689
8701
|
})]
|
|
8690
8702
|
}),
|
|
@@ -8694,23 +8706,23 @@ function Xu(e, t, n) {
|
|
|
8694
8706
|
className: $.select,
|
|
8695
8707
|
onChange: (t) => n(k(k({}, e), {}, { config: k(k({}, e.config), {}, { renderer: t.target.value }) })),
|
|
8696
8708
|
value: e.config.renderer,
|
|
8697
|
-
children:
|
|
8709
|
+
children: Uu.map((e) => /* @__PURE__ */ a("option", {
|
|
8698
8710
|
value: e,
|
|
8699
|
-
children:
|
|
8711
|
+
children: Pu(t, e)
|
|
8700
8712
|
}, e))
|
|
8701
8713
|
})]
|
|
8702
8714
|
})
|
|
8703
8715
|
] });
|
|
8704
8716
|
}
|
|
8705
|
-
function
|
|
8706
|
-
let r =
|
|
8717
|
+
function Qu(e, t, n) {
|
|
8718
|
+
let r = ed(e.config.columns);
|
|
8707
8719
|
return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ o("label", {
|
|
8708
8720
|
className: $["form-row"],
|
|
8709
8721
|
children: [/* @__PURE__ */ a("span", { children: t.lineConnectColumnCount }), /* @__PURE__ */ a("select", {
|
|
8710
8722
|
className: $.select,
|
|
8711
|
-
onChange: (t) => n(k(k({}, e), {}, { config: { columns:
|
|
8723
|
+
onChange: (t) => n(k(k({}, e), {}, { config: { columns: nd(r, Number(t.target.value)) } })),
|
|
8712
8724
|
value: r.length,
|
|
8713
|
-
children:
|
|
8725
|
+
children: Hu.map((e) => /* @__PURE__ */ a("option", {
|
|
8714
8726
|
value: e,
|
|
8715
8727
|
children: e
|
|
8716
8728
|
}, e))
|
|
@@ -8721,47 +8733,47 @@ function Zu(e, t, n) {
|
|
|
8721
8733
|
className: $.select,
|
|
8722
8734
|
onChange: (t) => n(k(k({}, e), {}, { config: { columns: r.map((e, n) => n === s ? { labelStyle: t.target.value } : e) } })),
|
|
8723
8735
|
value: i.labelStyle,
|
|
8724
|
-
children:
|
|
8736
|
+
children: Vu.map((e) => /* @__PURE__ */ a("option", {
|
|
8725
8737
|
value: e,
|
|
8726
|
-
children:
|
|
8738
|
+
children: Iu(t, e)
|
|
8727
8739
|
}, e))
|
|
8728
8740
|
})]
|
|
8729
8741
|
}, `line-column-${s}`))] });
|
|
8730
8742
|
}
|
|
8731
|
-
function
|
|
8732
|
-
let r =
|
|
8743
|
+
function $u(e, t, n) {
|
|
8744
|
+
let r = td(e.config.columns);
|
|
8733
8745
|
return /* @__PURE__ */ a(i, { children: r.map((i, s) => /* @__PURE__ */ o("label", {
|
|
8734
8746
|
className: $["form-row"],
|
|
8735
8747
|
children: [/* @__PURE__ */ a("span", { children: t.lineConnectColumnLabel(s + 1) }), /* @__PURE__ */ a("select", {
|
|
8736
8748
|
className: $.select,
|
|
8737
8749
|
onChange: (t) => n(k(k({}, e), {}, { config: { columns: r.map((e, n) => n === s ? { labelStyle: t.target.value } : e) } })),
|
|
8738
8750
|
value: i.labelStyle,
|
|
8739
|
-
children:
|
|
8751
|
+
children: Vu.map((e) => /* @__PURE__ */ a("option", {
|
|
8740
8752
|
value: e,
|
|
8741
|
-
children:
|
|
8753
|
+
children: Iu(t, e)
|
|
8742
8754
|
}, e))
|
|
8743
8755
|
})]
|
|
8744
8756
|
}, `matching-column-${s}`)) });
|
|
8745
8757
|
}
|
|
8746
|
-
function
|
|
8758
|
+
function ed(e) {
|
|
8747
8759
|
let t = e.slice(0, 5);
|
|
8748
|
-
return t.length >= 2 ? t : [...t, ...
|
|
8760
|
+
return t.length >= 2 ? t : [...t, ...Vu.slice(t.length, 2).map((e) => ({ labelStyle: e }))];
|
|
8749
8761
|
}
|
|
8750
|
-
function
|
|
8762
|
+
function td(e) {
|
|
8751
8763
|
let t = e.slice(0, 2);
|
|
8752
|
-
return t.length >= 2 ? t : [...t, ...
|
|
8764
|
+
return t.length >= 2 ? t : [...t, ...Vu.slice(t.length, 2).map((e) => ({ labelStyle: e }))];
|
|
8753
8765
|
}
|
|
8754
|
-
function
|
|
8766
|
+
function nd(e, t) {
|
|
8755
8767
|
return Array.from({ length: Math.min(5, Math.max(2, t)) }, (t, n) => {
|
|
8756
8768
|
var r, i;
|
|
8757
|
-
return (r = e.slice(n, n + 1)[0]) == null ? { labelStyle: (i =
|
|
8769
|
+
return (r = e.slice(n, n + 1)[0]) == null ? { labelStyle: (i = Vu[n]) == null ? "number" : i } : r;
|
|
8758
8770
|
});
|
|
8759
8771
|
}
|
|
8760
8772
|
//#endregion
|
|
8761
8773
|
//#region src/question/structure-editor/QuestionStructureEditor.tsx
|
|
8762
|
-
function
|
|
8774
|
+
function rd({ locale: e = "zh-CN", onChange: t, value: n }) {
|
|
8763
8775
|
var r, i, s, c;
|
|
8764
|
-
let l =
|
|
8776
|
+
let l = Du(e), [u, d] = m((r = (i = n.elements[0]) == null ? void 0 : i.clientId) == null ? null : r), { selectedElement: f, selectedExtra: p } = id(n, u);
|
|
8765
8777
|
function h(e) {
|
|
8766
8778
|
let r = me(e, n.elements);
|
|
8767
8779
|
t(k(k({}, n), {}, { elements: [...n.elements, r] })), d(r.clientId);
|
|
@@ -8773,11 +8785,11 @@ function nd({ locale: e = "zh-CN", onChange: t, value: n }) {
|
|
|
8773
8785
|
}
|
|
8774
8786
|
function _(e) {
|
|
8775
8787
|
let r = ve(n, e);
|
|
8776
|
-
t(r), d(
|
|
8788
|
+
t(r), d(ad(r));
|
|
8777
8789
|
}
|
|
8778
8790
|
function v(e) {
|
|
8779
8791
|
let r = _e(n, e);
|
|
8780
|
-
t(r), d(
|
|
8792
|
+
t(r), d(ad(r));
|
|
8781
8793
|
}
|
|
8782
8794
|
function y(e) {
|
|
8783
8795
|
t(xe(n, e.clientId, e));
|
|
@@ -8792,19 +8804,19 @@ function nd({ locale: e = "zh-CN", onChange: t, value: n }) {
|
|
|
8792
8804
|
t(Ce(n, e));
|
|
8793
8805
|
}
|
|
8794
8806
|
return /* @__PURE__ */ a("section", {
|
|
8795
|
-
className:
|
|
8807
|
+
className: Cu.root,
|
|
8796
8808
|
children: /* @__PURE__ */ a("div", {
|
|
8797
8809
|
className: Q.shell,
|
|
8798
8810
|
children: /* @__PURE__ */ o("div", {
|
|
8799
8811
|
className: Q.grid,
|
|
8800
8812
|
children: [
|
|
8801
|
-
/* @__PURE__ */ a(
|
|
8813
|
+
/* @__PURE__ */ a(Ru, {
|
|
8802
8814
|
addedExtraTypes: n.extras.map((e) => e.type),
|
|
8803
8815
|
labels: l,
|
|
8804
8816
|
onAddElement: h,
|
|
8805
8817
|
onAddExtra: g
|
|
8806
8818
|
}),
|
|
8807
|
-
/* @__PURE__ */ a(
|
|
8819
|
+
/* @__PURE__ */ a(Lu, {
|
|
8808
8820
|
elements: n.elements,
|
|
8809
8821
|
extras: n.extras,
|
|
8810
8822
|
labels: l,
|
|
@@ -8814,7 +8826,7 @@ function nd({ locale: e = "zh-CN", onChange: t, value: n }) {
|
|
|
8814
8826
|
onSelectElement: d,
|
|
8815
8827
|
selectedElementClientId: (s = (c = f == null ? void 0 : f.clientId) == null ? p == null ? void 0 : p.clientId : c) == null ? null : s
|
|
8816
8828
|
}),
|
|
8817
|
-
/* @__PURE__ */ a(
|
|
8829
|
+
/* @__PURE__ */ a(qu, {
|
|
8818
8830
|
description: n.description,
|
|
8819
8831
|
globalConfig: n.globalConfig,
|
|
8820
8832
|
isSubjective: n.isSubjective,
|
|
@@ -8831,7 +8843,7 @@ function nd({ locale: e = "zh-CN", onChange: t, value: n }) {
|
|
|
8831
8843
|
})
|
|
8832
8844
|
});
|
|
8833
8845
|
}
|
|
8834
|
-
function
|
|
8846
|
+
function id(e, t) {
|
|
8835
8847
|
var n, r, i, a;
|
|
8836
8848
|
let o = (n = e.elements.find((e) => e.clientId === t)) == null ? null : n, s = (r = e.extras.find((e) => e.clientId === t)) == null ? null : r;
|
|
8837
8849
|
return o || s ? {
|
|
@@ -8842,9 +8854,9 @@ function rd(e, t) {
|
|
|
8842
8854
|
selectedExtra: e.elements[0] || (a = e.extras[0]) == null ? null : a
|
|
8843
8855
|
};
|
|
8844
8856
|
}
|
|
8845
|
-
function
|
|
8857
|
+
function ad(e) {
|
|
8846
8858
|
var t, n, r, i;
|
|
8847
8859
|
return (t = (n = (r = e.elements[0]) == null ? void 0 : r.clientId) == null ? (i = e.extras[0]) == null ? void 0 : i.clientId : n) == null ? null : t;
|
|
8848
8860
|
}
|
|
8849
8861
|
//#endregion
|
|
8850
|
-
export {
|
|
8862
|
+
export { rs as QuestionContentEditor, Gl as QuestionPlayer, vu as QuestionPreview, K as QuestionRichContentView, rd as QuestionStructureEditor, Un as addBlankToGroup, _n as alignQuestionContentDraftWithStructure, Kn as assignBlankToAnswerGroup, Ja as cn, qn as createBlankAnswerGroupWithBlank, qt as createEmptyQuestionContentDraft, Ws as createEmptyQuestionPlayerResponse, fe as createEmptyQuestionStructureDraft, gn as createQuestionContentDraftFromSerialized, E as createQuestionContentId, os as createQuestionContentStructureFromDraft, ss as createQuestionPreviewDraft, me as createQuestionStructureElement, pe as createQuestionStructureExtra, M as createRichContentValue, Qt as createRichContentValueFromDocument, Ne as createRichTextContent, Wn as deleteBlankFromGroup, ve as deleteQuestionStructureElement, _e as deleteQuestionStructureExtra, Jn as detachBlankFromAnswerGroup, ra as findQuestionContentQuestionTypeStructure, sa as findQuestionContentQuestionTypeTemplate, ln as getQuestionContentJudgementOptions, on as getQuestionContentOptionMarker, tn as getQuestionContentTextMarkerAnswerText, ls as getQuestionStructureDraftChangeKind, j as getQuestionStructureElementDefaultEnName, A as getQuestionStructureElementDefaultName, Te as getQuestionStructureExtraDefaultEnName, we as getQuestionStructureExtraDefaultName, nn as getRichContentDocument, Gn as getSharedBlankAnswerGroups, Kt as isCompositeQuestionContentStructure, mn as isQuestionContentDraftEmpty, ye as moveQuestionStructureElement, En as normalizeFillTextCandidateState, Pe as normalizeRichTextContent, oe as questionStructureElementTypes, se as questionStructureExtraTypes, ca as reconcileQuestionContentDraftWithTemplates, hn as serializeQuestionContentDraft, cs as serializeQuestionStructureDraft, xe as updateQuestionStructureElement, be as updateQuestionStructureExtra, Se as updateQuestionStructureGlobalConfig, Ce as updateQuestionStructureMetadata };
|