@pie-element/mc-populated-blank 0.3.0-next.7 → 0.3.0-next.9

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.
@@ -46,7 +46,21 @@ function I(e, t = {}) {
46
46
  }
47
47
  return null;
48
48
  }
49
- function L({ sourceEl: e, fallbackSelector: t, component: n, complete: r, session: i }) {
49
+ function L(e) {
50
+ return !!e && typeof e == "object" && !Array.isArray(e);
51
+ }
52
+ function R(e, t) {
53
+ if (e === t) return e;
54
+ if (!L(e) || !L(t) || Object.isFrozen(e) || !Object.isExtensible(e)) return t;
55
+ try {
56
+ for (let n of Object.keys(e)) n in t || delete e[n];
57
+ Object.assign(e, t);
58
+ } catch {
59
+ return t;
60
+ }
61
+ return e;
62
+ }
63
+ function z({ sourceEl: e, fallbackSelector: t, component: n, complete: r, session: i }) {
50
64
  let a = I(e, { fallbackSelector: t });
51
65
  return a ? typeof a.onSessionChange == "function" ? (a.onSessionChange(i), a) : (a.dispatchEvent(new P(n, r)), a) : null;
52
66
  }
@@ -57,49 +71,49 @@ function te(e) {
57
71
  }
58
72
  //#endregion
59
73
  //#region src/delivery/AudioPlayer.svelte
60
- var ne = O("<audio class=\"sr-only pie-audio-player svelte-ypdwb3\" preload=\"metadata\" aria-hidden=\"true\" tabindex=\"-1\"></audio> <button class=\"listen-button pie-listen-button rli-feature-audio svelte-ypdwb3\" type=\"button\"><img/> <img/></button>", 1), re = O("<button class=\"mt-2 text-sm underline pie-audio-autoplay-enable\" type=\"button\"> </button>"), R = O("<audio controls=\"\" class=\"w-full max-w-md pie-audio-player\" preload=\"metadata\"><track kind=\"captions\"/></audio> <!>", 1), ie = O("<p class=\"text-sm text-red-700 pie-audio-error\" role=\"alert\"> </p>"), z = O("<div class=\"mb-4 audio-container pie-audio-container\"><!></div>"), B = {
74
+ var B = O("<audio class=\"sr-only pie-audio-player svelte-ypdwb3\" preload=\"metadata\" aria-hidden=\"true\" tabindex=\"-1\"></audio> <button class=\"listen-button pie-listen-button rli-feature-audio svelte-ypdwb3\" type=\"button\"><img/> <img/></button>", 1), ne = O("<button class=\"mt-2 text-sm underline pie-audio-autoplay-enable\" type=\"button\"> </button>"), V = O("<audio controls=\"\" class=\"w-full max-w-md pie-audio-player\" preload=\"metadata\"><track kind=\"captions\"/></audio> <!>", 1), H = O("<p class=\"text-sm text-red-700 pie-audio-error\" role=\"alert\"> </p>"), re = O("<div class=\"mb-4 audio-container pie-audio-container\"><!></div>"), ie = {
61
75
  hash: "svelte-ypdwb3",
62
76
  code: ".listen-button.svelte-ypdwb3 {width:var(--mpb-listen-button-size, 128px);height:var(--mpb-listen-button-size, 128px);border:0;padding:0;background-color:transparent;cursor:pointer;z-index:1;}.listen-button.svelte-ypdwb3:hover {background-color:#e2f1fe;}.listen-feature-icon.svelte-ypdwb3 {width:var(--mpb-listen-button-size, 128px);height:var(--mpb-listen-button-size, 128px);object-fit:contain;display:none;}.listen-feature-icon.listen-active.svelte-ypdwb3 {display:block;}.sr-only.svelte-ypdwb3 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}"
63
77
  };
64
- function V(p, m) {
65
- c(m, !0), ee(p, B);
78
+ function U(p, m) {
79
+ c(m, !0), ee(p, ie);
66
80
  let h = {
67
81
  IDLE: "idle",
68
82
  PLAYING: "playing",
69
83
  BLOCKED: "blocked",
70
84
  PAUSED: "paused"
71
- }, v = C(m, "hasAudio", 7, !1), w = C(m, "audioUrl", 7), E = C(m, "useFeatureButtonAudio", 7, !1), D = C(m, "autoplayEnabled", 7, !1), O = C(m, "featureAudioSkin", 7), j = C(m, "uiText", 7), M = C(m, "locale", 7, ""), N = C(m, "onaudiostarted", 7), P = C(m, "onaudioended", 7), F = e(null), I = e(null), L = e(null), V = e(s(h.IDLE)), H = a(() => te({
85
+ }, v = C(m, "hasAudio", 7, !1), w = C(m, "audioUrl", 7), E = C(m, "useFeatureButtonAudio", 7, !1), D = C(m, "autoplayEnabled", 7, !1), O = C(m, "featureAudioSkin", 7), j = C(m, "uiText", 7), M = C(m, "locale", 7, ""), N = C(m, "onaudiostarted", 7), P = C(m, "onaudioended", 7), F = e(null), I = e(null), L = e(null), R = e(s(h.IDLE)), z = a(() => te({
72
86
  hasAudio: v(),
73
87
  audioUrl: w(),
74
88
  useFeatureButtonAudio: E()
75
- })), U = a(() => A(V) === h.PLAYING), W = a(() => A(V) === h.BLOCKED), ae = a(() => A(H) === "error" ? j().audioResourceUnavailable : "");
89
+ })), U = a(() => A(R) === h.PLAYING), W = a(() => A(R) === h.BLOCKED), ae = a(() => A(z) === "error" ? j().audioResourceUnavailable : "");
76
90
  t(() => {
77
- w(), b(V, h.IDLE, !0);
91
+ w(), b(R, h.IDLE, !0);
78
92
  });
79
93
  function oe() {
80
- A(H) !== "none" && A(H) !== "error" && A(F) && A(F).play().catch(() => {});
94
+ A(z) !== "none" && A(z) !== "error" && A(F) && A(F).play().catch(() => {});
81
95
  }
82
- function se() {
83
- A(H) !== "none" && A(H) !== "error" && A(F) && A(F).play().finally(() => {
84
- A(V) === h.BLOCKED && b(V, h.PAUSED, !0);
96
+ function G() {
97
+ A(z) !== "none" && A(z) !== "error" && A(F) && A(F).play().finally(() => {
98
+ A(R) === h.BLOCKED && b(R, h.PAUSED, !0);
85
99
  });
86
100
  }
87
- function G(e, n, r) {
101
+ function K(e, n, r) {
88
102
  t(() => {
89
103
  let t = e();
90
104
  if (t) return t.addEventListener(n, r), () => t.removeEventListener(n, r);
91
105
  });
92
106
  }
93
- G(() => A(F), "playing", () => {
94
- b(V, h.PLAYING, !0), N()?.();
95
- }), G(() => A(F), "ended", () => {
96
- b(V, h.PAUSED, !0), P()?.();
97
- }), G(() => A(I), "click", () => oe()), G(() => A(L), "click", () => se()), t(() => {
98
- !D() || A(H) === "none" || A(H) === "error" || A(V) === h.IDLE && A(F) && w() && (b(V, h.PAUSED, !0), A(F).play().catch(() => {
99
- b(V, h.BLOCKED, !0);
107
+ K(() => A(F), "playing", () => {
108
+ b(R, h.PLAYING, !0), N()?.();
109
+ }), K(() => A(F), "ended", () => {
110
+ b(R, h.PAUSED, !0), P()?.();
111
+ }), K(() => A(I), "click", () => oe()), K(() => A(L), "click", () => G()), t(() => {
112
+ !D() || A(z) === "none" || A(z) === "error" || A(R) === h.IDLE && A(F) && w() && (b(R, h.PAUSED, !0), A(F).play().catch(() => {
113
+ b(R, h.BLOCKED, !0);
100
114
  }));
101
115
  });
102
- function K(e = "") {
116
+ function se(e = "") {
103
117
  return e.toLowerCase().startsWith("es") ? "Escuchar" : "Listen";
104
118
  }
105
119
  function q(e = "") {
@@ -164,40 +178,40 @@ function V(p, m) {
164
178
  P(e), y();
165
179
  }
166
180
  }, Y = d(), X = u(Y), le = (e) => {
167
- var t = z(), a = k(t), o = (e) => {
168
- var t = ne(), r = u(t);
181
+ var t = re(), a = k(t), o = (e) => {
182
+ var t = B(), r = u(t);
169
183
  T(r, (e) => b(F, e), () => A(F));
170
184
  var a = n(r, 2), o = k(a), s = n(o, 2);
171
185
  i(a), T(a, (e) => b(I, e), () => A(I)), l((e, t, n) => {
172
186
  f(r, "src", w()), f(a, "aria-label", e), x(o, 1, `listen-feature-icon pie-listen-icon rli-feature-listen ${A(U) ? "" : "listen-active"}`, "svelte-ypdwb3"), f(o, "src", O().silentUrl), f(o, "alt", t), x(s, 1, `listen-feature-icon pie-listen-icon rli-feature-listen ${A(U) ? "listen-active" : ""}`, "svelte-ypdwb3"), f(s, "src", O().playingUrl), f(s, "alt", n);
173
187
  }, [
174
- () => K(M()),
188
+ () => se(M()),
175
189
  () => q(M()),
176
190
  () => J(M())
177
191
  ]), g(e, t);
178
192
  }, s = (e) => {
179
- var t = R(), i = u(t);
193
+ var t = V(), i = u(t);
180
194
  T(i, (e) => b(F, e), () => A(F));
181
195
  var a = n(i, 2), o = (e) => {
182
- var t = re(), n = r(t, !0);
196
+ var t = ne(), n = r(t, !0);
183
197
  T(t, (e) => b(L, e), () => A(L)), l(() => _(n, j().clickToEnableAutoplay)), g(e, t);
184
198
  };
185
199
  S(a, (e) => {
186
200
  A(W) && e(o);
187
201
  }), l(() => f(i, "src", w())), g(e, t);
188
202
  }, c = (e) => {
189
- var t = ie(), n = r(t, !0);
203
+ var t = H(), n = r(t, !0);
190
204
  l(() => _(n, A(ae))), g(e, t);
191
205
  };
192
206
  S(a, (e) => {
193
- A(H) === "feature-button" ? e(o) : A(H) === "controls" ? e(s, 1) : A(H) === "error" && e(c, 2);
207
+ A(z) === "feature-button" ? e(o) : A(z) === "controls" ? e(s, 1) : A(z) === "error" && e(c, 2);
194
208
  }), i(t), g(e, t);
195
209
  };
196
210
  return S(X, (e) => {
197
- A(H) !== "none" && e(le);
211
+ A(z) !== "none" && e(le);
198
212
  }), g(p, Y), o(ce);
199
213
  }
200
- D(V, {
214
+ D(U, {
201
215
  hasAudio: {},
202
216
  audioUrl: {},
203
217
  useFeatureButtonAudio: {},
@@ -210,12 +224,12 @@ D(V, {
210
224
  }, [], [], { mode: "open" });
211
225
  //#endregion
212
226
  //#region src/delivery/ClozeMarker.svelte
213
- var H = O("<img class=\"w-auto object-contain pie-blank-image\" style=\"max-width:var(--mpb-choice-image-max-width, 9.375rem);max-height:var(--mpb-choice-image-max-height, 9.375rem);\"/>"), U = O("<span class=\"cloze-marker-value pie-blank-value svelte-d9l5tb\"></span>"), W = O("<span class=\"cloze-marker-empty svelte-d9l5tb\"><span aria-hidden=\"true\">&nbsp;</span> <span class=\"sr-only svelte-d9l5tb\">(blank)</span></span>"), ae = O("<span role=\"status\" aria-live=\"polite\" aria-atomic=\"true\"><!></span>"), oe = {
227
+ var W = O("<img class=\"w-auto object-contain pie-blank-image\" style=\"max-width:var(--mpb-choice-image-max-width, 9.375rem);max-height:var(--mpb-choice-image-max-height, 9.375rem);\"/>"), ae = O("<span class=\"cloze-marker-value pie-blank-value svelte-d9l5tb\"></span>"), oe = O("<span class=\"cloze-marker-empty svelte-d9l5tb\"><span aria-hidden=\"true\">&nbsp;</span> <span class=\"sr-only svelte-d9l5tb\">(blank)</span></span>"), G = O("<span role=\"status\" aria-live=\"polite\" aria-atomic=\"true\"><!></span>"), K = {
214
228
  hash: "svelte-d9l5tb",
215
229
  code: ".cloze-marker.svelte-d9l5tb {display:inline-flex;align-items:center;justify-content:center;text-align:center;vertical-align:baseline;}.cloze-marker.svelte-d9l5tb:focus-within {outline:2px solid var(--mpb-focus-ring, #1565c0);outline-offset:2px;}.cloze-marker-standalone.svelte-d9l5tb {width:var(--mpb-blank-standalone-width, 7rem);}.cloze-marker-empty.svelte-d9l5tb {display:inline-block;min-width:4ch;}.cloze-marker-value.svelte-d9l5tb {width:100%;display:inline-flex;align-items:center;justify-content:center;text-align:center;}.cloze-marker-value.svelte-d9l5tb p {margin:0;}\n\n /* Same 150x150 content-element constraint as ChoiceRow.svelte's .choice-html\n img — the selected choice's raw labelHtml can carry an embedded <img> here\n too, regardless of customType. See CONTOOL-3159. */.cloze-marker-value.svelte-d9l5tb img {width:150px;height:150px;}.sr-only.svelte-d9l5tb {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}"
216
230
  };
217
231
  function se(e, t) {
218
- c(t, !0), ee(e, oe);
232
+ c(t, !0), ee(e, K);
219
233
  let n = C(t, "choiceMode", 7, "text"), r = C(t, "displayChoice", 7, void 0), a = C(t, "displayChoiceLabelHtml", 7, ""), s = C(t, "isStandalone", 7, !1), u = C(t, "blankWidth", 7), d = C(t, "blankBorderWidth", 7), h = C(t, "ariaLabel", 7);
220
234
  var _ = {
221
235
  get choiceMode() {
@@ -260,16 +274,16 @@ function se(e, t) {
260
274
  set ariaLabel(e) {
261
275
  h(e), y();
262
276
  }
263
- }, v = ae(), b = k(v), w = (e) => {
264
- var t = H();
277
+ }, v = G(), b = k(v), w = (e) => {
278
+ var t = W();
265
279
  l(() => {
266
280
  f(t, "src", r().imageUrl), f(t, "alt", r().imageAlt || "Selected answer image");
267
281
  }), g(e, t);
268
282
  }, T = (e) => {
269
- var t = U();
283
+ var t = ae();
270
284
  m(t, a, !0), i(t), g(e, t);
271
285
  }, E = (e) => {
272
- g(e, W());
286
+ g(e, oe());
273
287
  };
274
288
  return S(b, (e) => {
275
289
  n() === "image" && r()?.imageUrl ? e(w) : a() ? e(T, 1) : e(E, -1);
@@ -288,12 +302,12 @@ D(se, {
288
302
  }, [], [], { mode: "open" });
289
303
  //#endregion
290
304
  //#region src/delivery/ChoiceRow.svelte
291
- var G = O("<img class=\"object-contain pie-choice-image\" style=\"max-width:var(--mpb-choice-image-max-width, 9.375rem);max-height:var(--mpb-choice-image-max-height, 9.375rem);\"/>"), K = O("<span class=\"choice-html pie-choice-label svelte-8xu1pt\"></span>"), q = O("<label class=\"cursor-pointer choice-tile text-center pie-choice-tile svelte-8xu1pt\"><span class=\"choice-tile-content pie-choice-tile-content svelte-8xu1pt\"><!></span> <input type=\"radio\" class=\"choice-radio-bottom pie-choice-radio pie-choice-radio-bottom svelte-8xu1pt\"/></label>"), J = O("<img class=\"object-contain pie-choice-image\" style=\"max-height:var(--mpb-choice-image-max-height, 5rem);\"/>"), ce = O("<input type=\"radio\" class=\"choice-radio-inline pie-choice-radio pie-choice-radio-inline svelte-8xu1pt\"/> <label class=\"cursor-pointer flex-1 pie-choice-label-wrap svelte-8xu1pt\"><!></label>", 1), Y = O("<span aria-hidden=\"true\"> </span>"), X = O("<div style=\"gap:var(--mpb-choice-row-gap, 0.5rem);\"><!> <!></div>"), le = {
305
+ var q = O("<img class=\"object-contain pie-choice-image\" style=\"max-width:var(--mpb-choice-image-max-width, 9.375rem);max-height:var(--mpb-choice-image-max-height, 9.375rem);\"/>"), J = O("<span class=\"choice-html pie-choice-label svelte-8xu1pt\"></span>"), ce = O("<label class=\"cursor-pointer choice-tile text-center pie-choice-tile svelte-8xu1pt\"><span class=\"choice-tile-content pie-choice-tile-content svelte-8xu1pt\"><!></span> <input type=\"radio\" class=\"choice-radio-bottom pie-choice-radio pie-choice-radio-bottom svelte-8xu1pt\"/></label>"), Y = O("<img class=\"object-contain pie-choice-image\" style=\"max-height:var(--mpb-choice-image-max-height, 5rem);\"/>"), X = O("<input type=\"radio\" class=\"choice-radio-inline pie-choice-radio pie-choice-radio-inline svelte-8xu1pt\"/> <label class=\"cursor-pointer flex-1 pie-choice-label-wrap svelte-8xu1pt\"><!></label>", 1), le = O("<span aria-hidden=\"true\"> </span>"), ue = O("<div style=\"gap:var(--mpb-choice-row-gap, 0.5rem);\"><!> <!></div>"), de = {
292
306
  hash: "svelte-8xu1pt",
293
307
  code: ".choice-row-horizontal.svelte-8xu1pt {flex-direction:column;align-items:center;width:min(var(--mpb-choice-width-px, 170px), var(--mpb-choice-width-vw, 30vw));min-height:var(--mpb-choice-tile-min-height, 11rem);gap:0;}.choice-tile.svelte-8xu1pt {display:flex;flex-direction:column;justify-content:space-between;align-items:center;width:100%;min-height:var(--mpb-choice-tile-min-height, 11rem);padding:0.8rem 0.65rem 0.5rem;border-radius:8px;background:transparent;transition:background-color 120ms ease-in-out;}.choice-tile-content.svelte-8xu1pt {width:100%;display:flex;align-items:center;justify-content:center;min-height:var(--mpb-choice-content-min-height, 7.5rem);}.choice-row-horizontal.svelte-8xu1pt:hover .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-hover-bg, var(--pie-background-dark, #ecedf1));}.pie-choice-horizontal.svelte-8xu1pt:not(.is-selected):not(:hover) .pie-choice-tile:where(.svelte-8xu1pt) {background:transparent;}.choice-row-horizontal.is-selected.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-selected-bg, var(--pie-secondary-background, rgba(241, 241, 241, 1)));}.choice-row-horizontal.is-selected.svelte-8xu1pt:hover .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-selected-bg, var(--pie-secondary-background, rgba(241, 241, 241, 1)));}.pie-choice.svelte-8xu1pt:not(.pie-choice-horizontal):hover .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-background-dark, #ecedf1);}.pie-choice.svelte-8xu1pt:not(.pie-choice-horizontal):not(.is-selected):not(:hover) .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:transparent;}.pie-choice:not(.pie-choice-horizontal).is-selected.svelte-8xu1pt .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-secondary-background, rgba(241, 241, 241, 1));border-radius:6px;}.pie-choice:not(.pie-choice-horizontal).is-selected.svelte-8xu1pt:hover .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-secondary-background, rgba(241, 241, 241, 1));}.pie-choice.choice-correct.svelte-8xu1pt {border-left:3px solid var(--pie-correct-tertiary, #0ea449);}.pie-choice.choice-incorrect.svelte-8xu1pt {border-left:3px solid var(--pie-incorrect-icon, #bf0d00);}.pie-choice-horizontal.choice-correct.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--pie-correct-secondary, #e8f5e9);}.pie-choice-horizontal.choice-incorrect.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--pie-incorrect-secondary, #ffebee);}.pie-choice-feedback-badge.svelte-8xu1pt {margin-left:auto;display:inline-flex;align-items:center;justify-content:center;width:1.1rem;height:1.1rem;border-radius:9999px;font-size:0.72rem;line-height:1;font-weight:700;color:var(--pie-white, #ffffff);}.pie-choice-feedback-correct.svelte-8xu1pt {background:var(--pie-correct-icon, #087d38);}.pie-choice-feedback-incorrect.svelte-8xu1pt {background:var(--pie-incorrect-icon, #bf0d00);}.choice-row-horizontal.svelte-8xu1pt p {margin:0;text-align:center;}.choice-html.svelte-8xu1pt p {margin:0;}.choice-html.svelte-8xu1pt {width:100%;display:inline-flex;align-items:center;justify-content:center;text-align:center;}\n\n /* Choices carrying raw <img> markup in labelHtml (rather than the dedicated\n imageUrl/imageAlt fields) render unconstrained at their authored size\n otherwise — 3rd-party/CQT-sourced content is typically authored well above\n the platform's 150x150 content-element spec. Applies regardless of\n customType, unlike the r1-CQT-specific cqt-css overlays. See CONTOOL-3159. */.choice-html.svelte-8xu1pt img {width:150px;height:150px;}.choice-radio-bottom.svelte-8xu1pt {margin-top:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem);padding:var(--mpb-choice-radio-padding, 0px);}.choice-radio-inline.svelte-8xu1pt {margin-top:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem);}"
294
308
  };
295
- function ue(e, t) {
296
- c(t, !0), ee(e, le);
309
+ function fe(e, t) {
310
+ c(t, !0), ee(e, de);
297
311
  let a = C(t, "choice", 7), s = C(t, "choiceMode", 7, "text"), d = C(t, "isHorizontal", 7, !1), p = C(t, "isSelected", 7, !1), h = C(t, "isDisabled", 7, !1), b = C(t, "correctness", 7, void 0), T = C(t, "isEvaluateMode", 7, !1), D = C(t, "instanceId", 7), O = C(t, "radioGroupName", 7);
298
312
  var A = {
299
313
  get choice() {
@@ -350,14 +364,14 @@ function ue(e, t) {
350
364
  set radioGroupName(e) {
351
365
  O(e), y();
352
366
  }
353
- }, j = X(), M = k(j), N = (e) => {
354
- var t = q(), r = k(t), o = k(r), c = (e) => {
355
- var t = G();
367
+ }, j = ue(), M = k(j), N = (e) => {
368
+ var t = ce(), r = k(t), o = k(r), c = (e) => {
369
+ var t = q();
356
370
  l(() => {
357
371
  f(t, "src", a().imageUrl), f(t, "alt", a().imageAlt || `Choice ${a().id}`);
358
372
  }), g(e, t);
359
373
  }, u = (e) => {
360
- var t = K();
374
+ var t = J();
361
375
  m(t, () => a().labelHtml || "", !0), i(t), g(e, t);
362
376
  };
363
377
  S(o, (e) => {
@@ -368,15 +382,15 @@ function ue(e, t) {
368
382
  f(t, "for", `${D()}-opt-${a().id}`), f(d, "name", O()), f(d, "id", `${D()}-opt-${a().id}`), E(d, a().id), w(d, p()), d.disabled = h();
369
383
  }), g(e, t);
370
384
  }, P = (e) => {
371
- var t = ce(), r = u(t);
385
+ var t = X(), r = u(t);
372
386
  v(r);
373
387
  var o = n(r, 2), c = k(o), d = (e) => {
374
- var t = J();
388
+ var t = Y();
375
389
  l(() => {
376
390
  f(t, "src", a().imageUrl), f(t, "alt", a().imageAlt || `Choice ${a().id}`);
377
391
  }), g(e, t);
378
392
  }, _ = (e) => {
379
- var t = K();
393
+ var t = J();
380
394
  m(t, () => a().labelHtml || "", !0), i(t), g(e, t);
381
395
  };
382
396
  S(c, (e) => {
@@ -389,7 +403,7 @@ function ue(e, t) {
389
403
  d() ? e(N) : e(P, -1);
390
404
  });
391
405
  var F = n(M, 2), I = (e) => {
392
- var t = Y(), n = r(t, !0);
406
+ var t = le(), n = r(t, !0);
393
407
  l(() => {
394
408
  x(t, 1, `pie-choice-feedback-badge ${b() === "correct" ? "pie-choice-feedback-correct" : "pie-choice-feedback-incorrect"}`, "svelte-8xu1pt"), _(n, b() === "correct" ? "✓" : "✕");
395
409
  }), g(e, t);
@@ -398,7 +412,7 @@ function ue(e, t) {
398
412
  T() && b() && e(I);
399
413
  }), i(j), l(() => x(j, 1, `flex items-start choice-row pie-choice ${d() ? "choice-row-horizontal pie-choice-horizontal" : ""} ${p() ? "is-selected pie-choice-selected" : ""} ${b() ? `choice-${b()} pie-choice-${b()}` : ""}`, "svelte-8xu1pt")), g(e, j), o(A);
400
414
  }
401
- D(ue, {
415
+ D(fe, {
402
416
  choice: {},
403
417
  choiceMode: {},
404
418
  isHorizontal: {},
@@ -411,31 +425,31 @@ D(ue, {
411
425
  }, [], [], { mode: "open" });
412
426
  //#endregion
413
427
  //#region src/delivery/computeChoiceCorrectness.ts
414
- function de(e) {
428
+ function pe(e) {
415
429
  let t = /* @__PURE__ */ new Map(), { isEvaluateMode: n, correctChoiceId: r, selectedId: i, showCorrectAnswer: a } = e;
416
430
  return !n || !r ? t : a ? (t.set(r, "correct"), t) : i ? i === r ? (t.set(r, "correct"), t) : (t.set(i, "incorrect"), t.set(r, "incorrect"), t) : (t.set(r, "incorrect"), t);
417
431
  }
418
432
  //#endregion
419
433
  //#region src/delivery/computeLayoutProfile.ts
420
- var fe = "{{blank}}", pe = /* @__PURE__ */ new Set([
434
+ var Z = "{{blank}}", me = /* @__PURE__ */ new Set([
421
435
  "audio_blank_only",
422
436
  "stimulus_image_blank",
423
437
  "token_sequence"
424
438
  ]);
425
- function me(e) {
426
- let { interactionMode: t = "", template: n = "", choiceLayout: r, layoutProfile: i = "", hasAudio: a = !1, useFeatureButtonAudio: o } = e, s = t === "audio_mc_only", c = n ? n.replace(/<[^>]+>/g, "").replace(/&nbsp;/g, " ").trim() === fe : !1, l = r === "horizontal" || r === "vertical" ? r : s || c ? "horizontal" : "vertical";
439
+ function he(e) {
440
+ let { interactionMode: t = "", template: n = "", choiceLayout: r, layoutProfile: i = "", hasAudio: a = !1, useFeatureButtonAudio: o } = e, s = t === "audio_mc_only", c = n ? n.replace(/<[^>]+>/g, "").replace(/&nbsp;/g, " ").trim() === Z : !1, l = r === "horizontal" || r === "vertical" ? r : s || c ? "horizontal" : "vertical";
427
441
  return {
428
442
  isAudioOnlyMode: s,
429
443
  isBlankOnlyTemplate: c,
430
444
  choiceLayout: l,
431
445
  isHorizontalChoices: l === "horizontal",
432
446
  hasInlineSentenceAudioLayout: i === "inline_sentence" && a,
433
- useFeatureButtonAudio: typeof o == "boolean" ? o : a && pe.has(i)
447
+ useFeatureButtonAudio: typeof o == "boolean" ? o : a && me.has(i)
434
448
  };
435
449
  }
436
450
  //#endregion
437
451
  //#region src/delivery/computeLayoutStyle.ts
438
- var Z = {
452
+ var ge = {
439
453
  blankStandaloneWidthRem: {
440
454
  varName: "--mpb-blank-standalone-width",
441
455
  unit: "rem"
@@ -572,7 +586,7 @@ var Z = {
572
586
  varName: "--mpb-inline-choices-margin-top",
573
587
  unit: "rem"
574
588
  }
575
- }, he = {
589
+ }, _e = {
576
590
  audio_blank_only: {
577
591
  blankWideWidthRem: 10,
578
592
  blankUnderlineWideWidthPx: 6,
@@ -590,9 +604,9 @@ var Z = {
590
604
  blankUnderlineWideWidthPx: 6
591
605
  }
592
606
  };
593
- function ge(e) {
607
+ function ve(e) {
594
608
  let { layoutProfile: t, isBlankOnlyTemplate: n } = e, r = e.configuredLimits && typeof e.configuredLimits == "object" ? e.configuredLimits : {}, i = e.customProfilePresets && typeof e.customProfilePresets == "object" ? e.customProfilePresets : {}, a = i[t] && typeof i[t] == "object" ? i[t] : {}, o = {
595
- ...he[t] ?? {},
609
+ ..._e[t] ?? {},
596
610
  ...a
597
611
  }, s = {
598
612
  ...M,
@@ -604,7 +618,7 @@ function ge(e) {
604
618
  "token_sequence"
605
619
  ], u = c.includes(t) ? `${s.blankWideWidthRem}rem` : n ? `${s.blankStandaloneWidthRem}rem` : "auto", d = l.includes(t) ? `${s.blankUnderlineWideWidthPx}px` : `${s.blankUnderlineWidthPx}px`;
606
620
  return {
607
- rootStyle: Object.keys(Z).map((e) => `${Z[e].varName}:${s[e]}${Z[e].unit}`).join(";"),
621
+ rootStyle: Object.keys(ge).map((e) => `${ge[e].varName}:${s[e]}${ge[e].unit}`).join(";"),
608
622
  blankWidth: u,
609
623
  blankBorderWidth: d,
610
624
  legendMaxChars: s.legendMaxChars
@@ -612,7 +626,7 @@ function ge(e) {
612
626
  }
613
627
  //#endregion
614
628
  //#region src/delivery/computeDisplayState.ts
615
- var _e = {
629
+ var ye = {
616
630
  default: {
617
631
  silentUrl: "https://assets.learnosity.com/organisations/844/0c9f2aa3-3cd5-4de7-93ef-541c24ca35da.svg",
618
632
  playingUrl: "https://assets.learnosity.com/organisations/844/231dfdc2-c113-4be5-91fb-e75a0ca5994b.svg"
@@ -622,25 +636,25 @@ var _e = {
622
636
  playingUrl: "https://assets.learnosity.com/organisations/844/120f216d-96b7-4560-94b8-1d90710216b7.svg"
623
637
  }
624
638
  };
625
- function ve(e) {
626
- let t = String(e.locale || "").toLowerCase(), n = t.slice(0, 2), r = e.audioButtonSkinsByLocale && typeof e.audioButtonSkinsByLocale == "object" ? e.audioButtonSkinsByLocale : {}, i = e.audioButtonSkin && typeof e.audioButtonSkin == "object" ? e.audioButtonSkin : null, a = t.startsWith("es") ? _e.es : _e.default;
639
+ function be(e) {
640
+ let t = String(e.locale || "").toLowerCase(), n = t.slice(0, 2), r = e.audioButtonSkinsByLocale && typeof e.audioButtonSkinsByLocale == "object" ? e.audioButtonSkinsByLocale : {}, i = e.audioButtonSkin && typeof e.audioButtonSkin == "object" ? e.audioButtonSkin : null, a = t.startsWith("es") ? ye.es : ye.default;
627
641
  return r[t] || r[n] || r.default || i || a;
628
642
  }
629
- function ye(e) {
643
+ function xe(e) {
630
644
  let { selectedId: t, isEvaluateMode: n, showCorrectAnswer: r, alwaysShowCorrect: i, correctChoiceId: a } = e;
631
645
  return i && a || n && r && a ? a : t;
632
646
  }
633
- function be(e) {
647
+ function Se(e) {
634
648
  let { isEvaluateMode: t, showCorrectAnswer: n, isCorrect: r, isIncorrect: i, selectedId: a } = e;
635
649
  return !t || n ? "" : r ? "Correct answer selected" : i && a ? "Incorrect answer selected" : "";
636
650
  }
637
- function xe(e) {
651
+ function Ce(e) {
638
652
  let { prompt: t, legendMaxChars: n, answerChoicesLabel: r } = e, i = t.replace(/<[^>]+>/g, " ").replace(/\s+/g, " ").trim(), a = Math.max(8, n);
639
653
  return i ? i.length > a ? `${i.slice(0, Math.max(1, a - 1))}…` : i : r;
640
654
  }
641
655
  //#endregion
642
656
  //#region src/delivery/cqt-css/sel-r1-base.css?raw
643
- var Se = "/* Shared base styles for all sel_r1-*_plusggg variants.\n Applied via the data-mpb-variant=\"sel-r1-base\" style element.\n Uses [class*=\"variant-sel-r1-\"] so it covers every r1 variant class.\n Source: web-ItemBankViewer/learnosity/templates/Renaissance/r1.scss */\n\n/* r1.scss: Starial font throughout.\n font-size 14px mirrors the Learnosity host root (.lrn_widget) which sets the\n base for all em-scaled rules in r1.scss (e.g. .rli-r1-content-element { 1.9em })\n and any em-based author content (e.g. <span style=\"font-size:1.8em\">). Without\n this base PIE inherits the 16px browser default and renders ~14% larger than\n the LSY reference. See CONTOOL-2567. */\n[class*=\"variant-sel-r1-\"] {\n font-family: Starial, Arial, sans-serif;\n font-size: 14px;\n}\n\n/* r1.scss: .rli-r1-audio-transcript { font-family:Roboto; font-size:16px } */\n[class*=\"variant-sel-r1-\"] .pie-audio-transcript {\n font-family: Roboto, Arial, sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n}\n\n/* r1.scss: .rli-r1-content-element { font-size: 1.9em } wraps all stem tokens.\n Makes inline font-size spans in the template multiply on top of this base. */\n[class*=\"variant-sel-r1-\"] .pie-template-line {\n font-size: 1.9em;\n}\n\n/* r1.scss: .rli-r1-stem { display:flex; flex-direction:row; justify-content:center }\n r1.scss: .rli-r1-content-element { margin-right:2px; margin-left:2px } — 4px total gap.\n Apply the per-element margin to both classless tokens and the blank slot\n (which is the cloze equivalent) so the gap stacks with whitespace text-nodes\n between flex items the same way LSY does. Earlier this used column-gap:4px,\n but flex column-gap accumulates with the cloze-side mx-1 and the implicit\n whitespace, producing a wider gap than LSY shows. See CONTOOL-2569. */\n[class*=\"variant-sel-r1-\"] .pie-template-line {\n display: flex;\n flex-direction: row;\n align-items: baseline;\n justify-content: center;\n}\n\n[class*=\"variant-sel-r1-\"] .pie-template-line p {\n margin: 0;\n display: flex;\n flex-direction: row;\n align-items: baseline;\n}\n\n/* r1.scss: .rli-r1-content-element { min-width:150px; max-width:150px; min-height:150px;\n line-height:89px; margin-right:2px; margin-left:2px } — wraps every stem token\n (blank slot and adjacent inline spans) in LSY, giving each a 150px box with a\n 2px per-side margin. Apply to inline tokens in all r1 variants so trailing\n tokens in audio_blank_only (gplusggg) match the blank's height the way LSY does. */\n[class*=\"variant-sel-r1-\"] .pie-template-line span:not([class]) {\n min-width: 150px;\n max-width: 150px;\n min-height: 150px;\n line-height: 89px;\n margin-left: 2px;\n margin-right: 2px;\n}\n\n/* .pie-template-line's align-items:baseline (above) computes a shared baseline\n across all its flex items. .pie-blank-slot has no baseline-participating child\n of its own (.cloze-marker centers internally, align-items:center) — so it\n contributes a *synthesized* baseline back to the row, based on its own box\n geometry. That geometry swings wildly depending on the blank's content: an\n empty placeholder vs. a selected choice's image (up to 150x150). Every time a\n choice is selected the row's shared baseline is recomputed from that new\n geometry, visibly shifting sibling tokens like a leading/trailing stem word.\n align-self removes the blank from that shared computation entirely — its\n siblings' position no longer depends on what's currently displayed inside it.\n See CONTOOL-3159. */\n[class*=\"variant-sel-r1-\"] .pie-template-line .pie-blank-slot {\n align-self: flex-end;\n}\n\n/* In token_sequence layouts the blank itself is also a content-element box (no\n surrounding .rli-r1-cloze container at 160px). audio_blank_only / stimulus_image_blank\n keep their own 160px min-height set on the blank slot in McPopulatedBlank.svelte to\n mirror LSY's .rli-r1-cloze height. The 2px per-side margin matches LSY's\n .rli-r1-content-element pattern (overriding the default Tailwind mx-1).\n .pie-blank-slot is box-sizing:border-box with a permanent 6px border-bottom\n (the underline) — min-height:150px therefore only leaves 144px for content,\n so an empty blank (content ~0px, clamped to the 150px floor) and a blank\n showing a 150px choice image (150 + 6 border = 156px, exceeding the floor)\n render at two different total heights. Since .pie-blank-slot is bottom-anchored\n in its row (align-self:flex-end above), that 6px height difference shows up as\n a visible shift of the blank/image every time a choice is selected or cleared.\n min-height:156px keeps the total box height constant regardless of content, so\n the 150px is fully available to the image/text and the border no longer\n competes with it. See CONTOOL-3159. */\n[class*=\"variant-sel-r1-\"].layout-token_sequence .pie-template-line .pie-blank-slot {\n min-width: 150px;\n max-width: 150px;\n min-height: 156px;\n line-height: 89px;\n margin-left: 2px;\n margin-right: 2px;\n}\n\n/* audio_blank_only / stimulus_image_blank keep the 160px wide blank slot, but\n still need the 2px per-side margin so the gap to the trailing token mirrors\n LSY's .rli-r1-content-element rhythm. Without this, Tailwind's mx-1 (4px)\n would dominate and the cloze→token gap diverges from LSY. See CONTOOL-2569. */\n[class*=\"variant-sel-r1-\"].layout-audio_blank_only .pie-template-line .pie-blank-slot,\n[class*=\"variant-sel-r1-\"].layout-stimulus_image_blank .pie-template-line .pie-blank-slot {\n margin-left: 2px;\n margin-right: 2px;\n}\n\n/* The `.pie-template-line span:not([class])` rule above has no depth limit, so it\n also matches the unclassed answer <span> ClozeMarker.svelte renders inside\n .pie-blank-value once a choice is selected (e.g. author font-size overrides like\n <span style=\"font-size:3em\">). For token_sequence that coincides with the blank\n slot's own 150px/89px box above, so outer and inner agree. audio_blank_only /\n stimulus_image_blank instead keep .pie-blank-slot at LSY's separate, taller\n .rli-r1-cloze box (160px) — forcing the answer span into the stem token's\n 150px/89px box there is wrong: a plain (non-flex) span whose min-height exceeds\n its line-height renders that line top-anchored, pinning the answer text to the\n top of the blank with the rest of the box empty beneath it, instead of centered\n on the underline the way LSY renders it. See CONTOOL-3159. */\n[class*=\"variant-sel-r1-\"].layout-audio_blank_only .pie-blank-value span:not([class]),\n[class*=\"variant-sel-r1-\"].layout-stimulus_image_blank .pie-blank-value span:not([class]) {\n min-width: 0;\n max-width: none;\n min-height: 0;\n line-height: normal;\n margin-left: 0;\n margin-right: 0;\n}\n\n/* r1.scss: .rli-r1-content-element { font-size:1.9em; line-height:89px } on distractors */\n[class*=\"variant-sel-r1-\"] .pie-choice-label {\n font-size: 1.9em;\n line-height: 89px;\n}\n\n/* r1.scss: .rli-r1-content-element { min-width:150px; max-width:150px;\n min-height:150px } wraps every image (stem token + distractor) and forces\n the content box to 150×150. LSY's host also rewrites <img width/height>\n to 150 server-side. PIE keeps the authored attributes (typically 108×108),\n so without an explicit override images render ~28% smaller than LSY.\n See CONTOOL-2570. */\n[class*=\"variant-sel-r1-\"] .pie-template-line img,\n[class*=\"variant-sel-r1-\"] .pie-choice-label img {\n width: 150px;\n height: 150px;\n}\n", Ce = {
657
+ var we = "/* Shared base styles for all sel_r1-*_plusggg variants.\n Applied via the data-mpb-variant=\"sel-r1-base\" style element.\n Uses [class*=\"variant-sel-r1-\"] so it covers every r1 variant class.\n Source: web-ItemBankViewer/learnosity/templates/Renaissance/r1.scss */\n\n/* r1.scss: Starial font throughout.\n font-size 14px mirrors the Learnosity host root (.lrn_widget) which sets the\n base for all em-scaled rules in r1.scss (e.g. .rli-r1-content-element { 1.9em })\n and any em-based author content (e.g. <span style=\"font-size:1.8em\">). Without\n this base PIE inherits the 16px browser default and renders ~14% larger than\n the LSY reference. See CONTOOL-2567. */\n[class*=\"variant-sel-r1-\"] {\n font-family: Starial, Arial, sans-serif;\n font-size: 14px;\n}\n\n/* r1.scss: .rli-r1-audio-transcript { font-family:Roboto; font-size:16px } */\n[class*=\"variant-sel-r1-\"] .pie-audio-transcript {\n font-family: Roboto, Arial, sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n}\n\n/* r1.scss: .rli-r1-content-element { font-size: 1.9em } wraps all stem tokens.\n Makes inline font-size spans in the template multiply on top of this base. */\n[class*=\"variant-sel-r1-\"] .pie-template-line {\n font-size: 1.9em;\n}\n\n/* r1.scss: .rli-r1-stem { display:flex; flex-direction:row; justify-content:center }\n r1.scss: .rli-r1-content-element { margin-right:2px; margin-left:2px } — 4px total gap.\n Apply the per-element margin to both classless tokens and the blank slot\n (which is the cloze equivalent) so the gap stacks with whitespace text-nodes\n between flex items the same way LSY does. Earlier this used column-gap:4px,\n but flex column-gap accumulates with the cloze-side mx-1 and the implicit\n whitespace, producing a wider gap than LSY shows. See CONTOOL-2569. */\n[class*=\"variant-sel-r1-\"] .pie-template-line {\n display: flex;\n flex-direction: row;\n align-items: baseline;\n justify-content: center;\n}\n\n[class*=\"variant-sel-r1-\"] .pie-template-line p {\n margin: 0;\n display: flex;\n flex-direction: row;\n align-items: baseline;\n}\n\n/* r1.scss: .rli-r1-content-element { min-width:150px; max-width:150px; min-height:150px;\n line-height:89px; margin-right:2px; margin-left:2px } — wraps every stem token\n (blank slot and adjacent inline spans) in LSY, giving each a 150px box with a\n 2px per-side margin. Apply to inline tokens in all r1 variants so trailing\n tokens in audio_blank_only (gplusggg) match the blank's height the way LSY does. */\n[class*=\"variant-sel-r1-\"] .pie-template-line span:not([class]) {\n min-width: 150px;\n max-width: 150px;\n min-height: 150px;\n line-height: 89px;\n margin-left: 2px;\n margin-right: 2px;\n}\n\n/* .pie-template-line's align-items:baseline (above) computes a shared baseline\n across all its flex items. .pie-blank-slot has no baseline-participating child\n of its own (.cloze-marker centers internally, align-items:center) — so it\n contributes a *synthesized* baseline back to the row, based on its own box\n geometry. That geometry swings wildly depending on the blank's content: an\n empty placeholder vs. a selected choice's image (up to 150x150). Every time a\n choice is selected the row's shared baseline is recomputed from that new\n geometry, visibly shifting sibling tokens like a leading/trailing stem word.\n align-self removes the blank from that shared computation entirely — its\n siblings' position no longer depends on what's currently displayed inside it.\n See CONTOOL-3159. */\n[class*=\"variant-sel-r1-\"] .pie-template-line .pie-blank-slot {\n align-self: flex-end;\n}\n\n/* In token_sequence layouts the blank itself is also a content-element box (no\n surrounding .rli-r1-cloze container at 160px). audio_blank_only / stimulus_image_blank\n keep their own 160px min-height set on the blank slot in McPopulatedBlank.svelte to\n mirror LSY's .rli-r1-cloze height. The 2px per-side margin matches LSY's\n .rli-r1-content-element pattern (overriding the default Tailwind mx-1).\n .pie-blank-slot is box-sizing:border-box with a permanent 6px border-bottom\n (the underline) — min-height:150px therefore only leaves 144px for content,\n so an empty blank (content ~0px, clamped to the 150px floor) and a blank\n showing a 150px choice image (150 + 6 border = 156px, exceeding the floor)\n render at two different total heights. Since .pie-blank-slot is bottom-anchored\n in its row (align-self:flex-end above), that 6px height difference shows up as\n a visible shift of the blank/image every time a choice is selected or cleared.\n min-height:156px keeps the total box height constant regardless of content, so\n the 150px is fully available to the image/text and the border no longer\n competes with it. See CONTOOL-3159. */\n[class*=\"variant-sel-r1-\"].layout-token_sequence .pie-template-line .pie-blank-slot {\n min-width: 150px;\n max-width: 150px;\n min-height: 156px;\n line-height: 89px;\n margin-left: 2px;\n margin-right: 2px;\n}\n\n/* audio_blank_only / stimulus_image_blank keep the 160px wide blank slot, but\n still need the 2px per-side margin so the gap to the trailing token mirrors\n LSY's .rli-r1-content-element rhythm. Without this, Tailwind's mx-1 (4px)\n would dominate and the cloze→token gap diverges from LSY. See CONTOOL-2569. */\n[class*=\"variant-sel-r1-\"].layout-audio_blank_only .pie-template-line .pie-blank-slot,\n[class*=\"variant-sel-r1-\"].layout-stimulus_image_blank .pie-template-line .pie-blank-slot {\n margin-left: 2px;\n margin-right: 2px;\n}\n\n/* The `.pie-template-line span:not([class])` rule above has no depth limit, so it\n also matches the unclassed answer <span> ClozeMarker.svelte renders inside\n .pie-blank-value once a choice is selected (e.g. author font-size overrides like\n <span style=\"font-size:3em\">). For token_sequence that coincides with the blank\n slot's own 150px/89px box above, so outer and inner agree. audio_blank_only /\n stimulus_image_blank instead keep .pie-blank-slot at LSY's separate, taller\n .rli-r1-cloze box (160px) — forcing the answer span into the stem token's\n 150px/89px box there is wrong: a plain (non-flex) span whose min-height exceeds\n its line-height renders that line top-anchored, pinning the answer text to the\n top of the blank with the rest of the box empty beneath it, instead of centered\n on the underline the way LSY renders it. See CONTOOL-3159. */\n[class*=\"variant-sel-r1-\"].layout-audio_blank_only .pie-blank-value span:not([class]),\n[class*=\"variant-sel-r1-\"].layout-stimulus_image_blank .pie-blank-value span:not([class]) {\n min-width: 0;\n max-width: none;\n min-height: 0;\n line-height: normal;\n margin-left: 0;\n margin-right: 0;\n}\n\n/* r1.scss: .rli-r1-content-element { font-size:1.9em; line-height:89px } on distractors */\n[class*=\"variant-sel-r1-\"] .pie-choice-label {\n font-size: 1.9em;\n line-height: 89px;\n}\n\n/* r1.scss: .rli-r1-content-element { min-width:150px; max-width:150px;\n min-height:150px } wraps every image (stem token + distractor) and forces\n the content box to 150×150. LSY's host also rewrites <img width/height>\n to 150 server-side. PIE keeps the authored attributes (typically 108×108),\n so without an explicit override images render ~28% smaller than LSY.\n See CONTOOL-2570. */\n[class*=\"variant-sel-r1-\"] .pie-template-line img,\n[class*=\"variant-sel-r1-\"] .pie-choice-label img {\n width: 150px;\n height: 150px;\n}\n", Te = {
644
658
  "sel_r1-_plusggg": {
645
659
  variantId: "sel-r1-plusggg",
646
660
  variantClass: "variant-sel-r1-plusggg",
@@ -689,14 +703,14 @@ var Se = "/* Shared base styles for all sel_r1-*_plusggg variants.\n Applied v
689
703
  sourceUrl: "https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-s3_plusggg/0.0.1/question.css",
690
704
  cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-s3_plusggg/0.0.1/question.css */\n/* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */\n.mc-populated-blank-root.variant-sel-r1-s3 {\n max-width: 860px;\n margin-inline: auto;\n --mpb-listen-button-size: 128px;\n --mpb-choice-width-px: 155px;\n --mpb-choice-tile-min-height: 11.25rem;\n --mpb-choice-content-min-height: 9.375rem;\n --mpb-choice-group-gap: 0.35rem;\n --mpb-choice-row-gap: 0.35rem;\n --mpb-horizontal-choice-radio-top-margin: 0.25rem;\n --mpb-stimulus-min-column: 240px;\n --mpb-stimulus-grid-column-gap: 1.1rem;\n --mpb-stimulus-choices-margin-top: 0.85rem;\n --mpb-audio-blank-template-margin-bottom: 0.9rem;\n --mpb-blank-wide-width: 6.8rem;\n}\n\n/* sel_r1-s3_plusggg/question.css does not set font-weight on distractors or\n cloze content-element, so they inherit 400 from the host root. The earlier\n font-weight:500 override caused PIE to render visibly heavier than LSY for\n the same author content. See CONTOOL-2571. */\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-label,\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-label :is(span, p, div) {\n font-size: 1.9em;\n line-height: 89px;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-blank-value,\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-blank-value :is(span, p, div) {\n line-height: 1.1;\n white-space: nowrap;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-horizontal .pie-choice-tile {\n border-radius: 6px;\n background: #f1f1f1;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank {\n grid-template-columns: minmax(220px, auto) auto auto;\n grid-template-areas:\n \"transcript transcript transcript\"\n \"sentence template audio\"\n \"choices choices choices\";\n justify-content: center;\n /* question.css: .rli-s3-cloze-container { justify-content:end } bottom-anchors\n the cloze against the shared sentence/audio row instead of top-aligning it —\n matches every item sitting on the same visual baseline. See CONTOOL-3159. */\n align-items: end;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank .pie-template-line {\n grid-area: template;\n justify-self: center;\n}\n\n/* ClozeMarker.svelte's shared .cloze-marker rule vertically *centers* its content\n (align-items:center). question.css's .rli-s3-cloze-container uses\n justify-content:end instead, bottom-anchoring the answer text against the\n underline. Centering leaves it floating well above both the underline and the\n sentence image's own (bottom-anchored) baseline. The blank's own box height\n (160px, from McPopulatedBlank.svelte's shared audio_blank_only/stimulus_image_blank\n rule) is left as-is — it already matches the Learnosity reference (~161px)\n closely; only the internal alignment was wrong. See CONTOOL-3159. */\n.mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank .pie-blank-slot {\n align-items: flex-end;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank .pie-sentence-line {\n justify-self: end;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank .pie-audio-container {\n justify-self: start;\n align-self: start;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank .pie-choices-fieldset {\n justify-self: center;\n width: fit-content;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-sentence-line img {\n max-width: 100%;\n height: auto;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-horizontal:hover .pie-choice-tile {\n background: #e2e2e2;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-horizontal.is-selected .pie-choice-tile,\n.mc-populated-blank-root.variant-sel-r1-s3\n .pie-choice-horizontal.is-selected:hover\n .pie-choice-tile {\n background: #fcfcd3;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-horizontal .pie-choice-radio {\n transform: scale(0.85);\n}\n"
691
705
  }
692
- }, we = (e) => String(e || "").trim().toLowerCase().replace(/v\d+\.\d+\.\d+$/i, ""), Te = (e) => Ce[we(e)], Ee = (e) => Te(e)?.variantClass || "", De = /* @__PURE__ */ new Set([
706
+ }, Ee = (e) => String(e || "").trim().toLowerCase().replace(/v\d+\.\d+\.\d+$/i, ""), De = (e) => Te[Ee(e)], Oe = (e) => De(e)?.variantClass || "", ke = /* @__PURE__ */ new Set([
693
707
  "sel-r1-plusggg",
694
708
  "sel-r1-gplusggg",
695
709
  "sel-r1-g-stem",
696
710
  "sel-r1-gg-plus",
697
711
  "sel-r1-ggplus",
698
712
  "sel-r1-s3"
699
- ]), Oe = (e, t, n) => {
713
+ ]), Ae = (e, t, n) => {
700
714
  let r = document.getElementById(e);
701
715
  if (r) {
702
716
  r.textContent !== n && (r.textContent = n);
@@ -704,14 +718,14 @@ var Se = "/* Shared base styles for all sel_r1-*_plusggg variants.\n Applied v
704
718
  }
705
719
  let i = document.createElement("style");
706
720
  i.id = e, i.setAttribute("data-mpb-variant", t), i.textContent = n, document.head.appendChild(i);
707
- }, ke = (e) => {
708
- !e?.cssText || typeof document > "u" || (De.has(e.variantId) && Oe("mc-populated-blank-css-sel-r1-base", "sel-r1-base", Se), Oe(`mc-populated-blank-css-${e.variantId}`, e.variantId, e.cssText));
709
- }, Ae = O("<div class=\"mb-4 prose pie-prompt\"></div>"), je = j("<svg class=\"pie-correct-answer-toggle-svg svelte-6wlbb4\" preserveAspectRatio=\"xMinYMin meet\" version=\"1.1\" viewBox=\"-283 359 34 35\"><circle cx=\"-266\" cy=\"375.9\" r=\"14\" fill=\"var(--pie-tertiary-light, #d0e2f0)\"></circle><path d=\"M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z\" fill=\"var(--pie-tertiary-light, #d0e2f0)\"></path><polygon points=\"-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6\" fill=\"var(--pie-tertiary, #146eb3)\"></polygon></svg>"), Me = j("<svg class=\"pie-correct-answer-toggle-svg svelte-6wlbb4\" preserveAspectRatio=\"xMinYMin meet\" version=\"1.1\" viewBox=\"-129.5 127 34 35\"><path d=\"M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z\" fill=\"#D0CAC5\" stroke=\"#E6E3E0\" stroke-width=\"0.75\"></path><path d=\"M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z\" fill=\"#B3ABA4\" stroke=\"#CDC7C2\" stroke-width=\"0.5\"></path><circle cx=\"-114.2\" cy=\"143.5\" r=\"14\" fill=\"white\"></circle><path d=\"M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z\" fill=\"var(--pie-background-dark, #ecedf1)\"></path><polygon points=\"-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2\" fill=\"var(--pie-tertiary, #146eb3)\"></polygon></svg>"), Ne = O("<div class=\"pie-correct-answer-toggle-row svelte-6wlbb4\"><button type=\"button\" class=\"mb-3 pie-toggle-correct-answer svelte-6wlbb4\" style=\"gap:var(--mpb-toggle-button-gap, 0.5rem);\" data-testid=\"show-correct-answer\"><span class=\"pie-correct-answer-toggle-content svelte-6wlbb4\"><span class=\"pie-correct-answer-toggle-icon-holder svelte-6wlbb4\" aria-hidden=\"true\"><!></span> <span class=\"pie-correct-answer-toggle-label svelte-6wlbb4\"> </span></span></button></div>"), Pe = O("<div class=\"mb-3 prose prose-p:my-1 sentence-line pie-sentence-line svelte-6wlbb4\"></div>"), Fe = O("<div class=\"mb-4 template-line pie-template-line svelte-6wlbb4\"><!><!><!></div>"), Ie = O("<p class=\"sr-only pie-result-feedback svelte-6wlbb4\" role=\"status\" aria-live=\"polite\"> </p>"), Le = O("<div><!> <!> <!> <!> <!> <!> <p class=\"sr-only pie-blank-hint svelte-6wlbb4\"> </p> <fieldset class=\"border-0 p-0 m-0 pie-choices-fieldset svelte-6wlbb4\"><legend class=\"sr-only pie-choices-legend svelte-6wlbb4\"> </legend> <div style=\"gap:var(--mpb-choice-group-gap, 0.5rem);\" role=\"radiogroup\" tabindex=\"-1\"></div></fieldset></div>"), Re = {
721
+ }, je = (e) => {
722
+ !e?.cssText || typeof document > "u" || (ke.has(e.variantId) && Ae("mc-populated-blank-css-sel-r1-base", "sel-r1-base", we), Ae(`mc-populated-blank-css-${e.variantId}`, e.variantId, e.cssText));
723
+ }, Me = O("<div class=\"mb-4 prose pie-prompt\"></div>"), Ne = j("<svg class=\"pie-correct-answer-toggle-svg svelte-6wlbb4\" preserveAspectRatio=\"xMinYMin meet\" version=\"1.1\" viewBox=\"-283 359 34 35\"><circle cx=\"-266\" cy=\"375.9\" r=\"14\" fill=\"var(--pie-tertiary-light, #d0e2f0)\"></circle><path d=\"M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z\" fill=\"var(--pie-tertiary-light, #d0e2f0)\"></path><polygon points=\"-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6\" fill=\"var(--pie-tertiary, #146eb3)\"></polygon></svg>"), Pe = j("<svg class=\"pie-correct-answer-toggle-svg svelte-6wlbb4\" preserveAspectRatio=\"xMinYMin meet\" version=\"1.1\" viewBox=\"-129.5 127 34 35\"><path d=\"M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z\" fill=\"#D0CAC5\" stroke=\"#E6E3E0\" stroke-width=\"0.75\"></path><path d=\"M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z\" fill=\"#B3ABA4\" stroke=\"#CDC7C2\" stroke-width=\"0.5\"></path><circle cx=\"-114.2\" cy=\"143.5\" r=\"14\" fill=\"white\"></circle><path d=\"M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z\" fill=\"var(--pie-background-dark, #ecedf1)\"></path><polygon points=\"-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2\" fill=\"var(--pie-tertiary, #146eb3)\"></polygon></svg>"), Fe = O("<div class=\"pie-correct-answer-toggle-row svelte-6wlbb4\"><button type=\"button\" class=\"mb-3 pie-toggle-correct-answer svelte-6wlbb4\" style=\"gap:var(--mpb-toggle-button-gap, 0.5rem);\" data-testid=\"show-correct-answer\"><span class=\"pie-correct-answer-toggle-content svelte-6wlbb4\"><span class=\"pie-correct-answer-toggle-icon-holder svelte-6wlbb4\" aria-hidden=\"true\"><!></span> <span class=\"pie-correct-answer-toggle-label svelte-6wlbb4\"> </span></span></button></div>"), Ie = O("<div class=\"mb-3 prose prose-p:my-1 sentence-line pie-sentence-line svelte-6wlbb4\"></div>"), Le = O("<div class=\"mb-4 template-line pie-template-line svelte-6wlbb4\"><!><!><!></div>"), Re = O("<p class=\"sr-only pie-result-feedback svelte-6wlbb4\" role=\"status\" aria-live=\"polite\"> </p>"), ze = O("<div><!> <!> <!> <!> <!> <!> <p class=\"sr-only pie-blank-hint svelte-6wlbb4\"> </p> <fieldset class=\"border-0 p-0 m-0 pie-choices-fieldset svelte-6wlbb4\"><legend class=\"sr-only pie-choices-legend svelte-6wlbb4\"> </legend> <div style=\"gap:var(--mpb-choice-group-gap, 0.5rem);\" role=\"radiogroup\" tabindex=\"-1\"></div></fieldset></div>"), Be = {
710
724
  hash: "svelte-6wlbb4",
711
725
  code: ".sr-only.svelte-6wlbb4 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}.mc-populated-blank-root.svelte-6wlbb4 {--mpb-focus-ring: var(\n --pie-focus-outline,\n var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565c0))\n );}.mc-populated-blank-root.svelte-6wlbb4 .prose {max-width:none;}.pie-toggle-correct-answer.svelte-6wlbb4 {width:100%;cursor:pointer;border:0;background:transparent;padding:0;display:flex;justify-content:center;text-align:center;color:var(--pie-text, black);}.pie-correct-answer-toggle-row.svelte-6wlbb4 {width:100%;display:flex;justify-content:flex-end;}.pie-correct-answer-toggle-content.svelte-6wlbb4 {display:flex;margin:0 auto;align-items:center;}.pie-correct-answer-toggle-icon-holder.svelte-6wlbb4 {width:25px;margin-right:5px;display:inline-flex;align-items:center;justify-content:center;}.pie-correct-answer-toggle-svg.svelte-6wlbb4 {width:25px;height:25px;}.pie-correct-answer-toggle-label.svelte-6wlbb4 {width:fit-content;min-width:140px;align-self:center;vertical-align:middle;font-weight:400;user-select:none;}.pie-toggle-correct-answer.svelte-6wlbb4:hover .pie-correct-answer-toggle-label:where(.svelte-6wlbb4),\n .pie-toggle-correct-answer.svelte-6wlbb4:focus-visible .pie-correct-answer-toggle-label:where(.svelte-6wlbb4) {text-decoration:underline;}.template-line.svelte-6wlbb4 {white-space:pre-wrap;}.template-line.svelte-6wlbb4 p {margin:0;display:inline;}.layout-audio_blank_only.svelte-6wlbb4 .pie-audio-container,\n .layout-stimulus_image_blank.svelte-6wlbb4 .pie-audio-container {display:flex;width:min(100%, var(--mpb-audio-instructions-max-width, 875px));margin-left:auto;margin-right:auto;justify-content:flex-end;}.layout-audio_blank_only.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4),\n .layout-stimulus_image_blank.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {text-align:center;margin:var(--mpb-audio-blank-template-margin-top, 0.8rem) 0\n var(--mpb-audio-blank-template-margin-bottom, 1.8rem);}.layout-audio_blank_only.svelte-6wlbb4 fieldset:where(.svelte-6wlbb4) {display:flex;justify-content:center;}.layout-audio_blank_only.svelte-6wlbb4 .pie-blank-slot,\n .layout-stimulus_image_blank.svelte-6wlbb4 .pie-blank-slot {width:var(--mpb-blank-wide-width, 10rem);border-bottom-width:var(--mpb-blank-underline-wide-width, 6px);min-height:160px;padding-bottom:4px;}.layout-stimulus_image_blank.svelte-6wlbb4 {display:grid;grid-template-columns:minmax(var(--mpb-stimulus-min-column, 210px), 1fr) auto;grid-template-areas:'sentence audio'\n '. template'\n 'choices choices';column-gap:var(--mpb-stimulus-grid-column-gap, 2rem);row-gap:var(--mpb-stimulus-grid-row-gap, 0.7rem);align-items:start;}.layout-stimulus_image_blank.svelte-6wlbb4 .pie-audio-container {grid-area:audio;margin:0;}.layout-stimulus_image_blank.svelte-6wlbb4 .sentence-line:where(.svelte-6wlbb4) {grid-area:sentence;margin:var(--mpb-stimulus-sentence-margin-top, 0.2rem) 0 0;}.layout-stimulus_image_blank.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {grid-area:template;margin:0;text-align:center;justify-self:center;}.layout-stimulus_image_blank.svelte-6wlbb4 fieldset:where(.svelte-6wlbb4) {grid-area:choices;margin-top:var(--mpb-stimulus-choices-margin-top, 0.9rem);}.layout-token_sequence.svelte-6wlbb4 {display:grid;grid-template-columns:1fr auto;grid-template-areas:'audio audio'\n 'template template'\n 'choices choices';column-gap:var(--mpb-token-grid-column-gap, 1.5rem);row-gap:var(--mpb-token-grid-row-gap, 0.8rem);align-items:start;}.layout-token_sequence.svelte-6wlbb4 .pie-audio-container {grid-area:audio;margin:0;justify-self:end;}.layout-token_sequence.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {grid-area:template;margin:var(--mpb-token-template-margin-top, 0.6rem) 0 0;justify-self:center;text-align:center;}.layout-token_sequence.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) span + span {margin-left:var(--mpb-token-inline-token-gap, 0.35rem);}.layout-token_sequence.svelte-6wlbb4 .pie-blank-slot {width:var(--mpb-blank-standalone-width, 7rem);border-bottom-width:var(--mpb-blank-underline-wide-width, 4px);margin-left:var(--mpb-token-inline-token-gap, 0.35rem);}.layout-token_sequence.svelte-6wlbb4 fieldset:where(.svelte-6wlbb4) {grid-area:choices;margin-top:var(--mpb-token-choices-margin-top, 0.2rem);}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 {display:grid;grid-template-columns:minmax(var(--mpb-text-min-column, 260px), 1fr) auto;grid-template-areas:'template audio'\n 'choices choices';column-gap:var(--mpb-inline-grid-column-gap, 1.5rem);row-gap:var(--mpb-inline-grid-row-gap, 0.65rem);align-items:start;}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .pie-audio-container {grid-area:audio;margin:0;justify-self:end;}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {grid-area:template;margin:var(--mpb-inline-template-margin-top, 0.45rem) 0 0;text-align:center;justify-self:center;}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 fieldset:where(.svelte-6wlbb4) {grid-area:choices;margin-top:var(--mpb-inline-choices-margin-top, 0.25rem);}\n\n /* Match Learnosity responsive behavior for CQT audio-blank layouts:\n at smaller widths, audio control shifts left and answer tiles stack. */\n @media (max-width: 760px) {.layout-audio_blank_only.svelte-6wlbb4 .pie-audio-container,\n .layout-stimulus_image_blank.svelte-6wlbb4 .pie-audio-container,\n .layout-token_sequence.svelte-6wlbb4 .pie-audio-container,\n .layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .pie-audio-container {width:100%;margin-left:0;margin-right:0;justify-content:flex-start;justify-self:start;}.layout-audio_blank_only.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4),\n .layout-token_sequence.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4),\n .layout-stimulus_image_blank.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4),\n .layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4) {flex-direction:column;align-items:flex-start;justify-content:flex-start;}.layout-audio_blank_only.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4),\n .layout-token_sequence.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4),\n .layout-stimulus_image_blank.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4),\n .layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4) {width:min(100%, var(--mpb-narrow-choice-max-width, 230px));align-items:flex-start;}\n }"
712
726
  };
713
- function ze(s, u) {
714
- c(u, !0), ee(s, Re);
727
+ function Ve(s, u) {
728
+ c(u, !0), ee(s, Be);
715
729
  let d = {
716
730
  answerChoices: "Answer choices",
717
731
  selectedAnswerInSentence: "Selected answer in sentence",
@@ -720,59 +734,59 @@ function ze(s, u) {
720
734
  hideCorrectAnswer: "Hide correct answer",
721
735
  clickToEnableAutoplay: "Click to enable audio autoplay",
722
736
  audioResourceUnavailable: "Audio is enabled but no playable audio URL is configured."
723
- }, v = C(u, "model", 7), w = C(u, "session", 7), E = e(""), D = e(null), O = e(null), j = e(null), M = `mc-populated-blank-${Math.random().toString(36).slice(2, 10)}`, N = a(() => (v()?.mode || v()?.env?.mode || "").toString()), P = a(() => A(N) === "evaluate"), F = a(() => v()?.correctness), te = a(() => typeof v()?.responseCorrect == "boolean" ? v().responseCorrect : A(F) === "correct"), ne = a(() => A(F) === "correct"), re = a(() => A(F) === "incorrect"), R = e(!1), ie = a(() => A(P) && !A(te) && !!v()?.correctChoiceId), z = a(() => v()?.layoutProfile || ""), B = a(() => me({
737
+ }, v = C(u, "model", 7), w = C(u, "session", 7), E = e(""), D = e(null), O = e(null), j = e(null), M = `mc-populated-blank-${Math.random().toString(36).slice(2, 10)}`, N = a(() => (v()?.mode || v()?.env?.mode || "").toString()), P = a(() => A(N) === "evaluate"), F = a(() => v()?.correctness), L = a(() => typeof v()?.responseCorrect == "boolean" ? v().responseCorrect : A(F) === "correct"), R = a(() => A(F) === "correct"), te = a(() => A(F) === "incorrect"), B = e(!1), ne = a(() => A(P) && !A(L) && !!v()?.correctChoiceId), V = a(() => v()?.layoutProfile || ""), H = a(() => he({
724
738
  interactionMode: v()?.interactionMode,
725
739
  template: v()?.template,
726
740
  choiceLayout: v()?.choiceLayout,
727
- layoutProfile: A(z),
741
+ layoutProfile: A(V),
728
742
  hasAudio: v()?.hasAudio,
729
743
  useFeatureButtonAudio: v()?.useFeatureButtonAudio
730
- })), H = a(() => A(B).isAudioOnlyMode), U = a(() => A(B).isBlankOnlyTemplate), W = a(() => A(B).isHorizontalChoices), ae = a(() => A(B).hasInlineSentenceAudioLayout), oe = a(() => A(B).useFeatureButtonAudio), G = a(() => ge({
731
- layoutProfile: A(z),
732
- isBlankOnlyTemplate: A(U),
744
+ })), re = a(() => A(H).isAudioOnlyMode), ie = a(() => A(H).isBlankOnlyTemplate), W = a(() => A(H).isHorizontalChoices), ae = a(() => A(H).hasInlineSentenceAudioLayout), oe = a(() => A(H).useFeatureButtonAudio), G = a(() => ve({
745
+ layoutProfile: A(V),
746
+ isBlankOnlyTemplate: A(ie),
733
747
  configuredLimits: v()?.layoutLimits,
734
748
  customProfilePresets: v()?.layoutProfilePresets
735
- })), K = a(() => Array.isArray(v()?.choices) ? v().choices : []), q = a(() => v()?.choiceMode || "text"), J = a(() => w()?.choiceId || A(E) || ""), ce = a(() => `${M}-choice-group-${v()?.id || "1"}`), Y = a(() => ye({
749
+ })), K = a(() => Array.isArray(v()?.choices) ? v().choices : []), q = a(() => v()?.choiceMode || "text"), J = a(() => w()?.choiceId || A(E) || ""), ce = a(() => `${M}-choice-group-${v()?.id || "1"}`), Y = a(() => xe({
736
750
  selectedId: A(J),
737
751
  isEvaluateMode: A(P),
738
- showCorrectAnswer: A(R),
752
+ showCorrectAnswer: A(B),
739
753
  alwaysShowCorrect: !!v()?.alwaysShowCorrect,
740
754
  correctChoiceId: String(v()?.correctChoiceId || "")
741
- })), X = a(() => A(K).find((e) => e.id === A(Y))), le = a(() => String(A(X)?.labelHtml || "")), fe = a(() => be({
755
+ })), X = a(() => A(K).find((e) => e.id === A(Y))), le = a(() => String(A(X)?.labelHtml || "")), ue = a(() => Se({
742
756
  isEvaluateMode: A(P),
743
- showCorrectAnswer: A(R),
744
- isCorrect: A(ne),
745
- isIncorrect: A(re),
757
+ showCorrectAnswer: A(B),
758
+ isCorrect: A(R),
759
+ isIncorrect: A(te),
746
760
  selectedId: A(J)
747
- })), pe = a(() => de({
761
+ })), de = a(() => pe({
748
762
  isEvaluateMode: A(P),
749
763
  correctChoiceId: String(v()?.correctChoiceId || ""),
750
764
  selectedId: String(A(J) || ""),
751
- showCorrectAnswer: A(R)
765
+ showCorrectAnswer: A(B)
752
766
  })), Z = a(() => ({
753
767
  ...d,
754
768
  ...v()?.uiText || {}
755
- })), he = a(() => `${M}-prompt`), _e = a(() => `${M}-choices-legend`), Se = a(() => `${M}-result`), Ce = a(() => `${M}-blank-hint`), we = a(() => xe({
769
+ })), me = a(() => `${M}-prompt`), ge = a(() => `${M}-choices-legend`), _e = a(() => `${M}-result`), ye = a(() => `${M}-blank-hint`), we = a(() => Ce({
756
770
  prompt: v()?.prompt || "",
757
771
  legendMaxChars: A(G).legendMaxChars,
758
772
  answerChoicesLabel: A(Z).answerChoices
759
- })), De = a(() => v()?.prompt ? A(he) : void 0), Oe = a(() => v()?.prompt ? void 0 : String(v()?.choiceGroupLabel || "").trim() || A(we)), ze = a(() => v()?.prompt ? A(he) : void 0), Be = a(() => {
773
+ })), Te = a(() => v()?.prompt ? A(me) : void 0), Ee = a(() => v()?.prompt ? void 0 : String(v()?.choiceGroupLabel || "").trim() || A(we)), ke = a(() => v()?.prompt ? A(me) : void 0), Ae = a(() => {
760
774
  let e = v()?.locale || "";
761
775
  return e ? e.slice(0, 2) : "en";
762
- }), Ve = a(() => Te(v()?.customType)), He = a(() => Ee(v()?.customType)), Ue = a(() => {
776
+ }), Ve = a(() => De(v()?.customType)), He = a(() => Oe(v()?.customType)), Ue = a(() => {
763
777
  let e = v()?.template || "", t = e.indexOf("{{blank}}");
764
778
  if (t < 0) return {
765
779
  before: e,
766
780
  after: ""
767
781
  };
768
782
  let n = e.slice(0, t), r = e.slice(t + 9);
769
- return A(z) === "inline_sentence" && (n = `${n.replace(/\s+$/, "")} `, r = ` ${r.replace(/^\s+/, "")}`), {
783
+ return A(V) === "inline_sentence" && (n = `${n.replace(/\s+$/, "")} `, r = ` ${r.replace(/^\s+/, "")}`), {
770
784
  before: n,
771
785
  after: r
772
786
  };
773
787
  });
774
788
  function We(e, t) {
775
- L({
789
+ z({
776
790
  sourceEl: t,
777
791
  fallbackSelector: "mc-populated-blank",
778
792
  component: "mc-populated-blank",
@@ -792,10 +806,10 @@ function ze(s, u) {
792
806
  }, t);
793
807
  }
794
808
  function Ke() {
795
- A(ie) && b(R, !A(R));
809
+ A(ne) && b(B, !A(B));
796
810
  }
797
811
  t(() => {
798
- (!A(P) || A(te)) && b(R, !1);
812
+ (!A(P) || A(L)) && b(B, !1);
799
813
  });
800
814
  function qe(e) {
801
815
  if (v()?.disabled) return;
@@ -814,7 +828,7 @@ function ze(s, u) {
814
828
  let a = r[i];
815
829
  a.checked = !0, a.dispatchEvent(new Event("change", { bubbles: !0 })), a.focus();
816
830
  }
817
- let Je = a(() => ve({
831
+ let Je = a(() => be({
818
832
  locale: v()?.locale,
819
833
  audioButtonSkin: v()?.audioButtonSkin,
820
834
  audioButtonSkinsByLocale: v()?.audioButtonSkinsByLocale
@@ -840,7 +854,7 @@ function ze(s, u) {
840
854
  e.removeEventListener("change", t), e.removeEventListener("keydown", n);
841
855
  };
842
856
  }), t(() => {
843
- ke(A(Ve));
857
+ je(A(Ve));
844
858
  });
845
859
  var Ze = {
846
860
  get model() {
@@ -855,34 +869,34 @@ function ze(s, u) {
855
869
  set session(e) {
856
870
  w(e), y();
857
871
  }
858
- }, Q = Le(), Qe = k(Q), $e = (e) => {
859
- var t = Ae();
860
- m(t, () => v().prompt, !0), i(t), l(() => f(t, "id", A(he))), g(e, t);
872
+ }, Q = ze(), Qe = k(Q), $e = (e) => {
873
+ var t = Me();
874
+ m(t, () => v().prompt, !0), i(t), l(() => f(t, "id", A(me))), g(e, t);
861
875
  };
862
876
  S(Qe, (e) => {
863
877
  v()?.prompt && e($e);
864
878
  });
865
879
  var et = n(Qe, 2), tt = (e) => {
866
- var t = Ne(), a = k(t), o = k(a), s = k(o), c = k(s), u = (e) => {
867
- g(e, je());
880
+ var t = Fe(), a = k(t), o = k(a), s = k(o), c = k(s), u = (e) => {
881
+ g(e, Ne());
868
882
  }, d = (e) => {
869
- g(e, Me());
883
+ g(e, Pe());
870
884
  };
871
885
  S(c, (e) => {
872
- A(R) ? e(u) : e(d, -1);
886
+ A(B) ? e(u) : e(d, -1);
873
887
  }), i(s);
874
888
  var p = r(n(s, 2), !0);
875
889
  i(o), i(a), T(a, (e) => b(D, e), () => A(D)), i(t), l(() => {
876
- f(a, "aria-pressed", A(R)), _(p, A(R) ? A(Z).hideCorrectAnswer : A(Z).showCorrectAnswer);
890
+ f(a, "aria-pressed", A(B)), _(p, A(B) ? A(Z).hideCorrectAnswer : A(Z).showCorrectAnswer);
877
891
  }), g(e, t);
878
892
  };
879
893
  S(et, (e) => {
880
- A(ie) && e(tt);
894
+ A(ne) && e(tt);
881
895
  });
882
896
  var nt = n(et, 2);
883
897
  {
884
898
  let e = a(() => !!v()?.hasAudio), t = a(() => v()?.audioUrl), n = a(() => !!v()?.autoplayAudioEnabled), r = a(() => v()?.locale);
885
- V(nt, {
899
+ U(nt, {
886
900
  get hasAudio() {
887
901
  return A(e);
888
902
  },
@@ -909,14 +923,14 @@ function ze(s, u) {
909
923
  });
910
924
  }
911
925
  var rt = n(nt, 2), it = (e) => {
912
- var t = Pe();
913
- m(t, () => v().sentenceHtml, !0), i(t), l(() => f(t, "aria-describedby", A(ze))), g(e, t);
926
+ var t = Ie();
927
+ m(t, () => v().sentenceHtml, !0), i(t), l(() => f(t, "aria-describedby", A(ke))), g(e, t);
914
928
  };
915
929
  S(rt, (e) => {
916
930
  v()?.sentenceHtml && e(it);
917
931
  });
918
932
  var at = n(rt, 2), ot = (e) => {
919
- var t = Fe(), r = k(t);
933
+ var t = Le(), r = k(t);
920
934
  m(r, () => A(Ue).before);
921
935
  var a = n(r);
922
936
  se(a, {
@@ -930,7 +944,7 @@ function ze(s, u) {
930
944
  return A(le);
931
945
  },
932
946
  get isStandalone() {
933
- return A(U);
947
+ return A(ie);
934
948
  },
935
949
  get blankWidth() {
936
950
  return A(G).blankWidth;
@@ -941,25 +955,25 @@ function ze(s, u) {
941
955
  get ariaLabel() {
942
956
  return A(Z).selectedAnswerInSentence;
943
957
  }
944
- }), m(n(a), () => A(Ue).after), i(t), l(() => f(t, "aria-describedby", A(ze))), g(e, t);
958
+ }), m(n(a), () => A(Ue).after), i(t), l(() => f(t, "aria-describedby", A(ke))), g(e, t);
945
959
  };
946
960
  S(at, (e) => {
947
- A(H) || e(ot);
961
+ A(re) || e(ot);
948
962
  });
949
963
  var st = n(at, 2), ct = (e) => {
950
- var t = Ie(), n = r(t, !0);
964
+ var t = Re(), n = r(t, !0);
951
965
  l(() => {
952
- f(t, "id", A(Se)), _(n, A(fe));
966
+ f(t, "id", A(_e)), _(n, A(ue));
953
967
  }), g(e, t);
954
968
  };
955
969
  S(st, (e) => {
956
- A(fe) && e(ct);
970
+ A(ue) && e(ct);
957
971
  });
958
972
  var lt = n(st, 2), ut = r(lt, !0), dt = n(lt, 2), ft = k(dt), pt = r(ft, !0), $ = n(ft, 2);
959
973
  return h($, 21, () => A(K), (e) => e.id, (e, t) => {
960
974
  {
961
- let n = a(() => A(Y) === A(t).id), r = a(() => !!v()?.disabled), i = a(() => A(pe).get(A(t).id));
962
- ue(e, {
975
+ let n = a(() => A(Y) === A(t).id), r = a(() => !!v()?.disabled), i = a(() => A(de).get(A(t).id));
976
+ fe(e, {
963
977
  get choice() {
964
978
  return A(t);
965
979
  },
@@ -990,21 +1004,22 @@ function ze(s, u) {
990
1004
  });
991
1005
  }
992
1006
  }), i($), T($, (e) => b(O, e), () => A(O)), i(dt), i(Q), T(Q, (e) => b(j, e), () => A(j)), l((e) => {
993
- x(Q, 1, `p-4 mc-populated-blank-root pie-element pie-element-mc-populated-blank pie-delivery-root layout-${A(z)} ${A(He)} ${A(ae) ? "has-inline-audio" : ""}`, "svelte-6wlbb4"), f(Q, "lang", A(Be)), p(Q, A(G).rootStyle), f(lt, "id", A(Ce)), _(ut, A(Z).blankPreSelectionHint), dt.disabled = v()?.disabled, f(ft, "id", A(_e)), _(pt, A(we)), x($, 1, `pie-choices ${A(W) ? "flex flex-row flex-wrap items-start justify-center" : "flex flex-col"}`, "svelte-6wlbb4"), f($, "aria-labelledby", A(De)), f($, "aria-label", A(Oe)), f($, "aria-describedby", e);
994
- }, [() => [A(Ce), A(fe) ? A(Se) : void 0].filter(Boolean).join(" ")]), g(s, Q), o(Ze);
1007
+ x(Q, 1, `p-4 mc-populated-blank-root pie-element pie-element-mc-populated-blank pie-delivery-root layout-${A(V)} ${A(He)} ${A(ae) ? "has-inline-audio" : ""}`, "svelte-6wlbb4"), f(Q, "lang", A(Ae)), p(Q, A(G).rootStyle), f(lt, "id", A(ye)), _(ut, A(Z).blankPreSelectionHint), dt.disabled = v()?.disabled, f(ft, "id", A(ge)), _(pt, A(we)), x($, 1, `pie-choices ${A(W) ? "flex flex-row flex-wrap items-start justify-center" : "flex flex-col"}`, "svelte-6wlbb4"), f($, "aria-labelledby", A(Te)), f($, "aria-label", A(Ee)), f($, "aria-describedby", e);
1008
+ }, [() => [A(ye), A(ue) ? A(_e) : void 0].filter(Boolean).join(" ")]), g(s, Q), o(Ze);
995
1009
  }
996
- D(ze, {
1010
+ D(Ve, {
997
1011
  model: { type: "Object" },
998
1012
  session: { type: "Object" },
999
1013
  options: { type: "Object" }
1000
1014
  }, [], []);
1001
1015
  //#endregion
1002
1016
  //#region src/delivery/index.ts
1003
- function Be(e, t, n = !1) {
1017
+ function He(e, t, n = !1) {
1004
1018
  return !(!t?.choiceId || e?.autoplayAudioEnabled && e?.completeAudioEnabled && e?.hasAudio && !n);
1005
1019
  }
1006
- var Ve = ze.element, He = class extends Ve {
1020
+ var Ue = Ve.element, We = class extends Ue {
1007
1021
  _internalSession = null;
1022
+ _playerSession = null;
1008
1023
  _model = null;
1009
1024
  _options = null;
1010
1025
  audioComplete = !1;
@@ -1021,7 +1036,7 @@ var Ve = ze.element, He = class extends Ve {
1021
1036
  return this._model;
1022
1037
  }
1023
1038
  set session(e) {
1024
- this._internalSession = e, super.session = e, this._dispatchSessionChanged();
1039
+ this._playerSession = e, this._internalSession = e, super.session = e, this._dispatchSessionChanged();
1025
1040
  }
1026
1041
  get session() {
1027
1042
  return this._internalSession;
@@ -1033,26 +1048,29 @@ var Ve = ze.element, He = class extends Ve {
1033
1048
  return this._options;
1034
1049
  }
1035
1050
  onSessionChange = (e) => {
1036
- this._internalSession = e, super.session = e, this._dispatchSessionChanged();
1051
+ this._writeSession(e), super.session = e, this._dispatchSessionChanged();
1037
1052
  };
1038
1053
  onAudioStarted = () => {
1039
- this._internalSession = {
1054
+ this._writeSession({
1040
1055
  ...this._internalSession || {},
1041
1056
  audioStartTime: Date.now()
1042
- };
1057
+ });
1043
1058
  };
1044
1059
  onAudioEnded = () => {
1045
- this.audioComplete = !0, this._internalSession = {
1060
+ this.audioComplete = !0, this._writeSession({
1046
1061
  ...this._internalSession || {},
1047
1062
  audioEndTime: Date.now()
1048
- }, this._dispatchSessionChanged();
1063
+ }), this._dispatchSessionChanged();
1064
+ };
1065
+ _writeSession = (e) => {
1066
+ R(this._playerSession, e), this._internalSession = e;
1049
1067
  };
1050
- _isComplete = () => Be(this._model, this._internalSession, this.audioComplete);
1068
+ _isComplete = () => He(this._model, this._internalSession, this.audioComplete);
1051
1069
  connectedCallback() {
1052
1070
  super.connectedCallback(), this.onSessionChange = this.onSessionChange, this.onAudioStarted = this.onAudioStarted, this.onAudioEnded = this.onAudioEnded;
1053
1071
  }
1054
1072
  };
1055
1073
  //#endregion
1056
- export { He as default };
1074
+ export { We as default };
1057
1075
 
1058
1076
  //# sourceMappingURL=index.js.map