@yungu-fed/question-editor 0.4.7 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/README.md +83 -0
  2. package/dist/index.css +1 -1
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +2757 -2415
  6. package/dist/index.mjs +1238 -1010
  7. package/dist/question/content-editor/helpers.d.ts.map +1 -1
  8. package/dist/question/player/QuestionBlankGroupPlayer.d.ts +3 -1
  9. package/dist/question/player/QuestionBlankGroupPlayer.d.ts.map +1 -1
  10. package/dist/question/player/QuestionClassificationPlayer.d.ts +3 -1
  11. package/dist/question/player/QuestionClassificationPlayer.d.ts.map +1 -1
  12. package/dist/question/player/QuestionFillTextContentPlayer.d.ts +3 -1
  13. package/dist/question/player/QuestionFillTextContentPlayer.d.ts.map +1 -1
  14. package/dist/question/player/QuestionFillTextPlayer.d.ts +3 -1
  15. package/dist/question/player/QuestionFillTextPlayer.d.ts.map +1 -1
  16. package/dist/question/player/QuestionGradingMark.d.ts +8 -0
  17. package/dist/question/player/QuestionGradingMark.d.ts.map +1 -0
  18. package/dist/question/player/QuestionJudgementGroupPlayer.d.ts +3 -1
  19. package/dist/question/player/QuestionJudgementGroupPlayer.d.ts.map +1 -1
  20. package/dist/question/player/QuestionLineConnectPlayer.d.ts +3 -1
  21. package/dist/question/player/QuestionLineConnectPlayer.d.ts.map +1 -1
  22. package/dist/question/player/QuestionMatchingPlayer.d.ts +3 -1
  23. package/dist/question/player/QuestionMatchingPlayer.d.ts.map +1 -1
  24. package/dist/question/player/QuestionOptionGroupPlayer.d.ts +3 -1
  25. package/dist/question/player/QuestionOptionGroupPlayer.d.ts.map +1 -1
  26. package/dist/question/player/QuestionOrderingPlayer.d.ts +3 -1
  27. package/dist/question/player/QuestionOrderingPlayer.d.ts.map +1 -1
  28. package/dist/question/player/QuestionPlayer.d.ts.map +1 -1
  29. package/dist/question/player/QuestionPlayerElement.d.ts +3 -1
  30. package/dist/question/player/QuestionPlayerElement.d.ts.map +1 -1
  31. package/dist/question/player/QuestionPlayerInner.d.ts +15 -0
  32. package/dist/question/player/QuestionPlayerInner.d.ts.map +1 -0
  33. package/dist/question/player/QuestionTextMarkerPlayer.d.ts +3 -1
  34. package/dist/question/player/QuestionTextMarkerPlayer.d.ts.map +1 -1
  35. package/dist/question/player/QuestionWordBuilderPlayer.d.ts +3 -1
  36. package/dist/question/player/QuestionWordBuilderPlayer.d.ts.map +1 -1
  37. package/dist/question/player/grading-contract.d.ts +9 -0
  38. package/dist/question/player/grading-contract.d.ts.map +1 -0
  39. package/dist/question/player/grading-presentation.d.ts +25 -0
  40. package/dist/question/player/grading-presentation.d.ts.map +1 -0
  41. package/dist/question/player/grading-types.d.ts +53 -0
  42. package/dist/question/player/grading-types.d.ts.map +1 -0
  43. package/dist/question/player/types.d.ts +2 -0
  44. package/dist/question/player/types.d.ts.map +1 -1
  45. package/dist/question/renderers/QuestionTextMarkerContent.d.ts +2 -1
  46. package/dist/question/renderers/QuestionTextMarkerContent.d.ts.map +1 -1
  47. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1039,8 +1039,7 @@ function Mn(e, t = 1) {
1039
1039
  return i.length ? i : Array.from({ length: t }, (e, n) => jn(A(void 0, r), t === Kt ? P(`\u9009\u9879 ${un("upperAlpha", n)}`) : P()));
1040
1040
  }
1041
1041
  function Nn(e, t) {
1042
- let n = (e == null ? [] : e).map((e) => e.trim()).filter((e) => e.length > 0);
1043
- return n.length > 0 ? n : Pn(t);
1042
+ return e && e.length > 0 ? [...e] : Pn(t);
1044
1043
  }
1045
1044
  function Pn(e) {
1046
1045
  return e === "sentence" ? ["This helped them save time."] : [
@@ -3642,16 +3641,17 @@ function mo(e, t) {
3642
3641
  return t !== void 0 && e.key === t.key && e.x1 === t.x1 && e.x2 === t.x2 && e.y1 === t.y1 && e.y2 === t.y2;
3643
3642
  }
3644
3643
  var V = {
3645
- board: "_board_1h4i1_1",
3646
- columns: "_columns_1h4i1_9",
3647
- column: "_column_1h4i1_9",
3648
- "column-title": "_column-title_1h4i1_21",
3649
- item: "_item_1h4i1_27",
3650
- button: "_button_1h4i1_40",
3651
- selected: "_selected_1h4i1_65",
3652
- marker: "_marker_1h4i1_70",
3653
- lines: "_lines_1h4i1_91",
3654
- line: "_line_1h4i1_91"
3644
+ board: "_board_1fmpc_1",
3645
+ columns: "_columns_1fmpc_9",
3646
+ "player-columns": "_player-columns_1fmpc_15",
3647
+ column: "_column_1fmpc_9",
3648
+ "column-title": "_column-title_1fmpc_26",
3649
+ item: "_item_1fmpc_32",
3650
+ button: "_button_1fmpc_45",
3651
+ selected: "_selected_1fmpc_70",
3652
+ marker: "_marker_1fmpc_75",
3653
+ lines: "_lines_1fmpc_96",
3654
+ line: "_line_1fmpc_96"
3655
3655
  }, H = {
3656
3656
  "connect-handle": "_connect-handle_1cqr2_1",
3657
3657
  marker: "_marker_1cqr2_19",
@@ -4647,7 +4647,7 @@ function Io({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4647
4647
  onClick: () => v(n),
4648
4648
  size: "small"
4649
4649
  })]
4650
- }, `${t}-${n}`))
4650
+ }, n))
4651
4651
  })]
4652
4652
  }),
4653
4653
  n ? /* @__PURE__ */ o("section", {
@@ -6041,46 +6041,160 @@ function Bc(e = "zh-CN") {
6041
6041
  }
6042
6042
  }
6043
6043
  //#endregion
6044
+ //#region src/question/player/grading-contract.ts
6045
+ var Vc = new Set([
6046
+ "correct",
6047
+ "incorrect",
6048
+ "partial",
6049
+ "unanswered"
6050
+ ]);
6051
+ function Hc(e, t, n, r) {
6052
+ if (!e) throw TypeError(`${t}: expected ${n}, actual ${JSON.stringify(r)}`);
6053
+ }
6054
+ function Uc(e, t, n = "gradingResult") {
6055
+ Hc(!!e && typeof e == "object", n, "grading result object", e);
6056
+ for (let r of [
6057
+ "id",
6058
+ "questionTypeKey",
6059
+ "version"
6060
+ ]) Hc(e[r] === t[r], `${n}.${r}`, JSON.stringify(t[r]), e[r]);
6061
+ let r = t.elements.filter((e) => e.type !== "richText");
6062
+ Wc(e.elementResults, r.length, `${n}.elementResults`), Wc(e.children, t.children.length, `${n}.children`), e.elementResults.forEach((e, t) => {
6063
+ e !== null && Gc(e, r[t], `${n}.elementResults[${t}]`);
6064
+ }), e.children.forEach((e, r) => Uc(e, t.children[r], `${n}.children[${r}]`));
6065
+ }
6066
+ function Wc(e, t, n) {
6067
+ Hc(Array.isArray(e), n, "array", e), Hc(e.length === t, n, `length ${t}`, e.length);
6068
+ }
6069
+ function Gc(e, t, n) {
6070
+ switch (Hc(!!e && typeof e == "object", n, "element result or null", e), Hc(e.type === t.type, `${n}.type`, t.type, e.type), Hc(t.type !== "richText" && t.type !== "textResponse", `${n}.type`, "gradable element type", e.type), e.type) {
6071
+ case "choice":
6072
+ Jc(e.optionResults, ["optionId"], t.options.map((e) => [e.id]), `${n}.optionResults`);
6073
+ return;
6074
+ case "ordering":
6075
+ Jc(e.optionResults, ["optionId"], t.sortOptions.map((e) => [e.id]), `${n}.optionResults`);
6076
+ return;
6077
+ case "fill":
6078
+ case "inlineFill":
6079
+ case "wordBuilder":
6080
+ Jc(e.blankResults, ["blankId"], t.blanks.map((e) => [e]), `${n}.blankResults`);
6081
+ return;
6082
+ default: Kc(e, t, n);
6083
+ }
6084
+ }
6085
+ function Kc(e, t, n) {
6086
+ switch (e.type) {
6087
+ case "judgement":
6088
+ Jc(e.optionResults, ["value"], [[!0], [!1]], `${n}.optionResults`);
6089
+ return;
6090
+ case "classification":
6091
+ Jc(e.itemResults, ["itemId"], t.items.map((e) => [e.id]), `${n}.itemResults`);
6092
+ return;
6093
+ case "textMarker":
6094
+ Jc(e.markerResults, ["markerId"], t.markers.map((e) => [e]), `${n}.markerResults`);
6095
+ return;
6096
+ case "lineConnect":
6097
+ case "matching":
6098
+ qc(e, t, n);
6099
+ return;
6100
+ }
6101
+ }
6102
+ function qc(e, t, n) {
6103
+ let r = [], i = [];
6104
+ for (let [e, n] of t.columns.entries()) for (let a of n.items) {
6105
+ r.push([a.itemId]);
6106
+ for (let n of t.columns.slice(e + 1)) for (let e of n.items) i.push([a.itemId, e.itemId]);
6107
+ }
6108
+ Jc(e.itemResults, ["itemId"], r, `${n}.itemResults`), Jc(e.connectionResults, ["fromItemId", "toItemId"], i, `${n}.connectionResults`);
6109
+ }
6110
+ function Jc(e, t, n, r) {
6111
+ Hc(Array.isArray(e), r, "array", e);
6112
+ let i = new Set(n.map((e) => JSON.stringify(e))), a = /* @__PURE__ */ new Set();
6113
+ e.forEach((e, n) => {
6114
+ Hc(!!e && typeof e == "object", `${r}[${n}]`, "result object", e);
6115
+ let o = new Map(Object.entries(e)), s = t.map((e) => o.get(e)), c = JSON.stringify(s);
6116
+ Hc(i.has(c), `${r}[${n}]`, `existing ${t.join(" + ")}`, s), Hc(!a.has(c), `${r}[${n}]`, "unique target", s);
6117
+ let l = o.get("status");
6118
+ Hc(typeof l == "string" && Vc.has(l), `${r}[${n}].status`, [...Vc].join(" | "), o.get("status")), a.add(c);
6119
+ });
6120
+ }
6121
+ function Yc(e, t) {
6122
+ return (e == null ? void 0 : e.type) === t ? e : void 0;
6123
+ }
6124
+ var Xc = {
6125
+ target: "_target_18t8h_1",
6126
+ correct: "_correct_18t8h_1",
6127
+ incorrect: "_incorrect_18t8h_7",
6128
+ partial: "_partial_18t8h_13",
6129
+ unanswered: "_unanswered_18t8h_19",
6130
+ mark: "_mark_18t8h_49",
6131
+ icon: "_icon_18t8h_64",
6132
+ line: "_line_18t8h_83",
6133
+ "unanswered-warning": "_unanswered-warning_18t8h_90"
6134
+ }, Zc = l("zh-CN");
6135
+ function Qc(e) {
6136
+ return e ? `${Xc.target} ${Xc[e]}` : "";
6137
+ }
6138
+ var $c = {
6139
+ "zh-CN": {
6140
+ correct: "\u6b63\u786e",
6141
+ incorrect: "\u9519\u8bef",
6142
+ partial: "\u534a\u5bf9",
6143
+ unanswered: "\u672a\u4f5c\u7b54"
6144
+ },
6145
+ "en-US": {
6146
+ correct: "Correct",
6147
+ incorrect: "Incorrect",
6148
+ partial: "Partially correct",
6149
+ unanswered: "Unanswered"
6150
+ }
6151
+ }, el = {
6152
+ correct: "m7.5 12 3 3 6-6",
6153
+ incorrect: "m9 9 6 6m0-6-6 6",
6154
+ partial: "m7.5 12 3 3 6-6m-4.5 0 5 5",
6155
+ unanswered: "M9 9a3 3 0 0 1 6 0c0 2-3 2-3 4m0 3h.01"
6156
+ };
6157
+ //#endregion
6044
6158
  //#region src/question/renderers/helpers.ts
6045
6159
  function U(...e) {
6046
6160
  return e.filter(Boolean).join(" ");
6047
6161
  }
6048
- function Vc(e, t, n) {
6162
+ function tl(e, t, n) {
6049
6163
  return e.map((e) => t.indexOf(e) + 1).filter((e) => e > 0).map((e) => `${n}${e}`).join(" ");
6050
6164
  }
6051
- function Hc(e) {
6165
+ function nl(e) {
6052
6166
  return "answerPools" in e;
6053
6167
  }
6054
- function Uc(e) {
6168
+ function rl(e) {
6055
6169
  return "answerOptionId" in e;
6056
6170
  }
6057
- function Wc(e) {
6171
+ function il(e) {
6058
6172
  return "answerOptionIds" in e;
6059
6173
  }
6060
- function Gc(e, t) {
6174
+ function al(e, t) {
6061
6175
  var n, r;
6062
6176
  return (n = e == null || (r = e.find((e) => e.optionId === t)) == null ? void 0 : r.content) == null ? null : n;
6063
6177
  }
6064
- function Kc(e, t, n) {
6178
+ function ol(e, t, n) {
6065
6179
  var r, i;
6066
6180
  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;
6067
6181
  }
6068
- function qc(e) {
6182
+ function sl(e) {
6069
6183
  return e.answers.reduce((t, n) => {
6070
- if (Hc(n)) return Jc(t, {
6184
+ if (nl(n)) return cl(t, {
6071
6185
  blankIds: n.blankIds,
6072
6186
  contents: n.answerPools
6073
6187
  });
6074
- if (Uc(n)) {
6075
- let r = Kc(e.blankOptionGroups, n.blankId, n.answerOptionId);
6076
- return Jc(t, {
6188
+ if (rl(n)) {
6189
+ let r = ol(e.blankOptionGroups, n.blankId, n.answerOptionId);
6190
+ return cl(t, {
6077
6191
  blankIds: [n.blankId],
6078
6192
  contents: r ? [r] : []
6079
6193
  });
6080
6194
  }
6081
- if (Wc(n)) {
6082
- let r = n.answerOptionIds.map((t) => Gc(e.candidateOptions, t)).filter((e) => !!e);
6083
- return Jc(t, {
6195
+ if (il(n)) {
6196
+ let r = n.answerOptionIds.map((t) => al(e.candidateOptions, t)).filter((e) => !!e);
6197
+ return cl(t, {
6084
6198
  blankIds: n.blankIds,
6085
6199
  contents: r
6086
6200
  });
@@ -6088,7 +6202,7 @@ function qc(e) {
6088
6202
  return t;
6089
6203
  }, []);
6090
6204
  }
6091
- function Jc(e, t) {
6205
+ function cl(e, t) {
6092
6206
  let n = t.contents.filter((e) => e.text.trim() !== "");
6093
6207
  return n.length > 0 ? [...e, {
6094
6208
  blankIds: t.blankIds,
@@ -6097,7 +6211,7 @@ function Jc(e, t) {
6097
6211
  }
6098
6212
  //#endregion
6099
6213
  //#region src/question/shared/blank-numbering.ts
6100
- var Yc = [
6214
+ var ll = [
6101
6215
  "\u96f6",
6102
6216
  "\u4e00",
6103
6217
  "\u4e8c",
@@ -6108,17 +6222,17 @@ var Yc = [
6108
6222
  "\u4e03",
6109
6223
  "\u516b",
6110
6224
  "\u4e5d"
6111
- ], Xc = [
6225
+ ], ul = [
6112
6226
  "",
6113
6227
  "\u5341",
6114
6228
  "\u767e",
6115
6229
  "\u5343"
6116
- ], Zc = [
6230
+ ], dl = [
6117
6231
  "",
6118
6232
  "\u4e07",
6119
6233
  "\u4ebf",
6120
6234
  "\u5146"
6121
- ], Qc = new Intl.PluralRules("en-US", { type: "ordinal" }), $c = {
6235
+ ], fl = new Intl.PluralRules("en-US", { type: "ordinal" }), pl = {
6122
6236
  few: "rd",
6123
6237
  many: "th",
6124
6238
  one: "st",
@@ -6126,15 +6240,15 @@ var Yc = [
6126
6240
  two: "nd",
6127
6241
  zero: "th"
6128
6242
  };
6129
- function el(e, t) {
6130
- return t === "zh-CN" ? `\u7b2c${nl(e)}\u7a7a` : `${e}${$c[Qc.select(e)]} blank`;
6243
+ function ml(e, t) {
6244
+ return t === "zh-CN" ? `\u7b2c${gl(e)}\u7a7a` : `${e}${pl[fl.select(e)]} blank`;
6131
6245
  }
6132
- function tl(e, t, n) {
6133
- let r = [...e].sort((e, n) => t.indexOf(e) - t.indexOf(n)).map((e) => t.indexOf(e) + 1).filter((e) => e > 0).map((e) => el(e, n));
6246
+ function hl(e, t, n) {
6247
+ let r = [...e].sort((e, n) => t.indexOf(e) - t.indexOf(n)).map((e) => t.indexOf(e) + 1).filter((e) => e > 0).map((e) => ml(e, n));
6134
6248
  return n === "zh-CN" ? `${r.join("\u3001")}\uff1a` : `${r.join(", ")}:`;
6135
6249
  }
6136
- function nl(e) {
6137
- let t = rl(e), n = "", r = !1;
6250
+ function gl(e) {
6251
+ let t = _l(e), n = "", r = !1;
6138
6252
  for (let e = t.length - 1; e >= 0; --e) {
6139
6253
  var i;
6140
6254
  let a = (i = t[e]) == null ? 0 : i;
@@ -6142,16 +6256,16 @@ function nl(e) {
6142
6256
  r = n.length > 0;
6143
6257
  continue;
6144
6258
  }
6145
- n.length > 0 && (r || a < 1e3) && (n += Yc[0]), n += `${il(a)}${Zc[e]}`, r = !1;
6259
+ n.length > 0 && (r || a < 1e3) && (n += ll[0]), n += `${vl(a)}${dl[e]}`, r = !1;
6146
6260
  }
6147
6261
  return n.startsWith("\u4e00\u5341") ? n.slice(1) : n;
6148
6262
  }
6149
- function rl(e) {
6263
+ function _l(e) {
6150
6264
  let t = [], n = e;
6151
6265
  for (; n > 0;) t.push(n % 1e4), n = Math.floor(n / 1e4);
6152
6266
  return t;
6153
6267
  }
6154
- function il(e) {
6268
+ function vl(e) {
6155
6269
  let t = "", n = !1;
6156
6270
  for (let r = 3; r >= 0; --r) {
6157
6271
  let i = Math.pow(10, r), a = Math.floor(e / i) % 10;
@@ -6159,15 +6273,15 @@ function il(e) {
6159
6273
  n = t.length > 0 && e % i > 0;
6160
6274
  continue;
6161
6275
  }
6162
- n && (t += Yc[0]), t += `${Yc[a]}${Xc[r]}`, n = !1;
6276
+ n && (t += ll[0]), t += `${ll[a]}${ul[r]}`, n = !1;
6163
6277
  }
6164
6278
  return t;
6165
6279
  }
6166
6280
  //#endregion
6167
6281
  //#region src/question/renderers/question-renderer-behavior.ts
6168
- var al = {
6282
+ var yl = {
6169
6283
  answerGroupLayout: "flow",
6170
- blankAnswerMarker: (e, t, n, r) => Vc(e, t, r),
6284
+ blankAnswerMarker: (e, t, n, r) => tl(e, t, r),
6171
6285
  blankPlaceholder: "labeled-field",
6172
6286
  candidateLayout: "plain-list",
6173
6287
  columnLayout: "css",
@@ -6179,9 +6293,9 @@ var al = {
6179
6293
  showEmptyAnswerGroups: !1,
6180
6294
  systemListMarkup: "native",
6181
6295
  textResponseVisibility: "hidden"
6182
- }, ol = {
6296
+ }, bl = {
6183
6297
  answerGroupLayout: "rows",
6184
- blankAnswerMarker: (e, t, n) => tl(e, t, n),
6298
+ blankAnswerMarker: (e, t, n) => hl(e, t, n),
6185
6299
  blankPlaceholder: "answer-line",
6186
6300
  candidateLayout: "labeled-groups",
6187
6301
  columnLayout: "document-table",
@@ -6193,30 +6307,28 @@ var al = {
6193
6307
  showEmptyAnswerGroups: !0,
6194
6308
  systemListMarkup: "explicit",
6195
6309
  textResponseVisibility: "accessible-only"
6196
- }, sl = l(al), cl = l("zh-CN");
6310
+ }, xl = l(yl), Sl = l("zh-CN");
6197
6311
  function W() {
6198
- return d(sl);
6312
+ return d(xl);
6199
6313
  }
6200
- function ll() {
6201
- return d(cl);
6314
+ function Cl() {
6315
+ return d(Sl);
6202
6316
  }
6203
- var ul = { placeholder: "_placeholder_np8ps_1" }, dl = {
6317
+ var wl = { placeholder: "_placeholder_np8ps_1" }, Tl = {
6204
6318
  "blank-list": "_blank-list_12ccp_1",
6205
6319
  "blank-item": "_blank-item_12ccp_11",
6206
6320
  "blank-field": "_blank-field_12ccp_17"
6207
- }, fl = {
6208
- board: "_board_1f76b_1",
6209
- pool: "_pool_1f76b_6",
6210
- zones: "_zones_1f76b_13",
6211
- zone: "_zone_1f76b_13",
6212
- "zone-title": "_zone-title_1f76b_30",
6213
- item: "_item_1f76b_37",
6214
- empty: "_empty_1f76b_52",
6215
- selected: "_selected_1f76b_72",
6216
- correct: "_correct_1f76b_77",
6217
- incorrect: "_incorrect_1f76b_81",
6218
- unanswered: "_unanswered_1f76b_85"
6219
- }, pl = {
6321
+ }, El = {
6322
+ board: "_board_5m701_1",
6323
+ pool: "_pool_5m701_6",
6324
+ zones: "_zones_5m701_13",
6325
+ zone: "_zone_5m701_13",
6326
+ "zone-title": "_zone-title_5m701_30",
6327
+ item: "_item_5m701_37",
6328
+ empty: "_empty_5m701_52",
6329
+ "unanswered-item": "_unanswered-item_5m701_72",
6330
+ selected: "_selected_5m701_83"
6331
+ }, Dl = {
6220
6332
  board: "_board_5xarh_1",
6221
6333
  columns: "_columns_5xarh_6",
6222
6334
  column: "_column_5xarh_6",
@@ -6238,12 +6350,12 @@ var ul = { placeholder: "_placeholder_np8ps_1" }, dl = {
6238
6350
  "section-title": "_section-title_1aumw_125",
6239
6351
  "word-builder-blank": "_word-builder-blank_1aumw_131",
6240
6352
  "word-builder-candidate-list": "_word-builder-candidate-list_1aumw_147"
6241
- }, ml = {
6353
+ }, Ol = {
6242
6354
  "table-wrap": "_table-wrap_n67ah_1",
6243
6355
  table: "_table_n67ah_1",
6244
6356
  "table-option-column": "_table-option-column_n67ah_17",
6245
6357
  "table-option-marker": "_table-option-marker_n67ah_45"
6246
- }, hl = l({
6358
+ }, kl = l({
6247
6359
  answer: {
6248
6360
  "answer-panel": "_answer-panel_1bkkd_1",
6249
6361
  "answer-list": "_answer-list_1bkkd_8",
@@ -6253,13 +6365,13 @@ var ul = { placeholder: "_placeholder_np8ps_1" }, dl = {
6253
6365
  "answer-content-list": "_answer-content-list_1bkkd_46",
6254
6366
  "answer-value": "_answer-value_1bkkd_55"
6255
6367
  },
6256
- blankGroup: dl,
6257
- classification: fl,
6368
+ blankGroup: Tl,
6369
+ classification: El,
6258
6370
  lineConnect: V,
6259
- matching: pl,
6371
+ matching: Dl,
6260
6372
  renderer: G,
6261
6373
  sectionTitle: { title: "_title_hrc5o_1" },
6262
- table: ml,
6374
+ table: Ol,
6263
6375
  textMarker: {
6264
6376
  content: "_content_63948_1",
6265
6377
  paragraph: "_paragraph_63948_10",
@@ -6268,37 +6380,38 @@ var ul = { placeholder: "_placeholder_np8ps_1" }, dl = {
6268
6380
  "marker-selected": "_marker-selected_63948_31",
6269
6381
  "marker-answer": "_marker-answer_63948_37"
6270
6382
  },
6271
- textResponse: ul
6383
+ textResponse: wl
6272
6384
  });
6273
6385
  function K() {
6274
- return d(hl);
6386
+ return d(kl);
6275
6387
  }
6276
6388
  //#endregion
6277
6389
  //#region src/question/renderers/QuestionSectionTitle.tsx
6278
- function gl({ children: e }) {
6279
- let { sectionTitleSuffix: t } = W(), n = ll(), { sectionTitle: r } = K();
6390
+ function Al({ children: e }) {
6391
+ let { sectionTitleSuffix: t } = W(), n = Cl(), { sectionTitle: r } = K();
6280
6392
  return /* @__PURE__ */ o("h3", {
6281
6393
  className: r.title,
6282
6394
  children: [e, t(n)]
6283
6395
  });
6284
6396
  }
6285
6397
  var q = {
6286
- root: "_root_nr9um_1",
6287
- "element-list": "_element-list_nr9um_18",
6288
- children: "_children_nr9um_19",
6289
- "control-list": "_control-list_nr9um_20",
6290
- "fill-text": "_fill-text_nr9um_21",
6291
- element: "_element_nr9um_18",
6292
- extra: "_extra_nr9um_31",
6293
- child: "_child_nr9um_19",
6294
- "field-label": "_field-label_nr9um_43",
6295
- empty: "_empty_nr9um_49",
6296
- input: "_input_nr9um_61",
6297
- field: "_field_nr9um_43"
6398
+ root: "_root_odzjk_1",
6399
+ "element-list": "_element-list_odzjk_18",
6400
+ children: "_children_odzjk_19",
6401
+ "control-list": "_control-list_odzjk_20",
6402
+ "fill-text": "_fill-text_odzjk_21",
6403
+ element: "_element_odzjk_18",
6404
+ extra: "_extra_odzjk_31",
6405
+ child: "_child_odzjk_19",
6406
+ "field-label": "_field-label_odzjk_43",
6407
+ empty: "_empty_odzjk_49",
6408
+ input: "_input_odzjk_61",
6409
+ field: "_field_odzjk_43",
6410
+ "blank-field": "_blank-field_odzjk_91"
6298
6411
  };
6299
6412
  //#endregion
6300
6413
  //#region src/question/player/QuestionPlayerComposite.tsx
6301
- function _l({ childIndexPath: e = [], messages: t, onChildResponseChange: n, renderChild: r, response: i, rootQuestionNumber: o, value: s }) {
6414
+ function jl({ childIndexPath: e = [], messages: t, onChildResponseChange: n, renderChild: r, response: i, rootQuestionNumber: o, value: s }) {
6302
6415
  return s.children.length === 0 ? /* @__PURE__ */ a("div", {
6303
6416
  className: q.empty,
6304
6417
  children: t.previewEmpty
@@ -6331,7 +6444,7 @@ function J({ className: e, content: t }) {
6331
6444
  }
6332
6445
  //#endregion
6333
6446
  //#region src/question/renderers/QuestionSystemList.tsx
6334
- function vl({ children: e, className: t, dataCandidateLayout: n }) {
6447
+ function Ml({ children: e, className: t, dataCandidateLayout: n }) {
6335
6448
  let { systemListMarkup: r } = W();
6336
6449
  return r === "native" ? /* @__PURE__ */ a("ol", {
6337
6450
  className: t,
@@ -6346,7 +6459,7 @@ function vl({ children: e, className: t, dataCandidateLayout: n }) {
6346
6459
  }
6347
6460
  //#endregion
6348
6461
  //#region src/question/renderers/QuestionSystemListItem.tsx
6349
- function yl({ children: e, className: t }) {
6462
+ function Nl({ children: e, className: t }) {
6350
6463
  let { systemListMarkup: n } = W();
6351
6464
  return n === "native" ? /* @__PURE__ */ a("li", {
6352
6465
  className: t,
@@ -6365,9 +6478,9 @@ function Y({ groups: e, title: t }) {
6365
6478
  "aria-label": t,
6366
6479
  className: i["answer-panel"],
6367
6480
  "data-answer-group-layout": n,
6368
- children: [/* @__PURE__ */ a(gl, { children: t }), /* @__PURE__ */ a(vl, {
6481
+ children: [/* @__PURE__ */ a(Al, { children: t }), /* @__PURE__ */ a(Ml, {
6369
6482
  className: i["answer-list"],
6370
- children: s.map((e, t) => /* @__PURE__ */ o(yl, {
6483
+ children: s.map((e, t) => /* @__PURE__ */ o(Nl, {
6371
6484
  className: i["answer-row"],
6372
6485
  children: [e.marker ? /* @__PURE__ */ a("span", {
6373
6486
  className: e.kind === "markerOnly" ? `${i["answer-marker"]} ${i["answer-marker-only"]}` : i["answer-marker"],
@@ -6384,49 +6497,74 @@ function Y({ groups: e, title: t }) {
6384
6497
  });
6385
6498
  }
6386
6499
  //#endregion
6500
+ //#region src/question/player/QuestionGradingMark.tsx
6501
+ function Pl({ status: e, children: t, unansweredAsWarning: n = !1 }) {
6502
+ let r = d(Zc);
6503
+ if (!e) return t ? /* @__PURE__ */ a(i, { children: t }) : null;
6504
+ let s = n && e === "unanswered";
6505
+ return /* @__PURE__ */ o("span", {
6506
+ className: `${Xc.mark} ${Qc(e)} ${s ? Xc["unanswered-warning"] : ""}`,
6507
+ title: s ? $c[r][e] : void 0,
6508
+ "data-grading-status": e,
6509
+ children: [t, s ? null : /* @__PURE__ */ a("span", {
6510
+ className: Xc.icon,
6511
+ role: "img",
6512
+ "aria-label": $c[r][e],
6513
+ title: $c[r][e],
6514
+ children: /* @__PURE__ */ a("svg", {
6515
+ viewBox: "0 0 24 24",
6516
+ "aria-hidden": "true",
6517
+ focusable: "false",
6518
+ children: /* @__PURE__ */ a("path", { d: el[e] })
6519
+ })
6520
+ })]
6521
+ });
6522
+ }
6523
+ //#endregion
6387
6524
  //#region src/question/player/QuestionBlankGroupPlayer.tsx
6388
- function bl({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
6389
- let l = rc(i, s, t.blanks), u = Yn(t.answers, t.blanks).map((e, r) => ({
6525
+ function Fl({ gradingResult: e, disabled: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
6526
+ let u = rc(s, c, n.blanks), d = Yn(n.answers, n.blanks).map((e, t) => ({
6390
6527
  kind: "detailed",
6391
- contents: e.answerPools.map((e, t) => /* @__PURE__ */ a(J, { content: e }, `group-${r}-answer-${t}`)),
6392
- marker: Vc(e.blankIds, t.blanks, n.blankLabel)
6528
+ contents: e.answerPools.map((e, n) => /* @__PURE__ */ a(J, { content: e }, `group-${t}-answer-${n}`)),
6529
+ marker: tl(e.blankIds, n.blanks, r.blankLabel)
6393
6530
  }));
6394
- function d(e, t) {
6395
- r(j(j({}, l), {}, { answers: j(j({}, l.answers), {}, { [e]: t }) }));
6531
+ function f(e, t) {
6532
+ i(j(j({}, u), {}, { answers: j(j({}, u.answers), {}, { [e]: t }) }));
6396
6533
  }
6397
6534
  return /* @__PURE__ */ o("div", {
6398
6535
  className: q["control-list"],
6399
- children: [t.blanks.map((t, r) => /* @__PURE__ */ o("label", {
6400
- className: q.field,
6401
- children: [/* @__PURE__ */ o("span", {
6402
- className: q["field-label"],
6403
- children: [
6404
- n.blankLabel,
6405
- " ",
6406
- r + 1
6407
- ]
6408
- }), /* @__PURE__ */ a("input", {
6409
- className: q.input,
6410
- disabled: e,
6411
- onChange: (e) => d(t, e.target.value),
6412
- value: Sl(l.answers, t)
6413
- })]
6414
- }, xl(t, r))), c ? /* @__PURE__ */ a(Y, {
6415
- groups: u,
6416
- title: n.standardAnswer
6536
+ children: [n.blanks.map((n, i) => {
6537
+ var o;
6538
+ return /* @__PURE__ */ a("label", {
6539
+ className: q["blank-field"],
6540
+ children: /* @__PURE__ */ a(Pl, {
6541
+ unansweredAsWarning: !0,
6542
+ status: e == null || (o = e.blankResults.find((e) => e.blankId === n)) == null ? void 0 : o.status,
6543
+ children: /* @__PURE__ */ a("input", {
6544
+ "aria-label": `${r.blankLabel} ${i + 1}`,
6545
+ className: q.input,
6546
+ disabled: t,
6547
+ onChange: (e) => f(n, e.target.value),
6548
+ value: Ll(u.answers, n)
6549
+ })
6550
+ })
6551
+ }, Il(n, i));
6552
+ }), l ? /* @__PURE__ */ a(Y, {
6553
+ groups: d,
6554
+ title: r.standardAnswer
6417
6555
  }) : null]
6418
6556
  });
6419
6557
  }
6420
- function xl(e, t) {
6558
+ function Il(e, t) {
6421
6559
  return e || `blank-${t + 1}`;
6422
6560
  }
6423
- function Sl(e, t) {
6561
+ function Ll(e, t) {
6424
6562
  var n, r;
6425
6563
  return (n = (r = Object.entries(e).find(([e]) => e === t)) == null ? void 0 : r[1]) == null ? "" : n;
6426
6564
  }
6427
6565
  //#endregion
6428
6566
  //#region src/question/renderers/classificationAnswers.tsx
6429
- function Cl(e) {
6567
+ function Rl(e) {
6430
6568
  return e.categories.map((t) => ({
6431
6569
  kind: "detailed",
6432
6570
  contents: e.items.filter((n) => e.answers[n.id] === t.id).map((e) => /* @__PURE__ */ a(J, { content: e.content }, `${t.id}-${e.id}`)),
@@ -6435,125 +6573,121 @@ function Cl(e) {
6435
6573
  }
6436
6574
  //#endregion
6437
6575
  //#region src/question/player/QuestionClassificationPlayer.tsx
6438
- function wl({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
6439
- let [l, u] = h(""), d = sc(i, s), f = El(d.placements, t), p = t.items.find((e) => e.id === l);
6440
- function m(e, n) {
6441
- r(j(j({}, d), {}, { placements: El(yc(f, e, n), t) })), u("");
6576
+ function zl({ gradingResult: e, disabled: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
6577
+ let [u, d] = h(""), f = sc(s, c), p = Bl(f.placements, n), m = n.items.find((e) => e.id === u);
6578
+ function g(e, r) {
6579
+ t || (i(j(j({}, f), {}, { placements: Bl(yc(p, e, r), n) })), d(""));
6442
6580
  }
6443
- function g(t, n) {
6444
- t.preventDefault();
6445
- let r = t.dataTransfer.getData("question/classification-item");
6446
- !e && r && m(r, n);
6581
+ function _(e, n) {
6582
+ e.preventDefault();
6583
+ let r = e.dataTransfer.getData("question/classification-item");
6584
+ !t && r && g(r, n);
6447
6585
  }
6448
- function _(n) {
6449
- let r = l === n.id, i = Tl(n.id, f, t, c);
6450
- return /* @__PURE__ */ a("button", {
6451
- "aria-pressed": r,
6452
- className: U(fl.item, r && fl.selected, i === "correct" && fl.correct, i === "incorrect" && fl.incorrect, i === "unanswered" && fl.unanswered),
6453
- "data-status": i,
6586
+ function v(n) {
6587
+ var r;
6588
+ let i = u === n.id, s = e == null || (r = e.itemResults.find((e) => e.itemId === n.id)) == null ? void 0 : r.status;
6589
+ return /* @__PURE__ */ o("button", {
6590
+ "aria-pressed": i,
6591
+ className: U(El.item, i && El.selected, Qc(s), s === "unanswered" && El["unanswered-item"]),
6592
+ "data-status": s,
6454
6593
  "data-testid": `classification-player-item-${n.id}`,
6455
- disabled: e,
6456
- draggable: !e,
6594
+ disabled: t,
6595
+ draggable: !t,
6457
6596
  onClick: (e) => {
6458
- e.stopPropagation(), u(r ? "" : n.id);
6597
+ e.stopPropagation(), d(i ? "" : n.id);
6459
6598
  },
6460
6599
  onDragStart: (e) => {
6461
6600
  e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("question/classification-item", n.id);
6462
6601
  },
6463
6602
  type: "button",
6464
- children: /* @__PURE__ */ a(J, { content: n.content })
6603
+ children: [/* @__PURE__ */ a(J, { content: n.content }), s === "unanswered" ? null : /* @__PURE__ */ a(Pl, { status: s })]
6465
6604
  }, n.id);
6466
6605
  }
6467
6606
  return /* @__PURE__ */ o("div", {
6468
6607
  className: G.element,
6469
6608
  children: [/* @__PURE__ */ o("div", {
6470
- className: fl.board,
6609
+ className: El.board,
6471
6610
  children: [/* @__PURE__ */ a("div", {
6472
- className: fl.zones,
6611
+ className: El.zones,
6473
6612
  "data-testid": "classification-zones",
6474
- children: t.categories.map((e) => {
6475
- let r = t.items.filter((t) => f[t.id] === e.id);
6613
+ children: n.categories.map((e) => {
6614
+ let t = n.items.filter((t) => p[t.id] === e.id);
6476
6615
  return /* @__PURE__ */ o("section", {
6477
- className: fl.zone,
6478
- onClick: () => p ? m(p.id, e.id) : void 0,
6616
+ className: El.zone,
6617
+ onClick: () => m ? g(m.id, e.id) : void 0,
6479
6618
  onDragOver: (e) => e.preventDefault(),
6480
- onDrop: (t) => g(t, e.id),
6619
+ onDrop: (t) => _(t, e.id),
6481
6620
  children: [/* @__PURE__ */ a("div", {
6482
- className: fl["zone-title"],
6621
+ className: El["zone-title"],
6483
6622
  children: /* @__PURE__ */ a(J, { content: e.content })
6484
- }), r.length > 0 ? r.map((e) => _(e)) : /* @__PURE__ */ a("span", {
6485
- className: fl.empty,
6486
- children: n.unassigned
6623
+ }), t.length > 0 ? t.map((e) => v(e)) : /* @__PURE__ */ a("span", {
6624
+ className: El.empty,
6625
+ children: r.unassigned
6487
6626
  })]
6488
6627
  }, e.id);
6489
6628
  })
6490
6629
  }), /* @__PURE__ */ a("section", {
6491
- className: fl.pool,
6630
+ className: El.pool,
6492
6631
  "data-testid": "classification-pool",
6493
- onClick: () => p ? m(p.id, "") : void 0,
6632
+ onClick: () => m ? g(m.id, "") : void 0,
6494
6633
  onDragOver: (e) => e.preventDefault(),
6495
- onDrop: (e) => g(e, ""),
6496
- children: t.items.filter((e) => !f[e.id]).map((e) => _(e))
6634
+ onDrop: (e) => _(e, ""),
6635
+ children: n.items.filter((e) => !p[e.id]).map((e) => v(e))
6497
6636
  })]
6498
- }), c ? /* @__PURE__ */ a(Y, {
6499
- groups: Cl(t),
6500
- title: n.standardAnswer
6637
+ }), l ? /* @__PURE__ */ a(Y, {
6638
+ groups: Rl(n),
6639
+ title: r.standardAnswer
6501
6640
  }) : null]
6502
6641
  });
6503
6642
  }
6504
- function Tl(e, t, n, r) {
6505
- var i, a;
6506
- let o = (i = t[e]) == null ? "" : i, s = (a = n.answers[e]) == null ? "" : a;
6507
- if (!(!r || !s)) return o ? s === o ? "correct" : "incorrect" : "unanswered";
6508
- }
6509
- function El(e, t) {
6643
+ function Bl(e, t) {
6510
6644
  return Qe(e, t.categories, t.items);
6511
6645
  }
6512
6646
  //#endregion
6513
6647
  //#region src/question/renderers/QuestionRichContentWithBlankView.tsx
6514
- function Dl({ className: e, content: t, renderBlank: n }) {
6648
+ function Vl({ className: e, content: t, renderBlank: n }) {
6515
6649
  let { renderer: r } = K(), i = /* @__PURE__ */ new Map();
6516
6650
  return /* @__PURE__ */ a("div", {
6517
6651
  className: [r["rich-content"], e == null ? "" : e].filter(Boolean).join(" "),
6518
- children: t.json.map((e, t) => Ol(e, {
6652
+ children: t.json.map((e, t) => Hl(e, {
6519
6653
  blankIndexes: i,
6520
6654
  key: `node-${t}`,
6521
6655
  renderBlank: n
6522
6656
  }))
6523
6657
  });
6524
6658
  }
6525
- function Ol(e, t) {
6526
- return typeof e.text == "string" ? /* @__PURE__ */ a(c, { children: e.text }, t.key) : e.type === "blank" ? /* @__PURE__ */ a(c, { children: Al(e, t) }, t.key) : kl(e, t);
6659
+ function Hl(e, t) {
6660
+ return typeof e.text == "string" ? /* @__PURE__ */ a(c, { children: e.text }, t.key) : e.type === "blank" ? /* @__PURE__ */ a(c, { children: Wl(e, t) }, t.key) : Ul(e, t);
6527
6661
  }
6528
- function kl(e, t) {
6662
+ function Ul(e, t) {
6529
6663
  if (e.type === "image" || e.type === "formula") return /* @__PURE__ */ a("span", { dangerouslySetInnerHTML: { __html: r([e]) } }, t.key);
6530
- let n = Ml(e.children, t);
6664
+ let n = Kl(e.children, t);
6531
6665
  switch (e.type) {
6532
- case "heading": return Nl(e, n, t.key);
6666
+ case "heading": return ql(e, n, t.key);
6533
6667
  case "table": return /* @__PURE__ */ a("table", { children: n }, t.key);
6534
6668
  case "table-row": return /* @__PURE__ */ a("tr", { children: n }, t.key);
6535
6669
  case "table-cell": return /* @__PURE__ */ a("td", { children: n }, t.key);
6536
6670
  default: return /* @__PURE__ */ a("p", { children: n }, t.key);
6537
6671
  }
6538
6672
  }
6539
- function Al(e, t) {
6540
- let n = Pl(e.blankId), r = jl(t.blankIndexes, n);
6673
+ function Wl(e, t) {
6674
+ let n = Jl(e.blankId), r = Gl(t.blankIndexes, n);
6541
6675
  return t.renderBlank({
6542
6676
  blankId: n,
6543
6677
  index: r,
6544
- label: Pl(e.label)
6678
+ label: Jl(e.label)
6545
6679
  });
6546
6680
  }
6547
- function jl(e, t) {
6681
+ function Gl(e, t) {
6548
6682
  let n = e.get(t);
6549
6683
  if (n !== void 0) return n;
6550
6684
  let r = e.size;
6551
6685
  return e.set(t, r), r;
6552
6686
  }
6553
- function Ml(e, t) {
6554
- return (e == null ? [] : e).map((e, n) => Ol(e, j(j({}, t), {}, { key: `${t.key}-${n}` })));
6687
+ function Kl(e, t) {
6688
+ return (e == null ? [] : e).map((e, n) => Hl(e, j(j({}, t), {}, { key: `${t.key}-${n}` })));
6555
6689
  }
6556
- function Nl(e, t, n) {
6690
+ function ql(e, t, n) {
6557
6691
  switch (e.level) {
6558
6692
  case 1: return /* @__PURE__ */ a("h1", { children: t }, n);
6559
6693
  case 2: return /* @__PURE__ */ a("h2", { children: t }, n);
@@ -6561,45 +6695,56 @@ function Nl(e, t, n) {
6561
6695
  default: return /* @__PURE__ */ a("p", { children: t }, n);
6562
6696
  }
6563
6697
  }
6564
- function Pl(e) {
6698
+ function Jl(e) {
6565
6699
  return typeof e == "string" ? e : "";
6566
6700
  }
6567
- var Fl = {
6568
- "inline-input": "_inline-input_fv4mf_1",
6569
- "inline-select": "_inline-select_fv4mf_19",
6570
- "inline-blank-underline": "_inline-blank-underline_fv4mf_43",
6571
- "inline-blank-content": "_inline-blank-content_fv4mf_56",
6572
- "shared-candidate-list": "_shared-candidate-list_fv4mf_63",
6573
- "shared-candidate-item": "_shared-candidate-item_fv4mf_72",
6574
- "shared-candidate-content": "_shared-candidate-content_fv4mf_88",
6575
- "per-blank-candidate-options": "_per-blank-candidate-options_fv4mf_94",
6576
- "per-blank-candidate-group": "_per-blank-candidate-group_fv4mf_101",
6577
- "per-blank-candidate-title": "_per-blank-candidate-title_fv4mf_108",
6578
- "per-blank-candidate-list": "_per-blank-candidate-list_fv4mf_127",
6579
- selected: "_selected_fv4mf_149"
6701
+ var Yl = {
6702
+ "inline-answer": "_inline-answer_1lmz2_1",
6703
+ "inline-input": "_inline-input_1lmz2_8",
6704
+ "inline-select": "_inline-select_1lmz2_25",
6705
+ "inline-blank-underline": "_inline-blank-underline_1lmz2_53",
6706
+ "inline-blank-content": "_inline-blank-content_1lmz2_66",
6707
+ "shared-candidate-list": "_shared-candidate-list_1lmz2_73",
6708
+ "shared-candidate-item": "_shared-candidate-item_1lmz2_82",
6709
+ "shared-candidate-content": "_shared-candidate-content_1lmz2_98",
6710
+ "per-blank-candidate-options": "_per-blank-candidate-options_1lmz2_104",
6711
+ "per-blank-candidate-group": "_per-blank-candidate-group_1lmz2_111",
6712
+ "per-blank-candidate-title": "_per-blank-candidate-title_1lmz2_118",
6713
+ "per-blank-candidate-list": "_per-blank-candidate-list_1lmz2_137",
6714
+ selected: "_selected_1lmz2_159"
6580
6715
  };
6581
6716
  //#endregion
6582
6717
  //#region src/question/player/QuestionFillTextContentPlayer.tsx
6583
- function Il({ answers: e, disabled: t, item: n, messages: r, onAnswerChange: i, structure: o }) {
6584
- return /* @__PURE__ */ a(Dl, {
6585
- content: n.content,
6586
- renderBlank: (a) => Ll(a, {
6587
- answers: e,
6588
- blankLabel: r.blankLabel,
6589
- disabled: t,
6590
- item: n,
6591
- onAnswerChange: i,
6592
- structure: o
6593
- })
6718
+ function Xl({ gradingResult: e, answers: t, disabled: n, item: r, messages: i, onAnswerChange: o, structure: s }) {
6719
+ return /* @__PURE__ */ a(Vl, {
6720
+ content: r.content,
6721
+ renderBlank: (c) => {
6722
+ var l;
6723
+ return /* @__PURE__ */ a("span", {
6724
+ className: Yl["inline-answer"],
6725
+ children: /* @__PURE__ */ a(Pl, {
6726
+ unansweredAsWarning: !0,
6727
+ status: e == null || (l = e.blankResults.find((e) => e.blankId === c.blankId)) == null ? void 0 : l.status,
6728
+ children: Zl(c, {
6729
+ answers: t,
6730
+ blankLabel: i.blankLabel,
6731
+ disabled: n,
6732
+ item: r,
6733
+ onAnswerChange: o,
6734
+ structure: s
6735
+ })
6736
+ })
6737
+ });
6738
+ }
6594
6739
  });
6595
6740
  }
6596
- function Ll(e, t) {
6597
- let { blankId: n } = e, r = t.item.blanks.indexOf(n), i = Ul(e.label, t.blankLabel, r);
6741
+ function Zl(e, t) {
6742
+ let { blankId: n } = e, r = t.item.blanks.indexOf(n), i = ru(e.label, t.blankLabel, r);
6598
6743
  if (t.structure.config.candidateMode === "none") {
6599
- let e = zl(t.answers, n);
6744
+ let e = $l(t.answers, n);
6600
6745
  return /* @__PURE__ */ a("input", {
6601
6746
  "aria-label": i,
6602
- className: Fl["inline-input"],
6747
+ className: Yl["inline-input"],
6603
6748
  disabled: t.disabled,
6604
6749
  onChange: (e) => t.onAnswerChange(n, {
6605
6750
  kind: "text",
@@ -6608,23 +6753,23 @@ function Ll(e, t) {
6608
6753
  value: (e == null ? void 0 : e.kind) === "text" ? e.value : ""
6609
6754
  });
6610
6755
  }
6611
- if (t.structure.config.candidateMode === "sharedPool") return Rl(n, i, t);
6612
- let o = zl(t.answers, n), s = Vl(t.item, n, t.structure.config.candidateMode, o);
6756
+ if (t.structure.config.candidateMode === "sharedPool") return Ql(n, i, t);
6757
+ let o = $l(t.answers, n), s = tu(t.item, n, t.structure.config.candidateMode, o);
6613
6758
  return /* @__PURE__ */ a("span", {
6614
6759
  "aria-label": i,
6615
- className: Fl["inline-blank-underline"],
6760
+ className: Yl["inline-blank-underline"],
6616
6761
  children: s ? /* @__PURE__ */ a(J, {
6617
- className: Fl["inline-blank-content"],
6762
+ className: Yl["inline-blank-content"],
6618
6763
  content: s.content
6619
6764
  }) : i
6620
6765
  });
6621
6766
  }
6622
- function Rl(e, t, n) {
6767
+ function Ql(e, t, n) {
6623
6768
  var r, i;
6624
- let s = zl(n.answers, e), c = (r = ((s == null ? void 0 : s.kind) === "option" ? s.optionIds : []).slice(0, 1)[0]) == null ? "" : r, l = Hl(n.answers, e);
6769
+ let s = $l(n.answers, e), c = (r = ((s == null ? void 0 : s.kind) === "option" ? s.optionIds : []).slice(0, 1)[0]) == null ? "" : r, l = nu(n.answers, e);
6625
6770
  return /* @__PURE__ */ o("select", {
6626
6771
  "aria-label": t,
6627
- className: Fl["inline-select"],
6772
+ className: Yl["inline-select"],
6628
6773
  disabled: n.disabled,
6629
6774
  onChange: (t) => n.onAnswerChange(e, {
6630
6775
  kind: "option",
@@ -6639,17 +6784,18 @@ function Rl(e, t, n) {
6639
6784
  value: e.optionId,
6640
6785
  children: [
6641
6786
  un("upperAlpha", t),
6642
- ". ",
6787
+ ".",
6788
+ " ",
6643
6789
  e.content.text
6644
6790
  ]
6645
6791
  }, e.optionId))]
6646
6792
  });
6647
6793
  }
6648
- function zl(e, t) {
6794
+ function $l(e, t) {
6649
6795
  var n;
6650
6796
  return (n = Object.entries(e).find(([e]) => e === t)) == null ? void 0 : n[1];
6651
6797
  }
6652
- function Bl(e, t, n) {
6798
+ function eu(e, t, n) {
6653
6799
  var r, i;
6654
6800
  if (n === "sharedPool") {
6655
6801
  var a;
@@ -6657,72 +6803,73 @@ function Bl(e, t, n) {
6657
6803
  }
6658
6804
  return (r = (i = e.blankOptionGroups) == null || (i = i.find((e) => e.blankId === t)) == null ? void 0 : i.options) == null ? [] : r;
6659
6805
  }
6660
- function Vl(e, t, n, r) {
6806
+ function tu(e, t, n, r) {
6661
6807
  let i = (r == null ? void 0 : r.kind) === "option" ? r.optionIds[0] : void 0;
6662
- if (i) return Bl(e, t, n).find((e) => e.optionId === i);
6808
+ if (i) return eu(e, t, n).find((e) => e.optionId === i);
6663
6809
  }
6664
- function Hl(e, t) {
6810
+ function nu(e, t) {
6665
6811
  let n = /* @__PURE__ */ new Set(), r = Object.entries(e);
6666
6812
  for (let [e, i] of r) if (e !== t && i.kind === "option") for (let e of i.optionIds) n.add(e);
6667
6813
  return n;
6668
6814
  }
6669
- function Ul(e, t, n) {
6815
+ function ru(e, t, n) {
6670
6816
  return e || `${t} ${n + 1}`;
6671
6817
  }
6672
6818
  //#endregion
6673
6819
  //#region src/question/player/QuestionFillTextPlayer.tsx
6674
- function Wl({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
6675
- let u = An(n, t, !0), d = qc(u), f = ic(s, c, t, u.blanks), p = d.map((e, t) => ({
6820
+ function iu({ gradingResult: e, disabled: t, element: n, item: r, messages: i, onChange: s, response: c, responseIndex: l, showAnswer: u }) {
6821
+ let d = An(r, n, !0), f = sl(d), p = ic(c, l, n, d.blanks), m = f.map((e, t) => ({
6676
6822
  kind: "detailed",
6677
6823
  contents: e.contents.map((e, n) => /* @__PURE__ */ a(J, { content: e }, `group-${t}-answer-${n}`)),
6678
- marker: Vc(e.blankIds, u.blanks, r.blankLabel)
6824
+ marker: tl(e.blankIds, d.blanks, i.blankLabel)
6679
6825
  }));
6680
- function m(e, t) {
6681
- i(j(j({}, f), {}, { answers: j(j({}, f.answers), {}, { [e]: t }) }));
6826
+ function h(e, t) {
6827
+ s(j(j({}, p), {}, { answers: j(j({}, p.answers), {}, { [e]: t }) }));
6682
6828
  }
6683
6829
  return /* @__PURE__ */ o("div", {
6684
6830
  className: q["fill-text"],
6685
6831
  children: [
6686
- /* @__PURE__ */ a(Il, {
6687
- answers: f.answers,
6688
- disabled: e,
6689
- item: u,
6690
- messages: r,
6691
- onAnswerChange: m,
6692
- structure: t
6832
+ /* @__PURE__ */ a(Xl, {
6833
+ gradingResult: e,
6834
+ answers: p.answers,
6835
+ disabled: t,
6836
+ item: d,
6837
+ messages: i,
6838
+ onAnswerChange: h,
6839
+ structure: n
6693
6840
  }),
6694
- Gl(u, t.config.candidateMode),
6695
- Kl({
6696
- disabled: e,
6697
- item: u,
6698
- onAnswerChange: m,
6699
- responseItem: f
6841
+ au(d, n.config.candidateMode),
6842
+ ou({
6843
+ disabled: t,
6844
+ item: d,
6845
+ onAnswerChange: h,
6846
+ responseItem: p
6700
6847
  }),
6701
- l ? /* @__PURE__ */ a(Y, {
6702
- groups: p,
6703
- title: r.standardAnswer
6848
+ u ? /* @__PURE__ */ a(Y, {
6849
+ groups: m,
6850
+ title: i.standardAnswer
6704
6851
  }) : null
6705
6852
  ]
6706
6853
  });
6707
6854
  }
6708
- function Gl(e, t) {
6855
+ function au(e, t) {
6709
6856
  var n;
6710
6857
  let r = (n = e.candidateOptions) == null ? [] : n;
6711
6858
  return t !== "sharedPool" || r.length === 0 ? null : /* @__PURE__ */ a("ol", {
6712
- className: Fl["shared-candidate-list"],
6859
+ className: Yl["shared-candidate-list"],
6713
6860
  children: r.map((e, t) => /* @__PURE__ */ o("li", {
6714
- className: Fl["shared-candidate-item"],
6861
+ className: Yl["shared-candidate-item"],
6715
6862
  children: [/* @__PURE__ */ a("span", {
6716
6863
  className: G.marker,
6717
6864
  children: un("upperAlpha", t)
6718
6865
  }), /* @__PURE__ */ a(J, {
6719
- className: Fl["shared-candidate-content"],
6866
+ className: Yl["shared-candidate-content"],
6720
6867
  content: e.content
6721
6868
  })]
6722
6869
  }, e.optionId))
6723
6870
  });
6724
6871
  }
6725
- function Kl({ disabled: e, item: t, onAnswerChange: n, responseItem: r }) {
6872
+ function ou({ disabled: e, item: t, onAnswerChange: n, responseItem: r }) {
6726
6873
  let i = t.blanks.reduce((e, n, r) => {
6727
6874
  var i;
6728
6875
  let a = (i = t.blankOptionGroups) == null ? void 0 : i.find((e) => e.blankId === n);
@@ -6732,8 +6879,8 @@ function Kl({ disabled: e, item: t, onAnswerChange: n, responseItem: r }) {
6732
6879
  }] : e;
6733
6880
  }, []);
6734
6881
  return i.length === 0 ? null : /* @__PURE__ */ a("div", {
6735
- className: Fl["per-blank-candidate-options"],
6736
- children: i.map(({ group: t, marker: i }) => ql({
6882
+ className: Yl["per-blank-candidate-options"],
6883
+ children: i.map(({ group: t, marker: i }) => su({
6737
6884
  disabled: e,
6738
6885
  group: t,
6739
6886
  marker: i,
@@ -6742,17 +6889,17 @@ function Kl({ disabled: e, item: t, onAnswerChange: n, responseItem: r }) {
6742
6889
  }))
6743
6890
  });
6744
6891
  }
6745
- function ql({ disabled: e, group: t, marker: n, onAnswerChange: r, responseItem: i }) {
6892
+ function su({ disabled: e, group: t, marker: n, onAnswerChange: r, responseItem: i }) {
6746
6893
  let s = i.answers[t.blankId];
6747
6894
  return /* @__PURE__ */ o("section", {
6748
6895
  "aria-label": n,
6749
- className: Fl["per-blank-candidate-group"],
6896
+ className: Yl["per-blank-candidate-group"],
6750
6897
  children: [/* @__PURE__ */ a("span", {
6751
- className: Fl["per-blank-candidate-title"],
6898
+ className: Yl["per-blank-candidate-title"],
6752
6899
  children: n
6753
6900
  }), /* @__PURE__ */ a("div", {
6754
- className: Fl["per-blank-candidate-list"],
6755
- children: t.options.map((n, i) => Jl({
6901
+ className: Yl["per-blank-candidate-list"],
6902
+ children: t.options.map((n, i) => cu({
6756
6903
  activeAnswer: s,
6757
6904
  blankId: t.blankId,
6758
6905
  disabled: e,
@@ -6763,11 +6910,11 @@ function ql({ disabled: e, group: t, marker: n, onAnswerChange: r, responseItem:
6763
6910
  })]
6764
6911
  }, t.blankId);
6765
6912
  }
6766
- function Jl({ activeAnswer: e, blankId: t, disabled: n, onAnswerChange: r, option: i, optionIndex: s }) {
6913
+ function cu({ activeAnswer: e, blankId: t, disabled: n, onAnswerChange: r, option: i, optionIndex: s }) {
6767
6914
  let c = (e == null ? void 0 : e.kind) === "option" && e.optionIds.includes(i.optionId);
6768
6915
  return /* @__PURE__ */ o("button", {
6769
6916
  "aria-pressed": c,
6770
- className: c ? Fl.selected : void 0,
6917
+ className: c ? Yl.selected : void 0,
6771
6918
  "data-selected": c ? "true" : void 0,
6772
6919
  disabled: n,
6773
6920
  onClick: () => r(t, gc(e, i.optionId, "single")),
@@ -6779,58 +6926,61 @@ function Jl({ activeAnswer: e, blankId: t, disabled: n, onAnswerChange: r, optio
6779
6926
  }, i.optionId);
6780
6927
  }
6781
6928
  var X = {
6782
- "choice-button": "_choice-button_3nny2_1",
6783
- "table-row-button": "_table-row-button_3nny2_2",
6784
- "judgement-button": "_judgement-button_3nny2_28",
6785
- "ordering-controls": "_ordering-controls_3nny2_43",
6786
- "ordering-button": "_ordering-button_3nny2_51",
6787
- "choice-option": "_choice-option_3nny2_68",
6788
- "table-choice-row": "_table-choice-row_3nny2_73",
6789
- "judgement-option": "_judgement-option_3nny2_77",
6790
- selected: "_selected_3nny2_81",
6791
- "option-marker": "_option-marker_3nny2_86",
6792
- "table-option-marker": "_table-option-marker_3nny2_87"
6929
+ "choice-button": "_choice-button_1twvo_1",
6930
+ "table-row-button": "_table-row-button_1twvo_2",
6931
+ "judgement-button": "_judgement-button_1twvo_28",
6932
+ "ordering-controls": "_ordering-controls_1twvo_44",
6933
+ "ordering-button": "_ordering-button_1twvo_52",
6934
+ "choice-option": "_choice-option_1twvo_69",
6935
+ "table-choice-row": "_table-choice-row_1twvo_73",
6936
+ "judgement-option": "_judgement-option_1twvo_79",
6937
+ selected: "_selected_1twvo_83",
6938
+ "option-marker": "_option-marker_1twvo_88",
6939
+ "table-option-marker": "_table-option-marker_1twvo_89",
6940
+ "missed-answer": "_missed-answer_1twvo_153"
6793
6941
  };
6794
6942
  //#endregion
6795
6943
  //#region src/question/player/QuestionJudgementGroupPlayer.tsx
6796
- function Yl({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
6797
- let u = oc(s, c), d = mn(t.config.judgeAnswerMode), f = [{
6944
+ function lu({ gradingResult: e, disabled: t, element: n, item: r, messages: i, onChange: s, response: c, responseIndex: l, showAnswer: u }) {
6945
+ let d = oc(c, l), f = mn(n.config.judgeAnswerMode), p = [{
6798
6946
  kind: "detailed",
6799
- contents: hn(t.config.judgeAnswerMode, n.answers),
6947
+ contents: hn(n.config.judgeAnswerMode, r.answers),
6800
6948
  marker: ""
6801
6949
  }];
6802
- function p(e) {
6803
- i(j(j({}, u), {}, { selectedValues: u.selectedValues[0] === e ? [] : [e] }));
6950
+ function m(e) {
6951
+ s(j(j({}, d), {}, { selectedValues: d.selectedValues[0] === e ? [] : [e] }));
6804
6952
  }
6805
6953
  return /* @__PURE__ */ o("div", {
6806
6954
  className: G.element,
6807
6955
  children: [/* @__PURE__ */ a("ol", {
6808
6956
  className: U(G["judgement-list"], X["judgement-list"]),
6809
- children: d.map(({ label: t, value: n }) => {
6810
- let r = u.selectedValues[0] === n;
6957
+ children: f.map(({ label: n, value: r }) => {
6958
+ var s;
6959
+ let c = d.selectedValues[0] === r, l = e == null || (s = e.optionResults.find((e) => e.value === r)) == null ? void 0 : s.status;
6811
6960
  return /* @__PURE__ */ a("li", {
6812
- className: U(G["judgement-item"], X["judgement-option"], r && X.selected),
6813
- "data-selected": r ? "true" : void 0,
6814
- children: /* @__PURE__ */ a("button", {
6815
- "aria-pressed": r,
6961
+ className: U(G["judgement-item"], X["judgement-option"], c && X.selected, Qc(l)),
6962
+ "data-selected": c ? "true" : void 0,
6963
+ children: /* @__PURE__ */ o("button", {
6964
+ "aria-pressed": c,
6965
+ "aria-description": !c && l === "correct" ? i.standardAnswer : void 0,
6816
6966
  className: X["judgement-button"],
6817
- disabled: e,
6818
- onClick: () => p(n),
6967
+ disabled: t,
6968
+ onClick: () => m(r),
6819
6969
  type: "button",
6820
- children: t
6970
+ children: [n, c ? /* @__PURE__ */ a(Pl, { status: l }) : null]
6821
6971
  })
6822
- }, String(n));
6972
+ }, String(r));
6823
6973
  })
6824
- }), l ? /* @__PURE__ */ a(Y, {
6825
- groups: f,
6826
- title: r.standardAnswer
6974
+ }), u ? /* @__PURE__ */ a(Y, {
6975
+ groups: p,
6976
+ title: i.standardAnswer
6827
6977
  }) : null]
6828
6978
  });
6829
6979
  }
6830
6980
  //#endregion
6831
6981
  //#region src/question/renderers/lineConnectAnswers.tsx
6832
- function Xl(e) {
6833
- let t = Zl(e);
6982
+ function uu(e) {
6983
+ let t = du(e);
6834
6984
  return e.columns.reduce((n, r, i) => {
6835
6985
  let o = r.items.map((n, o) => {
6836
6986
  var s;
@@ -6846,7 +6996,7 @@ function Xl(e) {
6846
6996
  return [...n, ...o];
6847
6997
  }, []);
6848
6998
  }
6849
- function Zl(e) {
6999
+ function du(e) {
6850
7000
  return e.columns.reduce((e, t, n) => (t.items.forEach((t) => e.set(t.itemId, {
6851
7001
  columnIndex: n,
6852
7002
  item: t
@@ -6854,18 +7004,18 @@ function Zl(e) {
6854
7004
  }
6855
7005
  //#endregion
6856
7006
  //#region src/question/player/QuestionLineConnectPlayer.tsx
6857
- function Ql({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
6858
- let [l, d] = h(null), [g, _] = h(null), v = m(null), y = m(/* @__PURE__ */ new Map()), b = cc(i, s), x = { gridTemplateColumns: `repeat(${t.columns.length}, minmax(12rem, 1fr))` }, S = p(() => oo(t, b.connections), [t, b.connections]), C = p(() => JSON.stringify({
6859
- columns: t.columns.map((e) => e.items.map((e) => e.itemId)),
6860
- connections: b.connections
6861
- }), [t.columns, b.connections]), w = u(() => {
6862
- let e = v.current;
6863
- if (!e || S.length === 0) {
6864
- _(null);
7007
+ function fu({ gradingResult: e, disabled: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
7008
+ let [d, g] = h(null), [_, v] = h(null), y = m(null), b = m(/* @__PURE__ */ new Map()), x = cc(s, c), S = { gridTemplateColumns: `repeat(${n.columns.length}, fit-content(16rem))` }, C = p(() => oo(n, x.connections), [n, x.connections]), w = p(() => JSON.stringify({
7009
+ columns: n.columns.map((e) => e.items.map((e) => e.itemId)),
7010
+ connections: x.connections
7011
+ }), [n.columns, x.connections]), T = u(() => {
7012
+ let e = y.current;
7013
+ if (!e || C.length === 0) {
7014
+ v(null);
6865
7015
  return;
6866
7016
  }
6867
- let t = e.getBoundingClientRect(), n = S.reduce((n, r) => {
6868
- let i = y.current.get(r.fromItemId), a = y.current.get(r.toItemId);
7017
+ let t = e.getBoundingClientRect(), n = C.reduce((n, r) => {
7018
+ let i = b.current.get(r.fromItemId), a = b.current.get(r.toItemId);
6869
7019
  if (!i || !a) return n;
6870
7020
  let o = i.getBoundingClientRect(), s = a.getBoundingClientRect();
6871
7021
  return [...n, {
@@ -6876,41 +7026,41 @@ function Ql({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
6876
7026
  y2: co(s, t, e.scrollTop)
6877
7027
  }];
6878
7028
  }, []);
6879
- fo(_, {
7029
+ fo(v, {
6880
7030
  height: e.scrollHeight,
6881
7031
  lines: n,
6882
7032
  width: e.scrollWidth
6883
7033
  });
6884
- }, [S]);
7034
+ }, [C]);
6885
7035
  f(() => {
6886
- w();
6887
- let e = v.current;
7036
+ T();
7037
+ let e = y.current;
6888
7038
  if (!e) return;
6889
- if (typeof ResizeObserver > "u") return window.addEventListener("resize", w), () => window.removeEventListener("resize", w);
6890
- let t = new ResizeObserver(() => w());
6891
- return t.observe(e), y.current.forEach((e) => t.observe(e)), () => t.disconnect();
6892
- }, [C, w]);
6893
- function T(e) {
7039
+ if (typeof ResizeObserver > "u") return window.addEventListener("resize", T), () => window.removeEventListener("resize", T);
7040
+ let t = new ResizeObserver(() => T());
7041
+ return t.observe(e), b.current.forEach((e) => t.observe(e)), () => t.disconnect();
7042
+ }, [w, T]);
7043
+ function E(e) {
6894
7044
  return (t) => {
6895
7045
  if (t) {
6896
- y.current.set(e, t);
7046
+ b.current.set(e, t);
6897
7047
  return;
6898
7048
  }
6899
- y.current.delete(e);
7049
+ b.current.delete(e);
6900
7050
  };
6901
7051
  }
6902
- function E(t, n) {
6903
- if (e) return;
6904
- let i = l ? rt(l, {
6905
- columnIndex: t,
7052
+ function D(e, n) {
7053
+ if (t) return;
7054
+ let r = d ? rt(d, {
7055
+ columnIndex: e,
6906
7056
  itemId: n
6907
7057
  }) : null;
6908
- if (i) {
6909
- r(j(j({}, b), {}, { connections: _c(b.connections, i.fromItemId, i.toItemId) })), d(null);
7058
+ if (r) {
7059
+ i(j(j({}, x), {}, { connections: _c(x.connections, r.fromItemId, r.toItemId) })), g(null);
6910
7060
  return;
6911
7061
  }
6912
- d({
6913
- columnIndex: t,
7062
+ g({
7063
+ columnIndex: e,
6914
7064
  itemId: n
6915
7065
  });
6916
7066
  }
@@ -6919,71 +7069,69 @@ function Ql({ disabled: e, item: t, messages: n, onChange: r, response: i, respo
6919
7069
  children: [/* @__PURE__ */ o("div", {
6920
7070
  className: V.board,
6921
7071
  "data-testid": "line-connect-player-board",
6922
- ref: v,
6923
- children: [g ? /* @__PURE__ */ a("svg", {
7072
+ ref: y,
7073
+ children: [_ ? /* @__PURE__ */ a("svg", {
6924
7074
  "aria-hidden": "true",
6925
7075
  className: V.lines,
6926
7076
  "data-testid": "line-connect-player-lines",
6927
7077
  style: {
6928
- height: `${g.height}px`,
6929
- width: `${g.width}px`
7078
+ height: `${_.height}px`,
7079
+ width: `${_.width}px`
6930
7080
  },
6931
- viewBox: `0 0 ${g.width} ${g.height}`,
6932
- children: g.lines.map((e) => /* @__PURE__ */ a("line", {
6933
- className: V.line,
6934
- x1: e.x1,
6935
- x2: e.x2,
6936
- y1: e.y1,
6937
- y2: e.y2
6938
- }, e.key))
7081
+ viewBox: `0 0 ${_.width} ${_.height}`,
7082
+ children: _.lines.map((t) => {
7083
+ var n;
7084
+ let r = C.find((e) => e.key === t.key), i = e == null || (n = e.connectionResults.find((e) => e.fromItemId === (r == null ? void 0 : r.fromItemId) && e.toItemId === (r == null ? void 0 : r.toItemId))) == null ? void 0 : n.status;
7085
+ return /* @__PURE__ */ a("line", {
7086
+ className: U(V.line, Xc.line, Qc(i)),
7087
+ "data-grading-status": i,
7088
+ x1: t.x1,
7089
+ x2: t.x2,
7090
+ y1: t.y1,
7091
+ y2: t.y2
7092
+ }, t.key);
7093
+ })
6939
7094
  }) : null, /* @__PURE__ */ a("div", {
6940
- className: V.columns,
6941
- style: x,
6942
- children: t.columns.map((t, r) => /* @__PURE__ */ o("section", {
7095
+ className: U(V.columns, V["player-columns"]),
7096
+ style: S,
7097
+ children: n.columns.map((n, r) => /* @__PURE__ */ a("section", {
6943
7098
  className: V.column,
6944
- children: [/* @__PURE__ */ o("span", {
6945
- className: V["column-title"],
6946
- children: [
6947
- n.tableColumn,
6948
- " ",
6949
- r + 1
6950
- ]
6951
- }), t.items.map((n, i) => {
6952
- let s = dn(t.labelStyle, i), c = (l == null ? void 0 : l.itemId) === n.itemId;
7099
+ children: n.items.map((i, s) => {
7100
+ let c = dn(n.labelStyle, s), l = !e && (d == null ? void 0 : d.itemId) === i.itemId;
6953
7101
  return /* @__PURE__ */ a("div", {
6954
- className: U(V.item, c && V.selected),
6955
- "data-selected": c ? "true" : void 0,
6956
- "data-testid": `line-connect-player-item-${n.itemId}`,
6957
- ref: T(n.itemId),
7102
+ className: U(V.item, l && V.selected),
7103
+ "data-selected": l ? "true" : void 0,
7104
+ "data-testid": `line-connect-player-item-${i.itemId}`,
7105
+ ref: E(i.itemId),
6958
7106
  children: /* @__PURE__ */ o("button", {
6959
- "aria-pressed": c,
7107
+ "aria-pressed": l,
6960
7108
  className: V.button,
6961
- disabled: e,
6962
- onClick: () => E(r, n.itemId),
7109
+ disabled: t,
7110
+ onClick: () => D(r, i.itemId),
6963
7111
  type: "button",
6964
- children: [s ? /* @__PURE__ */ a("span", {
7112
+ children: [c ? /* @__PURE__ */ a("span", {
6965
7113
  className: V.marker,
6966
- children: s
6967
- }) : null, /* @__PURE__ */ a(J, { content: n.content })]
7114
+ children: c
7115
+ }) : null, /* @__PURE__ */ a(J, { content: i.content })]
6968
7116
  })
6969
- }, n.itemId);
6970
- })]
6971
- }, t.columnId))
7117
+ }, i.itemId);
7118
+ })
7119
+ }, n.columnId))
6972
7120
  })]
6973
- }), c ? /* @__PURE__ */ a(Y, {
6974
- groups: Xl(t),
6975
- title: n.standardAnswer
7121
+ }), l ? /* @__PURE__ */ a(Y, {
7122
+ groups: uu(n),
7123
+ title: r.standardAnswer
6976
7124
  }) : null]
6977
7125
  });
6978
7126
  }
6979
- var $l = {
7127
+ var pu = {
6980
7128
  path: "_path_11o60_1",
6981
7129
  endpoint: "_endpoint_11o60_7",
6982
7130
  separator: "_separator_11o60_8"
6983
7131
  };
6984
7132
  //#endregion
6985
7133
  //#region src/question/renderers/matchingAnswers.tsx
6986
- function eu(e) {
7134
+ function mu(e) {
6987
7135
  var t, n;
6988
7136
  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);
6989
7137
  return ((n = r == null ? void 0 : r.items) == null ? [] : n).map((t, n) => {
@@ -6998,7 +7146,7 @@ function eu(e) {
6998
7146
  };
6999
7147
  });
7000
7148
  }
7001
- function tu(e) {
7149
+ function hu(e) {
7002
7150
  var t, n;
7003
7151
  let r = e.columns[0], i = e.columns[1], s = new Map((t = i == null ? void 0 : i.items.map((e, t) => [e.itemId, {
7004
7152
  item: e,
@@ -7009,19 +7157,19 @@ function tu(e) {
7009
7157
  let u = (c = e.answers[t.itemId]) == null ? void 0 : c[0], d = u ? s.get(u) : void 0;
7010
7158
  return {
7011
7159
  contents: d && i ? [/* @__PURE__ */ o("div", {
7012
- className: $l.path,
7160
+ className: pu.path,
7013
7161
  children: [
7014
7162
  /* @__PURE__ */ a("span", {
7015
- className: $l.endpoint,
7016
- children: nu(r, t, n)
7163
+ className: pu.endpoint,
7164
+ children: gu(r, t, n)
7017
7165
  }),
7018
7166
  /* @__PURE__ */ a("span", {
7019
- className: $l.separator,
7167
+ className: pu.separator,
7020
7168
  children: "-"
7021
7169
  }),
7022
7170
  /* @__PURE__ */ a("span", {
7023
- className: $l.endpoint,
7024
- children: nu(i, d.item, d.itemIndex)
7171
+ className: pu.endpoint,
7172
+ children: gu(i, d.item, d.itemIndex)
7025
7173
  })
7026
7174
  ]
7027
7175
  }, `${t.itemId}-${d.item.itemId}`)] : [],
@@ -7030,82 +7178,92 @@ function tu(e) {
7030
7178
  };
7031
7179
  });
7032
7180
  }
7033
- function nu(e, t, n) {
7181
+ function gu(e, t, n) {
7034
7182
  return fn(e.labelStyle, n) || /* @__PURE__ */ a(J, { content: t.content });
7035
7183
  }
7036
- var ru = {
7037
- board: "_board_1q6ar_1",
7038
- "matched-rows": "_matched-rows_1q6ar_6",
7039
- "matched-row": "_matched-row_1q6ar_6",
7040
- columns: "_columns_1q6ar_18",
7041
- column: "_column_1q6ar_18",
7042
- item: "_item_1q6ar_30",
7043
- selected: "_selected_1q6ar_57",
7044
- matched: "_matched_1q6ar_6",
7045
- marker: "_marker_1q6ar_66"
7184
+ var _u = {
7185
+ board: "_board_1j0zm_1",
7186
+ "matched-rows": "_matched-rows_1j0zm_6",
7187
+ "matched-row": "_matched-row_1j0zm_6",
7188
+ columns: "_columns_1j0zm_24",
7189
+ column: "_column_1j0zm_24",
7190
+ item: "_item_1j0zm_36",
7191
+ "unanswered-item": "_unanswered-item_1j0zm_59",
7192
+ selected: "_selected_1j0zm_70",
7193
+ matched: "_matched_1j0zm_6",
7194
+ marker: "_marker_1j0zm_79"
7046
7195
  };
7047
7196
  //#endregion
7048
7197
  //#region src/question/player/QuestionMatchingPlayer.tsx
7049
- function iu({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
7050
- let [l, u] = h(null), d = lc(i, s), f = au(t, d.connections);
7051
- function p(t, n) {
7052
- if (e) return;
7053
- let i = l ? ht(l, {
7054
- columnIndex: t,
7198
+ function vu({ gradingResult: e, disabled: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
7199
+ let [u, d] = h(null), f = lc(s, c), p = yu(n, f.connections);
7200
+ function m(e, n) {
7201
+ if (t) return;
7202
+ let r = u ? ht(u, {
7203
+ columnIndex: e,
7055
7204
  itemId: n
7056
7205
  }) : null;
7057
- if (i) {
7058
- r(j(j({}, d), {}, { connections: vc(d.connections, i.fromItemId, i.toItemId) })), u(null);
7206
+ if (r) {
7207
+ i(j(j({}, f), {}, { connections: vc(f.connections, r.fromItemId, r.toItemId) })), d(null);
7059
7208
  return;
7060
7209
  }
7061
- u((l == null ? void 0 : l.itemId) === n ? null : {
7062
- columnIndex: t,
7210
+ d((u == null ? void 0 : u.itemId) === n ? null : {
7211
+ columnIndex: e,
7063
7212
  itemId: n
7064
7213
  });
7065
7214
  }
7066
- function m(t, n) {
7067
- let r = (l == null ? void 0 : l.itemId) === t.item.itemId;
7215
+ let g = new Map(e == null ? void 0 : e.itemResults.map((e) => [e.itemId, e.status]));
7216
+ function _(e, n) {
7217
+ let r = (u == null ? void 0 : u.itemId) === e.item.itemId, i = g.get(e.item.itemId);
7068
7218
  return /* @__PURE__ */ o("button", {
7069
7219
  "aria-pressed": r,
7070
- className: U(ru.item, r && ru.selected, n && ru.matched),
7071
- "data-testid": `matching-player-item-${t.item.itemId}`,
7072
- disabled: e,
7073
- onClick: () => p(t.columnIndex, t.item.itemId),
7220
+ className: U(_u.item, r && _u.selected, n && _u.matched, !n && Qc(i), !n && i === "unanswered" && _u["unanswered-item"]),
7221
+ "data-testid": `matching-player-item-${e.item.itemId}`,
7222
+ disabled: t,
7223
+ onClick: () => m(e.columnIndex, e.item.itemId),
7074
7224
  type: "button",
7075
- children: [t.marker ? /* @__PURE__ */ a("span", {
7076
- className: ru.marker,
7077
- children: t.marker
7078
- }) : null, /* @__PURE__ */ a(J, { content: t.item.content })]
7079
- }, t.item.itemId);
7225
+ children: [e.marker ? /* @__PURE__ */ a("span", {
7226
+ className: _u.marker,
7227
+ children: e.marker
7228
+ }) : null, /* @__PURE__ */ a(J, { content: e.item.content })]
7229
+ }, e.item.itemId);
7080
7230
  }
7081
7231
  return /* @__PURE__ */ o("div", {
7082
7232
  className: G.element,
7083
7233
  children: [/* @__PURE__ */ o("div", {
7084
- className: ru.board,
7085
- children: [f.rows.length > 0 ? /* @__PURE__ */ a("div", {
7086
- className: ru["matched-rows"],
7087
- children: f.rows.map((e) => /* @__PURE__ */ o("div", {
7088
- className: ru["matched-row"],
7089
- "data-testid": `matching-player-row-${e.from.item.itemId}-${e.to.item.itemId}`,
7090
- children: [m(e.from, !0), m(e.to, !0)]
7091
- }, `${e.from.item.itemId}-${e.to.item.itemId}`))
7092
- }) : null, f.unmatchedColumns.some((e) => e.length > 0) ? /* @__PURE__ */ a("div", {
7093
- className: ru.columns,
7094
- children: f.unmatchedColumns.map((e, n) => {
7234
+ className: _u.board,
7235
+ children: [p.rows.length > 0 ? /* @__PURE__ */ a("div", {
7236
+ className: _u["matched-rows"],
7237
+ children: p.rows.map((t) => {
7238
+ var n;
7239
+ let r = e == null || (n = e.connectionResults.find((e) => e.fromItemId === t.from.item.itemId && e.toItemId === t.to.item.itemId)) == null ? void 0 : n.status;
7240
+ return /* @__PURE__ */ o("div", {
7241
+ className: U(_u["matched-row"], Qc(r)),
7242
+ "data-testid": `matching-player-row-${t.from.item.itemId}-${t.to.item.itemId}`,
7243
+ children: [
7244
+ _(t.from, !0),
7245
+ _(t.to, !0),
7246
+ /* @__PURE__ */ a(Pl, { status: r })
7247
+ ]
7248
+ }, `${t.from.item.itemId}-${t.to.item.itemId}`);
7249
+ })
7250
+ }) : null, p.unmatchedColumns.some((e) => e.length > 0) ? /* @__PURE__ */ a("div", {
7251
+ className: _u.columns,
7252
+ children: p.unmatchedColumns.map((e, t) => {
7095
7253
  var r, i;
7096
7254
  return /* @__PURE__ */ a("section", {
7097
- className: ru.column,
7098
- children: e.map((e) => m(e, !1))
7099
- }, (r = (i = t.columns[n]) == null ? void 0 : i.columnId) == null ? n : r);
7255
+ className: _u.column,
7256
+ children: e.map((e) => _(e, !1))
7257
+ }, (r = (i = n.columns[t]) == null ? void 0 : i.columnId) == null ? t : r);
7100
7258
  })
7101
7259
  }) : null]
7102
- }), c ? /* @__PURE__ */ a(Y, {
7103
- groups: eu(t),
7104
- title: n.standardAnswer
7260
+ }), l ? /* @__PURE__ */ a(Y, {
7261
+ groups: mu(n),
7262
+ title: r.standardAnswer
7105
7263
  }) : null]
7106
7264
  });
7107
7265
  }
7108
- function au(e, t) {
7266
+ function yu(e, t) {
7109
7267
  var n;
7110
7268
  let r = e.columns.map((e, t) => e.items.map((n, r) => ({
7111
7269
  columnIndex: t,
@@ -7126,7 +7284,7 @@ function au(e, t) {
7126
7284
  }
7127
7285
  //#endregion
7128
7286
  //#region src/question/renderers/optionGroupAnswers.tsx
7129
- function ou(e, t) {
7287
+ function bu(e, t) {
7130
7288
  return _n(t, e.config.optionLabelStyle).map((e) => ({
7131
7289
  kind: "markerOnly",
7132
7290
  marker: e.marker
@@ -7134,22 +7292,22 @@ function ou(e, t) {
7134
7292
  }
7135
7293
  //#endregion
7136
7294
  //#region src/question/renderers/question-option-grid.ts
7137
- function su({ availableWidth: e, columnGap: t, optionCount: n, widestOptionWidth: r }) {
7295
+ function xu({ availableWidth: e, columnGap: t, optionCount: n, widestOptionWidth: r }) {
7138
7296
  let i = Math.max(1, Math.trunc(n));
7139
7297
  if (e <= 0 || r <= 0) return 1;
7140
7298
  for (let n = i; n >= 2; --n) if (i % n === 0 && (e - Math.max(0, t) * (n - 1)) / n >= r) return n;
7141
7299
  return 1;
7142
7300
  }
7143
- var cu = { list: "_list_1xo1n_1" }, lu = {
7301
+ var Su = { list: "_list_1xo1n_1" }, Cu = {
7144
7302
  table: "_table_p4zkf_1",
7145
7303
  cell: "_cell_p4zkf_7"
7146
7304
  };
7147
7305
  //#endregion
7148
7306
  //#region src/question/renderers/QuestionColumnLayout.tsx
7149
- function uu({ children: e, className: t, columnCount: n, dataAttributes: r, layoutRef: i, role: c, style: l }) {
7307
+ function wu({ children: e, className: t, columnCount: n, dataAttributes: r, layoutRef: i, role: c, style: l }) {
7150
7308
  let { columnLayout: u, systemListMarkup: d } = W(), f = Math.max(1, Math.floor(n));
7151
7309
  if (u === "document-table") {
7152
- let n = du(s.toArray(e), f), l = `${100 / f}%`, u = t ? `${lu.table} ${t}` : lu.table;
7310
+ let n = Tu(s.toArray(e), f), l = `${100 / f}%`, u = t ? `${Cu.table} ${t}` : Cu.table;
7153
7311
  return /* @__PURE__ */ o("table", j(j({}, r), {}, {
7154
7312
  className: u,
7155
7313
  "data-column-count": f,
@@ -7160,7 +7318,7 @@ function uu({ children: e, className: t, columnCount: n, dataAttributes: r, layo
7160
7318
  let r = e.slice(n, n + 1)[0];
7161
7319
  return /* @__PURE__ */ a("td", {
7162
7320
  "aria-hidden": r ? void 0 : "true",
7163
- className: lu.cell,
7321
+ className: Cu.cell,
7164
7322
  children: r == null ? null : r
7165
7323
  }, `cell-${n}`);
7166
7324
  }) }, `row-${t}`)) })]
@@ -7181,18 +7339,18 @@ function uu({ children: e, className: t, columnCount: n, dataAttributes: r, layo
7181
7339
  children: e
7182
7340
  }));
7183
7341
  }
7184
- function du(e, t) {
7342
+ function Tu(e, t) {
7185
7343
  return Array.from({ length: Math.ceil(e.length / t) }, (n, r) => e.slice(r * t, (r + 1) * t));
7186
7344
  }
7187
7345
  //#endregion
7188
7346
  //#region src/question/renderers/QuestionAdaptiveOptionList.tsx
7189
- function fu({ children: e }) {
7347
+ function Eu({ children: e }) {
7190
7348
  let { renderer: t } = K(), n = m(null), [r, i] = h(1), o = { gridTemplateColumns: `repeat(${r}, minmax(0, 1fr))` };
7191
7349
  return f(() => {
7192
7350
  if (!n.current) return;
7193
7351
  let t = n.current, r = null;
7194
7352
  function a() {
7195
- let n = t.getBoundingClientRect().width, r = Number.parseFloat(getComputedStyle(t).columnGap) || 0, a = pu(t), o = su({
7353
+ let n = t.getBoundingClientRect().width, r = Number.parseFloat(getComputedStyle(t).columnGap) || 0, a = Du(t), o = xu({
7196
7354
  availableWidth: n,
7197
7355
  columnGap: r,
7198
7356
  optionCount: s.count(e),
@@ -7210,8 +7368,8 @@ function fu({ children: e }) {
7210
7368
  return c.observe(t), () => {
7211
7369
  r !== null && cancelAnimationFrame(r), t.removeEventListener("load", o, !0), c.disconnect();
7212
7370
  };
7213
- }), /* @__PURE__ */ a(uu, {
7214
- className: `${t["option-list"]} ${cu.list}`,
7371
+ }), /* @__PURE__ */ a(wu, {
7372
+ className: `${t["option-list"]} ${Su.list}`,
7215
7373
  columnCount: r,
7216
7374
  dataAttributes: { "data-question-option-grid": "true" },
7217
7375
  layoutRef: (e) => {
@@ -7222,8 +7380,8 @@ function fu({ children: e }) {
7222
7380
  children: e
7223
7381
  });
7224
7382
  }
7225
- function pu(e) {
7226
- let t = e.parentElement, n = mu(e);
7383
+ function Du(e) {
7384
+ let t = e.parentElement, n = Ou(e);
7227
7385
  if (!t || n.length === 0) return 0;
7228
7386
  let r = e.ownerDocument.createElement("div");
7229
7387
  r.className = e.className, r.setAttribute("aria-hidden", "true"), r.setAttribute("data-question-option-measurement", "true"), Object.assign(r.style, {
@@ -7241,91 +7399,120 @@ function pu(e) {
7241
7399
  let i = r.getBoundingClientRect().width;
7242
7400
  return r.remove(), i;
7243
7401
  }
7244
- function mu(e) {
7402
+ function Ou(e) {
7245
7403
  return e instanceof HTMLTableElement ? Array.from(e.rows).reduce((e, t) => [...e, ...Array.from(t.cells).reduce((e, t) => t.firstElementChild ? [...e, t.firstElementChild] : e, [])], []) : Array.from(e.children);
7246
7404
  }
7247
7405
  //#endregion
7248
7406
  //#region src/question/player/QuestionOptionGroupPlayer.tsx
7249
- function hu({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
7250
- let u = nc(s, c), d = gn(n, t.config.optionLabelStyle);
7251
- function f(e) {
7252
- i(j(j({}, u), {}, { selectedOptionIds: hc(u.selectedOptionIds, e, t.config.selectionType) }));
7407
+ var ku = [
7408
+ "selected",
7409
+ "status",
7410
+ "missed",
7411
+ "description"
7412
+ ], Au = [
7413
+ "selected",
7414
+ "status",
7415
+ "missed",
7416
+ "description"
7417
+ ];
7418
+ function ju({ gradingResult: e, disabled: t, element: n, item: r, messages: i, onChange: s, response: c, responseIndex: l, showAnswer: u }) {
7419
+ let d = nc(c, l), f = gn(r, n.config.optionLabelStyle).map((t) => {
7420
+ var r;
7421
+ let a = d.selectedOptionIds.includes(t.optionId), o = e == null || (r = e.optionResults.find((e) => e.optionId === t.optionId)) == null ? void 0 : r.status;
7422
+ return j(j({}, t), {}, {
7423
+ selected: a,
7424
+ status: o,
7425
+ missed: n.config.selectionType === "multiple" && !a && o === "correct",
7426
+ description: !a && o === "correct" ? i.standardAnswer : void 0
7427
+ });
7428
+ });
7429
+ function p(e) {
7430
+ s(j(j({}, d), {}, { selectedOptionIds: hc(d.selectedOptionIds, e, n.config.selectionType) }));
7253
7431
  }
7254
- if (t.config.renderer === "table") {
7255
- let i = ou(t, n);
7432
+ if (n.config.renderer === "table") {
7433
+ let s = bu(n, r);
7256
7434
  return /* @__PURE__ */ o("div", {
7257
7435
  className: G.element,
7258
7436
  children: [/* @__PURE__ */ a("div", {
7259
- className: ml["table-wrap"],
7437
+ className: Ol["table-wrap"],
7260
7438
  children: /* @__PURE__ */ o("table", {
7261
- className: ml.table,
7439
+ className: Ol.table,
7262
7440
  children: [
7263
- /* @__PURE__ */ o("colgroup", { children: [/* @__PURE__ */ a("col", { className: ml["table-option-column"] }), n.columns.map((e) => /* @__PURE__ */ a("col", {}, e.id))] }),
7264
- /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ o("tr", { children: [/* @__PURE__ */ a("th", { children: r.option }), n.columns.map((e) => /* @__PURE__ */ a("th", { children: /* @__PURE__ */ a(J, { content: e.content }) }, e.id))] }) }),
7265
- /* @__PURE__ */ a("tbody", { children: d.map((t) => {
7266
- let n = u.selectedOptionIds.includes(t.optionId);
7441
+ /* @__PURE__ */ o("colgroup", { children: [/* @__PURE__ */ a("col", { className: Ol["table-option-column"] }), r.columns.map((e) => /* @__PURE__ */ a("col", {}, e.id))] }),
7442
+ /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ o("tr", { children: [/* @__PURE__ */ a("th", { children: i.option }), r.columns.map((e) => /* @__PURE__ */ a("th", { children: /* @__PURE__ */ a(J, { content: e.content }) }, e.id))] }) }),
7443
+ /* @__PURE__ */ a("tbody", { children: f.map((n) => {
7444
+ let { selected: r, status: i, missed: s, description: c } = n, l = Oa(n, ku);
7267
7445
  return /* @__PURE__ */ o("tr", {
7268
- className: X["table-choice-row"],
7269
- "data-selected": n ? "true" : void 0,
7270
- children: [/* @__PURE__ */ a("td", { children: /* @__PURE__ */ a("button", {
7446
+ className: U(X["table-choice-row"], Qc(i), s && X["missed-answer"]),
7447
+ "data-graded": !!e,
7448
+ "data-selected": r ? "true" : void 0,
7449
+ children: [/* @__PURE__ */ a("td", { children: /* @__PURE__ */ o("button", {
7271
7450
  className: X["table-row-button"],
7272
- disabled: e,
7273
- "aria-pressed": n,
7274
- onClick: () => f(t.optionId),
7451
+ disabled: t,
7452
+ "aria-pressed": r,
7453
+ "aria-description": c,
7454
+ onClick: () => p(l.optionId),
7275
7455
  type: "button",
7276
- children: /* @__PURE__ */ a("span", {
7456
+ children: [/* @__PURE__ */ a("span", {
7277
7457
  className: U(G.marker, X["table-option-marker"]),
7278
- "data-selected": n ? "true" : void 0,
7279
- children: t.marker
7280
- })
7281
- }) }), t.cells.map((r, i) => /* @__PURE__ */ a("td", { children: /* @__PURE__ */ a("button", {
7458
+ "data-selected": r ? "true" : void 0,
7459
+ children: l.marker
7460
+ }), r ? /* @__PURE__ */ a(Pl, { status: i }) : null]
7461
+ }) }), l.cells.map((e, n) => /* @__PURE__ */ a("td", { children: /* @__PURE__ */ a("button", {
7282
7462
  className: X["table-row-button"],
7283
- disabled: e,
7284
- "aria-pressed": n,
7285
- onClick: () => f(t.optionId),
7463
+ disabled: t,
7464
+ "aria-pressed": r,
7465
+ "aria-description": c,
7466
+ onClick: () => p(l.optionId),
7286
7467
  type: "button",
7287
- children: /* @__PURE__ */ a(J, { content: r })
7288
- }) }, `${t.optionId}-cell-${i}`))]
7289
- }, t.optionId);
7468
+ children: /* @__PURE__ */ a(J, { content: e })
7469
+ }) }, `${l.optionId}-cell-${n}`))]
7470
+ }, l.optionId);
7290
7471
  }) })
7291
7472
  ]
7292
7473
  })
7293
- }), l ? /* @__PURE__ */ a(Y, {
7294
- groups: i,
7295
- title: r.standardAnswer
7474
+ }), u ? /* @__PURE__ */ a(Y, {
7475
+ groups: s,
7476
+ title: i.standardAnswer
7296
7477
  }) : null]
7297
7478
  });
7298
7479
  }
7299
- let p = ou(t, n);
7480
+ let m = bu(n, r);
7300
7481
  return /* @__PURE__ */ o("div", {
7301
7482
  className: G.element,
7302
- children: [/* @__PURE__ */ a(fu, { children: d.map((t) => {
7303
- let n = u.selectedOptionIds.includes(t.optionId);
7483
+ children: [/* @__PURE__ */ a(Eu, { children: f.map((n) => {
7484
+ let { selected: r, status: i, missed: s, description: c } = n, l = Oa(n, Au);
7304
7485
  return /* @__PURE__ */ a("li", {
7305
- className: U(G["option-item"], X["choice-option"], n && X.selected),
7306
- "data-selected": n ? "true" : void 0,
7486
+ className: U(G["option-item"], X["choice-option"], Qc(i), s && X["missed-answer"]),
7487
+ "data-graded": !!e,
7488
+ "data-selected": r ? "true" : void 0,
7307
7489
  children: /* @__PURE__ */ o("button", {
7308
7490
  className: X["choice-button"],
7309
- disabled: e,
7310
- "aria-pressed": n,
7311
- onClick: () => f(t.optionId),
7491
+ disabled: t,
7492
+ "aria-pressed": r,
7493
+ "aria-description": c,
7494
+ onClick: () => p(l.optionId),
7312
7495
  type: "button",
7313
- children: [/* @__PURE__ */ a("span", {
7314
- className: U(G.marker, X["option-marker"]),
7315
- "data-selected": n ? "true" : void 0,
7316
- children: t.marker
7317
- }), /* @__PURE__ */ a(J, { content: t.standardContent })]
7496
+ children: [
7497
+ /* @__PURE__ */ a("span", {
7498
+ className: U(G.marker, X["option-marker"]),
7499
+ "data-selected": r ? "true" : void 0,
7500
+ children: l.marker
7501
+ }),
7502
+ /* @__PURE__ */ a(J, { content: l.standardContent }),
7503
+ r ? /* @__PURE__ */ a(Pl, { status: i }) : null
7504
+ ]
7318
7505
  })
7319
- }, t.optionId);
7320
- }) }), l ? /* @__PURE__ */ a(Y, {
7321
- groups: p,
7322
- title: r.standardAnswer
7506
+ }, l.optionId);
7507
+ }) }), u ? /* @__PURE__ */ a(Y, {
7508
+ groups: m,
7509
+ title: i.standardAnswer
7323
7510
  }) : null]
7324
7511
  });
7325
7512
  }
7326
7513
  //#endregion
7327
7514
  //#region src/question/renderers/orderingAnswerGroups.tsx
7328
- function gu(e) {
7515
+ function Mu(e) {
7329
7516
  let t = Vr(e.sortOptions);
7330
7517
  return e.answers.map((e) => {
7331
7518
  let n = t.get(e);
@@ -7338,96 +7525,101 @@ function gu(e) {
7338
7525
  }
7339
7526
  //#endregion
7340
7527
  //#region src/question/player/QuestionOrderingPlayer.tsx
7341
- function _u({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: s, showAnswer: c }) {
7342
- let l = uc(i, s, t), u = Vr(t.sortOptions), d = l.orderedOptionIds.map((e) => u.get(e)).filter((e) => !!e);
7343
- function f(e, n) {
7344
- r(j(j({}, l), {}, { orderedOptionIds: bc(l.orderedOptionIds, t, e, n) }));
7528
+ function Nu({ gradingResult: e, disabled: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
7529
+ let u = uc(s, c, n), d = Vr(n.sortOptions), f = u.orderedOptionIds.map((e) => d.get(e)).filter((e) => !!e);
7530
+ function p(e, t) {
7531
+ i(j(j({}, u), {}, { orderedOptionIds: bc(u.orderedOptionIds, n, e, t) }));
7345
7532
  }
7346
7533
  return /* @__PURE__ */ o("div", {
7347
7534
  className: G.element,
7348
7535
  children: [/* @__PURE__ */ a("ol", {
7349
7536
  className: G["option-list"],
7350
- children: d.map(({ number: t, option: r }, i) => /* @__PURE__ */ o("li", {
7351
- className: U(G["option-item"], X["choice-option"]),
7352
- children: [
7353
- /* @__PURE__ */ a("span", {
7354
- className: G.marker,
7355
- children: t
7356
- }),
7357
- /* @__PURE__ */ a(J, { content: r.content }),
7358
- /* @__PURE__ */ o("span", {
7359
- className: X["ordering-controls"],
7360
- children: [/* @__PURE__ */ a("button", {
7361
- "aria-label": `${n.moveUp} ${t}`,
7362
- className: X["ordering-button"],
7363
- disabled: e || i === 0,
7364
- onClick: () => f(r.id, -1),
7365
- type: "button",
7366
- children: "\u2191"
7367
- }), /* @__PURE__ */ a("button", {
7368
- "aria-label": `${n.moveDown} ${t}`,
7369
- className: X["ordering-button"],
7370
- disabled: e || i === d.length - 1,
7371
- onClick: () => f(r.id, 1),
7372
- type: "button",
7373
- children: "\u2193"
7374
- })]
7375
- })
7376
- ]
7377
- }, r.id))
7378
- }), c ? /* @__PURE__ */ a(Y, {
7379
- groups: gu(t),
7380
- title: n.standardAnswer
7537
+ children: f.map(({ number: n, option: i }, s) => {
7538
+ var c;
7539
+ let l = e == null || (c = e.optionResults.find((e) => e.optionId === i.id)) == null ? void 0 : c.status;
7540
+ return /* @__PURE__ */ o("li", {
7541
+ className: U(G["option-item"], X["choice-option"], Qc(l)),
7542
+ children: [
7543
+ /* @__PURE__ */ a("span", {
7544
+ className: G.marker,
7545
+ children: n
7546
+ }),
7547
+ /* @__PURE__ */ a(J, { content: i.content }),
7548
+ /* @__PURE__ */ a(Pl, { status: l }),
7549
+ /* @__PURE__ */ o("span", {
7550
+ className: X["ordering-controls"],
7551
+ children: [/* @__PURE__ */ a("button", {
7552
+ "aria-label": `${r.moveUp} ${n}`,
7553
+ className: X["ordering-button"],
7554
+ disabled: t || s === 0,
7555
+ onClick: () => p(i.id, -1),
7556
+ type: "button",
7557
+ children: "\u2191"
7558
+ }), /* @__PURE__ */ a("button", {
7559
+ "aria-label": `${r.moveDown} ${n}`,
7560
+ className: X["ordering-button"],
7561
+ disabled: t || s === f.length - 1,
7562
+ onClick: () => p(i.id, 1),
7563
+ type: "button",
7564
+ children: "\u2193"
7565
+ })]
7566
+ })
7567
+ ]
7568
+ }, i.id);
7569
+ })
7570
+ }), l ? /* @__PURE__ */ a(Y, {
7571
+ groups: Mu(n),
7572
+ title: r.standardAnswer
7381
7573
  }) : null]
7382
7574
  });
7383
7575
  }
7384
7576
  //#endregion
7385
7577
  //#region src/question/renderers/QuestionTextMarkerContent.tsx
7386
- function vu({ answerMarkers: e = [], content: t, disabled: n = !1, onMarkerClick: r, selectedMarkers: i = [], showAnswer: o = !1 }) {
7387
- let { textMarker: s } = K(), l = t.json.length ? t.json : [{
7388
- children: [{ text: t.text }],
7578
+ function Pu({ renderMarker: e, answerMarkers: t = [], content: n, disabled: r = !1, onMarkerClick: i, selectedMarkers: o = [], showAnswer: s = !1 }) {
7579
+ let { textMarker: l } = K(), u = n.json.length ? n.json : [{
7580
+ children: [{ text: n.text }],
7389
7581
  type: "paragraph"
7390
7582
  }];
7391
7583
  return /* @__PURE__ */ a("div", {
7392
- className: s.content,
7393
- children: l.map((e, t) => u(e, `node-${t}`))
7584
+ className: l.content,
7585
+ children: u.map((e, t) => d(e, `node-${t}`))
7394
7586
  });
7395
- function u(e, t) {
7396
- if (bu(e)) return d(e, t);
7397
- if (!yu(e)) return null;
7398
- let n = e.children.map((e, n) => u(e, `${t}-${n}`));
7587
+ function d(e, t) {
7588
+ if (Iu(e)) return f(e, t);
7589
+ if (!Fu(e)) return null;
7590
+ let n = e.children.map((e, n) => d(e, `${t}-${n}`));
7399
7591
  return e.type === "paragraph" ? /* @__PURE__ */ a("p", {
7400
- className: s.paragraph,
7592
+ className: l.paragraph,
7401
7593
  children: n
7402
7594
  }, t) : /* @__PURE__ */ a("span", { children: n }, t);
7403
7595
  }
7404
- function d(e, t) {
7405
- let n = Ot(e);
7406
- if (!n) return /* @__PURE__ */ a(c, { children: e.text }, t);
7407
- let i = f(n);
7408
- return r ? p(n, e.text, t, i) : m(n, e.text, t, i);
7596
+ function f(t, n) {
7597
+ let r = Ot(t);
7598
+ if (!r) return /* @__PURE__ */ a(c, { children: t.text }, n);
7599
+ let o = p(r), s = i ? m(r, t.text, n, o) : h(r, t.text, n, o);
7600
+ return e ? /* @__PURE__ */ a(c, { children: e(r, s) }, n) : s;
7409
7601
  }
7410
- function f(t) {
7411
- let n = i.includes(t), a = o && e.includes(t);
7602
+ function p(e) {
7603
+ let n = o.includes(e), r = s && t.includes(e);
7412
7604
  return {
7413
- answer: a,
7414
- className: ro(s.marker, r ? s["marker-button"] : "", n ? s["marker-selected"] : "", a ? s["marker-answer"] : ""),
7605
+ answer: r,
7606
+ className: ro(l.marker, i ? l["marker-button"] : "", n ? l["marker-selected"] : "", r ? l["marker-answer"] : ""),
7415
7607
  selected: n
7416
7608
  };
7417
7609
  }
7418
- function p(e, t, i, o) {
7610
+ function m(e, t, n, o) {
7419
7611
  return /* @__PURE__ */ a("button", {
7420
7612
  className: o.className,
7421
7613
  "data-answer": o.answer ? "true" : void 0,
7422
7614
  "data-marker-id": e,
7423
7615
  "data-selected": o.selected ? "true" : void 0,
7424
- disabled: n,
7425
- onClick: () => r == null ? void 0 : r(e),
7616
+ disabled: r,
7617
+ onClick: () => i == null ? void 0 : i(e),
7426
7618
  type: "button",
7427
7619
  children: t
7428
- }, i);
7620
+ }, n);
7429
7621
  }
7430
- function m(e, t, n, r) {
7622
+ function h(e, t, n, r) {
7431
7623
  return /* @__PURE__ */ a("span", {
7432
7624
  className: r.className,
7433
7625
  "data-answer": r.answer ? "true" : void 0,
@@ -7437,48 +7629,42 @@ function vu({ answerMarkers: e = [], content: t, disabled: n = !1, onMarkerClick
7437
7629
  }, n);
7438
7630
  }
7439
7631
  }
7440
- function yu(e) {
7632
+ function Fu(e) {
7441
7633
  return !!(e && typeof e == "object" && "children" in e && Array.isArray(e.children));
7442
7634
  }
7443
- function bu(e) {
7635
+ function Iu(e) {
7444
7636
  return !!(e && typeof e == "object" && "text" in e && typeof e.text == "string");
7445
7637
  }
7446
7638
  //#endregion
7447
- //#region src/question/renderers/QuestionTextMarkerView.tsx
7448
- function xu({ item: e, messages: t, showAnswer: n }) {
7449
- let r = Et(e.content.json).filter((t) => e.answers.includes(t.markerId)).map((e) => e.text);
7450
- return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(vu, {
7451
- answerMarkers: e.answers,
7452
- content: e.content,
7453
- showAnswer: n
7454
- }), n ? /* @__PURE__ */ a(Y, {
7639
+ //#region src/question/player/QuestionTextMarkerPlayer.tsx
7640
+ function Lu({ gradingResult: e, disabled: t, item: n, messages: r, onChange: s, response: c, responseIndex: l, showAnswer: u }) {
7641
+ let d = dc(c, l);
7642
+ return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(Pu, {
7643
+ renderMarker: (t, n) => {
7644
+ var r;
7645
+ return /* @__PURE__ */ a(Pl, {
7646
+ unansweredAsWarning: !0,
7647
+ status: e == null || (r = e.markerResults.find((e) => e.markerId === t)) == null ? void 0 : r.status,
7648
+ children: n
7649
+ });
7650
+ },
7651
+ answerMarkers: n.answers,
7652
+ content: n.content,
7653
+ disabled: t,
7654
+ onMarkerClick: (e) => s(j(j({}, d), {}, { selectedMarkers: xc(d.selectedMarkers, e) })),
7655
+ selectedMarkers: d.selectedMarkers
7656
+ }), u ? /* @__PURE__ */ a(Y, {
7657
+ title: r.standardAnswer,
7455
7658
  groups: [{
7456
7659
  kind: "detailed",
7457
- contents: r,
7458
- marker: t.standardAnswer
7459
- }],
7460
- title: t.standardAnswer
7660
+ marker: r.standardAnswer,
7661
+ contents: Et(n.content.json).filter((e) => n.answers.includes(e.markerId)).map((e) => e.text)
7662
+ }]
7461
7663
  }) : null] });
7462
7664
  }
7463
7665
  //#endregion
7464
- //#region src/question/player/QuestionTextMarkerPlayer.tsx
7465
- function Su({ disabled: e, item: t, messages: n, onChange: r, response: i, responseIndex: o, showAnswer: s }) {
7466
- let c = dc(i, o);
7467
- return s ? /* @__PURE__ */ a(xu, {
7468
- item: t,
7469
- messages: n,
7470
- showAnswer: s
7471
- }) : /* @__PURE__ */ a(vu, {
7472
- answerMarkers: t.answers,
7473
- content: t.content,
7474
- disabled: e,
7475
- onMarkerClick: (e) => r(j(j({}, c), {}, { selectedMarkers: xc(c.selectedMarkers, e) })),
7476
- selectedMarkers: c.selectedMarkers
7477
- });
7478
- }
7479
- //#endregion
7480
7666
  //#region src/question/player/QuestionTextResponsePlayer.tsx
7481
- function Cu({ disabled: e, locale: t, label: n, messages: r, onChange: i, response: o, responseIndex: s, uploadImage: c }) {
7667
+ function Ru({ disabled: e, locale: t, label: n, messages: r, onChange: i, response: o, responseIndex: s, uploadImage: c }) {
7482
7668
  let l = fc(o, s);
7483
7669
  return e ? F(l.content) ? null : /* @__PURE__ */ a(J, { content: l.content }) : /* @__PURE__ */ a(Ha, {
7484
7670
  ariaLabel: n,
@@ -7495,7 +7681,7 @@ function Cu({ disabled: e, locale: t, label: n, messages: r, onChange: i, respon
7495
7681
  }
7496
7682
  //#endregion
7497
7683
  //#region src/question/renderers/wordBuilderAnswers.tsx
7498
- function wu(e, t) {
7684
+ function zu(e, t) {
7499
7685
  return e.blanks.reduce((n, r) => {
7500
7686
  var i;
7501
7687
  let o = (i = e.answers[r]) == null ? void 0 : i.trim();
@@ -7508,297 +7694,303 @@ function wu(e, t) {
7508
7694
  }
7509
7695
  //#endregion
7510
7696
  //#region src/question/player/QuestionPlayerWordBuilder.module.css
7511
- var Tu = {
7512
- "word-builder-blank": "_word-builder-blank_ftw6q_1",
7513
- "word-builder-candidate-list": "_word-builder-candidate-list_ftw6q_30"
7697
+ var Bu = {
7698
+ "word-builder-blank": "_word-builder-blank_1q28p_1",
7699
+ "word-builder-candidate-list": "_word-builder-candidate-list_1q28p_35"
7514
7700
  };
7515
7701
  //#endregion
7516
7702
  //#region src/question/player/QuestionWordBuilderPlayer.tsx
7517
- function Eu({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
7518
- let u = kn(n, !0, t), d = ac(s, c, u.blanks), f = wu(u, (e, t) => Vc(e, t, r.blankLabel));
7519
- function p(e, t) {
7520
- i(j(j({}, d), {}, { answers: j(j({}, d.answers), {}, { [e]: t }) }));
7703
+ function Vu({ gradingResult: e, disabled: t, element: n, item: r, messages: i, onChange: s, response: c, responseIndex: l, showAnswer: u }) {
7704
+ let d = kn(r, !0, n), f = ac(c, l, d.blanks), p = zu(d, (e, t) => tl(e, t, i.blankLabel));
7705
+ function m(e, t) {
7706
+ s(j(j({}, f), {}, { answers: j(j({}, f.answers), {}, { [e]: t }) }));
7521
7707
  }
7522
- function m(t) {
7523
- e || !d.answers[t] || p(t, "");
7708
+ function h(e) {
7709
+ t || !f.answers[e] || m(e, "");
7524
7710
  }
7525
- function h(e, n) {
7711
+ function g(e, t) {
7526
7712
  var r;
7527
- let i = (r = d.answers[e]) == null ? "" : r;
7528
- p(e, t.config.builderMode === "sentence" ? n : `${i}${n}`);
7713
+ let i = (r = f.answers[e]) == null ? "" : r;
7714
+ m(e, n.config.builderMode === "sentence" ? t : `${i}${t}`);
7529
7715
  }
7530
- function g(e) {
7716
+ function _(e) {
7531
7717
  var t;
7532
- let n = (t = u.blanks.find((e) => {
7718
+ let n = (t = d.blanks.find((e) => {
7533
7719
  var t;
7534
- return !((t = d.answers[e]) != null && t.trim());
7535
- })) == null ? u.blanks[0] : t;
7536
- n && h(n, e);
7720
+ return !((t = f.answers[e]) != null && t.trim());
7721
+ })) == null ? d.blanks[0] : t;
7722
+ n && g(n, e);
7537
7723
  }
7538
- function _(t, n) {
7539
- if (t.preventDefault(), e) return;
7540
- let r = t.dataTransfer.getData("answer/item") || t.dataTransfer.getData("text/plain");
7541
- r && h(n, r);
7724
+ function v(e, n) {
7725
+ if (e.preventDefault(), t) return;
7726
+ let r = e.dataTransfer.getData("answer/item") || e.dataTransfer.getData("text/plain");
7727
+ r && g(n, r);
7542
7728
  }
7543
7729
  return /* @__PURE__ */ o("div", {
7544
7730
  className: q["fill-text"],
7545
7731
  children: [
7546
- /* @__PURE__ */ a(Dl, {
7547
- content: u.content,
7548
- renderBlank: ({ blankId: t, index: n, label: i }) => {
7549
- var o, s;
7550
- let c = (o = d.answers[t]) == null ? "" : o, l = Du({
7551
- answers: c,
7552
- blankLabel: r.blankLabel,
7553
- canClear: !e && !!c.trim(),
7554
- index: n,
7555
- label: i
7732
+ /* @__PURE__ */ a(Vl, {
7733
+ content: d.content,
7734
+ renderBlank: ({ blankId: n, index: r, label: o }) => {
7735
+ var s, c, l;
7736
+ let u = (s = f.answers[n]) == null ? "" : s, d = Hu({
7737
+ answers: u,
7738
+ blankLabel: i.blankLabel,
7739
+ canClear: !t && !!u.trim(),
7740
+ index: r,
7741
+ label: o
7556
7742
  });
7557
- return /* @__PURE__ */ a("button", {
7558
- "aria-label": l,
7559
- className: Tu["word-builder-blank"],
7560
- disabled: e,
7561
- onClick: () => m(t),
7562
- onDragOver: (e) => e.preventDefault(),
7563
- onDrop: (e) => _(e, t),
7564
- title: l,
7565
- type: "button",
7566
- children: (s = d.answers[t]) == null ? "" : s
7743
+ return /* @__PURE__ */ a(Pl, {
7744
+ unansweredAsWarning: !0,
7745
+ status: e == null || (c = e.blankResults.find((e) => e.blankId === n)) == null ? void 0 : c.status,
7746
+ children: /* @__PURE__ */ a("button", {
7747
+ "aria-label": d,
7748
+ className: Bu["word-builder-blank"],
7749
+ disabled: t,
7750
+ onClick: () => h(n),
7751
+ onDragOver: (e) => e.preventDefault(),
7752
+ onDrop: (e) => v(e, n),
7753
+ title: d,
7754
+ type: "button",
7755
+ children: (l = f.answers[n]) == null ? "" : l
7756
+ })
7567
7757
  });
7568
7758
  }
7569
7759
  }),
7570
7760
  /* @__PURE__ */ a("div", {
7571
- className: Tu["word-builder-candidate-list"],
7572
- children: u.candidateOptions.map((t, n) => /* @__PURE__ */ a("button", {
7573
- disabled: e,
7574
- draggable: !e,
7575
- onClick: () => g(t),
7576
- onDragStart: (e) => {
7577
- e.dataTransfer.effectAllowed = "copy", e.dataTransfer.setData("answer/item", t), e.dataTransfer.setData("text/plain", t);
7761
+ className: Bu["word-builder-candidate-list"],
7762
+ children: d.candidateOptions.map((e, n) => /* @__PURE__ */ a("button", {
7763
+ disabled: t,
7764
+ draggable: !t,
7765
+ onClick: () => _(e),
7766
+ onDragStart: (t) => {
7767
+ t.dataTransfer.effectAllowed = "copy", t.dataTransfer.setData("answer/item", e), t.dataTransfer.setData("text/plain", e);
7578
7768
  },
7579
7769
  type: "button",
7580
- children: t
7581
- }, `${t}-${n}`))
7770
+ children: e
7771
+ }, `${e}-${n}`))
7582
7772
  }),
7583
- l ? /* @__PURE__ */ a(Y, {
7584
- groups: f,
7585
- title: r.standardAnswer
7773
+ u ? /* @__PURE__ */ a(Y, {
7774
+ groups: p,
7775
+ title: i.standardAnswer
7586
7776
  }) : null
7587
7777
  ]
7588
7778
  });
7589
7779
  }
7590
- function Du({ answers: e, blankLabel: t, canClear: n, index: r, label: i }) {
7780
+ function Hu({ answers: e, blankLabel: t, canClear: n, index: r, label: i }) {
7591
7781
  let a = i || `${t}${r + 1}`;
7592
7782
  return !n || !e.trim() ? a : t === "\u7a7a" ? `${a}\uff0c\u70b9\u51fb\u6e05\u7a7a` : `${a}, click to clear`;
7593
7783
  }
7594
7784
  //#endregion
7595
7785
  //#region src/question/player/QuestionPlayerElement.tsx
7596
- function Ou({ disabled: e, element: t, item: n, locale: r, messages: i, onResponseItemChange: o, response: s, responseIndex: c, showAnswer: l, uploadImage: u }) {
7597
- if (t.type !== n.type) throw Error(`\u9898\u76ee\u5143\u7d20\u7ed3\u6784\u4e0d\u5339\u914d\uff0cexpected=${t.type}\uff0cactual=${n.type}`);
7598
- return t.type === "richText" ? /* @__PURE__ */ a(J, { content: n.content }) : t.type === "textResponse" ? /* @__PURE__ */ a(Cu, {
7786
+ function Uu({ disabled: e, gradingResult: t, element: n, item: r, locale: i, messages: o, onResponseItemChange: s, response: c, responseIndex: l, showAnswer: u, uploadImage: d }) {
7787
+ if (n.type !== r.type) throw Error(`\u9898\u76ee\u5143\u7d20\u7ed3\u6784\u4e0d\u5339\u914d\uff0cexpected=${n.type}\uff0cactual=${r.type}`);
7788
+ return n.type === "richText" ? /* @__PURE__ */ a(J, { content: r.content }) : n.type === "textResponse" ? /* @__PURE__ */ a(Ru, {
7599
7789
  disabled: e,
7600
- label: t.name,
7601
- locale: r,
7602
- messages: i,
7603
- onChange: o,
7604
- response: s,
7605
- responseIndex: c,
7606
- uploadImage: u
7607
- }) : t.type === "ordering" ? /* @__PURE__ */ a(_u, {
7790
+ label: n.name,
7791
+ locale: i,
7792
+ messages: o,
7793
+ onChange: s,
7794
+ response: c,
7795
+ responseIndex: l,
7796
+ uploadImage: d
7797
+ }) : n.type === "ordering" ? /* @__PURE__ */ a(Nu, {
7798
+ gradingResult: Yc(t, "ordering"),
7608
7799
  disabled: e,
7609
- item: n,
7610
- messages: i,
7611
- onChange: o,
7612
- response: s,
7613
- responseIndex: c,
7614
- showAnswer: l
7615
- }) : t.type === "classification" ? /* @__PURE__ */ a(wl, {
7800
+ item: r,
7801
+ messages: o,
7802
+ onChange: s,
7803
+ response: c,
7804
+ responseIndex: l,
7805
+ showAnswer: u
7806
+ }) : n.type === "classification" ? /* @__PURE__ */ a(zl, {
7807
+ gradingResult: Yc(t, "classification"),
7616
7808
  disabled: e,
7617
- item: n,
7618
- messages: i,
7619
- onChange: o,
7620
- response: s,
7621
- responseIndex: c,
7622
- showAnswer: l
7623
- }) : t.type === "textMarker" ? /* @__PURE__ */ a(Su, {
7809
+ item: r,
7810
+ messages: o,
7811
+ onChange: s,
7812
+ response: c,
7813
+ responseIndex: l,
7814
+ showAnswer: u
7815
+ }) : n.type === "textMarker" ? /* @__PURE__ */ a(Lu, {
7816
+ gradingResult: Yc(t, "textMarker"),
7624
7817
  disabled: e,
7625
- item: n,
7626
- messages: i,
7627
- onChange: o,
7628
- response: s,
7629
- responseIndex: c,
7630
- showAnswer: l
7631
- }) : ku({
7818
+ item: r,
7819
+ messages: o,
7820
+ onChange: s,
7821
+ response: c,
7822
+ responseIndex: l,
7823
+ showAnswer: u
7824
+ }) : Wu({
7632
7825
  disabled: e,
7633
- element: t,
7634
- item: n,
7635
- locale: r,
7636
- messages: i,
7637
- onResponseItemChange: o,
7638
- response: s,
7639
- responseIndex: c,
7640
- showAnswer: l,
7641
- uploadImage: u
7642
- });
7643
- }
7644
- function ku({ disabled: e, element: t, item: n, messages: r, onResponseItemChange: i, response: o, responseIndex: s, showAnswer: c }) {
7645
- switch (t.type) {
7646
- case "choice": return /* @__PURE__ */ a(hu, {
7826
+ gradingResult: t,
7827
+ element: n,
7828
+ item: r,
7829
+ locale: i,
7830
+ messages: o,
7831
+ onResponseItemChange: s,
7832
+ response: c,
7833
+ responseIndex: l,
7834
+ showAnswer: u,
7835
+ uploadImage: d
7836
+ });
7837
+ }
7838
+ function Wu({ disabled: e, gradingResult: t, element: n, item: r, messages: i, onResponseItemChange: o, response: s, responseIndex: c, showAnswer: l }) {
7839
+ switch (n.type) {
7840
+ case "choice": return /* @__PURE__ */ a(ju, {
7841
+ gradingResult: Yc(t, "choice"),
7647
7842
  disabled: e,
7648
- element: t,
7649
- item: n,
7650
- messages: r,
7651
- onChange: i,
7652
- response: o,
7653
- responseIndex: s,
7654
- showAnswer: c
7843
+ element: n,
7844
+ item: r,
7845
+ messages: i,
7846
+ onChange: o,
7847
+ response: s,
7848
+ responseIndex: c,
7849
+ showAnswer: l
7655
7850
  });
7656
- case "fill": return /* @__PURE__ */ a(bl, {
7851
+ case "fill": return /* @__PURE__ */ a(Fl, {
7852
+ gradingResult: Yc(t, "fill"),
7657
7853
  disabled: e,
7658
- item: n,
7659
- messages: r,
7660
- onChange: i,
7661
- response: o,
7662
- responseIndex: s,
7663
- showAnswer: c
7854
+ item: r,
7855
+ messages: i,
7856
+ onChange: o,
7857
+ response: s,
7858
+ responseIndex: c,
7859
+ showAnswer: l
7664
7860
  });
7665
- case "inlineFill": return /* @__PURE__ */ a(Wl, {
7861
+ case "inlineFill": return /* @__PURE__ */ a(iu, {
7862
+ gradingResult: Yc(t, "inlineFill"),
7666
7863
  disabled: e,
7667
- element: t,
7668
- item: n,
7669
- messages: r,
7670
- onChange: i,
7671
- response: o,
7672
- responseIndex: s,
7673
- showAnswer: c
7864
+ element: n,
7865
+ item: r,
7866
+ messages: i,
7867
+ onChange: o,
7868
+ response: s,
7869
+ responseIndex: c,
7870
+ showAnswer: l
7674
7871
  });
7675
- case "wordBuilder": return /* @__PURE__ */ a(Eu, {
7872
+ case "wordBuilder": return /* @__PURE__ */ a(Vu, {
7873
+ gradingResult: Yc(t, "wordBuilder"),
7676
7874
  disabled: e,
7677
- element: t,
7678
- item: n,
7679
- messages: r,
7680
- onChange: i,
7681
- response: o,
7682
- responseIndex: s,
7683
- showAnswer: c
7875
+ element: n,
7876
+ item: r,
7877
+ messages: i,
7878
+ onChange: o,
7879
+ response: s,
7880
+ responseIndex: c,
7881
+ showAnswer: l
7684
7882
  });
7685
- case "judgement": return /* @__PURE__ */ a(Yl, {
7883
+ case "judgement": return /* @__PURE__ */ a(lu, {
7884
+ gradingResult: Yc(t, "judgement"),
7686
7885
  disabled: e,
7687
- element: t,
7688
- item: n,
7689
- messages: r,
7690
- onChange: i,
7691
- response: o,
7692
- responseIndex: s,
7693
- showAnswer: c
7886
+ element: n,
7887
+ item: r,
7888
+ messages: i,
7889
+ onChange: o,
7890
+ response: s,
7891
+ responseIndex: c,
7892
+ showAnswer: l
7694
7893
  });
7695
- case "lineConnect": return /* @__PURE__ */ a(Ql, {
7894
+ case "lineConnect": return /* @__PURE__ */ a(fu, {
7895
+ gradingResult: Yc(t, "lineConnect"),
7696
7896
  disabled: e,
7697
- item: n,
7698
- messages: r,
7699
- onChange: i,
7700
- response: o,
7701
- responseIndex: s,
7702
- showAnswer: c
7897
+ item: r,
7898
+ messages: i,
7899
+ onChange: o,
7900
+ response: s,
7901
+ responseIndex: c,
7902
+ showAnswer: l
7703
7903
  });
7704
- case "matching": return /* @__PURE__ */ a(iu, {
7904
+ case "matching": return /* @__PURE__ */ a(vu, {
7905
+ gradingResult: Yc(t, "matching"),
7705
7906
  disabled: e,
7706
- item: n,
7707
- messages: r,
7708
- onChange: i,
7709
- response: o,
7710
- responseIndex: s,
7711
- showAnswer: c
7907
+ item: r,
7908
+ messages: i,
7909
+ onChange: o,
7910
+ response: s,
7911
+ responseIndex: c,
7912
+ showAnswer: l
7712
7913
  });
7713
7914
  }
7714
7915
  }
7715
7916
  //#endregion
7716
- //#region src/question/player/QuestionPlayer.tsx
7717
- var Au = ["locale"];
7718
- function ju(e) {
7719
- let { locale: t = "zh-CN" } = e, n = Oa(e, Au), r = ks(n.value, n.questionTypeTemplates), i = Ps(n.response, r);
7720
- return /* @__PURE__ */ a(Mu, j(j({}, n), {}, {
7721
- childIndexPath: [],
7722
- locale: t,
7723
- messages: Bc(t),
7724
- onResponseChange: (e) => n.onResponseChange(Ns(e, r)),
7725
- response: i,
7726
- value: r
7727
- }));
7728
- }
7729
- function Mu({ 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 }) {
7730
- let m = da(d, p);
7731
- if (!m) return /* @__PURE__ */ a("div", {
7917
+ //#region src/question/player/QuestionPlayerInner.tsx
7918
+ function Gu({ childIndexPath: e, className: t, disabled: n = !1, gradingResult: r, locale: i = "zh-CN", messages: o, onResponseChange: s, response: c, rootQuestionNumber: l, showAnswer: u = !1, showExtraAttributes: d = !1, questionTypeTemplates: f, uploadImage: p, value: m }) {
7919
+ let h = da(f, m);
7920
+ if (!h) return /* @__PURE__ */ a("div", {
7732
7921
  className: U(q.root, t),
7733
7922
  children: /* @__PURE__ */ a("div", {
7734
7923
  className: q.empty,
7735
- children: i.missingQuestionTypeTemplate
7924
+ children: o.missingQuestionTypeTemplate
7736
7925
  })
7737
7926
  });
7738
- let h = Nu({
7927
+ let g = Ku({
7928
+ gradingResult: r,
7739
7929
  childIndexPath: e,
7740
7930
  disabled: n,
7741
- locale: r,
7742
- messages: i,
7743
- onResponseChange: o,
7744
- response: s,
7745
- rootQuestionNumber: c,
7746
- showAnswer: l,
7747
- showExtraAttributes: u,
7748
- structure: m,
7749
- uploadImage: f,
7750
- questionTypeTemplates: d,
7751
- value: p
7931
+ locale: i,
7932
+ messages: o,
7933
+ onResponseChange: s,
7934
+ response: c,
7935
+ rootQuestionNumber: l,
7936
+ showAnswer: u,
7937
+ showExtraAttributes: d,
7938
+ structure: h,
7939
+ uploadImage: p,
7940
+ questionTypeTemplates: f,
7941
+ value: m
7752
7942
  });
7753
7943
  return /* @__PURE__ */ a("div", {
7754
7944
  className: U(q.root, t),
7755
- children: Lu(m, p) ? /* @__PURE__ */ a("div", {
7945
+ children: Xu(h, m) ? /* @__PURE__ */ a("div", {
7756
7946
  className: q.empty,
7757
- children: i.previewEmpty
7758
- }) : h
7947
+ children: o.previewEmpty
7948
+ }) : g
7759
7949
  });
7760
7950
  }
7761
- function Nu(e) {
7951
+ function Ku(e) {
7762
7952
  return /* @__PURE__ */ o(i, { children: [
7763
- Pu(e),
7764
- Iu(e),
7765
- Fu(e)
7953
+ qu(e),
7954
+ Yu(e),
7955
+ Ju(e)
7766
7956
  ] });
7767
7957
  }
7768
- function Pu({ disabled: e, locale: t, messages: n, onResponseChange: r, response: i, showAnswer: o, structure: s, uploadImage: c, value: l }) {
7769
- return s.elements.length === 0 ? null : /* @__PURE__ */ a("div", {
7958
+ function qu({ gradingResult: e, disabled: t, locale: n, messages: r, onResponseChange: i, response: o, showAnswer: s, structure: c, uploadImage: l, value: u }) {
7959
+ return c.elements.length === 0 ? null : /* @__PURE__ */ a("div", {
7770
7960
  className: q["element-list"],
7771
- children: s.elements.map((u, d) => {
7772
- let f = cn(l, d, u), p = s.elements.slice(0, d).filter((e) => e.type !== "richText").length;
7961
+ children: c.elements.map((d, f) => {
7962
+ var p;
7963
+ let m = cn(u, f, d), h = c.elements.slice(0, f).filter((e) => e.type !== "richText").length;
7773
7964
  return /* @__PURE__ */ a("section", {
7774
7965
  className: q.element,
7775
- children: /* @__PURE__ */ a(Ou, {
7776
- disabled: e,
7777
- element: u,
7778
- item: f,
7779
- locale: t,
7780
- messages: n,
7781
- onResponseItemChange: (e) => r(pc(i, p, e)),
7782
- response: i,
7783
- responseIndex: p,
7784
- showAnswer: o && s.hasAnswer,
7785
- uploadImage: c
7966
+ children: /* @__PURE__ */ a(Uu, {
7967
+ disabled: t,
7968
+ gradingResult: (p = e == null ? void 0 : e.elementResults[h]) == null ? void 0 : p,
7969
+ element: d,
7970
+ item: m,
7971
+ locale: n,
7972
+ messages: r,
7973
+ onResponseItemChange: (e) => i(pc(o, h, e)),
7974
+ response: o,
7975
+ responseIndex: h,
7976
+ showAnswer: s && c.hasAnswer,
7977
+ uploadImage: l
7786
7978
  })
7787
- }, `${u.type}-${d}`);
7979
+ }, `${d.type}-${f}`);
7788
7980
  })
7789
7981
  });
7790
7982
  }
7791
- function Fu({ disabled: e, locale: t, messages: n, response: r, showExtraAttributes: i, structure: s, uploadImage: c, value: l }) {
7983
+ function Ju({ disabled: e, locale: t, messages: n, response: r, showExtraAttributes: i, structure: s, uploadImage: c, value: l }) {
7792
7984
  return i ? /* @__PURE__ */ a("div", {
7793
7985
  className: q["element-list"],
7794
7986
  children: s.extras.map((i, s) => {
7795
7987
  let u = ln(l, s, i);
7796
7988
  return F(u.content) ? null : /* @__PURE__ */ o("section", {
7797
7989
  className: q.extra,
7798
- children: [/* @__PURE__ */ a(gl, { children: i.name }), /* @__PURE__ */ a(Ou, {
7990
+ children: [/* @__PURE__ */ a(Al, { children: i.name }), /* @__PURE__ */ a(Uu, {
7799
7991
  disabled: e,
7800
- element: Ru(i),
7801
- item: zu(u),
7992
+ element: Zu(i),
7993
+ item: Qu(u),
7802
7994
  locale: t,
7803
7995
  messages: n,
7804
7996
  onResponseItemChange: () => void 0,
@@ -7811,50 +8003,69 @@ function Fu({ disabled: e, locale: t, messages: n, response: r, showExtraAttribu
7811
8003
  })
7812
8004
  }) : null;
7813
8005
  }
7814
- function Iu({ childIndexPath: e, disabled: t, locale: n, messages: r, onResponseChange: i, response: o, rootQuestionNumber: s, showAnswer: c, showExtraAttributes: l, questionTypeTemplates: u, uploadImage: d, value: f }) {
7815
- return f.children.length === 0 ? null : /* @__PURE__ */ a(_l, {
7816
- childIndexPath: e,
7817
- disabled: t,
7818
- messages: r,
7819
- onChildResponseChange: (e, t) => i(mc(o, e, t)),
7820
- response: o,
7821
- renderChild: (e, i, o, f) => /* @__PURE__ */ a(Mu, {
7822
- childIndexPath: f,
7823
- disabled: t,
7824
- locale: n,
7825
- messages: r,
7826
- onResponseChange: o,
7827
- response: i,
7828
- rootQuestionNumber: s,
7829
- showAnswer: c,
7830
- showExtraAttributes: l,
7831
- questionTypeTemplates: u,
7832
- uploadImage: d,
7833
- value: e
8006
+ function Yu({ gradingResult: e, childIndexPath: t, disabled: n, locale: r, messages: i, onResponseChange: o, response: s, rootQuestionNumber: c, showAnswer: l, showExtraAttributes: u, questionTypeTemplates: d, uploadImage: f, value: p }) {
8007
+ return p.children.length === 0 ? null : /* @__PURE__ */ a(jl, {
8008
+ childIndexPath: t,
8009
+ disabled: n,
8010
+ messages: i,
8011
+ onChildResponseChange: (e, t) => o(mc(s, e, t)),
8012
+ response: s,
8013
+ renderChild: (t, o, s, p) => /* @__PURE__ */ a(Gu, {
8014
+ gradingResult: e == null ? void 0 : e.children[p[p.length - 1]],
8015
+ childIndexPath: p,
8016
+ disabled: n,
8017
+ locale: r,
8018
+ messages: i,
8019
+ onResponseChange: s,
8020
+ response: o,
8021
+ rootQuestionNumber: c,
8022
+ showAnswer: l,
8023
+ showExtraAttributes: u,
8024
+ questionTypeTemplates: d,
8025
+ uploadImage: f,
8026
+ value: t
7834
8027
  }),
7835
- rootQuestionNumber: s,
7836
- value: f
8028
+ rootQuestionNumber: c,
8029
+ value: p
7837
8030
  });
7838
8031
  }
7839
- function Lu(e, t) {
8032
+ function Xu(e, t) {
7840
8033
  return t.elements.length === 0 && t.extras.length === 0 && t.children.length === 0;
7841
8034
  }
7842
- function Ru(e) {
8035
+ function Zu(e) {
7843
8036
  return {
7844
8037
  config: {},
7845
8038
  name: e.name,
7846
8039
  type: "richText"
7847
8040
  };
7848
8041
  }
7849
- function zu(e) {
8042
+ function Qu(e) {
7850
8043
  return {
7851
8044
  content: e.content,
7852
8045
  type: "richText"
7853
8046
  };
7854
8047
  }
7855
8048
  //#endregion
8049
+ //#region src/question/player/QuestionPlayer.tsx
8050
+ var $u = ["locale"];
8051
+ function ed(e) {
8052
+ let { locale: t = "zh-CN" } = e, n = Oa(e, $u), r = ks(n.value, n.questionTypeTemplates), i = Ps(n.response, r);
8053
+ return n.gradingResult && Uc(n.gradingResult, r), /* @__PURE__ */ a(Zc.Provider, {
8054
+ value: t,
8055
+ children: /* @__PURE__ */ a(Gu, j(j({}, n), {}, {
8056
+ disabled: !!(n.disabled || n.gradingResult),
8057
+ childIndexPath: [],
8058
+ locale: t,
8059
+ messages: Bc(t),
8060
+ onResponseChange: (e) => n.onResponseChange(Ns(e, r)),
8061
+ response: i,
8062
+ value: r
8063
+ }))
8064
+ });
8065
+ }
8066
+ //#endregion
7856
8067
  //#region src/question/shared/QuestionTextResponsePlaceholder.tsx
7857
- function Bu({ className: e = ul.placeholder, label: t }) {
8068
+ function td({ className: e = wl.placeholder, label: t }) {
7858
8069
  return /* @__PURE__ */ a("div", {
7859
8070
  "aria-label": t,
7860
8071
  className: e
@@ -7862,17 +8073,17 @@ function Bu({ className: e = ul.placeholder, label: t }) {
7862
8073
  }
7863
8074
  //#endregion
7864
8075
  //#region src/question/renderers/blankStandardAnswerGroups.tsx
7865
- function Vu(e, t, n) {
7866
- return [...e].sort((e, n) => Hu(e.blankIds, t) - Hu(n.blankIds, t)).map((e, r) => ({
8076
+ function nd(e, t, n) {
8077
+ return [...e].sort((e, n) => rd(e.blankIds, t) - rd(n.blankIds, t)).map((e, r) => ({
7867
8078
  kind: "detailed",
7868
- contents: Uu(e.contents.filter((e) => !F(e)), n, r),
7869
- marker: tl(e.blankIds, t, n)
8079
+ contents: id(e.contents.filter((e) => !F(e)), n, r),
8080
+ marker: hl(e.blankIds, t, n)
7870
8081
  }));
7871
8082
  }
7872
- function Hu(e, t) {
8083
+ function rd(e, t) {
7873
8084
  return Math.min(...e.map((e) => t.indexOf(e)));
7874
8085
  }
7875
- function Uu(e, t, n) {
8086
+ function id(e, t, n) {
7876
8087
  let r = t === "zh-CN" ? "\uff1b" : "; ";
7877
8088
  return e.reduce((t, i, o) => [
7878
8089
  ...t,
@@ -7882,8 +8093,8 @@ function Uu(e, t, n) {
7882
8093
  }
7883
8094
  //#endregion
7884
8095
  //#region src/question/renderers/QuestionBlankGroupView.tsx
7885
- function Wu({ item: e, locale: t, messages: n, showAnswer: r }) {
7886
- let i = W(), { blankGroup: s, renderer: c } = K(), l = Yn(e.answers, e.blanks), u = i.answerGroupLayout === "rows" ? Vu(l.map((e) => ({
8096
+ function ad({ item: e, locale: t, messages: n, showAnswer: r }) {
8097
+ let i = W(), { blankGroup: s, renderer: c } = K(), l = Yn(e.answers, e.blanks), u = i.answerGroupLayout === "rows" ? nd(l.map((e) => ({
7887
8098
  blankIds: e.blankIds,
7888
8099
  contents: e.answerPools
7889
8100
  })), e.blanks, t) : l.map((r, o) => ({
@@ -7893,36 +8104,36 @@ function Wu({ item: e, locale: t, messages: n, showAnswer: r }) {
7893
8104
  }));
7894
8105
  return /* @__PURE__ */ o("div", {
7895
8106
  className: c.element,
7896
- children: [/* @__PURE__ */ a(uu, {
8107
+ children: [/* @__PURE__ */ a(wu, {
7897
8108
  className: s["blank-list"],
7898
8109
  columnCount: Math.min(e.blanks.length, 4),
7899
8110
  role: "list",
7900
- children: e.blanks.map((e, r) => /* @__PURE__ */ a(yl, {
8111
+ children: e.blanks.map((e, r) => /* @__PURE__ */ a(Nl, {
7901
8112
  className: s["blank-item"],
7902
8113
  children: /* @__PURE__ */ a("span", {
7903
- "aria-label": i.blankPlaceholder === "answer-line" ? el(r + 1, t) : void 0,
8114
+ "aria-label": i.blankPlaceholder === "answer-line" ? ml(r + 1, t) : void 0,
7904
8115
  className: s["blank-field"],
7905
8116
  children: i.blankPlaceholder === "answer-line" ? null : `${n.blankLabel} ${r + 1}`
7906
8117
  })
7907
- }, Gu(e, r)))
8118
+ }, od(e, r)))
7908
8119
  }), r ? /* @__PURE__ */ a(Y, {
7909
8120
  groups: u,
7910
8121
  title: n.standardAnswer
7911
8122
  }) : null]
7912
8123
  });
7913
8124
  }
7914
- function Gu(e, t) {
8125
+ function od(e, t) {
7915
8126
  return e || `blank-${t + 1}`;
7916
8127
  }
7917
8128
  //#endregion
7918
8129
  //#region src/question/renderers/QuestionClassificationView.tsx
7919
- function Ku({ item: e, messages: t, showAnswer: n }) {
8130
+ function sd({ item: e, messages: t, showAnswer: n }) {
7920
8131
  let { classification: r, renderer: i } = K();
7921
8132
  return /* @__PURE__ */ o("div", {
7922
8133
  className: i.element,
7923
8134
  children: [/* @__PURE__ */ o("div", {
7924
8135
  className: r.board,
7925
- children: [/* @__PURE__ */ a(uu, {
8136
+ children: [/* @__PURE__ */ a(wu, {
7926
8137
  className: r.zones,
7927
8138
  columnCount: 2,
7928
8139
  children: e.categories.map((e) => /* @__PURE__ */ o("section", {
@@ -7935,7 +8146,7 @@ function Ku({ item: e, messages: t, showAnswer: n }) {
7935
8146
  children: t.unassigned
7936
8147
  })]
7937
8148
  }, e.id))
7938
- }), /* @__PURE__ */ a(uu, {
8149
+ }), /* @__PURE__ */ a(wu, {
7939
8150
  className: r.pool,
7940
8151
  columnCount: Math.min(e.items.length, 4),
7941
8152
  children: e.items.map((e) => /* @__PURE__ */ a("div", {
@@ -7944,15 +8155,15 @@ function Ku({ item: e, messages: t, showAnswer: n }) {
7944
8155
  }, e.id))
7945
8156
  })]
7946
8157
  }), n ? /* @__PURE__ */ a(Y, {
7947
- groups: Cl(e),
8158
+ groups: Rl(e),
7948
8159
  title: t.standardAnswer
7949
8160
  }) : null]
7950
8161
  });
7951
8162
  }
7952
8163
  //#endregion
7953
8164
  //#region src/question/renderers/QuestionFillTextView.tsx
7954
- function qu({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
7955
- let s = W(), { renderer: c } = K(), l = An(t, e, !0), u = qc(l), d = s.answerGroupLayout === "rows" ? Vu(u, l.blanks, n) : u.map((e, t) => ({
8165
+ function cd({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
8166
+ let s = W(), { renderer: c } = K(), l = An(t, e, !0), u = sl(l), d = s.answerGroupLayout === "rows" ? nd(u, l.blanks, n) : u.map((e, t) => ({
7956
8167
  kind: "detailed",
7957
8168
  contents: e.contents.map((e, n) => /* @__PURE__ */ a(J, { content: e }, `group-${t}-answer-${n}`)),
7958
8169
  marker: s.blankAnswerMarker(e.blankIds, l.blanks, n, r.blankLabel)
@@ -7961,7 +8172,7 @@ function qu({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
7961
8172
  className: c.element,
7962
8173
  children: [
7963
8174
  /* @__PURE__ */ a(J, { content: l.content }),
7964
- Ju(l, s.candidateLayout === "labeled-groups" ? /* @__PURE__ */ a("span", {
8175
+ ld(l, s.candidateLayout === "labeled-groups" ? /* @__PURE__ */ a("span", {
7965
8176
  className: c["section-title"],
7966
8177
  children: r.candidateOptions
7967
8178
  }) : null, c, s.candidateLayout, s.markerSuffix),
@@ -7972,14 +8183,14 @@ function qu({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
7972
8183
  ]
7973
8184
  });
7974
8185
  }
7975
- function Ju(e, t, n, r, i) {
8186
+ function ld(e, t, n, r, i) {
7976
8187
  var s, c;
7977
8188
  let l = (s = e.candidateOptions) == null ? [] : s, u = (c = e.blankOptionGroups) == null ? [] : c;
7978
8189
  return !l.length && !u.length ? null : r === "plain-list" && l.length > 0 ? /* @__PURE__ */ a("div", {
7979
8190
  className: n["candidate-section"],
7980
- children: /* @__PURE__ */ a(vl, {
8191
+ children: /* @__PURE__ */ a(Ml, {
7981
8192
  className: n["candidate-list"],
7982
- children: l.map((e, t) => /* @__PURE__ */ o(yl, {
8193
+ children: l.map((e, t) => /* @__PURE__ */ o(Nl, {
7983
8194
  className: n["candidate-item"],
7984
8195
  children: [/* @__PURE__ */ a("span", {
7985
8196
  className: n.marker,
@@ -7989,21 +8200,21 @@ function Ju(e, t, n, r, i) {
7989
8200
  })
7990
8201
  }) : /* @__PURE__ */ o("div", {
7991
8202
  className: n["candidate-section"],
7992
- children: [t, l.length > 0 ? /* @__PURE__ */ a(fu, { children: l.map((e, t) => /* @__PURE__ */ o(yl, {
8203
+ children: [t, l.length > 0 ? /* @__PURE__ */ a(Eu, { children: l.map((e, t) => /* @__PURE__ */ o(Nl, {
7993
8204
  className: n["candidate-item"],
7994
8205
  children: [/* @__PURE__ */ o("span", {
7995
8206
  className: n.marker,
7996
8207
  children: [un("upperAlpha", t), i]
7997
8208
  }), /* @__PURE__ */ a(J, { content: e.content })]
7998
- }, e.optionId)) }) : /* @__PURE__ */ a(vl, {
8209
+ }, e.optionId)) }) : /* @__PURE__ */ a(Ml, {
7999
8210
  className: n["candidate-list"],
8000
8211
  dataCandidateLayout: "per-blank",
8001
- children: u.map((e, t) => /* @__PURE__ */ o(yl, {
8212
+ children: u.map((e, t) => /* @__PURE__ */ o(Nl, {
8002
8213
  className: n["candidate-item"],
8003
8214
  children: [/* @__PURE__ */ o("span", {
8004
8215
  className: r === "plain-list" ? n["section-title"] : n.marker,
8005
8216
  children: [t + 1, "."]
8006
- }), /* @__PURE__ */ a(fu, { children: e.options.map((e, t) => /* @__PURE__ */ o(yl, {
8217
+ }), /* @__PURE__ */ a(Eu, { children: e.options.map((e, t) => /* @__PURE__ */ o(Nl, {
8007
8218
  className: n["candidate-item"],
8008
8219
  children: [r === "plain-list" ? /* @__PURE__ */ a("span", {
8009
8220
  className: n.marker,
@@ -8016,7 +8227,7 @@ function Ju(e, t, n, r, i) {
8016
8227
  }
8017
8228
  //#endregion
8018
8229
  //#region src/question/renderers/QuestionJudgementGroupView.tsx
8019
- function Yu({ element: e, item: t, messages: n, showAnswer: r, stem: i }) {
8230
+ function ud({ element: e, item: t, messages: n, showAnswer: r, stem: i }) {
8020
8231
  let { renderer: s } = K(), c = mn(e.config.judgeAnswerMode), l = [{
8021
8232
  kind: "detailed",
8022
8233
  contents: hn(e.config.judgeAnswerMode, t.answers),
@@ -8033,11 +8244,11 @@ function Yu({ element: e, item: t, messages: n, showAnswer: r, stem: i }) {
8033
8244
  className: s["judgement-placeholder"],
8034
8245
  children: "\uff08\u3000\uff09"
8035
8246
  })]
8036
- }) : /* @__PURE__ */ a(uu, {
8247
+ }) : /* @__PURE__ */ a(wu, {
8037
8248
  className: s["judgement-list"],
8038
8249
  columnCount: 2,
8039
8250
  role: "list",
8040
- children: c.map(({ label: e, value: t }) => /* @__PURE__ */ a(yl, {
8251
+ children: c.map(({ label: e, value: t }) => /* @__PURE__ */ a(Nl, {
8041
8252
  className: s["judgement-item"],
8042
8253
  children: e
8043
8254
  }, String(t)))
@@ -8049,13 +8260,13 @@ function Yu({ element: e, item: t, messages: n, showAnswer: r, stem: i }) {
8049
8260
  }
8050
8261
  //#endregion
8051
8262
  //#region src/question/renderers/QuestionLineConnectView.tsx
8052
- function Xu({ item: e, messages: t, showAnswer: n }) {
8263
+ function dd({ item: e, messages: t, showAnswer: n }) {
8053
8264
  let { lineConnectColumnTitleVisibility: r, markerSuffix: i } = W(), { lineConnect: s, renderer: c } = K();
8054
8265
  return /* @__PURE__ */ o("div", {
8055
8266
  className: c.element,
8056
8267
  children: [/* @__PURE__ */ a("div", {
8057
8268
  className: s.board,
8058
- children: /* @__PURE__ */ a(uu, {
8269
+ children: /* @__PURE__ */ a(wu, {
8059
8270
  className: s.columns,
8060
8271
  columnCount: e.columns.length,
8061
8272
  style: { gridTemplateColumns: `repeat(${e.columns.length}, minmax(12rem, 1fr))` },
@@ -8081,20 +8292,20 @@ function Xu({ item: e, messages: t, showAnswer: n }) {
8081
8292
  })
8082
8293
  })
8083
8294
  }), n ? /* @__PURE__ */ a(Y, {
8084
- groups: Xl(e),
8295
+ groups: uu(e),
8085
8296
  title: t.standardAnswer
8086
8297
  }) : null]
8087
8298
  });
8088
8299
  }
8089
8300
  //#endregion
8090
8301
  //#region src/question/renderers/QuestionMatchingView.tsx
8091
- function Zu({ item: e, messages: t, showAnswer: n }) {
8302
+ function fd({ item: e, messages: t, showAnswer: n }) {
8092
8303
  let { markerSuffix: r, matchingAnswerLayout: i } = W(), { matching: s, renderer: c } = K();
8093
8304
  return /* @__PURE__ */ o("div", {
8094
8305
  className: c.element,
8095
8306
  children: [/* @__PURE__ */ a("div", {
8096
8307
  className: s.board,
8097
- children: /* @__PURE__ */ a(uu, {
8308
+ children: /* @__PURE__ */ a(wu, {
8098
8309
  className: s.columns,
8099
8310
  columnCount: e.columns.length,
8100
8311
  children: e.columns.map((e) => /* @__PURE__ */ a("section", {
@@ -8112,15 +8323,15 @@ function Zu({ item: e, messages: t, showAnswer: n }) {
8112
8323
  }, e.columnId))
8113
8324
  })
8114
8325
  }), n ? /* @__PURE__ */ a(Y, {
8115
- groups: i === "marker-path" ? tu(e) : eu(e),
8326
+ groups: i === "marker-path" ? hu(e) : mu(e),
8116
8327
  title: t.standardAnswer
8117
8328
  }) : null]
8118
8329
  });
8119
8330
  }
8120
8331
  //#endregion
8121
8332
  //#region src/question/renderers/QuestionOptionGroupView.tsx
8122
- function Qu({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
8123
- let { markerSuffix: s, optionStandardAnswer: c } = W(), { renderer: l, table: u } = K(), d = gn(t, e.config.optionLabelStyle), f = ou(e, t), p = c === "value-only" ? $u(f.map((e) => e.marker), n) : f;
8333
+ function pd({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
8334
+ let { markerSuffix: s, optionStandardAnswer: c } = W(), { renderer: l, table: u } = K(), d = gn(t, e.config.optionLabelStyle), f = bu(e, t), p = c === "value-only" ? md(f.map((e) => e.marker), n) : f;
8124
8335
  return e.config.renderer === "table" ? /* @__PURE__ */ o("div", {
8125
8336
  className: l.element,
8126
8337
  children: [/* @__PURE__ */ a("div", {
@@ -8142,7 +8353,7 @@ function Qu({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
8142
8353
  }) : null]
8143
8354
  }) : /* @__PURE__ */ o("div", {
8144
8355
  className: l.element,
8145
- children: [/* @__PURE__ */ a(fu, { children: d.map((e) => /* @__PURE__ */ o(yl, {
8356
+ children: [/* @__PURE__ */ a(Eu, { children: d.map((e) => /* @__PURE__ */ o(Nl, {
8146
8357
  className: l["option-item"],
8147
8358
  children: [/* @__PURE__ */ o("span", {
8148
8359
  className: l.marker,
@@ -8154,7 +8365,7 @@ function Qu({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
8154
8365
  }) : null]
8155
8366
  });
8156
8367
  }
8157
- function $u(e, t) {
8368
+ function md(e, t) {
8158
8369
  let n = e.filter(Boolean).join(t === "zh-CN" ? "\uff1b" : "; ");
8159
8370
  return n ? [{
8160
8371
  contents: [n],
@@ -8164,13 +8375,13 @@ function $u(e, t) {
8164
8375
  }
8165
8376
  //#endregion
8166
8377
  //#region src/question/renderers/QuestionOrderingView.tsx
8167
- function ed({ item: e, messages: t, showAnswer: n }) {
8378
+ function hd({ item: e, messages: t, showAnswer: n }) {
8168
8379
  let { markerSuffix: r } = W(), { renderer: i } = K();
8169
8380
  return /* @__PURE__ */ o("div", {
8170
8381
  className: i.element,
8171
- children: [/* @__PURE__ */ a(vl, {
8382
+ children: [/* @__PURE__ */ a(Ml, {
8172
8383
  className: i["option-list"],
8173
- children: e.sortOptions.map((e, t) => /* @__PURE__ */ o(yl, {
8384
+ children: e.sortOptions.map((e, t) => /* @__PURE__ */ o(Nl, {
8174
8385
  className: i["option-item"],
8175
8386
  children: [/* @__PURE__ */ o("span", {
8176
8387
  className: i.marker,
@@ -8178,22 +8389,39 @@ function ed({ item: e, messages: t, showAnswer: n }) {
8178
8389
  }), /* @__PURE__ */ a(J, { content: e.content })]
8179
8390
  }, e.id))
8180
8391
  }), n ? /* @__PURE__ */ a(Y, {
8181
- groups: gu(e),
8392
+ groups: Mu(e),
8182
8393
  title: t.standardAnswer
8183
8394
  }) : null]
8184
8395
  });
8185
8396
  }
8186
8397
  //#endregion
8398
+ //#region src/question/renderers/QuestionTextMarkerView.tsx
8399
+ function gd({ item: e, messages: t, showAnswer: n }) {
8400
+ let r = Et(e.content.json).filter((t) => e.answers.includes(t.markerId)).map((e) => e.text);
8401
+ return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(Pu, {
8402
+ answerMarkers: e.answers,
8403
+ content: e.content,
8404
+ showAnswer: n
8405
+ }), n ? /* @__PURE__ */ a(Y, {
8406
+ groups: [{
8407
+ kind: "detailed",
8408
+ contents: r,
8409
+ marker: t.standardAnswer
8410
+ }],
8411
+ title: t.standardAnswer
8412
+ }) : null] });
8413
+ }
8414
+ //#endregion
8187
8415
  //#region src/question/renderers/QuestionWordBuilderView.tsx
8188
- function td({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
8189
- let s = W(), { renderer: c } = K(), l = kn(t, !0, e), u = wu(l, (e, t) => s.blankAnswerMarker(e, t, n, r.blankLabel));
8416
+ function _d({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
8417
+ let s = W(), { renderer: c } = K(), l = kn(t, !0, e), u = zu(l, (e, t) => s.blankAnswerMarker(e, t, n, r.blankLabel));
8190
8418
  return /* @__PURE__ */ o("div", {
8191
8419
  className: c.element,
8192
8420
  children: [
8193
- /* @__PURE__ */ a(Dl, {
8421
+ /* @__PURE__ */ a(Vl, {
8194
8422
  content: l.content,
8195
8423
  renderBlank: ({ blankId: e, index: t, label: i }) => /* @__PURE__ */ a("span", {
8196
- "aria-label": s.blankPlaceholder === "answer-line" ? el(t + 1, n) : i || `${r.blankLabel}${t + 1}`,
8424
+ "aria-label": s.blankPlaceholder === "answer-line" ? ml(t + 1, n) : i || `${r.blankLabel}${t + 1}`,
8197
8425
  className: c["word-builder-blank"],
8198
8426
  "data-blank-id": e
8199
8427
  })
@@ -8203,11 +8431,11 @@ function td({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
8203
8431
  children: [/* @__PURE__ */ a("span", {
8204
8432
  className: c["section-title"],
8205
8433
  children: r.candidateOptions
8206
- }), /* @__PURE__ */ a(uu, {
8434
+ }), /* @__PURE__ */ a(wu, {
8207
8435
  className: c["word-builder-candidate-list"],
8208
8436
  columnCount: Math.min(l.candidateOptions.length, 4),
8209
8437
  role: "list",
8210
- children: l.candidateOptions.map((e, t) => /* @__PURE__ */ a(yl, {
8438
+ children: l.candidateOptions.map((e, t) => /* @__PURE__ */ a(Nl, {
8211
8439
  className: c["candidate-item"],
8212
8440
  children: e
8213
8441
  }, `${e}-${t}`))
@@ -8222,25 +8450,25 @@ function td({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
8222
8450
  }
8223
8451
  //#endregion
8224
8452
  //#region src/question/renderers/QuestionContentElementView.tsx
8225
- function nd({ element: e, item: t, judgementStem: n, locale: r, messages: i, showAnswer: o }) {
8453
+ function vd({ element: e, item: t, judgementStem: n, locale: r, messages: i, showAnswer: o }) {
8226
8454
  let { textResponseVisibility: s } = W(), { textResponse: c } = K();
8227
8455
  if (e.type !== t.type) throw Error(`\u9898\u76ee\u5143\u7d20\u7ed3\u6784\u4e0d\u5339\u914d\uff0cexpected=${e.type}\uff0cactual=${t.type}`);
8228
- return e.type === "richText" ? /* @__PURE__ */ a(J, { content: t.content }) : e.type === "textResponse" ? s === "hidden" ? null : /* @__PURE__ */ a(Bu, {
8456
+ return e.type === "richText" ? /* @__PURE__ */ a(J, { content: t.content }) : e.type === "textResponse" ? s === "hidden" ? null : /* @__PURE__ */ a(td, {
8229
8457
  className: c.placeholder,
8230
8458
  label: i.textResponsePlaceholder
8231
- }) : e.type === "ordering" ? /* @__PURE__ */ a(ed, {
8459
+ }) : e.type === "ordering" ? /* @__PURE__ */ a(hd, {
8232
8460
  item: t,
8233
8461
  messages: i,
8234
8462
  showAnswer: o
8235
- }) : e.type === "classification" ? /* @__PURE__ */ a(Ku, {
8463
+ }) : e.type === "classification" ? /* @__PURE__ */ a(sd, {
8236
8464
  item: t,
8237
8465
  messages: i,
8238
8466
  showAnswer: o
8239
- }) : e.type === "textMarker" ? /* @__PURE__ */ a(xu, {
8467
+ }) : e.type === "textMarker" ? /* @__PURE__ */ a(gd, {
8240
8468
  item: t,
8241
8469
  messages: i,
8242
8470
  showAnswer: o
8243
- }) : rd({
8471
+ }) : yd({
8244
8472
  element: e,
8245
8473
  item: t,
8246
8474
  judgementStem: n,
@@ -8249,48 +8477,48 @@ function nd({ element: e, item: t, judgementStem: n, locale: r, messages: i, sho
8249
8477
  showAnswer: o
8250
8478
  });
8251
8479
  }
8252
- function rd({ element: e, item: t, judgementStem: n, locale: r, messages: i, showAnswer: o }) {
8480
+ function yd({ element: e, item: t, judgementStem: n, locale: r, messages: i, showAnswer: o }) {
8253
8481
  switch (e.type) {
8254
- case "choice": return /* @__PURE__ */ a(Qu, {
8482
+ case "choice": return /* @__PURE__ */ a(pd, {
8255
8483
  element: e,
8256
8484
  item: t,
8257
8485
  locale: r,
8258
8486
  messages: i,
8259
8487
  showAnswer: o
8260
8488
  });
8261
- case "fill": return /* @__PURE__ */ a(Wu, {
8489
+ case "fill": return /* @__PURE__ */ a(ad, {
8262
8490
  item: t,
8263
8491
  locale: r,
8264
8492
  messages: i,
8265
8493
  showAnswer: o
8266
8494
  });
8267
- case "inlineFill": return /* @__PURE__ */ a(qu, {
8495
+ case "inlineFill": return /* @__PURE__ */ a(cd, {
8268
8496
  element: e,
8269
8497
  item: t,
8270
8498
  locale: r,
8271
8499
  messages: i,
8272
8500
  showAnswer: o
8273
8501
  });
8274
- case "wordBuilder": return /* @__PURE__ */ a(td, {
8502
+ case "wordBuilder": return /* @__PURE__ */ a(_d, {
8275
8503
  element: e,
8276
8504
  item: t,
8277
8505
  locale: r,
8278
8506
  messages: i,
8279
8507
  showAnswer: o
8280
8508
  });
8281
- case "judgement": return /* @__PURE__ */ a(Yu, {
8509
+ case "judgement": return /* @__PURE__ */ a(ud, {
8282
8510
  element: e,
8283
8511
  item: t,
8284
8512
  stem: n,
8285
8513
  messages: i,
8286
8514
  showAnswer: o
8287
8515
  });
8288
- case "lineConnect": return /* @__PURE__ */ a(Xu, {
8516
+ case "lineConnect": return /* @__PURE__ */ a(dd, {
8289
8517
  item: t,
8290
8518
  messages: i,
8291
8519
  showAnswer: o
8292
8520
  });
8293
- case "matching": return /* @__PURE__ */ a(Zu, {
8521
+ case "matching": return /* @__PURE__ */ a(fd, {
8294
8522
  item: t,
8295
8523
  messages: i,
8296
8524
  showAnswer: o
@@ -8299,7 +8527,7 @@ function rd({ element: e, item: t, judgementStem: n, locale: r, messages: i, sho
8299
8527
  }
8300
8528
  //#endregion
8301
8529
  //#region src/question/preview/question-preview-layout.ts
8302
- var id = l({
8530
+ var bd = l({
8303
8531
  root: "_root_13x11_1",
8304
8532
  empty: "_empty_13x11_17",
8305
8533
  "element-list": "_element-list_13x11_29",
@@ -8308,13 +8536,13 @@ var id = l({
8308
8536
  extra: "_extra_13x11_40",
8309
8537
  child: "_child_13x11_30"
8310
8538
  });
8311
- function ad() {
8312
- return d(id);
8539
+ function xd() {
8540
+ return d(bd);
8313
8541
  }
8314
8542
  //#endregion
8315
8543
  //#region src/question/preview/QuestionCompositePreview.tsx
8316
- function od({ childIndexPath: e = [], messages: t, renderChild: n, rootQuestionNumber: r, value: i }) {
8317
- let o = ad();
8544
+ function Sd({ childIndexPath: e = [], messages: t, renderChild: n, rootQuestionNumber: r, value: i }) {
8545
+ let o = xd();
8318
8546
  return i.children.length === 0 ? /* @__PURE__ */ a("div", {
8319
8547
  className: o.empty,
8320
8548
  children: t.previewEmpty
@@ -8335,12 +8563,12 @@ function od({ childIndexPath: e = [], messages: t, renderChild: n, rootQuestionN
8335
8563
  }
8336
8564
  //#endregion
8337
8565
  //#region src/question/preview/QuestionPreviewContent.tsx
8338
- var sd = ["locale"];
8339
- function cd(e) {
8340
- let { locale: t = "zh-CN" } = e, n = Oa(e, sd), r = ks(n.value, n.questionTypeTemplates);
8341
- return /* @__PURE__ */ a(cl.Provider, {
8566
+ var Cd = ["locale"];
8567
+ function wd(e) {
8568
+ let { locale: t = "zh-CN" } = e, n = Oa(e, Cd), r = ks(n.value, n.questionTypeTemplates);
8569
+ return /* @__PURE__ */ a(Sl.Provider, {
8342
8570
  value: t,
8343
- children: /* @__PURE__ */ a(ld, j(j({}, n), {}, {
8571
+ children: /* @__PURE__ */ a(Td, j(j({}, n), {}, {
8344
8572
  childIndexPath: [],
8345
8573
  locale: t,
8346
8574
  messages: Bc(t),
@@ -8348,8 +8576,8 @@ function cd(e) {
8348
8576
  }))
8349
8577
  });
8350
8578
  }
8351
- function ld({ childIndexPath: e, className: t, locale: n, messages: r, presentation: s, rootQuestionNumber: c, showAnswer: l = !1, showExtraAttributes: u = !1, questionTypeTemplates: d, value: f }) {
8352
- let p = ad(), m = da(d, f);
8579
+ function Td({ childIndexPath: e, className: t, locale: n, messages: r, presentation: s, rootQuestionNumber: c, showAnswer: l = !1, showExtraAttributes: u = !1, questionTypeTemplates: d, value: f }) {
8580
+ let p = xd(), m = da(d, f);
8353
8581
  if (!m) return /* @__PURE__ */ a("div", {
8354
8582
  className: U(p.root, t),
8355
8583
  "data-locale": n,
@@ -8363,11 +8591,11 @@ function ld({ childIndexPath: e, className: t, locale: n, messages: r, presentat
8363
8591
  className: p["element-list"],
8364
8592
  children: m.elements.map((e, t) => {
8365
8593
  var i;
8366
- if (s === "print" && e.type === "richText" && ((i = dd(m.elements, t + 1)) == null ? void 0 : i.type) === "judgement") return null;
8367
- let o = cn(f, t, e), c = s === "print" ? ud(m, f, t) : void 0;
8594
+ if (s === "print" && e.type === "richText" && ((i = Dd(m.elements, t + 1)) == null ? void 0 : i.type) === "judgement") return null;
8595
+ let o = cn(f, t, e), c = s === "print" ? Ed(m, f, t) : void 0;
8368
8596
  return /* @__PURE__ */ a("section", {
8369
8597
  className: p.element,
8370
- children: /* @__PURE__ */ a(nd, {
8598
+ children: /* @__PURE__ */ a(vd, {
8371
8599
  element: e,
8372
8600
  item: o,
8373
8601
  judgementStem: c,
@@ -8383,19 +8611,19 @@ function ld({ childIndexPath: e, className: t, locale: n, messages: r, presentat
8383
8611
  let i = ln(f, t, e);
8384
8612
  return F(i.content) ? null : /* @__PURE__ */ o("section", {
8385
8613
  className: p.extra,
8386
- children: [/* @__PURE__ */ a(gl, { children: e.name }), /* @__PURE__ */ a(nd, {
8387
- element: pd(e),
8388
- item: md(i),
8614
+ children: [/* @__PURE__ */ a(Al, { children: e.name }), /* @__PURE__ */ a(vd, {
8615
+ element: kd(e),
8616
+ item: Ad(i),
8389
8617
  locale: n,
8390
8618
  messages: r,
8391
8619
  showAnswer: !1
8392
8620
  })]
8393
8621
  }, `${e.type}-${t}`);
8394
8622
  })
8395
- }) : null, _ = f.children.length === 0 ? null : /* @__PURE__ */ a(od, {
8623
+ }) : null, _ = f.children.length === 0 ? null : /* @__PURE__ */ a(Sd, {
8396
8624
  childIndexPath: e,
8397
8625
  messages: r,
8398
- renderChild: (e, t) => /* @__PURE__ */ a(ld, {
8626
+ renderChild: (e, t) => /* @__PURE__ */ a(Td, {
8399
8627
  childIndexPath: t,
8400
8628
  locale: n,
8401
8629
  messages: r,
@@ -8413,7 +8641,7 @@ function ld({ childIndexPath: e, className: t, locale: n, messages: r, presentat
8413
8641
  className: U(p.root, t),
8414
8642
  "data-locale": n,
8415
8643
  "data-question-presentation": s,
8416
- children: fd(m, f) ? /* @__PURE__ */ a("div", {
8644
+ children: Od(m, f) ? /* @__PURE__ */ a("div", {
8417
8645
  className: p.empty,
8418
8646
  children: r.previewEmpty
8419
8647
  }) : /* @__PURE__ */ o(i, { children: [
@@ -8423,24 +8651,24 @@ function ld({ childIndexPath: e, className: t, locale: n, messages: r, presentat
8423
8651
  ] })
8424
8652
  });
8425
8653
  }
8426
- function ud(e, t, n) {
8427
- let r = dd(e.elements, n), i = dd(e.elements, n - 1);
8654
+ function Ed(e, t, n) {
8655
+ let r = Dd(e.elements, n), i = Dd(e.elements, n - 1);
8428
8656
  if (!((r == null ? void 0 : r.type) !== "judgement" || (i == null ? void 0 : i.type) !== "richText")) return cn(t, n - 1, i).content;
8429
8657
  }
8430
- function dd(e, t) {
8658
+ function Dd(e, t) {
8431
8659
  return t >= 0 ? e.slice(t, t + 1)[0] : void 0;
8432
8660
  }
8433
- function fd(e, t) {
8661
+ function Od(e, t) {
8434
8662
  return t.elements.length === 0 && t.extras.length === 0 && t.children.length === 0;
8435
8663
  }
8436
- function pd(e) {
8664
+ function kd(e) {
8437
8665
  return {
8438
8666
  config: {},
8439
8667
  name: e.name,
8440
8668
  type: "richText"
8441
8669
  };
8442
8670
  }
8443
- function md(e) {
8671
+ function Ad(e) {
8444
8672
  return {
8445
8673
  content: e.content,
8446
8674
  type: "richText"
@@ -8448,12 +8676,12 @@ function md(e) {
8448
8676
  }
8449
8677
  //#endregion
8450
8678
  //#region src/question/preview/QuestionPreview.tsx
8451
- function hd(e) {
8452
- return /* @__PURE__ */ a(cd, j(j({}, e), {}, { presentation: "preview" }));
8679
+ function jd(e) {
8680
+ return /* @__PURE__ */ a(wd, j(j({}, e), {}, { presentation: "preview" }));
8453
8681
  }
8454
8682
  //#endregion
8455
8683
  //#region src/question/preview/QuestionPrintAnswer.module.css
8456
- var gd = {
8684
+ var Md = {
8457
8685
  "answer-panel": "_answer-panel_1yaiz_1",
8458
8686
  "answer-list": "_answer-list_1yaiz_8",
8459
8687
  "answer-row": "_answer-row_1yaiz_20",
@@ -8461,11 +8689,11 @@ var gd = {
8461
8689
  "answer-marker-only": "_answer-marker-only_1yaiz_39",
8462
8690
  "answer-content-list": "_answer-content-list_1yaiz_43",
8463
8691
  "answer-value": "_answer-value_1yaiz_49"
8464
- }, _d = {
8692
+ }, Nd = {
8465
8693
  "blank-list": "_blank-list_14bj2_1",
8466
8694
  "blank-item": "_blank-item_14bj2_9",
8467
8695
  "blank-field": "_blank-field_14bj2_15"
8468
- }, vd = {
8696
+ }, Pd = {
8469
8697
  board: "_board_fqylx_1",
8470
8698
  pool: "_pool_fqylx_5",
8471
8699
  zones: "_zones_fqylx_11",
@@ -8473,17 +8701,17 @@ var gd = {
8473
8701
  "zone-title": "_zone-title_fqylx_22",
8474
8702
  item: "_item_fqylx_28",
8475
8703
  empty: "_empty_fqylx_34"
8476
- }, yd = {
8704
+ }, Fd = {
8477
8705
  board: "_board_1qh77_1",
8478
8706
  columns: "_columns_1qh77_6",
8479
8707
  "column-title": "_column-title_1qh77_11"
8480
- }, bd = {
8708
+ }, Id = {
8481
8709
  board: "_board_rmc9z_1",
8482
8710
  columns: "_columns_rmc9z_5"
8483
- }, xd = {
8711
+ }, Ld = {
8484
8712
  media: "_media_a9b7d_1",
8485
8713
  "math-inline": "_math-inline_a9b7d_9"
8486
- }, Sd = {
8714
+ }, Rd = {
8487
8715
  "rich-content": "_rich-content_6llgo_1",
8488
8716
  element: "_element_6llgo_61",
8489
8717
  "option-list": "_option-list_6llgo_63",
@@ -8502,34 +8730,34 @@ var gd = {
8502
8730
  "section-title": "_section-title_6llgo_142",
8503
8731
  "word-builder-blank": "_word-builder-blank_6llgo_148",
8504
8732
  "word-builder-candidate-list": "_word-builder-candidate-list_6llgo_162"
8505
- }, Cd = { title: "_title_1csak_1" }, wd = {
8733
+ }, zd = { title: "_title_1csak_1" }, Bd = {
8506
8734
  "table-wrap": "_table-wrap_1epdp_1",
8507
8735
  table: "_table_1epdp_1",
8508
8736
  "table-option-column": "_table-option-column_1epdp_13",
8509
8737
  "table-option-marker": "_table-option-marker_1epdp_31"
8510
- }, Td = {
8738
+ }, Vd = {
8511
8739
  content: "_content_1gnvb_1",
8512
8740
  paragraph: "_paragraph_1gnvb_10",
8513
8741
  marker: "_marker_1gnvb_14",
8514
8742
  "marker-button": "_marker-button_1gnvb_21",
8515
8743
  "marker-selected": "_marker-selected_1gnvb_30",
8516
8744
  "marker-answer": "_marker-answer_1gnvb_31"
8517
- }, Ed = { placeholder: "_placeholder_np8ps_1" }, Dd = {
8518
- column: Sd["labeled-column"],
8519
- item: Sd["labeled-item"],
8520
- marker: Sd["labeled-marker"]
8521
- }, Od = {
8522
- answer: gd,
8523
- blankGroup: _d,
8524
- classification: vd,
8525
- lineConnect: j(j({}, yd), Dd),
8526
- matching: j(j({}, bd), Dd),
8527
- renderer: j(j({}, Sd), {}, { "rich-content": `${Sd["rich-content"]} ${xd.media}` }),
8528
- sectionTitle: Cd,
8529
- table: wd,
8530
- textMarker: Td,
8531
- textResponse: Ed
8532
- }, kd = {
8745
+ }, Hd = { placeholder: "_placeholder_np8ps_1" }, Ud = {
8746
+ column: Rd["labeled-column"],
8747
+ item: Rd["labeled-item"],
8748
+ marker: Rd["labeled-marker"]
8749
+ }, Wd = {
8750
+ answer: Md,
8751
+ blankGroup: Nd,
8752
+ classification: Pd,
8753
+ lineConnect: j(j({}, Fd), Ud),
8754
+ matching: j(j({}, Id), Ud),
8755
+ renderer: j(j({}, Rd), {}, { "rich-content": `${Rd["rich-content"]} ${Ld.media}` }),
8756
+ sectionTitle: zd,
8757
+ table: Bd,
8758
+ textMarker: Vd,
8759
+ textResponse: Hd
8760
+ }, Gd = {
8533
8761
  root: "_root_1mvma_1",
8534
8762
  empty: "_empty_1mvma_21",
8535
8763
  "element-list": "_element-list_1mvma_29",
@@ -8540,19 +8768,19 @@ var gd = {
8540
8768
  };
8541
8769
  //#endregion
8542
8770
  //#region src/question/preview/QuestionPrintPreview.tsx
8543
- function Ad(e) {
8544
- return /* @__PURE__ */ a(sl.Provider, {
8545
- value: ol,
8546
- children: /* @__PURE__ */ a(hl.Provider, {
8547
- value: Od,
8548
- children: /* @__PURE__ */ a(id.Provider, {
8549
- value: kd,
8550
- children: /* @__PURE__ */ a(cd, j(j({}, e), {}, { presentation: "print" }))
8771
+ function Kd(e) {
8772
+ return /* @__PURE__ */ a(xl.Provider, {
8773
+ value: bl,
8774
+ children: /* @__PURE__ */ a(kl.Provider, {
8775
+ value: Wd,
8776
+ children: /* @__PURE__ */ a(bd.Provider, {
8777
+ value: Gd,
8778
+ children: /* @__PURE__ */ a(wd, j(j({}, e), {}, { presentation: "print" }))
8551
8779
  })
8552
8780
  })
8553
8781
  });
8554
8782
  }
8555
- var jd = {
8783
+ var qd = {
8556
8784
  root: "_root_17bqr_1",
8557
8785
  toolbar: "_toolbar_17bqr_26",
8558
8786
  "toolbar-title": "_toolbar-title_17bqr_36",
@@ -8604,7 +8832,7 @@ var jd = {
8604
8832
  "palette-section": "_palette-section_vhj2r_56",
8605
8833
  "palette-section-title": "_palette-section-title_vhj2r_62",
8606
8834
  "palette-button": "_palette-button_vhj2r_70"
8607
- }, Md = {
8835
+ }, Jd = {
8608
8836
  "en-US": {
8609
8837
  addElement: "Add element",
8610
8838
  addExtra: "Add extra attribute",
@@ -8826,24 +9054,24 @@ var jd = {
8826
9054
  wordBuilderLabel: "\u7ec4\u8bcd\u62fc\u5199"
8827
9055
  }
8828
9056
  };
8829
- function Nd(e, t) {
9057
+ function Yd(e, t) {
8830
9058
  var n;
8831
9059
  return (n = e.extraDescriptions.get(t)) == null ? t : n;
8832
9060
  }
8833
- function Pd(e, t) {
9061
+ function Xd(e, t) {
8834
9062
  var n;
8835
9063
  return (n = e.extraLabels.get(t)) == null ? t : n;
8836
9064
  }
8837
- function Fd(e) {
9065
+ function Zd(e) {
8838
9066
  switch (e) {
8839
- case "en-US": return Md["en-US"];
8840
- case "zh-CN": return Md["zh-CN"];
9067
+ case "en-US": return Jd["en-US"];
9068
+ case "zh-CN": return Jd["zh-CN"];
8841
9069
  }
8842
9070
  }
8843
- function Id(e, t) {
8844
- return t === "richText" ? e.richTextDescription : t === "ordering" ? e.orderingDescription : zd(e, t);
9071
+ function Qd(e, t) {
9072
+ return t === "richText" ? e.richTextDescription : t === "ordering" ? e.orderingDescription : tf(e, t);
8845
9073
  }
8846
- var Ld = {
9074
+ var $d = {
8847
9075
  choice: (e) => e.optionGroupDescription,
8848
9076
  classification: (e) => e.classificationDescription,
8849
9077
  fill: (e) => e.blankGroupDescription,
@@ -8854,7 +9082,7 @@ var Ld = {
8854
9082
  textMarker: (e) => e.textMarkerDescription,
8855
9083
  textResponse: (e) => e.textResponseDescription,
8856
9084
  wordBuilder: (e) => e.wordBuilderDescription
8857
- }, Rd = {
9085
+ }, ef = {
8858
9086
  choice: (e) => e.optionGroupLabel,
8859
9087
  classification: (e) => e.classificationLabel,
8860
9088
  fill: (e) => e.blankGroupLabel,
@@ -8866,30 +9094,30 @@ var Ld = {
8866
9094
  textResponse: (e) => e.textResponseLabel,
8867
9095
  wordBuilder: (e) => e.wordBuilderLabel
8868
9096
  };
8869
- function zd(e, t) {
8870
- return Ld[t](e);
9097
+ function tf(e, t) {
9098
+ return $d[t](e);
8871
9099
  }
8872
- function Bd(e, t) {
8873
- return t === "richText" ? e.richTextLabel : t === "ordering" ? e.orderingLabel : Vd(e, t);
9100
+ function nf(e, t) {
9101
+ return t === "richText" ? e.richTextLabel : t === "ordering" ? e.orderingLabel : rf(e, t);
8874
9102
  }
8875
- function Vd(e, t) {
8876
- return Rd[t](e);
9103
+ function rf(e, t) {
9104
+ return ef[t](e);
8877
9105
  }
8878
- function Hd(e, t) {
9106
+ function af(e, t) {
8879
9107
  var n;
8880
9108
  return (n = e.optionValueLabels.get(t)) == null ? t : n;
8881
9109
  }
8882
- function Ud(e, t) {
9110
+ function of(e, t) {
8883
9111
  var n;
8884
9112
  return (n = e.candidateModeValueLabels.get(t)) == null ? t : n;
8885
9113
  }
8886
- function Wd(e, t) {
9114
+ function sf(e, t) {
8887
9115
  var n;
8888
9116
  return (n = e.lineConnectLabelStyleLabels.get(t)) == null ? t : n;
8889
9117
  }
8890
9118
  //#endregion
8891
9119
  //#region src/question/structure-editor/QuestionStructureCanvas.tsx
8892
- function Gd({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExtra: i, onMoveElement: s, onSelectElement: c, selectedElementClientId: l }) {
9120
+ function cf({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExtra: i, onMoveElement: s, onSelectElement: c, selectedElementClientId: l }) {
8893
9121
  let [u, d] = h(null);
8894
9122
  return /* @__PURE__ */ o("section", {
8895
9123
  className: Q.panel,
@@ -8909,7 +9137,7 @@ function Gd({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExt
8909
9137
  className: Z["element-list"],
8910
9138
  children: [
8911
9139
  e.map((t, i) => {
8912
- let f = t.clientId === l, p = Bd(n, t.type);
9140
+ let f = t.clientId === l, p = nf(n, t.type);
8913
9141
  return /* @__PURE__ */ o("div", {
8914
9142
  className: `${Z["element-card"]} ${f ? Z.active : ""}`,
8915
9143
  onClick: () => c(t.clientId),
@@ -8973,7 +9201,7 @@ function Gd({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExt
8973
9201
  children: n.extraTitle
8974
9202
  }) : null,
8975
9203
  t.map((t, r) => {
8976
- let s = t.clientId === l, f = Pd(n, t.type);
9204
+ let s = t.clientId === l, f = Xd(n, t.type);
8977
9205
  return /* @__PURE__ */ o("div", {
8978
9206
  className: `${Z["element-card"]} ${s ? Z.active : ""}`,
8979
9207
  onClick: () => c(t.clientId),
@@ -9022,7 +9250,7 @@ function Gd({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExt
9022
9250
  }
9023
9251
  //#endregion
9024
9252
  //#region src/question/structure-editor/QuestionStructurePalette.tsx
9025
- function Kd({ addedExtraTypes: e, labels: t, onAddElement: n, onAddExtra: r }) {
9253
+ function lf({ addedExtraTypes: e, labels: t, onAddElement: n, onAddExtra: r }) {
9026
9254
  let i = new Set(e);
9027
9255
  return /* @__PURE__ */ o("aside", {
9028
9256
  className: Q.panel,
@@ -9037,11 +9265,11 @@ function Kd({ addedExtraTypes: e, labels: t, onAddElement: n, onAddExtra: r }) {
9037
9265
  /* @__PURE__ */ a("div", {
9038
9266
  className: Q.palette,
9039
9267
  children: ae.map((e) => /* @__PURE__ */ o("button", {
9040
- "aria-label": `${t.addElement}: ${Bd(t, e)}`,
9268
+ "aria-label": `${t.addElement}: ${nf(t, e)}`,
9041
9269
  className: Q["palette-button"],
9042
9270
  onClick: () => n(e),
9043
9271
  type: "button",
9044
- children: [/* @__PURE__ */ a("strong", { children: Bd(t, e) }), /* @__PURE__ */ a("small", { children: Id(t, e) })]
9272
+ children: [/* @__PURE__ */ a("strong", { children: nf(t, e) }), /* @__PURE__ */ a("small", { children: Qd(t, e) })]
9045
9273
  }, e))
9046
9274
  }),
9047
9275
  /* @__PURE__ */ o("div", {
@@ -9054,12 +9282,12 @@ function Kd({ addedExtraTypes: e, labels: t, onAddElement: n, onAddExtra: r }) {
9054
9282
  children: oe.map((e) => {
9055
9283
  let n = i.has(e);
9056
9284
  return /* @__PURE__ */ o("button", {
9057
- "aria-label": `${t.addExtra}: ${Pd(t, e)}`,
9285
+ "aria-label": `${t.addExtra}: ${Xd(t, e)}`,
9058
9286
  className: Q["palette-button"],
9059
9287
  disabled: n,
9060
9288
  onClick: () => r(e),
9061
9289
  type: "button",
9062
- children: [/* @__PURE__ */ a("strong", { children: Pd(t, e) }), /* @__PURE__ */ a("small", { children: Nd(t, e) })]
9290
+ children: [/* @__PURE__ */ a("strong", { children: Xd(t, e) }), /* @__PURE__ */ a("small", { children: Yd(t, e) })]
9063
9291
  }, e);
9064
9292
  })
9065
9293
  })]
@@ -9076,27 +9304,27 @@ var $ = {
9076
9304
  select: "_select_tgswd_27",
9077
9305
  textarea: "_textarea_tgswd_28",
9078
9306
  empty: "_empty_tgswd_61"
9079
- }, qd = [
9307
+ }, uf = [
9080
9308
  "none",
9081
9309
  "sharedPool",
9082
9310
  "perBlankOptions"
9083
- ], Jd = [
9311
+ ], df = [
9084
9312
  "upperAlpha",
9085
9313
  "lowerAlpha",
9086
9314
  "number"
9087
- ], Yd = [
9315
+ ], ff = [
9088
9316
  "number",
9089
9317
  "upperAlpha",
9090
9318
  "lowerAlpha",
9091
9319
  "lowerRoman",
9092
9320
  "chineseNumber",
9093
9321
  "none"
9094
- ], Xd = [
9322
+ ], pf = [
9095
9323
  2,
9096
9324
  3,
9097
9325
  4,
9098
9326
  5
9099
- ], Zd = ["standard", "table"], Qd = ["single", "multiple"], $d = ["spelling", "sentence"], ef = [
9327
+ ], mf = ["standard", "table"], hf = ["single", "multiple"], gf = ["spelling", "sentence"], _f = [
9100
9328
  "correctWrong",
9101
9329
  "yesNo",
9102
9330
  "validInvalid",
@@ -9104,8 +9332,8 @@ var $ = {
9104
9332
  "rightWrong",
9105
9333
  "checkCross"
9106
9334
  ];
9107
- function tf({ description: e, globalConfig: t, isSubjective: n, labels: r, onElementChange: i, onExtraChange: s, onGlobalConfigChange: c, onMetadataChange: l, selectedExtra: u, selectedElement: d }) {
9108
- let f = nf({
9335
+ function vf({ description: e, globalConfig: t, isSubjective: n, labels: r, onElementChange: i, onExtraChange: s, onGlobalConfigChange: c, onMetadataChange: l, selectedExtra: u, selectedElement: d }) {
9336
+ let f = yf({
9109
9337
  labels: r,
9110
9338
  onElementChange: i,
9111
9339
  onExtraChange: s,
@@ -9187,7 +9415,7 @@ function tf({ description: e, globalConfig: t, isSubjective: n, labels: r, onEle
9187
9415
  })]
9188
9416
  });
9189
9417
  }
9190
- function nf({ labels: e, onElementChange: t, onExtraChange: n, selectedElement: r, selectedExtra: i }) {
9418
+ function yf({ labels: e, onElementChange: t, onExtraChange: n, selectedElement: r, selectedExtra: i }) {
9191
9419
  return r ? /* @__PURE__ */ o("div", {
9192
9420
  className: $["form-stack"],
9193
9421
  children: [
@@ -9207,7 +9435,7 @@ function nf({ labels: e, onElementChange: t, onExtraChange: n, selectedElement:
9207
9435
  value: r.enName
9208
9436
  })]
9209
9437
  }),
9210
- rf(r, e, t)
9438
+ bf(r, e, t)
9211
9439
  ]
9212
9440
  }) : i ? /* @__PURE__ */ o("div", {
9213
9441
  className: $["form-stack"],
@@ -9231,10 +9459,10 @@ function nf({ labels: e, onElementChange: t, onExtraChange: n, selectedElement:
9231
9459
  children: e.noElement
9232
9460
  });
9233
9461
  }
9234
- function rf(e, t, n) {
9235
- return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" || e.type === "textResponse" ? null : af(e, t, n);
9462
+ function bf(e, t, n) {
9463
+ return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" || e.type === "textResponse" ? null : xf(e, t, n);
9236
9464
  }
9237
- function af(e, t, n) {
9465
+ function xf(e, t, n) {
9238
9466
  switch (e.type) {
9239
9467
  case "inlineFill": return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ o("label", {
9240
9468
  className: $["form-row"],
@@ -9242,9 +9470,9 @@ function af(e, t, n) {
9242
9470
  className: $.select,
9243
9471
  onChange: (t) => n(j(j({}, e), {}, { config: j(j({}, e.config), {}, { candidateMode: t.target.value }) })),
9244
9472
  value: e.config.candidateMode,
9245
- children: qd.map((e) => /* @__PURE__ */ a("option", {
9473
+ children: uf.map((e) => /* @__PURE__ */ a("option", {
9246
9474
  value: e,
9247
- children: Ud(t, e)
9475
+ children: of(t, e)
9248
9476
  }, e))
9249
9477
  })]
9250
9478
  }), /* @__PURE__ */ o("label", {
@@ -9261,9 +9489,9 @@ function af(e, t, n) {
9261
9489
  className: $.select,
9262
9490
  onChange: (t) => n(j(j({}, e), {}, { config: { builderMode: t.target.value } })),
9263
9491
  value: e.config.builderMode,
9264
- children: $d.map((e) => /* @__PURE__ */ a("option", {
9492
+ children: gf.map((e) => /* @__PURE__ */ a("option", {
9265
9493
  value: e,
9266
- children: Hd(t, e)
9494
+ children: af(t, e)
9267
9495
  }, e))
9268
9496
  })]
9269
9497
  });
@@ -9273,18 +9501,18 @@ function af(e, t, n) {
9273
9501
  className: $.select,
9274
9502
  onChange: (t) => n(j(j({}, e), {}, { config: { judgeAnswerMode: t.target.value } })),
9275
9503
  value: e.config.judgeAnswerMode,
9276
- children: ef.map((e) => /* @__PURE__ */ a("option", {
9504
+ children: _f.map((e) => /* @__PURE__ */ a("option", {
9277
9505
  value: e,
9278
- children: Hd(t, e)
9506
+ children: af(t, e)
9279
9507
  }, e))
9280
9508
  })]
9281
9509
  });
9282
- case "choice": return of(e, t, n);
9283
- case "lineConnect": return sf(e, t, n);
9284
- case "matching": return cf(e, t, n);
9510
+ case "choice": return Sf(e, t, n);
9511
+ case "lineConnect": return Cf(e, t, n);
9512
+ case "matching": return wf(e, t, n);
9285
9513
  }
9286
9514
  }
9287
- function of(e, t, n) {
9515
+ function Sf(e, t, n) {
9288
9516
  return /* @__PURE__ */ o(i, { children: [
9289
9517
  /* @__PURE__ */ o("label", {
9290
9518
  className: $["form-row"],
@@ -9292,9 +9520,9 @@ function of(e, t, n) {
9292
9520
  className: $.select,
9293
9521
  onChange: (t) => n(j(j({}, e), {}, { config: j(j({}, e.config), {}, { selectionType: t.target.value }) })),
9294
9522
  value: e.config.selectionType,
9295
- children: Qd.map((e) => /* @__PURE__ */ a("option", {
9523
+ children: hf.map((e) => /* @__PURE__ */ a("option", {
9296
9524
  value: e,
9297
- children: Hd(t, e)
9525
+ children: af(t, e)
9298
9526
  }, e))
9299
9527
  })]
9300
9528
  }),
@@ -9304,9 +9532,9 @@ function of(e, t, n) {
9304
9532
  className: $.select,
9305
9533
  onChange: (t) => n(j(j({}, e), {}, { config: j(j({}, e.config), {}, { optionLabelStyle: t.target.value }) })),
9306
9534
  value: e.config.optionLabelStyle,
9307
- children: Jd.map((e) => /* @__PURE__ */ a("option", {
9535
+ children: df.map((e) => /* @__PURE__ */ a("option", {
9308
9536
  value: e,
9309
- children: Hd(t, e)
9537
+ children: af(t, e)
9310
9538
  }, e))
9311
9539
  })]
9312
9540
  }),
@@ -9316,23 +9544,23 @@ function of(e, t, n) {
9316
9544
  className: $.select,
9317
9545
  onChange: (t) => n(j(j({}, e), {}, { config: j(j({}, e.config), {}, { renderer: t.target.value }) })),
9318
9546
  value: e.config.renderer,
9319
- children: Zd.map((e) => /* @__PURE__ */ a("option", {
9547
+ children: mf.map((e) => /* @__PURE__ */ a("option", {
9320
9548
  value: e,
9321
- children: Hd(t, e)
9549
+ children: af(t, e)
9322
9550
  }, e))
9323
9551
  })]
9324
9552
  })
9325
9553
  ] });
9326
9554
  }
9327
- function sf(e, t, n) {
9328
- let r = lf(e.config.columns);
9555
+ function Cf(e, t, n) {
9556
+ let r = Tf(e.config.columns);
9329
9557
  return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ o("label", {
9330
9558
  className: $["form-row"],
9331
9559
  children: [/* @__PURE__ */ a("span", { children: t.lineConnectColumnCount }), /* @__PURE__ */ a("select", {
9332
9560
  className: $.select,
9333
- onChange: (t) => n(j(j({}, e), {}, { config: { columns: df(r, Number(t.target.value)) } })),
9561
+ onChange: (t) => n(j(j({}, e), {}, { config: { columns: Df(r, Number(t.target.value)) } })),
9334
9562
  value: r.length,
9335
- children: Xd.map((e) => /* @__PURE__ */ a("option", {
9563
+ children: pf.map((e) => /* @__PURE__ */ a("option", {
9336
9564
  value: e,
9337
9565
  children: e
9338
9566
  }, e))
@@ -9343,47 +9571,47 @@ function sf(e, t, n) {
9343
9571
  className: $.select,
9344
9572
  onChange: (t) => n(j(j({}, e), {}, { config: { columns: r.map((e, n) => n === s ? { labelStyle: t.target.value } : e) } })),
9345
9573
  value: i.labelStyle,
9346
- children: Yd.map((e) => /* @__PURE__ */ a("option", {
9574
+ children: ff.map((e) => /* @__PURE__ */ a("option", {
9347
9575
  value: e,
9348
- children: Wd(t, e)
9576
+ children: sf(t, e)
9349
9577
  }, e))
9350
9578
  })]
9351
9579
  }, `line-column-${s}`))] });
9352
9580
  }
9353
- function cf(e, t, n) {
9354
- let r = uf(e.config.columns);
9581
+ function wf(e, t, n) {
9582
+ let r = Ef(e.config.columns);
9355
9583
  return /* @__PURE__ */ a(i, { children: r.map((i, s) => /* @__PURE__ */ o("label", {
9356
9584
  className: $["form-row"],
9357
9585
  children: [/* @__PURE__ */ a("span", { children: t.lineConnectColumnLabel(s + 1) }), /* @__PURE__ */ a("select", {
9358
9586
  className: $.select,
9359
9587
  onChange: (t) => n(j(j({}, e), {}, { config: { columns: r.map((e, n) => n === s ? { labelStyle: t.target.value } : e) } })),
9360
9588
  value: i.labelStyle,
9361
- children: Yd.map((e) => /* @__PURE__ */ a("option", {
9589
+ children: ff.map((e) => /* @__PURE__ */ a("option", {
9362
9590
  value: e,
9363
- children: Wd(t, e)
9591
+ children: sf(t, e)
9364
9592
  }, e))
9365
9593
  })]
9366
9594
  }, `matching-column-${s}`)) });
9367
9595
  }
9368
- function lf(e) {
9596
+ function Tf(e) {
9369
9597
  let t = e.slice(0, 5);
9370
- return t.length >= 2 ? t : [...t, ...Yd.slice(t.length, 2).map((e) => ({ labelStyle: e }))];
9598
+ return t.length >= 2 ? t : [...t, ...ff.slice(t.length, 2).map((e) => ({ labelStyle: e }))];
9371
9599
  }
9372
- function uf(e) {
9600
+ function Ef(e) {
9373
9601
  let t = e.slice(0, 2);
9374
- return t.length >= 2 ? t : [...t, ...Yd.slice(t.length, 2).map((e) => ({ labelStyle: e }))];
9602
+ return t.length >= 2 ? t : [...t, ...ff.slice(t.length, 2).map((e) => ({ labelStyle: e }))];
9375
9603
  }
9376
- function df(e, t) {
9604
+ function Df(e, t) {
9377
9605
  return Array.from({ length: Math.min(5, Math.max(2, t)) }, (t, n) => {
9378
9606
  var r, i;
9379
- return (r = e.slice(n, n + 1)[0]) == null ? { labelStyle: (i = Yd[n]) == null ? "number" : i } : r;
9607
+ return (r = e.slice(n, n + 1)[0]) == null ? { labelStyle: (i = ff[n]) == null ? "number" : i } : r;
9380
9608
  });
9381
9609
  }
9382
9610
  //#endregion
9383
9611
  //#region src/question/structure-editor/QuestionStructureEditor.tsx
9384
- function ff({ locale: e = "zh-CN", onChange: t, value: n }) {
9612
+ function Of({ locale: e = "zh-CN", onChange: t, value: n }) {
9385
9613
  var r, i, s, c;
9386
- let l = Fd(e), [u, d] = h((r = (i = n.elements[0]) == null ? void 0 : i.clientId) == null ? null : r), { selectedElement: f, selectedExtra: p } = pf(n, u);
9614
+ let l = Zd(e), [u, d] = h((r = (i = n.elements[0]) == null ? void 0 : i.clientId) == null ? null : r), { selectedElement: f, selectedExtra: p } = kf(n, u);
9387
9615
  function m(e) {
9388
9616
  let r = pe(e, n.elements);
9389
9617
  t(j(j({}, n), {}, { elements: [...n.elements, r] })), d(r.clientId);
@@ -9395,11 +9623,11 @@ function ff({ locale: e = "zh-CN", onChange: t, value: n }) {
9395
9623
  }
9396
9624
  function _(e) {
9397
9625
  let r = _e(n, e);
9398
- t(r), d(mf(r));
9626
+ t(r), d(Af(r));
9399
9627
  }
9400
9628
  function v(e) {
9401
9629
  let r = ge(n, e);
9402
- t(r), d(mf(r));
9630
+ t(r), d(Af(r));
9403
9631
  }
9404
9632
  function y(e) {
9405
9633
  t(be(n, e.clientId, e));
@@ -9414,19 +9642,19 @@ function ff({ locale: e = "zh-CN", onChange: t, value: n }) {
9414
9642
  t(Se(n, e));
9415
9643
  }
9416
9644
  return /* @__PURE__ */ a("section", {
9417
- className: jd.root,
9645
+ className: qd.root,
9418
9646
  children: /* @__PURE__ */ a("div", {
9419
9647
  className: Q.shell,
9420
9648
  children: /* @__PURE__ */ o("div", {
9421
9649
  className: Q.grid,
9422
9650
  children: [
9423
- /* @__PURE__ */ a(Kd, {
9651
+ /* @__PURE__ */ a(lf, {
9424
9652
  addedExtraTypes: n.extras.map((e) => e.type),
9425
9653
  labels: l,
9426
9654
  onAddElement: m,
9427
9655
  onAddExtra: g
9428
9656
  }),
9429
- /* @__PURE__ */ a(Gd, {
9657
+ /* @__PURE__ */ a(cf, {
9430
9658
  elements: n.elements,
9431
9659
  extras: n.extras,
9432
9660
  labels: l,
@@ -9436,7 +9664,7 @@ function ff({ locale: e = "zh-CN", onChange: t, value: n }) {
9436
9664
  onSelectElement: d,
9437
9665
  selectedElementClientId: (s = (c = f == null ? void 0 : f.clientId) == null ? p == null ? void 0 : p.clientId : c) == null ? null : s
9438
9666
  }),
9439
- /* @__PURE__ */ a(tf, {
9667
+ /* @__PURE__ */ a(vf, {
9440
9668
  description: n.description,
9441
9669
  globalConfig: n.globalConfig,
9442
9670
  isSubjective: n.isSubjective,
@@ -9453,7 +9681,7 @@ function ff({ locale: e = "zh-CN", onChange: t, value: n }) {
9453
9681
  })
9454
9682
  });
9455
9683
  }
9456
- function pf(e, t) {
9684
+ function kf(e, t) {
9457
9685
  var n, r, i, a;
9458
9686
  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;
9459
9687
  return o || s ? {
@@ -9464,9 +9692,9 @@ function pf(e, t) {
9464
9692
  selectedExtra: e.elements[0] || (a = e.extras[0]) == null ? null : a
9465
9693
  };
9466
9694
  }
9467
- function mf(e) {
9695
+ function Af(e) {
9468
9696
  var t, n, r, i;
9469
9697
  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;
9470
9698
  }
9471
9699
  //#endregion
9472
- export { fs as QuestionContentEditor, ju as QuestionPlayer, hd as QuestionPreview, Ad as QuestionPrintPreview, J as QuestionRichContentView, ff as QuestionStructureEditor, qn as addBlankToGroup, xn as alignQuestionContentDraftWithStructure, Zn as assignBlankToAnswerGroup, ro as cn, Qn as createBlankAnswerGroupWithBlank, Qt as createEmptyQuestionContentDraft, ec as createEmptyQuestionPlayerResponse, de as createEmptyQuestionStructureDraft, bn as createQuestionContentDraftFromSerialized, k as createQuestionContentId, hs as createQuestionContentStructureFromDraft, gs as createQuestionPreviewDraft, pe as createQuestionStructureElement, fe as createQuestionStructureExtra, P as createRichContentValue, rn as createRichContentValueFromDocument, Me as createRichTextContent, Jn as deleteBlankFromGroup, _e as deleteQuestionStructureElement, ge as deleteQuestionStructureExtra, $n as detachBlankFromAnswerGroup, la as findQuestionContentQuestionTypeStructure, pa as findQuestionContentQuestionTypeTemplate, pn as getQuestionContentJudgementOptions, un as getQuestionContentOptionMarker, on as getQuestionContentTextMarkerAnswerText, vs as getQuestionStructureDraftChangeKind, N as getQuestionStructureElementDefaultEnName, M as getQuestionStructureElementDefaultName, we as getQuestionStructureExtraDefaultEnName, Ce as getQuestionStructureExtraDefaultName, sn as getRichContentDocument, Xn as getSharedBlankAnswerGroups, Zt as isCompositeQuestionContentStructure, vn as isQuestionContentDraftEmpty, ve as moveQuestionStructureElement, An as normalizeFillTextCandidateState, Ne as normalizeRichTextContent, ae as questionStructureElementTypes, oe as questionStructureExtraTypes, ma as reconcileQuestionContentDraftWithTemplates, yn as serializeQuestionContentDraft, _s as serializeQuestionStructureDraft, be as updateQuestionStructureElement, ye as updateQuestionStructureExtra, xe as updateQuestionStructureGlobalConfig, Se as updateQuestionStructureMetadata };
9700
+ export { fs as QuestionContentEditor, ed as QuestionPlayer, jd as QuestionPreview, Kd as QuestionPrintPreview, J as QuestionRichContentView, Of as QuestionStructureEditor, qn as addBlankToGroup, xn as alignQuestionContentDraftWithStructure, Zn as assignBlankToAnswerGroup, ro as cn, Qn as createBlankAnswerGroupWithBlank, Qt as createEmptyQuestionContentDraft, ec as createEmptyQuestionPlayerResponse, de as createEmptyQuestionStructureDraft, bn as createQuestionContentDraftFromSerialized, k as createQuestionContentId, hs as createQuestionContentStructureFromDraft, gs as createQuestionPreviewDraft, pe as createQuestionStructureElement, fe as createQuestionStructureExtra, P as createRichContentValue, rn as createRichContentValueFromDocument, Me as createRichTextContent, Jn as deleteBlankFromGroup, _e as deleteQuestionStructureElement, ge as deleteQuestionStructureExtra, $n as detachBlankFromAnswerGroup, la as findQuestionContentQuestionTypeStructure, pa as findQuestionContentQuestionTypeTemplate, pn as getQuestionContentJudgementOptions, un as getQuestionContentOptionMarker, on as getQuestionContentTextMarkerAnswerText, vs as getQuestionStructureDraftChangeKind, N as getQuestionStructureElementDefaultEnName, M as getQuestionStructureElementDefaultName, we as getQuestionStructureExtraDefaultEnName, Ce as getQuestionStructureExtraDefaultName, sn as getRichContentDocument, Xn as getSharedBlankAnswerGroups, Zt as isCompositeQuestionContentStructure, vn as isQuestionContentDraftEmpty, ve as moveQuestionStructureElement, An as normalizeFillTextCandidateState, Ne as normalizeRichTextContent, ae as questionStructureElementTypes, oe as questionStructureExtraTypes, ma as reconcileQuestionContentDraftWithTemplates, yn as serializeQuestionContentDraft, _s as serializeQuestionStructureDraft, be as updateQuestionStructureElement, ye as updateQuestionStructureExtra, xe as updateQuestionStructureGlobalConfig, Se as updateQuestionStructureMetadata };