@dangl/angular-material-shared 2.5.1-beta0006 → 2.5.1-beta0018

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 (246) hide show
  1. package/README.md +1 -7
  2. package/esm2022/lib/angular-material-shared.module.mjs +6 -25
  3. package/esm2022/lib/components/footer/footer.component.mjs +12 -7
  4. package/esm2022/lib/components/header/header.component.mjs +18 -10
  5. package/esm2022/lib/components/tiny-mce/tiny-mce.component.mjs +18 -21
  6. package/fesm2022/dangl-angular-material-shared.mjs +45 -55
  7. package/fesm2022/dangl-angular-material-shared.mjs.map +1 -1
  8. package/lib/angular-material-shared.module.d.ts +5 -9
  9. package/lib/components/footer/footer.component.d.ts +1 -1
  10. package/lib/components/header/header.component.d.ts +1 -1
  11. package/lib/components/tiny-mce/tiny-mce.component.d.ts +7 -8
  12. package/package.json +1 -1
  13. package/tinymce-assets/icons/default/icons.js +187 -171
  14. package/tinymce-assets/icons/default/icons.min.js +1 -1
  15. package/tinymce-assets/langs/it.js +1 -1
  16. package/tinymce-assets/plugins/accordion/index.js +7 -0
  17. package/tinymce-assets/plugins/accordion/plugin.js +1054 -0
  18. package/tinymce-assets/plugins/accordion/plugin.min.js +4 -0
  19. package/tinymce-assets/plugins/advlist/plugin.js +185 -187
  20. package/tinymce-assets/plugins/advlist/plugin.min.js +2 -7
  21. package/tinymce-assets/plugins/anchor/plugin.js +79 -81
  22. package/tinymce-assets/plugins/anchor/plugin.min.js +2 -7
  23. package/tinymce-assets/plugins/autolink/plugin.js +209 -194
  24. package/tinymce-assets/plugins/autolink/plugin.min.js +2 -7
  25. package/tinymce-assets/plugins/autoresize/plugin.js +110 -102
  26. package/tinymce-assets/plugins/autoresize/plugin.min.js +2 -7
  27. package/tinymce-assets/plugins/autosave/plugin.js +125 -104
  28. package/tinymce-assets/plugins/autosave/plugin.min.js +2 -7
  29. package/tinymce-assets/plugins/charmap/plugin.js +275 -313
  30. package/tinymce-assets/plugins/charmap/plugin.min.js +2 -7
  31. package/tinymce-assets/plugins/code/plugin.js +18 -24
  32. package/tinymce-assets/plugins/code/plugin.min.js +2 -7
  33. package/tinymce-assets/plugins/codesample/plugin.js +2075 -2074
  34. package/tinymce-assets/plugins/codesample/plugin.min.js +2 -7
  35. package/tinymce-assets/plugins/directionality/plugin.js +247 -305
  36. package/tinymce-assets/plugins/directionality/plugin.min.js +2 -7
  37. package/tinymce-assets/plugins/emoticons/js/emojiimages.js +1 -9424
  38. package/tinymce-assets/plugins/emoticons/js/emojiimages.min.js +1 -1
  39. package/tinymce-assets/plugins/emoticons/js/emojis.js +1 -9423
  40. package/tinymce-assets/plugins/emoticons/js/emojis.min.js +1 -1
  41. package/tinymce-assets/plugins/emoticons/plugin.js +334 -374
  42. package/tinymce-assets/plugins/emoticons/plugin.min.js +2 -7
  43. package/tinymce-assets/plugins/fullscreen/plugin.js +740 -837
  44. package/tinymce-assets/plugins/fullscreen/plugin.min.js +2 -7
  45. package/tinymce-assets/plugins/help/js/i18n/keynav/ar.js +90 -0
  46. package/tinymce-assets/plugins/help/js/i18n/keynav/bg_BG.js +90 -0
  47. package/tinymce-assets/plugins/help/js/i18n/keynav/ca.js +90 -0
  48. package/tinymce-assets/plugins/help/js/i18n/keynav/cs.js +90 -0
  49. package/tinymce-assets/plugins/help/js/i18n/keynav/da.js +90 -0
  50. package/tinymce-assets/plugins/help/js/i18n/keynav/de.js +90 -0
  51. package/tinymce-assets/plugins/help/js/i18n/keynav/el.js +90 -0
  52. package/tinymce-assets/plugins/help/js/i18n/keynav/en.js +90 -0
  53. package/tinymce-assets/plugins/help/js/i18n/keynav/es.js +90 -0
  54. package/tinymce-assets/plugins/help/js/i18n/keynav/eu.js +90 -0
  55. package/tinymce-assets/plugins/help/js/i18n/keynav/fa.js +90 -0
  56. package/tinymce-assets/plugins/help/js/i18n/keynav/fi.js +90 -0
  57. package/tinymce-assets/plugins/help/js/i18n/keynav/fr_FR.js +90 -0
  58. package/tinymce-assets/plugins/help/js/i18n/keynav/he_IL.js +90 -0
  59. package/tinymce-assets/plugins/help/js/i18n/keynav/hi.js +90 -0
  60. package/tinymce-assets/plugins/help/js/i18n/keynav/hr.js +90 -0
  61. package/tinymce-assets/plugins/help/js/i18n/keynav/hu_HU.js +90 -0
  62. package/tinymce-assets/plugins/help/js/i18n/keynav/id.js +90 -0
  63. package/tinymce-assets/plugins/help/js/i18n/keynav/it.js +90 -0
  64. package/tinymce-assets/plugins/help/js/i18n/keynav/ja.js +90 -0
  65. package/tinymce-assets/plugins/help/js/i18n/keynav/kk.js +90 -0
  66. package/tinymce-assets/plugins/help/js/i18n/keynav/ko_KR.js +90 -0
  67. package/tinymce-assets/plugins/help/js/i18n/keynav/ms.js +90 -0
  68. package/tinymce-assets/plugins/help/js/i18n/keynav/nb_NO.js +90 -0
  69. package/tinymce-assets/plugins/help/js/i18n/keynav/nl.js +90 -0
  70. package/tinymce-assets/plugins/help/js/i18n/keynav/pl.js +90 -0
  71. package/tinymce-assets/plugins/help/js/i18n/keynav/pt_BR.js +90 -0
  72. package/tinymce-assets/plugins/help/js/i18n/keynav/pt_PT.js +90 -0
  73. package/tinymce-assets/plugins/help/js/i18n/keynav/ro.js +90 -0
  74. package/tinymce-assets/plugins/help/js/i18n/keynav/ru.js +90 -0
  75. package/tinymce-assets/plugins/help/js/i18n/keynav/sk.js +90 -0
  76. package/tinymce-assets/plugins/help/js/i18n/keynav/sl_SI.js +90 -0
  77. package/tinymce-assets/plugins/help/js/i18n/keynav/sv_SE.js +90 -0
  78. package/tinymce-assets/plugins/help/js/i18n/keynav/th_TH.js +90 -0
  79. package/tinymce-assets/plugins/help/js/i18n/keynav/tr.js +90 -0
  80. package/tinymce-assets/plugins/help/js/i18n/keynav/uk.js +90 -0
  81. package/tinymce-assets/plugins/help/js/i18n/keynav/vi.js +90 -0
  82. package/tinymce-assets/plugins/help/js/i18n/keynav/zh_CN.js +84 -0
  83. package/tinymce-assets/plugins/help/js/i18n/keynav/zh_TW.js +90 -0
  84. package/tinymce-assets/plugins/help/plugin.js +411 -355
  85. package/tinymce-assets/plugins/help/plugin.min.js +2 -7
  86. package/tinymce-assets/plugins/image/plugin.js +876 -1037
  87. package/tinymce-assets/plugins/image/plugin.min.js +2 -7
  88. package/tinymce-assets/plugins/importcss/plugin.js +146 -144
  89. package/tinymce-assets/plugins/importcss/plugin.min.js +2 -7
  90. package/tinymce-assets/plugins/insertdatetime/plugin.js +93 -88
  91. package/tinymce-assets/plugins/insertdatetime/plugin.min.js +2 -7
  92. package/tinymce-assets/plugins/link/plugin.js +718 -768
  93. package/tinymce-assets/plugins/link/plugin.min.js +2 -7
  94. package/tinymce-assets/plugins/lists/plugin.js +1235 -1375
  95. package/tinymce-assets/plugins/lists/plugin.min.js +2 -7
  96. package/tinymce-assets/plugins/media/plugin.js +614 -756
  97. package/tinymce-assets/plugins/media/plugin.min.js +2 -7
  98. package/tinymce-assets/plugins/nonbreaking/plugin.js +71 -48
  99. package/tinymce-assets/plugins/nonbreaking/plugin.min.js +2 -7
  100. package/tinymce-assets/plugins/pagebreak/plugin.js +53 -40
  101. package/tinymce-assets/plugins/pagebreak/plugin.min.js +2 -7
  102. package/tinymce-assets/plugins/preview/plugin.js +36 -65
  103. package/tinymce-assets/plugins/preview/plugin.min.js +2 -7
  104. package/tinymce-assets/plugins/quickbars/plugin.js +304 -331
  105. package/tinymce-assets/plugins/quickbars/plugin.min.js +2 -7
  106. package/tinymce-assets/plugins/save/plugin.js +49 -50
  107. package/tinymce-assets/plugins/save/plugin.min.js +2 -7
  108. package/tinymce-assets/plugins/searchreplace/plugin.js +499 -571
  109. package/tinymce-assets/plugins/searchreplace/plugin.min.js +2 -7
  110. package/tinymce-assets/plugins/table/plugin.js +2572 -10617
  111. package/tinymce-assets/plugins/table/plugin.min.js +2 -7
  112. package/tinymce-assets/plugins/visualblocks/plugin.js +41 -46
  113. package/tinymce-assets/plugins/visualblocks/plugin.min.js +2 -7
  114. package/tinymce-assets/plugins/visualchars/plugin.js +346 -312
  115. package/tinymce-assets/plugins/visualchars/plugin.min.js +2 -7
  116. package/tinymce-assets/plugins/wordcount/plugin.js +159 -179
  117. package/tinymce-assets/plugins/wordcount/plugin.min.js +2 -7
  118. package/tinymce-assets/skins/content/dark/content.css +2 -8
  119. package/tinymce-assets/skins/content/dark/content.js +2 -0
  120. package/tinymce-assets/skins/content/dark/content.min.css +1 -7
  121. package/tinymce-assets/skins/content/default/content.css +0 -6
  122. package/tinymce-assets/skins/content/default/content.js +2 -0
  123. package/tinymce-assets/skins/content/default/content.min.css +0 -6
  124. package/tinymce-assets/skins/content/document/content.css +0 -6
  125. package/tinymce-assets/skins/content/document/content.js +2 -0
  126. package/tinymce-assets/skins/content/document/content.min.css +0 -6
  127. package/tinymce-assets/skins/content/tinymce-5/content.css +61 -0
  128. package/tinymce-assets/skins/content/tinymce-5/content.js +2 -0
  129. package/tinymce-assets/skins/content/tinymce-5/content.min.css +1 -0
  130. package/tinymce-assets/skins/content/tinymce-5-dark/content.css +66 -0
  131. package/tinymce-assets/skins/content/tinymce-5-dark/content.js +2 -0
  132. package/tinymce-assets/skins/content/tinymce-5-dark/content.min.css +1 -0
  133. package/tinymce-assets/skins/content/writer/content.css +0 -6
  134. package/tinymce-assets/skins/content/writer/content.js +2 -0
  135. package/tinymce-assets/skins/content/writer/content.min.css +0 -6
  136. package/tinymce-assets/skins/ui/oxide/content.css +73 -20
  137. package/tinymce-assets/skins/ui/oxide/content.inline.css +73 -20
  138. package/tinymce-assets/skins/ui/oxide/content.inline.js +2 -0
  139. package/tinymce-assets/skins/ui/oxide/content.inline.min.css +1 -7
  140. package/tinymce-assets/skins/ui/oxide/content.js +2 -0
  141. package/tinymce-assets/skins/ui/oxide/content.min.css +1 -7
  142. package/tinymce-assets/skins/ui/oxide/skin.css +1480 -435
  143. package/tinymce-assets/skins/ui/oxide/skin.js +2 -0
  144. package/tinymce-assets/skins/ui/oxide/skin.min.css +1 -7
  145. package/tinymce-assets/skins/ui/oxide/skin.shadowdom.css +1 -8
  146. package/tinymce-assets/skins/ui/oxide/skin.shadowdom.js +2 -0
  147. package/tinymce-assets/skins/ui/oxide/skin.shadowdom.min.css +1 -7
  148. package/tinymce-assets/skins/ui/oxide-dark/content.css +71 -19
  149. package/tinymce-assets/skins/ui/oxide-dark/content.inline.css +73 -20
  150. package/tinymce-assets/skins/ui/oxide-dark/content.inline.js +2 -0
  151. package/tinymce-assets/skins/ui/oxide-dark/content.inline.min.css +1 -7
  152. package/tinymce-assets/skins/ui/oxide-dark/content.js +2 -0
  153. package/tinymce-assets/skins/ui/oxide-dark/content.min.css +1 -7
  154. package/tinymce-assets/skins/ui/oxide-dark/skin.css +1498 -450
  155. package/tinymce-assets/skins/ui/oxide-dark/skin.js +2 -0
  156. package/tinymce-assets/skins/ui/oxide-dark/skin.min.css +1 -7
  157. package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.css +1 -8
  158. package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
  159. package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -7
  160. package/tinymce-assets/skins/ui/tinymce-5/content.css +785 -0
  161. package/tinymce-assets/skins/ui/tinymce-5/content.inline.css +779 -0
  162. package/tinymce-assets/skins/ui/tinymce-5/content.inline.js +2 -0
  163. package/tinymce-assets/skins/ui/tinymce-5/content.inline.min.css +1 -0
  164. package/tinymce-assets/skins/ui/tinymce-5/content.js +2 -0
  165. package/tinymce-assets/skins/ui/tinymce-5/content.min.css +1 -0
  166. package/tinymce-assets/skins/ui/tinymce-5/skin.css +4185 -0
  167. package/tinymce-assets/skins/ui/tinymce-5/skin.js +2 -0
  168. package/tinymce-assets/skins/ui/tinymce-5/skin.min.css +1 -0
  169. package/tinymce-assets/skins/ui/tinymce-5/skin.shadowdom.css +30 -0
  170. package/tinymce-assets/skins/ui/tinymce-5/skin.shadowdom.js +2 -0
  171. package/tinymce-assets/skins/ui/tinymce-5/skin.shadowdom.min.css +1 -0
  172. package/tinymce-assets/skins/ui/tinymce-5-dark/content.css +766 -0
  173. package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.css +779 -0
  174. package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.js +2 -0
  175. package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.min.css +1 -0
  176. package/tinymce-assets/skins/ui/tinymce-5-dark/content.js +2 -0
  177. package/tinymce-assets/skins/ui/tinymce-5-dark/content.min.css +1 -0
  178. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.css +4185 -0
  179. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.js +2 -0
  180. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.min.css +1 -0
  181. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.shadowdom.css +30 -0
  182. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.shadowdom.js +2 -0
  183. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +1 -0
  184. package/tinymce-assets/themes/silver/theme.js +25226 -28188
  185. package/tinymce-assets/themes/silver/theme.min.js +2 -7
  186. package/tinymce-assets/plugins/bbcode/index.js +0 -7
  187. package/tinymce-assets/plugins/bbcode/plugin.js +0 -99
  188. package/tinymce-assets/plugins/bbcode/plugin.min.js +0 -9
  189. package/tinymce-assets/plugins/colorpicker/index.js +0 -7
  190. package/tinymce-assets/plugins/colorpicker/plugin.js +0 -21
  191. package/tinymce-assets/plugins/colorpicker/plugin.min.js +0 -9
  192. package/tinymce-assets/plugins/contextmenu/index.js +0 -7
  193. package/tinymce-assets/plugins/contextmenu/plugin.js +0 -21
  194. package/tinymce-assets/plugins/contextmenu/plugin.min.js +0 -9
  195. package/tinymce-assets/plugins/fullpage/index.js +0 -7
  196. package/tinymce-assets/plugins/fullpage/plugin.js +0 -544
  197. package/tinymce-assets/plugins/fullpage/plugin.min.js +0 -9
  198. package/tinymce-assets/plugins/hr/index.js +0 -7
  199. package/tinymce-assets/plugins/hr/plugin.js +0 -45
  200. package/tinymce-assets/plugins/hr/plugin.min.js +0 -9
  201. package/tinymce-assets/plugins/imagetools/index.js +0 -7
  202. package/tinymce-assets/plugins/imagetools/plugin.js +0 -1531
  203. package/tinymce-assets/plugins/imagetools/plugin.min.js +0 -9
  204. package/tinymce-assets/plugins/legacyoutput/index.js +0 -7
  205. package/tinymce-assets/plugins/legacyoutput/plugin.js +0 -199
  206. package/tinymce-assets/plugins/legacyoutput/plugin.min.js +0 -9
  207. package/tinymce-assets/plugins/noneditable/index.js +0 -7
  208. package/tinymce-assets/plugins/noneditable/plugin.js +0 -117
  209. package/tinymce-assets/plugins/noneditable/plugin.min.js +0 -9
  210. package/tinymce-assets/plugins/paste/index.js +0 -7
  211. package/tinymce-assets/plugins/paste/plugin.js +0 -1803
  212. package/tinymce-assets/plugins/paste/plugin.min.js +0 -9
  213. package/tinymce-assets/plugins/print/index.js +0 -7
  214. package/tinymce-assets/plugins/print/plugin.js +0 -52
  215. package/tinymce-assets/plugins/print/plugin.min.js +0 -9
  216. package/tinymce-assets/plugins/spellchecker/index.js +0 -7
  217. package/tinymce-assets/plugins/spellchecker/plugin.js +0 -730
  218. package/tinymce-assets/plugins/spellchecker/plugin.min.js +0 -9
  219. package/tinymce-assets/plugins/tabfocus/index.js +0 -7
  220. package/tinymce-assets/plugins/tabfocus/plugin.js +0 -130
  221. package/tinymce-assets/plugins/tabfocus/plugin.min.js +0 -9
  222. package/tinymce-assets/plugins/template/index.js +0 -7
  223. package/tinymce-assets/plugins/template/plugin.js +0 -591
  224. package/tinymce-assets/plugins/template/plugin.min.js +0 -9
  225. package/tinymce-assets/plugins/textcolor/index.js +0 -7
  226. package/tinymce-assets/plugins/textcolor/plugin.js +0 -21
  227. package/tinymce-assets/plugins/textcolor/plugin.min.js +0 -9
  228. package/tinymce-assets/plugins/textpattern/index.js +0 -7
  229. package/tinymce-assets/plugins/textpattern/plugin.js +0 -1374
  230. package/tinymce-assets/plugins/textpattern/plugin.min.js +0 -9
  231. package/tinymce-assets/plugins/toc/index.js +0 -7
  232. package/tinymce-assets/plugins/toc/plugin.js +0 -238
  233. package/tinymce-assets/plugins/toc/plugin.min.js +0 -9
  234. package/tinymce-assets/skins/ui/oxide/content.mobile.css +0 -29
  235. package/tinymce-assets/skins/ui/oxide/content.mobile.min.css +0 -7
  236. package/tinymce-assets/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
  237. package/tinymce-assets/skins/ui/oxide/skin.mobile.css +0 -673
  238. package/tinymce-assets/skins/ui/oxide/skin.mobile.min.css +0 -7
  239. package/tinymce-assets/skins/ui/oxide-dark/content.mobile.css +0 -29
  240. package/tinymce-assets/skins/ui/oxide-dark/content.mobile.min.css +0 -7
  241. package/tinymce-assets/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
  242. package/tinymce-assets/skins/ui/oxide-dark/skin.mobile.css +0 -673
  243. package/tinymce-assets/skins/ui/oxide-dark/skin.mobile.min.css +0 -7
  244. package/tinymce-assets/themes/mobile/index.js +0 -7
  245. package/tinymce-assets/themes/mobile/theme.js +0 -13130
  246. package/tinymce-assets/themes/mobile/theme.min.js +0 -9
@@ -1,9 +1,4 @@
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.10.9 (2023-11-15)
2
+ * TinyMCE version 7.0.1 (2024-04-10)
8
3
  */
9
- !function(){"use strict";function n(t){return function(n){return typeof n===t}}function i(n){return function(){return n}}function t(n){return n}function e(){return l}var o,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(n){return e=typeof(t=n),(null===t?"null":"object"==e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e)===o;var t,e},c=n("boolean"),a=n("number"),s=i(!(o="string")),f=i(!0),l={fold:function(n,t){return n()},isSome:s,isNone:f,getOr:t,getOrThunk:d,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(void 0),or:t,orThunk:d,map:e,each:function(){},bind:e,exists:s,forall:f,filter:function(){return l},toArray:function(){return[]},toString:i("none()")};function d(n){return n()}function m(n,t){for(var e=0,o=n.length;e<o;e++)t(n[e],e)}function v(n,t){for(var e=h(n),o=0,r=e.length;o<r;o++){var i=e[o];t(n[i],i)}}var g=function(e){function n(){return r}function t(n){return n(e)}var o=i(e),r={fold:function(n,t){return t(e)},isSome:f,isNone:s,getOr:o,getOrThunk:o,getOrDie:o,getOrNull:o,getOrUndefined:o,or:n,orThunk:n,map:function(n){return g(n(e))},each:function(n){n(e)},bind:t,exists:t,forall:t,filter:function(n){return n(e)?r:l},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return r},h=Object.keys;function p(n){return n.dom.nodeValue}function y(n,t,e){!function(n,t,e){if(!(u(e)||c(e)||a(e)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",e,":: Element ",n),new Error("Attribute value was not simple");n.setAttribute(t,e+"")}(n.dom,t,e)}function b(n,t){n.dom.removeAttribute(t)}function w(n,t){var e,o=null===(e=n.dom.getAttribute(t))?void 0:e;return void 0===o||""===o?[]:o.split(" ")}function T(n){return void 0!==n.dom.classList}function k(n,t){return i=t,0<(o=function(n){for(var t=[],e=0,o=n.length;e<o;e++){var r=n[e];r!==i&&t.push(r)}return t}(w(e=n,"class"))).length?y(e,"class",o.join(" ")):b(e,"class"),0;var e,i,o}function N(n,t){var e="";return v(n,function(n,t){e+=t}),new RegExp("["+e+"]",t?"g":"")}function A(n){return'<span data-mce-bogus="1" class="mce-'+H[n]+'">'+n+"</span>"}function O(n){var t=p(n);return j(n)&&void 0!==t&&_.test(t)}function C(n){return"span"===n.nodeName.toLowerCase()&&n.classList.contains("mce-nbsp-wrap")}function S(f,n){m(K(M.fromDom(n),O),function(n){var t,e,o,r,i,u=n.dom.parentNode;if(C(u))t=M.fromDom(u),e=U,T(t)?t.dom.classList.add(e):(r=e,i=w(o=t,"class").concat([r]),y(o,"class",i.join(" ")));else{for(var c,a=f.dom.encode(p(n)).replace(F,A),s=f.dom.create("div",null,a);c=s.lastChild;)f.dom.insertAfter(c,n.dom);f.dom.remove(n.dom)}})}function D(r,n){m(r.dom.select(I,n),function(n){var t,e,o;C(n)?(t=M.fromDom(n),e=U,T(t)?t.dom.classList.remove(e):k(t,e),0===(T(o=t)?o.dom.classList:w(o,"class")).length&&b(o,"class")):r.dom.remove(n,!0)})}function E(n){var t=n.getBody(),e=n.selection.getBookmark(),o=function(n,t){for(;n.parentNode;){if(n.parentNode===t)return n;n=n.parentNode}}(n.selection.getNode(),t);D(n,o=void 0!==o?o:t),S(n,o),n.selection.moveToBookmark(e)}function L(n,t){var e=n,o=t.get();e.fire("VisualChars",{state:o});var r=n.getBody();(!0===t.get()?S:D)(n,r)}function x(n,t){n.addCommand("mceVisualChars",function(){!function(n,t){t.set(!t.get());var e=n.selection.getBookmark();L(n,t),n.selection.moveToBookmark(e)}(n,t)})}function B(e,o){return function(t){function n(n){return t.setActive(n.state)}return t.setActive(o.get()),e.on("VisualChars",n),function(){return e.off("VisualChars",n)}}}"undefined"!=typeof window||Function("return this;")();function P(n){if(null==n)throw new Error("Node cannot be null or undefined");return{dom:n}}var V,j=function(n){return 3===n.dom.nodeType},M={fromHtml:function(n,t){var e=(t||document).createElement("div");if(e.innerHTML=n,!e.hasChildNodes()||1<e.childNodes.length)throw console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return P(e.childNodes[0])},fromTag:function(n,t){var e=(t||document).createElement(n);return P(e)},fromText:function(n,t){var e=(t||document).createTextNode(n);return P(e)},fromDom:P,fromPoint:function(n,t,e){return(null==(o=n.dom.elementFromPoint(t,e))?l:g(o)).map(P);var o}},H={"\xa0":"nbsp","\xad":"shy"},_=N(H),F=N(H,!0),I=(V="",v(H,function(n){V&&(V+=","),V+="span.mce-"+n}),V),U="mce-nbsp",K=function(n,t){var e=[];return m(function(n,t){for(var e=n.length,o=new Array(e),r=0;r<e;r++){var i=n[r];o[r]=t(i,r)}return o}(n.dom.childNodes,M.fromDom),function(n){e=(e=t(n)?e.concat([n]):e).concat(K(n,t))}),e},R=tinymce.util.Tools.resolve("tinymce.util.Delay");r.add("visualchars",function(n){var t,e,o,r,i,u,c,a,s,f,l=(t=n.getParam("visualchars_default_state",!1),e=t,{get:function(){return e},set:function(n){e=n}});function d(){return o.execCommand("mceVisualChars")}return x(n,l),(o=n).ui.registry.addToggleButton("visualchars",{tooltip:"Show invisible characters",icon:"visualchars",onAction:d,onSetup:B(o,r=l)}),o.ui.registry.addToggleMenuItem("visualchars",{text:"Show invisible characters",icon:"visualchars",onAction:d,onSetup:B(o,r)}),i=n,u=l,c=R.debounce(function(){E(i)},300),!1!==i.getParam("forced_root_block")&&i.on("keydown",function(n){!0===u.get()&&(13===n.keyCode?E(i):c())}),i.on("remove",c.stop),s=l,(a=n).on("init",function(){L(a,s)}),f=l,{isEnabled:function(){return f.get()}}})}();
4
+ !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=t=>e=>(t=>{const e=typeof t;return null===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(n=o=t,(r=String).prototype.isPrototypeOf(n)||(null===(s=o.constructor)||void 0===s?void 0:s.name)===r.name)?"string":e;var n,o,r,s})(e)===t,n=t=>e=>typeof e===t,o=e("string"),r=e("object"),s=(null,t=>null===t);const a=n("boolean"),l=n("number");class i{constructor(t,e){this.tag=t,this.value=e}static some(t){return new i(!0,t)}static none(){return i.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?i.some(t(this.value)):i.none()}bind(t){return this.tag?t(this.value):i.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:i.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")}static from(t){return null==t?i.none():i.some(t)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}i.singletonNone=new i(!1);const u=(t,e)=>{for(let n=0,o=t.length;n<o;n++)e(t[n],n)},c=Object.keys,d=(t,e)=>{const n=c(t);for(let o=0,r=n.length;o<r;o++){const r=n[o];e(t[r],r)}},h="undefined"!=typeof window?window:Function("return this;")(),m=(t,e)=>((t,e)=>{let n=null!=e?e:h;for(let e=0;e<t.length&&null!=n;++e)n=n[t[e]];return n})(t.split("."),e),g=Object.getPrototypeOf,v=t=>{const e=m("ownerDocument.defaultView",t);return r(t)&&((t=>((t,e)=>{const n=((t,e)=>m(t,e))(t,e);if(null==n)throw new Error(t+" not available on this browser");return n})("HTMLElement",t))(e).prototype.isPrototypeOf(t)||/^HTML\w*Element$/.test(g(t).constructor.name))},f=t=>t.dom.nodeValue,p=t=>e=>(t=>t.dom.nodeType)(e)===t,b=t=>w(t)&&v(t.dom),w=p(1),y=p(3),A=(t,e,n)=>{((t,e,n)=>{if(!(o(n)||a(n)||l(n)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")})(t.dom,e,n)},k=(t,e)=>{t.dom.removeAttribute(e)},N=(t,e)=>{const n=((t,e)=>{const n=t.dom.getAttribute(e);return null===n?void 0:n})(t,e);return void 0===n||""===n?[]:n.split(" ")},T=t=>void 0!==t.dom.classList,C=t=>{if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}},E=C,O={"\xa0":"nbsp","\xad":"shy"},L=(t,e)=>{let n="";return d(t,((t,e)=>{n+=e})),new RegExp("["+n+"]",e?"g":"")},V=L(O),j=L(O,!0),B=(t=>{let e="";return d(t,(t=>{e&&(e+=","),e+="span.mce-"+t})),e})(O),S="mce-nbsp",_=t=>t.dom.contentEditable,x=t=>'<span data-mce-bogus="1" class="mce-'+O[t]+'">'+t+"</span>",M=t=>"span"===t.nodeName.toLowerCase()&&t.classList.contains("mce-nbsp-wrap"),P=t=>{const e=f(t);return y(t)&&o(e)&&V.test(e)},D=(t,e,n)=>{let o=[];const r=((t,e)=>{const n=t.length,o=new Array(n);for(let r=0;r<n;r++){const n=t[r];o[r]=e(n,r)}return o})(t.dom.childNodes,E);return u(r,(t=>{var r;n&&(M((r=t).dom)||!(t=>b(t)&&"false"===_(t))(r))&&e(t)&&(o=o.concat([t])),o=o.concat(D(t,e,((t,e)=>{if(b(t)&&!M(t.dom)){const e=_(t);if("true"===e)return!0;if("false"===e)return!1}return e})(t,n)))})),o},H=(t,e)=>{const n=t.dom,o=D(E(e),P,t.dom.isEditable(e));u(o,(e=>{var o;const r=e.dom.parentNode;if(M(r))s=E(r),a=S,T(s)?s.dom.classList.add(a):((t,e)=>{((t,e,n)=>{const o=N(t,e).concat([n]);A(t,e,o.join(" "))})(t,"class",e)})(s,a);else{const r=n.encode(null!==(o=f(e))&&void 0!==o?o:"").replace(j,x),s=n.create("div",{},r);let a;for(;a=s.lastChild;)n.insertAfter(a,e.dom);t.dom.remove(e.dom)}var s,a}))},I=(t,e)=>{const n=t.dom.select(B,e);u(n,(e=>{var n,o;M(e)?(n=E(e),o=S,T(n)?n.dom.classList.remove(o):((t,e)=>{((t,e,n)=>{const o=((t,e)=>{const o=[];for(let e=0,r=t.length;e<r;e++){const r=t[e];r!==n&&o.push(r)}return o})(N(t,e));o.length>0?A(t,e,o.join(" ")):k(t,e)})(t,"class",e)})(n,o),(t=>{const e=T(t)?t.dom.classList:(t=>N(t,"class"))(t);0===e.length&&k(t,"class")})(n)):t.dom.remove(e,!0)}))},$=t=>{const e=t.getBody(),n=t.selection.getBookmark();let o=((t,e)=>{for(;t.parentNode;){if(t.parentNode===e)return e;t=t.parentNode}})(t.selection.getNode(),e);o=void 0!==o?o:e,I(t,o),H(t,o),t.selection.moveToBookmark(n)},F=(t,e)=>{((t,e)=>{t.dispatch("VisualChars",{state:e})})(t,e.get());const n=t.getBody();!0===e.get()?H(t,n):I(t,n)},K=("visualchars_default_state",t=>t.options.get("visualchars_default_state"));const R=(t,e)=>{const n=((t,e)=>{let n=null;return{cancel:()=>{s(n)||(clearTimeout(n),n=null)},throttle:(...e)=>{s(n)&&(n=setTimeout((()=>{n=null,t.apply(null,e)}),300))}}})((()=>{$(t)}));t.on("keydown",(o=>{!0===e.get()&&(13===o.keyCode?$(t):n.throttle())})),t.on("remove",n.cancel)},U=(t,e)=>n=>{n.setActive(e.get());const o=t=>n.setActive(t.state);return t.on("VisualChars",o),()=>t.off("VisualChars",o)};t.add("visualchars",(t=>{(t=>{(0,t.options.register)("visualchars_default_state",{processor:"boolean",default:!1})})(t);const e=(t=>{let e=t;return{get:()=>e,set:t=>{e=t}}})(K(t));return((t,e)=>{t.addCommand("mceVisualChars",(()=>{((t,e)=>{e.set(!e.get());const n=t.selection.getBookmark();F(t,e),t.selection.moveToBookmark(n)})(t,e)}))})(t,e),((t,e)=>{const n=()=>t.execCommand("mceVisualChars");t.ui.registry.addToggleButton("visualchars",{tooltip:"Show invisible characters",icon:"visualchars",onAction:n,onSetup:U(t,e)}),t.ui.registry.addToggleMenuItem("visualchars",{text:"Show invisible characters",icon:"visualchars",onAction:n,onSetup:U(t,e)})})(t,e),R(t,e),((t,e)=>{t.on("init",(()=>{F(t,e)}))})(t,e),(t=>({isEnabled:()=>t.get()}))(e)}))}();
@@ -1,52 +1,33 @@
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.10.9 (2023-11-15)
2
+ * TinyMCE version 7.0.1 (2024-04-10)
8
3
  */
4
+
9
5
  (function () {
10
6
  'use strict';
11
7
 
12
8
  var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
9
 
14
- var identity = function (x) {
15
- return x;
16
- };
17
-
18
- var __assign = function () {
19
- __assign = Object.assign || function __assign(t) {
20
- for (var s, i = 1, n = arguments.length; i < n; i++) {
21
- s = arguments[i];
22
- for (var p in s)
23
- if (Object.prototype.hasOwnProperty.call(s, p))
24
- t[p] = s[p];
25
- }
26
- return t;
27
- };
28
- return __assign.apply(this, arguments);
29
- };
10
+ const eq = t => a => t === a;
11
+ const isNull = eq(null);
30
12
 
31
- var zeroWidth = '\uFEFF';
32
- var removeZwsp$1 = function (s) {
33
- return s.replace(/\uFEFF/g, '');
13
+ const identity = x => {
14
+ return x;
34
15
  };
35
16
 
36
- var map = function (xs, f) {
37
- var len = xs.length;
38
- var r = new Array(len);
39
- for (var i = 0; i < len; i++) {
40
- var x = xs[i];
17
+ const map = (xs, f) => {
18
+ const len = xs.length;
19
+ const r = new Array(len);
20
+ for (let i = 0; i < len; i++) {
21
+ const x = xs[i];
41
22
  r[i] = f(x, i);
42
23
  }
43
24
  return r;
44
25
  };
45
26
 
46
- var punctuationStr = '[!-#%-*,-\\/:;?@\\[-\\]_{}\xA1\xAB\xB7\xBB\xBF;\xB7\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1361-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u3008\u3009\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30\u2E31\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uff3f\uFF5B\uFF5D\uFF5F-\uFF65]';
47
- var regExps = {
27
+ const punctuationStr = `[~\u2116|!-*+-\\/:;?@\\[-\`{}\u00A1\u00AB\u00B7\u00BB\u00BF;\u00B7\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1361-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u3008\u3009\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30\u2E31\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]`;
28
+ const regExps = {
48
29
  aletter: '[A-Za-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05F3\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u10a0-\u10c5\u10d0-\u10fa\u10fc\u1100-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bc0-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u24B6-\u24E9\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2d00-\u2d25\u2d30-\u2d65\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005\u303b\u303c\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790\ua791\ua7a0-\ua7a9\ua7fa-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uffa0-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]',
49
- midnumlet: '[-\'\\.\u2018\u2019\u2024\uFE52\uFF07\uFF0E]',
30
+ midnumlet: `[-'\\.\u2018\u2019\u2024\uFE52\uFF07\uFF0E]`,
50
31
  midletter: '[:\xB7\xB7\u05F4\u2027\uFE13\uFE55\uFF1A]',
51
32
  midnum: '[\xB1+*/,;;\u0589\u060C\u060D\u066C\u07F8\u2044\uFE10\uFE14\uFE50\uFE54\uFF0C\uFF1B]',
52
33
  numeric: '[0-9\u0660-\u0669\u066B\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9]',
@@ -59,7 +40,7 @@
59
40
  extendnumlet: '[=_\u203f\u2040\u2054\ufe33\ufe34\ufe4d-\ufe4f\uff3f\u2200-\u22FF<>]',
60
41
  punctuation: punctuationStr
61
42
  };
62
- var characterIndices = {
43
+ const characterIndices = {
63
44
  ALETTER: 0,
64
45
  MIDNUMLET: 1,
65
46
  MIDLETTER: 2,
@@ -75,7 +56,7 @@
75
56
  AT: 12,
76
57
  OTHER: 13
77
58
  };
78
- var SETS$1 = [
59
+ const SETS$1 = [
79
60
  new RegExp(regExps.aletter),
80
61
  new RegExp(regExps.midnumlet),
81
62
  new RegExp(regExps.midletter),
@@ -90,17 +71,17 @@
90
71
  new RegExp(regExps.extendnumlet),
91
72
  new RegExp('@')
92
73
  ];
93
- var EMPTY_STRING$1 = '';
94
- var PUNCTUATION$1 = new RegExp('^' + regExps.punctuation + '$');
95
- var WHITESPACE$1 = /^\s+$/;
74
+ const EMPTY_STRING$1 = '';
75
+ const PUNCTUATION$1 = new RegExp('^' + regExps.punctuation + '$');
76
+ const WHITESPACE$1 = /^\s+$/;
96
77
 
97
- var SETS = SETS$1;
98
- var OTHER = characterIndices.OTHER;
99
- var getType = function (char) {
100
- var type = OTHER;
101
- var setsLength = SETS.length;
102
- for (var j = 0; j < setsLength; ++j) {
103
- var set = SETS[j];
78
+ const SETS = SETS$1;
79
+ const OTHER = characterIndices.OTHER;
80
+ const getType = char => {
81
+ let type = OTHER;
82
+ const setsLength = SETS.length;
83
+ for (let j = 0; j < setsLength; ++j) {
84
+ const set = SETS[j];
104
85
  if (set && set.test(char)) {
105
86
  type = j;
106
87
  break;
@@ -108,37 +89,37 @@
108
89
  }
109
90
  return type;
110
91
  };
111
- var memoize = function (func) {
112
- var cache = {};
113
- return function (char) {
92
+ const memoize = func => {
93
+ const cache = {};
94
+ return char => {
114
95
  if (cache[char]) {
115
96
  return cache[char];
116
97
  } else {
117
- var result = func(char);
98
+ const result = func(char);
118
99
  cache[char] = result;
119
100
  return result;
120
101
  }
121
102
  };
122
103
  };
123
- var classify = function (characters) {
124
- var memoized = memoize(getType);
104
+ const classify = characters => {
105
+ const memoized = memoize(getType);
125
106
  return map(characters, memoized);
126
107
  };
127
108
 
128
- var isWordBoundary = function (map, index) {
129
- var type = map[index];
130
- var nextType = map[index + 1];
109
+ const isWordBoundary = (map, index) => {
110
+ const type = map[index];
111
+ const nextType = map[index + 1];
131
112
  if (index < 0 || index > map.length - 1 && index !== 0) {
132
113
  return false;
133
114
  }
134
115
  if (type === characterIndices.ALETTER && nextType === characterIndices.ALETTER) {
135
116
  return false;
136
117
  }
137
- var nextNextType = map[index + 2];
118
+ const nextNextType = map[index + 2];
138
119
  if (type === characterIndices.ALETTER && (nextType === characterIndices.MIDLETTER || nextType === characterIndices.MIDNUMLET || nextType === characterIndices.AT) && nextNextType === characterIndices.ALETTER) {
139
120
  return false;
140
121
  }
141
- var prevType = map[index - 1];
122
+ const prevType = map[index - 1];
142
123
  if ((type === characterIndices.MIDLETTER || type === characterIndices.MIDNUMLET || nextType === characterIndices.AT) && nextType === characterIndices.ALETTER && prevType === characterIndices.ALETTER) {
143
124
  return false;
144
125
  }
@@ -151,7 +132,7 @@
151
132
  if (type === characterIndices.NUMERIC && (nextType === characterIndices.MIDNUM || nextType === characterIndices.MIDNUMLET) && nextNextType === characterIndices.NUMERIC) {
152
133
  return false;
153
134
  }
154
- if (type === characterIndices.EXTEND || type === characterIndices.FORMAT || prevType === characterIndices.EXTEND || prevType === characterIndices.FORMAT || nextType === characterIndices.EXTEND || nextType === characterIndices.FORMAT) {
135
+ if ((type === characterIndices.EXTEND || type === characterIndices.FORMAT) && (nextType === characterIndices.ALETTER || nextType === characterIndices.NUMERIC || nextType === characterIndices.KATAKANA || nextType === characterIndices.EXTEND || nextType === characterIndices.FORMAT) || (nextType === characterIndices.EXTEND || nextType === characterIndices.FORMAT && (nextNextType === characterIndices.ALETTER || nextNextType === characterIndices.NUMERIC || nextNextType === characterIndices.KATAKANA || nextNextType === characterIndices.EXTEND || nextNextType === characterIndices.FORMAT)) && (type === characterIndices.ALETTER || type === characterIndices.NUMERIC || type === characterIndices.KATAKANA || type === characterIndices.EXTEND || type === characterIndices.FORMAT)) {
155
136
  return false;
156
137
  }
157
138
  if (type === characterIndices.CR && nextType === characterIndices.LF) {
@@ -178,14 +159,12 @@
178
159
  return true;
179
160
  };
180
161
 
181
- var EMPTY_STRING = EMPTY_STRING$1;
182
- var WHITESPACE = WHITESPACE$1;
183
- var PUNCTUATION = PUNCTUATION$1;
184
- var isProtocol = function (str) {
185
- return str === 'http' || str === 'https';
186
- };
187
- var findWordEnd = function (characters, startIndex) {
188
- var i;
162
+ const EMPTY_STRING = EMPTY_STRING$1;
163
+ const WHITESPACE = WHITESPACE$1;
164
+ const PUNCTUATION = PUNCTUATION$1;
165
+ const isProtocol = str => str === 'http' || str === 'https';
166
+ const findWordEnd = (characters, startIndex) => {
167
+ let i;
189
168
  for (i = startIndex; i < characters.length; i++) {
190
169
  if (WHITESPACE.test(characters[i])) {
191
170
  break;
@@ -193,73 +172,76 @@
193
172
  }
194
173
  return i;
195
174
  };
196
- var findUrlEnd = function (characters, startIndex) {
197
- var endIndex = findWordEnd(characters, startIndex + 1);
198
- var peakedWord = characters.slice(startIndex + 1, endIndex).join(EMPTY_STRING);
175
+ const findUrlEnd = (characters, startIndex) => {
176
+ const endIndex = findWordEnd(characters, startIndex + 1);
177
+ const peakedWord = characters.slice(startIndex + 1, endIndex).join(EMPTY_STRING);
199
178
  return peakedWord.substr(0, 3) === '://' ? endIndex : startIndex;
200
179
  };
201
- var findWords = function (chars, sChars, characterMap, options) {
202
- var words = [];
203
- var word = [];
204
- for (var i = 0; i < characterMap.length; ++i) {
180
+ const findWordsWithIndices = (chars, sChars, characterMap, options) => {
181
+ const words = [];
182
+ const indices = [];
183
+ let word = [];
184
+ for (let i = 0; i < characterMap.length; ++i) {
205
185
  word.push(chars[i]);
206
186
  if (isWordBoundary(characterMap, i)) {
207
- var ch = sChars[i];
187
+ const ch = sChars[i];
208
188
  if ((options.includeWhitespace || !WHITESPACE.test(ch)) && (options.includePunctuation || !PUNCTUATION.test(ch))) {
209
- var startOfWord = i - word.length + 1;
210
- var endOfWord = i + 1;
211
- var str = sChars.slice(startOfWord, endOfWord).join(EMPTY_STRING);
189
+ const startOfWord = i - word.length + 1;
190
+ const endOfWord = i + 1;
191
+ const str = sChars.slice(startOfWord, endOfWord).join(EMPTY_STRING);
212
192
  if (isProtocol(str)) {
213
- var endOfUrl = findUrlEnd(sChars, i);
214
- var url = chars.slice(endOfWord, endOfUrl);
193
+ const endOfUrl = findUrlEnd(sChars, i);
194
+ const url = chars.slice(endOfWord, endOfUrl);
215
195
  Array.prototype.push.apply(word, url);
216
196
  i = endOfUrl;
217
197
  }
218
198
  words.push(word);
199
+ indices.push({
200
+ start: startOfWord,
201
+ end: endOfWord
202
+ });
219
203
  }
220
204
  word = [];
221
205
  }
222
206
  }
223
- return words;
224
- };
225
- var getDefaultOptions = function () {
226
207
  return {
227
- includeWhitespace: false,
228
- includePunctuation: false
208
+ words,
209
+ indices
229
210
  };
230
211
  };
231
- var getWords$1 = function (chars, extract, options) {
232
- options = __assign(__assign({}, getDefaultOptions()), options);
233
- var filteredChars = [];
234
- var extractedChars = [];
235
- for (var i = 0; i < chars.length; i++) {
236
- var ch = extract(chars[i]);
237
- if (ch !== zeroWidth) {
238
- filteredChars.push(chars[i]);
239
- extractedChars.push(ch);
240
- }
241
- }
242
- var characterMap = classify(extractedChars);
243
- return findWords(filteredChars, extractedChars, characterMap, options);
212
+ const getDefaultOptions = () => ({
213
+ includeWhitespace: false,
214
+ includePunctuation: false
215
+ });
216
+ const getWordsWithIndices = (chars, extract, options) => {
217
+ options = {
218
+ ...getDefaultOptions(),
219
+ ...options
220
+ };
221
+ const extractedChars = map(chars, extract);
222
+ const characterMap = classify(extractedChars);
223
+ return findWordsWithIndices(chars, extractedChars, characterMap, options);
244
224
  };
225
+ const getWords$1 = (chars, extract, options) => getWordsWithIndices(chars, extract, options).words;
245
226
 
246
- var getWords = getWords$1;
227
+ const getWords = getWords$1;
228
+
229
+ const removeZwsp$1 = s => s.replace(/\uFEFF/g, '');
247
230
 
248
231
  var global$1 = tinymce.util.Tools.resolve('tinymce.dom.TreeWalker');
249
232
 
250
- var getText = function (node, schema) {
251
- var blockElements = schema.getBlockElements();
252
- var shortEndedElements = schema.getShortEndedElements();
253
- var isNewline = function (node) {
254
- return blockElements[node.nodeName] || shortEndedElements[node.nodeName];
255
- };
256
- var textBlocks = [];
257
- var txt = '';
258
- var treeWalker = new global$1(node, node);
259
- while (node = treeWalker.next()) {
260
- if (node.nodeType === 3) {
261
- txt += removeZwsp$1(node.data);
262
- } else if (isNewline(node) && txt.length) {
233
+ const getText = (node, schema) => {
234
+ const blockElements = schema.getBlockElements();
235
+ const voidElements = schema.getVoidElements();
236
+ const isNewline = node => blockElements[node.nodeName] || voidElements[node.nodeName];
237
+ const textBlocks = [];
238
+ let txt = '';
239
+ const treeWalker = new global$1(node, node);
240
+ let tempNode;
241
+ while (tempNode = treeWalker.next()) {
242
+ if (tempNode.nodeType === 3) {
243
+ txt += removeZwsp$1(tempNode.data);
244
+ } else if (isNewline(tempNode) && txt.length) {
263
245
  textBlocks.push(txt);
264
246
  txt = '';
265
247
  }
@@ -270,55 +252,39 @@
270
252
  return textBlocks;
271
253
  };
272
254
 
273
- var removeZwsp = function (text) {
274
- return text.replace(/\u200B/g, '');
275
- };
276
- var strLen = function (str) {
277
- return str.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, '_').length;
278
- };
279
- var countWords = function (node, schema) {
280
- var text = removeZwsp(getText(node, schema).join('\n'));
255
+ const removeZwsp = text => text.replace(/\u200B/g, '');
256
+ const strLen = str => str.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, '_').length;
257
+ const countWords = (node, schema) => {
258
+ const text = removeZwsp(getText(node, schema).join('\n'));
281
259
  return getWords(text.split(''), identity).length;
282
260
  };
283
- var countCharacters = function (node, schema) {
284
- var text = getText(node, schema).join('');
261
+ const countCharacters = (node, schema) => {
262
+ const text = getText(node, schema).join('');
285
263
  return strLen(text);
286
264
  };
287
- var countCharactersWithoutSpaces = function (node, schema) {
288
- var text = getText(node, schema).join('').replace(/\s/g, '');
265
+ const countCharactersWithoutSpaces = (node, schema) => {
266
+ const text = getText(node, schema).join('').replace(/\s/g, '');
289
267
  return strLen(text);
290
268
  };
291
269
 
292
- var createBodyCounter = function (editor, count) {
293
- return function () {
294
- return count(editor.getBody(), editor.schema);
295
- };
296
- };
297
- var createSelectionCounter = function (editor, count) {
298
- return function () {
299
- return count(editor.selection.getRng().cloneContents(), editor.schema);
300
- };
301
- };
302
- var createBodyWordCounter = function (editor) {
303
- return createBodyCounter(editor, countWords);
304
- };
305
- var get = function (editor) {
306
- return {
307
- body: {
308
- getWordCount: createBodyWordCounter(editor),
309
- getCharacterCount: createBodyCounter(editor, countCharacters),
310
- getCharacterCountWithoutSpaces: createBodyCounter(editor, countCharactersWithoutSpaces)
311
- },
312
- selection: {
313
- getWordCount: createSelectionCounter(editor, countWords),
314
- getCharacterCount: createSelectionCounter(editor, countCharacters),
315
- getCharacterCountWithoutSpaces: createSelectionCounter(editor, countCharactersWithoutSpaces)
316
- },
317
- getCount: createBodyWordCounter(editor)
318
- };
319
- };
270
+ const createBodyCounter = (editor, count) => () => count(editor.getBody(), editor.schema);
271
+ const createSelectionCounter = (editor, count) => () => count(editor.selection.getRng().cloneContents(), editor.schema);
272
+ const createBodyWordCounter = editor => createBodyCounter(editor, countWords);
273
+ const get = editor => ({
274
+ body: {
275
+ getWordCount: createBodyWordCounter(editor),
276
+ getCharacterCount: createBodyCounter(editor, countCharacters),
277
+ getCharacterCountWithoutSpaces: createBodyCounter(editor, countCharactersWithoutSpaces)
278
+ },
279
+ selection: {
280
+ getWordCount: createSelectionCounter(editor, countWords),
281
+ getCharacterCount: createSelectionCounter(editor, countCharacters),
282
+ getCharacterCountWithoutSpaces: createSelectionCounter(editor, countCharactersWithoutSpaces)
283
+ },
284
+ getCount: createBodyWordCounter(editor)
285
+ });
320
286
 
321
- var open = function (editor, api) {
287
+ const open = (editor, api) => {
322
288
  editor.windowManager.open({
323
289
  title: 'Word Count',
324
290
  body: {
@@ -358,16 +324,36 @@
358
324
  });
359
325
  };
360
326
 
361
- var register$1 = function (editor, api) {
362
- editor.addCommand('mceWordCount', function () {
363
- return open(editor, api);
364
- });
327
+ const register$1 = (editor, api) => {
328
+ editor.addCommand('mceWordCount', () => open(editor, api));
329
+ };
330
+
331
+ const first = (fn, rate) => {
332
+ let timer = null;
333
+ const cancel = () => {
334
+ if (!isNull(timer)) {
335
+ clearTimeout(timer);
336
+ timer = null;
337
+ }
338
+ };
339
+ const throttle = (...args) => {
340
+ if (isNull(timer)) {
341
+ timer = setTimeout(() => {
342
+ timer = null;
343
+ fn.apply(null, args);
344
+ }, rate);
345
+ }
346
+ };
347
+ return {
348
+ cancel,
349
+ throttle
350
+ };
365
351
  };
366
352
 
367
353
  var global = tinymce.util.Tools.resolve('tinymce.util.Delay');
368
354
 
369
- var fireWordCountUpdate = function (editor, api) {
370
- editor.fire('wordCountUpdate', {
355
+ const fireWordCountUpdate = (editor, api) => {
356
+ editor.dispatch('wordCountUpdate', {
371
357
  wordCount: {
372
358
  words: api.body.getWordCount(),
373
359
  characters: api.body.getCharacterCount(),
@@ -376,50 +362,44 @@
376
362
  });
377
363
  };
378
364
 
379
- var updateCount = function (editor, api) {
365
+ const updateCount = (editor, api) => {
380
366
  fireWordCountUpdate(editor, api);
381
367
  };
382
- var setup = function (editor, api, delay) {
383
- var debouncedUpdate = global.debounce(function () {
384
- return updateCount(editor, api);
385
- }, delay);
386
- editor.on('init', function () {
368
+ const setup = (editor, api, delay) => {
369
+ const debouncedUpdate = first(() => updateCount(editor, api), delay);
370
+ editor.on('init', () => {
387
371
  updateCount(editor, api);
388
- global.setEditorTimeout(editor, function () {
389
- editor.on('SetContent BeforeAddUndo Undo Redo ViewUpdate keyup', debouncedUpdate);
372
+ global.setEditorTimeout(editor, () => {
373
+ editor.on('SetContent BeforeAddUndo Undo Redo ViewUpdate keyup', debouncedUpdate.throttle);
390
374
  }, 0);
375
+ editor.on('remove', debouncedUpdate.cancel);
391
376
  });
392
377
  };
393
378
 
394
- var register = function (editor) {
395
- var onAction = function () {
396
- return editor.execCommand('mceWordCount');
397
- };
379
+ const register = editor => {
380
+ const onAction = () => editor.execCommand('mceWordCount');
398
381
  editor.ui.registry.addButton('wordcount', {
399
382
  tooltip: 'Word count',
400
383
  icon: 'character-count',
401
- onAction: onAction
384
+ onAction
402
385
  });
403
386
  editor.ui.registry.addMenuItem('wordcount', {
404
387
  text: 'Word count',
405
388
  icon: 'character-count',
406
- onAction: onAction
389
+ onAction
407
390
  });
408
391
  };
409
392
 
410
- function Plugin (delay) {
411
- if (delay === void 0) {
412
- delay = 300;
413
- }
414
- global$2.add('wordcount', function (editor) {
415
- var api = get(editor);
393
+ var Plugin = (delay = 300) => {
394
+ global$2.add('wordcount', editor => {
395
+ const api = get(editor);
416
396
  register$1(editor, api);
417
397
  register(editor);
418
398
  setup(editor, api, delay);
419
399
  return api;
420
400
  });
421
- }
401
+ };
422
402
 
423
403
  Plugin();
424
404
 
425
- }());
405
+ })();