@pie-element/mc-populated-blank 0.3.0-next.26 → 0.3.0-next.29

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.
@@ -26,28 +26,19 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
26
26
  Every selector starts at .mc-populated-blank-root carrying any r1 variant class,
27
27
  so it cannot match outside this element. :where() keeps the attribute match out
28
28
  of the specificity, so each per-variant file still overrides a base rule with
29
- the selector shapes it already uses.
30
- Source: web-ItemBankViewer/learnosity/templates/Renaissance/r1.scss */
29
+ the selector shapes it already uses. Comments cite the CQT template's r1.scss. */
31
30
 
32
31
  /* r1.scss: Starial font throughout.
33
- font-size 14px mirrors the Learnosity host root (.lrn_widget) which sets the
32
+ font-size 14px mirrors the CQT host root, which sets the
34
33
  base for all em-scaled rules in r1.scss (e.g. .rli-r1-content-element { 1.9em })
35
34
  and any em-based author content (e.g. <span style="font-size:1.8em">). Without
36
35
  this base PIE inherits the 16px browser default and renders ~14% larger than
37
- the LSY reference. See CONTOOL-2567. */
36
+ the CQT reference. See CONTOOL-2567. */
38
37
  .mc-populated-blank-root:where([class*="variant-sel-r1-"]) {
39
38
  font-family: Starial, Arial, sans-serif;
40
39
  font-size: 14px;
41
40
  }
42
41
 
43
- /* r1.scss: .rli-r1-audio-transcript { font-family:Roboto; font-size:16px } */
44
- .mc-populated-blank-root:where([class*="variant-sel-r1-"]) .pie-audio-transcript {
45
- font-family: Roboto, Arial, sans-serif;
46
- font-size: 16px;
47
- font-style: normal;
48
- font-weight: 400;
49
- }
50
-
51
42
  /* r1.scss: .rli-r1-content-element { font-size: 1.9em } wraps all stem tokens.
52
43
  Makes inline font-size spans in the template multiply on top of this base. */
53
44
  .mc-populated-blank-root:where([class*="variant-sel-r1-"]) .pie-template-line {
@@ -58,9 +49,9 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
58
49
  r1.scss: .rli-r1-content-element { margin-right:2px; margin-left:2px } — 4px total gap.
59
50
  Apply the per-element margin to both classless tokens and the blank slot
60
51
  (which is the cloze equivalent) so the gap stacks with whitespace text-nodes
61
- between flex items the same way LSY does. Earlier this used column-gap:4px,
52
+ between flex items the same way the CQT does. Earlier this used column-gap:4px,
62
53
  but flex column-gap accumulates with the cloze margin and the implicit
63
- whitespace, producing a wider gap than LSY shows. See CONTOOL-2569. */
54
+ whitespace, producing a wider gap than the CQT shows. See CONTOOL-2569. */
64
55
  .mc-populated-blank-root:where([class*="variant-sel-r1-"]) .pie-template-line {
65
56
  display: flex;
66
57
  flex-direction: row;
@@ -76,12 +67,14 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
76
67
  }
77
68
 
78
69
  /* r1.scss: .rli-r1-content-element { min-width:150px; max-width:150px; min-height:150px;
79
- line-height:89px; margin-right:2px; margin-left:2px } — wraps every stem token
80
- (blank slot and adjacent inline spans) in LSY, giving each a 150px box with a
81
- 2px per-side margin. Applies to the token layouts, the same set that gets the
82
- feature button and the wide underline, so trailing tokens in audio_blank_only
83
- (gplusggg) match the blank's height the way LSY does. Stems on other layouts are
84
- prose, which the box would stack a word or two per line. */
70
+ line-height:89px; margin-right:2px; margin-left:2px } — wraps every stem token in
71
+ the CQT, giving each a 150px box with a 2px per-side margin. Applies to the token
72
+ layouts, the same set that gets the feature button and the wide underline, so
73
+ trailing tokens in audio_blank_only (gplusggg) match the blank's height the way
74
+ the CQT does. Stems on other layouts are prose, which the box would stack a word or
75
+ two per line. Spans inside the blank are the answer's own markup, not stem tokens.
76
+ The margin outranks token_sequence's span + span gap, so tokens sit 4px apart,
77
+ as in the CQT (CONTOOL-2569). */
85
78
  .mc-populated-blank-root:where(
86
79
  [class*="variant-sel-r1-"]:is(
87
80
  .layout-audio_blank_only,
@@ -90,7 +83,7 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
90
83
  )
91
84
  )
92
85
  .pie-template-line
93
- span:not([class]) {
86
+ span:not([class]):not(.pie-blank-slot *) {
94
87
  min-width: 150px;
95
88
  max-width: 150px;
96
89
  min-height: 150px;
@@ -99,6 +92,37 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
99
92
  margin-right: 2px;
100
93
  }
101
94
 
95
+ /* r1.scss: the content-element's wrapping flex line packs to the bottom of its box
96
+ (align-content:flex-end), so a token's 89px line sits on the box's bottom edge
97
+ whatever its font size; .rli-r1-stem { align-items:start } top-aligns the row.
98
+ Every item in it has a fixed height (150px tokens and images, the 160px cloze),
99
+ so the underline lands 4px under the tokens' bottom edge. */
100
+ .mc-populated-blank-root:where(
101
+ [class*="variant-sel-r1-"]:is(.layout-audio_blank_only, .layout-token_sequence)
102
+ )
103
+ .pie-template-line
104
+ span:not([class]):not(.pie-blank-slot *) {
105
+ display: flex;
106
+ flex-direction: row;
107
+ flex-wrap: wrap;
108
+ align-items: baseline;
109
+ align-content: flex-end;
110
+ justify-content: center;
111
+ margin-bottom: 8px;
112
+ }
113
+
114
+ .mc-populated-blank-root:where(
115
+ [class*="variant-sel-r1-"]:is(.layout-audio_blank_only, .layout-token_sequence)
116
+ )
117
+ .pie-template-line,
118
+ .mc-populated-blank-root:where(
119
+ [class*="variant-sel-r1-"]:is(.layout-audio_blank_only, .layout-token_sequence)
120
+ )
121
+ .pie-template-line
122
+ p {
123
+ align-items: flex-start;
124
+ }
125
+
102
126
  /* .pie-template-line's align-items:baseline (above) computes a shared baseline
103
127
  across all its flex items. .pie-blank-slot has no baseline-participating child
104
128
  of its own (.cloze-marker centers internally, align-items:center) — so it
@@ -114,39 +138,45 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
114
138
  align-self: flex-end;
115
139
  }
116
140
 
117
- /* In token_sequence layouts the blank itself is also a content-element box (no
118
- surrounding .rli-r1-cloze container at 160px). audio_blank_only / stimulus_image_blank
119
- keep their own 160px min-height set on the blank slot in McPopulatedBlank.svelte to
120
- mirror LSY's .rli-r1-cloze height. The 2px per-side margin matches LSY's
121
- .rli-r1-content-element pattern.
122
- .pie-blank-slot is box-sizing:border-box (McPopulatedBlank.svelte sets it for
123
- the whole element) with a permanent 6px border-bottom (the underline) —
124
- min-height:150px therefore only leaves 144px for content,
125
- so an empty blank (content ~0px, clamped to the 150px floor) and a blank
126
- showing a 150px choice image (150 + 6 border = 156px, exceeding the floor)
127
- render at two different total heights. Since .pie-blank-slot is bottom-anchored
128
- in its row (align-self:flex-end above), that 6px height difference shows up as
129
- a visible shift of the blank/image every time a choice is selected or cleared.
130
- min-height:156px keeps the total box height constant regardless of content, so
131
- the 150px is fully available to the image/text and the border no longer
132
- competes with it. See CONTOOL-3159. */
141
+ /* r1.scss's .rli-r1-cloze and question.css's .rli-s3-cloze have no inline padding, so the
142
+ 150px content-element spans the blank. ClozeMarker.svelte's 0.5rem would narrow an
143
+ answer image to 134px or 144px. */
144
+ .mc-populated-blank-root:where([class*="variant-sel-r1-"]) .pie-template-line .pie-blank-slot {
145
+ padding-inline: 0;
146
+ }
147
+
148
+ /* r1.scss: .rli-r1-cloze { height:160px; padding-bottom:4px; border-bottom:6px solid }
149
+ — the blank in the token layouts is the CQT's cloze box, top-aligned with the stem
150
+ tokens (align-self overrides the flex-end above). A fixed height rather than a
151
+ min-height keeps the empty and the filled blank at one geometry: the 150px image
152
+ or content box below fits its 150px content area exactly, and the underline
153
+ never moves on selection (CONTOOL-3159). .pie-blank-slot is border-box, as the CQT's
154
+ cloze is. McPopulatedBlank.svelte gives audio_blank_only the padding and the
155
+ 6px underline; token_sequence takes both here. The 2px per-side margin matches
156
+ the CQT's .rli-r1-content-element rhythm (CONTOOL-2569). */
157
+ .mc-populated-blank-root:where([class*="variant-sel-r1-"]):is(
158
+ .layout-audio_blank_only,
159
+ .layout-token_sequence
160
+ )
161
+ .pie-template-line
162
+ .pie-blank-slot {
163
+ align-self: flex-start;
164
+ height: 160px;
165
+ padding-bottom: 4px;
166
+ margin-left: 2px;
167
+ margin-right: 2px;
168
+ }
169
+
133
170
  .mc-populated-blank-root:where([class*="variant-sel-r1-"]).layout-token_sequence
134
171
  .pie-template-line
135
172
  .pie-blank-slot {
136
173
  min-width: 150px;
137
174
  max-width: 150px;
138
- min-height: 156px;
139
175
  line-height: 89px;
140
- margin-left: 2px;
141
- margin-right: 2px;
142
176
  }
143
177
 
144
- /* audio_blank_only / stimulus_image_blank keep the 160px wide blank slot, but
145
- still need the 2px per-side margin so the gap to the trailing token mirrors
146
- LSY's .rli-r1-content-element rhythm. See CONTOOL-2569. */
147
- .mc-populated-blank-root:where([class*="variant-sel-r1-"]).layout-audio_blank_only
148
- .pie-template-line
149
- .pie-blank-slot,
178
+ /* stimulus_image_blank keeps the 160px min-height blank slot McPopulatedBlank.svelte
179
+ sets, with the same 2px per-side margin. See CONTOOL-2569. */
150
180
  .mc-populated-blank-root:where([class*="variant-sel-r1-"]).layout-stimulus_image_blank
151
181
  .pie-template-line
152
182
  .pie-blank-slot {
@@ -154,29 +184,40 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
154
184
  margin-right: 2px;
155
185
  }
156
186
 
157
- /* The \`.pie-template-line span:not([class])\` rule above has no depth limit, so it
158
- also matches the unclassed answer <span> ClozeMarker.svelte renders inside
159
- .pie-blank-value once a choice is selected (e.g. author font-size overrides like
160
- <span style="font-size:3em">). For token_sequence that coincides with the blank
161
- slot's own 150px/89px box above, so outer and inner agree. audio_blank_only /
162
- stimulus_image_blank instead keep .pie-blank-slot at LSY's separate, taller
163
- .rli-r1-cloze box (160px) — forcing the answer span into the stem token's
164
- 150px/89px box there is wrong: a plain (non-flex) span whose min-height exceeds
165
- its line-height renders that line top-anchored, pinning the answer text to the
166
- top of the blank with the rest of the box empty beneath it, instead of centered
167
- on the underline the way LSY renders it. See CONTOOL-3159. */
168
- .mc-populated-blank-root:where([class*="variant-sel-r1-"]).layout-audio_blank_only
169
- .pie-blank-value
170
- span:not([class]),
187
+ /* cloze.js: the cloze holds an .rli-r1-content-element around the answer's markup,
188
+ so the answer's line packs to the bottom of a 150px box the way a stem token's
189
+ does. The box's 8px bottom margin, centred in the cloze's 150px content area,
190
+ lifts it 4px, as it does in the CQT. */
191
+ .mc-populated-blank-root:where([class*="variant-sel-r1-"]):is(
192
+ .layout-audio_blank_only,
193
+ .layout-token_sequence
194
+ ) .pie-blank-value {
195
+ display: flex;
196
+ flex-direction: row;
197
+ flex-wrap: wrap;
198
+ align-items: baseline;
199
+ align-content: flex-end;
200
+ justify-content: center;
201
+ min-height: 150px;
202
+ line-height: 89px;
203
+ margin-bottom: 8px;
204
+ }
205
+
206
+ /* An imageUrl answer is .pie-blank-image directly in the blank, with no
207
+ .pie-blank-value around it; the same margin puts it where a labelHtml image sits. */
208
+ .mc-populated-blank-root:where([class*="variant-sel-r1-"]):is(
209
+ .layout-audio_blank_only,
210
+ .layout-token_sequence
211
+ ) .pie-blank-image {
212
+ margin-bottom: 8px;
213
+ }
214
+
215
+ /* Classless answer spans in the s3 blank keep line-height:normal, which outranks
216
+ sel-r1-s3.css's 1.1. See CONTOOL-3159. */
171
217
  .mc-populated-blank-root:where([class*="variant-sel-r1-"]).layout-stimulus_image_blank
172
218
  .pie-blank-value
173
219
  span:not([class]) {
174
- min-width: 0;
175
- max-width: none;
176
- min-height: 0;
177
220
  line-height: normal;
178
- margin-left: 0;
179
- margin-right: 0;
180
221
  }
181
222
 
182
223
  /* r1.scss: .rli-r1-content-element { font-size:1.9em; line-height:89px } on distractors */
@@ -187,17 +228,42 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
187
228
 
188
229
  /* r1.scss: .rli-r1-content-element { min-width:150px; max-width:150px;
189
230
  min-height:150px } wraps every image (stem token + distractor) and forces
190
- the content box to 150×150. LSY's host also rewrites <img width/height>
231
+ the content box to 150×150. The CQT host also rewrites <img width/height>
191
232
  to 150 server-side. PIE keeps the authored attributes (typically 108×108),
192
- so without an explicit override images render ~28% smaller than LSY.
233
+ so without an explicit override images render ~28% smaller than in the CQT.
193
234
  See CONTOOL-2570. */
194
235
  .mc-populated-blank-root:where([class*="variant-sel-r1-"]) .pie-template-line img,
195
236
  .mc-populated-blank-root:where([class*="variant-sel-r1-"]) .pie-choice-label img {
196
237
  width: 150px;
197
238
  height: 150px;
198
239
  }
199
- `,xo={"sel_r1-_plusggg":{variantId:`sel-r1-plusggg`,variantClass:`variant-sel-r1-plusggg`,sourceUrl:`https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_plusggg/0.0.1/question.css`,cssText:`/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_plusggg/0.0.1/question.css */
200
- /* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */
240
+
241
+ /* r1.scss: .rli-r1-stem and .rli-r1-distractors are flex-direction:column and become
242
+ rows only in its @media (min-width:850px), so below it every stem token, the cloze
243
+ and each distractor stack at the left edge (.rli-r1-stem { align-items:start }).
244
+ Each token's 8px bottom margin spaces the stack. */
245
+ @media not all and (min-width: 850px) {
246
+ .mc-populated-blank-root:where(
247
+ [class*="variant-sel-r1-"]:is(.layout-audio_blank_only, .layout-token_sequence)
248
+ )
249
+ .pie-template-line,
250
+ .mc-populated-blank-root:where(
251
+ [class*="variant-sel-r1-"]:is(.layout-audio_blank_only, .layout-token_sequence)
252
+ )
253
+ .pie-template-line
254
+ p {
255
+ flex-direction: column;
256
+ align-items: flex-start;
257
+ }
258
+
259
+ .mc-populated-blank-root:where([class*="variant-sel-r1-"]) .pie-choices.choices-horizontal {
260
+ flex-direction: column;
261
+ align-items: flex-start;
262
+ justify-content: flex-start;
263
+ --mpb-choice-width-vw: 100vw;
264
+ }
265
+ }
266
+ `,xo={"sel_r1-_plusggg":{variantId:`sel-r1-plusggg`,variantClass:`variant-sel-r1-plusggg`,cssText:`/* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */
201
267
  .mc-populated-blank-root.variant-sel-r1-plusggg {
202
268
  max-width: 875px;
203
269
  margin-inline: auto;
@@ -216,9 +282,7 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
216
282
  .mc-populated-blank-root.variant-sel-r1-plusggg {
217
283
  --mpb-choice-radio-padding: 20px;
218
284
  }
219
- `},"sr-vic":{variantId:`sr-vic`,variantClass:`variant-sr-vic`,sourceUrl:`https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sr-vic/0.0.1/question.css`,cssText:`/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sr-vic/0.0.1/question.css */
220
- /* Reference layout: web-ItemBankViewer/learnosity/templates/Renaissance/vic.scss */
221
- .mc-populated-blank-root.variant-sr-vic {
285
+ `},"sr-vic":{variantId:`sr-vic`,variantClass:`variant-sr-vic`,cssText:`.mc-populated-blank-root.variant-sr-vic {
222
286
  font-family: Starial, Arial, sans-serif;
223
287
  }
224
288
 
@@ -236,7 +300,7 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
236
300
  margin: 0;
237
301
  }
238
302
 
239
- /* LSY .rli-vic-answer has no text-align rule and inherits start; PIE's
303
+ /* The CQT's .rli-vic-answer has no text-align rule and inherits start; PIE's
240
304
  inline_sentence layout sets text-align:center on .template-line via a
241
305
  Svelte-scoped selector with specificity (0,4,0), so we need to match or
242
306
  exceed that. Pin sr-vic back to start so wrapped lines stay left-aligned.
@@ -245,8 +309,16 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
245
309
  text-align: start;
246
310
  }
247
311
 
312
+ /* vic.scss: .rli-vic-cloze { margin-left:6px; margin-right:6px }, with no inline
313
+ padding, where ClozeMarker.svelte gives the blank 0.5rem. See CONTOOL-2572. */
314
+ .mc-populated-blank-root.variant-sr-vic .pie-template-line .pie-blank-slot {
315
+ margin-left: 6px;
316
+ margin-right: 6px;
317
+ padding-inline: 0;
318
+ }
319
+
248
320
  /* vic.scss: .rli-vic-cloze > .rli-vic-content-element { color: #cc3333 }
249
- The red holds AA only on LSY's white page (5.1:1), so the answer carries that
321
+ The red holds AA only on the CQT's white page (5.1:1), so the answer carries that
250
322
  surface: on a dark host it is 3.08:1. light-dark() would miss pie-players'
251
323
  colour schemes, which declare no color-scheme. */
252
324
  .mc-populated-blank-root.variant-sr-vic .pie-blank-value {
@@ -273,6 +345,24 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
273
345
  justify-content: flex-start;
274
346
  }
275
347
 
348
+ /* vic.scss: .rli-vic-distractor { align-items:center; margin-right:10px } and
349
+ .rli-vic-distractor > input { margin:20px }. The radio sits 20px from the row edge and
350
+ from its label, centred on the label, and its margins set the row pitch: the rows and
351
+ the radio and label have no gap between them. */
352
+ .mc-populated-blank-root.variant-sr-vic .pie-choices.choices-vertical {
353
+ --mpb-choice-group-gap: 0;
354
+ }
355
+
356
+ .mc-populated-blank-root.variant-sr-vic .pie-choice:not(.pie-choice-horizontal) {
357
+ --mpb-choice-row-gap: 0;
358
+ align-items: center;
359
+ margin-right: 10px;
360
+ }
361
+
362
+ .mc-populated-blank-root.variant-sr-vic .pie-choice-radio-inline {
363
+ margin: 20px;
364
+ }
365
+
276
366
  /* vic.scss: .rli-vic-distractor:hover { background-color: #F2F2F2 } applied to
277
367
  the full row element, not only the inner label wrapper. */
278
368
  .mc-populated-blank-root.variant-sr-vic .pie-choice:not(.pie-choice-horizontal):hover {
@@ -293,25 +383,16 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
293
383
  background-color: #fcfcd3;
294
384
  color: #000;
295
385
  }
296
- `},sel_vic:{variantId:`sel-vic`,variantClass:`variant-sel-vic`,sourceUrl:`https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_vic/0.0.1/question.css`,cssText:`/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_vic/0.0.1/question.css */
297
- /* Reference layout: web-ItemBankViewer/learnosity/templates/Renaissance/sel_vic/scss/main.scss + vic.scss */
298
- .mc-populated-blank-root.variant-sel-vic {
386
+ `},sel_vic:{variantId:`sel-vic`,variantClass:`variant-sel-vic`,cssText:`.mc-populated-blank-root.variant-sel-vic {
299
387
  font-family: Starial, Arial, sans-serif;
300
- /* LSY chain: .lrn_widget (14px host) → .sel-vic { 1.5em } = 21px.
301
- PIE collapses both LSY layers into this single variant-root selector, so
388
+ /* CQT chain: 14px host → .sel-vic { 1.5em } = 21px.
389
+ PIE collapses both CQT layers into this single variant-root selector, so
302
390
  the resolved value is set directly. See CONTOOL-2567. */
303
391
  font-size: 21px;
304
392
  max-width: 800px;
305
393
  margin-inline: auto;
306
394
  }
307
395
 
308
- .mc-populated-blank-root.variant-sel-vic .pie-audio-transcript {
309
- font-family: Roboto, Arial, sans-serif;
310
- font-size: 16px;
311
- font-style: normal;
312
- font-weight: 400;
313
- }
314
-
315
396
  .mc-populated-blank-root.variant-sel-vic .pie-template-line,
316
397
  .mc-populated-blank-root.variant-sel-vic .pie-blank-value,
317
398
  .mc-populated-blank-root.variant-sel-vic .pie-choice-label {
@@ -337,26 +418,50 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
337
418
  margin: 0;
338
419
  }
339
420
 
340
- /* LSY .rli-vic-answer has no text-align rule and inherits start; PIE's
421
+ /* The CQT's .rli-vic-answer has no text-align rule and inherits start; PIE's
341
422
  inline_sentence layout sets text-align:center on .template-line via a
342
423
  Svelte-scoped selector with specificity (0,4,0), so we need to match or
343
424
  exceed that. Pin sel-vic back to start so wrapped lines stay left-aligned.
344
- See CONTOOL-2573. */
425
+ See CONTOOL-2573.
426
+ vic.scss: .rli-vic-stimulus { align-items:flex-start } also starts the
427
+ sentence at the content's left edge, where the same layout centres it in its
428
+ grid column (justify-self:center). */
345
429
  .mc-populated-blank-root.variant-sel-vic.layout-inline_sentence .pie-template-line.template-line {
346
430
  text-align: start;
431
+ justify-self: start;
432
+ }
433
+
434
+ /* vic.scss: @media (min-width:850px) { .rli-vic-stimulus { margin-left:20px;
435
+ margin-right:20px } } — the sentence sits 20px in from the distractors. */
436
+ @media (min-width: 850px) {
437
+ .mc-populated-blank-root.variant-sel-vic.layout-inline_sentence .pie-template-line.template-line {
438
+ margin-left: 20px;
439
+ margin-right: 20px;
440
+ }
441
+ }
442
+
443
+ /* sel_vic/main.scss: .sel-vic .rli-vic-stimulus { min-height:128px }. From 850px up the
444
+ listen button beside the sentence gives the row that height; below it the button
445
+ moves above, and the sentence keeps the 128px on its own. */
446
+ @media not all and (min-width: 850px) {
447
+ .mc-populated-blank-root.variant-sel-vic.layout-inline_sentence .pie-template-line.template-line {
448
+ min-height: 128px;
449
+ }
347
450
  }
348
451
 
349
452
  /* vic.scss: .rli-vic-cloze { margin-left: 6px; margin-right: 6px } gives the
350
453
  cloze breathing room from adjacent text or punctuation. The shared blank slot
351
454
  has no inline margin, so set it here so the cloze→trailing-punctuation gap
352
- matches LSY. See CONTOOL-2572. */
455
+ matches the CQT. See CONTOOL-2572. The cloze has no inline padding either, where
456
+ ClozeMarker.svelte gives the blank 0.5rem. */
353
457
  .mc-populated-blank-root.variant-sel-vic .pie-template-line .pie-blank-slot {
354
458
  margin-left: 6px;
355
459
  margin-right: 6px;
460
+ padding-inline: 0;
356
461
  }
357
462
 
358
463
  /* vic.scss: .rli-vic-cloze > .rli-vic-content-element { color: #cc3333 }
359
- The red holds AA only on LSY's white page (5.1:1), so the answer carries that
464
+ The red holds AA only on the CQT's white page (5.1:1), so the answer carries that
360
465
  surface: on a dark host it is 3.08:1. light-dark() would miss pie-players'
361
466
  colour schemes, which declare no color-scheme. */
362
467
  .mc-populated-blank-root.variant-sel-vic .pie-blank-value {
@@ -377,6 +482,24 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
377
482
  justify-content: flex-start;
378
483
  }
379
484
 
485
+ /* vic.scss: .rli-vic-distractor { align-items:center; margin-right:10px } and
486
+ .rli-vic-distractor > input { margin:20px }. The radio sits 20px from the row edge and
487
+ from its label, centred on the label, and its margins set the row pitch: the rows and
488
+ the radio and label have no gap between them. */
489
+ .mc-populated-blank-root.variant-sel-vic .pie-choices.choices-vertical {
490
+ --mpb-choice-group-gap: 0;
491
+ }
492
+
493
+ .mc-populated-blank-root.variant-sel-vic .pie-choice:not(.pie-choice-horizontal) {
494
+ --mpb-choice-row-gap: 0;
495
+ align-items: center;
496
+ margin-right: 10px;
497
+ }
498
+
499
+ .mc-populated-blank-root.variant-sel-vic .pie-choice-radio-inline {
500
+ margin: 20px;
501
+ }
502
+
380
503
  /* vic.scss: .rli-vic-selected { background-color: #fcfcd3 } on the full row. */
381
504
  .mc-populated-blank-root.variant-sel-vic .pie-choice.is-selected {
382
505
  background-color: #fcfcd3;
@@ -408,16 +531,7 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
408
531
  background-color: transparent;
409
532
  color: inherit;
410
533
  }
411
-
412
- @media (min-width: 620px) {
413
- .mc-populated-blank-root.variant-sel-vic .pie-audio-transcript {
414
- min-width: 620px;
415
- max-width: 800px;
416
- transform: translateX(-55px);
417
- }
418
- }
419
- `},"sel_r1-_gplusggg":{variantId:`sel-r1-gplusggg`,variantClass:`variant-sel-r1-gplusggg`,sourceUrl:`https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_gplusggg/0.0.1/question.css`,cssText:`/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_gplusggg/0.0.1/question.css */
420
- /* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */
534
+ `},"sel_r1-_gplusggg":{variantId:`sel-r1-gplusggg`,variantClass:`variant-sel-r1-gplusggg`,cssText:`/* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */
421
535
  .mc-populated-blank-root.variant-sel-r1-gplusggg {
422
536
  max-width: 875px;
423
537
  margin-inline: auto;
@@ -432,20 +546,7 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
432
546
  --mpb-choice-selected-bg: #fcfcd3;
433
547
  --mpb-choice-selected-color: #000;
434
548
  }
435
-
436
- /* r1.scss: .rli-r1-content-element boxes all have fixed line-height:89px, so every
437
- token in the stem row shares a stable baseline regardless of content. In PIE,
438
- the blank slot's baseline shifts when the empty placeholder (short &nbsp;) is
439
- replaced by the filled value span (full text height), dragging adjacent tokens
440
- down by ~9px. Switching to align-items:center is safe here because gplusggg has
441
- only one row of content (blank + "four"), so vertical centering and baseline
442
- alignment produce the same visual result. The :is() wrapper raises specificity
443
- above the base [class*=] rule without needing !important. */
444
- :is(.mc-populated-blank-root.variant-sel-r1-gplusggg) .pie-template-line {
445
- align-items: center;
446
- }
447
- `},"sel_r1-g_plusggg":{variantId:`sel-r1-g-stem`,variantClass:`variant-sel-r1-g-stem`,sourceUrl:`https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-g_plusggg/0.0.1/question.css`,cssText:`/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-g_plusggg/0.0.1/question.css */
448
- /* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */
549
+ `},"sel_r1-g_plusggg":{variantId:`sel-r1-g-stem`,variantClass:`variant-sel-r1-g-stem`,cssText:`/* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */
449
550
  .mc-populated-blank-root.variant-sel-r1-g-stem {
450
551
  max-width: 875px;
451
552
  margin-inline: auto;
@@ -461,27 +562,7 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
461
562
  /* r1.scss: .rli-r1-cloze { border-bottom: 6px solid } */
462
563
  --mpb-blank-underline-wide-width: 6px;
463
564
  }
464
-
465
- /* PIE-793: sel-r1-base.css's 156px blank box fits a 150x150 image answer, which image
466
- choices (variant-sel-r1-g-stem-graphic) keep. Text answers drop it on every classless
467
- span, so the empty and filled blank match height (CONTOOL-3159). */
468
- .mc-populated-blank-root.variant-sel-r1-g-stem.layout-token_sequence.choice-mode-text
469
- .pie-blank-slot
470
- span:not([class]) {
471
- min-height: 0;
472
- }
473
-
474
- /* The slot shrinks to its content and anchors to the top of the row, so the answer stays
475
- level with the stem token and the underline rises to meet it. Any align-self keeps the
476
- slot out of the row's shared baseline (see sel-r1-base.css), so the stem token does not
477
- move on selection. */
478
- .mc-populated-blank-root.variant-sel-r1-g-stem.layout-token_sequence.choice-mode-text
479
- .pie-blank-slot {
480
- min-height: 0;
481
- align-self: flex-start;
482
- }
483
- `},"sel_r1-gg_plusggg":{variantId:`sel-r1-gg-plus`,variantClass:`variant-sel-r1-gg-plus`,sourceUrl:`https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-gg_plusggg/0.0.1/question.css`,cssText:`/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-gg_plusggg/0.0.1/question.css */
484
- /* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */
565
+ `},"sel_r1-gg_plusggg":{variantId:`sel-r1-gg-plus`,variantClass:`variant-sel-r1-gg-plus`,cssText:`/* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */
485
566
  .mc-populated-blank-root.variant-sel-r1-gg-plus {
486
567
  max-width: 875px;
487
568
  margin-inline: auto;
@@ -495,8 +576,7 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
495
576
  --mpb-choice-selected-bg: #fcfcd3;
496
577
  --mpb-choice-selected-color: #000;
497
578
  }
498
- `},"sel_r1-_ggplusggg":{variantId:`sel-r1-ggplus`,variantClass:`variant-sel-r1-ggplus`,sourceUrl:`https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_ggplusggg/0.0.1/question.css`,cssText:`/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_ggplusggg/0.0.1/question.css */
499
- /* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */
579
+ `},"sel_r1-_ggplusggg":{variantId:`sel-r1-ggplus`,variantClass:`variant-sel-r1-ggplus`,cssText:`/* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */
500
580
  .mc-populated-blank-root.variant-sel-r1-ggplus {
501
581
  max-width: 875px;
502
582
  margin-inline: auto;
@@ -510,8 +590,7 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
510
590
  --mpb-choice-selected-bg: #fcfcd3;
511
591
  --mpb-choice-selected-color: #000;
512
592
  }
513
- `},"sel_r1-s3_plusggg":{variantId:`sel-r1-s3`,variantClass:`variant-sel-r1-s3`,sourceUrl:`https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-s3_plusggg/0.0.1/question.css`,cssText:`/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-s3_plusggg/0.0.1/question.css */
514
- /* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */
593
+ `},"sel_r1-s3_plusggg":{variantId:`sel-r1-s3`,variantClass:`variant-sel-r1-s3`,cssText:`/* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */
515
594
  .mc-populated-blank-root.variant-sel-r1-s3 {
516
595
  max-width: 860px;
517
596
  margin-inline: auto;
@@ -531,7 +610,7 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
531
610
 
532
611
  /* sel_r1-s3_plusggg/question.css does not set font-weight on distractors or
533
612
  cloze content-element, so they inherit 400 from the host root. The earlier
534
- font-weight:500 override caused PIE to render visibly heavier than LSY for
613
+ font-weight:500 override caused PIE to render visibly heavier than the CQT for
535
614
  the same author content. See CONTOOL-2571. */
536
615
  .mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-label,
537
616
  .mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-label :is(span, p, div) {
@@ -552,7 +631,6 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
552
631
  .mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank {
553
632
  grid-template-columns: minmax(220px, auto) auto auto;
554
633
  grid-template-areas:
555
- "transcript transcript transcript"
556
634
  "sentence template audio"
557
635
  "choices choices choices";
558
636
  justify-content: center;
@@ -566,7 +644,6 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
566
644
  .mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank.has-header {
567
645
  grid-template-areas:
568
646
  "header header header"
569
- "transcript transcript transcript"
570
647
  "sentence template audio"
571
648
  "choices choices choices";
572
649
  }
@@ -582,7 +659,7 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
582
659
  underline. Centering leaves it floating well above both the underline and the
583
660
  sentence image's own (bottom-anchored) baseline. The blank's own box height
584
661
  (160px, from McPopulatedBlank.svelte's shared audio_blank_only/stimulus_image_blank
585
- rule) is left as-is — it already matches the Learnosity reference (~161px)
662
+ rule) is left as-is — it already matches the CQT reference (~161px)
586
663
  closely; only the internal alignment was wrong. See CONTOOL-3159. */
587
664
  .mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank .pie-blank-slot {
588
665
  align-items: flex-end;
@@ -623,6 +700,51 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
623
700
  .mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-horizontal .pie-choice-radio {
624
701
  transform: scale(0.85);
625
702
  }
703
+
704
+ /* question.css: below 850px .rli-s3-container is a one-column grid in DOM order
705
+ (listen button, sentence, cloze, distractors), each at the left edge. The cloze
706
+ container stretches, so the underline spans the column, with the 150px
707
+ content-element at its start (.rli-s3-cloze { justify-content:flex-start }). */
708
+ @media not all and (min-width: 850px) {
709
+ .mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank {
710
+ grid-template-columns: minmax(0, 1fr);
711
+ grid-template-areas:
712
+ "transcript"
713
+ "audio"
714
+ "sentence"
715
+ "template"
716
+ "choices";
717
+ align-items: start;
718
+ }
719
+
720
+ .mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank.has-header {
721
+ grid-template-areas:
722
+ "header"
723
+ "transcript"
724
+ "audio"
725
+ "sentence"
726
+ "template"
727
+ "choices";
728
+ }
729
+
730
+ .mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank .pie-sentence-line,
731
+ .mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank .pie-choices-fieldset {
732
+ justify-self: start;
733
+ }
734
+
735
+ .mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank .pie-template-line {
736
+ justify-self: stretch;
737
+ }
738
+
739
+ .mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank .pie-blank-slot {
740
+ flex-grow: 1;
741
+ justify-content: flex-start;
742
+ }
743
+
744
+ .mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank .pie-blank-value {
745
+ width: 150px;
746
+ }
747
+ }
626
748
  `}},So=e=>String(e||``).trim().toLowerCase().replace(/v\d+\.\d+\.\d+$/i,``),Co=e=>xo[So(e)],wo=e=>Co(e)?.variantClass||``,To=new Set([`sel-r1-plusggg`,`sel-r1-gplusggg`,`sel-r1-g-stem`,`sel-r1-gg-plus`,`sel-r1-ggplus`,`sel-r1-s3`]),Eo=/\.mc-populated-blank-root(?![\w-])/g,Do=(e=>{let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)})([bo,...Object.values(xo).map(e=>e.cssText)].join(`
627
749
  `)),Oo=e=>e.replace(Eo,`.mc-populated-blank-root:where([data-mpb-css="${Do}"])`),ko=(e,t,n)=>{let r=`mc-populated-blank-css-${t}-${Do}`;if(e.getElementById(r))return;let i=document.createElement(`style`);i.id=r,i.setAttribute(`data-mpb-variant`,t),i.textContent=Oo(n),(e instanceof ShadowRoot?e:e.head).appendChild(i)},Ao=(e,t)=>{if(!e?.cssText||typeof document>`u`)return;let n=t.getRootNode(),r=n instanceof ShadowRoot?n:document;To.has(e.variantId)&&ko(r,`sel-r1-base`,bo),ko(r,e.variantId,e.cssText)},jo=q(`<div class="pie-prompt svelte-6wlbb4"></div>`),Mo=vr(`<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>`),No=vr(`<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>`),Po=q(`<div class="pie-correct-answer-toggle-row svelte-6wlbb4"><button type="button" class="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>`),Fo=q(`<div class="pie-header svelte-6wlbb4"><!> <!> <!></div>`),Io=q(`<div class="sentence-line pie-sentence-line svelte-6wlbb4"></div>`),Lo=q(`<div class="template-line pie-template-line svelte-6wlbb4"><!><!><!></div>`),Ro=q(`<p class="sr-only pie-result-feedback svelte-6wlbb4" role="status" aria-live="polite"> </p>`),zo=q(`<div><!> <!> <!> <!> <!> <p class="sr-only pie-blank-hint svelte-6wlbb4"> </p> <fieldset class="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>`),Bo={hash:`svelte-6wlbb4`,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;}
628
750
 
@@ -668,13 +790,29 @@ this.McPopulatedBlankElement=(function(){typeof window<`u`&&((window.__svelte??=
668
790
  'template audio'
669
791
  'choices choices';}.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);}
670
792
 
671
- /* Match Learnosity responsive behavior for CQT audio-blank layouts:
672
- at smaller widths, audio control shifts left and answer tiles stack. */
673
- @media (max-width: 760px) {.layout-audio_blank_only.svelte-6wlbb4 .pie-audio-container,
793
+ /* The CQT sheets (r1.scss, vic.scss, sel_r1-s3_plusggg) lay these layouts out in one
794
+ column below 850px: the listen button sits at the left above the stem, and the
795
+ answer tiles stack at the left edge. */
796
+ @media not all and (min-width: 850px) {.layout-audio_blank_only.svelte-6wlbb4 .pie-audio-container,
674
797
  .layout-stimulus_image_blank.svelte-6wlbb4 .pie-audio-container,
675
798
  .layout-token_sequence.svelte-6wlbb4 .pie-audio-container,
676
- .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),
799
+ .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 fieldset:where(.svelte-6wlbb4) {justify-content:flex-start;}.layout-audio_blank_only.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4),
677
800
  .layout-token_sequence.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4),
678
801
  .layout-stimulus_image_blank.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4),
679
- .layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4) {flex-direction:column;align-items:flex-start;justify-content:flex-start;}
802
+ .layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4) {flex-direction:column;align-items:flex-start;justify-content:flex-start;
803
+ /* The vw cap fits a row of tiles across the viewport; stacked tiles keep their width. */--mpb-choice-width-vw: 100vw;}.layout-stimulus_image_blank.svelte-6wlbb4 {grid-template-columns:minmax(0, 1fr);grid-template-areas:'audio'
804
+ 'sentence'
805
+ 'template'
806
+ 'choices';}.layout-stimulus_image_blank.has-header.svelte-6wlbb4 {grid-template-areas:'header'
807
+ 'audio'
808
+ 'sentence'
809
+ 'template'
810
+ 'choices';}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 {grid-template-columns:minmax(0, 1fr);grid-template-areas:'audio'
811
+ 'template'
812
+ 'choices';}.layout-inline_sentence.has-inline-audio.has-header.svelte-6wlbb4 {grid-template-areas:'header'
813
+ 'audio'
814
+ 'template'
815
+ 'choices';}.layout-stimulus_image_blank.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4),
816
+ .layout-token_sequence.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4),
817
+ .layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {justify-self:start;text-align:start;}
680
818
  }`};function Vo(e,t){We(t,!0),Wr(e,Bo);let n=Z(t,`model`,7),r=Z(t,`session`,7),i=Z(t,`onSessionChange`,7),a=Z(t,`onAudioStarted`,7),o=Z(t,`onAudioEnded`,7),s=e=>Sa(e,n()?.language),c=P(``),l=P(null),u=P(null),d=P(null),f=`mc-populated-blank-${Math.random().toString(36).slice(2,10)}`,p=j(()=>(n()?.mode||n()?.env?.mode||``).toString()),m=j(()=>K(p)===`evaluate`),h=j(()=>n()?.correctness),g=j(()=>typeof n()?.responseCorrect==`boolean`?n().responseCorrect:K(h)===`correct`),_=j(()=>K(h)===`correct`),v=j(()=>K(h)===`incorrect`),y=P(!1),b=j(()=>K(m)&&!K(g)&&!!n()?.correctChoiceId),x=j(()=>n()?.layoutProfile||``),S=j(()=>eo({interactionMode:n()?.interactionMode,template:n()?.template,choiceLayout:n()?.choiceLayout,layoutProfile:K(x),hasAudio:n()?.hasAudio,useFeatureButtonAudio:n()?.useFeatureButtonAudio,prompt:n()?.prompt})),ee=j(()=>K(S).isAudioOnlyMode),te=j(()=>K(S).isBlankOnlyTemplate),C=j(()=>K(S).isHorizontalChoices),w=j(()=>K(S).hasInlineSentenceAudioLayout),ne=j(()=>K(S).useFeatureButtonAudio),re=j(()=>K(S).hasVisiblePrompt),ie=j(()=>!!n()?.teacherInstructions||K(re)||K(b)),ae=j(()=>io({layoutProfile:K(x),isBlankOnlyTemplate:K(te),configuredLimits:n()?.layoutLimits,customProfilePresets:n()?.layoutProfilePresets})),oe=j(()=>Array.isArray(n()?.choices)?n().choices:[]),se=j(()=>n()?.choiceMode||`text`),ce=j(()=>r()?.choiceId||K(c)||``),le=j(()=>`${f}-choice-group-${n()?.id||`1`}`),ue=j(()=>_o({selectedId:K(ce),isEvaluateMode:K(m),showCorrectAnswer:K(y),correctChoiceId:String(n()?.correctChoiceId||``)})),de=j(()=>K(oe).find(e=>e.id===K(ue))),fe=j(()=>String(K(de)?.labelHtml||``)),pe=j(()=>vo({isEvaluateMode:K(m),showCorrectAnswer:K(y),isCorrect:K(_),isIncorrect:K(v),selectedId:K(ce)})),me=j(()=>K(pe)===`correct`?s(`correctAnswerSelected`):K(pe)===`incorrect`?s(`incorrectAnswerSelected`):``),he=j(()=>Ya({isEvaluateMode:K(m),correctChoiceId:String(n()?.correctChoiceId||``),selectedId:String(K(ce)||``),showCorrectAnswer:K(y)})),ge=j(()=>`${f}-prompt`),_e=j(()=>`${f}-choices-legend`),ve=j(()=>`${f}-result`),ye=j(()=>`${f}-blank-hint`),be=j(()=>yo({prompt:n()?.prompt||``,legendMaxChars:K(ae).legendMaxChars,answerChoicesLabel:s(`answerChoices`)})),xe=j(()=>K(re)?K(ge):void 0),Se=j(()=>K(re)?void 0:String(n()?.choiceGroupLabel||``).trim()||K(be)),T=j(()=>K(re)?K(ge):void 0),Ce=j(()=>{let e=String(n()?.language||n()?.locale||``).trim();return e?e.replace(/_/g,`-`):void 0}),E=j(()=>Co(n()?.customType)),D=j(()=>wo(n()?.customType)),we=j(()=>{let e=n()?.template||``,t=e.indexOf(`{{blank}}`);if(t<0)return{before:e,after:``};let r=e.slice(0,t),i=e.slice(t+9);return K(x)===`inline_sentence`&&(r=`${r.replace(/\s+$/,``)} `,i=` ${i.replace(/^\s+/,``)}`),{before:r,after:i}});function Te(e){let t=e.target;if(!t.checked)return;let n=t.value;F(c,n,!0),i()?.({...r(),choiceId:n})}function Ee(){K(b)&&F(y,!K(y))}hn(()=>{(!K(m)||K(g))&&F(y,!1)});function De(e){if(n()?.disabled)return;let t=e.key;if(![`ArrowDown`,`ArrowRight`,`ArrowUp`,`ArrowLeft`].includes(t))return;e.preventDefault();let r=e.currentTarget,i=Array.from(r.querySelectorAll(`input[type="radio"]:not([disabled])`));if(i.length===0)return;let a=i.findIndex(e=>e.checked);a=t===`ArrowDown`||t===`ArrowRight`?a<0?0:(a+1)%i.length:a<0?i.length-1:(a-1+i.length)%i.length;let o=i[a];o.checked=!0,o.dispatchEvent(new Event(`change`,{bubbles:!0})),o.focus()}let Oe=j(()=>go({locale:n()?.locale,audioButtonSkin:n()?.audioButtonSkin,audioButtonSkinsByLocale:n()?.audioButtonSkinsByLocale}));hn(()=>{F(c,r()?.choiceId||``,!0)}),hn(()=>{let e=K(l);if(e)return e.addEventListener(`click`,Ee),()=>e.removeEventListener(`click`,Ee)}),hn(()=>{let e=K(u);if(!e)return;let t=e=>{e.target?.type===`radio`&&Te(e)},n=e=>De(e);return e.addEventListener(`change`,t),e.addEventListener(`keydown`,n),()=>{e.removeEventListener(`change`,t),e.removeEventListener(`keydown`,n)}}),hn(()=>{K(d)&&Ao(K(E),K(d))});var ke={get model(){return n()},set model(e){n(e),N()},get session(){return r()},set session(e){r(e),N()},get onSessionChange(){return i()},set onSessionChange(e){i(e),N()},get onAudioStarted(){return a()},set onAudioStarted(e){a(e),N()},get onAudioEnded(){return o()},set onAudioEnded(e){o(e),N()}},Ae=zo(),je=L(Ae),Me=e=>{var t=Fo(),r=L(t),i=e=>{{let t=j(()=>n()?.language);Ja(e,{get html(){return n().teacherInstructions},get language(){return K(t)}})}};Y(r,e=>{n()?.teacherInstructions&&e(i)});var a=R(r,2),o=e=>{var t=jo();Ur(t,()=>n().prompt,!0),O(t),z(()=>X(t,`id`,K(ge))),J(e,t)};Y(a,e=>{K(re)&&e(o)});var s=R(a,2),c=e=>{var t=Po(),r=L(t),i=L(r),a=L(i),o=L(a),s=e=>{J(e,Mo())},c=e=>{J(e,No())};Y(o,e=>{K(y)?e(s):e(c,-1)}),O(a);var u=nn(R(a,2),!0);O(i),O(r),ui(r,e=>F(l,e),()=>K(l)),O(t),z(e=>{X(r,`aria-pressed`,K(y)),Er(u,e)},[()=>Ca(K(y)?`hideCorrectAnswer`:`showCorrectAnswer`,n()?.language)]),J(e,t)};Y(s,e=>{K(b)&&e(c)}),O(t),J(e,t)};Y(je,e=>{K(ie)&&e(Me)});var Ne=R(je,2);{let e=j(()=>!!n()?.hasAudio),t=j(()=>n()?.audioUrl),r=j(()=>!!n()?.autoplayAudioEnabled),i=j(()=>n()?.language);Aa(Ne,{get hasAudio(){return K(e)},get audioUrl(){return K(t)},get useFeatureButtonAudio(){return K(ne)},get autoplayEnabled(){return K(r)},get featureAudioSkin(){return K(Oe)},get language(){return K(i)},get onaudiostarted(){return a()},get onaudioended(){return o()}})}var Pe=R(Ne,2),Fe=e=>{var t=Io();Ur(t,()=>n().sentenceHtml,!0),O(t),z(()=>X(t,`aria-describedby`,K(T))),J(e,t)};Y(Pe,e=>{n()?.sentenceHtml&&e(Fe)});var Ie=R(Pe,2),Le=e=>{var t=Lo(),r=L(t);Ur(r,()=>K(we).before);var i=R(r);{let e=j(()=>s(`blankLabel`)),t=j(()=>n()?.language);Ia(i,{get choiceMode(){return K(se)},get displayChoice(){return K(de)},get displayChoiceLabelHtml(){return K(fe)},get isStandalone(){return K(te)},get blankWidth(){return K(ae).blankWidth},get blankBorderWidth(){return K(ae).blankBorderWidth},get ariaLabel(){return K(e)},get language(){return K(t)}})}Ur(R(i),()=>K(we).after),O(t),z(()=>X(t,`aria-describedby`,K(T))),J(e,t)};Y(Ie,e=>{K(ee)||e(Le)});var Re=R(Ie,2),ze=e=>{var t=Ro(),n=nn(t,!0);z(()=>{X(t,`id`,K(ve)),Er(n,K(me))}),J(e,t)};Y(Re,e=>{K(me)&&e(ze)});var Be=R(Re,2),Ve=nn(Be,!0),He=R(Be,2),k=L(He),Ue=nn(k,!0),Ke=R(k,2);return Lr(Ke,21,()=>K(oe),e=>e.id,(e,t)=>{{let r=j(()=>K(ue)===K(t).id),i=j(()=>!!n()?.disabled),a=j(()=>K(he).get(K(t).id)),o=j(()=>n()?.language);Ga(e,{get choice(){return K(t)},get choiceMode(){return K(se)},get isHorizontal(){return K(C)},get isSelected(){return K(r)},get isDisabled(){return K(i)},get correctness(){return K(a)},get isEvaluateMode(){return K(m)},get instanceId(){return f},get radioGroupName(){return K(le)},get language(){return K(o)}})}}),O(Ke),ui(Ke,e=>F(u,e),()=>K(u)),O(He),O(Ae),ui(Ae,e=>F(d,e),()=>K(d)),z((e,t)=>{Xr(Ae,1,`mc-populated-blank-root pie-element pie-element-mc-populated-blank pie-delivery-root layout-${K(x)} choice-mode-${K(se)} ${K(D)} ${K(w)?`has-inline-audio`:``} ${K(ie)?`has-header`:``}`,`svelte-6wlbb4`),X(Ae,`lang`,K(Ce)),Qr(Ae,K(ae).rootStyle),X(Ae,`data-mpb-css`,Do),X(Be,`id`,K(ye)),Er(Ve,e),He.disabled=n()?.disabled,X(k,`id`,K(_e)),Er(Ue,K(be)),Xr(Ke,1,`pie-choices ${K(C)?`choices-horizontal`:`choices-vertical`}`,`svelte-6wlbb4`),X(Ke,`aria-labelledby`,K(xe)),X(Ke,`aria-label`,K(Se)),X(Ke,`aria-describedby`,t)},[()=>s(`blankPreSelectionHint`),()=>[K(ye),K(me)?K(ve):void 0].filter(Boolean).join(` `)]),J(e,Ae),Ge(ke)}vi(Vo,{model:{type:`Object`},session:{type:`Object`},options:{type:`Object`},onSessionChange:{},onAudioStarted:{},onAudioEnded:{}},[],[]);function Ho(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function Uo(e,t){if(e===t)return e;if(!Ho(e)||!Ho(t)||Object.isFrozen(e)||!Object.isExtensible(e))return t;try{for(let n of Object.keys(e))n in t||delete e[n];Object.assign(e,t)}catch{return t}return e}var Wo=class e extends CustomEvent{static{this.TYPE=`model-set`}constructor(t,n,r){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t,hasModel:r}}),this.component=t,this.complete=n}},Go=class e extends CustomEvent{static{this.TYPE=`session-changed`}constructor(t,n){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t}}),this.component=t,this.complete=n}};function Ko(e,t){let n=e.element;if(!n)throw TypeError("defineDeliveryElement: the component was not compiled with `customElement`");class r extends n{#e;#t;constructor(){super(),this.onSessionChange=e=>{this.writeSession(e),this.dispatchSessionChanged()}}set model(e){this.#e=e,super.model=e,queueMicrotask(()=>{this.dispatchEvent(new Wo(this.tagName.toLowerCase(),this.isComplete(),this.#e!==void 0))})}get model(){return this.#e}set session(e){this.#t=e,super.session=e,this.dispatchSessionChanged()}get session(){return this.#t}isComplete(){return t.isComplete(this.#e,this.#t)}writeSession(e){this.#t=Uo(this.#t,e),super.session=e}dispatchSessionChanged(){this.dispatchEvent(new Go(this.tagName.toLowerCase(),this.isComplete()))}}return r}var qo=Ko(Vo,{isComplete:(e,t)=>!!t?.choiceId});function Jo(e){return!!e?.completeAudioEnabled&&!!e?.hasAudio}return class extends qo{audioComplete=!1;constructor(){super(),this.onAudioStarted=()=>{this.#e({audioStartTime:Date.now()})},this.onAudioEnded=()=>{this.audioComplete=!0,this.#e({audioEndTime:Date.now()}),this.dispatchSessionChanged()}}set model(e){e?.audioUrl!==this.model?.audioUrl&&(this.audioComplete=!1),super.model=e}get model(){return super.model}isComplete(){return super.isComplete()&&(this.audioComplete||!Jo(this.model))}#e(e){let t=this.session||{},n=t.audioStartTime||e.audioStartTime,r=t.audioEndTime||e.audioEndTime,i={...t,...n?{audioStartTime:n}:{},...r?{audioEndTime:r}:{}};!i.waitTime&&n&&r&&(i.waitTime=r-n),this.writeSession(i)}}})();