@pie-element/mc-populated-blank 0.2.13 → 0.3.0-next.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +9 -6
  2. package/author.js +2 -0
  3. package/configure.js +2 -0
  4. package/dist/author/defaults.d.ts +74 -0
  5. package/dist/author/index.d.ts +0 -1
  6. package/dist/author/index.js +1732 -1553
  7. package/dist/author/index.js.map +1 -1
  8. package/dist/browser/McPopulatedBlank-DbmR6UWn.js +2542 -0
  9. package/dist/browser/McPopulatedBlank-DbmR6UWn.js.map +1 -0
  10. package/dist/browser/author/index.js +41 -0
  11. package/dist/browser/author/index.js.map +1 -0
  12. package/dist/browser/client-CWh3mUUV.js +2385 -0
  13. package/dist/browser/client-CWh3mUUV.js.map +1 -0
  14. package/dist/browser/controller/index.js +2 -0
  15. package/dist/browser/controller-D_ITRCYG.js +209 -0
  16. package/dist/browser/controller-D_ITRCYG.js.map +1 -0
  17. package/dist/browser/delivery/index.js +124 -0
  18. package/dist/browser/delivery/index.js.map +1 -0
  19. package/dist/browser/layoutLimits-Bp17YP2V.js +42 -0
  20. package/dist/browser/layoutLimits-Bp17YP2V.js.map +1 -0
  21. package/dist/browser/print/index.js +129 -0
  22. package/dist/browser/print/index.js.map +1 -0
  23. package/dist/controller/defaults.d.ts +8 -30
  24. package/dist/controller/index.d.ts +79 -63
  25. package/dist/controller/index.js +108 -85
  26. package/dist/controller/index.js.map +1 -1
  27. package/dist/delivery/computeAudioMode.d.ts +0 -1
  28. package/dist/delivery/computeChoiceCorrectness.d.ts +0 -1
  29. package/dist/delivery/computeDisplayState.d.ts +7 -8
  30. package/dist/delivery/computeLayoutProfile.d.ts +0 -1
  31. package/dist/delivery/computeLayoutStyle.d.ts +0 -2
  32. package/dist/delivery/i18n.d.ts +8 -0
  33. package/dist/delivery/index.d.ts +8 -17
  34. package/dist/delivery/index.js +6138 -3662
  35. package/dist/delivery/index.js.map +1 -1
  36. package/dist/delivery/variant-css-map.d.ts +15 -2
  37. package/dist/index.d.ts +0 -1
  38. package/dist/index.iife.d.ts +0 -156
  39. package/dist/index.iife.js +139 -38
  40. package/dist/index.js +2 -6811
  41. package/dist/print/index.d.ts +4 -1
  42. package/dist/print/index.js +8158 -3655
  43. package/dist/print/index.js.map +1 -1
  44. package/dist/print/preparePrint.d.ts +15 -0
  45. package/dist/runtime-support.d.ts +12 -0
  46. package/dist/runtime-support.js +14 -0
  47. package/dist/runtime-support.js.map +1 -0
  48. package/dist/shared/layoutLimits.d.ts +1 -2
  49. package/dist/shared/types.d.ts +21 -19
  50. package/module/print.js +5192 -0
  51. package/module/print.js.map +1 -0
  52. package/package.json +42 -14
  53. package/print.js +2 -0
  54. package/dist/author/index.d.ts.map +0 -1
  55. package/dist/controller/defaults.d.ts.map +0 -1
  56. package/dist/controller/index.d.ts.map +0 -1
  57. package/dist/delivery/computeAudioMode.d.ts.map +0 -1
  58. package/dist/delivery/computeChoiceCorrectness.d.ts.map +0 -1
  59. package/dist/delivery/computeDisplayState.d.ts.map +0 -1
  60. package/dist/delivery/computeLayoutProfile.d.ts.map +0 -1
  61. package/dist/delivery/computeLayoutStyle.d.ts.map +0 -1
  62. package/dist/delivery/index.d.ts.map +0 -1
  63. package/dist/delivery/variant-css-map.d.ts.map +0 -1
  64. package/dist/index.d.ts.map +0 -1
  65. package/dist/index.iife.d.ts.map +0 -1
  66. package/dist/index.js.map +0 -1
  67. package/dist/print/index.d.ts.map +0 -1
  68. package/dist/shared/layoutLimits.d.ts.map +0 -1
  69. package/dist/shared/types.d.ts.map +0 -1
@@ -0,0 +1,2542 @@
1
+ import { A as e, C as t, D as n, E as r, F as i, M as a, N as o, O as s, P as c, S as l, T as u, _ as d, a as f, b as p, c as m, d as h, f as g, g as _, h as v, i as y, j as b, k as x, l as S, m as C, n as w, o as T, p as E, r as D, s as O, t as k, u as ee, v as A, w as j, x as M, y as N } from "./client-CWh3mUUV.js";
2
+ import { t as P } from "./layoutLimits-Bp17YP2V.js";
3
+ //#region src/delivery/computeAudioMode.ts
4
+ function F(e) {
5
+ return e.hasAudio ? e.audioUrl ? e.useFeatureButtonAudio ? "feature-button" : "controls" : "error" : "none";
6
+ }
7
+ //#endregion
8
+ //#region ../../shared/translator/dist/en.js
9
+ var I = {
10
+ translation: {
11
+ categorize: {
12
+ limitMaxChoicesPerCategory: "You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.",
13
+ maxChoicesPerCategoryRestriction: "To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s]."
14
+ },
15
+ ebsr: { part: "Part {{index}}" },
16
+ numberLine: {
17
+ addElementLimit_one: "You can only add {{count}} element",
18
+ addElementLimit_other: "You can only add {{count}} elements",
19
+ clearAll: "Clear all"
20
+ },
21
+ imageClozeAssociation: {
22
+ reachedLimit_one: "You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.",
23
+ reachedLimit_other: "Full"
24
+ },
25
+ drawingResponse: {
26
+ fillColor: "Fill color",
27
+ outlineColor: "Outline color",
28
+ noFill: "No fill",
29
+ lightblue: "Light blue",
30
+ lightyellow: "Light yellow",
31
+ red: "Red",
32
+ orange: "Orange",
33
+ yellow: "Yellow",
34
+ violet: "Violet",
35
+ blue: "Blue",
36
+ green: "Green",
37
+ white: "White",
38
+ black: "Black",
39
+ onDoubleClick: "Double click to edit this text. Press Enter to submit."
40
+ },
41
+ charting: {
42
+ addCategory: "Add category",
43
+ actions: "Actions",
44
+ add: "Add",
45
+ delete: "Delete",
46
+ newLabel: "New label",
47
+ reachedLimit_other: "There can't be more than {{count}} categories.",
48
+ keyLegend: {
49
+ incorrectAnswer: "Student incorrect answer",
50
+ correctAnswer: "Student correct answer",
51
+ correctKeyAnswer: "Answer key correct"
52
+ }
53
+ },
54
+ graphing: {
55
+ point: "Point",
56
+ circle: "Circle",
57
+ line: "Line",
58
+ parabola: "Parabola",
59
+ absolute: "Absolute Value",
60
+ exponential: "Exponential",
61
+ polygon: "Polygon",
62
+ ray: "Ray",
63
+ segment: "Segment",
64
+ sine: "Sine",
65
+ vector: "Vector",
66
+ label: "Label",
67
+ redo: "Redo",
68
+ reset: "Reset"
69
+ },
70
+ mathInline: { primaryCorrectWithAlternates: "Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct." },
71
+ mcPopulatedBlank: {
72
+ answerChoices: "Answer choices",
73
+ blankLabel: "blank",
74
+ emptyBlank: "(blank)",
75
+ blankPreSelectionHint: "The answer you choose will appear on the blank line above.",
76
+ correctAnswerSelected: "Correct answer selected",
77
+ incorrectAnswerSelected: "Incorrect answer selected",
78
+ selectedAnswerImage: "Selected answer image",
79
+ choiceImage: "Choice {{id}}",
80
+ clickToEnableAutoplay: "Click to enable audio autoplay",
81
+ audioResourceUnavailable: "Audio is enabled but no playable audio URL is configured.",
82
+ listen: "Listen",
83
+ listenSilentAlt: "Repeat instructions",
84
+ listenPlayingAlt: "Instructions are playing",
85
+ printAudio: "Audio:",
86
+ printTranscript: "Transcript:"
87
+ },
88
+ multipleChoice: {
89
+ minSelections: "Select at least {{minSelections}}.",
90
+ maxSelections_one: "Only {{maxSelections}} answer is allowed.",
91
+ maxSelections_other: "Only {{maxSelections}} answers are allowed.",
92
+ minmaxSelections_equal: "Select {{minSelections}}.",
93
+ minmaxSelections_range: "Select between {{minSelections}} and {{maxSelections}}."
94
+ },
95
+ selectText: {
96
+ correctAnswerSelected: "Correct",
97
+ correctAnswerNotSelected: "Correct Answer Not Selected",
98
+ incorrectSelection: "Incorrect Selection",
99
+ key: "Key"
100
+ },
101
+ simpleCloze: {
102
+ correctAnswerShown: "Correct answer",
103
+ correct: "Correct",
104
+ incorrect: "Incorrect",
105
+ unanswered: "No answer",
106
+ placeholder: "Enter your answer...",
107
+ answerInput: "Your answer",
108
+ printCorrectAnswer: "Correct answer:",
109
+ printAnswerBlank: "Answer blank"
110
+ },
111
+ vennClassification: {
112
+ tray: "Tiles to classify",
113
+ unknownTarget: "unknown",
114
+ cancelled: "Cancelled",
115
+ returnedToTray: "{{name}} returned to tray",
116
+ placedIn: "{{name}} placed in {{target}}",
117
+ pickedUp: "Picked up {{name}}",
118
+ pickedUpWithKeyboard: "Picked up {{name}}, drop target: {{target}}. Use arrow keys to choose a drop target, Enter to drop, Escape to cancel.",
119
+ dropTarget: "Drop target: {{target}}",
120
+ unsupportedCircles_one: "This diagram cannot be shown: it has {{count}} circle, and only {{supported}} are supported.",
121
+ unsupportedCircles_other: "This diagram cannot be shown: it has {{count}} circles, and only {{supported}} are supported.",
122
+ setNumber: "Set {{number}}",
123
+ regionOnly: "{{set}} only",
124
+ regionNeither: "Neither {{first}} nor {{second}}",
125
+ regionNoneOf: "None of {{sets}}",
126
+ regionAndSeparator: " and ",
127
+ tileFallbackName: "Tile",
128
+ tileNotPlaced: "not placed",
129
+ tileInRegion: "in {{region}}",
130
+ tileCorrect: "correct",
131
+ tileIncorrect: "incorrect"
132
+ }
133
+ },
134
+ common: {
135
+ undo: "Undo",
136
+ clearAll: "Clear all",
137
+ correct: "Correct",
138
+ incorrect: "Incorrect",
139
+ showCorrectAnswer: "Show correct answer",
140
+ hideCorrectAnswer: "Hide correct answer",
141
+ showTeacherInstructions: "Show Teacher Instructions",
142
+ hideTeacherInstructions: "Hide Teacher Instructions",
143
+ commonCorrectAnswerWithAlternates: "Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.",
144
+ warning: "Warning",
145
+ showNote: "Show Note",
146
+ hideNote: "Hide Note",
147
+ cancel: "Cancel"
148
+ }
149
+ }, L = {
150
+ translation: {
151
+ categorize: {
152
+ limitMaxChoicesPerCategory: "Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",
153
+ maxChoicesPerCategoryRestriction: "Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta"
154
+ },
155
+ ebsr: { part: "Parte {{index}}" },
156
+ numberLine: {
157
+ addElementLimit_one: "Solo puedes agregar {{count}} elemento",
158
+ addElementLimit_other: "Solo puedes agregar {{count}} elementos",
159
+ clearAll: "Borrar todo"
160
+ },
161
+ imageClozeAssociation: {
162
+ reachedLimit_one: "Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.",
163
+ reachedLimit_other: "Lleno"
164
+ },
165
+ drawingResponse: {
166
+ fillColor: "Color de relleno",
167
+ outlineColor: "Color del contorno",
168
+ noFill: "Sin relleno",
169
+ lightblue: "Azul claro",
170
+ lightyellow: "Amarillo claro",
171
+ red: "Rojo",
172
+ orange: "Naranja",
173
+ yellow: "Amarillo",
174
+ violet: "Violeta",
175
+ blue: "Azul",
176
+ green: "Verde",
177
+ white: "Blanco",
178
+ black: "Negro",
179
+ onDoubleClick: "Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar"
180
+ },
181
+ charting: {
182
+ addCategory: "Añadir categoría",
183
+ actions: "Acciones",
184
+ add: "Añadir",
185
+ delete: "Eliminar",
186
+ newLabel: "Nueva etiqueta",
187
+ reachedLimit_other: "No puede haber más de {{count}} categorías.",
188
+ keyLegend: {
189
+ incorrectAnswer: "Respuesta incorrecta del estudiante",
190
+ correctAnswer: "Respuesta correcta del estudiante",
191
+ correctKeyAnswer: "Clave de respuesta correcta"
192
+ }
193
+ },
194
+ graphing: {
195
+ point: "Punto",
196
+ circle: "Circulo",
197
+ line: "Línea",
198
+ parabola: "Parábola",
199
+ absolute: "Valor absoluto",
200
+ exponential: "Exponencial",
201
+ polygon: "Polígono",
202
+ ray: "Semirrecta",
203
+ segment: "Segmento ",
204
+ sine: "Seno",
205
+ vector: "Vector",
206
+ label: "Etiqueta",
207
+ redo: "Rehacer",
208
+ reset: "Reiniciar"
209
+ },
210
+ mathInline: { primaryCorrectWithAlternates: "Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas." },
211
+ mcPopulatedBlank: {
212
+ answerChoices: "Opciones de respuesta",
213
+ blankLabel: "espacio en blanco",
214
+ emptyBlank: "(en blanco)",
215
+ blankPreSelectionHint: "La respuesta que elijas aparecerá en la línea en blanco de arriba.",
216
+ correctAnswerSelected: "Respuesta correcta seleccionada",
217
+ incorrectAnswerSelected: "Respuesta incorrecta seleccionada",
218
+ selectedAnswerImage: "Imagen de la respuesta seleccionada",
219
+ choiceImage: "Opción {{id}}",
220
+ clickToEnableAutoplay: "Haz clic para activar la reproducción automática del audio",
221
+ audioResourceUnavailable: "El audio está activado, pero no hay una URL de audio reproducible configurada.",
222
+ listen: "Escuchar",
223
+ listenSilentAlt: "Escuchar. Repetir las instrucciones.",
224
+ listenPlayingAlt: "Escuchar. Estas son las instrucciones.",
225
+ printAudio: "Audio:",
226
+ printTranscript: "Transcripción:"
227
+ },
228
+ multipleChoice: {
229
+ minSelections: "Seleccione al menos {{minSelections}}.",
230
+ maxSelections_one: "Sólo se permite {{maxSelections}} respuesta.",
231
+ maxSelections_other: "Sólo se permiten {{maxSelections}} respuestas.",
232
+ minmaxSelections_equal: "Seleccione {{minSelections}}.",
233
+ minmaxSelections_range: "Seleccione entre {{minSelections}} y {{maxSelections}}."
234
+ },
235
+ selectText: {
236
+ correctAnswerSelected: "Respuesta Correcta",
237
+ correctAnswerNotSelected: "Respuesta Correcta No Seleccionada",
238
+ incorrectSelection: "Selección Incorrecta",
239
+ key: "Clave"
240
+ },
241
+ simpleCloze: {
242
+ correctAnswerShown: "Respuesta correcta",
243
+ correct: "Correcto",
244
+ incorrect: "Incorrecto",
245
+ unanswered: "Sin respuesta",
246
+ placeholder: "Escribe tu respuesta...",
247
+ answerInput: "Tu respuesta",
248
+ printCorrectAnswer: "Respuesta correcta:",
249
+ printAnswerBlank: "Espacio para la respuesta"
250
+ },
251
+ vennClassification: {
252
+ tray: "Fichas para clasificar",
253
+ unknownTarget: "desconocido",
254
+ cancelled: "Cancelado",
255
+ returnedToTray: "Se devolvió {{name}} a la bandeja",
256
+ placedIn: "Se colocó {{name}} en {{target}}",
257
+ pickedUp: "Se tomó {{name}}",
258
+ pickedUpWithKeyboard: "Se tomó {{name}}, destino: {{target}}. Usa las flechas para elegir un destino, Enter para soltar y Escape para cancelar.",
259
+ dropTarget: "Destino: {{target}}",
260
+ unsupportedCircles_one: "No se puede mostrar este diagrama: tiene {{count}} círculo, y solo se admiten {{supported}}.",
261
+ unsupportedCircles_other: "No se puede mostrar este diagrama: tiene {{count}} círculos, y solo se admiten {{supported}}.",
262
+ setNumber: "Conjunto {{number}}",
263
+ regionOnly: "Solo {{set}}",
264
+ regionNeither: "Ni {{first}} ni {{second}}",
265
+ regionNoneOf: "Ninguno de {{sets}}",
266
+ regionAndSeparator: " y ",
267
+ tileFallbackName: "Ficha",
268
+ tileNotPlaced: "sin colocar",
269
+ tileInRegion: "en {{region}}",
270
+ tileCorrect: "correcta",
271
+ tileIncorrect: "incorrecta"
272
+ }
273
+ },
274
+ common: {
275
+ undo: "Deshacer",
276
+ clearAll: "Borrar todo",
277
+ correct: "Correcto",
278
+ incorrect: "Incorrecto",
279
+ showCorrectAnswer: "Mostrar respuesta correcta",
280
+ hideCorrectAnswer: "Ocultar respuesta correcta",
281
+ showTeacherInstructions: "Mostrar instrucciones para el maestro",
282
+ hideTeacherInstructions: "Ocultar instrucciones para el maestro",
283
+ commonCorrectAnswerWithAlternates: "Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.",
284
+ warning: "Advertencia",
285
+ showNote: "Mostrar Nota",
286
+ hideNote: "Ocultar Nota",
287
+ cancel: "Cancelar"
288
+ }
289
+ }, R = (e) => typeof e == "string", z = () => {
290
+ let e, t, n = new Promise((n, r) => {
291
+ e = n, t = r;
292
+ });
293
+ return n.resolve = e, n.reject = t, n;
294
+ }, te = (e) => e == null ? "" : "" + e, ne = (e, t, n) => {
295
+ e.forEach((e) => {
296
+ t[e] && (n[e] = t[e]);
297
+ });
298
+ }, B = /###/g, re = (e) => e && e.indexOf("###") > -1 ? e.replace(B, ".") : e, V = (e) => !e || R(e), H = (e, t, n) => {
299
+ let r = R(t) ? t.split(".") : t, i = 0;
300
+ for (; i < r.length - 1;) {
301
+ if (V(e)) return {};
302
+ let t = re(r[i]);
303
+ !e[t] && n && (e[t] = new n()), e = Object.prototype.hasOwnProperty.call(e, t) ? e[t] : {}, ++i;
304
+ }
305
+ return V(e) ? {} : {
306
+ obj: e,
307
+ k: re(r[i])
308
+ };
309
+ }, ie = (e, t, n) => {
310
+ let { obj: r, k: i } = H(e, t, Object);
311
+ if (r !== void 0 || t.length === 1) {
312
+ r[i] = n;
313
+ return;
314
+ }
315
+ let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = H(e, o, Object);
316
+ for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = H(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
317
+ s.obj[`${s.k}.${a}`] = n;
318
+ }, ae = (e, t, n, r) => {
319
+ let { obj: i, k: a } = H(e, t, Object);
320
+ i[a] = i[a] || [], i[a].push(n);
321
+ }, U = (e, t) => {
322
+ let { obj: n, k: r } = H(e, t);
323
+ if (n && Object.prototype.hasOwnProperty.call(n, r)) return n[r];
324
+ }, oe = (e, t, n) => {
325
+ let r = U(e, n);
326
+ return r === void 0 ? U(t, n) : r;
327
+ }, se = (e, t, n) => {
328
+ for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ? R(e[r]) || e[r] instanceof String || R(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : se(e[r], t[r], n) : e[r] = t[r]);
329
+ return e;
330
+ }, W = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), ce = {
331
+ "&": "&amp;",
332
+ "<": "&lt;",
333
+ ">": "&gt;",
334
+ "\"": "&quot;",
335
+ "'": "&#39;",
336
+ "/": "&#x2F;"
337
+ }, le = (e) => R(e) ? e.replace(/[&<>"'\/]/g, (e) => ce[e]) : e, ue = class {
338
+ constructor(e) {
339
+ this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
340
+ }
341
+ getRegExp(e) {
342
+ let t = this.regExpMap.get(e);
343
+ if (t !== void 0) return t;
344
+ let n = new RegExp(e);
345
+ return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, n), this.regExpQueue.push(e), n;
346
+ }
347
+ }, de = [
348
+ " ",
349
+ ",",
350
+ "?",
351
+ "!",
352
+ ";"
353
+ ], fe = new ue(20), pe = (e, t, n) => {
354
+ t ||= "", n ||= "";
355
+ let r = de.filter((e) => t.indexOf(e) < 0 && n.indexOf(e) < 0);
356
+ if (r.length === 0) return !0;
357
+ let i = fe.getRegExp(`(${r.map((e) => e === "?" ? "\\?" : e).join("|")})`), a = !i.test(e);
358
+ if (!a) {
359
+ let t = e.indexOf(n);
360
+ t > 0 && !i.test(e.substring(0, t)) && (a = !0);
361
+ }
362
+ return a;
363
+ }, me = (e, t, n = ".") => {
364
+ if (!e) return;
365
+ if (e[t]) return Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0;
366
+ let r = t.split(n), i = e;
367
+ for (let e = 0; e < r.length;) {
368
+ if (!i || typeof i != "object") return;
369
+ let t, a = "";
370
+ for (let o = e; o < r.length; ++o) if (o !== e && (a += n), a += r[o], t = i[a], t !== void 0) {
371
+ if ([
372
+ "string",
373
+ "number",
374
+ "boolean"
375
+ ].indexOf(typeof t) > -1 && o < r.length - 1) continue;
376
+ e += o - e + 1;
377
+ break;
378
+ }
379
+ i = t;
380
+ }
381
+ return i;
382
+ }, G = (e) => e?.replace(/_/g, "-"), he = {
383
+ type: "logger",
384
+ log(e) {
385
+ this.output("log", e);
386
+ },
387
+ warn(e) {
388
+ this.output("warn", e);
389
+ },
390
+ error(e) {
391
+ this.output("error", e);
392
+ },
393
+ output(e, t) {
394
+ console?.[e]?.apply?.(console, t);
395
+ }
396
+ }, K = new class e {
397
+ constructor(e, t = {}) {
398
+ this.init(e, t);
399
+ }
400
+ init(e, t = {}) {
401
+ this.prefix = t.prefix || "i18next:", this.logger = e || he, this.options = t, this.debug = t.debug;
402
+ }
403
+ log(...e) {
404
+ return this.forward(e, "log", "", !0);
405
+ }
406
+ warn(...e) {
407
+ return this.forward(e, "warn", "", !0);
408
+ }
409
+ error(...e) {
410
+ return this.forward(e, "error", "");
411
+ }
412
+ deprecate(...e) {
413
+ return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
414
+ }
415
+ forward(e, t, n, r) {
416
+ return r && !this.debug ? null : (R(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
417
+ }
418
+ create(t) {
419
+ return new e(this.logger, {
420
+ prefix: `${this.prefix}:${t}:`,
421
+ ...this.options
422
+ });
423
+ }
424
+ clone(t) {
425
+ return t ||= this.options, t.prefix = t.prefix || this.prefix, new e(this.logger, t);
426
+ }
427
+ }(), q = class {
428
+ constructor() {
429
+ this.observers = {};
430
+ }
431
+ on(e, t) {
432
+ return e.split(" ").forEach((e) => {
433
+ this.observers[e] || (this.observers[e] = /* @__PURE__ */ new Map());
434
+ let n = this.observers[e].get(t) || 0;
435
+ this.observers[e].set(t, n + 1);
436
+ }), this;
437
+ }
438
+ off(e, t) {
439
+ if (this.observers[e]) {
440
+ if (!t) {
441
+ delete this.observers[e];
442
+ return;
443
+ }
444
+ this.observers[e].delete(t);
445
+ }
446
+ }
447
+ emit(e, ...t) {
448
+ this.observers[e] && Array.from(this.observers[e].entries()).forEach(([e, n]) => {
449
+ for (let r = 0; r < n; r++) e(...t);
450
+ }), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach(([n, r]) => {
451
+ for (let i = 0; i < r; i++) n.apply(n, [e, ...t]);
452
+ });
453
+ }
454
+ }, ge = class extends q {
455
+ constructor(e, t = {
456
+ ns: ["translation"],
457
+ defaultNS: "translation"
458
+ }) {
459
+ super(), this.data = e || {}, this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = !0);
460
+ }
461
+ addNamespaces(e) {
462
+ this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
463
+ }
464
+ removeNamespaces(e) {
465
+ let t = this.options.ns.indexOf(e);
466
+ t > -1 && this.options.ns.splice(t, 1);
467
+ }
468
+ getResource(e, t, n, r = {}) {
469
+ let i = r.keySeparator === void 0 ? this.options.keySeparator : r.keySeparator, a = r.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r.ignoreJSONStructure, o;
470
+ e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : R(n) && i ? o.push(...n.split(i)) : o.push(n)));
471
+ let s = U(this.data, o);
472
+ return !s && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !R(n) ? s : me(this.data?.[e]?.[t], n, i);
473
+ }
474
+ addResource(e, t, n, r, i = { silent: !1 }) {
475
+ let a = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, o = [e, t];
476
+ n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), ie(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
477
+ }
478
+ addResources(e, t, n, r = { silent: !1 }) {
479
+ for (let r in n) (R(n[r]) || Array.isArray(n[r])) && this.addResource(e, t, r, n[r], { silent: !0 });
480
+ r.silent || this.emit("added", e, t, n);
481
+ }
482
+ addResourceBundle(e, t, n, r, i, a = {
483
+ silent: !1,
484
+ skipCopy: !1
485
+ }) {
486
+ let o = [e, t];
487
+ e.indexOf(".") > -1 && (o = e.split("."), r = n, n = t, t = o[1]), this.addNamespaces(t);
488
+ let s = U(this.data, o) || {};
489
+ a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? se(s, n, i) : s = {
490
+ ...s,
491
+ ...n
492
+ }, ie(this.data, o, s), a.silent || this.emit("added", e, t, n);
493
+ }
494
+ removeResourceBundle(e, t) {
495
+ this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
496
+ }
497
+ hasResourceBundle(e, t) {
498
+ return this.getResource(e, t) !== void 0;
499
+ }
500
+ getResourceBundle(e, t) {
501
+ return t ||= this.options.defaultNS, this.getResource(e, t);
502
+ }
503
+ getDataByLanguage(e) {
504
+ return this.data[e];
505
+ }
506
+ hasLanguageSomeTranslations(e) {
507
+ let t = this.getDataByLanguage(e);
508
+ return !!(t && Object.keys(t) || []).find((e) => t[e] && Object.keys(t[e]).length > 0);
509
+ }
510
+ toJSON() {
511
+ return this.data;
512
+ }
513
+ }, _e = {
514
+ processors: {},
515
+ addPostProcessor(e) {
516
+ this.processors[e.name] = e;
517
+ },
518
+ handle(e, t, n, r, i) {
519
+ return e.forEach((e) => {
520
+ t = this.processors[e]?.process(t, n, r, i) ?? t;
521
+ }), t;
522
+ }
523
+ }, ve = Symbol("i18next/PATH_KEY");
524
+ function ye() {
525
+ let e = [], t = Object.create(null), n;
526
+ return t.get = (r, i) => (n?.revoke?.(), i === ve ? e : (e.push(i), n = Proxy.revocable(r, t), n.proxy)), Proxy.revocable(Object.create(null), t).proxy;
527
+ }
528
+ function J(e, t) {
529
+ let { [ve]: n } = e(ye()), r = t?.keySeparator ?? ".", i = t?.nsSeparator ?? ":";
530
+ if (n.length > 1 && i) {
531
+ let e = t?.ns, a = Array.isArray(e) ? e : null;
532
+ if (a && a.length > 1 && a.slice(1).includes(n[0])) return `${n[0]}${i}${n.slice(1).join(r)}`;
533
+ }
534
+ return n.join(r);
535
+ }
536
+ var be = {}, xe = (e) => !R(e) && typeof e != "boolean" && typeof e != "number", Se = class e extends q {
537
+ constructor(e, t = {}) {
538
+ super(), ne([
539
+ "resourceStore",
540
+ "languageUtils",
541
+ "pluralResolver",
542
+ "interpolator",
543
+ "backendConnector",
544
+ "i18nFormat",
545
+ "utils"
546
+ ], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = K.create("translator");
547
+ }
548
+ changeLanguage(e) {
549
+ e && (this.language = e);
550
+ }
551
+ exists(e, t = { interpolation: {} }) {
552
+ let n = { ...t };
553
+ if (e == null) return !1;
554
+ let r = this.resolve(e, n);
555
+ if (r?.res === void 0) return !1;
556
+ let i = xe(r.res);
557
+ return !(n.returnObjects === !1 && i);
558
+ }
559
+ extractFromKey(e, t) {
560
+ let n = t.nsSeparator === void 0 ? this.options.nsSeparator : t.nsSeparator;
561
+ n === void 0 && (n = ":");
562
+ let r = t.keySeparator === void 0 ? this.options.keySeparator : t.keySeparator, i = t.ns || this.options.defaultNS || [], a = n && e.indexOf(n) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !pe(e, n, r);
563
+ if (a && !o) {
564
+ let t = e.match(this.interpolator.nestingRegexp);
565
+ if (t && t.length > 0) return {
566
+ key: e,
567
+ namespaces: R(i) ? [i] : i
568
+ };
569
+ let a = e.split(n);
570
+ (n !== r || n === r && this.options.ns.indexOf(a[0]) > -1) && (i = a.shift()), e = a.join(r);
571
+ }
572
+ return {
573
+ key: e,
574
+ namespaces: R(i) ? [i] : i
575
+ };
576
+ }
577
+ translate(t, n, r) {
578
+ let i = typeof n == "object" ? { ...n } : n;
579
+ if (typeof i != "object" && this.options.overloadTranslationOptionHandler && (i = this.options.overloadTranslationOptionHandler(arguments)), typeof i == "object" && (i = { ...i }), i ||= {}, t == null) return "";
580
+ typeof t == "function" && (t = J(t, {
581
+ ...this.options,
582
+ ...i
583
+ })), Array.isArray(t) || (t = [String(t)]), t = t.map((e) => typeof e == "function" ? J(e, {
584
+ ...this.options,
585
+ ...i
586
+ }) : String(e));
587
+ let a = i.returnDetails === void 0 ? this.options.returnDetails : i.returnDetails, o = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, { key: s, namespaces: c } = this.extractFromKey(t[t.length - 1], i), l = c[c.length - 1], u = i.nsSeparator === void 0 ? this.options.nsSeparator : i.nsSeparator;
588
+ u === void 0 && (u = ":");
589
+ let d = i.lng || this.language, f = i.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
590
+ if (d?.toLowerCase() === "cimode") return f ? a ? {
591
+ res: `${l}${u}${s}`,
592
+ usedKey: s,
593
+ exactUsedKey: s,
594
+ usedLng: d,
595
+ usedNS: l,
596
+ usedParams: this.getUsedParamsDetails(i)
597
+ } : `${l}${u}${s}` : a ? {
598
+ res: s,
599
+ usedKey: s,
600
+ exactUsedKey: s,
601
+ usedLng: d,
602
+ usedNS: l,
603
+ usedParams: this.getUsedParamsDetails(i)
604
+ } : s;
605
+ let p = this.resolve(t, i), m = p?.res, h = p?.usedKey || s, g = p?.exactUsedKey || s, _ = [
606
+ "[object Number]",
607
+ "[object Function]",
608
+ "[object RegExp]"
609
+ ], v = i.joinArrays === void 0 ? this.options.joinArrays : i.joinArrays, y = !this.i18nFormat || this.i18nFormat.handleAsObject, b = i.count !== void 0 && !R(i.count), x = e.hasDefaultValue(i), S = b ? this.pluralResolver.getSuffix(d, i.count, i) : "", C = i.ordinal && b ? this.pluralResolver.getSuffix(d, i.count, { ordinal: !1 }) : "", w = b && !i.ordinal && i.count === 0, T = w && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${S}`] || i[`defaultValue${C}`] || i.defaultValue, E = m;
610
+ y && !m && x && (E = T);
611
+ let D = xe(E), O = Object.prototype.toString.apply(E);
612
+ if (y && E && D && _.indexOf(O) < 0 && !(R(v) && Array.isArray(E))) {
613
+ if (!i.returnObjects && !this.options.returnObjects) {
614
+ this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
615
+ let e = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h, E, {
616
+ ...i,
617
+ ns: c
618
+ }) : `key '${s} (${this.language})' returned an object instead of string.`;
619
+ return a ? (p.res = e, p.usedParams = this.getUsedParamsDetails(i), p) : e;
620
+ }
621
+ if (o) {
622
+ let e = Array.isArray(E), t = e ? [] : {}, n = e ? g : h;
623
+ for (let e in E) if (Object.prototype.hasOwnProperty.call(E, e)) {
624
+ let r = `${n}${o}${e}`;
625
+ x && !m ? t[e] = this.translate(r, {
626
+ ...i,
627
+ defaultValue: xe(T) ? T[e] : void 0,
628
+ joinArrays: !1,
629
+ ns: c
630
+ }) : t[e] = this.translate(r, {
631
+ ...i,
632
+ joinArrays: !1,
633
+ ns: c
634
+ }), t[e] === r && (t[e] = E[e]);
635
+ }
636
+ m = t;
637
+ }
638
+ } else if (y && R(v) && Array.isArray(m)) m = m.join(v), m &&= this.extendTranslation(m, t, i, r);
639
+ else {
640
+ let e = !1, n = !1;
641
+ !this.isValidLookup(m) && x && (e = !0, m = T), this.isValidLookup(m) || (n = !0, m = s);
642
+ let a = (i.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && n ? void 0 : m, c = x && T !== m && this.options.updateMissing;
643
+ if (n || e || c) {
644
+ if (this.logger.log(c ? "updateKey" : "missingKey", d, l, s, c ? T : m), o) {
645
+ let e = this.resolve(s, {
646
+ ...i,
647
+ keySeparator: !1
648
+ });
649
+ e && e.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
650
+ }
651
+ let e = [], t = this.languageUtils.getFallbackCodes(this.options.fallbackLng, i.lng || this.language);
652
+ if (this.options.saveMissingTo === "fallback" && t && t[0]) for (let n = 0; n < t.length; n++) e.push(t[n]);
653
+ else this.options.saveMissingTo === "all" ? e = this.languageUtils.toResolveHierarchy(i.lng || this.language) : e.push(i.lng || this.language);
654
+ let n = (e, t, n) => {
655
+ let r = x && n !== m ? n : a;
656
+ this.options.missingKeyHandler ? this.options.missingKeyHandler(e, l, t, r, c, i) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(e, l, t, r, c, i), this.emit("missingKey", e, l, t, m);
657
+ };
658
+ this.options.saveMissing && (this.options.saveMissingPlurals && b ? e.forEach((e) => {
659
+ let t = this.pluralResolver.getSuffixes(e, i);
660
+ w && i[`defaultValue${this.options.pluralSeparator}zero`] && t.indexOf(`${this.options.pluralSeparator}zero`) < 0 && t.push(`${this.options.pluralSeparator}zero`), t.forEach((t) => {
661
+ n([e], s + t, i[`defaultValue${t}`] || T);
662
+ });
663
+ }) : n(e, s, T));
664
+ }
665
+ m = this.extendTranslation(m, t, i, p, r), n && m === s && this.options.appendNamespaceToMissingKey && (m = `${l}${u}${s}`), (n || e) && this.options.parseMissingKeyHandler && (m = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}${u}${s}` : s, e ? m : void 0, i));
666
+ }
667
+ return a ? (p.res = m, p.usedParams = this.getUsedParamsDetails(i), p) : m;
668
+ }
669
+ extendTranslation(e, t, n, r, i) {
670
+ if (this.i18nFormat?.parse) e = this.i18nFormat.parse(e, {
671
+ ...this.options.interpolation.defaultVariables,
672
+ ...n
673
+ }, n.lng || this.language || r.usedLng, r.usedNS, r.usedKey, { resolved: r });
674
+ else if (!n.skipInterpolation) {
675
+ n.interpolation && this.interpolator.init({
676
+ ...n,
677
+ interpolation: {
678
+ ...this.options.interpolation,
679
+ ...n.interpolation
680
+ }
681
+ });
682
+ let a = R(e) && (n?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n.interpolation.skipOnVariables), o;
683
+ if (a) {
684
+ let t = e.match(this.interpolator.nestingRegexp);
685
+ o = t && t.length;
686
+ }
687
+ let s = n.replace && !R(n.replace) ? n.replace : n;
688
+ if (this.options.interpolation.defaultVariables && (s = {
689
+ ...this.options.interpolation.defaultVariables,
690
+ ...s
691
+ }), e = this.interpolator.interpolate(e, s, n.lng || this.language || r.usedLng, n), a) {
692
+ let t = e.match(this.interpolator.nestingRegexp), r = t && t.length;
693
+ o < r && (n.nest = !1);
694
+ }
695
+ !n.lng && r && r.res && (n.lng = this.language || r.usedLng), n.nest !== !1 && (e = this.interpolator.nest(e, (...e) => i?.[0] === e[0] && !n.context ? (this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`), null) : this.translate(...e, t), n)), n.interpolation && this.interpolator.reset();
696
+ }
697
+ let a = n.postProcess || this.options.postProcess, o = R(a) ? [a] : a;
698
+ return e != null && o?.length && n.applyPostProcessor !== !1 && (e = _e.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
699
+ i18nResolved: {
700
+ ...r,
701
+ usedParams: this.getUsedParamsDetails(n)
702
+ },
703
+ ...n
704
+ } : n, this)), e;
705
+ }
706
+ resolve(e, t = {}) {
707
+ let n, r, i, a, o;
708
+ return R(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? J(e, {
709
+ ...this.options,
710
+ ...t
711
+ }) : e)), e.forEach((e) => {
712
+ if (this.isValidLookup(n)) return;
713
+ let s = this.extractFromKey(e, t), c = s.key;
714
+ r = c;
715
+ let l = s.namespaces;
716
+ this.options.fallbackNS && (l = l.concat(this.options.fallbackNS));
717
+ let u = t.count !== void 0 && !R(t.count), d = u && !t.ordinal && t.count === 0, f = t.context !== void 0 && (R(t.context) || typeof t.context == "number") && t.context !== "", p = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
718
+ l.forEach((e) => {
719
+ this.isValidLookup(n) || (o = e, !be[`${p[0]}-${e}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (be[`${p[0]}-${e}`] = !0, this.logger.warn(`key "${r}" for languages "${p.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), p.forEach((r) => {
720
+ if (this.isValidLookup(n)) return;
721
+ a = r;
722
+ let o = [c];
723
+ if (this.i18nFormat?.addLookupKeys) this.i18nFormat.addLookupKeys(o, c, r, e, t);
724
+ else {
725
+ let e;
726
+ u && (e = this.pluralResolver.getSuffix(r, t.count, t));
727
+ let n = `${this.options.pluralSeparator}zero`, i = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
728
+ if (u && (t.ordinal && e.indexOf(i) === 0 && o.push(c + e.replace(i, this.options.pluralSeparator)), o.push(c + e), d && o.push(c + n)), f) {
729
+ let r = `${c}${this.options.contextSeparator || "_"}${t.context}`;
730
+ o.push(r), u && (t.ordinal && e.indexOf(i) === 0 && o.push(r + e.replace(i, this.options.pluralSeparator)), o.push(r + e), d && o.push(r + n));
731
+ }
732
+ }
733
+ let s;
734
+ for (; s = o.pop();) this.isValidLookup(n) || (i = s, n = this.getResource(r, e, s, t));
735
+ }));
736
+ });
737
+ }), {
738
+ res: n,
739
+ usedKey: r,
740
+ exactUsedKey: i,
741
+ usedLng: a,
742
+ usedNS: o
743
+ };
744
+ }
745
+ isValidLookup(e) {
746
+ return e !== void 0 && !(!this.options.returnNull && e === null) && !(!this.options.returnEmptyString && e === "");
747
+ }
748
+ getResource(e, t, n, r = {}) {
749
+ return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e, t, n, r) : this.resourceStore.getResource(e, t, n, r);
750
+ }
751
+ getUsedParamsDetails(e = {}) {
752
+ let t = [
753
+ "defaultValue",
754
+ "ordinal",
755
+ "context",
756
+ "replace",
757
+ "lng",
758
+ "lngs",
759
+ "fallbackLng",
760
+ "ns",
761
+ "keySeparator",
762
+ "nsSeparator",
763
+ "returnObjects",
764
+ "returnDetails",
765
+ "joinArrays",
766
+ "postProcess",
767
+ "interpolation"
768
+ ], n = e.replace && !R(e.replace), r = n ? e.replace : e;
769
+ if (n && e.count !== void 0 && (r.count = e.count), this.options.interpolation.defaultVariables && (r = {
770
+ ...this.options.interpolation.defaultVariables,
771
+ ...r
772
+ }), !n) {
773
+ r = { ...r };
774
+ for (let e of t) delete r[e];
775
+ }
776
+ return r;
777
+ }
778
+ static hasDefaultValue(e) {
779
+ for (let t in e) if (Object.prototype.hasOwnProperty.call(e, t) && t.substring(0, 12) === "defaultValue" && e[t] !== void 0) return !0;
780
+ return !1;
781
+ }
782
+ }, Ce = class {
783
+ constructor(e) {
784
+ this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = K.create("languageUtils");
785
+ }
786
+ getScriptPartFromCode(e) {
787
+ if (e = G(e), !e || e.indexOf("-") < 0) return null;
788
+ let t = e.split("-");
789
+ return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
790
+ }
791
+ getLanguagePartFromCode(e) {
792
+ if (e = G(e), !e || e.indexOf("-") < 0) return e;
793
+ let t = e.split("-");
794
+ return this.formatLanguageCode(t[0]);
795
+ }
796
+ formatLanguageCode(e) {
797
+ if (R(e) && e.indexOf("-") > -1) {
798
+ let t;
799
+ try {
800
+ t = Intl.getCanonicalLocales(e)[0];
801
+ } catch {}
802
+ return t && this.options.lowerCaseLng && (t = t.toLowerCase()), t || (this.options.lowerCaseLng ? e.toLowerCase() : e);
803
+ }
804
+ return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e;
805
+ }
806
+ isSupportedCode(e) {
807
+ return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (e = this.getLanguagePartFromCode(e)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(e) > -1;
808
+ }
809
+ getBestMatchFromCodes(e) {
810
+ if (!e) return null;
811
+ let t;
812
+ return e.forEach((e) => {
813
+ if (t) return;
814
+ let n = this.formatLanguageCode(e);
815
+ (!this.options.supportedLngs || this.isSupportedCode(n)) && (t = n);
816
+ }), !t && this.options.supportedLngs && e.forEach((e) => {
817
+ if (t) return;
818
+ let n = this.getScriptPartFromCode(e);
819
+ if (this.isSupportedCode(n)) return t = n;
820
+ let r = this.getLanguagePartFromCode(e);
821
+ if (this.isSupportedCode(r)) return t = r;
822
+ t = this.options.supportedLngs.find((e) => {
823
+ if (e === r || !(e.indexOf("-") < 0 && r.indexOf("-") < 0) && (e.indexOf("-") > 0 && r.indexOf("-") < 0 && e.substring(0, e.indexOf("-")) === r || e.indexOf(r) === 0 && r.length > 1)) return e;
824
+ });
825
+ }), t ||= this.getFallbackCodes(this.options.fallbackLng)[0], t;
826
+ }
827
+ getFallbackCodes(e, t) {
828
+ if (!e) return [];
829
+ if (typeof e == "function" && (e = e(t)), R(e) && (e = [e]), Array.isArray(e)) return e;
830
+ if (!t) return e.default || [];
831
+ let n = e[t];
832
+ return n ||= e[this.getScriptPartFromCode(t)], n ||= e[this.formatLanguageCode(t)], n ||= e[this.getLanguagePartFromCode(t)], n ||= e.default, n || [];
833
+ }
834
+ toResolveHierarchy(e, t) {
835
+ let n = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), r = [], i = (e) => {
836
+ e && (this.isSupportedCode(e) ? r.push(e) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`));
837
+ };
838
+ return R(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && i(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && i(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && i(this.getLanguagePartFromCode(e))) : R(e) && i(this.formatLanguageCode(e)), n.forEach((e) => {
839
+ r.indexOf(e) < 0 && i(this.formatLanguageCode(e));
840
+ }), r;
841
+ }
842
+ }, we = {
843
+ zero: 0,
844
+ one: 1,
845
+ two: 2,
846
+ few: 3,
847
+ many: 4,
848
+ other: 5
849
+ }, Te = {
850
+ select: (e) => e === 1 ? "one" : "other",
851
+ resolvedOptions: () => ({ pluralCategories: ["one", "other"] })
852
+ }, Ee = class {
853
+ constructor(e, t = {}) {
854
+ this.languageUtils = e, this.options = t, this.logger = K.create("pluralResolver"), this.pluralRulesCache = {};
855
+ }
856
+ clearCache() {
857
+ this.pluralRulesCache = {};
858
+ }
859
+ getRule(e, t = {}) {
860
+ let n = G(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
861
+ cleanedCode: n,
862
+ type: r
863
+ });
864
+ if (i in this.pluralRulesCache) return this.pluralRulesCache[i];
865
+ let a;
866
+ try {
867
+ a = new Intl.PluralRules(n, { type: r });
868
+ } catch {
869
+ if (typeof Intl > "u") return this.logger.error("No Intl support, please use an Intl polyfill!"), Te;
870
+ if (!e.match(/-|_/)) return Te;
871
+ let n = this.languageUtils.getLanguagePartFromCode(e);
872
+ a = this.getRule(n, t);
873
+ }
874
+ return this.pluralRulesCache[i] = a, a;
875
+ }
876
+ needsPlural(e, t = {}) {
877
+ let n = this.getRule(e, t);
878
+ return n ||= this.getRule("dev", t), n?.resolvedOptions().pluralCategories.length > 1;
879
+ }
880
+ getPluralFormsOfKey(e, t, n = {}) {
881
+ return this.getSuffixes(e, n).map((e) => `${t}${e}`);
882
+ }
883
+ getSuffixes(e, t = {}) {
884
+ let n = this.getRule(e, t);
885
+ return n ||= this.getRule("dev", t), n ? n.resolvedOptions().pluralCategories.sort((e, t) => we[e] - we[t]).map((e) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${e}`) : [];
886
+ }
887
+ getSuffix(e, t, n = {}) {
888
+ let r = this.getRule(e, n);
889
+ return r ? `${this.options.prepend}${n.ordinal ? `ordinal${this.options.prepend}` : ""}${r.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, n));
890
+ }
891
+ }, De = (e, t, n, r = ".", i = !0) => {
892
+ let a = oe(e, t, n);
893
+ return !a && i && R(n) && (a = me(e, n, r), a === void 0 && (a = me(t, n, r))), a;
894
+ }, Oe = (e) => e.replace(/\$/g, "$$$$"), ke = class {
895
+ constructor(e = {}) {
896
+ this.logger = K.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((e) => e), this.init(e);
897
+ }
898
+ init(e = {}) {
899
+ e.interpolation ||= { escapeValue: !0 };
900
+ let { escape: t, escapeValue: n, useRawValueToEscape: r, prefix: i, prefixEscaped: a, suffix: o, suffixEscaped: s, formatSeparator: c, unescapeSuffix: l, unescapePrefix: u, nestingPrefix: d, nestingPrefixEscaped: f, nestingSuffix: p, nestingSuffixEscaped: m, nestingOptionsSeparator: h, maxReplaces: g, alwaysFormat: _ } = e.interpolation;
901
+ this.escape = t === void 0 ? le : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? W(i) : a || "{{", this.suffix = o ? W(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? W(d) : f || W("$t("), this.nestingSuffix = p ? W(p) : m || W(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = _ !== void 0 && _, this.resetRegExp();
902
+ }
903
+ reset() {
904
+ this.options && this.init(this.options);
905
+ }
906
+ resetRegExp() {
907
+ let e = (e, t) => e?.source === t ? (e.lastIndex = 0, e) : new RegExp(t, "g");
908
+ this.regexp = e(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = e(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = e(this.nestingRegexp, `${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`);
909
+ }
910
+ interpolate(e, t, n, r) {
911
+ let i, a, o, s = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (e) => {
912
+ if (e.indexOf(this.formatSeparator) < 0) {
913
+ let i = De(t, s, e, this.options.keySeparator, this.options.ignoreJSONStructure);
914
+ return this.alwaysFormat ? this.format(i, void 0, n, {
915
+ ...r,
916
+ ...t,
917
+ interpolationkey: e
918
+ }) : i;
919
+ }
920
+ let i = e.split(this.formatSeparator), a = i.shift().trim(), o = i.join(this.formatSeparator).trim();
921
+ return this.format(De(t, s, a, this.options.keySeparator, this.options.ignoreJSONStructure), o, n, {
922
+ ...r,
923
+ ...t,
924
+ interpolationkey: a
925
+ });
926
+ };
927
+ this.resetRegExp();
928
+ let l = r?.missingInterpolationHandler || this.options.missingInterpolationHandler, u = r?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r.interpolation.skipOnVariables;
929
+ return [{
930
+ regex: this.regexpUnescape,
931
+ safeValue: (e) => Oe(e)
932
+ }, {
933
+ regex: this.regexp,
934
+ safeValue: (e) => this.escapeValue ? Oe(this.escape(e)) : Oe(e)
935
+ }].forEach((t) => {
936
+ for (o = 0; i = t.regex.exec(e);) {
937
+ let n = i[1].trim();
938
+ if (a = c(n), a === void 0) if (typeof l == "function") {
939
+ let t = l(e, i, r);
940
+ a = R(t) ? t : "";
941
+ } else if (r && Object.prototype.hasOwnProperty.call(r, n)) a = "";
942
+ else if (u) {
943
+ a = i[0];
944
+ continue;
945
+ } else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`), a = "";
946
+ else !R(a) && !this.useRawValueToEscape && (a = te(a));
947
+ let s = t.safeValue(a);
948
+ if (e = e.replace(i[0], s), u ? (t.regex.lastIndex += a.length, t.regex.lastIndex -= i[0].length) : t.regex.lastIndex = 0, o++, o >= this.maxReplaces) break;
949
+ }
950
+ }), e;
951
+ }
952
+ nest(e, t, n = {}) {
953
+ let r, i, a, o = (e, t) => {
954
+ let n = this.nestingOptionsSeparator;
955
+ if (e.indexOf(n) < 0) return e;
956
+ let r = e.split(RegExp(`${W(n)}[ ]*{`)), i = `{${r[1]}`;
957
+ e = r[0], i = this.interpolate(i, a);
958
+ let o = i.match(/'/g), s = i.match(/"/g);
959
+ ((o?.length ?? 0) % 2 == 0 && !s || (s?.length ?? 0) % 2 != 0) && (i = i.replace(/'/g, "\""));
960
+ try {
961
+ a = JSON.parse(i), t && (a = {
962
+ ...t,
963
+ ...a
964
+ });
965
+ } catch (t) {
966
+ return this.logger.warn(`failed parsing options string in nesting for key ${e}`, t), `${e}${n}${i}`;
967
+ }
968
+ return a.defaultValue && a.defaultValue.indexOf(this.prefix) > -1 && delete a.defaultValue, e;
969
+ };
970
+ for (; r = this.nestingRegexp.exec(e);) {
971
+ let s = [];
972
+ a = { ...n }, a = a.replace && !R(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
973
+ let c = /{.*}/.test(r[1]) ? r[1].lastIndexOf("}") + 1 : r[1].indexOf(this.formatSeparator);
974
+ if (c !== -1 && (s = r[1].slice(c).split(this.formatSeparator).map((e) => e.trim()).filter(Boolean), r[1] = r[1].slice(0, c)), i = t(o.call(this, r[1].trim(), a), a), i && r[0] === e && !R(i)) return i;
975
+ R(i) || (i = te(i)), i ||= (this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`), ""), s.length && (i = s.reduce((e, t) => this.format(e, t, n.lng, {
976
+ ...n,
977
+ interpolationkey: r[1].trim()
978
+ }), i.trim())), e = e.replace(r[0], i), this.regexp.lastIndex = 0;
979
+ }
980
+ return e;
981
+ }
982
+ }, Ae = (e) => {
983
+ let t = e.toLowerCase().trim(), n = {};
984
+ if (e.indexOf("(") > -1) {
985
+ let r = e.split("(");
986
+ t = r[0].toLowerCase().trim();
987
+ let i = r[1].substring(0, r[1].length - 1);
988
+ t === "currency" && i.indexOf(":") < 0 ? n.currency ||= i.trim() : t === "relativetime" && i.indexOf(":") < 0 ? n.range ||= i.trim() : i.split(";").forEach((e) => {
989
+ if (e) {
990
+ let [t, ...r] = e.split(":"), i = r.join(":").trim().replace(/^'+|'+$/g, ""), a = t.trim();
991
+ n[a] || (n[a] = i), i === "false" && (n[a] = !1), i === "true" && (n[a] = !0), isNaN(i) || (n[a] = parseInt(i, 10));
992
+ }
993
+ });
994
+ }
995
+ return {
996
+ formatName: t,
997
+ formatOptions: n
998
+ };
999
+ }, Y = (e) => {
1000
+ let t = {};
1001
+ return (n, r, i) => {
1002
+ let a = i;
1003
+ i && i.interpolationkey && i.formatParams && i.formatParams[i.interpolationkey] && i[i.interpolationkey] && (a = {
1004
+ ...a,
1005
+ [i.interpolationkey]: void 0
1006
+ });
1007
+ let o = r + JSON.stringify(a), s = t[o];
1008
+ return s || (s = e(G(r), i), t[o] = s), s(n);
1009
+ };
1010
+ }, je = (e) => (t, n, r) => e(G(n), r)(t), Me = class {
1011
+ constructor(e = {}) {
1012
+ this.logger = K.create("formatter"), this.options = e, this.init(e);
1013
+ }
1014
+ init(e, t = { interpolation: {} }) {
1015
+ this.formatSeparator = t.interpolation.formatSeparator || ",";
1016
+ let n = t.cacheInBuiltFormats ? Y : je;
1017
+ this.formats = {
1018
+ number: n((e, t) => {
1019
+ let n = new Intl.NumberFormat(e, { ...t });
1020
+ return (e) => n.format(e);
1021
+ }),
1022
+ currency: n((e, t) => {
1023
+ let n = new Intl.NumberFormat(e, {
1024
+ ...t,
1025
+ style: "currency"
1026
+ });
1027
+ return (e) => n.format(e);
1028
+ }),
1029
+ datetime: n((e, t) => {
1030
+ let n = new Intl.DateTimeFormat(e, { ...t });
1031
+ return (e) => n.format(e);
1032
+ }),
1033
+ relativetime: n((e, t) => {
1034
+ let n = new Intl.RelativeTimeFormat(e, { ...t });
1035
+ return (e) => n.format(e, t.range || "day");
1036
+ }),
1037
+ list: n((e, t) => {
1038
+ let n = new Intl.ListFormat(e, { ...t });
1039
+ return (e) => n.format(e);
1040
+ })
1041
+ };
1042
+ }
1043
+ add(e, t) {
1044
+ this.formats[e.toLowerCase().trim()] = t;
1045
+ }
1046
+ addCached(e, t) {
1047
+ this.formats[e.toLowerCase().trim()] = Y(t);
1048
+ }
1049
+ format(e, t, n, r = {}) {
1050
+ let i = t.split(this.formatSeparator);
1051
+ if (i.length > 1 && i[0].indexOf("(") > 1 && i[0].indexOf(")") < 0 && i.find((e) => e.indexOf(")") > -1)) {
1052
+ let e = i.findIndex((e) => e.indexOf(")") > -1);
1053
+ i[0] = [i[0], ...i.splice(1, e)].join(this.formatSeparator);
1054
+ }
1055
+ return i.reduce((e, t) => {
1056
+ let { formatName: i, formatOptions: a } = Ae(t);
1057
+ if (this.formats[i]) {
1058
+ let t = e;
1059
+ try {
1060
+ let o = r?.formatParams?.[r.interpolationkey] || {}, s = o.locale || o.lng || r.locale || r.lng || n;
1061
+ t = this.formats[i](e, s, {
1062
+ ...a,
1063
+ ...r,
1064
+ ...o
1065
+ });
1066
+ } catch (e) {
1067
+ this.logger.warn(e);
1068
+ }
1069
+ return t;
1070
+ } else this.logger.warn(`there was no format function for ${i}`);
1071
+ return e;
1072
+ }, e);
1073
+ }
1074
+ }, Ne = (e, t) => {
1075
+ e.pending[t] !== void 0 && (delete e.pending[t], e.pendingCount--);
1076
+ }, Pe = class extends q {
1077
+ constructor(e, t, n, r = {}) {
1078
+ super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger = K.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = r.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r.maxRetries >= 0 ? r.maxRetries : 5, this.retryTimeout = r.retryTimeout >= 1 ? r.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n, r.backend, r);
1079
+ }
1080
+ queueLoad(e, t, n, r) {
1081
+ let i = {}, a = {}, o = {}, s = {};
1082
+ return e.forEach((e) => {
1083
+ let r = !0;
1084
+ t.forEach((t) => {
1085
+ let o = `${e}|${t}`;
1086
+ !n.reload && this.store.hasResourceBundle(e, t) ? this.state[o] = 2 : this.state[o] < 0 || (this.state[o] === 1 ? a[o] === void 0 && (a[o] = !0) : (this.state[o] = 1, r = !1, a[o] === void 0 && (a[o] = !0), i[o] === void 0 && (i[o] = !0), s[t] === void 0 && (s[t] = !0)));
1087
+ }), r || (o[e] = !0);
1088
+ }), (Object.keys(i).length || Object.keys(a).length) && this.queue.push({
1089
+ pending: a,
1090
+ pendingCount: Object.keys(a).length,
1091
+ loaded: {},
1092
+ errors: [],
1093
+ callback: r
1094
+ }), {
1095
+ toLoad: Object.keys(i),
1096
+ pending: Object.keys(a),
1097
+ toLoadLanguages: Object.keys(o),
1098
+ toLoadNamespaces: Object.keys(s)
1099
+ };
1100
+ }
1101
+ loaded(e, t, n) {
1102
+ let r = e.split("|"), i = r[0], a = r[1];
1103
+ t && this.emit("failedLoading", i, a, t), !t && n && this.store.addResourceBundle(i, a, n, void 0, void 0, { skipCopy: !0 }), this.state[e] = t ? -1 : 2, t && n && (this.state[e] = 0);
1104
+ let o = {};
1105
+ this.queue.forEach((n) => {
1106
+ ae(n.loaded, [i], a), Ne(n, e), t && n.errors.push(t), n.pendingCount === 0 && !n.done && (Object.keys(n.loaded).forEach((e) => {
1107
+ o[e] || (o[e] = {});
1108
+ let t = n.loaded[e];
1109
+ t.length && t.forEach((t) => {
1110
+ o[e][t] === void 0 && (o[e][t] = !0);
1111
+ });
1112
+ }), n.done = !0, n.errors.length ? n.callback(n.errors) : n.callback());
1113
+ }), this.emit("loaded", o), this.queue = this.queue.filter((e) => !e.done);
1114
+ }
1115
+ read(e, t, n, r = 0, i = this.retryTimeout, a) {
1116
+ if (!e.length) return a(null, {});
1117
+ if (this.readingCalls >= this.maxParallelReads) {
1118
+ this.waitingReads.push({
1119
+ lng: e,
1120
+ ns: t,
1121
+ fcName: n,
1122
+ tried: r,
1123
+ wait: i,
1124
+ callback: a
1125
+ });
1126
+ return;
1127
+ }
1128
+ this.readingCalls++;
1129
+ let o = (o, s) => {
1130
+ if (this.readingCalls--, this.waitingReads.length > 0) {
1131
+ let e = this.waitingReads.shift();
1132
+ this.read(e.lng, e.ns, e.fcName, e.tried, e.wait, e.callback);
1133
+ }
1134
+ if (o && s && r < this.maxRetries) {
1135
+ setTimeout(() => {
1136
+ this.read.call(this, e, t, n, r + 1, i * 2, a);
1137
+ }, i);
1138
+ return;
1139
+ }
1140
+ a(o, s);
1141
+ }, s = this.backend[n].bind(this.backend);
1142
+ if (s.length === 2) {
1143
+ try {
1144
+ let n = s(e, t);
1145
+ n && typeof n.then == "function" ? n.then((e) => o(null, e)).catch(o) : o(null, n);
1146
+ } catch (e) {
1147
+ o(e);
1148
+ }
1149
+ return;
1150
+ }
1151
+ return s(e, t, o);
1152
+ }
1153
+ prepareLoading(e, t, n = {}, r) {
1154
+ if (!this.backend) return this.logger.warn("No backend was added via i18next.use. Will not load resources."), r && r();
1155
+ R(e) && (e = this.languageUtils.toResolveHierarchy(e)), R(t) && (t = [t]);
1156
+ let i = this.queueLoad(e, t, n, r);
1157
+ if (!i.toLoad.length) return i.pending.length || r(), null;
1158
+ i.toLoad.forEach((e) => {
1159
+ this.loadOne(e);
1160
+ });
1161
+ }
1162
+ load(e, t, n) {
1163
+ this.prepareLoading(e, t, {}, n);
1164
+ }
1165
+ reload(e, t, n) {
1166
+ this.prepareLoading(e, t, { reload: !0 }, n);
1167
+ }
1168
+ loadOne(e, t = "") {
1169
+ let n = e.split("|"), r = n[0], i = n[1];
1170
+ this.read(r, i, "read", void 0, void 0, (n, a) => {
1171
+ n && this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`, n), !n && a && this.logger.log(`${t}loaded namespace ${i} for language ${r}`, a), this.loaded(e, n, a);
1172
+ });
1173
+ }
1174
+ saveMissing(e, t, n, r, i, a = {}, o = () => {}) {
1175
+ if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(t)) {
1176
+ this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");
1177
+ return;
1178
+ }
1179
+ if (!(n == null || n === "")) {
1180
+ if (this.backend?.create) {
1181
+ let s = {
1182
+ ...a,
1183
+ isUpdate: i
1184
+ }, c = this.backend.create.bind(this.backend);
1185
+ if (c.length < 6) try {
1186
+ let i;
1187
+ i = c.length === 5 ? c(e, t, n, r, s) : c(e, t, n, r), i && typeof i.then == "function" ? i.then((e) => o(null, e)).catch(o) : o(null, i);
1188
+ } catch (e) {
1189
+ o(e);
1190
+ }
1191
+ else c(e, t, n, r, o, s);
1192
+ }
1193
+ !e || !e[0] || this.store.addResource(e[0], t, n, r);
1194
+ }
1195
+ }
1196
+ }, Fe = () => ({
1197
+ debug: !1,
1198
+ initAsync: !0,
1199
+ ns: ["translation"],
1200
+ defaultNS: ["translation"],
1201
+ fallbackLng: ["dev"],
1202
+ fallbackNS: !1,
1203
+ supportedLngs: !1,
1204
+ nonExplicitSupportedLngs: !1,
1205
+ load: "all",
1206
+ preload: !1,
1207
+ simplifyPluralSuffix: !0,
1208
+ keySeparator: ".",
1209
+ nsSeparator: ":",
1210
+ pluralSeparator: "_",
1211
+ contextSeparator: "_",
1212
+ partialBundledLanguages: !1,
1213
+ saveMissing: !1,
1214
+ updateMissing: !1,
1215
+ saveMissingTo: "fallback",
1216
+ saveMissingPlurals: !0,
1217
+ missingKeyHandler: !1,
1218
+ missingInterpolationHandler: !1,
1219
+ postProcess: !1,
1220
+ postProcessPassResolved: !1,
1221
+ returnNull: !1,
1222
+ returnEmptyString: !0,
1223
+ returnObjects: !1,
1224
+ joinArrays: !1,
1225
+ returnedObjectHandler: !1,
1226
+ parseMissingKeyHandler: !1,
1227
+ appendNamespaceToMissingKey: !1,
1228
+ appendNamespaceToCIMode: !1,
1229
+ overloadTranslationOptionHandler: (e) => {
1230
+ let t = {};
1231
+ if (typeof e[1] == "object" && (t = e[1]), R(e[1]) && (t.defaultValue = e[1]), R(e[2]) && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") {
1232
+ let n = e[3] || e[2];
1233
+ Object.keys(n).forEach((e) => {
1234
+ t[e] = n[e];
1235
+ });
1236
+ }
1237
+ return t;
1238
+ },
1239
+ interpolation: {
1240
+ escapeValue: !0,
1241
+ format: (e) => e,
1242
+ prefix: "{{",
1243
+ suffix: "}}",
1244
+ formatSeparator: ",",
1245
+ unescapePrefix: "-",
1246
+ nestingPrefix: "$t(",
1247
+ nestingSuffix: ")",
1248
+ nestingOptionsSeparator: ",",
1249
+ maxReplaces: 1e3,
1250
+ skipOnVariables: !0
1251
+ },
1252
+ cacheInBuiltFormats: !0
1253
+ }), Ie = (e) => (R(e.ns) && (e.ns = [e.ns]), R(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), R(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs?.indexOf?.("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), typeof e.initImmediate == "boolean" && (e.initAsync = e.initImmediate), e), X = () => {}, Le = (e) => {
1254
+ Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t) => {
1255
+ typeof e[t] == "function" && (e[t] = e[t].bind(e));
1256
+ });
1257
+ }, Re = "__i18next_supportNoticeShown", ze = () => !!(typeof globalThis < "u" && globalThis[Re] || typeof process < "u" && process.env && process.env.I18NEXT_NO_SUPPORT_NOTICE || typeof process < "u" && process.env), Be = () => {
1258
+ typeof globalThis < "u" && (globalThis[Re] = !0);
1259
+ }, Ve = (e) => !!(e?.modules?.backend?.name?.indexOf("Locize") > 0 || e?.modules?.backend?.constructor?.name?.indexOf("Locize") > 0 || e?.options?.backend?.backends && e.options.backend.backends.some((e) => e?.name?.indexOf("Locize") > 0 || e?.constructor?.name?.indexOf("Locize") > 0) || e?.options?.backend?.projectId || e?.options?.backend?.backendOptions && e.options.backend.backendOptions.some((e) => e?.projectId)), Z = class e extends q {
1260
+ constructor(e = {}, t) {
1261
+ if (super(), this.options = Ie(e), this.services = {}, this.logger = K, this.modules = { external: [] }, Le(this), t && !this.isInitialized && !e.isClone) {
1262
+ if (!this.options.initAsync) return this.init(e, t), this;
1263
+ setTimeout(() => {
1264
+ this.init(e, t);
1265
+ }, 0);
1266
+ }
1267
+ }
1268
+ init(e = {}, t) {
1269
+ this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (R(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
1270
+ let n = Fe();
1271
+ this.options = {
1272
+ ...n,
1273
+ ...this.options,
1274
+ ...Ie(e)
1275
+ }, this.options.interpolation = {
1276
+ ...n.interpolation,
1277
+ ...this.options.interpolation
1278
+ }, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator), typeof this.options.overloadTranslationOptionHandler != "function" && (this.options.overloadTranslationOptionHandler = n.overloadTranslationOptionHandler), this.options.showSupportNotice !== !1 && !Ve(this) && !ze() && (typeof console < "u" && console.info !== void 0 && console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"), Be());
1279
+ let r = (e) => e ? typeof e == "function" ? new e() : e : null;
1280
+ if (!this.options.isClone) {
1281
+ this.modules.logger ? K.init(r(this.modules.logger), this.options) : K.init(null, this.options);
1282
+ let e;
1283
+ e = this.modules.formatter ? this.modules.formatter : Me;
1284
+ let t = new Ce(this.options);
1285
+ this.store = new ge(this.options.resources, this.options);
1286
+ let i = this.services;
1287
+ i.logger = K, i.resourceStore = this.store, i.languageUtils = t, i.pluralResolver = new Ee(t, {
1288
+ prepend: this.options.pluralSeparator,
1289
+ simplifyPluralSuffix: this.options.simplifyPluralSuffix
1290
+ }), this.options.interpolation.format && this.options.interpolation.format !== n.interpolation.format && this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"), e && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (i.formatter = r(e), i.formatter.init && i.formatter.init(i, this.options), this.options.interpolation.format = i.formatter.format.bind(i.formatter)), i.interpolator = new ke(this.options), i.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i.backendConnector = new Pe(r(this.modules.backend), i.resourceStore, i, this.options), i.backendConnector.on("*", (e, ...t) => {
1291
+ this.emit(e, ...t);
1292
+ }), this.modules.languageDetector && (i.languageDetector = r(this.modules.languageDetector), i.languageDetector.init && i.languageDetector.init(i, this.options.detection, this.options)), this.modules.i18nFormat && (i.i18nFormat = r(this.modules.i18nFormat), i.i18nFormat.init && i.i18nFormat.init(this)), this.translator = new Se(this.services, this.options), this.translator.on("*", (e, ...t) => {
1293
+ this.emit(e, ...t);
1294
+ }), this.modules.external.forEach((e) => {
1295
+ e.init && e.init(this);
1296
+ });
1297
+ }
1298
+ if (this.format = this.options.interpolation.format, t ||= X, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1299
+ let e = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
1300
+ e.length > 0 && e[0] !== "dev" && (this.options.lng = e[0]);
1301
+ }
1302
+ !this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), [
1303
+ "getResource",
1304
+ "hasResourceBundle",
1305
+ "getResourceBundle",
1306
+ "getDataByLanguage"
1307
+ ].forEach((e) => {
1308
+ this[e] = (...t) => this.store[e](...t);
1309
+ }), [
1310
+ "addResource",
1311
+ "addResources",
1312
+ "addResourceBundle",
1313
+ "removeResourceBundle"
1314
+ ].forEach((e) => {
1315
+ this[e] = (...t) => (this.store[e](...t), this);
1316
+ });
1317
+ let i = z(), a = () => {
1318
+ let e = (e, n) => {
1319
+ this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), i.resolve(n), t(e, n);
1320
+ };
1321
+ if (this.languages && !this.isInitialized) return e(null, this.t.bind(this));
1322
+ this.changeLanguage(this.options.lng, e);
1323
+ };
1324
+ return this.options.resources || !this.options.initAsync ? a() : setTimeout(a, 0), i;
1325
+ }
1326
+ loadResources(e, t = X) {
1327
+ let n = t, r = R(e) ? e : this.language;
1328
+ if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
1329
+ if (r?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
1330
+ let e = [], t = (t) => {
1331
+ t && t !== "cimode" && this.services.languageUtils.toResolveHierarchy(t).forEach((t) => {
1332
+ t !== "cimode" && e.indexOf(t) < 0 && e.push(t);
1333
+ });
1334
+ };
1335
+ r ? t(r) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e) => t(e)), this.options.preload?.forEach?.((e) => t(e)), this.services.backendConnector.load(e, this.options.ns, (e) => {
1336
+ !e && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), n(e);
1337
+ });
1338
+ } else n(null);
1339
+ }
1340
+ reloadResources(e, t, n) {
1341
+ let r = z();
1342
+ return typeof e == "function" && (n = e, e = void 0), typeof t == "function" && (n = t, t = void 0), e ||= this.languages, t ||= this.options.ns, n ||= X, this.services.backendConnector.reload(e, t, (e) => {
1343
+ r.resolve(), n(e);
1344
+ }), r;
1345
+ }
1346
+ use(e) {
1347
+ if (!e) throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
1348
+ if (!e.type) throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
1349
+ return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && _e.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
1350
+ }
1351
+ setResolvedLanguage(e) {
1352
+ if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1)) {
1353
+ for (let e = 0; e < this.languages.length; e++) {
1354
+ let t = this.languages[e];
1355
+ if (!(["cimode", "dev"].indexOf(t) > -1) && this.store.hasLanguageSomeTranslations(t)) {
1356
+ this.resolvedLanguage = t;
1357
+ break;
1358
+ }
1359
+ }
1360
+ !this.resolvedLanguage && this.languages.indexOf(e) < 0 && this.store.hasLanguageSomeTranslations(e) && (this.resolvedLanguage = e, this.languages.unshift(e));
1361
+ }
1362
+ }
1363
+ changeLanguage(e, t) {
1364
+ this.isLanguageChangingTo = e;
1365
+ let n = z();
1366
+ this.emit("languageChanging", e);
1367
+ let r = (e) => {
1368
+ this.language = e, this.languages = this.services.languageUtils.toResolveHierarchy(e), this.resolvedLanguage = void 0, this.setResolvedLanguage(e);
1369
+ }, i = (i, a) => {
1370
+ a ? this.isLanguageChangingTo === e && (r(a), this.translator.changeLanguage(a), this.isLanguageChangingTo = void 0, this.emit("languageChanged", a), this.logger.log("languageChanged", a)) : this.isLanguageChangingTo = void 0, n.resolve((...e) => this.t(...e)), t && t(i, (...e) => this.t(...e));
1371
+ }, a = (t) => {
1372
+ !e && !t && this.services.languageDetector && (t = []);
1373
+ let n = R(t) ? t : t && t[0], a = this.store.hasLanguageSomeTranslations(n) ? n : this.services.languageUtils.getBestMatchFromCodes(R(t) ? [t] : t);
1374
+ a && (this.language || r(a), this.translator.language || this.translator.changeLanguage(a), this.services.languageDetector?.cacheUserLanguage?.(a)), this.loadResources(a, (e) => {
1375
+ i(e, a);
1376
+ });
1377
+ };
1378
+ return !e && this.services.languageDetector && !this.services.languageDetector.async ? a(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(a) : this.services.languageDetector.detect(a) : a(e), n;
1379
+ }
1380
+ getFixedT(e, t, n) {
1381
+ let r = (e, t, ...i) => {
1382
+ let a;
1383
+ a = typeof t == "object" ? { ...t } : this.options.overloadTranslationOptionHandler([e, t].concat(i)), a.lng = a.lng || r.lng, a.lngs = a.lngs || r.lngs, a.ns = a.ns || r.ns, a.keyPrefix !== "" && (a.keyPrefix = a.keyPrefix || n || r.keyPrefix);
1384
+ let o = {
1385
+ ...this.options,
1386
+ ...a
1387
+ };
1388
+ typeof a.keyPrefix == "function" && (a.keyPrefix = J(a.keyPrefix, o));
1389
+ let s = this.options.keySeparator || ".", c;
1390
+ return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e = J(e, o)), `${a.keyPrefix}${s}${e}`)) : (typeof e == "function" && (e = J(e, o)), c = a.keyPrefix ? `${a.keyPrefix}${s}${e}` : e), this.t(c, a);
1391
+ };
1392
+ return R(e) ? r.lng = e : r.lngs = e, r.ns = t, r.keyPrefix = n, r;
1393
+ }
1394
+ t(...e) {
1395
+ return this.translator?.translate(...e);
1396
+ }
1397
+ exists(...e) {
1398
+ return this.translator?.exists(...e);
1399
+ }
1400
+ setDefaultNamespace(e) {
1401
+ this.options.defaultNS = e;
1402
+ }
1403
+ hasLoadedNamespace(e, t = {}) {
1404
+ if (!this.isInitialized) return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
1405
+ if (!this.languages || !this.languages.length) return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
1406
+ let n = t.lng || this.resolvedLanguage || this.languages[0], r = this.options ? this.options.fallbackLng : !1, i = this.languages[this.languages.length - 1];
1407
+ if (n.toLowerCase() === "cimode") return !0;
1408
+ let a = (e, t) => {
1409
+ let n = this.services.backendConnector.state[`${e}|${t}`];
1410
+ return n === -1 || n === 0 || n === 2;
1411
+ };
1412
+ if (t.precheck) {
1413
+ let e = t.precheck(this, a);
1414
+ if (e !== void 0) return e;
1415
+ }
1416
+ return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(n, e) && (!r || a(i, e)));
1417
+ }
1418
+ loadNamespaces(e, t) {
1419
+ let n = z();
1420
+ return this.options.ns ? (R(e) && (e = [e]), e.forEach((e) => {
1421
+ this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
1422
+ }), this.loadResources((e) => {
1423
+ n.resolve(), t && t(e);
1424
+ }), n) : (t && t(), Promise.resolve());
1425
+ }
1426
+ loadLanguages(e, t) {
1427
+ let n = z();
1428
+ R(e) && (e = [e]);
1429
+ let r = this.options.preload || [], i = e.filter((e) => r.indexOf(e) < 0 && this.services.languageUtils.isSupportedCode(e));
1430
+ return i.length ? (this.options.preload = r.concat(i), this.loadResources((e) => {
1431
+ n.resolve(), t && t(e);
1432
+ }), n) : (t && t(), Promise.resolve());
1433
+ }
1434
+ dir(e) {
1435
+ if (e ||= this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language), !e) return "rtl";
1436
+ try {
1437
+ let t = new Intl.Locale(e);
1438
+ if (t && t.getTextInfo) {
1439
+ let e = t.getTextInfo();
1440
+ if (e && e.direction) return e.direction;
1441
+ }
1442
+ } catch {}
1443
+ let t = /* @__PURE__ */ "ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb".split("."), n = this.services?.languageUtils || new Ce(Fe());
1444
+ return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(n.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
1445
+ }
1446
+ static createInstance(t = {}, n) {
1447
+ let r = new e(t, n);
1448
+ return r.createInstance = e.createInstance, r;
1449
+ }
1450
+ cloneInstance(t = {}, n = X) {
1451
+ let r = t.forkResourceStore;
1452
+ r && delete t.forkResourceStore;
1453
+ let i = {
1454
+ ...this.options,
1455
+ ...t,
1456
+ isClone: !0
1457
+ }, a = new e(i);
1458
+ if ((t.debug !== void 0 || t.prefix !== void 0) && (a.logger = a.logger.clone(t)), [
1459
+ "store",
1460
+ "services",
1461
+ "language"
1462
+ ].forEach((e) => {
1463
+ a[e] = this[e];
1464
+ }), a.services = { ...this.services }, a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, r && (a.store = new ge(Object.keys(this.store.data).reduce((e, t) => (e[t] = { ...this.store.data[t] }, e[t] = Object.keys(e[t]).reduce((n, r) => (n[r] = { ...e[t][r] }, n), e[t]), e), {}), i), a.services.resourceStore = a.store), t.interpolation) {
1465
+ let e = {
1466
+ ...Fe().interpolation,
1467
+ ...this.options.interpolation,
1468
+ ...t.interpolation
1469
+ }, n = {
1470
+ ...i,
1471
+ interpolation: e
1472
+ };
1473
+ a.services.interpolator = new ke(n);
1474
+ }
1475
+ return a.translator = new Se(a.services, i), a.translator.on("*", (e, ...t) => {
1476
+ a.emit(e, ...t);
1477
+ }), a.init(i, n), a.translator.options = i, a.translator.backendConnector.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, a;
1478
+ }
1479
+ toJSON() {
1480
+ return {
1481
+ options: this.options,
1482
+ store: this.store,
1483
+ language: this.language,
1484
+ languages: this.languages,
1485
+ resolvedLanguage: this.resolvedLanguage
1486
+ };
1487
+ }
1488
+ }.createInstance();
1489
+ //#endregion
1490
+ //#region ../../shared/translator/dist/index.js
1491
+ Z.createInstance, Z.dir, Z.init, Z.loadResources, Z.reloadResources, Z.use, Z.changeLanguage, Z.getFixedT, Z.t, Z.exists, Z.setDefaultNamespace, Z.hasLoadedNamespace, Z.loadNamespaces, Z.loadLanguages, Z.init({
1492
+ fallbackLng: "en",
1493
+ lng: "en",
1494
+ showSupportNotice: !1,
1495
+ resources: {
1496
+ en: I,
1497
+ es: L
1498
+ }
1499
+ });
1500
+ //#endregion
1501
+ //#region src/delivery/i18n.ts
1502
+ var { translator: He } = {
1503
+ translator: {
1504
+ ...Z,
1505
+ t: (e, t) => {
1506
+ let { lng: n } = t;
1507
+ switch (n) {
1508
+ case "en_US":
1509
+ case "en-US":
1510
+ t.lng = "en";
1511
+ break;
1512
+ case "es_ES":
1513
+ case "es-ES":
1514
+ case "es_MX":
1515
+ case "es-MX":
1516
+ t.lng = "es";
1517
+ break;
1518
+ default: break;
1519
+ }
1520
+ return Z.t(e, {
1521
+ lng: n,
1522
+ ...t
1523
+ });
1524
+ }
1525
+ },
1526
+ languageOptions: [{
1527
+ value: "en_US",
1528
+ label: "English (US)"
1529
+ }, {
1530
+ value: "es_ES",
1531
+ label: "Spanish"
1532
+ }]
1533
+ };
1534
+ function Q(e, t, n = {}) {
1535
+ return He.t(`translation:mcPopulatedBlank:${e}`, {
1536
+ lng: t,
1537
+ ...n,
1538
+ interpolation: { escapeValue: !1 }
1539
+ });
1540
+ }
1541
+ function Ue(e, t) {
1542
+ return He.t(`common:${e}`, { lng: t });
1543
+ }
1544
+ //#endregion
1545
+ //#region src/delivery/AudioPlayer.svelte
1546
+ var We = d("<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), Ge = d("<button class=\"autoplay-enable pie-audio-autoplay-enable svelte-ypdwb3\" type=\"button\"> </button>"), Ke = d("<audio controls=\"\" class=\"audio-controls pie-audio-player svelte-ypdwb3\" preload=\"metadata\"><track kind=\"captions\"/></audio> <!>", 1), qe = d("<p class=\"audio-error pie-audio-error svelte-ypdwb3\" role=\"alert\"> </p>"), $ = d("<div class=\"audio-container pie-audio-container svelte-ypdwb3\"><!></div>"), Je = {
1547
+ hash: "svelte-ypdwb3",
1548
+ code: ".audio-container.svelte-ypdwb3 {margin-bottom:1rem;}.audio-controls.svelte-ypdwb3 {display:block;width:100%;max-width:28rem;}.autoplay-enable.svelte-ypdwb3 {margin-top:0.5rem;padding:0;border:0;background:transparent;font:inherit;font-size:0.875rem;line-height:calc(1.25 / 0.875);color:inherit;text-decoration-line:underline;}.audio-error.svelte-ypdwb3 {margin:0;font-size:0.875rem;line-height:calc(1.25 / 0.875);color:var(--pie-incorrect-icon, #c10007);}.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;}"
1549
+ };
1550
+ function Ye(d, p) {
1551
+ c(p, !0), ee(d, Je);
1552
+ let m = {
1553
+ IDLE: "idle",
1554
+ PLAYING: "playing",
1555
+ BLOCKED: "blocked",
1556
+ PAUSED: "paused"
1557
+ }, h = w(p, "hasAudio", 7, !1), g = w(p, "audioUrl", 7), y = w(p, "useFeatureButtonAudio", 7, !1), T = w(p, "autoplayEnabled", 7, !1), O = w(p, "featureAudioSkin", 7), k = w(p, "language", 7), A = w(p, "onaudiostarted", 7), N = w(p, "onaudioended", 7), P = e(null), I = e(null), L = e(null), R = e(s(m.IDLE)), z = a(() => F({
1558
+ hasAudio: h(),
1559
+ audioUrl: g(),
1560
+ useFeatureButtonAudio: y()
1561
+ })), te = a(() => M(R) === m.PLAYING), ne = a(() => M(R) === m.BLOCKED), B = a(() => M(z) === "error" ? Q("audioResourceUnavailable", k()) : "");
1562
+ t(() => {
1563
+ g(), x(R, m.IDLE, !0);
1564
+ });
1565
+ function re() {
1566
+ M(z) !== "none" && M(z) !== "error" && M(P) && M(P).play().catch(() => {});
1567
+ }
1568
+ function V() {
1569
+ M(z) !== "none" && M(z) !== "error" && M(P) && M(P).play().finally(() => {
1570
+ M(R) === m.BLOCKED && x(R, m.PAUSED, !0);
1571
+ });
1572
+ }
1573
+ function H(e, n, r) {
1574
+ t(() => {
1575
+ let t = e();
1576
+ if (t) return t.addEventListener(n, r), () => t.removeEventListener(n, r);
1577
+ });
1578
+ }
1579
+ H(() => M(P), "playing", () => {
1580
+ x(R, m.PLAYING, !0), A()?.();
1581
+ }), H(() => M(P), "ended", () => {
1582
+ x(R, m.PAUSED, !0), N()?.();
1583
+ }), H(() => M(I), "click", () => re()), H(() => M(L), "click", () => V()), t(() => {
1584
+ !T() || M(z) === "none" || M(z) === "error" || M(R) === m.IDLE && M(P) && g() && (x(R, m.PAUSED, !0), M(P).play().catch(() => {
1585
+ x(R, m.BLOCKED, !0);
1586
+ }));
1587
+ });
1588
+ var ie = {
1589
+ get hasAudio() {
1590
+ return h();
1591
+ },
1592
+ set hasAudio(e = !1) {
1593
+ h(e), b();
1594
+ },
1595
+ get audioUrl() {
1596
+ return g();
1597
+ },
1598
+ set audioUrl(e) {
1599
+ g(e), b();
1600
+ },
1601
+ get useFeatureButtonAudio() {
1602
+ return y();
1603
+ },
1604
+ set useFeatureButtonAudio(e = !1) {
1605
+ y(e), b();
1606
+ },
1607
+ get autoplayEnabled() {
1608
+ return T();
1609
+ },
1610
+ set autoplayEnabled(e = !1) {
1611
+ T(e), b();
1612
+ },
1613
+ get featureAudioSkin() {
1614
+ return O();
1615
+ },
1616
+ set featureAudioSkin(e) {
1617
+ O(e), b();
1618
+ },
1619
+ get language() {
1620
+ return k();
1621
+ },
1622
+ set language(e) {
1623
+ k(e), b();
1624
+ },
1625
+ get onaudiostarted() {
1626
+ return A();
1627
+ },
1628
+ set onaudiostarted(e) {
1629
+ A(e), b();
1630
+ },
1631
+ get onaudioended() {
1632
+ return N();
1633
+ },
1634
+ set onaudioended(e) {
1635
+ N(e), b();
1636
+ }
1637
+ }, ae = _(), U = u(ae), oe = (e) => {
1638
+ var t = $(), a = j(t), o = (e) => {
1639
+ var t = We(), r = u(t);
1640
+ D(r, (e) => x(P, e), () => M(P));
1641
+ var a = n(r, 2), o = j(a), s = n(o, 2);
1642
+ i(a), D(a, (e) => x(I, e), () => M(I)), l((e, t, n) => {
1643
+ f(r, "src", g()), f(a, "aria-label", e), S(o, 1, `listen-feature-icon pie-listen-icon rli-feature-listen ${M(te) ? "" : "listen-active"}`, "svelte-ypdwb3"), f(o, "src", O().silentUrl), f(o, "alt", t), S(s, 1, `listen-feature-icon pie-listen-icon rli-feature-listen ${M(te) ? "listen-active" : ""}`, "svelte-ypdwb3"), f(s, "src", O().playingUrl), f(s, "alt", n);
1644
+ }, [
1645
+ () => Q("listen", k()),
1646
+ () => Q("listenSilentAlt", k()),
1647
+ () => Q("listenPlayingAlt", k())
1648
+ ]), v(e, t);
1649
+ }, s = (e) => {
1650
+ var t = Ke(), i = u(t);
1651
+ D(i, (e) => x(P, e), () => M(P));
1652
+ var a = n(i, 2), o = (e) => {
1653
+ var t = Ge(), n = r(t, !0);
1654
+ D(t, (e) => x(L, e), () => M(L)), l((e) => C(n, e), [() => Q("clickToEnableAutoplay", k())]), v(e, t);
1655
+ };
1656
+ E(a, (e) => {
1657
+ M(ne) && e(o);
1658
+ }), l(() => f(i, "src", g())), v(e, t);
1659
+ }, c = (e) => {
1660
+ var t = qe(), n = r(t, !0);
1661
+ l(() => C(n, M(B))), v(e, t);
1662
+ };
1663
+ E(a, (e) => {
1664
+ M(z) === "feature-button" ? e(o) : M(z) === "controls" ? e(s, 1) : M(z) === "error" && e(c, 2);
1665
+ }), i(t), v(e, t);
1666
+ };
1667
+ return E(U, (e) => {
1668
+ M(z) !== "none" && e(oe);
1669
+ }), v(d, ae), o(ie);
1670
+ }
1671
+ k(Ye, {
1672
+ hasAudio: {},
1673
+ audioUrl: {},
1674
+ useFeatureButtonAudio: {},
1675
+ autoplayEnabled: {},
1676
+ featureAudioSkin: {},
1677
+ language: {},
1678
+ onaudiostarted: {},
1679
+ onaudioended: {}
1680
+ }, [], [], { mode: "open" });
1681
+ //#endregion
1682
+ //#region src/delivery/ClozeMarker.svelte
1683
+ var Xe = d("<img class=\"cloze-marker-image pie-blank-image svelte-d9l5tb\" style=\"max-width:var(--mpb-choice-image-max-width, 9.375rem);max-height:var(--mpb-choice-image-max-height, 9.375rem);\"/>"), Ze = d("<span class=\"cloze-marker-value pie-blank-value svelte-d9l5tb\"></span>"), Qe = d("<span class=\"cloze-marker-empty svelte-d9l5tb\"><span aria-hidden=\"true\">&nbsp;</span> <span class=\"sr-only svelte-d9l5tb\"> </span></span>"), $e = d("<span role=\"status\" aria-live=\"polite\" aria-atomic=\"true\"><!></span>"), et = {
1684
+ hash: "svelte-d9l5tb",
1685
+ code: "\n /* The underline width comes from the inline style (layoutLimits); the colour\n follows the text. */.cloze-marker.svelte-d9l5tb {display:inline-flex;align-items:center;justify-content:center;text-align:center;vertical-align:baseline;padding-inline:0.5rem;border-bottom:2px solid currentColor;}.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-image.svelte-d9l5tb {object-fit:contain;}.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;}"
1686
+ };
1687
+ function tt(e, t) {
1688
+ c(t, !0), ee(e, et);
1689
+ let a = w(t, "choiceMode", 7, "text"), s = w(t, "displayChoice", 7, void 0), u = w(t, "displayChoiceLabelHtml", 7, ""), d = w(t, "isStandalone", 7, !1), p = w(t, "blankWidth", 7), g = w(t, "blankBorderWidth", 7), _ = w(t, "ariaLabel", 7), y = w(t, "language", 7);
1690
+ var x = {
1691
+ get choiceMode() {
1692
+ return a();
1693
+ },
1694
+ set choiceMode(e = "text") {
1695
+ a(e), b();
1696
+ },
1697
+ get displayChoice() {
1698
+ return s();
1699
+ },
1700
+ set displayChoice(e = void 0) {
1701
+ s(e), b();
1702
+ },
1703
+ get displayChoiceLabelHtml() {
1704
+ return u();
1705
+ },
1706
+ set displayChoiceLabelHtml(e = "") {
1707
+ u(e), b();
1708
+ },
1709
+ get isStandalone() {
1710
+ return d();
1711
+ },
1712
+ set isStandalone(e = !1) {
1713
+ d(e), b();
1714
+ },
1715
+ get blankWidth() {
1716
+ return p();
1717
+ },
1718
+ set blankWidth(e) {
1719
+ p(e), b();
1720
+ },
1721
+ get blankBorderWidth() {
1722
+ return g();
1723
+ },
1724
+ set blankBorderWidth(e) {
1725
+ g(e), b();
1726
+ },
1727
+ get ariaLabel() {
1728
+ return _();
1729
+ },
1730
+ set ariaLabel(e) {
1731
+ _(e), b();
1732
+ },
1733
+ get language() {
1734
+ return y();
1735
+ },
1736
+ set language(e) {
1737
+ y(e), b();
1738
+ }
1739
+ }, T = $e(), D = j(T), O = (e) => {
1740
+ var t = Xe();
1741
+ l((e) => {
1742
+ f(t, "src", s().imageUrl), f(t, "alt", e);
1743
+ }, [() => s().imageAlt || Q("selectedAnswerImage", y())]), v(e, t);
1744
+ }, k = (e) => {
1745
+ var t = Ze();
1746
+ h(t, u, !0), i(t), v(e, t);
1747
+ }, A = (e) => {
1748
+ var t = Qe(), a = r(n(j(t), 2), !0);
1749
+ i(t), l((e) => C(a, e), [() => Q("emptyBlank", y())]), v(e, t);
1750
+ };
1751
+ return E(D, (e) => {
1752
+ a() === "image" && s()?.imageUrl ? e(O) : u() ? e(k, 1) : e(A, -1);
1753
+ }), i(T), l(() => {
1754
+ S(T, 1, `cloze-marker pie-blank-slot ${d() ? "cloze-marker-standalone pie-blank-slot-standalone" : ""}`, "svelte-d9l5tb"), m(T, `width:${p()};border-bottom-width:${g()};`), f(T, "aria-label", _());
1755
+ }), v(e, T), o(x);
1756
+ }
1757
+ k(tt, {
1758
+ choiceMode: {},
1759
+ displayChoice: {},
1760
+ displayChoiceLabelHtml: {},
1761
+ isStandalone: {},
1762
+ blankWidth: {},
1763
+ blankBorderWidth: {},
1764
+ ariaLabel: {},
1765
+ language: {}
1766
+ }, [], [], { mode: "open" });
1767
+ //#endregion
1768
+ //#region src/delivery/ChoiceRow.svelte
1769
+ var nt = d("<img class=\"choice-image pie-choice-image svelte-8xu1pt\" style=\"max-width:var(--mpb-choice-image-max-width, 9.375rem);max-height:var(--mpb-choice-image-max-height, 9.375rem);\"/>"), rt = d("<span class=\"choice-html pie-choice-label svelte-8xu1pt\"></span>"), it = d("<label class=\"choice-tile 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>"), at = d("<img class=\"choice-image pie-choice-image svelte-8xu1pt\" style=\"max-height:var(--mpb-choice-image-max-height, 5rem);\"/>"), ot = d("<input type=\"radio\" class=\"choice-radio-inline pie-choice-radio pie-choice-radio-inline svelte-8xu1pt\"/> <label class=\"choice-label-wrap pie-choice-label-wrap svelte-8xu1pt\"><!></label>", 1), st = d("<span aria-hidden=\"true\"> </span>"), ct = d("<div style=\"gap:var(--mpb-choice-row-gap, 0.5rem);\"><!> <!></div>"), lt = {
1770
+ hash: "svelte-8xu1pt",
1771
+ code: ".choice-row.svelte-8xu1pt {display:flex;align-items:flex-start;}.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;cursor:pointer;text-align:center;}.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-image.svelte-8xu1pt {display:block;object-fit:contain;}.choice-label-wrap.svelte-8xu1pt {flex:1 1 0%;cursor:pointer;}.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;}\n\n /* Only the top margin is spaced; the browser's own radio side margins would\n otherwise offset the control from its label (the demo app's preflight zeroed them). */.choice-radio-bottom.svelte-8xu1pt {margin:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem) 0 0;padding:var(--mpb-choice-radio-padding, 0px);}.choice-radio-inline.svelte-8xu1pt {margin:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem) 0 0;}"
1772
+ };
1773
+ function ut(e, t) {
1774
+ c(t, !0), ee(e, lt);
1775
+ let a = w(t, "choice", 7), s = w(t, "choiceMode", 7, "text"), d = w(t, "isHorizontal", 7, !1), p = w(t, "isSelected", 7, !1), m = w(t, "isDisabled", 7, !1), g = w(t, "correctness", 7, void 0), _ = w(t, "isEvaluateMode", 7, !1), x = w(t, "instanceId", 7), D = w(t, "radioGroupName", 7), k = w(t, "language", 7);
1776
+ var A = {
1777
+ get choice() {
1778
+ return a();
1779
+ },
1780
+ set choice(e) {
1781
+ a(e), b();
1782
+ },
1783
+ get choiceMode() {
1784
+ return s();
1785
+ },
1786
+ set choiceMode(e = "text") {
1787
+ s(e), b();
1788
+ },
1789
+ get isHorizontal() {
1790
+ return d();
1791
+ },
1792
+ set isHorizontal(e = !1) {
1793
+ d(e), b();
1794
+ },
1795
+ get isSelected() {
1796
+ return p();
1797
+ },
1798
+ set isSelected(e = !1) {
1799
+ p(e), b();
1800
+ },
1801
+ get isDisabled() {
1802
+ return m();
1803
+ },
1804
+ set isDisabled(e = !1) {
1805
+ m(e), b();
1806
+ },
1807
+ get correctness() {
1808
+ return g();
1809
+ },
1810
+ set correctness(e = void 0) {
1811
+ g(e), b();
1812
+ },
1813
+ get isEvaluateMode() {
1814
+ return _();
1815
+ },
1816
+ set isEvaluateMode(e = !1) {
1817
+ _(e), b();
1818
+ },
1819
+ get instanceId() {
1820
+ return x();
1821
+ },
1822
+ set instanceId(e) {
1823
+ x(e), b();
1824
+ },
1825
+ get radioGroupName() {
1826
+ return D();
1827
+ },
1828
+ set radioGroupName(e) {
1829
+ D(e), b();
1830
+ },
1831
+ get language() {
1832
+ return k();
1833
+ },
1834
+ set language(e) {
1835
+ k(e), b();
1836
+ }
1837
+ }, M = ct(), N = j(M), P = (e) => {
1838
+ var t = it(), r = j(t), o = j(r), c = (e) => {
1839
+ var t = nt();
1840
+ l((e) => {
1841
+ f(t, "src", a().imageUrl), f(t, "alt", e);
1842
+ }, [() => a().imageAlt || Q("choiceImage", k(), { id: a().id })]), v(e, t);
1843
+ }, u = (e) => {
1844
+ var t = rt();
1845
+ h(t, () => a().labelHtml || "", !0), i(t), v(e, t);
1846
+ };
1847
+ E(o, (e) => {
1848
+ s() === "image" && a().imageUrl ? e(c) : e(u, -1);
1849
+ }), i(r);
1850
+ var d = n(r, 2);
1851
+ y(d), i(t), l(() => {
1852
+ f(t, "for", `${x()}-opt-${a().id}`), f(d, "name", D()), f(d, "id", `${x()}-opt-${a().id}`), O(d, a().id), T(d, p()), d.disabled = m();
1853
+ }), v(e, t);
1854
+ }, F = (e) => {
1855
+ var t = ot(), r = u(t);
1856
+ y(r);
1857
+ var o = n(r, 2), c = j(o), d = (e) => {
1858
+ var t = at();
1859
+ l((e) => {
1860
+ f(t, "src", a().imageUrl), f(t, "alt", e);
1861
+ }, [() => a().imageAlt || Q("choiceImage", k(), { id: a().id })]), v(e, t);
1862
+ }, g = (e) => {
1863
+ var t = rt();
1864
+ h(t, () => a().labelHtml || "", !0), i(t), v(e, t);
1865
+ };
1866
+ E(c, (e) => {
1867
+ s() === "image" && a().imageUrl ? e(d) : e(g, -1);
1868
+ }), i(o), l(() => {
1869
+ f(r, "name", D()), f(r, "id", `${x()}-opt-${a().id}`), O(r, a().id), T(r, p()), r.disabled = m(), f(o, "for", `${x()}-opt-${a().id}`);
1870
+ }), v(e, t);
1871
+ };
1872
+ E(N, (e) => {
1873
+ d() ? e(P) : e(F, -1);
1874
+ });
1875
+ var I = n(N, 2), L = (e) => {
1876
+ var t = st(), n = r(t, !0);
1877
+ l(() => {
1878
+ S(t, 1, `pie-choice-feedback-badge ${g() === "correct" ? "pie-choice-feedback-correct" : "pie-choice-feedback-incorrect"}`, "svelte-8xu1pt"), C(n, g() === "correct" ? "✓" : "✕");
1879
+ }), v(e, t);
1880
+ };
1881
+ return E(I, (e) => {
1882
+ _() && g() && e(L);
1883
+ }), i(M), l(() => S(M, 1, `choice-row pie-choice ${d() ? "choice-row-horizontal pie-choice-horizontal" : ""} ${p() ? "is-selected pie-choice-selected" : ""} ${g() ? `choice-${g()} pie-choice-${g()}` : ""}`, "svelte-8xu1pt")), v(e, M), o(A);
1884
+ }
1885
+ k(ut, {
1886
+ choice: {},
1887
+ choiceMode: {},
1888
+ isHorizontal: {},
1889
+ isSelected: {},
1890
+ isDisabled: {},
1891
+ correctness: {},
1892
+ isEvaluateMode: {},
1893
+ instanceId: {},
1894
+ radioGroupName: {},
1895
+ language: {}
1896
+ }, [], [], { mode: "open" });
1897
+ //#endregion
1898
+ //#region src/delivery/TeacherInstructions.svelte
1899
+ var dt = d("<div class=\"teacher-instructions pie-teacher-instructions svelte-1jhejbv\"><button type=\"button\" class=\"teacher-instructions-toggle pie-teacher-instructions-toggle svelte-1jhejbv\"> </button> <div class=\"teacher-instructions-content pie-teacher-instructions-content svelte-1jhejbv\"></div></div>"), ft = {
1900
+ hash: "svelte-1jhejbv",
1901
+ code: ".teacher-instructions.svelte-1jhejbv {margin-bottom:1rem;}.teacher-instructions-toggle.svelte-1jhejbv {padding:0;border:0;border-bottom:1px dotted currentColor;background:transparent;font:inherit;color:var(--pie-primary, #3f51b5);cursor:pointer;}.teacher-instructions-toggle.svelte-1jhejbv:focus-visible {outline:2px solid var(--mpb-focus-ring, var(--pie-focus-outline, #1565c0));outline-offset:2px;}.teacher-instructions-content.svelte-1jhejbv {padding-top:1rem;}"
1902
+ };
1903
+ function pt(t, a) {
1904
+ c(a, !0), ee(t, ft);
1905
+ let s = w(a, "html", 7), u = w(a, "language", 7), d = e(!1), m = `mpb-teacher-instructions-${Math.random().toString(36).slice(2, 10)}`;
1906
+ var g = {
1907
+ get html() {
1908
+ return s();
1909
+ },
1910
+ set html(e) {
1911
+ s(e), b();
1912
+ },
1913
+ get language() {
1914
+ return u();
1915
+ },
1916
+ set language(e) {
1917
+ u(e), b();
1918
+ }
1919
+ }, _ = dt(), y = j(_), S = r(y, !0), T = n(y, 2);
1920
+ return h(T, s, !0), i(T), i(_), l((e) => {
1921
+ f(y, "aria-expanded", M(d)), f(y, "aria-controls", m), C(S, e), f(T, "id", m), f(T, "hidden", !M(d));
1922
+ }, [() => Ue(M(d) ? "hideTeacherInstructions" : "showTeacherInstructions", u())]), p("click", y, () => x(d, !M(d))), v(t, _), o(g);
1923
+ }
1924
+ N(["click"]), k(pt, {
1925
+ html: {},
1926
+ language: {}
1927
+ }, [], [], { mode: "open" });
1928
+ //#endregion
1929
+ //#region src/delivery/computeChoiceCorrectness.ts
1930
+ function mt(e) {
1931
+ let t = /* @__PURE__ */ new Map(), { isEvaluateMode: n, correctChoiceId: r, selectedId: i, showCorrectAnswer: a } = e;
1932
+ 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);
1933
+ }
1934
+ //#endregion
1935
+ //#region src/delivery/computeLayoutProfile.ts
1936
+ var ht = "{{blank}}", gt = /* @__PURE__ */ new Set([
1937
+ "audio_blank_only",
1938
+ "stimulus_image_blank",
1939
+ "token_sequence"
1940
+ ]);
1941
+ function _t(e) {
1942
+ 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() === ht : !1, l = r === "horizontal" || r === "vertical" ? r : s || c ? "horizontal" : "vertical";
1943
+ return {
1944
+ isAudioOnlyMode: s,
1945
+ isBlankOnlyTemplate: c,
1946
+ choiceLayout: l,
1947
+ isHorizontalChoices: l === "horizontal",
1948
+ hasInlineSentenceAudioLayout: i === "inline_sentence" && a,
1949
+ useFeatureButtonAudio: typeof o == "boolean" ? o : a && gt.has(i)
1950
+ };
1951
+ }
1952
+ //#endregion
1953
+ //#region src/delivery/computeLayoutStyle.ts
1954
+ var vt = {
1955
+ blankStandaloneWidthRem: {
1956
+ varName: "--mpb-blank-standalone-width",
1957
+ unit: "rem"
1958
+ },
1959
+ blankWideWidthRem: {
1960
+ varName: "--mpb-blank-wide-width",
1961
+ unit: "rem"
1962
+ },
1963
+ blankUnderlineWidthPx: {
1964
+ varName: "--mpb-blank-underline-width",
1965
+ unit: "px"
1966
+ },
1967
+ blankUnderlineWideWidthPx: {
1968
+ varName: "--mpb-blank-underline-wide-width",
1969
+ unit: "px"
1970
+ },
1971
+ horizontalChoiceWidthPx: {
1972
+ varName: "--mpb-choice-width-px",
1973
+ unit: "px"
1974
+ },
1975
+ horizontalChoiceWidthVw: {
1976
+ varName: "--mpb-choice-width-vw",
1977
+ unit: "vw"
1978
+ },
1979
+ horizontalChoiceTileMinHeightRem: {
1980
+ varName: "--mpb-choice-tile-min-height",
1981
+ unit: "rem"
1982
+ },
1983
+ horizontalChoiceContentMinHeightRem: {
1984
+ varName: "--mpb-choice-content-min-height",
1985
+ unit: "rem"
1986
+ },
1987
+ choiceImageMaxHeightRem: {
1988
+ varName: "--mpb-choice-image-max-height",
1989
+ unit: "rem"
1990
+ },
1991
+ choiceImageMaxWidthRem: {
1992
+ varName: "--mpb-choice-image-max-width",
1993
+ unit: "rem"
1994
+ },
1995
+ choiceGroupGapRem: {
1996
+ varName: "--mpb-choice-group-gap",
1997
+ unit: "rem"
1998
+ },
1999
+ choiceRowGapRem: {
2000
+ varName: "--mpb-choice-row-gap",
2001
+ unit: "rem"
2002
+ },
2003
+ horizontalChoiceRadioTopMarginRem: {
2004
+ varName: "--mpb-horizontal-choice-radio-top-margin",
2005
+ unit: "rem"
2006
+ },
2007
+ narrowHorizontalChoiceMaxWidthPx: {
2008
+ varName: "--mpb-narrow-choice-max-width",
2009
+ unit: "px"
2010
+ },
2011
+ toggleButtonGapRem: {
2012
+ varName: "--mpb-toggle-button-gap",
2013
+ unit: "rem"
2014
+ },
2015
+ listenButtonSizePx: {
2016
+ varName: "--mpb-listen-button-size",
2017
+ unit: "px"
2018
+ },
2019
+ audioBlankTemplateMarginTopRem: {
2020
+ varName: "--mpb-audio-blank-template-margin-top",
2021
+ unit: "rem"
2022
+ },
2023
+ audioBlankTemplateMarginBottomRem: {
2024
+ varName: "--mpb-audio-blank-template-margin-bottom",
2025
+ unit: "rem"
2026
+ },
2027
+ audioInstructionsMaxWidthPx: {
2028
+ varName: "--mpb-audio-instructions-max-width",
2029
+ unit: "px"
2030
+ },
2031
+ stimulusMinColumnPx: {
2032
+ varName: "--mpb-stimulus-min-column",
2033
+ unit: "px"
2034
+ },
2035
+ textMinColumnPx: {
2036
+ varName: "--mpb-text-min-column",
2037
+ unit: "px"
2038
+ },
2039
+ stimulusGridColumnGapRem: {
2040
+ varName: "--mpb-stimulus-grid-column-gap",
2041
+ unit: "rem"
2042
+ },
2043
+ stimulusGridRowGapRem: {
2044
+ varName: "--mpb-stimulus-grid-row-gap",
2045
+ unit: "rem"
2046
+ },
2047
+ stimulusSentenceMarginTopRem: {
2048
+ varName: "--mpb-stimulus-sentence-margin-top",
2049
+ unit: "rem"
2050
+ },
2051
+ stimulusChoicesMarginTopRem: {
2052
+ varName: "--mpb-stimulus-choices-margin-top",
2053
+ unit: "rem"
2054
+ },
2055
+ tokenGridColumnGapRem: {
2056
+ varName: "--mpb-token-grid-column-gap",
2057
+ unit: "rem"
2058
+ },
2059
+ tokenGridRowGapRem: {
2060
+ varName: "--mpb-token-grid-row-gap",
2061
+ unit: "rem"
2062
+ },
2063
+ tokenTemplateMarginTopRem: {
2064
+ varName: "--mpb-token-template-margin-top",
2065
+ unit: "rem"
2066
+ },
2067
+ tokenInlineTokenGapRem: {
2068
+ varName: "--mpb-token-inline-token-gap",
2069
+ unit: "rem"
2070
+ },
2071
+ tokenChoicesMarginTopRem: {
2072
+ varName: "--mpb-token-choices-margin-top",
2073
+ unit: "rem"
2074
+ },
2075
+ inlineGridColumnGapRem: {
2076
+ varName: "--mpb-inline-grid-column-gap",
2077
+ unit: "rem"
2078
+ },
2079
+ inlineGridRowGapRem: {
2080
+ varName: "--mpb-inline-grid-row-gap",
2081
+ unit: "rem"
2082
+ },
2083
+ inlineTemplateMarginTopRem: {
2084
+ varName: "--mpb-inline-template-margin-top",
2085
+ unit: "rem"
2086
+ },
2087
+ inlineChoicesMarginTopRem: {
2088
+ varName: "--mpb-inline-choices-margin-top",
2089
+ unit: "rem"
2090
+ }
2091
+ }, yt = {
2092
+ audio_blank_only: {
2093
+ blankWideWidthRem: 10,
2094
+ blankUnderlineWideWidthPx: 6,
2095
+ horizontalChoiceTileMinHeightRem: 11.25,
2096
+ horizontalChoiceContentMinHeightRem: 9.375,
2097
+ choiceGroupGapRem: 1,
2098
+ audioBlankTemplateMarginBottomRem: 1.875
2099
+ },
2100
+ stimulus_image_blank: {
2101
+ blankWideWidthRem: 10,
2102
+ blankUnderlineWideWidthPx: 6
2103
+ },
2104
+ token_sequence: {
2105
+ blankStandaloneWidthRem: 7,
2106
+ blankUnderlineWideWidthPx: 6
2107
+ }
2108
+ };
2109
+ function bt(e) {
2110
+ 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 = {
2111
+ ...yt[t] ?? {},
2112
+ ...a
2113
+ }, s = {
2114
+ ...P,
2115
+ ...r,
2116
+ ...o
2117
+ }, c = ["audio_blank_only", "stimulus_image_blank"], l = [
2118
+ "audio_blank_only",
2119
+ "stimulus_image_blank",
2120
+ "token_sequence"
2121
+ ], u = c.includes(t) ? `${s.blankWideWidthRem}rem` : n ? `${s.blankStandaloneWidthRem}rem` : "auto", d = l.includes(t) ? `${s.blankUnderlineWideWidthPx}px` : `${s.blankUnderlineWidthPx}px`;
2122
+ return {
2123
+ rootStyle: Object.keys(vt).map((e) => `${vt[e].varName}:${s[e]}${vt[e].unit}`).join(";"),
2124
+ blankWidth: u,
2125
+ blankBorderWidth: d,
2126
+ legendMaxChars: s.legendMaxChars
2127
+ };
2128
+ }
2129
+ //#endregion
2130
+ //#region src/delivery/computeDisplayState.ts
2131
+ var xt = {
2132
+ default: {
2133
+ silentUrl: "https://assets.learnosity.com/organisations/844/0c9f2aa3-3cd5-4de7-93ef-541c24ca35da.svg",
2134
+ playingUrl: "https://assets.learnosity.com/organisations/844/231dfdc2-c113-4be5-91fb-e75a0ca5994b.svg"
2135
+ },
2136
+ es: {
2137
+ silentUrl: "https://assets.learnosity.com/organisations/844/27a9d5b5-d873-4bd5-b9ba-22748782d8ba.svg",
2138
+ playingUrl: "https://assets.learnosity.com/organisations/844/120f216d-96b7-4560-94b8-1d90710216b7.svg"
2139
+ }
2140
+ };
2141
+ function St(e) {
2142
+ 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") ? xt.es : xt.default;
2143
+ return r[t] || r[n] || r.default || i || a;
2144
+ }
2145
+ function Ct(e) {
2146
+ let { selectedId: t, isEvaluateMode: n, showCorrectAnswer: r, correctChoiceId: i } = e;
2147
+ return n && r && i ? i : t;
2148
+ }
2149
+ function wt(e) {
2150
+ let { isEvaluateMode: t, showCorrectAnswer: n, isCorrect: r, isIncorrect: i, selectedId: a } = e;
2151
+ return !t || n ? "" : r ? "correct" : i && a ? "incorrect" : "";
2152
+ }
2153
+ function Tt(e) {
2154
+ let { prompt: t, legendMaxChars: n, answerChoicesLabel: r } = e, i = t.replace(/<[^>]+>/g, " ").replace(/\s+/g, " ").trim(), a = Math.max(8, n);
2155
+ return i ? i.length > a ? `${i.slice(0, Math.max(1, a - 1))}…` : i : r;
2156
+ }
2157
+ //#endregion
2158
+ //#region src/delivery/cqt-css/sel-r1-base.css?raw
2159
+ var Et = "/* Shared base styles for all sel_r1-*_plusggg variants.\n Applied via the data-mpb-variant=\"sel-r1-base\" style element.\n Every selector starts at .mc-populated-blank-root carrying any r1 variant class,\n so it cannot match outside this element. :where() keeps the attribute match out\n of the specificity, so each per-variant file still overrides a base rule with\n the selector shapes it already uses.\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.mc-populated-blank-root:where([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.mc-populated-blank-root:where([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.mc-populated-blank-root:where([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 margin and the implicit\n whitespace, producing a wider gap than LSY shows. See CONTOOL-2569. */\n.mc-populated-blank-root:where([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.mc-populated-blank-root:where([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.mc-populated-blank-root:where([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.mc-populated-blank-root:where([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.\n .pie-blank-slot is box-sizing:border-box (McPopulatedBlank.svelte sets it for\n the whole element) with a permanent 6px border-bottom (the underline) —\n 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.mc-populated-blank-root:where([class*=\"variant-sel-r1-\"]).layout-token_sequence\n .pie-template-line\n .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. See CONTOOL-2569. */\n.mc-populated-blank-root:where([class*=\"variant-sel-r1-\"]).layout-audio_blank_only\n .pie-template-line\n .pie-blank-slot,\n.mc-populated-blank-root:where([class*=\"variant-sel-r1-\"]).layout-stimulus_image_blank\n .pie-template-line\n .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.mc-populated-blank-root:where([class*=\"variant-sel-r1-\"]).layout-audio_blank_only\n .pie-blank-value\n span:not([class]),\n.mc-populated-blank-root:where([class*=\"variant-sel-r1-\"]).layout-stimulus_image_blank\n .pie-blank-value\n 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.mc-populated-blank-root:where([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.mc-populated-blank-root:where([class*=\"variant-sel-r1-\"]) .pie-template-line img,\n.mc-populated-blank-root:where([class*=\"variant-sel-r1-\"]) .pie-choice-label img {\n width: 150px;\n height: 150px;\n}\n", Dt = {
2160
+ "sel_r1-_plusggg": {
2161
+ variantId: "sel-r1-plusggg",
2162
+ variantClass: "variant-sel-r1-plusggg",
2163
+ sourceUrl: "https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_plusggg/0.0.1/question.css",
2164
+ cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_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-plusggg {\n max-width: 875px;\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: 1rem;\n --mpb-choice-hover-bg: #f2f2f2;\n --mpb-choice-selected-bg: #fcfcd3;\n}\n\n.mc-populated-blank-root.variant-sel-r1-plusggg {\n --mpb-choice-radio-padding: 20px;\n}\n"
2165
+ },
2166
+ "sr-vic": {
2167
+ variantId: "sr-vic",
2168
+ variantClass: "variant-sr-vic",
2169
+ sourceUrl: "https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sr-vic/0.0.1/question.css",
2170
+ cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sr-vic/0.0.1/question.css */\n/* Reference layout: web-ItemBankViewer/learnosity/templates/Renaissance/vic.scss */\n.mc-populated-blank-root.variant-sr-vic {\n font-family: Starial, Arial, sans-serif;\n --mpb-inline-grid-column-gap: 1rem;\n --mpb-inline-grid-row-gap: 0.5rem;\n --mpb-inline-template-margin-top: 0.2rem;\n --mpb-inline-choices-margin-top: 0.2rem;\n}\n\n.mc-populated-blank-root.variant-sr-vic .pie-template-line,\n.mc-populated-blank-root.variant-sr-vic .pie-blank-value,\n.mc-populated-blank-root.variant-sr-vic .pie-choice-label {\n line-height: 123%;\n}\n\n/* vic.scss: .rli-vic-answer uses display:flex so sentence and cloze stay on\n one line. The template HTML wraps text in <p>, which is block by default and\n breaks to a new line. Making <p> inline keeps the sentence and blank inline. */\n.mc-populated-blank-root.variant-sr-vic .pie-template-line p {\n display: inline;\n margin: 0;\n}\n\n/* LSY .rli-vic-answer has no text-align rule and inherits start; PIE's\n inline_sentence layout sets text-align:center on .template-line via a\n Svelte-scoped selector with specificity (0,4,0), so we need to match or\n exceed that. Pin sr-vic back to start so wrapped lines stay left-aligned.\n Same root cause as sel-vic. See CONTOOL-2573. */\n.mc-populated-blank-root.variant-sr-vic.layout-inline_sentence .pie-template-line.template-line {\n text-align: start;\n}\n\n/* vic.scss: .rli-vic-cloze > .rli-vic-content-element { color: #cc3333 } */\n.mc-populated-blank-root.variant-sr-vic .pie-blank-value {\n color: #cc3333;\n}\n\n/* vic.scss: .rli-vic-selected { background-color: #fcfcd3 } applied to the\n whole distractor row (radio + label), not just the label wrapper. */\n.mc-populated-blank-root.variant-sr-vic .pie-choice.is-selected {\n background-color: #fcfcd3;\n border-radius: 6px;\n}\n\n.mc-populated-blank-root.variant-sr-vic .pie-choice.is-selected .pie-choice-label-wrap {\n background-color: transparent;\n}\n\n/* vic.scss: distractor label text sits to the right of the radio — no centering. */\n.mc-populated-blank-root.variant-sr-vic .pie-choice-label {\n text-align: left;\n justify-content: flex-start;\n}\n\n/* vic.scss: .rli-vic-distractor:hover { background-color: #F2F2F2 } applied to\n the full row element, not only the inner label wrapper. */\n.mc-populated-blank-root.variant-sr-vic .pie-choice:not(.pie-choice-horizontal):hover {\n background-color: #f2f2f2;\n border-radius: 6px;\n}\n\n.mc-populated-blank-root.variant-sr-vic\n .pie-choice:not(.pie-choice-horizontal):hover\n .pie-choice-label-wrap {\n background-color: transparent;\n}\n\n/* Selected state must win over hover — yellow persists when hovering a chosen row. */\n.mc-populated-blank-root.variant-sr-vic .pie-choice:not(.pie-choice-horizontal).is-selected:hover {\n background-color: #fcfcd3;\n}\n"
2171
+ },
2172
+ sel_vic: {
2173
+ variantId: "sel-vic",
2174
+ variantClass: "variant-sel-vic",
2175
+ sourceUrl: "https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_vic/0.0.1/question.css",
2176
+ cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_vic/0.0.1/question.css */\n/* Reference layout: web-ItemBankViewer/learnosity/templates/Renaissance/sel_vic/scss/main.scss + vic.scss */\n.mc-populated-blank-root.variant-sel-vic {\n font-family: Starial, Arial, sans-serif;\n /* LSY chain: .lrn_widget (14px host) → .sel-vic { 1.5em } = 21px.\n PIE collapses both LSY layers into this single variant-root selector, so\n the resolved value is set directly. See CONTOOL-2567. */\n font-size: 21px;\n max-width: 800px;\n margin-inline: auto;\n --mpb-inline-grid-column-gap: 1rem;\n --mpb-inline-grid-row-gap: 0.5rem;\n --mpb-inline-template-margin-top: 0.2rem;\n --mpb-inline-choices-margin-top: 0.2rem;\n}\n\n.mc-populated-blank-root.variant-sel-vic .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.mc-populated-blank-root.variant-sel-vic .pie-template-line,\n.mc-populated-blank-root.variant-sel-vic .pie-blank-value,\n.mc-populated-blank-root.variant-sel-vic .pie-choice-label {\n line-height: 123%;\n}\n\n/* sel_vic/main.scss: template left ~75%, audio right ~25% on the same row.\n Svelte scoping prevents the component-internal grid-area rule from reaching\n .audio-container inside AudioPlayer, so we override it here via the global\n .pie-audio-container class which is not subject to scope hashing. */\n.mc-populated-blank-root.variant-sel-vic .pie-audio-container {\n grid-area: audio;\n margin: 0;\n justify-self: end;\n align-self: start;\n min-height: 128px;\n}\n\n/* vic.scss: sentence and cloze sit inline — the <p> wrapper must not break to\n a new line before the blank slot. */\n.mc-populated-blank-root.variant-sel-vic .pie-template-line p {\n display: inline;\n margin: 0;\n}\n\n/* LSY .rli-vic-answer has no text-align rule and inherits start; PIE's\n inline_sentence layout sets text-align:center on .template-line via a\n Svelte-scoped selector with specificity (0,4,0), so we need to match or\n exceed that. Pin sel-vic back to start so wrapped lines stay left-aligned.\n See CONTOOL-2573. */\n.mc-populated-blank-root.variant-sel-vic.layout-inline_sentence .pie-template-line.template-line {\n text-align: start;\n}\n\n/* vic.scss: .rli-vic-cloze { margin-left: 6px; margin-right: 6px } gives the\n cloze breathing room from adjacent text or punctuation. The shared blank slot\n has no inline margin, so set it here so the cloze→trailing-punctuation gap\n matches LSY. See CONTOOL-2572. */\n.mc-populated-blank-root.variant-sel-vic .pie-template-line .pie-blank-slot {\n margin-left: 6px;\n margin-right: 6px;\n}\n\n/* vic.scss: .rli-vic-cloze > .rli-vic-content-element { color: #cc3333 } */\n.mc-populated-blank-root.variant-sel-vic .pie-blank-value {\n color: #cc3333;\n}\n\n/* sel_vic/main.scss: .sel-vic { max-width: 800px } — the fieldset/choices must\n also be constrained so rows don't span beyond 800px. */\n.mc-populated-blank-root.variant-sel-vic .pie-choices-fieldset {\n max-width: 800px;\n width: 100%;\n}\n\n/* vic.scss: distractor label text sits to the right of the radio — no centering. */\n.mc-populated-blank-root.variant-sel-vic .pie-choice-label {\n text-align: left;\n justify-content: flex-start;\n}\n\n/* vic.scss: .rli-vic-selected { background-color: #fcfcd3 } on the full row. */\n.mc-populated-blank-root.variant-sel-vic .pie-choice.is-selected {\n background-color: #fcfcd3;\n border-radius: 6px;\n}\n\n.mc-populated-blank-root.variant-sel-vic .pie-choice.is-selected .pie-choice-label-wrap {\n background-color: transparent;\n}\n\n/* Selected state must win over hover. */\n.mc-populated-blank-root.variant-sel-vic .pie-choice:not(.pie-choice-horizontal).is-selected:hover {\n background-color: #fcfcd3;\n}\n\n/* vic.scss: .rli-vic-distractor:hover { background-color: #F2F2F2 } on the full row. */\n.mc-populated-blank-root.variant-sel-vic .pie-choice:not(.pie-choice-horizontal):hover {\n background-color: #f2f2f2;\n border-radius: 6px;\n}\n\n.mc-populated-blank-root.variant-sel-vic\n .pie-choice:not(.pie-choice-horizontal):hover\n .pie-choice-label-wrap {\n background-color: transparent;\n}\n\n@media (min-width: 620px) {\n .mc-populated-blank-root.variant-sel-vic .pie-audio-transcript {\n min-width: 620px;\n max-width: 800px;\n transform: translateX(-55px);\n }\n}\n"
2177
+ },
2178
+ "sel_r1-_gplusggg": {
2179
+ variantId: "sel-r1-gplusggg",
2180
+ variantClass: "variant-sel-r1-gplusggg",
2181
+ sourceUrl: "https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_gplusggg/0.0.1/question.css",
2182
+ cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_gplusggg/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-gplusggg {\n max-width: 875px;\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: 1rem;\n --mpb-choice-hover-bg: #f2f2f2;\n --mpb-choice-selected-bg: #fcfcd3;\n}\n\n/* r1.scss: .rli-r1-content-element boxes all have fixed line-height:89px, so every\n token in the stem row shares a stable baseline regardless of content. In PIE,\n the blank slot's baseline shifts when the empty placeholder (short &nbsp;) is\n replaced by the filled value span (full text height), dragging adjacent tokens\n down by ~9px. Switching to align-items:center is safe here because gplusggg has\n only one row of content (blank + \"four\"), so vertical centering and baseline\n alignment produce the same visual result. The :is() wrapper raises specificity\n above the base [class*=] rule without needing !important. */\n:is(.mc-populated-blank-root.variant-sel-r1-gplusggg) .pie-template-line {\n align-items: center;\n}\n"
2183
+ },
2184
+ "sel_r1-g_plusggg": {
2185
+ variantId: "sel-r1-g-stem",
2186
+ variantClass: "variant-sel-r1-g-stem",
2187
+ sourceUrl: "https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-g_plusggg/0.0.1/question.css",
2188
+ cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-g_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-g-stem {\n max-width: 875px;\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-hover-bg: #f2f2f2;\n --mpb-choice-selected-bg: #fcfcd3;\n /* r1.scss: .rli-r1-cloze { border-bottom: 6px solid } */\n --mpb-blank-underline-wide-width: 6px;\n}\n"
2189
+ },
2190
+ "sel_r1-gg_plusggg": {
2191
+ variantId: "sel-r1-gg-plus",
2192
+ variantClass: "variant-sel-r1-gg-plus",
2193
+ sourceUrl: "https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-gg_plusggg/0.0.1/question.css",
2194
+ cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-gg_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-gg-plus {\n max-width: 875px;\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-hover-bg: #f2f2f2;\n --mpb-choice-selected-bg: #fcfcd3;\n}\n"
2195
+ },
2196
+ "sel_r1-_ggplusggg": {
2197
+ variantId: "sel-r1-ggplus",
2198
+ variantClass: "variant-sel-r1-ggplus",
2199
+ sourceUrl: "https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_ggplusggg/0.0.1/question.css",
2200
+ cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_ggplusggg/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-ggplus {\n max-width: 875px;\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-hover-bg: #f2f2f2;\n --mpb-choice-selected-bg: #fcfcd3;\n}\n"
2201
+ },
2202
+ "sel_r1-s3_plusggg": {
2203
+ variantId: "sel-r1-s3",
2204
+ variantClass: "variant-sel-r1-s3",
2205
+ sourceUrl: "https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-s3_plusggg/0.0.1/question.css",
2206
+ 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"
2207
+ }
2208
+ }, Ot = (e) => String(e || "").trim().toLowerCase().replace(/v\d+\.\d+\.\d+$/i, ""), kt = (e) => Dt[Ot(e)], At = (e) => kt(e)?.variantClass || "", jt = /* @__PURE__ */ new Set([
2209
+ "sel-r1-plusggg",
2210
+ "sel-r1-gplusggg",
2211
+ "sel-r1-g-stem",
2212
+ "sel-r1-gg-plus",
2213
+ "sel-r1-ggplus",
2214
+ "sel-r1-s3"
2215
+ ]), Mt = /\.mc-populated-blank-root(?![\w-])/g, Nt = ((e) => {
2216
+ let t = 2166136261;
2217
+ for (let n = 0; n < e.length; n++) t ^= e.charCodeAt(n), t = Math.imul(t, 16777619);
2218
+ return (t >>> 0).toString(36);
2219
+ })([Et, ...Object.values(Dt).map((e) => e.cssText)].join("\n")), Pt = (e) => e.replace(Mt, `.mc-populated-blank-root:where([data-mpb-css="${Nt}"])`), Ft = (e, t, n) => {
2220
+ let r = `mc-populated-blank-css-${t}-${Nt}`;
2221
+ if (e.getElementById(r)) return;
2222
+ let i = document.createElement("style");
2223
+ i.id = r, i.setAttribute("data-mpb-variant", t), i.textContent = Pt(n), (e instanceof ShadowRoot ? e : e.head).appendChild(i);
2224
+ }, It = (e, t) => {
2225
+ if (!e?.cssText || typeof document > "u") return;
2226
+ let n = t.getRootNode(), r = n instanceof ShadowRoot ? n : document;
2227
+ jt.has(e.variantId) && Ft(r, "sel-r1-base", Et), Ft(r, e.variantId, e.cssText);
2228
+ }, Lt = d("<div class=\"pie-prompt svelte-6wlbb4\"></div>"), Rt = A("<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>"), zt = A("<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>"), Bt = d("<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>"), Vt = d("<div class=\"sentence-line pie-sentence-line svelte-6wlbb4\"></div>"), Ht = d("<div class=\"template-line pie-template-line svelte-6wlbb4\"><!><!><!></div>"), Ut = d("<p class=\"sr-only pie-result-feedback svelte-6wlbb4\" role=\"status\" aria-live=\"polite\"> </p>"), Wt = d("<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>"), Gt = {
2229
+ hash: "svelte-6wlbb4",
2230
+ 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;}\n\n /* Layout is self-contained: PIE players ship no Tailwind, so no utility class or\n preflight reset can be assumed. The blank slot, choice tiles and variant\n max-widths are sized for border-box. */.mc-populated-blank-root.svelte-6wlbb4,\n .mc-populated-blank-root.svelte-6wlbb4 *,\n .mc-populated-blank-root.svelte-6wlbb4 *::before,\n .mc-populated-blank-root.svelte-6wlbb4 *::after {box-sizing:border-box;}\n\n /* An authored image on its own line (the sel_r1-s3 stimulus) would otherwise sit\n on the text baseline and add the descender gap below it. */.mc-populated-blank-root.svelte-6wlbb4 img {vertical-align:middle;}.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 );padding:1rem;}.pie-prompt.svelte-6wlbb4 {margin-bottom:1rem;}\n\n /* Flush paragraphs, as the demo app's preflight reset rendered them. */.pie-prompt.svelte-6wlbb4 p,\n .sentence-line.svelte-6wlbb4 p {margin:0;}.sentence-line.svelte-6wlbb4 {margin-bottom:0.75rem;}.pie-toggle-correct-answer.svelte-6wlbb4 {width:100%;cursor:pointer;border:0;background:transparent;padding:0;margin-bottom:0.75rem;display:flex;justify-content:center;text-align:center;font:inherit;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;margin-bottom:1rem;}.template-line.svelte-6wlbb4 p {margin:0;display:inline;}.pie-choices-fieldset.svelte-6wlbb4 {border:0;padding:0;margin:0;}.pie-choices.svelte-6wlbb4 {display:flex;}.choices-horizontal.svelte-6wlbb4 {flex-direction:row;flex-wrap:wrap;align-items:flex-start;justify-content:center;}.choices-vertical.svelte-6wlbb4 {flex-direction:column;}.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 }"
2231
+ };
2232
+ function Kt(s, u) {
2233
+ c(u, !0), ee(s, Gt);
2234
+ let d = w(u, "model", 7), p = w(u, "session", 7), _ = w(u, "onSessionChange", 7), y = w(u, "onAudioStarted", 7), T = w(u, "onAudioEnded", 7), O = (e) => Q(e, d()?.language), k = e(""), A = e(null), N = e(null), P = e(null), F = `mc-populated-blank-${Math.random().toString(36).slice(2, 10)}`, I = a(() => (d()?.mode || d()?.env?.mode || "").toString()), L = a(() => M(I) === "evaluate"), R = a(() => d()?.correctness), z = a(() => typeof d()?.responseCorrect == "boolean" ? d().responseCorrect : M(R) === "correct"), te = a(() => M(R) === "correct"), ne = a(() => M(R) === "incorrect"), B = e(!1), re = a(() => M(L) && !M(z) && !!d()?.correctChoiceId), V = a(() => d()?.layoutProfile || ""), H = a(() => _t({
2235
+ interactionMode: d()?.interactionMode,
2236
+ template: d()?.template,
2237
+ choiceLayout: d()?.choiceLayout,
2238
+ layoutProfile: M(V),
2239
+ hasAudio: d()?.hasAudio,
2240
+ useFeatureButtonAudio: d()?.useFeatureButtonAudio
2241
+ })), ie = a(() => M(H).isAudioOnlyMode), ae = a(() => M(H).isBlankOnlyTemplate), U = a(() => M(H).isHorizontalChoices), oe = a(() => M(H).hasInlineSentenceAudioLayout), se = a(() => M(H).useFeatureButtonAudio), W = a(() => bt({
2242
+ layoutProfile: M(V),
2243
+ isBlankOnlyTemplate: M(ae),
2244
+ configuredLimits: d()?.layoutLimits,
2245
+ customProfilePresets: d()?.layoutProfilePresets
2246
+ })), ce = a(() => Array.isArray(d()?.choices) ? d().choices : []), le = a(() => d()?.choiceMode || "text"), ue = a(() => p()?.choiceId || M(k) || ""), de = a(() => `${F}-choice-group-${d()?.id || "1"}`), fe = a(() => Ct({
2247
+ selectedId: M(ue),
2248
+ isEvaluateMode: M(L),
2249
+ showCorrectAnswer: M(B),
2250
+ correctChoiceId: String(d()?.correctChoiceId || "")
2251
+ })), pe = a(() => M(ce).find((e) => e.id === M(fe))), me = a(() => String(M(pe)?.labelHtml || "")), G = a(() => wt({
2252
+ isEvaluateMode: M(L),
2253
+ showCorrectAnswer: M(B),
2254
+ isCorrect: M(te),
2255
+ isIncorrect: M(ne),
2256
+ selectedId: M(ue)
2257
+ })), he = a(() => M(G) === "correct" ? O("correctAnswerSelected") : M(G) === "incorrect" ? O("incorrectAnswerSelected") : ""), K = a(() => mt({
2258
+ isEvaluateMode: M(L),
2259
+ correctChoiceId: String(d()?.correctChoiceId || ""),
2260
+ selectedId: String(M(ue) || ""),
2261
+ showCorrectAnswer: M(B)
2262
+ })), q = a(() => `${F}-prompt`), ge = a(() => `${F}-choices-legend`), _e = a(() => `${F}-result`), ve = a(() => `${F}-blank-hint`), ye = a(() => Tt({
2263
+ prompt: d()?.prompt || "",
2264
+ legendMaxChars: M(W).legendMaxChars,
2265
+ answerChoicesLabel: O("answerChoices")
2266
+ })), J = a(() => d()?.prompt ? M(q) : void 0), be = a(() => d()?.prompt ? void 0 : String(d()?.choiceGroupLabel || "").trim() || M(ye)), xe = a(() => d()?.prompt ? M(q) : void 0), Se = a(() => {
2267
+ let e = String(d()?.language || d()?.locale || "").trim();
2268
+ return e ? e.replace(/_/g, "-") : void 0;
2269
+ }), Ce = a(() => kt(d()?.customType)), we = a(() => At(d()?.customType)), Te = a(() => {
2270
+ let e = d()?.template || "", t = e.indexOf("{{blank}}");
2271
+ if (t < 0) return {
2272
+ before: e,
2273
+ after: ""
2274
+ };
2275
+ let n = e.slice(0, t), r = e.slice(t + 9);
2276
+ return M(V) === "inline_sentence" && (n = `${n.replace(/\s+$/, "")} `, r = ` ${r.replace(/^\s+/, "")}`), {
2277
+ before: n,
2278
+ after: r
2279
+ };
2280
+ });
2281
+ function Ee(e) {
2282
+ let t = e.target;
2283
+ if (!t.checked) return;
2284
+ let n = t.value;
2285
+ x(k, n, !0), _()?.({
2286
+ ...p(),
2287
+ choiceId: n
2288
+ });
2289
+ }
2290
+ function De() {
2291
+ M(re) && x(B, !M(B));
2292
+ }
2293
+ t(() => {
2294
+ (!M(L) || M(z)) && x(B, !1);
2295
+ });
2296
+ function Oe(e) {
2297
+ if (d()?.disabled) return;
2298
+ let t = e.key;
2299
+ if (![
2300
+ "ArrowDown",
2301
+ "ArrowRight",
2302
+ "ArrowUp",
2303
+ "ArrowLeft"
2304
+ ].includes(t)) return;
2305
+ e.preventDefault();
2306
+ let n = e.currentTarget, r = Array.from(n.querySelectorAll("input[type=\"radio\"]:not([disabled])"));
2307
+ if (r.length === 0) return;
2308
+ let i = r.findIndex((e) => e.checked);
2309
+ i = t === "ArrowDown" || t === "ArrowRight" ? i < 0 ? 0 : (i + 1) % r.length : i < 0 ? r.length - 1 : (i - 1 + r.length) % r.length;
2310
+ let a = r[i];
2311
+ a.checked = !0, a.dispatchEvent(new Event("change", { bubbles: !0 })), a.focus();
2312
+ }
2313
+ let ke = a(() => St({
2314
+ locale: d()?.locale,
2315
+ audioButtonSkin: d()?.audioButtonSkin,
2316
+ audioButtonSkinsByLocale: d()?.audioButtonSkinsByLocale
2317
+ }));
2318
+ t(() => {
2319
+ x(k, p()?.choiceId || "", !0);
2320
+ }), t(() => {
2321
+ let e = M(A);
2322
+ if (e) return e.addEventListener("click", De), () => e.removeEventListener("click", De);
2323
+ }), t(() => {
2324
+ let e = M(N);
2325
+ if (!e) return;
2326
+ let t = (e) => {
2327
+ e.target?.type === "radio" && Ee(e);
2328
+ }, n = (e) => Oe(e);
2329
+ return e.addEventListener("change", t), e.addEventListener("keydown", n), () => {
2330
+ e.removeEventListener("change", t), e.removeEventListener("keydown", n);
2331
+ };
2332
+ }), t(() => {
2333
+ M(P) && It(M(Ce), M(P));
2334
+ });
2335
+ var Ae = {
2336
+ get model() {
2337
+ return d();
2338
+ },
2339
+ set model(e) {
2340
+ d(e), b();
2341
+ },
2342
+ get session() {
2343
+ return p();
2344
+ },
2345
+ set session(e) {
2346
+ p(e), b();
2347
+ },
2348
+ get onSessionChange() {
2349
+ return _();
2350
+ },
2351
+ set onSessionChange(e) {
2352
+ _(e), b();
2353
+ },
2354
+ get onAudioStarted() {
2355
+ return y();
2356
+ },
2357
+ set onAudioStarted(e) {
2358
+ y(e), b();
2359
+ },
2360
+ get onAudioEnded() {
2361
+ return T();
2362
+ },
2363
+ set onAudioEnded(e) {
2364
+ T(e), b();
2365
+ }
2366
+ }, Y = Wt(), je = j(Y), Me = (e) => {
2367
+ {
2368
+ let t = a(() => d()?.language);
2369
+ pt(e, {
2370
+ get html() {
2371
+ return d().teacherInstructions;
2372
+ },
2373
+ get language() {
2374
+ return M(t);
2375
+ }
2376
+ });
2377
+ }
2378
+ };
2379
+ E(je, (e) => {
2380
+ d()?.teacherInstructions && e(Me);
2381
+ });
2382
+ var Ne = n(je, 2), Pe = (e) => {
2383
+ var t = Lt();
2384
+ h(t, () => d().prompt, !0), i(t), l(() => f(t, "id", M(q))), v(e, t);
2385
+ };
2386
+ E(Ne, (e) => {
2387
+ d()?.prompt && e(Pe);
2388
+ });
2389
+ var Fe = n(Ne, 2), Ie = (e) => {
2390
+ var t = Bt(), a = j(t), o = j(a), s = j(o), c = j(s), u = (e) => {
2391
+ v(e, Rt());
2392
+ }, p = (e) => {
2393
+ v(e, zt());
2394
+ };
2395
+ E(c, (e) => {
2396
+ M(B) ? e(u) : e(p, -1);
2397
+ }), i(s);
2398
+ var m = r(n(s, 2), !0);
2399
+ i(o), i(a), D(a, (e) => x(A, e), () => M(A)), i(t), l((e) => {
2400
+ f(a, "aria-pressed", M(B)), C(m, e);
2401
+ }, [() => Ue(M(B) ? "hideCorrectAnswer" : "showCorrectAnswer", d()?.language)]), v(e, t);
2402
+ };
2403
+ E(Fe, (e) => {
2404
+ M(re) && e(Ie);
2405
+ });
2406
+ var X = n(Fe, 2);
2407
+ {
2408
+ let e = a(() => !!d()?.hasAudio), t = a(() => d()?.audioUrl), n = a(() => !!d()?.autoplayAudioEnabled), r = a(() => d()?.language);
2409
+ Ye(X, {
2410
+ get hasAudio() {
2411
+ return M(e);
2412
+ },
2413
+ get audioUrl() {
2414
+ return M(t);
2415
+ },
2416
+ get useFeatureButtonAudio() {
2417
+ return M(se);
2418
+ },
2419
+ get autoplayEnabled() {
2420
+ return M(n);
2421
+ },
2422
+ get featureAudioSkin() {
2423
+ return M(ke);
2424
+ },
2425
+ get language() {
2426
+ return M(r);
2427
+ },
2428
+ get onaudiostarted() {
2429
+ return y();
2430
+ },
2431
+ get onaudioended() {
2432
+ return T();
2433
+ }
2434
+ });
2435
+ }
2436
+ var Le = n(X, 2), Re = (e) => {
2437
+ var t = Vt();
2438
+ h(t, () => d().sentenceHtml, !0), i(t), l(() => f(t, "aria-describedby", M(xe))), v(e, t);
2439
+ };
2440
+ E(Le, (e) => {
2441
+ d()?.sentenceHtml && e(Re);
2442
+ });
2443
+ var ze = n(Le, 2), Be = (e) => {
2444
+ var t = Ht(), r = j(t);
2445
+ h(r, () => M(Te).before);
2446
+ var o = n(r);
2447
+ {
2448
+ let e = a(() => O("blankLabel")), t = a(() => d()?.language);
2449
+ tt(o, {
2450
+ get choiceMode() {
2451
+ return M(le);
2452
+ },
2453
+ get displayChoice() {
2454
+ return M(pe);
2455
+ },
2456
+ get displayChoiceLabelHtml() {
2457
+ return M(me);
2458
+ },
2459
+ get isStandalone() {
2460
+ return M(ae);
2461
+ },
2462
+ get blankWidth() {
2463
+ return M(W).blankWidth;
2464
+ },
2465
+ get blankBorderWidth() {
2466
+ return M(W).blankBorderWidth;
2467
+ },
2468
+ get ariaLabel() {
2469
+ return M(e);
2470
+ },
2471
+ get language() {
2472
+ return M(t);
2473
+ }
2474
+ });
2475
+ }
2476
+ h(n(o), () => M(Te).after), i(t), l(() => f(t, "aria-describedby", M(xe))), v(e, t);
2477
+ };
2478
+ E(ze, (e) => {
2479
+ M(ie) || e(Be);
2480
+ });
2481
+ var Ve = n(ze, 2), Z = (e) => {
2482
+ var t = Ut(), n = r(t, !0);
2483
+ l(() => {
2484
+ f(t, "id", M(_e)), C(n, M(he));
2485
+ }), v(e, t);
2486
+ };
2487
+ E(Ve, (e) => {
2488
+ M(he) && e(Z);
2489
+ });
2490
+ var He = n(Ve, 2), We = r(He, !0), Ge = n(He, 2), Ke = j(Ge), qe = r(Ke, !0), $ = n(Ke, 2);
2491
+ return g($, 21, () => M(ce), (e) => e.id, (e, t) => {
2492
+ {
2493
+ let n = a(() => M(fe) === M(t).id), r = a(() => !!d()?.disabled), i = a(() => M(K).get(M(t).id)), o = a(() => d()?.language);
2494
+ ut(e, {
2495
+ get choice() {
2496
+ return M(t);
2497
+ },
2498
+ get choiceMode() {
2499
+ return M(le);
2500
+ },
2501
+ get isHorizontal() {
2502
+ return M(U);
2503
+ },
2504
+ get isSelected() {
2505
+ return M(n);
2506
+ },
2507
+ get isDisabled() {
2508
+ return M(r);
2509
+ },
2510
+ get correctness() {
2511
+ return M(i);
2512
+ },
2513
+ get isEvaluateMode() {
2514
+ return M(L);
2515
+ },
2516
+ get instanceId() {
2517
+ return F;
2518
+ },
2519
+ get radioGroupName() {
2520
+ return M(de);
2521
+ },
2522
+ get language() {
2523
+ return M(o);
2524
+ }
2525
+ });
2526
+ }
2527
+ }), i($), D($, (e) => x(N, e), () => M(N)), i(Ge), i(Y), D(Y, (e) => x(P, e), () => M(P)), l((e, t) => {
2528
+ S(Y, 1, `mc-populated-blank-root pie-element pie-element-mc-populated-blank pie-delivery-root layout-${M(V)} ${M(we)} ${M(oe) ? "has-inline-audio" : ""}`, "svelte-6wlbb4"), f(Y, "lang", M(Se)), m(Y, M(W).rootStyle), f(Y, "data-mpb-css", Nt), f(He, "id", M(ve)), C(We, e), Ge.disabled = d()?.disabled, f(Ke, "id", M(ge)), C(qe, M(ye)), S($, 1, `pie-choices ${M(U) ? "choices-horizontal" : "choices-vertical"}`, "svelte-6wlbb4"), f($, "aria-labelledby", M(J)), f($, "aria-label", M(be)), f($, "aria-describedby", t);
2529
+ }, [() => O("blankPreSelectionHint"), () => [M(ve), M(he) ? M(_e) : void 0].filter(Boolean).join(" ")]), v(s, Y), o(Ae);
2530
+ }
2531
+ k(Kt, {
2532
+ model: { type: "Object" },
2533
+ session: { type: "Object" },
2534
+ options: { type: "Object" },
2535
+ onSessionChange: {},
2536
+ onAudioStarted: {},
2537
+ onAudioEnded: {}
2538
+ }, [], []);
2539
+ //#endregion
2540
+ export { Q as n, Kt as t };
2541
+
2542
+ //# sourceMappingURL=McPopulatedBlank-DbmR6UWn.js.map