@citolab/qti-components 10.0.0-next.5 → 10.0.0-next.6

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 (33) hide show
  1. package/cdn/index.global.js +1 -1
  2. package/cdn/index.js +80 -75
  3. package/dist/{chunk-A2AP6CUL.js → chunk-7IRGNPCV.js} +2 -2
  4. package/dist/{chunk-JNZ3HSFI.js → chunk-GZVLORVJ.js} +2 -2
  5. package/dist/{chunk-WV53LUE3.js → chunk-KXYSYDIM.js} +2 -2
  6. package/dist/chunk-QVZLJY75.js +7 -0
  7. package/dist/chunk-QVZLJY75.js.map +1 -0
  8. package/dist/{chunk-WC3P4KCV.js → chunk-VY2DM47N.js} +173 -119
  9. package/dist/chunk-VY2DM47N.js.map +1 -0
  10. package/dist/{chunk-F7QDRKCR.js → chunk-W4NUIWRO.js} +2 -2
  11. package/dist/{chunk-KB2NJTSD.js → chunk-WAHTXGBK.js} +4 -4
  12. package/dist/{chunk-WVDQLBMT.js → chunk-Z545U7O3.js} +2 -2
  13. package/dist/corrections.d.ts +1 -1
  14. package/dist/corrections.js +5 -5
  15. package/dist/index.d.ts +1 -1
  16. package/dist/index.js +8 -8
  17. package/dist/interactions.d.ts +2 -2
  18. package/dist/interactions.js +2 -2
  19. package/dist/item.css +2 -1
  20. package/dist/item.js +3 -3
  21. package/dist/qti-components-jsx.d.ts +26 -0
  22. package/dist/{qti-text-entry-interaction.d-q8u5BiVK.d.ts → qti-text-entry-interaction.d-828kFi2A.d.ts} +14 -0
  23. package/dist/test.js +3 -3
  24. package/package.json +1 -1
  25. package/dist/chunk-WC3P4KCV.js.map +0 -1
  26. package/dist/chunk-ZP6QQYSU.js +0 -7
  27. package/dist/chunk-ZP6QQYSU.js.map +0 -1
  28. /package/dist/{chunk-A2AP6CUL.js.map → chunk-7IRGNPCV.js.map} +0 -0
  29. /package/dist/{chunk-JNZ3HSFI.js.map → chunk-GZVLORVJ.js.map} +0 -0
  30. /package/dist/{chunk-WV53LUE3.js.map → chunk-KXYSYDIM.js.map} +0 -0
  31. /package/dist/{chunk-F7QDRKCR.js.map → chunk-W4NUIWRO.js.map} +0 -0
  32. /package/dist/{chunk-KB2NJTSD.js.map → chunk-WAHTXGBK.js.map} +0 -0
  33. /package/dist/{chunk-WVDQLBMT.js.map → chunk-Z545U7O3.js.map} +0 -0
@@ -207,6 +207,10 @@ var qti_gap_img_styles_default = [
207
207
  align-items: center;
208
208
  justify-content: center;
209
209
  user-select: none;
210
+ /* In graphic-gap-match the picture's authored size is in the graphic's coordinate space, so it
211
+ scales with the graphic and keeps fitting its hotspot. The interaction publishes the factor;
212
+ anywhere else it is unset and the chip keeps its size. */
213
+ zoom: var(--qti-graphic-scale, 1);
210
214
  }
211
215
  `
212
216
  ];
@@ -1254,22 +1258,22 @@ var [Observable, Subscriber] = (() => {
1254
1258
  const AsyncFromSyncIteratorPrototype = {
1255
1259
  next(...args) {
1256
1260
  const O = this;
1257
- const state14 = privateState.get(O);
1258
- if (!state14?.syncIteratorRecord)
1261
+ const state15 = privateState.get(O);
1262
+ if (!state15?.syncIteratorRecord)
1259
1263
  throw new TypeError(
1260
1264
  "AsyncFromSyncIteratorPrototype.next called on invalid object"
1261
1265
  );
1262
- const { syncIteratorRecord } = state14;
1266
+ const { syncIteratorRecord } = state15;
1263
1267
  return pTry(() => syncIteratorRecord.next(...args));
1264
1268
  },
1265
1269
  return(...args) {
1266
1270
  const O = this;
1267
- const state14 = privateState.get(O);
1268
- if (!state14?.syncIteratorRecord)
1271
+ const state15 = privateState.get(O);
1272
+ if (!state15?.syncIteratorRecord)
1269
1273
  throw new TypeError(
1270
1274
  "AsyncFromSyncIteratorPrototype.return called on invalid object"
1271
1275
  );
1272
- const { syncIteratorRecord } = state14;
1276
+ const { syncIteratorRecord } = state15;
1273
1277
  return pTry(() => {
1274
1278
  if (!syncIteratorRecord.return) return { value: void 0, done: true };
1275
1279
  return syncIteratorRecord.return(...args);
@@ -1277,12 +1281,12 @@ var [Observable, Subscriber] = (() => {
1277
1281
  },
1278
1282
  throw(...args) {
1279
1283
  const O = this;
1280
- const state14 = privateState.get(O);
1281
- if (!state14?.syncIteratorRecord)
1284
+ const state15 = privateState.get(O);
1285
+ if (!state15?.syncIteratorRecord)
1282
1286
  throw new TypeError(
1283
1287
  "AsyncFromSyncIteratorPrototype.throw called on invalid object"
1284
1288
  );
1285
- const { syncIteratorRecord } = state14;
1289
+ const { syncIteratorRecord } = state15;
1286
1290
  return pTry(() => {
1287
1291
  if (!syncIteratorRecord.throw) {
1288
1292
  syncIteratorRecord.return();
@@ -1348,11 +1352,11 @@ var [Observable, Subscriber] = (() => {
1348
1352
  }
1349
1353
  }
1350
1354
  function closeASubscription(subscriber, reason) {
1351
- const state14 = privateState.get(subscriber);
1352
- if (!state14?.active) return;
1353
- state14.active = false;
1354
- state14.subscriptionController.abort(reason);
1355
- for (const teardown of state14.teardowns.reverse()) {
1355
+ const state15 = privateState.get(subscriber);
1356
+ if (!state15?.active) return;
1357
+ state15.active = false;
1358
+ state15.subscriptionController.abort(reason);
1359
+ for (const teardown of state15.teardowns.reverse()) {
1356
1360
  if (isBrowserContext() && !isDocumentFullyActive(document)) return;
1357
1361
  try {
1358
1362
  teardown();
@@ -1433,10 +1437,10 @@ var [Observable, Subscriber] = (() => {
1433
1437
  if (!(this instanceof Subscriber2))
1434
1438
  throw new TypeError("illegal invocation");
1435
1439
  if (!arguments.length) throw new TypeError("too few arguments");
1436
- const state14 = privateState.get(this);
1437
- if (!state14?.active) return;
1440
+ const state15 = privateState.get(this);
1441
+ if (!state15?.active) return;
1438
1442
  if (isBrowserContext() && !isDocumentFullyActive(document)) return;
1439
- const internalObservers = new Set(state14.observers);
1443
+ const internalObservers = new Set(state15.observers);
1440
1444
  for (const observer of internalObservers) {
1441
1445
  observer.next(value);
1442
1446
  }
@@ -1446,14 +1450,14 @@ var [Observable, Subscriber] = (() => {
1446
1450
  if (!(this instanceof Subscriber2))
1447
1451
  throw new TypeError("illegal invocation");
1448
1452
  if (!arguments.length) throw new TypeError("too few arguments");
1449
- const state14 = privateState.get(this);
1450
- if (!state14?.active) {
1453
+ const state15 = privateState.get(this);
1454
+ if (!state15?.active) {
1451
1455
  reportError(error);
1452
1456
  return;
1453
1457
  }
1454
1458
  if (isBrowserContext() && !isDocumentFullyActive(document)) return;
1455
1459
  closeASubscription(this, error);
1456
- const internalObservers = new Set(state14.observers);
1460
+ const internalObservers = new Set(state15.observers);
1457
1461
  for (const observer of internalObservers) {
1458
1462
  observer.error(error);
1459
1463
  }
@@ -1462,11 +1466,11 @@ var [Observable, Subscriber] = (() => {
1462
1466
  complete() {
1463
1467
  if (!(this instanceof Subscriber2))
1464
1468
  throw new TypeError("illegal invocation");
1465
- const state14 = privateState.get(this);
1466
- if (!state14?.active) return;
1469
+ const state15 = privateState.get(this);
1470
+ if (!state15?.active) return;
1467
1471
  if (isBrowserContext() && !isDocumentFullyActive(document)) return;
1468
1472
  closeASubscription(this);
1469
- const internalObservers = new Set(state14.observers);
1473
+ const internalObservers = new Set(state15.observers);
1470
1474
  for (const observer of internalObservers) {
1471
1475
  observer.complete();
1472
1476
  }
@@ -1479,9 +1483,9 @@ var [Observable, Subscriber] = (() => {
1479
1483
  throw new TypeError(`Parameter 1 is not of type 'Function'`);
1480
1484
  }
1481
1485
  if (isBrowserContext() && !isDocumentFullyActive(document)) return;
1482
- const state14 = privateState.get(this);
1483
- if (state14?.active)
1484
- state14.teardowns.push(teardown);
1486
+ const state15 = privateState.get(this);
1487
+ if (state15?.active)
1488
+ state15.teardowns.push(teardown);
1485
1489
  else teardown();
1486
1490
  }
1487
1491
  get active() {
@@ -2665,17 +2669,17 @@ function isDraggableDisabled(target) {
2665
2669
  return internals?.states?.has("disabled") ?? false;
2666
2670
  }
2667
2671
  var internalsOf = (el) => el?.internals;
2668
- function setDragChipState(el, state14, on) {
2672
+ function setDragChipState(el, state15, on) {
2669
2673
  const states = internalsOf(el)?.states;
2670
2674
  if (!states)
2671
2675
  return;
2672
2676
  if (on)
2673
- states.add(state14);
2677
+ states.add(state15);
2674
2678
  else
2675
- states.delete(state14);
2679
+ states.delete(state15);
2676
2680
  }
2677
- function hasDragChipState(el, state14) {
2678
- return internalsOf(el)?.states?.has(state14) ?? false;
2681
+ function hasDragChipState(el, state15) {
2682
+ return internalsOf(el)?.states?.has(state15) ?? false;
2679
2683
  }
2680
2684
  function clearDragChipStates(el) {
2681
2685
  setDragChipState(el, "dragging", false);
@@ -2771,7 +2775,7 @@ var resolveDragCloneHost = (dragSource, preferredHost) => {
2771
2775
  return hostFor(fullscreenElement);
2772
2776
  return host;
2773
2777
  };
2774
- var measureFixedFrame = (host) => {
2778
+ var measureFixedFrame = (host, ownZoom = 1) => {
2775
2779
  const ownerDocument = host.ownerDocument ?? document;
2776
2780
  const probe = ownerDocument.createElement("div");
2777
2781
  probe.style.cssText = `position:fixed;left:0;top:0;width:${PROBE_SIZE}px;height:${PROBE_SIZE}px;margin:0;padding:0;border:0;visibility:hidden;pointer-events:none;`;
@@ -2780,7 +2784,9 @@ var measureFixedFrame = (host) => {
2780
2784
  probe.remove();
2781
2785
  return {
2782
2786
  origin: { x: rect.left, y: rect.top },
2783
- scale: { x: rect.width / PROBE_SIZE || 1, y: rect.height / PROBE_SIZE || 1 }
2787
+ // The clone's own `zoom` (copied from the chip with the rest of its computed style) multiplies
2788
+ // its left/top/width/height on top of whatever scales the host, so it is part of the frame.
2789
+ scale: { x: (rect.width / PROBE_SIZE || 1) * ownZoom, y: (rect.height / PROBE_SIZE || 1) * ownZoom }
2784
2790
  };
2785
2791
  };
2786
2792
  var toFrameCoordinates = (frame, x, y) => ({
@@ -2821,6 +2827,7 @@ var DragDropCoreMixin = (superClass, draggablesSelector, droppablesSelector, dra
2821
2827
  returnAnchorItems: []
2822
2828
  };
2823
2829
  this.cloneFrame = IDENTITY_FIXED_FRAME;
2830
+ this.cloneZoom = 1;
2824
2831
  this.subscriptions = [];
2825
2832
  this.dragSubscriptions = [];
2826
2833
  this.lastPointerDownAt = 0;
@@ -3391,7 +3398,8 @@ var DragDropCoreMixin = (superClass, draggablesSelector, droppablesSelector, dra
3391
3398
  clone.style.setProperty(property27, computedStyles.getPropertyValue(property27));
3392
3399
  }
3393
3400
  const host = resolveDragCloneHost(element.isConnected ? element : this, this.dragCloneRoot());
3394
- this.cloneFrame = measureFixedFrame(host);
3401
+ this.cloneZoom = parseFloat(computedStyles.zoom) || 1;
3402
+ this.cloneFrame = measureFixedFrame(host, this.cloneZoom);
3395
3403
  clone.style.position = "fixed";
3396
3404
  clone.style.width = `${rect.width / this.cloneFrame.scale.x}px`;
3397
3405
  clone.style.height = `${rect.height / this.cloneFrame.scale.y}px`;
@@ -3450,7 +3458,7 @@ var DragDropCoreMixin = (superClass, draggablesSelector, droppablesSelector, dra
3450
3458
  if (host === dragClone.parentNode)
3451
3459
  return;
3452
3460
  host.appendChild(dragClone);
3453
- this.cloneFrame = measureFixedFrame(host);
3461
+ this.cloneFrame = measureFixedFrame(host, this.cloneZoom);
3454
3462
  if (lastCoordinates) {
3455
3463
  this.updateClonePosition(lastCoordinates.x, lastCoordinates.y);
3456
3464
  }
@@ -3506,6 +3514,7 @@ var DragDropCoreMixin = (superClass, draggablesSelector, droppablesSelector, dra
3506
3514
  });
3507
3515
  this.dragSubscriptions = [];
3508
3516
  this.cloneFrame = IDENTITY_FIXED_FRAME;
3517
+ this.cloneZoom = 1;
3509
3518
  this.dragState = {
3510
3519
  dragging: false,
3511
3520
  dragSource: null,
@@ -3520,14 +3529,14 @@ var DragDropCoreMixin = (superClass, draggablesSelector, droppablesSelector, dra
3520
3529
  returnAnchorItems: []
3521
3530
  };
3522
3531
  }
3523
- setInternalsState(state14, enabled) {
3532
+ setInternalsState(state15, enabled) {
3524
3533
  const internals = this._internals;
3525
3534
  if (!internals?.states)
3526
3535
  return;
3527
3536
  if (enabled) {
3528
- internals.states.add(state14);
3537
+ internals.states.add(state15);
3529
3538
  } else {
3530
- internals.states.delete(state14);
3539
+ internals.states.delete(state15);
3531
3540
  }
3532
3541
  }
3533
3542
  cleanup() {
@@ -6473,6 +6482,7 @@ __decorate19([
6473
6482
 
6474
6483
  // ../interactions/graphic-gap-match-interaction/dist/qti-graphic-gap-match-interaction.js
6475
6484
  import { html as html18 } from "lit";
6485
+ import { state as state9 } from "lit/decorators.js";
6476
6486
 
6477
6487
  // ../interactions/graphic-gap-match-interaction/dist/qti-graphic-gap-match-interaction.styles.js
6478
6488
  import { css as css17 } from "lit";
@@ -6568,15 +6578,34 @@ var qti_graphic_gap_match_interaction_styles_default = [
6568
6578
  ];
6569
6579
 
6570
6580
  // ../interactions/graphic-gap-match-interaction/dist/qti-graphic-gap-match-interaction.js
6581
+ var __decorate20 = function(decorators, target, key, desc) {
6582
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
6583
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
6584
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6585
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6586
+ };
6571
6587
  var SlottedBase2 = DragDropSlottedMixin(Interaction, "qti-gap-img, qti-gap-text", "qti-associable-hotspot", `slot[part~='drags']`);
6572
6588
  var QtiGraphicGapMatchInteraction = class extends DragDropSlottedSortableMixin(SlottedBase2, '[qti-draggable="true"]') {
6589
+ constructor() {
6590
+ super(...arguments);
6591
+ this.autoSizeDropzones = false;
6592
+ this._graphicScale = 1;
6593
+ this.#graphicObserver = null;
6594
+ this.#observedGraphic = null;
6595
+ this.#positionHotspotOnRegister = (e) => {
6596
+ this.#positionHotspot(e.target);
6597
+ };
6598
+ }
6573
6599
  static {
6574
6600
  this.styles = qti_graphic_gap_match_interaction_styles_default;
6575
6601
  }
6602
+ #graphicObserver;
6603
+ #observedGraphic;
6576
6604
  render() {
6605
+ const scale = `--qti-graphic-scale: ${this._graphicScale}`;
6577
6606
  return html18` <slot name="prompt"></slot>
6578
- <slot part="image"></slot>
6579
- <slot part="drags" name="drags" class="hover-border"></slot>
6607
+ <slot part="image" style=${scale}></slot>
6608
+ <slot part="drags" name="drags" class="hover-border" style=${scale}></slot>
6580
6609
  <div role="alert" part="message" id="validation-message"></div>`;
6581
6610
  }
6582
6611
  shouldReturnToInventoryOnInventoryDrop() {
@@ -6624,11 +6653,30 @@ var QtiGraphicGapMatchInteraction = class extends DragDropSlottedSortableMixin(S
6624
6653
  if (!graphic || !coords || !shape)
6625
6654
  return;
6626
6655
  this.#keepDeclaredRatio(graphic);
6656
+ this.#observeGraphic(graphic);
6627
6657
  positionShapes(shape, coords.split(",").map((s) => parseFloat(s)), graphic, hotspot);
6628
6658
  }
6629
- #positionHotspotOnRegister = (e) => {
6630
- this.#positionHotspot(e.target);
6631
- };
6659
+ /**
6660
+ * Tracks the graphic's rendered width. The authored chip sizes live in the same coordinate space
6661
+ * as the `coords` — an item that draws a 275x126 hotspot for a 275x126 tile means the tile to fill
6662
+ * it — so the chips scale by the same factor as the drop areas.
6663
+ */
6664
+ #observeGraphic(graphic) {
6665
+ if (this.#observedGraphic === graphic)
6666
+ return;
6667
+ this.#graphicObserver?.disconnect();
6668
+ this.#observedGraphic = graphic;
6669
+ this.#graphicObserver = new ResizeObserver(() => {
6670
+ const declared = parseFloat(graphic.getAttribute("width") ?? "");
6671
+ const rendered = graphic.getBoundingClientRect().width;
6672
+ const scale = declared > 0 && rendered > 0 ? Math.min(1, rendered / declared) : 1;
6673
+ const rounded = Math.round(scale * 1e3) / 1e3;
6674
+ if (rounded !== this._graphicScale)
6675
+ this._graphicScale = rounded;
6676
+ });
6677
+ this.#graphicObserver.observe(graphic);
6678
+ }
6679
+ #positionHotspotOnRegister;
6632
6680
  connectedCallback() {
6633
6681
  super.connectedCallback();
6634
6682
  this.addEventListener("qti-register-hotspot", this.#positionHotspotOnRegister);
@@ -6637,8 +6685,14 @@ var QtiGraphicGapMatchInteraction = class extends DragDropSlottedSortableMixin(S
6637
6685
  disconnectedCallback() {
6638
6686
  super.disconnectedCallback();
6639
6687
  this.removeEventListener("qti-register-hotspot", this.#positionHotspotOnRegister);
6688
+ this.#graphicObserver?.disconnect();
6689
+ this.#graphicObserver = null;
6690
+ this.#observedGraphic = null;
6640
6691
  }
6641
6692
  };
6693
+ __decorate20([
6694
+ state9()
6695
+ ], QtiGraphicGapMatchInteraction.prototype, "_graphicScale", void 0);
6642
6696
 
6643
6697
  // ../interactions/graphic-order-interaction/dist/qti-graphic-order-interaction.js
6644
6698
  import { html as html19 } from "lit";
@@ -6691,7 +6745,7 @@ var qti_graphic_order_interaction_styles_default = [
6691
6745
  ];
6692
6746
 
6693
6747
  // ../interactions/graphic-order-interaction/dist/qti-graphic-order-interaction.js
6694
- var __decorate20 = function(decorators, target, key, desc) {
6748
+ var __decorate21 = function(decorators, target, key, desc) {
6695
6749
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
6696
6750
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
6697
6751
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -6826,10 +6880,10 @@ var QtiGraphicOrderInteraction = class _QtiGraphicOrderInteraction extends Choic
6826
6880
  this.removeEventListener("register-qti-hotspot-choice", this.#positionHotspotOnRegister);
6827
6881
  }
6828
6882
  };
6829
- __decorate20([
6883
+ __decorate21([
6830
6884
  property19({ type: Number, attribute: "max-choices" })
6831
6885
  ], QtiGraphicOrderInteraction.prototype, "maxChoices", void 0);
6832
- __decorate20([
6886
+ __decorate21([
6833
6887
  watch("response")
6834
6888
  ], QtiGraphicOrderInteraction.prototype, "handleOrderedResponseChange", null);
6835
6889
 
@@ -6974,7 +7028,7 @@ var QtiHottextInteraction = class extends ChoicesMixin(Interaction, "qti-hottext
6974
7028
 
6975
7029
  // ../interactions/inline-choice-interaction/dist/qti-inline-choice-interaction.js
6976
7030
  import { html as html22 } from "lit";
6977
- import { property as property20, state as state9 } from "lit/decorators.js";
7031
+ import { property as property20, state as state10 } from "lit/decorators.js";
6978
7032
  import { consume as consume5 } from "@lit/context";
6979
7033
 
6980
7034
  // ../interactions/core/dist/mixins/menu-auto-size/menu-auto-size.mixin.js
@@ -7349,7 +7403,7 @@ var styles2 = own;
7349
7403
  var qti_inline_choice_interaction_styles_default = styles2;
7350
7404
 
7351
7405
  // ../interactions/inline-choice-interaction/dist/qti-inline-choice-interaction.js
7352
- var __decorate21 = function(decorators, target, key, desc) {
7406
+ var __decorate22 = function(decorators, target, key, desc) {
7353
7407
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7354
7408
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
7355
7409
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -7719,23 +7773,23 @@ var QtiInlineChoiceInteraction = class extends MenuAutoSizeMixin(Interaction) {
7719
7773
  return [...promptOption ? [promptOption] : [], ...slottedChoices];
7720
7774
  }
7721
7775
  };
7722
- __decorate21([
7723
- state9()
7776
+ __decorate22([
7777
+ state10()
7724
7778
  ], QtiInlineChoiceInteraction.prototype, "options", void 0);
7725
- __decorate21([
7726
- state9()
7779
+ __decorate22([
7780
+ state10()
7727
7781
  ], QtiInlineChoiceInteraction.prototype, "_dropdownOpen", void 0);
7728
- __decorate21([
7782
+ __decorate22([
7729
7783
  consume5({ context: configContext, subscribe: true }),
7730
7784
  property20({ attribute: false })
7731
7785
  ], QtiInlineChoiceInteraction.prototype, "configContext", void 0);
7732
- __decorate21([
7786
+ __decorate22([
7733
7787
  property20({ type: String, attribute: "data-prompt" })
7734
7788
  ], QtiInlineChoiceInteraction.prototype, "dataPrompt", void 0);
7735
- __decorate21([
7789
+ __decorate22([
7736
7790
  watch("dataPrompt", { waitUntilFirstUpdate: true })
7737
7791
  ], QtiInlineChoiceInteraction.prototype, "_handleDataPromptChange", void 0);
7738
- __decorate21([
7792
+ __decorate22([
7739
7793
  property20({
7740
7794
  type: Boolean,
7741
7795
  reflect: true,
@@ -7746,19 +7800,19 @@ __decorate21([
7746
7800
  }
7747
7801
  })
7748
7802
  ], QtiInlineChoiceInteraction.prototype, "required", void 0);
7749
- __decorate21([
7803
+ __decorate22([
7750
7804
  property20({ type: Number, attribute: "min-choices" })
7751
7805
  ], QtiInlineChoiceInteraction.prototype, "minChoices", void 0);
7752
- __decorate21([
7806
+ __decorate22([
7753
7807
  watch(["required", "minChoices"], { waitUntilFirstUpdate: true })
7754
7808
  ], QtiInlineChoiceInteraction.prototype, "_handleRequiredChange", void 0);
7755
- __decorate21([
7809
+ __decorate22([
7756
7810
  property20({ attribute: "response", reflect: false, noAccessor: true })
7757
7811
  ], QtiInlineChoiceInteraction.prototype, "response", null);
7758
7812
 
7759
7813
  // ../interactions/match-interaction/dist/qti-match-interaction.js
7760
7814
  import { html as html23, nothing as nothing3 } from "lit";
7761
- import { property as property21, state as state10 } from "lit/decorators.js";
7815
+ import { property as property21, state as state11 } from "lit/decorators.js";
7762
7816
 
7763
7817
  // ../interactions/match-interaction/dist/qti-match-interaction.styles.js
7764
7818
  import { css as css22 } from "lit";
@@ -7938,7 +7992,7 @@ var qti_match_interaction_tabular_styles_default = [
7938
7992
  ];
7939
7993
 
7940
7994
  // ../interactions/match-interaction/dist/qti-match-interaction.js
7941
- var __decorate22 = function(decorators, target, key, desc) {
7995
+ var __decorate23 = function(decorators, target, key, desc) {
7942
7996
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7943
7997
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
7944
7998
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -8141,13 +8195,13 @@ var QtiMatchInteraction = class extends DragDropSlottedSortableMixin(DragDropSlo
8141
8195
  `;
8142
8196
  }
8143
8197
  };
8144
- __decorate22([
8198
+ __decorate23([
8145
8199
  property21({ type: String })
8146
8200
  ], QtiMatchInteraction.prototype, "class", void 0);
8147
- __decorate22([
8148
- state10()
8201
+ __decorate23([
8202
+ state11()
8149
8203
  ], QtiMatchInteraction.prototype, "_response", void 0);
8150
- __decorate22([
8204
+ __decorate23([
8151
8205
  property21({ type: String, attribute: "response-identifier" })
8152
8206
  ], QtiMatchInteraction.prototype, "responseIdentifier", void 0);
8153
8207
 
@@ -8225,7 +8279,7 @@ var QtiMediaInteraction = class extends Interaction {
8225
8279
  // ../interactions/order-interaction/dist/qti-order-interaction.js
8226
8280
  import { html as html25 } from "lit";
8227
8281
  import { repeat as repeat6 } from "lit/directives/repeat.js";
8228
- import { property as property22, state as state11 } from "lit/decorators.js";
8282
+ import { property as property22, state as state12 } from "lit/decorators.js";
8229
8283
 
8230
8284
  // ../interactions/order-interaction/dist/qti-order-interaction.styles.js
8231
8285
  import { css as css25 } from "lit";
@@ -8447,7 +8501,7 @@ var qti_order_interaction_styles_default = [
8447
8501
  ];
8448
8502
 
8449
8503
  // ../interactions/order-interaction/dist/qti-order-interaction.js
8450
- var __decorate23 = function(decorators, target, key, desc) {
8504
+ var __decorate24 = function(decorators, target, key, desc) {
8451
8505
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8452
8506
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
8453
8507
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -8506,16 +8560,16 @@ var QtiOrderInteraction = class extends DragDropSlottedSortableMixin(SlottedBase
8506
8560
  this.childrenMap = Array.from(this.querySelectorAll("qti-simple-choice"));
8507
8561
  }
8508
8562
  };
8509
- __decorate23([
8510
- state11()
8563
+ __decorate24([
8564
+ state12()
8511
8565
  ], QtiOrderInteraction.prototype, "nrChoices", void 0);
8512
- __decorate23([
8566
+ __decorate24([
8513
8567
  property22({ type: String })
8514
8568
  ], QtiOrderInteraction.prototype, "orientation", void 0);
8515
8569
 
8516
8570
  // ../interactions/portable-custom-interaction/dist/qti-portable-custom-interaction.js
8517
8571
  import { css as css27, html as html26 } from "lit";
8518
- import { property as property23, state as state12 } from "lit/decorators.js";
8572
+ import { property as property23, state as state13 } from "lit/decorators.js";
8519
8573
  import { consume as consume6 } from "@lit/context";
8520
8574
 
8521
8575
  // ../interactions/portable-custom-interaction/dist/qti-portable-custom-interaction.styles.js
@@ -8536,7 +8590,7 @@ var qti_portable_custom_interaction_styles_default = [
8536
8590
  ];
8537
8591
 
8538
8592
  // ../interactions/portable-custom-interaction/dist/qti-portable-custom-interaction.js
8539
- var __decorate24 = function(decorators, target, key, desc) {
8593
+ var __decorate25 = function(decorators, target, key, desc) {
8540
8594
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8541
8595
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
8542
8596
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -8623,30 +8677,30 @@ var QtiPortableCustomInteraction = class extends Interaction {
8623
8677
  this.#pciCustomValidityMessage = pciCustomValidity;
8624
8678
  }
8625
8679
  const stateRaw = data?.params?.state;
8626
- let state14;
8680
+ let state15;
8627
8681
  if (stateRaw === void 0) {
8628
- state14 = void 0;
8682
+ state15 = void 0;
8629
8683
  } else if (stateRaw === null) {
8630
- state14 = null;
8684
+ state15 = null;
8631
8685
  } else if (typeof stateRaw === "string") {
8632
- state14 = stateRaw;
8686
+ state15 = stateRaw;
8633
8687
  } else {
8634
8688
  try {
8635
- state14 = `__qti_json__::${JSON.stringify(stateRaw)}`;
8689
+ state15 = `__qti_json__::${JSON.stringify(stateRaw)}`;
8636
8690
  } catch {
8637
- state14 = null;
8691
+ state15 = null;
8638
8692
  }
8639
8693
  }
8640
8694
  if (converted === null) {
8641
8695
  const emptyResponse = this.responseVariable?.cardinality === "single" ? "" : [];
8642
8696
  this.response = emptyResponse;
8643
8697
  this.validate();
8644
- this.saveResponse(emptyResponse, state14);
8698
+ this.saveResponse(emptyResponse, state15);
8645
8699
  break;
8646
8700
  }
8647
8701
  this.response = converted;
8648
8702
  this.validate();
8649
- this.saveResponse(converted, state14);
8703
+ this.saveResponse(converted, state15);
8650
8704
  break;
8651
8705
  }
8652
8706
  case "error":
@@ -10234,42 +10288,42 @@ var QtiPortableCustomInteraction = class extends Interaction {
10234
10288
  `;
10235
10289
  }
10236
10290
  };
10237
- __decorate24([
10291
+ __decorate25([
10238
10292
  property23({ type: String, attribute: "module" })
10239
10293
  ], QtiPortableCustomInteraction.prototype, "module", void 0);
10240
- __decorate24([
10294
+ __decorate25([
10241
10295
  property23({ type: String, attribute: "custom-interaction-type-identifier" })
10242
10296
  ], QtiPortableCustomInteraction.prototype, "customInteractionTypeIdentifier", void 0);
10243
- __decorate24([
10297
+ __decorate25([
10244
10298
  property23({ type: String, attribute: "data-require-paths" })
10245
10299
  ], QtiPortableCustomInteraction.prototype, "requirePathsJson", void 0);
10246
- __decorate24([
10300
+ __decorate25([
10247
10301
  property23({ type: String, attribute: "data-require-shim" })
10248
10302
  ], QtiPortableCustomInteraction.prototype, "requireShimJson", void 0);
10249
- __decorate24([
10303
+ __decorate25([
10250
10304
  property23({ type: String, attribute: "data-require-js-url" })
10251
10305
  ], QtiPortableCustomInteraction.prototype, "requireJsUrl", void 0);
10252
- __decorate24([
10306
+ __decorate25([
10253
10307
  property23({ type: String, attribute: "data-base-url" })
10254
10308
  ], QtiPortableCustomInteraction.prototype, "baseUrl", void 0);
10255
- __decorate24([
10309
+ __decorate25([
10256
10310
  property23({ type: Boolean, attribute: "data-use-default-paths" })
10257
10311
  ], QtiPortableCustomInteraction.prototype, "useDefaultPaths", void 0);
10258
- __decorate24([
10312
+ __decorate25([
10259
10313
  property23({ type: String, attribute: "data-status" })
10260
10314
  ], QtiPortableCustomInteraction.prototype, "status", void 0);
10261
- __decorate24([
10262
- state12()
10315
+ __decorate25([
10316
+ state13()
10263
10317
  ], QtiPortableCustomInteraction.prototype, "_errorMessage", void 0);
10264
- __decorate24([
10318
+ __decorate25([
10265
10319
  consume6({ context: itemContext, subscribe: true }),
10266
- state12()
10320
+ state13()
10267
10321
  ], QtiPortableCustomInteraction.prototype, "context", void 0);
10268
- __decorate24([
10322
+ __decorate25([
10269
10323
  consume6({ context: qtiContext, subscribe: true }),
10270
- state12()
10324
+ state13()
10271
10325
  ], QtiPortableCustomInteraction.prototype, "qtiContext", void 0);
10272
- __decorate24([
10326
+ __decorate25([
10273
10327
  property23({ attribute: "response", reflect: false, converter: responseAttributeConverter({ emptyAs: null }) })
10274
10328
  ], QtiPortableCustomInteraction.prototype, "response", void 0);
10275
10329
 
@@ -10366,7 +10420,7 @@ var QtiPositionObjectStage = class extends LitElement13 {
10366
10420
 
10367
10421
  // ../interactions/select-point-interaction/dist/qti-select-point-interaction.js
10368
10422
  import { html as html29, nothing as nothing4 } from "lit";
10369
- import { property as property24, state as state13 } from "lit/decorators.js";
10423
+ import { property as property24, state as state14 } from "lit/decorators.js";
10370
10424
  import { repeat as repeat7 } from "lit/directives/repeat.js";
10371
10425
  import { styleMap } from "lit/directives/style-map.js";
10372
10426
 
@@ -10413,7 +10467,7 @@ var qti_select_point_interaction_styles_default = [
10413
10467
  ];
10414
10468
 
10415
10469
  // ../interactions/select-point-interaction/dist/qti-select-point-interaction.js
10416
- var __decorate25 = function(decorators, target, key, desc) {
10470
+ var __decorate26 = function(decorators, target, key, desc) {
10417
10471
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
10418
10472
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
10419
10473
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -10607,19 +10661,19 @@ var QtiSelectPointInteraction = class extends Interaction {
10607
10661
  }
10608
10662
  }
10609
10663
  };
10610
- __decorate25([
10664
+ __decorate26([
10611
10665
  property24({
10612
10666
  type: Number,
10613
10667
  attribute: "max-choices"
10614
10668
  })
10615
10669
  ], QtiSelectPointInteraction.prototype, "maxChoices", void 0);
10616
- __decorate25([
10670
+ __decorate26([
10617
10671
  property24({
10618
10672
  type: Number,
10619
10673
  attribute: "min-choices"
10620
10674
  })
10621
10675
  ], QtiSelectPointInteraction.prototype, "minChoices", void 0);
10622
- __decorate25([
10676
+ __decorate26([
10623
10677
  property24({
10624
10678
  attribute: "response",
10625
10679
  reflect: false,
@@ -10636,13 +10690,13 @@ __decorate25([
10636
10690
  }
10637
10691
  })
10638
10692
  ], QtiSelectPointInteraction.prototype, "response", void 0);
10639
- __decorate25([
10693
+ __decorate26([
10640
10694
  property24({ attribute: "area-mappings" })
10641
10695
  ], QtiSelectPointInteraction.prototype, "areaMappings", void 0);
10642
- __decorate25([
10643
- state13()
10696
+ __decorate26([
10697
+ state14()
10644
10698
  ], QtiSelectPointInteraction.prototype, "_areaEntries", void 0);
10645
- __decorate25([
10699
+ __decorate26([
10646
10700
  watch("areaMappings")
10647
10701
  ], QtiSelectPointInteraction.prototype, "_handleAreaMappingsChange", void 0);
10648
10702
 
@@ -10726,7 +10780,7 @@ var qti_slider_interaction_styles_default = [
10726
10780
  ];
10727
10781
 
10728
10782
  // ../interactions/slider-interaction/dist/qti-slider-interaction.js
10729
- var __decorate26 = function(decorators, target, key, desc) {
10783
+ var __decorate27 = function(decorators, target, key, desc) {
10730
10784
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
10731
10785
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
10732
10786
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -10866,19 +10920,19 @@ var QtiSliderInteraction = class extends Interaction {
10866
10920
  this.dispatchEvent(new Event("change", { bubbles: true }));
10867
10921
  }
10868
10922
  };
10869
- __decorate26([
10923
+ __decorate27([
10870
10924
  query2("#rail")
10871
10925
  ], QtiSliderInteraction.prototype, "_rail", void 0);
10872
- __decorate26([
10926
+ __decorate27([
10873
10927
  property25({ type: Number, attribute: "lower-bound" })
10874
10928
  ], QtiSliderInteraction.prototype, "min", void 0);
10875
- __decorate26([
10929
+ __decorate27([
10876
10930
  property25({ type: Number, attribute: "upper-bound" })
10877
10931
  ], QtiSliderInteraction.prototype, "max", void 0);
10878
- __decorate26([
10932
+ __decorate27([
10879
10933
  property25({ type: Number, attribute: "step" })
10880
10934
  ], QtiSliderInteraction.prototype, "step", void 0);
10881
- __decorate26([
10935
+ __decorate27([
10882
10936
  property25({ attribute: "response", reflect: false, noAccessor: true })
10883
10937
  ], QtiSliderInteraction.prototype, "response", null);
10884
10938
 
@@ -10985,7 +11039,7 @@ var qti_text_entry_interaction_styles_default = [
10985
11039
  ];
10986
11040
 
10987
11041
  // ../interactions/text-entry-interaction/dist/qti-text-entry-interaction.js
10988
- var __decorate27 = function(decorators, target, key, desc) {
11042
+ var __decorate28 = function(decorators, target, key, desc) {
10989
11043
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
10990
11044
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
10991
11045
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -11092,25 +11146,25 @@ var QtiTextEntryInteraction = class extends Interaction {
11092
11146
  this.response = "";
11093
11147
  }
11094
11148
  };
11095
- __decorate27([
11149
+ __decorate28([
11096
11150
  property26({ type: Number, attribute: "expected-length" })
11097
11151
  ], QtiTextEntryInteraction.prototype, "expectedLength", void 0);
11098
- __decorate27([
11152
+ __decorate28([
11099
11153
  property26({ type: String, attribute: "pattern-mask" })
11100
11154
  ], QtiTextEntryInteraction.prototype, "patternMask", void 0);
11101
- __decorate27([
11155
+ __decorate28([
11102
11156
  property26({ type: String, attribute: "placeholder-text" })
11103
11157
  ], QtiTextEntryInteraction.prototype, "placeholderText", void 0);
11104
- __decorate27([
11158
+ __decorate28([
11105
11159
  property26({ type: String, attribute: "data-patternmask-message" })
11106
11160
  ], QtiTextEntryInteraction.prototype, "dataPatternmaskMessage", void 0);
11107
- __decorate27([
11161
+ __decorate28([
11108
11162
  property26({ type: String, attribute: "response", reflect: false })
11109
11163
  ], QtiTextEntryInteraction.prototype, "response", void 0);
11110
- __decorate27([
11164
+ __decorate28([
11111
11165
  query3("input")
11112
11166
  ], QtiTextEntryInteraction.prototype, "_input", void 0);
11113
- __decorate27([
11167
+ __decorate28([
11114
11168
  watch("response", { waitUntilFirstUpdate: true })
11115
11169
  ], QtiTextEntryInteraction.prototype, "_handleValueChange", void 0);
11116
11170
 
@@ -11834,4 +11888,4 @@ export {
11834
11888
  elements31 as elements21,
11835
11889
  qtiInteractionElements
11836
11890
  };
11837
- //# sourceMappingURL=chunk-WC3P4KCV.js.map
11891
+ //# sourceMappingURL=chunk-VY2DM47N.js.map