@citolab/qti-components 7.0.6-beta.3 → 7.0.6-beta.5

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 (108) hide show
  1. package/cdn/chunks/{chunk-MJMONWKB.js → chunk-4ILXLVT5.js} +8 -2
  2. package/cdn/chunks/chunk-4PEUIMDK.js +8 -0
  3. package/cdn/chunks/chunk-EFU4L43Q.js +8 -0
  4. package/cdn/chunks/chunk-H2V2RXUW.js +11 -0
  5. package/cdn/chunks/chunk-IQZ7AOCQ.js +8 -0
  6. package/cdn/chunks/chunk-J3JSSCM6.js +5 -0
  7. package/cdn/chunks/chunk-LARBLB7K.js +8 -0
  8. package/cdn/chunks/chunk-PPWEIKLT.js +1 -0
  9. package/cdn/chunks/{chunk-N5OHGRGG.js → chunk-PT523RSK.js} +2 -2
  10. package/cdn/chunks/chunk-QTK4CPHP.js +8 -0
  11. package/cdn/chunks/chunk-RIXTWE2H.js +8 -0
  12. package/cdn/chunks/chunk-ROZIP5LG.js +8 -0
  13. package/cdn/chunks/chunk-RPZVSBLM.js +8 -0
  14. package/cdn/chunks/chunk-TEYXRLTI.js +8 -0
  15. package/cdn/chunks/{chunk-TVDTF6P6.js → chunk-U2TE6TOV.js} +89 -89
  16. package/cdn/chunks/{chunk-6S4CDN3T.js → chunk-YHWMZAZD.js} +2 -2
  17. package/cdn/chunks/{chunk-TQBDBMWL.js → chunk-YWH4TGMA.js} +1 -1
  18. package/cdn/index.global.js +1 -1
  19. package/cdn/index.js +1 -1
  20. package/cdn/qti-components/index.js +1 -1
  21. package/cdn/qti-item/core/index.js +1 -1
  22. package/cdn/qti-test/components/index.js +1 -1
  23. package/cdn/qti-test/components/test-component.abstract.js +1 -1
  24. package/cdn/qti-test/components/test-end-attempt.js +1 -0
  25. package/cdn/qti-test/components/test-item-link.js +1 -1
  26. package/cdn/qti-test/components/test-next.js +1 -1
  27. package/cdn/qti-test/components/test-paging-buttons-stamp.js +1 -1
  28. package/cdn/qti-test/components/test-prev.js +1 -1
  29. package/cdn/qti-test/components/test-show-correct-response.js +1 -0
  30. package/cdn/qti-test/components/test-view.js +1 -1
  31. package/cdn/qti-test/core/index.js +1 -1
  32. package/dist/chunks/{chunk-ZHAJ3CMP.js → chunk-6PAEJQSQ.js} +107 -140
  33. package/dist/chunks/chunk-6PAEJQSQ.js.map +1 -0
  34. package/dist/chunks/{chunk-UFYWCLXF.js → chunk-AUWATZ65.js} +1 -1
  35. package/dist/chunks/{chunk-UFYWCLXF.js.map → chunk-AUWATZ65.js.map} +1 -1
  36. package/dist/chunks/{chunk-7QMCKYDR.js → chunk-CEXAR7BF.js} +13 -4
  37. package/dist/chunks/chunk-CEXAR7BF.js.map +1 -0
  38. package/dist/chunks/{chunk-GSWZT6N2.js → chunk-DNHDFXTV.js} +14 -5
  39. package/dist/chunks/chunk-DNHDFXTV.js.map +1 -0
  40. package/dist/chunks/chunk-GQ5P3NWC.js +46 -0
  41. package/dist/chunks/chunk-GQ5P3NWC.js.map +1 -0
  42. package/dist/chunks/chunk-HOTNM5DT.js +1 -0
  43. package/dist/chunks/{chunk-3EU75IUF.js → chunk-MLT7V47R.js} +3 -21
  44. package/dist/chunks/chunk-MLT7V47R.js.map +1 -0
  45. package/dist/chunks/{chunk-J2SHENRN.js → chunk-NZQKGIJP.js} +9 -3
  46. package/dist/chunks/{chunk-J2SHENRN.js.map → chunk-NZQKGIJP.js.map} +1 -1
  47. package/dist/chunks/{chunk-6JXR63MH.js → chunk-RX3BRYYI.js} +14 -5
  48. package/dist/chunks/chunk-RX3BRYYI.js.map +1 -0
  49. package/dist/chunks/chunk-W4272Q5U.js +46 -0
  50. package/dist/chunks/chunk-W4272Q5U.js.map +1 -0
  51. package/dist/chunks/{chunk-A24F75DB.js → chunk-WWN5AD6V.js} +11 -2
  52. package/dist/chunks/chunk-WWN5AD6V.js.map +1 -0
  53. package/dist/chunks/{chunk-HHVRU3AJ.js → chunk-XCHS3RTZ.js} +2 -2
  54. package/dist/chunks/{chunk-KYAIMBP5.js → chunk-YQB6YLNW.js} +3 -3
  55. package/dist/chunks/chunk-YQB6YLNW.js.map +1 -0
  56. package/dist/chunks/{chunk-4GNVYCBN.js → chunk-ZQXZ6PK7.js} +92 -70
  57. package/dist/chunks/chunk-ZQXZ6PK7.js.map +1 -0
  58. package/dist/index.d.ts +4 -2
  59. package/dist/index.js +29 -21
  60. package/dist/item.css +8 -2
  61. package/dist/qti-components/index.d.ts +2 -2
  62. package/dist/qti-components/index.js +1 -1
  63. package/dist/qti-components-jsx.d.ts +62 -46
  64. package/dist/qti-item/core/index.js +2 -2
  65. package/dist/qti-loader/index.d.ts +1 -1
  66. package/dist/{qti-response-declaration-DAeBp8HH.d.ts → qti-response-declaration-Di9CsqiJ.d.ts} +4 -0
  67. package/dist/qti-test/components/index.d.ts +4 -2
  68. package/dist/qti-test/components/index.js +17 -9
  69. package/dist/qti-test/components/test-component.abstract.d.ts +2 -4
  70. package/dist/qti-test/components/test-component.abstract.js +2 -2
  71. package/dist/qti-test/components/test-end-attempt.d.ts +26 -0
  72. package/dist/qti-test/components/test-end-attempt.js +13 -0
  73. package/dist/qti-test/components/test-end-attempt.js.map +1 -0
  74. package/dist/qti-test/components/test-item-link.d.ts +3 -2
  75. package/dist/qti-test/components/test-item-link.js +4 -4
  76. package/dist/qti-test/components/test-next.d.ts +3 -2
  77. package/dist/qti-test/components/test-next.js +4 -4
  78. package/dist/qti-test/components/test-paging-buttons-stamp.d.ts +2 -2
  79. package/dist/qti-test/components/test-paging-buttons-stamp.js +3 -3
  80. package/dist/qti-test/components/test-prev.d.ts +3 -2
  81. package/dist/qti-test/components/test-prev.js +4 -4
  82. package/dist/qti-test/components/test-show-correct-response.d.ts +26 -0
  83. package/dist/qti-test/components/test-show-correct-response.js +13 -0
  84. package/dist/qti-test/components/test-show-correct-response.js.map +1 -0
  85. package/dist/qti-test/components/test-view.d.ts +3 -2
  86. package/dist/qti-test/components/test-view.js +3 -3
  87. package/dist/qti-test/core/index.d.ts +6 -6
  88. package/dist/qti-test/core/index.js +3 -3
  89. package/dist/{test.context-CaENAJNk.d.ts → test.context-CmsDQ8k2.d.ts} +3 -5
  90. package/dist/vscode.html-custom-data.json +36 -17
  91. package/package.json +1 -1
  92. package/cdn/chunks/chunk-5P7CTN7Q.js +0 -11
  93. package/cdn/chunks/chunk-DZCKF45D.js +0 -5
  94. package/cdn/chunks/chunk-IMJOPCFR.js +0 -1
  95. package/cdn/chunks/chunk-NDHSIO2G.js +0 -8
  96. package/cdn/chunks/chunk-QV6I5NVQ.js +0 -8
  97. package/dist/chunks/chunk-3EU75IUF.js.map +0 -1
  98. package/dist/chunks/chunk-4GNVYCBN.js.map +0 -1
  99. package/dist/chunks/chunk-6JXR63MH.js.map +0 -1
  100. package/dist/chunks/chunk-7QMCKYDR.js.map +0 -1
  101. package/dist/chunks/chunk-A24F75DB.js.map +0 -1
  102. package/dist/chunks/chunk-GSWZT6N2.js.map +0 -1
  103. package/dist/chunks/chunk-KYAIMBP5.js.map +0 -1
  104. package/dist/chunks/chunk-UN2IFSGC.js +0 -1
  105. package/dist/chunks/chunk-ZHAJ3CMP.js.map +0 -1
  106. /package/cdn/chunks/{chunk-3GO57DNP.js → chunk-6PW2L463.js} +0 -0
  107. /package/dist/chunks/{chunk-UN2IFSGC.js.map → chunk-HOTNM5DT.js.map} +0 -0
  108. /package/dist/chunks/{chunk-HHVRU3AJ.js.map → chunk-XCHS3RTZ.js.map} +0 -0
package/cdn/index.js CHANGED
@@ -1 +1 @@
1
- import{a as Io,b as Lo,c as Mo,d as No,e as Oo,f as Po}from"./chunks/chunk-DZCKF45D.js";import{$ as eo,A as D,Aa as Eo,B as E,Ba as Fo,C as F,Ca as Go,D as G,Da as Ho,E as H,F as I,G as J,H as K,I as L,J as M,K as N,L as O,M as P,N as Q,O as R,P as S,Q as T,R as U,S as V,T as W,U as X,V as Y,W as Z,X as _,Y as $,Z as oo,_ as ro,a as o,aa as fo,b as m,ba as mo,c as p,ca as po,d as t,da as to,e as x,ea as xo,f as a,fa as ao,g as b,ga as bo,h as c,ha as co,i as d,ia as go,j as g,ja as ho,k as h,ka as io,l as i,la as jo,m as j,ma as ko,n as k,na as lo,o as l,oa as no,p as n,pa as qo,q,qa as so,r as s,ra as uo,s as u,sa as vo,t as v,ta as wo,u as w,ua as yo,v as y,va as zo,w as z,wa as Ao,x as A,xa as Bo,y as B,ya as Co,z as C,za as Do}from"./chunks/chunk-TVDTF6P6.js";import{a as Yo,b as Zo}from"./chunks/chunk-4UJBK6JO.js";import{a as Wo,b as Xo}from"./chunks/chunk-TQBDBMWL.js";import"./chunks/chunk-MJMONWKB.js";import"./chunks/chunk-5BR5CJFH.js";import{a as r,b as e,c as f}from"./chunks/chunk-5FCXUJAG.js";import"./chunks/chunk-3GO57DNP.js";import{a as Uo}from"./chunks/chunk-N5OHGRGG.js";import{a as Ro}from"./chunks/chunk-NDHSIO2G.js";import{a as Vo}from"./chunks/chunk-6S4CDN3T.js";import{a as So}from"./chunks/chunk-QV6I5NVQ.js";import{a as To}from"./chunks/chunk-5P7CTN7Q.js";import"./chunks/chunk-L4CUWIE6.js";import{a as Qo}from"./chunks/chunk-IMJOPCFR.js";import{a as Jo,b as Ko}from"./chunks/chunk-6MCYE7P5.js";import"./chunks/chunk-EHK76KRT.js";import"./chunks/chunk-XUJ7TXHW.js";import"./chunks/chunk-UJP4TGD3.js";import"./chunks/chunk-KWPDTFYH.js";import"./chunks/chunk-RXKI3AO4.js";import"./chunks/chunk-X2KBNXRO.js";import"./chunks/chunk-5GCSZ3CH.js";import"./chunks/chunk-LZZB4VGC.js";import"./chunks/chunk-QQCGUVEV.js";import"./chunks/chunk-FRS2J3OS.js";import"./chunks/chunk-IAP2CEE7.js";export{Wo as ItemContainer,oo as QtiAnd,o as QtiAssessmentItem,Mo as QtiAssessmentItemRef,No as QtiAssessmentSection,m as QtiAssessmentStimulusRef,Oo as QtiAssessmentTest,c as QtiAssociableHotspot,d as QtiAssociateInteraction,eo as QtiBaseValue,g as QtiChoiceInteraction,p as QtiCompanionMaterialsInfo,fo as QtiContains,Do as QtiContentBody,mo as QtiCorrect,h as QtiCustomInteraction,t as QtiCustomOperator,i as QtiEndAttemptInteraction,to as QtiEqual,po as QtiEqualRounded,j as QtiExtendedTextInteraction,x as QtiFeedbackBlock,a as QtiFeedbackInline,q as QtiGap,k as QtiGapImg,l as QtiGapMatchInteraction,n as QtiGapText,s as QtiGraphicAssociateInteraction,u as QtiGraphicGapMatchInteraction,v as QtiGraphicOrderInteraction,xo as QtiGt,ao as QtiGte,w as QtiHotspotChoice,y as QtiHotspotInteraction,A as QtiHottext,z as QtiHottextInteraction,C as QtiInlineChoice,B as QtiInlineChoiceInteraction,bo as QtiIsNull,Xo as QtiItem,P as QtiItemBody,V as QtiLookupOutcomeValue,co as QtiLt,go as QtiLte,ho as QtiMapResponse,io as QtiMapping,jo as QtiMatch,E as QtiMatchInteraction,F as QtiMediaInteraction,ko as QtiMember,b as QtiModalFeedback,lo as QtiMultiple,no as QtiNot,qo as QtiOr,G as QtiOrderInteraction,so as QtiOrdered,Go as QtiOutcomeDeclaration,Q as QtiOutcomeProcessing,R as QtiOutcomeProcessingProcessor,H as QtiPortableCustomInteraction,I as QtiPositionObjectInteraction,J as QtiPositionObjectStage,uo as QtiPrintedVariable,vo as QtiProduct,S as QtiPrompt,W as QtiResponseCondition,Ho as QtiResponseDeclaration,Z as QtiResponseElse,$ as QtiResponseElseIf,_ as QtiResponseIf,T as QtiResponseProcessing,Eo as QtiRubricBlock,U as QtiRule,K as QtiSelectPointInteraction,X as QtiSetOutcomeValue,Y as QtiSetOutcomeValueRule,D as QtiSimpleAssociableChoice,L as QtiSimpleChoice,M as QtiSliderInteraction,zo as QtiStringMatch,Fo as QtiStylesheet,wo as QtiSubtract,Ao as QtiSum,Bo as QtiSumExpression,Lo as QtiTest,Po as QtiTestPart,N as QtiTextEntryInteraction,O as QtiUploadInteraction,Co as QtiVariable,Qo as TestComponent,Io as TestContainer,Uo as TestItemLink,Ro as TestNext,Vo as TestPagingButtonsStamp,So as TestPrev,To as TestView,Zo as getItemByUri,Yo as getManifestInfo,ro as qtiAndMixin,yo as qtiSubtractMixin,r as qtiTransformItem,e as qtiTransformManifest,f as qtiTransformTest,Jo as testContext,Ko as testElement};
1
+ import{a as Io,b as Lo,c as Mo,d as No,e as Oo,f as Po}from"./chunks/chunk-J3JSSCM6.js";import{$ as eo,A as D,Aa as Eo,B as E,Ba as Fo,C as F,Ca as Go,D as G,Da as Ho,E as H,F as I,G as J,H as K,I as L,J as M,K as N,L as O,M as P,N as Q,O as R,P as S,Q as T,R as U,S as V,T as W,U as X,V as Y,W as Z,X as _,Y as $,Z as oo,_ as ro,a as o,aa as fo,b as m,ba as mo,c as p,ca as po,d as t,da as to,e as x,ea as xo,f as a,fa as ao,g as b,ga as bo,h as c,ha as co,i as d,ia as go,j as g,ja as ho,k as h,ka as io,l as i,la as jo,m as j,ma as ko,n as k,na as lo,o as l,oa as no,p as n,pa as qo,q,qa as so,r as s,ra as uo,s as u,sa as vo,t as v,ta as wo,u as w,ua as yo,v as y,va as zo,w as z,wa as Ao,x as A,xa as Bo,y as B,ya as Co,z as C,za as Do}from"./chunks/chunk-U2TE6TOV.js";import{a as _o,b as $o}from"./chunks/chunk-4UJBK6JO.js";import{a as Yo,b as Zo}from"./chunks/chunk-YWH4TGMA.js";import"./chunks/chunk-4ILXLVT5.js";import"./chunks/chunk-5BR5CJFH.js";import{a as r,b as e,c as f}from"./chunks/chunk-5FCXUJAG.js";import"./chunks/chunk-6PW2L463.js";import{a as Vo}from"./chunks/chunk-EFU4L43Q.js";import{a as Uo}from"./chunks/chunk-ROZIP5LG.js";import{a as Ro}from"./chunks/chunk-RPZVSBLM.js";import{a as Xo}from"./chunks/chunk-YHWMZAZD.js";import{a as So}from"./chunks/chunk-TEYXRLTI.js";import{a as Wo}from"./chunks/chunk-RIXTWE2H.js";import{a as To}from"./chunks/chunk-H2V2RXUW.js";import"./chunks/chunk-L4CUWIE6.js";import{a as Qo}from"./chunks/chunk-PPWEIKLT.js";import{a as Jo,b as Ko}from"./chunks/chunk-6MCYE7P5.js";import"./chunks/chunk-EHK76KRT.js";import"./chunks/chunk-XUJ7TXHW.js";import"./chunks/chunk-UJP4TGD3.js";import"./chunks/chunk-KWPDTFYH.js";import"./chunks/chunk-RXKI3AO4.js";import"./chunks/chunk-X2KBNXRO.js";import"./chunks/chunk-5GCSZ3CH.js";import"./chunks/chunk-LZZB4VGC.js";import"./chunks/chunk-QQCGUVEV.js";import"./chunks/chunk-FRS2J3OS.js";import"./chunks/chunk-IAP2CEE7.js";export{Yo as ItemContainer,oo as QtiAnd,o as QtiAssessmentItem,Mo as QtiAssessmentItemRef,No as QtiAssessmentSection,m as QtiAssessmentStimulusRef,Oo as QtiAssessmentTest,c as QtiAssociableHotspot,d as QtiAssociateInteraction,eo as QtiBaseValue,g as QtiChoiceInteraction,p as QtiCompanionMaterialsInfo,fo as QtiContains,Do as QtiContentBody,mo as QtiCorrect,h as QtiCustomInteraction,t as QtiCustomOperator,i as QtiEndAttemptInteraction,to as QtiEqual,po as QtiEqualRounded,j as QtiExtendedTextInteraction,x as QtiFeedbackBlock,a as QtiFeedbackInline,q as QtiGap,k as QtiGapImg,l as QtiGapMatchInteraction,n as QtiGapText,s as QtiGraphicAssociateInteraction,u as QtiGraphicGapMatchInteraction,v as QtiGraphicOrderInteraction,xo as QtiGt,ao as QtiGte,w as QtiHotspotChoice,y as QtiHotspotInteraction,A as QtiHottext,z as QtiHottextInteraction,C as QtiInlineChoice,B as QtiInlineChoiceInteraction,bo as QtiIsNull,Zo as QtiItem,P as QtiItemBody,V as QtiLookupOutcomeValue,co as QtiLt,go as QtiLte,ho as QtiMapResponse,io as QtiMapping,jo as QtiMatch,E as QtiMatchInteraction,F as QtiMediaInteraction,ko as QtiMember,b as QtiModalFeedback,lo as QtiMultiple,no as QtiNot,qo as QtiOr,G as QtiOrderInteraction,so as QtiOrdered,Go as QtiOutcomeDeclaration,Q as QtiOutcomeProcessing,R as QtiOutcomeProcessingProcessor,H as QtiPortableCustomInteraction,I as QtiPositionObjectInteraction,J as QtiPositionObjectStage,uo as QtiPrintedVariable,vo as QtiProduct,S as QtiPrompt,W as QtiResponseCondition,Ho as QtiResponseDeclaration,Z as QtiResponseElse,$ as QtiResponseElseIf,_ as QtiResponseIf,T as QtiResponseProcessing,Eo as QtiRubricBlock,U as QtiRule,K as QtiSelectPointInteraction,X as QtiSetOutcomeValue,Y as QtiSetOutcomeValueRule,D as QtiSimpleAssociableChoice,L as QtiSimpleChoice,M as QtiSliderInteraction,zo as QtiStringMatch,Fo as QtiStylesheet,wo as QtiSubtract,Ao as QtiSum,Bo as QtiSumExpression,Lo as QtiTest,Po as QtiTestPart,N as QtiTextEntryInteraction,O as QtiUploadInteraction,Co as QtiVariable,Qo as TestComponent,Io as TestContainer,Vo as TestEndAttempt,Uo as TestItemLink,Ro as TestNext,Xo as TestPagingButtonsStamp,So as TestPrev,Wo as TestShowCorrectResponse,To as TestView,$o as getItemByUri,_o as getManifestInfo,ro as qtiAndMixin,yo as qtiSubtractMixin,r as qtiTransformItem,e as qtiTransformManifest,f as qtiTransformTest,Jo as testContext,Ko as testElement};
@@ -1 +1 @@
1
- import{$,A,Aa,B,Ba,C,Ca,D,Da,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,a,aa,b,ba,c,ca,d,da,e,ea,f,fa,g,ga,h,ha,i,ia,j,ja,k,ka,l,la,m,ma,n,na,o,oa,p,pa,q,qa,r,ra,s,sa,t,ta,u,ua,v,va,w,wa,x,xa,y,ya,z,za}from"../chunks/chunk-TVDTF6P6.js";import"../chunks/chunk-5BR5CJFH.js";import"../chunks/chunk-5FCXUJAG.js";import"../chunks/chunk-EHK76KRT.js";import"../chunks/chunk-XUJ7TXHW.js";import"../chunks/chunk-UJP4TGD3.js";import"../chunks/chunk-KWPDTFYH.js";import"../chunks/chunk-RXKI3AO4.js";import"../chunks/chunk-X2KBNXRO.js";import"../chunks/chunk-5GCSZ3CH.js";import"../chunks/chunk-LZZB4VGC.js";import"../chunks/chunk-QQCGUVEV.js";import"../chunks/chunk-FRS2J3OS.js";import"../chunks/chunk-IAP2CEE7.js";export{Z as QtiAnd,a as QtiAssessmentItem,b as QtiAssessmentStimulusRef,h as QtiAssociableHotspot,i as QtiAssociateInteraction,$ as QtiBaseValue,j as QtiChoiceInteraction,c as QtiCompanionMaterialsInfo,aa as QtiContains,za as QtiContentBody,ba as QtiCorrect,k as QtiCustomInteraction,d as QtiCustomOperator,l as QtiEndAttemptInteraction,da as QtiEqual,ca as QtiEqualRounded,m as QtiExtendedTextInteraction,e as QtiFeedbackBlock,f as QtiFeedbackInline,q as QtiGap,n as QtiGapImg,o as QtiGapMatchInteraction,p as QtiGapText,r as QtiGraphicAssociateInteraction,s as QtiGraphicGapMatchInteraction,t as QtiGraphicOrderInteraction,ea as QtiGt,fa as QtiGte,u as QtiHotspotChoice,v as QtiHotspotInteraction,x as QtiHottext,w as QtiHottextInteraction,z as QtiInlineChoice,y as QtiInlineChoiceInteraction,ga as QtiIsNull,M as QtiItemBody,S as QtiLookupOutcomeValue,ha as QtiLt,ia as QtiLte,ja as QtiMapResponse,ka as QtiMapping,la as QtiMatch,B as QtiMatchInteraction,C as QtiMediaInteraction,ma as QtiMember,g as QtiModalFeedback,na as QtiMultiple,oa as QtiNot,pa as QtiOr,D as QtiOrderInteraction,qa as QtiOrdered,Ca as QtiOutcomeDeclaration,N as QtiOutcomeProcessing,O as QtiOutcomeProcessingProcessor,E as QtiPortableCustomInteraction,F as QtiPositionObjectInteraction,G as QtiPositionObjectStage,ra as QtiPrintedVariable,sa as QtiProduct,P as QtiPrompt,T as QtiResponseCondition,Da as QtiResponseDeclaration,W as QtiResponseElse,Y as QtiResponseElseIf,X as QtiResponseIf,Q as QtiResponseProcessing,Aa as QtiRubricBlock,R as QtiRule,H as QtiSelectPointInteraction,U as QtiSetOutcomeValue,V as QtiSetOutcomeValueRule,A as QtiSimpleAssociableChoice,I as QtiSimpleChoice,J as QtiSliderInteraction,va as QtiStringMatch,Ba as QtiStylesheet,ta as QtiSubtract,wa as QtiSum,xa as QtiSumExpression,K as QtiTextEntryInteraction,L as QtiUploadInteraction,ya as QtiVariable,_ as qtiAndMixin,ua as qtiSubtractMixin};
1
+ import{$,A,Aa,B,Ba,C,Ca,D,Da,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,a,aa,b,ba,c,ca,d,da,e,ea,f,fa,g,ga,h,ha,i,ia,j,ja,k,ka,l,la,m,ma,n,na,o,oa,p,pa,q,qa,r,ra,s,sa,t,ta,u,ua,v,va,w,wa,x,xa,y,ya,z,za}from"../chunks/chunk-U2TE6TOV.js";import"../chunks/chunk-5BR5CJFH.js";import"../chunks/chunk-5FCXUJAG.js";import"../chunks/chunk-EHK76KRT.js";import"../chunks/chunk-XUJ7TXHW.js";import"../chunks/chunk-UJP4TGD3.js";import"../chunks/chunk-KWPDTFYH.js";import"../chunks/chunk-RXKI3AO4.js";import"../chunks/chunk-X2KBNXRO.js";import"../chunks/chunk-5GCSZ3CH.js";import"../chunks/chunk-LZZB4VGC.js";import"../chunks/chunk-QQCGUVEV.js";import"../chunks/chunk-FRS2J3OS.js";import"../chunks/chunk-IAP2CEE7.js";export{Z as QtiAnd,a as QtiAssessmentItem,b as QtiAssessmentStimulusRef,h as QtiAssociableHotspot,i as QtiAssociateInteraction,$ as QtiBaseValue,j as QtiChoiceInteraction,c as QtiCompanionMaterialsInfo,aa as QtiContains,za as QtiContentBody,ba as QtiCorrect,k as QtiCustomInteraction,d as QtiCustomOperator,l as QtiEndAttemptInteraction,da as QtiEqual,ca as QtiEqualRounded,m as QtiExtendedTextInteraction,e as QtiFeedbackBlock,f as QtiFeedbackInline,q as QtiGap,n as QtiGapImg,o as QtiGapMatchInteraction,p as QtiGapText,r as QtiGraphicAssociateInteraction,s as QtiGraphicGapMatchInteraction,t as QtiGraphicOrderInteraction,ea as QtiGt,fa as QtiGte,u as QtiHotspotChoice,v as QtiHotspotInteraction,x as QtiHottext,w as QtiHottextInteraction,z as QtiInlineChoice,y as QtiInlineChoiceInteraction,ga as QtiIsNull,M as QtiItemBody,S as QtiLookupOutcomeValue,ha as QtiLt,ia as QtiLte,ja as QtiMapResponse,ka as QtiMapping,la as QtiMatch,B as QtiMatchInteraction,C as QtiMediaInteraction,ma as QtiMember,g as QtiModalFeedback,na as QtiMultiple,oa as QtiNot,pa as QtiOr,D as QtiOrderInteraction,qa as QtiOrdered,Ca as QtiOutcomeDeclaration,N as QtiOutcomeProcessing,O as QtiOutcomeProcessingProcessor,E as QtiPortableCustomInteraction,F as QtiPositionObjectInteraction,G as QtiPositionObjectStage,ra as QtiPrintedVariable,sa as QtiProduct,P as QtiPrompt,T as QtiResponseCondition,Da as QtiResponseDeclaration,W as QtiResponseElse,Y as QtiResponseElseIf,X as QtiResponseIf,Q as QtiResponseProcessing,Aa as QtiRubricBlock,R as QtiRule,H as QtiSelectPointInteraction,U as QtiSetOutcomeValue,V as QtiSetOutcomeValueRule,A as QtiSimpleAssociableChoice,I as QtiSimpleChoice,J as QtiSliderInteraction,va as QtiStringMatch,Ba as QtiStylesheet,ta as QtiSubtract,wa as QtiSum,xa as QtiSumExpression,K as QtiTextEntryInteraction,L as QtiUploadInteraction,ya as QtiVariable,_ as qtiAndMixin,ua as qtiSubtractMixin};
@@ -1 +1 @@
1
- import{a,b}from"../../chunks/chunk-TQBDBMWL.js";import"../../chunks/chunk-MJMONWKB.js";import"../../chunks/chunk-5BR5CJFH.js";import"../../chunks/chunk-5FCXUJAG.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as ItemContainer,b as QtiItem};
1
+ import{a,b}from"../../chunks/chunk-YWH4TGMA.js";import"../../chunks/chunk-4ILXLVT5.js";import"../../chunks/chunk-5BR5CJFH.js";import"../../chunks/chunk-5FCXUJAG.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as ItemContainer,b as QtiItem};
@@ -1 +1 @@
1
- import"../../chunks/chunk-3GO57DNP.js";import{a as e}from"../../chunks/chunk-N5OHGRGG.js";import{a as b}from"../../chunks/chunk-NDHSIO2G.js";import{a as f}from"../../chunks/chunk-6S4CDN3T.js";import{a as c}from"../../chunks/chunk-QV6I5NVQ.js";import{a as d}from"../../chunks/chunk-5P7CTN7Q.js";import"../../chunks/chunk-L4CUWIE6.js";import{a}from"../../chunks/chunk-IMJOPCFR.js";import"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as TestComponent,e as TestItemLink,b as TestNext,f as TestPagingButtonsStamp,c as TestPrev,d as TestView};
1
+ import"../../chunks/chunk-6PW2L463.js";import{a as f}from"../../chunks/chunk-EFU4L43Q.js";import{a as e}from"../../chunks/chunk-ROZIP5LG.js";import{a as b}from"../../chunks/chunk-RPZVSBLM.js";import{a as h}from"../../chunks/chunk-YHWMZAZD.js";import{a as c}from"../../chunks/chunk-TEYXRLTI.js";import{a as g}from"../../chunks/chunk-RIXTWE2H.js";import{a as d}from"../../chunks/chunk-H2V2RXUW.js";import"../../chunks/chunk-L4CUWIE6.js";import{a}from"../../chunks/chunk-PPWEIKLT.js";import"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as TestComponent,f as TestEndAttempt,e as TestItemLink,b as TestNext,h as TestPagingButtonsStamp,c as TestPrev,g as TestShowCorrectResponse,d as TestView};
@@ -1 +1 @@
1
- import{a}from"../../chunks/chunk-IMJOPCFR.js";import"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as TestComponent};
1
+ import{a}from"../../chunks/chunk-PPWEIKLT.js";import"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as TestComponent};
@@ -0,0 +1 @@
1
+ import{a}from"../../chunks/chunk-EFU4L43Q.js";import"../../chunks/chunk-L4CUWIE6.js";import"../../chunks/chunk-PPWEIKLT.js";import"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as TestEndAttempt};
@@ -1 +1 @@
1
- import{a}from"../../chunks/chunk-N5OHGRGG.js";import"../../chunks/chunk-L4CUWIE6.js";import"../../chunks/chunk-IMJOPCFR.js";import"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as TestItemLink};
1
+ import{a}from"../../chunks/chunk-ROZIP5LG.js";import"../../chunks/chunk-L4CUWIE6.js";import"../../chunks/chunk-PPWEIKLT.js";import"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as TestItemLink};
@@ -1 +1 @@
1
- import{a}from"../../chunks/chunk-NDHSIO2G.js";import"../../chunks/chunk-L4CUWIE6.js";import"../../chunks/chunk-IMJOPCFR.js";import"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as TestNext};
1
+ import{a}from"../../chunks/chunk-RPZVSBLM.js";import"../../chunks/chunk-L4CUWIE6.js";import"../../chunks/chunk-PPWEIKLT.js";import"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as TestNext};
@@ -1 +1 @@
1
- import{a}from"../../chunks/chunk-6S4CDN3T.js";import"../../chunks/chunk-IMJOPCFR.js";import"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as TestPagingButtonsStamp};
1
+ import{a}from"../../chunks/chunk-YHWMZAZD.js";import"../../chunks/chunk-PPWEIKLT.js";import"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as TestPagingButtonsStamp};
@@ -1 +1 @@
1
- import{a}from"../../chunks/chunk-QV6I5NVQ.js";import"../../chunks/chunk-L4CUWIE6.js";import"../../chunks/chunk-IMJOPCFR.js";import"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as TestPrev};
1
+ import{a}from"../../chunks/chunk-TEYXRLTI.js";import"../../chunks/chunk-L4CUWIE6.js";import"../../chunks/chunk-PPWEIKLT.js";import"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as TestPrev};
@@ -0,0 +1 @@
1
+ import{a}from"../../chunks/chunk-RIXTWE2H.js";import"../../chunks/chunk-L4CUWIE6.js";import"../../chunks/chunk-PPWEIKLT.js";import"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as TestShowCorrectResponse};
@@ -1 +1 @@
1
- import{a}from"../../chunks/chunk-5P7CTN7Q.js";import"../../chunks/chunk-IMJOPCFR.js";import"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as TestView};
1
+ import{a}from"../../chunks/chunk-H2V2RXUW.js";import"../../chunks/chunk-PPWEIKLT.js";import"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as TestView};
@@ -1 +1 @@
1
- import{a,b as d,c as e,d as f,e as g,f as h}from"../../chunks/chunk-DZCKF45D.js";import"../../chunks/chunk-MJMONWKB.js";import"../../chunks/chunk-5BR5CJFH.js";import"../../chunks/chunk-5FCXUJAG.js";import{a as b,b as c}from"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{e as QtiAssessmentItemRef,f as QtiAssessmentSection,g as QtiAssessmentTest,d as QtiTest,h as QtiTestPart,a as TestContainer,b as testContext,c as testElement};
1
+ import{a,b as d,c as e,d as f,e as g,f as h}from"../../chunks/chunk-J3JSSCM6.js";import"../../chunks/chunk-4ILXLVT5.js";import"../../chunks/chunk-5BR5CJFH.js";import"../../chunks/chunk-5FCXUJAG.js";import{a as b,b as c}from"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{e as QtiAssessmentItemRef,f as QtiAssessmentSection,g as QtiAssessmentTest,d as QtiTest,h as QtiTestPart,a as TestContainer,b as testContext,c as testElement};
@@ -145,22 +145,23 @@ var QtiAssessmentItem = class extends LitElement {
145
145
  render() {
146
146
  return html`<slot></slot>`;
147
147
  }
148
+ /**
149
+ * Toggles the display of correct responses for interactions.
150
+ * @param show - A boolean indicating whether to show or hide correct responses.
151
+ */
148
152
  showCorrectResponse(show) {
149
- const responseVariables = this._context.variables.filter(
150
- (vari) => "correctResponse" in vari && vari.correctResponse
151
- );
152
- const responses = responseVariables.map((cr) => {
153
- return {
154
- responseIdentifier: cr.identifier,
155
- response: cr.correctResponse
156
- };
157
- });
158
- for (const response of responses) {
153
+ const responses = this._context.variables.filter(
154
+ (variable) => "correctResponse" in variable && variable.correctResponse
155
+ ).map((variable) => ({
156
+ responseIdentifier: variable.identifier,
157
+ response: variable.correctResponse || ""
158
+ }));
159
+ for (const { responseIdentifier, response } of responses) {
159
160
  const interaction = this._interactionElements.find(
160
- (i) => i.getAttribute("response-identifier") === response.responseIdentifier
161
+ (element) => element.getAttribute("response-identifier") === responseIdentifier
161
162
  );
162
163
  if (interaction) {
163
- interaction.correctResponse = show ? response.response : "";
164
+ interaction.correctResponse = show ? response : "";
164
165
  }
165
166
  }
166
167
  }
@@ -744,7 +745,7 @@ var FlippablesMixin = (superClass, _droppablesSel, _draggablesSel) => {
744
745
 
745
746
  // src/lib/qti-components/qti-interaction/internal/drag-drop/drag-drop-interaction-mixin.ts
746
747
  import { property as property4 } from "lit/decorators.js";
747
- var DragDropInteractionMixin = (superClass, draggablesSelector, droppablesSelector, dragContainersSelector, appendClone = "default") => {
748
+ var DragDropInteractionMixin = (superClass, draggablesSelector, droppablesSelector, dragContainersSelector) => {
748
749
  class DragDropInteractionElement extends FlippablesMixin(
749
750
  superClass,
750
751
  droppablesSelector,
@@ -771,14 +772,10 @@ var DragDropInteractionMixin = (superClass, draggablesSelector, droppablesSelect
771
772
  // Offset for positioning the drag clone
772
773
  this.isDragging = false;
773
774
  // Whether a drag operation is ongoing
774
- this.rootNode = null;
775
- // Root node for boundary calculations
776
775
  this.allDropzones = [];
777
776
  // All dropzones for keyboard navigation
778
777
  this.lastTarget = null;
779
778
  // Last touch target
780
- this.dropzoneOriginalParent = null;
781
- // Original parent of the drag clone
782
779
  this.currentDropTarget = null;
783
780
  // Current droppable element
784
781
  this.MIN_DRAG_DISTANCE = 5;
@@ -1051,10 +1048,6 @@ var DragDropInteractionMixin = (superClass, draggablesSelector, droppablesSelect
1051
1048
  }
1052
1049
  handleTouchEnd(e) {
1053
1050
  if (this.isDragging) {
1054
- if (this.currentDropTarget) {
1055
- const draggable = this.dragClone;
1056
- this.moveDraggableToDroppable(draggable, this.currentDropTarget);
1057
- }
1058
1051
  this.resetDragState();
1059
1052
  }
1060
1053
  this._internals.states.delete("--dragzone-active");
@@ -1063,7 +1056,9 @@ var DragDropInteractionMixin = (superClass, draggablesSelector, droppablesSelect
1063
1056
  this._internals.states.delete("--dragzone-active");
1064
1057
  this.deactivateDragLocation();
1065
1058
  this.deactivateDroppables();
1066
- this.dragClone?.removeAttribute("dragging");
1059
+ this.draggables.forEach((d) => {
1060
+ d.removeAttribute("dragging");
1061
+ });
1067
1062
  e.preventDefault();
1068
1063
  }
1069
1064
  handleTouchCancel(_e) {
@@ -1105,25 +1100,37 @@ var DragDropInteractionMixin = (superClass, draggablesSelector, droppablesSelect
1105
1100
  const unlimitedAssociations = maxMatch === 0;
1106
1101
  return unlimitedAssociations || currentAssociations >= maxMatch;
1107
1102
  }
1103
+ dropDraggableInDroppable(draggable, droppable) {
1104
+ const cleanClone = draggable.cloneNode(true);
1105
+ cleanClone.removeAttribute("style");
1106
+ this.moveDraggableToDroppable(cleanClone, droppable);
1107
+ this.draggablesModified([cleanClone], []);
1108
+ const matchMax = this.getMatchMaxValue(draggable);
1109
+ const currentDraggables = this.draggables.filter(
1110
+ (d) => d.getAttribute("identifier") === draggable.getAttribute("identifier")
1111
+ );
1112
+ if (matchMax !== 0 && currentDraggables.length >= matchMax) {
1113
+ draggable.style.opacity = "0.0";
1114
+ draggable.style.pointerEvents = "none";
1115
+ } else {
1116
+ draggable.style.opacity = "1.0";
1117
+ }
1118
+ }
1108
1119
  resetDragState() {
1109
1120
  if (this.dragClone) {
1110
1121
  const isDropped = this.currentDropTarget !== null;
1111
1122
  const droppedInDragContainer = !isDropped || this.dragContainers.includes(this.currentDropTarget);
1112
- if (!droppedInDragContainer) {
1113
- const computedStyles = window.getComputedStyle(this.dragSource);
1114
- for (let i = 0; i < computedStyles.length; i++) {
1115
- const key = computedStyles[i];
1116
- this.dragClone.style.setProperty(key, computedStyles.getPropertyValue(key));
1117
- }
1118
- this.dragClone.style.opacity = "1.0";
1119
- this.dragClone.style.display = "block";
1120
- this.dragClone.style.pointerEvents = "auto";
1121
- } else {
1123
+ if (isDropped && this.currentDropTarget && !droppedInDragContainer) {
1124
+ this.dropDraggableInDroppable(this.dragSource, this.currentDropTarget);
1125
+ }
1126
+ if (droppedInDragContainer) {
1122
1127
  this.dragSource.style.opacity = "1.0";
1123
1128
  this.dragSource.style.display = "block";
1129
+ this.dragSource.style.position = "static";
1124
1130
  this.dragSource.style.pointerEvents = "auto";
1125
- this.dragClone.remove();
1126
1131
  }
1132
+ this.dragClone.remove();
1133
+ this.draggablesModified([], [this.dragClone]);
1127
1134
  }
1128
1135
  this.isDragging = false;
1129
1136
  this.isDraggable = false;
@@ -1132,6 +1139,7 @@ var DragDropInteractionMixin = (superClass, draggablesSelector, droppablesSelect
1132
1139
  this.touchStartPoint = null;
1133
1140
  this.currentDropTarget = null;
1134
1141
  this.lastTarget = null;
1142
+ this.deactivateDroppables();
1135
1143
  }
1136
1144
  checkAllMaxAssociations() {
1137
1145
  this.droppables.forEach((d) => {
@@ -1171,35 +1179,16 @@ var DragDropInteractionMixin = (superClass, draggablesSelector, droppablesSelect
1171
1179
  }
1172
1180
  placeResponse(response) {
1173
1181
  const [dropId, ...dragIds] = response.split(" ").reverse();
1174
- const droppable = this.findDroppableById(dropId);
1175
- dragIds.forEach((dragId) => this.placeDraggableInDroppable(dragId, droppable));
1176
- }
1177
- findDroppableById(identifier) {
1178
- return this.droppables.find((drop) => drop.getAttribute("identifier") === identifier);
1179
- }
1180
- async placeDraggableInDroppable(dragId, droppable) {
1181
- const draggable = this.querySelector(`[identifier=${dragId}]`);
1182
- if (!droppable || !draggable) {
1183
- console.error(`Cannot find draggable or droppable with the given identifier: ${dragId}`);
1184
- return;
1185
- }
1186
- const moveElement = () => {
1187
- draggable.style.transform = "translate(0, 0)";
1188
- droppable.appendChild(draggable);
1189
- this.checkAllMaxAssociations();
1190
- };
1191
- if (!document.startViewTransition) {
1192
- moveElement();
1193
- } else {
1194
- const transition = document.startViewTransition(moveElement);
1195
- await transition.finished;
1196
- }
1182
+ dragIds.forEach((dragId) => {
1183
+ const draggable = this.querySelector(`[identifier=${dragId}]`);
1184
+ const droppable = this.querySelector(`[identifier=${dropId}]`);
1185
+ this.dropDraggableInDroppable(draggable, droppable);
1186
+ });
1197
1187
  }
1198
1188
  getValidAssociations() {
1199
1189
  return this.droppables.filter((d) => d.childElementCount > 0).length;
1200
1190
  }
1201
1191
  saveResponse() {
1202
- this.validate();
1203
1192
  const response = this.collectResponseData();
1204
1193
  this.dispatchEvent(
1205
1194
  new CustomEvent("qti-interaction-response", {
@@ -1228,10 +1217,23 @@ var DragDropInteractionMixin = (superClass, draggablesSelector, droppablesSelect
1228
1217
  if (!this.isDragging || !this.dragClone) return;
1229
1218
  const newLeft = touch.clientX - this.cloneOffset.x;
1230
1219
  const newTop = touch.clientY - this.cloneOffset.y;
1231
- const { newLeft: boundedLeft, newTop: boundedTop } = this.applyBoundaries(newLeft, newTop, this.dragClone);
1220
+ const { newLeft: boundedLeft, newTop: boundedTop } = this.applyInteractionBoundaries(
1221
+ newLeft,
1222
+ newTop,
1223
+ this.dragClone
1224
+ );
1232
1225
  this.dragClone.style.left = `${boundedLeft}px`;
1233
1226
  this.dragClone.style.top = `${boundedTop}px`;
1234
1227
  }
1228
+ applyInteractionBoundaries(newLeft, newTop, element) {
1229
+ const interactionRect = this.getBoundingClientRect();
1230
+ const elementRect = element.getBoundingClientRect();
1231
+ const elementWidth = elementRect.width;
1232
+ const elementHeight = elementRect.height;
1233
+ const boundedLeft = Math.max(interactionRect.left, Math.min(newLeft, interactionRect.right - elementWidth));
1234
+ const boundedTop = Math.max(interactionRect.top, Math.min(newTop, interactionRect.bottom - elementHeight));
1235
+ return { newLeft: boundedLeft, newTop: boundedTop };
1236
+ }
1235
1237
  getEventCoordinates(event, page = false) {
1236
1238
  const touch = event.touches ? event.touches[0] : event;
1237
1239
  return {
@@ -1244,20 +1246,6 @@ var DragDropInteractionMixin = (superClass, draggablesSelector, droppablesSelect
1244
1246
  const yDist = Math.abs(touch.clientY - this.touchStartPoint.y);
1245
1247
  return xDist + yDist;
1246
1248
  }
1247
- applyBoundaries(newLeft, newTop, element) {
1248
- let boundaryRect = new DOMRect(0, 0, window.innerWidth, window.innerHeight);
1249
- if (this.rootNode instanceof ShadowRoot) {
1250
- boundaryRect = this.rootNode.host.getBoundingClientRect();
1251
- } else if (this.rootNode instanceof Document) {
1252
- boundaryRect = document.documentElement.getBoundingClientRect();
1253
- }
1254
- const elementRect = element.getBoundingClientRect();
1255
- const elementWidth = elementRect.width;
1256
- const elementHeight = elementRect.height;
1257
- const boundedLeft = Math.max(boundaryRect.left, Math.min(newLeft, boundaryRect.right - elementWidth));
1258
- const boundedTop = Math.max(boundaryRect.top, Math.min(newTop, boundaryRect.bottom - elementHeight));
1259
- return { newLeft: boundedLeft, newTop: boundedTop };
1260
- }
1261
1249
  findClosestDropzone() {
1262
1250
  const allActiveDropzones = this.allDropzones.filter((d) => !d.hasAttribute("disabled"));
1263
1251
  if (!this.dragClone || allActiveDropzones.length === 0) return null;
@@ -1299,82 +1287,61 @@ var DragDropInteractionMixin = (superClass, draggablesSelector, droppablesSelect
1299
1287
  element.dispatchEvent(event);
1300
1288
  }
1301
1289
  appendClone() {
1302
- const interaction = this.findParentInteractionElement(this.dragSource);
1303
- if (appendClone == "default") {
1304
- if (interaction) {
1305
- interaction.appendChild(this.dragClone);
1306
- } else if (this.rootNode instanceof ShadowRoot) {
1307
- this.rootNode.host.appendChild(this.dragClone);
1308
- } else if (this.rootNode instanceof Document) {
1309
- document.body.appendChild(this.dragClone);
1310
- }
1311
- } else if (appendClone == "interaction") {
1312
- if (interaction) {
1313
- interaction.appendChild(this.dragClone);
1314
- } else {
1315
- console.error("No interaction found to append the drag clone");
1316
- }
1317
- } else if (appendClone == "host") {
1318
- if (this.rootNode instanceof ShadowRoot) {
1319
- this.rootNode.host.appendChild(this.dragClone);
1320
- } else {
1321
- console.error("No host found to append the drag clone");
1322
- }
1323
- } else if (appendClone == "body") {
1324
- document.body.appendChild(this.dragClone);
1325
- }
1290
+ document.body.appendChild(this.dragClone);
1326
1291
  }
1327
1292
  handleTouchStart(e) {
1293
+ if (this.isDragging) {
1294
+ return;
1295
+ }
1328
1296
  const { x, y } = this.getEventCoordinates(e);
1329
- this.dropzoneOriginalParent = e.currentTarget.parentElement;
1330
1297
  this.touchStartPoint = { x, y };
1331
1298
  this.dragSource = e.currentTarget;
1332
1299
  this.isDraggable = true;
1333
- this.rootNode = this.dragSource.getRootNode();
1334
1300
  this._internals.states.add("--dragzone-enabled");
1335
1301
  this._internals.states.add("--dragzone-active");
1336
- this.dragSource.setAttribute("dragging", "");
1337
1302
  this.activateDragLocation();
1338
1303
  this.activateDroppables(this.dragSource);
1339
1304
  const draggableInDragContainer = this.findDraggableInDraggableContainer(
1340
1305
  this.dragSource.getAttribute("identifier")
1341
1306
  );
1342
- const parent = this.dragSource.parentElement;
1343
- if (!this.droppables.includes(parent)) {
1344
- const rect = draggableInDragContainer.getBoundingClientRect();
1345
- this.cloneOffset.x = x - rect.left;
1346
- this.cloneOffset.y = y - rect.top;
1347
- this.dragClone = draggableInDragContainer.cloneNode(true);
1348
- const computedStyles = window.getComputedStyle(this.dragSource);
1349
- for (let i = 0; i < computedStyles.length; i++) {
1350
- const key = computedStyles[i];
1351
- this.dragClone.style.setProperty(key, computedStyles.getPropertyValue(key));
1352
- }
1353
- if (rect) {
1354
- this.setDragCloneStyles(rect);
1355
- }
1356
- this.appendClone();
1357
- const matchMax = this.getMatchMaxValue(this.dragSource);
1358
- const currentDraggables = this.draggables.filter(
1359
- (d) => d.getAttribute("identifier") === this.dragSource.getAttribute("identifier")
1360
- );
1361
- if (matchMax !== 0 && currentDraggables.length >= matchMax) {
1362
- draggableInDragContainer.style.opacity = "0.0";
1363
- draggableInDragContainer.style.pointerEvents = "none";
1364
- } else {
1365
- draggableInDragContainer.style.opacity = "1.0";
1366
- }
1367
- e.preventDefault();
1307
+ const draggedFromDropzone = this.droppables.some(
1308
+ (d) => Array.from(d.children).some((child) => child === this.dragSource)
1309
+ );
1310
+ const rect = this.dragSource.getBoundingClientRect();
1311
+ if (draggedFromDropzone) {
1312
+ this.dragSource.remove();
1313
+ this.draggablesModified([], [this.dragSource]);
1314
+ this.dragSource = draggableInDragContainer;
1315
+ }
1316
+ this.cloneOffset.x = x - rect.left;
1317
+ this.cloneOffset.y = y - rect.top;
1318
+ this.dragClone = draggableInDragContainer.cloneNode(true);
1319
+ const computedStyles = window.getComputedStyle(draggableInDragContainer);
1320
+ for (let i = 0; i < computedStyles.length; i++) {
1321
+ const key = computedStyles[i];
1322
+ this.dragClone.style.setProperty(key, computedStyles.getPropertyValue(key));
1323
+ }
1324
+ const rectOrg = draggableInDragContainer.getBoundingClientRect();
1325
+ this.dragClone.style.width = `${rectOrg.width}px`;
1326
+ this.dragClone.style.height = `${rectOrg.height}px`;
1327
+ if (rect) {
1328
+ this.setDragCloneStyles(rect);
1329
+ }
1330
+ this.dragClone.style.display = "block";
1331
+ this.dragClone.style.opacity = "1";
1332
+ this.appendClone();
1333
+ const matchMax = this.getMatchMaxValue(this.dragSource);
1334
+ const currentDraggables = this.draggables.filter(
1335
+ (d) => d.getAttribute("identifier") === this.dragSource.getAttribute("identifier")
1336
+ );
1337
+ if (matchMax !== 0 && currentDraggables.length >= matchMax) {
1338
+ draggableInDragContainer.style.opacity = "0.0";
1339
+ draggableInDragContainer.style.pointerEvents = "none";
1368
1340
  } else {
1369
- this.enableDroppable(parent);
1370
- this.dragClone = this.dragSource;
1371
- this.dragSource = this.findDraggableInDraggableContainer(this.dragSource.getAttribute("identifier"));
1372
- const rect = this.dragClone.getBoundingClientRect();
1373
- this.appendClone();
1374
- if (rect) {
1375
- this.setDragCloneStyles(rect);
1376
- }
1341
+ draggableInDragContainer.style.opacity = "1.0";
1377
1342
  }
1343
+ e.preventDefault();
1344
+ this.dragClone.setAttribute("dragging", "");
1378
1345
  }
1379
1346
  findParentInteractionElement(element) {
1380
1347
  let parent = element.parentElement;
@@ -1406,8 +1373,6 @@ var DragDropInteractionMixin = (superClass, draggablesSelector, droppablesSelect
1406
1373
  this.dragClone.style.position = "fixed";
1407
1374
  this.dragClone.style.top = `${rect.top}px`;
1408
1375
  this.dragClone.style.left = `${rect.left}px`;
1409
- this.dragClone.style.width = `${rect.width}px`;
1410
- this.dragClone.style.height = `${rect.height}px`;
1411
1376
  this.dragClone.style.setProperty("box-sizing", "border-box", "important");
1412
1377
  this.dragClone.style.zIndex = "9999";
1413
1378
  this.dragClone.style.pointerEvents = "none";
@@ -3346,8 +3311,7 @@ var QtiMatchInteraction = class extends DragDropInteractionMixin(
3346
3311
  Interaction,
3347
3312
  "qti-simple-match-set:first-of-type qti-simple-associable-choice, qti-simple-match-set:last-of-type > qti-simple-associable-choice > qti-simple-associable-choice",
3348
3313
  "qti-simple-match-set:last-of-type > qti-simple-associable-choice",
3349
- "qti-simple-match-set:first-of-type",
3350
- "body"
3314
+ "qti-simple-match-set:first-of-type"
3351
3315
  ) {
3352
3316
  constructor() {
3353
3317
  super(...arguments);
@@ -3423,6 +3387,9 @@ var QtiMatchInteraction = class extends DragDropInteractionMixin(
3423
3387
  return;
3424
3388
  } else if (Array.isArray(responseValue)) {
3425
3389
  this.correctOptions = responseValue;
3390
+ if (!this.class.split(" ").includes("qti-match-tabular")) {
3391
+ this.value = responseValue;
3392
+ }
3426
3393
  }
3427
3394
  }
3428
3395
  render() {
@@ -5962,12 +5929,12 @@ var QtiResponseDeclaration = class extends QtiVariableDeclaration {
5962
5929
  if (correctResponse) {
5963
5930
  const values = correctResponse.querySelectorAll("qti-value");
5964
5931
  if (this.cardinality === "single" && values.length > 0) {
5965
- result = values[0].textContent;
5932
+ result = values[0].textContent.trim();
5966
5933
  values[0].remove();
5967
5934
  } else if (this.cardinality !== "single") {
5968
5935
  result = [];
5969
5936
  for (let i = 0; i < values.length; i++) {
5970
- result.push(values[i].textContent);
5937
+ result.push(values[i].textContent.trim());
5971
5938
  values[i].remove();
5972
5939
  }
5973
5940
  }
@@ -6088,4 +6055,4 @@ export {
6088
6055
  QtiOutcomeDeclaration,
6089
6056
  QtiResponseDeclaration
6090
6057
  };
6091
- //# sourceMappingURL=chunk-ZHAJ3CMP.js.map
6058
+ //# sourceMappingURL=chunk-6PAEJQSQ.js.map