@pie-element/inline-dropdown 11.0.3-esm.0 → 11.0.3-next.20261007075859
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/author.js +2 -0
- package/configure.js +2 -0
- package/controller.js +1 -0
- package/dist/author/defaults.d.ts +186 -0
- package/dist/author/defaults.js +130 -0
- package/dist/author/index.d.ts +36 -0
- package/dist/author/index.js +86 -0
- package/dist/author/inline-dropdown-toolbar.d.ts +41 -0
- package/dist/author/inline-dropdown-toolbar.js +266 -0
- package/dist/author/main.d.ts +41 -0
- package/dist/author/main.js +379 -0
- package/dist/author/markupUtils.d.ts +4 -0
- package/dist/author/markupUtils.js +23 -0
- package/dist/author/response-area.d.ts +12 -0
- package/dist/author/response-area.js +32 -0
- package/dist/author/utils.d.ts +2 -0
- package/dist/author/utils.js +10 -0
- package/dist/browser/Close-BeokAZZw.js +12428 -0
- package/dist/browser/Close-BeokAZZw.js.map +1 -0
- package/dist/browser/PUA-tLuTiQ7---_oZ5q_A.js +4370 -0
- package/dist/browser/PUA-tLuTiQ7---_oZ5q_A.js.map +1 -0
- package/dist/browser/accents-BTUYmhn9-BvG-5D5U.js +1508 -0
- package/dist/browser/accents-BTUYmhn9-BvG-5D5U.js.map +1 -0
- package/dist/browser/accents-b-i-CngHZsLL-D9VyhQb6.js +2847 -0
- package/dist/browser/accents-b-i-CngHZsLL-D9VyhQb6.js.map +1 -0
- package/dist/browser/arabic-BzEHMVZD-Dynlj189.js +785 -0
- package/dist/browser/arabic-BzEHMVZD-Dynlj189.js.map +1 -0
- package/dist/browser/arrows-VjxlU-jv-DSm4SIYN.js +2655 -0
- package/dist/browser/arrows-VjxlU-jv-DSm4SIYN.js.map +1 -0
- package/dist/browser/assets/Symbola-4c507403.woff2 +0 -0
- package/dist/browser/author/index.js +36579 -0
- package/dist/browser/author/index.js.map +1 -0
- package/dist/browser/braille-BeWC_Ruq-T-5kTNil.js +1287 -0
- package/dist/browser/braille-BeWC_Ruq-T-5kTNil.js.map +1 -0
- package/dist/browser/braille-d-Dk6J96GO--ZdfI9kr.js +1287 -0
- package/dist/browser/braille-d-Dk6J96GO--ZdfI9kr.js.map +1 -0
- package/dist/browser/calligraphic-Cew9cU3x-qfCrrm3u.js +323 -0
- package/dist/browser/calligraphic-Cew9cU3x-qfCrrm3u.js.map +1 -0
- package/dist/browser/cherokee-Cny3FYho-CbTYre7_.js +2029 -0
- package/dist/browser/cherokee-Cny3FYho-CbTYre7_.js.map +1 -0
- package/dist/browser/chtml-CbqemTOM-x0_YISTK.js +20329 -0
- package/dist/browser/chtml-CbqemTOM-x0_YISTK.js.map +1 -0
- package/dist/browser/controller/index.js +196 -0
- package/dist/browser/controller/index.js.map +1 -0
- package/dist/browser/cyrillic-CfCDulXU-EvNL2rHi.js +5617 -0
- package/dist/browser/cyrillic-CfCDulXU-EvNL2rHi.js.map +1 -0
- package/dist/browser/cyrillic-ss-lU7bNGG9-jdxJx-EF.js +5606 -0
- package/dist/browser/cyrillic-ss-lU7bNGG9-jdxJx-EF.js.map +1 -0
- package/dist/browser/delivery/index.js +1307 -0
- package/dist/browser/delivery/index.js.map +1 -0
- package/dist/browser/devanagari-CDIz2h-r-FGcUsKu2.js +692 -0
- package/dist/browser/devanagari-CDIz2h-r-FGcUsKu2.js.map +1 -0
- package/dist/browser/dist-FMIRkZir.js +753 -0
- package/dist/browser/dist-FMIRkZir.js.map +1 -0
- package/dist/browser/double-struck-BpJEQk8y-CLqFtvAN.js +438 -0
- package/dist/browser/double-struck-BpJEQk8y-CLqFtvAN.js.map +1 -0
- package/dist/browser/editor-runtime/Close-D72n8bzo.js +12428 -0
- package/dist/browser/editor-runtime/Close-D72n8bzo.js.map +1 -0
- package/dist/browser/editor-runtime/PUA-tLuTiQ7---_oZ5q_A.js +4370 -0
- package/dist/browser/editor-runtime/PUA-tLuTiQ7---_oZ5q_A.js.map +1 -0
- package/dist/browser/editor-runtime/accents-BTUYmhn9-BvG-5D5U.js +1508 -0
- package/dist/browser/editor-runtime/accents-BTUYmhn9-BvG-5D5U.js.map +1 -0
- package/dist/browser/editor-runtime/accents-b-i-CngHZsLL-D9VyhQb6.js +2847 -0
- package/dist/browser/editor-runtime/accents-b-i-CngHZsLL-D9VyhQb6.js.map +1 -0
- package/dist/browser/editor-runtime/arabic-BzEHMVZD-Dynlj189.js +785 -0
- package/dist/browser/editor-runtime/arabic-BzEHMVZD-Dynlj189.js.map +1 -0
- package/dist/browser/editor-runtime/arrows-VjxlU-jv-DSm4SIYN.js +2655 -0
- package/dist/browser/editor-runtime/arrows-VjxlU-jv-DSm4SIYN.js.map +1 -0
- package/dist/browser/editor-runtime/assets/Symbola-4c507403.woff2 +0 -0
- package/dist/browser/editor-runtime/author/index.js +19991 -0
- package/dist/browser/editor-runtime/author/index.js.map +1 -0
- package/dist/browser/editor-runtime/braille-BeWC_Ruq-T-5kTNil.js +1287 -0
- package/dist/browser/editor-runtime/braille-BeWC_Ruq-T-5kTNil.js.map +1 -0
- package/dist/browser/editor-runtime/braille-d-Dk6J96GO--ZdfI9kr.js +1287 -0
- package/dist/browser/editor-runtime/braille-d-Dk6J96GO--ZdfI9kr.js.map +1 -0
- package/dist/browser/editor-runtime/calligraphic-Cew9cU3x-qfCrrm3u.js +323 -0
- package/dist/browser/editor-runtime/calligraphic-Cew9cU3x-qfCrrm3u.js.map +1 -0
- package/dist/browser/editor-runtime/cherokee-Cny3FYho-CbTYre7_.js +2029 -0
- package/dist/browser/editor-runtime/cherokee-Cny3FYho-CbTYre7_.js.map +1 -0
- package/dist/browser/editor-runtime/chtml-CbqemTOM-x0_YISTK.js +20329 -0
- package/dist/browser/editor-runtime/chtml-CbqemTOM-x0_YISTK.js.map +1 -0
- package/dist/browser/editor-runtime/controller/index.js +196 -0
- package/dist/browser/editor-runtime/controller/index.js.map +1 -0
- package/dist/browser/editor-runtime/cyrillic-CfCDulXU-EvNL2rHi.js +5617 -0
- package/dist/browser/editor-runtime/cyrillic-CfCDulXU-EvNL2rHi.js.map +1 -0
- package/dist/browser/editor-runtime/cyrillic-ss-lU7bNGG9-jdxJx-EF.js +5606 -0
- package/dist/browser/editor-runtime/cyrillic-ss-lU7bNGG9-jdxJx-EF.js.map +1 -0
- package/dist/browser/editor-runtime/delivery/index.js +1307 -0
- package/dist/browser/editor-runtime/delivery/index.js.map +1 -0
- package/dist/browser/editor-runtime/devanagari-CDIz2h-r-FGcUsKu2.js +692 -0
- package/dist/browser/editor-runtime/devanagari-CDIz2h-r-FGcUsKu2.js.map +1 -0
- package/dist/browser/editor-runtime/dist-FMIRkZir.js +753 -0
- package/dist/browser/editor-runtime/dist-FMIRkZir.js.map +1 -0
- package/dist/browser/editor-runtime/double-struck-BpJEQk8y-CLqFtvAN.js +438 -0
- package/dist/browser/editor-runtime/double-struck-BpJEQk8y-CLqFtvAN.js.map +1 -0
- package/dist/browser/editor-runtime/fraktur-rLEq9DEH-BU0iR4xw.js +694 -0
- package/dist/browser/editor-runtime/fraktur-rLEq9DEH-BU0iR4xw.js.map +1 -0
- package/dist/browser/editor-runtime/greek-BlraJTyL-DAfjxxNh.js +9335 -0
- package/dist/browser/editor-runtime/greek-BlraJTyL-DAfjxxNh.js.map +1 -0
- package/dist/browser/editor-runtime/greek-ss-D-EN2PK0-CcyaecGS.js +6767 -0
- package/dist/browser/editor-runtime/greek-ss-D-EN2PK0-CcyaecGS.js.map +1 -0
- package/dist/browser/editor-runtime/hebrew-GiQZeybp-DqJrAkkB.js +3218 -0
- package/dist/browser/editor-runtime/hebrew-GiQZeybp-DqJrAkkB.js.map +1 -0
- package/dist/browser/editor-runtime/latin-b-BhEnC7R2-CQAVv0CI.js +3134 -0
- package/dist/browser/editor-runtime/latin-b-BhEnC7R2-CQAVv0CI.js.map +1 -0
- package/dist/browser/editor-runtime/latin-bi-DqiIKv3U-DM22wSUP.js +3637 -0
- package/dist/browser/editor-runtime/latin-bi-DqiIKv3U-DM22wSUP.js.map +1 -0
- package/dist/browser/editor-runtime/latin-i-B1xtwaE1-uBpJAGjo.js +3634 -0
- package/dist/browser/editor-runtime/latin-i-B1xtwaE1-uBpJAGjo.js.map +1 -0
- package/dist/browser/editor-runtime/latin-xfWFlLkD-CKElfDKc.js +3266 -0
- package/dist/browser/editor-runtime/latin-xfWFlLkD-CKElfDKc.js.map +1 -0
- package/dist/browser/editor-runtime/marrows-DD1NgMQi-BIBP-NrK.js +761 -0
- package/dist/browser/editor-runtime/marrows-DD1NgMQi-BIBP-NrK.js.map +1 -0
- package/dist/browser/editor-runtime/math-DpWn1mbG-B7Krt7Jk.js +2034 -0
- package/dist/browser/editor-runtime/math-DpWn1mbG-B7Krt7Jk.js.map +1 -0
- package/dist/browser/editor-runtime/mathjax-BKrHE4xs-olIoaCQN.js +36692 -0
- package/dist/browser/editor-runtime/mathjax-BKrHE4xs-olIoaCQN.js.map +1 -0
- package/dist/browser/editor-runtime/monospace-D116QD2a-C40p3Rv8.js +1112 -0
- package/dist/browser/editor-runtime/monospace-D116QD2a-C40p3Rv8.js.map +1 -0
- package/dist/browser/editor-runtime/monospace-ex-DcXpouKS-DkaktwPJ.js +6014 -0
- package/dist/browser/editor-runtime/monospace-ex-DcXpouKS-DkaktwPJ.js.map +1 -0
- package/dist/browser/editor-runtime/monospace-l-Ct5wkMDs-CuE7t5pv.js +3114 -0
- package/dist/browser/editor-runtime/monospace-l-Ct5wkMDs-CuE7t5pv.js.map +1 -0
- package/dist/browser/editor-runtime/mshapes-DCp86WSX-DX0WfJid.js +524 -0
- package/dist/browser/editor-runtime/mshapes-DCp86WSX-DX0WfJid.js.map +1 -0
- package/dist/browser/editor-runtime/phonetics-BwOCw2Y9-lJWnARqt.js +2496 -0
- package/dist/browser/editor-runtime/phonetics-BwOCw2Y9-lJWnARqt.js.map +1 -0
- package/dist/browser/editor-runtime/phonetics-ss-CRtMn02f-Cr32SJLL.js +2984 -0
- package/dist/browser/editor-runtime/phonetics-ss-CRtMn02f-Cr32SJLL.js.map +1 -0
- package/dist/browser/editor-runtime/sans-serif-BYPZKlE9-DftjSdim.js +5246 -0
- package/dist/browser/editor-runtime/sans-serif-BYPZKlE9-DftjSdim.js.map +1 -0
- package/dist/browser/editor-runtime/sans-serif-b-B0kRKiC--BsRQiyQP.js +3176 -0
- package/dist/browser/editor-runtime/sans-serif-b-B0kRKiC--BsRQiyQP.js.map +1 -0
- package/dist/browser/editor-runtime/sans-serif-bi-DXWul6mu-D4NuD72A.js +3688 -0
- package/dist/browser/editor-runtime/sans-serif-bi-DXWul6mu-D4NuD72A.js.map +1 -0
- package/dist/browser/editor-runtime/sans-serif-ex-Boux1kMP-BrL4RNcD.js +10033 -0
- package/dist/browser/editor-runtime/sans-serif-ex-Boux1kMP-BrL4RNcD.js.map +1 -0
- package/dist/browser/editor-runtime/sans-serif-i-676RFaSO-BCRikTTw.js +3635 -0
- package/dist/browser/editor-runtime/sans-serif-i-676RFaSO-BCRikTTw.js.map +1 -0
- package/dist/browser/editor-runtime/sans-serif-r-DrN9xdZt-CN8omxfu.js +3159 -0
- package/dist/browser/editor-runtime/sans-serif-r-DrN9xdZt-CN8omxfu.js.map +1 -0
- package/dist/browser/editor-runtime/script-0ohehnXc-4G2PiBkk.js +649 -0
- package/dist/browser/editor-runtime/script-0ohehnXc-4G2PiBkk.js.map +1 -0
- package/dist/browser/editor-runtime/shapes-BG47NodJ-D3eH0HjT.js +1932 -0
- package/dist/browser/editor-runtime/shapes-BG47NodJ-D3eH0HjT.js.map +1 -0
- package/dist/browser/editor-runtime/speech-worker-CP5P4gRS-OkQyXQak.js +157 -0
- package/dist/browser/editor-runtime/speech-worker-CP5P4gRS-OkQyXQak.js.map +1 -0
- package/dist/browser/editor-runtime/symbols-BqnUxf_t-DJHA_nO7.js +1833 -0
- package/dist/browser/editor-runtime/symbols-BqnUxf_t-DJHA_nO7.js.map +1 -0
- package/dist/browser/editor-runtime/symbols-b-i-eg9k5hmF-Bn-dxZT_.js +1153 -0
- package/dist/browser/editor-runtime/symbols-b-i-eg9k5hmF-Bn-dxZT_.js.map +1 -0
- package/dist/browser/editor-runtime/variants-2LRNhOUP-BlL4NIVJ.js +231 -0
- package/dist/browser/editor-runtime/variants-2LRNhOUP-BlL4NIVJ.js.map +1 -0
- package/dist/browser/fraktur-rLEq9DEH-BU0iR4xw.js +694 -0
- package/dist/browser/fraktur-rLEq9DEH-BU0iR4xw.js.map +1 -0
- package/dist/browser/greek-BlraJTyL-DAfjxxNh.js +9335 -0
- package/dist/browser/greek-BlraJTyL-DAfjxxNh.js.map +1 -0
- package/dist/browser/greek-ss-D-EN2PK0-CcyaecGS.js +6767 -0
- package/dist/browser/greek-ss-D-EN2PK0-CcyaecGS.js.map +1 -0
- package/dist/browser/hebrew-GiQZeybp-DqJrAkkB.js +3218 -0
- package/dist/browser/hebrew-GiQZeybp-DqJrAkkB.js.map +1 -0
- package/dist/browser/latin-b-BhEnC7R2-CQAVv0CI.js +3134 -0
- package/dist/browser/latin-b-BhEnC7R2-CQAVv0CI.js.map +1 -0
- package/dist/browser/latin-bi-DqiIKv3U-DM22wSUP.js +3637 -0
- package/dist/browser/latin-bi-DqiIKv3U-DM22wSUP.js.map +1 -0
- package/dist/browser/latin-i-B1xtwaE1-uBpJAGjo.js +3634 -0
- package/dist/browser/latin-i-B1xtwaE1-uBpJAGjo.js.map +1 -0
- package/dist/browser/latin-xfWFlLkD-CKElfDKc.js +3266 -0
- package/dist/browser/latin-xfWFlLkD-CKElfDKc.js.map +1 -0
- package/dist/browser/marrows-DD1NgMQi-BIBP-NrK.js +761 -0
- package/dist/browser/marrows-DD1NgMQi-BIBP-NrK.js.map +1 -0
- package/dist/browser/math-DpWn1mbG-B7Krt7Jk.js +2034 -0
- package/dist/browser/math-DpWn1mbG-B7Krt7Jk.js.map +1 -0
- package/dist/browser/mathjax-BKrHE4xs-DMJdB93L.js +36692 -0
- package/dist/browser/mathjax-BKrHE4xs-DMJdB93L.js.map +1 -0
- package/dist/browser/monospace-D116QD2a-C40p3Rv8.js +1112 -0
- package/dist/browser/monospace-D116QD2a-C40p3Rv8.js.map +1 -0
- package/dist/browser/monospace-ex-DcXpouKS-DkaktwPJ.js +6014 -0
- package/dist/browser/monospace-ex-DcXpouKS-DkaktwPJ.js.map +1 -0
- package/dist/browser/monospace-l-Ct5wkMDs-CuE7t5pv.js +3114 -0
- package/dist/browser/monospace-l-Ct5wkMDs-CuE7t5pv.js.map +1 -0
- package/dist/browser/mshapes-DCp86WSX-DX0WfJid.js +524 -0
- package/dist/browser/mshapes-DCp86WSX-DX0WfJid.js.map +1 -0
- package/dist/browser/phonetics-BwOCw2Y9-lJWnARqt.js +2496 -0
- package/dist/browser/phonetics-BwOCw2Y9-lJWnARqt.js.map +1 -0
- package/dist/browser/phonetics-ss-CRtMn02f-Cr32SJLL.js +2984 -0
- package/dist/browser/phonetics-ss-CRtMn02f-Cr32SJLL.js.map +1 -0
- package/dist/browser/sans-serif-BYPZKlE9-DftjSdim.js +5246 -0
- package/dist/browser/sans-serif-BYPZKlE9-DftjSdim.js.map +1 -0
- package/dist/browser/sans-serif-b-B0kRKiC--BsRQiyQP.js +3176 -0
- package/dist/browser/sans-serif-b-B0kRKiC--BsRQiyQP.js.map +1 -0
- package/dist/browser/sans-serif-bi-DXWul6mu-D4NuD72A.js +3688 -0
- package/dist/browser/sans-serif-bi-DXWul6mu-D4NuD72A.js.map +1 -0
- package/dist/browser/sans-serif-ex-Boux1kMP-BrL4RNcD.js +10033 -0
- package/dist/browser/sans-serif-ex-Boux1kMP-BrL4RNcD.js.map +1 -0
- package/dist/browser/sans-serif-i-676RFaSO-BCRikTTw.js +3635 -0
- package/dist/browser/sans-serif-i-676RFaSO-BCRikTTw.js.map +1 -0
- package/dist/browser/sans-serif-r-DrN9xdZt-CN8omxfu.js +3159 -0
- package/dist/browser/sans-serif-r-DrN9xdZt-CN8omxfu.js.map +1 -0
- package/dist/browser/script-0ohehnXc-4G2PiBkk.js +649 -0
- package/dist/browser/script-0ohehnXc-4G2PiBkk.js.map +1 -0
- package/dist/browser/shapes-BG47NodJ-D3eH0HjT.js +1932 -0
- package/dist/browser/shapes-BG47NodJ-D3eH0HjT.js.map +1 -0
- package/dist/browser/speech-worker-CP5P4gRS-G4rtBs8u.js +157 -0
- package/dist/browser/speech-worker-CP5P4gRS-G4rtBs8u.js.map +1 -0
- package/dist/browser/symbols-BqnUxf_t-DJHA_nO7.js +1833 -0
- package/dist/browser/symbols-BqnUxf_t-DJHA_nO7.js.map +1 -0
- package/dist/browser/symbols-b-i-eg9k5hmF-Bn-dxZT_.js +1153 -0
- package/dist/browser/symbols-b-i-eg9k5hmF-Bn-dxZT_.js.map +1 -0
- package/dist/browser/variants-2LRNhOUP-BlL4NIVJ.js +231 -0
- package/dist/browser/variants-2LRNhOUP-BlL4NIVJ.js.map +1 -0
- package/dist/controller/defaults.d.ts +19 -0
- package/dist/controller/defaults.js +21 -0
- package/dist/controller/index.d.ts +46 -0
- package/dist/controller/index.js +124 -0
- package/dist/controller/utils.d.ts +4 -0
- package/dist/controller/utils.js +13 -0
- package/dist/delivery/__tests__/inline-dropdown-language.test.d.ts +1 -0
- package/dist/delivery/index.d.ts +14 -0
- package/dist/delivery/index.js +64 -0
- package/dist/delivery/inline-dropdown.d.ts +30 -0
- package/dist/delivery/inline-dropdown.js +111 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +6 -0
- package/dist/index.iife.js +185 -0
- package/dist/index.js +2 -0
- package/dist/runtime-support.d.ts +12 -0
- package/dist/runtime-support.js +12 -0
- package/package.json +92 -32
- package/CHANGELOG.json +0 -1082
- package/CHANGELOG.md +0 -3440
- package/LICENSE.md +0 -5
- package/README.md +0 -1
- package/configure/CHANGELOG.json +0 -647
- package/configure/CHANGELOG.md +0 -3066
- package/configure/lib/defaults.js +0 -190
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/index.js +0 -209
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/inline-dropdown-toolbar.js +0 -573
- package/configure/lib/inline-dropdown-toolbar.js.map +0 -1
- package/configure/lib/main.js +0 -753
- package/configure/lib/main.js.map +0 -1
- package/configure/lib/markupUtils.js +0 -70
- package/configure/lib/markupUtils.js.map +0 -1
- package/configure/lib/response-area.js +0 -99
- package/configure/lib/response-area.js.map +0 -1
- package/configure/lib/utils.js +0 -33
- package/configure/lib/utils.js.map +0 -1
- package/configure/package.json +0 -22
- package/controller/CHANGELOG.json +0 -467
- package/controller/CHANGELOG.md +0 -2114
- package/controller/lib/defaults.js +0 -26
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -360
- package/controller/lib/index.js.map +0 -1
- package/controller/lib/utils.js +0 -40
- package/controller/lib/utils.js.map +0 -1
- package/controller/package.json +0 -16
- package/docs/config-schema.json +0 -2854
- package/docs/config-schema.json.md +0 -2106
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -76
- package/docs/demo/index.html +0 -1
- package/docs/demo/session.js +0 -11
- package/docs/pie-schema.json +0 -1152
- package/docs/pie-schema.json.md +0 -814
- package/esm/configure.js +0 -1973
- package/esm/configure.js.map +0 -1
- package/esm/controller.js +0 -304
- package/esm/controller.js.map +0 -1
- package/esm/element.js +0 -278
- package/esm/element.js.map +0 -1
- package/lib/index.js +0 -130
- package/lib/index.js.map +0 -1
- package/lib/inline-dropdown.js +0 -248
- package/lib/inline-dropdown.js.map +0 -1
|
@@ -0,0 +1,1307 @@
|
|
|
1
|
+
import { m as e } from "../speech-worker-CP5P4gRS-OkQyXQak.js";
|
|
2
|
+
import { A as t, Bt as n, M as r, N as i, S as a, a as o, d as s, f as c, ft as l, gt as u, i as d, k as f, m as p, mt as m, n as h, o as g, p as _, pt as v, t as y, v as b, w as x, z as S, zt as C } from "../Close-D72n8bzo.js";
|
|
3
|
+
import { c as w, n as T } from "../dist-FMIRkZir.js";
|
|
4
|
+
import E, { useRef as ee } from "react";
|
|
5
|
+
import { createRoot as te } from "react-dom/client";
|
|
6
|
+
import ne from "react-dom";
|
|
7
|
+
import { Fragment as re, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
8
|
+
//#region ../../shared/player-events/dist/index.js
|
|
9
|
+
var ie = class e extends CustomEvent {
|
|
10
|
+
static {
|
|
11
|
+
this.TYPE = "model-set";
|
|
12
|
+
}
|
|
13
|
+
constructor(t, n, r) {
|
|
14
|
+
super(e.TYPE, {
|
|
15
|
+
bubbles: !0,
|
|
16
|
+
composed: !0,
|
|
17
|
+
detail: {
|
|
18
|
+
complete: n,
|
|
19
|
+
component: t,
|
|
20
|
+
hasModel: r
|
|
21
|
+
}
|
|
22
|
+
}), this.component = t, this.complete = n;
|
|
23
|
+
}
|
|
24
|
+
}, ae = class e extends CustomEvent {
|
|
25
|
+
static {
|
|
26
|
+
this.TYPE = "session-changed";
|
|
27
|
+
}
|
|
28
|
+
constructor(t, n) {
|
|
29
|
+
super(e.TYPE, {
|
|
30
|
+
bubbles: !0,
|
|
31
|
+
composed: !0,
|
|
32
|
+
detail: {
|
|
33
|
+
complete: n,
|
|
34
|
+
component: t
|
|
35
|
+
}
|
|
36
|
+
}), this.component = t, this.complete = n;
|
|
37
|
+
}
|
|
38
|
+
}, k = /* @__PURE__ */ e(C(), 1), oe = "height ease-in 300ms, opacity ease-in 300ms", se = u("div")(() => ({
|
|
39
|
+
position: "relative",
|
|
40
|
+
height: 0,
|
|
41
|
+
overflow: "hidden",
|
|
42
|
+
display: "flex",
|
|
43
|
+
visibility: "hidden",
|
|
44
|
+
width: 0,
|
|
45
|
+
"&.enter": {
|
|
46
|
+
transition: oe,
|
|
47
|
+
opacity: 1,
|
|
48
|
+
height: "auto",
|
|
49
|
+
width: "auto",
|
|
50
|
+
visibility: "visible",
|
|
51
|
+
minHeight: "25px"
|
|
52
|
+
},
|
|
53
|
+
"&.enter-done": {
|
|
54
|
+
height: "auto",
|
|
55
|
+
visibility: "visible",
|
|
56
|
+
width: "auto",
|
|
57
|
+
minHeight: "25px"
|
|
58
|
+
},
|
|
59
|
+
"&.exit": {
|
|
60
|
+
transition: oe,
|
|
61
|
+
opacity: 0,
|
|
62
|
+
height: 0,
|
|
63
|
+
visibility: "visible",
|
|
64
|
+
width: 0
|
|
65
|
+
},
|
|
66
|
+
"&.exit-done": {
|
|
67
|
+
opacity: 0,
|
|
68
|
+
visibility: "hidden",
|
|
69
|
+
height: 0,
|
|
70
|
+
width: 0
|
|
71
|
+
}
|
|
72
|
+
})), ce = (e) => {
|
|
73
|
+
let { show: t, children: n, className: r } = e, i = ee(null);
|
|
74
|
+
return /* @__PURE__ */ D(m, {
|
|
75
|
+
nodeRef: i,
|
|
76
|
+
in: t,
|
|
77
|
+
appear: !0,
|
|
78
|
+
mountOnEnter: !1,
|
|
79
|
+
timeout: 300,
|
|
80
|
+
classNames: {
|
|
81
|
+
enter: "enter",
|
|
82
|
+
enterDone: "enter-done",
|
|
83
|
+
exit: "exit",
|
|
84
|
+
exitDone: "exit-done"
|
|
85
|
+
},
|
|
86
|
+
children: /* @__PURE__ */ D(se, {
|
|
87
|
+
ref: i,
|
|
88
|
+
className: r,
|
|
89
|
+
children: n
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
ce.propTypes = {
|
|
94
|
+
show: k.default.bool.isRequired,
|
|
95
|
+
className: k.default.string,
|
|
96
|
+
children: k.default.oneOfType([k.default.arrayOf(k.default.node), k.default.node]).isRequired
|
|
97
|
+
};
|
|
98
|
+
//#endregion
|
|
99
|
+
//#region ../../lib-react/icons/dist/correct-response-icon.js
|
|
100
|
+
var le = ({ bgFill: e, fgFill: t }) => /* @__PURE__ */ O("svg", {
|
|
101
|
+
"aria-hidden": "true",
|
|
102
|
+
focusable: "false",
|
|
103
|
+
preserveAspectRatio: "xMinYMin meet",
|
|
104
|
+
version: "1.1",
|
|
105
|
+
viewBox: "-283 359 34 35",
|
|
106
|
+
style: { enableBackground: "new -283 359 34 35" },
|
|
107
|
+
children: [
|
|
108
|
+
/* @__PURE__ */ D("circle", {
|
|
109
|
+
cx: "-266",
|
|
110
|
+
cy: "375.9",
|
|
111
|
+
r: "14",
|
|
112
|
+
fill: e
|
|
113
|
+
}),
|
|
114
|
+
/* @__PURE__ */ D("path", {
|
|
115
|
+
d: "M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z\n M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z",
|
|
116
|
+
fill: e
|
|
117
|
+
}),
|
|
118
|
+
/* @__PURE__ */ D("polygon", {
|
|
119
|
+
points: "-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6",
|
|
120
|
+
fill: t
|
|
121
|
+
})
|
|
122
|
+
]
|
|
123
|
+
});
|
|
124
|
+
le.propTypes = {
|
|
125
|
+
bgFill: k.default.string.isRequired,
|
|
126
|
+
fgFill: k.default.string.isRequired
|
|
127
|
+
};
|
|
128
|
+
var ue = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ O("svg", {
|
|
129
|
+
"aria-hidden": "true",
|
|
130
|
+
focusable: "false",
|
|
131
|
+
preserveAspectRatio: "xMinYMin meet",
|
|
132
|
+
version: "1.1",
|
|
133
|
+
viewBox: "-129.5 127 34 35",
|
|
134
|
+
style: { enableBackground: "new -129.5 127 34 35" },
|
|
135
|
+
children: [
|
|
136
|
+
/* @__PURE__ */ D("path", {
|
|
137
|
+
style: {
|
|
138
|
+
fill: "#D0CAC5",
|
|
139
|
+
stroke: "#E6E3E0",
|
|
140
|
+
strokeWidth: .75,
|
|
141
|
+
strokeMiterlimit: 10
|
|
142
|
+
},
|
|
143
|
+
d: "M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5\n C-97.4,153.5-104.3,160.4-112.9,160.4z"
|
|
144
|
+
}),
|
|
145
|
+
/* @__PURE__ */ D("path", {
|
|
146
|
+
style: {
|
|
147
|
+
fill: "#B3ABA4",
|
|
148
|
+
stroke: "#CDC7C2",
|
|
149
|
+
strokeWidth: .5,
|
|
150
|
+
strokeMiterlimit: 10
|
|
151
|
+
},
|
|
152
|
+
d: "M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z"
|
|
153
|
+
}),
|
|
154
|
+
/* @__PURE__ */ D("circle", {
|
|
155
|
+
cx: "-114.2",
|
|
156
|
+
cy: "143.5",
|
|
157
|
+
r: "14",
|
|
158
|
+
fill: e
|
|
159
|
+
}),
|
|
160
|
+
/* @__PURE__ */ D("path", {
|
|
161
|
+
d: "M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z\n M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z",
|
|
162
|
+
fill: n
|
|
163
|
+
}),
|
|
164
|
+
/* @__PURE__ */ D("polygon", {
|
|
165
|
+
points: "-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2",
|
|
166
|
+
fill: t
|
|
167
|
+
})
|
|
168
|
+
]
|
|
169
|
+
});
|
|
170
|
+
ue.propTypes = {
|
|
171
|
+
bgFill: k.default.string.isRequired,
|
|
172
|
+
fgFill: k.default.string.isRequired,
|
|
173
|
+
borderFill: k.default.string.isRequired
|
|
174
|
+
};
|
|
175
|
+
var de = u("div")(({ size: e }) => ({
|
|
176
|
+
width: e || "25px",
|
|
177
|
+
height: e || "25px"
|
|
178
|
+
})), A = ({ open: e, size: t }) => /* @__PURE__ */ D(de, {
|
|
179
|
+
size: t,
|
|
180
|
+
children: e ? /* @__PURE__ */ D(le, {
|
|
181
|
+
bgFill: "#bce2ff",
|
|
182
|
+
fgFill: "#1a9cff"
|
|
183
|
+
}) : /* @__PURE__ */ D(ue, {
|
|
184
|
+
bgFill: "white",
|
|
185
|
+
fgFill: "#1a9cff",
|
|
186
|
+
borderFill: "#bce2ff"
|
|
187
|
+
})
|
|
188
|
+
});
|
|
189
|
+
A.propTypes = {
|
|
190
|
+
open: k.default.bool,
|
|
191
|
+
size: k.default.string
|
|
192
|
+
}, A.defaultProps = { open: !1 };
|
|
193
|
+
//#endregion
|
|
194
|
+
//#region ../../lib-react/correct-answer-toggle/dist/index.js
|
|
195
|
+
function j(e) {
|
|
196
|
+
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
197
|
+
}
|
|
198
|
+
function fe(e, t) {
|
|
199
|
+
return !e || j(e) ? e : j(e.default) ? e.default : t && j(e[t]) ? e[t] : t && j(e[t]?.default) ? e[t].default : e;
|
|
200
|
+
}
|
|
201
|
+
var pe = fe(_, "Readable") || fe(he.Readable, "Readable"), me = o, M = me.default, he = M && typeof M == "object" ? M : me, { translator: N } = t, ge = {
|
|
202
|
+
WebkitTouchCallout: "none",
|
|
203
|
+
WebkitUserSelect: "none",
|
|
204
|
+
KhtmlUserSelect: "none",
|
|
205
|
+
MozUserSelect: "none",
|
|
206
|
+
msUserSelect: "none",
|
|
207
|
+
userSelect: "none"
|
|
208
|
+
}, _e = u("div")(() => ({
|
|
209
|
+
width: "100%",
|
|
210
|
+
cursor: "pointer"
|
|
211
|
+
})), ve = u("button")(() => ({
|
|
212
|
+
margin: "0 auto",
|
|
213
|
+
textAlign: "center",
|
|
214
|
+
display: "flex",
|
|
215
|
+
minWidth: "24px",
|
|
216
|
+
minHeight: "24px",
|
|
217
|
+
padding: 0,
|
|
218
|
+
border: 0,
|
|
219
|
+
background: "none",
|
|
220
|
+
color: "inherit",
|
|
221
|
+
font: "inherit",
|
|
222
|
+
cursor: "pointer",
|
|
223
|
+
"&:focus-visible": {
|
|
224
|
+
outline: `2px solid ${v.buttonFocusOutline()}`,
|
|
225
|
+
outlineOffset: "-2px"
|
|
226
|
+
}
|
|
227
|
+
})), ye = u("div")(() => ({
|
|
228
|
+
width: "fit-content",
|
|
229
|
+
minWidth: "140px",
|
|
230
|
+
alignSelf: "center",
|
|
231
|
+
verticalAlign: "middle",
|
|
232
|
+
color: `var(--correct-answer-toggle-label-color, ${v.text()})`,
|
|
233
|
+
fontWeight: "normal",
|
|
234
|
+
...ge
|
|
235
|
+
})), be = u("div")(() => ({
|
|
236
|
+
position: "absolute",
|
|
237
|
+
width: "25px",
|
|
238
|
+
"&.enter": { opacity: "0" },
|
|
239
|
+
"&.enter-active": {
|
|
240
|
+
opacity: "1",
|
|
241
|
+
transition: "opacity 0.3s ease-in"
|
|
242
|
+
},
|
|
243
|
+
"&.exit": { opacity: "1" },
|
|
244
|
+
"&.exit-active": {
|
|
245
|
+
opacity: "0",
|
|
246
|
+
transition: "opacity 0.3s ease-in"
|
|
247
|
+
}
|
|
248
|
+
})), xe = u("div")(() => ({
|
|
249
|
+
width: "25px",
|
|
250
|
+
marginRight: "5px",
|
|
251
|
+
display: "flex",
|
|
252
|
+
alignItems: "center"
|
|
253
|
+
})), Se = class e extends E.Component {
|
|
254
|
+
static propTypes = {
|
|
255
|
+
onToggle: k.default.func,
|
|
256
|
+
toggled: k.default.bool,
|
|
257
|
+
show: k.default.bool,
|
|
258
|
+
hideMessage: k.default.string,
|
|
259
|
+
showMessage: k.default.string,
|
|
260
|
+
className: k.default.string,
|
|
261
|
+
language: k.default.string
|
|
262
|
+
};
|
|
263
|
+
static defaultProps = {
|
|
264
|
+
showMessage: "Show correct answer",
|
|
265
|
+
hideMessage: "Hide correct answer",
|
|
266
|
+
show: !1,
|
|
267
|
+
toggled: !1
|
|
268
|
+
};
|
|
269
|
+
constructor(t) {
|
|
270
|
+
super(t), this.state = { show: t.show }, this.openIconRef = E.createRef(), this.closedIconRef = E.createRef(), e.defaultProps = {
|
|
271
|
+
...e.defaultProps,
|
|
272
|
+
showMessage: N.t("common:showCorrectAnswer", { lng: t.language }),
|
|
273
|
+
hideMessage: N.t("common:hideCorrectAnswer", { lng: t.language })
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
onClick() {
|
|
277
|
+
this.props.onToggle(!this.props.toggled);
|
|
278
|
+
}
|
|
279
|
+
onTouch(e) {
|
|
280
|
+
e.preventDefault(), this.props.onToggle(!this.props.toggled);
|
|
281
|
+
}
|
|
282
|
+
UNSAFE_componentWillReceiveProps(t) {
|
|
283
|
+
this.setState({ show: t.show }), t.language !== this.props?.language && (e.defaultProps = {
|
|
284
|
+
...e.defaultProps,
|
|
285
|
+
showMessage: N.t("common:showCorrectAnswer", { lng: t.language }),
|
|
286
|
+
hideMessage: N.t("common:hideCorrectAnswer", { lng: t.language })
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
render() {
|
|
290
|
+
let { className: e, toggled: t, hideMessage: n, showMessage: r } = this.props;
|
|
291
|
+
return /* @__PURE__ */ D(_e, {
|
|
292
|
+
className: e,
|
|
293
|
+
children: /* @__PURE__ */ D(ce, {
|
|
294
|
+
show: this.state.show,
|
|
295
|
+
children: /* @__PURE__ */ O(ve, {
|
|
296
|
+
type: "button",
|
|
297
|
+
"aria-pressed": !!t,
|
|
298
|
+
onClick: this.onClick.bind(this),
|
|
299
|
+
onTouchEnd: this.onTouch.bind(this),
|
|
300
|
+
children: [/* @__PURE__ */ O(xe, { children: [/* @__PURE__ */ D(m, {
|
|
301
|
+
nodeRef: this.openIconRef,
|
|
302
|
+
timeout: 400,
|
|
303
|
+
in: t,
|
|
304
|
+
exit: !t,
|
|
305
|
+
classNames: {
|
|
306
|
+
enter: "enter",
|
|
307
|
+
enterActive: "enter-active",
|
|
308
|
+
exit: "exit",
|
|
309
|
+
exitActive: "exit-active"
|
|
310
|
+
},
|
|
311
|
+
children: /* @__PURE__ */ D(be, {
|
|
312
|
+
ref: this.openIconRef,
|
|
313
|
+
children: /* @__PURE__ */ D(A, { open: t }, "correct-open")
|
|
314
|
+
})
|
|
315
|
+
}), /* @__PURE__ */ D(m, {
|
|
316
|
+
nodeRef: this.closedIconRef,
|
|
317
|
+
timeout: 5e3,
|
|
318
|
+
in: !t,
|
|
319
|
+
exit: t,
|
|
320
|
+
classNames: {
|
|
321
|
+
enter: "enter",
|
|
322
|
+
enterActive: "enter-active",
|
|
323
|
+
exit: "exit",
|
|
324
|
+
exitActive: "exit-active"
|
|
325
|
+
},
|
|
326
|
+
children: /* @__PURE__ */ D(be, {
|
|
327
|
+
ref: this.closedIconRef,
|
|
328
|
+
children: /* @__PURE__ */ D(A, { open: t }, "correct-closed")
|
|
329
|
+
})
|
|
330
|
+
})] }), /* @__PURE__ */ D(pe, {
|
|
331
|
+
false: !0,
|
|
332
|
+
children: /* @__PURE__ */ D(ye, {
|
|
333
|
+
"aria-hidden": !this.state.show,
|
|
334
|
+
children: t ? n : r
|
|
335
|
+
})
|
|
336
|
+
})]
|
|
337
|
+
})
|
|
338
|
+
})
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
}, Ce = /\{\{(\d+)\}\}/g, we = (e, t) => e ? { markup: e.replace(Ce, (e, n) => `<span data-component="${t}" data-id="${n}"></span>`) } : { markup: "" }, P = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), F = /* @__PURE__ */ P(((e, t) => {
|
|
342
|
+
t.exports = {
|
|
343
|
+
"border-radius": 1,
|
|
344
|
+
"border-top-left-radius": 1,
|
|
345
|
+
"border-top-right-radius": 1,
|
|
346
|
+
"border-bottom-left-radius": 1,
|
|
347
|
+
"border-bottom-right-radius": 1,
|
|
348
|
+
"box-shadow": 1,
|
|
349
|
+
order: 1,
|
|
350
|
+
flex: function(e, t) {
|
|
351
|
+
return [t + "box-flex"];
|
|
352
|
+
},
|
|
353
|
+
"box-flex": 1,
|
|
354
|
+
"box-align": 1,
|
|
355
|
+
animation: 1,
|
|
356
|
+
"animation-duration": 1,
|
|
357
|
+
"animation-name": 1,
|
|
358
|
+
transition: 1,
|
|
359
|
+
"transition-duration": 1,
|
|
360
|
+
transform: 1,
|
|
361
|
+
"transform-style": 1,
|
|
362
|
+
"transform-origin": 1,
|
|
363
|
+
"backface-visibility": 1,
|
|
364
|
+
perspective: 1,
|
|
365
|
+
"box-pack": 1
|
|
366
|
+
};
|
|
367
|
+
}));
|
|
368
|
+
F();
|
|
369
|
+
//#endregion
|
|
370
|
+
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/cssUnitless.js
|
|
371
|
+
var I = /* @__PURE__ */ P(((e, t) => {
|
|
372
|
+
t.exports = {
|
|
373
|
+
animation: 1,
|
|
374
|
+
"column-count": 1,
|
|
375
|
+
columns: 1,
|
|
376
|
+
"font-weight": 1,
|
|
377
|
+
opacity: 1,
|
|
378
|
+
"order ": 1,
|
|
379
|
+
"z-index": 1,
|
|
380
|
+
zoom: 1,
|
|
381
|
+
flex: 1,
|
|
382
|
+
"box-flex": 1,
|
|
383
|
+
transform: 1,
|
|
384
|
+
perspective: 1,
|
|
385
|
+
"box-pack": 1,
|
|
386
|
+
"box-align": 1,
|
|
387
|
+
colspan: 1,
|
|
388
|
+
rowspan: 1
|
|
389
|
+
};
|
|
390
|
+
}));
|
|
391
|
+
I();
|
|
392
|
+
//#endregion
|
|
393
|
+
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/toUpperFirst.js
|
|
394
|
+
var L = /* @__PURE__ */ P(((e, t) => {
|
|
395
|
+
t.exports = function(e) {
|
|
396
|
+
return e.length ? e.charAt(0).toUpperCase() + e.substring(1) : e;
|
|
397
|
+
};
|
|
398
|
+
}));
|
|
399
|
+
L();
|
|
400
|
+
//#endregion
|
|
401
|
+
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/prefixInfo.js
|
|
402
|
+
var R = /* @__PURE__ */ P(((e, t) => {
|
|
403
|
+
var n = L(), r = /^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/, i = typeof document > "u" ? {} : document.documentElement.style;
|
|
404
|
+
t.exports = (function() {
|
|
405
|
+
var e = (function() {
|
|
406
|
+
for (var e in i) if (r.test(e)) return e.match(r)[0];
|
|
407
|
+
return "WebkitOpacity" in i ? "Webkit" : "KhtmlOpacity" in i ? "Khtml" : "";
|
|
408
|
+
})();
|
|
409
|
+
return {
|
|
410
|
+
style: e,
|
|
411
|
+
css: "-" + e.toLowerCase() + "-",
|
|
412
|
+
dom: {
|
|
413
|
+
Webkit: "WebKit",
|
|
414
|
+
ms: "MS",
|
|
415
|
+
o: "WebKit"
|
|
416
|
+
}[e] || n(e)
|
|
417
|
+
};
|
|
418
|
+
})();
|
|
419
|
+
}));
|
|
420
|
+
R();
|
|
421
|
+
//#endregion
|
|
422
|
+
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/hyphenRe.js
|
|
423
|
+
var Te = /* @__PURE__ */ P(((e, t) => {
|
|
424
|
+
t.exports = /[-\s]+(.)?/g;
|
|
425
|
+
}));
|
|
426
|
+
Te();
|
|
427
|
+
//#endregion
|
|
428
|
+
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/camelize.js
|
|
429
|
+
var z = /* @__PURE__ */ P(((e, t) => {
|
|
430
|
+
var n = function(e, t) {
|
|
431
|
+
return t ? t.toUpperCase() : "";
|
|
432
|
+
}, r = Te();
|
|
433
|
+
t.exports = function(e) {
|
|
434
|
+
return e ? e.replace(r, n) : "";
|
|
435
|
+
};
|
|
436
|
+
}));
|
|
437
|
+
z();
|
|
438
|
+
//#endregion
|
|
439
|
+
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/separate.js
|
|
440
|
+
var Ee = /* @__PURE__ */ P(((e, t) => {
|
|
441
|
+
var n = /::/g, r = /([A-Z]+)([A-Z][a-z])/g, i = /([a-z\d])([A-Z])/g, a = /_/g;
|
|
442
|
+
t.exports = function(e, t) {
|
|
443
|
+
return e ? e.replace(n, "/").replace(r, "$1_$2").replace(i, "$1_$2").replace(a, t || "-") : "";
|
|
444
|
+
};
|
|
445
|
+
}));
|
|
446
|
+
Ee();
|
|
447
|
+
//#endregion
|
|
448
|
+
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/hyphenate.js
|
|
449
|
+
var B = /* @__PURE__ */ P(((e, t) => {
|
|
450
|
+
var n = Ee();
|
|
451
|
+
t.exports = function(e) {
|
|
452
|
+
return n(e).toLowerCase();
|
|
453
|
+
};
|
|
454
|
+
}));
|
|
455
|
+
B();
|
|
456
|
+
//#endregion
|
|
457
|
+
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/stringUtils/toLowerFirst.js
|
|
458
|
+
var De = /* @__PURE__ */ P(((e, t) => {
|
|
459
|
+
t.exports = function(e) {
|
|
460
|
+
return e.length ? e.charAt(0).toLowerCase() + e.substring(1) : e;
|
|
461
|
+
};
|
|
462
|
+
}));
|
|
463
|
+
De();
|
|
464
|
+
//#endregion
|
|
465
|
+
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/prefixer.js
|
|
466
|
+
var Oe = /* @__PURE__ */ P(((e, t) => {
|
|
467
|
+
var n = z(), r = B(), i = De(), a = L(), o = R(), s = F(), c = typeof document > "u" ? {} : document.documentElement.style;
|
|
468
|
+
t.exports = function(e) {
|
|
469
|
+
return function(t, l) {
|
|
470
|
+
l ||= {};
|
|
471
|
+
var u = i(n(t)), d = r(t), f = e ? u : d, p = o.style ? e ? o.style : o.css : "";
|
|
472
|
+
if (u in c) return l.asString ? f : [f];
|
|
473
|
+
var m = f, h = s[d], g = [];
|
|
474
|
+
if (e && (m = a(f)), typeof h == "function") {
|
|
475
|
+
var _ = h(f, p) || [];
|
|
476
|
+
_ && !Array.isArray(_) && (_ = [_]), _.length && (_ = _.map(function(t) {
|
|
477
|
+
return e ? i(n(t)) : r(t);
|
|
478
|
+
})), g = g.concat(_);
|
|
479
|
+
}
|
|
480
|
+
return p && g.push(p + m), g.push(f), l.asString || g.length == 1 ? g[0] : g;
|
|
481
|
+
};
|
|
482
|
+
};
|
|
483
|
+
}));
|
|
484
|
+
Oe();
|
|
485
|
+
//#endregion
|
|
486
|
+
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/cssPrefix.js
|
|
487
|
+
var ke = /* @__PURE__ */ P(((e, t) => {
|
|
488
|
+
t.exports = Oe()();
|
|
489
|
+
}));
|
|
490
|
+
ke();
|
|
491
|
+
//#endregion
|
|
492
|
+
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/hasOwn.js
|
|
493
|
+
var V = /* @__PURE__ */ P(((e, t) => {
|
|
494
|
+
var n = Object.prototype.hasOwnProperty;
|
|
495
|
+
t.exports = function(e, t) {
|
|
496
|
+
return n.call(e, t);
|
|
497
|
+
};
|
|
498
|
+
}));
|
|
499
|
+
V();
|
|
500
|
+
//#endregion
|
|
501
|
+
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/isObject.js
|
|
502
|
+
var Ae = /* @__PURE__ */ P(((e, t) => {
|
|
503
|
+
var n = Object.prototype.toString;
|
|
504
|
+
t.exports = function(e) {
|
|
505
|
+
return !!e && n.call(e) === "[object Object]";
|
|
506
|
+
};
|
|
507
|
+
}));
|
|
508
|
+
Ae();
|
|
509
|
+
//#endregion
|
|
510
|
+
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/isFunction.js
|
|
511
|
+
var je = /* @__PURE__ */ P(((e, t) => {
|
|
512
|
+
var n = Object.prototype.toString;
|
|
513
|
+
t.exports = function(e) {
|
|
514
|
+
return n.apply(e) === "[object Function]";
|
|
515
|
+
};
|
|
516
|
+
}));
|
|
517
|
+
je();
|
|
518
|
+
//#endregion
|
|
519
|
+
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/toStyleObject.js
|
|
520
|
+
var H = /* @__PURE__ */ P(((e, t) => {
|
|
521
|
+
R();
|
|
522
|
+
var n = ke(), r = B(), i = z(), a = V(), o = Ae(), s = je(), c = function(e, t, r, i) {
|
|
523
|
+
n(t).forEach(function(t) {
|
|
524
|
+
e[i ? i(t) : t] = r;
|
|
525
|
+
});
|
|
526
|
+
}, l = function(e) {
|
|
527
|
+
e = (e || "").split(";");
|
|
528
|
+
var t = {};
|
|
529
|
+
return e.forEach(function(e) {
|
|
530
|
+
var n = e.split(":");
|
|
531
|
+
n.length == 2 && (t[n[0].trim()] = n[1].trim());
|
|
532
|
+
}), t;
|
|
533
|
+
}, u = { cssUnitless: I() }, d = function(e, t, n, f) {
|
|
534
|
+
typeof e == "string" && (e = l(e)), t ||= u, t.cssUnitless = t.cssUnitless || u.cssUnitless, f ||= {};
|
|
535
|
+
var p = t.scope || {}, m = t.addUnits == null ? p && p.addUnits != null ? p.addUnits : !0 : t.addUnits, h = (t.cssUnitless == null ? p ? p.cssUnitless : null : t.cssUnitless) || {}, g = (t.cssUnit || p ? p.cssUnit : null) || "px", _ = t.prefixProperties || (p ? p.prefixProperties : null) || {}, v = t.camelize ? i : r, y, b, x, S, C, w, T, E;
|
|
536
|
+
for (x in e) if (a(e, x)) {
|
|
537
|
+
if (S = e[x], b = r(n ? n + x : x), y = !1, E = !1, s(S) && (T = S.call(p || e, S, x, b, e), o(T) && T.value != null ? (S = T.value, E = T.prefix, b = T.name ? r(T.name) : b) : S = T), C = typeof S, w = C == "number" || C == "string" && S != "" && S * 1 == S, S == null || b == null || b === "") continue;
|
|
538
|
+
if ((w || C == "string") && (y = !0), !y && S.value != null && S.prefix && (y = !0, E = S.prefix, S = S.value), y) {
|
|
539
|
+
if (E ||= !!_[b], w && (S = m && !(b in h) ? S + g : S + ""), (b == "border" || !b.indexOf("border") && !~b.indexOf("radius") && !~b.indexOf("width")) && w && (b += "-width"), !b.indexOf("border-radius-") && (b.replace(/border(-radius)(-(.*))/, function(e, t, n) {
|
|
540
|
+
var r = {
|
|
541
|
+
"-top": ["-top-left", "-top-right"],
|
|
542
|
+
"-left": ["-top-left", "-bottom-left"],
|
|
543
|
+
"-right": ["-top-right", "-bottom-right"],
|
|
544
|
+
"-bottom": ["-bottom-left", "-bottom-right"]
|
|
545
|
+
};
|
|
546
|
+
n in r ? (b = [], r[n].forEach(function(e) {
|
|
547
|
+
b.push("border" + e + t);
|
|
548
|
+
})) : b = "border" + n + t;
|
|
549
|
+
}), Array.isArray(b))) {
|
|
550
|
+
b.forEach(function(e) {
|
|
551
|
+
E ? c(f, e, S, v) : f[v(e)] = S;
|
|
552
|
+
});
|
|
553
|
+
continue;
|
|
554
|
+
}
|
|
555
|
+
E ? c(f, b, S, v) : f[v(b)] = S;
|
|
556
|
+
} else d(S, t, b + "-", f);
|
|
557
|
+
}
|
|
558
|
+
return f;
|
|
559
|
+
};
|
|
560
|
+
t.exports = d;
|
|
561
|
+
}));
|
|
562
|
+
H();
|
|
563
|
+
//#endregion
|
|
564
|
+
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/src/toStyleString.js
|
|
565
|
+
var Me = /* @__PURE__ */ P(((e, t) => {
|
|
566
|
+
var n = H(), r = V();
|
|
567
|
+
t.exports = function(e, t) {
|
|
568
|
+
e = n(e, t);
|
|
569
|
+
var i = [], a;
|
|
570
|
+
for (a in e) r(e, a) && i.push(a + ": " + e[a]);
|
|
571
|
+
return i.join("; ");
|
|
572
|
+
};
|
|
573
|
+
}));
|
|
574
|
+
Me();
|
|
575
|
+
//#endregion
|
|
576
|
+
//#region ../../lib-react/mask-markup/dist/node_modules/.bun/to-style@1.3.3/node_modules/to-style/index.js
|
|
577
|
+
var Ne = /* @__PURE__ */ P(((e, t) => {
|
|
578
|
+
t.exports = {
|
|
579
|
+
prefixProperties: F(),
|
|
580
|
+
cssUnitless: I(),
|
|
581
|
+
object: H(),
|
|
582
|
+
string: Me()
|
|
583
|
+
};
|
|
584
|
+
}));
|
|
585
|
+
Ne();
|
|
586
|
+
//#endregion
|
|
587
|
+
//#region ../../lib-react/mask-markup/dist/serialization.js
|
|
588
|
+
var Pe = /* @__PURE__ */ e(i(), 1), Fe = Ne(), Ie = (0, Pe.default)("@pie-lib:mask-markup:serialization"), Le = ["span"], Re = [
|
|
589
|
+
"em",
|
|
590
|
+
"strong",
|
|
591
|
+
"u"
|
|
592
|
+
], ze = 3, Be = 8, Ve = 1, He = (e) => {
|
|
593
|
+
if (!e.attributes || e.attributes.length <= 0) return;
|
|
594
|
+
let t = {}, n;
|
|
595
|
+
for (n = 0; n < e.attributes.length; n++) {
|
|
596
|
+
let r = e.attributes[n];
|
|
597
|
+
t[r.name] = r.value;
|
|
598
|
+
}
|
|
599
|
+
return t;
|
|
600
|
+
}, Ue = (e) => Le.includes(e) ? "inline" : Re.includes(e) ? "mark" : "block", We = (e) => {
|
|
601
|
+
let t = /([\w-]*)\s*:\s*([^;]*)/g, n, r = {};
|
|
602
|
+
for (; n = t.exec(e);) r[n[1]] = n[2].trim();
|
|
603
|
+
return r;
|
|
604
|
+
}, Ge = (e) => (0, Fe.object)(e, {
|
|
605
|
+
camelize: !0,
|
|
606
|
+
addUnits: !1
|
|
607
|
+
}), Ke = (e, t) => Ge(We(e.getAttribute(t))), qe = (e, t, n) => {
|
|
608
|
+
let r = e.getAttribute(n);
|
|
609
|
+
return delete t.class, r;
|
|
610
|
+
}, Je = (e) => (t, n) => {
|
|
611
|
+
if (!e.getAttribute) return t;
|
|
612
|
+
if (e.getAttribute(n)) switch (n) {
|
|
613
|
+
case "style":
|
|
614
|
+
t.style = Ke(e, n);
|
|
615
|
+
break;
|
|
616
|
+
case "class":
|
|
617
|
+
t.className = qe(e, t, n);
|
|
618
|
+
break;
|
|
619
|
+
default:
|
|
620
|
+
t[n] = e.getAttribute(n);
|
|
621
|
+
break;
|
|
622
|
+
}
|
|
623
|
+
return t;
|
|
624
|
+
}, Ye = [
|
|
625
|
+
"border",
|
|
626
|
+
"class",
|
|
627
|
+
"style"
|
|
628
|
+
], U = {
|
|
629
|
+
b: "bold",
|
|
630
|
+
em: "italic",
|
|
631
|
+
u: "underline",
|
|
632
|
+
s: "strikethrough",
|
|
633
|
+
code: "code",
|
|
634
|
+
strong: "strong"
|
|
635
|
+
}, Xe = (e, t = []) => {
|
|
636
|
+
if (e.nodeType === Be) return null;
|
|
637
|
+
if (e.nodeType === ze) {
|
|
638
|
+
let n = { text: e.textContent };
|
|
639
|
+
return t.length > 0 && (n.marks = t.map((e) => ({
|
|
640
|
+
type: e,
|
|
641
|
+
data: void 0
|
|
642
|
+
}))), {
|
|
643
|
+
object: "text",
|
|
644
|
+
leaves: [n]
|
|
645
|
+
};
|
|
646
|
+
}
|
|
647
|
+
if (e.nodeType === Ve) {
|
|
648
|
+
let n = e.tagName.toLowerCase(), r = U[n];
|
|
649
|
+
if (r) return Ie("[deserialize] mark: ", r), {
|
|
650
|
+
_flatten: !0,
|
|
651
|
+
nodes: W(e.childNodes, [...t, r])
|
|
652
|
+
};
|
|
653
|
+
if (n === "math") return {
|
|
654
|
+
isMath: !0,
|
|
655
|
+
nodes: [e]
|
|
656
|
+
};
|
|
657
|
+
let i = He(e) || {};
|
|
658
|
+
n === "audio" && i.controls === "" && (i.controls = !0);
|
|
659
|
+
let a = Ye.reduce(Je(e), { ...i }), o = Ue(n), s = W(e.childNodes, t);
|
|
660
|
+
return {
|
|
661
|
+
object: o,
|
|
662
|
+
type: n,
|
|
663
|
+
data: {
|
|
664
|
+
dataset: { ...e.dataset },
|
|
665
|
+
attributes: { ...a }
|
|
666
|
+
},
|
|
667
|
+
nodes: s
|
|
668
|
+
};
|
|
669
|
+
}
|
|
670
|
+
return null;
|
|
671
|
+
}, W = (e, t = []) => {
|
|
672
|
+
let n = [];
|
|
673
|
+
for (let r = 0; r < e.length; r++) {
|
|
674
|
+
let i = Xe(e[r], t);
|
|
675
|
+
i !== null && (i._flatten && i.nodes ? n.push(...i.nodes) : n.push(i));
|
|
676
|
+
}
|
|
677
|
+
return n;
|
|
678
|
+
}, Ze = (e) => {
|
|
679
|
+
if (!e || !e.trim()) return {
|
|
680
|
+
object: "value",
|
|
681
|
+
document: {
|
|
682
|
+
object: "document",
|
|
683
|
+
data: {},
|
|
684
|
+
nodes: [{
|
|
685
|
+
object: "block",
|
|
686
|
+
type: "span",
|
|
687
|
+
data: {},
|
|
688
|
+
isVoid: !1,
|
|
689
|
+
nodes: []
|
|
690
|
+
}]
|
|
691
|
+
}
|
|
692
|
+
};
|
|
693
|
+
let t = W(new DOMParser().parseFromString(e, "text/html").body.childNodes);
|
|
694
|
+
return !t.some((e) => e.object === "block" || e.object === "inline") && t.length > 0 && (t = [{
|
|
695
|
+
object: "block",
|
|
696
|
+
type: "span",
|
|
697
|
+
data: {},
|
|
698
|
+
isVoid: !1,
|
|
699
|
+
nodes: t
|
|
700
|
+
}]), t.length === 0 && (t = [{
|
|
701
|
+
object: "block",
|
|
702
|
+
type: "span",
|
|
703
|
+
data: {},
|
|
704
|
+
isVoid: !1,
|
|
705
|
+
nodes: []
|
|
706
|
+
}]), {
|
|
707
|
+
object: "value",
|
|
708
|
+
document: {
|
|
709
|
+
object: "document",
|
|
710
|
+
data: {},
|
|
711
|
+
nodes: t
|
|
712
|
+
}
|
|
713
|
+
};
|
|
714
|
+
}, Qe = u("div")(({ theme: e }) => ({
|
|
715
|
+
paddingTop: e.spacing(.5),
|
|
716
|
+
paddingBottom: e.spacing(.5)
|
|
717
|
+
})), $e = u("span")(() => ({
|
|
718
|
+
display: "inline-block",
|
|
719
|
+
width: ".75em"
|
|
720
|
+
})), et = ["tbody", "tr"], tt = (e, t) => {
|
|
721
|
+
let n = t.trim() === "", r = e && e.type;
|
|
722
|
+
if (!(n && et.includes(r))) return t;
|
|
723
|
+
}, nt = (e) => {
|
|
724
|
+
let t = e.leaves.find((e) => w(e, "marks", []).length);
|
|
725
|
+
return t ? t.marks : null;
|
|
726
|
+
}, rt = (e, t, n, r, i, a) => {
|
|
727
|
+
if (!t) return null;
|
|
728
|
+
let o = [];
|
|
729
|
+
return (e.nodes || []).forEach((e, s) => {
|
|
730
|
+
let c = e.type ? `${e.type}-${s}` : `${s}`;
|
|
731
|
+
if (e.isMath) return o.push(/* @__PURE__ */ D("span", { dangerouslySetInnerHTML: { __html: l(`<math displaystyle="true">${e.nodes[0].innerHTML}</math>`) } })), o;
|
|
732
|
+
if (r) {
|
|
733
|
+
let a = r(e, t, n);
|
|
734
|
+
if (a) {
|
|
735
|
+
let t = e.data?.dataset?.component === "blank" && i?.type !== "td";
|
|
736
|
+
t && o.push(/* @__PURE__ */ D($e, {}, `spacer-${s}-before`)), o.push(a), t && o.push(/* @__PURE__ */ D($e, {}, `spacer-${s}-after`));
|
|
737
|
+
return;
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
if (e.object === "text") {
|
|
741
|
+
let t = e.leaves.reduce((e, t) => {
|
|
742
|
+
let n = t.text, r = tt(i, n);
|
|
743
|
+
return r ? e + r : e;
|
|
744
|
+
}, ""), n = nt(e);
|
|
745
|
+
if (n?.length > 0) {
|
|
746
|
+
let e = n.map((e) => Object.keys(U).find((t) => U[t] === e.type)).filter(Boolean);
|
|
747
|
+
e.length > 0 ? o.push(e.reduceRight((e, t, n) => /* @__PURE__ */ D(t, { children: e }, `${c}-${t}-${n}`), t)) : o.push(t);
|
|
748
|
+
} else t.length > 0 && o.push(t);
|
|
749
|
+
} else {
|
|
750
|
+
let i = rt(e, t, n, r, e, a);
|
|
751
|
+
if (e.type === "p" || e.type === "paragraph") o.push(/* @__PURE__ */ D(Qe, { children: i }, c));
|
|
752
|
+
else {
|
|
753
|
+
let t = e.type;
|
|
754
|
+
e.nodes && e.nodes.length > 0 ? o.push(/* @__PURE__ */ D(t, {
|
|
755
|
+
...e.data.attributes,
|
|
756
|
+
children: i
|
|
757
|
+
}, c)) : o.push(/* @__PURE__ */ D(t, { ...e.data.attributes }, c));
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
}), o;
|
|
761
|
+
}, it = u("div")(() => ({
|
|
762
|
+
display: "initial",
|
|
763
|
+
"&:not(.MathJax) table": { borderCollapse: "collapse" },
|
|
764
|
+
"&:not(.MathJax) table td, &:not(.MathJax) table th": {
|
|
765
|
+
padding: "8px 12px",
|
|
766
|
+
textAlign: "left"
|
|
767
|
+
}
|
|
768
|
+
})), at = class extends E.Component {
|
|
769
|
+
constructor(e) {
|
|
770
|
+
super(e), this.internalContainerRef = E.createRef();
|
|
771
|
+
}
|
|
772
|
+
static propTypes = {
|
|
773
|
+
renderChildren: k.default.func,
|
|
774
|
+
layout: k.default.object,
|
|
775
|
+
value: k.default.object,
|
|
776
|
+
onChange: k.default.func,
|
|
777
|
+
elementType: k.default.string,
|
|
778
|
+
containerRef: k.default.oneOfType([k.default.func, k.default.shape({ current: k.default.instanceOf(Element) })])
|
|
779
|
+
};
|
|
780
|
+
componentDidMount() {
|
|
781
|
+
let e = this.props.containerRef || this.internalContainerRef;
|
|
782
|
+
e.current && typeof n == "function" && n(e.current);
|
|
783
|
+
}
|
|
784
|
+
handleChange = (e, t) => {
|
|
785
|
+
let n = {
|
|
786
|
+
...this.props.value,
|
|
787
|
+
[e]: t
|
|
788
|
+
};
|
|
789
|
+
this.props.onChange(n);
|
|
790
|
+
};
|
|
791
|
+
render() {
|
|
792
|
+
let { value: e, layout: t, elementType: n, containerRef: r } = this.props, i = rt(t, e, this.handleChange, this.props.renderChildren, null, n);
|
|
793
|
+
return /* @__PURE__ */ D(it, {
|
|
794
|
+
ref: r || this.internalContainerRef,
|
|
795
|
+
children: i
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
}, ot = (e, t) => {
|
|
799
|
+
let { markup: n } = we(e, t);
|
|
800
|
+
return Ze(l(n)).document;
|
|
801
|
+
}, st = (e, t) => class extends E.Component {
|
|
802
|
+
static propTypes = {
|
|
803
|
+
markup: k.default.string,
|
|
804
|
+
layout: k.default.object,
|
|
805
|
+
value: k.default.object,
|
|
806
|
+
onChange: k.default.func,
|
|
807
|
+
customMarkMarkupComponent: k.default.func,
|
|
808
|
+
elementType: k.default.string
|
|
809
|
+
};
|
|
810
|
+
constructor(e) {
|
|
811
|
+
super(e), this.containerRef = E.createRef();
|
|
812
|
+
}
|
|
813
|
+
componentDidUpdate(e) {
|
|
814
|
+
if (this.props.markup !== e.markup) {
|
|
815
|
+
let e = this.containerRef.current;
|
|
816
|
+
(e && e.querySelectorAll("[data-latex][data-math-handled=\"true\"]") || []).forEach((e) => {
|
|
817
|
+
let t = e.querySelector("mjx-container");
|
|
818
|
+
t && e.removeChild(t), e.textContent = e.getAttribute("data-raw"), e.removeAttribute("data-math-handled");
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
render() {
|
|
823
|
+
let { markup: n, layout: r, value: i, onChange: a, elementType: o } = this.props, s = r || ot(n, e);
|
|
824
|
+
return /* @__PURE__ */ D(at, {
|
|
825
|
+
containerRef: this.containerRef,
|
|
826
|
+
elementType: o,
|
|
827
|
+
layout: s,
|
|
828
|
+
value: i,
|
|
829
|
+
onChange: a,
|
|
830
|
+
renderChildren: t(this.props)
|
|
831
|
+
});
|
|
832
|
+
}
|
|
833
|
+
}, ct = S(/*#__PURE__*/ D("path", { d: "m7 10 5 5 5-5z" }), "ArrowDropDown"), lt = S(/*#__PURE__*/ D("path", { d: "m7 14 5-5 5 5z" }), "ArrowDropUp");
|
|
834
|
+
//#endregion
|
|
835
|
+
//#region ../../lib-react/mask-markup/dist/components/dropdown.js
|
|
836
|
+
function G(e) {
|
|
837
|
+
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
838
|
+
}
|
|
839
|
+
function ut(e, t) {
|
|
840
|
+
return !e || G(e) ? e : G(e.default) ? e.default : t && G(e[t]) ? e[t] : t && G(e[t]?.default) ? e[t].default : e;
|
|
841
|
+
}
|
|
842
|
+
var dt = ut(g, "InlineMenu") || ut(pt.InlineMenu, "InlineMenu"), ft = o, K = ft.default, pt = K && typeof K == "object" ? K : ft, { translator: mt } = t, ht = v.v("pie"), gt = u(x)(() => ({
|
|
843
|
+
color: v.text(),
|
|
844
|
+
border: `1px solid ${v.borderGray()}`,
|
|
845
|
+
borderRadius: "4px",
|
|
846
|
+
justifyContent: "space-between",
|
|
847
|
+
backgroundColor: v.background(),
|
|
848
|
+
position: "relative",
|
|
849
|
+
height: "45px",
|
|
850
|
+
width: "fit-content",
|
|
851
|
+
margin: "2px",
|
|
852
|
+
textTransform: "none",
|
|
853
|
+
"& span": { paddingRight: "24px" },
|
|
854
|
+
"& svg": {
|
|
855
|
+
position: "absolute",
|
|
856
|
+
right: "4px",
|
|
857
|
+
top: "calc(50% - 12px)",
|
|
858
|
+
pointerEvents: "none",
|
|
859
|
+
color: v.text(),
|
|
860
|
+
marginLeft: "5px"
|
|
861
|
+
},
|
|
862
|
+
"&.Mui-focusVisible": {
|
|
863
|
+
outline: `3px solid ${v.tertiary()}`,
|
|
864
|
+
outlineOffset: "2px",
|
|
865
|
+
borderWidth: "3px"
|
|
866
|
+
},
|
|
867
|
+
"&.Mui-disabled": { color: v.disabledText() },
|
|
868
|
+
"&.disabledCorrect": {
|
|
869
|
+
borderWidth: "2px",
|
|
870
|
+
borderColor: v.correct(),
|
|
871
|
+
color: `${v.text()} !important`
|
|
872
|
+
},
|
|
873
|
+
"&.disabledIncorrect": {
|
|
874
|
+
borderWidth: "2px",
|
|
875
|
+
borderColor: v.incorrectWithIcon(),
|
|
876
|
+
color: `${v.text()} !important`
|
|
877
|
+
}
|
|
878
|
+
})), _t = u(dt)(() => ({
|
|
879
|
+
"& .MuiPaper-root": { backgroundColor: ht("background", v.defaults.WHITE) },
|
|
880
|
+
"& .MuiList-root": { padding: 0 }
|
|
881
|
+
})), vt = u(h)(() => ({
|
|
882
|
+
height: 24,
|
|
883
|
+
overflow: "hidden",
|
|
884
|
+
fontSize: "1rem",
|
|
885
|
+
fontWeight: 400,
|
|
886
|
+
fontFamily: "inherit",
|
|
887
|
+
lineHeight: "1.5em",
|
|
888
|
+
whiteSpace: "nowrap",
|
|
889
|
+
color: v.text(),
|
|
890
|
+
backgroundColor: v.background(),
|
|
891
|
+
"&.Mui-focusVisible": {
|
|
892
|
+
outline: `3px solid ${v.tertiary()}`,
|
|
893
|
+
outlineOffset: "-1px",
|
|
894
|
+
color: v.text(),
|
|
895
|
+
backgroundColor: v.background()
|
|
896
|
+
},
|
|
897
|
+
"&:hover": {
|
|
898
|
+
color: v.text(),
|
|
899
|
+
backgroundColor: v.dropdownBackground()
|
|
900
|
+
},
|
|
901
|
+
boxSizing: "border-box",
|
|
902
|
+
padding: "16px 8px",
|
|
903
|
+
borderRadius: "4px",
|
|
904
|
+
"&.selected": {
|
|
905
|
+
color: `${v.text()} !important`,
|
|
906
|
+
backgroundColor: `${v.background()} !important`,
|
|
907
|
+
"&:hover": {
|
|
908
|
+
color: v.text(),
|
|
909
|
+
backgroundColor: `${v.dropdownBackground()} !important`
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
})), q = u("span")(() => ({ fontSize: "max(1rem, 14px)" })), yt = u("span")(() => ({
|
|
913
|
+
fontSize: "max(1rem, 14px)",
|
|
914
|
+
flexShrink: 0,
|
|
915
|
+
paddingLeft: "8px"
|
|
916
|
+
})), bt = u(b)(() => ({
|
|
917
|
+
position: "absolute",
|
|
918
|
+
left: "-10000px",
|
|
919
|
+
top: "auto",
|
|
920
|
+
width: "1px",
|
|
921
|
+
height: "1px",
|
|
922
|
+
overflow: "hidden"
|
|
923
|
+
})), xt = u(d)(() => ({
|
|
924
|
+
color: `${v.white()} !important`,
|
|
925
|
+
position: "absolute",
|
|
926
|
+
top: "-8px !important",
|
|
927
|
+
left: "-8px",
|
|
928
|
+
marginLeft: "0 !important",
|
|
929
|
+
borderRadius: "50%",
|
|
930
|
+
fontSize: "16px",
|
|
931
|
+
padding: "2px",
|
|
932
|
+
"&.correct": { backgroundColor: v.correct() },
|
|
933
|
+
"&.incorrect": { backgroundColor: v.incorrectWithIcon() }
|
|
934
|
+
})), St = u(y)(() => ({
|
|
935
|
+
color: `${v.white()} !important`,
|
|
936
|
+
position: "absolute",
|
|
937
|
+
top: "-8px !important",
|
|
938
|
+
left: "-8px",
|
|
939
|
+
marginLeft: "0 !important",
|
|
940
|
+
borderRadius: "50%",
|
|
941
|
+
fontSize: "16px",
|
|
942
|
+
padding: "2px",
|
|
943
|
+
"&.correct": { backgroundColor: v.correct() },
|
|
944
|
+
"&.incorrect": { backgroundColor: v.incorrectWithIcon() }
|
|
945
|
+
})), Ct = class extends E.Component {
|
|
946
|
+
static propTypes = {
|
|
947
|
+
id: k.default.string,
|
|
948
|
+
value: k.default.string,
|
|
949
|
+
disabled: k.default.bool,
|
|
950
|
+
onChange: k.default.func,
|
|
951
|
+
correct: k.default.bool,
|
|
952
|
+
choices: k.default.arrayOf(k.default.shape({
|
|
953
|
+
value: k.default.string,
|
|
954
|
+
label: k.default.string
|
|
955
|
+
})),
|
|
956
|
+
showCorrectAnswer: k.default.bool,
|
|
957
|
+
singleQuery: k.default.bool,
|
|
958
|
+
correctValue: k.default.string,
|
|
959
|
+
language: k.default.string
|
|
960
|
+
};
|
|
961
|
+
constructor(e) {
|
|
962
|
+
super(e), this.state = {
|
|
963
|
+
anchorEl: null,
|
|
964
|
+
highlightedOptionId: null,
|
|
965
|
+
menuWidth: null,
|
|
966
|
+
previewValue: null
|
|
967
|
+
}, this.hiddenRef = E.createRef(), this.buttonRef = E.createRef(), this.previewRef = E.createRef(), this.elementRefs = [], this.idPrefix = r(`dropdown-${e.id}`);
|
|
968
|
+
}
|
|
969
|
+
optionId = (e) => `${this.idPrefix}-option-${e}`;
|
|
970
|
+
componentDidMount() {
|
|
971
|
+
this.hiddenRef.current && this.state.menuWidth === null && this.setState({ menuWidth: this.hiddenRef.current.clientWidth });
|
|
972
|
+
}
|
|
973
|
+
componentDidUpdate(e, t) {
|
|
974
|
+
let r = this.hiddenRef.current;
|
|
975
|
+
if (!t.anchorEl && this.state.anchorEl && this.elementRefs.forEach((e) => {
|
|
976
|
+
if (!e) return;
|
|
977
|
+
let t = e.querySelector("[data-latex], [data-raw]"), r = e.querySelector("mjx-container"), i = e.querySelector("[data-math-handled=\"true\"]");
|
|
978
|
+
t && (!i || !r) && n(e);
|
|
979
|
+
}), r) {
|
|
980
|
+
let e = r.clientWidth;
|
|
981
|
+
e !== this.state.menuWidth && (this.elementRefs.forEach((e) => {
|
|
982
|
+
e && n(e);
|
|
983
|
+
}), n(r), this.setState({ menuWidth: e }));
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
handleClick = (e) => {
|
|
987
|
+
let { value: t, choices: n } = this.props, r = null;
|
|
988
|
+
if (t) {
|
|
989
|
+
let e = (n || []).findIndex((e) => e.value === t);
|
|
990
|
+
e >= 0 && (r = this.optionId(e));
|
|
991
|
+
}
|
|
992
|
+
this.setState({
|
|
993
|
+
anchorEl: e.currentTarget,
|
|
994
|
+
highlightedOptionId: r
|
|
995
|
+
});
|
|
996
|
+
};
|
|
997
|
+
handleClose = () => {
|
|
998
|
+
let { value: e } = this.props;
|
|
999
|
+
this.setState({
|
|
1000
|
+
anchorEl: null,
|
|
1001
|
+
previewValue: null,
|
|
1002
|
+
highlightedOptionId: null
|
|
1003
|
+
}), !e && this.previewRef.current && (this.previewRef.current.innerHTML = "");
|
|
1004
|
+
};
|
|
1005
|
+
handleHighlight = (e) => {
|
|
1006
|
+
let t = { highlightedOptionId: this.optionId(e) };
|
|
1007
|
+
this.props.value || (t.previewValue = this.props.choices[e].value), this.setState(t);
|
|
1008
|
+
};
|
|
1009
|
+
handleSelect = (e, t) => {
|
|
1010
|
+
this.props.onChange(this.props.id, e), this.handleHighlight(t), this.handleClose();
|
|
1011
|
+
};
|
|
1012
|
+
handleHover = (e) => {
|
|
1013
|
+
if (this.props.value) return;
|
|
1014
|
+
let t = this.optionId(e), n = this.state.previewValue;
|
|
1015
|
+
this.setState({
|
|
1016
|
+
highlightedOptionId: t,
|
|
1017
|
+
previewValue: n
|
|
1018
|
+
}, () => {
|
|
1019
|
+
let t = this.elementRefs[e], n = this.previewRef.current;
|
|
1020
|
+
t && n && (n.innerHTML = t.innerHTML);
|
|
1021
|
+
});
|
|
1022
|
+
};
|
|
1023
|
+
getLabel(e, t) {
|
|
1024
|
+
let n = (e || []).find((e) => e.value === t);
|
|
1025
|
+
return n ? n.label.trim() : void 0;
|
|
1026
|
+
}
|
|
1027
|
+
render() {
|
|
1028
|
+
let { id: e, correct: t, disabled: n, value: r, choices: i, showCorrectAnswer: a, singleQuery: o, correctValue: s, language: c } = this.props, { anchorEl: u } = this.state, d = !!u, f = `${this.idPrefix}-button`, p = `${this.idPrefix}-menu`, m = `${this.idPrefix}-listbox`, h = `${this.idPrefix}-value`, g;
|
|
1029
|
+
this.elementRefs = [], n && t !== void 0 && (g = t || a ? "disabledCorrect" : "disabledIncorrect");
|
|
1030
|
+
let _ = parseInt(e, 10) + 1, v = `${this.idPrefix}-query-label`, y = o ? mt.t("inlineDropdown.query", { lng: c }) : mt.t("inlineDropdown.queryNumber", {
|
|
1031
|
+
lng: c,
|
|
1032
|
+
index: _
|
|
1033
|
+
}), b = null;
|
|
1034
|
+
return n && t !== void 0 && (b = t || a ? /* @__PURE__ */ D(xt, { className: "correct" }) : /* @__PURE__ */ D(St, { className: "incorrect" })), /* @__PURE__ */ O(re, { children: [
|
|
1035
|
+
/* @__PURE__ */ D("div", {
|
|
1036
|
+
ref: this.hiddenRef,
|
|
1037
|
+
style: {
|
|
1038
|
+
position: "absolute",
|
|
1039
|
+
visibility: "hidden",
|
|
1040
|
+
top: 0,
|
|
1041
|
+
left: 0
|
|
1042
|
+
},
|
|
1043
|
+
tabIndex: -1,
|
|
1044
|
+
"aria-hidden": "true",
|
|
1045
|
+
children: (i || []).map((e, t) => /* @__PURE__ */ D(vt, {
|
|
1046
|
+
tabIndex: -1,
|
|
1047
|
+
"aria-hidden": "true",
|
|
1048
|
+
children: /* @__PURE__ */ D(q, { dangerouslySetInnerHTML: { __html: l(e.label) } })
|
|
1049
|
+
}, t))
|
|
1050
|
+
}),
|
|
1051
|
+
/* @__PURE__ */ D(bt, {
|
|
1052
|
+
id: v,
|
|
1053
|
+
tabIndex: -1,
|
|
1054
|
+
"aria-hidden": "true",
|
|
1055
|
+
children: y
|
|
1056
|
+
}),
|
|
1057
|
+
/* @__PURE__ */ O(gt, {
|
|
1058
|
+
ref: this.buttonRef,
|
|
1059
|
+
style: {
|
|
1060
|
+
...this.state.menuWidth && { minWidth: `calc(${this.state.menuWidth}px + 8px)` },
|
|
1061
|
+
borderWidth: d ? "2px" : "1px",
|
|
1062
|
+
transition: "border-width 0.2s ease-in-out"
|
|
1063
|
+
},
|
|
1064
|
+
"aria-controls": d ? m : void 0,
|
|
1065
|
+
"aria-haspopup": "listbox",
|
|
1066
|
+
"aria-expanded": d ? "true" : "false",
|
|
1067
|
+
"aria-activedescendant": this.state.highlightedOptionId,
|
|
1068
|
+
onClick: this.handleClick,
|
|
1069
|
+
className: g,
|
|
1070
|
+
disabled: n,
|
|
1071
|
+
id: f,
|
|
1072
|
+
role: "combobox",
|
|
1073
|
+
"aria-labelledby": `${v} ${h}`,
|
|
1074
|
+
children: [
|
|
1075
|
+
b,
|
|
1076
|
+
/* @__PURE__ */ D(q, {
|
|
1077
|
+
id: h,
|
|
1078
|
+
ref: this.previewRef,
|
|
1079
|
+
dangerouslySetInnerHTML: { __html: l(s || (d && this.state.previewValue ? this.getLabel(i, this.state.previewValue) : this.getLabel(i, r) || "")) }
|
|
1080
|
+
}),
|
|
1081
|
+
D(d ? lt : ct, {})
|
|
1082
|
+
]
|
|
1083
|
+
}),
|
|
1084
|
+
/* @__PURE__ */ D(_t, {
|
|
1085
|
+
id: p,
|
|
1086
|
+
anchorEl: u,
|
|
1087
|
+
keepMounted: !0,
|
|
1088
|
+
open: d,
|
|
1089
|
+
onClose: this.handleClose,
|
|
1090
|
+
getContentAnchorEl: null,
|
|
1091
|
+
anchorOrigin: {
|
|
1092
|
+
vertical: "bottom",
|
|
1093
|
+
horizontal: "left"
|
|
1094
|
+
},
|
|
1095
|
+
transformOrigin: {
|
|
1096
|
+
vertical: "top",
|
|
1097
|
+
horizontal: "left"
|
|
1098
|
+
},
|
|
1099
|
+
transitionDuration: {
|
|
1100
|
+
enter: 225,
|
|
1101
|
+
exit: 195
|
|
1102
|
+
},
|
|
1103
|
+
slotProps: {
|
|
1104
|
+
paper: this.state.menuWidth ? { style: {
|
|
1105
|
+
minWidth: this.state.menuWidth,
|
|
1106
|
+
padding: "4px"
|
|
1107
|
+
} } : void 0,
|
|
1108
|
+
list: {
|
|
1109
|
+
id: m,
|
|
1110
|
+
"aria-labelledby": v,
|
|
1111
|
+
role: "listbox",
|
|
1112
|
+
disablePadding: !0
|
|
1113
|
+
}
|
|
1114
|
+
},
|
|
1115
|
+
children: (i || []).map((e, t) => {
|
|
1116
|
+
let n = this.optionId(t);
|
|
1117
|
+
return /* @__PURE__ */ O(vt, {
|
|
1118
|
+
id: n,
|
|
1119
|
+
className: e.value === r ? "selected" : "",
|
|
1120
|
+
selected: e.value === r,
|
|
1121
|
+
value: e.value,
|
|
1122
|
+
onClick: () => this.handleSelect(e.value, t),
|
|
1123
|
+
role: "option",
|
|
1124
|
+
"aria-selected": this.state.highlightedOptionId === n ? "true" : void 0,
|
|
1125
|
+
onMouseOver: () => this.handleHover(t),
|
|
1126
|
+
children: [/* @__PURE__ */ D(q, {
|
|
1127
|
+
ref: (e) => this.elementRefs[t] = e,
|
|
1128
|
+
dangerouslySetInnerHTML: { __html: l(e.label) }
|
|
1129
|
+
}), /* @__PURE__ */ D(yt, { dangerouslySetInnerHTML: { __html: e.value === r ? " ✓" : "" } })]
|
|
1130
|
+
}, `${e.label}-${t}`);
|
|
1131
|
+
})
|
|
1132
|
+
})
|
|
1133
|
+
] });
|
|
1134
|
+
}
|
|
1135
|
+
}, wt = st("dropdown", (e) => (t, n, r) => {
|
|
1136
|
+
let i = t.data && t.data.dataset || {};
|
|
1137
|
+
if (i.component === "dropdown") {
|
|
1138
|
+
let { choices: a, disabled: o, feedback: s, showCorrectAnswer: c, language: l } = e, u = a && a[i.id] && a[i.id].find((e) => e.correct), d = c ? u && u.value : n[i.id];
|
|
1139
|
+
return /* @__PURE__ */ D(Ct, {
|
|
1140
|
+
correct: s && s[i.id] && s[i.id] === "correct",
|
|
1141
|
+
disabled: o || c,
|
|
1142
|
+
value: d,
|
|
1143
|
+
correctValue: c ? u && u.label : void 0,
|
|
1144
|
+
id: i.id,
|
|
1145
|
+
onChange: r,
|
|
1146
|
+
choices: a[i.id],
|
|
1147
|
+
showCorrectAnswer: c,
|
|
1148
|
+
singleQuery: Object.keys(a).length == 1,
|
|
1149
|
+
language: l
|
|
1150
|
+
}, `${t.type}-dropdown-${i.id}`);
|
|
1151
|
+
}
|
|
1152
|
+
});
|
|
1153
|
+
//#endregion
|
|
1154
|
+
//#region src/delivery/inline-dropdown.tsx
|
|
1155
|
+
function J(e) {
|
|
1156
|
+
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
1157
|
+
}
|
|
1158
|
+
function Y(e, t) {
|
|
1159
|
+
return !e || J(e) ? e : J(e.default) ? e.default : t && J(e[t]) ? e[t] : t && J(e[t]?.default) ? e[t].default : e;
|
|
1160
|
+
}
|
|
1161
|
+
var Tt = Y(a, "UiLayout") || Y(Q.UiLayout, "UiLayout"), X = Y(p, "PreviewPrompt") || Y(Q.PreviewPrompt, "PreviewPrompt"), Et = Y(f, "Collapsible") || Y(Q.Collapsible, "Collapsible"), Dt = o, Z = Dt.default, Q = Z && typeof Z == "object" ? Z : Dt, { translator: $ } = t, Ot = u(Tt)({
|
|
1162
|
+
color: v.text(),
|
|
1163
|
+
backgroundColor: v.background()
|
|
1164
|
+
}), kt = u(Et)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), At = u("div")(({ theme: e }) => ({ "&:not(:last-child)": { marginBottom: e.spacing(2) } })), jt = u("div")({
|
|
1165
|
+
display: "flex",
|
|
1166
|
+
whiteSpace: "break-spaces"
|
|
1167
|
+
}), Mt = u("div")(({ correct: e }) => ({
|
|
1168
|
+
display: "flex",
|
|
1169
|
+
...e ? { color: v.correct() } : { color: v.incorrectWithIcon() }
|
|
1170
|
+
})), Nt = u("h2")({
|
|
1171
|
+
position: "absolute",
|
|
1172
|
+
left: "-10000px",
|
|
1173
|
+
top: "auto",
|
|
1174
|
+
width: "1px",
|
|
1175
|
+
height: "1px",
|
|
1176
|
+
overflow: "hidden"
|
|
1177
|
+
}), Pt = class extends E.Component {
|
|
1178
|
+
static propTypes = {
|
|
1179
|
+
prompt: k.default.string,
|
|
1180
|
+
disabled: k.default.bool,
|
|
1181
|
+
markup: k.default.string,
|
|
1182
|
+
mode: k.default.string,
|
|
1183
|
+
displayType: k.default.string,
|
|
1184
|
+
rationale: k.default.string,
|
|
1185
|
+
teacherInstructions: k.default.string,
|
|
1186
|
+
model: k.default.object.isRequired,
|
|
1187
|
+
choices: k.default.object,
|
|
1188
|
+
value: k.default.object,
|
|
1189
|
+
feedback: k.default.object,
|
|
1190
|
+
onChange: k.default.func,
|
|
1191
|
+
language: k.default.string
|
|
1192
|
+
};
|
|
1193
|
+
static defaultProps = { value: {} };
|
|
1194
|
+
state = { showCorrectAnswer: !1 };
|
|
1195
|
+
UNSAFE_componentWillReceiveProps(e) {
|
|
1196
|
+
T(e.feedback) && this.setState({ showCorrectAnswer: !1 });
|
|
1197
|
+
}
|
|
1198
|
+
componentDidUpdate() {
|
|
1199
|
+
n(ne.findDOMNode(this));
|
|
1200
|
+
}
|
|
1201
|
+
toggleShowCorrect = () => {
|
|
1202
|
+
this.setState({ showCorrectAnswer: !this.state.showCorrectAnswer });
|
|
1203
|
+
};
|
|
1204
|
+
render() {
|
|
1205
|
+
let { showCorrectAnswer: e } = this.state, { prompt: t, mode: n, model: r, rationale: i, teacherInstructions: a, choices: o, displayType: u, language: d } = this.props, { extraCSSRules: f } = r || {}, p = n === "evaluate", m = !1, h = i && (c(i) || s(i)), g = a && (c(a) || s(a)), _ = (Object.keys(o) || []).map((e) => (o[e] || []).reduce((e, t) => (t.rationale && c(t.rationale) && (m = !0, e.push(t)), e), []));
|
|
1206
|
+
return /* @__PURE__ */ O(Ot, {
|
|
1207
|
+
extraCSSRules: f,
|
|
1208
|
+
style: { display: `${u}` },
|
|
1209
|
+
children: [
|
|
1210
|
+
n === "gather" && /* @__PURE__ */ D(Nt, { children: $.t("inlineDropdown.inlineDropdownQuestion", { lng: d }) }),
|
|
1211
|
+
g && /* @__PURE__ */ D(kt, {
|
|
1212
|
+
labels: {
|
|
1213
|
+
hidden: $.t("common:showTeacherInstructions", { lng: d }),
|
|
1214
|
+
visible: $.t("common:hideTeacherInstructions", { lng: d })
|
|
1215
|
+
},
|
|
1216
|
+
children: /* @__PURE__ */ D(X, { prompt: a })
|
|
1217
|
+
}),
|
|
1218
|
+
t && /* @__PURE__ */ D(X, { prompt: t }),
|
|
1219
|
+
/* @__PURE__ */ D(Se, {
|
|
1220
|
+
show: p,
|
|
1221
|
+
toggled: e,
|
|
1222
|
+
onToggle: this.toggleShowCorrect,
|
|
1223
|
+
language: d
|
|
1224
|
+
}),
|
|
1225
|
+
/* @__PURE__ */ D(wt, {
|
|
1226
|
+
...this.props,
|
|
1227
|
+
showCorrectAnswer: e
|
|
1228
|
+
}),
|
|
1229
|
+
m && /* @__PURE__ */ D(kt, {
|
|
1230
|
+
labels: {
|
|
1231
|
+
hidden: $.t("inlineDropdown.showRationaleForChoices", { lng: d }),
|
|
1232
|
+
visible: $.t("inlineDropdown.hideRationaleForChoices", { lng: d })
|
|
1233
|
+
},
|
|
1234
|
+
children: _.map((e, t) => /* @__PURE__ */ D(At, { children: e?.length > 0 && e.map((e) => /* @__PURE__ */ O(jt, { children: [/* @__PURE__ */ D(Mt, {
|
|
1235
|
+
correct: e.correct,
|
|
1236
|
+
dangerouslySetInnerHTML: { __html: `${l(e.label)}: ` }
|
|
1237
|
+
}), /* @__PURE__ */ D(X, { prompt: e.rationale })] }, e.label)) }, t))
|
|
1238
|
+
}),
|
|
1239
|
+
h && /* @__PURE__ */ D(Et, {
|
|
1240
|
+
labels: {
|
|
1241
|
+
hidden: $.t("common:showRationale", { lng: d }),
|
|
1242
|
+
visible: $.t("common:hideRationale", { lng: d })
|
|
1243
|
+
},
|
|
1244
|
+
children: /* @__PURE__ */ D(X, { prompt: i })
|
|
1245
|
+
})
|
|
1246
|
+
]
|
|
1247
|
+
});
|
|
1248
|
+
}
|
|
1249
|
+
}, { translator: Ft } = t, It = class extends HTMLElement {
|
|
1250
|
+
constructor() {
|
|
1251
|
+
super(), this._model = null, this._session = null, this._root = null;
|
|
1252
|
+
}
|
|
1253
|
+
set model(e) {
|
|
1254
|
+
this._model = e, this.dispatchEvent(new ie(this.tagName.toLowerCase(), this.session && !!this.session.value, !!this._model)), this._render();
|
|
1255
|
+
}
|
|
1256
|
+
set session(e) {
|
|
1257
|
+
this._session = e, this._render();
|
|
1258
|
+
}
|
|
1259
|
+
get session() {
|
|
1260
|
+
return this._session;
|
|
1261
|
+
}
|
|
1262
|
+
setRegionLabel() {
|
|
1263
|
+
this.setAttribute("aria-label", Ft.t("inlineDropdown.inlineDropdownQuestion", { lng: this._model?.language }));
|
|
1264
|
+
}
|
|
1265
|
+
setLangAttribute() {
|
|
1266
|
+
let e = this._model && typeof this._model.language ? this._model.language : "", t = e ? e.slice(0, 2) : "en";
|
|
1267
|
+
this.setAttribute("lang", t);
|
|
1268
|
+
}
|
|
1269
|
+
_render = () => {
|
|
1270
|
+
if (this._model && this._session) {
|
|
1271
|
+
let e = E.createElement(Pt, {
|
|
1272
|
+
model: this._model,
|
|
1273
|
+
prompt: this._model.prompt,
|
|
1274
|
+
rationale: this._model.rationale,
|
|
1275
|
+
teacherInstructions: this._model.teacherInstructions,
|
|
1276
|
+
disabled: this._model.disabled,
|
|
1277
|
+
displayType: this._model.displayType,
|
|
1278
|
+
markup: this._model.markup,
|
|
1279
|
+
mode: this._model.mode,
|
|
1280
|
+
choices: this._model.choices,
|
|
1281
|
+
value: this._session.value,
|
|
1282
|
+
feedback: this._model.feedback,
|
|
1283
|
+
language: this._model.language,
|
|
1284
|
+
onChange: this.changeSession
|
|
1285
|
+
});
|
|
1286
|
+
this.setLangAttribute(), this.setRegionLabel(), this._root ||= te(this), this._root.render(e), queueMicrotask(() => {
|
|
1287
|
+
n(this);
|
|
1288
|
+
});
|
|
1289
|
+
}
|
|
1290
|
+
};
|
|
1291
|
+
dispatchChangedEvent = () => {
|
|
1292
|
+
this.dispatchEvent(new ae(this.tagName.toLowerCase(), this.session && !!this.session.value));
|
|
1293
|
+
};
|
|
1294
|
+
changeSession = (e) => {
|
|
1295
|
+
this.session.value = e, this.dispatchChangedEvent(), this._render();
|
|
1296
|
+
};
|
|
1297
|
+
connectedCallback() {
|
|
1298
|
+
this.setRegionLabel(), this.setAttribute("role", "region"), this._render();
|
|
1299
|
+
}
|
|
1300
|
+
disconnectedCallback() {
|
|
1301
|
+
this._root &&= (this._root.unmount(), null);
|
|
1302
|
+
}
|
|
1303
|
+
};
|
|
1304
|
+
//#endregion
|
|
1305
|
+
export { It as default };
|
|
1306
|
+
|
|
1307
|
+
//# sourceMappingURL=index.js.map
|