@sapui5/sap.ui.richtexteditor 1.136.4 → 1.136.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/sap/ui/richtexteditor/.library +1 -1
- package/src/sap/ui/richtexteditor/RTESplitButton.js +1 -1
- package/src/sap/ui/richtexteditor/RichTextEditor.js +43 -43
- package/src/sap/ui/richtexteditor/ToolbarWrapper.js +1 -1
- package/src/sap/ui/richtexteditor/js/tiny_mce7/icons/default/icons.js +234 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/icons/default/icons.min.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/icons/default/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/ar.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/bg_BG.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/ca.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/cs.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/cy.js +1 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/da.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/de.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/el.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/en_GB.js +261 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/es.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/es_MX.js +1 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/eu.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/fa.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/fi.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/fr_FR.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/he_IL.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/hi.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/hr.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/hu_HU.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/id.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/it.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/ja.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/kk.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/ko_KR.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/lt.js +1 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/lv.js +1 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/ms.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/nb_NO.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/nl.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/pl.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/pt_BR.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/pt_PT.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/ro.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/ru.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/sk.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/sl_SI.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/sr.js +1 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/sv_SE.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/th_TH.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/tr.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/uk.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/vi.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/zh_CN.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/zh_TW.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/license.txt +5 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/models/dom/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/models/dom/model.js +8147 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/models/dom/model.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/accordion/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/accordion/plugin.js +1062 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/accordion/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/CHANGELOG.md +45 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/codemirror.min.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/customeditor.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/customeditor.min.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/index.js +3 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/ar.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/bg_BG.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/ca.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/cs.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/da.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/de.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/el.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/es.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/eu.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/fa.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/fi.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/fr_FR.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/he_IL.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/hi.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/hr.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/hu_HU.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/id.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/it.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/ja.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/kk.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/ko_KR.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/ms.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/nb_NO.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/nl.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/pl.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/pt_BR.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/pt_PT.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/ro.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/ru.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/sk.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/sl_SI.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/sv_SE.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/th_TH.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/tr.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/uk.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/vi.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/zh_CN.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/zh_TW.js +35 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/license.txt +5 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/plugin.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/plugin.min.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/readme.txt +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/version.txt +1 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advlist/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advlist/plugin.js +298 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advlist/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/anchor/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/anchor/plugin.js +219 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/anchor/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autolink/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autolink/plugin.js +233 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autolink/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autoresize/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autoresize/plugin.js +184 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autoresize/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autosave/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autosave/plugin.js +239 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autosave/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/charmap/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/charmap/plugin.js +1663 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/charmap/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/code/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/code/plugin.js +90 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/code/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/codesample/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/codesample/plugin.js +2468 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/codesample/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/directionality/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/directionality/plugin.js +395 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/directionality/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/emoticons/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/emoticons/js/emojiimages.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/emoticons/js/emojiimages.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/emoticons/js/emojis.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/emoticons/js/emojis.min.js +8 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/emoticons/plugin.js +601 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/emoticons/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/fullscreen/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/fullscreen/plugin.js +1266 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/fullscreen/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/ar.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/bg_BG.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/ca.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/cs.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/da.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/de.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/el.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/en.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/es.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/eu.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/fa.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/fi.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/fr_FR.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/he_IL.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/hi.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/hr.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/hu_HU.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/id.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/it.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/ja.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/kk.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/ko_KR.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/ms.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/nb_NO.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/nl.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/pl.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/pt_BR.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/pt_PT.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/ro.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/ru.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/sk.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/sl_SI.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/sv_SE.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/th_TH.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/tr.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/uk.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/vi.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/zh_CN.js +93 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/zh_TW.js +99 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/plugin.js +931 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/image/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/image/plugin.js +1513 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/image/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/importcss/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/importcss/plugin.js +350 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/importcss/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/insertdatetime/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/insertdatetime/plugin.js +192 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/insertdatetime/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/link/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/link/plugin.js +1337 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/link/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/lists/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/lists/plugin.js +2186 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/lists/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/media/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/media/plugin.js +1229 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/media/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/index.js +1 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/ar.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/bg_BG.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/ca.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/cs.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/da.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/de.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/el.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/es.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/eu.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/fa.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/fi.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/fr_FR.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/he_IL.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/hi.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/hr.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/hu_HU.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/id.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/it.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/ja.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/kk.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/ko_KR.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/ms.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/nb_NO.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/nl.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/pl.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/pt_BR.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/pt_PT.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/ro.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/ru.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/sk.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/sl_SI.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/sv_SE.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/th_TH.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/tr.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/uk.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/vi.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/zh_CN.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/langs/zh_TW.js +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/license.txt +5 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/plugin.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/plugin.min.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/readme.txt +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/mergetags/version.txt +1 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/nonbreaking/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/nonbreaking/plugin.js +128 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/nonbreaking/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/pagebreak/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/pagebreak/plugin.js +122 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/pagebreak/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/CHANGELOG.md +20 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/index.js +2 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/js/wordimport.js +23102 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/ar.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/bg_BG.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/ca.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/cs.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/da.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/de.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/el.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/es.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/eu.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/fa.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/fi.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/fr_FR.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/he_IL.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/hi.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/hr.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/hu_HU.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/id.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/it.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/ja.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/kk.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/ko_KR.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/ms.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/nb_NO.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/nl.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/pl.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/pt_BR.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/pt_PT.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/ro.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/ru.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/sk.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/sl_SI.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/sv_SE.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/th_TH.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/tr.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/uk.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/vi.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/zh_CN.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/zh_TW.js +19 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/license.txt +5 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/plugin.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/plugin.min.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/readme.txt +17 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/version.txt +1 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/preview/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/preview/plugin.js +598 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/preview/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/quickbars/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/quickbars/plugin.js +463 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/quickbars/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/save/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/save/plugin.js +124 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/save/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/searchreplace/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/searchreplace/plugin.js +1103 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/searchreplace/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/table/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/table/plugin.js +3466 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/table/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/CHANGELOG.md +56 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/css/tinycomments.css +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/css/tinycomments.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/index.js +3 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/js/tinycomments-sidebar.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/js/tinycomments-sidebar.min.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/ar.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/bg_BG.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/ca.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/cs.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/da.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/de.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/el.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/es.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/eu.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/fa.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/fi.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/fr_FR.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/he_IL.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/hi.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/hr.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/hu_HU.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/id.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/it.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/ja.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/kk.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/ko_KR.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/ms.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/nb_NO.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/nl.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/pl.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/pt_BR.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/pt_PT.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/ro.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/ru.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/sk.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/sl_SI.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/sv_SE.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/th_TH.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/tr.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/uk.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/vi.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/zh_CN.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/langs/zh_TW.js +58 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/license.txt +5 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/plugin.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/plugin.min.js +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/readme.txt +10 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/tinycomments/version.txt +1 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/visualblocks/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/visualblocks/plugin.js +105 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/visualblocks/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/visualchars/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/visualchars/plugin.js +567 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/visualchars/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/wordcount/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/wordcount/plugin.js +420 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/wordcount/plugin.min.js +9 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/readme.txt +12 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/dark/content.css +72 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/dark/content.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/dark/content.min.css +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/default/content.css +67 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/default/content.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/default/content.min.css +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/document/content.css +72 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/document/content.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/document/content.min.css +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/tinymce-5/content.css +67 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/tinymce-5/content.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/tinymce-5/content.min.css +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/tinymce-5-dark/content.css +72 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/tinymce-5-dark/content.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/tinymce-5-dark/content.min.css +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/writer/content.css +68 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/writer/content.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/writer/content.min.css +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/content.css +890 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/content.inline.css +884 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/content.inline.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/content.inline.min.css +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/content.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/content.min.css +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/skin.css +4766 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/skin.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/skin.min.css +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/skin.shadowdom.css +36 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/skin.shadowdom.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/skin.shadowdom.min.css +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/content.css +878 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/content.inline.css +884 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/content.inline.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/content.inline.min.css +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/content.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/content.min.css +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/skin.css +4769 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/skin.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/skin.min.css +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/skin.shadowdom.css +36 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/skin.shadowdom.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/skin.shadowdom.min.css +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/content.css +890 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/content.inline.css +884 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/content.inline.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/content.inline.min.css +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/content.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/content.min.css +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/skin.css +4880 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/skin.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/skin.min.css +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/skin.shadowdom.css +36 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/skin.shadowdom.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/skin.shadowdom.min.css +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/content.css +878 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/content.inline.css +884 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/content.inline.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/content.inline.min.css +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/content.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/content.min.css +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/skin.css +4880 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/skin.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/skin.min.css +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/skin.shadowdom.css +36 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/skin.shadowdom.js +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +7 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/themes/silver/index.js +13 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/themes/silver/theme.js +31928 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/themes/silver/theme.min.js +337 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/tinymce.d.ts +3313 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/tinymce.js +32267 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/tinymce.min.js +336 -0
- package/src/sap/ui/richtexteditor/js/tiny_mce7/version.txt +1 -0
- package/src/sap/ui/richtexteditor/library.js +9 -3
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* !
|
|
2
|
+
* Tiny PowerPaste plugin
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
|
|
5
|
+
* Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
|
|
6
|
+
*
|
|
7
|
+
* Version: 7.7.2-153
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
!function(){"use strict";const e=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&((e,t)=>{var n,r;return r=e,!!t.prototype.isPrototypeOf(r)||(null===(n=e.constructor)||void 0===n?void 0:n.name)===t.name})(e,String)?"string":t})(t)===e,t=e=>t=>typeof t===e,n=e("string"),r=e("object"),o=e("array"),s=t("boolean"),a=e=>undefined===e;const i=e=>null==e,l=e=>!i(e),c=t("function"),u=t("number"),d=()=>{},h=(e,t)=>(...n)=>e(t.apply(null,n)),m=e=>()=>e,p=e=>e,f=(e,t)=>e===t;function g(e,...t){return(...n)=>{const r=t.concat(n);return e.apply(null,r)}}const v=e=>()=>{throw new Error(e)},y=e=>e(),b=m(!1),x=m(!0);class k{constructor(e,t){this.tag=e,this.value=t}static some(e){return new k(!0,e)}static none(){return k.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?k.some(e(this.value)):k.none()}bind(e){return this.tag?e(this.value):k.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:k.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return l(e)?k.some(e):k.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}k.singletonNone=new k(!1);const w=Array.prototype.slice,S=Array.prototype.indexOf,C=Array.prototype.push,T=(e,t)=>((e,t)=>S.call(e,t))(e,t)>-1,I=(e,t)=>{for(let n=0,r=e.length;n<r;n++)if(t(e[n],n))return!0;return!1},A=(e,t)=>{const n=e.length,r=new Array(n);for(let o=0;o<n;o++){const n=e[o];r[o]=t(n,o)}return r},O=(e,t)=>{for(let n=0,r=e.length;n<r;n++)t(e[n],n)},E=(e,t)=>{const n=[],r=[];for(let o=0,s=e.length;o<s;o++){const s=e[o];(t(s,o)?n:r).push(s)}return{pass:n,fail:r}},L=(e,t)=>{const n=[];for(let r=0,o=e.length;r<o;r++){const o=e[r];t(o,r)&&n.push(o)}return n},_=(e,t,n)=>(O(e,((e,r)=>{n=t(n,e,r)})),n),N=(e,t)=>((e,t,n)=>{for(let r=0,o=e.length;r<o;r++){const o=e[r];if(t(o,r))return k.some(o);if(n(o,r))break}return k.none()})(e,t,b),D=(e,t)=>{for(let n=0,r=e.length;n<r;n++)if(t(e[n],n))return k.some(n);return k.none()},P=e=>{const t=[];for(let n=0,r=e.length;n<r;++n){if(!o(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);C.apply(t,e[n])}return t},R=(e,t)=>P(A(e,t)),M=(e,t)=>{for(let n=0,r=e.length;n<r;++n)if(!0!==t(e[n],n))return!1;return!0},j=(e,t)=>{const n={};for(let r=0,o=e.length;r<o;r++){const o=e[r];n[String(o)]=t(o,r)}return n},F=(e,t)=>{const n=w.call(e,0);return n.sort(t),n},U=e=>(e=>0<e.length?k.some(e[0]):k.none())(e),B=(e,t)=>{for(let n=0;n<e.length;n++){const r=t(e[n],n);if(r.isSome())return r}return k.none()},z=(e,t,n)=>""===t||e.length>=t.length&&e.substr(n,n+t.length)===t,H=(e,t)=>$(e,t)?((e,t)=>e.substring(t))(e,t.length):e,W=(e,t,n=0,r)=>{const o=e.indexOf(t,n);return-1!==o&&(!!a(r)||o+t.length<=r)},$=(e,t)=>z(e,t,0),V=(e,t)=>z(e,t,e.length-t.length),G=(q=/^\s+|\s+$/g,e=>e.replace(q,""));var q;const K=e=>parseInt(e,10),J=(e,t)=>{const n=e-t;return 0===n?0:n>0?1:-1},X=(e,t,n)=>({major:e,minor:t,patch:n}),Y=e=>{const t=/([0-9]+)\.([0-9]+)\.([0-9]+)(?:(\-.+)?)/.exec(e);return t?X(K(t[1]),K(t[2]),K(t[3])):X(0,0,0)},Z=e=>t=>t.options.get(e),Q=Z("paste_as_text"),ee=Z("paste_merge_formats"),te=Z("paste_tab_spaces"),ne=Z("smart_paste"),re=Z("cache_suffix"),oe=Z("automatic_uploads"),se=Z("indent_use_margin"),ae=Z("powerpaste_block_drop"),ie=Z("powerpaste_keep_unsupported_src"),le=Z("powerpaste_allow_local_images"),ce=Z("powerpaste_word_import"),ue=Z("powerpaste_googledocs_import"),de=Z("powerpaste_html_import"),he=Z("powerpaste_clean_filtered_inline_elements"),me=Z("link_default_protocol"),pe=Z("powerpaste_autolink_urls"),fe=e=>{var t;return tinymce.explode(null!==(t=e.options.get("images_file_types"))&&void 0!==t?t:"")},ge=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},ve=()=>{const e=(e=>{const t=ge(k.none()),n=()=>t.get().each(e);return{clear:()=>{n(),t.set(k.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{n(),t.set(k.some(e))}}})(d);return{...e,on:t=>e.get().each(t)}},ye=(e,t)=>{const n=t=>e(t)?k.from(t.dom.nodeValue):k.none();return{get:r=>{if(!e(r))throw new Error("Can only get "+t+" value of a "+t+" node");return n(r).getOr("")},getOption:n,set:(n,r)=>{if(!e(n))throw new Error("Can only set raw "+t+" value of a "+t+" node");n.dom.nodeValue=r}}},be="undefined"!=typeof window?window:Function("return this;")(),xe=(e,t)=>(void 0!==e[t]&&null!==e[t]||(e[t]={}),e[t]),ke=(e,t)=>((e,t)=>{let n=void 0!==t?t:be;for(let t=0;t<e.length;++t)n=xe(n,e[t]);return n})(e.split("."),t),we=e=>e.dom.nodeName.toLowerCase(),Se=e=>e.dom.nodeType,Ce=e=>t=>Se(t)===e,Te=e=>8===Se(e)||"#comment"===we(e),Ie=Ce(1),Ae=Ce(3),Oe=Ce(9),Ee=Ce(11),Le=e=>t=>Ie(t)&&we(t)===e,_e=ye(Te,"comment"),Ne=e=>_e.get(e),De=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},Pe={fromHtml:(e,t)=>{const n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||n.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return De(n.childNodes[0])},fromTag:(e,t)=>{const n=(t||document).createElement(e);return De(n)},fromText:(e,t)=>{const n=(t||document).createTextNode(e);return De(n)},fromDom:De,fromPoint:(e,t,n)=>k.from(e.dom.elementFromPoint(t,n)).map(De)},Re=Object.keys,Me=Object.hasOwnProperty,je=(e,t)=>{const n=Re(e);for(let r=0,o=n.length;r<o;r++){const o=n[r];t(e[o],o)}},Fe=(e,t)=>Ue(e,((e,n)=>({k:n,v:t(e,n)}))),Ue=(e,t)=>{const n={};return je(e,((e,r)=>{const o=t(e,r);n[o.k]=o.v})),n},Be=(e,t)=>{const n={};return((e,t,n,r)=>{je(e,((e,o)=>{(t(e,o)?n:r)(e,o)}))})(e,t,(e=>(t,n)=>{e[n]=t})(n),d),n},ze=e=>Re(e).length,He=(e,t)=>Me.call(e,t),We=e=>{let t,n=!1;return(...r)=>(n||(n=!0,t=e.apply(null,r)),t)},$e=()=>Ve(0,0),Ve=(e,t)=>({major:e,minor:t}),Ge={nu:Ve,detect:(e,t)=>{const n=String(t).toLowerCase();return 0===e.length?$e():((e,t)=>{const n=((e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(r.test(t))return r}})(e,t);if(!n)return{major:0,minor:0};const r=e=>Number(t.replace(n,"$"+e));return Ve(r(1),r(2))})(e,n)},unknown:$e},qe=(e,t)=>{const n=String(t).toLowerCase();return N(e,(e=>e.search(n)))},Ke=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Je=e=>t=>W(t,e),Xe=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>W(e,"edge/")&&W(e,"chrome")&&W(e,"safari")&&W(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Ke],search:e=>W(e,"chrome")&&!W(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>W(e,"msie")||W(e,"trident")},{name:"Opera",versionRegexes:[Ke,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Je("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Je("firefox")},{name:"Safari",versionRegexes:[Ke,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(W(e,"safari")||W(e,"mobile/"))&&W(e,"applewebkit")}],Ye=[{name:"Windows",search:Je("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>W(e,"iphone")||W(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Je("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:Je("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Je("linux"),versionRegexes:[]},{name:"Solaris",search:Je("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Je("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Je("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Ze={browsers:m(Xe),oses:m(Ye)},Qe=e=>{const t=e.current,n=e.version,r=e=>()=>t===e;return{current:t,version:n,isEdge:r("Edge"),isChromium:r("Chromium"),isIE:r("IE"),isOpera:r("Opera"),isFirefox:r("Firefox"),isSafari:r("Safari")}},et=()=>Qe({current:void 0,version:Ge.unknown()}),tt=Qe,nt=e=>{const t=e.current,n=e.version,r=e=>()=>t===e;return{current:t,version:n,isWindows:r("Windows"),isiOS:r("iOS"),isAndroid:r("Android"),isMacOS:r("macOS"),isLinux:r("Linux"),isSolaris:r("Solaris"),isFreeBSD:r("FreeBSD"),isChromeOS:r("ChromeOS")}},rt=()=>nt({current:void 0,version:Ge.unknown()}),ot=nt,st=e=>window.matchMedia(e).matches;let at=We((()=>((e,t,n)=>{const r=Ze.browsers(),o=Ze.oses(),s=t.bind((e=>((e,t)=>B(t.brands,(t=>{const n=t.brand.toLowerCase();return N(e,(e=>{var t;return n===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:Ge.nu(parseInt(t.version,10),0)})))})))(r,e))).orThunk((()=>((e,t)=>qe(e,t).map((e=>{const n=Ge.detect(e.versionRegexes,t);return{current:e.name,version:n}})))(r,e))).fold(et,tt),a=((e,t)=>qe(e,t).map((e=>{const n=Ge.detect(e.versionRegexes,t);return{current:e.name,version:n}})))(o,e).fold(rt,ot),i=((e,t,n,r)=>{const o=e.isiOS()&&!0===/ipad/i.test(n),s=e.isiOS()&&!o,a=e.isiOS()||e.isAndroid(),i=a||r("(pointer:coarse)"),l=o||!s&&a&&r("(min-device-width:768px)"),c=s||a&&!l,u=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n),d=!c&&!l&&!u;return{isiPad:m(o),isiPhone:m(s),isTablet:m(l),isPhone:m(c),isTouch:m(i),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:m(u),isDesktop:m(d)}})(a,s,e,n);return{browser:s,os:a,deviceType:i}})(window.navigator.userAgent,k.from(window.navigator.userAgentData),st)));const it=()=>at(),lt=it(),ct=lt.deviceType.isiOS()||lt.deviceType.isAndroid(),ut=m({isSupported:!1,cleanDocument:()=>Promise.reject("not supported")});var dt=ct?ut:(e,t,n)=>{const r=t+"/wordimport.js"+(e=>k.from(e).filter((e=>0!==e.length)).map((e=>(-1===e.indexOf("?")?"?":"")+e)).getOr(""))(n||"v=6.0.0"),o=e.loadScript("ephox.wimp",r);return o.catch((e=>{console.error("Unable to load word import: ",e)})),{isSupported:!0,cleanDocument:(e,t,n)=>o.then((r=>r.cleanDocument(e,t,n.cleanFilteredInlineElements)))}};const ht=e=>{let t=[];return{bind:e=>{if(void 0===e)throw new Error("Event bind error: undefined handler");t.push(e)},unbind:e=>{t=L(t,(t=>t!==e))},trigger:(...n)=>{const r={};O(e,((e,t)=>{r[e]=n[t]})),O(t,(e=>{e(r)}))}}},mt=e=>{const t=Fe(e,(e=>({bind:e.bind,unbind:e.unbind}))),n=Fe(e,(e=>e.trigger));return{registry:t,trigger:n}},pt=(e,t)=>{const n=e.dom;if(1!==n.nodeType)return!1;{const e=n;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},ft=(e,t)=>{const n=void 0===t?document:t.dom;return 1!==(r=n).nodeType&&9!==r.nodeType&&11!==r.nodeType||0===r.childElementCount?[]:A(n.querySelectorAll(e),Pe.fromDom);var r},gt=(e,t)=>e.dom===t.dom,vt=pt,yt=(e,t,n)=>{const r=e.document.createRange();var o;return o=r,t.fold((e=>{o.setStartBefore(e.dom)}),((e,t)=>{o.setStart(e.dom,t)}),(e=>{o.setStartAfter(e.dom)})),((e,t)=>{t.fold((t=>{e.setEndBefore(t.dom)}),((t,n)=>{e.setEnd(t.dom,n)}),(t=>{e.setEndAfter(t.dom)}))})(r,n),r},bt=(e,t,n,r,o)=>{const s=e.document.createRange();return s.setStart(t.dom,n),s.setEnd(r.dom,o),s},xt=e=>{if(!o(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");const t=[],n={};return O(e,((r,s)=>{const a=Re(r);if(1!==a.length)throw new Error("one and only one name per case");const i=a[0],l=r[i];if(void 0!==n[i])throw new Error("duplicate key detected:"+i);if("cata"===i)throw new Error("cannot have a case named cata (sorry)");if(!o(l))throw new Error("case arguments must be an array");t.push(i),n[i]=(...n)=>{const r=n.length;if(r!==l.length)throw new Error("Wrong number of arguments to case "+i+". Expected "+l.length+" ("+l+"), got "+r);return{fold:(...t)=>{if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);return t[s].apply(null,n)},match:e=>{const r=Re(e);if(t.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+r.join(","));if(!M(t,(e=>T(r,e))))throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+t.join(", "));return e[i].apply(null,n)},log:e=>{console.log(e,{constructors:t,constructor:i,params:n})}}}})),n},kt=xt([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),wt=(e,t,n)=>t(Pe.fromDom(n.startContainer),n.startOffset,Pe.fromDom(n.endContainer),n.endOffset);kt.ltr,kt.rtl;const St=(e,t,n,r)=>({start:e,soffset:t,finish:n,foffset:r}),Ct=e=>Pe.fromDom(e.dom.ownerDocument),Tt=e=>Oe(e)?e:Ct(e),It=e=>Pe.fromDom(Tt(e).dom.defaultView),At=e=>k.from(e.dom.parentNode).map(Pe.fromDom),Ot=e=>k.from(e.dom.previousSibling).map(Pe.fromDom),Et=e=>k.from(e.dom.nextSibling).map(Pe.fromDom),Lt=e=>(e=>{const t=w.call(e,0);return t.reverse(),t})(((e,t)=>{const n=[],r=e=>(n.push(e),t(e));let o=t(e);do{o=o.bind(r)}while(o.isSome());return n})(e,Ot)),_t=e=>A(e.dom.childNodes,Pe.fromDom),Nt=e=>Pe.fromDom(e.dom.host),Dt=e=>{const t=Ae(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const n=t.ownerDocument;return(e=>{const t=(e=>Pe.fromDom(e.dom.getRootNode()))(e);return Ee(n=t)&&l(n.dom.host)?k.some(t):k.none();var n})(Pe.fromDom(t)).fold((()=>n.body.contains(t)),(r=Dt,o=Nt,e=>r(o(e))));var r,o},Pt=(e,t)=>{let n=[];return O(_t(e),(e=>{t(e)&&(n=n.concat([e])),n=n.concat(Pt(e,t))})),n},Rt=(e,t)=>ft(t,e),Mt=xt([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),jt={before:Mt.before,on:Mt.on,after:Mt.after,cata:(e,t,n,r)=>e.fold(t,n,r),getStart:e=>e.fold(p,p,p)},Ft=xt([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Ut={domRange:Ft.domRange,relative:Ft.relative,exact:Ft.exact,exactFromRange:e=>Ft.exact(e.start,e.soffset,e.finish,e.foffset),getWin:e=>{const t=(e=>e.match({domRange:e=>Pe.fromDom(e.startContainer),relative:(e,t)=>jt.getStart(e),exact:(e,t,n,r)=>e}))(e);return It(t)},range:St},Bt=(e,t)=>{const n=we(e);return"input"===n?jt.after(e):T(["br","img"],n)?0===t?jt.before(e):jt.after(e):jt.on(e,t)},zt=(e,t,n,r)=>{const o=Ct(e).dom.createRange();return o.setStart(e.dom,t),o.setEnd(n.dom,r),o},Ht=e=>k.from(e.getSelection()),Wt=(e,t,n,r,o)=>{((e,t)=>{Ht(e).each((e=>{e.removeAllRanges(),e.addRange(t)}))})(e,bt(e,t,n,r,o))},$t=(e,t,n,r,o)=>{const s=((e,t,n,r)=>{const o=Bt(e,t),s=Bt(n,r);return Ut.relative(o,s)})(t,n,r,o);((e,t)=>{((e,t)=>{const n=((e,t)=>t.match({domRange:e=>({ltr:m(e),rtl:k.none}),relative:(t,n)=>({ltr:We((()=>yt(e,t,n))),rtl:We((()=>k.some(yt(e,n,t))))}),exact:(t,n,r,o)=>({ltr:We((()=>bt(e,t,n,r,o))),rtl:We((()=>k.some(bt(e,r,o,t,n))))})}))(e,t);return((e,t)=>{const n=t.ltr();return n.collapsed?t.rtl().filter((e=>!1===e.collapsed)).map((e=>kt.rtl(Pe.fromDom(e.endContainer),e.endOffset,Pe.fromDom(e.startContainer),e.startOffset))).getOrThunk((()=>wt(0,kt.ltr,n))):wt(0,kt.ltr,n)})(0,n)})(e,t).match({ltr:(t,n,r,o)=>{Wt(e,t,n,r,o)},rtl:(t,n,r,o)=>{Ht(e).each((s=>{if(s.setBaseAndExtent)s.setBaseAndExtent(t.dom,n,r.dom,o);else if(s.extend)try{((e,t,n,r,o,s)=>{t.collapse(n.dom,r),t.extend(o.dom,s)})(0,s,t,n,r,o)}catch(s){Wt(e,r,o,t,n)}else Wt(e,r,o,t,n)}))}})})(e,s)},Vt=e=>{if(e.rangeCount>0){const t=e.getRangeAt(0),n=e.getRangeAt(e.rangeCount-1);return k.some(St(Pe.fromDom(t.startContainer),t.startOffset,Pe.fromDom(n.endContainer),n.endOffset))}return k.none()},Gt=e=>{if(null===e.anchorNode||null===e.focusNode)return Vt(e);{const t=Pe.fromDom(e.anchorNode),n=Pe.fromDom(e.focusNode);return((e,t,n,r)=>{const o=zt(e,t,n,r),s=gt(e,n)&&t===r;return o.collapsed&&!s})(t,e.anchorOffset,n,e.focusOffset)?k.some(St(t,e.anchorOffset,n,e.focusOffset)):Vt(e)}},qt=e=>Ht(e).filter((e=>e.rangeCount>0)).bind(Gt),Kt=(e,t)=>{At(e).each((n=>{n.dom.insertBefore(t.dom,e.dom)}))},Jt=(e,t)=>{Et(e).fold((()=>{At(e).each((e=>{Yt(e,t)}))}),(e=>{Kt(e,t)}))},Xt=(e,t)=>{(e=>(e=>{const t=e.dom.childNodes;return k.from(t[0]).map(Pe.fromDom)})(e))(e).fold((()=>{Yt(e,t)}),(n=>{e.dom.insertBefore(t.dom,n.dom)}))},Yt=(e,t)=>{e.dom.appendChild(t.dom)},Zt=(e,t)=>{Kt(e,t),Yt(t,e)},Qt=(e,t)=>{O(t,((n,r)=>{const o=0===r?e:t[r-1];Jt(o,n)}))},en=(e,t)=>{O(t,(t=>{Yt(e,t)}))},tn=e=>{e.dom.textContent="",O(_t(e),(e=>{nn(e)}))},nn=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},rn=e=>{const t=_t(e);t.length>0&&Qt(e,t),nn(e)},on=(e,t,n,r)=>{const o=gt(e,n)&&t===r;return{startContainer:m(e),startOffset:m(t),endContainer:m(n),endOffset:m(r),collapsed:m(o)}};let sn=0;const an=e=>{const t=(new Date).getTime(),n=Math.floor(window.crypto.getRandomValues(new Uint32Array(1))[0]/4294967295*1e9);return sn++,e+"_"+n+sn+String(t)},ln=(e,t,r)=>{if(!(n(r)||s(r)||u(r)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",r,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,r+"")},cn=(e,t,n)=>{ln(e.dom,t,n)},un=(e,t)=>{const n=e.dom;je(t,((e,t)=>{ln(n,t,e)}))},dn=(e,t)=>{const n=e.dom.getAttribute(t);return null===n?void 0:n},hn=(e,t)=>k.from(dn(e,t)),mn=(e,t)=>{const n=e.dom;return!(!n||!n.hasAttribute)&&n.hasAttribute(t)},pn=(e,t)=>{e.dom.removeAttribute(t)},fn=(e,t)=>{const n=dn(e,t);return void 0===n||""===n?[]:n.split(" ")},gn=e=>void 0!==e.dom.classList,vn=e=>fn(e,"class"),yn=(e,t)=>{gn(e)?e.dom.classList.add(t):((e,t)=>{((e,t,n)=>{const r=fn(e,t).concat([n]);cn(e,t,r.join(" "))})(e,"class",t)})(e,t)},bn=(e,t)=>{gn(e)?e.dom.classList.remove(t):((e,t)=>{((e,t,n)=>{const r=L(fn(e,t),(e=>e!==n));r.length>0?cn(e,t,r.join(" ")):pn(e,t)})(e,"class",t)})(e,t),(e=>{0===(gn(e)?e.dom.classList:vn(e)).length&&pn(e,"class")})(e)},xn=(e,t)=>gn(e)&&e.dom.classList.contains(t),kn=(e,t,n=f)=>e.exists((e=>n(e,t))),wn=(e,t)=>e?k.some(t):k.none(),Sn=e=>void 0!==e.style&&c(e.style.getPropertyValue),Cn=(e,t,r)=>{if(!n(r))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",r,":: Element ",e),new Error("CSS value must be a string: "+r);Sn(e)&&e.style.setProperty(t,r)},Tn=(e,t)=>{Sn(e)&&e.style.removeProperty(t)},In=(e,t,n)=>{const r=e.dom;Cn(r,t,n)},An=(e,t)=>{const n=e.dom;je(t,((e,t)=>{Cn(n,t,e)}))},On=(e,t)=>{const n=e.dom,r=window.getComputedStyle(n).getPropertyValue(t);return""!==r||Dt(e)?r:En(n,t)},En=(e,t)=>Sn(e)?e.style.getPropertyValue(t):"",Ln=(e,t)=>{const n=e.dom,r=En(n,t);return k.from(r).filter((e=>e.length>0))},_n=e=>{const t={},n=e.dom;if(Sn(n))for(let e=0;e<n.style.length;e++){const r=n.style.item(e);t[r]=n.style[r]}return t},Nn=(e,t)=>{const n=e.dom;Tn(n,t),kn(hn(e,"style").map(G),"")&&pn(e,"style")},Dn=e=>"rtl"===On(e,"direction")?"rtl":"ltr",Pn=(e,t)=>{const n=(t||document).createElement("div");return n.innerHTML=e,_t(Pe.fromDom(n))},Rn=e=>e.dom.innerHTML,Mn=(e,t,n)=>{let r=e.dom;const o=c(n)?n:b;for(;r.parentNode;){r=r.parentNode;const e=Pe.fromDom(r);if(t(e))return k.some(e);if(o(e))break}return k.none()},jn=(e,t)=>N(e.dom.childNodes,(e=>t(Pe.fromDom(e)))).map(Pe.fromDom),Fn=(e,t)=>{const n=e=>{for(let r=0;r<e.childNodes.length;r++){const o=Pe.fromDom(e.childNodes[r]);if(t(o))return k.some(o);const s=n(e.childNodes[r]);if(s.isSome())return s}return k.none()};return n(e.dom)},Un=(e,t,n)=>Mn(e,(e=>pt(e,t)),n),Bn=(e,t,n)=>((e,t,n,r,o)=>((e,t)=>pt(e,t))(n,r)?k.some(n):c(o)&&o(n)?k.none():t(n,r,o))(0,Un,e,t,n),zn=e=>{const t=Hn(e);return{resolve:e=>{const n=e.split(" ");return A(n,(e=>Wn(t,e))).join(" ")}}},Hn=e=>e.replace(/\./g,"-"),Wn=(e,t)=>e+"-"+t,$n=zn("ephox-sloth").resolve,Vn=m($n("bin")),Gn=["b","i","u","sub","sup","strike"],qn=Vn(),Kn=qn+an(""),Jn=e=>"rtl"===Dn(e)?"100000px":"-100000px";const Xn=(e,t)=>{const n=Pe.fromTag("div");var r;un(n,t),un(n,{contenteditable:"true","aria-hidden":"true"}),An(n,{position:"fixed",top:"0px",width:"100px",height:"100px",overflow:"hidden",opacity:"0"}),r=n,O([qn,Kn],(e=>{yn(r,e)}));const o=e=>xn(e,Kn);return{attach:e=>{tn(n),In(n,"left",Jn(e)),Yt(e,n)},focus:()=>{Un(n,"body").each((t=>{e.toOff(t,n)}))},contents:()=>(((e,t)=>{Et(e).filter(t).each((t=>{const n=_t(t);en(e,n),nn(t)})),((e,t)=>{const n=_t(e);O(n,(e=>{t(e)&&(e=>{const t=_t(e),n=Pe.fromTag("div",Ct(e).dom);en(n,t),Kt(e,n),nn(e)})(e)}))})(e,t),O(_t(e),(e=>{(e=>Ie(e)&&!e.dom.hasChildNodes()&&T(Gn,we(e)))(e)&&nn(e)}))})(n,o),{elements:_t(n),html:Rn(n),offscreen:n}),container:m(n),detach:()=>{nn(n)}}},Yn=e=>{const t=gt(e.start,e.finish)&&e.soffset===e.foffset;return{startContainer:m(e.start),startOffset:m(e.soffset),endContainer:m(e.finish),endOffset:m(e.foffset),collapsed:m(t)}},Zn={set:(e,t)=>{$t(e,t.startContainer(),t.startOffset(),t.endContainer(),t.endOffset())},get:e=>qt(e).map(Yn)};var Qn=e=>t=>{const n=mt({after:ht(["container"])}),r=(e=>{const t=Pe.fromTag("br");let n=k.none();const r=e=>It(e).dom;return{cleanup:()=>{nn(t)},toOn:(t,o)=>{const s=r(o);n.each((n=>{const r=(e=>e.dom.childNodes.length)(t),o=gt(t,n.startContainer())&&r<n.startOffset()?r:n.startOffset(),a=gt(t,n.endContainer())&&r<n.endOffset()?r:n.endOffset(),i=on(n.startContainer(),o,n.endContainer(),a);e.set(s,i)}))},toOff:(o,s)=>{const a=r(s);Yt(s,t),n=e.get(a),e.set(a,on(t,0,t,0))}}})(Zn),o=((e,t,n)=>{const r=Xn(e,n),o=()=>{e.cleanup();const t=r.contents();r.detach(),s.trigger.after(t.elements,t.html,r.container())},s=mt({before:ht([]),after:ht(["elements","html","container"])}),a=d;return{instance:m((()=>{s.trigger.before(),r.attach(t),r.focus(),((e,t)=>{((e,t)=>{setTimeout(t,1)})(0,t)})(Ct(t),o)})),destroy:a,events:s.registry}})(r,t,e);return o.events.after.bind((e=>{r.toOn(t,e.container),n.trigger.after(e.container)})),{run:()=>{o.instance()()},events:n.registry}};const er=zn("ephox-cement").resolve,tr={cacheSuffix:"",pasteBinAttrs:{},keepSrc:!1,sanitizer:{sanitizeHtml:m(""),sanitizeText:m("")},tabSpaces:4,cleanFilteredInlineElements:[],indentUseMargin:!1,defaultProtocol:"https",autoLinkUrls:!0},nr=m(er("smartpaste-eph-bin")),rr=e=>{let t=k.none(),n=[];const r=e=>{o()?s(e):n.push(e)},o=()=>t.isSome(),s=e=>{t.each((t=>{setTimeout((()=>{e(t)}),0)}))};return e((e=>{o()||(t=k.some(e),O(n,s),n=[])})),{get:r,map:e=>rr((t=>{r((n=>{t(e(n))}))})),isReady:o}},or={nu:rr,pure:e=>rr((t=>{t(e)}))},sr=e=>{setTimeout((()=>{throw e}),0)},ar=e=>{const t=t=>{e().then(t,sr)};return{map:t=>ar((()=>e().then(t))),bind:t=>ar((()=>e().then((e=>t(e).toPromise())))),anonBind:t=>ar((()=>e().then((()=>t.toPromise())))),toLazy:()=>or.nu(t),toCached:()=>{let t=null;return ar((()=>(null===t&&(t=e()),t)))},toPromise:e,get:t}},ir=e=>ar((()=>new Promise(e))),lr=e=>((e,t)=>t((t=>{const n=[];let r=0;0===e.length?t([]):O(e,((o,s)=>{o.get((o=>s=>{n[o]=s,r++,r>=e.length&&t(n)})(s))}))})))(e,ir),cr=()=>{const e={};return{getOrSetIndexed:(t,n)=>(t=>void 0!==e[t])(t)?e[t]:((t,n)=>(e[t]=n,n))(t,n()),waitForLoad:()=>{const t=((e,t)=>{const n=[];return je(e,((e,r)=>{n.push(t(e,r))})),n})(e,p);return lr(t)}}},ur=e=>{const t=t=>t(e),n=m(e),r=()=>o,o={tag:!0,inner:e,fold:(t,n)=>n(e),isValue:x,isError:b,map:t=>hr.value(t(e)),mapError:r,bind:t,exists:t,forall:t,getOr:n,or:r,getOrThunk:n,orThunk:r,getOrDie:n,each:t=>{t(e)},toOptional:()=>k.some(e)};return o},dr=e=>{const t=()=>n,n={tag:!1,inner:e,fold:(t,n)=>t(e),isValue:b,isError:x,map:t,mapError:t=>hr.error(t(e)),bind:t,exists:b,forall:x,getOr:p,or:p,getOrThunk:y,orThunk:y,getOrDie:v(String(e)),each:d,toOptional:k.none};return n},hr={value:ur,error:dr,fromOption:(e,t)=>e.fold((()=>dr(t)),ur)},mr=e=>{const t=Pe.fromDom((e=>{if(l(e.target)){const t=Pe.fromDom(e.target);if(Ie(t)&&l(t.dom.shadowRoot)&&e.composed&&e.composedPath){const t=e.composedPath();if(t)return U(t)}}return k.from(e.target)})(e).getOr(e.target)),n=()=>e.stopPropagation(),r=()=>e.preventDefault(),o=h(r,n);return((e,t,n,r,o,s,a)=>({target:e,x:t,y:n,stop:r,prevent:o,kill:s,raw:a}))(t,e.clientX,e.clientY,n,r,o,e)},pr=(e,t,n,r)=>{e.dom.removeEventListener(t,n,r)},fr=x,gr=(e,t,n)=>((e,t,n,r)=>((e,t,n,r,o)=>{const s=((e,t)=>n=>{e(n)&&t(mr(n))})(n,r);return e.dom.addEventListener(t,s,o),{unbind:g(pr,e,t,s,o)}})(e,t,n,r,!1))(e,t,fr,n),vr=(e=>{const t=g(ke,e);ke("callbacks",t());const n=(n,o)=>{const s=t(),a=(e=>{const t=void 0===e.count?0:e.count,n="callback_"+t;return e.count=t+1,n})(s);return s.callbacks[a]=(...e)=>{o||r(a),n(...e)},(t=>e+".callbacks."+t)(a)},r=e=>{const n=e.substring(e.lastIndexOf(".")+1),r=t();void 0!==r.callbacks[n]&&delete r.callbacks[n]};return{ephemeral:e=>n(e,!1),permanent:e=>n(e,!0),unregister:r}})("ephox.henchman.features"),yr=(e,t)=>or.nu((n=>{const o=t=>{O(a,(e=>{e.unbind()})),n(t.fold((t=>hr.error(t+'Unable to download editor stylesheets from "'+e+'"')),hr.value))},s=(e=>{const t=Pe.fromDom(document),n=Pe.fromTag("link",t.dom);return un(n,{rel:"stylesheet",type:"text/css",href:e}),((e,t)=>{const n=(e=>{const t=e.dom.head;if(null==t)throw new Error("Head is not available yet");return Pe.fromDom(t)})(e);Yt(n,t)})(t,n),n})(e),a=[gr(s,"load",(e=>{(e=>{var t;try{const n=null===(t=e.target.dom.sheet)||void 0===t?void 0:t.cssRules;return r(n)&&0===n.length}catch(e){}return!1})(e)?o(hr.error("")):t(o)})),gr(s,"error",g(o,hr.error("")))]})),br=(()=>{const e=cr(),t=()=>e.waitForLoad();return{preload:()=>{t().get(p)},addStylesheet:(t,n)=>e.getOrSetIndexed(t,(()=>yr(t,n))),addScript:(t,n)=>e.getOrSetIndexed(t,(()=>(e=>or.nu((t=>{const n=()=>{o.unbind(),s.unbind()},r=Pe.fromTag("script");cn(r,"src",e),cn(r,"type","text/javascript"),cn(r,"async","async"),cn(r,"data-main",vr.ephemeral((e=>{t(hr.value(e))})));const o=gr(r,"error",(()=>{n(),t(hr.error("Error loading external script tag "+e))})),s=gr(r,"load",n);Yt(Pe.fromDom(document.head),r)})))(t).map(n))),waitForLoad:t}})(),xr={loadScript:(e,t)=>new Promise(((e,n)=>{((e,t)=>br.addScript(e,t))(t,p).get((t=>{t.fold(n,e)}))}))},kr=xt([{error:["message"]},{paste:["elements","correlated"]},{cancel:[]},{incomplete:["elements","correlated","message"]}]),wr=(e,t,n,r,o)=>e.fold(t,n,r,o),Sr=kr.error,Cr=kr.paste,Tr=kr.cancel,Ir=kr.incomplete,Ar=["officeStyles","htmlStyles","gdocsStyles","isWord","isGoogleDocs","proxyBin","isInternal"],Or=(e,t)=>{const n={};return O(Ar,(r=>{t[r].or(e[r]).each((e=>{n[r]=e}))})),Er(n)},Er=e=>j(Ar,(t=>k.from(e[t]))),Lr=e=>({response:Sr(e),bundle:Er({})}),_r=e=>Promise.resolve(Lr(e)),Nr={response:Tr(),bundle:Er({})},Dr=e=>l(e.then),Pr=(e,t,n,r)=>({steps:e,input:t,label:n,capture:r}),Rr=(e,t)=>{const n=Or(e.bundle,t.bundle),r=((e,t)=>wr(e,k.none,k.none,k.none,((e,n,r)=>wr(t,k.none,((e,t)=>k.some(kr.incomplete(e,t,r))),k.none,k.none))).getOr(t))(e.response,t.response);return{response:r,bundle:n}},Mr=(e,t,n)=>{const r=()=>e,o=()=>{const r=n(t,e);return Dr(r)?r.then((t=>Rr(e,t))):Rr(e,r)};return wr(e.response,r,o,r,o)},jr=(Fr=(e,t)=>t,(...e)=>{if(0===e.length)throw new Error("Can't merge zero objects");const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const e in r)He(r,e)&&(t[e]=Fr(t[e],r[e]))}return t});var Fr;const Ur=xt([{starts:["value","f"]},{pattern:["regex","f"]},{contains:["value","f"]},{exact:["value","f"]},{all:[]},{not:["stringMatch"]}]),Br=p,zr=(e,t)=>e.fold(((e,n)=>0===n(t).indexOf(n(e))),((e,n)=>e.test(n(t))),((e,n)=>n(t).indexOf(n(e))>=0),((e,n)=>n(t)===n(e)),x,(e=>!zr(e,t))),Hr={starts:Ur.starts,pattern:Ur.pattern,contains:Ur.contains,exact:Ur.exact,all:Ur.all,not:Ur.not,cata:(e,t,n,r,o,s,a)=>e.fold(t,n,r,o,s,a),matches:zr,caseSensitive:Br,caseInsensitive:e=>e.toLowerCase()},Wr=(e,t)=>{const n=we(e),r=t.name,o=void 0!==t.condition?t.condition:x;return Hr.matches(r,n)&&o(e)},$r=(e,t,n)=>{const r=(e=>{const t={},n=l(e)?e.split(";"):[];return O(n,(e=>{const n=e.split(":");2===n.length&&(t[G(n[0])]=G(n[1]))})),t})(e.dom.getAttribute("style")),o={};return O(t,(e=>{const t=r[e];void 0===t||n(t,e)||(o[e]=t)})),o},Vr=e=>{const t=Re(e);return A(t,(t=>t+": "+e[t])).join("; ")},Gr=["mso-list"],qr=(e,t)=>{const n=$r(e,Gr,t),r=((e,t)=>{const n=e.dom.style,r=i(n)?[]:n,o={};return O(r,(n=>{Ln(e,n).each((e=>{t(e,n)||(o[n]=e)}))})),o})(e,t);((e,t,n)=>{cn(e,"style","");const r=ze(t),o=ze(n);if(0===r&&0===o)pn(e,"style");else if(0===r)cn(e,"style",Vr(n));else{je(t,((t,n)=>{In(e,n,t)}));const r=dn(e,"style"),s=o>0?Vr(n)+"; ":"";cn(e,"style",s+r)}})(e,r,n)},Kr=(e,t)=>{const n=((e,t)=>{const n={};return O(e.dom.attributes,(e=>{t(e.value,e.name)||(n[e.name]=e.value)})),n})(e,t);((e,t)=>{const n=A(e.dom.attributes,(e=>e.name));ze(t)!==n.length&&((e,t,n)=>{O(t,(t=>{pn(e,t)})),je(n,((t,n)=>{cn(e,n,t)}))})(e,n,t)})(e,n)},Jr=(e,t)=>{qr(Pe.fromDom(e),t)},Xr=(e,t,n)=>{e(n,((e,r)=>I(t,(t=>((e,t,n,r)=>{const o=r.name,s=void 0!==r.condition?r.condition:x,a=void 0!==r.value?r.value:Hr.all();return Hr.matches(o,n)&&Hr.matches(a,t)&&s(e)})(n,e,r,t)))))},Yr="startElement",Zr="endElement",Qr="text",eo="comment",to=(e,t,n)=>{let r,o,s;const a=Pe.fromDom(e);switch(e.nodeType){case 1:t?r=Zr:(r=Yr,An(a,n||{}));const i=e;o="HTML"!==i.scopeName&&i.scopeName&&i.tagName&&i.tagName.indexOf(":")<=0?(i.scopeName+":"+i.tagName).toLowerCase():i.tagName.toLowerCase();break;case 3:r=Qr,s=e.nodeValue;break;case 8:r=eo,s=e.nodeValue;break;default:console.log("WARNING: Unsupported node type encountered: "+e.nodeType)}return{getNode:m(e),tag:()=>o,type:()=>r,text:()=>s}},no=(e,t,n,r)=>{const o=r.createElement(e);return je(t,((e,t)=>{o.setAttribute(t,e+"")})),to(o,!1,n)},ro=(e,t)=>to(t.createElement(e),!0),oo=ro("html",window.document),so=e=>{const t=e.createDocumentFragment();let n=t;const r=e=>{n.appendChild(e)};return{dom:t,receive:o=>{switch(o.type()){case Yr:s=o.getNode().cloneNode(!1),r(s),n=s;break;case Qr:(t=>{const n=e.createTextNode(t.text());r(n)})(o);break;case Zr:(()=>{const e=n.parentNode;n=null===e?t:e})();break;case eo:break;default:throw new Error("Unsupported token type: "+o.type())}var s},label:"SERIALISER"}},ao=e=>t=>{((e,t)=>{const n=jr({styles:[],attributes:[],classes:[],tags:[]},t),r=Rt(e,"*");O(r,(e=>{Xr(qr,n.styles,e),Xr(Kr,n.attributes,e),O(n.classes,(t=>{const n=mn(e,"class")?(e=>gn(e)?(e=>{const t=e.dom.classList,n=new Array(t.length);for(let e=0;e<t.length;e++){const r=t.item(e);null!==r&&(n[e]=r)}return n})(e):vn(e))(e):[];O(n,(n=>{Hr.matches(t.name,n)&&bn(e,n)}))}))}));const o=Rt(e,"*");O(o,(e=>{I(n.tags,g(Wr,e))&&nn(e)}))})(t,e)},io=e=>t=>{((e,t)=>{const n=jr({tags:[]},t),r=Rt(e,"*");O(r,(e=>{I(n.tags,g(Wr,e))&&rn(e)}))})(t,e)},lo=e=>t=>{((e,t)=>{const n=jr({tags:[]},t),r=Rt(e,"*");O(r,(e=>{N(n.tags,g(Wr,e)).each((t=>{t.mutate(e)}))}))})(t,e)},co=e=>t=>{const n=Rn(t),r=((e,t,n)=>{const r=so(e),o=((e,t=window.document)=>{const n=t.createElement("div");t.body.appendChild(n),n.style.position="absolute",n.style.left="-10000px",n.innerHTML=e;let r=n.firstChild||oo;const o=[];let s=!1;return{hasNext:()=>void 0!==r,next:()=>{const e=r,a=r,i=s;return!s&&e.firstChild?(o.push(e),r=e.firstChild):s||1!==e.nodeType?e.nextSibling?(r=e.nextSibling,s=!1):(r=o.pop(),s=!0):s=!0,a===oo||r||(t.body.removeChild(n),r=oo),(l=a)===oo?l:l?to(l,i):void 0;var l}}})(t,e),s=((e,t,n)=>{let r=n;for(let n=t.length-1;n>=0;n--)r=t[n](r,{},e);return r})(e,n,r);for(;o.hasNext();){const e=o.next();s.receive(e)}return r.dom})(Ct(t).dom,n,e);tn(t),t.dom.appendChild(r)},uo=(e,t,n)=>{const r=Pe.fromTag("div",e.dom);An(r,{position:"fixed",left:"-100000px",top:"0px"}),Yt((e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return Pe.fromDom(t)})(e),r),r.dom.innerHTML=t,O(n,(e=>{e(r)}));const o=Rn(r);return nn(r),o},ho=(e,t)=>n=>{const r=e=>{n.receive(e)},o=(e,t,n)=>(n=void 0!==n?n:e.type()===Zr,to(t,n,{})),s={emit:r,emitTokens:e=>{O(e,r)},receive:t=>{e(s,t,o)},document:window.document};return t(s),s},mo=(e,t)=>{if(void 0===e||void 0===t)throw console.trace(),new Error("brick");e.nextFilter.set(t)},po=(e,t,n=!1)=>e===t||l(e)&&l(t)&&e.tag===t.tag&&e.type===t.type&&(n||e.variant===t.variant),fo=(e,t)=>mn(Pe.fromDom(t.getNode()),"data-list-level"),go=(e,t,n,r)=>{const o=n.getCurrentListType(),s=n.getCurrentLevel()==r.level()?o:null;return(a=r.emblems(),i=s,N(a,(e=>"ul"===e.tag||l(i)&&po(e,i,!0))).orThunk((()=>U(a)))).filter((e=>!("ol"===e.tag&&(e=>{if(T(["p"],e.tag())){const t=(e=>{const t=Pe.fromDom(e.getNode());return dn(t,"class")})(e);return l(t)&&/^MsoHeading/.test(t)}return!0})(t))));var a,i},vo=e=>(t,n,r)=>{const o=r,s=(e=>{const t=parseInt(dn(e,"data-list-level"),10),n=dn(e,"data-list-emblems"),r=l(n)?JSON.parse(n):[];return pn(e,"data-list-level"),pn(e,"data-list-emblems"),{level:m(t),emblems:m(r)}})(Pe.fromDom(o.getNode()));n.originalToken.set(o);const a=((e,t,n)=>(go(n.listType.get(),e,n.emitter,t).each(n.listType.set),((e,t,n)=>({level:m(e),token:m(t),type:m(n)}))(t.level(),n.originalToken.get(),n.listType.get())))(o,s,n);n.emitter.openItem(a.level(),a.token(),a.type()),mo(n,e.inside())},yo=(e,t,n)=>({pred:e,action:t,label:m(n)});var bo=(e,t,n)=>{const r=(e,r,o)=>{N(t,(e=>e.pred(r,o))).fold(m(n),(e=>e.action))(e,r,o)};return r.toString=()=>"Handlers for "+e,r};const xo=(e,t)=>({state:m(e),result:m(t)}),ko=(e,t)=>({state:m(e),value:m(t)}),wo=(e,t,n,r)=>({level:m(e),type:m(t),types:m(n),items:m(r)}),So=e=>{const t=e.items().slice(0);if(t.length>0&&"p"!==t[t.length-1]){const n=t[t.length-1];t[t.length-1]="p";const r=wo(e.level(),e.type(),e.types(),t);return ko(r,k.some(n))}return ko(e,k.none())},Co=(e,t,n)=>{let r=[],o=e;for(;t(o);){const e=n(o);o=e.state(),r=r.concat(e.result())}return xo(o,r)},To=(e,t,n)=>{const r=t.start&&t.start>1?{start:t.start}:{},o=e.level()+1,s=t,a=e.types().concat([t]),i=[g(no,t.tag,r,n)],l=wo(o,s,a,e.items());return xo(l,i)},Io=e=>{const t=e.types().slice(0),n=[g(ro,t.pop().tag)],r=e.level()-1,o=t[t.length-1],s=wo(r,o,t,e.items());return xo(s,n)},Ao=(e,t,n)=>{const r=(c=t)?(e=>{const t=(e=>{const t=Pe.fromDom(e.getNode());return On(t,"margin-left")})(e);return l(t)&&"0px"!==t?{"margin-left":t}:{}})(c):{"list-style-type":"none"},o=e.type()&&!po(e.type(),n)?((e,t)=>{const n=Io(e),r=To(n.state(),t,t.type?{"list-style-type":t.type}:{});return xo(r.state(),n.result().concat(r.result()))})(e,n):xo(e,[]),s=[g(no,"li",{},r)],a=((e,t)=>{const n=e.items().slice(0),r=void 0!==t&&"p"!==t?k.some(t):k.none();r.fold((()=>{n.push("p")}),(e=>{n.push(e)}));const o=wo(e.level(),e.type(),e.types(),n);return ko(o,r)})(o.state(),t&&t.tag()),i=a.value().map((e=>{const n=t;return Jr(n.getNode(),x),[m(n)]})).getOr([]);var c;return xo(a.state(),o.result().concat(s).concat(i))},Oo=e=>{const t=g(ro,"li"),n=So(e),r=n.value().fold((()=>[t]),(e=>[g(ro,e),t]));return xo(n.state(),r)},Eo=e=>{if(0===e.length)throw new Error("Compose must have at least one element in the list");const t=e[e.length-1],n=R(e,(e=>e.result()));return xo(t.state(),n)},Lo=e=>{const t=Oo(e),n=Io(t.state());return Eo([t,n])},_o=(e,t)=>((e,t,n)=>Co(e,(e=>e.level()>t),n))(e,t,Lo),No=(e,t,n,r)=>{const o=e.level()>t?_o(e,t):xo(e,[]),s=o.state().level()===t?((e,t,n)=>{const r=e.level()>0?Oo(e):xo(e,[]),o=Ao(r.state(),n,t);return Eo([r,o])})(o.state(),r,n):((e,t,n,r)=>{const o=n>1?So(e):ko(e,k.none()),s=o.value().map((e=>[g(ro,e)])).getOr([]),a=((e,t,n,r)=>((e,t,n)=>Co(e,(e=>e.level()<t),n))(e,n,(e=>((e,t,n,r)=>{const o=e.level()===n-1&&t.type?{"list-style-type":t.type}:{},s=To(e,t,o),a=Ao(s.state(),s.state().level()==n?r:void 0,t);return Eo([s,a])})(e,t,n,r))))(o.state(),t,n,r);return xo(a.state(),s.concat(a.result()))})(o.state(),r,t,n);return Eo([o,s])},Do=_o,Po=["disc","circle","square"],Ro={getCurrentListType:()=>Mo().getCurrentListType(),getCurrentLevel:()=>Mo().getCurrentLevel(),closeAllLists:()=>Mo().closeAllLists(),openItem:(e,t,n)=>Mo().openItem(e,t,n)};let Mo=()=>({getCurrentListType:m({}),getCurrentLevel:m(1),closeAllLists:d,openItem:p});const jo={inside:()=>Uo,outside:()=>Bo},Fo=(()=>{let e=!1;return{check:t=>!(!e||t.type()!==Qr)||(t.type()===Yr&&"style"===t.tag()?(e=!0,!0):t.type()===Zr&&"style"===t.tag()&&(e=!1,!0))}})(),Uo=(e=>bo("Inside.List.Item",[yo(((e,t)=>{const n=e.originalToken.get();return t.type()===Zr&&null!==n&&t.tag()===n.tag()}),((t,n)=>{mo(n,e.outside())}),"Closing open tag")],((e,t,n)=>{e.emit(n)})))(jo),Bo=(e=>bo("Outside.List.Item",[yo(fo,vo(e),"Data List ****"),yo(((e,t)=>t.type()===Qr&&(e=>e.type()===Qr&&/^[\s\u00A0]*$/.test(e.text()))(t)),((e,t,n)=>{e.emit(n)}),"Whitespace")],((t,n,r)=>{n.emitter.closeAllLists(),t.emit(r),mo(n,e.outside())})))(jo),zo=(e=>{const t=ge(e),n=ge(null),r=ge(null);return{reset:o=>{t.set(e),n.set(null),r.set(null),Mo=m(((e,t)=>{let n=wo(0,void 0,[],[]);const r=n=>{O(n.result(),(n=>{const r=n(t);e.emit(r)}))};return{closeAllLists:()=>{const e=Do(n,0);n=e.state(),r(e)},openItem:(e,t,o)=>{if(!o)return;const s=((e,t)=>"ul"===e.tag&&Po[t-1]===e.type?{tag:"ul"}:e)(o,e),a=No(n,e,t,s);n=a.state(),r(a)},getCurrentListType:()=>n.type(),getCurrentLevel:()=>n.level()}})(o,o.document))},nextFilter:t,originalToken:n,listType:r,emitter:Ro}})(Bo);var Ho=ho(((e,t,n)=>{Fo.check(t)||((e,t,n)=>{t.nextFilter.get()(e,t,n)})(e,zo,t)}),zo.reset);const Wo=e=>e.dom.textContent,$o=[{regex:/^\(?[dc][\.\)]$/,type:{tag:"ol",type:"lower-alpha"}},{regex:/^\(?[DC][\.\)]$/,type:{tag:"ol",type:"upper-alpha"}},{regex:/^\(?M*(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})[\.\)]$/,type:{tag:"ol",type:"upper-roman"}},{regex:/^\(?m*(cm|cd|d?c{0,3})(xc|xl|l?x{0,3})(ix|iv|v?i{0,3})[\.\)]$/,type:{tag:"ol",type:"lower-roman"}},{regex:/^\(?[0-9]+[\.\)]$/,type:{tag:"ol"}},{regex:/^([0-9]+\.)*[0-9]+\.?$/,type:{tag:"ol",variant:"outline"}},{regex:/^\(?[a-z]+[\.\)]$/,type:{tag:"ol",type:"lower-alpha"}},{regex:/^\(?[A-Z]+[\.\)]$/,type:{tag:"ol",type:"upper-alpha"}}],Vo={"\u2022":{tag:"ul",type:"disc"},"\xb7":{tag:"ul",type:"disc"},"\xa7":{tag:"ul",type:"square"}},Go={o:{tag:"ul",type:"circle"},"-":{tag:"ul",type:"disc"},"\u25cf":{tag:"ul",type:"disc"},"\ufffd":{tag:"ul",type:"circle"}},qo=(e,t)=>a(e.variant)?"("===t.charAt(0)?"()":")"===t.charAt(t.length-1)?")":".":e.variant,Ko=e=>{const t=e.split("."),n=(()=>{if(0===t.length)return e;const n=t[t.length-1];return 0===n.length&&t.length>1?t[t.length-2]:n})(),r=parseInt(n,10);return isNaN(r)?{}:{start:r}},Jo=e=>{const t=(e=>$r(e,["mso-list"],b)["mso-list"])(e),n=l(t)&&/ level([0-9]+)/.exec(t);return n&&n[1]?k.some(parseInt(n[1],10)):k.none()},Xo=(e,t)=>{const n=((e,t)=>{const n=Go[e]?[Go[e]]:[],r=((e,t)=>t&&Vo[e]?[Vo[e]]:t?[{tag:"ul",variant:e}]:[])(e,t),o=R($o,(t=>t.regex.test(e)?[jr(t.type,Ko(e),{variant:qo(t.type,e)})]:[])),s=n.concat(r).concat(o);return A(s,(t=>void 0!==t.variant?t:jr(t,{variant:e})))})(Wo(e).trim(),t);return n.length>0?k.some(n):k.none()},Yo=e=>jn(e,Te).bind(Et).filter(Le("span")),Zo=e=>Fn(e,(e=>!!(Ie(e)?$r(e,["mso-list"],b):{})["mso-list"])),Qo=e=>Ie(e)&&Ln(e,"font-family").exists((e=>T(["wingdings","symbol"],e.toLowerCase()))),es=(e,t,n,r)=>{((e,t,n)=>{cn(e,"data-list-level",t);const r=JSON.stringify(n);cn(e,"data-list-emblems",r)})(e,t,n),(e=>{const t=((e,t)=>{const n=t.getOr(x);return(e=>{const t=[];for(;null!==e.nextNode();)t.push(Pe.fromDom(e.currentNode));return t})(document.createTreeWalker(e.dom,NodeFilter.SHOW_COMMENT,{acceptNode:e=>n(e.nodeValue)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}))})(e,k.none());O(t,nn)})(e),O(r,nn),pn(e,"style"),pn(e,"class")},ts=e=>(e=>Jo(e).bind((t=>(e=>jn(e,Qo))(e).bind((n=>Xo(n,!0).map((r=>({mutate:()=>{es(e,t,r,[n])}}))))))))(e).orThunk((()=>(e=>Jo(e).bind((t=>Yo(e).bind((n=>Xo(n,Qo(n)).map((r=>({mutate:()=>{es(e,t,r,[n])}}))))))))(e))).orThunk((()=>(e=>Jo(e).bind((t=>Yo(e).bind((n=>Xo(n,Qo(n)).map((r=>({mutate:()=>{es(e,t,r,[n])}}))))))))(e))).orThunk((()=>(e=>"p"!==we(e)?k.none():Jo(e).bind((t=>Zo(e).bind((n=>Xo(n,!1).map((r=>({mutate:()=>{es(e,t,r,[At(n).getOr(n)])}}))))))))(e))).orThunk((()=>(e=>"p"!==we(e)?k.none():Zo(e).bind((t=>{const n=At(t).getOr(t),r=Qo(n);return Xo(t,r).bind((t=>(e=>Ln(e,"margin-left").bind((e=>{const t=parseInt(e,10);return isNaN(t)?k.none():k.some(Math.max(1,Math.ceil(t/18)))})))(e).map((r=>({mutate:()=>{es(e,r,t,[n])}})))))})))(e))),ns=lo({tags:[{name:Hr.pattern(/^(p|h\d+)$/,Hr.caseInsensitive),mutate:e=>{ts(e).each((e=>{e.mutate()}))}}]}),rs=Ho,os=e=>{return(o=e,Te(o)?(t=o,n="v:shape",k.from((r=t,r.dom.nodeValue)).bind((e=>{const t=e.indexOf("]>"),r=(e=>{try{return(new DOMParser).parseFromString(e,"text/html").body}catch(t){const n=document.implementation.createHTMLDocument("").body;return n.innerHTML=e,n}})(`<div>${e.slice(t+2,e.lastIndexOf("<!["))}</div>`);return Fn(Pe.fromDom(r),(e=>we(e)===n))}))):k.none()).map((e=>{const t=dn(e,"o:spid"),n=void 0===t?hn(e,"id").getOr(""):t,r=Pe.fromTag("img");return yn(r,"rtf-data-image"),cn(r,"data-image-id",n.substr(7)),cn(r,"data-image-type","code"),((e,t)=>{const n=e.dom;je(t,((e,t)=>{e.fold((()=>{Tn(n,t)}),(e=>{Cn(n,t,e)}))}))})(r,{width:Ln(e,"width"),height:Ln(e,"height")}),r}));var t,n,r,o},ss=e=>{if(Le("img")(e)){const t=dn(e,"src");if(null!=t&&$(t,"file://")){const n=(e=>(e=>Pe.fromDom(e.dom.cloneNode(!1)))(e))(e),r=t.split(/[\/\\]/),o=r[r.length-1];return cn(n,"data-image-id",o),pn(n,"src"),cn(n,"data-image-type","local"),yn(n,"rtf-data-image"),k.some(n)}return k.none()}return k.none()};var as;!function(e){e[e.Word=0]="Word",e[e.GoogleDocs=1]="GoogleDocs",e[e.Html=2]="Html"}(as||(as={}));const is=e=>t=>{hn(t,e.attrName).each((n=>{const r=l(e.styleName)?e.styleName:e.attrName;if(Ln(t,r).isNone()){const o=e.mapValue(n);In(t,r,o)}pn(t,e.attrName)}))},ls=e=>{const t=we(e);return"td"===t||"tr"===t||"col"===t||"th"===t},cs=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,us=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,ds=e=>H(e,"#").toUpperCase(),hs=e=>{const t=e.toString(16);return(1===t.length?"0"+t:t).toUpperCase()},ms=e=>(e=>({value:ds(e)}))(hs(e.red)+hs(e.green)+hs(e.blue)),ps=/^\s*rgb\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*\)\s*$/i,fs=/^\s*rgba\s*\(\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*(\d+)\s*[,\s]\s*((?:\d?\.\d+|\d+)%?)\s*\)\s*$/i,gs=(e,t,n,r)=>({red:e,green:t,blue:n,alpha:r}),vs=(e,t,n,r)=>{const o=parseInt(e,10),s=parseInt(t,10),a=parseInt(n,10),i=parseFloat(r);return gs(o,s,a,i)},ys=["background-repeat-x","background-repeat-y"],bs=e=>{return"currentcolor"===e||"transparent"===e?e:"#"+(t=H(e,"#").toUpperCase(),(e=>cs.test(e)||us.test(e))(t)?k.some({value:ds(t)}):k.none()).orThunk((()=>(e=>{const t=ps.exec(e);if(null!==t)return k.some(vs(t[1],t[2],t[3],"1"));const n=fs.exec(e);return null!==n?k.some(vs(n[1],n[2],n[3],n[4])):k.none()})(e).map(ms))).getOrThunk((()=>{const t=document.createElement("canvas");t.height=1,t.width=1;const n=t.getContext("2d");n.clearRect(0,0,t.width,t.height),n.fillStyle="#FFFFFF",n.fillStyle=e,n.fillRect(0,0,1,1);const r=n.getImageData(0,0,1,1).data,o=r[0],s=r[1],a=r[2],i=r[3];return ms(gs(o,s,a,i))})).value;var t},xs=(e,t)=>{if(a(e))return"";switch(t){case"color":return bs(e);case"font-family":return e.replace(/['"]/g,"");case"font-weight":return(e=>{switch(e){case"bold":return"700";case"normal":return"400";default:return e}})(e);default:return V(t,"-color")?bs(e):(e=>e.replace(/^0(pt|px|pc|in|cm|mm|Q|cap|ch|ic|em|ex|lh|rlh|rem|vw|vh|vb|vi|vmax|vmin|%)$/,"0"))(e)}},ks=lo({tags:[{name:Hr.pattern(/^(p|div)$/,Hr.caseInsensitive),mutate:e=>{const t="ltr"===Dn(e),n=t?"margin-left":"margin-right",r=t?"padding-left":"padding-right";Ln(e,n).each((()=>{const t=On(e,n);In(e,r,t),Nn(e,n)}))}}]}),ws=io({tags:[{name:Hr.exact("b",Hr.caseInsensitive),condition:e=>hn(e,"id").exists((e=>$(e,"docs-internal-guid")))}]}),Ss=ao({attributes:[{name:Hr.exact("id",Hr.caseInsensitive),value:Hr.starts("docs-internal-guid",Hr.caseInsensitive)}]}),Cs=[lo({tags:[{name:Hr.exact("col",Hr.caseInsensitive),mutate:is({attrName:"width",mapValue:e=>e.replace(/^(\d+)$/,"$1px")})}]})],Ts=e=>lo({tags:[{name:Hr.exact(e.matchTag,Hr.caseInsensitive),mutate:t=>{var n,r;(n=_n(t),r=e.key,He(n,r)?k.from(n[r]):k.none()).exists((t=>T(e.values,t)))&&(Zt(t,Pe.fromTag(e.newTag)),Nn(t,e.key),o(e.removeExtra)&&O(e.removeExtra,(e=>Nn(t,e))))}}]}),Is=[Ts({matchTag:"span",key:"font-weight",values:["700","bold"],newTag:"strong"}),Ts({matchTag:"span",key:"font-style",values:["italic"],newTag:"em"}),Ts({matchTag:"span",key:"vertical-align",values:["sub"],newTag:"sub",removeExtra:["font-size"]}),Ts({matchTag:"span",key:"vertical-align",values:["super"],newTag:"sup",removeExtra:["font-size"]})],As=e=>t=>{const n=[],r={border:e.browser.isFirefox()?"medium none":"none","text-decoration":"none"},o=(e,t)=>{if(!a(t)){const r=Pe.fromTag(we(e));Yt(t,r),n.push({me:e,fake:r})}const r=L(_t(e),Ie);O(r,(t=>o(t,e)))};o(t);const s=A(n,(e=>{const{fake:t,me:n}=e,o=_n(n),s=Be(o,((e,r)=>{const o=((e,t)=>T(ys,t)?Ln(e,"background-repeat"):k.none())(n,r).getOr(e),s=((e,t)=>T(ys,t)?On(e,"background-repeat"):On(e,t))(t,r);return xs(o,r)===xs(s,r)})),a=Be(r,((e,t)=>kn(Ln(n,t),e)));return{fake:t,me:n,toRemove:s,toPreserve:a}}));O(s,(e=>{const{me:t,toRemove:n,toPreserve:r,fake:o}=e;je(n,((e,n)=>{Nn(t,n)})),je(r,((e,n)=>{In(t,n,e)})),nn(o)}))},Os=["p","div","article","aside","details","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"],Es=ao({styles:[{name:Hr.exact("background-color",Hr.caseInsensitive),value:Hr.exact("transparent",Hr.caseInsensitive)},{name:Hr.exact("white-space",Hr.caseInsensitive),value:Hr.starts("pre",Hr.caseInsensitive)},{name:Hr.exact("white-space-collapse",Hr.caseInsensitive),value:Hr.starts("preserve",Hr.caseInsensitive)},{name:Hr.exact("text-wrap",Hr.caseInsensitive),value:Hr.not(Hr.exact("wrap",Hr.caseInsensitive))},{name:Hr.exact("text-wrap-mode",Hr.caseInsensitive),value:Hr.not(Hr.exact("wrap",Hr.caseInsensitive))},{name:Hr.pattern(/^overflow(-[xy])?$/,Hr.caseInsensitive),condition:e=>ls(e)&&kn(Ln(e,"overflow"),"hidden")},{name:Hr.exact("overflow-wrap",Hr.caseInsensitive),condition:ls},{name:Hr.exact("table-layout",Hr.caseInsensitive),value:Hr.exact("fixed",Hr.caseInsensitive),condition:Le("table")},{name:Hr.exact("line-height",Hr.caseInsensitive),value:Hr.exact("1.38",Hr.caseInsensitive)},{name:Hr.exact("vertical-align",Hr.caseInsensitive),value:Hr.exact("baseline",Hr.caseInsensitive)},{name:Hr.exact("font-style",Hr.caseInsensitive),value:Hr.exact("normal",Hr.caseInsensitive)},{name:Hr.exact("font-variant",Hr.caseInsensitive),value:Hr.exact("normal",Hr.caseInsensitive)},{name:Hr.exact("background-color",Hr.caseInsensitive),value:Hr.exact("transparent",Hr.caseInsensitive)},{name:Hr.starts("padding",Hr.caseInsensitive),condition:ls},{name:Hr.pattern(/^text-decoration(-(line|thickness|style|color))?$/,Hr.caseInsensitive),condition:e=>!Le("a")(e)&&kn(Ln(e,"text-decoration"),"none")}],attributes:[{name:Hr.exact("aria-level",Hr.caseInsensitive),condition:Le("li")},{name:Hr.exact("dir",Hr.caseInsensitive),value:Hr.exact("ltr",Hr.caseInsensitive),condition:e=>T(Os,we(e))},{name:Hr.exact("role",Hr.caseInsensitive),value:Hr.exact("presentation",Hr.caseInsensitive),condition:e=>Le("p")(e)&&At(e).exists(Le("li"))}]}),Ls=ao({styles:[{name:Hr.exact("text-align",Hr.caseInsensitive),value:Hr.exact("right",Hr.caseInsensitive),condition:e=>"rtl"===Dn(e)}]}),_s=lo({tags:[{name:Hr.exact("p",Hr.caseInsensitive),condition:e=>{const t=t=>Ln(e,t).map((e=>parseInt(e,10))).filter((e=>!isNaN(e))).getOr(0),n=Dn(e);return t("text-indent")+t("rtl"===n?"padding-right":"padding-left")===0},mutate:e=>{const t=Dn(e);Nn(e,"text-indent"),Nn(e,"rtl"===t?"padding-right":"padding-left")}}]}),Ns=e=>t=>xn(t,e),Ds=ye(Ae,"text"),Ps=e=>Ds.get(e),Rs=e=>{const t=e.dom.attributes;return null==t||0===t.length||1===t.length&&"style"===t[0].name},Ms=(e,t)=>{const n=Pe.fromTag(e);Kt(t,n);const r=t.dom.attributes;O(r,(e=>{n.dom.setAttribute(e.name,e.value)}));const o=_t(t);return en(n,o),nn(t),n},js=Le("li"),Fs=e=>Ot(e).bind((e=>Ae(e)&&0===Ps(e).trim().length?Fs(e):js(e)?k.some(e):k.none())),Us=e=>{const t=Ms("span",e),n={"font-size":{1:"8pt",2:"10pt",3:"12pt",4:"14pt",5:"18pt",6:"24pt",7:"36pt"}};je({face:"font-family",size:"font-size",color:"color"},((e,r)=>{hn(t,r).each((o=>{const s=n[e],a=void 0!==s&&void 0!==s[o]?s[o]:o;In(t,e,a),pn(t,r)}))}))},Bs=ao({tags:[{name:Hr.exact("script",Hr.caseInsensitive)},{name:Hr.exact("link",Hr.caseInsensitive)},{name:Hr.exact("style",Hr.caseInsensitive),condition:e=>0===Rn(e).length}],attributes:[{name:Hr.starts("on",Hr.caseInsensitive)},{name:Hr.exact('"',Hr.caseInsensitive)},{name:Hr.exact("lang",Hr.caseInsensitive)},{name:Hr.exact("language",Hr.caseInsensitive)}],styles:[{name:Hr.all(),value:Hr.pattern(/OLE_LINK/i,Hr.caseInsensitive)}]}),zs=ao({tags:[{name:Hr.exact("meta",Hr.caseInsensitive)}]}),Hs=ao({tags:[{name:Hr.exact("style",Hr.caseInsensitive)}]}),Ws=ao({styles:[{name:Hr.not(Hr.pattern(/^(width|height|list-style-type)$/,Hr.caseInsensitive)),condition:e=>!xn(e,"ephox-limbo-transform")},{name:Hr.pattern(/^(width|height)$/,Hr.caseInsensitive),condition:e=>{return(e=>"img"!==we(e))(e)&&!("table"===we(t=e)||ls(t));var t}}]}),$s=(e=[])=>{const t=A(e,(e=>({name:Hr.exact(e,Hr.caseInsensitive)})));return io({tags:t})},Vs=ao({classes:[{name:Hr.not(Hr.exact("rtf-data-image",Hr.caseInsensitive))}]}),Gs=ao({styles:[{name:Hr.pattern(/^(mso-.*|tab-stops|tab-interval|language|text-underline|text-effect|text-line-through|font-color|horiz-align|list-image-[0-9]+|separator-image|table-border-color-(dark|light)|vert-align|vnd\..*)$/,Hr.caseInsensitive)}]}),qs=ao({classes:[{name:Hr.pattern(/mso/i,Hr.caseInsensitive)}]}),Ks=io({tags:[{name:Hr.exact("img",Hr.caseInsensitive),condition:e=>{const t=dn(e,"src");return n(t)&&/^file:/.test(t)}}]}),Js=io({tags:[{name:Hr.exact("a",Hr.caseInsensitive),condition:Rs}]}),Xs=ao({attributes:[{name:Hr.exact("style",Hr.caseInsensitive),value:Hr.exact("",Hr.caseInsensitive)}]}),Ys=ao({attributes:[{name:Hr.exact("class",Hr.caseInsensitive),value:Hr.exact("",Hr.caseInsensitive)}]}),Zs=io({tags:[{name:Hr.pattern(/^(font|em|strong|samp|acronym|cite|code|dfn|kbd|tt|b|i|u|s|sub|sup|ins|del|var|span)$/,Hr.caseInsensitive),condition:(Qs=e=>!Rs(e)||(e=>{const t=e.dom.attributes,n=null!=t&&t.length>0;return"span"!==we(e)||n})(e)&&Fn(e,(e=>{const t=!Rs(e),n=!T(["font","em","strong","samp","acronym","cite","code","dfn","kbd","tt","b","i","u","s","sub","sup","ins","del","var","span"],we(e));return Ae(e)||t||n})).isSome(),e=>!Qs(e))}]});var Qs;const ea=lo({tags:[{name:Hr.exact("p",Hr.caseInsensitive),mutate:e=>{0===Rn(e).length&&Yt(e,Pe.fromTag("br"))}}]}),ta=e=>{const t=Ms("span",e);yn(t,"ephox-limbo-transform"),In(t,"text-decoration","underline")},na=lo({tags:[{name:Hr.pattern(/ol|ul/,Hr.caseInsensitive),mutate:e=>{At(e).each((t=>{const n=we(t);T(["ol","ul"],n)&&Fs(e).fold((()=>{const t=Pe.fromTag("li");In(t,"list-style-type","none"),Zt(e,t)}),(t=>{Yt(t,e)}))}))}}]}),ra=e=>{const t=[{name:"b",transform:{mutate:g(Ms,"strong")}},{name:"i",transform:{mutate:g(Ms,"em")}},{name:"u",transform:{mutate:ta}},{name:"s",transform:{mutate:g(Ms,"strike")}},{name:"font",transform:{mutate:Us,debug:!0}}],n=L(t,(t=>!T(e,t.name))).map((e=>({name:Hr.exact(e.name,Hr.caseInsensitive),...e.transform})));return lo({tags:n})},oa=ao({classes:[{name:Hr.exact("ephox-limbo-transform",Hr.caseInsensitive)}]}),sa=ao({tags:[{name:Hr.exact("br",Hr.caseInsensitive),condition:Ns("Apple-interchange-newline")}]}),aa=ao({styles:[{name:Hr.pattern(/^-/,Hr.caseInsensitive)},{name:Hr.all(),value:Hr.exact("initial",Hr.caseInsensitive)},{name:Hr.exact("background-color",Hr.caseInsensitive),value:Hr.exact("transparent",Hr.caseInsensitive)},{name:Hr.exact("font-style",Hr.caseInsensitive),value:Hr.exact("normal",Hr.caseInsensitive)},{name:Hr.pattern(/font-variant.*/,Hr.caseInsensitive)},{name:Hr.exact("letter-spacing",Hr.caseInsensitive)},{name:Hr.exact("font-weight",Hr.caseInsensitive),value:Hr.pattern(/400|normal/,Hr.caseInsensitive)},{name:Hr.exact("orphans",Hr.caseInsensitive)},{name:Hr.exact("text-decoration",Hr.caseInsensitive),value:Hr.exact("none",Hr.caseInsensitive)},{name:Hr.exact("text-size-adjust",Hr.caseInsensitive)},{name:Hr.exact("text-indent",Hr.caseInsensitive),value:Hr.exact("0px",Hr.caseInsensitive)},{name:Hr.exact("text-transform",Hr.caseInsensitive),value:Hr.exact("none",Hr.caseInsensitive)},{name:Hr.exact("white-space",Hr.caseInsensitive),value:Hr.exact("normal",Hr.caseInsensitive)},{name:Hr.exact("widows",Hr.caseInsensitive)},{name:Hr.exact("word-spacing",Hr.caseInsensitive),value:Hr.exact("0px",Hr.caseInsensitive)},{name:Hr.exact("text-align",Hr.caseInsensitive),value:Hr.pattern(/start|end/,Hr.caseInsensitive)},{name:Hr.exact("font-weight",Hr.caseInsensitive),value:Hr.pattern(/700|bold/,Hr.caseInsensitive),condition:e=>/^h\d$/.test(we(e))}]}),ia=(()=>{const e=(e,t)=>n=>e(n).filter((e=>Ae(n)&&t(Wo(e)||""," "))).isSome(),t=e(Ot,V),n=e(Et,$);return lo({tags:[{name:Hr.exact("span",Hr.caseInsensitive),condition:Ns("Apple-converted-space"),mutate:e=>{"\xa0"===Wo(e)&&(t(e)||n(e)?rn(e):(Kt(e,Pe.fromText(" ")),nn(e)))}}]})})(),la=(()=>{const e=/^file:\/\/\/[^#]+(#[^#]+)$/;return lo({tags:[{name:Hr.exact("a",Hr.caseInsensitive),condition:t=>{const n=dn(t,"href");return!!n&&e.test(n)},mutate:t=>{hn(t,"href").each((n=>{cn(t,"href",n.replace(e,"$1"))}))}}]})})(),ca=ao({attributes:[{name:Hr.exact("href",Hr.caseInsensitive),value:Hr.starts("file:///",Hr.caseInsensitive)}]}),ua=(()=>{const e=(e,t,n)=>({name:Hr.exact(e,Hr.caseInsensitive),condition:e=>mn(e,t),mutate:e=>{hn(e,t).each((r=>{cn(e,n,r),pn(e,t)}))}});return lo({tags:[e("a","data-ephox-href","href"),e("img","data-ephox-src","src")]})})(),da=e=>{const t=["table","thead","tbody","tfoot","th","tr","td","ul","ol","li"],n=Pt(e,Te),r=N(n,(e=>W(Ne(e),"StartFragment"))),o=N(n,(e=>W(Ne(e),"EndFragment")));r.each((n=>{o.each((r=>{let o=n;const s=[];let a=((e,t,n)=>{const r=zt(e,0,n,0);return Pe.fromDom(r.commonAncestorContainer)})(n,0,r);for(;void 0!==a&&!gt(a,e);)T(t,we(a))?o=a:s.push(a),a=At(a).getOrUndefined();O(s,rn),O(Lt(o),nn)})),nn(n)})),o.each(nn)},ha=lo({tags:[{name:Hr.pattern(/^(img|table)$/,Hr.caseInsensitive),mutate:e=>{Ln(e,"margin-left").exists((e=>$(e,"-")))&&Nn(e,"margin-left"),$(On(e,"margin-left"),"-")&&(In(e,"margin-top",On(e,"margin-top")),In(e,"margin-bottom",On(e,"margin-bottom")),In(e,"margin-right",On(e,"margin-right")),Nn(e,"margin"))}}]}),ma=lo({tags:[{name:Hr.exact("p",Hr.caseInsensitive),mutate:is({attrName:"align",styleName:"text-align",mapValue:p})}]}),pa=(e,t)=>{return(n=e,Ds.getOption(n)).exists((e=>0===t(e).length));var n},fa=ao({tags:[{name:Hr.exact("font",Hr.caseInsensitive),condition:e=>{const t=_t(e),n=e=>e.replace(/[ \r\n\uFEFF]+/g,"");return 0===t.length||M(t,(e=>pa(e,n)))}}]}),ga=e=>O(_t(e),(e=>{pa(e,G)&&nn(e)})),va=lo({tags:[{name:Hr.exact("ol",Hr.caseInsensitive),mutate:ga},{name:Hr.exact("ul",Hr.caseInsensitive),mutate:ga}]}),ya=io({tags:[{name:Hr.pattern(/^([OVWXP]|U[0-9]+|ST[0-9]+):/i,Hr.caseInsensitive)}]}),ba=[co([rs])],xa=ao({attributes:[{name:Hr.exact("height",Hr.caseInsensitive),condition:Le("table")}]}),ka=ao({attributes:[{name:Hr.pattern(/^(width|height)$/,Hr.caseInsensitive),condition:ls}]}),wa=lo({tags:[{name:Hr.exact("table",Hr.caseInsensitive),mutate:is({attrName:"width",mapValue:e=>e.replace(/^(\d+)$/,"$1px")})}]}),Sa=ao({styles:[{name:Hr.exact("height",Hr.caseInsensitive),condition:Le("td")},{name:Hr.exact("width",Hr.caseInsensitive),condition:Le("tr")},{name:Hr.exact("height",Hr.caseInsensitive),condition:Le("col")}]}),Ca=ao({attributes:[{name:Hr.pattern(/^v:/,Hr.caseInsensitive)},{name:Hr.exact("href",Hr.caseInsensitive),value:Hr.contains("#_toc",Hr.caseInsensitive)},{name:Hr.exact("href",Hr.caseInsensitive),value:Hr.contains("#_mso",Hr.caseInsensitive)},{name:Hr.pattern(/^xmlns(:|$)/,Hr.caseInsensitive)},{name:Hr.exact("type",Hr.caseInsensitive),condition:e=>"ol"===we(e)||"ul"===we(e)}]});io({tags:[{name:Hr.exact("p",Hr.caseInsensitive),condition:e=>At(e).exists((e=>"li"===we(e)&&1===_t(e).length))}]}),lo({tags:[{name:Hr.pattern(/^(img|table)$/,Hr.caseInsensitive),mutate:e=>{Ln(e,"margin-left").exists((e=>$(e,"-")))&&Nn(e,"margin-left"),$(On(e,"margin-left"),"-")&&(In(e,"margin-top",On(e,"margin-top")),In(e,"margin-bottom",On(e,"margin-bottom")),In(e,"margin-right",On(e,"margin-right")),Nn(e,"margin"))}}]});const Ta=e=>{const t=[ma,Gs,qs],n=[ma,Ws,$s(e.cleanFilteredInlineElements),Vs];return e.merge?t:n},Ia=e=>e.type===as.Word?[ns]:[],Aa=e=>e.type===as.Word?[ya,...ba,Ca]:[],Oa=e=>e.type===as.GoogleDocs?[ws]:[],Ea=e=>e.type!==as.GoogleDocs||e.indentUseMargin?[]:[ks],La=(e,t)=>e.type===as.GoogleDocs?[Es,...Is,...Cs,As(t),Ls,_s,...Ea(e)]:[],_a=e=>e.type===as.Html&&e.merge?[aa]:[],Na=e=>e.type===as.Word?[Sa,wa,ka,xa]:[];xt([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const Da=(e,t)=>Ma(document.createElement("canvas"),e,t),Pa=e=>{const t=Da(e.width,e.height);return Ra(t).drawImage(e,0,0),t},Ra=e=>e.getContext("2d"),Ma=(e,t,n)=>(e.width=t,e.height=n,e),ja=e=>e.naturalWidth||e.width,Fa=e=>e.naturalHeight||e.height,Ua=e=>fetch(e).then((e=>e.ok?e.blob():Promise.reject(new Error("Error "+e.status+" downloading image"))),(()=>Promise.reject((()=>{const e=new Error("No access to download image");return e.code=18,e.name="SecurityError",e})()))),Ba=e=>{const t=e.split(","),n=/data:([^;]+)/.exec(t[0]);if(!n)return k.none();const r=n[1],o=t[1],s=1024,a=atob(o),i=a.length,l=Math.ceil(i/s),c=new Array(l);for(let e=0;e<l;++e){const t=e*s,n=Math.min(t+s,i),r=new Array(n-t);for(let e=t,o=0;e<n;++o,++e)r[o]=a[e].charCodeAt(0);c[e]=new Uint8Array(r)}return k.some(new Blob(c,{type:r}))},za=e=>new Promise(((t,n)=>{Ba(e).fold((()=>{n("uri is not base64: "+e)}),t)})),Ha=(e,t,n)=>(t=t||"image/png",c(HTMLCanvasElement.prototype.toBlob)?new Promise(((r,o)=>{e.toBlob((e=>{e?r(e):o()}),t,n)})):za(e.toDataURL(t,n))),Wa=e=>(e=>{const t=URL.createObjectURL(e),n=new Image;return n.src=t,(e=>new Promise(((t,n)=>{const r=()=>{s(),t(e)},o=[gr(e,"load",r),gr(e,"error",(()=>{s(),n("Unable to load data from image: "+e.dom.src)}))],s=()=>O(o,(e=>e.unbind()));e.dom.complete&&r()})))(Pe.fromDom(n)).then((e=>e.dom))})(e).then((e=>{Va(e);const t=Da(ja(e),Fa(e));return Ra(t).drawImage(e,0,0),t})),$a=e=>new Promise((t=>{const n=new FileReader;n.onloadend=()=>{t(n.result)},n.readAsDataURL(e)})),Va=e=>{URL.revokeObjectURL(e.src)},Ga=(e,t,n)=>{const r=t.type,o=m(r),s=m(n),a=(t,n)=>e.then((e=>((e,t,n)=>(t=t||"image/png",e.toDataURL(t,n)))(e,t,n)));return{getType:o,toBlob:()=>Promise.resolve(t),toDataURL:s,toBase64:()=>n.split(",")[1],toAdjustedBlob:(t,n)=>e.then((e=>Ha(e,t,n))),toAdjustedDataURL:a,toAdjustedBase64:(e,t)=>a(e,t).then((e=>e.split(",")[1])),toCanvas:()=>e.then(Pa)}},qa=(e,t)=>Ha(e,t).then((t=>Ga(Promise.resolve(e),t,e.toDataURL()))),Ka=(e,t,n)=>{const r=ja(e),o=Fa(e);let s=t/r,a=n/o,i=!1;(s<.5||s>2)&&(s=s<.5?.5:2,i=!0),(a<.5||a>2)&&(a=a<.5?.5:2,i=!0);const l=Ja(e,s,a);return i?l.then((e=>Ka(e,t,n))):l},Ja=(e,t,n)=>new Promise((r=>{const o=ja(e),s=Fa(e),a=Math.floor(o*t),i=Math.floor(s*n),l=Da(a,i);Ra(l).drawImage(e,0,0,o,s,0,0,a,i),r(l)})),Xa=(e,t=2)=>{const n=Math.pow(10,t),r=Math.round(e*n);return Math.ceil(r/n)},Ya=(e,t,n,r,o)=>((e,t,n,r,o)=>e.toCanvas().then((s=>((e,t,n,r,o,s)=>{const a=Da(o,s);return Ra(a).drawImage(e,-n,-r),qa(a,t)})(s,e.getType(),t,n,r,o))))(e,t,n,r,o),Za=(e,t)=>((e,t)=>e.toCanvas().then((n=>((e,t,n)=>{const r=(n<0?360+n:n)*Math.PI/180,o=e.width,s=e.height,a=Math.sin(r),i=Math.cos(r),l=Xa(Math.abs(o*i)+Math.abs(s*a)),c=Xa(Math.abs(o*a)+Math.abs(s*i)),u=Da(l,c),d=Ra(u);return d.translate(l/2,c/2),d.rotate(r),d.drawImage(e,-o/2,-s/2),qa(u,t)})(n,e.getType(),t))))(e,t),Qa=(e,t)=>((e,t)=>Ga(Wa(e),e,t))(e,t),ei=e=>(e=>(e=>{const t=e.src;return 0===t.indexOf("data:")?za(t):Ua(t)})(e).then((e=>(e=>$a(e).then((t=>Ga(Wa(e),e,t))))(e))))(e),ti=e=>e.toDataURL(),ni=e=>parseInt(e,10),ri=e=>e.isPx&&(e.cropWidth!==e.width||e.cropHeight!==e.height),oi=/rotate\((\d\.\d+)rad\)/,si=(e,t,n)=>ei(e.dom).then((e=>t=>((e,t,n)=>((e,t,n)=>e.toCanvas().then((r=>Ka(r,t,n).then((t=>qa(t,e.getType()))))))(e,t,n))(t,e.width,e.height))(t)).then(((e,t)=>n=>{if(ri(t)){const r=-1*ni(On(e,"margin-top")),o=-1*ni(On(e,"margin-left"));return Ya(n,o,r,t.cropWidth,t.cropHeight).then((n=>(un(e,{width:t.cropWidth,height:t.cropHeight}),n)))}return Promise.resolve(n)})(e,t)).then(((e,t)=>n=>(e=>{const t=On(e,"transform");return k.from(oi.exec(t)).map((e=>Math.round(parseFloat(e[1])*(180/Math.PI))))})(t).fold((()=>Promise.resolve(n)),(r=>Za(n,r).then((n=>(Nn(t,"transform"),pn(e,"width"),pn(e,"height"),n))))))(e,n)).then((t=>{const n=ti(t);return cn(e,"src",n),Promise.resolve()})),ai=e=>At(e).filter(Le("span")).map((t=>{const n=()=>((e,t)=>{var n,r,o;Nn(e,"margin-top"),Nn(e,"margin-left"),Nn(t,"width"),Nn(t,"height"),Nn(t,"overflow"),Nn(t,"display"),r=e,o=["transform"],Ie(n=t)&&Ie(r)&&O(o,(e=>{((e,t,n)=>{Ln(e,n).each((e=>{Ln(t,n).isNone()&&In(t,n,e)}))})(n,r,e)})),Nn(t,"transform")})(e,t),r=((e,t)=>{const n=(e,t)=>hn(e,t).map(ni).filter((e=>!isNaN(e))).getOr(0),r=On(t,"width"),o=On(t,"height"),s=n(e,"width"),a=n(e,"height"),i=/^\d+px$/;return{isPx:i.test(r)&&i.test(o),cropWidth:ni(r),cropHeight:ni(o),width:s,height:a}})(e,t);return(ri(r)||oi.test(On(t,"transform"))?si(e,r,t):Promise.resolve()).then(n,n)})).getOrThunk((()=>Promise.resolve()));var ii=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"];const li=(e,t)=>D(e,(e=>e.start===t)),ci=(e,t,n=0)=>_(e,((e,n)=>t(n,e.len).fold(m(e),(t=>({len:t.finish,list:e.list.concat([t])})))),{len:n,list:[]}).list,ui=(e,t,n)=>0===t.length?e:R(e,(e=>{const r=R(t,(t=>((e,t)=>t>=e.start&&t<=e.finish)(e,t)?[t-e.start]:[]));return r.length>0?((e,t,n)=>((e,t)=>A(e,(e=>({...e,start:e.start+t,finish:e.finish+t}))))(n(e,t),e.start))(e,r,n):[e]})),di=(e,t)=>{const n=R(t,(t=>{const n=((e,t)=>{const n=t.term(),r=[];let o=n.exec(e);for(;o;){const s=o.index+t.prefix(o),a=o[0].length-t.prefix(o)-t.suffix(o);r.push({start:s,finish:s+a}),n.lastIndex=s+a,o=n.exec(e)}return r})(e,t.pattern);return A(n,(e=>({...t,...e})))}));return(e=>{const t=(e=>F(e,((e,t)=>e.start-t.start)))(e);return _(t,((e,t)=>{const n=I(e,(e=>t.start>=e.start&&t.finish<=e.finish));return D(e,(e=>t.start===e.start)).fold((()=>n?e:[...e,t]),(n=>t.finish>e[n].finish?[...e.slice(0,n),t]:e))}),[])})(n)},hi=(e,t,n)=>({element:e,start:t,finish:n}),mi=xt([{include:["item"]},{excludeWith:["item"]},{excludeWithout:["item"]}]),pi={include:mi.include,excludeWith:mi.excludeWith,excludeWithout:mi.excludeWithout,cata:(e,t,n,r)=>e.fold(t,n,r)},fi=xt([{boundary:["item","universe"]},{empty:["item","universe"]},{text:["item","universe"]},{nonEditable:["item","universe"]}]),gi=b,vi=x,yi=m(0),bi=m(1),xi=e=>({...e,isBoundary:()=>e.fold(vi,gi,gi,gi),toText:()=>e.fold(k.none,k.none,(e=>k.some(e)),k.none),is:t=>e.fold(gi,gi,((e,n)=>n.eq(e,t)),gi),len:()=>e.fold(yi,bi,((e,t)=>t.property().getText(e).length),bi)}),ki={text:h(xi,fi.text),boundary:h(xi,fi.boundary),empty:h(xi,fi.empty),nonEditable:h(xi,fi.empty),cata:(e,t,n,r,o)=>e.fold(t,n,r,o)},wi=m([]),Si=(e,t,n)=>{if(e.property().isText(t))return[ki.text(t,e)];if(e.property().isEmptyTag(t))return[ki.empty(t,e)];if(e.property().isNonEditable(t))return[];if(e.property().isElement(t)){const r=e.property().children(t),o=e.property().isBoundary(t)?[ki.boundary(t,e)]:[],s=void 0!==n&&n(t)?[]:R(r,(t=>Si(e,t,n)));return o.concat(s).concat(o)}return[]},Ci=Si,Ti=(e,t,n)=>{const r=((e,t)=>{const n=[];let r=[];return O(e,(e=>{const o=t(e);pi.cata(o,(()=>{r.push(e)}),(()=>{r.length>0&&n.push(r),n.push([e]),r=[]}),(()=>{r.length>0&&n.push(r),r=[]}))})),r.length>0&&n.push(r),n})(R(t,(t=>Ci(e,t,n))),(e=>e.match({boundary:()=>pi.excludeWithout(e),empty:()=>pi.excludeWith(e),text:()=>pi.include(e),nonEditable:()=>pi.excludeWithout(e)})));return L(r,(e=>e.length>0))},Ii=(e,t,n)=>{const r=R(n,(e=>[e.start,e.finish])),o=ui(t,r,((t,n)=>((e,t,n)=>{const r=e.property().getText(t),o=L(((e,t)=>{if(0===t.length)return[e];const n=_(t,((t,n)=>{if(0===n)return t;const r=e.substring(t.prev,n);return{prev:n,values:t.values.concat([r])}}),{prev:0,values:[]}),r=t[t.length-1];return r<e.length?n.values.concat(e.substring(r)):n.values})(r,n),(e=>e.length>0));if(o.length<=1)return[hi(t,0,r.length)];e.property().setText(t,o[0]);const s=ci(o.slice(1),((t,n)=>{const r=e.create().text(t),o=hi(r,n,n+t.length);return k.some(o)}),o[0].length),a=A(s,(e=>e.element));return e.insert().afterAll(t,a),[hi(t,0,o[0].length)].concat(s)})(e,t.element,n)));return A(n,(t=>{const n=((e,t,n)=>{const r=li(e,t),o=li(e,n);return r.bind((t=>{const r=o.getOr(((e,t)=>e[e.length-1]&&e[e.length-1].finish===t?e.length+1:-1)(e,n));return r>-1?k.some(e.slice(t,r)):k.none()})).getOr([])})(o,t.start,t.finish),r=A(n,(e=>e.element)),s=A(r,e.property().getText).join("");return{elements:r,word:t.word,exact:s}}))},Ai={up:m({selector:Un,closest:Bn,predicate:Mn,all:(e,t)=>{const n=c(t)?t:b;let r=e.dom;const o=[];for(;null!==r.parentNode&&void 0!==r.parentNode;){const e=r.parentNode,t=Pe.fromDom(e);if(o.push(t),!0===n(t))break;r=e}return o}}),down:m({selector:Rt,predicate:Pt}),styles:m({get:On,getRaw:Ln,set:In,remove:Nn}),attrs:m({get:dn,set:cn,remove:pn,copyTo:(e,t)=>{const n=_(e.dom.attributes,((e,t)=>(e[t.name]=t.value,e)),{});un(t,n)}}),insert:m({before:Kt,after:Jt,afterAll:Qt,append:Yt,appendAll:en,prepend:Xt,wrap:Zt}),remove:m({unwrap:rn,remove:nn}),create:m({nu:Pe.fromTag,clone:e=>Pe.fromDom(e.dom.cloneNode(!1)),text:Pe.fromText}),query:m({comparePosition:(e,t)=>e.dom.compareDocumentPosition(t.dom),prevSibling:Ot,nextSibling:Et}),property:m({children:_t,name:we,parent:At,document:e=>Tt(e).dom,isText:Ae,isComment:Te,isElement:Ie,isSpecial:e=>{const t=we(e);return T(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],t)},getLanguage:e=>Ie(e)?hn(e,"lang"):k.none(),getText:Ps,setText:(e,t)=>Ds.set(e,t),isBoundary:e=>!!Ie(e)&&("body"===we(e)||T(ii,we(e))),isEmptyTag:e=>!!Ie(e)&&T(["br","img","hr","input"],we(e)),isNonEditable:e=>Ie(e)&&"false"===dn(e,"contenteditable")}),eq:gt,is:vt},Oi=/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g.source,Ei=e=>{return((e,t)=>((e,t,n,r)=>{const o=Ti(e,t,r),s=R(o,(t=>{const r=R(t,(e=>e.fold(wi,wi,(e=>[e]),wi))),o=A(r,e.property().getText).join(""),s=di(o,n),a=((e,t)=>ci(t,((t,n)=>{const r=n+e.property().getText(t).length;return k.from(hi(t,n,r))})))(e,r);return Ii(e,a,s)}));return s})(Ai,e,t,void 0))(e,[{word:"__INTERNAL__",pattern:(t=Oi,((e,t,n,r)=>({term:()=>new RegExp(e,r.getOr("g")),prefix:t,suffix:n}))(t,m(0),m(0),k.none()))}]);var t},Li=e=>!Bn(e,"a",undefined).isSome(),_i=(e,t)=>{const n=Ei(e);O(n,(e=>{const n=e.exact;if(n.indexOf("@")<0||Ni(n)){const r=W(n,"://")?n:`${t.defaultProtocol}://${n}`;((e,t)=>{k.from(e[0]).filter(Li).map((n=>{const r=Pe.fromTag("a");return Kt(n,r),en(r,e),cn(r,"href",t),r}))})(e.elements,r)}}))},Ni=e=>{const t=e.indexOf("://");return t>=3&&t<=9},Di=(e,t)=>{O(e,(e=>{Ie(e)&&Ln(e,"position").isSome()&&Nn(e,"position")}))},Pi=(e,t)=>{const n=L(e,Le("li"));if(n.length>0){const t=Lt(n[0]),r=Pe.fromTag("ul");if(Kt(e[0],r),t.length>0){const e=Pe.fromTag("li");Yt(r,e),en(e,t)}en(r,n)}},Ri=(e,t)=>{const n=_t(e);O([...t.autoLinkUrls?[_i]:[],Di,Pi],(e=>{e(n,t)}))},Mi={disabled:()=>({discriminator:"disabled",data:{}}),fromClipboard:e=>({discriminator:"fromClipboard",data:{rtf:e}})},ji=Re(Mi),Fi=Mi.disabled,Ui=Mi.fromClipboard,Bi=e=>void 0!==e&&void 0!==e.types&&null!==e.types,zi=(e,t)=>{const n=new RegExp(t,"i");return B(e,(e=>wn(null!==n.exec(e),{type:e,flavor:t})))};function Hi(e){return Hi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hi(e)}function Wi(e,t){return Wi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Wi(e,t)}function $i(e,t,n){return $i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Wi(o,n.prototype),o},$i.apply(null,arguments)}function Vi(e){return function(e){if(Array.isArray(e))return Gi(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Gi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gi(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var qi=Object.hasOwnProperty,Ki=Object.setPrototypeOf,Ji=Object.isFrozen,Xi=Object.getPrototypeOf,Yi=Object.getOwnPropertyDescriptor,Zi=Object.freeze,Qi=Object.seal,el=Object.create,tl="undefined"!=typeof Reflect&&Reflect,nl=tl.apply,rl=tl.construct;nl||(nl=function(e,t,n){return e.apply(t,n)}),Zi||(Zi=function(e){return e}),Qi||(Qi=function(e){return e}),rl||(rl=function(e,t){return $i(e,Vi(t))});var ol,sl=gl(Array.prototype.forEach),al=gl(Array.prototype.pop),il=gl(Array.prototype.push),ll=gl(String.prototype.toLowerCase),cl=gl(String.prototype.toString),ul=gl(String.prototype.match),dl=gl(String.prototype.replace),hl=gl(String.prototype.indexOf),ml=gl(String.prototype.trim),pl=gl(RegExp.prototype.test),fl=(ol=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return rl(ol,t)});function gl(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return nl(e,t,r)}}function vl(e,t,n){var r;n=null!==(r=n)&&void 0!==r?r:ll,Ki&&Ki(e,null);for(var o=t.length;o--;){var s=t[o];if("string"==typeof s){var a=n(s);a!==s&&(Ji(t)||(t[o]=a),s=a)}e[s]=!0}return e}function yl(e){var t,n=el(null);for(t in e)!0===nl(qi,e,[t])&&(n[t]=e[t]);return n}function bl(e,t){for(;null!==e;){var n=Yi(e,t);if(n){if(n.get)return gl(n.get);if("function"==typeof n.value)return gl(n.value)}e=Xi(e)}return function(e){return console.warn("fallback value for",e),null}}var xl=Zi(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),kl=Zi(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),wl=Zi(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Sl=Zi(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Cl=Zi(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Tl=Zi(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Il=Zi(["#text"]),Al=Zi(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Ol=Zi(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),El=Zi(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ll=Zi(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),_l=Qi(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Nl=Qi(/<%[\w\W]*|[\w\W]*%>/gm),Dl=Qi(/\${[\w\W]*}/gm),Pl=Qi(/^data-[\-\w.\u00B7-\uFFFF]/),Rl=Qi(/^aria-[\-\w]+$/),Ml=Qi(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),jl=Qi(/^(?:\w+script|data):/i),Fl=Qi(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ul=Qi(/^html$/i),Bl=Qi(/^[a-z][.\w]*(-[.\w]+)+$/i),zl=function(){return"undefined"==typeof window?null:window},Hl=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zl(),n=function(t){return e(t)};if(n.version="2.5.7",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,o=t.document,s=t.DocumentFragment,a=t.HTMLTemplateElement,i=t.Node,l=t.Element,c=t.NodeFilter,u=t.NamedNodeMap,d=void 0===u?t.NamedNodeMap||t.MozNamedAttrMap:u,h=t.HTMLFormElement,m=t.DOMParser,p=t.trustedTypes,f=l.prototype,g=bl(f,"cloneNode"),v=bl(f,"nextSibling"),y=bl(f,"childNodes"),b=bl(f,"parentNode");if("function"==typeof a){var x=o.createElement("template");x.content&&x.content.ownerDocument&&(o=x.content.ownerDocument)}var k=function(e,t){if("object"!==Hi(e)||"function"!=typeof e.createPolicy)return null;var n=null,r="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(r)&&(n=t.currentScript.getAttribute(r));var o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(p,r),w=k?k.createHTML(""):"",S=o,C=S.implementation,T=S.createNodeIterator,I=S.createDocumentFragment,A=S.getElementsByTagName,O=r.importNode,E={};try{E=yl(o).documentMode?o.documentMode:{}}catch(e){}var L={};n.isSupported="function"==typeof b&&C&&void 0!==C.createHTMLDocument&&9!==E;var _,N,D=_l,P=Nl,R=Dl,M=Pl,j=Rl,F=jl,U=Fl,B=Bl,z=Ml,H=null,W=vl({},[].concat(Vi(xl),Vi(kl),Vi(wl),Vi(Cl),Vi(Il))),$=null,V=vl({},[].concat(Vi(Al),Vi(Ol),Vi(El),Vi(Ll))),G=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),q=null,K=null,J=!0,X=!0,Y=!1,Z=!0,Q=!1,ee=!0,te=!1,ne=!1,re=!1,oe=!1,se=!1,ae=!1,ie=!0,le=!1,ce=!0,ue=!1,de={},he=null,me=vl({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),pe=null,fe=vl({},["audio","video","img","source","image","track"]),ge=null,ve=vl({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ye="http://www.w3.org/1998/Math/MathML",be="http://www.w3.org/2000/svg",xe="http://www.w3.org/1999/xhtml",ke=xe,we=!1,Se=null,Ce=vl({},[ye,be,xe],cl),Te=["application/xhtml+xml","text/html"],Ie=null,Ae=o.createElement("form"),Oe=function(e){return e instanceof RegExp||e instanceof Function},Ee=function(e){Ie&&Ie===e||(e&&"object"===Hi(e)||(e={}),e=yl(e),_=_=-1===Te.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,N="application/xhtml+xml"===_?cl:ll,H="ALLOWED_TAGS"in e?vl({},e.ALLOWED_TAGS,N):W,$="ALLOWED_ATTR"in e?vl({},e.ALLOWED_ATTR,N):V,Se="ALLOWED_NAMESPACES"in e?vl({},e.ALLOWED_NAMESPACES,cl):Ce,ge="ADD_URI_SAFE_ATTR"in e?vl(yl(ve),e.ADD_URI_SAFE_ATTR,N):ve,pe="ADD_DATA_URI_TAGS"in e?vl(yl(fe),e.ADD_DATA_URI_TAGS,N):fe,he="FORBID_CONTENTS"in e?vl({},e.FORBID_CONTENTS,N):me,q="FORBID_TAGS"in e?vl({},e.FORBID_TAGS,N):{},K="FORBID_ATTR"in e?vl({},e.FORBID_ATTR,N):{},de="USE_PROFILES"in e&&e.USE_PROFILES,J=!1!==e.ALLOW_ARIA_ATTR,X=!1!==e.ALLOW_DATA_ATTR,Y=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Z=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Q=e.SAFE_FOR_TEMPLATES||!1,ee=!1!==e.SAFE_FOR_XML,te=e.WHOLE_DOCUMENT||!1,oe=e.RETURN_DOM||!1,se=e.RETURN_DOM_FRAGMENT||!1,ae=e.RETURN_TRUSTED_TYPE||!1,re=e.FORCE_BODY||!1,ie=!1!==e.SANITIZE_DOM,le=e.SANITIZE_NAMED_PROPS||!1,ce=!1!==e.KEEP_CONTENT,ue=e.IN_PLACE||!1,z=e.ALLOWED_URI_REGEXP||z,ke=e.NAMESPACE||xe,G=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Oe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Oe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(G.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Q&&(X=!1),se&&(oe=!0),de&&(H=vl({},Vi(Il)),$=[],!0===de.html&&(vl(H,xl),vl($,Al)),!0===de.svg&&(vl(H,kl),vl($,Ol),vl($,Ll)),!0===de.svgFilters&&(vl(H,wl),vl($,Ol),vl($,Ll)),!0===de.mathMl&&(vl(H,Cl),vl($,El),vl($,Ll))),e.ADD_TAGS&&(H===W&&(H=yl(H)),vl(H,e.ADD_TAGS,N)),e.ADD_ATTR&&($===V&&($=yl($)),vl($,e.ADD_ATTR,N)),e.ADD_URI_SAFE_ATTR&&vl(ge,e.ADD_URI_SAFE_ATTR,N),e.FORBID_CONTENTS&&(he===me&&(he=yl(he)),vl(he,e.FORBID_CONTENTS,N)),ce&&(H["#text"]=!0),te&&vl(H,["html","head","body"]),H.table&&(vl(H,["tbody"]),delete q.tbody),Zi&&Zi(e),Ie=e)},Le=vl({},["mi","mo","mn","ms","mtext"]),_e=vl({},["annotation-xml"]),Ne=vl({},["title","style","font","a","script"]),De=vl({},kl);vl(De,wl),vl(De,Sl);var Pe=vl({},Cl);vl(Pe,Tl);var Re=function(e){il(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=w}catch(t){e.remove()}}},Me=function(e,t){try{il(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){il(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!$[e])if(oe||se)try{Re(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},je=function(e){var t,n;if(re)e="<remove></remove>"+e;else{var r=ul(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===_&&ke===xe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var s=k?k.createHTML(e):e;if(ke===xe)try{t=(new m).parseFromString(s,_)}catch(e){}if(!t||!t.documentElement){t=C.createDocument(ke,"template",null);try{t.documentElement.innerHTML=we?w:s}catch(e){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(o.createTextNode(n),a.childNodes[0]||null),ke===xe?A.call(t,te?"html":"body")[0]:te?t.documentElement:a},Fe=function(e){return T.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null,!1)},Ue=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Be=function(e){return"object"===Hi(i)?e instanceof i:e&&"object"===Hi(e)&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ze=function(e,t,r){L[e]&&sl(L[e],(function(e){e.call(n,t,r,Ie)}))},He=function(e){var t;if(ze("beforeSanitizeElements",e,null),Ue(e))return Re(e),!0;if(pl(/[\u0080-\uFFFF]/,e.nodeName))return Re(e),!0;var r=N(e.nodeName);if(ze("uponSanitizeElement",e,{tagName:r,allowedTags:H}),e.hasChildNodes()&&!Be(e.firstElementChild)&&(!Be(e.content)||!Be(e.content.firstElementChild))&&pl(/<[/\w]/g,e.innerHTML)&&pl(/<[/\w]/g,e.textContent))return Re(e),!0;if("select"===r&&pl(/<template/i,e.innerHTML))return Re(e),!0;if(7===e.nodeType)return Re(e),!0;if(ee&&8===e.nodeType&&pl(/<[/\w]/g,e.data))return Re(e),!0;if(!H[r]||q[r]){if(!q[r]&&$e(r)){if(G.tagNameCheck instanceof RegExp&&pl(G.tagNameCheck,r))return!1;if(G.tagNameCheck instanceof Function&&G.tagNameCheck(r))return!1}if(ce&&!he[r]){var o=b(e)||e.parentNode,s=y(e)||e.childNodes;if(s&&o)for(var a=s.length-1;a>=0;--a){var i=g(s[a],!0);i.__removalCount=(e.__removalCount||0)+1,o.insertBefore(i,v(e))}}return Re(e),!0}return e instanceof l&&!function(e){var t=b(e);t&&t.tagName||(t={namespaceURI:ke,tagName:"template"});var n=ll(e.tagName),r=ll(t.tagName);return!!Se[e.namespaceURI]&&(e.namespaceURI===be?t.namespaceURI===xe?"svg"===n:t.namespaceURI===ye?"svg"===n&&("annotation-xml"===r||Le[r]):Boolean(De[n]):e.namespaceURI===ye?t.namespaceURI===xe?"math"===n:t.namespaceURI===be?"math"===n&&_e[r]:Boolean(Pe[n]):e.namespaceURI===xe?!(t.namespaceURI===be&&!_e[r])&&!(t.namespaceURI===ye&&!Le[r])&&!Pe[n]&&(Ne[n]||!De[n]):!("application/xhtml+xml"!==_||!Se[e.namespaceURI]))}(e)?(Re(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!pl(/<\/no(script|embed|frames)/i,e.innerHTML)?(Q&&3===e.nodeType&&(t=e.textContent,t=dl(t,D," "),t=dl(t,P," "),t=dl(t,R," "),e.textContent!==t&&(il(n.removed,{element:e.cloneNode()}),e.textContent=t)),ze("afterSanitizeElements",e,null),!1):(Re(e),!0)},We=function(e,t,n){if(ie&&("id"===t||"name"===t)&&(n in o||n in Ae))return!1;if(X&&!K[t]&&pl(M,t));else if(J&&pl(j,t));else if(!$[t]||K[t]){if(!($e(e)&&(G.tagNameCheck instanceof RegExp&&pl(G.tagNameCheck,e)||G.tagNameCheck instanceof Function&&G.tagNameCheck(e))&&(G.attributeNameCheck instanceof RegExp&&pl(G.attributeNameCheck,t)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(t))||"is"===t&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&pl(G.tagNameCheck,n)||G.tagNameCheck instanceof Function&&G.tagNameCheck(n))))return!1}else if(ge[t]);else if(pl(z,dl(n,U,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==hl(n,"data:")||!pe[e])if(Y&&!pl(F,dl(n,U,"")));else if(n)return!1;return!0},$e=function(e){return"annotation-xml"!==e&&ul(e,B)},Ve=function(e){var t,r,o,s;ze("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$};for(s=a.length;s--;){var l=t=a[s],c=l.name,u=l.namespaceURI;if(r="value"===c?t.value:ml(t.value),o=N(c),i.attrName=o,i.attrValue=r,i.keepAttr=!0,i.forceKeepAttr=void 0,ze("uponSanitizeAttribute",e,i),r=i.attrValue,!i.forceKeepAttr&&(Me(c,e),i.keepAttr))if(Z||!pl(/\/>/i,r)){Q&&(r=dl(r,D," "),r=dl(r,P," "),r=dl(r,R," "));var d=N(e.nodeName);if(We(d,o,r))if(!le||"id"!==o&&"name"!==o||(Me(c,e),r="user-content-"+r),ee&&pl(/((--!?|])>)|<\/(style|title)/i,r))Me(c,e);else{if(k&&"object"===Hi(p)&&"function"==typeof p.getAttributeType)if(u);else switch(p.getAttributeType(d,o)){case"TrustedHTML":r=k.createHTML(r);break;case"TrustedScriptURL":r=k.createScriptURL(r)}try{u?e.setAttributeNS(u,c,r):e.setAttribute(c,r),Ue(e)?Re(e):al(n.removed)}catch(e){}}}else Me(c,e)}ze("afterSanitizeAttributes",e,null)}},Ge=function e(t){var n,r=Fe(t);for(ze("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ze("uponSanitizeShadowNode",n,null),He(n)||(n.content instanceof s&&e(n.content),Ve(n));ze("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){var o,a,l,c,u,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((we=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Be(e)){if("function"!=typeof e.toString)throw fl("toString is not a function");if("string"!=typeof(e=e.toString()))throw fl("dirty is not a string, aborting")}if(!n.isSupported){if("object"===Hi(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(Be(e))return t.toStaticHTML(e.outerHTML)}return e}if(ne||Ee(d),n.removed=[],"string"==typeof e&&(ue=!1),ue){if(e.nodeName){var h=N(e.nodeName);if(!H[h]||q[h])throw fl("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof i)1===(a=(o=je("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?o=a:o.appendChild(a);else{if(!oe&&!Q&&!te&&-1===e.indexOf("<"))return k&&ae?k.createHTML(e):e;if(!(o=je(e)))return oe?null:ae?w:""}o&&re&&Re(o.firstChild);for(var m=Fe(ue?e:o);l=m.nextNode();)3===l.nodeType&&l===c||He(l)||(l.content instanceof s&&Ge(l.content),Ve(l),c=l);if(c=null,ue)return e;if(oe){if(se)for(u=I.call(o.ownerDocument);o.firstChild;)u.appendChild(o.firstChild);else u=o;return($.shadowroot||$.shadowrootmod)&&(u=O.call(r,u,!0)),u}var p=te?o.outerHTML:o.innerHTML;return te&&H["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&pl(Ul,o.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+p),Q&&(p=dl(p,D," "),p=dl(p,P," "),p=dl(p,R," ")),k&&ae?k.createHTML(p):p},n.setConfig=function(e){Ee(e),ne=!0},n.clearConfig=function(){Ie=null,ne=!1},n.isValidAttribute=function(e,t,n){Ie||Ee({});var r=N(e),o=N(t);return We(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(L[e]=L[e]||[],il(L[e],t))},n.removeHook=function(e){if(L[e])return al(L[e])},n.removeHooks=function(e){L[e]&&(L[e]=[])},n.removeAllHooks=function(){L={}},n}();const Wl=["script","svg"],$l=e=>-1!==e.lastIndexOf("</html>"),Vl=e=>({sanitizeHtml:(t,n)=>e(t)?t:(e=>{Hl.addHook("uponSanitizeElement",((e,t)=>{T(Wl,t.tagName)||He(t.allowedTags,t.tagName)||(t.allowedTags[t.tagName]=!0)})),Hl.addHook("uponSanitizeAttribute",((e,t)=>{0===t.attrName.indexOf("on")||He(t.allowedAttributes,t.attrName)||(t.allowedAttributes[t.attrName]=!0),t.attrValue&&-1!==t.attrValue.indexOf("\n")&&(t.attrValue=t.attrValue.replace(/\r?\n/g,""))}));const t=(e=>$(G(e),"<!"))(e),n=t?`<body>${e}</body>`:(e=>e.replace(/^[\S\s]*?(<!DOCTYPE|<html)/i,"$1"))(e),r=Hl.sanitize(n,{ALLOW_UNKNOWN_PROTOCOLS:!0,FORBID_TAGS:Wl,WHOLE_DOCUMENT:$l(e)});return Hl.removeHook("uponSanitizeElement"),Hl.removeHook("uponSanitizeAttribute"),t?(o=H(r,"<body>"),V(o,"</body>")?(e=>e.substring(0,e.length-7))(o):o):r;var o})(t),sanitizeText:p}),Gl={sanitizeHtml:p,sanitizeText:p},ql=e=>t=>({discriminator:e,data:t}),Kl=e=>t=>t.discriminator===e?k.some(t.data):k.none(),Jl=ql("event"),Xl=ql("html"),Yl=ql("images"),Zl=ql("word"),Ql=ql("text"),ec=ql("void"),tc=Kl("html"),nc=Kl("images"),rc=Kl("word"),oc=Kl("text"),sc=["^image/","file"],ac=e=>(e=>W(e,"<html")&&(W(e,'xmlns:o="urn:schemas-microsoft-com:office:office"')||W(e,'xmlns:x="urn:schemas-microsoft-com:office:excel"')))(e)||(e=>W(e,'meta name="ProgId" content="Word.Document"'))(e),ic=e=>W(e,'id="docs-internal-guid-'),lc=e=>e.length>0,cc=(e,t)=>zi(e.types,t).map((t=>e.getData(t.type))).filter(lc),uc=e=>cc(e,"html"),dc=e=>uc(e).filter(ic),hc=e=>k.from(e.clipboardData).filter(Bi),mc=e=>{const t=Pe.fromTag("div"),n=((e,t)=>uo(e,t,[da]))(Ct(t),e);return((e,t)=>{const n=Ct(e).dom,r=Pe.fromDom(n.createDocumentFragment()),o=Pn(t,n);en(r,o),tn(e),Yt(e,r)})(t,n),Xl({container:t})},pc={native:"Outside of Textbox.io pasting HTML5 API (could be internal)",fallback:"Outside of Textbox.io pasting offscreen (could be internal)",msoffice:"Word Import pasting",googledocs:"Google Docs pasting",image:"Image pasting",plaintext:"Only plain text is available to paste",text:"Plain text pasting",none:"There is no valid way to paste",discard:"There is no valid way to paste, discarding content"},fc={getLabelForApi:e=>{const t=Re(pc);return N(t,(t=>pc[t]===e)).fold(m("unknown"),(e=>{switch(e){case"native":case"fallback":return"html";case"none":case"discard":return"invalid";default:return e}}))},...pc},gc=e=>A(e,(e=>e.asset)),vc=(e,t,n)=>{const r=mt({cancel:ht([]),error:ht(["message"]),insert:ht(["elements","assets","correlated","isInternal","source","mode"]),block:ht(["state"])});let o=!1;r.registry.block.bind((e=>o=e.state));const s=(n,o)=>{r.trigger.block(!0);const s=((e,t,n)=>{const r=((e,t)=>B(e,(e=>e.getAvailable(t).map((t=>Pr(e.steps,t,e.label,e.capture()))))))(e,n);return r.getOrThunk((()=>{const e=t.getAvailable(n);return Pr(t.steps,e,t.label,t.capture())}))})(e,t,n);s.capture&&o();const a=((e,t)=>{const n={response:Cr([],[]),bundle:Er({})};return _(e,((e,n)=>Dr(e)?e.then((e=>Mr(e,t,n))):Mr(e,t,n)),n)})(s.steps,s.input),i=fc.getLabelForApi(s.label),l=e=>{const t=e.bundle.isInternal.getOr(!1),n=e.bundle.officeStyles.fold(m("auto"),(e=>e?"merge":"clean"));r.trigger.block(!1),wr(e.response,(e=>{r.trigger.error(e)}),((e,o)=>{r.trigger.insert(e,gc(o),o,t,i,n)}),(()=>{r.trigger.cancel()}),((e,o,s)=>{r.trigger.insert(e,gc(o),o,t,i,n),r.trigger.error(s)}))};return Dr(a)?a.then(l):l(a)};return{paste:e=>{const t=It(Pe.fromDom(e.target));qt(t.dom).each((t=>{if(!xn(t.start,Vn())){const t=((e,t=Gl)=>{const n=e=>{return void 0===e.items?k.none():(t=sc,n=e.types,B(t,(e=>zi(n,e)))).map((t=>{const n=[];for(let t=0;t<e.items.length;t++)n.push(e.items[t]);return Yl({images:n})}));var t,n},r=e=>B(e.types,(n=>"text/plain"===n?k.some(e.getData(n)).map((e=>Ql({text:t.sanitizeText(e)}))):k.none()));return{getWordData:()=>hc(e).bind((e=>(e=>uc(e).filter(ac))(e).map((t=>{const n=(e=>cc(e,"rtf"))(e);return Zl({html:t,rtf:n.fold((()=>Fi()),(e=>Ui(e)))})})))),getGoogleDocsData:()=>hc(e).bind(dc).map((e=>t.sanitizeHtml(e,"googledocs"))).map(mc),getImage:()=>hc(e).bind(n),getText:()=>hc(e).bind(r),getHtml:()=>hc(e).bind(uc).map(t.sanitizeHtml).map(mc),getOnlyText:()=>hc(e).bind((e=>{return 1===(t=e.types).length&&"text/plain"===t[0]?r(e):k.none();var t})),getNative:()=>Jl({nativeEvent:e}),getVoid:()=>ec({})}})(e,n);s(t,(()=>{e.preventDefault()}))}}))},pasteCustom:(e,t=d)=>{s(e,t)},isBlocked:()=>o,destroy:d,events:r.registry}},yc=e=>$a(e);var bc={cata:(e,t,n)=>e.fold(t,n),...xt([{blob:["id","imageresult","objurl"]},{url:["id","url","raw"]}])};const xc=e=>{const t=URL.createObjectURL(e);return kc(e,t)},kc=(e,t)=>yc(e).then((n=>{const r=Qa(e,n),o=an("image");return bc.blob(o,r,t)})),wc=e=>Promise.all(A(e,xc)),Sc=(e,t)=>({asset:e,image:t}),Cc=(e,t)=>bc.cata(e,((e,n,r)=>(cn(t,"src",r),!0)),b),Tc=(e,t)=>{const n=[];return O(e,((e,r)=>{const o=t[r];Cc(e,o)&&n.push(Sc(e,o))})),n},Ic=(e,t)=>({asyncAsset:e.then(hr.value,hr.error),image:t}),Ac=e=>{const t=Pe.fromTag("div");return en(t,e),Rt(t,"img[src]")},Oc=e=>0===e.indexOf("data:")&&e.indexOf("base64")>-1,Ec=e=>0===e.indexOf("blob:"),Lc=e=>hn(e,"src").exists((e=>Oc(e)||Ec(e))),_c=e=>R(Ac(e),(e=>{const t=hn(e,"src").getOr("");return Oc(t)?((e,t)=>{return(n=t,Ba(n)).map((t=>Ic(xc(t),e)));var n})(e,t).toArray():Ec(t)?((e,t)=>{return(n=t,k.from(0===(r=n).indexOf("blob:")?Ua(r):0===r.indexOf("data:")?za(r):null)).map((t=>{const n=t.then(xc);return Ic(n,e)}));var n,r})(e,t).toArray():[]})),Nc=e=>{const t=L(e,(e=>!Le("img")(e)||!Lc(e)));return Ir(t,[],"errors.local.images.disallowed")};var Dc=e=>(t,n)=>{const r=()=>Promise.resolve(n),o=(t,o)=>!1===e.allowLocalImages?(e=>{const t=L(Ac(e),Lc);return O(t,nn),Promise.resolve({response:t.length>0?Nc(e):n.response,bundle:n.bundle})})(t):0===o.length?(e=>{const t=_c(e),r=Promise.all(A(t,(e=>e.asyncAsset))),o=A(t,(e=>e.image));return r.then((t=>{const r=(e=>{const t=[],n=[];return O(e,(e=>{e.fold((e=>{t.push(e)}),(e=>{n.push(e)}))})),{errors:t,values:n}})(t),s=Tc(r.values,o);return{response:r.errors.length>0?Ir(e,s,"errors.imageimport.failed"):Cr(e,s),bundle:n.bundle}}))})(t):r();return wr(n.response,_r,o,r,o)};const Pc=(e,t,n=!1)=>fetch(e,{credentials:n?"include":"same-origin",headers:t}).then((async e=>{const t=await e.blob();return{ok:e.ok,status:e.status,blob:t}}),(()=>({ok:!1,status:0}))),Rc=[{code:404,message:"Could not find Image Proxy"},{code:403,message:"Rejected request"},{code:0,message:"Incorrect Image Proxy URL"}],Mc=[{type:"not_found",message:"Failed to load image."},{type:"key_missing",message:"The request did not include an api key."},{type:"key_not_found",message:"The provided api key could not be found."},{type:"domain_not_trusted",message:"The api key is not valid for the request origins."}],jc=e=>{const t=(e=>{const t=N(Rc,(t=>e===t.code)).fold(m("Unknown ImageProxy error"),(e=>e.message));return"ImageProxy HTTP error: "+t})(e);return Promise.reject(t)},Fc=e=>N(Mc,(t=>t.type===e)).fold(m("Unknown service error"),(e=>e.message)),Uc=e=>(e=>new Promise(((t,n)=>{const r=new FileReader;r.onload=()=>{t(r.result)},r.onerror=e=>{n(e)},r.readAsText(e)})))(e).then((e=>{const t=(e=>{const t=(e=>{try{return k.some(JSON.parse(e))}catch(e){return k.none()}})(e),n=t.bind((e=>(e=>{const t=_(["error","type"],((e,t)=>l(e)?e[t]:void 0),e);return k.from(t)})(e).map(Fc))).getOr("Invalid JSON in service error message");return"ImageProxy Service error: "+n})(e);return Promise.reject(t)})),Bc=(e,t,n=!0)=>t?((e,t)=>{const n={"Content-Type":"application/json;charset=UTF-8","tiny-api-key":t};return Pc(((e,t)=>{const n=-1===e.indexOf("?")?"?":"&";return/[?&]apiKey=/.test(e)?e:e+n+"apiKey="+encodeURIComponent(t)})(e,t),n).then((e=>{return e.ok?Promise.resolve(e.blob):((e,t)=>"application/json"===(null==t?void 0:t.type)&&(400===e||403===e||404===e||500===e))(t=e.status,n=e.blob)?Uc(n):jc(t);var t,n}))})(e,t):((e,t)=>Pc(e,{},t).then((e=>e.ok?Promise.resolve(e.blob):jc(e.status))))(e,n),zc=/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@\/]*)(?::([^:@\/]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,Hc=/^(?:(?![^:@\/]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*)(?::([^:@\/]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Wc=/(?:^|&)([^&=]+)=?([^&]*)/g,$c=e=>{const t={};for(;;){const n=Wc.exec(e);if(null===n)return t;t[n[1]]=n[2]}},Vc=(e,t)=>{const n=()=>Promise.resolve({response:t.response,bundle:t.bundle}),r=e=>yc(e).then((t=>{const n=an("image"),r=Qa(e,t),o=URL.createObjectURL(e);return bc.blob(n,r,o)})),o=(e,t)=>bc.url(an("image"),t,e),s=(e,n)=>{let s=!1;const a=R(e,(e=>Rt(e,"img")));return Promise.all(A(a,(e=>{const t=e.dom.src;return(e=>{const t=((e,t={})=>{var n;return((e,t)=>{const n=(t?zc:Hc).exec(e),r=j(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],((e,t)=>{var r;return null!==(r=n[t])&&void 0!==r?r:""}));return{...r,queryKey:$c(r.query)}})(e,null!==(n=t.strictMode)&&void 0!==n&&n)})(e);return W(t.host,"google")&&!$(t.path,"/drawings/")})(t)?Bc(e.dom.src,void 0,!0).then(r,(()=>(s=!0,o(e,t)))):o(e,t)}))).then((r=>{const o=n.concat(Tc(r,a));return{response:s?Ir(e,o,"errors.imageimport.failed"):Cr(e,o),bundle:t.bundle}}),(()=>({response:Sr("errors.imageimport.invalid"),bundle:t.bundle})))};return wr(t.response,n,s,n,s)},Gc=e=>{const t=Jc(e);return t&&qc(e)||!t&&Kc(e)},qc=e=>e.officeStyles.getOr(!0),Kc=e=>e.htmlStyles.getOr(!1),Jc=e=>e.isWord.getOr(!1),Xc=e=>e.isInternal.getOr(!1),Yc=e=>Jc(e)?as.Word:(e=>e.isGoogleDocs.getOr(!1))(e)?as.GoogleDocs:as.Html,Zc=(e,t)=>{const n=((e,t)=>{const n=t.translations,r=e=>k.some(jr(t,{officeStyles:e,gdocsStyles:e,htmlStyles:e}));return{get:o=>{const s=(e=>{switch(e){case as.Word:return"officeStyles";case as.GoogleDocs:return"gdocsStyles";default:return"htmlStyles"}})(o),a=t[s];return c(a)?a().then((e=>r("merge"===e)),(e=>(console.error(e),r(!1)))):"clean"===a?Promise.resolve(r(!1)):"merge"===a?Promise.resolve(r(!0)):new Promise((t=>{const o=Pe.fromTag("div");yn(o,er("styles-dialog-content"));const s=Pe.fromTag("p"),a=Pn(n("cement.dialog.paste.instructions"));en(s,a),Yt(o,s);const i={text:n("cement.dialog.paste.clean"),tabindex:0,className:er("clean-styles"),click:()=>{c(),t(r(!1))}},l={text:n("cement.dialog.paste.merge"),tabindex:1,className:er("merge-styles"),click:()=>{c(),t(r(!0))}},c=()=>{u.destroy()},u=e();u.setTitle(n("cement.dialog.paste.title")),u.setContent(o),u.setButtons([i,l]),u.events.close.bind((()=>{c(),t(k.none())})),u.show()}))},destroy:d}})(e,t);return(e,t)=>{const r=t.bundle,o=t.response;return n.get(Yc(r)).then((e=>e.fold((()=>({response:Tr(),bundle:t.bundle})),(e=>({response:o,bundle:Er({officeStyles:e.officeStyles,gdocsStyles:e.gdocsStyles,htmlStyles:e.htmlStyles})})))))}},Qc=(e,t)=>(n,r)=>Xc(r.bundle)?(e=>Promise.resolve({response:r.response,bundle:Er({officeStyles:e,gdocsStyles:e,htmlStyles:e})}))(!0):Zc(e,t)(n,r),eu=(e,t)=>{if(!Dt(e))throw new Error("Internal error: attempted to write to an iframe that is not in the DOM");const n=(e=>(e=>{const t=e.dom;try{return((e,t)=>null!=e?k.some(t(e)):k.none())(t.contentWindow?t.contentWindow.document:t.contentDocument,Pe.fromDom)}catch(e){return console.log("Error reading iframe: ",t),console.log("Error was: "+e),k.none()}})(e).getOrThunk((()=>Ct(e))))(e),r=n.dom;r.open("text/html","replace"),r.write(t),r.close()};var tu=Object.create,nu=Object.defineProperty,ru=Object.getOwnPropertyDescriptor,ou=Object.getOwnPropertyNames,su=Object.getPrototypeOf,au=Object.prototype.hasOwnProperty,iu=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),lu=(e,t)=>{for(var n in t)nu(e,n,{get:t[n],enumerable:!0})},cu=iu((e=>{var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");e.encode=function(e){if(0<=e&&e<t.length)return t[e];throw new TypeError("Must be between 0 and 63: "+e)},e.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}})),uu=iu((e=>{var t=cu();e.encode=function(e){var n,r,o="",s=(r=e)<0?1+(-r<<1):0+(r<<1);do{n=31&s,(s>>>=5)>0&&(n|=32),o+=t.encode(n)}while(s>0);return o},e.decode=function(e,n,r){var o,s,a=e.length,i=0,l=0;do{if(n>=a)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(s=t.decode(e.charCodeAt(n++))))throw new Error("Invalid base64 digit: "+e.charAt(n-1));o=!!(32&s),i+=(s&=31)<<l,l+=5}while(o);r.value=function(e){var t=e>>1;return 1&~e?t:-t}(i),r.rest=n}})),du=iu((e=>{e.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var t=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,n=/^data:.+\,.+$/;function r(e){var n=e.match(t);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}function o(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}e.urlParse=r,e.urlGenerate=o;var s=function(){var t=[];return function(n){for(var s=0;s<t.length;s++)if(t[s].input===n){var a=t[0];return t[0]=t[s],t[s]=a,t[0].result}var i=function(t){var n=t,s=r(t);if(s){if(!s.path)return t;n=s.path}for(var a=e.isAbsolute(n),i=[],l=0,c=0;;){if(l=c,-1===(c=n.indexOf("/",l))){i.push(n.slice(l));break}for(i.push(n.slice(l,c));c<n.length&&"/"===n[c];)c++}var u,d=0;for(c=i.length-1;c>=0;c--)"."===(u=i[c])?i.splice(c,1):".."===u?d++:d>0&&(""===u?(i.splice(c+1,d),d=0):(i.splice(c,2),d--));return""===(n=i.join("/"))&&(n=a?"/":"."),s?(s.path=n,o(s)):n}(n);return t.unshift({input:n,result:i}),t.length>32&&t.pop(),i}}();function a(e,t){""===e&&(e="."),""===t&&(t=".");var a=r(t),i=r(e);if(i&&(e=i.path||"/"),a&&!a.scheme)return i&&(a.scheme=i.scheme),o(a);if(a||t.match(n))return t;if(i&&!i.host&&!i.path)return i.host=t,o(i);var l="/"===t.charAt(0)?t:s(e.replace(/\/+$/,"")+"/"+t);return i?(i.path=l,o(i)):l}e.normalize=s,e.join=a,e.isAbsolute=function(e){return"/"===e.charAt(0)||t.test(e)},e.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0||(e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var i=!("__proto__"in Object.create(null));function l(e){return e}function c(e){if(!e)return!1;var t=e.length;if(t<9||95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function u(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}e.toSetString=i?l:function(e){return c(e)?"$"+e:e},e.fromSetString=i?l:function(e){return c(e)?e.slice(1):e},e.compareByOriginalPositions=function(e,t,n){var r=u(e.source,t.source);return 0!==r||0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)||n||0!=(r=e.generatedColumn-t.generatedColumn)||0!=(r=e.generatedLine-t.generatedLine)?r:u(e.name,t.name)},e.compareByOriginalPositionsNoSource=function(e,t,n){var r;return 0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)||n||0!=(r=e.generatedColumn-t.generatedColumn)||0!=(r=e.generatedLine-t.generatedLine)?r:u(e.name,t.name)},e.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r||0!=(r=e.generatedColumn-t.generatedColumn)||n||0!==(r=u(e.source,t.source))||0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)?r:u(e.name,t.name)},e.compareByGeneratedPositionsDeflatedNoLine=function(e,t,n){var r=e.generatedColumn-t.generatedColumn;return 0!==r||n||0!==(r=u(e.source,t.source))||0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)?r:u(e.name,t.name)},e.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!=(n=e.generatedColumn-t.generatedColumn)||0!==(n=u(e.source,t.source))||0!=(n=e.originalLine-t.originalLine)||0!=(n=e.originalColumn-t.originalColumn)?n:u(e.name,t.name)},e.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},e.computeSourceURL=function(e,t,n){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),n){var i=r(n);if(!i)throw new Error("sourceMapURL could not be parsed");if(i.path){var l=i.path.lastIndexOf("/");l>=0&&(i.path=i.path.substring(0,l+1))}t=a(o(i),t)}return s(t)}})),hu=iu((e=>{var t=du(),n=Object.prototype.hasOwnProperty,r=typeof Map<"u";function o(){this._array=[],this._set=r?new Map:Object.create(null)}o.fromArray=function(e,t){for(var n=new o,r=0,s=e.length;r<s;r++)n.add(e[r],t);return n},o.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},o.prototype.add=function(e,o){var s=r?e:t.toSetString(e),a=r?this.has(e):n.call(this._set,s),i=this._array.length;(!a||o)&&this._array.push(e),a||(r?this._set.set(e,i):this._set[s]=i)},o.prototype.has=function(e){if(r)return this._set.has(e);var o=t.toSetString(e);return n.call(this._set,o)},o.prototype.indexOf=function(e){if(r){var o=this._set.get(e);if(o>=0)return o}else{var s=t.toSetString(e);if(n.call(this._set,s))return this._set[s]}throw new Error('"'+e+'" is not in the set.')},o.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},o.prototype.toArray=function(){return this._array.slice()},e.ArraySet=o})),mu=iu((e=>{var t=du();function n(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}n.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},n.prototype.add=function(e){!function(e,n){var r=e.generatedLine,o=n.generatedLine,s=e.generatedColumn,a=n.generatedColumn;return o>r||o==r&&a>=s||t.compareByGeneratedPositionsInflated(e,n)<=0}(this._last,e)?(this._sorted=!1,this._array.push(e)):(this._last=e,this._array.push(e))},n.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=n})),pu=iu((e=>{var t=uu(),n=du(),r=hu().ArraySet,o=mu().MappingList;function s(e){e||(e={}),this._file=n.getArg(e,"file",null),this._sourceRoot=n.getArg(e,"sourceRoot",null),this._skipValidation=n.getArg(e,"skipValidation",!1),this._sources=new r,this._names=new r,this._mappings=new o,this._sourcesContents=null}s.prototype._version=3,s.fromSourceMap=function(e){var t=e.sourceRoot,r=new s({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var o={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(o.source=e.source,null!=t&&(o.source=n.relative(t,o.source)),o.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(o.name=e.name)),r.addMapping(o)})),e.sources.forEach((function(o){var s=o;null!==t&&(s=n.relative(t,o)),r._sources.has(s)||r._sources.add(s);var a=e.sourceContentFor(o);null!=a&&r.setSourceContent(o,a)})),r},s.prototype.addMapping=function(e){var t=n.getArg(e,"generated"),r=n.getArg(e,"original",null),o=n.getArg(e,"source",null),s=n.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,o,s),null!=o&&(o=String(o),this._sources.has(o)||this._sources.add(o)),null!=s&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:o,name:s})},s.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=n.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[n.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[n.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},s.prototype.applySourceMap=function(e,t,o){var s=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');s=e.file}var a=this._sourceRoot;null!=a&&(s=n.relative(a,s));var i=new r,l=new r;this._mappings.unsortedForEach((function(t){if(t.source===s&&null!=t.originalLine){var r=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=r.source&&(t.source=r.source,null!=o&&(t.source=n.join(o,t.source)),null!=a&&(t.source=n.relative(a,t.source)),t.originalLine=r.line,t.originalColumn=r.column,null!=r.name&&(t.name=r.name))}var c=t.source;null!=c&&!i.has(c)&&i.add(c);var u=t.name;null!=u&&!l.has(u)&&l.add(u)}),this),this._sources=i,this._names=l,e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&(null!=o&&(t=n.join(o,t)),null!=a&&(t=n.relative(a,t)),this.setSourceContent(t,r))}),this)},s.prototype._validateMapping=function(e,t,n,r){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r){if(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))}},s.prototype._serializeMappings=function(){for(var e,r,o,s,a=0,i=1,l=0,c=0,u=0,d=0,h="",m=this._mappings.toArray(),p=0,f=m.length;p<f;p++){if(e="",(r=m[p]).generatedLine!==i)for(a=0;r.generatedLine!==i;)e+=";",i++;else if(p>0){if(!n.compareByGeneratedPositionsInflated(r,m[p-1]))continue;e+=","}e+=t.encode(r.generatedColumn-a),a=r.generatedColumn,null!=r.source&&(s=this._sources.indexOf(r.source),e+=t.encode(s-d),d=s,e+=t.encode(r.originalLine-1-c),c=r.originalLine-1,e+=t.encode(r.originalColumn-l),l=r.originalColumn,null!=r.name&&(o=this._names.indexOf(r.name),e+=t.encode(o-u),u=o)),h+=e}return h},s.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=n.relative(t,e));var r=n.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null}),this)},s.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},s.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=s}));function fu(e){return e>=48&&e<=57}function gu(e){return fu(e)||e>=65&&e<=70||e>=97&&e<=102}function vu(e){return e>=65&&e<=90}function yu(e){return function(e){return vu(e)||function(e){return e>=97&&e<=122}(e)}(e)||function(e){return e>=128}(e)||95===e}function bu(e){return yu(e)||fu(e)||45===e}function xu(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e}function ku(e){return 10===e||13===e||12===e}function wu(e){return ku(e)||32===e||9===e}function Su(e,t){return!(92!==e||ku(t)||0===t)}function Cu(e,t,n){return 45===e?yu(t)||45===t||Su(t,n):!!yu(e)||92===e&&Su(e,t)}function Tu(e,t,n){return 43===e||45===e?fu(t)?2:46===t&&fu(n)?3:0:46===e?fu(t)?2:0:fu(e)?1:0}function Iu(e){return 65279===e||65534===e?1:0}var Au=new Array(128),Ou=130;for(let e=0;e<Au.length;e++)Au[e]=(wu(e)?Ou:fu(e)&&131)||yu(e)&&132||xu(e)&&133||e||128;function Eu(e){return e<128?Au[e]:132}function Lu(e,t){return t<e.length?e.charCodeAt(t):0}function _u(e,t,n){return 13===n&&10===Lu(e,t+1)?2:1}function Nu(e,t,n){let r=e.charCodeAt(t);return vu(r)&&(r|=32),r===n}function Du(e,t,n,r){if(n-t!==r.length||t<0||n>e.length)return!1;for(let o=t;o<n;o++){let n=r.charCodeAt(o-t),s=e.charCodeAt(o);if(vu(s)&&(s|=32),s!==n)return!1}return!0}function Pu(e,t){for(;t<e.length&&wu(e.charCodeAt(t));t++);return t}function Ru(e,t){for(;t<e.length&&fu(e.charCodeAt(t));t++);return t}function Mu(e,t){if(gu(Lu(e,(t+=2)-1))){for(let n=Math.min(e.length,t+5);t<n&&gu(Lu(e,t));t++);let n=Lu(e,t);wu(n)&&(t+=_u(e,t,n))}return t}function ju(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(!bu(n)){if(Su(n,Lu(e,t+1))){t=Mu(e,t)-1;continue}break}}return t}function Fu(e,t){let n=e.charCodeAt(t);if((43===n||45===n)&&(n=e.charCodeAt(t+=1)),fu(n)&&(t=Ru(e,t+1),n=e.charCodeAt(t)),46===n&&fu(e.charCodeAt(t+1))&&(t=Ru(e,t+=2)),Nu(e,t,101)){let r=0;n=e.charCodeAt(t+1),(45===n||43===n)&&(r=1,n=e.charCodeAt(t+2)),fu(n)&&(t=Ru(e,t+1+r+1))}return t}function Uu(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(41===n){t++;break}Su(n,Lu(e,t+1))&&(t=Mu(e,t))}return t}function Bu(e){if(1===e.length&&!gu(e.charCodeAt(0)))return e[0];let t=parseInt(e,16);return(0===t||t>=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}var zu=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token"];function Hu(e=null,t){return null===e||e.length<t?new Uint32Array(Math.max(t+1024,16384)):e}function Wu(e){let t=e.source,n=t.length,r=t.length>0?Iu(t.charCodeAt(0)):0,o=Hu(e.lines,n),s=Hu(e.columns,n),a=e.startLine,i=e.startColumn;for(let e=r;e<n;e++){let r=t.charCodeAt(e);o[e]=a,s[e]=i++,(10===r||13===r||12===r)&&(13===r&&e+1<n&&10===t.charCodeAt(e+1)&&(e++,o[e]=a,s[e]=i),a++,i=1)}o[n]=a,s[n]=i,e.lines=o,e.columns=s,e.computed=!0}var $u=class{constructor(){this.lines=null,this.columns=null,this.computed=!1}setSource(e,t=0,n=1,r=1){this.source=e,this.startOffset=t,this.startLine=n,this.startColumn=r,this.computed=!1}getLocation(e,t){return this.computed||Wu(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,n){return this.computed||Wu(this),{source:n,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}},Vu=16777215,Gu=24,qu=new Map([[2,22],[21,22],[19,20],[23,24]]),Ku=class{constructor(e,t){this.setSource(e,t)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e="",t=()=>{}){let n=(e=String(e||"")).length,r=Hu(this.offsetAndType,e.length+1),o=Hu(this.balance,e.length+1),s=0,a=0,i=0,l=-1;for(this.offsetAndType=null,this.balance=null,t(e,((e,t,c)=>{switch(e){default:o[s]=n;break;case a:{let e=i&Vu;for(i=o[e],a=i>>Gu,o[s]=e,o[e++]=s;e<s;e++)o[e]===n&&(o[e]=s);break}case 21:case 2:case 19:case 23:o[s]=i,a=qu.get(e),i=a<<Gu|s}r[s++]=e<<Gu|c,-1===l&&(l=t)})),r[s]=0|n,o[s]=n,o[n]=n;0!==i;){let e=i&Vu;i=o[e],o[e]=n}this.source=e,this.firstCharOffset=-1===l?0:l,this.tokenCount=s,this.offsetAndType=r,this.balance=o,this.reset(),this.next()}lookupType(e){return(e+=this.tokenIndex)<this.tokenCount?this.offsetAndType[e]>>Gu:0}lookupOffset(e){return(e+=this.tokenIndex)<this.tokenCount?this.offsetAndType[e-1]&Vu:this.source.length}lookupValue(e,t){return(e+=this.tokenIndex)<this.tokenCount&&Du(this.source,this.offsetAndType[e-1]&Vu,this.offsetAndType[e]&Vu,t)}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&Vu:this.offsetAndType[this.tokenCount]&Vu:this.firstCharOffset}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,t){return t?9===this.lookupType(t)&&this.source.charCodeAt(this.lookupOffset(t))===e:9===this.tokenType&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.offsetAndType[t-1]&Vu,t=this.offsetAndType[t],this.tokenType=t>>Gu,this.tokenEnd=t&Vu):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>Gu,this.tokenEnd=e&Vu):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;13===this.tokenType||25===this.tokenType;)this.next()}skipUntilBalanced(e,t){let n,r,o=e;e:for(;o<this.tokenCount&&(n=this.balance[o],!(n<e));o++)switch(r=o>0?this.offsetAndType[o-1]&Vu:this.firstCharOffset,t(this.source.charCodeAt(r))){case 1:break e;case 2:o++;break e;default:this.balance[n]===o&&(o=n)}this.skip(o-this.tokenIndex)}forEachToken(e){for(let t=0,n=this.firstCharOffset;t<this.tokenCount;t++){let r=n,o=this.offsetAndType[t],s=o&Vu;n=s,e(o>>Gu,r,s,t)}}dump(){let e=new Array(this.tokenCount);return this.forEachToken(((t,n,r,o)=>{e[o]={idx:o,type:zu[t],chunk:this.source.substring(n,r),balance:this.balance[o]}})),e}};function Ju(e,t){function n(t){return t<i?e.charCodeAt(t):0}function r(){return c=Fu(e,c),Cu(n(c),n(c+1),n(c+2))?(a=12,void(c=ju(e,c))):37===n(c)?(a=11,void c++):void(a=10)}function o(){let t=c;return c=ju(e,c),Du(e,t,c,"url")&&40===n(c)?(c=Pu(e,c+1),34===n(c)||39===n(c)?(a=2,void(c=t+4)):void function(){for(a=7,c=Pu(e,c);c<e.length;c++){let t=e.charCodeAt(c);switch(Eu(t)){case 41:return void c++;case Ou:return c=Pu(e,c),41===n(c)||c>=e.length?void(c<e.length&&c++):(c=Uu(e,c),void(a=8));case 34:case 39:case 40:case 133:return c=Uu(e,c),void(a=8);case 92:if(Su(t,n(c+1))){c=Mu(e,c)-1;break}return c=Uu(e,c),void(a=8)}}}()):40===n(c)?(a=2,void c++):void(a=1)}function s(t){for(t||(t=n(c++)),a=5;c<e.length;c++){let r=e.charCodeAt(c);switch(Eu(r)){case t:return void c++;case Ou:if(ku(r))return c+=_u(e,c,r),void(a=6);break;case 92:if(c===e.length-1)break;let o=n(c+1);ku(o)?c+=_u(e,c+1,o):Su(r,o)&&(c=Mu(e,c)-1)}}}let a,i=(e=String(e||"")).length,l=Iu(n(0)),c=l;for(;c<i;){let i=e.charCodeAt(c);switch(Eu(i)){case Ou:a=13,c=Pu(e,c+1);break;case 34:s();break;case 35:bu(n(c+1))||Su(n(c+1),n(c+2))?(a=4,c=ju(e,c+1)):(a=9,c++);break;case 39:s();break;case 40:a=21,c++;break;case 41:a=22,c++;break;case 43:Tu(i,n(c+1),n(c+2))?r():(a=9,c++);break;case 44:a=18,c++;break;case 45:Tu(i,n(c+1),n(c+2))?r():45===n(c+1)&&62===n(c+2)?(a=15,c+=3):Cu(i,n(c+1),n(c+2))?o():(a=9,c++);break;case 46:Tu(i,n(c+1),n(c+2))?r():(a=9,c++);break;case 47:42===n(c+1)?(a=25,c=e.indexOf("*/",c+2),c=-1===c?e.length:c+2):(a=9,c++);break;case 58:a=16,c++;break;case 59:a=17,c++;break;case 60:33===n(c+1)&&45===n(c+2)&&45===n(c+3)?(a=14,c+=4):(a=9,c++);break;case 64:Cu(n(c+1),n(c+2),n(c+3))?(a=3,c=ju(e,c+1)):(a=9,c++);break;case 91:a=19,c++;break;case 92:Su(i,n(c+1))?o():(a=9,c++);break;case 93:a=20,c++;break;case 123:a=23,c++;break;case 125:a=24,c++;break;case 131:r();break;case 132:o();break;default:a=9,c++}t(a,l,l=c)}}var Xu,Yu=(Xu=pu(),((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of ou(t))!au.call(e,n)&&"default"!==n&&nu(e,n,{get:()=>t[n],enumerable:!(r=ru(t,n))||r.enumerable});return e})((e=>nu(e,"__esModule",{value:!0}))(nu(null!=Xu?tu(su(Xu)):{},"default",{value:Xu,enumerable:!0})),Xu)),Zu=new Set(["Atrule","Selector","Declaration"]),Qu={};lu(Qu,{safe:()=>sd,spec:()=>od});var ed=(e,t)=>{if(9===e&&(e=t),"string"==typeof e){let t=e.charCodeAt(0);return t>127?32768:t<<8}return e},td=[[1,1],[1,2],[1,7],[1,8],[1,"-"],[1,10],[1,11],[1,12],[1,15],[1,21],[3,1],[3,2],[3,7],[3,8],[3,"-"],[3,10],[3,11],[3,12],[3,15],[4,1],[4,2],[4,7],[4,8],[4,"-"],[4,10],[4,11],[4,12],[4,15],[12,1],[12,2],[12,7],[12,8],[12,"-"],[12,10],[12,11],[12,12],[12,15],["#",1],["#",2],["#",7],["#",8],["#","-"],["#",10],["#",11],["#",12],["#",15],["-",1],["-",2],["-",7],["-",8],["-","-"],["-",10],["-",11],["-",12],["-",15],[10,1],[10,2],[10,7],[10,8],[10,10],[10,11],[10,12],[10,"%"],[10,15],["@",1],["@",2],["@",7],["@",8],["@","-"],["@",15],[".",10],[".",11],[".",12],["+",10],["+",11],["+",12],["/","*"]],nd=td.concat([[1,4],[12,4],[4,4],[3,21],[3,5],[3,16],[11,11],[11,12],[11,2],[11,"-"],[22,1],[22,2],[22,11],[22,12],[22,4],[22,"-"]]);function rd(e){let t=new Set(e.map((([e,t])=>ed(e)<<16|ed(t))));return function(e,n,r){let o=ed(n,r),s=r.charCodeAt(0);return(45===s&&1!==n&&2!==n&&15!==n||43===s?t.has(e<<16|s<<8):t.has(e<<16|o))&&this.emit(" ",13,!0),o}}var od=rd(td),sd=rd(nd);function ad(e,t){if("function"!=typeof t)e.children.forEach(this.node,this);else{let n=null;e.children.forEach((e=>{null!==n&&t.call(this,n),this.node(e),n=e}))}}function id(e){Ju(e,((t,n,r)=>{this.token(t,e.slice(n,r))}))}var ld={};lu(ld,{AnPlusB:()=>yd,Atrule:()=>bd,AtrulePrelude:()=>xd,AttributeSelector:()=>Cd,Block:()=>Td,Brackets:()=>Id,CDC:()=>Ad,CDO:()=>Od,ClassSelector:()=>Ld,Combinator:()=>Nd,Comment:()=>Dd,Declaration:()=>Pd,DeclarationList:()=>Rd,Dimension:()=>Md,Function:()=>jd,Hash:()=>Fd,IdSelector:()=>Hd,Identifier:()=>Bd,MediaFeature:()=>Wd,MediaQuery:()=>$d,MediaQueryList:()=>Vd,NestingSelector:()=>qd,Nth:()=>Jd,Number:()=>Xd,Operator:()=>Yd,Parentheses:()=>Zd,Percentage:()=>eh,PseudoClassSelector:()=>nh,PseudoElementSelector:()=>oh,Ratio:()=>sh,Raw:()=>lh,Rule:()=>ch,Selector:()=>dh,SelectorList:()=>mh,String:()=>yh,StyleSheet:()=>bh,TypeSelector:()=>wh,UnicodeRange:()=>Sh,Url:()=>Lh,Value:()=>_h,WhiteSpace:()=>Nh});var cd=43,ud=45,dd=110,hd=!0;function md(e,t){let n=this.tokenStart+e,r=this.charCodeAt(n);for((r===cd||r===ud)&&(t&&this.error("Number sign is not allowed"),n++);n<this.tokenEnd;n++)fu(this.charCodeAt(n))||this.error("Integer is expected",n)}function pd(e){return md.call(this,0,e)}function fd(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let n="";switch(t){case dd:n="N is expected";break;case ud:n="HyphenMinus is expected"}this.error(n,this.tokenStart+e)}}function gd(){let e=0,t=0,n=this.tokenType;for(;13===n||25===n;)n=this.lookupType(++e);if(10!==n){if(!this.isDelim(cd,e)&&!this.isDelim(ud,e))return null;t=this.isDelim(cd,e)?cd:ud;do{n=this.lookupType(++e)}while(13===n||25===n);10!==n&&(this.skip(e),pd.call(this,hd))}return e>0&&this.skip(e),0===t&&(n=this.charCodeAt(this.tokenStart),n!==cd&&n!==ud&&this.error("Number sign is expected")),pd.call(this,0!==t),t===ud?"-"+this.consume(10):this.consume(10)}function vd(){let e=this.tokenStart,t=null,n=null;if(10===this.tokenType)pd.call(this,!1),n=this.consume(10);else if(1===this.tokenType&&this.cmpChar(this.tokenStart,ud))switch(t="-1",fd.call(this,1,dd),this.tokenEnd-this.tokenStart){case 2:this.next(),n=gd.call(this);break;case 3:fd.call(this,2,ud),this.next(),this.skipSC(),pd.call(this,hd),n="-"+this.consume(10);break;default:fd.call(this,2,ud),md.call(this,3,hd),this.next(),n=this.substrToCursor(e+2)}else if(1===this.tokenType||this.isDelim(cd)&&1===this.lookupType(1)){let r=0;switch(t="1",this.isDelim(cd)&&(r=1,this.next()),fd.call(this,0,dd),this.tokenEnd-this.tokenStart){case 1:this.next(),n=gd.call(this);break;case 2:fd.call(this,1,ud),this.next(),this.skipSC(),pd.call(this,hd),n="-"+this.consume(10);break;default:fd.call(this,1,ud),md.call(this,2,hd),this.next(),n=this.substrToCursor(e+r+1)}}else if(12===this.tokenType){let r=this.charCodeAt(this.tokenStart),o=r===cd||r===ud,s=this.tokenStart+o;for(;s<this.tokenEnd&&fu(this.charCodeAt(s));s++);s===this.tokenStart+o&&this.error("Integer is expected",this.tokenStart+o),fd.call(this,s-this.tokenStart,dd),t=this.substring(e,s),s+1===this.tokenEnd?(this.next(),n=gd.call(this)):(fd.call(this,s-this.tokenStart+1,ud),s+2===this.tokenEnd?(this.next(),this.skipSC(),pd.call(this,hd),n="-"+this.consume(10)):(md.call(this,s-this.tokenStart+2,hd),this.next(),n=this.substrToCursor(s+1)))}else this.error();return null!==t&&t.charCodeAt(0)===cd&&(t=t.substr(1)),null!==n&&n.charCodeAt(0)===cd&&(n=n.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.tokenStart),a:t,b:n}}function yd(e){if(e.a){let t=("+1"===e.a||"1"===e.a?"n":"-1"===e.a&&"-n")||e.a+"n";if(e.b){let n="-"===e.b[0]||"+"===e.b[0]?e.b:"+"+e.b;this.tokenize(t+n)}else this.tokenize(t)}else this.tokenize(e.b)}function bd(e){this.token(3,"@"+e.name),null!==e.prelude&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";")}function xd(e){this.children(e)}function kd(){this.eof&&this.error("Unexpected end of input");let e=this.tokenStart,t=!1;return this.isDelim(42)?(t=!0,this.next()):this.isDelim(124)||this.eat(1),this.isDelim(124)?61!==this.charCodeAt(this.tokenStart+1)?(this.next(),this.eat(1)):t&&this.error("Identifier is expected",this.tokenEnd):t&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function wd(){let e=this.tokenStart,t=this.charCodeAt(e);return 61!==t&&126!==t&&94!==t&&36!==t&&42!==t&&124!==t&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),61!==t&&(this.isDelim(61)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}function Sd(){let e,t=this.tokenStart,n=null,r=null,o=null;return this.eat(19),this.skipSC(),e=kd.call(this),this.skipSC(),20!==this.tokenType&&(1!==this.tokenType&&(n=wd.call(this),this.skipSC(),r=5===this.tokenType?this.String():this.Identifier(),this.skipSC()),1===this.tokenType&&(o=this.consume(1),this.skipSC())),this.eat(20),{type:"AttributeSelector",loc:this.getLocation(t,this.tokenStart),name:e,matcher:n,value:r,flags:o}}function Cd(e){this.token(9,"["),this.node(e.name),null!==e.matcher&&(this.tokenize(e.matcher),this.node(e.value)),null!==e.flags&&this.token(1,e.flags),this.token(9,"]")}function Td(e){this.token(23,"{"),this.children(e,(e=>{"Declaration"===e.type&&this.token(17,";")})),this.token(24,"}")}function Id(e){this.token(9,"["),this.children(e),this.token(9,"]")}function Ad(){this.token(15,"--\x3e")}function Od(){this.token(14,"\x3c!--")}function Ed(){return this.eatDelim(46),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function Ld(e){this.token(9,"."),this.token(1,e.name)}function _d(){let e,t=this.tokenStart;switch(this.tokenType){case 13:e=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case 62:case 43:case 126:this.next();break;case 47:this.next(),this.eatIdent("deep"),this.eatDelim(47);break;default:this.error("Combinator is expected")}e=this.substrToCursor(t)}return{type:"Combinator",loc:this.getLocation(t,this.tokenStart),name:e}}function Nd(e){this.tokenize(e.name)}function Dd(e){this.token(25,"/*"+e.value+"*/")}function Pd(e){this.token(1,e.property),this.token(16,":"),this.node(e.value),e.important&&(this.token(9,"!"),this.token(1,!0===e.important?"important":e.important))}function Rd(e){this.children(e,(e=>{"Declaration"===e.type&&this.token(17,";")}))}function Md(e){this.token(12,e.value+e.unit)}function jd(e){this.token(2,e.name+"("),this.children(e),this.token(22,")")}function Fd(e){this.token(4,"#"+e.value)}function Ud(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function Bd(e){this.token(1,e.name)}function zd(){let e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function Hd(e){this.token(9,"#"+e.name)}function Wd(e){this.token(21,"("),this.token(1,e.name),null!==e.value&&(this.token(16,":"),this.node(e.value)),this.token(22,")")}function $d(e){this.children(e)}function Vd(e){this.children(e,(()=>this.token(18,",")))}function Gd(){let e=this.tokenStart;return this.eatDelim(38),{type:"NestingSelector",loc:this.getLocation(e,this.tokenStart)}}function qd(){this.token(9,"&")}function Kd(){this.skipSC();let e,t=this.tokenStart,n=t,r=null;return e=this.lookupValue(0,"odd")||this.lookupValue(0,"even")?this.Identifier():this.AnPlusB(),n=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),r=this.SelectorList(),n=this.tokenStart),{type:"Nth",loc:this.getLocation(t,n),nth:e,selector:r}}function Jd(e){this.node(e.nth),null!==e.selector&&(this.token(1,"of"),this.node(e.selector))}function Xd(e){this.token(10,e.value)}function Yd(e){this.tokenize(e.value)}function Zd(e){this.token(21,"("),this.children(e),this.token(22,")")}function Qd(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function eh(e){this.token(11,e.value+"%")}function th(){let e,t,n=this.tokenStart,r=null;return this.eat(16),2===this.tokenType?(e=this.consumeFunctionName(),t=e.toLowerCase(),hasOwnProperty.call(this.pseudo,t)?(this.skipSC(),r=this.pseudo[t].call(this),this.skipSC()):(r=this.createList(),r.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):e=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(n,this.tokenStart),name:e,children:r}}function nh(e){this.token(16,":"),null===e.children?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}function rh(){let e,t,n=this.tokenStart,r=null;return this.eat(16),this.eat(16),2===this.tokenType?(e=this.consumeFunctionName(),t=e.toLowerCase(),hasOwnProperty.call(this.pseudo,t)?(this.skipSC(),r=this.pseudo[t].call(this),this.skipSC()):(r=this.createList(),r.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):e=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(n,this.tokenStart),name:e,children:r}}function oh(e){this.token(16,":"),this.token(16,":"),null===e.children?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}function sh(e){this.token(10,e.left),this.token(9,"/"),this.token(10,e.right)}function ah(){return this.tokenIndex>0&&13===this.lookupType(-1)?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}function ih(e,t,n){let r,o=this.getTokenStart(e);return this.skipUntilBalanced(e,t||this.consumeUntilBalanceEnd),r=n&&this.tokenStart>o?ah.call(this):this.tokenStart,{type:"Raw",loc:this.getLocation(o,r),value:this.substring(o,r)}}function lh(e){this.tokenize(e.value)}function ch(e){this.node(e.prelude),this.node(e.block)}function uh(){let e=this.readSequence(this.scope.Selector);return null===this.getFirstListNode(e)&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function dh(e){this.children(e)}function hh(){let e=this.createList();for(;!this.eof&&(e.push(this.Selector()),18===this.tokenType);)this.next();return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function mh(e){this.children(e,(()=>this.token(18,",")))}var ph=92,fh=34;function gh(e){let t=e.length,n=e.charCodeAt(0),r=n===fh||39===n?1:0,o=1===r&&t>1&&e.charCodeAt(t-1)===n?t-2:t-1,s="";for(let n=r;n<=o;n++){let r=e.charCodeAt(n);if(r===ph){if(n===o){n!==t-1&&(s=e.substr(n+1));break}if(r=e.charCodeAt(++n),Su(ph,r)){let t=n-1,r=Mu(e,t);n=r-1,s+=Bu(e.substring(t+1,r))}else 13===r&&10===e.charCodeAt(n+1)&&n++}else s+=e[n]}return s}function vh(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:gh(this.consume(5))}}function yh(e){this.token(5,function(e){let t=fh,n="",r=!1;for(let o=0;o<e.length;o++){let s=e.charCodeAt(o);0!==s?s<=31||127===s?(n+="\\"+s.toString(16),r=!0):s===t||s===ph?(n+="\\"+e.charAt(o),r=!1):(r&&(gu(s)||wu(s))&&(n+=" "),n+=e.charAt(o),r=!1):n+="\ufffd"}return'"'+n+'"'}(e.value))}function bh(e){this.children(e)}function xh(){1!==this.tokenType&&!1===this.isDelim(42)&&this.error("Identifier or asterisk is expected"),this.next()}function kh(){let e=this.tokenStart;return this.isDelim(124)?(this.next(),xh.call(this)):(xh.call(this),this.isDelim(124)&&(this.next(),xh.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function wh(e){this.tokenize(e.name)}function Sh(e){this.tokenize(e.value)}var Ch=32,Th=92,Ih=34,Ah=39,Oh=40,Eh=41;function Lh(e){this.token(7,function(e){let t="",n=!1;for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);0!==o?o<=31||127===o?(t+="\\"+o.toString(16),n=!0):o===Ch||o===Th||o===Ih||o===Ah||o===Oh||o===Eh?(t+="\\"+e.charAt(r),n=!1):(n&&gu(o)&&(t+=" "),t+=e.charAt(r),n=!1):t+="\ufffd"}return"url("+t+")"}(e.value))}function _h(e){this.children(e)}function Nh(e){this.token(13,e.value)}var Dh=function(e){let t=new Map;for(let n in e.node){let r=e.node[n];"function"==typeof(r.generate||r)&&t.set(n,r.generate||r)}return function(e,n){let r="",o=0,s={node(e){if(!t.has(e.type))throw new Error("Unknown node type: "+e.type);t.get(e.type).call(a,e)},tokenBefore:sd,token(e,t){o=this.tokenBefore(o,e,t),this.emit(t,e,!1),9===e&&92===t.charCodeAt(0)&&this.emit("\n",13,!0)},emit(e){r+=e},result:()=>r};n&&("function"==typeof n.decorator&&(s=n.decorator(s)),n.sourceMap&&(s=function(e){let t=new Yu.SourceMapGenerator,n={line:1,column:0},r={line:0,column:0},o={line:1,column:0},s={generated:o},a=1,i=0,l=!1,c=e.node;e.node=function(e){if(e.loc&&e.loc.start&&Zu.has(e.type)){let c=e.loc.start.line,u=e.loc.start.column-1;(r.line!==c||r.column!==u)&&(r.line=c,r.column=u,n.line=a,n.column=i,l&&(l=!1,(n.line!==o.line||n.column!==o.column)&&t.addMapping(s)),l=!0,t.addMapping({source:e.loc.source,original:r,generated:n}))}c.call(this,e),l&&Zu.has(e.type)&&(o.line=a,o.column=i)};let u=e.emit;e.emit=function(e,t,n){for(let t=0;t<e.length;t++)10===e.charCodeAt(t)?(a++,i=0):i++;u(e,t,n)};let d=e.result;return e.result=function(){return l&&t.addMapping(s),{css:d(),map:t}},e}(s)),n.mode in Qu&&(s.tokenBefore=Qu[n.mode]));let a={node:e=>s.node(e),children:ad,token:(e,t)=>s.token(e,t),tokenize:id};return s.node(e),s.result()}}({node:ld}),Ph=null,Rh=class{static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(e){return Rh.createItem(e)}allocateCursor(e,t){let n;return null!==Ph?(n=Ph,Ph=Ph.cursor,n.prev=e,n.next=t,n.cursor=this.cursor):n={prev:e,next:t,cursor:this.cursor},this.cursor=n,n}releaseCursor(){let{cursor:e}=this;this.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=Ph,Ph=e}updateCursors(e,t,n,r){let{cursor:o}=this;for(;null!==o;)o.prev===e&&(o.prev=t),o.next===n&&(o.next=r),o=o.cursor}*[Symbol.iterator](){for(let e=this.head;null!==e;e=e.next)yield e.data}get size(){let e=0;for(let t=this.head;null!==t;t=t.next)e++;return e}get isEmpty(){return null===this.head}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(e){let t=null;this.head=null;for(let n of e){let e=Rh.createItem(n);null!==t?t.next=e:this.head=e,e.prev=t,t=e}return this.tail=t,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(e,t=this){let n=this.allocateCursor(null,this.head);for(;null!==n.next;){let r=n.next;n.next=r.next,e.call(t,r.data,r,this)}this.releaseCursor()}forEachRight(e,t=this){let n=this.allocateCursor(this.tail,null);for(;null!==n.prev;){let r=n.prev;n.prev=r.prev,e.call(t,r.data,r,this)}this.releaseCursor()}reduce(e,t,n=this){let r,o=this.allocateCursor(null,this.head),s=t;for(;null!==o.next;)r=o.next,o.next=r.next,s=e.call(n,s,r.data,r,this);return this.releaseCursor(),s}reduceRight(e,t,n=this){let r,o=this.allocateCursor(this.tail,null),s=t;for(;null!==o.prev;)r=o.prev,o.prev=r.prev,s=e.call(n,s,r.data,r,this);return this.releaseCursor(),s}some(e,t=this){for(let n=this.head;null!==n;n=n.next)if(e.call(t,n.data,n,this))return!0;return!1}map(e,t=this){let n=new Rh;for(let r=this.head;null!==r;r=r.next)n.appendData(e.call(t,r.data,r,this));return n}filter(e,t=this){let n=new Rh;for(let r=this.head;null!==r;r=r.next)e.call(t,r.data,r,this)&&n.appendData(r.data);return n}nextUntil(e,t,n=this){if(null===e)return;let r=this.allocateCursor(null,e);for(;null!==r.next;){let e=r.next;if(r.next=e.next,t.call(n,e.data,e,this))break}this.releaseCursor()}prevUntil(e,t,n=this){if(null===e)return;let r=this.allocateCursor(e,null);for(;null!==r.prev;){let e=r.prev;if(r.prev=e.prev,t.call(n,e.data,e,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){let e=new Rh;for(let t of this)e.appendData(t);return e}prepend(e){return this.updateCursors(null,e,this.head,e),null!==this.head?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this}prependData(e){return this.prepend(Rh.createItem(e))}append(e){return this.insert(e)}appendData(e){return this.insert(Rh.createItem(e))}insert(e,t=null){if(null!==t)if(this.updateCursors(t.prev,e,t,e),null===t.prev){if(this.head!==t)throw new Error("before doesn't belong to list");this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e)}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t;else this.updateCursors(this.tail,e,null,e),null!==this.tail?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this}insertData(e,t){return this.insert(Rh.createItem(e),t)}remove(e){if(this.updateCursors(e,e.prev,e,e.next),null!==e.prev)e.prev.next=e.next;else{if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next}if(null!==e.next)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev}return e.prev=null,e.next=null,e}push(e){this.insert(Rh.createItem(e))}pop(){return null!==this.tail?this.remove(this.tail):null}unshift(e){this.prepend(Rh.createItem(e))}shift(){return null!==this.head?this.remove(this.head):null}prependList(e){return this.insertList(e,this.head)}appendList(e){return this.insertList(e)}insertList(e,t){return null===e.head||(null!=t?(this.updateCursors(t.prev,e.tail,t,e.head),null!==t.prev?(t.prev.next=e.head,e.head.prev=t.prev):this.head=e.head,t.prev=e.tail,e.tail.next=t):(this.updateCursors(this.tail,e.tail,null,e.head),null!==this.tail?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null),this}replace(e,t){"head"in t?this.insertList(t,e):this.insert(t,e),this.remove(e)}};function Mh({source:e,line:t,column:n},r){function o(e,t){return s.slice(e,t).map(((t,n)=>String(e+n+1).padStart(l)+" |"+t)).join("\n")}let s=e.split(/\r\n?|\n|\f/),a=Math.max(1,t-r)-1,i=Math.min(t+r,s.length+1),l=Math.max(4,String(i).length)+1,c=0;(n+=3*(s[t-1].substr(0,n-1).match(/\t/g)||[]).length)>100&&(c=n-60+3,n=58);for(let e=a;e<=i;e++)e>=0&&e<s.length&&(s[e]=s[e].replace(/\t/g," "),s[e]=(c>0&&s[e].length>c?"\u2026":"")+s[e].substr(c,98)+(s[e].length>c+100-1?"\u2026":""));return[o(a,t),new Array(n+l+2).join("-")+"^",o(t,i)].filter(Boolean).join("\n")}function jh(e,t,n,r,o){return Object.assign(function(e,t){let n=Object.create(SyntaxError.prototype),r=new Error;return Object.assign(n,{name:e,message:t,get stack(){return(r.stack||"").replace(/^(.+\n){1,3}/,`${e}: ${t}\n`)}})}("SyntaxError",e),{source:t,offset:n,line:r,column:o,sourceFragment:e=>Mh({source:t,line:r,column:o},isNaN(e)?0:e),get formattedMessage(){return`Parse error: ${e}\n`+Mh({source:t,line:r,column:o},2)}})}function Fh(e){let t=this.createList(),n=!1,r={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:n=!0,this.next();continue}let o=e.getNode.call(this,r);if(void 0===o)break;n&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,o,t,r),n=!1),t.push(o)}return n&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,r),t}var Uh=()=>{};function Bh(e){return function(){return this[e]()}}function zh(e){let t=Object.create(null);for(let n in e){let r=e[n],o=r.parse||r;o&&(t[n]=o)}return t}var Hh={parse(){return this.createSingleNodeList(this.SelectorList())}},Wh={parse(){return this.createSingleNodeList(this.Selector())}},$h={parse(){return this.createSingleNodeList(this.Identifier())}},Vh={parse(){return this.createSingleNodeList(this.Nth())}},Gh={dir:$h,has:Hh,lang:$h,matches:Hh,is:Hh,"-moz-any":Hh,"-webkit-any":Hh,where:Hh,not:Hh,"nth-child":Vh,"nth-last-child":Vh,"nth-last-of-type":Vh,"nth-of-type":Vh,slotted:Wh,host:Wh,"host-context":Wh},qh={};lu(qh,{AnPlusB:()=>vd,AttributeSelector:()=>Sd,ClassSelector:()=>Ed,Combinator:()=>_d,IdSelector:()=>zd,Identifier:()=>Ud,NestingSelector:()=>Gd,Nth:()=>Kd,Percentage:()=>Qd,PseudoClassSelector:()=>th,PseudoElementSelector:()=>rh,Raw:()=>ih,Selector:()=>uh,SelectorList:()=>hh,String:()=>vh,TypeSelector:()=>kh});var Kh=function(e){let t="",n="<unknown>",r=!1,o=Uh,s=!1,a=new $u,i=Object.assign(new Ku,function(e){let t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:zh(e.atrule),pseudo:zh(e.pseudo),node:zh(e.node)};for(let n in e.parseContext)switch(typeof e.parseContext[n]){case"function":t.context[n]=e.parseContext[n];break;case"string":t.context[n]=Bh(e.parseContext[n])}return{config:t,...t,...t.node}}(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Fh,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket:e=>123===e?1:0,consumeUntilLeftCurlyBracketOrSemicolon:e=>123===e||59===e?1:0,consumeUntilExclamationMarkOrSemicolon:e=>33===e||59===e?1:0,consumeUntilSemicolonIncluded:e=>59===e?2:0,createList:()=>new Rh,createSingleNodeList:e=>(new Rh).appendData(e),getFirstListNode:e=>e&&e.first,getLastListNode:e=>e&&e.last,parseWithFallback(e,t){let n=this.tokenIndex;try{return e.call(this)}catch(e){if(s)throw e;let r=t.call(this,n);return s=!0,o(e,r),s=!1,r}},lookupNonWSType(e){let t;do{if(t=this.lookupType(e++),13!==t)return t}while(0!==t);return 0},charCodeAt:e=>e>=0&&e<t.length?t.charCodeAt(e):0,substring:(e,n)=>t.substring(e,n),substrToCursor(e){return this.source.substring(e,this.tokenStart)},cmpChar:(e,n)=>Nu(t,e,n),cmpStr:(e,n,r)=>Du(t,e,n,r),consume(e){let t=this.tokenStart;return this.eat(e),this.substrToCursor(t)},consumeFunctionName(){let e=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),e},consumeNumber(e){let n=t.substring(this.tokenStart,Fu(t,this.tokenStart));return this.eat(e),n},eat(e){if(this.tokenType!==e){let t=zu[e].slice(0,-6).replace(/-/g," ").replace(/^./,(e=>e.toUpperCase())),n=`${/[[\](){}]/.test(t)?`"${t}"`:t} is expected`,r=this.tokenStart;switch(e){case 1:2===this.tokenType||7===this.tokenType?(r=this.tokenEnd-1,n="Identifier is expected but function found"):n="Identifier is expected";break;case 4:this.isDelim(35)&&(this.next(),r++,n="Name is expected");break;case 11:10===this.tokenType&&(r=this.tokenEnd,n="Percent sign is expected")}this.error(n,r)}this.next()},eatIdent(e){(1!==this.tokenType||!1===this.lookupValue(0,e))&&this.error(`Identifier "${e}" is expected`),this.next()},eatDelim(e){this.isDelim(e)||this.error(`Delim "${String.fromCharCode(e)}" is expected`),this.next()},getLocation:(e,t)=>r?a.getLocationRange(e,t,n):null,getLocationFromList(e){if(r){let t=this.getFirstListNode(e),r=this.getLastListNode(e);return a.getLocationRange(null!==t?t.loc.start.offset-a.startOffset:this.tokenStart,null!==r?r.loc.end.offset-a.startOffset:this.tokenStart,n)}return null},error(e,n){let r=typeof n<"u"&&n<t.length?a.getLocation(n):this.eof?a.getLocation(function(e,t){for(;t>=0&&wu(e.charCodeAt(t));t--);return t+1}(t,t.length-1)):a.getLocation(this.tokenStart);throw new jh(e||"Unexpected input",t,r.offset,r.line,r.column)}});return Object.assign((function(e,l){t=e,l=l||{},i.setSource(t,Ju),a.setSource(t,l.offset,l.line,l.column),n=l.filename||"<unknown>",r=Boolean(l.positions),o="function"==typeof l.onParseError?l.onParseError:Uh,s=!1,i.parseAtrulePrelude=!("parseAtrulePrelude"in l)||Boolean(l.parseAtrulePrelude),i.parseRulePrelude=!("parseRulePrelude"in l)||Boolean(l.parseRulePrelude),i.parseValue=!("parseValue"in l)||Boolean(l.parseValue),i.parseCustomProperty="parseCustomProperty"in l&&Boolean(l.parseCustomProperty);let{context:c="default",onComment:u}=l;if(!(c in i.context))throw new Error("Unknown context `"+c+"`");"function"==typeof u&&i.forEachToken(((e,n,r)=>{if(25===e){let e=i.getLocation(n,r),o=Du(t,r-2,r,"*/")?t.slice(n+2,r-2):t.slice(n+2,r);u(o,e)}}));let d=i.context[c].call(i,l);return i.eof||i.error(),d}),{SyntaxError:jh,config:i.config})}({parseContext:{default:"SelectorList",selectorList:"SelectorList",selector:"Selector"},scope:{Selector:{onWhiteSpace:function(e,t){null!==t.last&&"Combinator"!==t.last.type&&null!==e&&"Combinator"!==e.type&&t.push({type:"Combinator",loc:null,name:" "})},getNode:function(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return 16===this.lookupType(1)?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:46===this.charCodeAt(this.tokenStart)&&this.error("Identifier is expected",this.tokenStart+1);break;case 9:switch(this.charCodeAt(this.tokenStart)){case 43:case 62:case 126:case 47:return this.Combinator();case 46:return this.ClassSelector();case 42:case 124:return this.TypeSelector();case 35:return this.IdSelector();case 38:return this.NestingSelector()}}}}},atrule:{},pseudo:Gh,node:qh}),Jh=(e,t)=>e.a===t.a?e.b===t.b?e.c-t.c:e.b-t.b:e.a-t.a,Xh=(e,t)=>0===Jh(e,t),Yh=(e,t)=>Jh(e,t)>0,Zh=(e,t)=>Jh(e,t)<0,Qh=(e,t="ASC")=>{let n=e.sort(Jh);return"DESC"===t?n.reverse():n},em=(...e)=>Qh(e,"ASC"),tm=(...e)=>Qh(e,"DESC"),nm=(...e)=>tm(...e)[0],rm=e=>{let t={a:0,b:0,c:0};return e.children.forEach((e=>{switch(e.type){case"IdSelector":t.a+=1;break;case"AttributeSelector":case"ClassSelector":t.b+=1;break;case"PseudoClassSelector":switch(e.name.toLowerCase()){case"where":break;case"is":case"matches":case"-webkit-any":case"-moz-any":case"any":case"not":case"has":if(e.children){let n=nm(...om(e.children.first));t.a+=n.a,t.b+=n.b,t.c+=n.c}break;case"nth-child":case"nth-last-child":if(t.b+=1,e.children.first.selector){let n=nm(...om(e.children.first.selector));t.a+=n.a,t.b+=n.b,t.c+=n.c}break;case"host-context":case"host":if(t.b+=1,e.children){let n={type:"Selector",children:[]},r=!1;e.children.first.children.forEach((e=>!r&&("Combinator"===e.type?(r=!0,!1):void n.children.push(e))));let o=om(n)[0];t.a+=o.a,t.b+=o.b,t.c+=o.c}break;case"after":case"before":case"first-letter":case"first-line":t.c+=1;break;default:t.b+=1}break;case"PseudoElementSelector":switch(e.name){case"slotted":if(t.c+=1,e.children){let n={type:"Selector",children:[]},r=!1;e.children.first.children.forEach((e=>!r&&("Combinator"===e.type?(r=!0,!1):void n.children.push(e))));let o=om(n)[0];t.a+=o.a,t.b+=o.b,t.c+=o.c}break;case"view-transition-group":case"view-transition-image-pair":case"view-transition-old":case"view-transition-new":if(e.children&&"*"===e.children.first.value)break;t.c+=1;break;default:t.c+=1}break;case"TypeSelector":let n=e.name;n.includes("|")&&(n=n.split("|")[1]),"*"!==n&&(t.c+=1)}})),new sm(t,e)},om=e=>{if(!e)return[];let t=(e=>{if("string"==typeof e||e instanceof String)try{return Kh(e,{context:"selectorList"})}catch(t){throw new TypeError(`Could not convert passed in source '${e}' to SelectorList: ${t.message}`)}if(e instanceof Object){if(e.type&&["Selector","SelectorList"].includes(e.type))return e;if(e.type&&"Raw"===e.type)try{return Kh(e.value,{context:"selectorList"})}catch(e){throw new TypeError(`Could not convert passed in source to SelectorList: ${e.message}`)}throw new TypeError("Passed in source is an Object but no AST / AST of the type Selector or SelectorList")}throw new TypeError("Passed in source is not a String nor an Object. I don't know what to do with it.")})(e);if("Selector"===t.type)return[rm(e)];if("SelectorList"===t.type){let e=[];return t.children.forEach((t=>{let n=rm(t);e.push(n)})),e}},sm=class{constructor(e,t=null){this.value=e,this.selector=t}get a(){return this.value.a}set a(e){throw new Error("Manipulating the port of the specificity directly is not allowed. Instead, directly set a new value")}get b(){return this.value.b}set b(e){throw new Error("Manipulating the port of the specificity directly is not allowed. Instead, directly set a new value")}get c(){return this.value.c}set c(e){throw new Error("Manipulating the port of the specificity directly is not allowed. Instead, directly set a new value")}selectorString(){return"string"==typeof this.selector||this.selector instanceof String?this.selector:this.selector instanceof Object&&"Selector"===this.selector.type?Dh(this.selector):""}toObject(){return this.value}toArray(){return[this.value.a,this.value.b,this.value.c]}toString(){return`(${this.value.a},${this.value.b},${this.value.c})`}toJSON(){return{selector:this.selectorString(),asObject:this.toObject(),asArray:this.toArray(),asString:this.toString()}}isEqualTo(e){return Xh(this,e)}isGreaterThan(e){return Yh(this,e)}isLessThan(e){return Zh(this,e)}static calculate(e){return om(e)}static compare(e,t){return Jh(e,t)}static equals(e,t){return Xh(e,t)}static lessThan(e,t){return Zh(e,t)}static greaterThan(e,t){return Yh(e,t)}static min(...e){return((...e)=>em(...e)[0])(...e)}static max(...e){return nm(...e)}static sortAsc(...e){return em(...e)}static sortDesc(...e){return tm(...e)}};const am=e=>(e=>{const t=new Map,n=e=>{const n=t.get(e);if(l(n))return n;{const n=sm.calculate(e)[0];return t.set(e,n),n}};return F(e,((e,t)=>{const r=n(e.selector),o=n(t.selector);return sm.compare(r,o)}))})((e=>R(e,(e=>(e=>-1!==e.selector.indexOf(","))(e)?(e=>{const t=e.selector.split(/,(?![^(]*\))/g);return A(t,(t=>{const n=t.trim();return{...e,selector:n}}))})(e):[e])))(e)),im=e=>{const t={};return O(e,(r=>{const o=e.getPropertyValue(r);n(o)&&(t[r]=o)})),t},lm=e=>({selector:e.selectorText,styles:im(e.style)}),cm=e=>{const t=e.cssRules;return R(t,(e=>(e=>e.type===window.CSSRule.IMPORT_RULE)(e)&&l(e.styleSheet)?cm(e.styleSheet):(e=>e.type===window.CSSRule.STYLE_RULE)(e)?[lm(e)]:[]))},um=(e,t)=>{const n=_(t,((e,t)=>({...e,...t.styles})),{});return Be(n,((t,n)=>!T(e.dom.style,n)))};const dm=e=>{return t=(e=>{const t=e.dom.styleSheets;return Array.prototype.slice.call(t)})(e),R(t,cm);var t},hm=(e,t,n)=>((e,t,r)=>{var o,s;((e,t)=>{((e,t)=>{const n=[],r=document.createTreeWalker(e.dom,NodeFilter.SHOW_ELEMENT);for(;l(r.nextNode());){const e=Pe.fromDom(r.currentNode),o=L(t,(t=>pt(e,t.selector)));if(o.length>0){const t=um(e,o);An(e,t),n.push(e)}}O(n,(e=>pn(e,"class")))})(t,am(e))})((o=dm(t),s=n,A(o,(e=>{const t=e.selector,n=s.hasOwnProperty(t)?s[t]:t;return{...e,selector:n}}))),r)})(0,e,t),mm={p:"p, li[data-converted-paragraph]"},pm=(e,t)=>{const n=Rt(e,"li[data-converted-paragraph]");if(O(n,(e=>{pn(e,"data-converted-paragraph")})),t){const t=Rt(e,"li");O(t,(t=>{const n=(e=>{const t=(()=>{const t=Pe.fromTag("spn");return Xt(e,t),t})();return{convertToPx:e=>{return In(t,"margin-left",e),n=On(t,"margin-left"),parseFloat(/-?\d+\.?\d*/.exec(n)[0]);var n},destroy:()=>nn(t)}})(e),r=((e,t)=>{const n=hn(e,"data-tab-interval").getOr("36pt");return t.convertToPx(n)})(e,n),o=fm(t,r,n).getOr({});(e=>{pn(e,"data-list-level"),pn(e,"data-text-indent-alt"),pn(e,"data-border-margin"),Nn(e,"margin-left"),Nn(e,"text-indent"),je(_n(e),((t,n)=>{!$(n,"border")||"border-image"!==n&&"none"!==t.trim()&&"initial"!==t.trim()||Nn(e,n)}))})(t),n.destroy(),An(t,o)}));const n=Rt(e,"ol,ul");O(n,(e=>{const t=Rt(e,"li");Ln(e,"margin-top").isNone()&&k.from(t[0]).each((t=>{In(e,"margin-top",On(t,"margin-top"))})),Ln(e,"margin-bottom").isNone()&&k.from(t[t.length-1]).each((t=>{In(e,"margin-bottom",On(t,"margin-bottom"))}))}))}pn(e,"data-tab-interval")},fm=(e,t,n)=>{const r=e=>hn(e,"data-list-level").map((e=>parseInt(e,10))).getOr(1);return Ln(e,"text-indent").bind((o=>Ln(e,"margin-left").map((s=>{const a=Ln(e,"list-style").exists((e=>W(e,"none"))),i=hn(e,"data-border-margin").getOr("0px"),l=a?r(e)+1:r(e),c=n.convertToPx(s)+n.convertToPx(i),u=t*l,d=hn(e,"data-text-indent-alt").getOr(o),h=n.convertToPx(d),m={},p=t/2*-1-h;p>0&&(m["text-indent"]=p+"px");const f=c-u-p;return m["margin-left"]=f>0?f+"px":"0px",m}))))},gm=e=>{const t=(n=Pe.fromDom(document.body),{play:(e,t,r)=>{const o=Pe.fromTag("div"),s=Pe.fromTag("iframe");An(o,{display:"none"});const a=gr(s,"load",(()=>{var n;a.unbind(),eu(s,e);const i=null===(n=s.dom.contentWindow)||void 0===n?void 0:n.document;if(void 0===i)throw new Error("sandbox iframe load event did not fire correctly");const l=Pe.fromDom(i),c=l.dom.body;if(void 0===c)throw new Error("sandbox iframe does not have a body");const u=Pe.fromDom(c),d=t(l,u);nn(o),setTimeout(g(r,d),0)}));Yt(o,s),Yt(n,o)}});var n;return n=>new Promise((r=>{t.play(n,((t,n)=>(((e,t,n)=>{const r=n.mergeInline();r&&(hm(e,t,mm),(e=>{ha(e)})(t)),pm(t,r)})(t,n,{mergeInline:m(e)}),Rn(n))),r)}))},vm=(e,t,n,r)=>{const o=e.html;return n.cleanDocument(o,t,r).then((e=>{if(null==(n=e)||0===n.length)return{response:Cr([],[]),bundle:Er({})};{const n=void 0===r.sanitizer?Vl(r.intraFlag.isMarked):r.sanitizer;return((e,t,n,r)=>{const o=e=>({response:e,bundle:Er({})}),s=r.sanitizeHtml(t,"word");return gm(e)(s).then((e=>{const t=Pn(e),r=e=>o(Cr(t,e)),s=Pe.fromTag("div");en(s,t);const a=L(ft("img[src]",s),(e=>hn(e,"src").exists((e=>$(e,"blob:")||$(e,"data:"))))),i=ft("img[data-image-src]",s);if(0===a.length&&0===i.length)return r([]);if(n)return O(a,(e=>pn(e,"id"))),(e=>Promise.all(A(e,(e=>{const t=e.dom;return ei(t).then((n=>n.toBlob().then((r=>((n,r)=>{const o=$(t.src,"blob:")?t.src:URL.createObjectURL(r),s=an("image"),a=bc.blob(s,n,o);return Sc(a,e)})(n,r)))))}))))(a).then(r);{O(a,nn),O(i,nn);const e=_t(s);return o(Ir(e,[],"errors.local.images.disallowed"))}}))})(t,e,r.allowLocalImages,n)}var n}),(e=>(console.error("PowerPaste error code: WIM01"),{response:Sr("errors.paste.process.failure"),bundle:Er({})})))},ym=it(),bm=e=>{try{const t=e(),n=null!=t&&t.length>0?Pn(t):[];return hr.value(n)}catch(e){return console.error("PowerPaste error code: PT01. Message: ",e),hr.error("errors.paste.process.failure")}},xm=e=>e.fold(Lr,(e=>({response:Cr(e,[]),bundle:Er({})}))),km=(e,t,n,r,o)=>bm((()=>{const s={type:r,merge:n,cleanFilteredInlineElements:o.cleanFilteredInlineElements,indentUseMargin:o.indentUseMargin,preprocessor:{defaultProtocol:o.defaultProtocol,autoLinkUrls:o.autoLinkUrls}};return((e,t,n,r)=>{Ri(n,r.preprocessor);const o=Rn(n),s=((e,t)=>{const n=t.merge,r=((e,t)=>{const n=t.browser.isFirefox(),r=co([(s=n?ss:os,a=!n,ho(((e,t)=>{const n=((e,t,n)=>t(Pe.fromDom(e.getNode())).fold((()=>[e]),(t=>{const r=e.type()===Zr,o=[to(t.dom,r)];return!r&&n&&o.push(to(t.dom,!0)),o})))(t,s,a);e.emitTokens(n)}),d))]),o=n?d:Ks;var s,a;return{annotate:[e.type===as.Word?r:d],local:[o]}})(t,e);return P([r.local,Ia(t),Oa(t),r.annotate,(o=n?[]:t.cleanFilteredInlineElements,[fa,va,ra(o)]),Aa(t),La(t,e),[Ss],[na],[Bs],[zs],Ta(t),[la,ca,Js,ua],[Xs],[Ys],[Zs],[sa],_a(t),[ia],[ea],[ha],Na(t),[oa],[Hs]]);var o})(t,r);return uo(e,o,s)})(e,ym,t,s)})),wm=(e,t)=>{const n=bm((()=>((e,t)=>((e,t)=>uo(e,t,[zs,ua]))(e,Rn(t)))(e,t)));return xm(n)},Sm=(e,t,n,r,o)=>km(e,t,r,n,o).fold(_r,(e=>Promise.resolve({response:Cr(e,[]),bundle:Er({})}))),Cm=e=>"\n"===e||"\r"===e,Tm=(e,t)=>{const n=(e=>{const t=Pe.fromTag("div");return((e,t)=>{e.dom.textContent=t})(t,e),Rn(t)})(e),r=((e,t)=>{const n=((e,t)=>{const n=e.replace(/\t/g,(r=t)<=0?"":new Array(r+1).join(" "));var r;const o=_(n,((e,t)=>(e=>-1!==" \f\t\v".indexOf(e))(t)||"\xa0"===t?e.pcIsSpace||""===e.str||e.str.length===n.length-1||((e,t)=>t<e.length&&t>=0&&Cm(e[t]))(n,e.str.length+1)?{pcIsSpace:!1,str:e.str+"\xa0"}:{pcIsSpace:!0,str:e.str+" "}:{pcIsSpace:Cm(t),str:e.str+t}),{pcIsSpace:!1,str:""});return o.str})(e,t).replace(/^[\r\n]*|[\r\n]*$/g,"").split(/(?:\r?\n){2}/),r=A(n,(e=>e.split(/\n|\r\n/).join("<br />")));return 1===r.length?r[0]:A(r,(e=>"<p>"+e+"</p>")).join("")})(n,t),o=Pn(r);return Cr(o,[])},Im=e=>(t,n)=>((e,t)=>{const n=oc(e).getOrDie("Required text input for Text Handler");return{response:n.text.length>0?Tm(n.text,t):Tr(),bundle:Er({})}})(t,e),Am=e=>(t,n)=>{const r=(t,r)=>{const o=Pe.fromTag("div");en(o,t),Ri(o,e);const s=_t(o);return{response:Cr(s,r),bundle:n.bundle}},o=m(n);return wr(n.response,o,r,o,r)},Om=(e,t,n)=>(r,o)=>{const s=tc(r).getOrDie("Wrong input type for HTML handler").container,a=Ct(t),i=o.bundle;return Xc(i)?wm(a,s):(e(s),((e,t,n,r,o)=>{const s=km(e,t,n,r,o);return xm(s)})(a,s,Gc(i),Yc(i),n))},Em=(e,t,n)=>(r,o)=>{const s=o.bundle;return(e=>({handle:(t,n)=>e.proxyBin.fold((()=>(console.error(t),Promise.resolve({response:Tr(),bundle:Er({})}))),n)}))(s).handle("There was no proxy bin setup. Ensure you have run proxyStep first.",(r=>{const o=Gc(s),a=Yc(s),i=Xc(s),l=Ct(e);return i?((e,t,n,r)=>{const o=as.Html,s=t.findClipboardTags(_t(n)).getOr([]);return O(s,nn),Sm(e,n,o,!0,r)})(l,t,r,n):((e,t,n,r,o)=>Sm(e,t,r,n,o))(l,r,o,a,n)}))},Lm=(e,t)=>(n,r)=>{const o=rc(n).getOrDie("Wrong input type for Word Import handler"),s=qc(r.bundle);return vm(o,s,e,t)},_m=(e,t)=>Nr,Nm=e=>(t,n)=>{const r=Or(n.bundle,Er(e));return{response:n.response,bundle:r}},Dm=(e,t)=>(e=>{const t=e=>({response:Cr([e],[]),bundle:Er({})});return(e=>(e=>{const t=Rt(e,"img");return Promise.all(A(t,ai)).then((()=>e))})(e))(e).then(t).catch((()=>t(e)))})(tc(e).getOrDie("Wrong input type for HTML handler").container);it();var Pm=(e,t,n,r)=>(t,o)=>{const s=o.response;return new Promise(((t,o)=>{const a=e(n);a.events.after.bind((e=>{const n=e.container;yn(n,nr());const o=(c=Rn(n)).indexOf("<o:p>")>=0||c.indexOf("mso-list")>=0||c.indexOf("p.MsoNormal, li.MsoNormal, div.MsoNormal")>=0||c.indexOf("MsoListParagraphCxSpFirst")>=0||c.indexOf("<w:WordDocument>")>=0,a=((e,t)=>{const n=Rt(t,"*[id]");return I(n,(e=>hn(e,"id").exists((e=>$(e,"docs-internal-guid-")))))})(0,n),i=_t(n),l=r.findClipboardTags(i).isSome();var c;t({response:s,bundle:Er({isWord:o,isGoogleDocs:a,isInternal:l,proxyBin:n})})})),a.run()}))};const Rm=xt([{unsupported:["id","message","isEquation","attrs"]},{supported:["id","contentType","blob","isEquation","attrs"]}]),Mm={unsupported:Rm.unsupported,supported:Rm.supported,cata:(e,t,n)=>e.fold(t,n)},jm=(e,t,n)=>t.indexOf(e,n),Fm=(e,t,n,r,o,s,a)=>-1===e||-1===t?k.none():k.some({start:e,end:t,bower:n,regex:r,idRef:o,isEquation:s,attrs:a}),Um=(e,t,n)=>e.substring(t,n),Bm=(e,t)=>{if(-1===t)return t;let n=0;const r=e.length;do{const o=e.indexOf("{",t),s=e.indexOf("}",t);if(s>o&&-1!==o?(t=o+1,++n):(o>s||o<0)&&-1!==s&&(t=s+1,--n),t>r||-1===s)return-1}while(n>0);return t},zm=(e,t,n,r,o)=>{const s=Um(e,n,r),a=((e,t)=>{const n=jm("\\picscalex",e,t),r=jm("\\bliptag",e,n);return n>-1&&n<r?k.from(e.substring(n,r)):k.none()})(e,n);return Fm(n,r,s,/[^a-fA-F0-9]([a-fA-F0-9]+)\}$/,"i",o,a)},Hm=(e,t,n,r,o)=>{const s=Um(e,n,r);return Fm(n,r,s,/([a-fA-F0-9]{64,})(?:\}.*)/,"s",o,k.none())},Wm=(e,t)=>((e,t)=>{const n=jm("{\\pict{",e,t),r=Bm(e,n),o=jm("{\\shp{",e,t),s=Bm(e,o),a=jm("{\\mmathPict{",e,t),i=Bm(e,a),l=-1!==a&&a<n&&i>r,c=g(Hm,e,t,o,s,-1!==a&&a<o&&i>s),u=g(zm,e,t,n,r,l);return-1===n&&-1===o?k.none():-1===n?c():-1===o||o<n&&s>r?u():n<o&&r>s?c():n<o?u():o<n?c():k.none()})(e,t),$m=e=>{let t=[];const n=()=>e.length,r=e=>{const n=(e=>{const t=e.bower,n=e.regex,r=e.isEquation,o=e.attrs;return(e=>{const t=/\\shplid(\d+)/.exec(e);return null!==t?k.some(t[1]):k.none()})(t).map((s=>{const a=e.idRef+s;return(e=>e.indexOf("\\pngblip")>=0?hr.value("image/png"):e.indexOf("\\jpegblip")>=0?hr.value("image/jpeg"):hr.error("errors.imageimport.unsupported"))(t).fold((e=>Mm.unsupported(a,e,r,o)),(e=>((e,t)=>{const n=e.match(t);return n&&n[1]&&n[1].length%2==0?hr.value(n[1]):hr.error("errors.imageimport.invalid")})(t,n).fold((e=>Mm.unsupported(a,e,r,o)),(t=>Mm.supported(a,e,((e,t)=>{if(0===e.length)throw new Error("Zero length content passed to Hex conversion");const n=(e=>{const t=new Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.substr(n,2);t[Math.floor(n/2)]=parseInt(r,16)}return t})(e),r=new Uint8Array(n);return new Blob([r],{type:t})})(t,e),r,o)))))}))})(e);return t=t.concat(n.toArray()),e.end};let o=0;for(;o<e.length;)o=Wm(e,o).fold(n,r);return t},Vm=e=>Mm.cata(e,((e,t,n)=>e),((e,t,n,r,o)=>e)),Gm=e=>Mm.cata(e,((e,t,n)=>n),((e,t,n,r,o)=>r)),qm=e=>Mm.cata(e,((e,t,n)=>hr.error(t)),((e,t,n,r,o)=>hr.value(n))),Km=(e,t)=>{const n=new RegExp("\\\\pic"+t+"(\\-?\\d+)\\\\").exec(e)[1];return parseInt(n,10)},Jm=(e,t,n,r,o)=>{const s=[],a=[];let i=!1;const l=R(e,((e,l)=>{const c=dn(e,"data-image-id");return pn(e,"rtf-data-image"),pn(e,"data-image-id"),pn(e,"data-ms-equation"),o||pn(e,"data-image-src"),"unsupported"===c?(i=!0,cn(e,"alt",n("errors.imageimport.unsupported")),[]):N(t,((e,t)=>r(e,t,c,l))).fold((()=>(console.log("WARNING: unable to find data for image ",e.dom),i=!0,cn(e,"alt",n("errors.imageimport.unsupported")),[])),(t=>qm(t).fold((t=>(i=!0,console.error("PowerPaste error code: RTF04"),cn(e,"alt",n(t)),[])),(n=>{var r;return s.push(e),a.push((r=t,Mm.cata(r,((e,t,n)=>k.none()),((e,t,n,r,o)=>o)))),o&&pn(e,"data-image-src"),[n]}))))}));return{blobs:l,filteredImages:s,imageAttrs:a,failedImage:i}},Xm=(e,t,n,r,o)=>{const s=(e=>_(e,((e,t)=>{const n=Vm(t),r=Gm(t);return D(e,(e=>!(r||Gm(e))&&Vm(e)===n)).fold((()=>e.concat([t])),(n=>qm(e[n]).isValue()?e:e.slice(0,n).concat(e.slice(n+1)).concat([t])))}),[]))(t),{pass:a,fail:i}=E(s,(e=>!Gm(e))),{pass:l,fail:c}=E(e,(e=>!(e=>"true"===dn(e,"data-ms-equation"))(e))),u=Jm(l,a,r,((e,t,n,r)=>Vm(e)===n),o.keepSrc),d=Jm(c,i,r,((e,t,n,r)=>t===r),o.keepSrc),h=u.filteredImages.concat(d.filteredImages),m=u.imageAttrs.concat(d.imageAttrs),p=u.blobs.concat(d.blobs),f=u.failedImage||d.failedImage;wc(p).then((e=>{((e,t)=>e.length===t.length?Promise.all(A(e,((e,n)=>((e,t)=>t.fold((()=>Promise.resolve(e)),(t=>bc.cata(e,((n,r,o)=>r.toCanvas().then((s=>{const a=Pe.fromDom(s),i=hn(a,"width").map((e=>parseInt(e,10))).getOr(1),l=hn(a,"height").map((e=>parseInt(e,10))).getOr(1),c=((e,t,n)=>{const r=g(Km,e),o=r("wgoal"),s=r("hgoal"),a=o/t,i=s/n,l=r("cropl"),c=r("cropt");return{cropl:l/a,cropt:c/i,cropw:(o-l-r("cropr"))/a,croph:(s-c-r("cropb"))/i}})(t,i,l);return i===c.cropw&&l===c.croph&&0===c.cropl&&0===c.cropt?Promise.resolve(e):Ya(r,c.cropl,c.cropt,c.cropw,c.croph).then((e=>e.toBlob().then((t=>{URL.revokeObjectURL(o);const r=URL.createObjectURL(t);return bc.blob(n,e,r)}))))}))),((t,n,r)=>Promise.resolve(e))))))(e,t[n])))):Promise.resolve(e))(e,m).then((e=>{const t=Tc(e,h);n(t,f)}))}))},Ym=e=>Rt(e,"[rtf-data-image]"),Zm=e=>{const t=e.translations,n=mt({insert:ht(["elements","correlated"]),incomplete:ht(["elements","correlated","message"])});return{events:n.registry,processRtf:(e,r,o,s)=>{const a=(e=>{const t=e.replace(/\r/g,"").replace(/\n/g,"");return $m(t)})(o),i=Ym(e);Xm(i,a,((t,o)=>{const s=_t(e),a=t.concat(r);o?(console.error("PowerPaste error code: RTF01"),n.trigger.incomplete(s,a,"errors.imageimport.failed")):n.trigger.insert(s,a)}),t,s)}}};const Qm=e=>{const t=()=>Promise.resolve(e);return bc.cata(e.asset,((n,r,o)=>/(tiff|pdf)$/.test(r.getType())?(e=>(e=>e.toAdjustedBlob("image/png",void 0))(e).then(xc).then(k.some).catch((e=>(console.warn(e),k.none()))))(r).then((t=>t.map((t=>{const n=e.image;return URL.revokeObjectURL(o),Cc(t,n),Sc(t,n)})).getOr(e))):t()),t)};var ep=(e,t)=>{const n=(e,n)=>Promise.all(A(e,Qm)).then((e=>({response:n(e),bundle:t.bundle})));return wr(t.response,_r,((e,t)=>n(t,(t=>Cr(e,t)))),(()=>Promise.resolve(t)),((e,t,r)=>n(t,(t=>(console.error("PowerPaste error code: IMG01"),Ir(e,t,r))))))};const tp=(e,t)=>e.isSupported?t.getWordData():k.none(),np=e=>e.getNative(),rp=e=>e.getImage(),op=e=>e.getHtml(),sp=e=>e.getText(),ap=e=>e.getOnlyText(),ip=e=>e.getGoogleDocsData(),lp=e=>e.getVoid(),cp=(e,t,n,r)=>({label:e,getAvailable:t,steps:n,capture:m(r)}),up=(e,t,n,r)=>({label:e,getAvailable:t,steps:n,capture:m(r)}),dp=(e,t,n,r)=>{return cp(fc.native,op,[(o=t.intraFlag,(e,t)=>{const n=tc(e).getOrDie("Wrong input type for HTML handler"),r=o.findClipboardTags(_t(n.container));r.each((e=>{O(e,nn)}));const s=r.isSome();return{response:t.response,bundle:Er({isInternal:s})}}),Qc(e,t),Om(n,r,t),Dc(t),ep],!0);var o},hp=(e,t,n)=>{return cp(fc.msoffice,g(tp,e),[Nm({isWord:!0}),Zc(t,n),Lm(e,n),(r=n,(e,t)=>new Promise(((n,o)=>{const s=Zm(r),a=e=>n({response:e,bundle:Er({})});s.events.insert.bind((e=>{a(Cr(e.elements,e.correlated))})),s.events.incomplete.bind((e=>{console.error("PowerPaste error code: RTF02"),a(Ir(e.elements,e.correlated,e.message))}));const i=rc(e).getOrDie("Word input required for rtf data"),l=e=>{const n=()=>t,o=(t,n)=>{const o=Pe.fromTag("div");return en(o,t),e.fold((()=>{const e=Ym(o);return e.length>0?(e=>{O(e,nn);const t=_t(o);return console.error("PowerPaste error code: RTF03"),a(Ir(t,n,"errors.imageimport.failed"))})(e):(()=>{const e=_t(o);return a(Cr(e,n))})()}),(e=>{s.processRtf(o,n,e,r)}))};return wr(t.response,n,o,n,o)};((e,t)=>{const n=Re(t);if(n.length!==ji.length)throw new Error("Partial match");B(n,(n=>wn(e.discriminator===n,t[n]))).getOrDie("Must find branch for constructor: "+e.discriminator)(e.data)})(i.rtf,{disabled:()=>{l(k.none())},fromClipboard:e=>{l(!0===r.allowLocalImages?k.some(e.rtf):k.none())}})}))),ep],!0);var r},mp=(e,t,n,r)=>cp(fc.googledocs,ip,[Nm({isGoogleDocs:!0}),Zc(e,t),Dm,Om(n,r,t),Vc,Dc(t),ep],!0),pp=e=>cp(fc.image,rp,[!1===e.allowLocalImages?(e,t)=>_r("errors.local.images.disallowed"):(e,t)=>(e=>{const t=L(e,(e=>"file"===e.kind&&/image/.test(e.type))),n=_(t,((e,t)=>{const n=t.getAsFile();return(e=>null!==e)(n)?e.concat(n):e}),[]);return wc(n).then((e=>{const t=(e=>{const t=[],n=[];return O(e,(e=>bc.cata(e,((r,o,s)=>{const a=Pe.fromTag("img");cn(a,"src",s),t.push(a),n.push(Sc(e,a))}),((e,t,n)=>{console.error("Internal error: Paste operation produced an image URL instead of a Data URI: ",t)})))),Cr(t,n)})(e);return{response:t,bundle:Er({})}}))})(nc(e).getOrDie("Must have image data for images handler").images),ep],!0),fp=e=>{const t=[Im(e.tabSpaces)];return e.autoLinkUrls&&t.push(Am({defaultProtocol:e.defaultProtocol,autoLinkUrls:!0})),cp(fc.plaintext,ap,t,!0)},gp=(e,t,n)=>{const r=[Im(e)];return n&&r.push(Am({defaultProtocol:t,autoLinkUrls:!0})),cp(fc.text,sp,r,!0)};var vp=Object.freeze({__proto__:null,loadScript:(e,t)=>tinymce.Resource.load(e,t)});const yp={"cement.dialog.paste.title":"Paste Formatting Options","cement.dialog.paste.instructions":"Choose to keep or remove formatting in the pasted content.","cement.dialog.paste.merge":"Keep formatting","cement.dialog.paste.clean":"Remove formatting","error.code.images.not.found":"The images service was not found: (","error.imageupload":"Image failed to upload: (","error.full.stop":").","errors.local.images.disallowed":"Local image paste has been disabled. Local images have been removed from pasted content.","errors.imageimport.failed":"Some images failed to import.","errors.imageimport.unsupported":"Unsupported image type.","errors.imageimport.invalid":"Image is invalid."},bp=e=>tinymce.translate((e=>yp[e])(e)),xp=e=>{const t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML},kp="x-tinymce/html",wp=m(kp),Sp="\x3c!-- "+kp+" --\x3e",Cp=e=>-1!==e.indexOf(Sp),Tp=e=>/^https?:\/\/[\w\-\/+=.,!;:&%@^~(){}?#]+$/i.test(e),Ip=e=>{const t=/^<a href="([^"]+)">([^<]+)<\/a>$/.exec(e);return k.from(t).bind((t=>{const n={url:t[1],html:e};return wn(t[1]===t[2],n)}))},Ap=(e,t,n)=>(e=>"extra"in e.undoManager)(e)?(e.undoManager.extra((()=>{Lp(e,t)}),n),k.some(!0)):k.none(),Op=(e,t)=>Ip(t).bind((t=>!1===e.selection.isCollapsed()&&Tp(t.url)?((e,t)=>Ap(e,t.html,(()=>{e.execCommand("mceInsertLink",!1,t.url)})))(e,t):k.none())),Ep=(e,t)=>Ip(t).bind((t=>((e,t)=>{const n=e.toLowerCase();return Tp(n)&&I(t,(e=>V(n,`.${e.toLowerCase()}`)))})(t.url,fe(e))?((e,t)=>Ap(e,t.html,(()=>{e.insertContent('<img src="'+t.url+'">')})))(e,t):k.none())),Lp=(e,t)=>(e.insertContent(t,{merge:ee(e),paste:!0}),k.some(!0)),_p=(e,t)=>e.hasEventListeners(t),Np=(e,t,n,r,o)=>{const s=(e=>e.replace(Sp,""))(t),a=((e,t,n,r,o)=>_p(e,"PastePreProcess")?((e,t,n,r,o)=>{const s=((e,t)=>e.dispatch("PastePreProcess",t))(e,{internal:n,content:t,source:r,mode:o}),a=s.isDefaultPrevented();return a?{cancelled:a}:{cancelled:a,content:s.content}})(e,t,n,r,o):{cancelled:!1,content:t})(e,s,n,r,o);return a.cancelled?a:((e,t,n,r,o)=>_p(e,"PastePostProcess")?((e,t,n,r,o)=>{const s=e.dom.add(e.getBody(),"div",{style:"display:none"},t),a=((e,t)=>e.dispatch("PastePostProcess",t))(e,{internal:n,node:s,source:r,mode:o}),i=a.isDefaultPrevented();if(i)return e.dom.remove(s),{cancelled:i};const l=a.node.innerHTML;return e.dom.remove(s),{cancelled:i,content:l}})(e,t,n,r,o):{content:t,cancelled:!1})(e,a.content,n,r,o)},Dp=(e,t,n,r,o,s)=>{const a=ve(),i=n.replace(/\/$/,"")+"/"+"/js".replace(/^\//,"");const c=(e,t)=>(e.undoManager.transact((()=>{var n;Lp(e,t),n=e.getBody(),O(A(n.getElementsByTagName("*"),Pe.fromDom),(e=>{mn(e,"data-mce-style")&&!mn(e,"style")&&hn(e,"data-mce-style").each((t=>cn(e,"style",t)))}))})),k.some(!0)),u=()=>{a.on((t=>e.selection.moveToBookmark(t))),a.clear()},h=te(e),m={baseUrl:i,cacheSuffix:re(e),officeStyles:ce(e),htmlStyles:de(e),gdocsStyles:ue(e),translations:bp,allowLocalImages:le(e),pasteBinAttrs:{"data-mce-bogus":"all",class:"mce-pastebin"},intraFlag:{isMarked:Cp,findClipboardTags:e=>{const t=L(e,(e=>Te(e)&&W(Ne(e),wp())));return t.length?k.some(t):k.none()}},keepSrc:ie(e),cleanFilteredInlineElements:he(e),indentUseMargin:se(e),sanitizer:o,tabSpaces:h,defaultProtocol:me(e),autoLinkUrls:pe(e)},p=((e,t,n,r,o=xr)=>{const s={...{...tr,sanitizer:Vl(r.intraFlag.isMarked)},...Be(r,l)},a=dt(o,s.baseUrl,s.cacheSuffix),i=Qn(s.pasteBinAttrs),c=[fp(s),hp(a,t,s),mp(t,s,n,e),dp(t,s,n,e),pp(s),gp(s.tabSpaces,s.defaultProtocol,s.autoLinkUrls)],u=((e,t,n,r,o)=>up(fc.fallback,np,[Pm(r,0,o,t.intraFlag),Qc(e,t),Em(o,t.intraFlag,t),Dc(t),ep],!1))(t,s,0,i,e);return vc(c,u,s.sanitizer)})(Pe.fromDom(e.getBody()),(e=>({createDialog:()=>{let t="";const n=ve(),r=(()=>{const e=ge([{text:"Close",name:"close",type:"custom",primary:!0}]),t=ge({});return{setButtons:n=>{const r={},o=A(n,(e=>{const t=e.text;return r[t.toLowerCase()]=e.click,{text:t,name:t.toLowerCase(),type:"custom"}}));t.set(r),e.set(o)},getButtons:e.get,getAction:e=>{const n=t.get();return He(n,e)?k.some(n[e]):k.none()}}})(),o=mt({close:ht([])}),s=()=>{o.trigger.close()};return{events:o.registry,setTitle:e=>t=e,setContent:e=>n.set(e),setButtons:e=>{r.setButtons(e)},show:()=>{n.on((n=>{const o=xp(n.dom),a={title:t,body:{type:"panel",items:[{type:"htmlpanel",html:o}]},initialData:{},buttons:r.getButtons(),onCancel:s,onAction:(e,t)=>{r.getAction(t.name).each(y),e.close()}};e.windowManager.open(a)}))},hide:d,destroy:()=>{n.clear()},reflow:d}}}))(e).createDialog,d,m,vp),f=((e=Gl,t=tr.tabSpaces,n=tr.autoLinkUrls)=>vc([gp(t,tr.defaultProtocol,n)],up(fc.discard,lp,[_m],!0),e))(o,h,pe(e));return O([p,f],(t=>{t.events.cancel.bind((()=>{u()})),t.events.error.bind((t=>{u(),e.notificationManager?e.notificationManager.open({text:bp(t.message),type:"error"}):((e,t)=>{const n={title:"Error",body:{type:"panel",items:[{type:"htmlpanel",html:t}]},initialData:{},buttons:[{text:"OK",type:"cancel",name:"ok",primary:!0}]};e.windowManager.open(n)})(e,bp(t.message))})),t.events.insert.bind((t=>{const n=A(t.elements,(e=>xp(e.dom))).join("");e.focus();const r=()=>{u();const r=Np(e,n,t.isInternal,t.source,t.mode);r.cancelled||(((e,t)=>{((e,t,n)=>{B(n,(n=>n(e,t)))})(e,t,(ne(e)?[Op,Ep]:[]).concat([c]))})(e,r.content),oe(e)&&s.uploadImages(t.assets))};0===t.assets.length?r():s.importImages(t.assets).get(r)})),t.events.block.bind((t=>{e.setProgressState(t.state)}))})),{pasteHtml:e=>p.pasteCustom(((e,t=Gl)=>({getWordData:()=>k.from(e).filter(ac).map((e=>Zl({html:e,rtf:Fi()}))),getGoogleDocsData:()=>k.from(e).filter(ic).map((e=>t.sanitizeHtml(e,"googledocs"))).map(mc),getImage:k.none,getHtml:()=>k.some(mc(t.sanitizeHtml(e))),getText:k.none,getNative:v("There is no native event"),getOnlyText:k.none,getVoid:v("There is no paste event")}))(e,o)),pasteText:e=>f.pasteCustom(((e,t=Gl)=>({getWordData:k.none,getGoogleDocsData:k.none,getImage:k.none,getHtml:k.none,getText:()=>k.some(Ql({text:t.sanitizeText(e)})),getNative:v("There is no native event"),getOnlyText:k.none,getVoid:v("There is no paste event")}))(e,o)),pasteEvent:n=>{(e=>{return(t=e,k.from(t.clipboardData).bind((e=>k.from(e.getData("text/html"))))).bind((e=>(e=>W(e,"<google-sheets-html-origin"))(e)?k.some("googlesheets"):(e=>W(e," data-ccp-props=")&&W(e," paraid=")&&/font-family:.+?_MSFontService(")?[,;]/.test(e))(e)?k.some("mswordonline"):(e=>W(e,"<meta name=ProgId content=Excel.Sheet>")&&!W(e,'="urn:schemas-microsoft-com:office:'))(e)?k.some("msexcelonline"):k.none()));var t})(n).each((t=>{((e,t)=>{e.dispatch("PowerPasteTempStats",{source:t})})(e,t)})),a.isSet()||a.set(e.selection.getBookmark(1)),(t.isText()?f:p).paste(n),t.reset(),n.stopImmediatePropagation()}}},Pp=(e,t)=>{const n=tinymce.html.DomParser({},e.schema).parse(t,{forced_root_block:!1,isRootContent:!0});return tinymce.html.Serializer({validate:!0},e.schema).serialize(n)},Rp=(e,t)=>{e.dom.bind(t,"drop dragstart dragend dragover dragenter dragleave dragdrop draggesture",(e=>{e.preventDefault(),e.stopImmediatePropagation()}))},Mp=e=>{var t,n;return I(null!==(n=null===(t=e.dataTransfer)||void 0===t?void 0:t.items)&&void 0!==n?n:[],(e=>$(e.type,"image/")))},jp=(e,t,n,r)=>{const o=tinymce.dom.RangeUtils;let s;const a=t=>{var n,r;const s=o.getCaretRangeFromPoint(null!==(n=t.clientX)&&void 0!==n?n:0,null!==(r=t.clientY)&&void 0!==r?r:0,e.getDoc());e.focus(),l(s)&&e.selection.setRng(s)};e.on("dragstart dragend",(e=>{s="dragstart"===e.type})),e.on("dragover dragend dragleave",(e=>{s||Mp(e)||(e.preventDefault(),a(e))}));const i=(e,t)=>t in e&&e[t].length>0;e.on("drop",(t=>{if(!s&&!Mp(t)){a(t);const o=(t=>{var n,r,o;const s=null!==(o=null!==(n=t.target.files)&&void 0!==n?n:null===(r=t.dataTransfer)||void 0===r?void 0:r.files)&&void 0!==o?o:[],a=fe(e);return L(s,(e=>$(e.type,"image/")&&I(a,(t=>(e=>{const t=e.toLowerCase(),n={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"};return He(n,t)?"image/"+n[t]:"image/"+t})(t)===e.type))))})(t);if(o.length>0)return(t=>{wc(t).then((t=>{const n=(e=>A(e,(e=>{const t=Pe.fromTag("img"),n=bc.cata(e,r.getLocalURL,((e,t,n)=>t));return cn(t,"src",n),t.dom.outerHTML})).join(""))(t),o=Np(e,n,!1,"imagedrop","auto");o.cancelled||(e.insertContent(o.content,{merge:ee(e)}),oe(e)&&r.uploadImages(t))}))})(o),void t.preventDefault();const s=(e=>{const t={};if(e&&e.types)for(let n=0;n<e.types.length;n++){const r=e.types[n];t[r]=e.getData(r)}return t})(t.dataTransfer);i(s,"text/html")?(n.pasteHtml(s["text/html"]),t.preventDefault()):i(s,"text/plain")&&!(e=>{const t=e["text/plain"];return!!t&&0===t.indexOf("file://")})(s)&&(n.pasteText(s["text/plain"]),t.preventDefault())}}))};tinymce.PluginManager.requireLangPack("powerpaste","ar,bg_BG,ca,cs,da,de,el,es,eu,fa,fi,fr_FR,he_IL,hi,hr,hu_HU,id,it,ja,kk,ko_KR,ms,nb_NO,nl,pl,pt_BR,pt_PT,ro,ru,sk,sl_SI,sv_SE,th_TH,tr,uk,vi,zh_CN,zh_TW"),tinymce.PluginManager.add("powerpaste",((e,t)=>{if(((e,t)=>!!e&&-1===((e,t)=>{const n=J(e.major,t.major);if(0!==n)return n;const r=J(e.minor,t.minor);if(0!==r)return r;const o=J(e.patch,t.patch);return 0!==o?o:0})((e=>Y((e=>[e.majorVersion,e.minorVersion].join(".").split(".").slice(0,3).join("."))(e)))(e),Y(t)))(tinymce,"6.0.0"))return void console.error('The "powerpaste" plugin requires at least version 6.0.0 of TinyMCE.');(e=>{const t=e.options.register,r=e=>{const t=c(e)||(e=>n(e)&&T(["clean","merge","prompt"],e))(e);return t?{value:e,valid:t}:{valid:!1,message:"Must be prompt, clean or merge."}};t("powerpaste_block_drop",{processor:"boolean",default:!1}),t("powerpaste_keep_unsupported_src",{processor:"boolean",default:!1}),t("powerpaste_allow_local_images",{processor:"boolean",default:!0}),t("powerpaste_word_import",{processor:r,default:"prompt"}),t("powerpaste_googledocs_import",{processor:r,default:"prompt"}),t("powerpaste_html_import",{processor:r,default:"clean"}),t("powerpaste_clean_filtered_inline_elements",{processor:"string[]",default:[]}),e.options.isRegistered("link_default_protocol")||t("link_default_protocol",{processor:"string",default:"https"}),t("powerpaste_autolink_urls",{processor:"boolean",default:!0})})(e),(e=>{const t=e.options.set;t("paste_block_drop",!1),t("paste_remove_styles_if_webkit",!1)})(e);const r=(e=>{const t=ge(Q(e)),n=ge(!1);return e.on("keydown",(e=>{(e=>tinymce.util.VK.metaKeyPressed(e)&&86===e.keyCode&&e.shiftKey)(e)&&n.set(!0)})),e.on("PastePlainTextToggle",(e=>{t.set(e.state)})),{reset:()=>{n.set(!1)},isText:()=>n.get()||t.get()}})(e),o=(e=>{const t=(e,t)=>m(e+"."+(e=>{const t=e.toLowerCase(),n={"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png","image/apng":"apng","image/avif":"avif","image/svg+xml":"svg","image/webp":"webp","image/bmp":"bmp","image/tiff":"tiff"};return He(n,t)?n[t]:"dat"})(t)),n=(n,r,o,s)=>ir((a=>{(e=>e.toBlob())(r).then((r=>{e.editorUpload.blobCache.add({id:m(n),name:m(n),filename:t(n,r.type),blob:m(r),base64:m(o.split(",")[1]),blobUri:m(s),uri:m(void 0)}),a(r)}))}));return{importImages:e=>{const t=R(e,(e=>bc.cata(e,((e,t,r)=>{const o=ti(t);return[n(e,t,o,r)]}),m([]))));return lr(t)},uploadImages:()=>{e.uploadImages()},getLocalURL:(e,t,n)=>ti(t)}})(e),s=(e=>{const t=Vl(Cp),n=(e=>({sanitizeHtml:g(Pp,e),sanitizeText:p}))(e);return{sanitizeText:t.sanitizeText,sanitizeHtml:(e,r)=>(Cp(e)?n:t).sanitizeHtml(e,r)}})(e);e.on("PreInit",(()=>{if(e.removed)return;const a=Dp(e,r,t,0,s,o);((e,t)=>{e.addCommand("mceInsertClipboardContent",((e,r)=>{n(r.html)?t.pasteHtml(r.html):n(r.text)&&t.pasteText(r.text)}))})(e,a),((e,t)=>{e.on("paste",(e=>{e.isDefaultPrevented()||(e=>{var t,n;const r=null!==(n=null===(t=e.clipboardData)||void 0===t?void 0:t.items)&&void 0!==n?n:[],o=L(r,(e=>$(e.type,"image/")));return o.length>0&&o.length===r.length})(e)||t.pasteEvent(e)}))})(e,a),ae(e)?(e=>{Rp(e,e.getBody()),e.inline||Rp(e,e.getDoc())})(e):jp(e,0,a,o)}))}))}();
|