@citolab/qti-components 7.3.9 → 7.3.10
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.
- package/cdn/chunks/chunk-2AQB5QOU.js +1465 -0
- package/cdn/chunks/chunk-2D2T677T.js +5 -0
- package/cdn/chunks/chunk-2DBFRSMX.js +1 -0
- package/cdn/chunks/chunk-2KM4IIVZ.js +1 -0
- package/cdn/chunks/chunk-2MP4QXCW.js +5 -0
- package/cdn/chunks/chunk-2WMJ3FRH.js +5 -0
- package/cdn/chunks/chunk-3EL6MWIP.js +5 -0
- package/cdn/chunks/chunk-3FL7LAD7.js +3609 -0
- package/cdn/chunks/chunk-3OFR7NBQ.js +5 -0
- package/cdn/chunks/chunk-44FEGMMP.js +5 -0
- package/cdn/chunks/chunk-4AGPIRXC.js +3623 -0
- package/cdn/chunks/chunk-4BD24CBG.js +5 -0
- package/cdn/chunks/chunk-4JCAGCJ7.js +5 -0
- package/cdn/chunks/chunk-4KA72ZXP.js +5 -0
- package/cdn/chunks/chunk-4RGI2NPT.js +5 -0
- package/cdn/chunks/chunk-4V4EH3XE.js +5 -0
- package/cdn/chunks/chunk-5A6EZOWQ.js +1465 -0
- package/cdn/chunks/chunk-5MA2ACUN.js +5 -0
- package/cdn/chunks/chunk-5NPTQSKH.js +5 -0
- package/cdn/chunks/chunk-5OT7GAD6.js +1465 -0
- package/cdn/chunks/chunk-5X3DXTZR.js +5 -0
- package/cdn/chunks/chunk-5ZJGXWHS.js +5 -0
- package/cdn/chunks/chunk-65IPR5FK.js +5 -0
- package/cdn/chunks/chunk-67XELO2Z.js +5 -0
- package/cdn/chunks/chunk-6CVU566T.js +3604 -0
- package/cdn/chunks/chunk-6DAXA4WF.js +1465 -0
- package/cdn/chunks/chunk-6I6VSJRU.js +5 -0
- package/cdn/chunks/chunk-6NH7EB4Y.js +5 -0
- package/cdn/chunks/chunk-6OGNTNZS.js +5 -0
- package/cdn/chunks/chunk-6U7KZ7RT.js +5 -0
- package/cdn/chunks/chunk-75AAESDA.js +5 -0
- package/cdn/chunks/chunk-7HRE6EJN.js +1465 -0
- package/cdn/chunks/chunk-A2IAVB65.js +5 -0
- package/cdn/chunks/chunk-AK7BBQIN.js +1465 -0
- package/cdn/chunks/chunk-AL7MMWN4.js +5 -0
- package/cdn/chunks/chunk-AU5IFIAE.js +5 -0
- package/cdn/chunks/chunk-B34CVRZY.js +3611 -0
- package/cdn/chunks/chunk-B5KBEV6C.js +5 -0
- package/cdn/chunks/chunk-BDVDUFDX.js +3604 -0
- package/cdn/chunks/chunk-BEKC2KXP.js +1465 -0
- package/cdn/chunks/chunk-BIPSM53R.js +3604 -0
- package/cdn/chunks/chunk-BUSPJKBW.js +5 -0
- package/cdn/chunks/chunk-BVGQYBYI.js +5 -0
- package/cdn/chunks/chunk-C2TYLPUF.js +5 -0
- package/cdn/chunks/chunk-C4S3TBY7.js +5 -0
- package/cdn/chunks/chunk-CA2BB5TT.js +1465 -0
- package/cdn/chunks/chunk-CAPYSR2Y.js +3605 -0
- package/cdn/chunks/chunk-CB2PW7DM.js +3604 -0
- package/cdn/chunks/chunk-CBEIZQ7O.js +5 -0
- package/cdn/chunks/chunk-DIM5R2XZ.js +3609 -0
- package/cdn/chunks/chunk-DM55ZVIS.js +3608 -0
- package/cdn/chunks/chunk-DNGQ3HHD.js +8 -0
- package/cdn/chunks/chunk-DTSNON3E.js +5 -0
- package/cdn/chunks/chunk-DUCVF666.js +5 -0
- package/cdn/chunks/chunk-DWKO2XVJ.js +3626 -0
- package/cdn/chunks/chunk-E5QYUREF.js +1465 -0
- package/cdn/chunks/chunk-EGMZWVEN.js +5 -0
- package/cdn/chunks/chunk-ETDUKPJ5.js +1465 -0
- package/cdn/chunks/chunk-FBCUILM4.js +5 -0
- package/cdn/chunks/chunk-FHKI336W.js +5 -0
- package/cdn/chunks/chunk-G6JBUK7M.js +8 -0
- package/cdn/chunks/chunk-GI643I6D.js +5 -0
- package/cdn/chunks/chunk-H5N66JWX.js +1 -0
- package/cdn/chunks/chunk-H6DTW4CH.js +1465 -0
- package/cdn/chunks/chunk-HVRUXHOA.js +5 -0
- package/cdn/chunks/chunk-HY6LZ42L.js +5 -0
- package/cdn/chunks/chunk-I4QFJPZG.js +1465 -0
- package/cdn/chunks/chunk-IAGXHLJ5.js +5 -0
- package/cdn/chunks/chunk-ICRWHWJ3.js +5 -0
- package/cdn/chunks/chunk-IWOEDFXH.js +1465 -0
- package/cdn/chunks/chunk-J5BD6EO5.js +5 -0
- package/cdn/chunks/chunk-J6V7VRWX.js +3605 -0
- package/cdn/chunks/chunk-JESKBIHK.js +1465 -0
- package/cdn/chunks/chunk-JGH5ZZNA.js +1465 -0
- package/cdn/chunks/chunk-JIUUHGM7.js +1465 -0
- package/cdn/chunks/chunk-JX2BBAUD.js +3609 -0
- package/cdn/chunks/chunk-JZNXP6Z6.js +1465 -0
- package/cdn/chunks/chunk-K6RDKEPY.js +5 -0
- package/cdn/chunks/chunk-KVODKRRX.js +5 -0
- package/cdn/chunks/chunk-LDAQNEWI.js +5 -0
- package/cdn/chunks/chunk-M2CUHPCU.js +5 -0
- package/cdn/chunks/chunk-M2L4SJPE.js +5 -0
- package/cdn/chunks/chunk-M6UCMG2T.js +1465 -0
- package/cdn/chunks/chunk-MUO2LFIC.js +3604 -0
- package/cdn/chunks/chunk-MX6YXRD5.js +5 -0
- package/cdn/chunks/chunk-MX7JGUEV.js +5 -0
- package/cdn/chunks/chunk-MZEVJMUS.js +5 -0
- package/cdn/chunks/chunk-NHUCLA7C.js +5 -0
- package/cdn/chunks/chunk-NJMK5GFV.js +3604 -0
- package/cdn/chunks/chunk-NPUY7KWX.js +5 -0
- package/cdn/chunks/chunk-NQ3BSLED.js +1465 -0
- package/cdn/chunks/chunk-NSDTAG5H.js +1465 -0
- package/cdn/chunks/chunk-NW5BDXND.js +5 -0
- package/cdn/chunks/chunk-OUASGGRF.js +5 -0
- package/cdn/chunks/chunk-P32DF2PX.js +5 -0
- package/cdn/chunks/chunk-P67MLABM.js +5 -0
- package/cdn/chunks/chunk-PDGJCLPL.js +5 -0
- package/cdn/chunks/chunk-PEIVTIUB.js +5 -0
- package/cdn/chunks/chunk-PIVDVXEN.js +1465 -0
- package/cdn/chunks/chunk-QLAUWZGN.js +1465 -0
- package/cdn/chunks/chunk-QXXWBEQF.js +3609 -0
- package/cdn/chunks/chunk-QZPQCRI5.js +1465 -0
- package/cdn/chunks/chunk-S4473XKU.js +5 -0
- package/cdn/chunks/chunk-SAF2F2BZ.js +1 -0
- package/cdn/chunks/chunk-SG6DVQL7.js +5 -0
- package/cdn/chunks/chunk-SHTWKDDX.js +1465 -0
- package/cdn/chunks/chunk-SLPPK4MX.js +1465 -0
- package/cdn/chunks/chunk-SNOJ7YK5.js +5 -0
- package/cdn/chunks/chunk-SRIMN6LS.js +5 -0
- package/cdn/chunks/chunk-STP2XHRQ.js +5 -0
- package/cdn/chunks/chunk-SX5UYWRC.js +5 -0
- package/cdn/chunks/chunk-SXBW34TA.js +5 -0
- package/cdn/chunks/chunk-SZIHBKW7.js +5 -0
- package/cdn/chunks/chunk-TBOYZAKT.js +10 -0
- package/cdn/chunks/chunk-TJQOQP3Y.js +5 -0
- package/cdn/chunks/chunk-TNTVGKFL.js +5 -0
- package/cdn/chunks/chunk-TUP6KJ75.js +5 -0
- package/cdn/chunks/chunk-TZ3JSM57.js +1465 -0
- package/cdn/chunks/chunk-TZR6VRWS.js +5 -0
- package/cdn/chunks/chunk-U2ZZRG5F.js +5 -0
- package/cdn/chunks/chunk-U44QDOCL.js +3623 -0
- package/cdn/chunks/chunk-U7TJTJQN.js +5 -0
- package/cdn/chunks/chunk-UFYKSOJU.js +5 -0
- package/cdn/chunks/chunk-UQBB2LW3.js +5 -0
- package/cdn/chunks/chunk-UYN4HJOQ.js +5 -0
- package/cdn/chunks/chunk-V4TTNYV7.js +5 -0
- package/cdn/chunks/chunk-VDZLUVD6.js +3626 -0
- package/cdn/chunks/chunk-VPCDMES4.js +1465 -0
- package/cdn/chunks/chunk-VU7RTCTH.js +5 -0
- package/cdn/chunks/chunk-X4D22CNL.js +1465 -0
- package/cdn/chunks/chunk-XWDDTFCA.js +1 -0
- package/cdn/chunks/chunk-YTHXVBE7.js +5 -0
- package/cdn/chunks/chunk-YXJMYFQN.js +3609 -0
- package/cdn/chunks/chunk-ZJOPT4QJ.js +1465 -0
- package/cdn/chunks/chunk-ZQX3RHXX.js +1465 -0
- package/cdn/chunks/chunk-ZXFMPBFU.js +5 -0
- package/cdn/index.global.js +1 -1
- package/cdn/index.js +1 -1
- package/cdn/qti-components/index.js +1 -1
- package/cdn/qti-item/components/item-container.js +1 -1
- package/cdn/qti-item/core/index.js +1 -1
- package/cdn/qti-test/components/index.js +1 -1
- package/cdn/qti-test/components/test-container.js +1 -1
- package/cdn/qti-test/core/index.js +1 -1
- package/dist/chunks/chunk-22ADH5XX.js +94 -0
- package/dist/chunks/chunk-22ADH5XX.js.map +1 -0
- package/dist/chunks/chunk-24YH3T77.js +3594 -0
- package/dist/chunks/chunk-24YH3T77.js.map +1 -0
- package/dist/chunks/chunk-2KLMYWXY.js +94 -0
- package/dist/chunks/chunk-2KLMYWXY.js.map +1 -0
- package/dist/chunks/chunk-2M36WE6U.js +887 -0
- package/dist/chunks/chunk-2M36WE6U.js.map +1 -0
- package/dist/chunks/chunk-33UVTXDH.js +7970 -0
- package/dist/chunks/chunk-33UVTXDH.js.map +1 -0
- package/dist/chunks/chunk-3E2HPYC2.js +7970 -0
- package/dist/chunks/chunk-3E2HPYC2.js.map +1 -0
- package/dist/chunks/chunk-3IDGBR6L.js +94 -0
- package/dist/chunks/chunk-3IDGBR6L.js.map +1 -0
- package/dist/chunks/chunk-3KHLBN4E.js +7969 -0
- package/dist/chunks/chunk-3KHLBN4E.js.map +1 -0
- package/dist/chunks/chunk-3OFGPZKB.js +887 -0
- package/dist/chunks/chunk-3OFGPZKB.js.map +1 -0
- package/dist/chunks/chunk-3Q3GJFP2.js +94 -0
- package/dist/chunks/chunk-3Q3GJFP2.js.map +1 -0
- package/dist/chunks/chunk-4HSJSPKC.js +3594 -0
- package/dist/chunks/chunk-4HSJSPKC.js.map +1 -0
- package/dist/chunks/chunk-4IY7EZRG.js +94 -0
- package/dist/chunks/chunk-4IY7EZRG.js.map +1 -0
- package/dist/chunks/chunk-52LKP43M.js +7970 -0
- package/dist/chunks/chunk-52LKP43M.js.map +1 -0
- package/dist/chunks/chunk-5SMBVUWD.js +94 -0
- package/dist/chunks/chunk-5SMBVUWD.js.map +1 -0
- package/dist/chunks/chunk-5UK3GDC4.js +270 -0
- package/dist/chunks/chunk-5UK3GDC4.js.map +1 -0
- package/dist/chunks/chunk-6RGVMISK.js +91 -0
- package/dist/chunks/chunk-6RGVMISK.js.map +1 -0
- package/dist/chunks/chunk-76V23CCX.js +887 -0
- package/dist/chunks/chunk-76V23CCX.js.map +1 -0
- package/dist/chunks/chunk-7OYG6HQK.js +887 -0
- package/dist/chunks/chunk-7OYG6HQK.js.map +1 -0
- package/dist/chunks/chunk-7PXD4SKY.js +94 -0
- package/dist/chunks/chunk-7PXD4SKY.js.map +1 -0
- package/dist/chunks/chunk-7S77KG7E.js +3598 -0
- package/dist/chunks/chunk-7S77KG7E.js.map +1 -0
- package/dist/chunks/chunk-7UNBWVTX.js +94 -0
- package/dist/chunks/chunk-7UNBWVTX.js.map +1 -0
- package/dist/chunks/chunk-A7GWMVMW.js +94 -0
- package/dist/chunks/chunk-A7GWMVMW.js.map +1 -0
- package/dist/chunks/chunk-AATFMNQ7.js +887 -0
- package/dist/chunks/chunk-AATFMNQ7.js.map +1 -0
- package/dist/chunks/chunk-AE5G2IBM.js +7969 -0
- package/dist/chunks/chunk-AE5G2IBM.js.map +1 -0
- package/dist/chunks/chunk-B4T3VSOK.js +7969 -0
- package/dist/chunks/chunk-B4T3VSOK.js.map +1 -0
- package/dist/chunks/chunk-BD3UXA45.js +94 -0
- package/dist/chunks/chunk-BD3UXA45.js.map +1 -0
- package/dist/chunks/chunk-BJ34MOX3.js +3594 -0
- package/dist/chunks/chunk-BJ34MOX3.js.map +1 -0
- package/dist/chunks/chunk-BSMH5QAT.js +7970 -0
- package/dist/chunks/chunk-BSMH5QAT.js.map +1 -0
- package/dist/chunks/chunk-BXUZQSIJ.js +7972 -0
- package/dist/chunks/chunk-BXUZQSIJ.js.map +1 -0
- package/dist/chunks/chunk-CIJVRB7X.js +887 -0
- package/dist/chunks/chunk-CIJVRB7X.js.map +1 -0
- package/dist/chunks/chunk-COMEKBI4.js +887 -0
- package/dist/chunks/chunk-COMEKBI4.js.map +1 -0
- package/dist/chunks/chunk-CZTJMCR5.js +887 -0
- package/dist/chunks/chunk-CZTJMCR5.js.map +1 -0
- package/dist/chunks/chunk-D3QPTBGD.js +94 -0
- package/dist/chunks/chunk-D3QPTBGD.js.map +1 -0
- package/dist/chunks/chunk-D4LXKUTU.js +3595 -0
- package/dist/chunks/chunk-D4LXKUTU.js.map +1 -0
- package/dist/chunks/chunk-D5F2SQNW.js +7969 -0
- package/dist/chunks/chunk-D5F2SQNW.js.map +1 -0
- package/dist/chunks/chunk-DB7E3FQS.js +94 -0
- package/dist/chunks/chunk-DB7E3FQS.js.map +1 -0
- package/dist/chunks/chunk-DHPEGVWN.js +84 -0
- package/dist/chunks/chunk-DHPEGVWN.js.map +1 -0
- package/dist/chunks/chunk-DO2QLC5X.js +7970 -0
- package/dist/chunks/chunk-DO2QLC5X.js.map +1 -0
- package/dist/chunks/chunk-DS4BD2ZQ.js +887 -0
- package/dist/chunks/chunk-DS4BD2ZQ.js.map +1 -0
- package/dist/chunks/chunk-DSLV5YA6.js +3594 -0
- package/dist/chunks/chunk-DSLV5YA6.js.map +1 -0
- package/dist/chunks/chunk-DU577TCY.js +3599 -0
- package/dist/chunks/chunk-DU577TCY.js.map +1 -0
- package/dist/chunks/chunk-DX7I752N.js +3601 -0
- package/dist/chunks/chunk-DX7I752N.js.map +1 -0
- package/dist/chunks/chunk-EAYSUJ5L.js +887 -0
- package/dist/chunks/chunk-EAYSUJ5L.js.map +1 -0
- package/dist/chunks/chunk-EFXOXSPI.js +7969 -0
- package/dist/chunks/chunk-EFXOXSPI.js.map +1 -0
- package/dist/chunks/chunk-ER2AETF4.js +94 -0
- package/dist/chunks/chunk-ER2AETF4.js.map +1 -0
- package/dist/chunks/chunk-FMBMEJA6.js +887 -0
- package/dist/chunks/chunk-FMBMEJA6.js.map +1 -0
- package/dist/chunks/chunk-FQ42YLGN.js +94 -0
- package/dist/chunks/chunk-FQ42YLGN.js.map +1 -0
- package/dist/chunks/chunk-G52LAMAB.js +94 -0
- package/dist/chunks/chunk-G52LAMAB.js.map +1 -0
- package/dist/chunks/chunk-G5FFQER7.js +7969 -0
- package/dist/chunks/chunk-G5FFQER7.js.map +1 -0
- package/dist/chunks/chunk-GCOODLFL.js +94 -0
- package/dist/chunks/chunk-GCOODLFL.js.map +1 -0
- package/dist/chunks/chunk-GH26RKOD.js +887 -0
- package/dist/chunks/chunk-GH26RKOD.js.map +1 -0
- package/dist/chunks/chunk-GKY4X7OQ.js +94 -0
- package/dist/chunks/chunk-GKY4X7OQ.js.map +1 -0
- package/dist/chunks/chunk-GZRKK3QW.js +7970 -0
- package/dist/chunks/chunk-GZRKK3QW.js.map +1 -0
- package/dist/chunks/chunk-H4HFOONR.js +94 -0
- package/dist/chunks/chunk-H4HFOONR.js.map +1 -0
- package/dist/chunks/chunk-H7E4LC4K.js +7969 -0
- package/dist/chunks/chunk-H7E4LC4K.js.map +1 -0
- package/dist/chunks/chunk-HFLNMWQY.js +887 -0
- package/dist/chunks/chunk-HFLNMWQY.js.map +1 -0
- package/dist/chunks/chunk-HIPJ4SLP.js +94 -0
- package/dist/chunks/chunk-HIPJ4SLP.js.map +1 -0
- package/dist/chunks/chunk-HWBOMIKQ.js +94 -0
- package/dist/chunks/chunk-HWBOMIKQ.js.map +1 -0
- package/dist/chunks/chunk-I5QWPTNS.js +7970 -0
- package/dist/chunks/chunk-I5QWPTNS.js.map +1 -0
- package/dist/chunks/chunk-IDQVCLFW.js +3594 -0
- package/dist/chunks/chunk-IDQVCLFW.js.map +1 -0
- package/dist/chunks/chunk-IHM5AGLK.js +94 -0
- package/dist/chunks/chunk-IHM5AGLK.js.map +1 -0
- package/dist/chunks/chunk-IHVWYU6H.js +887 -0
- package/dist/chunks/chunk-IHVWYU6H.js.map +1 -0
- package/dist/chunks/chunk-IM3XJ5J3.js +94 -0
- package/dist/chunks/chunk-IM3XJ5J3.js.map +1 -0
- package/dist/chunks/chunk-J6QL36DE.js +887 -0
- package/dist/chunks/chunk-J6QL36DE.js.map +1 -0
- package/dist/chunks/chunk-JCSGX6KS.js +887 -0
- package/dist/chunks/chunk-JCSGX6KS.js.map +1 -0
- package/dist/chunks/chunk-JKVAOL23.js +94 -0
- package/dist/chunks/chunk-JKVAOL23.js.map +1 -0
- package/dist/chunks/chunk-KGLPF52L.js +887 -0
- package/dist/chunks/chunk-KGLPF52L.js.map +1 -0
- package/dist/chunks/chunk-KGUUVU4R.js +94 -0
- package/dist/chunks/chunk-KGUUVU4R.js.map +1 -0
- package/dist/chunks/chunk-KUR3WYNE.js +94 -0
- package/dist/chunks/chunk-KUR3WYNE.js.map +1 -0
- package/dist/chunks/chunk-LP5XIBBR.js +3616 -0
- package/dist/chunks/chunk-LP5XIBBR.js.map +1 -0
- package/dist/chunks/chunk-MHN7KBCQ.js +94 -0
- package/dist/chunks/chunk-MHN7KBCQ.js.map +1 -0
- package/dist/chunks/chunk-MVUREGEC.js +3594 -0
- package/dist/chunks/chunk-MVUREGEC.js.map +1 -0
- package/dist/chunks/chunk-ND4URIPN.js +3595 -0
- package/dist/chunks/chunk-ND4URIPN.js.map +1 -0
- package/dist/chunks/chunk-NHJSQ6EC.js +887 -0
- package/dist/chunks/chunk-NHJSQ6EC.js.map +1 -0
- package/dist/chunks/chunk-NS4XSJTY.js +94 -0
- package/dist/chunks/chunk-NS4XSJTY.js.map +1 -0
- package/dist/chunks/chunk-NYM2PFSX.js +887 -0
- package/dist/chunks/chunk-NYM2PFSX.js.map +1 -0
- package/dist/chunks/chunk-O4YARITG.js +94 -0
- package/dist/chunks/chunk-O4YARITG.js.map +1 -0
- package/dist/chunks/chunk-OEU7UL5H.js +7970 -0
- package/dist/chunks/chunk-OEU7UL5H.js.map +1 -0
- package/dist/chunks/chunk-PZUCEOGK.js +887 -0
- package/dist/chunks/chunk-PZUCEOGK.js.map +1 -0
- package/dist/chunks/chunk-QANFQNGJ.js +94 -0
- package/dist/chunks/chunk-QANFQNGJ.js.map +1 -0
- package/dist/chunks/chunk-QJCCWOJA.js +7969 -0
- package/dist/chunks/chunk-QJCCWOJA.js.map +1 -0
- package/dist/chunks/chunk-QRVZKLRL.js +94 -0
- package/dist/chunks/chunk-QRVZKLRL.js.map +1 -0
- package/dist/chunks/chunk-QZQGK6RL.js +3616 -0
- package/dist/chunks/chunk-QZQGK6RL.js.map +1 -0
- package/dist/chunks/chunk-R4NPDD3O.js +7970 -0
- package/dist/chunks/chunk-R4NPDD3O.js.map +1 -0
- package/dist/chunks/chunk-R5EF3ZV3.js +887 -0
- package/dist/chunks/chunk-R5EF3ZV3.js.map +1 -0
- package/dist/chunks/chunk-RBZA3P3W.js +94 -0
- package/dist/chunks/chunk-RBZA3P3W.js.map +1 -0
- package/dist/chunks/chunk-RGFVMAPK.js +887 -0
- package/dist/chunks/chunk-RGFVMAPK.js.map +1 -0
- package/dist/chunks/chunk-RQF4P6PJ.js +94 -0
- package/dist/chunks/chunk-RQF4P6PJ.js.map +1 -0
- package/dist/chunks/chunk-SUD3U36A.js +7971 -0
- package/dist/chunks/chunk-SUD3U36A.js.map +1 -0
- package/dist/chunks/chunk-T7AYE2YI.js +887 -0
- package/dist/chunks/chunk-T7AYE2YI.js.map +1 -0
- package/dist/chunks/chunk-TL4SWC5W.js +94 -0
- package/dist/chunks/chunk-TL4SWC5W.js.map +1 -0
- package/dist/chunks/chunk-TNBMHBCA.js +94 -0
- package/dist/chunks/chunk-TNBMHBCA.js.map +1 -0
- package/dist/chunks/chunk-TNSZ52TC.js +269 -0
- package/dist/chunks/chunk-TNSZ52TC.js.map +1 -0
- package/dist/chunks/chunk-UL5627MO.js +94 -0
- package/dist/chunks/chunk-UL5627MO.js.map +1 -0
- package/dist/chunks/chunk-V7JDFAR4.js +887 -0
- package/dist/chunks/chunk-V7JDFAR4.js.map +1 -0
- package/dist/chunks/chunk-VAMHDDOF.js +3599 -0
- package/dist/chunks/chunk-VAMHDDOF.js.map +1 -0
- package/dist/chunks/chunk-VWKPIAXJ.js +887 -0
- package/dist/chunks/chunk-VWKPIAXJ.js.map +1 -0
- package/dist/chunks/chunk-W7DTVLFL.js +3599 -0
- package/dist/chunks/chunk-W7DTVLFL.js.map +1 -0
- package/dist/chunks/chunk-WGRV4XGF.js +94 -0
- package/dist/chunks/chunk-WGRV4XGF.js.map +1 -0
- package/dist/chunks/chunk-WGYRA3PV.js +3599 -0
- package/dist/chunks/chunk-WGYRA3PV.js.map +1 -0
- package/dist/chunks/chunk-WPILGOKJ.js +7970 -0
- package/dist/chunks/chunk-WPILGOKJ.js.map +1 -0
- package/dist/chunks/chunk-WTHWEPDU.js +887 -0
- package/dist/chunks/chunk-WTHWEPDU.js.map +1 -0
- package/dist/chunks/chunk-WUME5EGP.js +3599 -0
- package/dist/chunks/chunk-WUME5EGP.js.map +1 -0
- package/dist/chunks/chunk-XKCAACM6.js +7970 -0
- package/dist/chunks/chunk-XKCAACM6.js.map +1 -0
- package/dist/chunks/chunk-XNIBWYHL.js +887 -0
- package/dist/chunks/chunk-XNIBWYHL.js.map +1 -0
- package/dist/chunks/chunk-Y5W2PVX7.js +3613 -0
- package/dist/chunks/chunk-Y5W2PVX7.js.map +1 -0
- package/dist/chunks/chunk-YHIY6E3N.js +94 -0
- package/dist/chunks/chunk-YHIY6E3N.js.map +1 -0
- package/dist/chunks/chunk-YHTY7DUW.js +3613 -0
- package/dist/chunks/chunk-YHTY7DUW.js.map +1 -0
- package/dist/chunks/chunk-YKBQIZ42.js +7971 -0
- package/dist/chunks/chunk-YKBQIZ42.js.map +1 -0
- package/dist/chunks/chunk-YZNWGPQB.js +7970 -0
- package/dist/chunks/chunk-YZNWGPQB.js.map +1 -0
- package/dist/chunks/chunk-ZEIFNXEY.js +887 -0
- package/dist/chunks/chunk-ZEIFNXEY.js.map +1 -0
- package/dist/chunks/chunk-ZL6XU46A.js +94 -0
- package/dist/chunks/chunk-ZL6XU46A.js.map +1 -0
- package/dist/chunks/chunk-ZXLMZGX3.js +7970 -0
- package/dist/chunks/chunk-ZXLMZGX3.js.map +1 -0
- package/dist/index.js +20 -20
- package/dist/item.css +41 -4
- package/dist/qti-components/index.js +1 -1
- package/dist/qti-item/components/item-container.js +2 -2
- package/dist/qti-item/core/index.js +2 -2
- package/dist/qti-test/components/index.js +10 -10
- package/dist/qti-test/components/test-container.js +2 -2
- package/dist/qti-test/core/index.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import {
|
|
2
|
+
item_default
|
|
3
|
+
} from "./chunk-4HSJSPKC.js";
|
|
4
|
+
import {
|
|
5
|
+
watch
|
|
6
|
+
} from "./chunk-ELDMXTUQ.js";
|
|
7
|
+
import {
|
|
8
|
+
qtiTransformItem
|
|
9
|
+
} from "./chunk-VEWD22O5.js";
|
|
10
|
+
import {
|
|
11
|
+
__decorateClass
|
|
12
|
+
} from "./chunk-H2JE6IVU.js";
|
|
13
|
+
|
|
14
|
+
// src/lib/qti-item/components/item-container.ts
|
|
15
|
+
import { LitElement, html } from "lit";
|
|
16
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
17
|
+
import { until } from "lit/directives/until.js";
|
|
18
|
+
var ItemContainer = class extends LitElement {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
this.itemURL = null;
|
|
22
|
+
this.itemDoc = null;
|
|
23
|
+
this.itemXML = null;
|
|
24
|
+
/** Template content if provided */
|
|
25
|
+
this.templateContent = null;
|
|
26
|
+
}
|
|
27
|
+
async handleItemURLChange() {
|
|
28
|
+
if (!this.itemURL) return;
|
|
29
|
+
try {
|
|
30
|
+
const { promise: api } = await qtiTransformItem().load(this.itemURL);
|
|
31
|
+
this.itemDoc = (await api).htmlDoc();
|
|
32
|
+
} catch (error) {
|
|
33
|
+
console.error("Error loading or parsing XML:", error);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
handleItemXMLChange() {
|
|
37
|
+
if (!this.itemXML) return;
|
|
38
|
+
try {
|
|
39
|
+
this.itemDoc = qtiTransformItem().parse(this.itemXML).htmlDoc();
|
|
40
|
+
} catch (error) {
|
|
41
|
+
console.error("Error parsing XML:", error);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
async connectedCallback() {
|
|
45
|
+
super.connectedCallback();
|
|
46
|
+
this.initializeTemplateContent();
|
|
47
|
+
this.applyStyles();
|
|
48
|
+
if (this.itemURL) {
|
|
49
|
+
this.handleItemURLChange();
|
|
50
|
+
}
|
|
51
|
+
if (this.itemXML) {
|
|
52
|
+
this.handleItemXMLChange();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
initializeTemplateContent() {
|
|
56
|
+
const template = this.querySelector("template");
|
|
57
|
+
this.templateContent = template ? template.content : html``;
|
|
58
|
+
}
|
|
59
|
+
applyStyles() {
|
|
60
|
+
const sheet = new CSSStyleSheet();
|
|
61
|
+
sheet.replaceSync(item_default);
|
|
62
|
+
this.shadowRoot.adoptedStyleSheets = [sheet];
|
|
63
|
+
}
|
|
64
|
+
render() {
|
|
65
|
+
return html`
|
|
66
|
+
${this.templateContent}
|
|
67
|
+
<slot></slot>
|
|
68
|
+
${until(this.itemDoc, html`<span>Loading...</span>`)}
|
|
69
|
+
`;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
__decorateClass([
|
|
73
|
+
property({ type: String, attribute: "item-url" })
|
|
74
|
+
], ItemContainer.prototype, "itemURL", 2);
|
|
75
|
+
__decorateClass([
|
|
76
|
+
state()
|
|
77
|
+
], ItemContainer.prototype, "itemDoc", 2);
|
|
78
|
+
__decorateClass([
|
|
79
|
+
state()
|
|
80
|
+
], ItemContainer.prototype, "itemXML", 2);
|
|
81
|
+
__decorateClass([
|
|
82
|
+
watch("itemURL", { waitUntilFirstUpdate: true })
|
|
83
|
+
], ItemContainer.prototype, "handleItemURLChange", 1);
|
|
84
|
+
__decorateClass([
|
|
85
|
+
watch("itemXML", { waitUntilFirstUpdate: true })
|
|
86
|
+
], ItemContainer.prototype, "handleItemXMLChange", 1);
|
|
87
|
+
ItemContainer = __decorateClass([
|
|
88
|
+
customElement("item-container")
|
|
89
|
+
], ItemContainer);
|
|
90
|
+
|
|
91
|
+
export {
|
|
92
|
+
ItemContainer
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=chunk-5SMBVUWD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-item/components/item-container.ts"],"sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { until } from 'lit/directives/until.js';\n\nimport { watch } from '../../decorators/watch';\nimport itemCss from '../../../item.css?inline';\nimport { qtiTransformItem } from '../../qti-transformers';\n\n/**\n * `<item-container>` is a custom element designed for hosting the qti-assessment-item.\n * The `qti-assessment-item` will be placed inside the shadow DOM of this element.\n * The element loads the item from the provided URL and renders it inside the shadow DOM.\n *\n * ### Styling\n * Add a class to the element for styling.\n *\n * ```html\n * <qti-item>\n * <item-container class=\"m-4 bg-white\" item-url=\"./path/to/item.xml\"></item-container>\n * </qti-item>\n * ```\n */\n@customElement('item-container')\nexport class ItemContainer extends LitElement {\n /** URL of the item to load */\n @property({ type: String, attribute: 'item-url' })\n itemURL: string = null;\n\n /** A parsed HTML document */\n @state()\n itemDoc: DocumentFragment = null;\n\n /** The raw XML string */\n @state()\n itemXML: string = null;\n\n /** Template content if provided */\n private templateContent = null;\n\n @watch('itemURL', { waitUntilFirstUpdate: true })\n protected async handleItemURLChange() {\n if (!this.itemURL) return;\n try {\n const { promise: api } = await qtiTransformItem().load(this.itemURL);\n this.itemDoc = (await api).htmlDoc();\n } catch (error) {\n console.error('Error loading or parsing XML:', error);\n }\n }\n\n @watch('itemXML', { waitUntilFirstUpdate: true })\n protected handleItemXMLChange() {\n if (!this.itemXML) return;\n try {\n this.itemDoc = qtiTransformItem().parse(this.itemXML).htmlDoc();\n } catch (error) {\n console.error('Error parsing XML:', error);\n }\n }\n\n async connectedCallback(): Promise<void> {\n super.connectedCallback();\n this.initializeTemplateContent();\n this.applyStyles();\n if (this.itemURL) {\n this.handleItemURLChange();\n }\n if (this.itemXML) {\n this.handleItemXMLChange();\n }\n }\n\n private initializeTemplateContent() {\n const template = this.querySelector('template') as HTMLTemplateElement;\n this.templateContent = template ? template.content : html``;\n }\n\n private applyStyles() {\n const sheet = new CSSStyleSheet();\n sheet.replaceSync(itemCss);\n this.shadowRoot.adoptedStyleSheets = [sheet];\n }\n\n render() {\n return html`\n ${this.templateContent}\n <slot></slot>\n ${until(this.itemDoc, html`<span>Loading...</span>`)}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'item-container': ItemContainer;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,YAAY,YAAY;AACjC,SAAS,eAAe,UAAU,aAAa;AAC/C,SAAS,aAAa;AAqBf,IAAM,gBAAN,cAA4B,WAAW;AAAA,EAAvC;AAAA;AAGL,mBAAkB;AAIlB,mBAA4B;AAI5B,mBAAkB;AAGlB;AAAA,SAAQ,kBAAkB;AAAA;AAAA,EAG1B,MAAgB,sBAAsB;AACpC,QAAI,CAAC,KAAK,QAAS;AACnB,QAAI;AACF,YAAM,EAAE,SAAS,IAAI,IAAI,MAAM,iBAAiB,EAAE,KAAK,KAAK,OAAO;AACnE,WAAK,WAAW,MAAM,KAAK,QAAQ;AAAA,IACrC,SAAS,OAAO;AACd,cAAQ,MAAM,iCAAiC,KAAK;AAAA,IACtD;AAAA,EACF;AAAA,EAGU,sBAAsB;A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|
|
4
|
+
import {
|
|
5
|
+
testContext
|
|
6
|
+
} from "./chunk-CJADUWEC.js";
|
|
7
|
+
import {
|
|
8
|
+
computedContext
|
|
9
|
+
} from "./chunk-AZIKAG7K.js";
|
|
10
|
+
import {
|
|
11
|
+
__decorateClass
|
|
12
|
+
} from "./chunk-H2JE6IVU.js";
|
|
13
|
+
|
|
14
|
+
// src/lib/qti-test/components/test-navigation.ts
|
|
15
|
+
import { consume, provide } from "@lit/context";
|
|
16
|
+
import { html, LitElement } from "lit";
|
|
17
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
18
|
+
var TestNavigation = class extends LitElement {
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
this.identifier = void 0;
|
|
22
|
+
this.initContext = [];
|
|
23
|
+
this.configContext = {};
|
|
24
|
+
this.autoScoreItems = false;
|
|
25
|
+
this.addEventListener("qti-assessment-test-connected", this._handleTestConnected.bind(this));
|
|
26
|
+
this.addEventListener("qti-assessment-item-connected", this._handleItemConnected.bind(this));
|
|
27
|
+
this.addEventListener("qti-interaction-changed", this._handleInteractionChanged.bind(this));
|
|
28
|
+
this.addEventListener("test-end-attempt", this._handleTestEndAttempt.bind(this));
|
|
29
|
+
this.addEventListener("test-show-correct-response", this._handleTestShowCorrectResponse.bind(this));
|
|
30
|
+
this.addEventListener("test-update-outcome-variable", this._handleTestUpdateOutcomeVariable.bind(this));
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Handles the 'test-end-attempt' event.
|
|
34
|
+
* @private
|
|
35
|
+
* @listens TestNavigation#test-end-attempt
|
|
36
|
+
* @param {CustomEvent} event - The custom event object.
|
|
37
|
+
*/
|
|
38
|
+
_handleTestEndAttempt(_event) {
|
|
39
|
+
const qtiItemEl = this._testElement.querySelector(
|
|
40
|
+
`qti-assessment-item-ref[identifier="${this._sessionContext.navItemRefId}"]`
|
|
41
|
+
);
|
|
42
|
+
const qtiAssessmentItemEl = qtiItemEl.assessmentItem;
|
|
43
|
+
const reportValidityAfterScoring = this.configContext?.reportValidityAfterScoring === true ? true : false;
|
|
44
|
+
qtiAssessmentItemEl.processResponse(true, reportValidityAfterScoring);
|
|
45
|
+
}
|
|
46
|
+
// protected createRenderRoot(): HTMLElement | DocumentFragment {
|
|
47
|
+
// return this;
|
|
48
|
+
// }
|
|
49
|
+
// myTemplate: TemplateFunction;
|
|
50
|
+
// connectedCallback(): void {
|
|
51
|
+
// super.connectedCallback();
|
|
52
|
+
// const templateElement = this.querySelector<HTMLTemplateElement>('template');
|
|
53
|
+
// if (!templateElement) {
|
|
54
|
+
// this.myTemplate = null;
|
|
55
|
+
// return;
|
|
56
|
+
// }
|
|
57
|
+
// this.myTemplate = prepareTemplate(templateElement);
|
|
58
|
+
// }
|
|
59
|
+
/**
|
|
60
|
+
* Handles the 'test-end-attempt' event.
|
|
61
|
+
* @private
|
|
62
|
+
* @listens TestNavigation#test-show-correct-response
|
|
63
|
+
* @param {CustomEvent} event - The custom event object.
|
|
64
|
+
*/
|
|
65
|
+
_handleTestShowCorrectResponse(event) {
|
|
66
|
+
const qtiItemEl = this._testElement.querySelector(
|
|
67
|
+
`qti-assessment-item-ref[identifier="${this._sessionContext.navItemRefId}"]`
|
|
68
|
+
);
|
|
69
|
+
const qtiAssessmentItemEl = qtiItemEl.assessmentItem;
|
|
70
|
+
qtiAssessmentItemEl.showCorrectResponse(event.detail);
|
|
71
|
+
}
|
|
72
|
+
_handleTestUpdateOutcomeVariable(event) {
|
|
73
|
+
const qtiItemEl = this._testElement.querySelector(
|
|
74
|
+
`qti-assessment-item-ref[identifier="${event.detail.assessmentItemRefId}"]`
|
|
75
|
+
);
|
|
76
|
+
const qtiAssessmentItemEl = qtiItemEl.assessmentItem;
|
|
77
|
+
qtiAssessmentItemEl.setOutcomeVariable(event.detail.outcomeVariableId, event.detail.value);
|
|
78
|
+
}
|
|
79
|
+
_handleInteractionChanged(_event) {
|
|
80
|
+
if (this.autoScoreItems) {
|
|
81
|
+
const assessmentItem = _event.composedPath()[0].closest("qti-assessment-item");
|
|
82
|
+
const scoreOutcomeIdentifier = assessmentItem.variables.find((v) => v.identifier === "SCORE");
|
|
83
|
+
debugger;
|
|
84
|
+
if (scoreOutcomeIdentifier && scoreOutcomeIdentifier.externalScored === null && assessmentItem.adaptive === "false") {
|
|
85
|
+
const reportValidityAfterScoring = this.configContext?.reportValidityAfterScoring === true ? true : false;
|
|
86
|
+
assessmentItem.processResponse(true, reportValidityAfterScoring);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
render() {
|
|
91
|
+
return html`<slot></slot>`;
|
|
92
|
+
}
|
|
93
|
+
/* PK: on test connected we can build the computed context */
|
|
94
|
+
_handleTestConnected(event) {
|
|
95
|
+
this._testElement = event.detail;
|
|
96
|
+
const testPartElements = Array.from(this._testElement?.querySelectorAll(`qti-test-part`) || []);
|
|
97
|
+
this.computedContext = {
|
|
98
|
+
identifier: this._testElement.identifier,
|
|
99
|
+
title: this._testElement.title,
|
|
100
|
+
view: this._sessionContext?.view,
|
|
101
|
+
testParts: testPartElements.map((testPart) => {
|
|
102
|
+
const sectionElements = [...testPart.querySelectorAll(`qti-assessment-section`)];
|
|
103
|
+
return {
|
|
104
|
+
active: false,
|
|
105
|
+
identifier: testPart.identifier,
|
|
106
|
+
navigationMode: testPart.navigationMode,
|
|
107
|
+
submissionMode: testPart.submissionMode,
|
|
108
|
+
sections: sectionElements.map((section) => {
|
|
109
|
+
const itemElements = [...section.querySelectorAll(`qti-assessment-item-ref`)];
|
|
110
|
+
return {
|
|
111
|
+
active: false,
|
|
112
|
+
identifier: section.identifier,
|
|
113
|
+
title: section.title,
|
|
114
|
+
items: itemElements.map((item) => ({
|
|
115
|
+
...this.initContext?.find((i) => i.identifier === item.identifier),
|
|
116
|
+
active: false,
|
|
117
|
+
identifier: item.identifier,
|
|
118
|
+
categories: item.category ? item.category?.split(" ") : [],
|
|
119
|
+
href: item.href,
|
|
120
|
+
variables: []
|
|
121
|
+
}))
|
|
122
|
+
};
|
|
123
|
+
})
|
|
124
|
+
};
|
|
125
|
+
})
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
/* PK: on item connected we can add item only properties in the xml */
|
|
129
|
+
_handleItemConnected(event) {
|
|
130
|
+
const itemElement = event.detail;
|
|
131
|
+
this.computedContext = {
|
|
132
|
+
...this.computedContext,
|
|
133
|
+
testParts: this.computedContext.testParts.map((testPart) => {
|
|
134
|
+
return {
|
|
135
|
+
...testPart,
|
|
136
|
+
sections: testPart.sections.map((section) => {
|
|
137
|
+
return {
|
|
138
|
+
...section,
|
|
139
|
+
items: section.items.map((item) => {
|
|
140
|
+
if (item.identifier !== itemElement.parentElement.getAttribute("identifier")) {
|
|
141
|
+
return item;
|
|
142
|
+
}
|
|
143
|
+
const scoreOutcome = itemElement.querySelector(
|
|
144
|
+
"qti-outcome-declaration[identifier='SCORE']"
|
|
145
|
+
);
|
|
146
|
+
const externalScored = scoreOutcome?.getAttribute("externalScored");
|
|
147
|
+
const responseDeclarations = itemElement.querySelectorAll("qti-response-declaration");
|
|
148
|
+
const containsCorrectResponse = Array.from(responseDeclarations).some(
|
|
149
|
+
(r) => r.querySelector("qti-correct-response")
|
|
150
|
+
);
|
|
151
|
+
const containsMapping = Array.from(responseDeclarations).some((r) => {
|
|
152
|
+
const mapping = r.querySelector("qti-mapping");
|
|
153
|
+
const areaMapping = r.querySelector("qti-area-mapping");
|
|
154
|
+
return mapping?.querySelector("qti-map-entry") || areaMapping?.querySelector("qti-area-map-entry");
|
|
155
|
+
});
|
|
156
|
+
const hasCorrectResponse = containsCorrectResponse || containsMapping;
|
|
157
|
+
const hasResponseProcessing = itemElement.querySelector("qti-response-processing") ? true : false;
|
|
158
|
+
return {
|
|
159
|
+
...item,
|
|
160
|
+
assessmentItemIdentifier: itemElement.getAttribute("identifier"),
|
|
161
|
+
label: itemElement.getAttribute("label"),
|
|
162
|
+
title: itemElement.title,
|
|
163
|
+
externalScored,
|
|
164
|
+
adaptive: itemElement.adaptive == "true" || false,
|
|
165
|
+
timeDependent: itemElement.timeDependent == "true" || false,
|
|
166
|
+
variables: itemElement.variables,
|
|
167
|
+
hasCorrectResponse,
|
|
168
|
+
hasResponseProcessing
|
|
169
|
+
};
|
|
170
|
+
})
|
|
171
|
+
};
|
|
172
|
+
})
|
|
173
|
+
};
|
|
174
|
+
})
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
/* PK: on every change of the candidate we will recomputed the computedContext */
|
|
178
|
+
willUpdate(_changedProperties) {
|
|
179
|
+
if (!this.computedContext) return;
|
|
180
|
+
let itemIndex = 1;
|
|
181
|
+
this.computedContext = {
|
|
182
|
+
...this.computedContext,
|
|
183
|
+
view: this._sessionContext?.view,
|
|
184
|
+
testParts: this.computedContext.testParts.map((testPart) => {
|
|
185
|
+
return {
|
|
186
|
+
...testPart,
|
|
187
|
+
active: this._sessionContext?.navPartId === testPart.identifier || false,
|
|
188
|
+
sections: testPart.sections.map((section) => {
|
|
189
|
+
return {
|
|
190
|
+
...section,
|
|
191
|
+
active: this._sessionContext?.navSectionId === section.identifier || false,
|
|
192
|
+
completed: section.items.every(
|
|
193
|
+
(item) => this._testContext.items.find((i) => i.identifier === item.identifier)?.variables.find((v) => v.identifier === "completionStatus").value === "completed"
|
|
194
|
+
),
|
|
195
|
+
items: section.items.map((item) => {
|
|
196
|
+
const itemContext = this._testContext?.items.find((i) => i.identifier === item.identifier);
|
|
197
|
+
const computedItem = {
|
|
198
|
+
...item,
|
|
199
|
+
...itemContext,
|
|
200
|
+
...this.initContext?.find((i) => i.identifier === item.identifier)
|
|
201
|
+
};
|
|
202
|
+
const rawscore = computedItem.variables?.find((vr) => vr.identifier == "SCORE")?.value;
|
|
203
|
+
const score = parseInt(rawscore?.toString());
|
|
204
|
+
const completionStatus = computedItem.variables?.find((v) => v.identifier === "completionStatus")?.value;
|
|
205
|
+
const response = computedItem.variables?.find((v) => v.identifier === "RESPONSE")?.value || "";
|
|
206
|
+
const numAttempts = computedItem.variables?.find((v) => v.identifier === "numAttempts")?.value || 0;
|
|
207
|
+
const active = this._sessionContext?.navItemRefId === computedItem.identifier || false;
|
|
208
|
+
const index = item.categories.includes(this.configContext?.infoItemCategory) ? null : itemIndex++;
|
|
209
|
+
const rawMaxScore = item.variables?.find((vr) => vr.identifier == "MAXSCORE")?.value;
|
|
210
|
+
const maxScore = parseInt(rawMaxScore?.toString());
|
|
211
|
+
return {
|
|
212
|
+
...computedItem,
|
|
213
|
+
completionStatus,
|
|
214
|
+
numAttempts,
|
|
215
|
+
score,
|
|
216
|
+
response,
|
|
217
|
+
index,
|
|
218
|
+
// type,
|
|
219
|
+
active,
|
|
220
|
+
// correct,
|
|
221
|
+
maxScore
|
|
222
|
+
// incorrect,
|
|
223
|
+
// completed
|
|
224
|
+
};
|
|
225
|
+
})
|
|
226
|
+
};
|
|
227
|
+
})
|
|
228
|
+
};
|
|
229
|
+
})
|
|
230
|
+
};
|
|
231
|
+
this.dispatchEvent(
|
|
232
|
+
new CustomEvent("qti-computed-context-updated", {
|
|
233
|
+
detail: this.computedContext,
|
|
234
|
+
bubbles: true
|
|
235
|
+
})
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
__decorateClass([
|
|
240
|
+
property({ type: String })
|
|
241
|
+
], TestNavigation.prototype, "identifier", 2);
|
|
242
|
+
__decorateClass([
|
|
243
|
+
state()
|
|
244
|
+
], TestNavigation.prototype, "initContext", 2);
|
|
245
|
+
__decorateClass([
|
|
246
|
+
state()
|
|
247
|
+
], TestNavigation.prototype, "configContext", 2);
|
|
248
|
+
__decorateClass([
|
|
249
|
+
state(),
|
|
250
|
+
consume({ context: testContext, subscribe: true })
|
|
251
|
+
], TestNavigation.prototype, "_testContext", 2);
|
|
252
|
+
__decorateClass([
|
|
253
|
+
state(),
|
|
254
|
+
consume({ context: sessionContext, subscribe: true })
|
|
255
|
+
], TestNavigation.prototype, "_sessionContext", 2);
|
|
256
|
+
__decorateClass([
|
|
257
|
+
state(),
|
|
258
|
+
provide({ context: computedContext })
|
|
259
|
+
], TestNavigation.prototype, "computedContext", 2);
|
|
260
|
+
__decorateClass([
|
|
261
|
+
property({ type: Boolean, attribute: "auto-score-items" })
|
|
262
|
+
], TestNavigation.prototype, "autoScoreItems", 2);
|
|
263
|
+
TestNavigation = __decorateClass([
|
|
264
|
+
customElement("test-navigation")
|
|
265
|
+
], TestNavigation);
|
|
266
|
+
|
|
267
|
+
export {
|
|
268
|
+
TestNavigation
|
|
269
|
+
};
|
|
270
|
+
//# sourceMappingURL=chunk-5UK3GDC4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-navigation.ts"],"sourcesContent":["import { consume, provide } from '@lit/context';\nimport { html, LitElement } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n// import { prepareTemplate } from 'stampino';\n\nimport { testContext } from '../../exports/test.context';\nimport { sessionContext } from '../../exports/session.context';\nimport { computedContext } from '../../exports/computed.context';\n\n// import type { View } from '../core/mixins/test-view.mixin';\n// import type { TemplateFunction } from 'stampino';\nimport type { QtiAssessmentItem } from '../../qti-components';\nimport type { OutcomeVariable } from '../../exports/variables';\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { PropertyValues } from 'lit';\nimport type { QtiAssessmentItemRef, QtiAssessmentSection, QtiAssessmentTest, QtiTestPart } from '../core';\nimport type { ConfigContext } from '../../exports/config.context';\nimport type { SessionContext } from '../../exports/session.context';\nimport type { TestContext } from '../../exports/test.context';\n\ntype CustomEventMap = {\n 'test-end-attempt': CustomEvent;\n 'test-show-correct-response': CustomEvent<{ value: boolean }>;\n};\n\ndeclare global {\n interface GlobalEventHandlersEventMap extends CustomEventMap {}\n}\n\n@customElement('test-navigation')\nexport class TestNavigation extends LitElement {\n @property({ type: String }) identifier = undefined;\n\n @state()\n public initContext: { identifier: string; [key: string]: any }[] = [];\n\n @state()\n public configContext: ConfigContext = {};\n\n @state()\n @consume({ context: testContext, subscribe: true })\n protected _testContext?: TestContext;\n\n @state()\n @consume({ context: sessionContext, subscribe: true })\n protected _sessionContext?: SessionContext;\n\n @state()\n @provide({ context: computedContext })\n protected computedContext: ComputedContext;\n\n @property({ type: Boolean, attribute: 'auto-score-items' }) autoScoreItems = false;\n\n // @state()\n // private stampContext: {\n // view?: View;\n // test?: unknown;\n // activeTestpart?: unknown;\n // activeSection?: unknown;\n // activeItem?: unknown;\n // } = {\n // view: 'candidate',\n // activeItem: {},\n // activeSection: {\n // items: []\n // },\n // activeTestpart: {\n // items: []\n // },\n // test: {}\n // };\n // @property({ type: Boolean, reflect: true }) public debug = false;\n\n private _testElement: QtiAssessmentTest;\n\n constructor() {\n super();\n this.addEventListener('qti-assessment-test-connected', this._handleTestConnected.bind(this));\n this.addEventListener('qti-assessment-item-connected', this._handleItemConnected.bind(this));\n\n this.addEventListener('qti-interaction-changed', this._handleInteractionChanged.bind(this));\n\n this.addEventListener('test-end-attempt', this._handleTestEndAttempt.bind(this));\n this.addEventListener('test-show-correct-response', this._handleTestShowCorrectResponse.bind(this));\n this.addEventListener('test-update-outcome-variable', this._handleTestUpdateOutcomeVariable.bind(this));\n }\n\n /**\n * Handles the 'test-end-attempt' event.\n * @private\n * @listens TestNavigation#test-end-attempt\n * @param {CustomEvent} event - The custom event object.\n */\n private _handleTestEndAttempt(_event: CustomEvent) {\n const qtiItemEl = this._testElement.querySelector<QtiAssessmentItemRef>(\n `qti-assessment-item-ref[identifier=\"${this._sessionContext.navItemRefId}\"]`\n );\n const qtiAssessmentItemEl = qtiItemEl.assessmentItem;\n\n const reportValidityAfterScoring = this.configContext?.reportValidityAfterScoring === true ? true : false;\n qtiAssessmentItemEl.processResponse(true, reportValidityAfterScoring);\n }\n\n // protected createRenderRoot(): HTMLElement | DocumentFragment {\n // return this;\n // }\n\n // myTemplate: TemplateFunction;\n\n // connectedCallback(): void {\n // super.connectedCallback();\n // const templateElement = this.querySelector<HTMLTemplateElement>('template');\n // if (!templateElement) {\n // this.myTemplate = null;\n // return;\n // }\n // this.myTemplate = prepareTemplate(templateElement);\n // }\n\n /**\n * Handles the 'test-end-attempt' event.\n * @private\n * @listens TestNavigation#test-show-correct-response\n * @param {CustomEvent} event - The custom event object.\n */\n private _handleTestShowCorrectResponse(event: CustomEvent) {\n const qtiItemEl = this._testElement.querySelector<QtiAssessmentItemRef>(\n `qti-assessment-item-ref[identifier=\"${this._sessionContext.navItemRefId}\"]`\n );\n const qtiAssessmentItemEl = qtiItemEl.assessmentItem;\n qtiAssessmentItemEl.showCorrectResponse(event.detail);\n }\n\n private _handleTestUpdateOutcomeVariable(event: CustomEvent) {\n const qtiItemEl = this._testElement.querySelector<QtiAssessmentItemRef>(\n `qti-assessment-item-ref[identifier=\"${event.detail.assessmentItemRefId}\"]`\n );\n const qtiAssessmentItemEl = qtiItemEl.assessmentItem;\n qtiAssessmentItemEl.setOutcomeVariable(event.detail.outcomeVariableId, event.detail.value);\n }\n\n private _handleInteractionChanged(_event: CustomEvent) {\n if (this.autoScoreItems) {\n const assessmentItem = (_event.composedPath()[0] as HTMLElement).closest('qti-assessment-item');\n const scoreOutcomeIdentifier = assessmentItem.variables.find(v => v.identifier === 'SCORE') as OutcomeVariable;\n debugger;\n if (\n scoreOutcomeIdentifier &&\n scoreOutcomeIdentifier.externalScored === null &&\n assessmentItem.adaptive === 'false'\n ) {\n const reportValidityAfterScoring = this.configContext?.reportValidityAfterScoring === true ? true : false;\n assessmentItem.processResponse(true, reportValidityAfterScoring);\n }\n }\n }\n\n render() {\n // return this.myTemplate ? this.myTemplate(this.stampContext) : nothing;\n return html`<slot></slot>`;\n }\n\n /* PK: on test connected we can build the computed context */\n private _handleTestConnected(event: CustomEvent) {\n this._testElement = event.detail as QtiAssessmentTest;\n const testPartElements = Array.from(this._testElement?.querySelectorAll<QtiTestPart>(`qti-test-part`) || []);\n this.computedContext = {\n identifier: this._testElement.identifier,\n title: this._testElement.title,\n view: this._sessionContext?.view,\n testParts: testPartElements.map(testPart => {\n const sectionElements = [...testPart.querySelectorAll<QtiAssessmentSection>(`qti-assessment-section`)];\n return {\n active: false,\n identifier: testPart.identifier,\n navigationMode: testPart.navigationMode,\n submissionMode: testPart.submissionMode,\n sections: sectionElements.map(section => {\n const itemElements = [...section.querySelectorAll<QtiAssessmentItemRef>(`qti-assessment-item-ref`)];\n return {\n active: false,\n identifier: section.identifier,\n title: section.title,\n items: itemElements.map(item => ({\n ...this.initContext?.find(i => i.identifier === item.identifier),\n active: false,\n identifier: item.identifier,\n categories: item.category ? item.category?.split(' ') : [],\n href: item.href,\n variables: []\n }))\n };\n })\n };\n })\n };\n }\n\n /* PK: on item connected we can add item only properties in the xml */\n private _handleItemConnected(event: CustomEvent) {\n const itemElement = event.detail as QtiAssessmentItem;\n\n this.computedContext = {\n ...this.computedContext,\n testParts: this.computedContext.testParts.map(testPart => {\n return {\n ...testPart,\n sections: testPart.sections.map(section => {\n return {\n ...section,\n items: section.items.map(item => {\n if (item.identifier !== itemElement.parentElement.getAttribute('identifier')) {\n return item;\n }\n\n const scoreOutcome = itemElement.querySelector<HTMLElement>(\n \"qti-outcome-declaration[identifier='SCORE']\"\n );\n // const scoreOutcome = item.variables.find(vr => vr.identifier == 'SCORE') as OutcomeVariable;\n const externalScored = scoreOutcome?.getAttribute('externalScored');\n\n const responseDeclarations = itemElement.querySelectorAll<HTMLElement>('qti-response-declaration');\n const containsCorrectResponse = Array.from(responseDeclarations).some(r =>\n r.querySelector('qti-correct-response')\n );\n // check if every responseDeclaration has a correctResponse\n const containsMapping = Array.from(responseDeclarations).some(r => {\n const mapping = r.querySelector('qti-mapping');\n const areaMapping = r.querySelector('qti-area-mapping');\n return mapping?.querySelector('qti-map-entry') || areaMapping?.querySelector('qti-area-map-entry');\n });\n\n const hasCorrectResponse = containsCorrectResponse || containsMapping;\n\n const hasResponseProcessing = itemElement.querySelector('qti-response-processing') ? true : false;\n\n return {\n ...item,\n assessmentItemIdentifier: itemElement.getAttribute('identifier'),\n label: itemElement.getAttribute('label'),\n title: itemElement.title,\n externalScored,\n adaptive: itemElement.adaptive == 'true' || false,\n timeDependent: itemElement.timeDependent == 'true' || false,\n variables: itemElement.variables,\n hasCorrectResponse,\n hasResponseProcessing\n };\n })\n };\n })\n };\n })\n };\n }\n\n /* PK: on every change of the candidate we will recomputed the computedContext */\n protected willUpdate(_changedProperties: PropertyValues): void {\n if (!this.computedContext) return;\n\n let itemIndex = 1;\n this.computedContext = {\n ...this.computedContext,\n view: this._sessionContext?.view,\n testParts: this.computedContext.testParts.map(testPart => {\n return {\n ...testPart,\n active: this._sessionContext?.navPartId === testPart.identifier || false,\n sections: testPart.sections.map(section => {\n return {\n ...section,\n active: this._sessionContext?.navSectionId === section.identifier || false,\n completed: section.items.every(\n item =>\n this._testContext.items\n .find(i => i.identifier === item.identifier)\n ?.variables.find(v => v.identifier === 'completionStatus').value === 'completed'\n ),\n\n items: section.items.map(item => {\n const itemContext = this._testContext?.items.find(i => i.identifier === item.identifier);\n const computedItem = {\n ...item,\n ...itemContext,\n ...this.initContext?.find(i => i.identifier === item.identifier)\n };\n\n const rawscore = computedItem.variables?.find(vr => vr.identifier == 'SCORE')?.value;\n const score = parseInt(rawscore?.toString());\n\n const completionStatus = computedItem.variables?.find(v => v.identifier === 'completionStatus')\n ?.value as string;\n\n const response = computedItem.variables?.find(v => v.identifier === 'RESPONSE')?.value || '';\n const numAttempts = computedItem.variables?.find(v => v.identifier === 'numAttempts')?.value || 0;\n\n const active = this._sessionContext?.navItemRefId === computedItem.identifier || false;\n\n // Computed and opiniated\n // const type = item.categories.includes(this.configContext?.infoItemCategory) ? 'info' : 'regular';\n // const correct = (type == 'regular' && score !== undefined && !isNaN(score) && score > 0) || false;\n // const incorrect = (type == 'regular' && score !== undefined && !isNaN(score) && score <= 0) || false;\n // const completed = completionStatus === 'completed';\n\n const index = item.categories.includes(this.configContext?.infoItemCategory) ? null : itemIndex++;\n const rawMaxScore = item.variables?.find(vr => vr.identifier == 'MAXSCORE')?.value;\n const maxScore = parseInt(rawMaxScore?.toString());\n\n return {\n ...computedItem,\n completionStatus,\n numAttempts,\n score,\n response,\n index,\n // type,\n active,\n // correct,\n maxScore\n // incorrect,\n // completed\n };\n })\n };\n })\n };\n })\n };\n\n // const activeTestPart = this.computedContext.testParts.find(testPart => testPart.active);\n // const activeSection = activeTestPart?.sections.find(section => section.active);\n // const activeItem = activeSection?.items.find(item => item.active);\n // const { variables, ...augmentedItem } = activeItem || {};\n\n // if (!activeTestPart || !activeSection || !activeItem) {\n // this.stampContext = null;\n // return;\n // }\n\n // const augmentedTestPart = {\n // ...activeTestPart,\n // items: activeTestPart.sections.flatMap(section => section.items.map(({ variables, ...rest }) => rest)),\n // sections: activeTestPart.sections.map(section => ({\n // ...section,\n // items: section.items.map(({ variables, ...rest }) => rest)\n // }))\n // };\n\n // const augmentedSection = { ...activeSection, items: activeSection.items.map(({ variables, ...rest }) => rest) };\n // const { testParts, ...activeTest } = this.computedContext;\n\n // this.stampContext = {\n // view: this.computedContext.view,\n // activeItem: augmentedItem,\n // activeSection: augmentedSection,\n // activeTestpart: augmentedTestPart,\n // test: activeTest\n // };\n\n this.dispatchEvent(\n new CustomEvent('qti-computed-context-updated', {\n detail: this.computedContext,\n bubbles: true\n })\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,SAAS,eAAe;AACjC,SAAS,MAAM,kBAAkB;AACjC,SAAS,eAAe,UAAU,aAAa;AA4BxC,IAAM,iBAAN,cAA6B,WAAW;AAAA,EA6C7C,cAAc;AACZ,UAAM;AA7CoB,sBAAa;AAGzC,SAAO,cAA4D,CAAC;AAGpE,SAAO,gBAA+B,CAAC;AAcqB,0BAAiB;AA0B3E,SAAK,iBAAiB,iCAAiC,KAAK,qBAAqB,KAAK,IAAI,CAAC;AAC3F,SAAK,iBAAiB,iCAAiC,KAAK,qBAAqB,KAAK,IAAI,CAAC;AAE3F,SAAK,iBAAiB,2BAA2B,KAAK,0BAA0B,KAAK,IAAI,CAAC;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} from "./chunk-ELDMXTUQ.js";
|
|
4
|
+
import {
|
|
5
|
+
btn,
|
|
6
|
+
dis
|
|
7
|
+
} from "./chunk-5ZHHNEDA.js";
|
|
8
|
+
import {
|
|
9
|
+
computedContext
|
|
10
|
+
} from "./chunk-AZIKAG7K.js";
|
|
11
|
+
import {
|
|
12
|
+
__decorateClass
|
|
13
|
+
} from "./chunk-H2JE6IVU.js";
|
|
14
|
+
|
|
15
|
+
// src/lib/qti-test/components/test-next.ts
|
|
16
|
+
import { css, html, LitElement } from "lit";
|
|
17
|
+
import { customElement, property } from "lit/decorators.js";
|
|
18
|
+
import { consume } from "@lit/context";
|
|
19
|
+
var TestNext = class extends LitElement {
|
|
20
|
+
constructor() {
|
|
21
|
+
super();
|
|
22
|
+
this._internalDisabled = true;
|
|
23
|
+
this._internals = this.attachInternals();
|
|
24
|
+
this._internals.role = "button";
|
|
25
|
+
this._internals.ariaLabel = "Next item";
|
|
26
|
+
this.addEventListener("click", (e) => {
|
|
27
|
+
e.preventDefault();
|
|
28
|
+
if (!this._internalDisabled) this._requestItem(this.sectionItems[this.itemIndex + 1].identifier);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
_handleTestElementChange(_oldValue, newValue) {
|
|
32
|
+
if (newValue) {
|
|
33
|
+
this._internalDisabled = false;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
connectedCallback() {
|
|
37
|
+
super.connectedCallback();
|
|
38
|
+
this.checkDisabled();
|
|
39
|
+
}
|
|
40
|
+
willUpdate(_changedProperties) {
|
|
41
|
+
if (!this.computedContext) return;
|
|
42
|
+
const testPart = this.computedContext?.testParts.find((testPart2) => testPart2.active);
|
|
43
|
+
if (!testPart) return;
|
|
44
|
+
this.sectionItems = testPart.sections.flatMap((section) => section.items);
|
|
45
|
+
this.itemIndex = this.sectionItems.findIndex((item) => item.active);
|
|
46
|
+
this.checkDisabled();
|
|
47
|
+
}
|
|
48
|
+
checkDisabled() {
|
|
49
|
+
this._internalDisabled = !this.computedContext || this.itemIndex < 0 || this.itemIndex >= this.sectionItems?.length - 1;
|
|
50
|
+
}
|
|
51
|
+
_requestItem(identifier) {
|
|
52
|
+
this.dispatchEvent(
|
|
53
|
+
new CustomEvent("qti-request-navigation", {
|
|
54
|
+
composed: true,
|
|
55
|
+
bubbles: true,
|
|
56
|
+
detail: {
|
|
57
|
+
type: "item",
|
|
58
|
+
id: identifier
|
|
59
|
+
}
|
|
60
|
+
})
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
render() {
|
|
64
|
+
return html`<slot></slot>`;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
TestNext.styles = css`
|
|
68
|
+
:host {
|
|
69
|
+
${btn};
|
|
70
|
+
}
|
|
71
|
+
:host([disabled]) {
|
|
72
|
+
${dis};
|
|
73
|
+
}
|
|
74
|
+
`;
|
|
75
|
+
__decorateClass([
|
|
76
|
+
property({ type: Boolean, reflect: true, attribute: "disabled" })
|
|
77
|
+
], TestNext.prototype, "_internalDisabled", 2);
|
|
78
|
+
__decorateClass([
|
|
79
|
+
consume({ context: computedContext, subscribe: true })
|
|
80
|
+
], TestNext.prototype, "computedContext", 2);
|
|
81
|
+
__decorateClass([
|
|
82
|
+
watch("computedContext")
|
|
83
|
+
], TestNext.prototype, "_handleTestElementChange", 1);
|
|
84
|
+
TestNext = __decorateClass([
|
|
85
|
+
customElement("test-next")
|
|
86
|
+
], TestNext);
|
|
87
|
+
|
|
88
|
+
export {
|
|
89
|
+
TestNext
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=chunk-6RGVMISK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-next.ts"],"sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { consume } from '@lit/context';\n\nimport * as styles from './styles';\nimport { watch } from '../../decorators';\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { ComputedContext, ComputedItem } from '../../exports/computed.context';\n\n/**\n * Represents a custom element for navigating to the next test item.\n *\n * @remarks\n * This element provides functionality for navigating to the next test item.\n *\n * @example\n * ```html\n * <test-next></test-next>\n * ```\n */\n@customElement('test-next')\nexport class TestNext extends LitElement {\n @property({ type: Boolean, reflect: true, attribute: 'disabled' })\n public _internalDisabled = true;\n\n @consume({ context: computedContext, subscribe: true })\n protected computedContext: ComputedContext;\n\n sectionItems: ComputedItem[];\n itemIndex: number;\n\n @watch('computedContext')\n _handleTestElementChange(_oldValue: ComputedContext, newValue: ComputedContext) {\n if (newValue) {\n this._internalDisabled = false;\n }\n }\n\n static styles = css`\n :host {\n ${styles.btn};\n }\n :host([disabled]) {\n ${styles.dis};\n }\n `;\n private _internals: ElementInternals;\n\n constructor() {\n super();\n\n this._internals = this.attachInternals();\n this._internals.role = 'button';\n this._internals.ariaLabel = 'Next item';\n\n this.addEventListener('click', e => {\n e.preventDefault();\n if (!this._internalDisabled) this._requestItem(this.sectionItems[this.itemIndex + 1].identifier);\n });\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.checkDisabled();\n }\n\n willUpdate(_changedProperties: Map<string | number | symbol, unknown>) {\n if (!this.computedContext) return;\n const testPart = this.computedContext?.testParts.find(testPart => testPart.active);\n if (!testPart) return;\n this.sectionItems = testPart.sections.flatMap(section => section.items);\n this.itemIndex = this.sectionItems.findIndex(item => item.active);\n this.checkDisabled();\n }\n\n checkDisabled() {\n this._internalDisabled =\n !this.computedContext || this.itemIndex < 0 || this.itemIndex >= this.sectionItems?.length - 1;\n }\n\n protected _requestItem(identifier: string): void {\n this.dispatchEvent(\n new CustomEvent('qti-request-navigation', {\n composed: true,\n bubbles: true,\n detail: {\n type: 'item',\n id: identifier\n }\n })\n );\n }\n\n render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-next': TestNext;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAS,KAAK,MAAM,kBA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