@pie-players/pie-assessment-player 1.0.0-beta.2 → 1.0.0-beta.4

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.
@@ -1,36 +1,36 @@
1
1
  import "@pie-players/pie-section-player";
2
- import { createNewAssessmentSession as Q, frameworkErrorFromUnknown as J, setCurrentSectionPosition as K, upsertSectionSession as Y } from "@pie-players/pie-assessment-toolkit";
3
- function w(e) {
2
+ import { createNewAssessmentSession as Y, frameworkErrorFromUnknown as Z, setCurrentSectionPosition as X, upsertSectionSession as ee } from "@pie-players/pie-assessment-toolkit";
3
+ function A(e) {
4
4
  "@babel/helpers - typeof";
5
- return w = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
5
+ return A = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
6
6
  return typeof t;
7
7
  } : function(t) {
8
8
  return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
9
- }, w(e);
9
+ }, A(e);
10
10
  }
11
- function Z(e, t) {
12
- if (w(e) != "object" || !e) return e;
11
+ function te(e, t) {
12
+ if (A(e) != "object" || !e) return e;
13
13
  var i = e[Symbol.toPrimitive];
14
14
  if (i !== void 0) {
15
15
  var n = i.call(e, t || "default");
16
- if (w(n) != "object") return n;
16
+ if (A(n) != "object") return n;
17
17
  throw new TypeError("@@toPrimitive must return a primitive value.");
18
18
  }
19
19
  return (t === "string" ? String : Number)(e);
20
20
  }
21
- function X(e) {
22
- var t = Z(e, "string");
23
- return w(t) == "symbol" ? t : t + "";
21
+ function ie(e) {
22
+ var t = te(e, "string");
23
+ return A(t) == "symbol" ? t : t + "";
24
24
  }
25
25
  function f(e, t, i) {
26
- return (t = X(t)) in e ? Object.defineProperty(e, t, {
26
+ return (t = ie(t)) in e ? Object.defineProperty(e, t, {
27
27
  value: i,
28
28
  enumerable: !0,
29
29
  configurable: !0,
30
30
  writable: !0
31
31
  }) : e[t] = i, e;
32
32
  }
33
- var ee = class {
33
+ var ne = class {
34
34
  constructor() {
35
35
  f(this, "initialized", !1), f(this, "config", void 0);
36
36
  }
@@ -95,17 +95,17 @@ var ee = class {
95
95
  return this.config?.attributeTransformer ? this.config.attributeTransformer(e) : e;
96
96
  }
97
97
  };
98
- function x(e) {
98
+ function L(e) {
99
99
  const t = e;
100
100
  return typeof t?.noticeError == "function" && typeof t.addPageAction == "function";
101
101
  }
102
102
  function b() {
103
103
  if (typeof window > "u") return;
104
104
  const { newrelic: e, NREUM: t } = window;
105
- if (x(e)) return e;
106
- if (x(t)) return t;
105
+ if (L(e)) return e;
106
+ if (L(t)) return t;
107
107
  }
108
- var te = class extends ee {
108
+ var se = class extends ne {
109
109
  constructor(...e) {
110
110
  super(...e), f(this, "providerId", "newrelic"), f(this, "providerName", "New Relic");
111
111
  }
@@ -133,12 +133,12 @@ var te = class extends ee {
133
133
  if (typeof t?.setCustomAttribute == "function") for (const [i, n] of Object.entries(e)) t.setCustomAttribute(i, n);
134
134
  }
135
135
  };
136
- function B(e) {
136
+ function $(e) {
137
137
  if (!e || typeof e != "object") return !1;
138
138
  const t = e;
139
139
  return typeof t.providerId == "string" && typeof t.providerName == "string" && typeof t.initialize == "function" && typeof t.trackError == "function" && typeof t.trackEvent == "function" && typeof t.destroy == "function" && typeof t.isReady == "function";
140
140
  }
141
- var ie = /* @__PURE__ */ new Set([
141
+ var oe = /* @__PURE__ */ new Set([
142
142
  "annotation-xml",
143
143
  "color-profile",
144
144
  "font-face",
@@ -147,17 +147,17 @@ var ie = /* @__PURE__ */ new Set([
147
147
  "font-face-format",
148
148
  "font-face-name",
149
149
  "missing-glyph"
150
- ]), ne = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, se = (e, t = "custom element tag") => {
150
+ ]), re = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, ae = (e, t = "custom element tag") => {
151
151
  if (!e || typeof e != "string") throw new Error(`Invalid ${t}: expected a non-empty string`);
152
152
  const i = e.trim();
153
153
  if (!i) throw new Error(`Invalid ${t}: tag is empty`);
154
154
  if (i !== i.toLowerCase()) throw new Error(`Invalid ${t} "${i}": custom element names must be lowercase`);
155
155
  if (!i.includes("-")) throw new Error(`Invalid ${t} "${i}": custom element names must include a hyphen`);
156
- if (ie.has(i)) throw new Error(`Invalid ${t} "${i}": this name is reserved by the HTML spec`);
157
- if (!ne.test(i)) throw new Error(`Invalid ${t} "${i}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
156
+ if (oe.has(i)) throw new Error(`Invalid ${t} "${i}": this name is reserved by the HTML spec`);
157
+ if (!re.test(i)) throw new Error(`Invalid ${t} "${i}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
158
158
  return i;
159
- }, oe = (e) => typeof DOMException < "u" && e instanceof DOMException ? e.name === "NotSupportedError" || e.code === DOMException.NOT_SUPPORTED_ERR : (typeof e == "object" && e !== null && "name" in e ? String(e.name) : "") === "NotSupportedError", re = (e, t, i = "custom element tag", n = {}) => {
160
- const s = se(e, i);
159
+ }, le = (e) => typeof DOMException < "u" && e instanceof DOMException ? e.name === "NotSupportedError" || e.code === DOMException.NOT_SUPPORTED_ERR : (typeof e == "object" && e !== null && "name" in e ? String(e.name) : "") === "NotSupportedError", ce = (e, t, i = "custom element tag", n = {}) => {
160
+ const s = ae(e, i);
161
161
  if (customElements.get(s)) return {
162
162
  outcome: "already-defined",
163
163
  tagName: s
@@ -168,7 +168,7 @@ var ie = /* @__PURE__ */ new Set([
168
168
  tagName: s
169
169
  };
170
170
  } catch (o) {
171
- if (!oe(o)) return {
171
+ if (!le(o)) return {
172
172
  outcome: "error",
173
173
  tagName: s,
174
174
  error: o
@@ -196,8 +196,8 @@ var ie = /* @__PURE__ */ new Set([
196
196
  };
197
197
  }
198
198
  }
199
- }, H = (e, t, i = "custom element tag") => {
200
- const n = re(e, t, i);
199
+ }, q = (e, t, i = "custom element tag") => {
200
+ const n = ce(e, t, i);
201
201
  if (n.outcome === "error" || n.outcome === "wrapped-error") throw n.error;
202
202
  return {
203
203
  status: n.outcome === "already-defined" ? "already-defined" : "defined",
@@ -210,7 +210,7 @@ var ie = /* @__PURE__ */ new Set([
210
210
  for (const i in e) Object.hasOwn(e, i) && (t[i] = y(e[i]));
211
211
  return t;
212
212
  };
213
- function $(e, t) {
213
+ function G(e, t) {
214
214
  const i = `[${e}]`;
215
215
  return {
216
216
  debug: (n, ...s) => {
@@ -221,11 +221,11 @@ function $(e, t) {
221
221
  error: (n, ...s) => console.error(i, n, ...s)
222
222
  };
223
223
  }
224
- function q() {
224
+ function j() {
225
225
  return typeof window < "u" && window.PIE_DEBUG === !0;
226
226
  }
227
- var ae = $("instrumentation-event-bridge", () => q());
228
- function le(e) {
227
+ var de = G("instrumentation-event-bridge", () => j());
228
+ function ue(e) {
229
229
  if (e === null) return !0;
230
230
  const t = typeof e;
231
231
  if (t === "function" || t === "symbol") return !1;
@@ -233,18 +233,18 @@ function le(e) {
233
233
  const i = Object.getPrototypeOf(e);
234
234
  return i === Object.prototype || i === null;
235
235
  }
236
- function ce(e) {
236
+ function he(e) {
237
237
  if (e && typeof e == "object") {
238
238
  const t = {};
239
- for (const [i, n] of Object.entries(e)) le(n) && (t[i] = n);
239
+ for (const [i, n] of Object.entries(e)) ue(n) && (t[i] = n);
240
240
  return t;
241
241
  }
242
242
  return typeof e > "u" ? {} : { value: e };
243
243
  }
244
- function de(e) {
245
- ae.warn(`[InstrumentationEventBridge:${e}] Ignoring invalid instrumentation provider; expected InstrumentationProvider contract`);
244
+ function pe(e) {
245
+ de.warn(`[InstrumentationEventBridge:${e}] Ignoring invalid instrumentation provider; expected InstrumentationProvider contract`);
246
246
  }
247
- function ue(e) {
247
+ function me(e) {
248
248
  try {
249
249
  e.provider.trackError(e.error instanceof Error ? e.error : new Error(String(e.error ?? "Unknown instrumentation bridge error")), {
250
250
  component: e.component,
@@ -254,13 +254,13 @@ function ue(e) {
254
254
  } catch {
255
255
  }
256
256
  }
257
- function he(e) {
257
+ function ge(e) {
258
258
  if (!e.host || !e.eventMap.length) return () => {
259
259
  };
260
260
  if (!e.instrumentationProvider) return () => {
261
261
  };
262
- if (!B(e.instrumentationProvider))
263
- return e.debug && de(e.component), () => {
262
+ if (!$(e.instrumentationProvider))
263
+ return e.debug && pe(e.component), () => {
264
264
  };
265
265
  const t = e.instrumentationProvider, i = [], n = Math.max(0, e.dedupeWindowMs ?? 0), s = /* @__PURE__ */ new Map(), o = (r, a) => {
266
266
  const h = [
@@ -277,7 +277,7 @@ function he(e) {
277
277
  const a = (h) => {
278
278
  try {
279
279
  if (!t.isReady() || e.shouldTrackEvent && !e.shouldTrackEvent(h)) return;
280
- const d = ce(h.detail), c = (/* @__PURE__ */ new Date()).toISOString(), p = {
280
+ const d = he(h.detail), c = (/* @__PURE__ */ new Date()).toISOString(), p = {
281
281
  ...d,
282
282
  ...e.staticAttributes,
283
283
  component: e.component,
@@ -291,7 +291,7 @@ function he(e) {
291
291
  }
292
292
  t.trackEvent(r.instrumentationEventName, { ...p });
293
293
  } catch (d) {
294
- ue({
294
+ me({
295
295
  provider: t,
296
296
  component: e.component,
297
297
  error: d,
@@ -307,14 +307,14 @@ function he(e) {
307
307
  for (const r of i) r();
308
308
  };
309
309
  }
310
- function L(e) {
310
+ function x(e) {
311
311
  return e && typeof e == "object" ? e : {};
312
312
  }
313
- function D(e) {
314
- const t = L(L(e).loaderConfig);
313
+ function M(e) {
314
+ const t = x(x(e).loaderConfig);
315
315
  return Object.keys(t).length > 0 ? t : null;
316
316
  }
317
- function M(e) {
317
+ function D(e) {
318
318
  if (!e || !("instrumentationProvider" in e)) return { kind: "unset" };
319
319
  const t = e.instrumentationProvider;
320
320
  return t === null ? { kind: "null" } : typeof t > "u" ? { kind: "unset" } : {
@@ -327,25 +327,25 @@ function F(e) {
327
327
  const t = e.trackPageActions;
328
328
  return typeof t == "boolean" ? t : void 0;
329
329
  }
330
- function pe(e, t) {
330
+ function fe(e, t) {
331
331
  return e.kind === "value" || e.kind === "null" ? e : t;
332
332
  }
333
- var I, me = $("instrumentation-provider-resolution", () => q());
334
- function ge() {
335
- return I || (I = new te(), I.initialize()), I;
333
+ var E, ye = G("instrumentation-provider-resolution", () => j());
334
+ function ve() {
335
+ return E || (E = new se(), E.initialize()), E;
336
336
  }
337
- function fe(e) {
338
- const t = D(e.runtimePlayer), i = D(e.player), n = F(t), s = F(i), o = n ?? s ?? !1, r = pe(M(t), M(i));
337
+ function be(e) {
338
+ const t = M(e.runtimePlayer), i = M(e.player), n = F(t), s = F(i), o = n ?? s ?? !1, r = fe(D(t), D(i));
339
339
  if (r.kind !== "null") {
340
- if (r.kind === "unset") return o ? ge() : void 0;
341
- if (B(r.value)) return r.value;
340
+ if (r.kind === "unset") return o ? ve() : void 0;
341
+ if ($(r.value)) return r.value;
342
342
  if (e.debug) {
343
343
  const a = e.component ? `[${e.component}] ` : "";
344
- me.warn(`${a}Ignoring invalid instrumentation provider; expected InstrumentationProvider contract`);
344
+ ye.warn(`${a}Ignoring invalid instrumentation provider; expected InstrumentationProvider contract`);
345
345
  }
346
346
  }
347
347
  }
348
- var ye = [
348
+ var Se = [
349
349
  {
350
350
  sourceEventName: "assessment-controller-ready",
351
351
  instrumentationEventName: "pie-assessment-controller-ready"
@@ -379,7 +379,7 @@ var ye = [
379
379
  instrumentationEventName: "pie-assessment-error"
380
380
  }
381
381
  ];
382
- function R(e, t = !1) {
382
+ function N(e, t = !1) {
383
383
  if (typeof e == "boolean") return e;
384
384
  if (e == null) return t;
385
385
  const i = String(e).trim().toLowerCase();
@@ -390,35 +390,7 @@ function R(e, t = !1) {
390
390
  "no"
391
391
  ].includes(i);
392
392
  }
393
- var ve = { "nl-NL": () => import("./nl-NL-DqnT-1mq.js") }, be = ["en-US", "nl-NL"];
394
- async function Se(e) {
395
- const t = ve[e];
396
- if (!t) throw new Error(`No bundled i18n catalog for locale: ${e}`);
397
- return (await t()).default;
398
- }
399
- function A(e) {
400
- return e ? e.trim().replace(/_/g, "-").split(/[.@]/)[0].toLowerCase() : "";
401
- }
402
- function E(e) {
403
- return e ? e.trim().replace(/_/g, "-") : "";
404
- }
405
- function we(e) {
406
- const t = A(e);
407
- if (!t) return [];
408
- const i = t.split("-"), n = [];
409
- for (let s = i.length; s > 0; s--) {
410
- const o = i.slice(0, s);
411
- o.length > 1 && o[o.length - 1].length === 1 || n.push(o.join("-"));
412
- }
413
- return n;
414
- }
415
- function Ae(e, t) {
416
- for (const i of we(e)) {
417
- const n = t.find((s) => A(s) === i);
418
- if (n != null) return n;
419
- }
420
- }
421
- var Ie = {
393
+ var W = {
422
394
  common: {
423
395
  close: "Close",
424
396
  cancel: "Cancel",
@@ -451,6 +423,8 @@ var Ie = {
451
423
  apply: "Apply",
452
424
  enabled: "Enabled",
453
425
  disabled: "Disabled",
426
+ lookUp: "Look up",
427
+ wordOrPhrase: "Word or phrase",
454
428
  closeA11y: "Close",
455
429
  settingsA11y: "Open settings menu"
456
430
  },
@@ -479,6 +453,10 @@ var Ie = {
479
453
  resizeMediaRegion: "Resize media region",
480
454
  resizeQuestionAndMediaA11y: "Resize question and media panels",
481
455
  resizePassageAndMediaA11y: "Resize passage and media panels",
456
+ resizePassageAndQuestionA11y: "Resize passage and question panels",
457
+ passageWidthA11y: "{percent}% passage width",
458
+ questionPositionA11y: "Question {position} of {total}",
459
+ questionPositionLabeledA11y: "{label}, question {position} of {total}",
482
460
  assessment: {
483
461
  sectionPosition: "Section {position} of {total}",
484
462
  noSections: "No sections",
@@ -505,6 +483,13 @@ var Ie = {
505
483
  playbackPaused: "Playback paused. Answer question {position} to continue.",
506
484
  playbackAdvisory: "Answer question {position} before continuing with the media.",
507
485
  playbackReleased: "Answer accepted. Continue playing the media."
486
+ },
487
+ summary: {
488
+ correctA11y: "Correct answer",
489
+ answer: "Answer",
490
+ manualScoring: "Scored by a teacher",
491
+ audio: "Audio",
492
+ video: "Video"
508
493
  }
509
494
  },
510
495
  toolkit: {
@@ -524,13 +509,16 @@ var Ie = {
524
509
  moveRightA11y: "Move tool right",
525
510
  moveUpA11y: "Move tool up",
526
511
  moveDownA11y: "Move tool down",
527
- shrinkA11y: "Shrink tool window",
528
- growA11y: "Grow tool window",
512
+ narrowerA11y: "Make tool window narrower",
513
+ widerA11y: "Make tool window wider",
514
+ shorterA11y: "Make tool window shorter",
515
+ tallerA11y: "Make tool window taller",
529
516
  centerA11y: "Center tool window",
530
517
  closeA11y: "Close tool"
531
518
  },
532
519
  placement: {
533
520
  controlsA11y: "Move and rotate",
521
+ moveAndResizeA11y: "Move and resize",
534
522
  rotateClockwiseA11y: "Rotate {degrees}° clockwise",
535
523
  rotateCounterclockwiseA11y: "Rotate {degrees}° counterclockwise"
536
524
  },
@@ -557,7 +545,8 @@ var Ie = {
557
545
  closedGraphing: "Graphing calculator closed",
558
546
  toolA11y: "Calculator tool",
559
547
  loading: "Loading calculator…",
560
- providerUnavailable: "The calculator is unavailable."
548
+ providerUnavailable: "The calculator is unavailable.",
549
+ initFailed: "Calculator failed to initialize."
561
550
  },
562
551
  graph: {
563
552
  name: "Graph",
@@ -639,14 +628,32 @@ var Ie = {
639
628
  description: "Look up word definitions",
640
629
  buttonA11y: "Dictionary, look up word definitions",
641
630
  tooltip: "Dictionary",
642
- toolA11y: "Dictionary"
631
+ toolA11y: "Dictionary",
632
+ notConfigured: "No dictionary service is configured for this assessment.",
633
+ idleHint: "Type a word to look it up.",
634
+ lookingUp: "Looking up “{term}”…",
635
+ noEntryFor: "No entry for “{term}”.",
636
+ entriesCount: {
637
+ one: "{count} entry",
638
+ other: "{count} entries"
639
+ },
640
+ noEntryStatusFor: "No dictionary entry for {term}."
643
641
  },
644
642
  pictureDictionary: {
645
643
  name: "Picture Dictionary",
646
644
  description: "Look up pictures for words",
647
645
  buttonA11y: "Picture Dictionary, look up pictures for words",
648
646
  tooltip: "Picture Dictionary",
649
- toolA11y: "Picture Dictionary"
647
+ toolA11y: "Picture Dictionary",
648
+ notConfigured: "No picture dictionary service is configured for this assessment.",
649
+ idleHint: "Type a word to see a picture of it.",
650
+ lookingUp: "Looking up “{term}”…",
651
+ noEntryFor: "No picture for “{term}”.",
652
+ entriesCount: {
653
+ one: "{count} picture",
654
+ other: "{count} pictures"
655
+ },
656
+ noEntryStatusFor: "No picture for {term}."
650
657
  },
651
658
  dictionarySpanish: {
652
659
  name: "Spanish Dictionary",
@@ -674,10 +681,36 @@ var Ie = {
674
681
  windowHeightAnnounce: "Reading window height {pixels} pixels",
675
682
  frameHeightAnnounce: "Frame height {pixels} pixels",
676
683
  widthAnnounce: "Width {pixels} pixels",
684
+ shorterWindowA11y: "Make the reading window shorter",
685
+ tallerWindowA11y: "Make the reading window taller",
686
+ shorterFrameA11y: "Make the frame shorter",
687
+ tallerFrameA11y: "Make the frame taller",
688
+ narrowerA11y: "Make the line reader narrower",
689
+ widerA11y: "Make the line reader wider",
677
690
  applicationA11y: "Line Reader tool. A clear reading window inside an obscuring frame. Use arrow keys to move, +/- to resize the reading window, Escape to close. Reading window height: {paneHeight} pixels, Frame height: {frameHeight} pixels",
678
691
  resizeWindowFullA11y: "Resize the reading window. Drag, or use the up and down arrow keys to change its height. Current height {paneHeight} pixels",
679
692
  resizeFrameFullA11y: "Resize the frame. Drag, or use the up and down arrow keys to change the frame height and the left and right arrow keys to change the width. Current frame height {frameHeight} pixels, width {width} pixels"
680
693
  },
694
+ magnification: {
695
+ name: "Magnifier",
696
+ description: "Magnify the content under a movable lens",
697
+ buttonA11y: "Magnifier, enlarge the content under a lens",
698
+ tooltip: "Magnifier",
699
+ roleA11y: "Draggable and resizable magnifying lens",
700
+ applicationA11y: "Magnifier at {zoom} times. Use the arrow keys to move the lens, + and - to change the zoom, and Escape to close.",
701
+ zoomIn: "Zoom in",
702
+ zoomOut: "Zoom out",
703
+ zoomLevel: "{zoom}×",
704
+ zoomAnnounce: "Zoom {zoom} times",
705
+ close: "Close magnifier",
706
+ resizeA11y: "Drag to resize the magnifier",
707
+ resizeFullA11y: "Resize the magnifier. Drag, or use the arrow keys. Current size {width} by {height} pixels",
708
+ sizeAnnounce: "Magnifier {width} by {height} pixels",
709
+ narrowerA11y: "Make the magnifier narrower",
710
+ widerA11y: "Make the magnifier wider",
711
+ shorterA11y: "Make the magnifier shorter",
712
+ tallerA11y: "Make the magnifier taller"
713
+ },
681
714
  answerEliminator: {
682
715
  name: "Answer Eliminator",
683
716
  description: "Strike through answer choices",
@@ -816,6 +849,30 @@ var Ie = {
816
849
  toggleEventPanelA11y: "Toggle event broadcast panel",
817
850
  toggleDatabasePanelA11y: "Toggle database state panel",
818
851
  toggleInstrumentationPanelA11y: "Toggle instrumentation panel",
852
+ clear: "clear",
853
+ pause: "pause",
854
+ resume: "resume",
855
+ controllerUnavailable: "controller unavailable",
856
+ noMatchingEvents: "No matching events yet. Interact with an item to capture controller events.",
857
+ noSectionSessionYet: "No section session data yet. Interact with the questions to see updates.",
858
+ eventLevelItem: "item",
859
+ eventLevelSection: "section",
860
+ instrumentationKindAll: "all",
861
+ instrumentationKindEvent: "event",
862
+ instrumentationKindError: "error",
863
+ instrumentationKindMetric: "metric",
864
+ instrumentationKindUserContext: "user-context",
865
+ instrumentationKindGlobalAttributes: "global-attributes",
866
+ instrumentationFieldName: "name:",
867
+ instrumentationFieldKind: "kind:",
868
+ instrumentationFieldProvider: "provider:",
869
+ instrumentationFieldTimestamp: "timestamp:",
870
+ instrumentationFieldValue: "value:",
871
+ instrumentationFieldError: "error:",
872
+ sessionDbAssessmentId: "assessmentId:",
873
+ sessionDbSectionId: "sectionId:",
874
+ sessionDbAttemptId: "attemptId:",
875
+ sessionDbMode: "mode:",
819
876
  pnp: {
820
877
  title: "PNP Profile",
821
878
  noAssessmentBound: "No assessment bound",
@@ -833,7 +890,13 @@ var Ie = {
833
890
  provenanceSummary: "Tool Policy Provenance Summary",
834
891
  perToolDecisions: "Per-Tool Decisions",
835
892
  policyDiagnostics: "Policy Diagnostics",
836
- profileReadOnly: "PNP Profile (read-only)"
893
+ profileReadOnly: "PNP Profile (read-only)",
894
+ on: "On",
895
+ effective: "Effective:",
896
+ needs: "needs",
897
+ hostSurfaceNotPlaced: "host surface (not placed)",
898
+ support: "support",
899
+ prohibit: "prohibit"
837
900
  },
838
901
  tts: {
839
902
  title: "TTS settings",
@@ -927,10 +990,58 @@ var Ie = {
927
990
  previewHintBrowserSsml: "SSML is unsupported in Browser preview.",
928
991
  previewHintGoogleSsml: "SSML preserved. Tracking disabled.",
929
992
  previewHintCustom: "Tracking enabled when provider returns speech marks.",
930
- previewHintTracking: "Tracking enabled while preview plays."
993
+ previewHintTracking: "Tracking enabled while preview plays.",
994
+ formatMp3: "MP3",
995
+ formatOgg: "OGG",
996
+ formatPcm: "PCM",
997
+ sampleRate8000: "8000 Hz",
998
+ sampleRate16000: "16000 Hz",
999
+ sampleRate22050: "22050 Hz",
1000
+ sampleRate24000: "24000 Hz",
1001
+ apiEndpointPlaceholder: "/api/tts",
1002
+ languagePlaceholder: "en-US",
1003
+ ssml: "SSML"
931
1004
  }
932
1005
  }
933
- }, k = "en-US", Ee = /* @__PURE__ */ new Set([
1006
+ }, we = { "nl-NL": () => import("./nl-NL-DAsk17yt.js") }, Ae = ["en-US", "nl-NL"];
1007
+ async function Ie(e) {
1008
+ if (e === "en-US") return W;
1009
+ const t = we[e];
1010
+ if (!t) throw new Error(`No bundled i18n catalog for locale: ${e}`);
1011
+ return (await t()).default;
1012
+ }
1013
+ function I(e) {
1014
+ return e ? e.trim().replace(/_/g, "-").split(/[.@]/)[0].toLowerCase() : "";
1015
+ }
1016
+ function w(e) {
1017
+ return e ? e.trim().replace(/_/g, "-") : "";
1018
+ }
1019
+ function Ee(e) {
1020
+ const t = I(e);
1021
+ if (!t) return [];
1022
+ const i = t.split("-"), n = [];
1023
+ for (let s = i.length; s > 0; s--) {
1024
+ const o = i.slice(0, s);
1025
+ o.length > 1 && o[o.length - 1].length === 1 || n.push(o.join("-"));
1026
+ }
1027
+ return n;
1028
+ }
1029
+ function Pe(e, t) {
1030
+ for (const i of Ee(e)) {
1031
+ const n = t.find((s) => I(s) === i);
1032
+ if (n != null) return n;
1033
+ }
1034
+ }
1035
+ function Ce(e) {
1036
+ const t = w(e).split(/[.@]/)[0];
1037
+ if (/^[a-z]{2,3}(-|$)/i.test(t))
1038
+ try {
1039
+ return Intl.getCanonicalLocales(t)[0];
1040
+ } catch {
1041
+ return;
1042
+ }
1043
+ }
1044
+ var C = "en-US", ke = /* @__PURE__ */ new Set([
934
1045
  "ar",
935
1046
  "ckb",
936
1047
  "dv",
@@ -946,7 +1057,7 @@ var Ie = {
946
1057
  "ug",
947
1058
  "ur",
948
1059
  "yi"
949
- ]), Pe = /* @__PURE__ */ new Set([
1060
+ ]), Ne = /* @__PURE__ */ new Set([
950
1061
  "zero",
951
1062
  "one",
952
1063
  "two",
@@ -954,23 +1065,23 @@ var Ie = {
954
1065
  "many",
955
1066
  "other"
956
1067
  ]);
957
- function _(e) {
1068
+ function z(e) {
958
1069
  if (typeof e != "object" || e === null) return !1;
959
1070
  const t = Object.keys(e);
960
- return t.length > 0 && t.every((i) => Pe.has(i));
1071
+ return t.length > 0 && t.every((i) => Ne.has(i));
961
1072
  }
962
- function z(e) {
1073
+ function _(e) {
963
1074
  try {
964
1075
  const i = new Intl.Locale(e).textInfo;
965
1076
  if (i?.direction === "rtl" || i?.direction === "ltr") return i.direction;
966
1077
  } catch {
967
1078
  }
968
- const t = A(e).split("-")[0] ?? "";
969
- return Ee.has(t) ? "rtl" : "ltr";
1079
+ const t = I(e).split("-")[0] ?? "";
1080
+ return ke.has(t) ? "rtl" : "ltr";
970
1081
  }
971
- var G = class C {
1082
+ var V = class k {
972
1083
  constructor(t = {}) {
973
- f(this, "locale", void 0), f(this, "fallbackLocale", void 0), f(this, "catalogs", void 0), f(this, "customMessages", void 0), f(this, "loading", void 0), f(this, "listeners", /* @__PURE__ */ new Set()), f(this, "config", void 0), this.config = { ...t }, this.fallbackLocale = E(t.fallbackLocale) || "en-US", this.catalogs = /* @__PURE__ */ new Map([[k, Ie]]), this.customMessages = { ...t.customMessages ?? {} }, this.loading = /* @__PURE__ */ new Map(), this.locale = this.resolveLocaleTag(t.locale) ?? "en-US";
1084
+ f(this, "locale", void 0), f(this, "fallbackLocale", void 0), f(this, "catalogs", void 0), f(this, "customMessages", void 0), f(this, "loading", void 0), f(this, "listeners", /* @__PURE__ */ new Set()), f(this, "config", void 0), this.config = { ...t }, this.fallbackLocale = w(t.fallbackLocale) || "en-US", this.catalogs = /* @__PURE__ */ new Map([[C, W]]), this.customMessages = { ...t.customMessages ?? {} }, this.loading = /* @__PURE__ */ new Map(), this.locale = this.resolveLocaleTag(t.locale) ?? "en-US";
974
1085
  }
975
1086
  async initialize(t) {
976
1087
  if (this.config = {
@@ -985,7 +1096,7 @@ var G = class C {
985
1096
  async setLocale(t) {
986
1097
  const i = this.resolveLocaleTag(t);
987
1098
  if (!i) {
988
- this.locale = E(t) || "en-US", this.notify();
1099
+ this.locale = w(t) || "en-US", this.notify();
989
1100
  return;
990
1101
  }
991
1102
  if (!this.catalogs.has(i) && this.config.availableLocales?.includes(i)) {
@@ -1005,14 +1116,14 @@ var G = class C {
1005
1116
  }
1006
1117
  t(t, i) {
1007
1118
  const n = this.lookup(t);
1008
- return n === void 0 ? (this.config.onMissingKey?.(t, this.locale), t) : U(n, i);
1119
+ return n === void 0 ? (this.config.onMissingKey?.(t, this.locale), t) : O(n, i, this.locale);
1009
1120
  }
1010
1121
  plural(t, i) {
1011
1122
  const n = this.lookupNode(t);
1012
- return n === void 0 || !_(n) ? this.t(t, i) : U(n[this.selectPluralCategory(i.count)] ?? n.other, i);
1123
+ return n === void 0 || !z(n) ? this.t(t, i) : O(n[this.selectPluralCategory(i.count)] ?? n.other, i, this.locale);
1013
1124
  }
1014
1125
  getDirection() {
1015
- return z(this.locale);
1126
+ return _(this.locale);
1016
1127
  }
1017
1128
  getAvailableLocales() {
1018
1129
  return [.../* @__PURE__ */ new Set([
@@ -1034,13 +1145,13 @@ var G = class C {
1034
1145
  return this.lookup(t) !== void 0;
1035
1146
  }
1036
1147
  addCustomMessages(t, i) {
1037
- const n = E(t);
1038
- this.customMessages[n] = j(this.customMessages[n] ?? {}, i), this.notify();
1148
+ const n = w(t);
1149
+ this.customMessages[n] = Q(this.customMessages[n] ?? {}, i), this.notify();
1039
1150
  }
1040
1151
  withLocale(t) {
1041
- const i = this.resolveLocaleTag(t) ?? E(t);
1152
+ const i = this.resolveLocaleTag(t) ?? w(t);
1042
1153
  if (i === this.locale) return this;
1043
- const n = new C({
1154
+ const n = new k({
1044
1155
  ...this.config,
1045
1156
  locale: i
1046
1157
  });
@@ -1050,14 +1161,14 @@ var G = class C {
1050
1161
  try {
1051
1162
  return new Intl.NumberFormat(this.locale, i).format(t);
1052
1163
  } catch {
1053
- return new Intl.NumberFormat(k, i).format(t);
1164
+ return new Intl.NumberFormat(C, i).format(t);
1054
1165
  }
1055
1166
  }
1056
1167
  formatDate(t, i) {
1057
1168
  try {
1058
1169
  return new Intl.DateTimeFormat(this.locale, i).format(t);
1059
1170
  } catch {
1060
- return new Intl.DateTimeFormat(k, i).format(t);
1171
+ return new Intl.DateTimeFormat(C, i).format(t);
1061
1172
  }
1062
1173
  }
1063
1174
  getBundle(t = this.locale) {
@@ -1068,16 +1179,16 @@ var G = class C {
1068
1179
  return {
1069
1180
  locale: i,
1070
1181
  translations: n,
1071
- direction: z(i)
1182
+ direction: _(i)
1072
1183
  };
1073
1184
  }
1074
1185
  resolveLocaleTag(t) {
1075
1186
  if (!t) return;
1076
- const i = this.getAvailableLocales(), n = Ae(t, i);
1187
+ const i = this.getAvailableLocales(), n = Pe(t, i);
1077
1188
  if (n) return n;
1078
- const s = A(t).split("-")[0];
1189
+ const s = I(t).split("-")[0];
1079
1190
  if (s)
1080
- return i.find((o) => A(o).split("-")[0] === s);
1191
+ return i.find((o) => I(o).split("-")[0] === s);
1081
1192
  }
1082
1193
  async loadCatalog(t) {
1083
1194
  const i = this.config.loadCatalog;
@@ -1096,24 +1207,24 @@ var G = class C {
1096
1207
  this.catalogs.get(this.fallbackLocale)
1097
1208
  ];
1098
1209
  for (const n of i) {
1099
- const s = Ce(n, t);
1210
+ const s = Re(n, t);
1100
1211
  if (s !== void 0) return s;
1101
1212
  }
1102
1213
  }
1103
1214
  lookup(t) {
1104
1215
  const i = this.lookupNode(t);
1105
1216
  if (typeof i == "string") return i;
1106
- if (i !== void 0 && _(i)) return i.other;
1217
+ if (i !== void 0 && z(i)) return i.other;
1107
1218
  }
1108
1219
  selectPluralCategory(t) {
1109
- let i = C.pluralRules.get(this.locale);
1220
+ let i = k.pluralRules.get(this.locale);
1110
1221
  if (!i) {
1111
1222
  try {
1112
1223
  i = new Intl.PluralRules(this.locale);
1113
1224
  } catch {
1114
1225
  return t === 1 ? "one" : "other";
1115
1226
  }
1116
- C.pluralRules.set(this.locale, i);
1227
+ k.pluralRules.set(this.locale, i);
1117
1228
  }
1118
1229
  return i.select(t);
1119
1230
  }
@@ -1121,32 +1232,66 @@ var G = class C {
1121
1232
  for (const t of this.listeners) t();
1122
1233
  }
1123
1234
  };
1124
- f(G, "pluralRules", /* @__PURE__ */ new Map());
1125
- function Ce(e, t) {
1235
+ f(V, "pluralRules", /* @__PURE__ */ new Map());
1236
+ function Re(e, t) {
1126
1237
  if (!e) return;
1127
1238
  let i = e;
1128
1239
  for (const n of t.split("."))
1129
1240
  if (typeof i != "object" || i === null || (i = i[n], i === void 0)) return;
1130
1241
  return i;
1131
1242
  }
1132
- function U(e, t) {
1133
- return t ? e.replace(/\{(\w+)\}/g, (i, n) => {
1134
- const s = t[n];
1135
- return s == null ? i : String(s);
1243
+ var U = /* @__PURE__ */ new Map();
1244
+ function Te(e, t) {
1245
+ let i = U.get(t);
1246
+ if (!i) {
1247
+ try {
1248
+ i = new Intl.NumberFormat(t);
1249
+ } catch {
1250
+ i = new Intl.NumberFormat(C);
1251
+ }
1252
+ U.set(t, i);
1253
+ }
1254
+ return i.format(e);
1255
+ }
1256
+ function O(e, t, i) {
1257
+ return t ? e.replace(/\{(\w+)\}/g, (n, s) => {
1258
+ const o = t[s];
1259
+ return o == null ? n : i !== void 0 && typeof o == "number" && Number.isFinite(o) ? Te(o, i) : String(o);
1136
1260
  }) : e;
1137
1261
  }
1138
- function j(e, t) {
1262
+ function Q(e, t) {
1139
1263
  const i = { ...e };
1140
1264
  for (const [n, s] of Object.entries(t)) {
1141
1265
  const o = i[n];
1142
- s && typeof s == "object" && o && typeof o == "object" ? i[n] = j(o, s) : i[n] = s;
1266
+ s && typeof s == "object" && o && typeof o == "object" ? i[n] = Q(o, s) : i[n] = s;
1143
1267
  }
1144
1268
  return i;
1145
1269
  }
1146
- function ke(e = {}) {
1147
- return new G({
1148
- loadCatalog: Se,
1149
- availableLocales: be,
1270
+ function B(e, t) {
1271
+ const i = t.getLocale();
1272
+ e.setAttribute("lang", Ce(i) ?? i), e.setAttribute("dir", t.getDirection?.() ?? "ltr");
1273
+ }
1274
+ function Le(e, t, i) {
1275
+ if (!e) return;
1276
+ const n = {
1277
+ kind: "i18n-locale-load",
1278
+ source: t,
1279
+ message: i instanceof Error && i.message.trim().length > 0 ? i.message : String(i ?? "Unknown catalog load failure"),
1280
+ details: [],
1281
+ recoverable: !0,
1282
+ scope: "runtime",
1283
+ cause: i
1284
+ };
1285
+ e.dispatchEvent(new CustomEvent("framework-error", {
1286
+ detail: n,
1287
+ bubbles: !0,
1288
+ composed: !0
1289
+ }));
1290
+ }
1291
+ function xe(e = {}) {
1292
+ return new V({
1293
+ loadCatalog: Ie,
1294
+ availableLocales: Ae,
1150
1295
  ...e
1151
1296
  });
1152
1297
  }
@@ -1156,25 +1301,25 @@ function S() {
1156
1301
  function P(e) {
1157
1302
  return e.replace(/[^a-zA-Z0-9_-]/g, "-");
1158
1303
  }
1159
- function Re(e) {
1304
+ function Me(e) {
1160
1305
  if (e.attemptId) return `aas_v1_${P(e.assessmentId)}_${P(e.attemptId)}`;
1161
- const t = W(), i = t ? Ne(t) : "anon";
1306
+ const t = K(), i = t ? De(t) : "anon";
1162
1307
  return `aas_v1_${P(e.assessmentId)}_${P(i)}`;
1163
1308
  }
1164
- function W() {
1309
+ function K() {
1165
1310
  try {
1166
1311
  return typeof window > "u" ? null : window.localStorage;
1167
1312
  } catch {
1168
1313
  return null;
1169
1314
  }
1170
1315
  }
1171
- function Ne(e) {
1316
+ function De(e) {
1172
1317
  const t = "pie:assessment-player:anonymous-device-id", i = e.getItem(t);
1173
1318
  if (i) return i;
1174
1319
  const n = `anon-${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`;
1175
1320
  return e.setItem(t, n), n;
1176
1321
  }
1177
- function Te(e) {
1322
+ function Fe(e) {
1178
1323
  if (!e) return [];
1179
1324
  const t = [], i = e.testParts || [];
1180
1325
  return i.length > 0 ? (i.forEach((n, s) => {
@@ -1197,7 +1342,7 @@ function Te(e) {
1197
1342
  });
1198
1343
  }), t);
1199
1344
  }
1200
- var xe = class {
1345
+ var ze = class {
1201
1346
  constructor(e) {
1202
1347
  this.args = e, this.listeners = /* @__PURE__ */ new Set(), this.deliveryPlan = { sections: [] }, this.session = null, this.readiness = "bootstrapping", this.submitted = !1, this.saveQueue = Promise.resolve(), this.disposed = !1, this.storageContext = {
1203
1348
  assessmentId: e.assessmentId,
@@ -1230,7 +1375,7 @@ var xe = class {
1230
1375
  async getPersistenceStrategy() {
1231
1376
  if (this.persistenceStrategy) return this.persistenceStrategy;
1232
1377
  const e = { createDefaultPersistence: () => {
1233
- const t = W(), { assessmentId: i, attemptId: n } = this.storageContext, s = n ? `pie:assessment-controller:v1:${i}:${n}` : null;
1378
+ const t = K(), { assessmentId: i, attemptId: n } = this.storageContext, s = n ? `pie:assessment-controller:v1:${i}:${n}` : null;
1234
1379
  return {
1235
1380
  async loadSession() {
1236
1381
  if (!t || !s) return null;
@@ -1253,7 +1398,7 @@ var xe = class {
1253
1398
  return this.persistenceStrategy = await this.args.hooks?.createAssessmentSessionPersistence?.(this.storageContext, e) ?? await e.createDefaultPersistence(), this.persistenceStrategy;
1254
1399
  }
1255
1400
  async createDeliveryPlan() {
1256
- const e = { createDefaultDeliveryPlan: () => ({ sections: Te(this.args.assessment) }) }, t = {
1401
+ const e = { createDefaultDeliveryPlan: () => ({ sections: Fe(this.args.assessment) }) }, t = {
1257
1402
  assessmentId: this.args.assessmentId,
1258
1403
  attemptId: this.args.attemptId,
1259
1404
  assessment: this.args.assessment
@@ -1263,8 +1408,8 @@ var xe = class {
1263
1408
  ensureSession() {
1264
1409
  if (this.session) return this.session;
1265
1410
  const e = this.deliveryPlan.sections.map((t) => t.sectionIdentifier);
1266
- return this.session = Q({
1267
- assessmentAttemptSessionIdentifier: Re({
1411
+ return this.session = Y({
1412
+ assessmentAttemptSessionIdentifier: Me({
1268
1413
  assessmentId: this.args.assessmentId,
1269
1414
  attemptId: this.args.attemptId
1270
1415
  }),
@@ -1359,7 +1504,7 @@ var xe = class {
1359
1504
  const t = this.buildNavigationSnapshot();
1360
1505
  if (e < 0 || e >= t.totalSections) return !1;
1361
1506
  const i = t.currentSectionId, n = this.deliveryPlan.sections[e];
1362
- this.session = K(this.ensureSession(), {
1507
+ this.session = X(this.ensureSession(), {
1363
1508
  currentSectionIndex: e,
1364
1509
  currentSectionIdentifier: n?.sectionIdentifier
1365
1510
  });
@@ -1424,7 +1569,7 @@ var xe = class {
1424
1569
  return this.disposed ? null : this.ensureSession().sectionSessions[e]?.session || null;
1425
1570
  }
1426
1571
  updateSectionSession(e, t) {
1427
- this.disposed || (this.session = Y(this.ensureSession(), {
1572
+ this.disposed || (this.session = ee(this.ensureSession(), {
1428
1573
  sectionIdentifier: e,
1429
1574
  sectionSession: t
1430
1575
  }), this.emit({
@@ -1442,7 +1587,7 @@ var xe = class {
1442
1587
  submissionStateChanged: "assessment-submission-state-changed",
1443
1588
  error: "assessment-error"
1444
1589
  };
1445
- function Le(e) {
1590
+ function _e(e) {
1446
1591
  const { sectionPlayerRuntime: t, playerType: i, assessmentId: n, env: s, coordinator: o } = e, r = t?.player && typeof t.player == "object" ? {
1447
1592
  ...t.player,
1448
1593
  backend: t.player.backend ? y(t.player.backend) : void 0
@@ -1456,21 +1601,21 @@ function Le(e) {
1456
1601
  ...r !== void 0 ? { player: r } : {}
1457
1602
  };
1458
1603
  }
1459
- function O(e) {
1604
+ function H(e) {
1460
1605
  return !!e && typeof e == "object";
1461
1606
  }
1462
- function N(e, t) {
1607
+ function R(e, t) {
1463
1608
  if (Object.is(e, t)) return !0;
1464
1609
  if (Array.isArray(e) || Array.isArray(t))
1465
- return !Array.isArray(e) || !Array.isArray(t) || e.length !== t.length ? !1 : e.every((n, s) => N(n, t[s]));
1466
- if (!O(e) || !O(t)) return !1;
1610
+ return !Array.isArray(e) || !Array.isArray(t) || e.length !== t.length ? !1 : e.every((n, s) => R(n, t[s]));
1611
+ if (!H(e) || !H(t)) return !1;
1467
1612
  const i = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]);
1468
- for (const n of i) if (!N(e[n], t[n])) return !1;
1613
+ for (const n of i) if (!R(e[n], t[n])) return !1;
1469
1614
  return !0;
1470
1615
  }
1471
- var De = "pie-section-player-splitpane", Me = "pie-section-player-vertical", Fe = class extends HTMLElement {
1616
+ var Ue = "pie-section-player-splitpane", Oe = "pie-section-player-vertical", Be = class extends HTMLElement {
1472
1617
  constructor(...e) {
1473
- super(...e), this._assessmentId = "", this._attemptId = "", this._locale = "", this._assessment = null, this._env = null, this._coordinator = null, this._hooks = null, this.pendingSession = null, this._showNavigation = !0, this._sectionPlayerLayout = "splitpane", this._playerType = "iife", this._debug = void 0, this.controller = null, this.initializingController = null, this.generation = 0, this.reconcileQueued = !1, this.controllerWaiters = /* @__PURE__ */ new Set(), this.i18n = ke(), this.sectionHost = null, this.sectionControllerRef = null, this.sectionSessionReady = !1, this.containerRef = null, this.announcer = null, this.restoreFocusOnRender = !1, this._sectionPlayerRuntime = null, this.readiness = { phase: "bootstrapping" };
1618
+ super(...e), this._assessmentId = "", this._attemptId = "", this._locale = "", this._assessment = null, this._env = null, this._coordinator = null, this._hooks = null, this.pendingSession = null, this._showNavigation = !0, this._sectionPlayerLayout = "splitpane", this._playerType = "iife", this._debug = void 0, this.controller = null, this.initializingController = null, this.generation = 0, this.reconcileQueued = !1, this.controllerWaiters = /* @__PURE__ */ new Set(), this.ownedI18n = xe(), this.suppliedI18n = null, this.subscribedI18n = null, this.sectionHost = null, this.sectionControllerRef = null, this.sectionSessionReady = !1, this.containerRef = null, this.announcer = null, this.restoreFocusOnRender = !1, this._sectionPlayerRuntime = null, this.readiness = { phase: "bootstrapping" };
1474
1619
  }
1475
1620
  static get observedAttributes() {
1476
1621
  return [
@@ -1483,6 +1628,9 @@ var De = "pie-section-player-splitpane", Me = "pie-section-player-vertical", Fe
1483
1628
  "locale"
1484
1629
  ];
1485
1630
  }
1631
+ get i18n() {
1632
+ return this.suppliedI18n ?? this.ownedI18n;
1633
+ }
1486
1634
  get assessmentId() {
1487
1635
  return this._assessmentId;
1488
1636
  }
@@ -1512,7 +1660,7 @@ var De = "pie-section-player-splitpane", Me = "pie-section-player-vertical", Fe
1512
1660
  }
1513
1661
  set session(e) {
1514
1662
  const t = e ?? null;
1515
- t !== this.pendingSession && (t && this.controller && N(t, this.controller.getSession()) || (this.pendingSession = t, this.queueReconciliation()));
1663
+ t !== this.pendingSession && (t && this.controller && R(t, this.controller.getSession()) || (this.pendingSession = t, this.queueReconciliation()));
1516
1664
  }
1517
1665
  get locale() {
1518
1666
  return this._locale;
@@ -1554,9 +1702,12 @@ var De = "pie-section-player-splitpane", Me = "pie-section-player-vertical", Fe
1554
1702
  t !== i && (e === "assessment-id" && (this.assessmentId = i || ""), e === "attempt-id" && (this.attemptId = i || ""), e === "show-navigation" && (this.showNavigation = i), e === "section-player-layout" && (this.sectionPlayerLayout = i === "vertical" ? "vertical" : "splitpane"), e === "player-type" && (this.playerType = i || "iife"), e === "debug" && (this.debug = i), e === "locale" && (this.locale = i || ""));
1555
1703
  }
1556
1704
  applyLocale() {
1557
- this.unsubscribeI18n || (this.unsubscribeI18n = this.i18n.subscribe?.(() => {
1705
+ const e = this.i18n;
1706
+ this.unsubscribeI18n && this.subscribedI18n !== e && (this.unsubscribeI18n(), this.unsubscribeI18n = void 0), this.unsubscribeI18n || (this.subscribedI18n = e, this.unsubscribeI18n = e.subscribe?.(() => {
1558
1707
  this.isConnected && this.updateNavigationChrome();
1559
- })), this.i18n.setLocale(this.locale || "en-US"), this.forwardLocaleToSection();
1708
+ })), (this.locale || e === this.ownedI18n) && Promise.resolve(e.setLocale(this.locale || "en-US")).catch((t) => {
1709
+ Le(this, "pie-assessment-player", t);
1710
+ }), this.forwardLocaleToSection(), B(this, e);
1560
1711
  }
1561
1712
  forwardLocaleToSection() {
1562
1713
  const e = this.sectionHost?.firstElementChild;
@@ -1572,7 +1723,7 @@ var De = "pie-section-player-splitpane", Me = "pie-section-player-vertical", Fe
1572
1723
  return this._sectionPlayerRuntime;
1573
1724
  }
1574
1725
  set sectionPlayerRuntime(e) {
1575
- this._sectionPlayerRuntime = e, this.isConnected && (this.attachInstrumentationBridge(), this.updateCurrentSectionRuntime());
1726
+ this._sectionPlayerRuntime = e, this.suppliedI18n = e?.i18n ?? null, this.isConnected && (this.attachInstrumentationBridge(), this.updateCurrentSectionRuntime(), this.applyLocale());
1576
1727
  }
1577
1728
  connectedCallback() {
1578
1729
  this.assessmentId || (this.assessmentId = this.getAttribute("assessment-id") || ""), this.attemptId || (this.attemptId = this.getAttribute("attempt-id") || ""), this.showNavigation = this.getAttribute("show-navigation") ?? this.showNavigation;
@@ -1582,7 +1733,7 @@ var De = "pie-section-player-splitpane", Me = "pie-section-player-vertical", Fe
1582
1733
  t && (this.playerType = t), this.debug = this.getAttribute("debug") ?? this.debug, this.locale || (this.locale = this.getAttribute("locale") || ""), this.applyLocale(), this.attachInstrumentationBridge(), this.queueReconciliation();
1583
1734
  }
1584
1735
  disconnectedCallback() {
1585
- this.reconcileQueued = !1, this.retireController(), this.restoreFocusOnRender = !1, this.settleControllerWaiters(null), this.unsubscribeI18n?.(), this.unsubscribeI18n = void 0, this.detachInstrumentationBridge?.(), this.detachInstrumentationBridge = void 0;
1736
+ this.reconcileQueued = !1, this.retireController(), this.restoreFocusOnRender = !1, this.settleControllerWaiters(null), this.unsubscribeI18n?.(), this.unsubscribeI18n = void 0, this.subscribedI18n = null, this.detachInstrumentationBridge?.(), this.detachInstrumentationBridge = void 0;
1586
1737
  }
1587
1738
  settleControllerWaiters(e) {
1588
1739
  for (const t of this.controllerWaiters) t(e);
@@ -1613,7 +1764,7 @@ var De = "pie-section-player-splitpane", Me = "pie-section-player-vertical", Fe
1613
1764
  return;
1614
1765
  }
1615
1766
  this.readiness = { phase: "bootstrapping" }, this.renderEmptyState();
1616
- const e = this.generation, t = this.hooks, i = () => this.isConnected && this.generation === e, n = this.pendingSession, s = new xe({
1767
+ const e = this.generation, t = this.hooks, i = () => this.isConnected && this.generation === e, n = this.pendingSession, s = new ze({
1617
1768
  assessmentId: this.assessmentId,
1618
1769
  attemptId: this.attemptId || void 0,
1619
1770
  assessment: this.assessment,
@@ -1664,17 +1815,17 @@ var De = "pie-section-player-splitpane", Me = "pie-section-player-vertical", Fe
1664
1815
  }
1665
1816
  }
1666
1817
  resolveInstrumentationProvider() {
1667
- return fe({
1818
+ return be({
1668
1819
  runtimePlayer: this.sectionPlayerRuntime?.player,
1669
1820
  component: "pie-assessment-player-default"
1670
1821
  });
1671
1822
  }
1672
1823
  attachInstrumentationBridge() {
1673
- this.detachInstrumentationBridge?.(), this.detachInstrumentationBridge = he({
1824
+ this.detachInstrumentationBridge?.(), this.detachInstrumentationBridge = ge({
1674
1825
  host: this,
1675
1826
  instrumentationProvider: this.resolveInstrumentationProvider(),
1676
1827
  component: "pie-assessment-player-default",
1677
- eventMap: ye,
1828
+ eventMap: Se,
1678
1829
  staticAttributes: {
1679
1830
  instrumentationLayer: "assessment",
1680
1831
  assessmentId: this.assessmentId,
@@ -1747,10 +1898,10 @@ var De = "pie-section-player-splitpane", Me = "pie-section-player-vertical", Fe
1747
1898
  return;
1748
1899
  }
1749
1900
  buildSectionPlayerTag() {
1750
- return this.sectionPlayerLayout === "vertical" ? Me : De;
1901
+ return this.sectionPlayerLayout === "vertical" ? Oe : Ue;
1751
1902
  }
1752
1903
  buildSectionRuntime() {
1753
- return Le({
1904
+ return _e({
1754
1905
  sectionPlayerRuntime: this.sectionPlayerRuntime,
1755
1906
  playerType: this.playerType,
1756
1907
  assessmentId: this.assessmentId || void 0,
@@ -1769,7 +1920,7 @@ var De = "pie-section-player-splitpane", Me = "pie-section-player-vertical", Fe
1769
1920
  try {
1770
1921
  i.stop();
1771
1922
  } catch (n) {
1772
- t?.reportFrameworkError?.(J({
1923
+ t?.reportFrameworkError?.(Z({
1773
1924
  kind: "tts-init",
1774
1925
  source: "AssessmentPlayerDefaultElement.cleanupTtsForSectionNavigation",
1775
1926
  error: n,
@@ -1795,8 +1946,8 @@ var De = "pie-section-player-splitpane", Me = "pie-section-player-vertical", Fe
1795
1946
  p || (p = !0, clearTimeout(m), n.removeEventListener("pie-stage-change", l), c(v));
1796
1947
  }, l = (v) => {
1797
1948
  if (v.target !== n) return;
1798
- const { stage: T, status: V } = v.detail;
1799
- V === "failed" || T === "disposed" ? u(null) : T === "engine-ready" && u(n.getSectionController?.() || null);
1949
+ const { stage: T, status: J } = v.detail;
1950
+ J === "failed" || T === "disposed" ? u(null) : T === "engine-ready" && u(n.getSectionController?.() || null);
1800
1951
  }, m = setTimeout(() => u(null), 5e3);
1801
1952
  n.addEventListener("pie-stage-change", l), h = () => u(null);
1802
1953
  }).then(async (c) => {
@@ -1896,7 +2047,7 @@ var De = "pie-section-player-splitpane", Me = "pie-section-player-vertical", Fe
1896
2047
  let h = null, d = null;
1897
2048
  {
1898
2049
  const u = document.createElement("div");
1899
- u.className = "pie-assessment-player-navigation", u.hidden = !R(this.showNavigation, !0);
2050
+ u.className = "pie-assessment-player-navigation", u.hidden = !N(this.showNavigation, !0);
1900
2051
  const l = document.createElement("div");
1901
2052
  l.className = "pie-assessment-player-current-position", l.textContent = a;
1902
2053
  const m = document.createElement("div");
@@ -1924,11 +2075,12 @@ var De = "pie-section-player-splitpane", Me = "pie-section-player-vertical", Fe
1924
2075
  }), this.announceSectionChange(a));
1925
2076
  }
1926
2077
  updateNavigationChrome() {
2078
+ B(this, this.i18n);
1927
2079
  const e = this.selectNavigation(), t = e.totalSections > 0 ? this.i18n.t("player.assessment.sectionPosition", {
1928
2080
  position: e.currentIndex + 1,
1929
2081
  total: e.totalSections
1930
2082
  }) : this.i18n.t("player.assessment.noSections"), i = this.containerRef?.querySelector(".pie-assessment-player-navigation");
1931
- i && (i.hidden = !R(this.showNavigation, !0), i.hidden && i.contains(document.activeElement) && this.sectionHost?.focus());
2083
+ i && (i.hidden = !N(this.showNavigation, !0), i.hidden && i.contains(document.activeElement) && this.sectionHost?.focus());
1932
2084
  const n = this.containerRef?.querySelector(".pie-assessment-player-current-position");
1933
2085
  n && (n.textContent = t);
1934
2086
  const s = i?.querySelector('[data-pie-navigation="previous"]'), o = i?.querySelector('[data-pie-navigation="next"]');
@@ -2038,22 +2190,28 @@ var De = "pie-section-player-splitpane", Me = "pie-section-player-vertical", Fe
2038
2190
  }));
2039
2191
  }
2040
2192
  };
2041
- H("pie-assessment-player-default", Fe, "assessment player default tag");
2042
- var _e = class extends HTMLElement {
2193
+ q("pie-assessment-player-default", Be, "assessment player default tag");
2194
+ var He = class extends HTMLElement {
2043
2195
  static get observedAttributes() {
2044
2196
  return ["show-navigation"];
2045
2197
  }
2046
2198
  constructor() {
2047
- super(), this.showNavigation = !0, this.attachShadow({ mode: "open" });
2199
+ super(), this._showNavigation = !0, this.attachShadow({ mode: "open" });
2200
+ }
2201
+ get showNavigation() {
2202
+ return this._showNavigation;
2203
+ }
2204
+ set showNavigation(e) {
2205
+ this._showNavigation = e, this.isConnected && this.render();
2048
2206
  }
2049
2207
  connectedCallback() {
2050
- this.showNavigation = this.getAttribute("show-navigation") ?? this.showNavigation, this.render();
2208
+ this.render();
2051
2209
  }
2052
2210
  attributeChangedCallback(e, t, i) {
2053
- e === "show-navigation" && (this.showNavigation = i), this.render();
2211
+ e === "show-navigation" && (this.showNavigation = i);
2054
2212
  }
2055
2213
  render() {
2056
- const e = R(this.showNavigation, !0), t = document.createElement("style");
2214
+ const e = N(this._showNavigation, !0), t = document.createElement("style");
2057
2215
  t.textContent = `
2058
2216
  :host {
2059
2217
  display: block;
@@ -2084,7 +2242,7 @@ var _e = class extends HTMLElement {
2084
2242
  n.appendChild(s), i.appendChild(n), this.shadowRoot?.replaceChildren(t, i);
2085
2243
  }
2086
2244
  };
2087
- H("pie-assessment-player-shell", _e, "assessment player shell tag");
2245
+ q("pie-assessment-player-shell", He, "assessment player shell tag");
2088
2246
  export {
2089
2247
  g as ASSESSMENT_PLAYER_PUBLIC_EVENTS
2090
2248
  };