argous 1.2.202 → 1.2.204

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (426) hide show
  1. package/dist/components/ConfirmModal/ModalProvider.d.ts +1 -1
  2. package/dist/components/Editor/Events.d.ts +9 -7
  3. package/dist/components/Editor/Events.js +0 -7
  4. package/dist/components/Editor/ScriptLoader2.d.ts +10 -0
  5. package/dist/components/Editor/ScriptLoader2.js +146 -0
  6. package/dist/components/Editor/TinyMCE.d.ts +1 -8
  7. package/dist/components/Editor/TinyMCE.js +2 -10
  8. package/dist/components/Editor/Utils.d.ts +2 -7
  9. package/dist/components/Editor/Utils.js +29 -9
  10. package/dist/components/Editor/components/Editor.d.ts +17 -16
  11. package/dist/components/Editor/components/Editor.js +94 -51
  12. package/dist/components/Editor/components/EditorPropTypes.d.ts +1 -8
  13. package/dist/components/Editor/components/EditorPropTypes.js +19 -9
  14. package/dist/components/Editor/index.d.ts +2 -9
  15. package/dist/components/Editor/index.js +0 -7
  16. package/dist/components/Editor/skins/content/dark/content.d.ts +0 -0
  17. package/dist/components/Editor/skins/content/dark/content.js +3 -0
  18. package/dist/components/Editor/skins/content/default/content.d.ts +0 -0
  19. package/dist/components/Editor/skins/content/default/content.js +3 -0
  20. package/dist/components/Editor/skins/content/document/content.d.ts +0 -0
  21. package/dist/components/Editor/skins/content/document/content.js +3 -0
  22. package/dist/components/Editor/skins/content/tinymce-5/content.d.ts +0 -0
  23. package/dist/components/Editor/skins/content/tinymce-5/content.js +3 -0
  24. package/dist/components/Editor/skins/content/tinymce-5-dark/content.d.ts +0 -0
  25. package/dist/components/Editor/skins/content/tinymce-5-dark/content.js +3 -0
  26. package/dist/components/Editor/skins/content/writer/content.d.ts +0 -0
  27. package/dist/components/Editor/skins/content/writer/content.js +3 -0
  28. package/dist/components/Editor/skins/ui/oxide/content.d.ts +0 -0
  29. package/dist/components/Editor/skins/ui/oxide/content.inline.d.ts +0 -0
  30. package/dist/components/Editor/skins/ui/oxide/content.inline.js +3 -0
  31. package/dist/components/Editor/skins/ui/oxide/content.js +3 -0
  32. package/dist/components/Editor/skins/ui/oxide/skin.d.ts +0 -0
  33. package/dist/components/Editor/skins/ui/oxide/skin.js +3 -0
  34. package/dist/components/Editor/skins/ui/oxide/skin.shadowdom.d.ts +0 -0
  35. package/dist/components/Editor/skins/ui/oxide/skin.shadowdom.js +3 -0
  36. package/dist/components/Editor/skins/ui/oxide-dark/content.d.ts +0 -0
  37. package/dist/components/Editor/skins/ui/oxide-dark/content.inline.d.ts +0 -0
  38. package/dist/components/Editor/skins/ui/oxide-dark/content.inline.js +3 -0
  39. package/dist/components/Editor/skins/ui/oxide-dark/content.js +3 -0
  40. package/dist/components/Editor/skins/ui/oxide-dark/skin.d.ts +0 -0
  41. package/dist/components/Editor/skins/ui/oxide-dark/skin.js +3 -0
  42. package/dist/components/Editor/skins/ui/oxide-dark/skin.shadowdom.d.ts +0 -0
  43. package/dist/components/Editor/skins/ui/oxide-dark/skin.shadowdom.js +3 -0
  44. package/dist/components/Editor/skins/ui/tinymce-5/content.d.ts +0 -0
  45. package/dist/components/Editor/skins/ui/tinymce-5/content.inline.d.ts +0 -0
  46. package/dist/components/Editor/skins/ui/tinymce-5/content.inline.js +3 -0
  47. package/dist/components/Editor/skins/ui/tinymce-5/content.js +3 -0
  48. package/dist/components/Editor/skins/ui/tinymce-5/skin.d.ts +0 -0
  49. package/dist/components/Editor/skins/ui/tinymce-5/skin.js +3 -0
  50. package/dist/components/Editor/skins/ui/tinymce-5/skin.shadowdom.d.ts +0 -0
  51. package/dist/components/Editor/skins/ui/tinymce-5/skin.shadowdom.js +3 -0
  52. package/dist/components/Editor/skins/ui/tinymce-5-dark/content.d.ts +0 -0
  53. package/dist/components/Editor/skins/ui/tinymce-5-dark/content.inline.d.ts +0 -0
  54. package/dist/components/Editor/skins/ui/tinymce-5-dark/content.inline.js +3 -0
  55. package/dist/components/Editor/skins/ui/tinymce-5-dark/content.js +3 -0
  56. package/dist/components/Editor/skins/ui/tinymce-5-dark/skin.d.ts +0 -0
  57. package/dist/components/Editor/skins/ui/tinymce-5-dark/skin.js +3 -0
  58. package/dist/components/Editor/skins/ui/tinymce-5-dark/skin.shadowdom.d.ts +0 -0
  59. package/dist/components/Editor/skins/ui/tinymce-5-dark/skin.shadowdom.js +3 -0
  60. package/dist/components/Editor/tinymce/tinymce.d.ts +1722 -1447
  61. package/lib/components/Editor/Events.ts +9 -8
  62. package/lib/components/Editor/ScriptLoader2.ts +161 -0
  63. package/lib/components/Editor/TinyMCE.ts +2 -12
  64. package/lib/components/Editor/Utils.ts +25 -8
  65. package/lib/components/Editor/components/Editor.tsx +102 -79
  66. package/lib/components/Editor/components/EditorPropTypes.ts +21 -12
  67. package/lib/components/Editor/index.tsx +2 -10
  68. package/lib/components/Editor/skins/content/dark/content.js +2 -0
  69. package/lib/components/Editor/skins/content/dark/content.min.css +1 -8
  70. package/lib/components/Editor/skins/content/default/content.js +2 -0
  71. package/lib/components/Editor/skins/content/default/content.min.css +0 -7
  72. package/lib/components/Editor/skins/content/document/content.js +2 -0
  73. package/lib/components/Editor/skins/content/document/content.min.css +0 -7
  74. package/lib/components/Editor/skins/content/tinymce-5/content.js +2 -0
  75. package/lib/components/Editor/skins/content/tinymce-5/content.min.css +1 -0
  76. package/lib/components/Editor/skins/content/tinymce-5-dark/content.js +2 -0
  77. package/lib/components/Editor/skins/content/tinymce-5-dark/content.min.css +1 -0
  78. package/lib/components/Editor/skins/content/writer/content.js +2 -0
  79. package/lib/components/Editor/skins/content/writer/content.min.css +0 -7
  80. package/lib/components/Editor/skins/ui/oxide/content.inline.js +2 -0
  81. package/lib/components/Editor/skins/ui/oxide/content.inline.min.css +1 -0
  82. package/lib/components/Editor/skins/ui/oxide/content.js +2 -0
  83. package/lib/components/Editor/skins/ui/oxide/content.min.css +1 -0
  84. package/lib/components/Editor/skins/ui/oxide/skin.js +2 -0
  85. package/lib/components/Editor/skins/ui/oxide/skin.min.css +1 -0
  86. package/lib/components/Editor/skins/ui/oxide/skin.shadowdom.js +2 -0
  87. package/lib/components/Editor/skins/ui/oxide/skin.shadowdom.min.css +1 -0
  88. package/lib/components/Editor/skins/ui/oxide-dark/content.inline.js +2 -0
  89. package/lib/components/Editor/skins/ui/oxide-dark/content.inline.min.css +1 -0
  90. package/lib/components/Editor/skins/ui/oxide-dark/content.js +2 -0
  91. package/lib/components/Editor/skins/ui/oxide-dark/content.min.css +1 -0
  92. package/lib/components/Editor/skins/ui/oxide-dark/skin.js +2 -0
  93. package/lib/components/Editor/skins/ui/oxide-dark/skin.min.css +1 -0
  94. package/lib/components/Editor/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
  95. package/lib/components/Editor/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -0
  96. package/lib/components/Editor/skins/ui/tinymce-5/content.inline.js +2 -0
  97. package/lib/components/Editor/skins/ui/tinymce-5/content.inline.min.css +1 -0
  98. package/lib/components/Editor/skins/ui/tinymce-5/content.js +2 -0
  99. package/lib/components/Editor/skins/ui/tinymce-5/content.min.css +1 -0
  100. package/lib/components/Editor/skins/ui/tinymce-5/skin.js +2 -0
  101. package/lib/components/Editor/skins/ui/tinymce-5/skin.min.css +1 -0
  102. package/lib/components/Editor/skins/ui/tinymce-5/skin.shadowdom.js +2 -0
  103. package/lib/components/Editor/skins/ui/tinymce-5/skin.shadowdom.min.css +1 -0
  104. package/lib/components/Editor/skins/ui/tinymce-5-dark/content.inline.js +2 -0
  105. package/lib/components/Editor/skins/ui/tinymce-5-dark/content.inline.min.css +1 -0
  106. package/lib/components/Editor/skins/ui/tinymce-5-dark/content.js +2 -0
  107. package/lib/components/Editor/skins/ui/tinymce-5-dark/content.min.css +1 -0
  108. package/lib/components/Editor/skins/ui/tinymce-5-dark/skin.js +2 -0
  109. package/lib/components/Editor/skins/ui/tinymce-5-dark/skin.min.css +1 -0
  110. package/lib/components/Editor/skins/ui/tinymce-5-dark/skin.shadowdom.js +2 -0
  111. package/lib/components/Editor/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +1 -0
  112. package/lib/components/Editor/tinymce/README.md +24 -14
  113. package/lib/components/Editor/tinymce/icons/default/icons.js +185 -163
  114. package/lib/components/Editor/tinymce/icons/default/icons.min.js +1 -1
  115. package/lib/components/Editor/tinymce/langs/README.md +1 -1
  116. package/lib/components/Editor/tinymce/license.txt +21 -504
  117. package/lib/components/Editor/tinymce/models/dom/model.js +8040 -0
  118. package/lib/components/Editor/tinymce/models/dom/model.min.js +4 -0
  119. package/lib/components/Editor/tinymce/plugins/accordion/plugin.js +1054 -0
  120. package/lib/components/Editor/tinymce/plugins/accordion/plugin.min.js +4 -0
  121. package/lib/components/Editor/tinymce/plugins/advlist/plugin.js +187 -208
  122. package/lib/components/Editor/tinymce/plugins/advlist/plugin.min.js +2 -7
  123. package/lib/components/Editor/tinymce/plugins/anchor/plugin.js +82 -84
  124. package/lib/components/Editor/tinymce/plugins/anchor/plugin.min.js +2 -7
  125. package/lib/components/Editor/tinymce/plugins/autolink/plugin.js +210 -167
  126. package/lib/components/Editor/tinymce/plugins/autolink/plugin.min.js +2 -7
  127. package/lib/components/Editor/tinymce/plugins/autoresize/plugin.js +118 -97
  128. package/lib/components/Editor/tinymce/plugins/autoresize/plugin.min.js +2 -7
  129. package/lib/components/Editor/tinymce/plugins/autosave/plugin.js +129 -108
  130. package/lib/components/Editor/tinymce/plugins/autosave/plugin.min.js +2 -7
  131. package/lib/components/Editor/tinymce/plugins/charmap/plugin.js +285 -333
  132. package/lib/components/Editor/tinymce/plugins/charmap/plugin.min.js +2 -7
  133. package/lib/components/Editor/tinymce/plugins/code/plugin.js +19 -26
  134. package/lib/components/Editor/tinymce/plugins/code/plugin.min.js +2 -7
  135. package/lib/components/Editor/tinymce/plugins/codesample/plugin.js +2225 -2094
  136. package/lib/components/Editor/tinymce/plugins/codesample/plugin.min.js +2 -7
  137. package/lib/components/Editor/tinymce/plugins/directionality/plugin.js +318 -243
  138. package/lib/components/Editor/tinymce/plugins/directionality/plugin.min.js +2 -7
  139. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojiimages.js +1 -9424
  140. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojiimages.min.js +1 -1
  141. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojis.js +1 -9423
  142. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojis.min.js +1 -1
  143. package/lib/components/Editor/tinymce/plugins/emoticons/plugin.js +406 -416
  144. package/lib/components/Editor/tinymce/plugins/emoticons/plugin.min.js +2 -7
  145. package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.js +821 -604
  146. package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.min.js +2 -7
  147. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ar.js +90 -0
  148. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/bg_BG.js +90 -0
  149. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ca.js +90 -0
  150. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/cs.js +90 -0
  151. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/da.js +90 -0
  152. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/de.js +90 -0
  153. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/el.js +90 -0
  154. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/en.js +90 -0
  155. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/es.js +90 -0
  156. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/eu.js +90 -0
  157. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/fa.js +90 -0
  158. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/fi.js +90 -0
  159. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/fr_FR.js +90 -0
  160. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/he_IL.js +90 -0
  161. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/hi.js +90 -0
  162. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/hr.js +90 -0
  163. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/hu_HU.js +90 -0
  164. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/id.js +90 -0
  165. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/it.js +90 -0
  166. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ja.js +90 -0
  167. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/kk.js +90 -0
  168. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ko_KR.js +90 -0
  169. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ms.js +90 -0
  170. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/nb_NO.js +90 -0
  171. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/nl.js +90 -0
  172. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/pl.js +90 -0
  173. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/pt_BR.js +90 -0
  174. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/pt_PT.js +90 -0
  175. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ro.js +90 -0
  176. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ru.js +90 -0
  177. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/sk.js +90 -0
  178. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/sl_SI.js +90 -0
  179. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/sv_SE.js +90 -0
  180. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/th_TH.js +90 -0
  181. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/tr.js +90 -0
  182. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/uk.js +90 -0
  183. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/vi.js +90 -0
  184. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/zh_CN.js +84 -0
  185. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/zh_TW.js +90 -0
  186. package/lib/components/Editor/tinymce/plugins/help/plugin.js +428 -403
  187. package/lib/components/Editor/tinymce/plugins/help/plugin.min.js +2 -7
  188. package/lib/components/Editor/tinymce/plugins/image/plugin.js +887 -1043
  189. package/lib/components/Editor/tinymce/plugins/image/plugin.min.js +2 -7
  190. package/lib/components/Editor/tinymce/plugins/importcss/plugin.js +163 -162
  191. package/lib/components/Editor/tinymce/plugins/importcss/plugin.min.js +2 -7
  192. package/lib/components/Editor/tinymce/plugins/insertdatetime/plugin.js +101 -91
  193. package/lib/components/Editor/tinymce/plugins/insertdatetime/plugin.min.js +2 -7
  194. package/lib/components/Editor/tinymce/plugins/link/plugin.js +739 -784
  195. package/lib/components/Editor/tinymce/plugins/link/plugin.min.js +2 -7
  196. package/lib/components/Editor/tinymce/plugins/lists/plugin.js +1282 -1396
  197. package/lib/components/Editor/tinymce/plugins/lists/plugin.min.js +2 -7
  198. package/lib/components/Editor/tinymce/plugins/media/plugin.js +641 -806
  199. package/lib/components/Editor/tinymce/plugins/media/plugin.min.js +2 -7
  200. package/lib/components/Editor/tinymce/plugins/nonbreaking/plugin.js +76 -54
  201. package/lib/components/Editor/tinymce/plugins/nonbreaking/plugin.min.js +2 -7
  202. package/lib/components/Editor/tinymce/plugins/pagebreak/plugin.js +58 -46
  203. package/lib/components/Editor/tinymce/plugins/pagebreak/plugin.min.js +2 -7
  204. package/lib/components/Editor/tinymce/plugins/preview/plugin.js +39 -69
  205. package/lib/components/Editor/tinymce/plugins/preview/plugin.min.js +2 -7
  206. package/lib/components/Editor/tinymce/plugins/quickbars/plugin.js +307 -349
  207. package/lib/components/Editor/tinymce/plugins/quickbars/plugin.min.js +2 -7
  208. package/lib/components/Editor/tinymce/plugins/save/plugin.js +50 -51
  209. package/lib/components/Editor/tinymce/plugins/save/plugin.min.js +2 -7
  210. package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.js +517 -587
  211. package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.min.js +2 -7
  212. package/lib/components/Editor/tinymce/plugins/table/plugin.js +2666 -10142
  213. package/lib/components/Editor/tinymce/plugins/table/plugin.min.js +2 -7
  214. package/lib/components/Editor/tinymce/plugins/template/plugin.js +403 -413
  215. package/lib/components/Editor/tinymce/plugins/template/plugin.min.js +2 -7
  216. package/lib/components/Editor/tinymce/plugins/visualblocks/plugin.js +42 -48
  217. package/lib/components/Editor/tinymce/plugins/visualblocks/plugin.min.js +2 -7
  218. package/lib/components/Editor/tinymce/plugins/visualchars/plugin.js +352 -333
  219. package/lib/components/Editor/tinymce/plugins/visualchars/plugin.min.js +2 -7
  220. package/lib/components/Editor/tinymce/plugins/wordcount/plugin.js +184 -195
  221. package/lib/components/Editor/tinymce/plugins/wordcount/plugin.min.js +2 -7
  222. package/lib/components/Editor/tinymce/skins/content/dark/content.css +2 -8
  223. package/lib/components/Editor/tinymce/skins/content/dark/content.js +2 -0
  224. package/lib/components/Editor/tinymce/skins/content/dark/content.js.map +1 -0
  225. package/lib/components/Editor/tinymce/skins/content/dark/content.min.css +2 -8
  226. package/lib/components/Editor/tinymce/skins/content/dark/content.min.css.map +1 -1
  227. package/lib/components/Editor/tinymce/skins/content/default/content.css +0 -6
  228. package/lib/components/Editor/tinymce/skins/content/default/content.js +2 -0
  229. package/lib/components/Editor/tinymce/skins/content/default/content.js.map +1 -0
  230. package/lib/components/Editor/tinymce/skins/content/default/content.min.css +1 -7
  231. package/lib/components/Editor/tinymce/skins/content/default/content.min.css.map +1 -1
  232. package/lib/components/Editor/tinymce/skins/content/document/content.css +0 -6
  233. package/lib/components/Editor/tinymce/skins/content/document/content.js +2 -0
  234. package/lib/components/Editor/tinymce/skins/content/document/content.js.map +1 -0
  235. package/lib/components/Editor/tinymce/skins/content/document/content.min.css +0 -6
  236. package/lib/components/Editor/tinymce/skins/content/document/content.min.css.map +1 -1
  237. package/lib/components/Editor/{skins/content/default → tinymce/skins/content/tinymce-5}/content.css +0 -6
  238. package/lib/components/Editor/tinymce/skins/content/tinymce-5/content.js +2 -0
  239. package/lib/components/Editor/tinymce/skins/content/tinymce-5/content.js.map +1 -0
  240. package/lib/components/Editor/tinymce/skins/content/tinymce-5/content.min.css +2 -0
  241. package/lib/components/Editor/tinymce/skins/content/tinymce-5/content.min.css.map +1 -0
  242. package/lib/components/Editor/{skins/content/dark → tinymce/skins/content/tinymce-5-dark}/content.css +1 -7
  243. package/lib/components/Editor/tinymce/skins/content/tinymce-5-dark/content.js +2 -0
  244. package/lib/components/Editor/tinymce/skins/content/tinymce-5-dark/content.js.map +1 -0
  245. package/lib/components/Editor/tinymce/skins/content/tinymce-5-dark/content.min.css +2 -0
  246. package/lib/components/Editor/tinymce/skins/content/tinymce-5-dark/content.min.css.map +1 -0
  247. package/lib/components/Editor/tinymce/skins/content/writer/content.css +0 -6
  248. package/lib/components/Editor/tinymce/skins/content/writer/content.js +2 -0
  249. package/lib/components/Editor/tinymce/skins/content/writer/content.js.map +1 -0
  250. package/lib/components/Editor/tinymce/skins/content/writer/content.min.css +0 -6
  251. package/lib/components/Editor/tinymce/skins/content/writer/content.min.css.map +1 -1
  252. package/lib/components/Editor/tinymce/skins/ui/oxide/content.css +74 -21
  253. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.css +74 -21
  254. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.js +2 -0
  255. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.js.map +1 -0
  256. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.min.css +1 -7
  257. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.min.css.map +1 -1
  258. package/lib/components/Editor/tinymce/skins/ui/oxide/content.js +2 -0
  259. package/lib/components/Editor/tinymce/skins/ui/oxide/content.js.map +1 -0
  260. package/lib/components/Editor/tinymce/skins/ui/oxide/content.min.css +1 -7
  261. package/lib/components/Editor/tinymce/skins/ui/oxide/content.min.css.map +1 -1
  262. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.css +1131 -402
  263. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.js +2 -0
  264. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.js.map +1 -0
  265. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.min.css +1 -7
  266. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.min.css.map +1 -1
  267. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.css +8 -15
  268. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.js +2 -0
  269. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.js.map +1 -0
  270. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -7
  271. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css.map +1 -1
  272. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.css +72 -20
  273. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.css +74 -21
  274. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.js +2 -0
  275. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.js.map +1 -0
  276. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -7
  277. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.min.css.map +1 -1
  278. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.js +2 -0
  279. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.js.map +1 -0
  280. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.min.css +1 -7
  281. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.min.css.map +1 -1
  282. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.css +1155 -423
  283. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.js +2 -0
  284. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.js.map +1 -0
  285. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.min.css +1 -7
  286. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.min.css.map +1 -1
  287. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +8 -15
  288. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
  289. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.js.map +1 -0
  290. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -7
  291. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css.map +1 -1
  292. package/lib/components/Editor/{skins/ui/default → tinymce/skins/ui/tinymce-5}/content.css +75 -22
  293. package/lib/components/Editor/{skins/ui/default → tinymce/skins/ui/tinymce-5}/content.inline.css +75 -22
  294. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.inline.js +2 -0
  295. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.inline.js.map +1 -0
  296. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.inline.min.css +2 -0
  297. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.inline.min.css.map +1 -0
  298. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.js +2 -0
  299. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.js.map +1 -0
  300. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.min.css +2 -0
  301. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.min.css.map +1 -0
  302. package/lib/components/Editor/{skins/ui/default → tinymce/skins/ui/tinymce-5}/skin.css +1261 -438
  303. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.js +2 -0
  304. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.js.map +1 -0
  305. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.min.css +2 -0
  306. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.min.css.map +1 -0
  307. package/lib/components/Editor/{skins/ui/default → tinymce/skins/ui/tinymce-5}/skin.shadowdom.css +8 -15
  308. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +2 -0
  309. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.js.map +1 -0
  310. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +2 -0
  311. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css.map +1 -0
  312. package/lib/components/Editor/{skins/ui/dark → tinymce/skins/ui/tinymce-5-dark}/content.css +73 -21
  313. package/lib/components/Editor/{skins/ui/dark → tinymce/skins/ui/tinymce-5-dark}/content.inline.css +75 -22
  314. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.inline.js +2 -0
  315. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.inline.js.map +1 -0
  316. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +2 -0
  317. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css.map +1 -0
  318. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.js +2 -0
  319. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.js.map +1 -0
  320. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.min.css +2 -0
  321. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.min.css.map +1 -0
  322. package/lib/components/Editor/{skins/ui/dark → tinymce/skins/ui/tinymce-5-dark}/skin.css +1244 -421
  323. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.js +2 -0
  324. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.js.map +1 -0
  325. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.min.css +2 -0
  326. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.min.css.map +1 -0
  327. package/lib/components/Editor/{skins/ui/dark → tinymce/skins/ui/tinymce-5-dark}/skin.shadowdom.css +8 -15
  328. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +2 -0
  329. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js.map +1 -0
  330. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +2 -0
  331. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css.map +1 -0
  332. package/lib/components/Editor/tinymce/themes/silver/theme.js +23228 -24955
  333. package/lib/components/Editor/tinymce/themes/silver/theme.min.js +2 -7
  334. package/lib/components/Editor/tinymce/tinymce.d.ts +1722 -1447
  335. package/lib/components/Editor/tinymce/tinymce.js +23668 -22018
  336. package/lib/components/Editor/tinymce/tinymce.min.js +2 -30104
  337. package/package.json +1 -1
  338. package/lib/components/Editor/ScriptLoader.ts +0 -96
  339. package/lib/components/Editor/skins/content/dark/content.min.css.map +0 -1
  340. package/lib/components/Editor/skins/content/default/content.min.css.map +0 -1
  341. package/lib/components/Editor/skins/content/document/content.css +0 -72
  342. package/lib/components/Editor/skins/content/document/content.min.css.map +0 -1
  343. package/lib/components/Editor/skins/content/writer/content.css +0 -68
  344. package/lib/components/Editor/skins/content/writer/content.min.css.map +0 -1
  345. package/lib/components/Editor/skins/ui/dark/content.inline.min.css +0 -8
  346. package/lib/components/Editor/skins/ui/dark/content.inline.min.css.map +0 -1
  347. package/lib/components/Editor/skins/ui/dark/content.min.css +0 -8
  348. package/lib/components/Editor/skins/ui/dark/content.min.css.map +0 -1
  349. package/lib/components/Editor/skins/ui/dark/content.mobile.css +0 -29
  350. package/lib/components/Editor/skins/ui/dark/content.mobile.min.css +0 -8
  351. package/lib/components/Editor/skins/ui/dark/content.mobile.min.css.map +0 -1
  352. package/lib/components/Editor/skins/ui/dark/fonts/tinymce-mobile.woff +0 -0
  353. package/lib/components/Editor/skins/ui/dark/skin.min.css +0 -8
  354. package/lib/components/Editor/skins/ui/dark/skin.min.css.map +0 -1
  355. package/lib/components/Editor/skins/ui/dark/skin.mobile.css +0 -673
  356. package/lib/components/Editor/skins/ui/dark/skin.mobile.min.css +0 -8
  357. package/lib/components/Editor/skins/ui/dark/skin.mobile.min.css.map +0 -1
  358. package/lib/components/Editor/skins/ui/dark/skin.shadowdom.min.css +0 -8
  359. package/lib/components/Editor/skins/ui/dark/skin.shadowdom.min.css.map +0 -1
  360. package/lib/components/Editor/skins/ui/default/content.inline.min.css +0 -8
  361. package/lib/components/Editor/skins/ui/default/content.inline.min.css.map +0 -1
  362. package/lib/components/Editor/skins/ui/default/content.min.css +0 -8
  363. package/lib/components/Editor/skins/ui/default/content.min.css.map +0 -1
  364. package/lib/components/Editor/skins/ui/default/content.mobile.css +0 -29
  365. package/lib/components/Editor/skins/ui/default/content.mobile.min.css +0 -8
  366. package/lib/components/Editor/skins/ui/default/content.mobile.min.css.map +0 -1
  367. package/lib/components/Editor/skins/ui/default/fonts/tinymce-mobile.woff +0 -0
  368. package/lib/components/Editor/skins/ui/default/skin.min.css +0 -8
  369. package/lib/components/Editor/skins/ui/default/skin.min.css.map +0 -1
  370. package/lib/components/Editor/skins/ui/default/skin.mobile.css +0 -673
  371. package/lib/components/Editor/skins/ui/default/skin.mobile.min.css +0 -8
  372. package/lib/components/Editor/skins/ui/default/skin.mobile.min.css.map +0 -1
  373. package/lib/components/Editor/skins/ui/default/skin.shadowdom.min.css +0 -8
  374. package/lib/components/Editor/skins/ui/default/skin.shadowdom.min.css.map +0 -1
  375. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/fonts/tinymce-mobile.woff +0 -0
  376. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.css +0 -1641
  377. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.min.css +0 -8
  378. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.min.css.map +0 -1
  379. package/lib/components/Editor/tinymce/jquery.tinymce.min.js +0 -92
  380. package/lib/components/Editor/tinymce/langs/pt_BR.js +0 -419
  381. package/lib/components/Editor/tinymce/plugins/bbcode/plugin.js +0 -99
  382. package/lib/components/Editor/tinymce/plugins/bbcode/plugin.min.js +0 -9
  383. package/lib/components/Editor/tinymce/plugins/colorpicker/plugin.js +0 -22
  384. package/lib/components/Editor/tinymce/plugins/colorpicker/plugin.min.js +0 -9
  385. package/lib/components/Editor/tinymce/plugins/contextmenu/plugin.js +0 -22
  386. package/lib/components/Editor/tinymce/plugins/contextmenu/plugin.min.js +0 -9
  387. package/lib/components/Editor/tinymce/plugins/fullpage/plugin.js +0 -544
  388. package/lib/components/Editor/tinymce/plugins/fullpage/plugin.min.js +0 -9
  389. package/lib/components/Editor/tinymce/plugins/hr/plugin.js +0 -46
  390. package/lib/components/Editor/tinymce/plugins/hr/plugin.min.js +0 -9
  391. package/lib/components/Editor/tinymce/plugins/imagetools/plugin.js +0 -1354
  392. package/lib/components/Editor/tinymce/plugins/imagetools/plugin.min.js +0 -9
  393. package/lib/components/Editor/tinymce/plugins/legacyoutput/plugin.js +0 -199
  394. package/lib/components/Editor/tinymce/plugins/legacyoutput/plugin.min.js +0 -9
  395. package/lib/components/Editor/tinymce/plugins/noneditable/plugin.js +0 -117
  396. package/lib/components/Editor/tinymce/plugins/noneditable/plugin.min.js +0 -9
  397. package/lib/components/Editor/tinymce/plugins/paste/plugin.js +0 -1764
  398. package/lib/components/Editor/tinymce/plugins/paste/plugin.min.js +0 -9
  399. package/lib/components/Editor/tinymce/plugins/print/plugin.js +0 -53
  400. package/lib/components/Editor/tinymce/plugins/print/plugin.min.js +0 -9
  401. package/lib/components/Editor/tinymce/plugins/spellchecker/plugin.js +0 -731
  402. package/lib/components/Editor/tinymce/plugins/spellchecker/plugin.min.js +0 -9
  403. package/lib/components/Editor/tinymce/plugins/tabfocus/plugin.js +0 -129
  404. package/lib/components/Editor/tinymce/plugins/tabfocus/plugin.min.js +0 -9
  405. package/lib/components/Editor/tinymce/plugins/textcolor/plugin.js +0 -22
  406. package/lib/components/Editor/tinymce/plugins/textcolor/plugin.min.js +0 -9
  407. package/lib/components/Editor/tinymce/plugins/textpattern/plugin.js +0 -1394
  408. package/lib/components/Editor/tinymce/plugins/textpattern/plugin.min.js +0 -9
  409. package/lib/components/Editor/tinymce/plugins/toc/plugin.js +0 -236
  410. package/lib/components/Editor/tinymce/plugins/toc/plugin.min.js +0 -9
  411. package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.css +0 -29
  412. package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.min.css +0 -8
  413. package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.min.css.map +0 -1
  414. package/lib/components/Editor/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
  415. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.css +0 -673
  416. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.min.css +0 -8
  417. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.min.css.map +0 -1
  418. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.css +0 -29
  419. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.min.css +0 -8
  420. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.min.css.map +0 -1
  421. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
  422. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.css +0 -673
  423. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.min.css +0 -8
  424. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.min.css.map +0 -1
  425. package/lib/components/Editor/tinymce/themes/mobile/theme.js +0 -13587
  426. package/lib/components/Editor/tinymce/themes/mobile/theme.min.js +0 -9
@@ -1,294 +1,271 @@
1
1
  /**
2
- * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
- * Licensed under the LGPL or a commercial license.
4
- * For LGPL see License.txt in the project root for license information.
5
- * For commercial licenses see https://www.tiny.cloud/
6
- *
7
- * Version: 5.9.0 (TBD)
2
+ * TinyMCE version 6.8.2 (2023-12-11)
8
3
  */
4
+
9
5
  (function () {
10
6
  'use strict';
11
7
 
12
- var Cell = function (initial) {
13
- var value = initial;
14
- var get = function () {
8
+ const Cell = initial => {
9
+ let value = initial;
10
+ const get = () => {
15
11
  return value;
16
12
  };
17
- var set = function (v) {
13
+ const set = v => {
18
14
  value = v;
19
15
  };
20
16
  return {
21
- get: get,
22
- set: set
17
+ get,
18
+ set
23
19
  };
24
20
  };
25
21
 
26
- var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
22
+ var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager');
27
23
 
28
- var get = function (fullscreenState) {
29
- return {
30
- isFullscreen: function () {
31
- return fullscreenState.get() !== null;
32
- }
33
- };
34
- };
24
+ const get$5 = fullscreenState => ({ isFullscreen: () => fullscreenState.get() !== null });
35
25
 
36
- var typeOf = function (x) {
37
- var t = typeof x;
26
+ const hasProto = (v, constructor, predicate) => {
27
+ var _a;
28
+ if (predicate(v, constructor.prototype)) {
29
+ return true;
30
+ } else {
31
+ return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
32
+ }
33
+ };
34
+ const typeOf = x => {
35
+ const t = typeof x;
38
36
  if (x === null) {
39
37
  return 'null';
40
- } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
38
+ } else if (t === 'object' && Array.isArray(x)) {
41
39
  return 'array';
42
- } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
40
+ } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
43
41
  return 'string';
44
42
  } else {
45
43
  return t;
46
44
  }
47
45
  };
48
- var isType = function (type) {
49
- return function (value) {
50
- return typeOf(value) === type;
51
- };
52
- };
53
- var isSimpleType = function (type) {
54
- return function (value) {
55
- return typeof value === type;
56
- };
57
- };
58
- var isString = isType('string');
59
- var isArray = isType('array');
60
- var isBoolean = isSimpleType('boolean');
61
- var isNullable = function (a) {
62
- return a === null || a === undefined;
63
- };
64
- var isNonNullable = function (a) {
65
- return !isNullable(a);
66
- };
67
- var isFunction = isSimpleType('function');
68
- var isNumber = isSimpleType('number');
46
+ const isType$1 = type => value => typeOf(value) === type;
47
+ const isSimpleType = type => value => typeof value === type;
48
+ const eq$1 = t => a => t === a;
49
+ const isString = isType$1('string');
50
+ const isArray = isType$1('array');
51
+ const isNull = eq$1(null);
52
+ const isBoolean = isSimpleType('boolean');
53
+ const isUndefined = eq$1(undefined);
54
+ const isNullable = a => a === null || a === undefined;
55
+ const isNonNullable = a => !isNullable(a);
56
+ const isFunction = isSimpleType('function');
57
+ const isNumber = isSimpleType('number');
69
58
 
70
- var noop = function () {
59
+ const noop = () => {
71
60
  };
72
- var compose = function (fa, fb) {
73
- return function () {
74
- var args = [];
75
- for (var _i = 0; _i < arguments.length; _i++) {
76
- args[_i] = arguments[_i];
77
- }
61
+ const compose = (fa, fb) => {
62
+ return (...args) => {
78
63
  return fa(fb.apply(null, args));
79
64
  };
80
65
  };
81
- var compose1 = function (fbc, fab) {
82
- return function (a) {
83
- return fbc(fab(a));
84
- };
85
- };
86
- var constant = function (value) {
87
- return function () {
66
+ const compose1 = (fbc, fab) => a => fbc(fab(a));
67
+ const constant = value => {
68
+ return () => {
88
69
  return value;
89
70
  };
90
71
  };
91
- function curry(fn) {
92
- var initialArgs = [];
93
- for (var _i = 1; _i < arguments.length; _i++) {
94
- initialArgs[_i - 1] = arguments[_i];
95
- }
96
- return function () {
97
- var restArgs = [];
98
- for (var _i = 0; _i < arguments.length; _i++) {
99
- restArgs[_i] = arguments[_i];
100
- }
101
- var all = initialArgs.concat(restArgs);
72
+ function curry(fn, ...initialArgs) {
73
+ return (...restArgs) => {
74
+ const all = initialArgs.concat(restArgs);
102
75
  return fn.apply(null, all);
103
76
  };
104
77
  }
105
- var never = constant(false);
106
- var always = constant(true);
78
+ const never = constant(false);
79
+ const always = constant(true);
107
80
 
108
- var none = function () {
109
- return NONE;
110
- };
111
- var NONE = function () {
112
- var eq = function (o) {
113
- return o.isNone();
114
- };
115
- var call = function (thunk) {
116
- return thunk();
117
- };
118
- var id = function (n) {
119
- return n;
120
- };
121
- var me = {
122
- fold: function (n, _s) {
123
- return n();
124
- },
125
- is: never,
126
- isSome: never,
127
- isNone: always,
128
- getOr: id,
129
- getOrThunk: call,
130
- getOrDie: function (msg) {
131
- throw new Error(msg || 'error: getOrDie called on none.');
132
- },
133
- getOrNull: constant(null),
134
- getOrUndefined: constant(undefined),
135
- or: id,
136
- orThunk: call,
137
- map: none,
138
- each: noop,
139
- bind: none,
140
- exists: never,
141
- forall: always,
142
- filter: none,
143
- equals: eq,
144
- equals_: eq,
145
- toArray: function () {
146
- return [];
147
- },
148
- toString: constant('none()')
149
- };
150
- return me;
151
- }();
152
- var some = function (a) {
153
- var constant_a = constant(a);
154
- var self = function () {
155
- return me;
156
- };
157
- var bind = function (f) {
158
- return f(a);
159
- };
160
- var me = {
161
- fold: function (n, s) {
162
- return s(a);
163
- },
164
- is: function (v) {
165
- return a === v;
166
- },
167
- isSome: always,
168
- isNone: never,
169
- getOr: constant_a,
170
- getOrThunk: constant_a,
171
- getOrDie: constant_a,
172
- getOrNull: constant_a,
173
- getOrUndefined: constant_a,
174
- or: self,
175
- orThunk: self,
176
- map: function (f) {
177
- return some(f(a));
178
- },
179
- each: function (f) {
180
- f(a);
181
- },
182
- bind: bind,
183
- exists: bind,
184
- forall: bind,
185
- filter: function (f) {
186
- return f(a) ? me : NONE;
187
- },
188
- toArray: function () {
189
- return [a];
190
- },
191
- toString: function () {
192
- return 'some(' + a + ')';
193
- },
194
- equals: function (o) {
195
- return o.is(a);
196
- },
197
- equals_: function (o, elementEq) {
198
- return o.fold(never, function (b) {
199
- return elementEq(a, b);
200
- });
81
+ class Optional {
82
+ constructor(tag, value) {
83
+ this.tag = tag;
84
+ this.value = value;
85
+ }
86
+ static some(value) {
87
+ return new Optional(true, value);
88
+ }
89
+ static none() {
90
+ return Optional.singletonNone;
91
+ }
92
+ fold(onNone, onSome) {
93
+ if (this.tag) {
94
+ return onSome(this.value);
95
+ } else {
96
+ return onNone();
201
97
  }
202
- };
203
- return me;
204
- };
205
- var from = function (value) {
206
- return value === null || value === undefined ? NONE : some(value);
207
- };
208
- var Optional = {
209
- some: some,
210
- none: none,
211
- from: from
212
- };
98
+ }
99
+ isSome() {
100
+ return this.tag;
101
+ }
102
+ isNone() {
103
+ return !this.tag;
104
+ }
105
+ map(mapper) {
106
+ if (this.tag) {
107
+ return Optional.some(mapper(this.value));
108
+ } else {
109
+ return Optional.none();
110
+ }
111
+ }
112
+ bind(binder) {
113
+ if (this.tag) {
114
+ return binder(this.value);
115
+ } else {
116
+ return Optional.none();
117
+ }
118
+ }
119
+ exists(predicate) {
120
+ return this.tag && predicate(this.value);
121
+ }
122
+ forall(predicate) {
123
+ return !this.tag || predicate(this.value);
124
+ }
125
+ filter(predicate) {
126
+ if (!this.tag || predicate(this.value)) {
127
+ return this;
128
+ } else {
129
+ return Optional.none();
130
+ }
131
+ }
132
+ getOr(replacement) {
133
+ return this.tag ? this.value : replacement;
134
+ }
135
+ or(replacement) {
136
+ return this.tag ? this : replacement;
137
+ }
138
+ getOrThunk(thunk) {
139
+ return this.tag ? this.value : thunk();
140
+ }
141
+ orThunk(thunk) {
142
+ return this.tag ? this : thunk();
143
+ }
144
+ getOrDie(message) {
145
+ if (!this.tag) {
146
+ throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
147
+ } else {
148
+ return this.value;
149
+ }
150
+ }
151
+ static from(value) {
152
+ return isNonNullable(value) ? Optional.some(value) : Optional.none();
153
+ }
154
+ getOrNull() {
155
+ return this.tag ? this.value : null;
156
+ }
157
+ getOrUndefined() {
158
+ return this.value;
159
+ }
160
+ each(worker) {
161
+ if (this.tag) {
162
+ worker(this.value);
163
+ }
164
+ }
165
+ toArray() {
166
+ return this.tag ? [this.value] : [];
167
+ }
168
+ toString() {
169
+ return this.tag ? `some(${ this.value })` : 'none()';
170
+ }
171
+ }
172
+ Optional.singletonNone = new Optional(false);
213
173
 
214
- var revocable = function (doRevoke) {
215
- var subject = Cell(Optional.none());
216
- var revoke = function () {
217
- return subject.get().each(doRevoke);
218
- };
219
- var clear = function () {
174
+ const singleton = doRevoke => {
175
+ const subject = Cell(Optional.none());
176
+ const revoke = () => subject.get().each(doRevoke);
177
+ const clear = () => {
220
178
  revoke();
221
179
  subject.set(Optional.none());
222
180
  };
223
- var isSet = function () {
224
- return subject.get().isSome();
225
- };
226
- var set = function (s) {
181
+ const isSet = () => subject.get().isSome();
182
+ const get = () => subject.get();
183
+ const set = s => {
227
184
  revoke();
228
185
  subject.set(Optional.some(s));
229
186
  };
230
187
  return {
231
- clear: clear,
232
- isSet: isSet,
233
- set: set
188
+ clear,
189
+ isSet,
190
+ get,
191
+ set
234
192
  };
235
193
  };
236
- var unbindable = function () {
237
- return revocable(function (s) {
238
- return s.unbind();
239
- });
240
- };
241
- var value = function () {
242
- var subject = Cell(Optional.none());
243
- var clear = function () {
244
- return subject.set(Optional.none());
245
- };
246
- var set = function (s) {
247
- return subject.set(Optional.some(s));
194
+ const unbindable = () => singleton(s => s.unbind());
195
+ const value = () => {
196
+ const subject = singleton(noop);
197
+ const on = f => subject.get().each(f);
198
+ return {
199
+ ...subject,
200
+ on
248
201
  };
249
- var isSet = function () {
250
- return subject.get().isSome();
202
+ };
203
+
204
+ const first = (fn, rate) => {
205
+ let timer = null;
206
+ const cancel = () => {
207
+ if (!isNull(timer)) {
208
+ clearTimeout(timer);
209
+ timer = null;
210
+ }
251
211
  };
252
- var on = function (f) {
253
- return subject.get().each(f);
212
+ const throttle = (...args) => {
213
+ if (isNull(timer)) {
214
+ timer = setTimeout(() => {
215
+ timer = null;
216
+ fn.apply(null, args);
217
+ }, rate);
218
+ }
254
219
  };
255
220
  return {
256
- clear: clear,
257
- set: set,
258
- isSet: isSet,
259
- on: on
221
+ cancel,
222
+ throttle
260
223
  };
261
224
  };
262
225
 
263
- var nativePush = Array.prototype.push;
264
- var map = function (xs, f) {
265
- var len = xs.length;
266
- var r = new Array(len);
267
- for (var i = 0; i < len; i++) {
268
- var x = xs[i];
226
+ const nativePush = Array.prototype.push;
227
+ const map = (xs, f) => {
228
+ const len = xs.length;
229
+ const r = new Array(len);
230
+ for (let i = 0; i < len; i++) {
231
+ const x = xs[i];
269
232
  r[i] = f(x, i);
270
233
  }
271
234
  return r;
272
235
  };
273
- var each = function (xs, f) {
274
- for (var i = 0, len = xs.length; i < len; i++) {
275
- var x = xs[i];
236
+ const each$1 = (xs, f) => {
237
+ for (let i = 0, len = xs.length; i < len; i++) {
238
+ const x = xs[i];
276
239
  f(x, i);
277
240
  }
278
241
  };
279
- var filter = function (xs, pred) {
280
- var r = [];
281
- for (var i = 0, len = xs.length; i < len; i++) {
282
- var x = xs[i];
242
+ const filter$1 = (xs, pred) => {
243
+ const r = [];
244
+ for (let i = 0, len = xs.length; i < len; i++) {
245
+ const x = xs[i];
283
246
  if (pred(x, i)) {
284
247
  r.push(x);
285
248
  }
286
249
  }
287
250
  return r;
288
251
  };
289
- var flatten = function (xs) {
290
- var r = [];
291
- for (var i = 0, len = xs.length; i < len; ++i) {
252
+ const findUntil = (xs, pred, until) => {
253
+ for (let i = 0, len = xs.length; i < len; i++) {
254
+ const x = xs[i];
255
+ if (pred(x, i)) {
256
+ return Optional.some(x);
257
+ } else if (until(x, i)) {
258
+ break;
259
+ }
260
+ }
261
+ return Optional.none();
262
+ };
263
+ const find$1 = (xs, pred) => {
264
+ return findUntil(xs, pred, never);
265
+ };
266
+ const flatten = xs => {
267
+ const r = [];
268
+ for (let i = 0, len = xs.length; i < len; ++i) {
292
269
  if (!isArray(xs[i])) {
293
270
  throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
294
271
  }
@@ -296,93 +273,96 @@
296
273
  }
297
274
  return r;
298
275
  };
299
- var bind = function (xs, f) {
300
- return flatten(map(xs, f));
301
- };
302
- var get$1 = function (xs, i) {
303
- return i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none();
304
- };
305
- var head = function (xs) {
306
- return get$1(xs, 0);
276
+ const bind$3 = (xs, f) => flatten(map(xs, f));
277
+ const get$4 = (xs, i) => i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none();
278
+ const head = xs => get$4(xs, 0);
279
+ const findMap = (arr, f) => {
280
+ for (let i = 0; i < arr.length; i++) {
281
+ const r = f(arr[i], i);
282
+ if (r.isSome()) {
283
+ return r;
284
+ }
285
+ }
286
+ return Optional.none();
307
287
  };
308
288
 
309
- var keys = Object.keys;
310
- var each$1 = function (obj, f) {
311
- var props = keys(obj);
312
- for (var k = 0, len = props.length; k < len; k++) {
313
- var i = props[k];
314
- var x = obj[i];
289
+ const keys = Object.keys;
290
+ const each = (obj, f) => {
291
+ const props = keys(obj);
292
+ for (let k = 0, len = props.length; k < len; k++) {
293
+ const i = props[k];
294
+ const x = obj[i];
315
295
  f(x, i);
316
296
  }
317
297
  };
318
298
 
319
- var isSupported = function (dom) {
320
- return dom.style !== undefined && isFunction(dom.style.getPropertyValue);
299
+ const contains = (str, substr, start = 0, end) => {
300
+ const idx = str.indexOf(substr, start);
301
+ if (idx !== -1) {
302
+ return isUndefined(end) ? true : idx + substr.length <= end;
303
+ } else {
304
+ return false;
305
+ }
321
306
  };
322
307
 
323
- var fromHtml = function (html, scope) {
324
- var doc = scope || document;
325
- var div = doc.createElement('div');
308
+ const isSupported$1 = dom => dom.style !== undefined && isFunction(dom.style.getPropertyValue);
309
+
310
+ const fromHtml = (html, scope) => {
311
+ const doc = scope || document;
312
+ const div = doc.createElement('div');
326
313
  div.innerHTML = html;
327
314
  if (!div.hasChildNodes() || div.childNodes.length > 1) {
328
- console.error('HTML does not have a single root node', html);
329
- throw new Error('HTML must have a single root node');
315
+ const message = 'HTML does not have a single root node';
316
+ console.error(message, html);
317
+ throw new Error(message);
330
318
  }
331
319
  return fromDom(div.childNodes[0]);
332
320
  };
333
- var fromTag = function (tag, scope) {
334
- var doc = scope || document;
335
- var node = doc.createElement(tag);
321
+ const fromTag = (tag, scope) => {
322
+ const doc = scope || document;
323
+ const node = doc.createElement(tag);
336
324
  return fromDom(node);
337
325
  };
338
- var fromText = function (text, scope) {
339
- var doc = scope || document;
340
- var node = doc.createTextNode(text);
326
+ const fromText = (text, scope) => {
327
+ const doc = scope || document;
328
+ const node = doc.createTextNode(text);
341
329
  return fromDom(node);
342
330
  };
343
- var fromDom = function (node) {
331
+ const fromDom = node => {
344
332
  if (node === null || node === undefined) {
345
333
  throw new Error('Node cannot be null or undefined');
346
334
  }
347
335
  return { dom: node };
348
336
  };
349
- var fromPoint = function (docElm, x, y) {
350
- return Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom);
351
- };
352
- var SugarElement = {
353
- fromHtml: fromHtml,
354
- fromTag: fromTag,
355
- fromText: fromText,
356
- fromDom: fromDom,
357
- fromPoint: fromPoint
337
+ const fromPoint = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom);
338
+ const SugarElement = {
339
+ fromHtml,
340
+ fromTag,
341
+ fromText,
342
+ fromDom,
343
+ fromPoint
358
344
  };
359
345
 
360
- var Global = typeof window !== 'undefined' ? window : Function('return this;')();
346
+ typeof window !== 'undefined' ? window : Function('return this;')();
361
347
 
362
- var DOCUMENT = 9;
363
- var DOCUMENT_FRAGMENT = 11;
364
- var ELEMENT = 1;
365
- var TEXT = 3;
348
+ const DOCUMENT = 9;
349
+ const DOCUMENT_FRAGMENT = 11;
350
+ const ELEMENT = 1;
351
+ const TEXT = 3;
366
352
 
367
- var type = function (element) {
368
- return element.dom.nodeType;
369
- };
370
- var isType$1 = function (t) {
371
- return function (element) {
372
- return type(element) === t;
373
- };
374
- };
375
- var isElement = isType$1(ELEMENT);
376
- var isText = isType$1(TEXT);
377
- var isDocument = isType$1(DOCUMENT);
378
- var isDocumentFragment = isType$1(DOCUMENT_FRAGMENT);
353
+ const type = element => element.dom.nodeType;
354
+ const isType = t => element => type(element) === t;
355
+ const isElement = isType(ELEMENT);
356
+ const isText = isType(TEXT);
357
+ const isDocument = isType(DOCUMENT);
358
+ const isDocumentFragment = isType(DOCUMENT_FRAGMENT);
379
359
 
380
- var is = function (element, selector) {
381
- var dom = element.dom;
360
+ const is = (element, selector) => {
361
+ const dom = element.dom;
382
362
  if (dom.nodeType !== ELEMENT) {
383
363
  return false;
384
364
  } else {
385
- var elem = dom;
365
+ const elem = dom;
386
366
  if (elem.matches !== undefined) {
387
367
  return elem.matches(selector);
388
368
  } else if (elem.msMatchesSelector !== undefined) {
@@ -396,34 +376,24 @@
396
376
  }
397
377
  }
398
378
  };
399
- var bypassSelector = function (dom) {
400
- return dom.nodeType !== ELEMENT && dom.nodeType !== DOCUMENT && dom.nodeType !== DOCUMENT_FRAGMENT || dom.childElementCount === 0;
401
- };
402
- var all = function (selector, scope) {
403
- var base = scope === undefined ? document : scope.dom;
379
+ const bypassSelector = dom => dom.nodeType !== ELEMENT && dom.nodeType !== DOCUMENT && dom.nodeType !== DOCUMENT_FRAGMENT || dom.childElementCount === 0;
380
+ const all$1 = (selector, scope) => {
381
+ const base = scope === undefined ? document : scope.dom;
404
382
  return bypassSelector(base) ? [] : map(base.querySelectorAll(selector), SugarElement.fromDom);
405
383
  };
406
384
 
407
- var eq = function (e1, e2) {
408
- return e1.dom === e2.dom;
409
- };
385
+ const eq = (e1, e2) => e1.dom === e2.dom;
410
386
 
411
- var owner = function (element) {
412
- return SugarElement.fromDom(element.dom.ownerDocument);
413
- };
414
- var documentOrOwner = function (dos) {
415
- return isDocument(dos) ? dos : owner(dos);
416
- };
417
- var parent = function (element) {
418
- return Optional.from(element.dom.parentNode).map(SugarElement.fromDom);
419
- };
420
- var parents = function (element, isRoot) {
421
- var stop = isFunction(isRoot) ? isRoot : never;
422
- var dom = element.dom;
423
- var ret = [];
387
+ const owner = element => SugarElement.fromDom(element.dom.ownerDocument);
388
+ const documentOrOwner = dos => isDocument(dos) ? dos : owner(dos);
389
+ const parent = element => Optional.from(element.dom.parentNode).map(SugarElement.fromDom);
390
+ const parents = (element, isRoot) => {
391
+ const stop = isFunction(isRoot) ? isRoot : never;
392
+ let dom = element.dom;
393
+ const ret = [];
424
394
  while (dom.parentNode !== null && dom.parentNode !== undefined) {
425
- var rawParent = dom.parentNode;
426
- var p = SugarElement.fromDom(rawParent);
395
+ const rawParent = dom.parentNode;
396
+ const p = SugarElement.fromDom(rawParent);
427
397
  ret.push(p);
428
398
  if (stop(p) === true) {
429
399
  break;
@@ -433,39 +403,27 @@
433
403
  }
434
404
  return ret;
435
405
  };
436
- var siblings = function (element) {
437
- var filterSelf = function (elements) {
438
- return filter(elements, function (x) {
439
- return !eq(element, x);
440
- });
441
- };
406
+ const siblings$2 = element => {
407
+ const filterSelf = elements => filter$1(elements, x => !eq(element, x));
442
408
  return parent(element).map(children).map(filterSelf).getOr([]);
443
409
  };
444
- var children = function (element) {
445
- return map(element.dom.childNodes, SugarElement.fromDom);
446
- };
410
+ const children = element => map(element.dom.childNodes, SugarElement.fromDom);
447
411
 
448
- var isShadowRoot = function (dos) {
449
- return isDocumentFragment(dos) && isNonNullable(dos.dom.host);
450
- };
451
- var supported = isFunction(Element.prototype.attachShadow) && isFunction(Node.prototype.getRootNode);
452
- var isSupported$1 = constant(supported);
453
- var getRootNode = supported ? function (e) {
454
- return SugarElement.fromDom(e.dom.getRootNode());
455
- } : documentOrOwner;
456
- var getShadowRoot = function (e) {
457
- var r = getRootNode(e);
412
+ const isShadowRoot = dos => isDocumentFragment(dos) && isNonNullable(dos.dom.host);
413
+ const supported = isFunction(Element.prototype.attachShadow) && isFunction(Node.prototype.getRootNode);
414
+ const isSupported = constant(supported);
415
+ const getRootNode = supported ? e => SugarElement.fromDom(e.dom.getRootNode()) : documentOrOwner;
416
+ const getShadowRoot = e => {
417
+ const r = getRootNode(e);
458
418
  return isShadowRoot(r) ? Optional.some(r) : Optional.none();
459
419
  };
460
- var getShadowHost = function (e) {
461
- return SugarElement.fromDom(e.dom.host);
462
- };
463
- var getOriginalEventTarget = function (event) {
464
- if (isSupported$1() && isNonNullable(event.target)) {
465
- var el = SugarElement.fromDom(event.target);
420
+ const getShadowHost = e => SugarElement.fromDom(e.dom.host);
421
+ const getOriginalEventTarget = event => {
422
+ if (isSupported() && isNonNullable(event.target)) {
423
+ const el = SugarElement.fromDom(event.target);
466
424
  if (isElement(el) && isOpenShadowHost(el)) {
467
425
  if (event.composed && event.composedPath) {
468
- var composedPath = event.composedPath();
426
+ const composedPath = event.composedPath();
469
427
  if (composedPath) {
470
428
  return head(composedPath);
471
429
  }
@@ -474,29 +432,25 @@
474
432
  }
475
433
  return Optional.from(event.target);
476
434
  };
477
- var isOpenShadowHost = function (element) {
478
- return isNonNullable(element.dom.shadowRoot);
479
- };
435
+ const isOpenShadowHost = element => isNonNullable(element.dom.shadowRoot);
480
436
 
481
- var inBody = function (element) {
482
- var dom = isText(element) ? element.dom.parentNode : element.dom;
437
+ const inBody = element => {
438
+ const dom = isText(element) ? element.dom.parentNode : element.dom;
483
439
  if (dom === undefined || dom === null || dom.ownerDocument === null) {
484
440
  return false;
485
441
  }
486
- var doc = dom.ownerDocument;
487
- return getShadowRoot(SugarElement.fromDom(dom)).fold(function () {
488
- return doc.body.contains(dom);
489
- }, compose1(inBody, getShadowHost));
442
+ const doc = dom.ownerDocument;
443
+ return getShadowRoot(SugarElement.fromDom(dom)).fold(() => doc.body.contains(dom), compose1(inBody, getShadowHost));
490
444
  };
491
- var getBody = function (doc) {
492
- var b = doc.dom.body;
445
+ const getBody = doc => {
446
+ const b = doc.dom.body;
493
447
  if (b === null || b === undefined) {
494
448
  throw new Error('Body is not available yet');
495
449
  }
496
450
  return SugarElement.fromDom(b);
497
451
  };
498
452
 
499
- var rawSet = function (dom, key, value) {
453
+ const rawSet = (dom, key, value) => {
500
454
  if (isString(value) || isBoolean(value) || isNumber(value)) {
501
455
  dom.setAttribute(key, value + '');
502
456
  } else {
@@ -504,171 +458,476 @@
504
458
  throw new Error('Attribute value was not simple');
505
459
  }
506
460
  };
507
- var set = function (element, key, value) {
461
+ const set = (element, key, value) => {
508
462
  rawSet(element.dom, key, value);
509
463
  };
510
- var get$2 = function (element, key) {
511
- var v = element.dom.getAttribute(key);
464
+ const get$3 = (element, key) => {
465
+ const v = element.dom.getAttribute(key);
512
466
  return v === null ? undefined : v;
513
467
  };
514
- var remove = function (element, key) {
468
+ const remove = (element, key) => {
515
469
  element.dom.removeAttribute(key);
516
470
  };
517
471
 
518
- var internalSet = function (dom, property, value) {
472
+ const internalSet = (dom, property, value) => {
519
473
  if (!isString(value)) {
520
474
  console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom);
521
475
  throw new Error('CSS value must be a string: ' + value);
522
476
  }
523
- if (isSupported(dom)) {
477
+ if (isSupported$1(dom)) {
524
478
  dom.style.setProperty(property, value);
525
479
  }
526
480
  };
527
- var setAll = function (element, css) {
528
- var dom = element.dom;
529
- each$1(css, function (v, k) {
481
+ const setAll = (element, css) => {
482
+ const dom = element.dom;
483
+ each(css, (v, k) => {
530
484
  internalSet(dom, k, v);
531
485
  });
532
486
  };
533
- var get$3 = function (element, property) {
534
- var dom = element.dom;
535
- var styles = window.getComputedStyle(dom);
536
- var r = styles.getPropertyValue(property);
487
+ const get$2 = (element, property) => {
488
+ const dom = element.dom;
489
+ const styles = window.getComputedStyle(dom);
490
+ const r = styles.getPropertyValue(property);
537
491
  return r === '' && !inBody(element) ? getUnsafeProperty(dom, property) : r;
538
492
  };
539
- var getUnsafeProperty = function (dom, property) {
540
- return isSupported(dom) ? dom.style.getPropertyValue(property) : '';
541
- };
493
+ const getUnsafeProperty = (dom, property) => isSupported$1(dom) ? dom.style.getPropertyValue(property) : '';
542
494
 
543
- var mkEvent = function (target, x, y, stop, prevent, kill, raw) {
544
- return {
545
- target: target,
546
- x: x,
547
- y: y,
548
- stop: stop,
549
- prevent: prevent,
550
- kill: kill,
551
- raw: raw
552
- };
553
- };
554
- var fromRawEvent = function (rawEvent) {
555
- var target = SugarElement.fromDom(getOriginalEventTarget(rawEvent).getOr(rawEvent.target));
556
- var stop = function () {
557
- return rawEvent.stopPropagation();
558
- };
559
- var prevent = function () {
560
- return rawEvent.preventDefault();
561
- };
562
- var kill = compose(prevent, stop);
495
+ const mkEvent = (target, x, y, stop, prevent, kill, raw) => ({
496
+ target,
497
+ x,
498
+ y,
499
+ stop,
500
+ prevent,
501
+ kill,
502
+ raw
503
+ });
504
+ const fromRawEvent = rawEvent => {
505
+ const target = SugarElement.fromDom(getOriginalEventTarget(rawEvent).getOr(rawEvent.target));
506
+ const stop = () => rawEvent.stopPropagation();
507
+ const prevent = () => rawEvent.preventDefault();
508
+ const kill = compose(prevent, stop);
563
509
  return mkEvent(target, rawEvent.clientX, rawEvent.clientY, stop, prevent, kill, rawEvent);
564
510
  };
565
- var handle = function (filter, handler) {
566
- return function (rawEvent) {
567
- if (filter(rawEvent)) {
568
- handler(fromRawEvent(rawEvent));
569
- }
570
- };
511
+ const handle = (filter, handler) => rawEvent => {
512
+ if (filter(rawEvent)) {
513
+ handler(fromRawEvent(rawEvent));
514
+ }
571
515
  };
572
- var binder = function (element, event, filter, handler, useCapture) {
573
- var wrapped = handle(filter, handler);
516
+ const binder = (element, event, filter, handler, useCapture) => {
517
+ const wrapped = handle(filter, handler);
574
518
  element.dom.addEventListener(event, wrapped, useCapture);
575
519
  return { unbind: curry(unbind, element, event, wrapped, useCapture) };
576
520
  };
577
- var bind$1 = function (element, event, filter, handler) {
578
- return binder(element, event, filter, handler, false);
579
- };
580
- var unbind = function (element, event, handler, useCapture) {
521
+ const bind$2 = (element, event, filter, handler) => binder(element, event, filter, handler, false);
522
+ const unbind = (element, event, handler, useCapture) => {
581
523
  element.dom.removeEventListener(event, handler, useCapture);
582
524
  };
583
525
 
584
- var filter$1 = always;
585
- var bind$2 = function (element, event, handler) {
586
- return bind$1(element, event, filter$1, handler);
587
- };
526
+ const filter = always;
527
+ const bind$1 = (element, event, handler) => bind$2(element, event, filter, handler);
588
528
 
589
- var r = function (left, top) {
590
- var translate = function (x, y) {
591
- return r(left + x, top + y);
529
+ const cached = f => {
530
+ let called = false;
531
+ let r;
532
+ return (...args) => {
533
+ if (!called) {
534
+ called = true;
535
+ r = f.apply(null, args);
536
+ }
537
+ return r;
592
538
  };
539
+ };
540
+
541
+ const DeviceType = (os, browser, userAgent, mediaMatch) => {
542
+ const isiPad = os.isiOS() && /ipad/i.test(userAgent) === true;
543
+ const isiPhone = os.isiOS() && !isiPad;
544
+ const isMobile = os.isiOS() || os.isAndroid();
545
+ const isTouch = isMobile || mediaMatch('(pointer:coarse)');
546
+ const isTablet = isiPad || !isiPhone && isMobile && mediaMatch('(min-device-width:768px)');
547
+ const isPhone = isiPhone || isMobile && !isTablet;
548
+ const iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false;
549
+ const isDesktop = !isPhone && !isTablet && !iOSwebview;
593
550
  return {
594
- left: left,
595
- top: top,
596
- translate: translate
551
+ isiPad: constant(isiPad),
552
+ isiPhone: constant(isiPhone),
553
+ isTablet: constant(isTablet),
554
+ isPhone: constant(isPhone),
555
+ isTouch: constant(isTouch),
556
+ isAndroid: os.isAndroid,
557
+ isiOS: os.isiOS,
558
+ isWebView: constant(iOSwebview),
559
+ isDesktop: constant(isDesktop)
597
560
  };
598
561
  };
599
- var SugarPosition = r;
600
562
 
601
- var get$4 = function (_DOC) {
602
- var doc = _DOC !== undefined ? _DOC.dom : document;
603
- var x = doc.body.scrollLeft || doc.documentElement.scrollLeft;
604
- var y = doc.body.scrollTop || doc.documentElement.scrollTop;
605
- return SugarPosition(x, y);
563
+ const firstMatch = (regexes, s) => {
564
+ for (let i = 0; i < regexes.length; i++) {
565
+ const x = regexes[i];
566
+ if (x.test(s)) {
567
+ return x;
568
+ }
569
+ }
570
+ return undefined;
606
571
  };
607
-
608
- var get$5 = function (_win) {
609
- var win = _win === undefined ? window : _win;
610
- return Optional.from(win['visualViewport']);
572
+ const find = (regexes, agent) => {
573
+ const r = firstMatch(regexes, agent);
574
+ if (!r) {
575
+ return {
576
+ major: 0,
577
+ minor: 0
578
+ };
579
+ }
580
+ const group = i => {
581
+ return Number(agent.replace(r, '$' + i));
582
+ };
583
+ return nu$2(group(1), group(2));
611
584
  };
612
- var bounds = function (x, y, width, height) {
585
+ const detect$3 = (versionRegexes, agent) => {
586
+ const cleanedAgent = String(agent).toLowerCase();
587
+ if (versionRegexes.length === 0) {
588
+ return unknown$2();
589
+ }
590
+ return find(versionRegexes, cleanedAgent);
591
+ };
592
+ const unknown$2 = () => {
593
+ return nu$2(0, 0);
594
+ };
595
+ const nu$2 = (major, minor) => {
613
596
  return {
614
- x: x,
615
- y: y,
616
- width: width,
617
- height: height,
618
- right: x + width,
619
- bottom: y + height
597
+ major,
598
+ minor
620
599
  };
621
600
  };
622
- var getBounds = function (_win) {
623
- var win = _win === undefined ? window : _win;
624
- var doc = win.document;
625
- var scroll = get$4(SugarElement.fromDom(doc));
626
- return get$5(win).fold(function () {
627
- var html = win.document.documentElement;
628
- var width = html.clientWidth;
629
- var height = html.clientHeight;
630
- return bounds(scroll.left, scroll.top, width, height);
631
- }, function (visualViewport) {
632
- return bounds(Math.max(visualViewport.pageLeft, scroll.left), Math.max(visualViewport.pageTop, scroll.top), visualViewport.width, visualViewport.height);
601
+ const Version = {
602
+ nu: nu$2,
603
+ detect: detect$3,
604
+ unknown: unknown$2
605
+ };
606
+
607
+ const detectBrowser$1 = (browsers, userAgentData) => {
608
+ return findMap(userAgentData.brands, uaBrand => {
609
+ const lcBrand = uaBrand.brand.toLowerCase();
610
+ return find$1(browsers, browser => {
611
+ var _a;
612
+ return lcBrand === ((_a = browser.brand) === null || _a === void 0 ? void 0 : _a.toLowerCase());
613
+ }).map(info => ({
614
+ current: info.name,
615
+ version: Version.nu(parseInt(uaBrand.version, 10), 0)
616
+ }));
633
617
  });
634
618
  };
635
- var bind$3 = function (name, callback, _win) {
636
- return get$5(_win).map(function (visualViewport) {
637
- var handler = function (e) {
638
- return callback(fromRawEvent(e));
619
+
620
+ const detect$2 = (candidates, userAgent) => {
621
+ const agent = String(userAgent).toLowerCase();
622
+ return find$1(candidates, candidate => {
623
+ return candidate.search(agent);
624
+ });
625
+ };
626
+ const detectBrowser = (browsers, userAgent) => {
627
+ return detect$2(browsers, userAgent).map(browser => {
628
+ const version = Version.detect(browser.versionRegexes, userAgent);
629
+ return {
630
+ current: browser.name,
631
+ version
639
632
  };
640
- visualViewport.addEventListener(name, handler);
633
+ });
634
+ };
635
+ const detectOs = (oses, userAgent) => {
636
+ return detect$2(oses, userAgent).map(os => {
637
+ const version = Version.detect(os.versionRegexes, userAgent);
641
638
  return {
642
- unbind: function () {
643
- return visualViewport.removeEventListener(name, handler);
644
- }
639
+ current: os.name,
640
+ version
645
641
  };
646
- }).getOrThunk(function () {
647
- return { unbind: noop };
648
642
  });
649
643
  };
650
644
 
651
- var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
645
+ const normalVersionRegex = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/;
646
+ const checkContains = target => {
647
+ return uastring => {
648
+ return contains(uastring, target);
649
+ };
650
+ };
651
+ const browsers = [
652
+ {
653
+ name: 'Edge',
654
+ versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],
655
+ search: uastring => {
656
+ return contains(uastring, 'edge/') && contains(uastring, 'chrome') && contains(uastring, 'safari') && contains(uastring, 'applewebkit');
657
+ }
658
+ },
659
+ {
660
+ name: 'Chromium',
661
+ brand: 'Chromium',
662
+ versionRegexes: [
663
+ /.*?chrome\/([0-9]+)\.([0-9]+).*/,
664
+ normalVersionRegex
665
+ ],
666
+ search: uastring => {
667
+ return contains(uastring, 'chrome') && !contains(uastring, 'chromeframe');
668
+ }
669
+ },
670
+ {
671
+ name: 'IE',
672
+ versionRegexes: [
673
+ /.*?msie\ ?([0-9]+)\.([0-9]+).*/,
674
+ /.*?rv:([0-9]+)\.([0-9]+).*/
675
+ ],
676
+ search: uastring => {
677
+ return contains(uastring, 'msie') || contains(uastring, 'trident');
678
+ }
679
+ },
680
+ {
681
+ name: 'Opera',
682
+ versionRegexes: [
683
+ normalVersionRegex,
684
+ /.*?opera\/([0-9]+)\.([0-9]+).*/
685
+ ],
686
+ search: checkContains('opera')
687
+ },
688
+ {
689
+ name: 'Firefox',
690
+ versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],
691
+ search: checkContains('firefox')
692
+ },
693
+ {
694
+ name: 'Safari',
695
+ versionRegexes: [
696
+ normalVersionRegex,
697
+ /.*?cpu os ([0-9]+)_([0-9]+).*/
698
+ ],
699
+ search: uastring => {
700
+ return (contains(uastring, 'safari') || contains(uastring, 'mobile/')) && contains(uastring, 'applewebkit');
701
+ }
702
+ }
703
+ ];
704
+ const oses = [
705
+ {
706
+ name: 'Windows',
707
+ search: checkContains('win'),
708
+ versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]
709
+ },
710
+ {
711
+ name: 'iOS',
712
+ search: uastring => {
713
+ return contains(uastring, 'iphone') || contains(uastring, 'ipad');
714
+ },
715
+ versionRegexes: [
716
+ /.*?version\/\ ?([0-9]+)\.([0-9]+).*/,
717
+ /.*cpu os ([0-9]+)_([0-9]+).*/,
718
+ /.*cpu iphone os ([0-9]+)_([0-9]+).*/
719
+ ]
720
+ },
721
+ {
722
+ name: 'Android',
723
+ search: checkContains('android'),
724
+ versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/]
725
+ },
726
+ {
727
+ name: 'macOS',
728
+ search: checkContains('mac os x'),
729
+ versionRegexes: [/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]
730
+ },
731
+ {
732
+ name: 'Linux',
733
+ search: checkContains('linux'),
734
+ versionRegexes: []
735
+ },
736
+ {
737
+ name: 'Solaris',
738
+ search: checkContains('sunos'),
739
+ versionRegexes: []
740
+ },
741
+ {
742
+ name: 'FreeBSD',
743
+ search: checkContains('freebsd'),
744
+ versionRegexes: []
745
+ },
746
+ {
747
+ name: 'ChromeOS',
748
+ search: checkContains('cros'),
749
+ versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/]
750
+ }
751
+ ];
752
+ const PlatformInfo = {
753
+ browsers: constant(browsers),
754
+ oses: constant(oses)
755
+ };
756
+
757
+ const edge = 'Edge';
758
+ const chromium = 'Chromium';
759
+ const ie = 'IE';
760
+ const opera = 'Opera';
761
+ const firefox = 'Firefox';
762
+ const safari = 'Safari';
763
+ const unknown$1 = () => {
764
+ return nu$1({
765
+ current: undefined,
766
+ version: Version.unknown()
767
+ });
768
+ };
769
+ const nu$1 = info => {
770
+ const current = info.current;
771
+ const version = info.version;
772
+ const isBrowser = name => () => current === name;
773
+ return {
774
+ current,
775
+ version,
776
+ isEdge: isBrowser(edge),
777
+ isChromium: isBrowser(chromium),
778
+ isIE: isBrowser(ie),
779
+ isOpera: isBrowser(opera),
780
+ isFirefox: isBrowser(firefox),
781
+ isSafari: isBrowser(safari)
782
+ };
783
+ };
784
+ const Browser = {
785
+ unknown: unknown$1,
786
+ nu: nu$1,
787
+ edge: constant(edge),
788
+ chromium: constant(chromium),
789
+ ie: constant(ie),
790
+ opera: constant(opera),
791
+ firefox: constant(firefox),
792
+ safari: constant(safari)
793
+ };
794
+
795
+ const windows = 'Windows';
796
+ const ios = 'iOS';
797
+ const android = 'Android';
798
+ const linux = 'Linux';
799
+ const macos = 'macOS';
800
+ const solaris = 'Solaris';
801
+ const freebsd = 'FreeBSD';
802
+ const chromeos = 'ChromeOS';
803
+ const unknown = () => {
804
+ return nu({
805
+ current: undefined,
806
+ version: Version.unknown()
807
+ });
808
+ };
809
+ const nu = info => {
810
+ const current = info.current;
811
+ const version = info.version;
812
+ const isOS = name => () => current === name;
813
+ return {
814
+ current,
815
+ version,
816
+ isWindows: isOS(windows),
817
+ isiOS: isOS(ios),
818
+ isAndroid: isOS(android),
819
+ isMacOS: isOS(macos),
820
+ isLinux: isOS(linux),
821
+ isSolaris: isOS(solaris),
822
+ isFreeBSD: isOS(freebsd),
823
+ isChromeOS: isOS(chromeos)
824
+ };
825
+ };
826
+ const OperatingSystem = {
827
+ unknown,
828
+ nu,
829
+ windows: constant(windows),
830
+ ios: constant(ios),
831
+ android: constant(android),
832
+ linux: constant(linux),
833
+ macos: constant(macos),
834
+ solaris: constant(solaris),
835
+ freebsd: constant(freebsd),
836
+ chromeos: constant(chromeos)
837
+ };
838
+
839
+ const detect$1 = (userAgent, userAgentDataOpt, mediaMatch) => {
840
+ const browsers = PlatformInfo.browsers();
841
+ const oses = PlatformInfo.oses();
842
+ const browser = userAgentDataOpt.bind(userAgentData => detectBrowser$1(browsers, userAgentData)).orThunk(() => detectBrowser(browsers, userAgent)).fold(Browser.unknown, Browser.nu);
843
+ const os = detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu);
844
+ const deviceType = DeviceType(os, browser, userAgent, mediaMatch);
845
+ return {
846
+ browser,
847
+ os,
848
+ deviceType
849
+ };
850
+ };
851
+ const PlatformDetection = { detect: detect$1 };
852
+
853
+ const mediaMatch = query => window.matchMedia(query).matches;
854
+ let platform = cached(() => PlatformDetection.detect(navigator.userAgent, Optional.from(navigator.userAgentData), mediaMatch));
855
+ const detect = () => platform();
652
856
 
653
- var global$2 = tinymce.util.Tools.resolve('tinymce.Env');
857
+ const r = (left, top) => {
858
+ const translate = (x, y) => r(left + x, top + y);
859
+ return {
860
+ left,
861
+ top,
862
+ translate
863
+ };
864
+ };
865
+ const SugarPosition = r;
654
866
 
655
- var global$3 = tinymce.util.Tools.resolve('tinymce.util.Delay');
867
+ const get$1 = _DOC => {
868
+ const doc = _DOC !== undefined ? _DOC.dom : document;
869
+ const x = doc.body.scrollLeft || doc.documentElement.scrollLeft;
870
+ const y = doc.body.scrollTop || doc.documentElement.scrollTop;
871
+ return SugarPosition(x, y);
872
+ };
656
873
 
657
- var fireFullscreenStateChanged = function (editor, state) {
658
- editor.fire('FullscreenStateChanged', { state: state });
874
+ const get = _win => {
875
+ const win = _win === undefined ? window : _win;
876
+ if (detect().browser.isFirefox()) {
877
+ return Optional.none();
878
+ } else {
879
+ return Optional.from(win.visualViewport);
880
+ }
881
+ };
882
+ const bounds = (x, y, width, height) => ({
883
+ x,
884
+ y,
885
+ width,
886
+ height,
887
+ right: x + width,
888
+ bottom: y + height
889
+ });
890
+ const getBounds = _win => {
891
+ const win = _win === undefined ? window : _win;
892
+ const doc = win.document;
893
+ const scroll = get$1(SugarElement.fromDom(doc));
894
+ return get(win).fold(() => {
895
+ const html = win.document.documentElement;
896
+ const width = html.clientWidth;
897
+ const height = html.clientHeight;
898
+ return bounds(scroll.left, scroll.top, width, height);
899
+ }, visualViewport => bounds(Math.max(visualViewport.pageLeft, scroll.left), Math.max(visualViewport.pageTop, scroll.top), visualViewport.width, visualViewport.height));
659
900
  };
901
+ const bind = (name, callback, _win) => get(_win).map(visualViewport => {
902
+ const handler = e => callback(fromRawEvent(e));
903
+ visualViewport.addEventListener(name, handler);
904
+ return { unbind: () => visualViewport.removeEventListener(name, handler) };
905
+ }).getOrThunk(() => ({ unbind: noop }));
660
906
 
661
- var getFullscreenNative = function (editor) {
662
- return editor.getParam('fullscreen_native', false, 'boolean');
907
+ var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
908
+
909
+ var global = tinymce.util.Tools.resolve('tinymce.Env');
910
+
911
+ const fireFullscreenStateChanged = (editor, state) => {
912
+ editor.dispatch('FullscreenStateChanged', { state });
913
+ editor.dispatch('ResizeEditor');
663
914
  };
664
915
 
665
- var getFullscreenRoot = function (editor) {
666
- var elem = SugarElement.fromDom(editor.getElement());
667
- return getShadowRoot(elem).map(getShadowHost).getOrThunk(function () {
668
- return getBody(owner(elem));
916
+ const option = name => editor => editor.options.get(name);
917
+ const register$2 = editor => {
918
+ const registerOption = editor.options.register;
919
+ registerOption('fullscreen_native', {
920
+ processor: 'boolean',
921
+ default: false
669
922
  });
670
923
  };
671
- var getFullscreenElement = function (root) {
924
+ const getFullscreenNative = option('fullscreen_native');
925
+
926
+ const getFullscreenRoot = editor => {
927
+ const elem = SugarElement.fromDom(editor.getElement());
928
+ return getShadowRoot(elem).map(getShadowHost).getOrThunk(() => getBody(owner(elem)));
929
+ };
930
+ const getFullscreenElement = root => {
672
931
  if (root.fullscreenElement !== undefined) {
673
932
  return root.fullscreenElement;
674
933
  } else if (root.msFullscreenElement !== undefined) {
@@ -679,7 +938,7 @@
679
938
  return null;
680
939
  }
681
940
  };
682
- var getFullscreenchangeEventName = function () {
941
+ const getFullscreenchangeEventName = () => {
683
942
  if (document.fullscreenElement !== undefined) {
684
943
  return 'fullscreenchange';
685
944
  } else if (document.msFullscreenElement !== undefined) {
@@ -690,8 +949,8 @@
690
949
  return 'fullscreenchange';
691
950
  }
692
951
  };
693
- var requestFullscreen = function (sugarElem) {
694
- var elem = sugarElem.dom;
952
+ const requestFullscreen = sugarElem => {
953
+ const elem = sugarElem.dom;
695
954
  if (elem.requestFullscreen) {
696
955
  elem.requestFullscreen();
697
956
  } else if (elem.msRequestFullscreen) {
@@ -700,8 +959,8 @@
700
959
  elem.webkitRequestFullScreen();
701
960
  }
702
961
  };
703
- var exitFullscreen = function (sugarDoc) {
704
- var doc = sugarDoc.dom;
962
+ const exitFullscreen = sugarDoc => {
963
+ const doc = sugarDoc.dom;
705
964
  if (doc.exitFullscreen) {
706
965
  doc.exitFullscreen();
707
966
  } else if (doc.msExitFullscreen) {
@@ -710,70 +969,52 @@
710
969
  doc.webkitCancelFullScreen();
711
970
  }
712
971
  };
713
- var isFullscreenElement = function (elem) {
714
- return elem.dom === getFullscreenElement(owner(elem).dom);
715
- };
972
+ const isFullscreenElement = elem => elem.dom === getFullscreenElement(owner(elem).dom);
716
973
 
717
- var ancestors = function (scope, predicate, isRoot) {
718
- return filter(parents(scope, isRoot), predicate);
719
- };
720
- var siblings$1 = function (scope, predicate) {
721
- return filter(siblings(scope), predicate);
722
- };
974
+ const ancestors$1 = (scope, predicate, isRoot) => filter$1(parents(scope, isRoot), predicate);
975
+ const siblings$1 = (scope, predicate) => filter$1(siblings$2(scope), predicate);
723
976
 
724
- var all$1 = function (selector) {
725
- return all(selector);
726
- };
727
- var ancestors$1 = function (scope, selector, isRoot) {
728
- return ancestors(scope, function (e) {
729
- return is(e, selector);
730
- }, isRoot);
731
- };
732
- var siblings$2 = function (scope, selector) {
733
- return siblings$1(scope, function (e) {
734
- return is(e, selector);
735
- });
736
- };
977
+ const all = selector => all$1(selector);
978
+ const ancestors = (scope, selector, isRoot) => ancestors$1(scope, e => is(e, selector), isRoot);
979
+ const siblings = (scope, selector) => siblings$1(scope, e => is(e, selector));
737
980
 
738
- var attr = 'data-ephox-mobile-fullscreen-style';
739
- var siblingStyles = 'display:none!important;';
740
- var ancestorPosition = 'position:absolute!important;';
741
- var ancestorStyles = 'top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;';
742
- var bgFallback = 'background-color:rgb(255,255,255)!important;';
743
- var isAndroid = global$2.os.isAndroid();
744
- var matchColor = function (editorBody) {
745
- var color = get$3(editorBody, 'background-color');
981
+ const attr = 'data-ephox-mobile-fullscreen-style';
982
+ const siblingStyles = 'display:none!important;';
983
+ const ancestorPosition = 'position:absolute!important;';
984
+ const ancestorStyles = 'top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;';
985
+ const bgFallback = 'background-color:rgb(255,255,255)!important;';
986
+ const isAndroid = global.os.isAndroid();
987
+ const matchColor = editorBody => {
988
+ const color = get$2(editorBody, 'background-color');
746
989
  return color !== undefined && color !== '' ? 'background-color:' + color + '!important' : bgFallback;
747
990
  };
748
- var clobberStyles = function (dom, container, editorBody) {
749
- var gatherSiblings = function (element) {
750
- return siblings$2(element, '*:not(.tox-silver-sink)');
991
+ const clobberStyles = (dom, container, editorBody) => {
992
+ const gatherSiblings = element => {
993
+ return siblings(element, '*:not(.tox-silver-sink)');
751
994
  };
752
- var clobber = function (clobberStyle) {
753
- return function (element) {
754
- var styles = get$2(element, 'style');
755
- var backup = styles === undefined ? 'no-styles' : styles.trim();
756
- if (backup === clobberStyle) {
757
- return;
758
- } else {
759
- set(element, attr, backup);
760
- setAll(element, dom.parseStyle(clobberStyle));
761
- }
762
- };
995
+ const clobber = clobberStyle => element => {
996
+ const styles = get$3(element, 'style');
997
+ const backup = styles === undefined ? 'no-styles' : styles.trim();
998
+ if (backup === clobberStyle) {
999
+ return;
1000
+ } else {
1001
+ set(element, attr, backup);
1002
+ setAll(element, dom.parseStyle(clobberStyle));
1003
+ }
763
1004
  };
764
- var ancestors = ancestors$1(container, '*');
765
- var siblings = bind(ancestors, gatherSiblings);
766
- var bgColor = matchColor(editorBody);
767
- each(siblings, clobber(siblingStyles));
768
- each(ancestors, clobber(ancestorPosition + ancestorStyles + bgColor));
769
- var containerStyles = isAndroid === true ? '' : ancestorPosition;
1005
+ const ancestors$1 = ancestors(container, '*');
1006
+ const siblings$1 = bind$3(ancestors$1, gatherSiblings);
1007
+ const bgColor = matchColor(editorBody);
1008
+ each$1(siblings$1, clobber(siblingStyles));
1009
+ each$1(ancestors$1, clobber(ancestorPosition + ancestorStyles + bgColor));
1010
+ const containerStyles = isAndroid === true ? '' : ancestorPosition;
770
1011
  clobber(containerStyles + ancestorStyles + bgColor)(container);
771
1012
  };
772
- var restoreStyles = function (dom) {
773
- var clobberedEls = all$1('[' + attr + ']');
774
- each(clobberedEls, function (element) {
775
- var restore = get$2(element, attr);
776
- if (restore !== 'no-styles') {
1013
+ const restoreStyles = dom => {
1014
+ const clobberedEls = all('[' + attr + ']');
1015
+ each$1(clobberedEls, element => {
1016
+ const restore = get$3(element, attr);
1017
+ if (restore && restore !== 'no-styles') {
777
1018
  setAll(element, dom.parseStyle(restore));
778
1019
  } else {
779
1020
  remove(element, 'style');
@@ -782,106 +1023,90 @@
782
1023
  });
783
1024
  };
784
1025
 
785
- var DOM = global$1.DOM;
786
- var getScrollPos = function () {
787
- var vp = getBounds(window);
788
- return {
789
- x: vp.x,
790
- y: vp.y
791
- };
792
- };
793
- var setScrollPos = function (pos) {
794
- window.scrollTo(pos.x, pos.y);
795
- };
796
- var viewportUpdate = get$5().fold(function () {
797
- return {
798
- bind: noop,
799
- unbind: noop
800
- };
801
- }, function (visualViewport) {
802
- var editorContainer = value();
803
- var resizeBinder = unbindable();
804
- var scrollBinder = unbindable();
805
- var refreshScroll = function () {
1026
+ const DOM = global$1.DOM;
1027
+ const getScrollPos = () => getBounds(window);
1028
+ const setScrollPos = pos => window.scrollTo(pos.x, pos.y);
1029
+ const viewportUpdate = get().fold(() => ({
1030
+ bind: noop,
1031
+ unbind: noop
1032
+ }), visualViewport => {
1033
+ const editorContainer = value();
1034
+ const resizeBinder = unbindable();
1035
+ const scrollBinder = unbindable();
1036
+ const refreshScroll = () => {
806
1037
  document.body.scrollTop = 0;
807
1038
  document.documentElement.scrollTop = 0;
808
1039
  };
809
- var refreshVisualViewport = function () {
810
- window.requestAnimationFrame(function () {
811
- editorContainer.on(function (container) {
812
- return setAll(container, {
813
- top: visualViewport.offsetTop + 'px',
814
- left: visualViewport.offsetLeft + 'px',
815
- height: visualViewport.height + 'px',
816
- width: visualViewport.width + 'px'
817
- });
818
- });
1040
+ const refreshVisualViewport = () => {
1041
+ window.requestAnimationFrame(() => {
1042
+ editorContainer.on(container => setAll(container, {
1043
+ top: visualViewport.offsetTop + 'px',
1044
+ left: visualViewport.offsetLeft + 'px',
1045
+ height: visualViewport.height + 'px',
1046
+ width: visualViewport.width + 'px'
1047
+ }));
819
1048
  });
820
1049
  };
821
- var update = global$3.throttle(function () {
1050
+ const update = first(() => {
822
1051
  refreshScroll();
823
1052
  refreshVisualViewport();
824
1053
  }, 50);
825
- var bind = function (element) {
1054
+ const bind$1 = element => {
826
1055
  editorContainer.set(element);
827
- update();
828
- resizeBinder.set(bind$3('resize', update));
829
- scrollBinder.set(bind$3('scroll', update));
1056
+ update.throttle();
1057
+ resizeBinder.set(bind('resize', update.throttle));
1058
+ scrollBinder.set(bind('scroll', update.throttle));
830
1059
  };
831
- var unbind = function () {
832
- editorContainer.on(function () {
1060
+ const unbind = () => {
1061
+ editorContainer.on(() => {
833
1062
  resizeBinder.clear();
834
1063
  scrollBinder.clear();
835
1064
  });
836
1065
  editorContainer.clear();
837
1066
  };
838
1067
  return {
839
- bind: bind,
840
- unbind: unbind
1068
+ bind: bind$1,
1069
+ unbind
841
1070
  };
842
1071
  });
843
- var toggleFullscreen = function (editor, fullscreenState) {
844
- var body = document.body;
845
- var documentElement = document.documentElement;
846
- var editorContainer = editor.getContainer();
847
- var editorContainerS = SugarElement.fromDom(editorContainer);
848
- var fullscreenRoot = getFullscreenRoot(editor);
849
- var fullscreenInfo = fullscreenState.get();
850
- var editorBody = SugarElement.fromDom(editor.getBody());
851
- var isTouch = global$2.deviceType.isTouch();
852
- var editorContainerStyle = editorContainer.style;
853
- var iframe = editor.iframeElement;
854
- var iframeStyle = iframe.style;
855
- var handleClasses = function (handler) {
1072
+ const toggleFullscreen = (editor, fullscreenState) => {
1073
+ const body = document.body;
1074
+ const documentElement = document.documentElement;
1075
+ const editorContainer = editor.getContainer();
1076
+ const editorContainerS = SugarElement.fromDom(editorContainer);
1077
+ const fullscreenRoot = getFullscreenRoot(editor);
1078
+ const fullscreenInfo = fullscreenState.get();
1079
+ const editorBody = SugarElement.fromDom(editor.getBody());
1080
+ const isTouch = global.deviceType.isTouch();
1081
+ const editorContainerStyle = editorContainer.style;
1082
+ const iframe = editor.iframeElement;
1083
+ const iframeStyle = iframe === null || iframe === void 0 ? void 0 : iframe.style;
1084
+ const handleClasses = handler => {
856
1085
  handler(body, 'tox-fullscreen');
857
1086
  handler(documentElement, 'tox-fullscreen');
858
1087
  handler(editorContainer, 'tox-fullscreen');
859
- getShadowRoot(editorContainerS).map(function (root) {
860
- return getShadowHost(root).dom;
861
- }).each(function (host) {
1088
+ getShadowRoot(editorContainerS).map(root => getShadowHost(root).dom).each(host => {
862
1089
  handler(host, 'tox-fullscreen');
863
1090
  handler(host, 'tox-shadowhost');
864
1091
  });
865
1092
  };
866
- var cleanup = function () {
1093
+ const cleanup = () => {
867
1094
  if (isTouch) {
868
1095
  restoreStyles(editor.dom);
869
1096
  }
870
1097
  handleClasses(DOM.removeClass);
871
1098
  viewportUpdate.unbind();
872
- Optional.from(fullscreenState.get()).each(function (info) {
873
- return info.fullscreenChangeHandler.unbind();
874
- });
1099
+ Optional.from(fullscreenState.get()).each(info => info.fullscreenChangeHandler.unbind());
875
1100
  };
876
1101
  if (!fullscreenInfo) {
877
- var fullscreenChangeHandler = bind$2(owner(fullscreenRoot), getFullscreenchangeEventName(), function (_evt) {
1102
+ const fullscreenChangeHandler = bind$1(owner(fullscreenRoot), getFullscreenchangeEventName(), _evt => {
878
1103
  if (getFullscreenNative(editor)) {
879
1104
  if (!isFullscreenElement(fullscreenRoot) && fullscreenState.get() !== null) {
880
1105
  toggleFullscreen(editor, fullscreenState);
881
1106
  }
882
1107
  }
883
1108
  });
884
- var newFullScreenInfo = {
1109
+ const newFullScreenInfo = {
885
1110
  scrollPos: getScrollPos(),
886
1111
  containerWidth: editorContainerStyle.width,
887
1112
  containerHeight: editorContainerStyle.height,
@@ -889,7 +1114,7 @@
889
1114
  containerLeft: editorContainerStyle.left,
890
1115
  iframeWidth: iframeStyle.width,
891
1116
  iframeHeight: iframeStyle.height,
892
- fullscreenChangeHandler: fullscreenChangeHandler
1117
+ fullscreenChangeHandler
893
1118
  };
894
1119
  if (isTouch) {
895
1120
  clobberStyles(editor.dom, editorContainerS, editorBody);
@@ -915,65 +1140,57 @@
915
1140
  editorContainerStyle.height = fullscreenInfo.containerHeight;
916
1141
  editorContainerStyle.top = fullscreenInfo.containerTop;
917
1142
  editorContainerStyle.left = fullscreenInfo.containerLeft;
1143
+ cleanup();
918
1144
  setScrollPos(fullscreenInfo.scrollPos);
919
1145
  fullscreenState.set(null);
920
1146
  fireFullscreenStateChanged(editor, false);
921
- cleanup();
922
1147
  editor.off('remove', cleanup);
923
1148
  }
924
1149
  };
925
1150
 
926
- var register = function (editor, fullscreenState) {
927
- editor.addCommand('mceFullScreen', function () {
1151
+ const register$1 = (editor, fullscreenState) => {
1152
+ editor.addCommand('mceFullScreen', () => {
928
1153
  toggleFullscreen(editor, fullscreenState);
929
1154
  });
930
1155
  };
931
1156
 
932
- var makeSetupHandler = function (editor, fullscreenState) {
933
- return function (api) {
934
- api.setActive(fullscreenState.get() !== null);
935
- var editorEventCallback = function (e) {
936
- return api.setActive(e.state);
937
- };
938
- editor.on('FullscreenStateChanged', editorEventCallback);
939
- return function () {
940
- return editor.off('FullscreenStateChanged', editorEventCallback);
941
- };
942
- };
943
- };
944
- var register$1 = function (editor, fullscreenState) {
1157
+ const makeSetupHandler = (editor, fullscreenState) => api => {
1158
+ api.setActive(fullscreenState.get() !== null);
1159
+ const editorEventCallback = e => api.setActive(e.state);
1160
+ editor.on('FullscreenStateChanged', editorEventCallback);
1161
+ return () => editor.off('FullscreenStateChanged', editorEventCallback);
1162
+ };
1163
+ const register = (editor, fullscreenState) => {
1164
+ const onAction = () => editor.execCommand('mceFullScreen');
945
1165
  editor.ui.registry.addToggleMenuItem('fullscreen', {
946
1166
  text: 'Fullscreen',
947
1167
  icon: 'fullscreen',
948
1168
  shortcut: 'Meta+Shift+F',
949
- onAction: function () {
950
- return editor.execCommand('mceFullScreen');
951
- },
1169
+ onAction,
952
1170
  onSetup: makeSetupHandler(editor, fullscreenState)
953
1171
  });
954
1172
  editor.ui.registry.addToggleButton('fullscreen', {
955
1173
  tooltip: 'Fullscreen',
956
1174
  icon: 'fullscreen',
957
- onAction: function () {
958
- return editor.execCommand('mceFullScreen');
959
- },
1175
+ onAction,
960
1176
  onSetup: makeSetupHandler(editor, fullscreenState)
961
1177
  });
962
1178
  };
963
1179
 
964
- function Plugin () {
965
- global.add('fullscreen', function (editor) {
966
- var fullscreenState = Cell(null);
1180
+ var Plugin = () => {
1181
+ global$2.add('fullscreen', editor => {
1182
+ const fullscreenState = Cell(null);
967
1183
  if (editor.inline) {
968
- return get(fullscreenState);
1184
+ return get$5(fullscreenState);
969
1185
  }
970
- register(editor, fullscreenState);
1186
+ register$2(editor);
971
1187
  register$1(editor, fullscreenState);
1188
+ register(editor, fullscreenState);
972
1189
  editor.addShortcut('Meta+Shift+F', '', 'mceFullScreen');
973
- return get(fullscreenState);
1190
+ return get$5(fullscreenState);
974
1191
  });
975
- }
1192
+ };
976
1193
 
977
1194
  Plugin();
978
1195
 
979
- }());
1196
+ })();