@yungu-fed/question-editor 0.1.7 → 0.1.8

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 (37) hide show
  1. package/dist/index.d.ts +2 -2
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +1183 -1182
  4. package/dist/index.mjs +523 -517
  5. package/dist/question/content-editor/QuestionContentEditor.d.ts +3 -4
  6. package/dist/question/content-editor/QuestionContentEditor.d.ts.map +1 -1
  7. package/dist/question/content-editor/QuestionContentSubquestionAddChildDropdown.d.ts +3 -3
  8. package/dist/question/content-editor/QuestionContentSubquestionAddChildDropdown.d.ts.map +1 -1
  9. package/dist/question/content-editor/QuestionContentSubquestionChildEditor.d.ts +3 -3
  10. package/dist/question/content-editor/QuestionContentSubquestionChildEditor.d.ts.map +1 -1
  11. package/dist/question/content-editor/QuestionContentSubquestionGroupEditor.d.ts +3 -3
  12. package/dist/question/content-editor/QuestionContentSubquestionGroupEditor.d.ts.map +1 -1
  13. package/dist/question/content-editor/i18n.d.ts.map +1 -1
  14. package/dist/question/content-editor/question-type-template.d.ts +7 -0
  15. package/dist/question/content-editor/question-type-template.d.ts.map +1 -0
  16. package/dist/question/content-editor/structure.d.ts +2 -2
  17. package/dist/question/content-editor/structure.d.ts.map +1 -1
  18. package/dist/question/content-editor/subquestion-group-editor-helpers.d.ts +4 -5
  19. package/dist/question/content-editor/subquestion-group-editor-helpers.d.ts.map +1 -1
  20. package/dist/question/content-editor/types.d.ts +4 -4
  21. package/dist/question/content-editor/types.d.ts.map +1 -1
  22. package/dist/question/i18n/messages.d.ts +1 -1
  23. package/dist/question/i18n/messages.d.ts.map +1 -1
  24. package/dist/question/player/QuestionPlayer.d.ts.map +1 -1
  25. package/dist/question/player/QuestionPlayerComposite.d.ts +3 -4
  26. package/dist/question/player/QuestionPlayerComposite.d.ts.map +1 -1
  27. package/dist/question/player/helpers.d.ts +2 -2
  28. package/dist/question/player/helpers.d.ts.map +1 -1
  29. package/dist/question/player/types.d.ts +2 -3
  30. package/dist/question/player/types.d.ts.map +1 -1
  31. package/dist/question/preview/QuestionCompositePreview.d.ts +3 -4
  32. package/dist/question/preview/QuestionCompositePreview.d.ts.map +1 -1
  33. package/dist/question/preview/QuestionPreview.d.ts +2 -3
  34. package/dist/question/preview/QuestionPreview.d.ts.map +1 -1
  35. package/package.json +1 -1
  36. package/dist/question/content-editor/subquestion-template.d.ts +0 -4
  37. package/dist/question/content-editor/subquestion-template.d.ts.map +0 -1
package/dist/index.mjs CHANGED
@@ -1446,7 +1446,7 @@ function gr(e, t, n) {
1446
1446
  }, []);
1447
1447
  }
1448
1448
  //#endregion
1449
- //#region node_modules/.pnpm/ulid@3.0.2/node_modules/ulid/dist/browser/index.js
1449
+ //#region ../../node_modules/.pnpm/ulid@3.0.2/node_modules/ulid/dist/browser/index.js
1450
1450
  var _r = "0123456789ABCDEFGHJKMNPQRSTVWXYZ", vr = 32, yr = 16, br = 0xffffffffffff, xr;
1451
1451
  (function(e) {
1452
1452
  e.Base32IncorrectEncoding = "B32_ENC_INVALID", e.DecodeTimeInvalidCharacter = "DEC_TIME_CHAR", e.DecodeTimeValueMalformed = "DEC_TIME_MALFORMED", e.EncodeTimeNegative = "ENC_TIME_NEG", e.EncodeTimeSizeExceeded = "ENC_TIME_SIZE_EXCEED", e.EncodeTimeValueMalformed = "ENC_TIME_MALFORMED", e.PRNGDetectFailure = "PRNG_DETECT", e.ULIDInvalid = "ULID_INVALID", e.Unexpected = "UNEXPECTED", e.UUIDInvalid = "UUID_INVALID";
@@ -2970,6 +2970,7 @@ var Cs = {
2970
2970
  editorTitle: "Composite Editor",
2971
2971
  emptyNodes: "No child questions yet.",
2972
2972
  emptyTemplate: "This business type has no supported structure.",
2973
+ missingTemplate: "Missing question type structure.",
2973
2974
  moveChildDown: "Move child {{index}} down",
2974
2975
  moveChildUp: "Move child {{index}} up",
2975
2976
  questionKind: "Question",
@@ -3155,6 +3156,7 @@ var Cs = {
3155
3156
  editorTitle: "\u7ec4\u5408\u9898\u7f16\u8f91",
3156
3157
  emptyNodes: "\u6682\u65e0\u5b50\u9898\u3002",
3157
3158
  emptyTemplate: "\u8be5\u4e1a\u52a1\u9898\u578b\u6682\u65e0\u53ef\u652f\u6301\u7684\u7ed3\u6784\u3002",
3159
+ missingTemplate: "\u7f3a\u5c11\u9898\u578b\u7ed3\u6784\u3002",
3158
3160
  moveChildDown: "\u4e0b\u79fb\u7b2c {{index}} \u9898",
3159
3161
  moveChildUp: "\u4e0a\u79fb\u7b2c {{index}} \u9898",
3160
3162
  questionKind: "\u9898\u76ee",
@@ -3189,7 +3191,25 @@ function Es(e) {
3189
3191
  function Ds(e, t = {}) {
3190
3192
  return Object.entries(t).reduce((e, [t, n]) => e.split(`{{${t}}}`).join(n == null ? "" : String(n)), e);
3191
3193
  }
3192
- var Os = {
3194
+ //#endregion
3195
+ //#region src/question/content-editor/question-type-template.ts
3196
+ function Os(e, t) {
3197
+ var n;
3198
+ return (n = Ms(e, t)) == null ? void 0 : n.structure;
3199
+ }
3200
+ function ks(e, t) {
3201
+ return k(k({}, e), {}, { hasAnswer: t && e.hasAnswer });
3202
+ }
3203
+ function As(e, t) {
3204
+ return Os(e, t.questionTypeKey);
3205
+ }
3206
+ function js(e, t) {
3207
+ return t !== null && e.questionTypeKey === t;
3208
+ }
3209
+ function Ms(e, t) {
3210
+ return e.find((e) => js(e, t));
3211
+ }
3212
+ var Ns = {
3193
3213
  root: "_root_1ojgr_1",
3194
3214
  "rich-text-root": "_rich-text-root_1ojgr_28",
3195
3215
  "rich-text-toolbar": "_rich-text-toolbar_1ojgr_37"
@@ -3218,7 +3238,7 @@ var Os = {
3218
3238
  };
3219
3239
  //#endregion
3220
3240
  //#region \0@oxc-project+runtime@0.129.0/helpers/objectWithoutPropertiesLoose.js
3221
- function ks(e, t) {
3241
+ function Ps(e, t) {
3222
3242
  if (e == null) return {};
3223
3243
  var n = {};
3224
3244
  for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -3229,9 +3249,9 @@ function ks(e, t) {
3229
3249
  }
3230
3250
  //#endregion
3231
3251
  //#region \0@oxc-project+runtime@0.129.0/helpers/objectWithoutProperties.js
3232
- function As(e, t) {
3252
+ function Fs(e, t) {
3233
3253
  if (e == null) return {};
3234
- var n, r, i = ks(e, t);
3254
+ var n, r, i = Ps(e, t);
3235
3255
  if (Object.getOwnPropertySymbols) {
3236
3256
  var a = Object.getOwnPropertySymbols(e);
3237
3257
  for (r = 0; r < a.length; r++) n = a[r], t.includes(n) || {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
@@ -3240,7 +3260,7 @@ function As(e, t) {
3240
3260
  }
3241
3261
  //#endregion
3242
3262
  //#region src/question/content-editor/QuestionContentEditorUi.tsx
3243
- var js = [
3263
+ var Is = [
3244
3264
  "children",
3245
3265
  "className",
3246
3266
  "danger",
@@ -3249,7 +3269,7 @@ var js = [
3249
3269
  "type"
3250
3270
  ];
3251
3271
  function F(e) {
3252
- let { children: t, className: n, danger: r = !1, icon: i, size: s, type: c } = e, l = As(e, js);
3272
+ let { children: t, className: n, danger: r = !1, icon: i, size: s, type: c } = e, l = Fs(e, Is);
3253
3273
  return /* @__PURE__ */ o("button", k(k({
3254
3274
  className: [
3255
3275
  P.button,
@@ -3264,7 +3284,7 @@ function F(e) {
3264
3284
  children: i
3265
3285
  }) : null, t] }));
3266
3286
  }
3267
- function Ms({ "aria-label": e, allowClear: t = !1, className: n, disabled: r, onChange: i, options: s, placeholder: c, value: l }) {
3287
+ function Ls({ "aria-label": e, allowClear: t = !1, className: n, disabled: r, onChange: i, options: s, placeholder: c, value: l }) {
3268
3288
  function u(e) {
3269
3289
  let t = e.target.value;
3270
3290
  i(t === "" ? void 0 : t);
@@ -3285,7 +3305,7 @@ function Ms({ "aria-label": e, allowClear: t = !1, className: n, disabled: r, on
3285
3305
  }, e.value))]
3286
3306
  });
3287
3307
  }
3288
- function Ns({ cancelText: e, children: t, closeLabel: n, okButtonProps: r, okText: i, onCancel: s, onOk: c, open: l, title: u }) {
3308
+ function Rs({ cancelText: e, children: t, closeLabel: n, okButtonProps: r, okText: i, onCancel: s, onOk: c, open: l, title: u }) {
3289
3309
  return l ? /* @__PURE__ */ a("div", {
3290
3310
  className: P["modal-backdrop"],
3291
3311
  role: "presentation",
@@ -3322,7 +3342,7 @@ function Ns({ cancelText: e, children: t, closeLabel: n, okButtonProps: r, okTex
3322
3342
  })
3323
3343
  }) : null;
3324
3344
  }
3325
- function Ps({ onChange: e, options: t, value: n }) {
3345
+ function zs({ onChange: e, options: t, value: n }) {
3326
3346
  return /* @__PURE__ */ a("div", {
3327
3347
  className: P["radio-group"],
3328
3348
  children: t.map((t) => /* @__PURE__ */ o("label", {
@@ -3336,14 +3356,14 @@ function Ps({ onChange: e, options: t, value: n }) {
3336
3356
  }, t.value))
3337
3357
  });
3338
3358
  }
3339
- var Fs = { Group: Ps };
3340
- function Is({ description: e }) {
3359
+ var Bs = { Group: zs };
3360
+ function Vs({ description: e }) {
3341
3361
  return /* @__PURE__ */ a("div", {
3342
3362
  className: P.empty,
3343
3363
  children: e
3344
3364
  });
3345
3365
  }
3346
- function Ls({ children: e, className: t, size: n = 8, wrap: r = !1 }) {
3366
+ function Hs({ children: e, className: t, size: n = 8, wrap: r = !1 }) {
3347
3367
  return /* @__PURE__ */ a("span", {
3348
3368
  className: [
3349
3369
  P.space,
@@ -3354,7 +3374,7 @@ function Ls({ children: e, className: t, size: n = 8, wrap: r = !1 }) {
3354
3374
  children: e
3355
3375
  });
3356
3376
  }
3357
- function Rs({ children: e, className: t, strong: n = !1, type: r }) {
3377
+ function Us({ children: e, className: t, strong: n = !1, type: r }) {
3358
3378
  return /* @__PURE__ */ a("span", {
3359
3379
  className: [
3360
3380
  P.text,
@@ -3365,8 +3385,8 @@ function Rs({ children: e, className: t, strong: n = !1, type: r }) {
3365
3385
  children: e
3366
3386
  });
3367
3387
  }
3368
- var I = { Text: Rs };
3369
- function zs({ columns: e, dataSource: t, rowKey: n }) {
3388
+ var I = { Text: Us };
3389
+ function Ws({ columns: e, dataSource: t, rowKey: n }) {
3370
3390
  return /* @__PURE__ */ a("div", {
3371
3391
  className: P["table-wrap"],
3372
3392
  children: /* @__PURE__ */ o("table", {
@@ -3375,19 +3395,19 @@ function zs({ columns: e, dataSource: t, rowKey: n }) {
3375
3395
  style: { width: e.width },
3376
3396
  children: e.title
3377
3397
  }, e.key)) }) }), /* @__PURE__ */ a("tbody", { children: t.map((t, r) => /* @__PURE__ */ a("tr", { children: e.map((e) => {
3378
- let n = Bs(t, e.dataIndex);
3379
- return /* @__PURE__ */ a("td", { children: e.render ? e.render(n, t, r) : Vs(n) }, e.key);
3398
+ let n = Gs(t, e.dataIndex);
3399
+ return /* @__PURE__ */ a("td", { children: e.render ? e.render(n, t, r) : Ks(n) }, e.key);
3380
3400
  }) }, n(t))) })]
3381
3401
  })
3382
3402
  });
3383
3403
  }
3384
- function Bs(e, t) {
3404
+ function Gs(e, t) {
3385
3405
  var n;
3386
3406
  if (!t || typeof e != "object" || !e) return;
3387
3407
  let r = String(t);
3388
3408
  return (n = Object.entries(e).find(([e]) => e === r)) == null ? void 0 : n[1];
3389
3409
  }
3390
- function Vs(e) {
3410
+ function Ks(e) {
3391
3411
  return typeof e == "boolean" || typeof e == "number" || typeof e == "string" ? String(e) : "";
3392
3412
  }
3393
3413
  var L = {
@@ -3400,7 +3420,7 @@ var L = {
3400
3420
  };
3401
3421
  //#endregion
3402
3422
  //#region src/question/rich-text/RichTextFieldTestToolbar.tsx
3403
- function Hs({ toolbarExtra: e }) {
3423
+ function qs({ toolbarExtra: e }) {
3404
3424
  return /* @__PURE__ */ o("div", {
3405
3425
  className: L.toolbar,
3406
3426
  role: "toolbar",
@@ -3431,19 +3451,19 @@ function Hs({ toolbarExtra: e }) {
3431
3451
  }
3432
3452
  //#endregion
3433
3453
  //#region src/question/rich-text/RichTextField.tsx
3434
- function Us({ apiRef: t, ariaLabel: n, compact: r = !1, onChange: i, plugins: s = [], toolbarExtra: c, uploadImage: l, value: u }) {
3454
+ function Js({ apiRef: t, ariaLabel: n, compact: r = !1, onChange: i, plugins: s = [], toolbarExtra: c, uploadImage: l, value: u }) {
3435
3455
  let d = Ss() && !c;
3436
- return Ws() ? /* @__PURE__ */ o("div", {
3437
- className: Gs(r),
3438
- children: [/* @__PURE__ */ a(Hs, { toolbarExtra: c }), /* @__PURE__ */ a("textarea", {
3456
+ return Ys() ? /* @__PURE__ */ o("div", {
3457
+ className: Xs(r),
3458
+ children: [/* @__PURE__ */ a(qs, { toolbarExtra: c }), /* @__PURE__ */ a("textarea", {
3439
3459
  "aria-label": n,
3440
3460
  className: `${L.textarea} rich-content-editor-surface`,
3441
3461
  onChange: (e) => i(v(e.target.value)),
3442
3462
  value: u.text
3443
3463
  })]
3444
3464
  }) : d ? /* @__PURE__ */ a("div", {
3445
- className: Gs(r),
3446
- children: qs({
3465
+ className: Xs(r),
3466
+ children: Qs({
3447
3467
  apiRef: t,
3448
3468
  ariaLabel: n,
3449
3469
  compact: r,
@@ -3451,7 +3471,7 @@ function Us({ apiRef: t, ariaLabel: n, compact: r = !1, onChange: i, plugins: s
3451
3471
  value: u
3452
3472
  })
3453
3473
  }) : /* @__PURE__ */ a("div", {
3454
- className: Gs(r),
3474
+ className: Xs(r),
3455
3475
  children: /* @__PURE__ */ o(e.Root, {
3456
3476
  plugins: s,
3457
3477
  uploadImage: l,
@@ -3481,27 +3501,27 @@ function Us({ apiRef: t, ariaLabel: n, compact: r = !1, onChange: i, plugins: s
3481
3501
  }), /* @__PURE__ */ a(e.Editor, {
3482
3502
  apiRef: t,
3483
3503
  "aria-label": n,
3484
- className: Ks(r),
3504
+ className: Zs(r),
3485
3505
  initialValue: u.json,
3486
3506
  onChange: (e) => i(y({ json: e }))
3487
3507
  })]
3488
3508
  })
3489
3509
  });
3490
3510
  }
3491
- function Ws() {
3511
+ function Ys() {
3492
3512
  return typeof navigator < "u" && navigator.userAgent.toLowerCase().includes("jsdom");
3493
3513
  }
3494
- function Gs(e) {
3514
+ function Xs(e) {
3495
3515
  return e ? `${L.field} ${L.compact} rich-content-editor is-compact` : `${L.field} rich-content-editor`;
3496
3516
  }
3497
- function Ks(e) {
3517
+ function Zs(e) {
3498
3518
  return e ? `${L.editor} ${L.compact} rich-content-editor-surface is-compact` : `${L.editor} rich-content-editor-surface`;
3499
3519
  }
3500
- function qs({ apiRef: t, ariaLabel: n, compact: r, onChange: i, value: o }) {
3520
+ function Qs({ apiRef: t, ariaLabel: n, compact: r, onChange: i, value: o }) {
3501
3521
  return /* @__PURE__ */ a(e.Editor, {
3502
3522
  apiRef: t,
3503
3523
  "aria-label": n,
3504
- className: Ks(r),
3524
+ className: Zs(r),
3505
3525
  initialValue: o.json,
3506
3526
  onChange: (e) => i(y({ json: e }))
3507
3527
  });
@@ -3512,7 +3532,7 @@ function R({ controls: e, disabled: t, editorRef: n, label: r, onChange: i, plac
3512
3532
  return /* @__PURE__ */ o("div", {
3513
3533
  "aria-disabled": t,
3514
3534
  className: t ? "pointer-events-none opacity-70" : void 0,
3515
- children: [/* @__PURE__ */ a(Us, {
3535
+ children: [/* @__PURE__ */ a(Js, {
3516
3536
  apiRef: n,
3517
3537
  ariaLabel: r,
3518
3538
  compact: l === "compact",
@@ -3528,21 +3548,21 @@ function R({ controls: e, disabled: t, editorRef: n, label: r, onChange: i, plac
3528
3548
  }
3529
3549
  //#endregion
3530
3550
  //#region src/question/content-editor/QuestionContentBlankGroupEditor.tsx
3531
- function Js({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls: s, translator: c }) {
3551
+ function $s({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls: s, translator: c }) {
3532
3552
  let { t: l } = c, [u, d] = m(null), [f, p] = m(null), h = t ? ta(n.answers, n.blanks) : [], g = na(h);
3533
3553
  function _(e) {
3534
3554
  r(k(k({}, e), {}, { answers: t ? ta(e.answers, e.blanks) : [] }));
3535
3555
  }
3536
3556
  function v(e, t, r) {
3537
- let i = Ys(h, e);
3557
+ let i = ec(h, e);
3538
3558
  i && _(oa(k(k({}, n), {}, { answers: h }), e, i.answerPools.map((e, n) => n === t ? r : e)));
3539
3559
  }
3540
3560
  function y(e) {
3541
- let t = Ys(h, e);
3561
+ let t = ec(h, e);
3542
3562
  t && _(oa(k(k({}, n), {}, { answers: h }), e, [...t.answerPools, M()]));
3543
3563
  }
3544
3564
  function b(e, t) {
3545
- let r = Ys(h, e);
3565
+ let r = ec(h, e);
3546
3566
  r && _(oa(k(k({}, n), {}, { answers: h }), e, r.answerPools.filter((e, n) => n !== t)));
3547
3567
  }
3548
3568
  function x(e, t) {
@@ -3618,7 +3638,7 @@ function Js({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
3618
3638
  }),
3619
3639
  /* @__PURE__ */ o("label", {
3620
3640
  className: "flex min-w-0 items-center gap-2",
3621
- children: [/* @__PURE__ */ a(I.Text, { children: l("questionContentEditor.blank.answers") }), /* @__PURE__ */ a(Ms, {
3641
+ children: [/* @__PURE__ */ a(I.Text, { children: l("questionContentEditor.blank.answers") }), /* @__PURE__ */ a(Ls, {
3622
3642
  "aria-label": l("questionContentEditor.blank.answerSelectAria", { index: r + 1 }),
3623
3643
  className: "w-48",
3624
3644
  disabled: e,
@@ -3680,7 +3700,7 @@ function Js({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
3680
3700
  function te() {
3681
3701
  let e = /* @__PURE__ */ new Set();
3682
3702
  return n.blanks.reduce((t, n, r) => {
3683
- let i = h.findIndex((e) => e.blankIds.includes(n)), a = Ys(h, i);
3703
+ let i = h.findIndex((e) => e.blankIds.includes(n)), a = ec(h, i);
3684
3704
  if (!a) return t;
3685
3705
  if (a.blankIds.length > 1) {
3686
3706
  if (e.has(i)) return t;
@@ -3696,7 +3716,7 @@ function Js({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
3696
3716
  className: "flex min-w-0 flex-col gap-3",
3697
3717
  children: te()
3698
3718
  })
3699
- }), /* @__PURE__ */ a(Ns, {
3719
+ }), /* @__PURE__ */ a(Rs, {
3700
3720
  cancelText: l("questionContentEditor.actions.cancel"),
3701
3721
  closeLabel: l("questionContentEditor.actions.close"),
3702
3722
  okButtonProps: { disabled: !f },
@@ -3710,7 +3730,7 @@ function Js({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
3710
3730
  children: [/* @__PURE__ */ a(I.Text, {
3711
3731
  type: "secondary",
3712
3732
  children: l("questionContentEditor.blank.createGroupDescription")
3713
- }), /* @__PURE__ */ a(Fs.Group, {
3733
+ }), /* @__PURE__ */ a(Bs.Group, {
3714
3734
  onChange: (e) => p(String(e.target.value)),
3715
3735
  options: S(u == null ? "" : u).map((e) => ({
3716
3736
  label: l("questionContentEditor.blank.shortLabel", { index: n.blanks.indexOf(e) + 1 }),
@@ -3727,7 +3747,7 @@ function Js({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
3727
3747
  })
3728
3748
  });
3729
3749
  }
3730
- function Ys(e, t) {
3750
+ function ec(e, t) {
3731
3751
  return e.slice(t, t + 1)[0];
3732
3752
  }
3733
3753
  var z = {
@@ -3753,7 +3773,7 @@ var z = {
3753
3773
  };
3754
3774
  //#endregion
3755
3775
  //#region src/question/content-editor/QuestionContentClassificationEditor.tsx
3756
- function Xs({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls: i, translator: s }) {
3776
+ function tc({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls: i, translator: s }) {
3757
3777
  let { t: c } = s, l = La(n, t);
3758
3778
  function u(e) {
3759
3779
  r(La(e, t));
@@ -3812,7 +3832,7 @@ function Xs({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
3812
3832
  variant: "compact"
3813
3833
  })
3814
3834
  }),
3815
- Zs({
3835
+ nc({
3816
3836
  ariaLabel: c("questionContentEditor.classification.deleteCategory", { index: n + 1 }),
3817
3837
  disabled: e || l.categories.length <= 1,
3818
3838
  onClick: () => u(za(l, t.id))
@@ -3861,7 +3881,7 @@ function Xs({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
3861
3881
  value: n.content,
3862
3882
  variant: "compact"
3863
3883
  })
3864
- }), Zs({
3884
+ }), nc({
3865
3885
  ariaLabel: c("questionContentEditor.classification.deleteCard", { index: r + 1 }),
3866
3886
  disabled: e || l.items.length <= 1,
3867
3887
  onClick: () => u(Ha(l, n.id))
@@ -3871,7 +3891,7 @@ function Xs({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
3871
3891
  children: [/* @__PURE__ */ a("span", {
3872
3892
  className: z["answer-label"],
3873
3893
  children: c("questionContentEditor.classification.correctCategory")
3874
- }), /* @__PURE__ */ a(Ms, {
3894
+ }), /* @__PURE__ */ a(Ls, {
3875
3895
  allowClear: !0,
3876
3896
  "aria-label": `${c("questionContentEditor.blank.correctAnswer")} ${r + 1}`,
3877
3897
  className: z.select,
@@ -3891,7 +3911,7 @@ function Xs({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
3891
3911
  })]
3892
3912
  });
3893
3913
  }
3894
- function Zs({ ariaLabel: e, disabled: t, onClick: n }) {
3914
+ function nc({ ariaLabel: e, disabled: t, onClick: n }) {
3895
3915
  return /* @__PURE__ */ a(F, {
3896
3916
  "aria-label": e,
3897
3917
  className: z["icon-button"],
@@ -3908,7 +3928,7 @@ function Zs({ ariaLabel: e, disabled: t, onClick: n }) {
3908
3928
  }
3909
3929
  //#endregion
3910
3930
  //#region src/question/content-editor/QuestionContentFillTextEditor.tsx
3911
- function Qs({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richTextControls: c, title: l, translator: u }) {
3931
+ function rc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richTextControls: c, title: l, translator: u }) {
3912
3932
  let { t: d } = u, f = p(null), [h, g] = m({}), [_, v] = m(null), [y, b] = m(null), x = Bi(r, t, n), S = {
3913
3933
  answers: x.answers.filter((e) => "answerPools" in e),
3914
3934
  blanks: x.blanks,
@@ -3952,7 +3972,7 @@ function Qs({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richT
3952
3972
  let r = D(), i = r.slice(e, e + 1)[0];
3953
3973
  if (!i) return;
3954
3974
  let a = te(i), o = (t < i.answerOptionIds.length ? i.answerOptionIds.map((e, r) => r === t ? n : e) : [...i.answerOptionIds, n]).filter((e, t, n) => !!e && n.indexOf(e) === t);
3955
- t >= i.answerOptionIds.length && n && g((e) => k(k({}, e), {}, { [a]: Math.max(0, $s(e, a) - 1) })), O(r.map((t, n) => n === e ? k(k({}, t), {}, { answerOptionIds: o }) : t));
3975
+ t >= i.answerOptionIds.length && n && g((e) => k(k({}, e), {}, { [a]: Math.max(0, ic(e, a) - 1) })), O(r.map((t, n) => n === e ? k(k({}, t), {}, { answerOptionIds: o }) : t));
3956
3976
  }
3957
3977
  function re(e) {
3958
3978
  let t = Yi(x.blankOptionGroups, x.blanks).find((t) => t.blankId === e);
@@ -4019,7 +4039,7 @@ function Qs({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richT
4019
4039
  }
4020
4040
  function he(e) {
4021
4041
  let t = te(e);
4022
- g((e) => k(k({}, e), {}, { [t]: $s(e, t) + 1 }));
4042
+ g((e) => k(k({}, e), {}, { [t]: ic(e, t) + 1 }));
4023
4043
  }
4024
4044
  function ge(e, t) {
4025
4045
  return [
@@ -4111,7 +4131,7 @@ function Qs({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richT
4111
4131
  return new Set(D().filter((e) => e.blankIds.every((e) => !n.has(e))).reduce((e, t) => [...e, ...t.answerOptionIds], []));
4112
4132
  }
4113
4133
  function Ce(t, n) {
4114
- let r = te(t), i = Xi(t), s = i.length ? [...i, ...Array.from({ length: $s(h, r) }, () => "")] : Array.from({ length: $s(h, r) + 1 }, () => ""), c = Se(t), l = xe().map((e, t) => {
4134
+ let r = te(t), i = Xi(t), s = i.length ? [...i, ...Array.from({ length: ic(h, r) }, () => "")] : Array.from({ length: ic(h, r) + 1 }, () => ""), c = Se(t), l = xe().map((e, t) => {
4115
4135
  let n = Ci("upperAlpha", t), r = i.includes(e.optionId);
4116
4136
  return {
4117
4137
  disabled: c.has(e.optionId) && !r,
@@ -4121,7 +4141,7 @@ function Qs({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richT
4121
4141
  });
4122
4142
  return /* @__PURE__ */ o("div", {
4123
4143
  className: "flex min-w-0 flex-wrap items-center gap-3",
4124
- children: [s.map((t, i) => /* @__PURE__ */ a(Ms, {
4144
+ children: [s.map((t, i) => /* @__PURE__ */ a(Ls, {
4125
4145
  allowClear: !0,
4126
4146
  "aria-label": d("questionContentEditor.blank.answerPool", {
4127
4147
  groupIndex: n + 1,
@@ -4178,7 +4198,7 @@ function Qs({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richT
4178
4198
  strong: !0,
4179
4199
  children: d("questionContentEditor.blank.shortLabel", { index: n + 1 })
4180
4200
  }),
4181
- /* @__PURE__ */ a(Ms, {
4201
+ /* @__PURE__ */ a(Ls, {
4182
4202
  "aria-label": d("questionContentEditor.blank.answerAssignmentAria", { index: n + 1 }),
4183
4203
  className: "w-48",
4184
4204
  disabled: e,
@@ -4250,7 +4270,7 @@ function Qs({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richT
4250
4270
  children: [/* @__PURE__ */ a(I.Text, {
4251
4271
  strong: !0,
4252
4272
  children: d("questionContentEditor.blank.correctAnswer")
4253
- }), /* @__PURE__ */ a(Ms, {
4273
+ }), /* @__PURE__ */ a(Ls, {
4254
4274
  "aria-label": d("questionContentEditor.blank.correctAnswerAria", { index: r + 1 }),
4255
4275
  className: "min-w-48",
4256
4276
  disabled: e,
@@ -4310,7 +4330,7 @@ function Qs({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richT
4310
4330
  placeholder: d("questionContentEditor.placeholders.fillTextContent"),
4311
4331
  value: x.content
4312
4332
  }),
4313
- t.config.candidateMode === "none" ? /* @__PURE__ */ a(Js, {
4333
+ t.config.candidateMode === "none" ? /* @__PURE__ */ a($s, {
4314
4334
  disabled: e,
4315
4335
  hasAnswer: n,
4316
4336
  item: S,
@@ -4318,7 +4338,7 @@ function Qs({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richT
4318
4338
  richTextControls: c,
4319
4339
  translator: u
4320
4340
  }) : Ne(),
4321
- /* @__PURE__ */ a(Ns, {
4341
+ /* @__PURE__ */ a(Rs, {
4322
4342
  cancelText: d("questionContentEditor.actions.cancel"),
4323
4343
  closeLabel: d("questionContentEditor.actions.close"),
4324
4344
  okButtonProps: { disabled: !y },
@@ -4332,7 +4352,7 @@ function Qs({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richT
4332
4352
  children: [/* @__PURE__ */ a(I.Text, {
4333
4353
  type: "secondary",
4334
4354
  children: d("questionContentEditor.blank.createGroupDescription")
4335
- }), /* @__PURE__ */ a(Fs.Group, {
4355
+ }), /* @__PURE__ */ a(Bs.Group, {
4336
4356
  onChange: (e) => b(String(e.target.value)),
4337
4357
  options: _e(),
4338
4358
  value: y
@@ -4342,13 +4362,13 @@ function Qs({ disabled: e, element: t, hasAnswer: n, item: r, onChange: s, richT
4342
4362
  ]
4343
4363
  });
4344
4364
  }
4345
- function $s(e, t) {
4365
+ function ic(e, t) {
4346
4366
  var n, r;
4347
4367
  return (n = (r = Object.entries(e).find(([e]) => e === t)) == null ? void 0 : r[1]) == null ? 0 : n;
4348
4368
  }
4349
4369
  //#endregion
4350
4370
  //#region src/question/content-editor/QuestionContentJudgementGroupEditor.tsx
4351
- function ec({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, translator: o }) {
4371
+ function ac({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, translator: o }) {
4352
4372
  let { t: s } = o, c = Ei(t.config.judgeAnswerMode), l = n ? r.answers.filter((e) => c.includes(e)).slice(0, 1) : [];
4353
4373
  function u(e) {
4354
4374
  i(k(k({}, r), {}, { answers: l.includes(e) ? [] : [e] }));
@@ -4374,18 +4394,18 @@ function ec({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, trans
4374
4394
  }
4375
4395
  //#endregion
4376
4396
  //#region src/utils/cn.ts
4377
- function tc(...e) {
4378
- return e.reduce((e, t) => [...e, ...nc(t)], []).join(" ");
4397
+ function oc(...e) {
4398
+ return e.reduce((e, t) => [...e, ...sc(t)], []).join(" ");
4379
4399
  }
4380
- function nc(e) {
4381
- return e ? rc(e) ? e.reduce((e, t) => [...e, ...nc(t)], []) : [e] : [];
4400
+ function sc(e) {
4401
+ return e ? cc(e) ? e.reduce((e, t) => [...e, ...sc(t)], []) : [e] : [];
4382
4402
  }
4383
- function rc(e) {
4403
+ function cc(e) {
4384
4404
  return Array.isArray(e);
4385
4405
  }
4386
4406
  //#endregion
4387
4407
  //#region src/question/line-connect/lineConnectLines.ts
4388
- function ic(e, t, n = ze) {
4408
+ function lc(e, t, n = ze) {
4389
4409
  let r = e.columns.reduce((e, t, n) => (t.items.forEach((t, r) => e.set(t.itemId, {
4390
4410
  columnIndex: n,
4391
4411
  itemIndex: r
@@ -4406,25 +4426,25 @@ function ic(e, t, n = ze) {
4406
4426
  }, [])] : e;
4407
4427
  }, []);
4408
4428
  }
4409
- function ac(e, t, n) {
4429
+ function uc(e, t, n) {
4410
4430
  return e.left - t.left + n + e.width / 2;
4411
4431
  }
4412
- function oc(e, t, n) {
4432
+ function dc(e, t, n) {
4413
4433
  return e.top - t.top + n + e.height / 2;
4414
4434
  }
4415
- function sc(e, t, n) {
4435
+ function fc(e, t, n) {
4416
4436
  return e.left - t.left + n;
4417
4437
  }
4418
- function cc(e, t, n) {
4438
+ function pc(e, t, n) {
4419
4439
  return e.right - t.left + n;
4420
4440
  }
4421
- function lc(e, t) {
4422
- e((e) => uc(e, t) ? e : t);
4441
+ function mc(e, t) {
4442
+ e((e) => hc(e, t) ? e : t);
4423
4443
  }
4424
- function uc(e, t) {
4425
- return (e == null ? void 0 : e.height) === t.height && e.width === t.width && e.lines.length === t.lines.length && e.lines.every((e, n) => dc(e, t.lines[n]));
4444
+ function hc(e, t) {
4445
+ return (e == null ? void 0 : e.height) === t.height && e.width === t.width && e.lines.length === t.lines.length && e.lines.every((e, n) => gc(e, t.lines[n]));
4426
4446
  }
4427
- function dc(e, t) {
4447
+ function gc(e, t) {
4428
4448
  return t !== void 0 && e.key === t.key && e.x1 === t.x1 && e.x2 === t.x2 && e.y1 === t.y1 && e.y2 === t.y2;
4429
4449
  }
4430
4450
  var B = {
@@ -4446,7 +4466,7 @@ var B = {
4446
4466
  "connect-dot": "_connect-dot_1cqr2_56",
4447
4467
  "connect-button-connected": "_connect-button-connected_1cqr2_64",
4448
4468
  "connect-button-selected": "_connect-button-selected_1cqr2_70"
4449
- }, fc = [
4469
+ }, _c = [
4450
4470
  "number",
4451
4471
  "upperAlpha",
4452
4472
  "lowerAlpha",
@@ -4454,29 +4474,29 @@ var B = {
4454
4474
  "chineseNumber",
4455
4475
  "none"
4456
4476
  ];
4457
- function pc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: s, translator: c }) {
4477
+ function vc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: s, translator: c }) {
4458
4478
  let { t: u } = c, [h, g] = m(null), [_, v] = m(null), y = p(null), b = p(/* @__PURE__ */ new Map()), x = xa(r, t, n), S = { gridTemplateColumns: `repeat(${x.columns.length}, minmax(16rem, 1fr))` }, C = f(() => JSON.stringify({
4459
4479
  answers: x.answers,
4460
4480
  columns: x.columns.map((e) => e.items.map((e) => e.itemId))
4461
- }), [x.answers, x.columns]), w = f(() => n ? ic(x, x.answers) : [], [n, x]), T = l(() => {
4481
+ }), [x.answers, x.columns]), w = f(() => n ? lc(x, x.answers) : [], [n, x]), T = l(() => {
4462
4482
  let e = y.current;
4463
4483
  if (!n || !e || w.length === 0) {
4464
4484
  v(null);
4465
4485
  return;
4466
4486
  }
4467
4487
  let t = e.getBoundingClientRect(), r = w.reduce((n, r) => {
4468
- let i = b.current.get(yc(r.fromItemId, "outgoing")), a = b.current.get(yc(r.toItemId, "incoming"));
4488
+ let i = b.current.get(wc(r.fromItemId, "outgoing")), a = b.current.get(wc(r.toItemId, "incoming"));
4469
4489
  if (!i || !a) return n;
4470
4490
  let o = i.getBoundingClientRect(), s = a.getBoundingClientRect();
4471
4491
  return [...n, {
4472
4492
  key: r.key,
4473
- x1: ac(o, t, e.scrollLeft),
4474
- x2: ac(s, t, e.scrollLeft),
4475
- y1: oc(o, t, e.scrollTop),
4476
- y2: oc(s, t, e.scrollTop)
4493
+ x1: uc(o, t, e.scrollLeft),
4494
+ x2: uc(s, t, e.scrollLeft),
4495
+ y1: dc(o, t, e.scrollTop),
4496
+ y2: dc(s, t, e.scrollTop)
4477
4497
  }];
4478
4498
  }, []);
4479
- lc(v, {
4499
+ mc(v, {
4480
4500
  height: e.scrollHeight,
4481
4501
  lines: r,
4482
4502
  width: e.scrollWidth
@@ -4496,7 +4516,7 @@ function pc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4496
4516
  ]);
4497
4517
  function ee(e, t) {
4498
4518
  return (n) => {
4499
- let r = yc(e, t);
4519
+ let r = wc(e, t);
4500
4520
  if (n) {
4501
4521
  b.current.set(r, n);
4502
4522
  return;
@@ -4544,11 +4564,11 @@ function pc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4544
4564
  children: u("questionContentEditor.lineConnect.column", { index: n + 1 })
4545
4565
  }), /* @__PURE__ */ o("div", {
4546
4566
  className: "flex items-center gap-2",
4547
- children: [/* @__PURE__ */ a(Ms, {
4567
+ children: [/* @__PURE__ */ a(Ls, {
4548
4568
  "aria-label": u("questionContentEditor.lineConnect.labelStyle", { index: n + 1 }),
4549
4569
  disabled: e,
4550
4570
  onChange: (e) => e ? E(wa(x, t.columnId, e)) : void 0,
4551
- options: fc.map((e) => ({
4571
+ options: _c.map((e) => ({
4552
4572
  label: u(`questionContentEditor.lineConnect.labels.${e}`),
4553
4573
  value: e
4554
4574
  })),
@@ -4579,9 +4599,9 @@ function pc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4579
4599
  }, t.columnId);
4580
4600
  }
4581
4601
  function ie(t, r, i, c) {
4582
- let l = wi(t.labelStyle, c), d = l ? `${l}. ${i.content.text}` : i.content.text, f = (h == null ? void 0 : h.itemId) === i.itemId, p = mc(x, i.itemId), m = hc(x, i.itemId), g = gc(p, m), _ = _c(n);
4602
+ let l = wi(t.labelStyle, c), d = l ? `${l}. ${i.content.text}` : i.content.text, f = (h == null ? void 0 : h.itemId) === i.itemId, p = yc(x, i.itemId), m = bc(x, i.itemId), g = xc(p, m), _ = Sc(n);
4583
4603
  return /* @__PURE__ */ o("div", {
4584
- className: vc(f, g),
4604
+ className: Cc(f, g),
4585
4605
  "data-testid": `line-connect-item-${i.itemId}`,
4586
4606
  style: _,
4587
4607
  children: [
@@ -4617,7 +4637,7 @@ function pc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4617
4637
  return n ? /* @__PURE__ */ a("button", {
4618
4638
  "aria-label": se("incoming", t, i, r.content.text),
4619
4639
  "aria-pressed": c,
4620
- className: tc(V.marker, V["incoming-marker"], c && V["connect-button-connected"]),
4640
+ className: oc(V.marker, V["incoming-marker"], c && V["connect-button-connected"]),
4621
4641
  disabled: e,
4622
4642
  onClick: () => O(t, r.itemId, s),
4623
4643
  ref: ee(r.itemId, "incoming"),
@@ -4637,7 +4657,7 @@ function pc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4637
4657
  return n ? /* @__PURE__ */ a("button", {
4638
4658
  "aria-label": se("outgoing", t, i, r.content.text),
4639
4659
  "aria-pressed": s,
4640
- className: tc(V["connect-handle"], V["connect-handle-outgoing"], s && V["connect-button-selected"], c && V["connect-button-connected"]),
4660
+ className: oc(V["connect-handle"], V["connect-handle-outgoing"], s && V["connect-button-selected"], c && V["connect-button-connected"]),
4641
4661
  disabled: e,
4642
4662
  ref: ee(r.itemId, "outgoing"),
4643
4663
  onClick: () => O(t, r.itemId, o),
@@ -4697,26 +4717,26 @@ function pc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4697
4717
  ]
4698
4718
  });
4699
4719
  }
4700
- function mc(e, t) {
4720
+ function yc(e, t) {
4701
4721
  return Object.values(e.answers).some((e) => e.includes(t));
4702
4722
  }
4703
- function hc(e, t) {
4723
+ function bc(e, t) {
4704
4724
  var n;
4705
4725
  return ((n = e.answers[t]) == null ? [] : n).length > 0;
4706
4726
  }
4707
- function gc(e, t) {
4727
+ function xc(e, t) {
4708
4728
  return e || t;
4709
4729
  }
4710
- function _c(e) {
4730
+ function Sc(e) {
4711
4731
  return { gridTemplateColumns: e ? "2rem minmax(0, 1fr) auto auto" : "2rem minmax(0, 1fr) auto" };
4712
4732
  }
4713
- function vc(e, t) {
4714
- return tc("grid min-w-0 items-center gap-2 rounded-md border border-slate-200 bg-white p-2", e && "border-blue-600 bg-blue-50", t && !e && "border-blue-200 bg-blue-50/40");
4733
+ function Cc(e, t) {
4734
+ return oc("grid min-w-0 items-center gap-2 rounded-md border border-slate-200 bg-white p-2", e && "border-blue-600 bg-blue-50", t && !e && "border-blue-200 bg-blue-50/40");
4715
4735
  }
4716
- function yc(e, t) {
4736
+ function wc(e, t) {
4717
4737
  return `${t}:${e}`;
4718
4738
  }
4719
- var bc = {
4739
+ var Tc = {
4720
4740
  board: "_board_30ao0_1",
4721
4741
  "connect-board": "_connect-board_30ao0_7",
4722
4742
  columns: "_columns_30ao0_14",
@@ -4726,7 +4746,7 @@ var bc = {
4726
4746
  selected: "_selected_30ao0_46",
4727
4747
  matched: "_matched_30ao0_51",
4728
4748
  marker: "_marker_30ao0_55"
4729
- }, xc = [
4749
+ }, Ec = [
4730
4750
  "number",
4731
4751
  "upperAlpha",
4732
4752
  "lowerAlpha",
@@ -4734,8 +4754,8 @@ var bc = {
4734
4754
  "chineseNumber",
4735
4755
  "none"
4736
4756
  ];
4737
- function Sc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: s, translator: c }) {
4738
- let { t: u } = c, [h, g] = m(null), [_, v] = m(null), y = p(null), b = p(/* @__PURE__ */ new Map()), x = ka(r, t, n), S = { gridTemplateColumns: `repeat(${x.columns.length}, minmax(16rem, 1fr))` }, C = f(() => n ? ic(x, x.answers, ft) : [], [n, x]), w = f(() => JSON.stringify({
4757
+ function Dc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: s, translator: c }) {
4758
+ let { t: u } = c, [h, g] = m(null), [_, v] = m(null), y = p(null), b = p(/* @__PURE__ */ new Map()), x = ka(r, t, n), S = { gridTemplateColumns: `repeat(${x.columns.length}, minmax(16rem, 1fr))` }, C = f(() => n ? lc(x, x.answers, ft) : [], [n, x]), w = f(() => JSON.stringify({
4739
4759
  answers: x.answers,
4740
4760
  columns: x.columns.map((e) => e.items.map((e) => e.itemId))
4741
4761
  }), [x.answers, x.columns]), T = l(() => {
@@ -4745,18 +4765,18 @@ function Sc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4745
4765
  return;
4746
4766
  }
4747
4767
  let t = e.getBoundingClientRect(), r = C.reduce((n, r) => {
4748
- let i = b.current.get(Ec(r.fromItemId, "outgoing")), a = b.current.get(Ec(r.toItemId, "incoming"));
4768
+ let i = b.current.get(jc(r.fromItemId, "outgoing")), a = b.current.get(jc(r.toItemId, "incoming"));
4749
4769
  if (!i || !a) return n;
4750
4770
  let o = i.getBoundingClientRect(), s = a.getBoundingClientRect();
4751
4771
  return [...n, {
4752
4772
  key: r.key,
4753
- x1: ac(o, t, e.scrollLeft),
4754
- x2: ac(s, t, e.scrollLeft),
4755
- y1: oc(o, t, e.scrollTop),
4756
- y2: oc(s, t, e.scrollTop)
4773
+ x1: uc(o, t, e.scrollLeft),
4774
+ x2: uc(s, t, e.scrollLeft),
4775
+ y1: dc(o, t, e.scrollTop),
4776
+ y2: dc(s, t, e.scrollTop)
4757
4777
  }];
4758
4778
  }, []);
4759
- lc(v, {
4779
+ mc(v, {
4760
4780
  height: e.scrollHeight,
4761
4781
  lines: r,
4762
4782
  width: e.scrollWidth
@@ -4776,7 +4796,7 @@ function Sc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4776
4796
  ]);
4777
4797
  function ee(e, t) {
4778
4798
  return (n) => {
4779
- let r = Ec(e, t);
4799
+ let r = jc(e, t);
4780
4800
  if (n) {
4781
4801
  b.current.set(r, n);
4782
4802
  return;
@@ -4805,15 +4825,15 @@ function Sc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4805
4825
  }
4806
4826
  function O(t, n) {
4807
4827
  return /* @__PURE__ */ o("section", {
4808
- className: bc.column,
4828
+ className: Tc.column,
4809
4829
  children: [
4810
4830
  /* @__PURE__ */ a("div", {
4811
4831
  className: "flex min-w-0 flex-wrap items-center justify-end gap-2",
4812
- children: /* @__PURE__ */ a(Ms, {
4832
+ children: /* @__PURE__ */ a(Ls, {
4813
4833
  "aria-label": u("questionContentEditor.matching.labelStyle", { index: n + 1 }),
4814
4834
  disabled: e,
4815
4835
  onChange: (e) => e ? E(Aa(x, t.columnId, e)) : void 0,
4816
- options: xc.map((e) => ({
4836
+ options: Ec.map((e) => ({
4817
4837
  label: u(`questionContentEditor.matching.labels.${e}`),
4818
4838
  value: e
4819
4839
  })),
@@ -4821,7 +4841,7 @@ function Sc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4821
4841
  })
4822
4842
  }),
4823
4843
  /* @__PURE__ */ a("div", {
4824
- className: bc.items,
4844
+ className: Tc.items,
4825
4845
  children: t.items.map((e, r) => ne(t, n, e, r))
4826
4846
  }),
4827
4847
  /* @__PURE__ */ a(F, {
@@ -4836,9 +4856,9 @@ function Sc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4836
4856
  }, t.columnId);
4837
4857
  }
4838
4858
  function ne(t, r, i, c) {
4839
- let l = Ti(t.labelStyle, c), d = (h == null ? void 0 : h.itemId) === i.itemId, f = Cc(x, i.itemId), p = wc(x, i.itemId), m = f || p, g = l ? `${l}. ${i.content.text}` : i.content.text, _ = Tc(n);
4859
+ let l = Ti(t.labelStyle, c), d = (h == null ? void 0 : h.itemId) === i.itemId, f = Oc(x, i.itemId), p = kc(x, i.itemId), m = f || p, g = l ? `${l}. ${i.content.text}` : i.content.text, _ = Ac(n);
4840
4860
  return /* @__PURE__ */ o("div", {
4841
- className: tc(bc.item, d ? bc.selected : "", m ? bc.matched : ""),
4861
+ className: oc(Tc.item, d ? Tc.selected : "", m ? Tc.matched : ""),
4842
4862
  "data-testid": `matching-editor-item-${i.itemId}`,
4843
4863
  style: _,
4844
4864
  children: [
@@ -4874,7 +4894,7 @@ function Sc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4874
4894
  return n ? /* @__PURE__ */ a("button", {
4875
4895
  "aria-label": ae("incoming", t, i, r.content.text),
4876
4896
  "aria-pressed": c,
4877
- className: tc(bc.marker, V["incoming-marker"], c && V["connect-button-connected"]),
4897
+ className: oc(Tc.marker, V["incoming-marker"], c && V["connect-button-connected"]),
4878
4898
  disabled: e,
4879
4899
  onClick: () => te(t, r.itemId, s),
4880
4900
  ref: ee(r.itemId, "incoming"),
@@ -4885,7 +4905,7 @@ function Sc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4885
4905
  className: V["connect-dot"]
4886
4906
  })
4887
4907
  }) : o ? /* @__PURE__ */ a("span", {
4888
- className: bc.marker,
4908
+ className: Tc.marker,
4889
4909
  children: o
4890
4910
  }) : /* @__PURE__ */ a("span", {});
4891
4911
  }
@@ -4893,7 +4913,7 @@ function Sc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4893
4913
  return n ? /* @__PURE__ */ a("button", {
4894
4914
  "aria-label": ae("outgoing", t, i, r.content.text),
4895
4915
  "aria-pressed": s,
4896
- className: tc(V["connect-handle"], V["connect-handle-outgoing"], s && V["connect-button-selected"], c && V["connect-button-connected"]),
4916
+ className: oc(V["connect-handle"], V["connect-handle-outgoing"], s && V["connect-button-selected"], c && V["connect-button-connected"]),
4897
4917
  disabled: e,
4898
4918
  onClick: () => te(t, r.itemId, o),
4899
4919
  ref: ee(r.itemId, "outgoing"),
@@ -4913,13 +4933,13 @@ function Sc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4913
4933
  });
4914
4934
  }
4915
4935
  return /* @__PURE__ */ o("div", {
4916
- className: bc.board,
4936
+ className: Tc.board,
4917
4937
  children: [n ? /* @__PURE__ */ a("div", {
4918
4938
  "aria-live": "polite",
4919
4939
  className: "rounded-md border border-blue-100 bg-blue-50 px-3 py-2 text-sm text-blue-700",
4920
4940
  children: h ? u("questionContentEditor.matching.connectHintActive", { label: h.label }) : u("questionContentEditor.matching.connectHintIdle")
4921
4941
  }) : null, /* @__PURE__ */ o("div", {
4922
- className: bc["connect-board"],
4942
+ className: Tc["connect-board"],
4923
4943
  "data-testid": "matching-editor-board",
4924
4944
  ref: y,
4925
4945
  children: [n && _ ? /* @__PURE__ */ a("svg", {
@@ -4940,29 +4960,29 @@ function Sc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
4940
4960
  y2: e.y2
4941
4961
  }, e.key))
4942
4962
  }) : null, /* @__PURE__ */ a("div", {
4943
- className: bc.columns,
4963
+ className: Tc.columns,
4944
4964
  style: S,
4945
4965
  children: x.columns.map((e, t) => O(e, t))
4946
4966
  })]
4947
4967
  })]
4948
4968
  });
4949
4969
  }
4950
- function Cc(e, t) {
4970
+ function Oc(e, t) {
4951
4971
  return Object.values(e.answers).some((e) => e.includes(t));
4952
4972
  }
4953
- function wc(e, t) {
4973
+ function kc(e, t) {
4954
4974
  var n;
4955
4975
  return ((n = e.answers[t]) == null ? [] : n).length > 0;
4956
4976
  }
4957
- function Tc(e) {
4977
+ function Ac(e) {
4958
4978
  return { gridTemplateColumns: e ? "2rem minmax(0, 1fr) auto auto" : "2rem minmax(0, 1fr) auto" };
4959
4979
  }
4960
- function Ec(e, t) {
4980
+ function jc(e, t) {
4961
4981
  return `${t}:${e}`;
4962
4982
  }
4963
4983
  //#endregion
4964
4984
  //#region src/question/content-editor/QuestionContentOptionGroupEditor.tsx
4965
- function Dc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: s, translator: c }) {
4985
+ function Mc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: s, translator: c }) {
4966
4986
  let { t: l } = c, u = n ? r.answers.optionIds : [], d = t.config.renderer === "table", f = Di(r, t.config.optionLabelStyle);
4967
4987
  function p(e) {
4968
4988
  i(k(k({}, e), {}, { answers: n ? e.answers : { optionIds: [] } }));
@@ -5077,7 +5097,7 @@ function Dc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
5077
5097
  })]
5078
5098
  }), /* @__PURE__ */ a("div", {
5079
5099
  className: "max-w-full overflow-x-auto",
5080
- children: /* @__PURE__ */ a(zs, {
5100
+ children: /* @__PURE__ */ a(Ws, {
5081
5101
  columns: [
5082
5102
  {
5083
5103
  dataIndex: "rowIndex",
@@ -5179,7 +5199,7 @@ function Dc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
5179
5199
  }
5180
5200
  //#endregion
5181
5201
  //#region src/question/content-editor/QuestionContentOrderingEditor.tsx
5182
- function Oc({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls: i, translator: s }) {
5202
+ function Nc({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls: i, translator: s }) {
5183
5203
  let { t: c } = s, l = Ga(n, t), u = new Map(l.sortOptions.map((e) => [e.id, e]));
5184
5204
  function d(e) {
5185
5205
  r(Ga(e, t));
@@ -5268,7 +5288,7 @@ function Oc({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
5268
5288
  }
5269
5289
  //#endregion
5270
5290
  //#region src/question/content-editor/QuestionContentRichTextEditor.tsx
5271
- function kc({ disabled: e, item: t, onChange: n, richTextControls: r, translator: i }) {
5291
+ function Pc({ disabled: e, item: t, onChange: n, richTextControls: r, translator: i }) {
5272
5292
  let { t: o } = i;
5273
5293
  return /* @__PURE__ */ a(R, {
5274
5294
  controls: r,
@@ -5279,7 +5299,7 @@ function kc({ disabled: e, item: t, onChange: n, richTextControls: r, translator
5279
5299
  value: t.content
5280
5300
  });
5281
5301
  }
5282
- var Ac = {
5302
+ var Fc = {
5283
5303
  stack: "_stack_1v8u9_1",
5284
5304
  "toolbar-row": "_toolbar-row_1v8u9_8",
5285
5305
  "marker-list": "_marker-list_1v8u9_13",
@@ -5290,7 +5310,7 @@ var Ac = {
5290
5310
  };
5291
5311
  //#endregion
5292
5312
  //#region src/question/content-editor/QuestionContentTextMarkerEditor.tsx
5293
- function jc({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls: i, translator: s }) {
5313
+ function Ic({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls: i, translator: s }) {
5294
5314
  let c = p(null), { t: l } = s, u = Vt(n.content.json);
5295
5315
  function d(e) {
5296
5316
  r(Ri(e, e.content, t));
@@ -5308,14 +5328,14 @@ function jc({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
5308
5328
  d(k(k({}, n), {}, { answers: r }));
5309
5329
  }
5310
5330
  return /* @__PURE__ */ o("div", {
5311
- className: Ac.stack,
5331
+ className: Fc.stack,
5312
5332
  children: [
5313
5333
  /* @__PURE__ */ a(I.Text, {
5314
5334
  strong: !0,
5315
5335
  children: l("questionContentEditor.fields.textMarkerContent")
5316
5336
  }),
5317
5337
  /* @__PURE__ */ a("div", {
5318
- className: Ac["toolbar-row"],
5338
+ className: Fc["toolbar-row"],
5319
5339
  children: /* @__PURE__ */ a(F, {
5320
5340
  disabled: e,
5321
5341
  onClick: f,
@@ -5333,20 +5353,20 @@ function jc({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
5333
5353
  value: n.content
5334
5354
  }),
5335
5355
  /* @__PURE__ */ o("div", {
5336
- className: Ac["marker-list"],
5356
+ className: Fc["marker-list"],
5337
5357
  children: [/* @__PURE__ */ a(I.Text, {
5338
5358
  strong: !0,
5339
5359
  children: l("questionContentEditor.textMarker.markersTitle")
5340
5360
  }), u.length === 0 ? /* @__PURE__ */ a("div", {
5341
- className: Ac.empty,
5361
+ className: Fc.empty,
5342
5362
  children: l("questionContentEditor.textMarker.emptyMarkers")
5343
5363
  }) : u.map((r) => /* @__PURE__ */ o("label", {
5344
- className: Ac["marker-card"],
5364
+ className: Fc["marker-card"],
5345
5365
  children: [/* @__PURE__ */ a("span", {
5346
- className: Ac["marker-text"],
5366
+ className: Fc["marker-text"],
5347
5367
  children: r.text
5348
5368
  }), /* @__PURE__ */ o("span", {
5349
- className: Ac["answer-toggle"],
5369
+ className: Fc["answer-toggle"],
5350
5370
  children: [/* @__PURE__ */ a("input", {
5351
5371
  "aria-label": l("questionContentEditor.textMarker.answerAria", { marker: r.text }),
5352
5372
  checked: n.answers.includes(r.markerId),
@@ -5360,7 +5380,7 @@ function jc({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
5360
5380
  ]
5361
5381
  });
5362
5382
  }
5363
- var H = {
5383
+ var Lc = {
5364
5384
  root: "_root_tq733_1",
5365
5385
  head: "_head_tq733_7",
5366
5386
  section: "_section_tq733_16",
@@ -5371,7 +5391,7 @@ var H = {
5371
5391
  };
5372
5392
  //#endregion
5373
5393
  //#region src/question/content-editor/QuestionContentWordBuilderEditor.tsx
5374
- function Mc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: s, title: c, translator: l }) {
5394
+ function Rc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: s, title: c, translator: l }) {
5375
5395
  let { t: u } = l, d = p(null), f = zi(r, n, t);
5376
5396
  function m(e) {
5377
5397
  i(zi(e, n, t));
@@ -5397,10 +5417,10 @@ function Mc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
5397
5417
  m(k(k({}, f), {}, { answers: k(k({}, f.answers), {}, { [e]: t.target.value }) }));
5398
5418
  }
5399
5419
  return /* @__PURE__ */ o("div", {
5400
- className: H.root,
5420
+ className: Lc.root,
5401
5421
  children: [
5402
5422
  /* @__PURE__ */ o("div", {
5403
- className: H.head,
5423
+ className: Lc.head,
5404
5424
  children: [/* @__PURE__ */ a(I.Text, {
5405
5425
  strong: !0,
5406
5426
  children: c
@@ -5423,9 +5443,9 @@ function Mc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
5423
5443
  value: f.content
5424
5444
  }),
5425
5445
  /* @__PURE__ */ o("section", {
5426
- className: H.section,
5446
+ className: Lc.section,
5427
5447
  children: [/* @__PURE__ */ o("div", {
5428
- className: H["section-head"],
5448
+ className: Lc["section-head"],
5429
5449
  children: [/* @__PURE__ */ a(I.Text, {
5430
5450
  strong: !0,
5431
5451
  children: u("questionContentEditor.fields.candidateOptions")
@@ -5437,12 +5457,12 @@ function Mc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
5437
5457
  children: u("questionContentEditor.actions.addCandidateOption")
5438
5458
  })]
5439
5459
  }), /* @__PURE__ */ a("div", {
5440
- className: H.rows,
5460
+ className: Lc.rows,
5441
5461
  children: f.candidateOptions.map((t, n) => /* @__PURE__ */ o("label", {
5442
- className: H.row,
5462
+ className: Lc.row,
5443
5463
  children: [/* @__PURE__ */ a("input", {
5444
5464
  "aria-label": u("questionContentEditor.fields.candidateOption", { index: n + 1 }),
5445
- className: H.input,
5465
+ className: Lc.input,
5446
5466
  disabled: e,
5447
5467
  onChange: (e) => g(n, e.target.value),
5448
5468
  value: t
@@ -5458,19 +5478,19 @@ function Mc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
5458
5478
  })]
5459
5479
  }),
5460
5480
  n ? /* @__PURE__ */ o("section", {
5461
- className: H.section,
5481
+ className: Lc.section,
5462
5482
  children: [/* @__PURE__ */ a(I.Text, {
5463
5483
  strong: !0,
5464
5484
  children: u("questionContentEditor.blank.correctAnswer")
5465
5485
  }), /* @__PURE__ */ a("div", {
5466
- className: H.rows,
5486
+ className: Lc.rows,
5467
5487
  children: f.blanks.map((t, n) => {
5468
5488
  var r;
5469
5489
  return /* @__PURE__ */ a("label", {
5470
- className: H.row,
5490
+ className: Lc.row,
5471
5491
  children: /* @__PURE__ */ a("input", {
5472
5492
  "aria-label": u("questionContentEditor.blank.correctAnswerAria", { index: n + 1 }),
5473
- className: H.input,
5493
+ className: Lc.input,
5474
5494
  disabled: e,
5475
5495
  onChange: (e) => y(t, e),
5476
5496
  placeholder: u("questionContentEditor.placeholders.blankAnswer"),
@@ -5485,9 +5505,9 @@ function Mc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
5485
5505
  }
5486
5506
  //#endregion
5487
5507
  //#region src/question/content-editor/QuestionContentElementEditor.tsx
5488
- function Nc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: o, title: s, translator: c }) {
5508
+ function zc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: o, title: s, translator: c }) {
5489
5509
  let { t: l } = c;
5490
- return t.type === "inlineFill" ? /* @__PURE__ */ a(Qs, {
5510
+ return t.type === "inlineFill" ? /* @__PURE__ */ a(rc, {
5491
5511
  disabled: e,
5492
5512
  element: t,
5493
5513
  hasAnswer: n,
@@ -5496,7 +5516,7 @@ function Nc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
5496
5516
  richTextControls: o,
5497
5517
  title: s,
5498
5518
  translator: c
5499
- }) : t.type === "wordBuilder" ? /* @__PURE__ */ a(Mc, {
5519
+ }) : t.type === "wordBuilder" ? /* @__PURE__ */ a(Rc, {
5500
5520
  disabled: e,
5501
5521
  element: t,
5502
5522
  hasAnswer: n,
@@ -5505,20 +5525,20 @@ function Nc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
5505
5525
  richTextControls: o,
5506
5526
  title: s,
5507
5527
  translator: c
5508
- }) : t.type === "classification" ? Fc(s, null, /* @__PURE__ */ a(Xs, {
5528
+ }) : t.type === "classification" ? Vc(s, null, /* @__PURE__ */ a(tc, {
5509
5529
  disabled: e,
5510
5530
  hasAnswer: n,
5511
5531
  item: r,
5512
5532
  onChange: i,
5513
5533
  richTextControls: o,
5514
5534
  translator: c
5515
- })) : t.type === "richText" ? Fc(s, null, /* @__PURE__ */ a(kc, {
5535
+ })) : t.type === "richText" ? Vc(s, null, /* @__PURE__ */ a(Pc, {
5516
5536
  disabled: e,
5517
5537
  item: r,
5518
5538
  onChange: i,
5519
5539
  richTextControls: o,
5520
5540
  translator: c
5521
- })) : Pc({
5541
+ })) : Bc({
5522
5542
  disabled: e,
5523
5543
  element: t,
5524
5544
  hasAnswer: n,
@@ -5530,15 +5550,15 @@ function Nc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
5530
5550
  t: l
5531
5551
  });
5532
5552
  }
5533
- function Pc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: o, title: s, translator: c, t: l }) {
5553
+ function Bc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richTextControls: o, title: s, translator: c, t: l }) {
5534
5554
  switch (t.type) {
5535
- case "fill": return Fc(s, /* @__PURE__ */ a(F, {
5555
+ case "fill": return Vc(s, /* @__PURE__ */ a(F, {
5536
5556
  "aria-label": l("questionContentEditor.actions.addBlank"),
5537
5557
  disabled: e,
5538
5558
  icon: "+",
5539
- onClick: () => i(Ic(r, n)),
5559
+ onClick: () => i(Hc(r, n)),
5540
5560
  children: l("questionContentEditor.actions.addBlank")
5541
- }), /* @__PURE__ */ a(Js, {
5561
+ }), /* @__PURE__ */ a($s, {
5542
5562
  disabled: e,
5543
5563
  hasAnswer: n,
5544
5564
  item: r,
@@ -5546,7 +5566,7 @@ function Pc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
5546
5566
  richTextControls: o,
5547
5567
  translator: c
5548
5568
  }));
5549
- case "choice": return Fc(s, null, /* @__PURE__ */ a(Dc, {
5569
+ case "choice": return Vc(s, null, /* @__PURE__ */ a(Mc, {
5550
5570
  disabled: e,
5551
5571
  element: t,
5552
5572
  hasAnswer: n,
@@ -5555,7 +5575,7 @@ function Pc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
5555
5575
  richTextControls: o,
5556
5576
  translator: c
5557
5577
  }));
5558
- case "judgement": return Fc(s, null, /* @__PURE__ */ a(ec, {
5578
+ case "judgement": return Vc(s, null, /* @__PURE__ */ a(ac, {
5559
5579
  disabled: e,
5560
5580
  element: t,
5561
5581
  hasAnswer: n,
@@ -5563,7 +5583,7 @@ function Pc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
5563
5583
  onChange: i,
5564
5584
  translator: c
5565
5585
  }));
5566
- case "lineConnect": return Fc(s, null, /* @__PURE__ */ a(pc, {
5586
+ case "lineConnect": return Vc(s, null, /* @__PURE__ */ a(vc, {
5567
5587
  disabled: e,
5568
5588
  element: t,
5569
5589
  hasAnswer: n,
@@ -5572,7 +5592,7 @@ function Pc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
5572
5592
  richTextControls: o,
5573
5593
  translator: c
5574
5594
  }));
5575
- case "matching": return Fc(s, null, /* @__PURE__ */ a(Sc, {
5595
+ case "matching": return Vc(s, null, /* @__PURE__ */ a(Dc, {
5576
5596
  disabled: e,
5577
5597
  element: t,
5578
5598
  hasAnswer: n,
@@ -5581,7 +5601,7 @@ function Pc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
5581
5601
  richTextControls: o,
5582
5602
  translator: c
5583
5603
  }));
5584
- case "ordering": return Fc(s, null, /* @__PURE__ */ a(Oc, {
5604
+ case "ordering": return Vc(s, null, /* @__PURE__ */ a(Nc, {
5585
5605
  disabled: e,
5586
5606
  hasAnswer: n,
5587
5607
  item: r,
@@ -5589,7 +5609,7 @@ function Pc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
5589
5609
  richTextControls: o,
5590
5610
  translator: c
5591
5611
  }));
5592
- case "textMarker": return Fc(s, null, /* @__PURE__ */ a(jc, {
5612
+ case "textMarker": return Vc(s, null, /* @__PURE__ */ a(Ic, {
5593
5613
  disabled: e,
5594
5614
  hasAnswer: n,
5595
5615
  item: r,
@@ -5599,7 +5619,7 @@ function Pc({ disabled: e, element: t, hasAnswer: n, item: r, onChange: i, richT
5599
5619
  }));
5600
5620
  }
5601
5621
  }
5602
- function Fc(e, t, n) {
5622
+ function Vc(e, t, n) {
5603
5623
  return /* @__PURE__ */ o("div", {
5604
5624
  className: "flex min-w-0 flex-col gap-3",
5605
5625
  children: [/* @__PURE__ */ o("div", {
@@ -5611,22 +5631,19 @@ function Fc(e, t, n) {
5611
5631
  }), n]
5612
5632
  });
5613
5633
  }
5614
- function Ic(e, t) {
5634
+ function Hc(e, t) {
5615
5635
  let n = $i(e);
5616
5636
  return t ? n : k(k({}, n), {}, { answers: [] });
5617
5637
  }
5618
5638
  //#endregion
5619
5639
  //#region src/question/content-editor/subquestion-group-editor-helpers.ts
5620
- function Lc(e, t) {
5621
- return hi(zc(e.structure, t), e.questionTypeKey);
5640
+ function Uc(e, t) {
5641
+ return hi(ks(e.structure, t), e.questionTypeKey);
5622
5642
  }
5623
- function Rc(e) {
5643
+ function Wc(e) {
5624
5644
  return e;
5625
5645
  }
5626
- function zc(e, t) {
5627
- return k(k({}, e), {}, { hasAnswer: t && e.hasAnswer });
5628
- }
5629
- function Bc(e, t, n) {
5646
+ function Gc(e, t, n) {
5630
5647
  let r = t + n;
5631
5648
  return t < 0 || r < 0 || r >= e.length ? e : e.map((n, i) => {
5632
5649
  if (i === t) {
@@ -5642,20 +5659,20 @@ function Bc(e, t, n) {
5642
5659
  }
5643
5660
  //#endregion
5644
5661
  //#region src/question/content-editor/QuestionContentSubquestionAddChildDropdown.tsx
5645
- function Vc({ disabled: e, hasAnswer: t, onAddChild: n, subquestionTemplates: r, translator: i }) {
5662
+ function Kc({ disabled: e, hasAnswer: t, onAddChild: n, questionTypeTemplates: r, translator: i }) {
5646
5663
  var s, c, l;
5647
- let { t: u } = i, d = f(() => Rc(r), [r]), p = f(() => new Map(d.map((e) => [String(e.questionTypeKey), e])), [d]), h = f(() => d.map((e) => ({
5664
+ let { t: u } = i, d = f(() => Wc(r), [r]), p = f(() => new Map(d.map((e) => [String(e.questionTypeKey), e])), [d]), h = f(() => d.map((e) => ({
5648
5665
  label: e.label,
5649
5666
  value: String(e.questionTypeKey)
5650
5667
  })), [d]), [g, _] = m((s = (c = h[0]) == null ? void 0 : c.value) == null ? "" : s), v = p.has(g) ? g : ((l = h[0]) == null ? void 0 : l.value) || "";
5651
5668
  function y() {
5652
5669
  let e = p.get(v);
5653
- e && n(Lc(e, t));
5670
+ e && n(Uc(e, t));
5654
5671
  }
5655
5672
  let b = e || d.length === 0;
5656
5673
  return /* @__PURE__ */ o("span", {
5657
5674
  className: "flex min-w-0 flex-wrap items-center gap-2",
5658
- children: [h.length > 1 ? /* @__PURE__ */ a(Ms, {
5675
+ children: [h.length > 1 ? /* @__PURE__ */ a(Ls, {
5659
5676
  "aria-label": u("questionContentEditor.subquestion.selectTemplate"),
5660
5677
  disabled: e,
5661
5678
  onChange: (e) => _(e == null ? "" : e),
@@ -5671,12 +5688,12 @@ function Vc({ disabled: e, hasAnswer: t, onAddChild: n, subquestionTemplates: r,
5671
5688
  }
5672
5689
  //#endregion
5673
5690
  //#region src/question/shared/subquestion-numbering.ts
5674
- function Hc(e) {
5691
+ function qc(e) {
5675
5692
  return e.map((e) => String(e + 1)).join(".");
5676
5693
  }
5677
5694
  //#endregion
5678
5695
  //#region src/question/content-editor/QuestionContentSubquestionChildElements.tsx
5679
- function Uc({ child: e, disabled: t, onChange: n, richTextControls: r, structure: i, translator: s }) {
5696
+ function Jc({ child: e, disabled: t, onChange: n, richTextControls: r, structure: i, translator: s }) {
5680
5697
  let { t: c } = s;
5681
5698
  function l(t) {
5682
5699
  n(k(k({}, e), Mi(e, t)));
@@ -5684,11 +5701,11 @@ function Uc({ child: e, disabled: t, onChange: n, richTextControls: r, structure
5684
5701
  function u(t) {
5685
5702
  n(k(k({}, e), Ni(e, t)));
5686
5703
  }
5687
- return i.elements.length === 0 && i.extras.length === 0 ? /* @__PURE__ */ a(Is, { description: c("questionContentEditor.subquestion.emptyTemplate") }) : /* @__PURE__ */ o("div", {
5704
+ return i.elements.length === 0 && i.extras.length === 0 ? /* @__PURE__ */ a(Vs, { description: c("questionContentEditor.subquestion.emptyTemplate") }) : /* @__PURE__ */ o("div", {
5688
5705
  className: "flex min-w-0 flex-col",
5689
5706
  children: [i.elements.map((n) => /* @__PURE__ */ a("section", {
5690
5707
  className: "flex min-w-0 flex-col gap-3 border-t border-slate-100 py-3 first:border-t-0 first:pt-0 last:pb-0",
5691
- children: /* @__PURE__ */ a(Nc, {
5708
+ children: /* @__PURE__ */ a(zc, {
5692
5709
  disabled: t,
5693
5710
  element: n,
5694
5711
  hasAnswer: i.hasAnswer,
@@ -5702,11 +5719,11 @@ function Uc({ child: e, disabled: t, onChange: n, richTextControls: r, structure
5702
5719
  let o = Si(e, n);
5703
5720
  return /* @__PURE__ */ a("section", {
5704
5721
  className: "flex min-w-0 flex-col gap-3 border-t border-slate-100 py-3 first:border-t-0 first:pt-0 last:pb-0",
5705
- children: /* @__PURE__ */ a(Nc, {
5722
+ children: /* @__PURE__ */ a(zc, {
5706
5723
  disabled: t,
5707
- element: Wc(n),
5724
+ element: Yc(n),
5708
5725
  hasAnswer: i.hasAnswer,
5709
- item: Gc(o),
5726
+ item: Xc(o),
5710
5727
  onChange: (e) => u({
5711
5728
  content: e.content,
5712
5729
  extraKey: n.extraKey,
@@ -5720,7 +5737,7 @@ function Uc({ child: e, disabled: t, onChange: n, richTextControls: r, structure
5720
5737
  })]
5721
5738
  });
5722
5739
  }
5723
- function Wc(e) {
5740
+ function Yc(e) {
5724
5741
  return {
5725
5742
  config: {},
5726
5743
  elementKey: e.extraKey,
@@ -5728,7 +5745,7 @@ function Wc(e) {
5728
5745
  type: "richText"
5729
5746
  };
5730
5747
  }
5731
- function Gc(e) {
5748
+ function Xc(e) {
5732
5749
  return {
5733
5750
  content: e.content,
5734
5751
  elementKey: e.extraKey,
@@ -5736,17 +5753,14 @@ function Gc(e) {
5736
5753
  };
5737
5754
  }
5738
5755
  //#endregion
5739
- //#region src/question/content-editor/subquestion-template.ts
5740
- function Kc(e, t) {
5741
- return t !== null && e.questionTypeKey === t;
5742
- }
5743
- function qc(e, t) {
5744
- return e.find((e) => Kc(e, t));
5745
- }
5746
- //#endregion
5747
5756
  //#region src/question/content-editor/QuestionContentSubquestionChildEditor.tsx
5748
- function Jc({ child: e, childIndex: t, disabled: n, hasAnswer: r, numberPath: i, onChange: s, onDelete: c, onMove: l, richTextControls: u, siblingCount: d, subquestionTemplates: f, translator: p }) {
5749
- let { t: m } = p, h = i == null ? [t] : i, g = Hc(h), _ = Yc(e, f), v = Xc(_, r), y = mi(v), b = k(k(k({}, e), ji(v, e)), {}, { children: e.children });
5757
+ function Zc({ child: e, childIndex: t, disabled: n, hasAnswer: r, numberPath: i, onChange: s, onDelete: c, onMove: l, richTextControls: u, siblingCount: d, questionTypeTemplates: f, translator: p }) {
5758
+ let { t: m } = p, h = i == null ? [t] : i, g = qc(h), _ = Qc(e, f), v = _ ? ks(_.structure, r) : void 0;
5759
+ if (!v) return /* @__PURE__ */ o("section", {
5760
+ className: "flex min-w-0 flex-col gap-3 border-b border-l-2 border-slate-200 border-l-blue-600 bg-white py-4 pr-0 pl-3 last:border-b-0 sm:pl-4",
5761
+ children: [T(null), /* @__PURE__ */ a(Vs, { description: m("questionContentEditor.subquestion.missingTemplate") })]
5762
+ });
5763
+ let y = mi(v), b = k(k(k({}, e), ji(v, e)), {}, { children: e.children });
5750
5764
  function x(e) {
5751
5765
  s(k(k({}, b), {}, { children: [...b.children, e] }));
5752
5766
  }
@@ -5757,68 +5771,16 @@ function Jc({ child: e, childIndex: t, disabled: n, hasAnswer: r, numberPath: i,
5757
5771
  s(k(k({}, b), {}, { children: b.children.filter((t, n) => n !== e) }));
5758
5772
  }
5759
5773
  function w(e, t) {
5760
- s(k(k({}, b), {}, { children: Bc(b.children, e, t) }));
5774
+ s(k(k({}, b), {}, { children: Gc(b.children, e, t) }));
5761
5775
  }
5762
5776
  return /* @__PURE__ */ o("section", {
5763
5777
  className: "flex min-w-0 flex-col gap-3 border-b border-l-2 border-slate-200 border-l-blue-600 bg-white py-4 pr-0 pl-3 last:border-b-0 sm:pl-4",
5764
5778
  children: [
5765
- /* @__PURE__ */ o("div", {
5766
- className: "flex min-w-0 flex-wrap items-start justify-between gap-3",
5767
- children: [/* @__PURE__ */ o("span", {
5768
- className: "min-w-0",
5769
- children: [/* @__PURE__ */ a(I.Text, {
5770
- strong: !0,
5771
- children: m("questionContentEditor.subquestion.childTitle", { index: g })
5772
- }), /* @__PURE__ */ o(I.Text, {
5773
- className: "block",
5774
- type: "secondary",
5775
- children: [
5776
- m("questionContentEditor.subquestion.questionKind"),
5777
- " \u00b7",
5778
- " ",
5779
- Zc(_, e)
5780
- ]
5781
- })]
5782
- }), /* @__PURE__ */ o(Ls, {
5783
- size: 4,
5784
- wrap: !0,
5785
- children: [
5786
- /* @__PURE__ */ a(Vc, {
5787
- disabled: n,
5788
- hasAnswer: r,
5789
- onAddChild: x,
5790
- subquestionTemplates: f,
5791
- translator: p
5792
- }),
5793
- /* @__PURE__ */ a(F, {
5794
- "aria-label": m("questionContentEditor.subquestion.moveChildUp", { index: g }),
5795
- disabled: n || t === 0,
5796
- icon: "\u2191",
5797
- onClick: () => l(-1),
5798
- size: "small"
5799
- }),
5800
- /* @__PURE__ */ a(F, {
5801
- "aria-label": m("questionContentEditor.subquestion.moveChildDown", { index: g }),
5802
- disabled: n || t === d - 1,
5803
- icon: "\u2193",
5804
- onClick: () => l(1),
5805
- size: "small"
5806
- }),
5807
- /* @__PURE__ */ a(F, {
5808
- "aria-label": m("questionContentEditor.subquestion.deleteChild", { index: g }),
5809
- danger: !0,
5810
- disabled: n,
5811
- icon: "\u00d7",
5812
- onClick: c,
5813
- size: "small"
5814
- })
5815
- ]
5816
- })]
5817
- }),
5818
- Qc(y, n, b, s, u, v, p),
5779
+ T(x),
5780
+ el(y, n, b, s, u, v, p),
5819
5781
  b.children.length === 0 ? null : /* @__PURE__ */ a("div", {
5820
5782
  className: "ml-3 flex min-w-0 flex-col pl-3 sm:ml-4 sm:pl-4",
5821
- children: b.children.map((e, t) => /* @__PURE__ */ a(Jc, {
5783
+ children: b.children.map((e, t) => /* @__PURE__ */ a(Zc, {
5822
5784
  child: e,
5823
5785
  childIndex: t,
5824
5786
  disabled: n,
@@ -5829,29 +5791,76 @@ function Jc({ child: e, childIndex: t, disabled: n, hasAnswer: r, numberPath: i,
5829
5791
  onMove: (e) => w(t, e),
5830
5792
  richTextControls: u,
5831
5793
  siblingCount: b.children.length,
5832
- subquestionTemplates: f,
5794
+ questionTypeTemplates: f,
5833
5795
  translator: p
5834
- }, $c(e, t)))
5796
+ }, tl(e, t)))
5835
5797
  })
5836
5798
  ]
5837
5799
  });
5800
+ function T(i) {
5801
+ return /* @__PURE__ */ o("div", {
5802
+ className: "flex min-w-0 flex-wrap items-start justify-between gap-3",
5803
+ children: [/* @__PURE__ */ o("span", {
5804
+ className: "min-w-0",
5805
+ children: [/* @__PURE__ */ a(I.Text, {
5806
+ strong: !0,
5807
+ children: m("questionContentEditor.subquestion.childTitle", { index: g })
5808
+ }), /* @__PURE__ */ o(I.Text, {
5809
+ className: "block",
5810
+ type: "secondary",
5811
+ children: [
5812
+ m("questionContentEditor.subquestion.questionKind"),
5813
+ " \u00b7",
5814
+ " ",
5815
+ $c(_, e)
5816
+ ]
5817
+ })]
5818
+ }), /* @__PURE__ */ o(Hs, {
5819
+ size: 4,
5820
+ wrap: !0,
5821
+ children: [
5822
+ i ? /* @__PURE__ */ a(Kc, {
5823
+ disabled: n,
5824
+ hasAnswer: r,
5825
+ onAddChild: i,
5826
+ questionTypeTemplates: f,
5827
+ translator: p
5828
+ }) : null,
5829
+ /* @__PURE__ */ a(F, {
5830
+ "aria-label": m("questionContentEditor.subquestion.moveChildUp", { index: g }),
5831
+ disabled: n || t === 0,
5832
+ icon: "\u2191",
5833
+ onClick: () => l(-1),
5834
+ size: "small"
5835
+ }),
5836
+ /* @__PURE__ */ a(F, {
5837
+ "aria-label": m("questionContentEditor.subquestion.moveChildDown", { index: g }),
5838
+ disabled: n || t === d - 1,
5839
+ icon: "\u2193",
5840
+ onClick: () => l(1),
5841
+ size: "small"
5842
+ }),
5843
+ /* @__PURE__ */ a(F, {
5844
+ "aria-label": m("questionContentEditor.subquestion.deleteChild", { index: g }),
5845
+ danger: !0,
5846
+ disabled: n,
5847
+ icon: "\u00d7",
5848
+ onClick: c,
5849
+ size: "small"
5850
+ })
5851
+ ]
5852
+ })]
5853
+ });
5854
+ }
5838
5855
  }
5839
- function Yc(e, t) {
5840
- return qc(t, e.questionTypeKey);
5841
- }
5842
- function Xc(e, t) {
5843
- return zc(e ? e.structure : {
5844
- elements: [],
5845
- extras: [],
5846
- hasAnswer: t,
5847
- systemQuestionType: ""
5848
- }, t);
5856
+ function Qc(e, t) {
5857
+ return Ms(t, e.questionTypeKey);
5849
5858
  }
5850
- function Zc(e, t) {
5859
+ function $c(e, t) {
5851
5860
  return e ? e.label : t.questionTypeKey;
5852
5861
  }
5853
- function Qc(e, t, n, r, i, o, s) {
5854
- return e ? null : /* @__PURE__ */ a(Uc, {
5862
+ function el(e, t, n, r, i, o, s) {
5863
+ return e ? null : /* @__PURE__ */ a(Jc, {
5855
5864
  child: n,
5856
5865
  disabled: t,
5857
5866
  onChange: r,
@@ -5860,12 +5869,12 @@ function Qc(e, t, n, r, i, o, s) {
5860
5869
  translator: s
5861
5870
  });
5862
5871
  }
5863
- function $c(e, t) {
5872
+ function tl(e, t) {
5864
5873
  return `child-${e.questionTypeKey}-${t}`;
5865
5874
  }
5866
5875
  //#endregion
5867
5876
  //#region src/question/content-editor/QuestionContentSubquestionGroupEditor.tsx
5868
- function el({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls: i, subquestionTemplates: s, translator: c }) {
5877
+ function nl({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls: i, questionTypeTemplates: s, translator: c }) {
5869
5878
  let { t: l } = c, u = n.children.length;
5870
5879
  function d(e) {
5871
5880
  r(k(k({}, n), {}, {
@@ -5883,11 +5892,11 @@ function el({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
5883
5892
  d(n.children.filter((t, n) => n !== e));
5884
5893
  }
5885
5894
  function h(e, t) {
5886
- d(Bc(n.children, e, t));
5895
+ d(Gc(n.children, e, t));
5887
5896
  }
5888
5897
  function g(r, o) {
5889
5898
  var l;
5890
- return /* @__PURE__ */ a(Jc, {
5899
+ return /* @__PURE__ */ a(Zc, {
5891
5900
  child: r,
5892
5901
  childIndex: o,
5893
5902
  disabled: e,
@@ -5897,7 +5906,7 @@ function el({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
5897
5906
  onMove: (e) => h(o, e),
5898
5907
  richTextControls: i,
5899
5908
  siblingCount: n.children.length,
5900
- subquestionTemplates: s,
5909
+ questionTypeTemplates: s,
5901
5910
  translator: c
5902
5911
  }, `child-${(l = r.questionTypeKey) == null ? "unknown" : l}-${o}`);
5903
5912
  }
@@ -5915,56 +5924,55 @@ function el({ disabled: e, hasAnswer: t, item: n, onChange: r, richTextControls:
5915
5924
  type: "secondary",
5916
5925
  children: l("questionContentEditor.subquestion.structureCheck", { nodeCount: u })
5917
5926
  })]
5918
- }), /* @__PURE__ */ a(Ls, {
5927
+ }), /* @__PURE__ */ a(Hs, {
5919
5928
  className: "min-w-0 justify-end",
5920
5929
  wrap: !0,
5921
- children: /* @__PURE__ */ a(Vc, {
5930
+ children: /* @__PURE__ */ a(Kc, {
5922
5931
  disabled: e,
5923
5932
  hasAnswer: t,
5924
5933
  onAddChild: f,
5925
- subquestionTemplates: s,
5934
+ questionTypeTemplates: s,
5926
5935
  translator: c
5927
5936
  })
5928
5937
  })]
5929
5938
  }), /* @__PURE__ */ a("div", {
5930
5939
  className: "flex min-w-0 flex-col",
5931
- children: u === 0 ? /* @__PURE__ */ a(Is, { description: l("questionContentEditor.subquestion.emptyNodes") }) : n.children.map(g)
5940
+ children: u === 0 ? /* @__PURE__ */ a(Vs, { description: l("questionContentEditor.subquestion.emptyNodes") }) : n.children.map(g)
5932
5941
  })]
5933
5942
  });
5934
5943
  }
5935
5944
  //#endregion
5936
5945
  //#region src/question/content-editor/QuestionContentEditor.tsx
5937
- function tl({ disabled: t = !1, locale: n = "zh-CN", onChange: r, structure: i, subquestionTemplates: s = [], uploadImage: c, value: l }) {
5938
- let u = ws(n), { t: d } = u, p = f(() => ({
5946
+ function rl({ disabled: t = !1, locale: n = "zh-CN", onChange: r, questionTypeTemplates: i, uploadImage: s, value: c }) {
5947
+ let l = ws(n), { t: u } = l, d = As(i, c), p = f(() => ({
5939
5948
  plugins: [ni, ys],
5940
- uploadImage: c
5941
- }), [c]);
5949
+ uploadImage: s
5950
+ }), [s]);
5942
5951
  function m(e) {
5943
- r(Mi(l, e));
5952
+ r(Mi(c, e));
5944
5953
  }
5945
5954
  function h(e) {
5946
- r(Ni(l, e));
5955
+ r(Ni(c, e));
5947
5956
  }
5948
- function g(e) {
5949
- let n = xi(l, e, i.hasAnswer);
5950
- return /* @__PURE__ */ a(Nc, {
5957
+ function g(e, n) {
5958
+ return /* @__PURE__ */ a(zc, {
5951
5959
  disabled: t,
5952
5960
  element: e,
5953
- hasAnswer: i.hasAnswer,
5954
- item: n,
5961
+ hasAnswer: n,
5962
+ item: xi(c, e, n),
5955
5963
  onChange: m,
5956
5964
  richTextControls: p,
5957
- title: e.name || d(`questionContentEditor.elementType.${e.type}`),
5958
- translator: u
5965
+ title: e.name || u(`questionContentEditor.elementType.${e.type}`),
5966
+ translator: l
5959
5967
  });
5960
5968
  }
5961
- function _(e) {
5962
- let n = Si(l, e);
5963
- return /* @__PURE__ */ a(Nc, {
5969
+ function _(e, n) {
5970
+ let r = Si(c, e);
5971
+ return /* @__PURE__ */ a(zc, {
5964
5972
  disabled: t,
5965
- element: nl(e),
5966
- hasAnswer: i.hasAnswer,
5967
- item: rl(n),
5973
+ element: il(e),
5974
+ hasAnswer: n,
5975
+ item: al(r),
5968
5976
  onChange: (t) => h({
5969
5977
  content: t.content,
5970
5978
  extraKey: e.extraKey,
@@ -5972,45 +5980,45 @@ function tl({ disabled: t = !1, locale: n = "zh-CN", onChange: r, structure: i,
5972
5980
  }),
5973
5981
  richTextControls: p,
5974
5982
  title: e.name,
5975
- translator: u
5983
+ translator: l
5976
5984
  });
5977
5985
  }
5978
- let v = mi(i) ? /* @__PURE__ */ a(el, {
5986
+ let v = d ? mi(d) ? /* @__PURE__ */ a(nl, {
5979
5987
  disabled: t,
5980
- hasAnswer: i.hasAnswer,
5981
- item: k(k({}, l), {}, { elements: [] }),
5988
+ hasAnswer: d.hasAnswer,
5989
+ item: k(k({}, c), {}, { elements: [] }),
5982
5990
  onChange: r,
5983
5991
  richTextControls: p,
5984
- subquestionTemplates: s,
5985
- translator: u
5992
+ questionTypeTemplates: i,
5993
+ translator: l
5986
5994
  }) : /* @__PURE__ */ o("div", {
5987
5995
  className: "flex min-w-0 flex-col gap-4",
5988
- children: [i.elements.map((e) => /* @__PURE__ */ a("section", {
5996
+ children: [d.elements.map((e) => /* @__PURE__ */ a("section", {
5989
5997
  className: "flex min-w-0 flex-col gap-3 rounded-md border border-slate-200 bg-white p-4",
5990
- children: g(e)
5991
- }, e.elementKey)), i.extras.map((e) => /* @__PURE__ */ a("section", {
5998
+ children: g(e, d.hasAnswer)
5999
+ }, e.elementKey)), d.extras.map((e) => /* @__PURE__ */ a("section", {
5992
6000
  className: "flex min-w-0 flex-col gap-3 rounded-md border border-slate-200 bg-white p-4",
5993
- children: _(e)
6001
+ children: _(e, d.hasAnswer)
5994
6002
  }, e.extraKey))]
5995
- });
6003
+ }) : /* @__PURE__ */ a(Vs, { description: u("questionContentEditor.subquestion.missingTemplate") });
5996
6004
  return /* @__PURE__ */ o(e.Root, {
5997
6005
  className: [
5998
6006
  "question-content-editor",
5999
- Os.root,
6000
- Os["rich-text-root"]
6007
+ Ns.root,
6008
+ Ns["rich-text-root"]
6001
6009
  ].join(" "),
6002
6010
  plugins: p.plugins,
6003
- uploadImage: c,
6011
+ uploadImage: s,
6004
6012
  children: [t ? null : /* @__PURE__ */ a(e.Toolbar, {
6005
6013
  "aria-label": "Rich text toolbar",
6006
- className: Os["rich-text-toolbar"]
6014
+ className: Ns["rich-text-toolbar"]
6007
6015
  }), /* @__PURE__ */ a(xs.Provider, {
6008
6016
  value: !0,
6009
6017
  children: v
6010
6018
  })]
6011
6019
  });
6012
6020
  }
6013
- function nl(e) {
6021
+ function il(e) {
6014
6022
  return {
6015
6023
  config: {},
6016
6024
  elementKey: e.extraKey,
@@ -6018,7 +6026,7 @@ function nl(e) {
6018
6026
  type: "richText"
6019
6027
  };
6020
6028
  }
6021
- function rl(e) {
6029
+ function al(e) {
6022
6030
  return {
6023
6031
  content: e.content,
6024
6032
  elementKey: e.extraKey,
@@ -6027,38 +6035,37 @@ function rl(e) {
6027
6035
  }
6028
6036
  //#endregion
6029
6037
  //#region src/question/content-editor/structure.ts
6030
- function il(e, t) {
6038
+ function ol(e, t) {
6031
6039
  return {
6032
- elements: e.elements.map((e) => hl(e, t)),
6040
+ elements: e.elements.map((e) => _l(e, t)),
6033
6041
  extras: e.extras.map((e) => ({
6034
6042
  extraKey: e.extraKey,
6035
- name: _l(e, Jr(e.type), Yr(e.type), t),
6043
+ name: yl(e, Jr(e.type), Yr(e.type), t),
6036
6044
  type: e.type
6037
6045
  })),
6038
6046
  hasAnswer: e.globalConfig.hasAnswer,
6039
6047
  systemQuestionType: ""
6040
6048
  };
6041
6049
  }
6042
- function al(e, t, n) {
6043
- return !e || !t ? null : k(k({}, ji(t, cl(e))), {}, { children: e.children.map((e) => {
6044
- let t = qc(n, e.questionTypeKey);
6045
- return t ? al(e, t.structure, n) : null;
6046
- }).filter((e) => !!e) });
6050
+ function sl(e, t) {
6051
+ if (!e) return null;
6052
+ let n = Os(t, e.questionTypeKey);
6053
+ return n ? k(k({}, ji(n, ul(e))), {}, { children: e.children.map((e) => sl(e, t)).filter((e) => !!e) }) : null;
6047
6054
  }
6048
- function ol(e) {
6055
+ function cl(e) {
6049
6056
  return {
6050
6057
  description: e.description,
6051
- elements: e.elements.map(dl),
6052
- extras: e.extras.map(ml),
6058
+ elements: e.elements.map(pl),
6059
+ extras: e.extras.map(gl),
6053
6060
  globalConfig: k({}, e.globalConfig),
6054
6061
  isSubjective: e.isSubjective,
6055
6062
  version: e.version
6056
6063
  };
6057
6064
  }
6058
- function sl(e, t) {
6059
- return e.globalConfig.hasAnswer !== t.globalConfig.hasAnswer || e.elements.length !== t.elements.length || e.extras.length !== t.extras.length || ll(e.elements, t.elements) || ul(e.extras, t.extras) ? "shape" : "metadata";
6065
+ function ll(e, t) {
6066
+ return e.globalConfig.hasAnswer !== t.globalConfig.hasAnswer || e.elements.length !== t.elements.length || e.extras.length !== t.extras.length || dl(e.elements, t.elements) || fl(e.extras, t.extras) ? "shape" : "metadata";
6060
6067
  }
6061
- function cl(e) {
6068
+ function ul(e) {
6062
6069
  return {
6063
6070
  questionTypeKey: e.questionTypeKey,
6064
6071
  children: [],
@@ -6068,22 +6075,22 @@ function cl(e) {
6068
6075
  version: e.version
6069
6076
  };
6070
6077
  }
6071
- function ll(e, t) {
6078
+ function dl(e, t) {
6072
6079
  return e.some((e, n) => {
6073
6080
  let r = t.slice(n, n + 1)[0];
6074
6081
  return !r || e.clientId !== r.clientId || e.elementKey !== r.elementKey || e.type !== r.type || JSON.stringify(e.config) !== JSON.stringify(r.config);
6075
6082
  });
6076
6083
  }
6077
- function ul(e, t) {
6084
+ function fl(e, t) {
6078
6085
  return e.some((e, n) => {
6079
6086
  let r = t.slice(n, n + 1)[0];
6080
6087
  return !r || e.clientId !== r.clientId || e.extraKey !== r.extraKey || e.type !== r.type;
6081
6088
  });
6082
6089
  }
6083
- function dl(e) {
6084
- return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" ? pl(e) : fl(e);
6090
+ function pl(e) {
6091
+ return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" ? hl(e) : ml(e);
6085
6092
  }
6086
- function fl(e) {
6093
+ function ml(e) {
6087
6094
  switch (e.type) {
6088
6095
  case "inlineFill": return {
6089
6096
  config: k({}, e.config),
@@ -6129,7 +6136,7 @@ function fl(e) {
6129
6136
  };
6130
6137
  }
6131
6138
  }
6132
- function pl(e) {
6139
+ function hl(e) {
6133
6140
  return {
6134
6141
  config: {},
6135
6142
  elementKey: e.elementKey,
@@ -6138,7 +6145,7 @@ function pl(e) {
6138
6145
  type: e.type
6139
6146
  };
6140
6147
  }
6141
- function ml(e) {
6148
+ function gl(e) {
6142
6149
  return {
6143
6150
  enName: e.enName,
6144
6151
  extraKey: e.extraKey,
@@ -6146,15 +6153,15 @@ function ml(e) {
6146
6153
  type: e.type
6147
6154
  };
6148
6155
  }
6149
- function hl(e, t) {
6156
+ function _l(e, t) {
6150
6157
  return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" ? {
6151
6158
  config: {},
6152
6159
  elementKey: e.elementKey,
6153
- name: _l(e, A(e.type), j(e.type), t),
6160
+ name: yl(e, A(e.type), j(e.type), t),
6154
6161
  type: e.type
6155
- } : gl(e, t);
6162
+ } : vl(e, t);
6156
6163
  }
6157
- function gl(e, t) {
6164
+ function vl(e, t) {
6158
6165
  switch (e.type) {
6159
6166
  case "inlineFill": return {
6160
6167
  config: {
@@ -6162,19 +6169,19 @@ function gl(e, t) {
6162
6169
  candidateMode: e.config.candidateMode
6163
6170
  },
6164
6171
  elementKey: e.elementKey,
6165
- name: _l(e, A("inlineFill"), j("inlineFill"), t),
6172
+ name: yl(e, A("inlineFill"), j("inlineFill"), t),
6166
6173
  type: "inlineFill"
6167
6174
  };
6168
6175
  case "wordBuilder": return {
6169
6176
  config: { builderMode: e.config.builderMode },
6170
6177
  elementKey: e.elementKey,
6171
- name: _l(e, A("wordBuilder"), j("wordBuilder"), t),
6178
+ name: yl(e, A("wordBuilder"), j("wordBuilder"), t),
6172
6179
  type: "wordBuilder"
6173
6180
  };
6174
6181
  case "judgement": return {
6175
6182
  config: { judgeAnswerMode: e.config.judgeAnswerMode },
6176
6183
  elementKey: e.elementKey,
6177
- name: _l(e, A("judgement"), j("judgement"), t),
6184
+ name: yl(e, A("judgement"), j("judgement"), t),
6178
6185
  type: "judgement"
6179
6186
  };
6180
6187
  case "choice": return {
@@ -6184,24 +6191,24 @@ function gl(e, t) {
6184
6191
  selectionType: e.config.selectionType
6185
6192
  },
6186
6193
  elementKey: e.elementKey,
6187
- name: _l(e, A("choice"), j("choice"), t),
6194
+ name: yl(e, A("choice"), j("choice"), t),
6188
6195
  type: "choice"
6189
6196
  };
6190
6197
  case "lineConnect": return {
6191
6198
  config: { columns: e.config.columns.map((e) => k({}, e)) },
6192
6199
  elementKey: e.elementKey,
6193
- name: _l(e, A("lineConnect"), j("lineConnect"), t),
6200
+ name: yl(e, A("lineConnect"), j("lineConnect"), t),
6194
6201
  type: "lineConnect"
6195
6202
  };
6196
6203
  case "matching": return {
6197
6204
  config: { columns: e.config.columns.map((e) => k({}, e)) },
6198
6205
  elementKey: e.elementKey,
6199
- name: _l(e, A("matching"), j("matching"), t),
6206
+ name: yl(e, A("matching"), j("matching"), t),
6200
6207
  type: "matching"
6201
6208
  };
6202
6209
  }
6203
6210
  }
6204
- function _l(e, t, n, r) {
6211
+ function yl(e, t, n, r) {
6205
6212
  var i;
6206
6213
  if (r === "en-US") {
6207
6214
  var a;
@@ -6211,231 +6218,221 @@ function _l(e, t, n, r) {
6211
6218
  }
6212
6219
  //#endregion
6213
6220
  //#region src/question/player/helpers.ts
6214
- function vl(e, t, n = []) {
6215
- let r = mi(t);
6221
+ function bl(e, t) {
6222
+ let n = Os(t, e.questionTypeKey), r = n ? mi(n) : !1;
6216
6223
  return {
6217
6224
  questionTypeKey: e.questionTypeKey,
6218
- children: e.children.map((e) => Rl(e, n)),
6225
+ children: e.children.map((e) => bl(e, t)),
6219
6226
  id: e.id,
6220
- items: r ? [] : t.elements.reduce((n, r) => {
6221
- let i = zl(r, xi(e, r, t.hasAnswer));
6222
- return i ? [...n, i] : n;
6227
+ items: !n || r ? [] : n.elements.reduce((t, r) => {
6228
+ let i = Bl(r, xi(e, r, n.hasAnswer));
6229
+ return i ? [...t, i] : t;
6223
6230
  }, []),
6224
6231
  version: e.version
6225
6232
  };
6226
6233
  }
6227
- function yl(e, t) {
6234
+ function xl(e, t) {
6228
6235
  var n;
6229
- return (n = eu(e, t, "choice")) == null ? {
6236
+ return (n = tu(e, t, "choice")) == null ? {
6230
6237
  elementKey: t,
6231
6238
  selectedOptionIds: [],
6232
6239
  type: "choice"
6233
6240
  } : n;
6234
6241
  }
6235
- function bl(e, t, n) {
6242
+ function Sl(e, t, n) {
6236
6243
  var r;
6237
- return (r = eu(e, t, "fill")) == null ? {
6238
- answers: Ql(n),
6244
+ return (r = tu(e, t, "fill")) == null ? {
6245
+ answers: $l(n),
6239
6246
  elementKey: t,
6240
6247
  type: "fill"
6241
6248
  } : r;
6242
6249
  }
6243
- function xl(e, t, n) {
6250
+ function Cl(e, t, n) {
6244
6251
  var r;
6245
- return (r = eu(e, t.elementKey, "inlineFill")) == null ? {
6246
- answers: $l(t, n),
6252
+ return (r = tu(e, t.elementKey, "inlineFill")) == null ? {
6253
+ answers: eu(t, n),
6247
6254
  elementKey: t.elementKey,
6248
6255
  type: "inlineFill"
6249
6256
  } : r;
6250
6257
  }
6251
- function Sl(e, t, n) {
6258
+ function wl(e, t, n) {
6252
6259
  var r;
6253
- return (r = eu(e, t, "wordBuilder")) == null ? {
6254
- answers: Ql(n),
6260
+ return (r = tu(e, t, "wordBuilder")) == null ? {
6261
+ answers: $l(n),
6255
6262
  elementKey: t,
6256
6263
  type: "wordBuilder"
6257
6264
  } : r;
6258
6265
  }
6259
- function Cl(e, t) {
6266
+ function Tl(e, t) {
6260
6267
  var n;
6261
- return (n = eu(e, t, "judgement")) == null ? {
6268
+ return (n = tu(e, t, "judgement")) == null ? {
6262
6269
  elementKey: t,
6263
6270
  selectedValues: [],
6264
6271
  type: "judgement"
6265
6272
  } : n;
6266
6273
  }
6267
- function wl(e, t) {
6274
+ function El(e, t) {
6268
6275
  var n;
6269
- return (n = eu(e, t, "classification")) == null ? {
6276
+ return (n = tu(e, t, "classification")) == null ? {
6270
6277
  elementKey: t,
6271
6278
  placements: {},
6272
6279
  type: "classification"
6273
6280
  } : n;
6274
6281
  }
6275
- function Tl(e, t) {
6282
+ function Dl(e, t) {
6276
6283
  var n;
6277
- return (n = eu(e, t, "lineConnect")) == null ? {
6284
+ return (n = tu(e, t, "lineConnect")) == null ? {
6278
6285
  connections: {},
6279
6286
  elementKey: t,
6280
6287
  type: "lineConnect"
6281
6288
  } : n;
6282
6289
  }
6283
- function El(e, t) {
6290
+ function Ol(e, t) {
6284
6291
  var n;
6285
- return (n = eu(e, t, "matching")) == null ? {
6292
+ return (n = tu(e, t, "matching")) == null ? {
6286
6293
  connections: {},
6287
6294
  elementKey: t,
6288
6295
  type: "matching"
6289
6296
  } : n;
6290
6297
  }
6291
- function Dl(e, t) {
6298
+ function kl(e, t) {
6292
6299
  var n;
6293
- return (n = eu(e, t.elementKey, "ordering")) == null ? {
6300
+ return (n = tu(e, t.elementKey, "ordering")) == null ? {
6294
6301
  elementKey: t.elementKey,
6295
6302
  orderedOptionIds: t.sortOptions.map((e) => e.id),
6296
6303
  type: "ordering"
6297
6304
  } : n;
6298
6305
  }
6299
- function Ol(e, t) {
6306
+ function Al(e, t) {
6300
6307
  var n;
6301
- return (n = eu(e, t, "textMarker")) == null ? {
6308
+ return (n = tu(e, t, "textMarker")) == null ? {
6302
6309
  elementKey: t,
6303
6310
  selectedMarkers: [],
6304
6311
  type: "textMarker"
6305
6312
  } : n;
6306
6313
  }
6307
- function kl(e, t) {
6314
+ function jl(e, t) {
6308
6315
  let n = e.items.some((e) => e.elementKey === t.elementKey && e.type === t.type);
6309
6316
  return k(k({}, e), {}, { items: n ? e.items.map((e) => e.elementKey === t.elementKey && e.type === t.type ? t : e) : [...e.items, t] });
6310
6317
  }
6311
- function Al(e, t, n) {
6318
+ function Ml(e, t, n) {
6312
6319
  return k(k({}, e), {}, { children: e.children.map((e, r) => r === t ? n : e) });
6313
6320
  }
6314
- function jl(e, t, n) {
6321
+ function Nl(e, t, n) {
6315
6322
  return ue(e, t, n);
6316
6323
  }
6317
- function Ml(e, t, n = "single") {
6324
+ function Pl(e, t, n = "single") {
6318
6325
  return {
6319
6326
  kind: "option",
6320
6327
  optionIds: ue((e == null ? void 0 : e.kind) === "option" ? e.optionIds : [], t, n)
6321
6328
  };
6322
6329
  }
6323
- function Nl(e, t, n) {
6330
+ function Fl(e, t, n) {
6324
6331
  return Xe(e, t, n);
6325
6332
  }
6326
- function Pl(e, t, n) {
6333
+ function Il(e, t, n) {
6327
6334
  return bt(e, t, n);
6328
6335
  }
6329
- function Fl(e, t, n) {
6336
+ function Ll(e, t, n) {
6330
6337
  return ke(e, t, n);
6331
6338
  }
6332
- function Il(e, t, n, r) {
6339
+ function Rl(e, t, n, r) {
6333
6340
  return Xa(e, t.sortOptions, n, r);
6334
6341
  }
6335
- function Ll(e, t) {
6336
- return e.includes(t) ? e.filter((e) => e !== t) : [...e, t];
6337
- }
6338
- function Rl(e, t) {
6339
- var n;
6340
- let r = qc(t, e.questionTypeKey);
6341
- return vl(e, (n = r == null ? void 0 : r.structure) == null ? {
6342
- elements: [],
6343
- extras: [],
6344
- hasAnswer: !0,
6345
- systemQuestionType: ""
6346
- } : n, t);
6347
- }
6348
6342
  function zl(e, t) {
6349
- return e.type === "richText" ? null : e.type === "ordering" ? Xl(e.elementKey, t) : e.type === "classification" ? Vl(e.elementKey, t) : e.type === "fill" ? Wl(e.elementKey, t) : Bl(e, t);
6343
+ return e.includes(t) ? e.filter((e) => e !== t) : [...e, t];
6350
6344
  }
6351
6345
  function Bl(e, t) {
6346
+ return e.type === "richText" ? null : e.type === "ordering" ? Zl(e.elementKey, t) : e.type === "classification" ? Hl(e.elementKey, t) : e.type === "fill" ? Gl(e.elementKey, t) : Vl(e, t);
6347
+ }
6348
+ function Vl(e, t) {
6352
6349
  switch (e.type) {
6353
- case "choice": return Ul(e.elementKey);
6354
- case "inlineFill": return Gl(e, t);
6355
- case "wordBuilder": return Hl(e.elementKey, t);
6356
- case "judgement": return Kl(e.elementKey);
6357
- case "lineConnect": return ql(e.elementKey);
6358
- case "matching": return Jl(e.elementKey);
6359
- case "textMarker": return Zl(e.elementKey);
6350
+ case "choice": return Wl(e.elementKey);
6351
+ case "inlineFill": return Kl(e, t);
6352
+ case "wordBuilder": return Ul(e.elementKey, t);
6353
+ case "judgement": return ql(e.elementKey);
6354
+ case "lineConnect": return Jl(e.elementKey);
6355
+ case "matching": return Yl(e.elementKey);
6356
+ case "textMarker": return Ql(e.elementKey);
6360
6357
  }
6361
6358
  }
6362
- function Vl(e, t) {
6359
+ function Hl(e, t) {
6363
6360
  return t.type === "classification" ? {
6364
6361
  elementKey: e,
6365
- placements: Yl({}, t),
6362
+ placements: Xl({}, t),
6366
6363
  type: "classification"
6367
6364
  } : null;
6368
6365
  }
6369
- function Hl(e, t) {
6366
+ function Ul(e, t) {
6370
6367
  return t.type === "wordBuilder" ? {
6371
- answers: Ql(t.blanks),
6368
+ answers: $l(t.blanks),
6372
6369
  elementKey: e,
6373
6370
  type: "wordBuilder"
6374
6371
  } : null;
6375
6372
  }
6376
- function Ul(e) {
6373
+ function Wl(e) {
6377
6374
  return {
6378
6375
  elementKey: e,
6379
6376
  selectedOptionIds: [],
6380
6377
  type: "choice"
6381
6378
  };
6382
6379
  }
6383
- function Wl(e, t) {
6380
+ function Gl(e, t) {
6384
6381
  return t.type === "fill" ? {
6385
- answers: Ql(t.blanks),
6382
+ answers: $l(t.blanks),
6386
6383
  elementKey: e,
6387
6384
  type: "fill"
6388
6385
  } : null;
6389
6386
  }
6390
- function Gl(e, t) {
6387
+ function Kl(e, t) {
6391
6388
  return t.type === "inlineFill" ? {
6392
- answers: $l(e, t.blanks),
6389
+ answers: eu(e, t.blanks),
6393
6390
  elementKey: e.elementKey,
6394
6391
  type: "inlineFill"
6395
6392
  } : null;
6396
6393
  }
6397
- function Kl(e) {
6394
+ function ql(e) {
6398
6395
  return {
6399
6396
  elementKey: e,
6400
6397
  selectedValues: [],
6401
6398
  type: "judgement"
6402
6399
  };
6403
6400
  }
6404
- function ql(e) {
6401
+ function Jl(e) {
6405
6402
  return {
6406
6403
  connections: {},
6407
6404
  elementKey: e,
6408
6405
  type: "lineConnect"
6409
6406
  };
6410
6407
  }
6411
- function Jl(e) {
6408
+ function Yl(e) {
6412
6409
  return {
6413
6410
  connections: {},
6414
6411
  elementKey: e,
6415
6412
  type: "matching"
6416
6413
  };
6417
6414
  }
6418
- function Yl(e, t) {
6415
+ function Xl(e, t) {
6419
6416
  return Oe(e, t.categories, t.items);
6420
6417
  }
6421
- function Xl(e, t) {
6418
+ function Zl(e, t) {
6422
6419
  return t.type === "ordering" ? {
6423
6420
  elementKey: e,
6424
6421
  orderedOptionIds: t.sortOptions.map((e) => e.id),
6425
6422
  type: "ordering"
6426
6423
  } : null;
6427
6424
  }
6428
- function Zl(e) {
6425
+ function Ql(e) {
6429
6426
  return {
6430
6427
  elementKey: e,
6431
6428
  selectedMarkers: [],
6432
6429
  type: "textMarker"
6433
6430
  };
6434
6431
  }
6435
- function Ql(e) {
6432
+ function $l(e) {
6436
6433
  return e.reduce((e, t) => k(k({}, e), {}, { [t]: "" }), {});
6437
6434
  }
6438
- function $l(e, t) {
6435
+ function eu(e, t) {
6439
6436
  return t.reduce((t, n) => k(k({}, t), {}, { [n]: e.config.candidateMode === "none" ? {
6440
6437
  kind: "text",
6441
6438
  value: ""
@@ -6444,12 +6441,12 @@ function $l(e, t) {
6444
6441
  optionIds: []
6445
6442
  } }), {});
6446
6443
  }
6447
- function eu(e, t, n) {
6444
+ function tu(e, t, n) {
6448
6445
  return e.items.find((e) => e.elementKey === t && e.type === n);
6449
6446
  }
6450
6447
  //#endregion
6451
6448
  //#region src/question/i18n/messages.ts
6452
- var tu = {
6449
+ var nu = {
6453
6450
  "en-US": {
6454
6451
  addBlank: "Add blank",
6455
6452
  addCard: "Add card",
@@ -6511,7 +6508,7 @@ var tu = {
6511
6508
  wholeQuestion: "Whole question",
6512
6509
  moveDown: "Move down",
6513
6510
  moveUp: "Move up",
6514
- missingSubquestionTemplate: "Missing subquestion structure.",
6511
+ missingQuestionTypeTemplate: "Missing question type structure.",
6515
6512
  previewEmpty: "No question content."
6516
6513
  },
6517
6514
  "zh-CN": {
@@ -6575,19 +6572,19 @@ var tu = {
6575
6572
  wholeQuestion: "\u6574\u9898",
6576
6573
  moveDown: "\u4e0b\u79fb",
6577
6574
  moveUp: "\u4e0a\u79fb",
6578
- missingSubquestionTemplate: "\u7f3a\u5c11\u5b50\u9898\u7ed3\u6784\u3002",
6575
+ missingQuestionTypeTemplate: "\u7f3a\u5c11\u9898\u578b\u7ed3\u6784\u3002",
6579
6576
  previewEmpty: "\u6682\u65e0\u9898\u76ee\u5185\u5bb9\u3002"
6580
6577
  }
6581
6578
  };
6582
- function nu(e = "zh-CN") {
6579
+ function ru(e = "zh-CN") {
6583
6580
  switch (e) {
6584
- case "en-US": return tu["en-US"];
6585
- case "zh-CN": return tu["zh-CN"];
6581
+ case "en-US": return nu["en-US"];
6582
+ case "zh-CN": return nu["zh-CN"];
6586
6583
  }
6587
6584
  }
6588
6585
  //#endregion
6589
6586
  //#region src/question/renderers/helpers.ts
6590
- function ru(...e) {
6587
+ function H(...e) {
6591
6588
  return e.filter(Boolean).join(" ");
6592
6589
  }
6593
6590
  function iu(e, t, n) {
@@ -6657,14 +6654,14 @@ var U = {
6657
6654
  };
6658
6655
  //#endregion
6659
6656
  //#region src/question/player/QuestionPlayerComposite.tsx
6660
- function fu({ messages: e, numberPath: t = [], onChildResponseChange: n, renderChild: r, response: i, subquestionTemplates: s, value: c }) {
6661
- return c.children.length === 0 ? /* @__PURE__ */ a("div", {
6657
+ function fu({ messages: e, numberPath: t = [], onChildResponseChange: n, renderChild: r, response: i, value: s }) {
6658
+ return s.children.length === 0 ? /* @__PURE__ */ a("div", {
6662
6659
  className: U.empty,
6663
6660
  children: e.previewEmpty
6664
6661
  }) : /* @__PURE__ */ a("div", {
6665
6662
  className: U.children,
6666
- children: c.children.map((c, l) => {
6667
- let u = [...t, l], d = qc(s, c.questionTypeKey), f = i.children.slice(l, l + 1)[0];
6663
+ children: s.children.map((s, c) => {
6664
+ let l = [...t, c], u = i.children.slice(c, c + 1)[0];
6668
6665
  return /* @__PURE__ */ o("section", {
6669
6666
  className: U.child,
6670
6667
  children: [/* @__PURE__ */ o("div", {
@@ -6672,13 +6669,13 @@ function fu({ messages: e, numberPath: t = [], onChildResponseChange: n, renderC
6672
6669
  children: [
6673
6670
  e.subquestion,
6674
6671
  " ",
6675
- Hc(u)
6672
+ qc(l)
6676
6673
  ]
6677
- }), d && f ? r(c, f, d.structure, (e) => n(l, e), u) : /* @__PURE__ */ a("div", {
6674
+ }), u ? r(s, u, (e) => n(c, e), l) : /* @__PURE__ */ a("div", {
6678
6675
  className: U.empty,
6679
- children: e.missingSubquestionTemplate
6676
+ children: e.missingQuestionTypeTemplate
6680
6677
  })]
6681
- }, c.id || l);
6678
+ }, s.id || c);
6682
6679
  })
6683
6680
  });
6684
6681
  }
@@ -6748,7 +6745,7 @@ function K({ groups: e, title: t }) {
6748
6745
  //#endregion
6749
6746
  //#region src/question/player/QuestionBlankGroupPlayer.tsx
6750
6747
  function mu({ disabled: e, item: t, messages: n, onChange: r, response: i, showAnswer: s }) {
6751
- let c = bl(i, t.elementKey, t.blanks), l = ta(t.answers, t.blanks).map((e, r) => ({
6748
+ let c = Sl(i, t.elementKey, t.blanks), l = ta(t.answers, t.blanks).map((e, r) => ({
6752
6749
  contents: e.answerPools.map((e, t) => /* @__PURE__ */ a(G, { content: e }, `group-${r}-answer-${t}`)),
6753
6750
  marker: iu(e.blankIds, t.blanks, n.blankLabel)
6754
6751
  }));
@@ -6809,9 +6806,9 @@ var q = {
6809
6806
  //#endregion
6810
6807
  //#region src/question/player/QuestionClassificationPlayer.tsx
6811
6808
  function vu({ disabled: e, item: t, messages: n, onChange: r, response: i, showAnswer: s }) {
6812
- let [c, l] = m(""), u = wl(i, t.elementKey), d = bu(u.placements, t), f = t.items.find((e) => e.id === c);
6809
+ let [c, l] = m(""), u = El(i, t.elementKey), d = bu(u.placements, t), f = t.items.find((e) => e.id === c);
6813
6810
  function p(e, n) {
6814
- r(k(k({}, u), {}, { placements: bu(Fl(d, e, n), t) })), l("");
6811
+ r(k(k({}, u), {}, { placements: bu(Ll(d, e, n), t) })), l("");
6815
6812
  }
6816
6813
  function h(t, n) {
6817
6814
  t.preventDefault();
@@ -6822,7 +6819,7 @@ function vu({ disabled: e, item: t, messages: n, onChange: r, response: i, showA
6822
6819
  let r = c === n.id, i = yu(n.id, d, t, s);
6823
6820
  return /* @__PURE__ */ a("button", {
6824
6821
  "aria-pressed": r,
6825
- className: ru(q.item, r && q.selected, i === "correct" && q.correct, i === "incorrect" && q.incorrect, i === "unanswered" && q.unanswered),
6822
+ className: H(q.item, r && q.selected, i === "correct" && q.correct, i === "incorrect" && q.incorrect, i === "unanswered" && q.unanswered),
6826
6823
  "data-status": i,
6827
6824
  "data-testid": `classification-player-item-${n.id}`,
6828
6825
  disabled: e,
@@ -7041,7 +7038,7 @@ function Fu(e, t, n) {
7041
7038
  //#endregion
7042
7039
  //#region src/question/player/QuestionFillTextPlayer.tsx
7043
7040
  function Iu({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, showAnswer: c }) {
7044
- let l = Bi(n, t, !0), u = uu(l), d = xl(s, t, l.blanks), f = u.map((e, t) => ({
7041
+ let l = Bi(n, t, !0), u = uu(l), d = Cl(s, t, l.blanks), f = u.map((e, t) => ({
7045
7042
  contents: e.contents.map((e, n) => /* @__PURE__ */ a(G, { content: e }, `group-${t}-answer-${n}`)),
7046
7043
  marker: iu(e.blankIds, l.blanks, r.blankLabel)
7047
7044
  }));
@@ -7140,7 +7137,7 @@ function Bu({ activeAnswer: e, blankId: t, disabled: n, onAnswerChange: r, optio
7140
7137
  className: o ? J.selected : void 0,
7141
7138
  "data-selected": o ? "true" : void 0,
7142
7139
  disabled: n,
7143
- onClick: () => r(t, Ml(e, i.optionId, "single")),
7140
+ onClick: () => r(t, Pl(e, i.optionId, "single")),
7144
7141
  type: "button",
7145
7142
  children: /* @__PURE__ */ a(G, { content: i.content })
7146
7143
  }, i.optionId);
@@ -7162,7 +7159,7 @@ var Y = {
7162
7159
  //#endregion
7163
7160
  //#region src/question/player/QuestionJudgementGroupPlayer.tsx
7164
7161
  function Vu({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, showAnswer: c }) {
7165
- let l = Cl(s, t.elementKey), u = Ei(t.config.judgeAnswerMode), d = [{
7162
+ let l = Tl(s, t.elementKey), u = Ei(t.config.judgeAnswerMode), d = [{
7166
7163
  contents: n.answers.filter((e) => e.trim() !== ""),
7167
7164
  marker: ""
7168
7165
  }];
@@ -7172,11 +7169,11 @@ function Vu({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
7172
7169
  return /* @__PURE__ */ o("div", {
7173
7170
  className: W.element,
7174
7171
  children: [/* @__PURE__ */ a("ol", {
7175
- className: ru(W["judgement-list"], Y["judgement-list"]),
7172
+ className: H(W["judgement-list"], Y["judgement-list"]),
7176
7173
  children: u.map((t) => {
7177
7174
  let n = l.selectedValues.includes(t);
7178
7175
  return /* @__PURE__ */ a("li", {
7179
- className: ru(W["judgement-item"], Y["judgement-option"], n && Y.selected),
7176
+ className: H(W["judgement-item"], Y["judgement-option"], n && Y.selected),
7180
7177
  "data-selected": n ? "true" : void 0,
7181
7178
  children: /* @__PURE__ */ a("button", {
7182
7179
  "aria-pressed": n,
@@ -7221,7 +7218,7 @@ function Uu(e) {
7221
7218
  //#endregion
7222
7219
  //#region src/question/player/QuestionLineConnectPlayer.tsx
7223
7220
  function Wu({ disabled: e, item: t, messages: n, onChange: r, response: i, showAnswer: s }) {
7224
- let [c, u] = m(null), [h, g] = m(null), _ = p(null), v = p(/* @__PURE__ */ new Map()), y = Tl(i, t.elementKey), b = { gridTemplateColumns: `repeat(${t.columns.length}, minmax(12rem, 1fr))` }, x = f(() => ic(t, y.connections), [t, y.connections]), S = f(() => JSON.stringify({
7221
+ let [c, u] = m(null), [h, g] = m(null), _ = p(null), v = p(/* @__PURE__ */ new Map()), y = Dl(i, t.elementKey), b = { gridTemplateColumns: `repeat(${t.columns.length}, minmax(12rem, 1fr))` }, x = f(() => lc(t, y.connections), [t, y.connections]), S = f(() => JSON.stringify({
7225
7222
  columns: t.columns.map((e) => e.items.map((e) => e.itemId)),
7226
7223
  connections: y.connections
7227
7224
  }), [t.columns, y.connections]), C = l(() => {
@@ -7236,13 +7233,13 @@ function Wu({ disabled: e, item: t, messages: n, onChange: r, response: i, showA
7236
7233
  let o = i.getBoundingClientRect(), s = a.getBoundingClientRect();
7237
7234
  return [...n, {
7238
7235
  key: r.key,
7239
- x1: cc(o, t, e.scrollLeft),
7240
- x2: sc(s, t, e.scrollLeft),
7241
- y1: oc(o, t, e.scrollTop),
7242
- y2: oc(s, t, e.scrollTop)
7236
+ x1: pc(o, t, e.scrollLeft),
7237
+ x2: fc(s, t, e.scrollLeft),
7238
+ y1: dc(o, t, e.scrollTop),
7239
+ y2: dc(s, t, e.scrollTop)
7243
7240
  }];
7244
7241
  }, []);
7245
- lc(g, {
7242
+ mc(g, {
7246
7243
  height: e.scrollHeight,
7247
7244
  lines: n,
7248
7245
  width: e.scrollWidth
@@ -7272,7 +7269,7 @@ function Wu({ disabled: e, item: t, messages: n, onChange: r, response: i, showA
7272
7269
  itemId: n
7273
7270
  }) : null;
7274
7271
  if (i) {
7275
- r(k(k({}, y), {}, { connections: Nl(y.connections, i.fromItemId, i.toItemId) })), u(null);
7272
+ r(k(k({}, y), {}, { connections: Fl(y.connections, i.fromItemId, i.toItemId) })), u(null);
7276
7273
  return;
7277
7274
  }
7278
7275
  u({
@@ -7317,7 +7314,7 @@ function Wu({ disabled: e, item: t, messages: n, onChange: r, response: i, showA
7317
7314
  }), t.items.map((n, i) => {
7318
7315
  let s = wi(t.labelStyle, i), l = (c == null ? void 0 : c.itemId) === n.itemId;
7319
7316
  return /* @__PURE__ */ a("div", {
7320
- className: ru(B.item, l && B.selected),
7317
+ className: H(B.item, l && B.selected),
7321
7318
  "data-selected": l ? "true" : void 0,
7322
7319
  "data-testid": `line-connect-player-item-${n.itemId}`,
7323
7320
  ref: w(n.itemId),
@@ -7372,7 +7369,7 @@ var Ku = {
7372
7369
  //#endregion
7373
7370
  //#region src/question/player/QuestionMatchingPlayer.tsx
7374
7371
  function qu({ disabled: e, item: t, messages: n, onChange: r, response: i, showAnswer: s }) {
7375
- let [c, l] = m(null), u = El(i, t.elementKey), d = Ju(t, u.connections);
7372
+ let [c, l] = m(null), u = Ol(i, t.elementKey), d = Ju(t, u.connections);
7376
7373
  function f(t, n) {
7377
7374
  if (e) return;
7378
7375
  let i = c ? pt(c, {
@@ -7380,7 +7377,7 @@ function qu({ disabled: e, item: t, messages: n, onChange: r, response: i, showA
7380
7377
  itemId: n
7381
7378
  }) : null;
7382
7379
  if (i) {
7383
- r(k(k({}, u), {}, { connections: Pl(u.connections, i.fromItemId, i.toItemId) })), l(null);
7380
+ r(k(k({}, u), {}, { connections: Il(u.connections, i.fromItemId, i.toItemId) })), l(null);
7384
7381
  return;
7385
7382
  }
7386
7383
  l((c == null ? void 0 : c.itemId) === n ? null : {
@@ -7392,7 +7389,7 @@ function qu({ disabled: e, item: t, messages: n, onChange: r, response: i, showA
7392
7389
  let r = (c == null ? void 0 : c.itemId) === t.item.itemId;
7393
7390
  return /* @__PURE__ */ o("button", {
7394
7391
  "aria-pressed": r,
7395
- className: ru(Ku.item, r && Ku.selected, n && Ku.matched),
7392
+ className: H(Ku.item, r && Ku.selected, n && Ku.matched),
7396
7393
  "data-testid": `matching-player-item-${t.item.itemId}`,
7397
7394
  disabled: e,
7398
7395
  onClick: () => f(t.columnIndex, t.item.itemId),
@@ -7470,9 +7467,9 @@ var Xu = {
7470
7467
  //#endregion
7471
7468
  //#region src/question/player/QuestionOptionGroupPlayer.tsx
7472
7469
  function Zu({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, showAnswer: c }) {
7473
- let l = yl(s, t.elementKey), u = Di(n, t.config.optionLabelStyle);
7470
+ let l = xl(s, t.elementKey), u = Di(n, t.config.optionLabelStyle);
7474
7471
  function d(e) {
7475
- i(k(k({}, l), {}, { selectedOptionIds: jl(l.selectedOptionIds, e, t.config.selectionType) }));
7472
+ i(k(k({}, l), {}, { selectedOptionIds: Nl(l.selectedOptionIds, e, t.config.selectionType) }));
7476
7473
  }
7477
7474
  if (t.config.renderer === "table") {
7478
7475
  let i = Yu(t, n);
@@ -7497,7 +7494,7 @@ function Zu({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
7497
7494
  onClick: () => d(t.optionId),
7498
7495
  type: "button",
7499
7496
  children: /* @__PURE__ */ a("span", {
7500
- className: ru(W.marker, Y["table-option-marker"]),
7497
+ className: H(W.marker, Y["table-option-marker"]),
7501
7498
  "data-selected": n ? "true" : void 0,
7502
7499
  children: t.marker
7503
7500
  })
@@ -7527,7 +7524,7 @@ function Zu({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
7527
7524
  children: u.map((t) => {
7528
7525
  let n = l.selectedOptionIds.includes(t.optionId);
7529
7526
  return /* @__PURE__ */ a("li", {
7530
- className: ru(W["option-item"], Y["choice-option"], n && Y.selected),
7527
+ className: H(W["option-item"], Y["choice-option"], n && Y.selected),
7531
7528
  "data-selected": n ? "true" : void 0,
7532
7529
  children: /* @__PURE__ */ o("button", {
7533
7530
  className: Y["choice-button"],
@@ -7536,7 +7533,7 @@ function Zu({ disabled: e, element: t, item: n, messages: r, onChange: i, respon
7536
7533
  onClick: () => d(t.optionId),
7537
7534
  type: "button",
7538
7535
  children: [/* @__PURE__ */ a("span", {
7539
- className: ru(W.marker, Y["option-marker"]),
7536
+ className: H(W.marker, Y["option-marker"]),
7540
7537
  "data-selected": n ? "true" : void 0,
7541
7538
  children: t.marker
7542
7539
  }), /* @__PURE__ */ a(G, { content: t.standardContent })]
@@ -7564,16 +7561,16 @@ function Qu(e) {
7564
7561
  //#endregion
7565
7562
  //#region src/question/player/QuestionOrderingPlayer.tsx
7566
7563
  function $u({ disabled: e, item: t, messages: n, onChange: r, response: i, showAnswer: s }) {
7567
- let c = Dl(i, t), l = new Map(t.sortOptions.map((e) => [e.id, e])), u = c.orderedOptionIds.map((e) => l.get(e)).filter((e) => !!e);
7564
+ let c = kl(i, t), l = new Map(t.sortOptions.map((e) => [e.id, e])), u = c.orderedOptionIds.map((e) => l.get(e)).filter((e) => !!e);
7568
7565
  function d(e, n) {
7569
- r(k(k({}, c), {}, { orderedOptionIds: Il(c.orderedOptionIds, t, e, n) }));
7566
+ r(k(k({}, c), {}, { orderedOptionIds: Rl(c.orderedOptionIds, t, e, n) }));
7570
7567
  }
7571
7568
  return /* @__PURE__ */ o("div", {
7572
7569
  className: W.element,
7573
7570
  children: [/* @__PURE__ */ a("ol", {
7574
7571
  className: W["option-list"],
7575
7572
  children: u.map((t, r) => /* @__PURE__ */ o("li", {
7576
- className: ru(W["option-item"], Y["choice-option"]),
7573
+ className: H(W["option-item"], Y["choice-option"]),
7577
7574
  children: [
7578
7575
  /* @__PURE__ */ a("span", {
7579
7576
  className: W.marker,
@@ -7644,7 +7641,7 @@ function td({ answerMarkers: e = [], content: t, disabled: n = !1, onMarkerClick
7644
7641
  let n = i.includes(t), a = o && e.includes(t);
7645
7642
  return {
7646
7643
  answer: a,
7647
- className: tc(ed.marker, r ? ed["marker-button"] : "", n ? ed["marker-selected"] : "", a ? ed["marker-answer"] : ""),
7644
+ className: oc(ed.marker, r ? ed["marker-button"] : "", n ? ed["marker-selected"] : "", a ? ed["marker-answer"] : ""),
7648
7645
  selected: n
7649
7646
  };
7650
7647
  }
@@ -7695,7 +7692,7 @@ function id({ item: e, messages: t, showAnswer: n }) {
7695
7692
  //#endregion
7696
7693
  //#region src/question/player/QuestionTextMarkerPlayer.tsx
7697
7694
  function ad({ disabled: e, item: t, messages: n, onChange: r, response: i, showAnswer: o }) {
7698
- let s = Ol(i, t.elementKey);
7695
+ let s = Al(i, t.elementKey);
7699
7696
  return o ? /* @__PURE__ */ a(id, {
7700
7697
  item: t,
7701
7698
  messages: n,
@@ -7704,7 +7701,7 @@ function ad({ disabled: e, item: t, messages: n, onChange: r, response: i, showA
7704
7701
  answerMarkers: t.answers,
7705
7702
  content: t.content,
7706
7703
  disabled: e,
7707
- onMarkerClick: (e) => r(k(k({}, s), {}, { selectedMarkers: Ll(s.selectedMarkers, e) })),
7704
+ onMarkerClick: (e) => r(k(k({}, s), {}, { selectedMarkers: zl(s.selectedMarkers, e) })),
7708
7705
  selectedMarkers: s.selectedMarkers
7709
7706
  });
7710
7707
  }
@@ -7729,7 +7726,7 @@ var sd = {
7729
7726
  //#endregion
7730
7727
  //#region src/question/player/QuestionWordBuilderPlayer.tsx
7731
7728
  function cd({ disabled: e, element: t, item: n, messages: r, onChange: i, response: s, showAnswer: c }) {
7732
- let l = zi(n, !0, t), u = Sl(s, t.elementKey, l.blanks), d = od(l, r.blankLabel);
7729
+ let l = zi(n, !0, t), u = wl(s, t.elementKey, l.blanks), d = od(l, r.blankLabel);
7733
7730
  function f(e, t) {
7734
7731
  i(k(k({}, u), {}, { answers: k(k({}, u.answers), {}, { [e]: t }) }));
7735
7732
  }
@@ -7908,12 +7905,20 @@ function dd({ disabled: e, element: t, item: n, messages: r, onResponseItemChang
7908
7905
  var fd = ["locale"];
7909
7906
  function pd(e) {
7910
7907
  let { locale: t = "zh-CN" } = e;
7911
- return /* @__PURE__ */ a(md, k(k({}, As(e, fd)), {}, {
7912
- messages: nu(t),
7908
+ return /* @__PURE__ */ a(md, k(k({}, Fs(e, fd)), {}, {
7909
+ messages: ru(t),
7913
7910
  numberPath: []
7914
7911
  }));
7915
7912
  }
7916
- function md({ className: e, disabled: t = !1, messages: n, numberPath: r, onResponseChange: i, response: o, showAnswer: s = !1, showExtraAttributes: c = !1, structure: l, subquestionTemplates: u = [], value: d }) {
7913
+ function md({ className: e, disabled: t = !1, messages: n, numberPath: r, onResponseChange: i, response: o, showAnswer: s = !1, showExtraAttributes: c = !1, questionTypeTemplates: l, value: u }) {
7914
+ let d = As(l, u);
7915
+ if (!d) return /* @__PURE__ */ a("div", {
7916
+ className: H(U.root, e),
7917
+ children: /* @__PURE__ */ a("div", {
7918
+ className: U.empty,
7919
+ children: n.missingQuestionTypeTemplate
7920
+ })
7921
+ });
7917
7922
  let f = hd({
7918
7923
  disabled: t,
7919
7924
  messages: n,
@@ -7922,13 +7927,13 @@ function md({ className: e, disabled: t = !1, messages: n, numberPath: r, onResp
7922
7927
  response: o,
7923
7928
  showAnswer: s,
7924
7929
  showExtraAttributes: c,
7925
- structure: l,
7926
- subquestionTemplates: u,
7927
- value: d
7930
+ structure: d,
7931
+ questionTypeTemplates: l,
7932
+ value: u
7928
7933
  });
7929
7934
  return /* @__PURE__ */ a("div", {
7930
- className: ru(U.root, e),
7931
- children: vd(l, d) ? /* @__PURE__ */ a("div", {
7935
+ className: H(U.root, e),
7936
+ children: vd(d, u) ? /* @__PURE__ */ a("div", {
7932
7937
  className: U.empty,
7933
7938
  children: n.previewEmpty
7934
7939
  }) : f
@@ -7949,7 +7954,7 @@ function gd({ disabled: e, messages: t, onResponseChange: n, response: r, showAn
7949
7954
  element: o,
7950
7955
  item: s,
7951
7956
  messages: t,
7952
- onResponseItemChange: (e) => n(kl(r, e)),
7957
+ onResponseItemChange: (e) => n(jl(r, e)),
7953
7958
  response: r,
7954
7959
  showAnswer: i && c.hasAnswer
7955
7960
  })
@@ -7974,26 +7979,24 @@ function gd({ disabled: e, messages: t, onResponseChange: n, response: r, showAn
7974
7979
  }) : null]
7975
7980
  });
7976
7981
  }
7977
- function _d({ disabled: e, messages: t, numberPath: n, onResponseChange: r, response: i, showAnswer: o, showExtraAttributes: s, subquestionTemplates: c = [], value: l }) {
7982
+ function _d({ disabled: e, messages: t, numberPath: n, onResponseChange: r, response: i, showAnswer: o, showExtraAttributes: s, questionTypeTemplates: c, value: l }) {
7978
7983
  return l.children.length === 0 ? null : /* @__PURE__ */ a(fu, {
7979
7984
  disabled: e,
7980
7985
  messages: t,
7981
7986
  numberPath: n,
7982
- onChildResponseChange: (e, t) => r(Al(i, e, t)),
7987
+ onChildResponseChange: (e, t) => r(Ml(i, e, t)),
7983
7988
  response: i,
7984
- renderChild: (n, r, i, l, u) => /* @__PURE__ */ a(md, {
7989
+ renderChild: (n, r, i, l) => /* @__PURE__ */ a(md, {
7985
7990
  disabled: e,
7986
7991
  messages: t,
7987
- numberPath: u,
7988
- onResponseChange: l,
7992
+ numberPath: l,
7993
+ onResponseChange: i,
7989
7994
  response: r,
7990
7995
  showAnswer: o,
7991
7996
  showExtraAttributes: s,
7992
- structure: i,
7993
- subquestionTemplates: c,
7997
+ questionTypeTemplates: c,
7994
7998
  value: n
7995
7999
  }),
7996
- subquestionTemplates: c,
7997
8000
  value: l
7998
8001
  });
7999
8002
  }
@@ -8396,14 +8399,14 @@ var X = {
8396
8399
  };
8397
8400
  //#endregion
8398
8401
  //#region src/question/preview/QuestionCompositePreview.tsx
8399
- function Id({ messages: e, numberPath: t = [], renderChild: n, subquestionTemplates: r, value: i }) {
8400
- return i.children.length === 0 ? /* @__PURE__ */ a("div", {
8402
+ function Id({ messages: e, numberPath: t = [], renderChild: n, value: r }) {
8403
+ return r.children.length === 0 ? /* @__PURE__ */ a("div", {
8401
8404
  className: X.empty,
8402
8405
  children: e.previewEmpty
8403
8406
  }) : /* @__PURE__ */ a("div", {
8404
8407
  className: X.children,
8405
- children: i.children.map((i, s) => {
8406
- let c = [...t, s], l = qc(r, i.questionTypeKey);
8408
+ children: r.children.map((r, i) => {
8409
+ let a = [...t, i];
8407
8410
  return /* @__PURE__ */ o("section", {
8408
8411
  className: X.child,
8409
8412
  children: [/* @__PURE__ */ o("div", {
@@ -8411,13 +8414,10 @@ function Id({ messages: e, numberPath: t = [], renderChild: n, subquestionTempla
8411
8414
  children: [
8412
8415
  e.subquestion,
8413
8416
  " ",
8414
- Hc(c)
8417
+ qc(a)
8415
8418
  ]
8416
- }), l ? n(i, l.structure, c) : /* @__PURE__ */ a("div", {
8417
- className: X.empty,
8418
- children: e.missingSubquestionTemplate
8419
- })]
8420
- }, i.id || s);
8419
+ }), n(r, a)]
8420
+ }, r.id || i);
8421
8421
  })
8422
8422
  });
8423
8423
  }
@@ -8426,27 +8426,35 @@ function Id({ messages: e, numberPath: t = [], renderChild: n, subquestionTempla
8426
8426
  var Ld = ["locale"];
8427
8427
  function Rd(e) {
8428
8428
  let { locale: t = "zh-CN" } = e;
8429
- return /* @__PURE__ */ a(zd, k(k({}, As(e, Ld)), {}, {
8430
- messages: nu(t),
8429
+ return /* @__PURE__ */ a(zd, k(k({}, Fs(e, Ld)), {}, {
8430
+ messages: ru(t),
8431
8431
  numberPath: []
8432
8432
  }));
8433
8433
  }
8434
- function zd({ className: e, messages: t, numberPath: n, showAnswer: r = !1, showExtraAttributes: s = !1, structure: c, subquestionTemplates: l = [], value: u }) {
8435
- let d = /* @__PURE__ */ o(i, { children: [mi(c) ? null : /* @__PURE__ */ o("div", {
8434
+ function zd({ className: e, messages: t, numberPath: n, showAnswer: r = !1, showExtraAttributes: s = !1, questionTypeTemplates: c, value: l }) {
8435
+ let u = As(c, l);
8436
+ if (!u) return /* @__PURE__ */ a("div", {
8437
+ className: H(X.root, e),
8438
+ children: /* @__PURE__ */ a("div", {
8439
+ className: X.empty,
8440
+ children: t.missingQuestionTypeTemplate
8441
+ })
8442
+ });
8443
+ let d = /* @__PURE__ */ o(i, { children: [mi(u) ? null : /* @__PURE__ */ o("div", {
8436
8444
  className: X["element-list"],
8437
- children: [c.elements.map((e) => {
8438
- let n = xi(u, e, c.hasAnswer);
8445
+ children: [u.elements.map((e) => {
8446
+ let n = xi(l, e, u.hasAnswer);
8439
8447
  return /* @__PURE__ */ a("section", {
8440
8448
  className: X.element,
8441
8449
  children: /* @__PURE__ */ a(Pd, {
8442
8450
  element: e,
8443
8451
  item: n,
8444
8452
  messages: t,
8445
- showAnswer: r && c.hasAnswer
8453
+ showAnswer: r && u.hasAnswer
8446
8454
  })
8447
8455
  }, e.elementKey);
8448
- }), s ? c.extras.map((e) => {
8449
- let n = Si(u, e);
8456
+ }), s ? u.extras.map((e) => {
8457
+ let n = Si(l, e);
8450
8458
  return /* @__PURE__ */ o("section", {
8451
8459
  className: X.element,
8452
8460
  children: [/* @__PURE__ */ a("h3", {
@@ -8460,24 +8468,22 @@ function zd({ className: e, messages: t, numberPath: n, showAnswer: r = !1, show
8460
8468
  })]
8461
8469
  }, e.extraKey);
8462
8470
  }) : null]
8463
- }), u.children.length === 0 ? null : /* @__PURE__ */ a(Id, {
8471
+ }), l.children.length === 0 ? null : /* @__PURE__ */ a(Id, {
8464
8472
  messages: t,
8465
8473
  numberPath: n,
8466
- renderChild: (e, n, i) => /* @__PURE__ */ a(zd, {
8467
- numberPath: i,
8474
+ renderChild: (e, n) => /* @__PURE__ */ a(zd, {
8475
+ numberPath: n,
8468
8476
  messages: t,
8469
8477
  showAnswer: r,
8470
8478
  showExtraAttributes: s,
8471
- structure: n,
8472
- subquestionTemplates: l,
8479
+ questionTypeTemplates: c,
8473
8480
  value: e
8474
8481
  }),
8475
- subquestionTemplates: l,
8476
- value: u
8482
+ value: l
8477
8483
  })] });
8478
8484
  return /* @__PURE__ */ a("div", {
8479
- className: ru(X.root, e),
8480
- children: Bd(c, u) ? /* @__PURE__ */ a("div", {
8485
+ className: H(X.root, e),
8486
+ children: Bd(u, l) ? /* @__PURE__ */ a("div", {
8481
8487
  className: X.empty,
8482
8488
  children: t.previewEmpty
8483
8489
  }) : d
@@ -9412,4 +9418,4 @@ function Ef(e) {
9412
9418
  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;
9413
9419
  }
9414
9420
  //#endregion
9415
- export { tl as QuestionContentEditor, pd as QuestionPlayer, Rd as QuestionPreview, G as QuestionRichContentView, wf as QuestionStructureEditor, $i as addBlankToGroup, ra as assignBlankToAnswerGroup, tc as cn, ia as createBlankAnswerGroupWithBlank, hi as createEmptyQuestionContentDraft, rr as createEmptyQuestionData, vl as createEmptyQuestionPlayerResponse, ar as createEmptyQuestionResponse, Ir as createEmptyQuestionStructureDraft, ji as createQuestionContentDraftFromSerialized, il as createQuestionContentStructureFromDraft, al as createQuestionPreviewDraft, Rr as createQuestionStructureElement, Lr as createQuestionStructureExtra, M as createRichContentValue, gi as createRichContentValueFromDocument, v as createRichTextContent, ea as deleteBlankFromGroup, Hr as deleteQuestionStructureElement, Vr as deleteQuestionStructureExtra, aa as detachBlankFromAnswerGroup, qc as findQuestionContentSubquestionTemplate, Si as getQuestionContentExtraItem, xi as getQuestionContentItem, Ei as getQuestionContentJudgementOptions, Ci as getQuestionContentOptionMarker, yi as getQuestionContentTextMarkerAnswerText, sl as getQuestionStructureDraftChangeKind, j as getQuestionStructureElementDefaultEnName, A as getQuestionStructureElementDefaultName, Yr as getQuestionStructureExtraDefaultEnName, Jr as getQuestionStructureExtraDefaultName, bi as getRichContentDocument, na as getSharedBlankAnswerGroups, mi as isCompositeQuestionContentStructure, sr as isCompositeQuestionType, ki as isQuestionContentDraftEmpty, Kc as isQuestionContentSubquestionTemplateMatch, Ur as moveQuestionStructureElement, Bi as normalizeFillTextCandidateState, ir as normalizeQuestionData, or as normalizeQuestionResponse, y as normalizeRichTextContent, Ar as questionStructureElementTypes, jr as questionStructureExtraKeys, Ai as serializeQuestionContentDraft, ol as serializeQuestionStructureDraft, Ni as updateQuestionContentExtraItem, Mi as updateQuestionContentItem, Gr as updateQuestionStructureElement, Wr as updateQuestionStructureExtra, Kr as updateQuestionStructureGlobalConfig, qr as updateQuestionStructureMetadata, ur as validateQuestionDataElementAlignment };
9421
+ export { rl as QuestionContentEditor, pd as QuestionPlayer, Rd as QuestionPreview, G as QuestionRichContentView, wf as QuestionStructureEditor, $i as addBlankToGroup, ra as assignBlankToAnswerGroup, oc as cn, ia as createBlankAnswerGroupWithBlank, hi as createEmptyQuestionContentDraft, rr as createEmptyQuestionData, bl as createEmptyQuestionPlayerResponse, ar as createEmptyQuestionResponse, Ir as createEmptyQuestionStructureDraft, ji as createQuestionContentDraftFromSerialized, ol as createQuestionContentStructureFromDraft, sl as createQuestionPreviewDraft, Rr as createQuestionStructureElement, Lr as createQuestionStructureExtra, M as createRichContentValue, gi as createRichContentValueFromDocument, v as createRichTextContent, ea as deleteBlankFromGroup, Hr as deleteQuestionStructureElement, Vr as deleteQuestionStructureExtra, aa as detachBlankFromAnswerGroup, Os as findQuestionContentQuestionTypeStructure, Ms as findQuestionContentQuestionTypeTemplate, Si as getQuestionContentExtraItem, xi as getQuestionContentItem, Ei as getQuestionContentJudgementOptions, Ci as getQuestionContentOptionMarker, yi as getQuestionContentTextMarkerAnswerText, ll as getQuestionStructureDraftChangeKind, j as getQuestionStructureElementDefaultEnName, A as getQuestionStructureElementDefaultName, Yr as getQuestionStructureExtraDefaultEnName, Jr as getQuestionStructureExtraDefaultName, bi as getRichContentDocument, na as getSharedBlankAnswerGroups, mi as isCompositeQuestionContentStructure, sr as isCompositeQuestionType, ki as isQuestionContentDraftEmpty, Ur as moveQuestionStructureElement, Bi as normalizeFillTextCandidateState, ir as normalizeQuestionData, or as normalizeQuestionResponse, y as normalizeRichTextContent, Ar as questionStructureElementTypes, jr as questionStructureExtraKeys, Ai as serializeQuestionContentDraft, cl as serializeQuestionStructureDraft, Ni as updateQuestionContentExtraItem, Mi as updateQuestionContentItem, Gr as updateQuestionStructureElement, Wr as updateQuestionStructureExtra, Kr as updateQuestionStructureGlobalConfig, qr as updateQuestionStructureMetadata, ur as validateQuestionDataElementAlignment };