@sapui5/sap.ui.richtexteditor 1.96.24 → 1.96.26

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 (629) hide show
  1. package/package.json +1 -1
  2. package/src/sap/ui/richtexteditor/.library +15 -6
  3. package/src/sap/ui/richtexteditor/RTESplitButton.js +1 -1
  4. package/src/sap/ui/richtexteditor/RichTextEditor.js +365 -229
  5. package/src/sap/ui/richtexteditor/RichTextEditorRenderer.js +14 -5
  6. package/src/sap/ui/richtexteditor/ToolbarWrapper.js +563 -316
  7. package/src/sap/ui/richtexteditor/ToolbarWrapperRenderer.js +3 -4
  8. package/src/sap/ui/richtexteditor/js/tiny_mce5/icons/default/icons.js +11 -1
  9. package/src/sap/ui/richtexteditor/js/tiny_mce5/icons/default/icons.min.js +1 -1
  10. package/src/sap/ui/richtexteditor/js/tiny_mce5/jquery.tinymce.min.js +88 -0
  11. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/ar.js +1 -420
  12. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/bg_BG.js +1 -419
  13. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/bn_BD.js +21 -179
  14. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/ca.js +1 -419
  15. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/cs.js +1 -419
  16. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/cs_CZ.js +221 -19
  17. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/cy.js +61 -18
  18. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/da.js +1 -419
  19. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/de.js +1 -419
  20. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/el.js +1 -261
  21. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/es.js +1 -419
  22. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/es_419.js +462 -0
  23. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/es_MX.js +1 -419
  24. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/et.js +21 -179
  25. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/eu.js +1 -419
  26. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/fa.js +1 -419
  27. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/fa_IR.js +69 -197
  28. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/fi.js +1 -419
  29. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/fr_FR.js +1 -419
  30. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/gl.js +20 -155
  31. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/he_IL.js +1 -420
  32. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/hr.js +1 -418
  33. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/hu_HU.js +1 -419
  34. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/id.js +1 -419
  35. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/it.js +1 -419
  36. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/ja.js +1 -419
  37. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/kk.js +1 -418
  38. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/ko_KR.js +1 -419
  39. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/lt.js +21 -179
  40. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/nb_NO.js +1 -419
  41. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/nl.js +1 -419
  42. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/nl_BE.js +445 -0
  43. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/pl.js +1 -419
  44. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/pt_BR.js +1 -419
  45. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/pt_PT.js +1 -419
  46. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/ro.js +1 -418
  47. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/ru.js +1 -419
  48. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/ru_RU.js +445 -0
  49. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/sk.js +1 -418
  50. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/sl.js +59 -14
  51. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/sl_SI.js +1 -388
  52. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/sq.js +219 -0
  53. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/sv_SE.js +1 -419
  54. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/ta.js +60 -17
  55. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/ta_IN.js +60 -17
  56. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/th_TH.js +1 -419
  57. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/tr.js +1 -419
  58. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/tr_TR.js +81 -8
  59. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/ug.js +221 -19
  60. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/uk.js +1 -419
  61. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/zh_CN.js +1 -419
  62. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/zh_TW.js +1 -419
  63. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/advcode/changelog.txt +8 -0
  64. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/advcode/codemirror.min.css +1 -1
  65. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/advcode/codemirror.min.js +4023 -4246
  66. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/advcode/customeditor.js +5 -5
  67. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/advcode/customeditor.min.js +5 -5
  68. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/advcode/plugin.js +5 -5
  69. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/advcode/plugin.min.js +5 -5
  70. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/advcode/readme.txt +1 -1
  71. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/advcode/version.txt +1 -1
  72. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/advlist/plugin.js +33 -48
  73. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/advlist/plugin.min.js +4 -2
  74. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/anchor/plugin.js +10 -8
  75. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/anchor/plugin.min.js +4 -2
  76. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/autolink/plugin.js +60 -30
  77. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/autolink/plugin.min.js +4 -2
  78. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/autoresize/plugin.js +27 -12
  79. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/autoresize/plugin.min.js +4 -2
  80. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/autosave/plugin.js +12 -12
  81. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/autosave/plugin.min.js +4 -2
  82. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/bbcode/plugin.js +8 -6
  83. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/bbcode/plugin.min.js +4 -2
  84. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/charmap/plugin.js +59 -67
  85. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/charmap/plugin.min.js +4 -2
  86. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/code/plugin.js +11 -10
  87. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/code/plugin.min.js +4 -2
  88. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/codesample/plugin.js +1934 -1310
  89. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/codesample/plugin.min.js +4 -2
  90. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/colorpicker/plugin.js +3 -2
  91. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/colorpicker/plugin.min.js +4 -2
  92. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/contextmenu/plugin.js +3 -2
  93. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/contextmenu/plugin.min.js +4 -2
  94. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/directionality/plugin.js +200 -59
  95. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/directionality/plugin.min.js +4 -2
  96. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/emoticons/js/emojiimages.js +9424 -0
  97. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/emoticons/js/emojiimages.min.js +3 -0
  98. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/emoticons/js/emojis.js +1914 -1506
  99. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/emoticons/js/emojis.min.js +2 -2
  100. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/emoticons/plugin.js +255 -181
  101. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/emoticons/plugin.min.js +4 -2
  102. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/fullpage/plugin.js +51 -49
  103. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/fullpage/plugin.min.js +4 -2
  104. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/fullscreen/plugin.js +542 -163
  105. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/fullscreen/plugin.min.js +4 -2
  106. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/help/plugin.js +113 -105
  107. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/help/plugin.min.js +4 -2
  108. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/hr/plugin.js +11 -10
  109. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/hr/plugin.min.js +4 -2
  110. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/image/plugin.js +187 -170
  111. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/image/plugin.min.js +4 -2
  112. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/imagetools/plugin.js +625 -433
  113. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/imagetools/plugin.min.js +4 -2
  114. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/importcss/plugin.js +54 -53
  115. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/importcss/plugin.min.js +4 -2
  116. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/insertdatetime/plugin.js +24 -17
  117. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/insertdatetime/plugin.min.js +4 -2
  118. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/legacyoutput/plugin.js +10 -8
  119. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/legacyoutput/plugin.min.js +4 -2
  120. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/link/plugin.js +145 -131
  121. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/link/plugin.min.js +4 -2
  122. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/lists/plugin.js +440 -270
  123. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/lists/plugin.min.js +4 -2
  124. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/media/plugin.js +232 -186
  125. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/media/plugin.min.js +4 -2
  126. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/nonbreaking/plugin.js +15 -14
  127. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/nonbreaking/plugin.min.js +4 -2
  128. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/noneditable/plugin.js +8 -6
  129. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/noneditable/plugin.min.js +4 -2
  130. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/pagebreak/plugin.js +29 -30
  131. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/pagebreak/plugin.min.js +4 -2
  132. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/paste/plugin.js +388 -290
  133. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/paste/plugin.min.js +4 -2
  134. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/CHANGELOG.md +345 -0
  135. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/js/wordimport.js +1826 -1696
  136. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/ar.js +12 -9
  137. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/bg_BG.js +4 -4
  138. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/ca.js +10 -7
  139. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/cs.js +12 -9
  140. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/da.js +11 -8
  141. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/de.js +10 -7
  142. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/el.js +12 -9
  143. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/es.js +10 -7
  144. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/eu.js +4 -4
  145. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/fa.js +12 -9
  146. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/fi.js +12 -9
  147. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/fr_FR.js +11 -8
  148. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/he_IL.js +12 -9
  149. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/hr.js +11 -8
  150. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/hu_HU.js +12 -9
  151. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/id.js +4 -4
  152. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/it.js +10 -7
  153. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/ja.js +12 -9
  154. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/kk.js +12 -9
  155. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/ko_KR.js +12 -9
  156. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/nb_NO.js +11 -8
  157. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/nl.js +8 -5
  158. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/pl.js +10 -7
  159. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/pt_BR.js +11 -8
  160. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/pt_PT.js +11 -8
  161. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/ro.js +12 -9
  162. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/ru.js +12 -9
  163. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/sk.js +12 -9
  164. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/sl_SI.js +11 -8
  165. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/sv_SE.js +10 -7
  166. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/th_TH.js +12 -9
  167. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/tr.js +11 -8
  168. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/uk.js +12 -9
  169. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/zh_CN.js +13 -10
  170. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/langs/zh_TW.js +13 -10
  171. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/plugin.js +5 -5
  172. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/plugin.min.js +5 -5
  173. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/readme.txt +1 -1
  174. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/version.txt +1 -1
  175. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/preview/plugin.js +18 -17
  176. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/preview/plugin.min.js +4 -2
  177. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/print/plugin.js +15 -14
  178. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/print/plugin.min.js +4 -2
  179. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/quickbars/plugin.js +76 -85
  180. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/quickbars/plugin.min.js +4 -2
  181. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/save/plugin.js +11 -8
  182. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/save/plugin.min.js +4 -2
  183. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/searchreplace/plugin.js +108 -103
  184. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/searchreplace/plugin.min.js +4 -2
  185. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/spellchecker/plugin.js +54 -59
  186. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/spellchecker/plugin.min.js +4 -2
  187. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/tabfocus/plugin.js +31 -28
  188. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/tabfocus/plugin.min.js +4 -2
  189. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/table/plugin.js +4394 -3142
  190. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/table/plugin.min.js +4 -2
  191. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/template/plugin.js +89 -73
  192. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/template/plugin.min.js +4 -2
  193. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/textcolor/plugin.js +3 -2
  194. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/textcolor/plugin.min.js +4 -2
  195. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/textpattern/plugin.js +111 -122
  196. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/textpattern/plugin.min.js +4 -2
  197. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/toc/plugin.js +33 -29
  198. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/toc/plugin.min.js +4 -2
  199. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/visualblocks/plugin.js +12 -11
  200. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/visualblocks/plugin.min.js +4 -2
  201. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/visualchars/plugin.js +89 -101
  202. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/visualchars/plugin.min.js +4 -2
  203. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/wordcount/plugin.js +69 -58
  204. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/wordcount/plugin.min.js +4 -2
  205. package/src/sap/ui/richtexteditor/js/tiny_mce5/readme.txt +1 -1
  206. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/content.css +10 -6
  207. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/content.inline.css +10 -6
  208. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/content.inline.min.css +1 -1
  209. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/content.inline.min.css.map +1 -1
  210. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/content.min.css +1 -1
  211. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/content.min.css.map +1 -1
  212. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/skin.css +104 -29
  213. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/skin.min.css +1 -1
  214. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/skin.min.css.map +1 -1
  215. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/skin.shadowdom.css +37 -0
  216. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/skin.shadowdom.min.css +8 -0
  217. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/skin.shadowdom.min.css.map +1 -0
  218. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/content.css +9 -5
  219. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/content.inline.css +10 -6
  220. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/content.inline.min.css +1 -1
  221. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/content.inline.min.css.map +1 -1
  222. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/content.min.css +1 -1
  223. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/content.min.css.map +1 -1
  224. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/skin.css +104 -29
  225. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/skin.min.css +1 -1
  226. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/skin.min.css.map +1 -1
  227. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/skin.shadowdom.css +37 -0
  228. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/skin.shadowdom.min.css +8 -0
  229. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/skin.shadowdom.min.css.map +1 -0
  230. package/src/sap/ui/richtexteditor/js/tiny_mce5/themes/mobile/theme.js +2890 -3335
  231. package/src/sap/ui/richtexteditor/js/tiny_mce5/themes/mobile/theme.min.js +4 -2
  232. package/src/sap/ui/richtexteditor/js/tiny_mce5/themes/silver/theme.js +15720 -15353
  233. package/src/sap/ui/richtexteditor/js/tiny_mce5/themes/silver/theme.min.js +4 -2
  234. package/src/sap/ui/richtexteditor/js/tiny_mce5/tinymce.d.ts +768 -552
  235. package/src/sap/ui/richtexteditor/js/tiny_mce5/tinymce.js +6762 -6159
  236. package/src/sap/ui/richtexteditor/js/tiny_mce5/tinymce.min.js +4 -2
  237. package/src/sap/ui/richtexteditor/js/tiny_mce5/version.txt +1 -1
  238. package/src/sap/ui/richtexteditor/js/tiny_mce6/icons/default/icons.js +197 -0
  239. package/src/sap/ui/richtexteditor/js/tiny_mce6/icons/default/icons.min.js +7 -0
  240. package/src/sap/ui/richtexteditor/js/tiny_mce6/icons/default/index.js +13 -0
  241. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ar.js +7 -0
  242. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/bg_BG.js +7 -0
  243. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ca.js +7 -0
  244. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/cs.js +7 -0
  245. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/cy.js +1 -0
  246. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/da.js +7 -0
  247. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/de.js +7 -0
  248. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/dv.js +1 -0
  249. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/el.js +7 -0
  250. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/en_GB.js +261 -0
  251. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/es.js +7 -0
  252. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/es_MX.js +1 -0
  253. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/et.js +1 -0
  254. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/eu.js +7 -0
  255. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/fa.js +7 -0
  256. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/fi.js +7 -0
  257. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/fr_FR.js +7 -0
  258. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/he_IL.js +7 -0
  259. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/hi.js +7 -0
  260. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/hr.js +7 -0
  261. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/hu_HU.js +7 -0
  262. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/id.js +7 -0
  263. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/it.js +7 -0
  264. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ja.js +7 -0
  265. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/kk.js +7 -0
  266. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ko_KR.js +7 -0
  267. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/lt.js +1 -0
  268. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/lv.js +1 -0
  269. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ms.js +7 -0
  270. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/nb_NO.js +7 -0
  271. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/nl.js +7 -0
  272. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/pl.js +7 -0
  273. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/pt_BR.js +7 -0
  274. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/pt_PT.js +7 -0
  275. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ro.js +7 -0
  276. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ru.js +7 -0
  277. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/sk.js +7 -0
  278. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/sl_SI.js +7 -0
  279. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/sr.js +1 -0
  280. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/sv_SE.js +7 -0
  281. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/th_TH.js +7 -0
  282. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/tr.js +7 -0
  283. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/uk.js +7 -0
  284. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/vi.js +7 -0
  285. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/zh_CN.js +7 -0
  286. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/zh_TW.js +7 -0
  287. package/src/sap/ui/richtexteditor/js/tiny_mce6/license.txt +5 -0
  288. package/src/sap/ui/richtexteditor/js/tiny_mce6/models/dom/index.js +13 -0
  289. package/src/sap/ui/richtexteditor/js/tiny_mce6/models/dom/model.js +8045 -0
  290. package/src/sap/ui/richtexteditor/js/tiny_mce6/models/dom/model.min.js +9 -0
  291. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/accordion/index.js +13 -0
  292. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/accordion/plugin.js +1038 -0
  293. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/accordion/plugin.min.js +9 -0
  294. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/CHANGELOG.md +110 -0
  295. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/codemirror.min.css +13 -0
  296. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/codemirror.min.js +13 -0
  297. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/customeditor.js +10 -0
  298. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/customeditor.min.js +10 -0
  299. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/ar.js +15 -0
  300. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/bg_BG.js +15 -0
  301. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/ca.js +15 -0
  302. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/cs.js +15 -0
  303. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/da.js +15 -0
  304. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/de.js +15 -0
  305. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/el.js +15 -0
  306. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/es.js +15 -0
  307. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/eu.js +15 -0
  308. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/fa.js +15 -0
  309. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/fi.js +15 -0
  310. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/fr_FR.js +15 -0
  311. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/he_IL.js +15 -0
  312. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/hi.js +15 -0
  313. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/hr.js +15 -0
  314. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/hu_HU.js +15 -0
  315. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/id.js +15 -0
  316. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/it.js +15 -0
  317. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/ja.js +15 -0
  318. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/kk.js +15 -0
  319. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/ko_KR.js +15 -0
  320. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/ms.js +15 -0
  321. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/nb_NO.js +15 -0
  322. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/nl.js +15 -0
  323. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/pl.js +15 -0
  324. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/pt_BR.js +15 -0
  325. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/pt_PT.js +15 -0
  326. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/ro.js +15 -0
  327. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/ru.js +15 -0
  328. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/sk.js +15 -0
  329. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/sl_SI.js +15 -0
  330. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/sv_SE.js +15 -0
  331. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/th_TH.js +15 -0
  332. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/tr.js +15 -0
  333. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/uk.js +15 -0
  334. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/vi.js +15 -0
  335. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/zh_CN.js +15 -0
  336. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/langs/zh_TW.js +15 -0
  337. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/license.txt +5 -0
  338. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/plugin.js +10 -0
  339. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/plugin.min.js +10 -0
  340. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/readme.txt +10 -0
  341. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/version.txt +1 -0
  342. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advlist/index.js +13 -0
  343. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advlist/plugin.js +264 -0
  344. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advlist/plugin.min.js +9 -0
  345. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/anchor/index.js +13 -0
  346. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/anchor/plugin.js +219 -0
  347. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/anchor/plugin.min.js +9 -0
  348. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autolink/index.js +13 -0
  349. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autolink/plugin.js +233 -0
  350. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autolink/plugin.min.js +9 -0
  351. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autoresize/index.js +13 -0
  352. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autoresize/plugin.js +197 -0
  353. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autoresize/plugin.min.js +9 -0
  354. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autosave/index.js +13 -0
  355. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autosave/plugin.js +238 -0
  356. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autosave/plugin.min.js +9 -0
  357. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/charmap/index.js +13 -0
  358. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/charmap/plugin.js +1663 -0
  359. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/charmap/plugin.min.js +9 -0
  360. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/code/index.js +13 -0
  361. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/code/plugin.js +90 -0
  362. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/code/plugin.min.js +9 -0
  363. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/codesample/index.js +13 -0
  364. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/codesample/plugin.js +2468 -0
  365. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/codesample/plugin.min.js +9 -0
  366. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/directionality/index.js +13 -0
  367. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/directionality/plugin.js +400 -0
  368. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/directionality/plugin.min.js +9 -0
  369. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/emoticons/index.js +13 -0
  370. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/emoticons/js/emojiimages.js +7 -0
  371. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/emoticons/js/emojiimages.min.js +9 -0
  372. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/emoticons/js/emojis.js +7 -0
  373. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/emoticons/js/emojis.min.js +8 -0
  374. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/emoticons/plugin.js +600 -0
  375. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/emoticons/plugin.min.js +9 -0
  376. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/fullscreen/index.js +13 -0
  377. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/fullscreen/plugin.js +1201 -0
  378. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/fullscreen/plugin.min.js +9 -0
  379. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/index.js +13 -0
  380. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ar.js +96 -0
  381. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/bg_BG.js +96 -0
  382. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ca.js +96 -0
  383. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/cs.js +96 -0
  384. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/da.js +96 -0
  385. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/de.js +96 -0
  386. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/el.js +96 -0
  387. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/en.js +96 -0
  388. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/es.js +96 -0
  389. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/eu.js +96 -0
  390. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/fa.js +96 -0
  391. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/fi.js +96 -0
  392. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/fr_FR.js +96 -0
  393. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/he_IL.js +96 -0
  394. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/hi.js +96 -0
  395. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/hr.js +96 -0
  396. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/hu_HU.js +96 -0
  397. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/id.js +96 -0
  398. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/it.js +96 -0
  399. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ja.js +96 -0
  400. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/kk.js +96 -0
  401. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ko_KR.js +96 -0
  402. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ms.js +96 -0
  403. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/nb_NO.js +96 -0
  404. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/nl.js +96 -0
  405. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/pl.js +96 -0
  406. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/pt_BR.js +96 -0
  407. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/pt_PT.js +96 -0
  408. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ro.js +96 -0
  409. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ru.js +96 -0
  410. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/sk.js +96 -0
  411. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/sl_SI.js +96 -0
  412. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/sv_SE.js +96 -0
  413. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/th_TH.js +96 -0
  414. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/tr.js +96 -0
  415. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/uk.js +96 -0
  416. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/vi.js +96 -0
  417. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/zh_CN.js +90 -0
  418. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/zh_TW.js +96 -0
  419. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/plugin.js +898 -0
  420. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/plugin.min.js +9 -0
  421. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/image/index.js +13 -0
  422. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/image/plugin.js +1509 -0
  423. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/image/plugin.min.js +9 -0
  424. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/importcss/index.js +13 -0
  425. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/importcss/plugin.js +349 -0
  426. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/importcss/plugin.min.js +9 -0
  427. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/insertdatetime/index.js +13 -0
  428. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/insertdatetime/plugin.js +192 -0
  429. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/insertdatetime/plugin.min.js +9 -0
  430. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/link/index.js +13 -0
  431. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/link/plugin.js +1246 -0
  432. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/link/plugin.min.js +9 -0
  433. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/lists/index.js +13 -0
  434. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/lists/plugin.js +1953 -0
  435. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/lists/plugin.min.js +9 -0
  436. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/media/index.js +13 -0
  437. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/media/plugin.js +1240 -0
  438. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/media/plugin.min.js +9 -0
  439. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/nonbreaking/index.js +13 -0
  440. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/nonbreaking/plugin.js +128 -0
  441. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/nonbreaking/plugin.min.js +9 -0
  442. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/pagebreak/index.js +13 -0
  443. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/pagebreak/plugin.js +122 -0
  444. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/pagebreak/plugin.min.js +9 -0
  445. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/CHANGELOG.md +402 -0
  446. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/js/wordimport.js +3498 -0
  447. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ar.js +20 -0
  448. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/bg_BG.js +20 -0
  449. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ca.js +20 -0
  450. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/cs.js +20 -0
  451. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/da.js +20 -0
  452. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/de.js +20 -0
  453. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/el.js +20 -0
  454. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/es.js +20 -0
  455. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/eu.js +20 -0
  456. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/fa.js +20 -0
  457. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/fi.js +20 -0
  458. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/fr_FR.js +20 -0
  459. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/he_IL.js +20 -0
  460. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/hi.js +20 -0
  461. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/hr.js +20 -0
  462. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/hu_HU.js +20 -0
  463. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/id.js +20 -0
  464. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/it.js +20 -0
  465. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ja.js +20 -0
  466. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/kk.js +20 -0
  467. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ko_KR.js +20 -0
  468. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ms.js +20 -0
  469. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/nb_NO.js +20 -0
  470. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/nl.js +20 -0
  471. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/pl.js +20 -0
  472. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/pt_BR.js +20 -0
  473. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/pt_PT.js +20 -0
  474. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ro.js +20 -0
  475. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ru.js +20 -0
  476. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/sk.js +20 -0
  477. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/sl_SI.js +20 -0
  478. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/sv_SE.js +20 -0
  479. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/th_TH.js +20 -0
  480. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/tr.js +20 -0
  481. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/uk.js +20 -0
  482. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/vi.js +20 -0
  483. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/zh_CN.js +20 -0
  484. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/zh_TW.js +20 -0
  485. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/license.txt +5 -0
  486. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/plugin.js +10 -0
  487. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/plugin.min.js +10 -0
  488. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/readme.txt +10 -0
  489. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/version.txt +1 -0
  490. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/preview/index.js +13 -0
  491. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/preview/plugin.js +102 -0
  492. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/preview/plugin.min.js +9 -0
  493. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/quickbars/index.js +13 -0
  494. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/quickbars/plugin.js +443 -0
  495. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/quickbars/plugin.min.js +9 -0
  496. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/save/index.js +13 -0
  497. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/save/plugin.js +123 -0
  498. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/save/plugin.min.js +9 -0
  499. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/searchreplace/index.js +13 -0
  500. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/searchreplace/plugin.js +1098 -0
  501. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/searchreplace/plugin.min.js +9 -0
  502. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/table/index.js +13 -0
  503. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/table/plugin.js +3467 -0
  504. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/table/plugin.min.js +9 -0
  505. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/template/index.js +13 -0
  506. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/template/plugin.js +572 -0
  507. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/template/plugin.min.js +9 -0
  508. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualblocks/index.js +13 -0
  509. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualblocks/plugin.js +103 -0
  510. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualblocks/plugin.min.js +9 -0
  511. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualchars/index.js +13 -0
  512. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualchars/plugin.js +565 -0
  513. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualchars/plugin.min.js +9 -0
  514. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/wordcount/index.js +13 -0
  515. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/wordcount/plugin.js +410 -0
  516. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/wordcount/plugin.min.js +9 -0
  517. package/src/sap/ui/richtexteditor/js/tiny_mce6/readme.txt +12 -0
  518. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/dark/content.css +72 -0
  519. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/dark/content.min.css +7 -0
  520. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/default/content.css +67 -0
  521. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/default/content.min.css +7 -0
  522. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/document/content.css +72 -0
  523. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/document/content.min.css +7 -0
  524. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/tinymce-5/content.css +67 -0
  525. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/tinymce-5/content.min.css +7 -0
  526. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/tinymce-5-dark/content.css +72 -0
  527. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/tinymce-5-dark/content.min.css +7 -0
  528. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/writer/content.css +68 -0
  529. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/writer/content.min.css +7 -0
  530. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.css +791 -0
  531. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.inline.css +785 -0
  532. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.inline.min.css +7 -0
  533. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.min.css +7 -0
  534. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/skin.css +3694 -0
  535. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/skin.min.css +7 -0
  536. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/skin.shadowdom.css +36 -0
  537. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/skin.shadowdom.min.css +7 -0
  538. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.css +772 -0
  539. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.inline.css +785 -0
  540. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.inline.min.css +7 -0
  541. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.min.css +7 -0
  542. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/skin.css +3697 -0
  543. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/skin.min.css +7 -0
  544. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/skin.shadowdom.css +36 -0
  545. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/skin.shadowdom.min.css +7 -0
  546. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.css +791 -0
  547. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.inline.css +785 -0
  548. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.inline.min.css +7 -0
  549. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.min.css +7 -0
  550. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/skin.css +3788 -0
  551. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/skin.min.css +7 -0
  552. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/skin.shadowdom.css +36 -0
  553. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/skin.shadowdom.min.css +7 -0
  554. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.css +772 -0
  555. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.inline.css +785 -0
  556. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.inline.min.css +7 -0
  557. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.min.css +7 -0
  558. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/skin.css +3788 -0
  559. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/skin.min.css +7 -0
  560. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/skin.shadowdom.css +36 -0
  561. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +7 -0
  562. package/src/sap/ui/richtexteditor/js/tiny_mce6/themes/silver/index.js +13 -0
  563. package/src/sap/ui/richtexteditor/js/tiny_mce6/themes/silver/theme.js +30172 -0
  564. package/src/sap/ui/richtexteditor/js/tiny_mce6/themes/silver/theme.min.js +9 -0
  565. package/src/sap/ui/richtexteditor/js/tiny_mce6/tinymce.d.ts +3206 -0
  566. package/src/sap/ui/richtexteditor/js/tiny_mce6/tinymce.js +31303 -0
  567. package/src/sap/ui/richtexteditor/js/tiny_mce6/tinymce.min.js +9 -0
  568. package/src/sap/ui/richtexteditor/js/tiny_mce6/version.txt +1 -0
  569. package/src/sap/ui/richtexteditor/library.js +64 -27
  570. package/src/sap/ui/richtexteditor/messagebundle_ar.properties +54 -0
  571. package/src/sap/ui/richtexteditor/messagebundle_bg.properties +54 -0
  572. package/src/sap/ui/richtexteditor/messagebundle_ca.properties +54 -0
  573. package/src/sap/ui/richtexteditor/messagebundle_cnr.properties +105 -0
  574. package/src/sap/ui/richtexteditor/messagebundle_cs.properties +54 -0
  575. package/src/sap/ui/richtexteditor/messagebundle_cy.properties +54 -0
  576. package/src/sap/ui/richtexteditor/messagebundle_da.properties +54 -0
  577. package/src/sap/ui/richtexteditor/messagebundle_de.properties +54 -0
  578. package/src/sap/ui/richtexteditor/messagebundle_el.properties +54 -0
  579. package/src/sap/ui/richtexteditor/messagebundle_en.properties +54 -0
  580. package/src/sap/ui/richtexteditor/messagebundle_en_GB.properties +54 -0
  581. package/src/sap/ui/richtexteditor/messagebundle_en_US_saprigi.properties +106 -52
  582. package/src/sap/ui/richtexteditor/messagebundle_es.properties +54 -0
  583. package/src/sap/ui/richtexteditor/messagebundle_es_MX.properties +54 -0
  584. package/src/sap/ui/richtexteditor/messagebundle_et.properties +54 -0
  585. package/src/sap/ui/richtexteditor/messagebundle_fi.properties +54 -0
  586. package/src/sap/ui/richtexteditor/messagebundle_fr.properties +54 -0
  587. package/src/sap/ui/richtexteditor/messagebundle_fr_CA.properties +54 -0
  588. package/src/sap/ui/richtexteditor/messagebundle_hi.properties +54 -0
  589. package/src/sap/ui/richtexteditor/messagebundle_hr.properties +54 -0
  590. package/src/sap/ui/richtexteditor/messagebundle_hu.properties +54 -0
  591. package/src/sap/ui/richtexteditor/messagebundle_id.properties +54 -0
  592. package/src/sap/ui/richtexteditor/messagebundle_it.properties +54 -0
  593. package/src/sap/ui/richtexteditor/messagebundle_iw.properties +54 -0
  594. package/src/sap/ui/richtexteditor/messagebundle_ja.properties +54 -0
  595. package/src/sap/ui/richtexteditor/messagebundle_kk.properties +54 -0
  596. package/src/sap/ui/richtexteditor/messagebundle_ko.properties +54 -0
  597. package/src/sap/ui/richtexteditor/messagebundle_lt.properties +54 -0
  598. package/src/sap/ui/richtexteditor/messagebundle_lv.properties +54 -0
  599. package/src/sap/ui/richtexteditor/messagebundle_ms.properties +54 -0
  600. package/src/sap/ui/richtexteditor/messagebundle_nl.properties +54 -0
  601. package/src/sap/ui/richtexteditor/messagebundle_no.properties +54 -0
  602. package/src/sap/ui/richtexteditor/messagebundle_pl.properties +54 -0
  603. package/src/sap/ui/richtexteditor/messagebundle_pt.properties +54 -0
  604. package/src/sap/ui/richtexteditor/messagebundle_pt_PT.properties +54 -0
  605. package/src/sap/ui/richtexteditor/messagebundle_ro.properties +54 -0
  606. package/src/sap/ui/richtexteditor/messagebundle_ru.properties +54 -0
  607. package/src/sap/ui/richtexteditor/messagebundle_sh.properties +54 -0
  608. package/src/sap/ui/richtexteditor/messagebundle_sk.properties +54 -0
  609. package/src/sap/ui/richtexteditor/messagebundle_sl.properties +54 -0
  610. package/src/sap/ui/richtexteditor/messagebundle_sr.properties +54 -0
  611. package/src/sap/ui/richtexteditor/messagebundle_sv.properties +54 -0
  612. package/src/sap/ui/richtexteditor/messagebundle_th.properties +54 -0
  613. package/src/sap/ui/richtexteditor/messagebundle_tr.properties +54 -0
  614. package/src/sap/ui/richtexteditor/messagebundle_uk.properties +54 -0
  615. package/src/sap/ui/richtexteditor/messagebundle_vi.properties +54 -0
  616. package/src/sap/ui/richtexteditor/messagebundle_zh_CN.properties +54 -0
  617. package/src/sap/ui/richtexteditor/messagebundle_zh_TW.properties +54 -0
  618. package/src/sap/ui/richtexteditor/themes/base/RichTextEditor.less +25 -84
  619. package/src/sap/ui/richtexteditor/themes/sap_belize/RichTextEditor.less +33 -0
  620. package/src/sap/ui/richtexteditor/themes/sap_belize/library.source.less +3 -1
  621. package/src/sap/ui/richtexteditor/themes/sap_belize_hcb/RichTextEditor.less +29 -0
  622. package/src/sap/ui/richtexteditor/themes/sap_belize_hcb/library.source.less +2 -0
  623. package/src/sap/ui/richtexteditor/themes/sap_belize_hcw/RichTextEditor.less +30 -0
  624. package/src/sap/ui/richtexteditor/themes/sap_belize_hcw/library.source.less +2 -0
  625. package/src/sap/ui/richtexteditor/themes/sap_fiori_3/RichTextEditor.less +4 -5
  626. package/src/sap/ui/richtexteditor/themes/sap_fiori_3_dark/RichTextEditor.less +4 -5
  627. package/src/sap/ui/richtexteditor/themes/sap_fiori_3_hcb/RichTextEditor.less +4 -5
  628. package/src/sap/ui/richtexteditor/themes/sap_fiori_3_hcw/RichTextEditor.less +4 -5
  629. package/src/sap/ui/richtexteditor/themes/sap_horizon/RichTextEditor.less +15 -30
@@ -1,8 +1,8 @@
1
- /* Tiny PowerPaste plugin
1
+ /*!
2
+ * Tiny PowerPaste plugin
2
3
  *
3
- * Copyright 2010-2020 Tiny Technologies LLC. All rights reserved.
4
+ * Copyright 2010-2021 Tiny Technologies, Inc. All rights reserved.
4
5
  *
5
- * Version: 5.3.3-456
6
+ * Version: 5.6.1-517
6
7
  */
7
-
8
- !function(g){"use strict";var n=function(e){return parseInt(e,10)},i=function(e,t){var n=e-t;return 0===n?0:0<n?1:-1},r=function(e,t,n){return{major:e,minor:t,patch:n}},o=function(e){var t=/([0-9]+)\.([0-9]+)\.([0-9]+)(?:(\-.+)?)/.exec(e);return t?r(n(t[1]),n(t[2]),n(t[3])):r(0,0,0)},c=function(e,t){return!!e&&-1===function(e,t){var n=i(e.major,t.major);if(0!==n)return n;var r=i(e.minor,t.minor);if(0!==r)return r;var o=i(e.patch,t.patch);return 0!==o?o:0}(o([(n=e).majorVersion,n.minorVersion].join(".").split(".").slice(0,3).join(".")),o(t));var n},e=function(r,o){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=r.console;n&&o in n&&n[o].apply(n,arguments)}},t={log:e(window,"log"),error:e(window,"error"),warn:e(window,"warm")},s={register:function(e,t){e.addCommand("mceTogglePlainTextPaste",t.toggle)}},T=function(){},d=function(n,r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n(r.apply(null,e))}},y=function(e){return function(){return e}},a=function(e){return e};function A(r){for(var o=[],e=1;e<arguments.length;e++)o[e-1]=arguments[e];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=o.concat(e);return r.apply(null,n)}}var u,l,f,m,p,v,h,b=function(e){return function(){throw new Error(e)}},x=y(!1),E=y(!0),w=function(){return S},S=(u=function(e){return e.isNone()},m={fold:function(e,t){return e()},is:x,isSome:x,isNone:E,getOr:f=function(e){return e},getOrThunk:l=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:y(null),getOrUndefined:y(void 0),or:f,orThunk:l,map:w,each:T,bind:w,exists:x,forall:E,filter:w,equals:u,equals_:u,toArray:function(){return[]},toString:y("none()")},Object.freeze&&Object.freeze(m),m),_=function(n){var e=y(n),t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:E,isNone:x,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return _(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?o:S},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(x,function(e){return t(n,e)})}};return o},O={some:_,none:w,from:function(e){return null==e?S:_(e)}},N=function(t){return function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t}(e)===t}},L=N("string"),I=N("object"),D=N("array"),C=N("boolean"),P=N("function"),k=N("number"),M=Array.prototype.slice,R=Array.prototype.indexOf,F=Array.prototype.push,j=function(e,t){return n=e,r=t,-1<R.call(n,r);var n,r},U=function(e,t){for(var n=0,r=e.length;n<r;n++){if(t(e[n],n))return!0}return!1},H=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r},B=function(e,t){for(var n=0,r=e.length;n<r;n++){t(e[n],n)}},Y=function(e,t){for(var n=[],r=[],o=0,i=e.length;o<i;o++){var a=e[o];(t(a,o)?n:r).push(a)}return{pass:n,fail:r}},W=function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r)&&n.push(i)}return n},q=function(e,t,n){return B(e,function(e){n=t(n,e)}),n},z=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n))return O.some(o)}return O.none()},$=function(e,t){for(var n=0,r=e.length;n<r;n++){if(t(e[n],n))return O.some(n)}return O.none()},V=function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!D(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);F.apply(t,e[n])}return t},G=function(e,t){return V(H(e,t))},K=function(e,t){for(var n=0,r=e.length;n<r;++n){if(!0!==t(e[n],n))return!1}return!0},X=(P(Array.from)&&Array.from,function(e){return e.getParam("powerpaste_block_drop",!1,"boolean")}),J=function(e){return void 0!==e.settings.images_upload_url},Z=function(e){return e.getParam("paste_as_text",!1)},Q=function(e){return!1!==e.getParam("smart_paste",!0,"boolean")},ee=function(e){return e.getParam("automatic_uploads",!0,"boolean")},te=function(e){return e.getParam("powerpaste_keep_unsupported_src",!1,"boolean")},ne=function(e){var t=e.getParam("powerpaste_clean_filtered_inline_elements");return L(t)?H(t.split(","),function(e){return e.trim()}):[]},re=function(e){return e.getParam("paste_tab_spaces",4,"number")},oe=function(e,t){e.dom.bind(t,"drop dragstart dragend dragover dragenter dragleave dragdrop draggesture",function(e){e.preventDefault(),e.stopImmediatePropagation()})},ie=function(t){t.on("init",function(e){oe(t,t.getBody()),t.inline||oe(t,t.getDoc())})},ae=function(){return(ae=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ue=Object.keys,ce=Object.hasOwnProperty,se=function(e,t){for(var n=ue(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i)}},le=function(e,n){return fe(e,function(e,t){return{k:t,v:n(e,t)}})},fe=function(e,r){var o={};return se(e,function(e,t){var n=r(e,t);o[n.k]=n.v}),o},de=function(e,n){var r=[];return se(e,function(e,t){r.push(n(e,t))}),r},me=function(e){return de(e,function(e){return e})},pe=function(e){return ue(e).length},ge=function(e,t){return ce.call(e,t)},ve=function(a){if(!D(a))throw new Error("cases must be an array");if(0===a.length)throw new Error("there must be at least one case");var u=[],n={};return B(a,function(e,r){var t=ue(e);if(1!==t.length)throw new Error("one and only one name per case");var o=t[0],i=e[o];if(void 0!==n[o])throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!D(i))throw new Error("case arguments must be an array");u.push(o),n[o]=function(){var e=arguments.length;if(e!==i.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+i.length+" ("+i+"), got "+e);for(var n=new Array(e),t=0;t<n.length;t++)n[t]=arguments[t];return{fold:function(){if(arguments.length!==a.length)throw new Error("Wrong number of arguments to fold. Expected "+a.length+", got "+arguments.length);return arguments[r].apply(null,n)},match:function(e){var t=ue(e);if(u.length!==t.length)throw new Error("Wrong number of arguments to match. Expected: "+u.join(",")+"\nActual: "+t.join(","));if(!K(u,function(e){return j(t,e)}))throw new Error("Not all branches were specified when using match. Specified: "+t.join(", ")+"\nRequired: "+u.join(", "));return e[o].apply(null,n)},log:function(e){g.console.log(e,{constructors:u,constructor:o,params:n})}}}}),n},he=ve([{blob:["id","imageresult","objurl"]},{url:["id","url","raw"]}]),ye=ae({cata:function(e,t,n){return e.fold(t,n)}},he),be={},Te={exports:be};v=be,h=Te,p=void 0,function(e){"object"==typeof v&&void 0!==h?h.exports=e():"function"==typeof p&&p.amd?p([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=e()}(function(){return function i(a,u,c){function s(t,e){if(!u[t]){if(!a[t]){var n=!1;if(!e&&n)return n(t,!0);if(l)return l(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var o=u[t]={exports:{}};a[t][0].call(o.exports,function(e){return s(a[t][1][e]||e)},o,o.exports,i,a,u,c)}return u[t].exports}for(var l=!1,e=0;e<c.length;e++)s(c[e]);return s}({1:[function(e,t,n){var r,o,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{o="function"==typeof clearTimeout?clearTimeout:u}catch(e){o=u}}();var s,l=[],f=!1,d=-1;function m(){f&&s&&(f=!1,s.length?l=s.concat(l):d=-1,l.length&&p())}function p(){if(!f){var e=c(m);f=!0;for(var t=l.length;t;){for(s=l,l=[];++d<t;)s&&s[d].run();d=-1,t=l.length}s=null,f=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===u||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function v(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new g(e,t)),1!==l.length||f||c(p)},g.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(e,f,t){(function(n){!function(e){var t=setTimeout;function r(){}function i(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],l(e,this)}function o(n,r){for(;3===n._state;)n=n._value;0!==n._state?(n._handled=!0,i._immediateFn(function(){var e=1===n._state?r.onFulfilled:r.onRejected;if(null!==e){var t;try{t=e(n._value)}catch(e){return void u(r.promise,e)}a(r.promise,t)}else(1===n._state?a:u)(r.promise,n._value)})):n._deferreds.push(r)}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof i)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void l((r=n,o=e,function(){r.apply(o,arguments)}),t)}t._state=1,t._value=e,c(t)}catch(e){u(t,e)}var r,o}function u(e,t){e._state=2,e._value=t,c(e)}function c(e){2===e._state&&0===e._deferreds.length&&i._immediateFn(function(){e._handled||i._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)o(e,e._deferreds[t]);e._deferreds=null}function s(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function l(e,t){var n=!1;try{e(function(e){n||(n=!0,a(t,e))},function(e){n||(n=!0,u(t,e))})}catch(e){if(n)return;n=!0,u(t,e)}}i.prototype.catch=function(e){return this.then(null,e)},i.prototype.then=function(e,t){var n=new this.constructor(r);return o(this,new s(e,t,n)),n},i.all=function(e){var u=Array.prototype.slice.call(e);return new i(function(r,o){if(0===u.length)return r([]);var i=u.length;function a(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){a(t,e)},o)}u[t]=e,0==--i&&r(u)}catch(e){o(e)}}for(var e=0;e<u.length;e++)a(e,u[e])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(e){e(t)})},i.reject=function(n){return new i(function(e,t){t(n)})},i.race=function(o){return new i(function(e,t){for(var n=0,r=o.length;n<r;n++)o[n].then(e,t)})},i._immediateFn="function"==typeof n?function(e){n(e)}:function(e){t(e,0)},i._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},i._setImmediateFn=function(e){i._immediateFn=e},i._setUnhandledRejectionFn=function(e){i._unhandledRejectionFn=e},void 0!==f&&f.exports?f.exports=i:e.Promise||(e.Promise=i)}(this)}).call(this,e("timers").setImmediate)},{timers:3}],3:[function(c,e,s){(function(e,t){var r=c("process/browser.js").nextTick,n=Function.prototype.apply,o=Array.prototype.slice,i={},a=0;function u(e,t){this._id=e,this._clearFn=t}s.setTimeout=function(){return new u(n.call(setTimeout,window,arguments),clearTimeout)},s.setInterval=function(){return new u(n.call(setInterval,window,arguments),clearInterval)},s.clearTimeout=s.clearInterval=function(e){e.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},s.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},s.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},s._unrefActive=s.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},s.setImmediate="function"==typeof e?e:function(e){var t=a++,n=!(arguments.length<2)&&o.call(arguments,1);return i[t]=!0,r(function(){i[t]&&(n?e.apply(null,n):e.call(null),s.clearImmediate(t))}),t},s.clearImmediate="function"==typeof t?t:function(e){delete i[e]}}).call(this,c("timers").setImmediate,c("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(e,t,n){var r=e("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();t.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)});var xe=Te.exports.boltExport,Ee=function(e){var n=O.none(),t=[],r=function(e){o()?a(e):t.push(e)},o=function(){return n.isSome()},i=function(e){B(e,a)},a=function(t){n.each(function(e){g.setTimeout(function(){t(e)},0)})};return e(function(e){n=O.some(e),i(t),t=[]}),{get:r,map:function(n){return Ee(function(t){r(function(e){t(n(e))})})},isReady:o}},we={nu:Ee,pure:function(t){return Ee(function(e){e(t)})}},Se=function(e){g.setTimeout(function(){throw e},0)},_e=function(n){var e=function(e){n().then(e,Se)};return{map:function(e){return _e(function(){return n().then(e)})},bind:function(t){return _e(function(){return n().then(function(e){return t(e).toPromise()})})},anonBind:function(e){return _e(function(){return n().then(function(){return e.toPromise()})})},toLazy:function(){return we.nu(e)},toCached:function(){var e=null;return _e(function(){return null===e&&(e=n()),e})},toPromise:n,get:e}},Ne={nu:function(e){return _e(function(){return new xe(e)})},pure:function(e){return _e(function(){return xe.resolve(e)})}},Le=function(a,e){return e(function(r){var o=[],i=0;0===a.length?r([]):B(a,function(e,t){var n;e.get((n=t,function(e){o[n]=e,++i>=a.length&&r(o)}))})})},Ie=function(e){return Le(e,Ne.nu)},Ae=function(e,t){return Ie(H(e,t))},Oe=Ae,De=0,Ce=function(e){var t=(new Date).getTime();return e+"_"+Math.floor(1e9*Math.random())+ ++De+String(t)};function Pe(e,t){return n=g.document.createElement("canvas"),r=e,o=t,n.width=r,n.height=o,n;var n,r,o}function ke(e){var t=Pe(e.width,e.height);return Me(t).drawImage(e,0,0),t}function Me(e){return e.getContext("2d")}var Re=window.Promise?window.Promise:function(){var i=function(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],l(e,n(o,this),n(u,this))},e=i.immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(e){g.setTimeout(e,1)};function n(e,t){return function(){return e.apply(t,arguments)}}var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function a(n){var r=this;null!==this._state?e(function(){var e=r._state?n.onFulfilled:n.onRejected;if(null!==e){var t;try{t=e(r._value)}catch(e){return void n.reject(e)}n.resolve(t)}else(r._state?n.resolve:n.reject)(r._value)}):this._deferreds.push(n)}function o(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void l(n(t,e),n(o,this),n(u,this))}this._state=!0,this._value=e,c.call(this)}catch(e){u.call(this,e)}}function u(e){this._state=!1,this._value=e,c.call(this)}function c(){for(var e=0,t=this._deferreds;e<t.length;e++){var n=t[e];a.call(this,n)}this._deferreds=[]}function s(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}function l(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(e){if(r)return;r=!0,n(e)}}return i.prototype.catch=function(e){return this.then(null,e)},i.prototype.then=function(n,r){var o=this;return new i(function(e,t){a.call(o,new s(n,r,e,t))})},i.all=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var u=Array.prototype.slice.call(1===e.length&&r(e[0])?e[0]:e);return new i(function(r,o){if(0===u.length)return r([]);var i=u.length;function a(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){a(t,e)},o)}u[t]=e,0==--i&&r(u)}catch(e){o(e)}}for(var e=0;e<u.length;e++)a(e,u[e])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(e){e(t)})},i.reject=function(n){return new i(function(e,t){t(n)})},i.race=function(o){return new i(function(e,t){for(var n=0,r=o;n<r.length;n++)r[n].then(e,t)})},i}();function Fe(r){return new Re(function(e,n){var t=new g.XMLHttpRequest;t.open("GET",r,!0),t.responseType="blob",t.onload=function(){200===this.status&&e(this.response)},t.onerror=function(){var e,t=this;n(0===this.status?((e=new Error("No access to download image")).code=18,e.name="SecurityError",e):new Error("Error "+t.status+" downloading image"))},t.send()})}function je(e){var t=e.split(","),n=/data:([^;]+)/.exec(t[0]);if(!n)return O.none();for(var r=n[1],o=t[1],i=g.atob(o),a=i.length,u=Math.ceil(a/1024),c=new Array(u),s=0;s<u;++s){for(var l=1024*s,f=Math.min(l+1024,a),d=new Array(f-l),m=l,p=0;m<f;++p,++m)d[p]=i[m].charCodeAt(0);c[s]=new Uint8Array(d)}return O.some(new g.Blob(c,{type:r}))}function Ue(n){return new Re(function(e,t){je(n).fold(function(){t("uri is not base64: "+n)},e)})}function He(e,r,o){return r=r||"image/png",g.HTMLCanvasElement.prototype.toBlob?new Re(function(t,n){e.toBlob(function(e){e?t(e):n()},r,o)}):Ue(e.toDataURL(r,o))}function Be(e){return(u=e,new Re(function(e,t){var n=g.URL.createObjectURL(u),r=new g.Image,o=function(){r.removeEventListener("load",i),r.removeEventListener("error",a)};function i(){o(),e(r)}function a(){o(),t("Unable to load data of type "+u.type+": "+n)}r.addEventListener("load",i),r.addEventListener("error",a),r.src=n,r.complete&&i()})).then(function(e){var t;t=e,g.URL.revokeObjectURL(t.src);var n,r,o=Pe((r=e).naturalWidth||r.width,(n=e).naturalHeight||n.height);return Me(o).drawImage(e,0,0),o});var u}function Ye(n){return new Re(function(e){var t=new g.FileReader;t.onloadend=function(){e(t.result)},t.readAsDataURL(n)})}var We=function(e){return O.from(0===(t=e).indexOf("blob:")?Fe(t):0===t.indexOf("data:")?Ue(t):null);var t};function qe(e,t,n){var r=t.type;function o(r,o){return e.then(function(e){return n=o,t=(t=r)||"image/png",e.toDataURL(t,n);var t,n})}return{getType:y(r),toBlob:function(){return Re.resolve(t)},toDataURL:function(){return n},toBase64:function(){return n.split(",")[1]},toAdjustedBlob:function(t,n){return e.then(function(e){return He(e,t,n)})},toAdjustedDataURL:o,toAdjustedBase64:function(e,t){return o(e,t).then(function(e){return e.split(",")[1]})},toCanvas:function(){return e.then(ke)}}}function ze(e){return(t=e,n=t.src,0===n.indexOf("data:")?Ue(n):Fe(n)).then(function(e){return Ye(t=e).then(function(e){return qe(Be(t),t,e)});var t});var t,n}var $e,Ve,Ge=function(e,t){return r=t,qe(Be(n=e),n,r);var n,r},Ke=function(e,t,n){return void 0===t&&void 0===n?Xe(e):e.toAdjustedBlob(t,n)},Xe=function(e){return e.toBlob()},Je=function(e){return e.toDataURL()},Ze=function(e){var t=g.URL.createObjectURL(e);return Qe(e,t)},Qe=function(i,a){return Ne.nu(function(o){var e;(e=i,Ye(e)).then(function(e){var t=Ge(i,e),n=Ce("image"),r=ye.blob(n,t,a);o(r)})})},et=function(e){return Ae(e,Ze)},tt=(g.Node.ATTRIBUTE_NODE,g.Node.CDATA_SECTION_NODE,g.Node.COMMENT_NODE),nt=g.Node.DOCUMENT_NODE,rt=(g.Node.DOCUMENT_TYPE_NODE,g.Node.DOCUMENT_FRAGMENT_NODE,g.Node.ELEMENT_NODE),ot=g.Node.TEXT_NODE,it=(g.Node.PROCESSING_INSTRUCTION_NODE,g.Node.ENTITY_REFERENCE_NODE,g.Node.ENTITY_NODE,g.Node.NOTATION_NODE,void 0!==g.window?g.window:Function("return this;")()),at=function(e,t){return function(e,t){for(var n=null!=t?t:it,r=0;r<e.length&&null!=n;++r)n=n[e[r]];return n}(e.split("."),t)},ut=function(e,t){return function(e,t){for(var n,r,o=void 0!==t?t:it,i=0;i<e.length;++i)n=o,r=e[i],void 0!==n[r]&&null!==n[r]||(n[r]={}),o=n[r];return o}(e.split("."),t)},ct=function(e){return e.dom().nodeName.toLowerCase()},st=function(e){return e.dom().nodeType},lt=function(t){return function(e){return st(e)===t}},ft=function(e){return st(e)===tt||"#comment"===ct(e)},dt=lt(rt),mt=lt(ot),pt=function(e,t,n){if(!(L(n)||C(n)||k(n)))throw g.console.error("Invalid call to Attr.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")},gt=function(e,t,n){pt(e.dom(),t,n)},vt=function(e,t){var n=e.dom();se(t,function(e,t){pt(n,t,e)})},ht=function(e,t){var n=e.dom().getAttribute(t);return null===n?void 0:n},yt=function(e,t){var n=e.dom();return!(!n||!n.hasAttribute)&&n.hasAttribute(t)},bt=function(e,t){e.dom().removeAttribute(t)},Tt=function(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:y(e)}},xt={fromHtml:function(e,t){var n=(t||g.document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw g.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return Tt(n.childNodes[0])},fromTag:function(e,t){var n=(t||g.document).createElement(e);return Tt(n)},fromText:function(e,t){var n=(t||g.document).createTextNode(e);return Tt(n)},fromDom:Tt,fromPoint:function(e,t,n){var r=e.dom();return O.from(r.elementFromPoint(t,n)).map(Tt)}},Et={"cement.dialog.paste.title":"Paste Formatting Options","cement.dialog.paste.instructions":"Choose to keep or remove formatting in the pasted content.","cement.dialog.paste.merge":"Keep Formatting","cement.dialog.paste.clean":"Remove Formatting","safari.imagepaste":'Safari does not support direct paste of images. <a href="https://support.ephox.com/entries/88543243-Safari-Direct-paste-of-images-does-not-work" style="text-decoration: underline">More information on image pasting for Safari</a>',"webview.imagepaste":'Safari does not support direct paste of images. <a href="https://support.ephox.com/entries/88543243-Safari-Direct-paste-of-images-does-not-work" style="text-decoration: underline">More information on image pasting for Safari</a>',"error.code.images.not.found":"The images service was not found: (","error.imageupload":"Image failed to upload: (","error.full.stop":").","errors.local.images.disallowed":"Local image paste has been disabled. Local images have been removed from pasted content.","errors.imageimport.failed":"Some images failed to import.","errors.imageimport.unsupported":"Unsupported image type.","errors.imageimport.invalid":"Image is invalid."},wt={translate:function(e){return tinymce.translate(Et[e])}},St={insert:function(e,t){var n,r=t.getDoc(),o="ephoxInsertMarker",i=t.selection,a=t.dom;i.setContent('<span id="'+o+'">&nbsp;</span>'),n=a.get(o);for(var u=r.createDocumentFragment();e.firstChild&&!a.isBlock(e.firstChild);)u.appendChild(e.firstChild);for(var c=r.createDocumentFragment();e.lastChild&&!a.isBlock(e.lastChild);)c.appendChild(e.lastChild);if(n.parentNode.insertBefore(u,n),a.insertAfter(c,n),e.firstChild){if(a.isBlock(e.firstChild)){for(;!a.isBlock(n.parentNode)&&n.parentNode!==a.getRoot();)n=a.split(n.parentNode,n);a.is(n.parentNode,"td,th")||n.parentNode===a.getRoot()||(n=a.split(n.parentNode,n))}a.replace(e,n)}else a.remove(n)}},_t={each:tinymce.each,trim:tinymce.trim,bind:function(e,t){return function(){return e.apply(t,arguments)}},extend:function(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return tinymce.each(Array.prototype.slice.call(arguments,1),function(e){for(var t in e)n[t]=e[t]}),n},ephoxGetComputedStyle:function(e){return e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle||{}},log:function(e){"undefined"!=typeof console&&console.log&&console.log(e)},compose:function(e){var r=Array.prototype.slice.call(e).reverse();return function(e){for(var t=e,n=0;n<r.length;n++)t=(0,r[n])(t);return t}}},Nt={strip_class_attributes:"all",retain_style_properties:"none"},Lt={strip_class_attributes:"none",retain_style_properties:"valid"},It=function(e,t,n){var r=function(e,t){if(e&&"string"!=typeof e)return e;switch(e){case"clean":return Nt;case"merge":return Lt;default:return t}}(e,t);return r=_t.extend(r,{base_64_images:n})},At={create:function(e,t,n){var r=It(e,Nt,n),o=It(t,Lt,n),i=o;return{setWordContent:function(e){i=e?r:o},get:function(e){return i[e]}}}},Ot="startElement",Dt="endElement",Ct="text",Pt="comment",kt=function(o){var i,t,a=0,u=function(){return i};t=function(){return i={},a=0,_t.each(o.attributes,function(e){var t,n=e.nodeName,r=e.value;(!1!==(t=e).specified||"name"===t.nodeName&&""!==t.value)&&null!=r&&(i[n]=r,a++)}),void 0===i.style&&o.style.cssText&&(i.style=o.style.cssText,a++),t=u,i};var c,s,l=function(n){_t.each(t(),function(e,t){n(t,e)})};return{get:function(e){return t()[e]},each:l,filter:function(e){var n,r;c||(s=t),r=e,c=(n=c)&&r?function(e,t){return r(e,n(e,t))}:n||r,t=function(){return t=s,l(function(e,t){var n=c(e,t);null===n?(o.removeAttribute(e),delete i[e],a--):n!==t&&("class"===e?o.className=n:o.setAttribute(e,n),i[e]=n)}),t=u,i}},getAttributes:function(){return t()},getAttributeCount:function(){return t(),a}}},Mt=function(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})},Rt=!1,Ft=function(i,e,t){var n,r,o,a,u,c,s,l,f,d;switch(i.nodeType){case 1:e?n=Dt:(n=Ot,a=kt(i),u={},c=i,s=function(e,t){u[e]=t},null!=(d=t||c.getAttribute("style"))&&d.split||(d=c.style.cssText),_t.each(d.split(";"),function(e){var t=e.indexOf(":");0<t&&((l=_t.trim(e.substring(0,t))).toUpperCase()===l&&(l=l.toLowerCase()),l=l.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}),f=_t.trim(e.substring(t+1)),Rt||(Rt=0===l.indexOf("mso-")),s(l,f))}),Rt||(f=c.style["mso-list"])&&s("mso-list",f)),r="HTML"!==i.scopeName&&i.scopeName&&i.tagName&&i.tagName.indexOf(":")<=0?(i.scopeName+":"+i.tagName).toUpperCase():i.tagName;break;case 3:n=Ct,o=i.nodeValue;break;case 8:n=Pt,o=i.nodeValue;break;default:_t.log("WARNING: Unsupported node type encountered: "+i.nodeType)}var m=function(){return n},p=function(e){n===Ot&&a.filter(e)};return{getNode:function(){return a&&a.getAttributes(),i},tag:function(){return r},type:m,text:function(){return o},toString:function(){return"Type: "+n+", Tag: "+r+" Text: "+o},getAttribute:function(e){return a.get(e.toLowerCase())},filterAttributes:p,filterStyles:function(r){if(m()===Ot){var o="";_t.each(u,function(e,t){var n=r(t,e);null===n?(i.style.removeProperty?i.style.removeProperty(Mt(t)):i.style.removeAttribute(Mt(t)),delete u[t]):(o+=t+": "+n+"; ",u[t]=n)}),o=o||null,p(function(e,t){return"style"===e?o:t}),i.style.cssText=o}},getAttributeCount:function(){return a.getAttributeCount()},attributes:function(e){a.each(e)},getStyle:function(e){return u[e]},styles:function(n){_t.each(u,function(e,t){n(t,e)})},getComputedStyle:function(){return _t.ephoxGetComputedStyle(i)},isWhitespace:function(){return n===Ct&&/^[\s\u00A0]*$/.test(o)}}},jt=function(e,t){return Ft(t.createElement(e),!0)},Ut=jt("HTML",window.document),Ht={START_ELEMENT_TYPE:Ot,END_ELEMENT_TYPE:Dt,TEXT_TYPE:Ct,COMMENT_TYPE:Pt,FINISHED:Ut,token:Ft,createStartElement:function(e,t,n,r){var o=r.createElement(e),i="";return _t.each(t,function(e,t){o.setAttribute(t,e)}),_t.each(n,function(e,t){i+=t+":"+e+";",o.style[Mt(t)]=e}),Ft(o,!1,""!==i?i:null)},createEndElement:jt,createComment:function(e,t){return Ft(t.createComment(e),!1)},createText:function(e,t){return Ft(t.createTextNode(e))}},Bt=function(i){var a=i.createDocumentFragment(),u=function(e){a.appendChild(e)};return{dom:a,receive:function(e){var t,n,r,o;switch(e.type()){case Ht.START_ELEMENT_TYPE:o=e.getNode().cloneNode(!1),u(r=o),a=r;break;case Ht.TEXT_TYPE:t=e,n=i.createTextNode(t.text()),u(n);break;case Ht.END_ELEMENT_TYPE:a=a.parentNode;break;case Ht.COMMENT_TYPE:break;default:throw{message:"Unsupported token type: "+e.type()}}}}},Yt=function(e,o){var i;o=o||window.document,i=o.createElement("div"),o.body.appendChild(i),i.style.position="absolute",i.style.left="-10000px",i.innerHTML=e;var a=i.firstChild||Ht.FINISHED,u=[],c=!1;return{hasNext:function(){return void 0!==a},next:function(){var e,t,n=a,r=c;return!c&&a.firstChild?(u.push(a),a=a.firstChild):c||1!==a.nodeType?a.nextSibling?(a=a.nextSibling,c=!1):(a=u.pop(),c=!0):c=!0,n===Ht.FINISHED||a||(o.body.removeChild(i),a=Ht.FINISHED),t=r,(e=n)===Ht.FINISHED?e:e?Ht.token(e,t):void 0}}},Wt=function(p,g){return function(t,e,n){var r,o,i,a=!1,u=function(){g&&g(m),a=!1,o=[],i=[]},c=function(e){_t.each(e,function(e){t.receive(e)})},s=function(e){a?i.push(e):t.receive(e)},l=function(){f(),c(i),u()},f=function(){_t.each(r,function(e){s(e)}),d()},d=function(){r=[]},m={document:n||window.document,settings:e||{},emit:s,receive:function(e){g&&o.push(e),p(m,e),e===Ht.FINISHED&&l()},startTransaction:function(){a=!0},rollback:function(){c(o),u()},commit:l,defer:function(e){(r=r||[]).push(e)},hasDeferred:function(){return r&&0<r.length},emitDeferred:f,dropDeferred:d};return u(),m}},qt=Wt,zt=function(n){return Wt(function(e,t){t.filterAttributes(_t.bind(n,e)),e.emit(t)})},$t=/^(P|H[1-6]|T[DH]|LI|DIV|BLOCKQUOTE|PRE|ADDRESS|FIELDSET|DD|DT|CENTER)$/,Vt=function(){return null},Gt=!1,Kt=qt(function(e,t){var n,r=function(){Gt||(e.emit(Ht.createStartElement("P",{},{},e.document)),Gt=!0)};switch(t.type()){case Ht.TEXT_TYPE:r(),e.emit(t);break;case Ht.END_ELEMENT_TYPE:Gt&&(n=t,$t.test(n.tag())||t===Ht.FINISHED)?(e.emit(Ht.createEndElement("P",e.document)),Gt=!1):"BR"===t.tag()&&e.emit(t);break;case Ht.START_ELEMENT_TYPE:"BR"===t.tag()?(t.filterAttributes(Vt),t.filterStyles(Vt),e.emit(t)):"IMG"===t.tag()&&t.getAttribute("alt")&&(r(),e.emit(Ht.createText(t.getAttribute("alt"),e.document)))}t===Ht.FINISHED&&e.emit(t)}),Xt=function(e){var t=e;return 65279===t.charCodeAt(t.length-1)?t.substring(0,t.length-1):e},Jt=[Xt],Zt=tinymce.isIE&&9<=document.documentMode?[function(e){return e.replace(/<BR><BR>/g,"<br>")},function(e){return e.replace(/<br>/g," ")},function(e){return e.replace(/<br><br>/g,"<BR><BR>")},function(e){return/<(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)/.test(e)?e.replace(/(?:<br>&nbsp;[\s\r\n]+|<br>)*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:<br>&nbsp;[\s\r\n]+|<br>)*/g,"$1"):e}].concat(Jt):Jt,Qt={all:_t.compose(Zt),textOnly:Xt},en=/^(mso-.*|tab-stops|tab-interval|language|text-underline|text-effect|text-line-through|font-color|horiz-align|list-image-[0-9]+|separator-image|table-border-color-(dark|light)|vert-align|vnd\..*)$/,tn=qt(function(e,t){var r,n=e.settings.get("retain_style_properties");t.filterStyles((r=n,function(e,t){var n=!1;switch(r){case"all":case"*":n=!0;break;case"valid":n=!en.test(e);break;case void 0:case"none":n="list-style-type"===e;break;default:n=0<=(","+r+",").indexOf(","+e+",")}return n?t:null})),e.emit(t)}),nn=qt(function(e,t){e.seenList||(e.inferring?"LI"===t.tag()&&(t.type()===Ht.START_ELEMENT_TYPE?e.inferring++:(e.inferring--,e.inferring||(e.needsClosing=!0))):("OL"===t.tag()||"UL"===t.tag()?e.seenList=!0:"LI"===t.tag()&&(e.inferring=1,e.needsClosing||e.emit(Ht.createStartElement("UL",{},{},e.document))),!e.needsClosing||e.inferring||t.isWhitespace()||(e.needsClosing=!1,e.emit(Ht.createEndElement("UL",e.document))))),e.emit(t)}),rn=zt(function(e,t){return"name"===e||"id"===e?null:t}),on=zt(function(e,t){if("class"===e)switch(this.settings.get("strip_class_attributes")){case"mso":return 0===t.indexOf("Mso")?null:t;case"none":return t;default:return null}return t}),an=function(){if(0<navigator.userAgent.indexOf("Gecko")&&navigator.userAgent.indexOf("WebKit")<0)return!1;var e=document.createElement("div");try{e.innerHTML='<p style="mso-list: Ignore;">&nbsp;</p>'}catch(e){return!1}return"Ignore"===Ht.token(e.firstChild).getStyle("mso-list")}(),un=function(e,t){return e.type()===Ht.START_ELEMENT_TYPE?0===e.getAttributeCount()||t&&1===e.getAttributeCount()&&null!==e.getAttribute("style")&&void 0!==e.getAttribute("style"):e.type()===Ht.END_ELEMENT_TYPE},cn=an,sn=function(e){return"A"===e.tag()||"SPAN"===e.tag()},ln=function(e){var t=e.getStyle("mso-list");return t&&"skip"!==t},fn=[],dn=[],mn=!1,pn=function(e,t){var n,r,o=1;for(n=t+1;n<e;n++)if((r=fn[n])&&"SPAN"===r.tag())if(r.type()===Ht.START_ELEMENT_TYPE)o++;else if(r.type()===Ht.END_ELEMENT_TYPE&&0===--o)return void(fn[n]=null)},gn=function(e,t){if(fn.push(t),dn=dn||[],t.type()===Ht.START_ELEMENT_TYPE)dn.push(t);else if(t.type()===Ht.END_ELEMENT_TYPE&&(dn.pop(),0===dn.length))return void function(e){if(mn){var t=void 0,n=fn.length,r=void 0;for(r=0;r<n;r++)(t=fn[r])&&(t.type()===Ht.START_ELEMENT_TYPE&&"SPAN"===t.tag()&&un(t)?pn(n,r):e.emit(t))}fn=[],dn=[],mn=!1}(e)},vn=qt(function(e,t){var n=function(e){return!(0<=",FONT,EM,STRONG,SAMP,ACRONYM,CITE,CODE,DFN,KBD,TT,B,I,U,S,SUB,SUP,INS,DEL,VAR,SPAN,".indexOf(","+e.tag()+",")&&un(e,!0))};0===(fn=fn||[]).length?t.type()===Ht.START_ELEMENT_TYPE?n(t)?e.emit(t):gn(e,t):e.emit(t):(mn||(mn=n(t)),gn(e,t))}),hn=zt(function(e,t){return"style"===e&&""===t?null:t}),yn=zt(function(e,t){return"lang"===e?null:t}),bn=qt(function(e,t){if("IMG"===t.tag()){if(t.type()===Ht.END_ELEMENT_TYPE&&e.skipEnd)return void(e.skipEnd=!1);if(t.type()===Ht.START_ELEMENT_TYPE){if(/^file:/.test(t.getAttribute("src")))return void(e.skipEnd=!0);if(e.settings.get("base_64_images")&&/^data:image\/.*;base64/.test(t.getAttribute("src")))return void(e.skipEnd=!0)}}e.emit(t)}),Tn=qt(function(e,t){"META"!==t.tag()&&"LINK"!==t.tag()&&e.emit(t)}),xn=function(e){return!un(e)&&!/^OLE_LINK/.test(e.getAttribute("name"))},En=[],wn=qt(function(e,t){var n;t.type()===Ht.START_ELEMENT_TYPE&&"A"===t.tag()?(En.push(t),xn(t)&&e.defer(t)):t.type()===Ht.END_ELEMENT_TYPE&&"A"===t.tag()?(n=En.pop(),xn(n)&&e.defer(t),0===En.length&&e.emitDeferred()):e.hasDeferred()?e.defer(t):e.emit(t)}),Sn=!1,_n=[qt(function(e,t){"SCRIPT"===t.tag()?Sn=t.type()===Ht.START_ELEMENT_TYPE:Sn||(t.filterAttributes(function(e,t){return/^on/.test(e)||"language"===e?null:t}),e.emit(t))}),rn,bn,tn,yn,hn,on,wn,vn,Tn,nn],Nn=qt(function(e,n){n.filterAttributes(function(e,t){return"align"===e?null:"UL"!==n.tag()&&"OL"!==n.tag()||"type"!==e?t:null}),e.emit(n)}),Ln=zt(function(e,t){return/^xmlns(:|$)/.test(e)?null:t}),In=qt(function(e,t){t.tag&&/^([OVWXP]|U[0-9]+|ST[0-9]+):/.test(t.tag())||e.emit(t)}),An=zt(function(e,t){return"href"===e&&(0<=t.indexOf("#_Toc")||0<=t.indexOf("#_mso"))?null:t}),On=zt(function(e,t){return/^v:/.test(e)?null:t}),Dn=[{regex:/^\(?[dc][\.\)]$/,type:{tag:"OL",type:"lower-alpha"}},{regex:/^\(?[DC][\.\)]$/,type:{tag:"OL",type:"upper-alpha"}},{regex:/^\(?M*(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})[\.\)]$/,type:{tag:"OL",type:"upper-roman"}},{regex:/^\(?m*(cm|cd|d?c{0,3})(xc|xl|l?x{0,3})(ix|iv|v?i{0,3})[\.\)]$/,type:{tag:"OL",type:"lower-roman"}},{regex:/^\(?[0-9]+[\.\)]$/,type:{tag:"OL"}},{regex:/^([0-9]+\.)*[0-9]+\.?$/,type:{tag:"OL",variant:"outline"}},{regex:/^\(?[a-z]+[\.\)]$/,type:{tag:"OL",type:"lower-alpha"}},{regex:/^\(?[A-Z]+[\.\)]$/,type:{tag:"OL",type:"upper-alpha"}}],Cn={"\u2022":{tag:"UL",type:"disc"},"\xb7":{tag:"UL",type:"disc"},"\xa7":{tag:"UL",type:"square"}},Pn={o:{tag:"UL",type:"circle"},"-":{tag:"UL",type:"disc"},"\u25cf":{tag:"UL",type:"disc"}},kn=function(e,t){var n={tag:e.tag,type:e.type,variant:t};return e.start&&(n.start=e.start),e.type||delete n.type,n},Mn=function(e,t,n){return e===t||e&&t&&e.tag===t.tag&&e.type===t.type&&(n||e.variant===t.variant)},Rn={guessListType:function(e,t,n){var r,o,i,a=null;return e&&(r=e.text,o=e.symbolFont),r=_t.trim(r),(a=Pn[r])?a=kn(a,r):o?a=(a=Cn[r])?kn(a,r):{tag:"UL",variant:r}:(_t.each(Dn,function(e){if(e.regex.test(r)){if(t&&Mn(e.type,t,!0))return(a=e.type).start=parseInt(r,10),!1;a||(a=e.type),a.start=parseInt(r,10)}}),a&&!a.variant&&(i="("===r.charAt(0)?"()":")"===r.charAt(r.length-1)?")":".",a=kn(a,i))),a&&"OL"===a.tag&&n&&("P"!==n.tag()||/^MsoHeading/.test(n.getAttribute("class")))&&(a=null),a},eqListType:Mn,checkFont:function(e,t){if(e.type()===Ht.START_ELEMENT_TYPE){var n=e.getStyle("font-family");n?t="Wingdings"===n||"Symbol"===n:/^(P|H[1-6]|DIV)$/.test(e.tag())&&(t=!1)}return t}},Fn=function(e){var t=e.indexOf(".");if(0<=t&&void 0===_t.trim(e.substring(t+1)))return(void 0)[2],!1},jn=($e=function(e,t){var n,r=/([^{]+){([^}]+)}/g;for(r.lastIndex=0;null!==(n=r.exec(e));)_t.each(n[1].split(","),Fn(void 0));return!1},Ve={},function(e,t){var n,r=e+","+t;return Ve.hasOwnProperty(r)?Ve[r]:(n=$e.call(null,e,t),Ve[r]=n)}),Un=function(e,t){var n,r,o,i=!1,a=function(e){var t=e.style.fontFamily;t&&(i="Wingdings"===t||"Symbol"===t)};if(e.type()===Ht.START_ELEMENT_TYPE&&t.openedTag&&"SPAN"===e.tag()){for(a(n=t.openedTag.getNode()),1<n.childNodes.length&&"A"===n.firstChild.tagName&&""===n.firstChild.textContent&&(n=n.childNodes[1]);n.firstChild&&("SPAN"===n.firstChild.tagName||"A"===n.firstChild.tagName);)a(n=n.firstChild);if(!(n=n.firstChild)||3!==n.nodeType)return n&&"IMG"===n.tagName;if(r=n.value,_t.trim(r)||(r=(n=n.parentNode.nextSibling)?n.value:""),!n||_t.trim(n.parentNode.textContent)!=r)return!1;if(o=Rn.guessListType({text:r,symbolFont:i},null,t.originalToken))return n.nextSibling&&"SPAN"===n.nextSibling.tagName&&/^[\u00A0\s]/.test(n.nextSibling.firstChild.value)&&("P"===t.openedTag.tag()||"UL"===o.tag)}return!1},Hn=function(){var a,u;return{guessIndentLevel:function(e,t,n,r){var o,i;return r&&/^([0-9]+\.)+[0-9]+\.?$/.test(r.text)?r.text.replace(/([0-9]+|\.$)/g,"").length+1:(o=u||parseInt(jn(n,t.getAttribute("class"))),i=function(e,t){var n,r=0;for(n=e.parentNode;null!=n&&n!==t.parentNode;)r+=n.offsetLeft,n=n.offsetParent;return r}(e.getNode(),t.getNode()),o?a?i+=a:0===i&&(i+=a=o):o=48,u=o=Math.min(i,o),Math.max(1,Math.floor(i/o))||1)}}},Bn=function(){var t=!1;return{check:function(e){return t&&e.type()===Ht.TEXT_TYPE?(e.text(),!0):e.type()===Ht.START_ELEMENT_TYPE&&"STYLE"===e.tag()?t=!0:e.type()===Ht.END_ELEMENT_TYPE&&"STYLE"===e.tag()&&!(t=!1)}}},Yn=["disc","circle","square"];function Wn(a,u){var i,o=[],c=[],s=0,l=function(e,t){var n={},r={};s++,t&&e.type&&(n={"list-style-type":e.type}),e.start&&1<e.start&&(r={start:e.start}),o.push(e),a.emit(Ht.createStartElement(e.tag,r,n,u)),i=e},f=function(){a.emit(Ht.createEndElement(o.pop().tag,u)),s--,i=o[o.length-1]},d=function(){var e=c?c.pop():"P";"P"!==e&&a.emit(Ht.createEndElement(e,u)),a.emit(Ht.createEndElement("LI",u))},m=function(e,t,n){var r={};if(e){var o=e.getStyle("margin-left");void 0!==o&&(r["margin-left"]=o)}else r["list-style-type"]="none";i&&!Rn.eqListType(i,t)&&(f(),n&&(a.emit(Ht.createStartElement("P",{},{},u)),a.emit(Ht.createText("\xa0",u)),a.emit(Ht.createEndElement("P",u))),l(t,!0)),a.emit(Ht.createStartElement("LI",{},r,u)),e&&"P"!==e.tag()?(c.push(e.tag()),e.filterStyles(function(){return null}),a.emit(e)):c.push("P")};return{openList:l,closelist:f,closeAllLists:function(){for(;0<s;)d(),f();a.commit()},closeItem:d,openLI:m,openItem:function(e,t,n,r){if(n){for(s||(s=0);e<s;)d(),f();var o,i;if(i=e,"UL"===(o=n).tag&&Yn[i-1]===o.type&&(o={tag:"UL"}),n=o,s===e)d(),m(t,n,r);else for(1<e&&0<c.length&&"P"!==c[c.length-1]&&(a.emit(Ht.createEndElement(c[c.length-1],u)),c[c.length-1]="P");s<e;)l(n,s===e-1),m(s===e?t:void 0,n)}},getCurrentListType:function(){return i},getCurrentLevel:function(){return s}}}var qn=function(e,t){_t.log("Unexpected token in list conversion: "+t.toString()),e.rollback()},zn=function(e,t,n){n.type()===Ht.TEXT_TYPE&&""===_t.trim(n.text())?e.defer(n):t.skippedPara||n.type()!==Ht.START_ELEMENT_TYPE||"P"!==n.tag()||ln(n)?Vn(e,t,n):(t.openedTag=n,e.defer(n),t.nextFilter=$n)},$n=function(e,t,n){n.type()!==Ht.START_ELEMENT_TYPE||"SPAN"!==n.tag()||0!==t.spanCount.length||!cn&&Un(n,t)||ln(n)?n.type()===Ht.END_ELEMENT_TYPE?"SPAN"===n.tag()?(e.defer(n),t.spanCount.pop()):"P"===n.tag()?(e.defer(n),t.skippedPara=!0,t.openedTag=null,t.nextFilter=zn):(t.nextFilter=Vn,t.nextFilter(e,t,n)):n.isWhitespace()?e.defer(n):(t.nextFilter=Vn,t.nextFilter(e,t,n)):(e.defer(n),t.spanCount.push(n))},Vn=function(e,t,n){var r=function(){t.emitter.closeAllLists(),e.emitDeferred(),t.openedTag=null,e.emit(n),t.nextFilter=Vn};if(n.type()===Ht.START_ELEMENT_TYPE&&ln(n)&&"LI"!==n.tag()){var o=/ level([0-9]+)/.exec(n.getStyle("mso-list"));o&&o[1]?(t.itemLevel=parseInt(o[1],10)+t.styleLevelAdjust,t.nextFilter===Vn?e.emitDeferred():e.dropDeferred(),t.nextFilter=Kn,e.startTransaction(),t.originalToken=n,t.commentMode=!1):r()}else!cn&&(n.type()===Ht.COMMENT_TYPE&&"[if !supportLists]"===n.text()||Un(n,e))?(n.type()===Ht.START_ELEMENT_TYPE&&"SPAN"===n.tag()&&t.spanCount.push(n),t.nextFilter=Kn,e.startTransaction(),t.originalToken=t.openedTag,t.commentMode=!0,t.openedTag=null,e.dropDeferred()):n.type()===Ht.END_ELEMENT_TYPE&&sn(n)?(e.defer(n),t.spanCount.pop()):n.type()===Ht.START_ELEMENT_TYPE?sn(n)?(e.defer(n),t.spanCount.push(n)):(t.openedTag&&(t.emitter.closeAllLists(),e.emitDeferred()),t.openedTag=n,e.defer(n)):r()},Gn=function(e,t,n){n.type()===Ht.END_ELEMENT_TYPE&&t.originalToken.tag()===n.tag()&&(t.nextFilter=zn,t.styleLevelAdjust=-1),e.emit(n)},Kn=function(e,t,n){if(n.type()===Ht.START_ELEMENT_TYPE&&"Ignore"===n.getStyle("mso-list")&&(t.nextFilter=Xn),n.type()===Ht.START_ELEMENT_TYPE&&"SPAN"===n.tag())t.spanCount.push(n),(t.commentMode&&""===n.getAttribute("style")||null===n.getAttribute("style"))&&(t.nextFilter=Xn);else if("A"===n.tag())n.type()===Ht.START_ELEMENT_TYPE?t.spanCount.push(n):t.spanCount.pop();else if(n.type()===Ht.TEXT_TYPE)if(t.commentMode)t.nextFilter=Xn,t.nextFilter(e,t,n);else{var r=t.originalToken,o=t.spanCount;t.emitter.closeAllLists(),e.emit(r),_t.each(o,_t.bind(e.emit,e)),e.emit(n),e.commit(),t.originalToken=r,t.nextFilter=Gn}else(t.commentMode||n.type()!==Ht.COMMENT_TYPE)&&qn(e,n)},Xn=function(e,t,n){n.type()===Ht.TEXT_TYPE?n.isWhitespace()||(t.nextFilter=Jn,t.bulletInfo={text:n.text(),symbolFont:t.symbolFont}):sn(n)?n.type()===Ht.START_ELEMENT_TYPE?t.spanCount.push(n):t.spanCount.pop():n.type()===Ht.START_ELEMENT_TYPE&&"IMG"===n.tag()?(t.nextFilter=Jn,t.bulletInfo={text:"\u2202",symbolFont:!0}):qn(e,n)},Jn=function(e,t,n){n.type()===Ht.START_ELEMENT_TYPE&&sn(n)?(t.spanCount.push(n),t.nextFilter=Zn):n.type()===Ht.END_ELEMENT_TYPE&&sn(n)?(t.spanCount.pop(),t.nextFilter=Qn):n.type()===Ht.END_ELEMENT_TYPE&&"IMG"===n.tag()||qn(e,n)},Zn=function(e,t,n){n.type()===Ht.END_ELEMENT_TYPE&&(sn(n)&&t.spanCount.pop(),t.nextFilter=Qn)},Qn=function(o,i,a){var e=function(e){var t,n,r;if(i.nextFilter=er,i.commentMode&&(i.itemLevel=i.indentGuesser.guessIndentLevel(a,i.originalToken,i.styles.styles,i.bulletInfo)),i.listType=Rn.guessListType(i.bulletInfo,(t=i.emitter.getCurrentListType(),n=i.emitter.getCurrentLevel(),r=i.itemLevel,n===r?t:null),i.originalToken),i.listType){for(i.emitter.openItem(i.itemLevel,i.originalToken,i.listType,i.skippedPara),o.emitDeferred();0<i.spanCount.length;)o.emit(i.spanCount.shift());e&&o.emit(a)}else _t.log("Unknown list type: "+i.bulletInfo.text+" Symbol font? "+i.bulletInfo.symbolFont),o.rollback()};a.type()===Ht.TEXT_TYPE||a.type()===Ht.START_ELEMENT_TYPE?e(!0):a.type()===Ht.COMMENT_TYPE?e("[endif]"!==a.text()):a.type()===Ht.END_ELEMENT_TYPE?sn(a)&&i.spanCount.pop():qn(o,a)},er=function(e,t,n){n.type()===Ht.END_ELEMENT_TYPE&&n.tag()===t.originalToken.tag()?(t.nextFilter=zn,t.skippedPara=!1):e.emit(n)},tr={initial:Vn},nr={},rr=function(e){nr.nextFilter=tr.initial,nr.itemLevel=0,nr.originalToken=null,nr.commentMode=!1,nr.openedTag=null,nr.symbolFont=!1,nr.listType=null,nr.indentGuesser=Hn(),nr.emitter=Wn(e,e.document),nr.styles=Bn(),nr.spanCount=[],nr.skippedPara=!1,nr.styleLevelAdjust=0,nr.bulletInfo=void 0};rr({});var or=[In,qt(function(e,t){nr.styles.check(t)||(nr.symbolFont=Rn.checkFont(t,nr.symbolFont),nr.nextFilter(e,nr,t))},function(e){rr(e)}),An,On,Ln,Nn],ir=function(e,t,n,r){for(var o=Bt(n),i=Yt(e,n),a=function(e,t,n,r){var o,i=t;for(o=e.length-1;0<=o;o--)i=e[o](i,n,r);return i}(r,o,t,n);i.hasNext();)a.receive(i.next());return o.dom},ar=function(e){return 0<=e.indexOf("<o:p>")||0<=e.indexOf("p.MsoNormal, li.MsoNormal, div.MsoNormal")||0<=e.indexOf("MsoListParagraphCxSpFirst")||0<=e.indexOf("<w:WordDocument>")},ur={filter:function(e,t,n){var r=Qt.all(e),o=ar(r);t.setWordContent(o);var i=_n;return o&&(i=or.concat(_n)),ir(r,t,n,i)},filterPlainText:function(e,t,n){var r=Qt.textOnly(e);return ir(r,t,n,[Kt])},isWordContent:ar},cr={officeStyles:"prompt",htmlStyles:"clean"},sr={openDialog:function(e,t,n){var r,o=t("cement.dialog.paste.clean"),i=t("cement.dialog.paste.merge"),a=[{text:o,ariaLabel:o,onclick:function(){r.close(),n("clean")}},{text:i,ariaLabel:i,onclick:function(){r.close(),n("merge")}}],u={title:t("cement.dialog.paste.title"),spacing:10,padding:10,items:[{type:"container",html:t("cement.dialog.paste.instructions")}],buttons:a};r=e.windowManager.open(u),setTimeout(function(){r&&r.getEl().focus()},1)}},lr={openDialog:function(e,t,n){var r=t("cement.dialog.paste.clean"),o=t("cement.dialog.paste.merge"),i={title:t("cement.dialog.paste.title"),body:{type:"panel",items:[{type:"htmlpanel",name:"instructions",html:t("cement.dialog.paste.instructions")}]},buttons:[{text:r,type:"custom",name:"clean"},{text:o,type:"custom",name:"merge"}],onAction:function(e,t){switch(t.name){case"clean":e.close(),n("clean");break;case"merge":e.close(),n("merge")}}};e.windowManager.open(i)}};function fr(a,u,c){return{showDialog:function(o){var e,t=a.settings.powerpaste_word_import||cr.officeStyles,n=a.settings.powerpaste_html_import||cr.htmlStyles,r=ur.isWordContent(o)?t:n,i=function(e){var t={content:o};a.fire("PastePreProcess",{content:t,internal:!1});var n=At.create(e,e,!0),r=ur.filter(t.content,n,a.getDoc());a.fire("PastePostProcess",{node:r,internal:!1}),a.undoManager.transact(function(){St.insert(r,a)})};"clean"===(e=r)||"merge"===e?i(r):(c?lr:sr).openDialog(a,u,i)}}}var dr="x-tinymce/html",mr=Ce("mce"),pr=dr+"-"+mr,gr="\x3c!-- "+pr+" --\x3e",vr={mark:function(e){return gr+e},unmark:function(e){return e.replace(/<!-- x-tinymce\/html.*? -->/,"")},isMarked:function(e,t){void 0===t&&(t=!1);var n=t?gr:"\x3c!-- "+dr;return-1!==e.indexOf(n)},retainContentEditable:function(e){return e.replace(/ contenteditable="([^"]+)"/g,' data-mce-contenteditable="$1"')},restoreContentEditable:function(e){return e.replace(/ data-mce-contenteditable="([^"]+)"/g,' contenteditable="$1"')},internalMarkId:y(mr),internalMark:y(pr),internalHtmlMime:y(dr)},hr=function(e,t){return e.hasEventListeners(t)},yr=function(e){return e.plugins.powerpaste},br={process:function(e,t,n,r,o){var i,a,u,c,s,l,f,d,m,p,g,v,h,y,b,T,x,E,w,S,_,N=vr.unmark(t);return y=N,b=n,T=r,x=o,a=hr(h=i=e,"PastePreProcess")?(E=y,w=b,S=T,_=x,h.fire("PastePreProcess",{internal:w,content:E,source:S,mode:_}).content):y,u=n,c=r,s=o,hr(i,"PastePostProcess")?(f=a,d=u,m=c,p=s,g=(l=i).dom.add(l.getBody(),"div",{style:"display:none"},f),v=l.fire("PastePostProcess",{internal:d,node:g,source:m,mode:p}).node.innerHTML,l.dom.remove(g),v):a},registerEvents:function(t){var n=t.settings;n.paste_preprocess&&t.on("PastePreProcess",function(e){n.paste_preprocess.call(t,yr(t),e)}),n.paste_postprocess&&t.on("PastePostProcess",function(e){n.paste_postprocess.call(t,yr(t),e)})}};function Tr(u,e,t,r,c){var s,l=/^image\/(jpe?g|png|gif|bmp)$/i;u.on("dragstart dragend",function(e){s="dragstart"===e.type}),u.on("dragover dragend dragleave",function(e){s||e.preventDefault()});var f=function(e,t){return t in e&&0<e[t].length},d=function(e){var t=e["text/plain"];return!!t&&0===t.indexOf("file://")},m=function(e){et(e).get(function(e){var t=H(e,function(e){var t=xt.fromTag("img"),n=ye.cata(e,r.getLocalURL,function(e,t,n){return t});return gt(t,"src",n),t.dom().outerHTML}).join("");u.insertContent(br.process(u,t,!1,"imagedrop","auto"),{merge:!1!==u.settings.paste_merge_formats}),ee(u)&&r.uploadImages(e)})};u.on("drop",function(e){if(!s){if(tinymce.dom.RangeUtils&&tinymce.dom.RangeUtils.getCaretRangeFromPoint){var t=tinymce.dom.RangeUtils.getCaretRangeFromPoint(e.clientX,e.clientY,u.getDoc());t&&u.selection.setRng(t)}var n=(a=(i=e).target.files||i.dataTransfer.files,W(a,function(e){return l.test(e.type)}));if(0<n.length)return m(n),void e.preventDefault();var r=function(e){var t={};if(e){if(e.getData){var n=e.getData("Text");n&&0<n.length&&(t["text/plain"]=n)}if(e.types)for(var r=0;r<e.types.length;r++){var o=e.types[r];t[o]=e.getData(o)}}return t}(e.dataTransfer);d(o=r)||!f(o,"text/html")&&!f(o,"text/plain")||(fr(u,wt.translate,c).showDialog(r["text/html"]||r["text/plain"]),e.preventDefault())}var o,i,a})}var xr=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];if(t.length!==n.length)throw new Error('Wrong number of arguments to struct. Expected "['+t.length+']", got '+n.length+" arguments");var r={};return B(t,function(e,t){r[e]=y(n[t])}),r}},Er=function(e){return e.slice(0).sort()},wr=function(e,t){throw new Error("All required keys ("+Er(e).join(", ")+") were not specified. Specified keys were: "+Er(t).join(", ")+".")},Sr=function(e){throw new Error("Unsupported keys for object: "+Er(e).join(", "))},_r=function(t,e){if(!D(e))throw new Error("The "+t+" fields must be an array. Was: "+e+".");B(e,function(e){if(!L(e))throw new Error("The value "+e+" in the "+t+" fields was not a string.")})},Nr=function(e){var n=Er(e);z(n,function(e,t){return t<n.length-1&&e===n[t+1]}).each(function(e){throw new Error("The field: "+e+" occurs more than once in the combined fields: ["+n.join(", ")+"].")})},Lr=function(o,i){var a=o.concat(i);if(0===a.length)throw new Error("You must specify at least one required or optional field.");return _r("required",o),_r("optional",i),Nr(a),function(t){var n=ue(t);K(o,function(e){return j(n,e)})||wr(o,n);var e=W(n,function(e){return!j(a,e)});0<e.length&&Sr(e);var r={};return B(o,function(e){r[e]=y(t[e])}),B(i,function(e){r[e]=y(Object.prototype.hasOwnProperty.call(t,e)?O.some(t[e]):O.none())}),r}},Ir=xr("id","imageresult","objurl");function Ar(){var o={},n=function(e){g.URL.revokeObjectURL(e.objurl())};return{add:function(e,t,n){var r=Ir(e,t,n);return o[e]=r},get:function(e){return O.from(o[e])},remove:function(e){var t=o[e];delete o[e],void 0!==t&&n(t)},lookupByData:function(t){return function(e,t){for(var n=ue(e),r=0,o=n.length;r<o;r++){var i=n[r],a=e[i];if(t(a,i,e))return O.some(a)}return O.none()}(o,function(e){return Je(e.imageresult())===t})},destroy:function(){se(o,n),o={}}}}xr("component","index");var Or=function(e,t,n){return 0!=(e.compareDocumentPosition(t)&n)},Dr=function(e,t){return Or(e,t,g.Node.DOCUMENT_POSITION_CONTAINED_BY)},Cr=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return Cr(n())}}},Pr=function(){return kr(0,0)},kr=function(e,t){return{major:e,minor:t}},Mr={nu:kr,detect:function(e,t){var n=String(t).toLowerCase();return 0===e.length?Pr():function(e,t){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}}(e,t);if(!n)return{major:0,minor:0};var r=function(e){return Number(t.replace(n,"$"+e))};return kr(r(1),r(2))}(e,n)},unknown:Pr},Rr="Firefox",Fr=function(e,t){return function(){return t===e}},jr=function(e){var t=e.current;return{current:t,version:e.version,isEdge:Fr("Edge",t),isChrome:Fr("Chrome",t),isIE:Fr("IE",t),isOpera:Fr("Opera",t),isFirefox:Fr(Rr,t),isSafari:Fr("Safari",t)}},Ur={unknown:function(){return jr({current:void 0,version:Mr.unknown()})},nu:jr,edge:y("Edge"),chrome:y("Chrome"),ie:y("IE"),opera:y("Opera"),firefox:y(Rr),safari:y("Safari")},Hr="Windows",Br="Android",Yr="Solaris",Wr="FreeBSD",qr="ChromeOS",zr=function(e,t){return function(){return t===e}},$r=function(e){var t=e.current;return{current:t,version:e.version,isWindows:zr(Hr,t),isiOS:zr("iOS",t),isAndroid:zr(Br,t),isOSX:zr("OSX",t),isLinux:zr("Linux",t),isSolaris:zr(Yr,t),isFreeBSD:zr(Wr,t),isChromeOS:zr(qr,t)}},Vr={unknown:function(){return $r({current:void 0,version:Mr.unknown()})},nu:$r,windows:y(Hr),ios:y("iOS"),android:y(Br),linux:y("Linux"),osx:y("OSX"),solaris:y(Yr),freebsd:y(Wr),chromeos:y(qr)},Gr=function(e,t){var n=String(t).toLowerCase();return z(e,function(e){return e.search(n)})},Kr=function(e,n){return Gr(e,n).map(function(e){var t=Mr.detect(e.versionRegexes,n);return{current:e.name,version:t}})},Xr=function(e,n){return Gr(e,n).map(function(e){var t=Mr.detect(e.versionRegexes,n);return{current:e.name,version:t}})},Jr=function(e,t,n){return""===t||!(e.length<t.length)&&e.substr(n,n+t.length)===t},Zr=function(e,t){return to(e,t)?(n=e,r=t.length,n.substring(r)):e;var n,r},Qr=function(e,t){return no(e,t)?(n=e,r=t.length,n.substring(0,n.length-r)):e;var n,r},eo=function(e,t){return-1!==e.indexOf(t)},to=function(e,t){return Jr(e,t,0)},no=function(e,t){return Jr(e,t,e.length-t.length)},ro=function(e){return e.replace(/^\s+|\s+$/g,"")},oo=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,io=function(t){return function(e){return eo(e,t)}},ao=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return eo(e,"edge/")&&eo(e,"chrome")&&eo(e,"safari")&&eo(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,oo],search:function(e){return eo(e,"chrome")&&!eo(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return eo(e,"msie")||eo(e,"trident")}},{name:"Opera",versionRegexes:[oo,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:io("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:io("firefox")},{name:"Safari",versionRegexes:[oo,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(eo(e,"safari")||eo(e,"mobile/"))&&eo(e,"applewebkit")}}],uo=[{name:"Windows",search:io("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return eo(e,"iphone")||eo(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:io("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:io("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:io("linux"),versionRegexes:[]},{name:"Solaris",search:io("sunos"),versionRegexes:[]},{name:"FreeBSD",search:io("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:io("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],co={browsers:y(ao),oses:y(uo)},so=Cr(function(e,t){var n,r,o,i,a,u,c,s,l,f,d,m,p=co.browsers(),g=co.oses(),v=Kr(p,e).fold(Ur.unknown,Ur.nu),h=Xr(g,e).fold(Vr.unknown,Vr.nu);return{browser:v,os:h,deviceType:(r=v,o=e,i=t,a=(n=h).isiOS()&&!0===/ipad/i.test(o),u=n.isiOS()&&!a,c=n.isiOS()||n.isAndroid(),s=c||i("(pointer:coarse)"),l=a||!u&&c&&i("(min-device-width:768px)"),f=u||c&&!l,d=r.isSafari()&&n.isiOS()&&!1===/safari/i.test(o),m=!f&&!l&&!d,{isiPad:y(a),isiPhone:y(u),isTablet:y(l),isPhone:y(f),isTouch:y(s),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:y(d),isDesktop:y(m)})}}(g.navigator.userAgent,function(e){return g.window.matchMedia(e).matches})),lo=function(){return so.get()},fo=rt,mo=nt,po=function(e,t){var n=e.dom();if(n.nodeType!==fo)return!1;var r=n;if(void 0!==r.matches)return r.matches(t);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(t);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(t);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},go=function(e){return e.nodeType!==fo&&e.nodeType!==mo||0===e.childElementCount},vo=function(e,t){var n=void 0===t?g.document:t.dom();return go(n)?[]:H(n.querySelectorAll(e),xt.fromDom)},ho=function(e,t){return e.dom()===t.dom()},yo=(lo().browser.isIE(),po),bo=function(e){var t,n,r,o,i,a,u,c=xt.fromDom(e.target),s=function(){e.stopPropagation()},l=function(){e.preventDefault()},f=d(l,s);return t=c,n=e.clientX,r=e.clientY,o=s,i=l,a=f,u=e,{target:y(t),x:y(n),y:y(r),stop:o,prevent:i,kill:a,raw:y(u)}},To=function(e,t,n,r,o){var i,a,u=(i=n,a=r,function(e){i(e)&&a(bo(e))});return e.dom().addEventListener(t,u,o),{unbind:A(xo,e,t,u,o)}},xo=function(e,t,n,r){e.dom().removeEventListener(t,n,r)},Eo=y(!0),wo=function(e,t,n){return To(e,t,Eo,n,!1)};var So=function(n){var r,o=!1;return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o||(o=!0,r=n.apply(null,e)),r}},_o=function(e){var t=mt(e)?e.dom().parentNode:e.dom();return null!=t&&t.ownerDocument.body.contains(t)},No=function(e,t,n){for(var r=e.dom(),o=P(n)?n:y(!1);r.parentNode;){r=r.parentNode;var i=xt.fromDom(r);if(t(i))return O.some(i);if(o(i))break}return O.none()},Lo=function(e,t){return z(e.dom().childNodes,function(e){return t(xt.fromDom(e))}).map(xt.fromDom)},Io=function(e,o){var i=function(e){for(var t=0;t<e.childNodes.length;t++){var n=xt.fromDom(e.childNodes[t]);if(o(n))return O.some(n);var r=i(e.childNodes[t]);if(r.isSome())return r}return O.none()};return i(e.dom())},Ao=function(e,t){return Io(e,t).isSome()},Oo=function(n){return{is:function(e){return n===e},isValue:E,isError:x,getOr:y(n),getOrThunk:y(n),getOrDie:y(n),or:function(e){return Oo(n)},orThunk:function(e){return Oo(n)},fold:function(e,t){return t(n)},map:function(e){return Oo(e(n))},mapError:function(e){return Oo(n)},each:function(e){e(n)},bind:function(e){return e(n)},exists:function(e){return e(n)},forall:function(e){return e(n)},toOption:function(){return O.some(n)}}},Do=function(n){return{is:x,isValue:x,isError:E,getOr:a,getOrThunk:function(e){return e()},getOrDie:function(){return b(String(n))()},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,t){return e(n)},map:function(e){return Do(n)},mapError:function(e){return Do(e(n))},each:T,bind:function(e){return Do(n)},exists:x,forall:E,toOption:O.none}},Co={value:Oo,error:Do,fromOption:function(e,t){return e.fold(function(){return Do(t)},Oo)}},Po=function(e){return e.replace(/\./g,"-")},ko=function(e,t){return e+"-"+t},Mo=function(e){var n=Po(e);return{resolve:function(e){var t=e.split(" ");return H(t,function(e){return ko(n,e)}).join(" ")}}};Mo("ephox.flour").resolve;var Ro,Fo,jo={resolve:Mo("ephox-salmon").resolve},Uo=jo.resolve("upload-image-in-progress"),Ho="data-"+jo.resolve("image-blob"),Bo="data-"+jo.resolve("image-upload"),Yo={uploadInProgress:y(Uo),blobId:y(Ho),trackedImage:y(Bo)},Wo=function(e){var r=xr.apply(null,e),o=[];return{bind:function(e){if(void 0===e)throw new Error("Event bind error: undefined handler");o.push(e)},unbind:function(t){o=W(o,function(e){return e!==t})},trigger:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=r.apply(null,e);B(o,function(e){e(n)})}}},qo={create:function(e){return{registry:le(e,function(e){return{bind:e.bind,unbind:e.unbind}}),trigger:le(e,function(e){return e.trigger})}}},zo=function(e,t){for(var n=[],r=function(e){return n.push(e),t(e)},o=t(e);(o=o.bind(r)).isSome(););return n},$o=function(e){return xt.fromDom(e.dom().ownerDocument)},Vo=function(e){return O.from(e.dom().parentNode).map(xt.fromDom)},Go=function(e,t){for(var n=P(t)?t:x,r=e.dom(),o=[];null!==r.parentNode&&void 0!==r.parentNode;){var i=r.parentNode,a=xt.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o},Ko=function(e){return O.from(e.dom().previousSibling).map(xt.fromDom)},Xo=function(e){return O.from(e.dom().nextSibling).map(xt.fromDom)},Jo=function(e){return t=zo(e,Ko),(n=M.call(t,0)).reverse(),n;var t,n},Zo=function(e){return H(e.dom().childNodes,xt.fromDom)},Qo=function(e){return t=0,n=e.dom().childNodes,O.from(n[t]).map(xt.fromDom);var t,n},ei=function(e){return e.dom().childNodes.length},ti=(xr("element","offset"),function(e,t){var n=[];return B(Zo(e),function(e){t(e)&&(n=n.concat([e])),n=n.concat(ti(e,t))}),n}),ni=function(e,t){return vo(t,e)},ri=Yo.trackedImage(),oi=function(e,t){return ni(e,"img["+ri+'="'+t+'"]')},ii=function(e){return ni(e,"img:not(["+ri+"])["+Yo.blobId()+"]")};function ai(){var o=[],i=[],e=qo.create({complete:Wo(["response"])}),a=function(){e.trigger.complete(i),i=[]},u=function(){return 0<o.length};return{findById:oi,findAll:ii,register:function(e,t){gt(e,ri,t),o.push(t)},report:function(e,t,r){var n;B(t,function(e){var t,n;bt(e,ri),t=r,n=e,i.push({success:t,element:n.dom()})}),n=e,o=W(o,function(e,t){return e!==n}),!1===u()&&a()},inProgress:u,isActive:function(e){return j(o,e)},events:e.registry}}(Fo=Ro||(Ro={})).JSON="json",Fo.Blob="blob",Fo.Text="text",Fo.FormData="formdata",Fo.MultipartFormData="multipart/form-data";var ui,ci=function(i){return ae(ae({},i),{toCached:function(){return ci(i.toCached())},bindFuture:function(t){return ci(i.bind(function(e){return e.fold(function(e){return Ne.pure(Co.error(e))},function(e){return t(e)})}))},bindResult:function(t){return ci(i.map(function(e){return e.bind(t)}))},mapResult:function(t){return ci(i.map(function(e){return e.map(t)}))},mapError:function(t){return ci(i.map(function(e){return e.mapError(t)}))},foldResult:function(t,n){return i.map(function(e){return e.fold(t,n)})},withTimeout:function(e,o){return ci(Ne.nu(function(t){var n=!1,r=g.setTimeout(function(){n=!0,t(Co.error(o()))},e);i.get(function(e){n||(g.clearTimeout(r),t(e))})}))}})},si=function(e){return ci(Ne.nu(e))},li=function(e){return ci(Ne.pure(Co.value(e)))},fi=si,di=li,mi=function(e){return ci(Ne.pure(Co.error(e)))},pi=function(e){try{var t=JSON.parse(e);return Co.value(t)}catch(e){return Co.error("Response was not JSON.")}},gi=function(t){return Ne.nu(function(n){var e=new g.FileReader;e.onload=function(e){var t=e.target?e.target.result:new g.Blob([]);n(t)},e.readAsText(t)})},vi=function(e){return Ne.pure(e.response)},hi=function(e,t){switch(e){case Ro.JSON:return pi(t.response).fold(function(){return vi(t)},Ne.pure);case Ro.Blob:return n=t,O.from(n.response).map(gi).getOr(Ne.pure("no response content"));case Ro.Text:default:return vi(t)}var n},yi=function(e){var t,n=(t=e.body,O.from(t).bind(function(e){switch(e.type){case Ro.JSON:return O.some("application/json");case Ro.FormData:return O.some("application/x-www-form-urlencoded; charset=UTF-8");case Ro.MultipartFormData:return O.none();case Ro.Text:default:return O.some("text/plain")}})),r=!0===e.credentials?O.some(!0):O.none(),o=function(e){switch(e){case Ro.Blob:return"application/octet-stream";case Ro.JSON:return"application/json, text/javascript";case Ro.Text:return"text/plain";default:return""}}(e.responseType)+", */*; q=0.01",i=void 0!==e.headers?e.headers:{};return{contentType:n,responseType:function(e){switch(e){case Ro.JSON:return O.none();case Ro.Blob:return O.some("blob");case Ro.Text:return O.some("text");default:return O.none()}}(e.responseType),credentials:r,accept:o,headers:i,progress:P(e.progress)?O.some(e.progress):O.none()}},bi=function(e){var n=new g.FormData;return se(e,function(e,t){n.append(t,e)}),n},Ti=function(c){return fi(function(r){var o,i=new g.XMLHttpRequest;i.open(c.method,(o=c.url,O.from(c.query).map(function(e){var t=de(e,function(e,t){return encodeURIComponent(t)+"="+encodeURIComponent(e)}),n=eo(o,"?")?"&":"?";return 0<t.length?o+n+t.join("&"):o}).getOr(o)),!0);var n,e,t=yi(c);n=i,(e=t).contentType.each(function(e){return n.setRequestHeader("Content-Type",e)}),n.setRequestHeader("Accept",e.accept),e.credentials.each(function(e){return n.withCredentials=e}),e.responseType.each(function(e){return n.responseType=e}),e.progress.each(function(t){return n.upload.addEventListener("progress",function(e){return t(e.loaded,e.total)})}),se(e.headers,function(e,t){return n.setRequestHeader(t,e)});var a,u=function(){var t,e,n;(t=c.url,e=c.responseType,n=i,hi(e,n).map(function(e){return{message:0===n.status?"Unknown HTTP error (possible cross-domain request)":"Could not load url "+t+": "+n.statusText,status:n.status,responseText:e}})).get(function(e){return r(Co.error(e))})};i.onerror=u,i.onload=function(){0!==i.status||to(c.url,"file:")?i.status<100||400<=i.status?u():function(e,t){var n=function(){return di(t.response)},r=function(e){return mi({message:e,status:t.status,responseText:t.responseText})};switch(e){case Ro.JSON:return pi(t.response).fold(r,di);case Ro.Blob:case Ro.Text:return n();default:return r("unknown data type")}}(c.responseType,i).get(r):u()},(a=c.body,O.from(a).map(function(e){return e.type===Ro.JSON?JSON.stringify(e.data):e.type===Ro.FormData?bi(e.data):e.type===Ro.MultipartFormData?bi(e.data):e})).fold(function(){return i.send()},function(e){i.send(e)})})},xi=Object.prototype.hasOwnProperty,Ei=(ui=function(e,t){return t},function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var o=e[r];for(var i in o)xi.call(o,i)&&(n[i]=ui(n[i],o[i]))}return n}),wi={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@\/]*)(?::([^:@\/]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@\/]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*)(?::([^:@\/]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},Si=function(e,t){return function(e,t){for(var r=t,n=r.parser[r.strictMode?"strict":"loose"].exec(e),o={},i=14;i--;)o[r.key[i]]=n[i]||"";return o[r.q.name]={},o[r.key[12]].replace(r.q.parser,function(e,t,n){t&&(o[r.q.name][t]=n)}),o}(e,Ei(wi,t))},_i=function(e){var t="";return""!==e.protocol&&(t+=e.protocol,t+=":"),""!==e.authority&&(t+="//",t+=e.authority),t+=e.path,""!==e.query&&(t+="?",t+=e.query),""!==e.anchor&&(t+="#",t+=e.anchor),t},Ni=function(e){return Qr(e,Li(e))},Li=function(e){return e.substring(e.lastIndexOf("/"))},Ii=function(e){for(var t=e,n="";""!==t;)if(to(t,"../"))t=Zr(t,"../");else if(to(t,"./"))t=Zr(t,"./");else if(to(t,"/./"))t="/"+Zr(t,"/./");else if("/."===t)t="/";else if(to(t,"/../"))t="/"+Zr(t,"/../"),n=Ni(n);else if("/.."===t)t="/",n=Ni(n);else if("."===t||".."===t)t="";else{var r=t.match(/(^\/?.*?)(\/|$)/)[1];t=Zr(t,r),n+=r}return n},Ai=function(e,t,n){if(""!==n&&""===e)return"/"+t;var r=e.substring(e.lastIndexOf("/")+1);return Qr(e,r)+t},Oi=function(e,t){var n={strictMode:!0},r=Si(e,n),o=Si(t,n),i={};return""!==o.protocol?(i.protocol=o.protocol,i.authority=o.authority,i.path=Ii(o.path),i.query=o.query):(""!==o.authority?(i.authority=o.authority,i.path=Ii(o.path),i.query=o.query):(""===o.path?(i.path=r.path,""!==o.query?i.query=o.query:i.query=r.query):(to(o.path,"/")?i.path=Ii(o.path):(i.path=Ai(r.path,o.path,e.authority),i.path=Ii(i.path)),i.query=o.query),i.authority=r.authority),i.protocol=r.protocol),i.anchor=o.anchor,i},Di=function(e,t){var n=Oi(e,t);return _i(n)},Ci=xr("message","status","contents"),Pi=["jpg","png","gif","jpeg"],ki={failureObject:Ci,getFilename:function(e,t){return L(e.name)&&!no(e.name,".tmp")?e.name:function(e,t){if(L(e.type)&&to(e.type,"image/")){var n=e.type.substr("image/".length);return j(Pi,n)?t+"."+n:t}return t}(e,t)},buildData:function(e,t,n){var r=new g.FormData;return r.append(e,t,n),r}};function Mi(i){var e,t,n,r,d=(e=i.url,t=e.lastIndexOf("/"),n=0<t?e.substr(0,t):e,r=void 0===i.basePath?n:i.basePath,no(r,"/")?r:r+"/"),o=function(e,t,l){var n,r,f=ki.getFilename(e,t),o=(n=ki.buildData("image",e,f).get("image"),{type:Ro.Blob,data:n});(r={url:i.url,body:o,responseType:Ro.Text,credentials:!0===i.credentials},Ti(ae(ae({},r),{method:"post"}))).get(function(e){e.fold(function(e){l(Co.error(ki.failureObject(e.message,e.status,e.responseText)))},function(t){var n,e,r,o;try{var i=JSON.parse(t);if(!L(i.location))return e="JSON response did not contain a string location",r=500,o=t,void l(Co.error(ki.failureObject(e,r,o)));n=i.location}catch(e){n=t}var a,u,c,s=(a=f,u=n.split(/\s+/),c=1===u.length&&""!==u[0]?u[0]:a,Di(d,c));l(Co.value({location:s}))})})};return{upload:function(e,t,n){var r=e.imageresult();Ke(r).then(function(e){o(e,t,n)})}}}xr("id","filename","blob","base64");var Ri=function(e){return Mi(e)},Fi=function(e,t){var n=ht(e,t);return void 0===n||""===n?[]:n.split(" ")},ji=function(e){return void 0!==e.dom().classList},Ui=function(e){return Fi(e,"class")},Hi=function(e,t){return o=t,i=Fi(n=e,r="class").concat([o]),gt(n,r,i.join(" ")),!0;var n,r,o,i},Bi=function(e,t){return o=t,0<(i=W(Fi(n=e,r="class"),function(e){return e!==o})).length?gt(n,r,i.join(" ")):bt(n,r),!1;var n,r,o,i},Yi=function(e,t){ji(e)?e.dom().classList.add(t):Hi(e,t)},Wi=function(e,t){var n;ji(e)?e.dom().classList.remove(t):Bi(e,t);0===(ji(n=e)?n.dom().classList:Ui(n)).length&&bt(n,"class")},qi=function(e,t){return ji(e)&&e.dom().classList.contains(t)},zi=function(t,e){B(e,function(e){Yi(t,e)})},$i=function(e){return ji(e)?function(e){for(var t=e.dom().classList,n=new Array(t.length),r=0;r<t.length;r++)n[r]=t.item(r);return n}(e):Ui(e)},Vi=function(t){return function(e){return qi(e,t)}},Gi=function(e,t,n){return No(e,function(e){return po(e,t)},n)},Ki=function(e,t){return n=t,o=void 0===(r=e)?g.document:r.dom(),go(o)?O.none():O.from(o.querySelector(n)).map(xt.fromDom);var n,r,o},Xi=function(e,t,n){return r=Gi,a=n,po(o=e,i=t)?O.some(o):P(a)&&a(o)?O.none():r(o,i,a);var r,o,i,a},Ji=ve([{blob:["id","imageresult","objurl"]},{url:["id","url","raw"]}]),Zi=Ei(Ji,{cata:function(e,t,n){return e.fold(t,n)}}),Qi=lo(),ea=function(e){return 1===e.length&&j(e,"Files")},ta=function(e){return!j(e,"text/_moz_htmlcontext")},na=function(e){return j(e,"Files")},ra=function(e){return!0};Qi.browser.isChrome()||Qi.browser.isSafari()||Qi.browser.isOpera()||Qi.browser.isFirefox()||Qi.browser.isIE();Mo("ephox-hermes").resolve;var oa=function(t,n){Vo(t).each(function(e){e.dom().insertBefore(n.dom(),t.dom())})},ia=function(e,t){Xo(e).fold(function(){Vo(e).each(function(e){ua(e,t)})},function(e){oa(e,t)})},aa=function(t,n){Qo(t).fold(function(){ua(t,n)},function(e){t.dom().insertBefore(n.dom(),e.dom())})},ua=function(e,t){e.dom().appendChild(t.dom())},ca=function(e,t){oa(e,t),ua(t,e)},sa=function(r,o){B(o,function(e,t){var n=0===t?r:o[t-1];ia(n,e)})},la=function(t,e){B(e,function(e){ua(t,e)})};lo();Mo("ephox-pastry").resolve;var fa=function(e){e.dom().textContent="",B(Zo(e),function(e){da(e)})},da=function(e){var t=e.dom();null!==t.parentNode&&t.parentNode.removeChild(t)},ma=function(e){var t,n=Zo(e);0<n.length&&(t=e,B(n,function(e){oa(t,e)})),da(e)},pa=function(e){return void 0!==e.style&&P(e.style.getPropertyValue)},ga=function(e,t,n){if(!L(n))throw g.console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);pa(e)&&e.style.setProperty(t,n)},va=function(e,t,n){var r=e.dom();ga(r,t,n)},ha=function(e,t){var n=e.dom();se(t,function(e,t){ga(n,t,e)})},ya=function(e,t){var n=e.dom(),r=g.window.getComputedStyle(n).getPropertyValue(t),o=""!==r||_o(e)?r:ba(n,t);return null===o?void 0:o},ba=function(e,t){return pa(e)?e.style.getPropertyValue(t):""},Ta=function(e,t){var n=e.dom(),r=ba(n,t);return O.from(r).filter(function(e){return 0<e.length})},xa=function(e,t){var n,r,o=e.dom();r=t,pa(n=o)&&n.style.removeProperty(r),yt(e,"style")&&""===ro(ht(e,"style"))&&bt(e,"style")};xr("heading","renderer");var Ea=function(e,t){return $(e,function(e){return e.start()===t})},wa=function(e,t,n){var r,o,i=n(e,t);return r=i,o=e.start(),H(r,function(e){return ae(ae({},e),{start:y(e.start()+o),finish:y(e.finish()+o)})})},Sa=function(e,n,t){return void 0===t&&(t=0),q(e,function(t,e){return n(e,t.len).fold(y(t),function(e){return{len:e.finish(),list:t.list.concat([e])}})},{len:t,list:[]}).list},_a=function(e,t,n){return 0===t.length?e:G(e,function(r){var e=G(t,function(e){return(n=e)>=(t=r).start()&&n<=t.finish()?[e-r.start()]:[];var t,n});return 0<e.length?wa(r,e,n):[r]})},Na=function(o,e,i){var t=Ea(o,e),a=Ea(o,i);return t.bind(function(e){var t,n,r=a.getOr((n=i,(t=o)[t.length-1]&&t[t.length-1].finish()===n?t.length+1:-1));return-1<r?O.some(o.slice(e,r)):O.none()}).getOr([])};xr("within","extra","withinWidth");var La,Ia={resolve:(La="ephox-echo".replace(/\./g,"-"),{resolve:function(e){return La+"-"+e}}).resolve},Aa=(Ia.resolve("aria-help"),Ia.resolve("aria-help-visible"),lo(),xr("image","blobInfo")),Oa=ve([{failure:["error"]},{success:["result","images","blob"]}]),Da=function(e,t,n,r,o){var i=Je(n),a=e.lookupByData(i).getOrThunk(function(){return e.add(t,n,r)});return gt(o,Yo.blobId(),a.id()),Aa(o,a)},Ca=function(t,n){return t.get(n).fold(function(){return Co.error("Internal error with blob cache")},function(e){return t.remove(n),Co.value(e)})},Pa=function(e,t,n){var r=e.isActive(t);return e.register(n,t),Yi(n,Yo.uploadInProgress()),r?O.none():O.some(t)},ka=function(e,n,a,r,u,t,c){var s=function(){g.console.error("Internal error with blob cache",u),c(Oa.failure({status:y(666)}))};e.upload(t,u,function(e){var t,i=n.findById(r,u);B(i,(t=Yo.uploadInProgress(),function(e){Wi(e,t)})),e.fold(function(e){c(Oa.failure(e))},function(t){var e,n,r,o;(e=a,n=i,r=u,o=t,B(n,function(e){gt(e,"src",o.location),bt(e,Yo.blobId())}),Ca(e,r)).fold(s,function(e){c(Oa.success(t,i,e))})}),n.report(u,i,e.isValue())})},Ma=function(o,i,e){return G(e,function(e){return Zi.cata(e,function(t,n,r){return Ki(i,'img[src="'+r+'"]').fold(function(){return[Co.error("Image that was just inserted could not be found: "+r)]},function(e){return[Co.value(Da(o,t,n,r,e))]})},y([]))})},Ra=function(e,o,t){var n=e.findAll(t);return e.inProgress()?[]:H(n,function(e){return t=o,r=ht(n=e,Yo.blobId()),t.get(r).fold(function(){return Co.error(r)},function(e){return Co.value(Aa(n,e))});var t,n,r})},Fa=function(e){return parseInt(e,10)},ja=function(e,t,n){return{major:y(e),minor:y(t),patch:y(n)}},Ua={getTinymceVersion:function(){var e,t,n=[tinymce.majorVersion,tinymce.minorVersion].join(".");return e=n.split(".").slice(0,3).join("."),(t=/([0-9]+)\.([0-9]+)\.([0-9]+)(?:(\-.+)?)/.exec(e))?ja(Fa(t[1]),Fa(t[2]),Fa(t[3])):ja(0,0,0)}};function Ha(c){var s=function(e,t){return y(4===(o=Ua.getTinymceVersion()).major()&&o.minor()<6?e:e+"."+(n=t.toLowerCase(),(r={"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"}).hasOwnProperty(n)?r[n]:"dat"));var n,r,o};return{importImages:function(e){var t=G(e,function(e){return ye.cata(e,function(e,t,n){var r,o,i,a,u=Je(t);return[(r=e,o=t,i=u,a=n,Ne.nu(function(t){Xe(o).then(function(e){c.editorUpload.blobCache.add({id:y(r),name:y(r),filename:s(r,e.type),blob:y(e),base64:y(i.split(",")[1]),blobUri:y(a),uri:y(null)}),t(e)})}))]},y([]))});return Ie(t)},uploadImages:function(){c.uploadImages()},prepareImages:T,getLocalURL:function(e,t,n){return Je(t)}}}var Ba=function(e,t){var n=(t||g.document).createElement("div");return n.innerHTML=e,Zo(xt.fromDom(n))},Ya=function(e){Wi(e,Yo.uploadInProgress())},Wa=function(e){for(var t=0;t<e.undoManager.data.length;t++){var n=e.undoManager.data[t].content,r=xt.fromTag("div");la(r,Ba(n));var o=ni(r,"."+Yo.uploadInProgress());B(o,Ya),e.undoManager.data[t].content=r.dom().innerHTML}},qa=function(e,t,n){for(var r=0;r<e.undoManager.data.length;r++)e.undoManager.data[r].content=e.undoManager.data[r].content.split(t.objurl()).join(n.location)},za={showDialog:function(e,t){var n,r={title:"Error",spacing:10,padding:10,items:[{type:"container",html:t}],buttons:[{text:"Ok",onclick:function(){n.close()}}]};n=e.windowManager.open(r)}},$a=function(r,e){var o,t,i,a,u,n,c=Ar(),s=ai(),l=(o=r,t=e.url,i=za,a=function(){return wt.translate("error.code.images.not.found")+t+wt.translate("error.full.stop")},u=function(){return wt.translate("error.imageupload")+t+wt.translate("error.full.stop")},n=function(e){var t=e.status(),n=0===t||400<=t||t<500?a:u;i.showDialog(o,n())},{instance:function(){return e=n,t=!1,function(){t||(t=!0,e.apply(null,arguments))};var e,t}}),f=Ri(e),d=function(){return xt.fromDom(r.getBody())},m=function(t,e,n){B(e,function(e){gt(e,"data-mce-src",t.location)}),qa(r,n,t)};s.events.complete.bind(function(e){Wa(r)});var p=function(o,i){Pa(s,o.blobInfo().id(),o.image()).each(function(e){var t,n,r;t=e,n=o.blobInfo(),r=i,ka(f,s,c,d(),t,n,function(e){e.fold(function(e){r(e)},m)})})};return{importImages:function(){return Ne.pure([])},uploadImages:function(e){var t,n,r,o,i;t=l.instance(),n=Ra(s,c,d()),B(n,function(e){e.fold(function(e){s.report(e,O.none(),!1)},function(e){p(e,t)})}),r=e,o=l.instance(),i=Ma(c,d(),r),B(i,function(e){e.fold(function(e){console.error(e)},function(e){p(e,o)})})},prepareImages:T,getLocalURL:function(e,t,n){return n}}},Va=function(o){var e=Ha(o);return{importImages:function(){return Ne.pure([])},uploadImages:T,prepareImages:function(e){B(e,function(e){ye.cata(e,function(e,t,n){var r=Je(t);B(o.dom.select('img[src="'+n+'"]'),function(e){o.dom.setAttrib(e,"src",r)})},T)})},getLocalURL:e.getLocalURL}};function Ga(e){return void 0!==e.uploadImages?Ha(e):function(e){if(J(e)){var t={url:e.settings.images_upload_url,basePath:e.settings.images_upload_base_path,credentials:e.settings.images_upload_credentials};return $a(e,t)}return Va(e)}(e)}var Ka=function(t,r,e,n){var o,i,a,u,c,s=t.selection,l=t.dom,f=t.getBody();if(c=e.isText(),e.reset(),n.clipboardData&&n.clipboardData.getData("text/html")){n.preventDefault();var d=n.clipboardData.getData("text/html"),m=d.match(/<html[\s\S]+<\/html>/i),p=null===m?d:m[0];return r(p)}if(!l.get("_mcePaste")){if(o=l.add(f,"div",{id:"_mcePaste",class:"mcePaste"},'\ufeff<br _mce_bogus="1">'),u=f!==t.getDoc().body?l.getPos(t.selection.getStart(),f).y:f.scrollTop,l.setStyles(o,{position:"absolute",left:-1e4,top:u,width:1,height:1,overflow:"hidden"}),tinymce.isIE)return(a=l.doc.body.createTextRange()).moveToElementText(o),a.execCommand("Paste"),l.remove(o),"\ufeff"===o.innerHTML?(t.execCommand("mcePasteWord"),void n.preventDefault()):(r(c?o.innerText:o.innerHTML),tinymce.dom.Event.cancel(n));var g=function(e){e.preventDefault()};if(l.bind(t.getDoc(),"mousedown",g),l.bind(t.getDoc(),"keydown",g),tinymce.isGecko&&(a=t.selection.getRng(!0)).startContainer===a.endContainer&&3===a.startContainer.nodeType){var v=l.select("p,h1,h2,h3,h4,h5,h6,pre",o);1===v.length&&l.remove(v.reverse(),!0)}i=t.selection.getRng(),o=o.firstChild,(a=t.getDoc().createRange()).setStart(o,0),a.setEnd(o,1),s.setRng(a),window.setTimeout(function(){var n="",e=l.select("div.mcePaste");_t.each(e,function(e){var t=e.firstChild;t&&"DIV"===t.nodeName&&t.style.marginTop&&t.style.backgroundColor&&l.remove(t,1),_t.each(l.select("div.mcePaste",e),function(e){l.remove(e,1)}),_t.each(l.select("span.Apple-style-span",e),function(e){l.remove(e,1)}),_t.each(l.select("br[_mce_bogus]",e),function(e){l.remove(e)}),n+=e.innerHTML}),_t.each(e,function(e){l.remove(e)}),i&&s.setRng(i),r(n),l.unbind(t.getDoc(),"mousedown",g),l.unbind(t.getDoc(),"keydown",g)},0)}},Xa={getOnPasteFunction:function(t,n,r){return function(e){Ka(t,n,r,e)}},getOnKeyDownFunction:function(t,n,r){return function(e){(tinymce.isOpera||0<navigator.userAgent.indexOf("Firefox/2"))&&((tinymce.isMac?e.metaKey:e.ctrlKey)&&86===e.keyCode||e.shiftKey&&45===e.keyCode)&&Ka(t,n,r,e)}}};var Ja=function(e,t){for(var n=0;n<e.length;n++){var r=t(e[n],n);if(r.isSome())return r}return O.none()},Za=function(e,t){return e?O.some(t):O.none()},Qa=["officeStyles","htmlStyles","isWord","isGoogleDocs","proxyBin","isInternal","backgroundAssets"],eu=function(e,n){var r={};return B(Qa,function(t){n[t]().or(e[t]()).each(function(e){r[t]=e})}),tu(r)},tu=Lr([],Qa),nu=ve([{error:["message"]},{paste:["elements","correlated"]},{cancel:[]},{incomplete:["elements","correlated","message"]}]),ru=function(e,t,n,r,o){return e.fold(t,n,r,o)},ou={error:nu.error,paste:nu.paste,cancel:nu.cancel,incomplete:nu.incomplete,cata:ru,carry:function(e,r){return ru(e,O.none,O.none,O.none,function(e,t,n){return ru(r,O.none,function(e,t){return O.some(nu.incomplete(e,t,n))},O.none,O.none)}).getOr(r)}},iu=Lr(["response","bundle"],[]),au=function(t){return lu(function(e){e(iu(t))})},uu=function(e,t){e(iu(t))},cu=function(e){return au({response:e.response(),bundle:e.bundle()})},su=function(e){return au({response:ou.error(e),bundle:tu({})})},lu=function(t){var e=function(e){t(e)},o=lu;return{get:e,map:function(r){return o(function(n){e(function(e){var t=r(e);n(t)})})},bind:function(n){return o(function(t){e(function(e){n(e).get(t)})})}}},fu=xr("steps","input","label","capture"),du=function(e,t,n){var r;return(r=n,Ja(e,function(t){return t.getAvailable(r).map(function(e){return fu(t.steps(),e,t.label(),t.capture())})})).getOrThunk(function(){var e=t.getAvailable(n);return fu(t.steps(),e,t.label(),t.capture())})},mu=function(e,a){return q(e,function(e,i){return e.bind(function(e){var r,t,n,o;return t=function(){return i(a,e)},n=A(cu,r=e),o=function(){return t().map(function(e){var t=eu(r.bundle(),e.bundle()),n=ou.carry(r.response(),e.response());return iu({response:n,bundle:t})})},ou.cata(r.response(),n,o,n,o)})},au({response:ou.paste([],[]),bundle:tu({})}))},pu=function(e){return e.officeStyles().getOr(!0)},gu=function(e){return e.htmlStyles().getOr(!1)},vu=function(e){return e.isWord().getOr(!1)},hu={proxyBin:function(n){return{handle:function(e,t){return n.proxyBin().fold(function(){return g.console.error(e),au({response:ou.cancel(),bundle:tu({})})},t)}}},backgroundAssets:function(e){return Ne.nu(function(t){e.backgroundAssets().fold(function(){t([])},function(e){e.listen(t)})})},merging:function(e){var t=vu(e);return t&&pu(e)||!t&&gu(e)},mergeOffice:pu,mergeNormal:gu,isWord:vu,isGoogleDocs:function(e){return e.isGoogleDocs().getOr(!1)},isInternal:function(e){return e.isInternal().getOr(!1)}},yu=lo(),bu=yu.deviceType.isiOS()||yu.deviceType.isAndroid(),Tu=y({isSupported:y(!1),cleanDocument:function(){return xe.reject("not supported")}}),xu=bu?Tu:function(e,t,n){var r,o=t+"/wordimport.js"+(r=n||"v=5.5.2",O.from(r).filter(function(e){return 0!==e.length}).map(function(e){return(-1===e.indexOf("?")?"?":"")+e}).getOr("")),i=e.loadScript("ephox.wimp",o);i.catch(function(e){g.console.error("Unable to load word import: ",e)});return{isSupported:y(!0),cleanDocument:function(t,n,r){return i.then(function(e){return e.cleanDocument(t,n,r.cleanFilteredInlineElements)})}}};function Eu(e,t,n,r){var o=ho(e,n)&&t===r;return{startContainer:y(e),startOffset:y(t),endContainer:y(n),endOffset:y(r),collapsed:y(o)}}var wu=function(r,o,i){if(0===o.length)throw new Error("You must specify at least one required field.");return _r("required",o),Nr(o),function(t){var n=ue(t);K(o,function(e){return j(n,e)})||wr(o,n),r(o,n);var e=W(o,function(e){return!i.validate(t[e],e)});return 0<e.length&&function(e,t){throw new Error("All values need to be of type: "+t+". Keys ("+Er(e).join(", ")+") were not.")}(e,i.label),t}},Su=function(t,e){var n=W(e,function(e){return!j(t,e)});0<n.length&&Sr(n)},_u=function(e){return e.dom().innerHTML},Nu=function(e,t,n){var r,o,i=e.document.createRange();return r=i,t.fold(function(e){r.setStartBefore(e.dom())},function(e,t){r.setStart(e.dom(),t)},function(e){r.setStartAfter(e.dom())}),o=i,n.fold(function(e){o.setEndBefore(e.dom())},function(e,t){o.setEnd(e.dom(),t)},function(e){o.setEndAfter(e.dom())}),i},Lu=function(e,t,n,r,o){var i=e.document.createRange();return i.setStart(t.dom(),n),i.setEnd(r.dom(),o),i},Iu=ve([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Au=function(e,t,n){return t(xt.fromDom(n.startContainer),n.startOffset,xt.fromDom(n.endContainer),n.endOffset)},Ou=function(e,t){var o,n,r,i=(o=e,t.match({domRange:function(e){return{ltr:y(e),rtl:O.none}},relative:function(e,t){return{ltr:So(function(){return Nu(o,e,t)}),rtl:So(function(){return O.some(Nu(o,t,e))})}},exact:function(e,t,n,r){return{ltr:So(function(){return Lu(o,e,t,n,r)}),rtl:So(function(){return O.some(Lu(o,n,r,e,t))})}}}));return(r=(n=i).ltr()).collapsed?n.rtl().filter(function(e){return!1===e.collapsed}).map(function(e){return Iu.rtl(xt.fromDom(e.endContainer),e.endOffset,xt.fromDom(e.startContainer),e.startOffset)}).getOrThunk(function(){return Au(0,Iu.ltr,r)}):Au(0,Iu.ltr,r)},Du=(Iu.ltr,Iu.rtl,{create:xr("start","soffset","finish","foffset")});function Cu(n,r){var t=function(e){return n(e)?O.from(e.dom().nodeValue):O.none()};return{get:function(e){if(!n(e))throw new Error("Can only get "+r+" value of a "+r+" node");return t(e).getOr("")},getOption:t,set:function(e,t){if(!n(e))throw new Error("Can only set raw "+r+" value of a "+r+" node");e.dom().nodeValue=t}}}var Pu,ku,Mu=Cu(mt,"text"),Ru=function(e){return Mu.get(e)},Fu=function(e,t){Mu.set(e,t)},ju=ve([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Uu={before:ju.before,on:ju.on,after:ju.after,cata:function(e,t,n,r){return e.fold(t,n,r)},getStart:function(e){return e.fold(a,a,a)}},Hu=ve([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Bu={domRange:Hu.domRange,relative:Hu.relative,exact:Hu.exact,exactFromRange:function(e){return Hu.exact(e.start(),e.soffset(),e.finish(),e.foffset())},getWin:function(e){var t,n=e.match({domRange:function(e){return xt.fromDom(e.startContainer)},relative:function(e,t){return Uu.getStart(e)},exact:function(e,t,n,r){return e}});return t=n,xt.fromDom(t.dom().ownerDocument.defaultView)},range:Du.create},Yu=function(e,t){var n=ct(e);return"input"===n?Uu.after(e):j(["br","img"],n)?0===t?Uu.before(e):Uu.after(e):Uu.on(e,t)},Wu=function(e,t,n,r){var o=$o(e).dom().createRange();return o.setStart(e.dom(),t),o.setEnd(n.dom(),r),o},qu=function(e,t,n,r,o){var i,a,u=Lu(e,t,n,r,o);i=e,a=u,O.from(i.getSelection()).each(function(e){e.removeAllRanges(),e.addRange(a)})},zu=function(e,t,n,r,o){var i,a,u,c,l,s=(i=r,a=o,u=Yu(t,n),c=Yu(i,a),Bu.relative(u,c));Ou(l=e,s).match({ltr:function(e,t,n,r){qu(l,e,t,n,r)},rtl:function(t,n,r,o){var e,i,a,u,c,s=l.getSelection();if(s.setBaseAndExtent)s.setBaseAndExtent(t.dom(),n,r.dom(),o);else if(s.extend)try{i=t,a=n,u=r,c=o,(e=s).collapse(i.dom(),a),e.extend(u.dom(),c)}catch(e){qu(l,r,o,t,n)}else qu(l,r,o,t,n)}})},$u=function(e){var t,n,r,o,i,a,u=xt.fromDom(e.anchorNode),c=xt.fromDom(e.focusNode);return t=u,n=e.anchorOffset,r=c,o=e.focusOffset,i=Wu(t,n,r,o),a=ho(t,r)&&n===o,i.collapsed&&!a?O.some(Du.create(u,e.anchorOffset,c,e.focusOffset)):function(e){if(0<e.rangeCount){var t=e.getRangeAt(0),n=e.getRangeAt(e.rangeCount-1);return O.some(Du.create(xt.fromDom(t.startContainer),t.startOffset,xt.fromDom(n.endContainer),n.endOffset))}return O.none()}(e)},Vu=function(e){return O.from(e.getSelection()).filter(function(e){return 0<e.rangeCount}).bind($u)},Gu=lo(),Ku=Gu.browser,Xu=(Ku.isEdge()&&Ku.version.major<16||Gu.deviceType.isiOS(),wu(Su,["doc","win","body","getSelection","setSelection"],{validate:P,label:"function"}),{resolve:Mo("ephox-sloth").resolve}.resolve("bin")),Ju={bin:y(Xu)},Zu=lo(),Qu=Zu.browser.isIE()&&Zu.browser.version.major<=10,ec=Qu?function(e,t,n){t.control.block(),e.dom().execCommand("paste"),n(),t.control.unblock()}:function(e,t,n){setTimeout(n,1)},tc={willBlock:y(Qu),run:function(e,t,n){return ec(e,t,n)}},nc=function(){var e=!1;return{isBlocked:function(){return e},block:function(){e=!0},unblock:function(){e=!1}}},rc=function(e,t){return{control:e,instance:t}},oc={tap:function(n){var r=nc();return rc(r,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r.isBlocked()||n.apply(null,e)})}},ic=["b","i","u","sub","sup","strike"],ac=function(e){B(Zo(e),function(e){var t;dt(t=e)&&!t.dom().hasChildNodes()&&j(ic,ct(t))&&da(e)})},uc=function(e,o){var t=Zo(e);B(t,function(e){var t,n,r;o(e)&&(n=Zo(t=e),r=xt.fromTag("div",$o(t).dom()),la(r,n),oa(t,r),da(t))})},cc={consolidate:function(n,e){Xo(n).filter(e).each(function(e){var t=Zo(e);la(n,t),da(e)}),uc(n,e),ac(n)}},sc=function(e){return"rtl"===ya(e,"direction")?"rtl":"ltr"},lc=Ju.bin(),fc=lc+Ce(""),dc=(Pu="-100000px",ku="100000px",function(e){return"rtl"===sc(e)?ku:Pu});function mc(t,e,n){var r=function(t,e){var n=xt.fromTag("div");vt(n,e),vt(n,{contenteditable:"true","aria-hidden":"true"}),ha(n,{position:"fixed",top:"0px",width:"100px",height:"100px",overflow:"hidden",opacity:"0"}),zi(n,[lc,fc]);var r=function(e){return qi(e,fc)};return{attach:function(e){fa(n),va(n,"left",dc(e)),ua(e,n)},focus:function(){Gi(n,"body").each(function(e){t.toOff(e,n)})},contents:function(){return cc.consolidate(n,r),xr("elements","html","container")(Zo(n),_u(n),n)},container:function(){return n},detach:function(){da(n)}}}(t,n),o=function(){t.cleanup();var e=r.contents();r.detach(),a.trigger.after(e.elements(),e.html(),r.container())},i=oc.tap(function(){a.trigger.before(),r.attach(e),r.focus(),tc.run($o(e),i,o)}),a=qo.create({before:Wo([]),after:Wo(["elements","html","container"])}),u=T;return{instance:y(function(){i.instance()}),destroy:u,events:a.registry}}var pc=function(e){return{startContainer:e.start,startOffset:e.soffset,endContainer:e.finish,endOffset:e.foffset}},gc={set:function(e,t){zu(e,t.startContainer(),t.startOffset(),t.endContainer(),t.endOffset())},get:function(e){return Vu(e).map(pc)}};function vc(a){return function(t){var u,r,o,c,n=qo.create({after:Wo(["container"])}),i=(u=gc,r=xt.fromTag("br"),o=O.none(),c=function(e){return $o(e).dom().defaultView},{cleanup:function(){da(r)},toOn:function(i,e){var a=c(e);o.each(function(e){var t=ei(i),n=ho(i,e.startContainer())&&t<e.startOffset()?t:e.startOffset,r=ho(i,e.endContainer())&&t<e.endOffset()?t:e.endOffset,o=Eu(e.startContainer(),n,e.endContainer(),r);u.set(a,o)})},toOff:function(e,t){var n=c(t);ua(t,r),o=u.get(n,Eu),u.set(n,Eu(r,0,r,0))}}),e=mc(i,t,a);e.events.after.bind(function(e){i.toOn(t,e.container()),n.trigger.after(e.container())});return{run:function(){e.instance()()},events:n.registry}}}var hc=function(e){return t=e,n=!1,xt.fromDom(t.dom().cloneNode(n));var t,n},yc=function(e){return ft(e)?(t="v:shape",n=e.dom().nodeValue,r=xt.fromTag("div"),o=n.indexOf("]>"),r.dom().innerHTML=n.substr(o+"]>".length),Io(r,function(e){return ct(e)===t})):O.none();var t,n,r,o},bc=function(e){return yc(e).map(function(e){var t=ht(e,"o:spid"),n=void 0===t?ht(e,"id"):t,r=xt.fromTag("img");return Yi(r,"rtf-data-image"),gt(r,"data-image-id",n.substr("_x0000_".length)),gt(r,"data-image-type","code"),ha(r,{width:ya(e,"width"),height:ya(e,"height")}),r})},Tc=function(e){if(a="img",dt(i=e)&&ct(i)===a){var t=ht(e,"src");if(null!=t&&to(t,"file://")){var n=hc(e),r=t.split(/[\/\\]/),o=r[r.length-1];return gt(n,"data-image-id",o),bt(n,"src"),gt(n,"data-image-type","local"),Yi(n,"rtf-data-image"),O.some(n)}return O.none()}return O.none();var i,a},xc=function(){return/^(mso-.*|tab-stops|tab-interval|language|text-underline|text-effect|text-line-through|font-color|horiz-align|list-image-[0-9]+|separator-image|table-border-color-(dark|light)|vert-align|vnd\..*)$/},Ec=function(){return/^(font|em|strong|samp|acronym|cite|code|dfn|kbd|tt|b|i|u|s|sub|sup|ins|del|var|span)$/},wc=ve([{starts:["value","f"]},{pattern:["regex","f"]},{contains:["value","f"]},{exact:["value","f"]},{all:[]},{not:["stringMatch"]}]),Sc=function(e,n){return e.fold(function(e,t){return 0===t(n).indexOf(t(e))},function(e,t){return e.test(t(n))},function(e,t){return 0<=t(n).indexOf(t(e))},function(e,t){return t(n)===t(e)},function(){return!0},function(e){return!Sc(e,n)})},_c={starts:wc.starts,pattern:wc.pattern,contains:wc.contains,exact:wc.exact,all:wc.all,not:wc.not,cata:function(e,t,n,r,o,i,a){return e.fold(t,n,r,o,i,a)},matches:Sc,caseSensitive:function(e){return e},caseInsensitive:function(e){return e.toLowerCase()}},Nc=function(e,t,n,r){var o=r.name,i=void 0!==r.condition?r.condition:y(!0),a=void 0!==r.value?r.value:_c.all();return _c.matches(o,n)&&_c.matches(a,t)&&i(e)},Lc=function(e,t){var n=ct(e),r=t.name,o=void 0!==t.condition?t.condition:y(!0);return _c.matches(r,n)&&o(e)},Ic=function(e,t){var n={};return B(e.dom().attributes,function(e){t(e.value,e.name)||(n[e.name]=e.value)}),n},Ac=function(e,t,n){var r,o,i=H(e.dom().attributes,function(e){return e.name});pe(t)!==i.length&&(r=e,o=t,B(i,function(e){bt(r,e)}),se(o,function(e,t){gt(r,t,e)}))},Oc=(y({}),function(t){var e=ue(t);return H(e,function(e){return e+": "+t[e]}).join("; ")}),Dc=function(r,o){var e=r.dom().style,i={};return B(null==e?[]:e,function(e){var t,n=(t=e,r.dom().style.getPropertyValue(t));o(n,e)||(i[e]=n)}),i},Cc=function(n,e,t){gt(n,"style","");var r=pe(e),o=pe(t);if(0===r&&0===o)bt(n,"style");else if(0===r)gt(n,"style",Oc(t));else{se(e,function(e,t){va(n,t,e)});var i=ht(n,"style"),a=0<o?Oc(t)+"; ":"";gt(n,"style",a+i)}},Pc=function(e,t,n){var r,o,i,a=e.dom().getAttribute("style"),u=(o={},i=null!=(r=a)?r.split(";"):[],B(i,function(e){var t=e.split(":");2===t.length&&(o[ro(t[0])]=ro(t[1]))}),o),c={};return B(t,function(e){var t=u[e];void 0===t||n(t,e)||(c[e]=t)}),c},kc=["mso-list"],Mc=function(e,t){var n=Pc(e,kc,t),r=Dc(e,t);Cc(e,r,n)},Rc=function(e,t){var n=Ic(e,t);Ac(e,n,{})},Fc=Mc,jc=Rc,Uc=function(e,t){Mc(xt.fromDom(e),t)},Hc=function(e,r,o){e(o,function(t,n){return U(r,function(e){return Nc(o,t,n,e)})})},Bc=function(e,t){var r=Ei({styles:[],attributes:[],classes:[],tags:[]},t),n=ni(e,"*");B(n,function(n){Hc(Fc,r.styles,n),Hc(jc,r.attributes,n),B(r.classes,function(t){var e=yt(n,"class")?$i(n):[];B(e,function(e){_c.matches(t.name,e)&&Wi(n,e)})})});var o=ni(e,"*");B(o,function(e){U(r.tags,A(Lc,e))&&da(e)})},Yc=function(e,t){var n=Ei({tags:[]},t),r=ni(e,"*");B(r,function(e){U(n.tags,A(Lc,e))&&ma(e)})},Wc=function(e,t){var n=Ei({tags:[]},t),r=ni(e,"*");B(r,function(t){z(n.tags,A(Lc,t)).each(function(e){e.mutate(t)})})},qc="startElement",zc="endElement",$c="comment",Vc=function(e,t,n){var r,o,i,a=xt.fromDom(e);switch(e.nodeType){case 1:t?r=zc:(r=qc,ha(a,n||{})),o="HTML"!==e.scopeName&&e.scopeName&&e.tagName&&e.tagName.indexOf(":")<=0?(e.scopeName+":"+e.tagName).toUpperCase():e.tagName;break;case 3:r="text",i=e.nodeValue;break;case 8:r=$c,i=e.nodeValue;break;default:g.console.log("WARNING: Unsupported node type encountered: "+e.nodeType)}return{getNode:function(){return e},tag:function(){return o},type:function(){return r},text:function(){return i}}},Gc=function(e,t){return Vc(t.createElement(e),!0)},Kc=Gc("HTML",g.window.document),Xc={START_ELEMENT_TYPE:qc,END_ELEMENT_TYPE:zc,TEXT_TYPE:"text",COMMENT_TYPE:$c,FINISHED:Kc,token:Vc,createStartElement:function(e,t,n,r){var o=r.createElement(e);return se(t,function(e,t){o.setAttribute(t,e)}),Vc(o,!1,n)},createEndElement:Gc,createComment:function(e,t){return Vc(t.createComment(e),!1)},createText:function(e,t){return Vc(t.createTextNode(e))}},Jc=function(i){var a=i.createDocumentFragment(),u=a,c=function(e){a.appendChild(e)};return{dom:u,receive:function(e){var t,n,r,o;switch(e.type()){case Xc.START_ELEMENT_TYPE:o=e.getNode().cloneNode(!1),c(r=o),a=r;break;case Xc.TEXT_TYPE:t=e,n=i.createTextNode(t.text()),c(n);break;case Xc.END_ELEMENT_TYPE:null===(a=a.parentNode)&&(a=u);break;case Xc.COMMENT_TYPE:break;default:throw{message:"Unsupported token type: "+e.type()}}},label:"SERIALISER"}},Zc=function(e,o){var i;o=o||g.window.document,i=o.createElement("div"),o.body.appendChild(i),i.style.position="absolute",i.style.left="-10000px",i.innerHTML=e;var a=i.firstChild||Xc.FINISHED,u=[],c=!1;return{hasNext:function(){return void 0!==a},next:function(){var e,t,n=a,r=c;return!c&&a.firstChild?(u.push(a),a=a.firstChild):c||1!==a.nodeType?a.nextSibling?(a=a.nextSibling,c=!1):(a=u.pop(),c=!0):c=!0,n===Xc.FINISHED||a||(o.body.removeChild(i),a=Xc.FINISHED),t=r,(e=n)===Xc.FINISHED?e:e?Xc.token(e,t):void 0}}},Qc=function(e,t,n){var r,o=n;for(r=t.length-1;0<=r;r--)o=t[r](o,{},e);return o},es=function(e,t,n){for(var r=Jc(e),o=Zc(t,e),i=Qc(e,n,r);o.hasNext();){var a=o.next();i.receive(a)}return r.dom},ts=function(t){return function(e){Bc(e,t)}},ns=function(t){return function(e){Yc(e,t)}},rs=function(t){return function(e){Wc(e,t)}},os=function(o){return function(e){var t=_u(e),n=$o(e),r=es(n.dom(),t,o);fa(e),e.dom().appendChild(r)}},is=function(e,t){return 0<=e.indexOf("<o:p>")||t.browser.isEdge()&&0<=e.indexOf('v:shapes="')||t.browser.isEdge()&&0<=e.indexOf("mso-")||0<=e.indexOf("mso-list")||0<=e.indexOf("p.MsoNormal, li.MsoNormal, div.MsoNormal")||0<=e.indexOf("MsoListParagraphCxSpFirst")||0<=e.indexOf("<w:WordDocument>")},as=function(e,t,n){var r=xt.fromTag("div",e.dom());return r.dom().innerHTML=t,B(n,function(e){e(r)}),_u(r)};function us(a,u,e){return function(t,e,n){var r=function(e){t.receive(e)},o=function(e,t,n){return n=void 0!==n?n:e.type()===Xc.END_ELEMENT_TYPE,Xc.token(t,n,{})},i={emit:r,emitTokens:function(e){B(e,r)},receive:function(e){a(i,e,o)},document:g.window.document};return u(i),i}}var cs=function(e,t){var n=xt.fromDom(e.getNode());return ht(n,t)},ss=function(e,t){var n=xt.fromDom(e.getNode());return ya(n,t)},ls=function(e){return e.type()===Xc.TEXT_TYPE&&/^[\s\u00A0]*$/.test(e.text())},fs=function(e,t,n){return e===t||e&&t&&e.tag===t.tag&&e.type===t.type&&(n||e.variant===t.variant)},ds={guessFrom:function(t,n){return z(t,function(e){return"UL"===e.tag||n&&fs(e,n,!0)}).orThunk(function(){return 0===(e=t).length?O.none():O.some(e[0]);var e})},eqListType:fs},ms=function(e,t){if(void 0===e||void 0===t)throw g.console.trace(),"brick";e.nextFilter.set(t)},ps=function(e,t,n){t.nextFilter.get()(e,t,n)},gs=ms,vs=ps,hs=xr("level","token","type"),ys=function(e,n,t,r){var o=t.getCurrentListType(),i=t.getCurrentLevel()==r.level()?o:null;return ds.guessFrom(r.emblems(),i).filter(function(e){return!("OL"===e.tag&&(!j(["P"],(t=n).tag())||/^MsoHeading/.test(cs(t,"class"))));var t})},bs=function(e,t){return yt(xt.fromDom(t.getNode()),"data-list-level")},Ts=function(d){return function(e,t,n){var r,o,i,a,u=(r=xt.fromDom(n.getNode()),o=parseInt(ht(r,"data-list-level"),10),i=ht(r,"data-list-emblems"),a=JSON.parse(i),bt(r,"data-list-level"),bt(r,"data-list-emblems"),{level:y(o),emblems:y(a)});u.level(),t.originalToken.set(n);var c,s,l,f=(c=n,s=u,ys((l=t).listType.get(),c,l.emitter,s).each(l.listType.set),hs(s.level(),l.originalToken.get(),l.listType.get()));t.emitter.openItem(f.level(),f.token(),f.type()),gs(t,d.inside())}};function xs(e,t,n){return{pred:e,action:t,label:y(n)}}var Es=function(e,r){return function(e,t,n){return r(e,t,n)}};function ws(e,r,t){var o=Es(0,t),n=function(e,t,n){z(r,function(e){return e.pred(t,n)}).fold(y(o),function(e){var t=e.label();return void 0===t?e.action:Es(0,e.action)})(e,t,n)};return n.toString=function(){return"Handlers for "+e},n}var Ss=function(r){return ws("Inside.List.Item",[xs(function(e,t){return t.type()===Xc.END_ELEMENT_TYPE&&e.originalToken.get()&&t.tag()===e.originalToken.get().tag()},function(e,t,n){gs(t,r.outside())},"Closing open tag")],function(e,t,n){e.emit(n)})},_s=function(r){return ws("Outside.List.Item",[xs(bs,Ts(r),"Data List ****"),xs(function(e,t){return t.type()===Xc.TEXT_TYPE&&ls(t)},function(e,t,n){e.emit(n)},"Whitespace")],function(e,t,n){t.emitter.closeAllLists(),e.emit(n),gs(t,r.outside())})},Ns=xr("state","result"),Ls=xr("state","value"),Is={state:xr("level","type","types","items"),value:Ls,result:Ns},As=function(e,t){var n=e.items().slice(0),r=void 0!==t&&"P"!==t?O.some(t):O.none();r.fold(function(){n.push("P")},function(e){n.push(e)});var o=Is.state(e.level(),e.type(),e.types(),n);return Is.value(o,r)},Os=function(e){var t=e.items().slice(0);if(0<t.length&&"P"!==t[t.length-1]){var n=t[t.length-1];t[t.length-1]="P";var r=Is.state(e.level(),e.type(),e.types(),t);return Is.value(r,O.some(n))}return Is.value(e,O.none())},Ds=function(e,t,n){for(var r=[],o=e;t(o);){var i=n(o);o=i.state(),r=r.concat(i.result())}return Is.result(o,r)},Cs=function(e,t,n){return Ds(e,function(e){return e.level()<t},n)},Ps=function(e,t,n){return Ds(e,function(e){return e.level()>t},n)},ks=function(e){var t;return e?void 0!==(t=ss(e,"margin-left"))&&"0px"!==t?{"margin-left":t}:{}:{"list-style-type":"none"}},Ms=function(e,t,n){var r=t.start&&1<t.start?{start:t.start}:{},o=e.level()+1,i=t,a=e.types().concat([t]),u=[A(Xc.createStartElement,t.tag,r,n)],c=Is.state(o,i,a,e.items());return Is.result(c,u)},Rs=function(e){var t=e.types().slice(0),n=[A(Xc.createEndElement,t.pop().tag)],r=e.level()-1,o=t[t.length-1],i=Is.state(r,o,t,e.items());return Is.result(i,n)},Fs=Ms,js=function(e,t,n){var r,o,i,a=ks(t),u=e.type()&&!ds.eqListType(e.type(),n)?(r=n,o=Rs(e),i=Ms(o.state(),r,r.type?{"list-style-type":r.type}:{}),Is.result(i.state(),o.result().concat(i.result()))):Is.result(e,[]),c=[A(Xc.createStartElement,"LI",{},a)],s=As(u.state(),t&&t.tag()),l=s.value().map(function(e){return Uc(t.getNode(),y(!0)),[y(t)]}).getOr([]);return Is.result(s.state(),u.result().concat(c).concat(l))},Us=Rs,Hs=function(e){var t=A(Xc.createEndElement,"LI"),n=Os(e),r=n.value().fold(function(){return[t]},function(e){return[A(Xc.createEndElement,e),t]});return Is.result(n.state(),r)},Bs=function(e){if(0===e.length)throw"Compose must have at least one element in the list";var t=e[e.length-1],n=G(e,function(e){return e.result()});return Is.result(t.state(),n)},Ys=function(e){var t=Hs(e),n=Us(t.state());return Bs([t,n])},Ws=function(e,c,s,l){return Cs(e,s,function(e){return n=c,r=s,o=l,i=(t=e).level()===r-1&&n.type?{"list-style-type":n.type}:{},a=Fs(t,n,i),u=js(a.state(),a.state().level()==r?o:void 0,n),Bs([a,u]);var t,n,r,o,i,a,u})},qs=function(e,t){return Ps(e,t,Ys)},zs={openItem:function(e,t,n,r){var o,i,a,u,c,s,l,f,d,m,p,g,v=e.level()>t?qs(e,t):Is.result(e,[]),h=v.state().level()===t?(f=v.state(),d=r,m=n,p=0<f.level()?Hs(f):Is.result(f,[]),g=js(p.state(),m,d),Bs([p,g])):(o=v.state(),i=r,u=n,c=1<(a=t)?Os(o):Is.value(o,O.none()),s=c.value().map(function(e){return[A(Xc.createEndElement,e)]}).getOr([]),c.state().level(),l=Ws(c.state(),i,a,u),Is.result(l.state(),s.concat(l.result())));return Bs([v,h])},closeAllLists:qs},$s=["disc","circle","square"],Vs=function(e,t){return"UL"===e.tag&&$s[t-1]===e.type&&(e={tag:"UL"}),e};var Gs={getCurrentListType:function(){return Ks().getCurrentListType()},getCurrentLevel:function(){return Ks().getCurrentLevel()},closeAllLists:function(){return Ks().closeAllLists.apply(void 0,arguments)},openItem:function(){return Ks().openItem.apply(void 0,arguments)}},Ks=function(){return{getCurrentListType:y({}),getCurrentLevel:y(1),closeAllLists:a,openItem:a}};var Xs,Js,Zs,Qs,el,tl,nl,rl,ol,il,al,ul,cl={inside:function(){return ll},outside:function(){return fl}},sl=(Xs=!1,{check:function(e){return Xs&&e.type()===Xc.TEXT_TYPE?(e.text(),!0):e.type()===Xc.START_ELEMENT_TYPE&&"STYLE"===e.tag()?Xs=!0:e.type()===Xc.END_ELEMENT_TYPE&&"STYLE"===e.tag()&&!(Xs=!1)}}),ll=Ss(cl),fl=_s(cl),dl=(Zs=Cr(Js=fl),Qs=Cr(null),el=Cr(null),{reset:function(e){Zs.set(Js),Qs.set(null),el.set(null);var n,r,i,a,t=(r=(n=e).document,i=Is.state(0,void 0,[],[]),a=function(e){B(e.result(),function(e){var t=e(r);n.emit(t)})},{closeAllLists:function(){var e=zs.closeAllLists(i,0);i=e.state(),a(e)},openItem:function(e,t,n){if(n){var r=Vs(n,e),o=zs.openItem(i,e,t,r);i=o.state(),a(o)}},getCurrentListType:function(){return i.type()},getCurrentLevel:function(){return i.level()}});Ks=y(t)},nextFilter:Zs,originalToken:Qs,listType:el,emitter:Gs}),ml=us(function(e,t,n){sl.check(t)||vs(e,dl,t)},dl.reset),pl=[{regex:/^\(?[dc][\.\)]$/,type:{tag:"OL",type:"lower-alpha"}},{regex:/^\(?[DC][\.\)]$/,type:{tag:"OL",type:"upper-alpha"}},{regex:/^\(?M*(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})[\.\)]$/,type:{tag:"OL",type:"upper-roman"}},{regex:/^\(?m*(cm|cd|d?c{0,3})(xc|xl|l?x{0,3})(ix|iv|v?i{0,3})[\.\)]$/,type:{tag:"OL",type:"lower-roman"}},{regex:/^\(?[0-9]+[\.\)]$/,type:{tag:"OL"}},{regex:/^([0-9]+\.)*[0-9]+\.?$/,type:{tag:"OL",variant:"outline"}},{regex:/^\(?[a-z]+[\.\)]$/,type:{tag:"OL",type:"lower-alpha"}},{regex:/^\(?[A-Z]+[\.\)]$/,type:{tag:"OL",type:"upper-alpha"}}],gl={"\u2022":{tag:"UL",type:"disc"},"\xb7":{tag:"UL",type:"disc"},"\xa7":{tag:"UL",type:"square"}},vl={o:{tag:"UL",type:"circle"},"-":{tag:"UL",type:"disc"},"\u25cf":{tag:"UL",type:"disc"},"\ufffd":{tag:"UL",type:"circle"}},hl=function(u,e){var t=vl[u]?[vl[u]]:[],n=e&&gl[u]?[gl[u]]:e?[{tag:"UL",variant:u}]:[],r=G(pl,function(e){return e.regex.test(u)?[Ei(e.type,(r=u,o=r.split("."),i=function(){if(0===o.length)return r;var e=o[o.length-1];return 0===e.length&&1<o.length?o[o.length-2]:e}(),a=parseInt(i,10),isNaN(a)?{}:{start:a}),{variant:(t=e.type,n=u,void 0!==t.variant?t.variant:"("===n.charAt(0)?"()":")"===n.charAt(n.length-1)?")":".")})]:[];var t,n,r,o,i,a}),o=t.concat(n).concat(r);return H(o,function(e){return void 0!==e.variant?e:Ei(e,{variant:u})})},yl=function(e){return e.dom().textContent},bl=function(e){return Pc(e,["mso-list"],y(!1))["mso-list"]},Tl=function(e){return dt(e)&&Ta(e,"font-family").exists(function(e){return j(["wingdings","symbol"],e.toLowerCase())})},xl={getMsoList:bl,extractLevel:function(e){var t=bl(e),n=/ level([0-9]+)/.exec(t);return n&&n[1]?O.some(parseInt(n[1],10)):O.none()},extractEmblem:function(e,t){var n=yl(e).trim(),r=hl(n,t);return 0<r.length?O.some(r):O.none()},extractSymSpan:function(e){return Lo(e,Tl)},extractMsoIgnore:function(e){return Io(e,function(e){return!!(dt(e)?Pc(e,["mso-list"],y(!1)):[])["mso-list"]})},extractCommentSpan:function(e){return Lo(e,ft).bind(Xo).filter(function(e){return"span"===ct(e)})},isSymbol:Tl,deduceLevel:function(e){return Ta(e,"margin-left").bind(function(e){var t=parseInt(e,10);return isNaN(t)?O.none():O.some(Math.max(1,Math.ceil(t/18)))})}},El=function(e){for(var t=[];null!==e.nextNode();)t.push(xt.fromDom(e.currentNode));return t},wl=lo().browser,Sl=wl.isIE()||wl.isEdge()?function(e){try{return El(e)}catch(e){return[]}}:El,_l=y(y(!0)),Nl=function(e){var t=function(e,t){var n=t.fold(_l,function(t){return function(e){return t(e.nodeValue)}});n.acceptNode=n;var r=g.document.createTreeWalker(e.dom(),g.NodeFilter.SHOW_COMMENT,n,!1);return Sl(r)}(e,O.none());B(t,da)},Ll=function(e,t,n,r){!function(e,t,n){gt(e,"data-list-level",t);var r=JSON.stringify(n);gt(e,"data-list-emblems",r)}(e,t,n),Nl(e),B(r,da),bt(e,"style"),bt(e,"class")},Il=function(e){return(r=e,xl.extractLevel(r).bind(function(n){return xl.extractSymSpan(r).bind(function(t){return xl.extractEmblem(t,!0).map(function(e){return{mutate:function(){Ll(r,n,e,[t])}}})})})).orThunk(function(){return r=e,xl.extractLevel(r).bind(function(n){return xl.extractCommentSpan(r).bind(function(t){return xl.extractEmblem(t,xl.isSymbol(t)).map(function(e){return{mutate:function(){Ll(r,n,e,[t])}}})})});var r}).orThunk(function(){return r=e,xl.extractLevel(r).bind(function(n){return xl.extractCommentSpan(r).bind(function(t){return xl.extractEmblem(t,xl.isSymbol(t)).map(function(e){return{mutate:function(){Ll(r,n,e,[t])}}})})});var r}).orThunk(function(){return"p"!==ct(r=e)?O.none():xl.extractLevel(r).bind(function(n){return xl.extractMsoIgnore(r).bind(function(t){return xl.extractEmblem(t,!1).map(function(e){return{mutate:function(){Ll(r,n,e,[Vo(t).getOr(t)])}}})})});var r}).orThunk(function(){return"p"!==ct(r=e)?O.none():xl.extractMsoIgnore(r).bind(function(e){var n=Vo(e).getOr(e),t=xl.isSymbol(n);return xl.extractEmblem(e,t).bind(function(t){return xl.deduceLevel(r).map(function(e){return{mutate:function(){Ll(r,e,t,[n])}}})})});var r});var r},Al={filter:ml,preprocess:rs({tags:[{name:_c.pattern(/^(p|h\d+)$/,_c.caseInsensitive),mutate:function(e){Il(e).each(function(e){e.mutate()})}}]})},Ol=function(e){return void 0===e.dom().attributes||null===e.dom().attributes||(0===e.dom().attributes.length||1===e.dom().attributes.length&&"style"===e.dom().attributes[0].name)},Dl={isNotImage:function(e){return"img"!==ct(e)},hasContent:function(e){return!Ol(e)||(n=(t=e).dom().attributes,r=null!=n&&0<n.length,("span"!==ct(t)||r)&&Ao(e,function(e){var t=!Ol(e),n=!j(["font","em","strong","samp","acronym","cite","code","dfn","kbd","tt","b","i","u","s","sub","sup","ins","del","var","span"],ct(e));return mt(e)||t||n}));var t,n,r},isList:function(e){return"ol"===ct(e)||"ul"===ct(e)},isLocal:function(e){var t=ht(e,"src");return/^file:/.test(t)},hasNoAttributes:Ol,isEmpty:function(e){return 0===_u(e).length}},Cl=function(e,t){var n=xt.fromTag(e);oa(t,n);var r=t.dom().attributes;B(r,function(e){n.dom().setAttribute(e.name,e.value)});var o=Zo(t);return la(n,o),da(t),n},Pl=function(e){return Ko(e).bind(function(e){return mt(e)&&0===Ru(e).trim().length?Pl(e):"li"===ct(e)?O.some(e):O.none()})},kl={changeTag:Cl,addBrTag:function(e){0===_u(e).length&&ua(e,xt.fromTag("br"))},properlyNest:function(n){Vo(n).each(function(e){var t=ct(e);j(["ol","ul"],t)&&Pl(n).fold(function(){var e=xt.fromTag("li");va(e,"list-style-type","none"),ca(n,e)},function(e){ua(e,n)})})},fontToSpan:function(e){var o=Cl("span",e),i={"font-size":{1:"8pt",2:"10pt",3:"12pt",4:"14pt",5:"18pt",6:"24pt",7:"36pt"}};se({face:"font-family",size:"font-size",color:"color"},function(e,t){if(yt(o,t)){var n=ht(o,t),r=void 0!==i[e]&&void 0!==i[e][n]?i[e][n]:n;va(o,e,r),bt(o,t)}})}},Ml=Cu(ft,"comment"),Rl=function(e){return Ml.get(e)},Fl=function(t){return function(e){return ct(e)===t}},jl=ns({tags:[{name:_c.pattern(/^([OVWXP]|U[0-9]+|ST[0-9]+):/i,_c.caseInsensitive)}]}),Ul=ts({attributes:[{name:_c.exact("id",_c.caseInsensitive),value:_c.starts("docs-internal-guid",_c.caseInsensitive)}]}),Hl=[os([Al.filter])],Bl=ts({attributes:[{name:_c.pattern(/^v:/,_c.caseInsensitive)},{name:_c.exact("href",_c.caseInsensitive),value:_c.contains("#_toc",_c.caseInsensitive)},{name:_c.exact("href",_c.caseInsensitive),value:_c.contains("#_mso",_c.caseInsensitive)},{name:_c.pattern(/^xmlns(:|$)/,_c.caseInsensitive)},{name:_c.exact("type",_c.caseInsensitive),condition:Dl.isList}]}),Yl=ts({tags:[{name:_c.exact("script",_c.caseInsensitive)},{name:_c.exact("link",_c.caseInsensitive)},{name:_c.exact("style",_c.caseInsensitive),condition:Dl.isEmpty}],attributes:[{name:_c.starts("on",_c.caseInsensitive)},{name:_c.exact('"',_c.caseInsensitive)},{name:_c.exact("lang",_c.caseInsensitive)},{name:_c.exact("language",_c.caseInsensitive)}],styles:[{name:_c.all(),value:_c.pattern(/OLE_LINK/i,_c.caseInsensitive)}]}),Wl=ts({tags:[{name:_c.exact("meta",_c.caseInsensitive)}]}),ql=ts({tags:[{name:_c.exact("style",_c.caseInsensitive)}]}),zl=function(e){var t=ct(e);return"td"===t||"tr"===t||"table"===t||"col"===t},$l=ts({styles:[{name:_c.not(_c.pattern(/^(width|height|list-style-type)$/,_c.caseInsensitive)),condition:function(e){return!qi(e,"ephox-limbo-transform")}},{name:_c.pattern(/^(width|height)$/,_c.caseInsensitive),condition:function(e){return Dl.isNotImage(e)&&!zl(e)}}]}),Vl=ts({styles:[{name:_c.exact("height",_c.caseInsensitive),condition:Fl("td")},{name:_c.exact("width",_c.caseInsensitive),condition:Fl("tr")},{name:_c.exact("height",_c.caseInsensitive),condition:Fl("col")}]}),Gl=ts({classes:[{name:_c.not(_c.exact("rtf-data-image",_c.caseInsensitive))}]}),Kl=ts({styles:[{name:_c.pattern(xc(),_c.caseInsensitive)}]}),Xl=ts({classes:[{name:_c.pattern(/mso/i,_c.caseInsensitive)}]}),Jl=ns({tags:[{name:_c.exact("img",_c.caseInsensitive),condition:Dl.isLocal}]}),Zl=ns({tags:[{name:_c.exact("a",_c.caseInsensitive),condition:Dl.hasNoAttributes}]}),Ql=ts({attributes:[{name:_c.exact("style",_c.caseInsensitive),value:_c.exact("",_c.caseInsensitive),debug:!0}]}),ef=ts({attributes:[{name:_c.exact("class",_c.caseInsensitive),value:_c.exact("",_c.caseInsensitive),debug:!0}]}),tf=ns({tags:[{name:_c.pattern(Ec(),_c.caseInsensitive),condition:(tl=Dl.hasContent,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return!tl.apply(null,e)})}]}),nf=ns({tags:[{name:_c.exact("p",_c.caseInsensitive),condition:(nl="li",function(e){return Vo(e).exists(function(e){return ct(e)===nl&&1===Zo(e).length})})}]}),rf=rs({tags:[{name:_c.exact("p",_c.caseInsensitive),mutate:kl.addBrTag}]}),of=function(e){var t=kl.changeTag("span",e);Yi(t,"ephox-limbo-transform"),va(t,"text-decoration","underline")},af=rs({tags:[{name:_c.pattern(/ol|ul/,_c.caseInsensitive),mutate:kl.properlyNest}]}),uf=ts({classes:[{name:_c.exact("ephox-limbo-transform",_c.caseInsensitive)}]}),cf=ts({tags:[{name:_c.exact("br",_c.caseInsensitive),condition:Vi("Apple-interchange-newline")}]}),sf=ts({styles:[{name:_c.pattern(/^-/,_c.caseInsensitive)},{name:_c.all(),value:_c.exact("initial",_c.caseInsensitive)},{name:_c.exact("background-color",_c.caseInsensitive),value:_c.exact("transparent",_c.caseInsensitive)},{name:_c.exact("font-style",_c.caseInsensitive),value:_c.exact("normal",_c.caseInsensitive)},{name:_c.pattern(/font-variant.*/,_c.caseInsensitive)},{name:_c.exact("letter-spacing",_c.caseInsensitive)},{name:_c.exact("font-weight",_c.caseInsensitive),value:_c.pattern(/400|normal/,_c.caseInsensitive)},{name:_c.exact("orphans",_c.caseInsensitive)},{name:_c.exact("text-decoration",_c.caseInsensitive),value:_c.exact("none",_c.caseInsensitive)},{name:_c.exact("text-size-adjust",_c.caseInsensitive)},{name:_c.exact("text-indent",_c.caseInsensitive),value:_c.exact("0px",_c.caseInsensitive)},{name:_c.exact("text-transform",_c.caseInsensitive),value:_c.exact("none",_c.caseInsensitive)},{name:_c.exact("white-space",_c.caseInsensitive),value:_c.exact("normal",_c.caseInsensitive)},{name:_c.exact("widows",_c.caseInsensitive)},{name:_c.exact("word-spacing",_c.caseInsensitive),value:_c.exact("0px",_c.caseInsensitive)},{name:_c.exact("text-align",_c.caseInsensitive),value:_c.pattern(/start|end/,_c.caseInsensitive)},{name:_c.exact("font-weight",_c.caseInsensitive),value:_c.pattern(/700|bold/,_c.caseInsensitive),condition:function(e){return/^h\d$/.test(ct(e))}}]}),lf=(ol=(rl=function(e,n){return function(t){return e(t).filter(function(e){return mt(t)&&n(yl(e)," ")}).isSome()}})(Ko,no),il=rl(Xo,to),rs({tags:[{name:_c.exact("span",_c.caseInsensitive),condition:Vi("Apple-converted-space"),mutate:function(e){"\xa0"===yl(e)&&(ol(e)||il(e)?ma(e):(oa(e,xt.fromText(" ")),da(e)))}}]})),ff=(al=/^file:\/\/\/[^#]+(#[^#]+)$/,rs({tags:[{name:_c.exact("a",_c.caseInsensitive),condition:function(e){var t=ht(e,"href");return!!t&&al.test(t)},mutate:function(e){var t=ht(e,"href");gt(e,"href",t.replace(al,"$1"))}}]})),df=ts({attributes:[{name:_c.exact("href",_c.caseInsensitive),value:_c.starts("file:///",_c.caseInsensitive),debug:!0}]}),mf=rs({tags:[(ul=function(e,n,r){return{name:_c.exact(e,_c.caseInsensitive),condition:function(e){return yt(e,n)},mutate:function(e){var t=ht(e,n);gt(e,r,t),bt(e,n)}}})("a","data-ephox-href","href"),ul("img","data-ephox-src","src")]}),pf=function(a){var u=["table","thead","tbody","tfoot","th","tr","td","ul","ol","li"],e=ti(a,ft),t=z(e,function(e){return eo(Rl(e),"StartFragment")}),n=z(e,function(e){return eo(Rl(e),"EndFragment")});t.each(function(i){n.each(function(e){for(var t,n=i,r=[],o=(t=Wu(i,0,e,0),xt.fromDom(t.commonAncestorContainer));void 0!==o&&!ho(o,a);)j(u,ct(o))?n=o:r.push(o),o=Vo(o).getOrUndefined();B(r,ma),B(Jo(n),da)}),da(i)}),n.each(da)},gf=ts({attributes:[{name:_c.pattern(/^(width|height)$/,_c.caseInsensitive),condition:zl}]}),vf=rs({tags:[{name:_c.exact("p",_c.caseInsensitive),mutate:function(t){var e,n;(e=t,n="align",O.from(ht(e,n))).each(function(e){bt(t,"align"),Ta(t,"text-align").fold(function(){return va(t,"text-align",e)},T)})}}]}),hf=function(e,t){return(n=e,Mu.getOption(n)).exists(function(e){return 0===t(e).length});var n},yf=ts({tags:[{name:_c.exact("font",_c.caseInsensitive),condition:function(e){var t=Zo(e),n=function(e){return e.replace(/[ \r\n\uFEFF]+/g,"")};return 0===t.length||K(t,function(e){return hf(e,n)})}}]}),bf=function(e){return B(Zo(e),function(e){hf(e,ro)&&da(e)})},Tf=rs({tags:[{name:_c.exact("ol",_c.caseInsensitive),mutate:bf},{name:_c.exact("ul",_c.caseInsensitive),mutate:bf}]}),xf=T,Ef=function(e){return e.browser.isIE()&&11<=e.browser.version.major},wf=function(i,a){return us(function(e,t){var r,o,n=(r=t,o=a,i(xt.fromDom(r.getNode())).fold(function(){return[r]},function(e){var t=r.type()===Xc.END_ELEMENT_TYPE,n=[Xc.token(e.dom(),t)];return!t&&o&&n.push(Xc.token(e.dom(),!0)),n}));B(n,e.emit)},T)},Sf=function(e,t,n,r){var o=[vf,Kl,Xl],i=[vf,$l,function(e){void 0===e&&(e=[]);var t=H(e,function(e){return{name:_c.exact(e,_c.caseInsensitive)}});return ns({tags:t})}(r.cleanFilteredInlineElements),Gl];return t?o:i},_f=function(e){return void 0===e&&(e=[]),[yf,Tf,(t=e,n=[{name:"b",transform:{mutate:A(kl.changeTag,"strong")}},{name:"i",transform:{mutate:A(kl.changeTag,"em")}},{name:"u",transform:{mutate:of}},{name:"s",transform:{mutate:A(kl.changeTag,"strike")}},{name:"font",transform:{mutate:kl.fontToSpan,debug:!0}}],r=W(n,function(e){return!j(t,e.name)}).map(function(e){return ae({name:_c.exact(e.name,_c.caseInsensitive)},e.transform)}),rs({tags:r}))];var t,n,r},Nf=function(e,t,n,r){var o,i,a,u,c,s,l,f,d,m,p,g,v,h=(o=e,a=(i=n).browser.isFirefox()||i.browser.isEdge(),u=a?Tc:bc,c=!a,s=Ef(i)?xf:os([wf(u,c)]),{annotate:[o?s:xf],local:[a?xf:Jl]});return V([h.local,(g=e,v=n,Ef(v)||!g?[]:[Al.preprocess]),h.annotate,_f(t?[]:r.cleanFilteredInlineElements),function(e,t,n){if(!e)return[xf];var r=[jl],o=Ef(n)?[]:Hl;return r.concat(o).concat([Bl])}(e,0,n),[Ul],[af],[Yl],[Wl],Sf(0,t,0,r),[ff,df,Zl,mf],[Ql],[ef],[tf],[cf],(m=e,p=t,!m&&p?[sf]:[]),[lf],[rf],(f=e,d=n,Ef(d)&&f?[nf]:[]),(l=e,l?[Vl,gf]:[]),[uf],[ql]])},Lf=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"];var If=function(e){return t=e,n=y(0),r=y(0),o=O.none(),{term:function(){return new RegExp(t,o.getOr("g"))},prefix:n,suffix:r};var t,n,r,o},Af=function(n,e){var t,r,o=G(e,function(t){var e=function(e,t){for(var n=t.term(),r=[],o=n.exec(e);o;){var i=o.index+t.prefix(o),a=o[0].length-t.prefix(o)-t.suffix(o);r.push({start:y(i),finish:y(i+a)}),n.lastIndex=i+a,o=n.exec(e)}return r}(n,t.pattern());return H(e,function(e){return ae(ae({},t),e)})});return t=o,(r=Array.prototype.slice.call(t,0)).sort(function(e,t){return e.start()<t.start()?-1:t.start()<e.start()?1:0}),r},Of=(xr("word","pattern"),xr("element","offset"),xr("element","deltaOffset"),xr("element","start","finish")),Df=(xr("begin","end"),xr("element","text"),ve([{include:["item"]},{excludeWith:["item"]},{excludeWithout:["item"]}])),Cf={include:Df.include,excludeWith:Df.excludeWith,excludeWithout:Df.excludeWithout,cata:function(e,t,n,r){return e.fold(t,n,r)}},Pf=function(e,n){var r=[],o=[];return B(e,function(e){var t=n(e);Cf.cata(t,function(){o.push(e)},function(){0<o.length&&r.push(o),r.push([e]),o=[]},function(){0<o.length&&r.push(o),o=[]})}),0<o.length&&r.push(o),r},kf=ve([{boundary:["item","universe"]},{empty:["item","universe"]},{text:["item","universe"]},{nonEditable:["item","universe"]}]),Mf=x,Rf=E,Ff=y(0),jf=y(1),Uf=function(e){return ae(ae({},e),{isBoundary:function(){return e.fold(Rf,Mf,Mf,Mf)},toText:function(){return e.fold(O.none,O.none,function(e){return O.some(e)},O.none)},is:function(n){return e.fold(Mf,Mf,function(e,t){return t.eq(e,n)},Mf)},len:function(){return e.fold(Ff,jf,function(e,t){return t.property().getText(e).length},jf)}})},Hf={text:d(Uf,kf.text),boundary:d(Uf,kf.boundary),empty:d(Uf,kf.empty),nonEditable:d(Uf,kf.empty),cata:function(e,t,n,r,o){return e.fold(t,n,r,o)}},Bf=y([]),Yf=function(t,e,n){if(t.property().isText(e))return[Hf.text(e,t)];if(t.property().isEmptyTag(e))return[Hf.empty(e,t)];if(t.property().isNonEditable(e))return[];if(t.property().isElement(e)){var r=t.property().children(e),o=t.property().isBoundary(e)?[Hf.boundary(e,t)]:[],i=void 0!==n&&n(e)?[]:G(r,function(e){return Yf(t,e,n)});return o.concat(i).concat(o)}return[]},Wf=Yf,qf=function(t,e,n){var r=G(e,function(e){return Wf(t,e,n)}),o=Pf(r,function(e){return e.match({boundary:function(){return Cf.excludeWithout(e)},empty:function(){return Cf.excludeWith(e)},text:function(){return Cf.include(e)},nonEditable:function(){return Cf.excludeWithout(e)}})});return W(o,function(e){return 0<e.length})},zf=function(r,e){if(0===e.length)return[r];var t=q(e,function(e,t){if(0===t)return e;var n=r.substring(e.prev,t);return{prev:t,values:e.values.concat([n])}},{prev:0,values:[]}),n=e[e.length-1];return n<r.length?t.values.concat(r.substring(n)):t.values},$f=function(o,e,t){var n=G(t,function(e){return[e.start(),e.finish()]}),i=_a(e,n,function(e,t){return function(o,e,t){var n=o.property().getText(e),r=W(zf(n,t),function(e){return 0<e.length});if(r.length<=1)return[Of(e,0,n.length)];o.property().setText(e,r[0]);var i=Sa(r.slice(1),function(e,t){var n=o.create().text(e),r=Of(n,t,t+e.length);return O.some(r)},r[0].length),a=H(i,function(e){return e.element()});return o.insert().afterAll(e,a),[Of(e,0,r[0].length)].concat(i)}(o,e.element(),t)});return H(t,function(e){var t=Na(i,e.start(),e.finish()),n=H(t,function(e){return e.element()}),r=H(n,o.property().getText).join("");return{elements:function(){return n},word:e.word,exact:function(){return r}}})},Vf=function(a,e,u,t){var n=qf(a,e,t);return G(n,function(e){var r,t=G(e,function(e){return e.fold(Bf,Bf,function(e){return[e]},Bf)}),n=H(t,a.property().getText).join(""),o=Af(n,u),i=(r=a,Sa(t,function(e,t){var n=t+r.property().getText(e).length;return O.from(Of(e,t,n))}));return $f(a,i,o)})},Gf={up:y({selector:Gi,closest:Xi,predicate:No,all:Go}),down:y({selector:ni,predicate:ti}),styles:y({get:ya,getRaw:Ta,set:va,remove:xa}),attrs:y({get:ht,set:gt,remove:bt,copyTo:function(e,t){var n=q(e.dom().attributes,function(e,t){return e[t.name]=t.value,e},{});vt(t,n)}}),insert:y({before:oa,after:ia,afterAll:sa,append:ua,appendAll:la,prepend:aa,wrap:ca}),remove:y({unwrap:ma,remove:da}),create:y({nu:xt.fromTag,clone:function(e){return xt.fromDom(e.dom().cloneNode(!1))},text:xt.fromText}),query:y({comparePosition:function(e,t){return e.dom().compareDocumentPosition(t.dom())},prevSibling:Ko,nextSibling:Xo}),property:y({children:Zo,name:ct,parent:Vo,document:function(e){return e.dom().ownerDocument},isText:mt,isComment:ft,isElement:dt,getText:Ru,setText:Fu,isBoundary:function(e){return!!dt(e)&&("body"===ct(e)||j(Lf,ct(e)))},isEmptyTag:function(e){return!!dt(e)&&j(["br","img","hr","input"],ct(e))},isNonEditable:function(e){return dt(e)&&"false"===ht(e,"contenteditable")}}),eq:ho,is:yo},Kf=/(?:(?:[A-Za-z]{3,9}:(?:\/\/))(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)*|(?:www\.|[-;:&=+$,.\w]+@)[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)*)(?::[0-9]+)?(?:\/[-+~=%.()\/\w]*)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g.source,Xf=function(e){var t,n={word:y("__INTERNAL__"),pattern:y(If(Kf))};return Vf(Gf,e,[n],t)},Jf=function(e){return!Xi(e,"a",t).isSome();var t},Zf=function(e){var t=Xf(e);B(t,function(e){var n,t=e.exact();(t.indexOf("@")<0||Qf(t))&&(n=e.elements(),O.from(n[0]).filter(Jf).map(function(e){var t=xt.fromTag("a");return oa(e,t),la(t,n),gt(t,"href",yl(t)),t}))})},Qf=function(e){var t=e.indexOf("://");return 3<=t&&t<=9},ed=function(e){B(e,function(e){dt(e)&&Ta(e,"position").isSome()&&xa(e,"position")})},td=function(e){var t=W(e,function(e){return"li"===ct(e)});if(0<t.length){var n=Jo(t[0]),r=xt.fromTag("ul");if(oa(e[0],r),0<n.length){var o=xt.fromTag("li");ua(r,o),la(o,n)}la(r,t)}},nd=function(e){var t=Zo(e);B([Zf,ed,td],function(e){e(t)})},rd=function(e,t){return as(e,t,[Wl,mf])},od=function(e,t){return Ao(e,function(e){return!!yt(e,"style")&&-1<ht(e,"style").indexOf("mso-")})},id=function(e,t){var n=_u(e);return is(n,t)},ad={disabled:function(){return{discriminator:"disabled",data:{}}},fromClipboard:function(e){return{discriminator:"fromClipboard",data:{rtf:e}}}},ud=ue(ad),cd=ad.disabled,sd=ad.fromClipboard,ld=function(e,t){var n=new RegExp(t,"i");return Ja(e,function(e){return Za(null!==e.match(n),{type:e,flavor:t})})},fd={isValidData:function(e){return void 0!==e&&void 0!==e.types&&null!==e.types},getPreferredFlavor:function(e,t){return Ja(e,function(e){return ld(t,e)})},getFlavor:ld};var dd=Object.hasOwnProperty,md=Object.setPrototypeOf,pd=Object.isFrozen,gd=Object.keys,vd=Object.freeze,hd=Object.seal,yd=Object.create,bd="undefined"!=typeof Reflect&&Reflect,Td=bd.apply,xd=bd.construct;Td||(Td=function(e,t,n){return e.apply(t,n)}),vd||(vd=function(e){return e}),hd||(hd=function(e){return e}),xd||(xd=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))))});var Ed=Rd(Array.prototype.forEach),wd=Rd(Array.prototype.indexOf),Sd=Rd(Array.prototype.join),_d=Rd(Array.prototype.pop),Nd=Rd(Array.prototype.push),Ld=Rd(Array.prototype.slice),Id=Rd(String.prototype.toLowerCase),Ad=Rd(String.prototype.match),Od=Rd(String.prototype.replace),Dd=Rd(String.prototype.indexOf),Cd=Rd(String.prototype.trim),Pd=Rd(RegExp.prototype.test),kd=Fd(RegExp),Md=Fd(TypeError);function Rd(o){return function(e){for(var t=arguments.length,n=Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Td(o,e,n)}}function Fd(r){return function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return xd(r,t)}}function jd(e,t){md&&md(e,null);for(var n=t.length;n--;){var r=t[n];if("string"==typeof r){var o=Id(r);o!==r&&(pd(t)||(t[n]=o),r=o)}e[r]=!0}return e}function Ud(e){var t=yd(null),n=void 0;for(n in e)Td(dd,e,[n])&&(t[n]=e[n]);return t}var Hd=vd(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Bd=vd(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"]),Yd=vd(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Wd=vd(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),qd=vd(["#text"]),zd=vd(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns"]),$d=vd(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Vd=vd(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Gd=vd(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Kd=hd(/\{\{[\s\S]*|[\s\S]*\}\}/gm),Xd=hd(/<%[\s\S]*|[\s\S]*%>/gm),Jd=hd(/^data-[\-\w.\u00B7-\uFFFF]/),Zd=hd(/^aria-[\-\w]+$/),Qd=hd(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),em=hd(/^(?:\w+script|data):/i),tm=hd(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),nm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function rm(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var om=function(){return"undefined"==typeof window?null:window},im=function(e,t){if("object"!==(void 0===e?"undefined":nm(e))||"function"!=typeof e.createPolicy)return null;var n=null,r="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(r)&&(n=t.currentScript.getAttribute(r));var o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};var am=function t(){var s=0<arguments.length&&void 0!==arguments[0]?arguments[0]:om(),d=function(e){return t(e)};if(d.version="2.0.17",d.removed=[],!s||!s.document||9!==s.document.nodeType)return d.isSupported=!1,d;var l=s.document,a=!1,u=s.document,f=s.DocumentFragment,e=s.HTMLTemplateElement,m=s.Node,n=s.NodeFilter,r=s.NamedNodeMap,i=void 0===r?s.NamedNodeMap||s.MozNamedAttrMap:r,c=s.Text,p=s.Comment,g=s.DOMParser,o=s.trustedTypes;if("function"==typeof e){var v=u.createElement("template");v.content&&v.content.ownerDocument&&(u=v.content.ownerDocument)}var h=im(o,l),y=h&&J?h.createHTML(""):"",b=u,T=b.implementation,x=b.createNodeIterator,E=b.getElementsByTagName,w=b.createDocumentFragment,S=l.importNode,_={};try{_=Ud(u).documentMode?u.documentMode:{}}catch(e){}var N={};d.isSupported=T&&void 0!==T.createHTMLDocument&&9!==_;var L=Kd,I=Xd,A=Jd,O=Zd,D=em,C=tm,P=Qd,k=null,M=jd({},[].concat(rm(Hd),rm(Bd),rm(Yd),rm(Wd),rm(qd))),R=null,F=jd({},[].concat(rm(zd),rm($d),rm(Vd),rm(Gd))),j=null,U=null,H=!0,B=!0,Y=!1,W=!1,q=!1,z=!1,$=!1,V=!1,G=!1,K=!1,X=!1,J=!1,Z=!0,Q=!0,ee=!1,te={},ne=jd({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","plaintext","script","style","svg","template","thead","title","video","xmp"]),re=null,oe=jd({},["audio","video","img","source","image","track"]),ie=null,ae=jd({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),ue=null,ce=u.createElement("form"),se=function(e){ue&&ue===e||(e&&"object"===(void 0===e?"undefined":nm(e))||(e={}),e=Ud(e),k="ALLOWED_TAGS"in e?jd({},e.ALLOWED_TAGS):M,R="ALLOWED_ATTR"in e?jd({},e.ALLOWED_ATTR):F,ie="ADD_URI_SAFE_ATTR"in e?jd(Ud(ae),e.ADD_URI_SAFE_ATTR):ae,re="ADD_DATA_URI_TAGS"in e?jd(Ud(oe),e.ADD_DATA_URI_TAGS):oe,j="FORBID_TAGS"in e?jd({},e.FORBID_TAGS):{},U="FORBID_ATTR"in e?jd({},e.FORBID_ATTR):{},te="USE_PROFILES"in e&&e.USE_PROFILES,H=!1!==e.ALLOW_ARIA_ATTR,B=!1!==e.ALLOW_DATA_ATTR,Y=e.ALLOW_UNKNOWN_PROTOCOLS||!1,W=e.SAFE_FOR_JQUERY||!1,q=e.SAFE_FOR_TEMPLATES||!1,z=e.WHOLE_DOCUMENT||!1,G=e.RETURN_DOM||!1,K=e.RETURN_DOM_FRAGMENT||!1,X=e.RETURN_DOM_IMPORT||!1,J=e.RETURN_TRUSTED_TYPE||!1,V=e.FORCE_BODY||!1,Z=!1!==e.SANITIZE_DOM,Q=!1!==e.KEEP_CONTENT,ee=e.IN_PLACE||!1,P=e.ALLOWED_URI_REGEXP||P,q&&(B=!1),K&&(G=!0),te&&(k=jd({},[].concat(rm(qd))),R=[],!0===te.html&&(jd(k,Hd),jd(R,zd)),!0===te.svg&&(jd(k,Bd),jd(R,$d),jd(R,Gd)),!0===te.svgFilters&&(jd(k,Yd),jd(R,$d),jd(R,Gd)),!0===te.mathMl&&(jd(k,Wd),jd(R,Vd),jd(R,Gd))),e.ADD_TAGS&&(k===M&&(k=Ud(k)),jd(k,e.ADD_TAGS)),e.ADD_ATTR&&(R===F&&(R=Ud(R)),jd(R,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&jd(ie,e.ADD_URI_SAFE_ATTR),Q&&(k["#text"]=!0),z&&jd(k,["html","head","body"]),k.table&&(jd(k,["tbody"]),delete j.tbody),vd&&vd(e),ue=e)},le=function(t){Nd(d.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){t.outerHTML=y}},fe=function(e,t){try{Nd(d.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Nd(d.removed,{attribute:null,from:t})}t.removeAttribute(e)},de=function(e){var t=void 0,n=void 0;if(V)e="<remove></remove>"+e;else{var r=Ad(e,/^[\r\n\t ]+/);n=r&&r[0]}var o=h?h.createHTML(e):e;try{t=(new g).parseFromString(o,"text/html")}catch(e){}if(a&&jd(j,["title"]),!t||!t.documentElement){var i=(t=T.createHTMLDocument("")).body;i.parentNode.removeChild(i.parentNode.firstElementChild),i.outerHTML=o}return e&&n&&t.body.insertBefore(u.createTextNode(n),t.body.childNodes[0]||null),E.call(t,z?"html":"body")[0]};d.isSupported&&function(){try{var e=de("<x/><title>&lt;/title&gt;&lt;img&gt;");Pd(/<\/title/,e.querySelector("title").innerHTML)&&(a=!0)}catch(e){}}();var me=function(e){return x.call(e.ownerDocument||e,e,n.SHOW_ELEMENT|n.SHOW_COMMENT|n.SHOW_TEXT,function(){return n.FILTER_ACCEPT},!1)},pe=function(e){return"object"===(void 0===m?"undefined":nm(m))?e instanceof m:e&&"object"===(void 0===e?"undefined":nm(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ge=function(e,t,n){N[e]&&Ed(N[e],function(e){e.call(d,t,n,ue)})},ve=function(e){var t,n=void 0;if(ge("beforeSanitizeElements",e,null),!((t=e)instanceof c||t instanceof p||"string"==typeof t.nodeName&&"string"==typeof t.textContent&&"function"==typeof t.removeChild&&t.attributes instanceof i&&"function"==typeof t.removeAttribute&&"function"==typeof t.setAttribute&&"string"==typeof t.namespaceURI))return le(e),!0;if(Ad(e.nodeName,/[\u0080-\uFFFF]/))return le(e),!0;var r=Id(e.nodeName);if(ge("uponSanitizeElement",e,{tagName:r,allowedTags:k}),("svg"===r||"math"===r)&&0!==e.querySelectorAll("p, br, form, table").length)return le(e),!0;if(!k[r]||j[r]){if(Q&&!ne[r]&&"function"==typeof e.insertAdjacentHTML)try{var o=e.innerHTML;e.insertAdjacentHTML("AfterEnd",h?h.createHTML(o):o)}catch(e){}return le(e),!0}return"noscript"===r&&Pd(/<\/noscript/i,e.innerHTML)?(le(e),!0):"noembed"===r&&Pd(/<\/noembed/i,e.innerHTML)?(le(e),!0):(!W||pe(e.firstElementChild)||pe(e.content)&&pe(e.content.firstElementChild)||!Pd(/</g,e.textContent)||(Nd(d.removed,{element:e.cloneNode()}),e.innerHTML?e.innerHTML=Od(e.innerHTML,/</g,"&lt;"):e.innerHTML=Od(e.textContent,/</g,"&lt;")),q&&3===e.nodeType&&(n=e.textContent,n=Od(n,L," "),n=Od(n,I," "),e.textContent!==n&&(Nd(d.removed,{element:e.cloneNode()}),e.textContent=n)),ge("afterSanitizeElements",e,null),!1)},he=function(e,t,n){if(Z&&("id"===t||"name"===t)&&(n in u||n in ce))return!1;if(B&&Pd(A,t));else if(H&&Pd(O,t));else{if(!R[t]||U[t])return!1;if(ie[t]);else if(Pd(P,Od(n,C,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Dd(n,"data:")||!re[e])if(Y&&!Pd(D,Od(n,C,"")));else if(n)return!1}return!0},ye=function(e){var t=void 0,n=void 0,r=void 0,o=void 0,i=void 0;ge("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var u={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:R};for(i=a.length;i--;){var c=t=a[i],s=c.name,l=c.namespaceURI;if(n=Cd(t.value),r=Id(s),u.attrName=r,u.attrValue=n,u.keepAttr=!0,u.forceKeepAttr=void 0,ge("uponSanitizeAttribute",e,u),n=u.attrValue,!u.forceKeepAttr){if("name"===r&&"IMG"===e.nodeName&&a.id)o=a.id,a=Ld(a,[]),fe("id",e),fe(s,e),wd(a,o)>i&&e.setAttribute("id",o.value);else{if("INPUT"===e.nodeName&&"type"===r&&"file"===n&&u.keepAttr&&(R[r]||!U[r]))continue;"id"===s&&e.setAttribute(s,""),fe(s,e)}if(u.keepAttr)if(W&&Pd(/\/>/i,n))fe(s,e);else if(Pd(/svg|math/i,e.namespaceURI)&&Pd(kd("</("+Sd(gd(ne),"|")+")","i"),n))fe(s,e);else{q&&(n=Od(n,L," "),n=Od(n,I," "));var f=e.nodeName.toLowerCase();if(he(f,r,n))try{l?e.setAttributeNS(l,s,n):e.setAttribute(s,n),_d(d.removed)}catch(e){}}}}ge("afterSanitizeAttributes",e,null)}},be=function e(t){var n=void 0,r=me(t);for(ge("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ge("uponSanitizeShadowNode",n,null),ve(n)||(n.content instanceof f&&e(n.content),ye(n));ge("afterSanitizeShadowDOM",t,null)};return d.sanitize=function(e,t){var n=void 0,r=void 0,o=void 0,i=void 0,a=void 0;if(e||(e="\x3c!--\x3e"),"string"!=typeof e&&!pe(e)){if("function"!=typeof e.toString)throw Md("toString is not a function");if("string"!=typeof(e=e.toString()))throw Md("dirty is not a string, aborting")}if(!d.isSupported){if("object"===nm(s.toStaticHTML)||"function"==typeof s.toStaticHTML){if("string"==typeof e)return s.toStaticHTML(e);if(pe(e))return s.toStaticHTML(e.outerHTML)}return e}if($||se(t),d.removed=[],"string"==typeof e&&(ee=!1),ee);else if(e instanceof m)1===(r=(n=de("\x3c!--\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===r.nodeName?n=r:"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!G&&!q&&!z&&-1===e.indexOf("<"))return h&&J?h.createHTML(e):e;if(!(n=de(e)))return G?null:y}n&&V&&le(n.firstChild);for(var u=me(ee?e:n);o=u.nextNode();)3===o.nodeType&&o===i||ve(o)||(o.content instanceof f&&be(o.content),ye(o),i=o);if(i=null,ee)return e;if(G){if(K)for(a=w.call(n.ownerDocument);n.firstChild;)a.appendChild(n.firstChild);else a=n;return X&&(a=S.call(l,a,!0)),a}var c=z?n.outerHTML:n.innerHTML;return q&&(c=Od(c,L," "),c=Od(c,I," ")),h&&J?h.createHTML(c):c},d.setConfig=function(e){se(e),$=!0},d.clearConfig=function(){ue=null,$=!1},d.isValidAttribute=function(e,t,n){ue||se({});var r=Id(e),o=Id(t);return he(r,o,n)},d.addHook=function(e,t){"function"==typeof t&&(N[e]=N[e]||[],Nd(N[e],t))},d.removeHook=function(e){N[e]&&_d(N[e])},d.removeHooks=function(e){N[e]&&(N[e]=[])},d.removeAllHooks=function(){N={}},d}(),um=["script","svg"],cm=function(e,t){am.addHook("uponSanitizeElement",function(e,t){j(um,t.tagName)||ge(t.allowedTags,t.tagName)||(t.allowedTags[t.tagName]=!0)}),am.addHook("uponSanitizeAttribute",function(e,t){0===t.attrName.indexOf("on")||ge(t.allowedAttributes,t.attrName)||(t.allowedAttributes[t.attrName]=!0),t.attrValue&&-1!==t.attrValue.indexOf("\n")&&(t.attrValue=t.attrValue.replace(/\r?\n/g,""))});var n,r=to(ro(e),"<!"),o=r?"<body>"+e+"</body>":e.replace(/^[\S\s]*?(<!DOCTYPE|<html)/i,"$1"),i=am.sanitize(o,{ALLOW_UNKNOWN_PROTOCOLS:!0,FORBID_TAGS:um,WHOLE_DOCUMENT:(n=e,-1!==n.lastIndexOf("</html>"))});return am.removeHook("uponSanitizeElement"),am.removeHook("uponSanitizeAttribute"),r?Qr(Zr(i,"<body>"),"</body>"):i},sm=function(n){return{sanitizeHtml:function(e,t){return n(e)?e:cm(e)},sanitizeText:a}},lm={sanitizeHtml:a,sanitizeText:a},fm=function(t){return function(e){return{discriminator:t,data:e}}},dm=function(t){return function(e){return e.discriminator===t?O.some(e.data):O.none()}},mm=fm("event"),pm=fm("html"),gm=fm("images"),vm=fm("word"),hm=fm("text"),ym=fm("void"),bm=dm("event"),Tm=dm("html"),xm=dm("images"),Em=dm("word"),wm=dm("text"),Sm=lo().browser,_m=!(Sm.isIE()||Sm.isEdge()&&Sm.version.major<16),Nm=["^image/","file"],Lm=function(e){return eo(t=e,"<html")&&(eo(t,'xmlns:o="urn:schemas-microsoft-com:office:office"')||eo(t,'xmlns:x="urn:schemas-microsoft-com:office:excel"'))||eo(e,'meta name="ProgId" content="Word.Document"');var t},Im=function(e){return eo(e,"<meta")&&eo(e,'id="docs-internal-guid')},Am=function(e){return 0<e.length},Om=function(t,e){return fd.getFlavor(t.types,e).map(function(e){return t.getData(e.type)}).filter(Am)},Dm=function(e){return Om(e,"html")},Cm=function(e){return Dm(e).filter(Im)},Pm=function(e){return _m?O.some(e.clipboardData).filter(fd.isValidData):O.none()},km=function(e){var t,n,r,o,i,a,u=xt.fromTag("div"),c=(t=$o(u),as(t,e,[pf]));return r=c,o=$o(n=u).dom(),i=xt.fromDom(o.createDocumentFragment()),a=Ba(r,o),la(i,a),fa(n),ua(n,i),pm({container:u})},Mm=function(e,n){void 0===n&&(n=lm);var t=function(r){return void 0===r.items?O.none():fd.getPreferredFlavor(Nm,r.types).map(function(e){for(var t=[],n=0;n<r.items.length;n++)t.push(r.items[n]);return gm({images:t})})},r=function(t){return Ja(t.types,function(e){return"text/plain"===e?O.some(t.getData(e)).map(function(e){return hm({text:n.sanitizeText(e)})}):O.none()})};return{getWordData:function(){return Pm(e).bind(function(n){return(e=n,Dm(e).filter(Lm)).map(function(e){var t=Om(n,"rtf");return vm({html:e,rtf:t.fold(function(){return cd()},function(e){return sd(e)})})});var e})},getGoogleDocsData:function(){return Pm(e).bind(Cm).map(function(e){return n.sanitizeHtml(e,"googledocs")}).map(km)},getImage:function(){return Pm(e).bind(t)},getText:function(){return Pm(e).fold(function(){var e=g.window.clipboardData;return void 0!==e?O.some(hm({text:n.sanitizeText(e.getData("text"))})):O.none()},r)},getHtml:function(){return Pm(e).bind(Dm).map(n.sanitizeHtml).map(km)},getOnlyText:function(){return Pm(e).bind(function(e){return t=e.types,n="text/plain",1===t.length&&t[0]===n?r(e):O.none();var t,n})},getNative:function(){return mm({nativeEvent:e})},getVoid:function(){return ym({})}}},Rm=function(e,t){void 0===t&&(t=lm);return{getWordData:function(){return O.some(vm({html:t.sanitizeHtml(e),rtf:cd()}))},getGoogleDocsData:O.none,getImage:O.none,getHtml:O.none,getText:O.none,getNative:b("There is no native event"),getOnlyText:O.none,getVoid:b("There is no paste event")}},Fm=function(e,t){void 0===t&&(t=lm);return{getWordData:O.none,getGoogleDocsData:O.none,getImage:O.none,getHtml:O.none,getText:function(){return O.some(hm({text:t.sanitizeText(e)}))},getNative:b("There is no native event"),getOnlyText:O.none,getVoid:b("There is no paste event")}},jm={native:"Outside of Textbox.io pasting HTML5 API (could be internal)",fallback:"Outside of Textbox.io pasting offscreen (could be internal)",msoffice:"Word Import pasting",googledocs:" pasting",image:"Image pasting",plaintext:"Only plain text is available to paste",text:"Plain text pasting",none:"There is no valid way to paste",discard:"There is no valid way to paste, discarding content"},Um=ae({getLabelForApi:function(t){var e=ue(jm);return z(e,function(e){return jm[e]===t}).fold(function(){return"unknown"},function(e){switch(e){case"native":case"fallback":return"html";case"none":case"discard":return"invalid";default:return e}})}},jm),Hm=function(e){return H(e,function(e){return e.asset()})},Bm=function(u,c,r){var s=qo.create({cancel:Wo([]),error:Wo(["message"]),insert:Wo(["elements","assets","correlated","isInternal","source","mode"])}),o=function(e,t,n){var r=du(u,c,e);r.capture()&&n();var o=H(r.steps(),function(e){return e(t)}),i=mu(o,r.input()),a=Um.getLabelForApi(r.label());i.get(function(e){var r=e.bundle().isInternal().getOr(!1),o=e.bundle().officeStyles().fold(function(){return"auto"},function(e){return e?"merge":"clean"});ou.cata(e.response(),function(e){s.trigger.error(e)},function(e,t){s.trigger.insert(e,Hm(t),t,r,a,o)},function(){s.trigger.cancel()},function(e,t,n){s.trigger.insert(e,Hm(t),t,r,a,o),s.trigger.error(n)})})},i=oc.tap(function(n){Vu(n.target.ownerDocument.defaultView).each(function(e){if(!qi(e.start(),Ju.bin())){var t=Mm(n,r);tc.willBlock()&&(i.control.block(),n.preventDefault()),o(t,i.control,function(){n.preventDefault()})}})});return{paste:i.instance,pasteCustom:function(e,t){void 0===t&&(t=T);var n=oc.tap(T);o(e,n.control,t)},isBlocked:i.control.isBlocked,destroy:T,events:s.registry}},Ym=function(){var t=O.none();return{convert:function(e){t=function(n){var e,t=at("window.clipboardData.files"),r=void 0!==(e=n).convertURL?e.convertURL:void 0!==e.msConvertURL?e.msConvertURL:void 0;if(void 0!==t&&void 0!==r&&0<t.length){var o=Oe(t,function(e){var t=g.URL.createObjectURL(e);return r.apply(n,[e,"specified",t]),Qe(e,t)});return O.some(o)}return O.none()}(e)},listen:function(e){return t.fold(function(){return Ne.nu(function(e){e([])})},function(e){return e}).get(e)},clear:function(){t=O.none()}}},Wm=xr("asset","image"),qm=function(e,r){return ye.cata(e,function(e,t,n){return gt(r,"src",n),!0},x)},zm=function(e,r){var o=[];return B(e,function(e,t){var n=r[t];qm(e,n)&&o.push(Wm(e,n))}),o},$m=function(e){return Oe(e,function(u){return Ne.nu(function(i){var e,a=u.dom();(e=a,ze(e)).then(function(o){o.toBlob().then(function(e){var t=to(a.src,"blob:")?a.src:g.URL.createObjectURL(e),n=Ce("image"),r=ye.blob(n,o,t);i(Wm(r,u))})})})})},Vm=xr("futureAsset","image"),Gm=function(t,e){return(n=e,je(n)).map(function(e){return Vm(Ze(e),t)});var n},Km=function(e){var t=xt.fromTag("div");return la(t,e),ni(t,"img[src]")},Xm=function(e){return 0===e.indexOf("data:")&&-1<e.indexOf("base64")},Jm=function(e){return 0===e.indexOf("blob:")},Zm=function(e){var t=ht(e,"src");return Xm(t)||Jm(t)},Qm=function(e){return G(Km(e),function(e){var n,t,r=ht(e,"src");return Xm(r)?Gm(e,r).toArray():Jm(r)?(n=e,t=r,We(t).map(function(e){var t=Ne.nu(function(t){e.then(function(e){Ze(e).get(t)})});return Vm(t,n)})).toArray():[]})};function ep(l){return function(e,s){return lu(function(a){var u=function(){uu(a,{response:s.response(),bundle:s.bundle()})},c=function(e){var t,n,r=W(Km(e),Zm);B(r,da),uu(a,{response:0<r.length?(t=e,n=W(t,function(e){return"img"!==ct(e)||!Zm(e)}),ou.incomplete(n,[],"errors.local.images.disallowed")):s.response(),bundle:s.bundle()})},e=function(e,t){var n,r,o,i;!1===l.allowLocalImages?c(e):0===t.length?(r=Qm(n=e),o=Oe(r,function(e){return e.futureAsset()}),i=H(r,function(e){return e.image()}),o.get(function(e){var t=zm(e,i);uu(a,{response:ou.paste(n,t),bundle:s.bundle()})})):u()};ou.cata(s.response(),u,e,u,e)})}}var tp={resolve:Mo("ephox-cement").resolve};function np(s,r){var l=r.translations,f=function(e,t,n){n(O.some(Ei(t,{officeStyles:e,htmlStyles:e})))};return{get:function(e,t){var n=r[e?"officeStyles":"htmlStyles"];"clean"===n?f(!1,r,t):"merge"===n?f(!0,r,t):function(e,t){var n=xt.fromTag("div");Yi(n,tp.resolve("styles-dialog-content"));var r=xt.fromTag("p"),o=Ba(l("cement.dialog.paste.instructions"));la(r,o),ua(n,r);var i={text:l("cement.dialog.paste.clean"),tabindex:0,className:tp.resolve("clean-styles"),click:function(){u(),f(!1,e,t)}},a={text:l("cement.dialog.paste.merge"),tabindex:1,className:tp.resolve("merge-styles"),click:function(){u(),f(!0,e,t)}},u=function(){c.destroy()},c=s(!0);c.setTitle(l("cement.dialog.paste.title")),c.setContent(n),c.setButtons([i,a]),c.events.close.bind(function(){t(O.none()),u()}),c.show()}(r,t)},destroy:T}}var rp,op,ip,ap=function(e,t){var i=np(e,t);return function(e,r){var t=r.bundle(),o=r.response();return lu(function(n){i.get(hu.isWord(t),function(e){var t=e.fold(function(){return{response:ou.cancel(),bundle:r.bundle()}},function(e){return{response:o,bundle:tu({officeStyles:e.officeStyles,htmlStyles:e.htmlStyles})}});uu(n,t)})})}},up=ap,cp=function(r,o){return function(e,t){var n=function(e){return au({response:t.response(),bundle:tu({officeStyles:e,htmlStyles:e})})};return hu.isInternal(t.bundle())?n(!0):hu.isGoogleDocs(t.bundle())?n(!1):ap(r,o)(e,t)}},sp=function(e){var t,n,r=e.dom();try{var o=r.contentWindow?r.contentWindow.document:r.contentDocument;return t=o,n=xt.fromDom,null!=t?O.some(n(t)):O.none()}catch(e){return g.console.log("Error reading iframe: ",r),g.console.log("Error was: "+e),O.none()}},lp=function(e,t){if(!_o(e))throw"Internal error: attempted to write to an iframe that is not in the DOM";var n,r=sp(n=e).getOrThunk(function(){return $o(n)}).dom();r.open("text/html","replace"),r.writeln(t),r.close()},fp=function(e){var t=e.dom().styleSheets;return Array.prototype.slice.call(t)},dp={},mp={exports:dp};op=dp,ip=mp,rp=void 0,function(e){"object"==typeof op&&void 0!==ip?ip.exports=e():"function"==typeof rp&&rp.amd?rp([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=e()}(function(){return function i(a,u,c){function s(t,e){if(!u[t]){if(!a[t]){var n=!1;if(!e&&n)return n(t,!0);if(l)return l(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var o=u[t]={exports:{}};a[t][0].call(o.exports,function(e){return s(a[t][1][e]||e)},o,o.exports,i,a,u,c)}return u[t].exports}for(var l=!1,e=0;e<c.length;e++)s(c[e]);return s}({1:[function(e,t,n){var r,a,o=(r=function(e){var t,n,r,o,i=[];for(r=0,o=(t=e.split(",")).length;r<o;r+=1)0<(n=t[r]).length&&i.push(a(n));return i},a=function(c){var e,t,n,s=c,l={a:0,b:0,c:0},f=[];return e=function(e,t){var n,r,o,i,a,u;if(e.test(s))for(r=0,o=(n=s.match(e)).length;r<o;r+=1)l[t]+=1,i=n[r],a=s.indexOf(i),u=i.length,f.push({selector:c.substr(a,u),type:t,index:a,length:u}),s=s.replace(i,Array(u+1).join(" "))},(t=function(e){var t,n,r,o;if(e.test(s))for(n=0,r=(t=s.match(e)).length;n<r;n+=1)o=t[n],s=s.replace(o,Array(o.length+1).join("A"))})(/\\[0-9A-Fa-f]{6}\s?/g),t(/\\[0-9A-Fa-f]{1,5}\s/g),t(/\\./g),(n=/:not\(([^\)]*)\)/g).test(s)&&(s=s.replace(n," $1 ")),function(){var e,t,n,r,o=/{[^]*/gm;if(o.test(s))for(t=0,n=(e=s.match(o)).length;t<n;t+=1)r=e[t],s=s.replace(r,Array(r.length+1).join(" "))}(),e(/(\[[^\]]+\])/g,"b"),e(/(#[^\#\s\+>~\.\[:]+)/g,"a"),e(/(\.[^\s\+>~\.\[:]+)/g,"b"),e(/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,"c"),e(/(:[\w-]+\([^\)]*\))/gi,"b"),e(/(:[^\s\+>~\.\[:]+)/g,"b"),s=(s=s.replace(/[\*\s\+>~]/g," ")).replace(/[#\.]/g," "),e(/([^\s\+>~\.\[:]+)/g,"c"),f.sort(function(e,t){return e.index-t.index}),{selector:c,specificity:"0,"+l.a.toString()+","+l.b.toString()+","+l.c.toString(),specificityArray:[0,l.a,l.b,l.c],parts:f}},{calculate:r,compare:function(e,t){var n,r,o;if("string"==typeof e){if(-1!==e.indexOf(","))throw"Invalid CSS selector";n=a(e).specificityArray}else{if(!Array.isArray(e))throw"Invalid CSS selector or specificity array";if(4!==e.filter(function(e){return"number"==typeof e}).length)throw"Invalid specificity array";n=e}if("string"==typeof t){if(-1!==t.indexOf(","))throw"Invalid CSS selector";r=a(t).specificityArray}else{if(!Array.isArray(t))throw"Invalid CSS selector or specificity array";if(4!==t.filter(function(e){return"number"==typeof e}).length)throw"Invalid specificity array";r=t}for(o=0;o<4;o+=1){if(n[o]<r[o])return-1;if(n[o]>r[o])return 1}return 0}});void 0!==n&&(n.calculate=o.calculate,n.compare=o.compare)},{}],2:[function(e,t,n){var r=e("specificity");t.exports={boltExport:r}},{specificity:1}]},{},[2])(2)});var pp=mp.exports.boltExport,gp=function(e){var t=e.cssRules;return G(t,function(e){return e.type===g.CSSRule.IMPORT_RULE?gp(e.styleSheet):e.type===g.CSSRule.STYLE_RULE?[function(e){var t=e.selectorText,n=e.style.cssText;if(void 0===n)throw new Error("WARNING: Browser does not support cssText property");return{selector:t,style:n,raw:e.style}}(e)]:[]})},vp=function(e){return G(e,gp)},hp=function(t,e,n){var r=G(e,function(i){var e=ni(t,i.selector);return B(e,function(e){var n,r,o,t=(n=i.raw,r=e,o={},B(n,function(e){if(void 0!==n[e]){var t=r.dom().style;j(t,e)||(o[e]=n[e])}}),o);ha(e,t)}),e});n&&B(r,function(e){bt(e,"class")})},yp=function(e,t,n){var r=function(e){return-1!==e.selector.indexOf(",")},o=G(W(e,r),function(t){var e=t.selector.split(",");return H(e,function(e){return{selector:e.trim(),raw:t.raw}})}),i=W(e,function(e){return!r(e)}).concat(o);i.sort(function(e,t){return pp.compare(e.selector,t.selector)}).reverse(),hp(t,i,n)},bp=function(e,t,n,r){var o=fp(e),i=vp(o).map(function(e){var t=e.selector;return{selector:n.hasOwnProperty(t)?n[t]:t,raw:e.raw}});yp(i,t,r)},Tp=function(e,t,n,r){var o=fp(e),i=vp(o),a=W(i,function(e){return to(e.selector,n)});yp(a,t,r)},xp=function(e,t,n,r){var o=fp(e),i=vp(o),a=W(i,function(e){return j(n,e.selector)});yp(a,t,r)},Ep={inlineStyles:function(e,t,n){bp(e,t,n,!0)},inlineStylesKeepClasses:function(e,t,n){bp(e,t,n,!1)},inlinePrefixedStyles:function(e,t,n){Tp(e,t,n,!0)},inlinePrefixedStylesKeepClasses:function(e,t,n){Tp(e,t,n,!1)},inlineSelectorsStyles:function(e,t,n){xp(e,t,n,!0)},inlineSelectorsStylesKeepClasses:function(e,t,n){xp(e,t,n,!1)}},wp={inlineStyles:Ep.inlineStyles,inlineStylesKeepClasses:Ep.inlineStylesKeepClasses,inlinePrefixedStyles:Ep.inlinePrefixedStyles,inlinePrefixedStylesKeepClasses:Ep.inlinePrefixedStylesKeepClasses,inlineSelectorsStyles:Ep.inlineSelectorsStyles,inlineSelectorsStylesKeepClasses:Ep.inlineSelectorsStylesKeepClasses},Sp={p:"p, li[data-converted-paragraph]"},_p=T,Np=function(l,e){var f=function(n){bt(n,"data-list-level"),bt(n,"data-text-indent-alt"),bt(n,"data-border-margin"),xa(n,"margin-left"),xa(n,"text-indent"),se(function(e){var t={},n=e.dom();if(pa(n))for(var r=0;r<n.style.length;r++){var o=n.style.item(r);t[o]=n.style[o]}return t}(n),function(e,t){!to(t,"border")||"border-image"!==t&&"none"!==e.trim()&&"initial"!==e.trim()||xa(n,t)})},t=ni(l,"li[data-converted-paragraph]");if(B(t,function(e){bt(e,"data-converted-paragraph")}),e){var n=ni(l,"li");B(n,function(e){var t,n,r,o,i,a,u=(t=l,n=xt.fromTag("span"),aa(t,n),r=n,{convertToPx:function(e){var t;return va(r,"margin-left",e),t=ya(r,"margin-left"),parseFloat(t.match(/-?\d+\.?\d*/)[0])},destroy:function(){return da(r)}}),c=(i=u,a=yt(o=l,"data-tab-interval")?ht(o,"data-tab-interval"):"36pt",i.convertToPx(a)),s=Lp(e,c,u).getOr({});f(e),u.destroy(),ha(e,s)});var r=ni(l,"ol,ul");B(r,function(t){var e=ni(t,"li");Ta(t,"margin-top").isNone()&&O.from(e[0]).each(function(e){va(t,"margin-top",ya(e,"margin-top"))}),Ta(t,"margin-bottom").isNone()&&O.from(e[e.length-1]).each(function(e){va(t,"margin-bottom",ya(e,"margin-bottom"))})})}bt(l,"data-tab-interval")},Lp=function(f,d,m){var p=function(e){return yt(e,"data-list-level")?parseInt(ht(e,"data-list-level"),10):1};return Ta(f,"text-indent").bind(function(l){return Ta(f,"margin-left").map(function(e){var t=Ta(f,"list-style").exists(function(e){return eo(e,"none")}),n=yt(f,"data-border-margin")?ht(f,"data-border-margin"):"0px",r=t?p(f)+1:p(f),o=m.convertToPx(e)+m.convertToPx(n),i=d*r,a=yt(f,"data-text-indent-alt")?m.convertToPx(ht(f,"data-text-indent-alt")):m.convertToPx(l),u={},c=d/2*-1-a;0<c&&(u["text-indent"]=c+"px");var s=o-i-c;return u["margin-left"]=0<s?s+"px":"0px",u})})},Ip=function(e,t,n){var r=n.mergeInline();(r?wp.inlineStyles:_p)(e,t,Sp),Np(t,r)},Ap=function(n){var e,r=(e=xt.fromDom(g.document.body),{play:function(a,u,c){var s=xt.fromTag("div"),l=xt.fromTag("iframe");ha(s,{display:"none"});var f=wo(l,"load",function(){var e;f.unbind(),lp(l,a);var t=null===(e=l.dom().contentWindow)||void 0===e?void 0:e.document;if(void 0===t)throw"sandbox iframe load event did not fire correctly";var n=xt.fromDom(t),r=n.dom().body;if(void 0===r)throw"sandbox iframe does not have a body";var o=xt.fromDom(r),i=u(n,o);da(s),g.setTimeout(A(c,i),0)});ua(s,l),ua(e,s)}});return function(e,t){r.play(e,function(e,t){return Ip(e,t,{mergeInline:y(n)}),_u(t)},t)}},Op=function(e,l,t,f){var n=e.html;return lu(function(s){t.cleanDocument(n,l,f).then(function(e){if(null==(a=e)||0===a.length)uu(s,{response:ou.paste([],[]),bundle:tu({})});else{var t=void 0===f.sanitizer?sm(f.intraFlag.isMarked):f.sanitizer;n=s,r=l,o=e,u=f.allowLocalImages,c=function(e){uu(n,{response:e,bundle:tu({})})},i=t.sanitizeHtml(o,"word"),Ap(r)(i,function(e){var t=Ba(e),n=function(e){c(ou.paste(t,e))},r=xt.fromTag("div");la(r,t);var o=W(vo("img[src]",r),function(e){var t=ht(e,"src");return to(t,"blob:")||to(t,"data:")}),i=vo("img[data-image-src]",r);if(0===o.length&&0===i.length)n([]);else if(u)B(o,function(e){return bt(e,"id")}),$m(o).get(n);else{B(o,da),B(i,da);var a=Zo(r);c(ou.incomplete(a,[],"errors.local.images.disallowed"))}})}var n,r,o,u,c,i,a},function(e){console.error("PowerPaste error code: WIM01"),uu(s,{response:ou.error("errors.paste.process.failure"),bundle:tu({})})})})},Dp=function(e){var t=W(e,function(e){return"file"===e.kind&&/image/.test(e.type)}),r=q(t,function(e,t){var n=t.getAsFile();return null!==n?e.concat(n):e},[]);return lu(function(n){et(r).get(function(e){var i,a,t=(i=[],a=[],B(e,function(o){return ye.cata(o,function(e,t,n){var r=xt.fromTag("img");gt(r,"src",n),i.push(r),a.push(Wm(o,r))},function(e,t,n){g.console.error("Internal error: Paste operation produced an image URL instead of a Data URI: ",t)})}),ou.paste(i,a));uu(n,{response:t,bundle:tu({})})})})},Cp=lo(),Pp=function(e){try{var t=e(),n=null!=t&&0<t.length?Ba(t):[];return Co.value(n)}catch(e){return g.console.error("PowerPaste error code: PT01. Message: ",e),Co.error("errors.paste.process.failure")}},kp=function(e){return e.fold(function(e){return su(e)},function(e){return au({response:ou.paste(e,[]),bundle:tu({})})})},Mp=function(e,t,n,r,o){return Pp(function(){return function(e,t,n,r,o,i){nd(n);var a=_u(n),u=Nf(o,r,t,i);return as(e,a,u)}(e,Cp,t,n,r,{cleanFilteredInlineElements:o.cleanFilteredInlineElements})})},Rp=function(e,t,n,r){var o=Mp(e,t,n,!1,r);return kp(o)},Fp=function(e,t){var n=Pp(function(){return rd(e,_u(t))});return kp(n)},jp=function(e,t,n,r,o,i){return Mp(e,t,r,n,i).fold(function(e){return su(e)},function(a){return lu(function(r){o.get(function(e){var t,o,i,n=(t=e,o=[],i=G(a,function(e){return"img"===ct(e)?[e]:ni(e,"img")}),B(t,function(r){ye.cata(r,function(e,t,n){B(i,function(e){ht(e,"src")===n&&o.push(Wm(r,e))})},T)}),o);uu(r,{response:ou.paste(a,n),bundle:tu({})})})})})},Up=function(e,t,n,r){var o=t.findClipboardTags(Zo(n)).getOr([]);B(o,da);var i=Ne.nu(function(e){return e([])});return jp(e,n,!1,!0,i,r)},Hp=function(e,t,n,r,o,i){return jp(e,t,r,n,o,i)},Bp=function(e){return"\n"===e||"\r"===e},Yp=function(e,t){var n,r,o=e.replace(/\t/g,(n=" ",(r=t)<=0?"":new Array(r+1).join(n)));return q(o,function(e,t){return-1!==" \f\t\v".indexOf(t)||"\xa0"===t?e.pcIsSpace||""===e.str||e.str.length===o.length-1||(n=o,(r=e.str.length+1)<n.length&&0<=r&&Bp(n[r]))?{pcIsSpace:!1,str:e.str+"\xa0"}:{pcIsSpace:!0,str:e.str+" "}:{pcIsSpace:Bp(t),str:e.str+t};var n,r},{pcIsSpace:!1,str:""}).str},Wp=function(e){var t,n=xt.fromTag("div");return t=e,n.dom().textContent=t,_u(n)},qp=function(e,t){var n=Yp(e,t).replace(/^[\r\n]*|[\r\n]*$/g,"").split(/(?:\r?\n){2}/),r=H(n,function(e){return e.split(/\n|\r\n/).join("<br />")});return 1===r.length?r[0]:H(r,function(e){return"<p>"+e+"</p>"}).join("")},zp=function(e,u){var c=wm(e).getOrDie("Required text input for Text Handler");return lu(function(e){var t,n,r,o,i,a=0<c.text.length?(t=c.text,n=u,r=Wp(t),o=qp(r,n),i=Ba(o),ou.paste(i,[])):ou.cancel();uu(e,{response:a,bundle:tu({})})})},$p=function(n){return function(e,t){return zp(e,n)}},Vp=function(e,o){var t=function(e,t){var n=xt.fromTag("div");la(n,e),nd(n);var r=Zo(n);return au({response:ou.paste(r,t),bundle:o.bundle()})},n=A(cu,o);return ou.cata(o.response(),n,t,n,t)},Gp=function(){return function(e,t){return su("errors.local.images.disallowed")}},Kp=function(){return function(e,t){var n=xm(e).getOrDie("Must have image data for images handler");return Dp(n.images)}},Xp=function(i){return function(e,t){var n=Tm(e).getOrDie("Wrong input type for HTML handler"),r=i.findClipboardTags(Zo(n.container));r.each(function(e){B(e,da)});var o=r.isSome();return au({response:t.response(),bundle:tu({isInternal:o})})}},Jp=function(a,u,c){return function(e,t){var n=Tm(e).getOrDie("Wrong input type for HTML handler").container,r=$o(u),o=t.bundle();if(hu.isInternal(o))return Fp(r,n);a(n);var i=hu.merging(o);return Rp(r,n,i,c)}},Zp=function(u,c,s){return function(e,t){var a=t.bundle();return hu.proxyBin(a).handle("There was no proxy bin setup. Ensure you have run proxyStep first.",function(e){var t=hu.merging(a),n=hu.isWord(a),r=hu.isInternal(a),o=hu.backgroundAssets(a),i=$o(u);return r?Up(i,c,e,s):Hp(i,e,t,n,o,s)})}},Qp=function(o,i){return function(e,t){var n=Em(e).getOrDie("Wrong input type for Word Import handler"),r=hu.mergeOffice(t.bundle());return Op(n,r,o,i)}},eg=function(r){return function(e,t){var n=eu(t.bundle(),tu(r));return au({response:t.response(),bundle:n})}},tg=function(e,t){return au({response:ou.cancel(),bundle:tu({})})},ng=tp.resolve("smartpaste-eph-bin"),rg={binStyle:y(ng)},og=lo();function ig(r,m,o,p,i){return function(e,t){var n=bm(e).getOrDie("Must pass through event type").nativeEvent,f=i(),d=t.response();return lu(function(l){var e=r(o);e.events.after.bind(function(e){var t,n,r,o=e.container();if(og.browser.isSafari()&&Ki(o,'img[src^="webkit-fake-url"]').isSome()){var i=og.deviceType.isWebView()?"webview.imagepaste":"safari.imagepaste";uu(l,{response:ou.error(i),bundle:tu({})})}else{m(o),Yi(o,rg.binStyle());var a=(n=o,((r=(t=og).browser).isIE()&&11<=r.version.major?od:id)(n,t)),u=Zo(o),c=p.findClipboardTags(u).isSome(),s=U(u,function(e){return yt(e,"id")&&to(ht(e,"id"),"docs-internal-guid")});uu(l,{response:d,bundle:tu({isWord:a,isGoogleDocs:s,isInternal:c,proxyBin:o,backgroundAssets:f})})}}),f.convert(n),e.run()})}}var ag=ve([{unsupported:["id","message","isEquation","attrs"]},{supported:["id","contentType","blob","isEquation","attrs"]}]),ug={unsupported:ag.unsupported,supported:ag.supported,cata:function(e,t,n){return e.fold(t,n)}},cg=function(e,t){if(0===e.length)throw new Error("Zero length content passed to Hex conversion");var n=function(e){for(var t=new Array(e.length/2),n=0;n<e.length;n+=2){var r=e.substr(n,2);t[Math.floor(n/2)]=parseInt(r,16)}return t}(e),r=new Uint8Array(n);return new g.Blob([r],{type:t})},sg=function(e,t,n){return t.indexOf(e,n)},lg=function(e,t,n,r,o,i,a){return-1===e||-1===t?O.none():O.some({start:e,end:t,bower:n,regex:r,idRef:o,isEquation:i,attrs:a})},fg=function(e,t,n){return e.substring(t,n)},dg=function(e,t){if(-1===t)return t;var n=0,r=e.length;do{var o=e.indexOf("{",t),i=e.indexOf("}",t);if(o<i&&-1!==o?(t=o+1,++n):(i<o||o<0)&&-1!==i&&(t=i+1,--n),r<t||-1===i)return-1}while(0<n);return t},mg=function(e,t,n,r,o){var i,a,u,c=fg(e,n,r),s=(a=sg("\\picscalex",i=e,n),u=sg("\\bliptag",i,a),-1<a&&a<u?O.from(i.substring(a,u)):O.none());return lg(n,r,c,/[^a-fA-F0-9]([a-fA-F0-9]+)\}$/,"i",o,s)},pg=function(e,t,n,r,o){var i=fg(e,n,r);return lg(n,r,i,/([a-fA-F0-9]{64,})(?:\}.*)/,"s",o,O.none())},gg=function(e,t){var n=sg("{\\pict{",e,t),r=dg(e,n),o=sg("{\\shp{",e,t),i=dg(e,o),a=sg("{\\mmathPict{",e,t),u=dg(e,a),c=-1!==a&&(a<n&&r<u||a<o&&i<u),s=A(pg,e,t,o,i,c),l=A(mg,e,t,n,r,c);return-1===n&&-1===o?O.none():-1===n?s():-1===o?l():o<n&&r<i?l():n<o&&i<r?s():n<o?l():o<n?s():O.none()},vg=function(e,t){return gg(e,t)},hg=function(e){return 0<=e.indexOf("\\pngblip")?Co.value("image/png"):0<=e.indexOf("\\jpegblip")?Co.value("image/jpeg"):Co.error("errors.imageimport.unsupported")},yg=function(e,t){var n=e.match(t);return n&&n[1]&&n[1].length%2==0?Co.value(n[1]):Co.error("errors.imageimport.invalid")},bg=function(e){var t=e.match(/\\shplid(\d+)/);return null!==t?O.some(t[1]):O.none()},Tg=function(e){for(var u=[],t=function(){return e.length},n=function(e){var t,r,o,i,a,n=(r=(t=e).bower,o=t.regex,i=t.isEquation,a=t.attrs,bg(r).map(function(e){var n=t.idRef+e;return hg(r).fold(function(e){return ug.unsupported(n,e,i,a)},function(t){return yg(r,o).fold(function(e){return ug.unsupported(n,e,i,a)},function(e){return ug.supported(n,t,cg(e,t),i,a)})})}));return u=u.concat(n.toArray()),e.end},r=0;r<e.length;)r=vg(e,r).fold(t,n);return u},xg=function(e){var t=e.replace(/\r/g,"").replace(/\n/g,"");return Tg(t)},Eg=function(e){return xg(e)},wg=function(e){return ug.cata(e,function(e,t,n){return e},function(e,t,n,r,o){return e})},Sg=function(e){return ug.cata(e,function(e,t,n){return n},function(e,t,n,r,o){return r})},_g=function(e){return ug.cata(e,function(e,t,n){return Co.error(t)},function(e,t,n,r,o){return Co.value(n)})};function Ng(u,c,s,l,f){return u.toCanvas().then(function(e){return t=e,n=u.getType(),r=c,o=s,Me(i=Pe(l,f)).drawImage(t,-r,-o),He(a=i,n).then(function(e){return qe(Re.resolve(a),e,a.toDataURL())});var t,n,r,o,i,a})}var Lg=function(e,t){var n=new RegExp("\\\\pic"+t+"(\\-?\\d+)\\\\"),r=e.match(n)[1];return parseInt(r,10)},Ig=function(e,t,n){var r=A(Lg,e),o=r("wgoal"),i=r("hgoal"),a=o/t,u=i/n,c=r("cropl"),s=r("cropt");return{cropl:c/a,cropt:s/u,cropw:(o-c-r("cropr"))/a,croph:(i-s-r("cropb"))/u}},Ag=function(m,e){return e.fold(function(){return new xe(function(e){return e(m)})},function(d){return ye.cata(m,function(s,l,f){return l.toCanvas().then(function(e){var t,n,r,o,i,a=parseInt(ht(xt.fromDom(e),"width"),10)||1,u=parseInt(ht(xt.fromDom(e),"height"),10)||1,c=Ig(d,a,u);return a===c.cropw&&u===c.croph&&0===c.cropl&&0===c.cropt?xe.resolve(m):(t=l,n=c.cropl,r=c.cropt,o=c.cropw,i=c.croph,Ng(t,n,r,o,i)).then(function(n){return n.toBlob().then(function(e){g.URL.revokeObjectURL(f);var t=g.URL.createObjectURL(e);return ye.blob(s,n,t)})})})},function(e,t,n){return new xe(function(e){return e(m)})})})},Og=function(e,n){return e.length===n.length?xe.all(H(e,function(e,t){return Ag(e,n[t])})):xe.resolve(e)},Dg=function(e,t,i,a,u){var c=[],s=[],l=!1;return{blobs:G(e,function(r,n){var o=ht(r,"data-image-id");return bt(r,"rtf-data-image"),bt(r,"data-image-id"),bt(r,"data-ms-equation"),u||bt(r,"data-image-src"),"unsupported"===o?(l=!0,gt(r,"alt",i("errors.imageimport.unsupported")),[]):z(t,function(e,t){return a(e,t,o,n)}).fold(function(){return g.console.log("WARNING: unable to find data for image ",r.dom()),l=!0,gt(r,"alt",i("errors.imageimport.unsupported")),[]},function(n){return _g(n).fold(function(e){return l=!0,g.console.error("PowerPaste error code: RTF04"),gt(r,"alt",i(e)),[]},function(e){var t;return c.push(r),s.push((t=n,ug.cata(t,function(e,t,n){return O.none()},function(e,t,n,r,o){return o}))),u&&bt(r,"data-image-src"),[e]})})}),filteredImages:c,imageAttrs:s,failedImage:l}},Cg={convert:function(e,t,n,r,o){var i=q(t,function(t,n){var r=wg(n),o=Sg(n);return $(t,function(e){return!(o||Sg(e))&&wg(e)===r}).fold(function(){return t.concat([n])},function(e){return _g(t[e]).isValue()?t:t.slice(0,e).concat(t.slice(e+1)).concat([n])})},[]),a=o.keepSrc||!1,u=Y(i,function(e){return!Sg(e)}),c=u.pass,s=u.fail,l=Y(e,function(e){return!("true"===ht(e,"data-ms-equation"))}),f=l.pass,d=l.fail,m=Dg(f,c,r,function(e,t,n,r){return wg(e)===n},a),p=Dg(d,s,r,function(e,t,n,r){return t===r},a),g=m.filteredImages.concat(p.filteredImages),v=m.imageAttrs.concat(p.imageAttrs),h=m.blobs.concat(p.blobs),y=m.failedImage||p.failedImage;et(h).get(function(e){Og(e,v).then(function(e){var t=zm(e,g);n(t,y)})})}},Pg=function(e){return ni(e,"[rtf-data-image]")},kg={exists:function(e){return 0<Pg(e).length},find:Pg};function Mg(i){var a,u,c=(a=i.translations,{events:(u=qo.create({insert:Wo(["elements","correlated"]),incomplete:Wo(["elements","correlated","message"])})).registry,processRtf:function(o,i,e,t){var n=Eg(e),r=kg.find(o);Cg.convert(r,n,function(e,t){var n=Zo(o),r=e.concat(i);t?(console.error("PowerPaste error code: RTF01"),u.trigger.incomplete(n,r,"errors.imageimport.failed")):u.trigger.insert(n,r)},a,t)}}),s=Cr(O.none()),l=function(t){s.get().each(function(e){uu(e,{response:t,bundle:tu({})})})};return c.events.insert.bind(function(e){l(ou.paste(e.elements(),e.correlated()))}),c.events.incomplete.bind(function(e){console.error("PowerPaste error code: RTF02"),l(ou.incomplete(e.elements(),e.correlated(),e.message()))}),function(e,r){var t=Em(e).getOrDie("Word input required for rtf data"),n=function(o){return lu(function(t){var e=function(){uu(t,{response:r.response(),bundle:r.bundle()})},n=function(e,n){s.set(O.some(t));var r=xt.fromTag("div");la(r,e),o.fold(function(){var e,t=kg.find(r);return 0<t.length?function(e){B(e,da);var t=Zo(r);console.error("PowerPaste error code: RTF03"),l(ou.incomplete(t,n,"errors.imageimport.failed"))}(t):(e=Zo(r),void l(ou.paste(e,n)))},function(e){c.processRtf(r,n,e,i)})};ou.cata(r.response(),e,n,e,n)})};return function(t,n){var e=ue(n);if(e.length!==ud.length)throw new Error("Partial match");return Ja(e,function(e){return Za(t.discriminator===e,n[e])}).getOrDie("Must find branch for constructor: "+t.discriminator)(t.data)}(t.rtf,{disabled:function(){return n(O.none())},fromClipboard:function(e){return n(!0===i.allowLocalImages?O.some(e.rtf):O.none())}})}}var Rg=function(o){var i=function(){return Ne.pure(o)};return ye.cata(o.asset(),function(e,t,n){return/tiff$/.test(t.getType())?(r=t,Ne.nu(function(t){var e=Ke(r,"image/png").then(function(e){Ze(e).map(O.some).get(t)});return e.catch.call(e,function(e){return g.console.warn(e),t(O.none()),e})})).map(function(e){return e.map(function(e){var t=o.image();return g.URL.revokeObjectURL(n),qm(e,t),Wm(e,t)}).getOr(o)}):i();var r},i)};function Fg(){return function(e,o){return lu(function(n){var e=function(){uu(n,{response:o.response(),bundle:o.bundle()})},r=function(e,t){Oe(e,Rg).get(function(e){uu(n,{response:t(e),bundle:o.bundle()})})};ou.cata(o.response(),e,function(t,e){r(e,function(e){return ou.paste(t,e)})},e,function(t,e,n){r(e,function(e){return g.console.error("PowerPaste error code: IMG01"),ou.incomplete(t,e,n)})})})}}var jg=function(e){return y(e)},Ug=function(e,t){return e.isSupported()?t.getWordData():O.none()},Hg=function(e){return e.getNative()},Bg=function(e){return e.getImage()},Yg=function(e){return e.getHtml()},Wg=function(e){return e.getText()},qg=function(e){return e.getOnlyText()},zg=function(e){return e.getGoogleDocsData()},$g=function(e){return e.getVoid()},Vg=function(e,t,n,r){return{_label:e,label:y(e),getAvailable:t,steps:y(n),capture:y(r)}},Gg=function(e,t,n,r){return{_label:e,label:y(e),getAvailable:t,steps:y(n),capture:y(r)}},Kg=function(e){return void 0===e&&(e=4),Vg(Um.text,Wg,[jg($p(e)),jg(Vp)],!0)},Xg=function(){return Gg(Um.discard,$g,[jg(tg)],!0)};function Jg(){var o={};return{getOrSetIndexed:function(e,t){return void 0!==o[e]?o[e]:(n=e,r=t(),o[n]=r);var n,r},waitForLoad:function(){var e=me(o);return Ie(e)}}}var Zg=function(u){var c=A(ut,u);ut("callbacks",c());var t=function(e,t){var n,r,o,i=c(),a=(r=void 0===(n=i).count?0:n.count,o="callback_"+r,n.count=r+1,o);return i.callbacks[a]=function(){t||s(a),e.apply(null,arguments)},u+".callbacks."+a},s=function(e){var t=e.substring(e.lastIndexOf(".")+1),n=c();void 0!==n.callbacks[t]&&delete n.callbacks[t]};return{ephemeral:function(e){return t(e,!1)},permanent:function(e){return t(e,!0)},unregister:s}}("ephox.henchman.features"),Qg=function(i){return we.nu(function(t){var e=function(){r.unbind(),o.unbind()},n=xt.fromTag("script");gt(n,"src",i),gt(n,"type","text/javascript"),gt(n,"async","async"),gt(n,"data-main",Zg.ephemeral(function(e){t(Co.value(e))}));var r=wo(n,"error",function(){e(),t(Co.error("Error loading external script tag "+i))}),o=wo(n,"load",e);ua(xt.fromDom(g.document.head),n)})},ev=function(e,t){var n,r,o,i=t||xt.fromDom(g.document),a=xt.fromTag("link",i.dom());return vt(a,{rel:"stylesheet",type:"text/css",href:e}),n=i,r=a,o=xt.fromDom(n.dom().head),ua(o,r),a},tv=function(o,i){return we.nu(function(t){var n=function(e){B(r,function(e){e.unbind()}),t(e.fold(function(e){return Co.error(e+'Unable to download editor stylesheets from "'+o+'"')},Co.value))},e=ev(o),r=[wo(e,"load",function(e){!function(e){try{var t=e.target().dom().sheet.cssRules;return I(t)&&0===t.length}catch(e){}return!1}(e)?i(n):n(Co.error(""))}),wo(e,"error",A(n,Co.error("")))]})};var nv,rv,ov=(nv=Jg(),{preload:function(){rv().get(a)},addStylesheet:function(e,t){return nv.getOrSetIndexed(e,function(){return tv(e,t)})},addScript:function(e,t){return nv.getOrSetIndexed(e,function(){return Qg(e).map(t)})},waitForLoad:rv=function(){return nv.waitForLoad()}}),iv=function(e,t){return ov.addScript(e,t)},av={loadScript:function(e,r){return new xe(function(t,n){iv(r,a).get(function(e){e.fold(n,t)})})}},uv=function(e,t,n,r,o){void 0===o&&(o=av);var i,a,u,c,s,l,f,d,m,p,g,v,h,y,b,T,x,E,w,S=xu(o,r.baseUrl,r.cacheSuffix),_=vc(void 0!==r.pasteBinAttrs?r.pasteBinAttrs:{}),N=void 0===r.sanitizer?sm(r.intraFlag.isMarked):r.sanitizer,L=[(h=r,y=O.from(h.tabSpaces).getOr(4),Vg(Um.plaintext,qg,[jg($p(y)),jg(Vp)],!0)),(m=S,p=t,g=r,Vg(Um.msoffice,A(Ug,m),[jg(eg({isWord:!0})),jg(up(p,g)),jg(Qp(m,g)),(v=Mg(g),function(n){return function(e,t){return n.block(),v(e,t).map(function(e){return n.unblock(),e})}}),jg(Fg())],!0)),(l=r,f=n,d=e,Vg(Um.googledocs,zg,[jg(eg({officeStyles:!1,htmlStyles:!1})),jg(Jp(f,d,l)),jg(ep(l)),jg(Fg())],!0)),(a=t,u=r,c=n,s=e,Vg(Um.native,Yg,[jg(Xp(u.intraFlag)),jg(cp(a,u)),jg(Jp(c,s,u)),jg(ep(u)),jg(Fg())],!0)),(i=r,Vg(Um.image,Bg,[jg(!1===i.allowLocalImages?Gp():Kp()),jg(Fg())],!0))],I=(b=t,T=r,x=n,E=_,w=e,Gg(Um.fallback,Hg,[jg(ig(E,x,w,T.intraFlag,Ym)),jg(cp(b,T)),jg(Zp(w,T.intraFlag,T)),jg(ep(T)),jg(Fg())],!1));return Bm(L,I,N)};var cv=function(){return e=function(e){e.unbind()},t=Cr(O.none()),n=function(){t.get().each(e)},{clear:function(){n(),t.set(O.none())},isSet:function(){return t.get().isSome()},set:function(e){n(),t.set(O.some(e))}};var e,t,n},sv=function(){var t=Cr(O.none());return{clear:function(){t.set(O.none())},set:function(e){t.set(O.some(e))},isSet:function(){return t.get().isSome()},on:function(e){t.get().each(e)}}},lv=function(){var n={},u={};tinymce.Resource={add:function(e,t){u[e]&&(u[e](t),delete u[e]),n[e]=xe.resolve(t)},load:function(r,o){var i='Script at URL "'+o+'" failed to load',a='Script at URL "'+o+"\" did not call `tinymce.Resource.add('"+r+"', data)` within 1 second";if(void 0!==n[r])return n[r];var e=new xe(function(e,t){var n=function(e,t,n){void 0===n&&(n=1e3);var r=!1,o=null,i=function(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r||(r=!0,null!==o&&(clearTimeout(o),o=null),n.apply(null,e))}},a=i(e),u=i(t);return{reject:u,resolve:a,start:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r||(o=setTimeout(function(){return u.apply(null,e)},n))}}}(e,t);u[r]=n.resolve,tinymce.ScriptLoader.loadScripts([o],function(){return n.start(a)},function(){return n.reject(i)})});return n[r]=e}}},fv={loadScript:function(e,t){return tinymce.Resource||lv(),tinymce.Resource.load(e,t)}},dv={nodeToString:function(e){var t=document.createElement("div");t.appendChild(e.cloneNode(!0));var n=t.innerHTML;return t=e=null,n},restoreStyleAttrs:function(e){B(H(e.getElementsByTagName("*"),xt.fromDom),function(e){yt(e,"data-mce-style")&&!yt(e,"style")&&gt(e,"style",ht(e,"data-mce-style"))})}},mv=function(e,t,n){if(r=e,!1!==tinymce.Env.iOS||"function"!=typeof(null==r?void 0:r.setData))return!1;try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",n),e.setData(vr.internalHtmlMime(),t),!0}catch(e){return!1}var r},pv=function(e,t,n,r){mv(e.clipboardData,t.html,t.text)?(e.preventDefault(),r()):n(t.html,r)},gv=function(a){return function(e,t){var n=a.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),r=a.dom.create("div",{contenteditable:"true","data-mce-bogus":"all"},e);a.dom.setStyles(n,{position:"fixed",top:"50%",left:"-3000px",width:"1000px",overflow:"hidden"}),n.appendChild(r),a.dom.add(a.getBody(),n);var o=a.selection.getRng();r.focus();var i=a.dom.createRng();i.selectNodeContents(r),a.selection.setRng(i),setTimeout(function(){a.selection.setRng(o),n.parentNode.removeChild(n),t()},0)}},vv=function(e){var t=vr.retainContentEditable(e.selection.getContent({contextual:!0}));return{html:vr.mark(t),text:e.selection.getContent({format:"text"})}},hv=function(e){return!e.selection.isCollapsed()||null!==(t=e).dom.getParent(t.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",t.getBody());var t},yv={register:function(e){var t,n;e.on("cut",(t=e,function(e){hv(t)&&pv(e,vv(t),gv(t),function(){if(lo().browser.isChrome()){var e=t.selection.getRng();tinymce.util.Delay.setEditorTimeout(t,function(){t.selection.setRng(e),t.execCommand("Delete")},0)}else t.execCommand("Delete")})})),e.on("copy",(n=e,function(e){hv(n)&&pv(e,vv(n),gv(n),T)}))}},bv=xr("url","html"),Tv=function(e){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(e)},xv=Tv,Ev=function(e){return Tv(e)&&/.(gif|jpe?g|png)$/.test(e)},wv=function(n){var e=/^<a href="([^"]+)">([^<]+)<\/a>$/.exec(n);return O.from(e).bind(function(e){var t=bv(e[1],n);return Za(e[1]===e[2],t)})},Sv=function(e,t,n){return"extra"in e.undoManager?(e.undoManager.extra(function(){_v(e,t)},n),O.some(!0)):O.none()},_v=function(e,t){return e.insertContent(t,{merge:!1!==e.settings.paste_merge_formats,paste:!0}),O.some(!0)},Nv={until:function(t,n,e){return Ja(e,function(e){return e(t,n)})},linkSelection:function(r,e){return wv(e).bind(function(e){var t,n;return!1===r.selection.isCollapsed()&&xv(e.url())?Sv(t=r,(n=e).html(),function(){t.execCommand("mceInsertLink",!1,n.url())}):O.none()})},insertImage:function(r,e){return wv(e).bind(function(e){return Ev(e.url())?Sv(t=r,(n=e).html(),function(){t.insertContent('<img src="'+n.url()+'">')}):O.none();var t,n})},insertContent:_v};var Lv={showDialog:function(e,t){var n={title:"Error",body:{type:"panel",items:[{type:"htmlpanel",name:"errorpanel",html:t}]},initialData:{},buttons:[{text:"OK",type:"cancel",name:"ok",primary:!0}]};e.windowManager.open(n)}},Iv={init:function(){var r=Cr([{text:"Close",name:"close",type:"custom",primary:!0}]),o=Cr({});return{setButtons:function(e){var n={},t=H(e,function(e){var t=e.text;return n[t.toLowerCase()]=e.click,{text:t,name:t.toLowerCase(),type:"custom"}});o.set(n),r.set(t)},getButtons:r.get,getAction:function(e){var t=o.get();return t.hasOwnProperty(e)?O.some(t[e]):O.none()}}}};function Av(c,l,e,t,f,d){var n,r,m=cv(),p=sv(),g=(n=t?t.jsUrl:e,r="/js",n.replace(/\/$/,"")+"/"+r.replace(/^\//,"")),v=function(e,t,n){var r,o=Q(e)?[Nv.linkSelection,Nv.insertImage]:[];Nv.until(e,t,o.concat([(r=n,function(e,t){return e.undoManager.transact(function(){Nv.insertContent(e,t),dv.restoreStyleAttrs(e.getBody()),f.prepareImages(r)}),O.some(!0)})]))},h=function(){p.on(function(e){return c.selection.moveToBookmark(e)}),p.clear()},y=sm(function(e){return vr.isMarked(e,!0)}),b=re(c);c.on("init",function(){var s,a,e,t={baseUrl:g,cacheSuffix:c.settings.cache_suffix,officeStyles:c.settings.powerpaste_word_import||cr.officeStyles,htmlStyles:c.settings.powerpaste_html_import||cr.htmlStyles,translations:wt.translate,allowLocalImages:!1!==c.settings.powerpaste_allow_local_images,pasteBinAttrs:{"data-mce-bogus":"all"},intraFlag:{isMarked:vr.isMarked,findClipboardTags:function(e){var t=W(e,function(e){return ft(e)&&eo(Rl(e),vr.internalHtmlMime())});return t.length?O.some(t):O.none()}},keepSrc:te(c),cleanFilteredInlineElements:ne(c),sanitizer:y,tabSpaces:b},n=d?(a=c,{createDialog:function(){var n="",r=null,o=Iv.init(),t=qo.create({close:Wo([])}),i=function(e){t.trigger.close()};return{events:t.registry,setTitle:function(e){return n=e},setContent:function(e){return r=e},setButtons:function(e){o.setButtons(e)},show:function(){var e=dv.nodeToString(r.dom()),t={title:n,body:{type:"panel",items:[{type:"htmlpanel",name:"contentPanel",html:e}]},initialData:{},buttons:o.getButtons(),onCancel:i,onAction:function(t,e){o.getAction(e.name).each(function(e){return e(t)}),t.close()}};a.windowManager.open(t)},destroy:T,reflow:function(){}}}}):(s=c,{createDialog:function(){var r,o="",i="",a=[],u=null,t=qo.create({close:Wo([])}),c=function(e){t.trigger.close()},e=function(){r.off("close",c),r.close("close")};return{events:t.registry,setTitle:function(e){o=e},setContent:function(e){var t=dv.nodeToString(e.dom());i=[{type:"container",html:t}],u=e},setButtons:function(e){var r=[];e.forEach(function(e,t,n){r.push({text:e.text,ariaLabel:e.text,onclick:e.click})}),a=r},show:function(){0===a.length&&(a=[{text:"Close",onclick:function(){r.close()}}]);var e={title:o,spacing:10,padding:10,minWidth:300,minHeight:100,layout:"flex",items:i,buttons:a};r=s.windowManager.open(e);var t=xt.fromDom(r.getEl()),n=Ki(t,"."+ht(u,"class")).getOrDie("We must find this element or we cannot continue");oa(n,u),da(n),r.on("close",c)},hide:function(){e()},destroy:function(){e()},reflow:function(){}}}}),r=xt.fromDom(c.getBody()),o=uv(r,n.createDialog,T,t,fv),i=(void 0===(e=y)&&(e=lm),Bm([Kg(b)],Xg(),e));B([o,i],function(e){e.events.cancel.bind(function(){h()}),e.events.error.bind(function(e){h(),c.notificationManager?c.notificationManager.open({text:wt.translate(e.message()),type:"error"}):(d?Lv:za).showDialog(c,wt.translate(e.message()))}),e.events.insert.bind(function(e){var t=H(e.elements(),function(e){return dv.nodeToString(e.dom())}).join(""),n=vr.restoreContentEditable(t);c.focus(),f.importImages(e.assets()).get(function(){h(),v(c,br.process(c,n,e.isInternal(),e.source(),e.mode()),e.assets()),ee(c)&&f.uploadImages(e.assets())})})}),c.addCommand("mceInsertClipboardContent",function(e,t){void 0!==t.content?o.pasteCustom(Rm(t.content,y)):void 0!==t.text&&i.pasteCustom(Fm(t.text,y))});var u=wo(r,"paste",function(e){p.isSet()||p.set(c.selection.getBookmark(1)),(l.isText()?i:o).paste(e.raw()),l.reset()});m.set(u),yv.register(c)}),c.on("remove",function(){m.clear()})}var Ov,Dv=function(e){return tinymce.util.VK.metaKeyPressed(e)&&86===e.keyCode&&e.shiftKey};function Cv(u){return c(tinymce,"4.0.28")?(t.error('The "powerpaste" plugin requires at least 4.0.28 version of TinyMCE.'),function(){}):function(n,e){var t,r=!c(tinymce,"5.0.0"),o=function(t,n){var r=Cr(Z(t)),o=Cr(!1);t.on("keydown",function(e){Dv(e)&&(o.set(!0),tinymce.Env.ie&&tinymce.Env.ie<10&&(e.preventDefault(),t.fire("paste",{})))});var i=function(){var e=!r.get();r.set(e),t.fire("PastePlainTextToggle",{state:e}),t.focus()};return{buttonToggle:function(e){var t=!r.get();n?e.setActive(t):this.active(t),i()},toggle:i,reset:function(){o.set(!1)},isText:function(){return o.get()||r.get()}}}(n,r),i=function(t){t.setActive(o.isText());var e=function(e){t.setActive(e.state)};return n.on("PastePlainTextToggle",e),function(){return n.off("PastePlainTextToggle",e)}},a=function(){var t=this;t.active(o.isText()),n.on("PastePlainTextToggle",function(e){t.active(e.state)})};tinymce.Env.ie&&tinymce.Env.ie<10?function(t,e,n){var r,o,i=this,a=fr(t,wt.translate,!1),u=function(t){return function(e){t(e)}};r=Xa.getOnPasteFunction(t,a.showDialog,e),t.on("paste",u(r)),o=Xa.getOnKeyDownFunction(t,a.showDialog,e),t.on("keydown",u(o)),t.addCommand("mceInsertClipboardContent",function(e,t){a.showDialog(t.content||t)}),t.settings.paste_preprocess&&t.on("PastePreProcess",function(e){t.settings.paste_preprocess.call(i,i,e)})}(n,o):(t=Ga(n),Av(n,o,e,u,t,r),X(n)?ie(n):Tr(n,0,0,t,r)),br.registerEvents(n),r?(n.ui.registry.addToggleButton("pastetext",{icon:"paste-text",tooltip:"Paste as text",onAction:o.buttonToggle,onSetup:i}),n.ui.registry.addToggleMenuItem("pastetext",{icon:"paste-text",text:"Paste as text",selectable:!0,onAction:o.buttonToggle,onSetup:i})):(n.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:o.buttonToggle,onPostRender:a}),n.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,onclick:o.buttonToggle,onPostRender:a})),s.register(n,o)}}tinymce.PluginManager.requireLangPack("powerpaste","ar,bg_BG,ca,cs,da,de,el,es,eu,fa,fi,fr_FR,he_IL,hr,hu_HU,id,it,ja,kk,ko_KR,nb_NO,nl,pl,pt_BR,pt_PT,ro,ru,sk,sl_SI,sv_SE,th_TH,tr,uk,zh_CN,zh_TW"),tinymce.PluginManager.add("powerpaste",Cv(Ov))}(window);
8
+ !function(){"use strict";function e(r){return function(e){return n=typeof(t=e),(null===t?"null":"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n)===r;var t,n}}function t(t){return function(e){return typeof e===t}}function c(e){return null==e}function v(e){return!c(e)}function S(){}function s(n,r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n(r.apply(null,e))}}function b(e){return function(){return e}}function o(e){return e}function r(e,t){return e===t}var n,O=e("string"),d=e("object"),l=e("array"),i=t("boolean"),I=function(e){return n===e},g=t("function"),a=t("number");function A(r){for(var o=[],e=1;e<arguments.length;e++)o[e-1]=arguments[e];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=o.concat(e);return r.apply(null,n)}}function C(e){return function(){throw new Error(e)}}function D(e){return e()}function u(e){return parseInt(e,10)}function f(e,t){var n=e-t;return 0==n?0:0<n?1:-1}function m(e,t,n){return{major:e,minor:t,patch:n}}function p(e){var t=/([0-9]+)\.([0-9]+)\.([0-9]+)(?:(\-.+)?)/.exec(e);return t?m(u(t[1]),u(t[2]),u(t[3])):m(0,0,0)}function h(e){return p([e.majorVersion,e.minorVersion].join(".").split(".").slice(0,3).join("."))}function k(e,t){return e&&-1===function(e,t){var n=f(e.major,t.major);if(0!==n)return n;var r=f(e.minor,t.minor);if(0!==r)return r;var o=f(e.patch,t.patch);return 0!==o?o:0}(h(e),p(t))}function y(){return T}var x=b(!1),w=b(!(n=void 0)),T={fold:function(e,t){return e()},isSome:x,isNone:w,getOr:o,getOrThunk:L,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:b(null),getOrUndefined:b(void 0),or:o,orThunk:L,map:y,each:S,bind:y,exists:x,forall:w,filter:function(){return T},toArray:function(){return[]},toString:b("none()")};function L(e){return e()}function E(e,t){return-1<ie.call(e,t)}function _(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return!0;return!1}function N(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r}function P(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function R(e,t){for(var n=[],r=[],o=0,i=e.length;o<i;o++){var a=e[o];(t(a,o)?n:r).push(a)}return{pass:n,fail:r}}function M(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r)&&n.push(i)}return n}function F(e,n,r){return P(e,function(e,t){r=n(r,e,t)}),r}function j(e,t){return function(e,t,n){for(var r=0,o=e.length;r<o;r++){var i=e[r];if(t(i,r))return re.some(i);if(n(i,r))break}return re.none()}(e,t,x)}function U(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return re.some(n);return re.none()}function H(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!l(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);ae.apply(t,e[n])}return t}function W(e,t){return H(N(e,t))}function B(e,t){for(var n=0,r=e.length;n<r;++n)if(!0!==t(e[n],n))return!1;return!0}function z(e,t){for(var n={},r=0,o=e.length;r<o;r++){var i=e[r];n[String(i)]=t(i,r)}return n}function $(e){return 0<e.length?re.some(e[0]):re.none()}function q(e,t){for(var n=0;n<e.length;n++){var r=t(e[n],n);if(r.isSome())return r}return re.none()}function V(e){return O(e)&&E(["clean","merge","prompt"],e)}function G(e,t,n){var r=e.getParam(t,n);return g(r)||V(r)?r:n}function K(e){return e.getParam("images_upload_url")}function X(e){return e.getParam("automatic_uploads",!0,"boolean")}function J(e){return e.getParam("paste_preprocess")}function Y(e){return G(e,"powerpaste_word_import","prompt")}function Z(e){return G(e,"powerpaste_html_import","clean")}function Q(e){return!1!==e.getParam("paste_merge_formats")}function ee(e){return tinymce.explode(e.getParam("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string"))}function te(e,t){e.dom.bind(t,"drop dragstart dragend dragover dragenter dragleave dragdrop draggesture",function(e){e.preventDefault(),e.stopImmediatePropagation()})}var ne=function(n){function e(){return o}function t(e){return e(n)}var r=b(n),o={fold:function(e,t){return t(n)},isSome:w,isNone:x,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:e,orThunk:e,map:function(e){return ne(e(n))},each:function(e){e(n)},bind:t,exists:t,forall:t,filter:function(e){return e(n)?o:T},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},re={some:ne,none:y,from:function(e){return null==e?T:ne(e)}},oe=Array.prototype.slice,ie=Array.prototype.indexOf,ae=Array.prototype.push,ue=function(){return(ue=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function ce(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||((r=r||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(r||t)}function se(e,t){for(var n=be(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i)}}function le(e,n){return we(e,function(e,t){return{k:t,v:n(e,t)}})}function fe(e,t){var n={},r=t,o=n,i=function(e,t){o[t]=e},a=S;return se(e,function(e,t){(r(e,t)?i:a)(e,t)}),n}function de(e,n){var r=[];return se(e,function(e,t){r.push(n(e,t))}),r}function me(e){return be(e).length}function pe(e,t){return Te(e,t)?re.from(e[t]):re.none()}function ge(a){if(!l(a))throw new Error("cases must be an array");if(0===a.length)throw new Error("there must be at least one case");var u=[],n={};return P(a,function(e,r){var t=be(e);if(1!==t.length)throw new Error("one and only one name per case");var o=t[0],i=e[o];if(void 0!==n[o])throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!l(i))throw new Error("case arguments must be an array");u.push(o),n[o]=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=n.length;if(t!==i.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+i.length+" ("+i+"), got "+t);return{fold:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length!==a.length)throw new Error("Wrong number of arguments to fold. Expected "+a.length+", got "+e.length);return e[r].apply(null,n)},match:function(e){var t=be(e);if(u.length!==t.length)throw new Error("Wrong number of arguments to match. Expected: "+u.join(",")+"\nActual: "+t.join(","));if(!B(u,function(e){return E(t,e)}))throw new Error("Not all branches were specified when using match. Specified: "+t.join(", ")+"\nRequired: "+u.join(", "));return e[o].apply(null,n)},log:function(e){console.log(e,{constructors:u,constructor:o,params:n})}}}}),n}var ve,he,ye,be=Object.keys,xe=Object.hasOwnProperty,we=function(e,r){var o={};return se(e,function(e,t){var n=r(e,t);o[n.k]=n.v}),o},Te=function(e,t){return xe.call(e,t)},Ie=ge([{blob:["id","imageresult","objurl"]},{url:["id","url","raw"]}]),Se=ue({cata:function(e,t,n){return e.fold(t,n)}},Ie),Oe={},Ae={exports:Oe};function Ce(e){setTimeout(function(){throw e},0)}function De(e){return a=e,ze(function(r){var o=[],i=0;0===a.length?r([]):P(a,function(e,t){var n;e.get((n=t,function(e){o[n]=e,++i>=a.length&&r(o)}))})});var a}function ke(e){var t=(new Date).getTime();return e+"_"+Math.floor(1e9*Math.random())+ ++qe+String(t)}function Le(e,t){return Ge(document.createElement("canvas"),e,t)}function Ee(e){var t=Le(e.width,e.height);return Ve(t).drawImage(e,0,0),t}function _e(e){return e.naturalWidth||e.width}function Ne(e){return e.naturalHeight||e.height}ve=Oe,he=Ae,ye=void 0,function(e){"object"==typeof ve&&void 0!==he?he.exports=e():("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=e()}(function(){return function i(a,u,c){function s(t,e){if(!u[t]){if(!a[t]){var n="function"==typeof ye;if(!e&&n)return n(t,!0);if(l)return l(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var o=u[t]={exports:{}};a[t][0].call(o.exports,function(e){return s(a[t][1][e]||e)},o,o.exports,i,a,u,c)}return u[t].exports}for(var l="function"==typeof ye,e=0;e<c.length;e++)s(c[e]);return s}({1:[function(e,t,n){var r,o,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{o="function"==typeof clearTimeout?clearTimeout:u}catch(e){o=u}}();var s,l=[],f=!1,d=-1;function m(){f&&s&&(f=!1,s.length?l=s.concat(l):d=-1,l.length&&p())}function p(){if(!f){var e=c(m);f=!0;for(var t=l.length;t;){for(s=l,l=[];++d<t;)s&&s[d].run();d=-1,t=l.length}s=null,f=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===u||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function v(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new g(e,t)),1!==l.length||f||c(p)},g.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(e,f,t){!function(t){function r(){}function i(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],l(e,this)}function o(n,r){for(;3===n._state;)n=n._value;0!==n._state?(n._handled=!0,i._immediateFn(function(){var e,t=1===n._state?r.onFulfilled:r.onRejected;if(null!==t){try{e=t(n._value)}catch(e){return void u(r.promise,e)}a(r.promise,e)}else(1===n._state?a:u)(r.promise,n._value)})):n._deferreds.push(r)}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof i)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void l((r=n,o=e,function(){r.apply(o,arguments)}),t)}t._state=1,t._value=e,c(t)}catch(e){u(t,e)}var r,o}function u(e,t){e._state=2,e._value=t,c(e)}function c(e){2===e._state&&0===e._deferreds.length&&i._immediateFn(function(){e._handled||i._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)o(e,e._deferreds[t]);e._deferreds=null}function s(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function l(e,t){var n=!1;try{e(function(e){n||(n=!0,a(t,e))},function(e){n||(n=!0,u(t,e))})}catch(e){if(n)return;n=!0,u(t,e)}}var n=setTimeout;i.prototype.catch=function(e){return this.then(null,e)},i.prototype.then=function(e,t){var n=new this.constructor(r);return o(this,new s(e,t,n)),n},i.all=function(e){var u=Array.prototype.slice.call(e);return new i(function(o,i){if(0===u.length)return o([]);for(var a=u.length,e=0;e<u.length;e++)!function t(n,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var r=e.then;if("function"==typeof r)return r.call(e,function(e){t(n,e)},i),0}u[n]=e,0==--a&&o(u)}catch(e){i(e)}}(e,u[e])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(e){e(t)})},i.reject=function(n){return new i(function(e,t){t(n)})},i.race=function(o){return new i(function(e,t){for(var n=0,r=o.length;n<r;n++)o[n].then(e,t)})},i._immediateFn="function"==typeof t?function(e){t(e)}:function(e){n(e,0)},i._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},i._setImmediateFn=function(e){i._immediateFn=e},i._setUnhandledRejectionFn=function(e){i._unhandledRejectionFn=e},void 0!==f&&f.exports?f.exports=i:this.Promise||(this.Promise=i)}.call(this,e("timers").setImmediate)},{timers:3}],3:[function(c,e,s){!function(e,t){var r=c("process/browser.js").nextTick,n=Function.prototype.apply,o=Array.prototype.slice,i={},a=0;function u(e,t){this._id=e,this._clearFn=t}s.setTimeout=function(){return new u(n.call(setTimeout,window,arguments),clearTimeout)},s.setInterval=function(){return new u(n.call(setInterval,window,arguments),clearInterval)},s.clearTimeout=s.clearInterval=function(e){e.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},s.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},s.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},s._unrefActive=s.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},s.setImmediate="function"==typeof e?e:function(e){var t=a++,n=!(arguments.length<2)&&o.call(arguments,1);return i[t]=!0,r(function(){i[t]&&(n?e.apply(null,n):e.call(null),s.clearImmediate(t))}),t},s.clearImmediate="function"==typeof t?t:function(e){delete i[e]}}.call(this,c("timers").setImmediate,c("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(e,t,n){var r=e("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();t.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)});var Pe,Re,Me,Fe,je,Ue=Ae.exports.boltExport,He=function(e){function r(e){o()?i(e):t.push(e)}var n=re.none(),t=[],o=function(){return n.isSome()},i=function(t){n.each(function(e){setTimeout(function(){t(e)},0)})};return e(function(e){o()||(n=re.some(e),P(t,i),t=[])}),{get:r,map:function(n){return He(function(t){r(function(e){t(n(e))})})},isReady:o}},We={nu:He,pure:function(t){return He(function(e){e(t)})}},Be=function(n){function e(e){n().then(e,Ce)}return{map:function(e){return Be(function(){return n().then(e)})},bind:function(t){return Be(function(){return n().then(function(e){return t(e).toPromise()})})},anonBind:function(e){return Be(function(){return n().then(function(){return e.toPromise()})})},toLazy:function(){return We.nu(e)},toCached:function(){var e=null;return Be(function(){return e=null===e?n():e})},toPromise:n,get:e}},ze=function(e){return Be(function(){return new Ue(e)})},$e=function(e){return Be(function(){return Ue.resolve(e)})},qe=0,Ve=function(e){return e.getContext("2d")},Ge=function(e,t,n){return e.width=t,e.height=n,e},Ke=window.Promise||(Pe=window,Re=Xe.immediateFn||"function"==typeof Pe.setImmediate&&Pe.setImmediate||function(e){return setTimeout(e,1)},Me=function(n,r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.apply(r,e)}},Fe=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},je=function(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(e){if(r)return;r=!0,n(e)}},Xe.prototype.catch=function(e){return this.then(null,e)},Xe.prototype.then=function(n,r){var o=this;return new Xe(function(e,t){Je.call(o,new et(n,r,e,t))})},Xe.all=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var u=Array.prototype.slice.call(1===e.length&&Fe(e[0])?e[0]:e);return new Xe(function(r,o){if(0===u.length)return r([]);for(var i=u.length,a=function(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){a(t,e)},o)}u[t]=e,0==--i&&r(u)}catch(e){o(e)}},e=0;e<u.length;e++)a(e,u[e])})},Xe.resolve=function(t){return t&&"object"==typeof t&&t.constructor===Xe?t:new Xe(function(e){e(t)})},Xe.reject=function(n){return new Xe(function(e,t){t(n)})},Xe.race=function(o){return new Xe(function(e,t){for(var n=0,r=o;n<r.length;n++)r[n].then(e,t)})},Xe);function Xe(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],je(e,Me(Ye,this),Me(Ze,this))}function Je(n){var r=this;null!==this._state?Re(function(){var e,t=r._state?n.onFulfilled:n.onRejected;if(null!==t){try{e=t(r._value)}catch(e){return void n.reject(e)}n.resolve(e)}else(r._state?n.resolve:n.reject)(r._value)}):this._deferreds.push(n)}function Ye(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void je(Me(t,e),Me(Ye,this),Me(Ze,this))}this._state=!0,this._value=e,Qe.call(this)}catch(e){Ze.call(this,e)}}function Ze(e){this._state=!1,this._value=e,Qe.call(this)}function Qe(){for(var e=0,t=this._deferreds;e<t.length;e++){var n=t[e];Je.call(this,n)}this._deferreds=[]}function et(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}function tt(e){var t=e.split(","),n=/data:([^;]+)/.exec(t[0]);if(!n)return re.none();for(var r=n[1],o=t[1],i=atob(o),a=i.length,u=Math.ceil(a/1024),c=new Array(u),s=0;s<u;++s){for(var l=1024*s,f=Math.min(1024+l,a),d=new Array(f-l),m=l,p=0;m<f;++p,++m)d[p]=i[m].charCodeAt(0);c[s]=new Uint8Array(d)}return re.some(new Blob(c,{type:r}))}function nt(e,r,o){return r=r||"image/png",g(HTMLCanvasElement.prototype.toBlob)?new Ke(function(t,n){e.toBlob(function(e){e?t(e):n()},r,o)}):Mt(e.toDataURL(r,o))}function rt(e){return u=e,new Ke(function(e,t){function n(){o.removeEventListener("load",i),o.removeEventListener("error",a)}var r=URL.createObjectURL(u),o=new Image,i=function(){n(),e(o)},a=function(){n(),t("Unable to load data of type "+u.type+": "+r)};o.addEventListener("load",i),o.addEventListener("error",a),o.src=r,o.complete&&setTimeout(i,0)}).then(function(e){Ft(e);var t=Le(_e(e),Ne(e));return Ve(t).drawImage(e,0,0),t});var u}function ot(n){return new Ke(function(e){var t=new FileReader;t.onloadend=function(){e(t.result)},t.readAsDataURL(n)})}function it(e,t,n){function r(t,n){return e.then(function(e){return e.toDataURL(t||"image/png",n)})}return{getType:b(t.type),toBlob:function(){return Ke.resolve(t)},toDataURL:b(n),toBase64:function(){return n.split(",")[1]},toAdjustedBlob:function(t,n){return e.then(function(e){return nt(e,t,n)})},toAdjustedDataURL:r,toAdjustedBase64:function(e,t){return r(e,t).then(function(e){return e.split(",")[1]})},toCanvas:function(){return e.then(Ee)}}}function at(t,e){return nt(t,e).then(function(e){return it(Ke.resolve(t),e,t.toDataURL())})}function ut(e,t){return r=t,it(rt(n=e),n,r);var n,r}function ct(e){return(0===(t=e.src).indexOf("data:")?Mt:Rt)(t).then(function(e){return ot(t=e).then(function(e){return it(rt(t),t,e)});var t});var t}function st(e,t,n){return void 0===t&&void 0===n?Ht(e):e.toAdjustedBlob(t,n)}function lt(e){return e.toDataURL()}function ft(e){var t=URL.createObjectURL(e);return Wt(e,t)}function dt(e){return De(N(e,ft))}function mt(e,t,n){return""===t||e.length>=t.length&&e.substr(n,n+t.length)===t}function pt(e,t){return Bt(e,t)?(n=t.length,e.substring(n)):e;var n}function gt(e,t){return zt(e,t)?(n=t.length,e.substring(0,e.length-n)):e;var n}function vt(e,t){return-1!==e.indexOf(t)}function ht(e,i){return function(e){for(var t,n,r=void 0!==i?i:qt,o=0;o<e.length;++o)void 0!==(t=r)[n=e[o]]&&null!==t[n]||(t[n]={}),r=t[n];return r}(e.split("."))}function yt(e){return e.dom.nodeName.toLowerCase()}function bt(e){return e.dom.nodeType}function xt(t){return function(e){return bt(e)===t}}function wt(e){return 8===bt(e)||"#comment"===yt(e)}function Tt(t){return function(e){return Vt(e)&&yt(e)===t}}function It(e,t,n){if(!(O(n)||i(n)||a(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")}function St(e,t,n){It(e.dom,t,n)}function Ot(e,t){var n=e.dom;se(t,function(e,t){It(n,t,e)})}function At(e,t){var n=e.dom.getAttribute(t);return null===n?void 0:n}function Ct(e,t){return re.from(At(e,t))}function Dt(e,t){var n=e.dom;return!(!n||!n.hasAttribute)&&n.hasAttribute(t)}function kt(e,t){e.dom.removeAttribute(t)}function Lt(){return'Safari does not support direct paste of images. <a href="https://support.ephox.com/entries/88543243-Safari-Direct-paste-of-images-does-not-work" style="text-decoration: underline">More information on image pasting for Safari</a>'}function Et(e){return tinymce.translate(Yt[e])}function _t(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}}var Nt,Pt,Rt=function(r){return new Ke(function(e,t){var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="blob",n.onload=function(){200===this.status&&e(this.response)},n.onerror=function(){var e;t(0===this.status?((e=new Error("No access to download image")).code=18,e.name="SecurityError",e):new Error("Error "+this.status+" downloading image"))},n.send()})},Mt=function(n){return new Ke(function(e,t){tt(n).fold(function(){t("uri is not base64: "+n)},e)})},Ft=function(e){URL.revokeObjectURL(e.src)},jt=ot,Ut=tt,Ht=function(e){return e.toBlob()},Wt=function(i,a){return ze(function(o){jt(i).then(function(e){var t=ut(i,e),n=ke("image"),r=Se.blob(n,t,a);o(r)})})},Bt=function(e,t){return mt(e,t,0)},zt=function(e,t){return mt(e,t,e.length-t.length)},$t=(Nt=/^\s+|\s+$/g,function(e){return e.replace(Nt,"")}),qt="undefined"!=typeof window?window:Function("return this;")(),Vt=xt(1),Gt=xt(3),Kt=xt(9),Xt=xt(11),Jt={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return _t(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return _t(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return _t(n)},fromDom:_t,fromPoint:function(e,t,n){return re.from(e.dom.elementFromPoint(t,n)).map(_t)}},Yt={"cement.dialog.paste.title":"Paste Formatting Options","cement.dialog.paste.instructions":"Choose to keep or remove formatting in the pasted content.","cement.dialog.paste.merge":"Keep formatting","cement.dialog.paste.clean":"Remove formatting","safari.imagepaste":Lt(),"webview.imagepaste":Lt(),"error.code.images.not.found":"The images service was not found: (","error.imageupload":"Image failed to upload: (","error.full.stop":").","errors.local.images.disallowed":"Local image paste has been disabled. Local images have been removed from pasted content.","errors.imageimport.failed":"Some images failed to import.","errors.imageimport.unsupported":"Unsupported image type.","errors.imageimport.invalid":"Image is invalid."},Zt=Object.hasOwnProperty,Qt=Object.setPrototypeOf,en=Object.isFrozen,tn=Object.getPrototypeOf,nn=Object.getOwnPropertyDescriptor,rn=Object.freeze,on=Object.seal,an=Object.create,un="undefined"!=typeof Reflect&&Reflect,cn=un.apply||function(e,t,n){return e.apply(t,n)},rn=rn||function(e){return e},on=on||function(e){return e},sn=un.construct||function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))))},ln=xn(Array.prototype.forEach),fn=xn(Array.prototype.pop),dn=xn(Array.prototype.push),mn=xn(String.prototype.toLowerCase),pn=xn(String.prototype.match),gn=xn(String.prototype.replace),vn=xn(String.prototype.indexOf),hn=xn(String.prototype.trim),yn=xn(RegExp.prototype.test),bn=(Pt=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return sn(Pt,t)});function xn(o){return function(e){for(var t=arguments.length,n=Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return cn(o,e,n)}}function wn(e,t){Qt&&Qt(e,null);for(var n=t.length;n--;){var r,o=t[n];"string"!=typeof o||(r=mn(o))!==o&&(en(t)||(t[n]=r),o=r),e[o]=!0}return e}function Tn(e){var t=an(null),n=void 0;for(n in e)cn(Zt,e,[n])&&(t[n]=e[n]);return t}function In(e,t){for(;null!==e;){var n=nn(e,t);if(n){if(n.get)return xn(n.get);if("function"==typeof n.value)return xn(n.value)}e=tn(e)}return function(e){return console.warn("fallback value for",e),null}}var Sn=rn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),On=rn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),An=rn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Cn=rn(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Dn=rn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),kn=rn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ln=rn(["#text"]),En=rn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),_n=rn(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Nn=rn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Pn=rn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Rn=on(/\{\{[\s\S]*|[\s\S]*\}\}/gm),Mn=on(/<%[\s\S]*|[\s\S]*%>/gm),Fn=on(/^data-[\-\w.\u00B7-\uFFFF]/),jn=on(/^aria-[\-\w]+$/),Un=on(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Hn=on(/^(?:\w+script|data):/i),Wn=on(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function zn(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function $n(n){return{sanitizeHtml:function(e,t){return n(e)?e:function(e){Tr.addHook("uponSanitizeElement",function(e,t){E(Ir,t.tagName)||Te(t.allowedTags,t.tagName)||(t.allowedTags[t.tagName]=!0)}),Tr.addHook("uponSanitizeAttribute",function(e,t){0===t.attrName.indexOf("on")||Te(t.allowedAttributes,t.attrName)||(t.allowedAttributes[t.attrName]=!0),t.attrValue&&-1!==t.attrValue.indexOf("\n")&&(t.attrValue=t.attrValue.replace(/\r?\n/g,""))});var t=Bt($t(e),"<!"),n=t?"<body>"+e+"</body>":e.replace(/^[\S\s]*?(<!DOCTYPE|<html)/i,"$1"),r=Tr.sanitize(n,{ALLOW_UNKNOWN_PROTOCOLS:!0,FORBID_TAGS:Ir,WHOLE_DOCUMENT:-1!==e.lastIndexOf("</html>")});return Tr.removeHook("uponSanitizeElement"),Tr.removeHook("uponSanitizeAttribute"),t?gt(pt(r,"<body>"),"</body>"):r}(e)},sanitizeText:o}}function qn(e){return-1!==e.indexOf(Cr)}function Vn(e,t){var n=new tinymce.html.DomParser({},e.schema).parse(t,{forced_root_block:!1,isRootContent:!0});return new tinymce.html.Serializer({validate:!0},e.schema).serialize(n)}function Gn(e){var n=$n(qn),r={sanitizeHtml:A(Vn,e),sanitizeText:o};return{sanitizeText:n.sanitizeText,sanitizeHtml:function(e,t){return(qn(e)?r:n).sanitizeHtml(e,t)}}}function Kn(e){(n=document.createElement("div")).appendChild(e.cloneNode(!0));var t=n.innerHTML,n=e=null;return t}function Xn(e,t){return function(){return e.apply(t,arguments)}}function Jn(e){"undefined"!=typeof console&&console.log&&console.log(e)}function Yn(t,e,n){return function(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return tinymce.each(Array.prototype.slice.call(arguments,1),function(e){for(var t in e)n[t]=e[t]}),n}(function(e){if(t&&"string"!=typeof t)return t;switch(t){case"clean":return Lr;case"merge":return Er;default:return e}}(e),{base_64_images:n})}function Zn(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}function Qn(i,e,t){var n,r,o,a,u,c,s,l,f,d;switch(i.nodeType){case 1:e?n=Nr:(n=_r,a=Mr(i),u={},c=i,s=function(e,t){u[e]=t},null!=(d=t||c.getAttribute("style"))&&d.split||(d=c.style.cssText),Dr(d.split(";"),function(e){var t=e.indexOf(":");0<t&&(l=(l=(l=kr(e.substring(0,t))).toUpperCase()===l?l.toLowerCase():l).replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}),f=kr(e.substring(t+1)),Fr=Fr||0===l.indexOf("mso-"),s(l,f))}),Fr||(f=c.style["mso-list"])&&s("mso-list",f)),r="HTML"!==i.scopeName&&i.scopeName&&i.tagName&&i.tagName.indexOf(":")<=0?(i.scopeName+":"+i.tagName).toUpperCase():i.tagName;break;case 3:n=Pr,o=i.nodeValue;break;case 8:n=Rr,o=i.nodeValue;break;default:Jn("WARNING: Unsupported node type encountered: "+i.nodeType)}function m(e){n===_r&&a.filter(e)}return{getNode:function(){return a&&a.getAttributes(),i},tag:function(){return r},type:function(){return n},text:function(){return o},toString:function(){return"Type: "+n+", Tag: "+r+" Text: "+o},getAttribute:function(e){return a.get(e.toLowerCase())},filterAttributes:m,filterStyles:function(r){var o;n===_r&&(o="",Dr(u,function(e,t){var n=r(t,e);null===n?(i.style.removeProperty?i.style.removeProperty(Zn(t)):i.style.removeAttribute(Zn(t)),delete u[t]):(o+=t+": "+n+"; ",u[t]=n)}),o=o||null,m(function(e,t){return"style"===e?o:t}),i.style.cssText=o)},getAttributeCount:function(){return a.getAttributeCount()},attributes:function(e){a.each(e)},getStyle:function(e){return u[e]},styles:function(n){Dr(u,function(e,t){n(t,e)})},getComputedStyle:function(){return(e=i).ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle||{};var e},isWhitespace:function(){return n===Pr&&/^[\s\u00A0]*$/.test(o)}}}function er(e,t,n,r){var o=r.createElement(e),i="";return Dr(t,function(e,t){o.setAttribute(t,e)}),Dr(n,function(e,t){i+=t+":"+e+";",o.style[Zn(t)]=e}),Qn(o,!1,""!==i?i:null)}function tr(e,t){return Qn(t.createElement(e),!0)}function nr(o){function i(e){a.appendChild(e)}var a=o.createDocumentFragment();return{dom:a,receive:function(e){var t,n,r;switch(e.type()){case _r:r=e.getNode().cloneNode(!1),i(n=r),a=n;break;case Pr:t=o.createTextNode(e.text()),i(t);break;case Nr:a=a.parentNode;break;case Rr:break;default:throw{message:"Unsupported token type: "+e.type()}}}}}function rr(p,g){return function(t,e,n){function r(){g&&g(m),l=!1,c=[],s=[]}function o(e){Dr(e,function(e){t.receive(e)})}function i(e){l?s.push(e):t.receive(e)}function a(){f(),o(s),r()}var u,c,s,l=!1,f=function(){Dr(u,function(e){i(e)}),d()},d=function(){u=[]},m={document:n||window.document,settings:e||{},emit:i,receive:function(e){g&&c.push(e),p(m,e),e===jr&&a()},startTransaction:function(){l=!0},rollback:function(){o(c),r()},commit:a,defer:function(e){(u=u||[]).push(e)},hasDeferred:function(){return u&&0<u.length},emitDeferred:f,dropDeferred:d};return r(),m}}function or(n){return rr(function(e,t){t.filterAttributes(Xn(n,e)),e.emit(t)})}function ir(e){return"A"===e.tag()||"SPAN"===e.tag()}function ar(e){var t=e.getStyle("mso-list");return t&&"skip"!==t}function ur(e,t){return e.type()===_r?0===e.getAttributeCount()||t&&1===e.getAttributeCount()&&null!==e.getAttribute("style")&&void 0!==e.getAttribute("style"):e.type()===Nr}function cr(e){if(Jr)for(var t=void 0,n=Kr.length,o=void 0,o=0;o<n;o++)(t=Kr[o])&&(t.type()===_r&&"SPAN"===t.tag()&&ur(t)?function(e){for(var t,n=1,r=o+1;r<e;r++)if((t=Kr[r])&&"SPAN"===t.tag())if(t.type()===_r)n++;else if(t.type()===Nr&&0==--n)return Kr[r]=null}(n):e.emit(t));Kr=[],Jr=!(Xr=[])}function sr(e,t){Kr.push(t),Xr=Xr||[],t.type()===_r?Xr.push(t):t.type()===Nr&&(Xr.pop(),0===Xr.length&&cr(e))}function lr(e){return!ur(e)&&!/^OLE_LINK/.test(e.getAttribute("name"))}function fr(e,t){var n={tag:e.tag,type:e.type,variant:t};return e.start&&(n.start=e.start),e.type||delete n.type,n}function dr(e,t,n){var r,o,i,a=null;return e&&(r=e.text,o=e.symbolFont),r=kr(r),(a=po[r])?a=fr(a,r):o?a=(a=mo[r])?fr(a,r):{tag:"UL",variant:r}:(Dr(fo,function(e){if(e.regex.test(r)){if(t&&go(e.type,t,!0))return(a=e.type).start=parseInt(r,10),!1;(a=a||e.type).start=parseInt(r,10)}}),a&&!a.variant&&(i="("===r.charAt(0)?"()":")"===r.charAt(r.length-1)?")":".",a=fr(a,i))),a=a&&"OL"===a.tag&&n&&("P"!==n.tag()||/^MsoHeading/.test(n.getAttribute("class")))?null:a}function mr(e,t){function n(e){var t=e.style.fontFamily;t&&(a="Wingdings"===t||"Symbol"===t)}var r,o,i,a=!1;if(e.type()===_r&&t.openedTag&&"SPAN"===e.tag()){for(n(r=t.openedTag.getNode()),1<r.childNodes.length&&"A"===r.firstChild.tagName&&""===r.firstChild.textContent&&(r=r.childNodes[1]);r.firstChild&&("SPAN"===r.firstChild.tagName||"A"===r.firstChild.tagName);)n(r=r.firstChild);return(r=r.firstChild)&&3===r.nodeType?(o=r.value,kr(o)||(o=(r=r.parentNode.nextSibling)?r.value:""),r&&kr(r.parentNode.textContent)==o&&((i=dr({text:o,symbolFont:a},null,t.originalToken))&&(r.nextSibling&&"SPAN"===r.nextSibling.tagName&&/^[\u00A0\s]/.test(r.nextSibling.firstChild.value)&&("P"===t.openedTag.tag()||"UL"===i.tag)))):r&&"IMG"===r.tagName}}function pr(i,a){function u(e,t){var n={},r={};m++,t&&e.type&&(n={"list-style-type":e.type}),e.start&&1<e.start&&(r={start:e.start}),o.push(e),i.emit(er(e.tag,r,n,a)),f=e}function c(){i.emit(tr(o.pop().tag,a)),m--,f=o[o.length-1]}function s(e,t,n){var r,o={};e?void 0!==(r=e.getStyle("margin-left"))&&(o["margin-left"]=r):o["list-style-type"]="none",f&&!go(f,t)&&(c(),n&&(i.emit(er("P",{},{},a)),i.emit(Qn(a.createTextNode("\xa0"))),i.emit(tr("P",a))),u(t,!0)),i.emit(er("LI",{},o,a)),e&&"P"!==e.tag()?(d.push(e.tag()),e.filterStyles(function(){return null}),i.emit(e)):d.push("P")}function l(){var e=d?d.pop():"P";"P"!==e&&i.emit(tr(e,a)),i.emit(tr("LI",a))}var f,o=[],d=[],m=0;return{openList:u,closelist:c,closeAllLists:function(){for(;0<m;)l(),c();i.commit()},closeItem:l,openLI:s,openItem:function(e,t,n,r){if(n){for(m=m||0;e<m;)l(),c();var o;if(n=o="UL"===(o=n).tag&&ho[e-1]===o.type?{tag:"UL"}:o,m===e)l(),s(t,n,r);else for(1<e&&0<d.length&&"P"!==d[d.length-1]&&(i.emit(tr(d[d.length-1],a)),d[d.length-1]="P");m<e;)u(n,m===e-1),s(m===e?t:void 0,n)}},getCurrentListType:function(){return f},getCurrentLevel:function(){return m}}}function gr(e,t){Jn("Unexpected token in list conversion: "+t.toString()),e.rollback()}function vr(e,t,n){n.type()===Pr&&""===kr(n.text())?e.defer(n):t.skippedPara||n.type()!==_r||"P"!==n.tag()||ar(n)?bo(e,t,n):(t.openedTag=n,e.defer(n),t.nextFilter=yo)}function hr(e,t,n){n.type()===Nr&&t.originalToken.tag()===n.tag()&&(t.nextFilter=vr,t.styleLevelAdjust=-1),e.emit(n)}function yr(e){var a,u,t;Co.nextFilter=Ao,Co.itemLevel=0,Co.originalToken=null,Co.commentMode=!1,Co.openedTag=null,Co.symbolFont=!1,Co.listType=null,Co.indentGuesser={guessIndentLevel:function(e,t,n,r){var o,i;return r&&/^([0-9]+\.)+[0-9]+\.?$/.test(r.text)?r.text.replace(/([0-9]+|\.$)/g,"").length+1:(o=u||parseInt(vo(n,t.getAttribute("class"))),i=function(e,t){for(var n=0,r=e.parentNode;null!=r&&r!==t.parentNode;)n+=r.offsetLeft,r=r.offsetParent;return n}(e.getNode(),t.getNode()),o?a?i+=a:0===i&&(i+=a=o):o=48,u=o=Math.min(i,o),Math.max(1,Math.floor(i/o))||1)}},Co.emitter=pr(e,e.document),Co.styles=(t=!1,{check:function(e){return t&&e.type()===Pr?(e.text(),!0):e.type()===_r&&"STYLE"===e.tag()?t=!0:e.type()===Nr&&"STYLE"===e.tag()&&!(t=!1)}}),Co.spanCount=[],Co.skippedPara=!1,Co.styleLevelAdjust=0,Co.bulletInfo=void 0}var br,xr,wr,Tr=function t(e){function s(e){return t(e)}var l=0<arguments.length&&void 0!==e?e:"undefined"==typeof window?null:window;if(s.version="2.2.8",s.removed=[],!l||!l.document||9!==l.document.nodeType)return s.isSupported=!1,s;var n,f=l.document,a=l.document,d=l.DocumentFragment,r=l.HTMLTemplateElement,m=l.Node,u=l.Element,o=l.NodeFilter,i=l.NamedNodeMap,c=void 0===i?l.NamedNodeMap||l.MozNamedAttrMap:i,p=l.Text,g=l.Comment,v=l.DOMParser,h=l.trustedTypes,y=u.prototype,b=In(y,"cloneNode"),x=In(y,"nextSibling"),w=In(y,"childNodes"),T=In(y,"parentNode");"function"!=typeof r||(n=a.createElement("template")).content&&n.content.ownerDocument&&(a=n.content.ownerDocument);var I=function(e,t){if("object"!==(void 0===e?"undefined":Bn(e))||"function"!=typeof e.createPolicy)return null;var n=null,r="data-tt-policy-suffix",o="dompurify"+((n=t.currentScript&&t.currentScript.hasAttribute(r)?t.currentScript.getAttribute(r):n)?"#"+n:"");try{return e.createPolicy(o,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(h,f),S=I&&re?I.createHTML(""):"",O=a,A=O.implementation,C=O.createNodeIterator,D=O.createDocumentFragment,k=f.importNode,L={};try{L=Tn(a).documentMode?a.documentMode:{}}catch(e){}var E={};function _(e){ve&&ve===e||(e=Tn(e=e&&"object"===(void 0===e?"undefined":Bn(e))?e:{}),W="ALLOWED_TAGS"in e?wn({},e.ALLOWED_TAGS):B,z="ALLOWED_ATTR"in e?wn({},e.ALLOWED_ATTR):$,le="ADD_URI_SAFE_ATTR"in e?wn(Tn(fe),e.ADD_URI_SAFE_ATTR):fe,ce="ADD_DATA_URI_TAGS"in e?wn(Tn(se),e.ADD_DATA_URI_TAGS):se,q="FORBID_TAGS"in e?wn({},e.FORBID_TAGS):{},V="FORBID_ATTR"in e?wn({},e.FORBID_ATTR):{},N="USE_PROFILES"in e&&e.USE_PROFILES,G=!1!==e.ALLOW_ARIA_ATTR,K=!1!==e.ALLOW_DATA_ATTR,X=e.ALLOW_UNKNOWN_PROTOCOLS||!1,J=e.SAFE_FOR_TEMPLATES||!1,Y=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=!1!==e.RETURN_DOM_IMPORT,re=e.RETURN_TRUSTED_TYPE||!1,Q=e.FORCE_BODY||!1,oe=!1!==e.SANITIZE_DOM,ie=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,H=e.ALLOWED_URI_REGEXP||H,ge=e.NAMESPACE||ge,J&&(K=!1),te&&(ee=!0),N&&(W=wn({},[].concat(zn(Ln))),z=[],!0===N.html&&(wn(W,Sn),wn(z,En)),!0===N.svg&&(wn(W,On),wn(z,_n),wn(z,Pn)),!0===N.svgFilters&&(wn(W,An),wn(z,_n),wn(z,Pn)),!0===N.mathMl&&(wn(W,Dn),wn(z,Nn),wn(z,Pn))),e.ADD_TAGS&&wn(W=W===B?Tn(W):W,e.ADD_TAGS),e.ADD_ATTR&&wn(z=z===$?Tn(z):z,e.ADD_ATTR),e.ADD_URI_SAFE_ATTR&&wn(le,e.ADD_URI_SAFE_ATTR),ie&&(W["#text"]=!0),Y&&wn(W,["html","head","body"]),W.table&&(wn(W,["tbody"]),delete q.tbody),rn&&rn(e),ve=e)}s.isSupported="function"==typeof T&&A&&void 0!==A.createHTMLDocument&&9!==L;var N,P=Rn,R=Mn,M=Fn,F=jn,j=Hn,U=Wn,H=Un,W=null,B=wn({},[].concat(zn(Sn),zn(On),zn(An),zn(Dn),zn(Ln))),z=null,$=wn({},[].concat(zn(En),zn(_n),zn(Nn),zn(Pn))),q=null,V=null,G=!0,K=!0,X=!1,J=!1,Y=!1,Z=!1,Q=!1,ee=!1,te=!1,ne=!0,re=!1,oe=!0,ie=!0,ae=!1,ue=wn({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ce=null,se=wn({},["audio","video","img","source","image","track"]),le=null,fe=wn({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),de="http://www.w3.org/1998/Math/MathML",me="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml",ge=pe,ve=null,he=a.createElement("form"),ye=wn({},["mi","mo","mn","ms","mtext"]),be=wn({},["foreignobject","desc","title","annotation-xml"]),xe=wn({},On);wn(xe,An),wn(xe,Cn);var we=wn({},Dn);function Te(t){dn(s.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){try{t.outerHTML=S}catch(e){t.remove()}}}function Ie(e,t){try{dn(s.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){dn(s.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!z[e])if(ee||te)try{Te(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}}function Se(e){var t,n=void 0,r=void 0;Q?e="<remove></remove>"+e:r=(t=pn(e,/^[\r\n\t ]+/))&&t[0];var o=I?I.createHTML(e):e;if(ge===pe)try{n=(new v).parseFromString(o,"text/html")}catch(e){}n&&n.documentElement||((n=A.createDocument(ge,"template",null)).documentElement.innerHTML=o);var i=n.body||n.documentElement;return e&&r&&i.insertBefore(a.createTextNode(r),i.childNodes[0]||null),Y?n.documentElement:i}function Oe(e){return C.call(e.ownerDocument||e,e,o.SHOW_ELEMENT|o.SHOW_COMMENT|o.SHOW_TEXT,function(){return o.FILTER_ACCEPT},!1)}function Ae(e){return"object"===(void 0===m?"undefined":Bn(m))?e instanceof m:e&&"object"===(void 0===e?"undefined":Bn(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName}function Ce(e,t,n){E[e]&&ln(E[e],function(e){e.call(s,t,n,ve)})}function De(e){var t;if(Ce("beforeSanitizeElements",e,null),!(e instanceof p||e instanceof g||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof c&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore))return Te(e),1;if(pn(e.nodeName,/[\u0080-\uFFFF]/))return Te(e),1;var n=mn(e.nodeName);if(Ce("uponSanitizeElement",e,{tagName:n,allowedTags:W}),!Ae(e.firstElementChild)&&(!Ae(e.content)||!Ae(e.content.firstElementChild))&&yn(/<[/\w]/g,e.innerHTML)&&yn(/<[/\w]/g,e.textContent))return Te(e),1;if(W[n]&&!q[n])return e instanceof u&&!function(e){var t=T(e);t&&t.tagName||(t={namespaceURI:pe,tagName:"template"});var n=mn(e.tagName),r=mn(t.tagName);if(e.namespaceURI===me)return t.namespaceURI===pe?"svg"===n:t.namespaceURI===de?"svg"===n&&("annotation-xml"===r||ye[r]):Boolean(xe[n]);if(e.namespaceURI===de)return t.namespaceURI===pe?"math"===n:t.namespaceURI===me?"math"===n&&be[r]:Boolean(we[n]);if(e.namespaceURI===pe&&(t.namespaceURI!==me||be[r])&&(t.namespaceURI!==de||ye[r])){var o=wn({},["title","style","font","a","script"]);return!we[n]&&(o[n]||!xe[n])}}(e)||("noscript"===n||"noembed"===n)&&yn(/<\/no(script|embed)/i,e.innerHTML)?(Te(e),1):(J&&3===e.nodeType&&(t=e.textContent,t=gn(t,P," "),t=gn(t,R," "),e.textContent!==t&&(dn(s.removed,{element:e.cloneNode()}),e.textContent=t)),Ce("afterSanitizeElements",e,null),0);if(ie&&!ue[n]){var r=T(e)||e.parentNode,o=w(e)||e.childNodes;if(o&&r)for(var i=o.length-1;0<=i;--i)r.insertBefore(b(o[i],!0),x(e))}return Te(e),1}function ke(e,t,n){if(oe&&("id"===t||"name"===t)&&(n in a||n in he))return!1;if(!(K&&yn(M,t)||G&&yn(F,t))){if(!z[t]||V[t])return!1;if(!le[t]&&!yn(H,gn(n,U,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==vn(n,"data:")||!ce[e])&&(!X||yn(j,gn(n,U,"")))&&n)return!1}return!0}function Le(e){var t,n=void 0,r=void 0;Ce("beforeSanitizeAttributes",e,null);var o=e.attributes;if(o){for(var i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z},r=o.length;r--;){var a=(t=o[r]).name,u=t.namespaceURI,n=hn(t.value),c=mn(a);if(i.attrName=c,i.attrValue=n,i.keepAttr=!0,i.forceKeepAttr=void 0,Ce("uponSanitizeAttribute",e,i),n=i.attrValue,!i.forceKeepAttr&&(Ie(a,e),i.keepAttr))if(yn(/\/>/i,n))Ie(a,e);else if(J&&(n=gn(n,P," "),n=gn(n,R," ")),ke(e.nodeName.toLowerCase(),c,n))try{u?e.setAttributeNS(u,a,n):e.setAttribute(a,n),fn(s.removed)}catch(e){}}Ce("afterSanitizeAttributes",e,null)}}return wn(we,kn),s.sanitize=function(e,t){var n,r,o=void 0,i=void 0,a=void 0;if("string"!=typeof(e=e||"\x3c!--\x3e")&&!Ae(e)){if("function"!=typeof e.toString)throw bn("toString is not a function");if("string"!=typeof(e=e.toString()))throw bn("dirty is not a string, aborting")}if(!s.isSupported){if("object"===Bn(l.toStaticHTML)||"function"==typeof l.toStaticHTML){if("string"==typeof e)return l.toStaticHTML(e);if(Ae(e))return l.toStaticHTML(e.outerHTML)}return e}if(Z||_(t),s.removed=[],!(ae="string"!=typeof e&&ae))if(e instanceof m)1===(n=(o=Se("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?o=n:o.appendChild(n);else{if(!ee&&!J&&!Y&&-1===e.indexOf("<"))return I&&re?I.createHTML(e):e;if(!(o=Se(e)))return ee?null:S}o&&Q&&Te(o.firstChild);for(var u=Oe(ae?e:o);r=u.nextNode();)3===r.nodeType&&r===i||De(r)||(r.content instanceof d&&function e(t){var n,r=Oe(t);for(Ce("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)Ce("uponSanitizeShadowNode",n,null),De(n)||(n.content instanceof d&&e(n.content),Le(n));Ce("afterSanitizeShadowDOM",t,null)}(r.content),Le(r),i=r);if(i=null,ae)return e;if(ee){if(te)for(a=D.call(o.ownerDocument);o.firstChild;)a.appendChild(o.firstChild);else a=o;return ne?k.call(f,a,!0):a}var c=Y?o.outerHTML:o.innerHTML;return J&&(c=gn(c,P," "),c=gn(c,R," ")),I&&re?I.createHTML(c):c},s.setConfig=function(e){_(e),Z=!0},s.clearConfig=function(){ve=null,Z=!1},s.isValidAttribute=function(e,t,n){return ve||_({}),ke(mn(e),mn(t),n)},s.addHook=function(e,t){"function"==typeof t&&(E[e]=E[e]||[],dn(E[e],t))},s.removeHook=function(e){E[e]&&fn(E[e])},s.removeHooks=function(e){E[e]&&(E[e]=[])},s.removeAllHooks=function(){E={}},s}(),Ir=["script","svg"],Sr={sanitizeHtml:o,sanitizeText:o},Or="x-tinymce/html",Ar=b(Or),Cr="\x3c!-- "+Or+" --\x3e",Dr=tinymce.each,kr=tinymce.trim,Lr={strip_class_attributes:"all",retain_style_properties:"none"},Er={strip_class_attributes:"none",retain_style_properties:"valid"},_r="startElement",Nr="endElement",Pr="text",Rr="comment",Mr=function(o){function t(){return a}function i(n){Dr(l(),function(e,t){n(t,e)})}var a,u,c,s=0,l=function(){return a={},s=0,Dr(o.attributes,function(e){var t=e.nodeName,n=e.value;!1===e.specified&&("name"!==e.nodeName||""===e.value)||null!=n&&(a[t]=n,s++)}),void 0===a.style&&o.style.cssText&&(a.style=o.style.cssText,s++),l=t,a};return{get:function(e){return l()[e]},each:i,filter:function(e){var n,r;u||(c=l),r=e,u=(n=u)&&r?function(e,t){return r(e,n(e,t))}:n||r,l=function(){return l=c,i(function(e,t){var n=u(e,t);null===n?(o.removeAttribute(e),delete a[e],s--):n!==t&&("class"===e?o.className=n:o.setAttribute(e,n),a[e]=n)}),l=t,a}},getAttributes:function(){return l()},getAttributeCount:function(){return l(),s}}},Fr=!1,jr=tr("HTML",window.document),Ur=[function(e){var t=e;return 65279===t.charCodeAt(t.length-1)?t.substring(0,t.length-1):e}],Hr=tinymce.isIE&&9<=document.documentMode?[function(e){return e.replace(/<BR><BR>/g,"<br>")},function(e){return e.replace(/<br>/g," ")},function(e){return e.replace(/<br><br>/g,"<BR><BR>")},function(e){return/<(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)/.test(e)?e.replace(/(?:<br>&nbsp;[\s\r\n]+|<br>)*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:<br>&nbsp;[\s\r\n]+|<br>)*/g,"$1"):e}].concat(Ur):Ur,Wr=(br=Array.prototype.slice.call(Hr).reverse(),function(e){for(var t=e,n=0;n<br.length;n++)t=(0,br[n])(t);return t}),Br=/^(mso-.*|tab-stops|tab-interval|language|text-underline|text-effect|text-line-through|font-color|horiz-align|list-image-[0-9]+|separator-image|table-border-color-(dark|light)|vert-align|vnd\..*)$/,zr=rr(function(e,t){var r,n=e.settings.get("retain_style_properties");t.filterStyles((r=n,function(e,t){var n=!1;switch(r){case"all":case"*":n=!0;break;case"valid":n=!Br.test(e);break;case void 0:case"none":n="list-style-type"===e;break;default:n=0<=(","+r+",").indexOf(","+e+",")}return n?t:null})),e.emit(t)}),$r=rr(function(e,t){e.seenList||(e.inferring?"LI"===t.tag()&&(t.type()===_r?e.inferring++:(e.inferring--,e.inferring||(e.needsClosing=!0))):("OL"===t.tag()||"UL"===t.tag()?e.seenList=!0:"LI"===t.tag()&&(e.inferring=1,e.needsClosing||e.emit(er("UL",{},{},e.document))),!e.needsClosing||e.inferring||t.isWhitespace()||(e.needsClosing=!1,e.emit(tr("UL",e.document))))),e.emit(t)}),qr=or(function(e,t){return"name"===e||"id"===e?null:t}),Vr=or(function(e,t){if("class"===e)switch(this.settings.get("strip_class_attributes")){case"mso":return 0===t.indexOf("Mso")?null:t;case"none":return t;default:return null}return t}),Gr=function(){if(0<navigator.userAgent.indexOf("Gecko")&&navigator.userAgent.indexOf("WebKit")<0)return!1;var e=document.createElement("div");try{e.innerHTML='<p style="mso-list: Ignore;">&nbsp;</p>'}catch(e){return!1}return"Ignore"===Qn(e.firstChild).getStyle("mso-list")}(),Kr=[],Xr=[],Jr=!1,Yr=rr(function(e,t){function n(e){return!(0<=",FONT,EM,STRONG,SAMP,ACRONYM,CITE,CODE,DFN,KBD,TT,B,I,U,S,SUB,SUP,INS,DEL,VAR,SPAN,".indexOf(","+e.tag()+",")&&ur(e,!0))}0===(Kr=Kr||[]).length?t.type()!==_r||n(t)?e.emit(t):sr(e,t):(Jr=Jr||n(t),sr(e,t))}),Zr=or(function(e,t){return"style"===e&&""===t?null:t}),Qr=or(function(e,t){return"lang"===e?null:t}),eo=rr(function(e,t){if("IMG"===t.tag()){if(t.type()===Nr&&e.skipEnd)return e.skipEnd=!1;if(t.type()===_r){if(/^file:/.test(t.getAttribute("src")))return e.skipEnd=!0,0;if(e.settings.get("base_64_images")&&/^data:image\/.*;base64/.test(t.getAttribute("src")))return e.skipEnd=!0,0}}e.emit(t)}),to=rr(function(e,t){"META"!==t.tag()&&"LINK"!==t.tag()&&e.emit(t)}),no=[],ro=rr(function(e,t){t.type()===_r&&"A"===t.tag()?(no.push(t),lr(t)&&e.defer(t)):t.type()===Nr&&"A"===t.tag()?(lr(no.pop())&&e.defer(t),0===no.length&&e.emitDeferred()):e.hasDeferred()?e.defer(t):e.emit(t)}),oo=!1,io=[rr(function(e,t){"SCRIPT"===t.tag()?oo=t.type()===_r:oo||(t.filterAttributes(function(e,t){return/^on/.test(e)||"language"===e?null:t}),e.emit(t))}),qr,eo,zr,Qr,Zr,Vr,ro,Yr,to,$r],ao=rr(function(e,n){n.filterAttributes(function(e,t){return"align"!==e&&("UL"!==n.tag()&&"OL"!==n.tag()||"type"!==e)?t:null}),e.emit(n)}),uo=or(function(e,t){return/^xmlns(:|$)/.test(e)?null:t}),co=rr(function(e,t){t.tag&&/^([OVWXP]|U[0-9]+|ST[0-9]+):/.test(t.tag())||e.emit(t)}),so=or(function(e,t){return"href"===e&&(0<=t.indexOf("#_Toc")||0<=t.indexOf("#_mso"))?null:t}),lo=or(function(e,t){return/^v:/.test(e)?null:t}),fo=[{regex:/^\(?[dc][\.\)]$/,type:{tag:"OL",type:"lower-alpha"}},{regex:/^\(?[DC][\.\)]$/,type:{tag:"OL",type:"upper-alpha"}},{regex:/^\(?M*(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})[\.\)]$/,type:{tag:"OL",type:"upper-roman"}},{regex:/^\(?m*(cm|cd|d?c{0,3})(xc|xl|l?x{0,3})(ix|iv|v?i{0,3})[\.\)]$/,type:{tag:"OL",type:"lower-roman"}},{regex:/^\(?[0-9]+[\.\)]$/,type:{tag:"OL"}},{regex:/^([0-9]+\.)*[0-9]+\.?$/,type:{tag:"OL",variant:"outline"}},{regex:/^\(?[a-z]+[\.\)]$/,type:{tag:"OL",type:"lower-alpha"}},{regex:/^\(?[A-Z]+[\.\)]$/,type:{tag:"OL",type:"upper-alpha"}}],mo={"\u2022":{tag:"UL",type:"disc"},"\xb7":{tag:"UL",type:"disc"},"\xa7":{tag:"UL",type:"square"}},po={o:{tag:"UL",type:"circle"},"-":{tag:"UL",type:"disc"},"\u25cf":{tag:"UL",type:"disc"}},go=function(e,t,n){return e===t||e&&t&&e.tag===t.tag&&e.type===t.type&&(n||e.variant===t.variant)},vo=(xr=function(e,t){var n,r=/([^{]+){([^}]+)}/g;for(r.lastIndex=0;null!==(n=r.exec(e));)Dr(n[1].split(","),function(){var e=(void 0).indexOf(".");if(0<=e&&void 0===kr((void 0).substring(e+1)))return!1}());return!1},wr={},function(e,t){var n,r=e+","+t;return wr.hasOwnProperty(r)?wr[r]:(n=xr.call(null,e,t),wr[r]=n)}),ho=["disc","circle","square"],yo=function(e,t,n){n.type()!==_r||"SPAN"!==n.tag()||0!==t.spanCount.length||!Gr&&mr(n,t)||ar(n)?n.type()===Nr?"SPAN"===n.tag()?(e.defer(n),t.spanCount.pop()):"P"===n.tag()?(e.defer(n),t.skippedPara=!0,t.openedTag=null,t.nextFilter=vr):(t.nextFilter=bo,t.nextFilter(e,t,n)):n.isWhitespace()?e.defer(n):(t.nextFilter=bo,t.nextFilter(e,t,n)):(e.defer(n),t.spanCount.push(n))},bo=function(e,t,n){function r(){t.emitter.closeAllLists(),e.emitDeferred(),t.openedTag=null,e.emit(n),t.nextFilter=bo}var o;n.type()===_r&&ar(n)&&"LI"!==n.tag()?(o=/ level([0-9]+)/.exec(n.getStyle("mso-list")))&&o[1]?(t.itemLevel=parseInt(o[1],10)+t.styleLevelAdjust,t.nextFilter===bo?e.emitDeferred():e.dropDeferred(),t.nextFilter=xo,e.startTransaction(),t.originalToken=n,t.commentMode=!1):r():!Gr&&(n.type()===Rr&&"[if !supportLists]"===n.text()||mr(n,e))?(n.type()===_r&&"SPAN"===n.tag()&&t.spanCount.push(n),t.nextFilter=xo,e.startTransaction(),t.originalToken=t.openedTag,t.commentMode=!0,t.openedTag=null,e.dropDeferred()):n.type()===Nr&&ir(n)?(e.defer(n),t.spanCount.pop()):n.type()===_r?ir(n)?(e.defer(n),t.spanCount.push(n)):(t.openedTag&&(t.emitter.closeAllLists(),e.emitDeferred()),t.openedTag=n,e.defer(n)):r()},xo=function(e,t,n){var r,o;n.type()===_r&&"Ignore"===n.getStyle("mso-list")&&(t.nextFilter=wo),n.type()===_r&&"SPAN"===n.tag()?(t.spanCount.push(n),(t.commentMode&&""===n.getAttribute("style")||null===n.getAttribute("style"))&&(t.nextFilter=wo)):"A"===n.tag()?n.type()===_r?t.spanCount.push(n):t.spanCount.pop():n.type()===Pr?t.commentMode?(t.nextFilter=wo,t.nextFilter(e,t,n)):(r=t.originalToken,o=t.spanCount,t.emitter.closeAllLists(),e.emit(r),Dr(o,Xn(e.emit,e)),e.emit(n),e.commit(),t.originalToken=r,t.nextFilter=hr):!t.commentMode&&n.type()===Rr||gr(e,n)},wo=function(e,t,n){n.type()===Pr?n.isWhitespace()||(t.nextFilter=To,t.bulletInfo={text:n.text(),symbolFont:t.symbolFont}):ir(n)?n.type()===_r?t.spanCount.push(n):t.spanCount.pop():n.type()===_r&&"IMG"===n.tag()?(t.nextFilter=To,t.bulletInfo={text:"\u2202",symbolFont:!0}):gr(e,n)},To=function(e,t,n){n.type()===_r&&ir(n)?(t.spanCount.push(n),t.nextFilter=Io):n.type()===Nr&&ir(n)?(t.spanCount.pop(),t.nextFilter=So):n.type()===Nr&&"IMG"===n.tag()||gr(e,n)},Io=function(e,t,n){n.type()===Nr&&(ir(n)&&t.spanCount.pop(),t.nextFilter=So)},So=function(n,r,o){function e(e){var t;if(r.nextFilter=Oo,r.commentMode&&(r.itemLevel=r.indentGuesser.guessIndentLevel(o,r.originalToken,r.styles.styles,r.bulletInfo)),r.listType=dr(r.bulletInfo,(t=r.emitter.getCurrentListType(),r.emitter.getCurrentLevel()===r.itemLevel?t:null),r.originalToken),r.listType){for(r.emitter.openItem(r.itemLevel,r.originalToken,r.listType,r.skippedPara),n.emitDeferred();0<r.spanCount.length;)n.emit(r.spanCount.shift());e&&n.emit(o)}else Jn("Unknown list type: "+r.bulletInfo.text+" Symbol font? "+r.bulletInfo.symbolFont),n.rollback()}o.type()===Pr||o.type()===_r?e(!0):o.type()===Rr?e("[endif]"!==o.text()):o.type()===Nr?ir(o)&&r.spanCount.pop():gr(n,o)},Oo=function(e,t,n){n.type()===Nr&&n.tag()===t.originalToken.tag()?(t.nextFilter=vr,t.skippedPara=!1):e.emit(n)},Ao=bo,Co={};function Do(e,t,n){var r=Wr(e),o=fi(r);t.setWordContent(o);var i=io;return function(e,t,n,r){for(var i=nr(n),o=function(e,n){var r;n=n||window.document,r=n.createElement("div"),n.body.appendChild(r),r.style.position="absolute",r.style.left="-10000px",r.innerHTML=e;var o=r.firstChild||jr,i=[],a=!1;return{hasNext:function(){return void 0!==o},next:function(){var e=o,t=a;return!a&&o.firstChild?(i.push(o),o=o.firstChild):a=!a&&1===o.nodeType||(o.nextSibling?(o=o.nextSibling,!1):(o=i.pop(),!0)),e===jr||o||(n.body.removeChild(r),o=jr),e===jr?e:e?Qn(e,t):void 0}}}(e,n),a=function(e,t,n){for(var r=i,o=e.length-1;0<=o;o--)r=e[o](r,t,n);return r}(r,t,n);o.hasNext();)a.receive(o.next());return i.dom}(r,t,n,i=o?li.concat(io):i)}function ko(c,i,a){return{showDialog:function(u){function n(e){var t,n,r,o,i,a=Gn(c).sanitizeHtml(u);0<a.length&&(c.fire("PastePreProcess",{content:{content:a},internal:!1}),n=Yn(t=e,Lr,!0),r=Yn(t,Er,!0),o=r,i=Do(a,{setWordContent:function(e){o=e?n:r},get:function(e){return o[e]}},c.getDoc()),c.fire("PastePostProcess",{node:i,internal:!1}),c.undoManager.transact(function(){var e=Kn(i);c.insertContent(e)}))}var e,t=Y(c),r=Z(c),o=fi(u)?t:r;(g(e=o)?e():Ue.resolve(e)).then(function(e){var t=V(e)?e:"clean";"prompt"===t?(a?mi:di).openDialog(c,i,n):n(t)},function(e){console.error(e),n("clean")})}}}function Lo(e,t){return e.hasEventListeners(t)}function Eo(e,t,n,r,o){var i,a,u,c,s,l,f,d,m,p=t.replace(Cr,""),g=n,v=r,h=o,y=Lo(m=i=e,"PastePreProcess")?m.fire("PastePreProcess",{internal:g,content:p,source:v,mode:h}).content:p,b=n,x=r,w=o;return Lo(i,"PastePostProcess")?(u=y,c=b,s=x,l=w,f=(a=i).dom.add(a.getBody(),"div",{style:"display:none"},u),d=a.fire("PastePostProcess",{internal:c,node:f,source:s,mode:l}).node.innerHTML,a.dom.remove(f),d):y}function _o(e){return e.plugins.powerpaste}function No(c,e,s,l){var f;function d(e,t){return t in e&&0<e[t].length}c.on("dragstart dragend",function(e){f="dragstart"===e.type}),c.on("dragover dragend dragleave",function(e){f||e.preventDefault()});c.on("drop",function(e){if(!f){var t,n=tinymce.dom.RangeUtils;n&&n.getCaretRangeFromPoint&&(v(t=n.getCaretRangeFromPoint(e.clientX||0,e.clientY||0,c.getDoc()))&&c.selection.setRng(t));var r=M(e.target.files||e.dataTransfer.files,(a=ee(c),function(r){return Bt(r.type,"image/")&&_(a,function(e){return t=e.toLowerCase(),(Te(n={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"},t)?"image/"+n[t]:"image/"+t)===r.type;var t,n})}));if(0<r.length)return dt(r).get(function(e){var t=N(e,function(e){var t=Jt.fromTag("img");return St(t,"src",Se.cata(e,s.getLocalURL,function(e,t,n){return t})),t.dom.outerHTML}).join("");c.insertContent(Eo(c,t,!1,"imagedrop","auto"),{merge:Q(c)}),X(c)&&s.uploadImages(e)}),void e.preventDefault();var o=function(e){var t,n={};if(e&&(!e.getData||(t=e.getData("Text"))&&0<t.length&&(n["text/plain"]=t),e.types))for(var r=0;r<e.types.length;r++){var o=e.types[r];n[o]=e.getData(o)}return n}(e.dataTransfer);u=o,!!(i=u["text/plain"])&&0===i.indexOf("file://")||!d(u,"text/html")&&!d(u,"text/plain")||(ko(c,Et,l).showDialog(o["text/html"]||o["text/plain"]),e.preventDefault())}var i,a,u})}function Po(){function n(e){URL.revokeObjectURL(e.objurl())}var o={};return{add:function(e,t,n){var r={id:b(e),imageresult:b(t),objurl:b(n)};return o[e]=r},get:function(e){return pe(o,e)},remove:function(e){var t=o[e];delete o[e],void 0!==t&&n(t)},lookupByData:function(a){return function(e){for(var t=be(e),n=0,r=t.length;n<r;n++){var o=t[n],i=e[o];if(lt(i.imageresult())===a)return re.some(i)}return re.none()}(o)},destroy:function(){se(o,n),o={}}}}function Ro(t){var o=[];return{bind:function(e){if(void 0===e)throw new Error("Event bind error: undefined handler");o.push(e)},unbind:function(t){o=M(o,function(e){return e!==t})},trigger:function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var r={};P(t,function(e,t){r[e]=n[t]}),P(o,function(e){e(r)})}}}function Mo(e){return{registry:le(e,function(e){return{bind:e.bind,unbind:e.unbind}}),trigger:le(e,function(e){return e.trigger})}}function Fo(n){var r,o=!1;return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o||(o=!0,r=n.apply(null,e)),r}}function jo(e,t){var n=String(t).toLowerCase();return j(e,function(e){return e.search(n)})}function Uo(t){return function(e){return vt(e,t)}}function Ho(e){return window.matchMedia(e).matches}function Wo(e,t){var n=e.dom;if(1!==n.nodeType)return!1;var r=n;if(void 0!==r.matches)return r.matches(t);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(t);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(t);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}function Bo(e){return 1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount}function zo(e,t){var n=void 0===t?document:t.dom;return Bo(n)?[]:N(n.querySelectorAll(e),Jt.fromDom)}function $o(e,t){return e.dom===t.dom}function qo(e){return Jt.fromDom(e.dom.ownerDocument)}function Vo(e){return Kt(e)?e:qo(e)}function Go(e){return Jt.fromDom(Vo(e).dom.defaultView)}function Ko(e){return re.from(e.dom.parentNode).map(Jt.fromDom)}function Xo(e){return re.from(e.dom.previousSibling).map(Jt.fromDom)}function Jo(e){return re.from(e.dom.nextSibling).map(Jt.fromDom)}function Yo(o){return e=function(t){for(var n=[],e=function(e){return n.push(e),t(e)},r=t(o);(r=r.bind(e)).isSome(););return n}(Xo),(t=oe.call(e,0)).reverse(),t;var e,t}function Zo(e){return N(e.dom.childNodes,Jt.fromDom)}function Qo(e){return Jt.fromDom(e.dom.host)}function ei(e,t){return zo(t,e)}function ti(e){var t=e.replace(/\./g,"-");return{resolve:function(e){return N(e.split(" "),function(e){return t+"-"+e}).join(" ")}}}function ni(e,t){return ei(e,"img["+ji+'="'+t+'"]')}function ri(e){return ei(e,"img:not(["+ji+"])["+Fi.blobId()+"]")}function oi(){function o(){return 0<i.length}var i=[],a=[],u=Mo({complete:Ro(["response"])});return{findById:ni,findAll:ri,register:function(e,t){St(e,ji,t),i.push(t)},report:function(e,t,n){var r;P(t,function(e){kt(e,ji),a.push({success:n,element:e.dom})}),r=e,i=M(i,function(e){return e!==r}),o()||(u.trigger.complete(a),a=[])},inProgress:o,isActive:function(e){return E(i,e)},events:u.registry}}yr({});function ii(){return pi(0,0)}function ai(e){function t(e){return function(){return n===e}}var n=e.current,r=e.version;return{current:n,version:r,isEdge:t("Edge"),isChrome:t("Chrome"),isIE:t("IE"),isOpera:t("Opera"),isFirefox:t(yi),isSafari:t("Safari")}}function ui(e){function t(e){return function(){return n===e}}var n=e.current,r=e.version;return{current:n,version:r,isWindows:t(wi),isiOS:t("iOS"),isAndroid:t(Ti),isOSX:t("OSX"),isLinux:t("Linux"),isSolaris:t(Ii),isFreeBSD:t(Si),isChromeOS:t(Oi)}}var ci,si,li=[co,rr(function(e,t){var n,r,o;Co.styles.check(t)||(Co.symbolFont=(r=Co.symbolFont,(n=t).type()===_r&&((o=n.getStyle("font-family"))?r="Wingdings"===o||"Symbol"===o:/^(P|H[1-6]|DIV)$/.test(n.tag())&&(r=!1)),r),Co.nextFilter(e,Co,t))},function(e){yr(e)}),so,lo,uo,ao],fi=function(e){return 0<=e.indexOf("<o:p>")||0<=e.indexOf("p.MsoNormal, li.MsoNormal, div.MsoNormal")||0<=e.indexOf("MsoListParagraphCxSpFirst")||0<=e.indexOf("<w:WordDocument>")},di=Object.freeze({__proto__:null,openDialog:function(e,t,n){var r=t("cement.dialog.paste.clean"),o=t("cement.dialog.paste.merge"),i=[{text:r,ariaLabel:r,onclick:function(){u.close(),n("clean")}},{text:o,ariaLabel:o,onclick:function(){u.close(),n("merge")}}],a={title:t("cement.dialog.paste.title"),spacing:10,padding:10,items:[{type:"container",html:t("cement.dialog.paste.instructions")}],buttons:i},u=e.windowManager.open(a);setTimeout(function(){u&&u.getEl().focus()},1)}}),mi=Object.freeze({__proto__:null,openDialog:function(e,t,n){var r=t("cement.dialog.paste.clean"),o=t("cement.dialog.paste.merge"),i={title:t("cement.dialog.paste.title"),body:{type:"panel",items:[{type:"htmlpanel",name:"instructions",html:t("cement.dialog.paste.instructions")}]},buttons:[{text:r,type:"custom",name:"clean"},{text:o,type:"custom",name:"merge"}],onAction:function(e,t){switch(t.name){case"clean":e.close(),n("clean");break;case"merge":e.close(),n("merge")}}};e.windowManager.open(i)}}),pi=function(e,t){return{major:e,minor:t}},gi={nu:pi,detect:function(e,t){var n,r,o=String(t).toLowerCase();return 0===e.length?ii():(r=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}}(e,n=o))?pi(i(1),i(2)):{major:0,minor:0};function i(e){return Number(n.replace(r,"$"+e))}},unknown:ii},vi=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,hi={browsers:b([{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return vt(e,"edge/")&&vt(e,"chrome")&&vt(e,"safari")&&vt(e,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,vi],search:function(e){return vt(e,"chrome")&&!vt(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return vt(e,"msie")||vt(e,"trident")}},{name:"Opera",versionRegexes:[vi,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Uo("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Uo("firefox")},{name:"Safari",versionRegexes:[vi,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(vt(e,"safari")||vt(e,"mobile/"))&&vt(e,"applewebkit")}}]),oses:b([{name:"Windows",search:Uo("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return vt(e,"iphone")||vt(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Uo("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Uo("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Uo("linux"),versionRegexes:[]},{name:"Solaris",search:Uo("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Uo("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Uo("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}])},yi="Firefox",bi=function(){return ai({current:void 0,version:gi.unknown()})},xi=ai,wi=(b("Edge"),b("Chrome"),b("IE"),b("Opera"),b(yi),b("Safari"),"Windows"),Ti="Android",Ii="Solaris",Si="FreeBSD",Oi="ChromeOS",Ai=function(){return ui({current:void 0,version:gi.unknown()})},Ci=ui,Di=(b(wi),b("iOS"),b(Ti),b("Linux"),b("OSX"),b(Ii),b(Si),b(Oi),Fo(function(){return e=navigator.userAgent,t=re.from(navigator.userAgentData),n=Ho,g=hi.browsers(),v=hi.oses(),h=t.bind(function(e){return r=g,q(e.brands,function(t){var n=t.brand.toLowerCase();return j(r,function(e){var t;return n===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())}).map(function(e){return{current:e.name,version:gi.nu(parseInt(t.version,10),0)}})});var r}).orThunk(function(){return jo(g,n=e).map(function(e){var t=gi.detect(e.versionRegexes,n);return{current:e.name,version:t}});var n}).fold(bi,xi),y=jo(v,r=e).map(function(e){var t=gi.detect(e.versionRegexes,r);return{current:e.name,version:t}}).fold(Ai,Ci),{browser:h,os:y,deviceType:(i=h,a=e,u=n,c=(o=y).isiOS()&&!0===/ipad/i.test(a),s=o.isiOS()&&!c,f=(l=o.isiOS()||o.isAndroid())||u("(pointer:coarse)"),d=c||!s&&l&&u("(min-device-width:768px)"),m=s||l&&!d,p=i.isSafari()&&o.isiOS()&&!1===/safari/i.test(a),{isiPad:b(c),isiPhone:b(s),isTablet:b(d),isPhone:b(m),isTouch:b(f),isAndroid:o.isAndroid,isiOS:o.isiOS,isWebView:b(p),isDesktop:b(!m&&!d&&!p)})};var e,t,n,r,o,i,a,u,c,s,l,f,d,m,p,g,v,h,y})),ki=Wo,Li=g(Element.prototype.attachShadow)&&g(Node.prototype.getRootNode),Ei=b(Li),_i=Li?function(e){return Jt.fromDom(e.dom.getRootNode())}:Vo,Ni=function(e){return v(e.dom.shadowRoot)},Pi=function(e){var t=Gt(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;var n,r,o,i,a,u=t.ownerDocument;return o=Jt.fromDom(t),a=_i(o),(Xt(i=a)&&v(i.dom.host)?re.some(a):re.none()).fold(function(){return u.body.contains(t)},(n=Pi,r=Qo,function(e){return n(r(e))}))},Ri=function(e,t){var n=[];return P(Zo(e),function(e){n=(n=t(e)?n.concat([e]):n).concat(Ri(e,t))}),n},Mi=ti("ephox-salmon").resolve,Fi={uploadInProgress:b(Mi("upload-image-in-progress")),blobId:b("data-"+Mi("image-blob")),trackedImage:b("data-"+Mi("image-upload"))},ji=Fi.trackedImage();function Ui(t){return ze(function(n){var e=new FileReader;e.onload=function(e){var t=e.target?e.target.result:"";n(t)},e.readAsText(t)})}function Hi(e){try{var t=JSON.parse(e);return Ji.value(t)}catch(e){return Ji.error("Response was not JSON.")}}function Wi(e){return $e(e.response)}function Bi(e,t){function n(e){return ea({message:e,status:t.status,responseText:t.responseText})}switch(e){case ci.JSON:return Hi(t.response).fold(n,Qi);case ci.Blob:case ci.Text:return Qi(t.response);default:return n("unknown data type")}}function zi(p){return Zi(function(r){var o,i=new XMLHttpRequest;i.open(p.method,(o=p.url,re.from(p.query).map(function(e){var t=de(e,function(e,t){return encodeURIComponent(t)+"="+encodeURIComponent(e)}),n=vt(o,"?")?"&":"?";return 0<t.length?o+n+t.join("&"):o}).getOr(o)),!0);var n,e,t,a,u,c,s,l,f,d=(a=(t=p).body,u=re.from(a).bind(function(e){switch(e.type){case ci.JSON:return re.some("application/json");case ci.FormData:return re.some("application/x-www-form-urlencoded; charset=UTF-8");case ci.MultipartFormData:return re.none();default:return ci.Text,re.some("text/plain")}}),c=!0===t.credentials?re.some(!0):re.none(),s=function(){switch(t.responseType){case ci.Blob:return"application/octet-stream";case ci.JSON:return"application/json, text/javascript";case ci.Text:return"text/plain";default:return""}}()+", */*; q=0.01",l=void 0!==t.headers?t.headers:{},{contentType:u,responseType:function(){switch(t.responseType){case ci.JSON:return re.none();case ci.Blob:return re.some("blob");case ci.Text:return re.some("text");default:return re.none()}}(),credentials:c,accept:s,headers:l,progress:g(t.progress)?re.some(t.progress):re.none()});function m(){var t,n=p.url;(function(e,t){switch(e){case ci.JSON:return Hi(t.response).fold(function(){return Wi(t)},$e);case ci.Blob:return re.from(t.response).map(Ui).getOr($e("no response content"));default:return ci.Text,Wi(t)}})(p.responseType,t=i).map(function(e){return{message:0===t.status?"Unknown HTTP error (possible cross-domain request)":"Could not load url "+n+": "+t.statusText,status:t.status,responseText:e}}).get(function(e){return r(Ji.error(e))})}n=i,(e=d).contentType.each(function(e){return n.setRequestHeader("Content-Type",e)}),n.setRequestHeader("Accept",e.accept),e.credentials.each(function(e){return n.withCredentials=e}),e.responseType.each(function(e){return n.responseType=e}),e.progress.each(function(t){return n.upload.addEventListener("progress",function(e){return t(e.loaded,e.total)})}),se(e.headers,function(e,t){return n.setRequestHeader(t,e)}),i.onerror=m,i.onload=function(){0===i.status&&!Bt(p.url,"file:")||i.status<100||400<=i.status?m():Bi(p.responseType,i).get(r)},f=p.body,re.from(f).map(function(e){return e.type===ci.JSON?JSON.stringify(e.data):e.type===ci.FormData||e.type===ci.MultipartFormData?(t=e.data,n=new FormData,se(t,function(e,t){n.append(t,e)}),n):e.data;var t,n}).fold(function(){return i.send()},function(e){i.send(e)})})}function $i(e,t){var n,r,o,i;return r=null!==(n=(t=void 0===t?{}:t).strictMode)&&void 0!==n&&n,o=(r?ta:na).exec(e),i=z(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(e,t){var n;return null!==(n=o[t])&&void 0!==n?n:""}),ue(ue({},i),{queryKey:function(e){for(var t={};;){var n=ra.exec(e);if(null===n)return t;t[n[1]]=n[2]}}(i.query)})}function qi(e){return gt(e,oa(e))}function Vi(e){for(var t,n=e,r="";""!==n;)Bt(n,"../")?n=pt(n,"../"):Bt(n,"./")?n=pt(n,"./"):Bt(n,"/./")?n="/"+pt(n,"/./"):"/."===n?n="/":Bt(n,"/../")?(n="/"+pt(n,"/../"),r=qi(r)):"/.."===n?(n="/",r=qi(r)):"."===n||".."===n?n="":(n=pt(n,t=/(^\/?.*?)(\/|$)/.exec(n)[1]),r+=t);return r}function Gi(e,t,n){return{message:b(e),status:b(t),contents:b(n)}}(si=ci=ci||{}).JSON="json",si.Blob="blob",si.Text="text",si.FormData="formdata",si.MultipartFormData="multipart/form-data";var Ki=function(n){return{isValue:w,isError:x,getOr:b(n),getOrThunk:b(n),getOrDie:b(n),or:function(e){return Ki(n)},orThunk:function(e){return Ki(n)},fold:function(e,t){return t(n)},map:function(e){return Ki(e(n))},mapError:function(e){return Ki(n)},each:function(e){e(n)},bind:function(e){return e(n)},exists:function(e){return e(n)},forall:function(e){return e(n)},toOptional:function(){return re.some(n)}}},Xi=function(n){return{isValue:x,isError:w,getOr:o,getOrThunk:function(e){return e()},getOrDie:function(){return C(String(n))()},or:o,orThunk:function(e){return e()},fold:function(e,t){return e(n)},map:function(e){return Xi(n)},mapError:function(e){return Xi(e(n))},each:S,bind:function(e){return Xi(n)},exists:x,forall:w,toOptional:re.none}},Ji={value:Ki,error:Xi,fromOption:function(e,t){return e.fold(function(){return Xi(t)},Ki)}},Yi=function(i){return ue(ue({},i),{toCached:function(){return Yi(i.toCached())},bindFuture:function(t){return Yi(i.bind(function(e){return e.fold(function(e){return $e(Ji.error(e))},function(e){return t(e)})}))},bindResult:function(t){return Yi(i.map(function(e){return e.bind(t)}))},mapResult:function(t){return Yi(i.map(function(e){return e.map(t)}))},mapError:function(t){return Yi(i.map(function(e){return e.mapError(t)}))},foldResult:function(t,n){return i.map(function(e){return e.fold(t,n)})},withTimeout:function(e,o){return Yi(ze(function(t){var n=!1,r=setTimeout(function(){n=!0,t(Ji.error(o()))},e);i.get(function(e){n||(clearTimeout(r),t(e))})}))}})},Zi=function(e){return Yi(ze(e))},Qi=function(e){return Yi($e(Ji.value(e)))},ea=function(e){return Yi($e(Ji.error(e)))},ta=/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@\/]*)(?::([^:@\/]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,na=/^(?:(?![^:@\/]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*)(?::([^:@\/]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ra=/(?:^|&)([^&=]+)=?([^&]*)/g,oa=function(e){return e.substring(e.lastIndexOf("/"))},ia=["jpg","png","gif","jpeg"];function aa(e,t){var n=At(e,t);return void 0===n||""===n?[]:n.split(" ")}function ua(e){return void 0!==e.dom.classList}function ca(e){return aa(e,"class")}function sa(e,t){var n,r,o;ua(e)?e.dom.classList.add(t):(r=t,o=aa(n=e,"class").concat([r]),St(n,"class",o.join(" ")))}function la(e,t){var n,r,o,i;ua(e)?e.dom.classList.remove(t):(o=t,0<(i=M(aa(r=e,"class"),function(e){return e!==o})).length?St(r,"class",i.join(" ")):kt(r,"class")),0===(ua(n=e)?n.dom.classList:ca(n)).length&&kt(n,"class")}function fa(e,t){return ua(e)&&e.dom.classList.contains(t)}function da(t){return function(e){return fa(e,t)}}var ma=function(m){function p(e,t){var n,r,o,i,a,u,c=e.split(/\s+/),s=1===c.length&&""!==c[0]?c[0]:t;return r=s,i=$i(l,o={strictMode:!0}),a=$i(r,o),u={},""!==a.protocol?(u.protocol=a.protocol,u.authority=a.authority,u.path=Vi(a.path),u.query=a.query):(""!==a.authority?(u.authority=a.authority,u.path=Vi(a.path),u.query=a.query):(""===a.path?(u.path=i.path,""!==a.query?u.query=a.query:u.query=i.query):(Bt(a.path,"/")?u.path=Vi(a.path):(u.path=function(e,t){if(""!==i.authority&&""===e)return"/"+t;var n=e.substring(e.lastIndexOf("/")+1);return gt(e,n)+t}(i.path,a.path),u.path=Vi(u.path)),u.query=a.query),u.authority=i.authority),u.protocol=i.protocol),u.anchor=a.anchor,(n="")!==u.protocol&&(n+=u.protocol,n+=":"),""!==u.authority&&(n+="//",n+=u.authority),n+=u.path,""!==u.query&&(n+="?",n+=u.query),""!==u.anchor&&(n+="#",n+=u.anchor),n}function r(e,t,o){var n,r,i,a,u,c,s,l=(c=t,s=(u=e).name,O(s)&&!zt(s,".tmp")?s:function(e,t){if(O(e.type)&&Bt(e.type,"image/")){var n=e.type.substr("image/".length);return E(ia,n)?t+"."+n:t}return t}(u,c)),f=(r=e,i=l,(a=new FormData).append("image",r,i),n=a.get("image"),{type:ci.Blob,data:n}),d={url:m.url,body:f,responseType:ci.Text,credentials:!0===m.credentials};zi(ue(ue({},d),{method:"post"})).get(function(e){e.fold(function(e){o(Ji.error(Gi(e.message,e.status,e.responseText)))},function(t){var n;try{var e=JSON.parse(t);if(!O(e.location))return void o(Ji.error(Gi("JSON response did not contain a string location",500,t)));n=e.location}catch(e){n=t}var r=p(n,l);o(Ji.value({location:r}))})})}var e,t,n,o,l=(n=0<(t=(e=m.url).lastIndexOf("/"))?e.substr(0,t):e,o=void 0===m.basePath?n:m.basePath,zt(o,"/")?o:o+"/");return{upload:function(e,t,n){st(e.imageresult()).then(function(e){r(e,t,n)})}}};function pa(e,t,n){for(var r=e.dom,o=g(n)?n:x;r.parentNode;){var r=r.parentNode,i=Jt.fromDom(r);if(t(i))return re.some(i);if(o(i))break}return re.none()}function ga(e,t){return j(e.dom.childNodes,function(e){return t(Jt.fromDom(e))}).map(Jt.fromDom)}function va(e,o){var i=function(e){for(var t=0;t<e.childNodes.length;t++){var n=Jt.fromDom(e.childNodes[t]);if(o(n))return re.some(n);var r=i(e.childNodes[t]);if(r.isSome())return r}return re.none()};return i(e.dom)}function ha(e,t,n){return pa(e,function(e){return Wo(e,t)},n)}function ya(e,t){return n=t,Bo(r=void 0===e?document:e.dom)?re.none():re.from(r.querySelector(n)).map(Jt.fromDom);var n,r}function ba(e,t,n){var r,o,i=ha,a=n;return Wo(r=e,o=t)?re.some(r):g(a)&&a(r)?re.none():i(r,o,a)}function xa(e,t){return{image:b(e),blobInfo:b(t)}}function wa(e,t){var n=(t||document).createElement("div");return n.innerHTML=e,Zo(Jt.fromDom(n))}function Ta(t,n){Ko(t).each(function(e){e.dom.insertBefore(n.dom,t.dom)})}function Ia(e,t){Jo(e).fold(function(){Ko(e).each(function(e){za(e,t)})},function(e){Ta(e,t)})}function Sa(t,n){var e;e=t.dom.childNodes,re.from(e[0]).map(Jt.fromDom).fold(function(){za(t,n)},function(e){t.dom.insertBefore(n.dom,e.dom)})}function Oa(e,t){Ta(e,t),za(t,e)}function Aa(t,e){P(e,function(e){za(t,e)})}function Ca(e){la(e,Fi.uploadInProgress())}function Da(l){return{importImages:function(e){return De(W(e,function(e){return Se.cata(e,function(e,t,n){var u,r,c,s,o=lt(t);return[(u=e,r=t,c=o,s=n,ze(function(a){Ht(r).then(function(e){var t,n,r,o,i;l.editorUpload.blobCache.add({id:b(u),name:b(u),filename:(t=u,n=e.type,b(4===(i=h(tinymce)).major&&i.minor<6?t:t+"."+(r=n.toLowerCase(),Te(o={"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"},r)?o[r]:"dat"))),blob:b(e),base64:b(c.split(",")[1]),blobUri:b(s),uri:b(null)}),a(e)})}))]},b([]))}))},uploadImages:function(){l.uploadImages()},prepareImages:S,getLocalURL:function(e,t,n){return lt(t)}}}function ka(r,e){function m(){return Jt.fromDom(r.getBody())}function p(t,e,n){P(e,function(e){St(e,"data-mce-src",t.location)}),function(e,t,n){for(var r=0;r<e.undoManager.data.length;r++)e.undoManager.data[r].content=e.undoManager.data[r].content.split(t.objurl()).join(n.location)}(r,n,t)}var o,t,i,g=Po(),v=oi(),s=(o=r,t=e.url,i=$a,{instance:function(){return Fo(n)}}),h=ma(e);function a(){return Et("error.code.images.not.found")+t+Et("error.full.stop")}function u(){return Et("error.imageupload")+t+Et("error.full.stop")}function n(e){var t=e.status(),n=0===t||400<=t||t<500?a:u;i.showDialog(o,n())}function l(f,d){var e=v,t=f.blobInfo().id(),n=f.image(),r=e.isActive(t);e.register(n,t),sa(n,Fi.uploadInProgress()),(r?re.none():re.some(t)).each(function(e){var t,n,r,o,i,a,u,c,s;function l(){var e="Internal error with blob cache";console.error(e,c),s(Wa.failure(Gi(e,666,c)))}t=e,n=f.blobInfo(),r=d,o=h,i=v,a=g,u=m(),c=t,s=function(e){e.fold(r,p)},o.upload(n,c,function(e){var t,o=i.findById(u,c);P(o,(t=Fi.uploadInProgress(),function(e){la(e,t)})),e.fold(function(e){s(Wa.failure(e))},function(t){var e=a,n=c,r=t;P(o,function(e){St(e,"src",r.location),kt(e,Fi.blobId())}),Ba(e,n).fold(l,function(e){s(Wa.success(t,o,e))})}),i.report(c,o,e.isValue())})})}return v.events.complete.bind(function(e){!function(e){for(var t=0;t<e.undoManager.data.length;t++){var n=e.undoManager.data[t].content,r=Jt.fromTag("div");Aa(r,wa(n)),P(ei(r,"."+Fi.uploadInProgress()),Ca),e.undoManager.data[t].content=r.dom.innerHTML}}(r)}),{importImages:function(){return $e([])},uploadImages:function(e){var t,n,f,r,o,i,a,u,c=s.instance();o=v,i=g,a=m(),u=o.findAll(a),P(o.inProgress()?[]:N(u,function(e){return t=i,r=At(n=e,Fi.blobId()),t.get(r).fold(function(){return Ji.error(r)},function(e){return Ji.value(xa(n,e))});var t,n,r}),function(e){e.fold(function(e){v.report(e,[],!1)},function(e){l(e,c)})}),t=e,n=s.instance(),f=g,r=m(),P(W(t,function(e){return Se.cata(e,function(c,s,l){return ya(r,'img[src="'+l+'"]').fold(function(){return[Ji.error("Image that was just inserted could not be found: "+l)]},function(e){return[Ji.value((t=f,n=c,o=l,i=e,a=lt(r=s),u=t.lookupByData(a).getOrThunk(function(){return t.add(n,r,o)}),St(i,Fi.blobId(),u.id()),xa(i,u)))];var t,n,r,o,i,a,u})},b([]))}),function(e){e.fold(function(e){console.error(e)},function(e){l(e,n)})})},prepareImages:S,getLocalURL:function(e,t,n){return n}}}function La(t,r,e,n){var o,i,a,u=t.selection,c=t.dom,s=t.getBody(),l=e.isText();if(e.reset(),n.clipboardData&&n.clipboardData.getData("text/html")){n.preventDefault();var f=n.clipboardData.getData("text/html"),d=f.match(/<html[\s\S]+<\/html>/i),m=null===d?f:d[0];return r(m)}if(!c.get("_mcePaste")){if(o=c.add(s,"div",{id:"_mcePaste",class:"mcePaste"},'\ufeff<br _mce_bogus="1">'),a=s!==t.getDoc().body?c.getPos(t.selection.getStart(),s).y:s.scrollTop,c.setStyles(o,{position:"absolute",left:-1e4,top:a,width:1,height:1,overflow:"hidden"}),tinymce.isIE)return(g=c.doc.body.createTextRange()).moveToElementText(o),g.execCommand("Paste"),c.remove(o),"\ufeff"===o.innerHTML?(t.execCommand("mcePasteWord"),void n.preventDefault()):(r(l?o.innerText:o.innerHTML),tinymce.dom.Event.cancel(n));var p,g,v=function(e){e.preventDefault()};c.bind(t.getDoc(),"mousedown",v),c.bind(t.getDoc(),"keydown",v),tinymce.isGecko&&((g=t.selection.getRng(!0)).startContainer!==g.endContainer||3!==g.startContainer.nodeType||1===(p=c.select("p,h1,h2,h3,h4,h5,h6,pre",o)).length&&c.remove(p.reverse(),!0)),i=t.selection.getRng(),o=o.firstChild,(g=t.getDoc().createRange()).setStart(o,0),g.setEnd(o,1),u.setRng(g),window.setTimeout(function(){var n="",e=c.select("div.mcePaste");Dr(e,function(e){var t=e.firstChild;t&&"DIV"===t.nodeName&&t.style.marginTop&&t.style.backgroundColor&&c.remove(t,1),Dr(c.select("div.mcePaste",e),function(e){c.remove(e,1)}),Dr(c.select("span.Apple-style-span",e),function(e){c.remove(e,1)}),Dr(c.select("br[_mce_bogus]",e),function(e){c.remove(e)}),n+=e.innerHTML}),Dr(e,function(e){c.remove(e)}),i&&u.setRng(i),r(n),c.unbind(t.getDoc(),"mousedown",v),c.unbind(t.getDoc(),"keydown",v)},0)}}function Ea(e){var t=e;return{get:function(){return t},set:function(e){t=e}}}function _a(e){function t(){return n.get().each(e)}var n=Ea(re.none());return{clear:function(){t(),n.set(re.none())},isSet:function(){return n.get().isSome()},get:function(){return n.get()},set:function(e){t(),n.set(re.some(e))}}}function Na(){var t=_a(S);return ue(ue({},t),{on:function(e){return t.get().each(e)}})}function Pa(e,t,n,r,o){var i,a,u=(i=n,a=r,function(e){function t(){return r.stopPropagation()}function n(){return r.preventDefault()}var r,o;i(e)&&a((r=e,o=s(n,t),{target:Jt.fromDom(function(e){if(Ei()&&v(e.target)){var t=Jt.fromDom(e.target);if(Vt(t)&&Ni(t)&&e.composed&&e.composedPath){var n=e.composedPath();if(n)return $(n)}}return re.from(e.target)}(r).getOr(r.target)),x:r.clientX,y:r.clientY,stop:t,prevent:n,kill:o,raw:r}))});return e.dom.addEventListener(t,u,o),{unbind:A(qa,e,t,u,o)}}function Ra(e,t,n){return Pa(e,t,Va,n,!1)}function Ma(n,r){function t(e){return n(e)?re.from(e.dom.nodeValue):re.none()}return{get:function(e){if(!n(e))throw new Error("Can only get "+r+" value of a "+r+" node");return t(e).getOr("")},getOption:t,set:function(e,t){if(!n(e))throw new Error("Can only set raw "+r+" value of a "+r+" node");e.dom.nodeValue=t}}}function Fa(e){return Ga.get(e)}function ja(e,t,n){var r,o=e.document.createRange(),i=o;return t.fold(function(e){i.setStartBefore(e.dom)},function(e,t){i.setStart(e.dom,t)},function(e){i.setStartAfter(e.dom)}),r=o,n.fold(function(e){r.setEndBefore(e.dom)},function(e,t){r.setEnd(e.dom,t)},function(e){r.setEndAfter(e.dom)}),o}function Ua(e,t,n,r,o){var i=e.document.createRange();return i.setStart(t.dom,n),i.setEnd(r.dom,o),i}function Ha(e,t,n){return t(Jt.fromDom(n.startContainer),n.startOffset,Jt.fromDom(n.endContainer),n.endOffset)}var Wa=ge([{failure:["error"]},{success:["result","images","blob"]}]),Ba=function(t,n){return t.get(n).fold(function(){return Ji.error("Internal error with blob cache")},function(e){return t.remove(n),Ji.value(e)})},za=function(e,t){e.dom.appendChild(t.dom)},$a=Object.freeze({__proto__:null,showDialog:function(e,t){var n=e.windowManager.open({title:"Error",spacing:10,padding:10,items:[{type:"container",html:t}],buttons:[{text:"Ok",onclick:function(){n.close()}}]})}}),qa=function(e,t,n,r){e.dom.removeEventListener(t,n,r)},Va=w,Ga=Ma(wt,"comment"),Ka=Di(),Xa=b({isSupported:!1,cleanDocument:function(){return Ue.reject("not supported")}}),Ja=Ka.deviceType.isiOS()||Ka.deviceType.isAndroid()?Xa:function(e,t,n){var r=t+"/wordimport.js"+re.from(n||"v=8.0.1").filter(function(e){return 0!==e.length}).map(function(e){return(-1===e.indexOf("?")?"?":"")+e}).getOr(""),o=e.loadScript("ephox.wimp",r);return o.catch(function(e){console.error("Unable to load word import: ",e)}),{isSupported:!0,cleanDocument:function(t,n,r){return o.then(function(e){return e.cleanDocument(t,n,r.cleanFilteredInlineElements)})}}},Ya=ge([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]);function Za(e){return Cu.get(e)}function Qa(e,t){var n=yt(e);return"input"===n?ku.after(e):E(["br","img"],n)?0===t?ku.before(e):ku.after(e):ku.on(e,t)}function eu(e,t,n,r){var o=qo(e).dom.createRange();return o.setStart(e.dom,t),o.setEnd(n.dom,r),o}function tu(e){return re.from(e.getSelection())}function nu(e,t,n,r,o){var i=Ua(e,t,n,r,o);tu(e).each(function(e){e.removeAllRanges(),e.addRange(i)})}function ru(c,e){return o=c,r=e.match({domRange:function(e){return{ltr:b(e),rtl:re.none}},relative:function(e,t){return{ltr:Fo(function(){return ja(o,e,t)}),rtl:Fo(function(){return re.some(ja(o,t,e))})}},exact:function(e,t,n,r){return{ltr:Fo(function(){return Ua(o,e,t,n,r)}),rtl:Fo(function(){return re.some(Ua(o,n,r,e,t))})}}}),((n=(t=r).ltr()).collapsed?t.rtl().filter(function(e){return!1===e.collapsed}).map(function(e){return Ya.rtl(Jt.fromDom(e.endContainer),e.endOffset,Jt.fromDom(e.startContainer),e.startOffset)}).getOrThunk(function(){return Ha(0,Ya.ltr,n)}):Ha(0,Ya.ltr,n)).match({ltr:function(e,t,n,r){nu(c,e,t,n,r)},rtl:function(o,i,a,u){tu(c).each(function(e){if(e.setBaseAndExtent)e.setBaseAndExtent(o.dom,i,a.dom,u);else if(e.extend)try{n=a,r=u,(t=e).collapse(o.dom,i),t.extend(n.dom,r)}catch(e){nu(c,a,u,o,i)}else nu(c,a,u,o,i);var t,n,r})}});var o,t,n,r}function ou(e){if(0<e.rangeCount){var t=e.getRangeAt(0),n=e.getRangeAt(e.rangeCount-1);return re.some(Au(Jt.fromDom(t.startContainer),t.startOffset,Jt.fromDom(n.endContainer),n.endOffset))}return re.none()}function iu(e){if(null===e.anchorNode||null===e.focusNode)return ou(e);var t=Jt.fromDom(e.anchorNode),n=Jt.fromDom(e.focusNode),r=t,o=e.anchorOffset,i=n,a=e.focusOffset,u=eu(r,o,i,a),c=$o(r,i)&&o===a;return u.collapsed&&!c?re.some(Au(t,e.anchorOffset,n,e.focusOffset)):ou(e)}function au(e){return tu(e).filter(function(e){return 0<e.rangeCount}).bind(iu)}function uu(e){e.dom.textContent="",P(Zo(e),function(e){_u(e)})}function cu(e){var t,n=Zo(e);0<n.length&&(t=e,P(n,function(e){Ta(t,e)})),_u(e)}function su(e,t,n,r){return{startContainer:b(e),startOffset:b(t),endContainer:b(n),endOffset:b(r),collapsed:b($o(e,n)&&t===r)}}function lu(n){var e,r=(e=!1,{isBlocked:function(){return e},block:function(){e=!0},unblock:function(){e=!1}});return{control:r,instance:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r.isBlocked()||n.apply(void 0,e)}}}function fu(e,t,n){return void 0===n&&(n=r),e.exists(function(e){return n(e,t)})}function du(e,t){return e?re.some(t):re.none()}function mu(e){return void 0!==e.style&&g(e.style.getPropertyValue)}function pu(e,t,n){if(!O(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);mu(e)&&e.style.setProperty(t,n)}function gu(e,t){mu(e)&&e.style.removeProperty(t)}function vu(e,t,n){pu(e.dom,t,n)}function hu(e,t){var n=e.dom;se(t,function(e,t){pu(n,t,e)})}function yu(e,t){var n=e.dom,r=window.getComputedStyle(n).getPropertyValue(t);return""!==r||Pi(e)?r:Nu(n,t)}function bu(e,t){var n=e.dom,r=Nu(n,t);return re.from(r).filter(function(e){return 0<e.length})}function xu(e){var t={},n=e.dom;if(mu(n))for(var r=0;r<n.style.length;r++){var o=n.style.item(r);t[o]=n.style[o]}return t}function wu(e,t){gu(e.dom,t),fu(Ct(e,"style").map($t),"")&&kt(e,"style")}function Tu(e){return e.dom.innerHTML}function Iu(t,e){var n,r=Jt.fromTag("div");function o(e){return fa(e,ju)}return Ot(r,e),Ot(r,{contenteditable:"true","aria-hidden":"true"}),hu(r,{position:"fixed",top:"0px",width:"100px",height:"100px",overflow:"hidden",opacity:"0"}),n=r,P([Fu,ju],function(e){sa(n,e)}),{attach:function(e){uu(r),vu(r,"left",Uu(e)),za(e,r)},focus:function(){ha(r,"body").each(function(e){t.toOff(e,r)})},contents:function(){var n,e=o;return Jo(n=r).filter(e).each(function(e){var t=Zo(e);Aa(n,t),_u(e)}),Mu(n,e),P(Zo(n),function(e){var t;Vt(t=e)&&!t.dom.hasChildNodes()&&E(Ru,yt(t))&&_u(e)}),{elements:Zo(r),html:Tu(r),offscreen:r}},container:b(r),detach:function(){_u(r)}}}function Su(e){var t=$o(e.start,e.finish)&&e.soffset===e.foffset;return{startContainer:b(e.start),startOffset:b(e.soffset),endContainer:b(e.finish),endOffset:b(e.foffset),collapsed:b(t)}}Ya.ltr,Ya.rtl;function Ou(e){return"rtl"===yu(e,"direction")?"rtl":"ltr"}var Au=function(e,t,n,r){return{start:e,soffset:t,finish:n,foffset:r}},Cu=Ma(Gt,"text"),Du=ge([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),ku={before:Du.before,on:Du.on,after:Du.after,cata:function(e,t,n,r){return e.fold(t,n,r)},getStart:function(e){return e.fold(o,o,o)}},Lu=ge([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Eu={domRange:Lu.domRange,relative:Lu.relative,exact:Lu.exact,exactFromRange:function(e){return Lu.exact(e.start,e.soffset,e.finish,e.foffset)},getWin:function(e){return Go(e.match({domRange:function(e){return Jt.fromDom(e.startContainer)},relative:function(e,t){return ku.getStart(e)},exact:function(e,t,n,r){return e}}))},range:Au},_u=function(e){var t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Nu=function(e,t){return mu(e)?e.style.getPropertyValue(t):""},Pu=b((0,ti("ephox-sloth").resolve)("bin")),Ru=["b","i","u","sub","sup","strike"],Mu=function(e,o){P(Zo(e),function(e){var t,n,r;o(e)&&(n=Zo(t=e),Aa(r=Jt.fromTag("div",qo(t).dom),n),Ta(t,r),_u(t))})},Fu=Pu(),ju=Fu+ke(""),Uu=function(e){return"rtl"===Ou(e)?"100000px":"-100000px"},Hu=Di(),Wu=b(Hu.browser.isIE()&&Hu.browser.version.major<=10),Bu=Wu()?function(e,t,n){t.control.block(),e.dom.execCommand("paste"),n(),t.control.unblock()}:function(e,t,n){setTimeout(n,1)},zu={set:function(e,t){var n,r,o,i,a,u,c,s,l;n=e,r=t.startContainer(),o=t.startOffset(),i=t.endContainer(),a=t.endOffset(),ru(n,(u=i,c=a,s=Qa(r,o),l=Qa(u,c),Eu.relative(s,l)))},get:function(e){return au(e).map(Su)}};function $u(p){return function(t){var u,r,o,c,n,i,a,s,l,f=Mo({after:Ro(["container"])}),d=(u=zu,r=Jt.fromTag("br"),o=re.none(),c=function(e){return Go(e).dom},{cleanup:function(){_u(r)},toOn:function(i,e){var a=c(e);o.each(function(e){var t=i.dom.childNodes.length,n=$o(i,e.startContainer())&&t<e.startOffset()?t:e.startOffset(),r=$o(i,e.endContainer())&&t<e.endOffset()?t:e.endOffset(),o=su(e.startContainer(),n,e.endContainer(),r);u.set(a,o)})},toOff:function(e,t){var n=c(t);za(t,r),o=u.get(n),u.set(n,su(r,0,r,0))}}),e=(i=t,a=Iu(n=d,p),s=lu(function(){var e;l.trigger.before(),a.attach(i),a.focus(),e=qo(i),Bu(e,s,m)}),{instance:b(function(){s.instance()}),destroy:S,events:(l=Mo({before:Ro([]),after:Ro(["elements","html","container"])})).registry});function m(){n.cleanup();var e=a.contents();a.detach(),l.trigger.after(e.elements,e.html,a.container())}return e.events.after.bind(function(e){d.toOn(t,e.container),f.trigger.after(e.container)}),{run:function(){e.instance()()},events:f.registry}}}function qu(l,f){return We.nu(function(t){function n(e){P(s,function(e){e.unbind()}),t(e.fold(function(e){return Ji.error(e+'Unable to download editor stylesheets from "'+l+'"')},Ji.value))}var e,r,o,i,a,u,c=(e=l,r=Jt.fromDom(document),Ot(o=Jt.fromTag("link",r.dom),{rel:"stylesheet",type:"text/css",href:e}),i=r,a=o,u=function(){var e=i.dom.head;if(null==e)throw new Error("Head is not available yet");return Jt.fromDom(e)}(),za(u,a),o),s=[Ra(c,"load",function(e){!function(e){try{var t=e.target.dom.sheet.cssRules;return d(t)&&0===t.length}catch(e){}}(e)?f(n):n(Ji.error(""))}),Ra(c,"error",A(n,Ji.error("")))]})}function Vu(e,t,n,r,o){return e.fold(t,n,r,o)}function Gu(e,n){var r={};return P(Lc,function(t){n[t].or(e[t]).each(function(e){r[t]=e})}),Ec(r)}function Ku(e){return{response:Ac(e),bundle:Ec({})}}function Xu(e){return Ue.resolve(Ku(e))}function Ju(e){return v(e.then)}function Yu(e,t,n,r){return{steps:e,input:t,label:n,capture:r}}function Zu(e,t){var n,r,o=Gu(e.bundle,t.bundle);return{response:(n=e.response,r=t.response,Vu(n,re.none,re.none,re.none,function(e,t,n){return Vu(r,re.none,function(e,t){return re.some(Oc.incomplete(e,t,n))},re.none,re.none)}).getOr(r)),bundle:o}}function Qu(t,n,r){function e(){return t}function o(){var e=r(n,t);return Ju(e)?e.then(function(e){return Zu(t,e)}):Zu(t,e)}return Vu(t.response,e,o,e,o)}function ec(e,t){var n=yt(e),r=t.name,o=void 0!==t.condition?t.condition:w;return Mc.matches(r,n)&&o(e)}function tc(e,t,n){var r,o,i=e.dom.getAttribute("style"),a=(o={},P(v(r=i)?r.split(";"):[],function(e){var t=e.split(":");2===t.length&&(o[$t(t[0])]=$t(t[1]))}),o),u={};return P(t,function(e){var t=a[e];void 0===t||n(t,e)||(u[e]=t)}),u}function nc(t){return N(be(t),function(e){return e+": "+t[e]}).join("; ")}function rc(e,t){var n,r,o,i,a,u=tc(e,Fc,t);!function(n,e,t){St(n,"style","");var r,o,i=me(e),a=me(t);0===i&&0===a?kt(n,"style"):0===i?St(n,"style",nc(t)):(se(e,function(e,t){vu(n,t,e)}),r=At(n,"style"),o=0<a?nc(t)+"; ":"",St(n,"style",o+r))}(e,(r=t,i=c(o=(n=e).dom.style)?[]:o,a={},P(i,function(t){bu(n,t).each(function(e){r(e,t)||(a[t]=e)})}),a),u)}function oc(e,t){var n,r,o,i,a,u,c,s=(n=t,r={},P(e.dom.attributes,function(e){n(e.value,e.name)||(r[e.name]=e.value)}),r);i=s,c=N((o=e).dom.attributes,function(e){return e.name}),me(i)!==c.length&&(a=o,u=i,P(c,function(e){kt(a,e)}),se(u,function(e,t){St(a,t,e)}))}function ic(e,t,s){e(s,function(u,c){return _(t,function(e){return t=s,n=u,r=c,o=e.name,i=void 0!==e.condition?e.condition:w,a=void 0!==e.value?e.value:Mc.all(),Mc.matches(o,r)&&Mc.matches(a,n)&&i(t);var t,n,r,o,i,a})})}function ac(e,t,n){var r,o,i=Jt.fromDom(e);switch(e.nodeType){case 1:t?r=Uc:(r=jc,hu(i,n||{}));var a=e,u=("HTML"!==a.scopeName&&a.scopeName&&a.tagName&&a.tagName.indexOf(":")<=0?a.scopeName+":"+a.tagName:a.tagName).toLowerCase();break;case 3:r=Hc,o=e.nodeValue;break;case 8:r=Wc,o=e.nodeValue;break;default:console.log("WARNING: Unsupported node type encountered: "+e.nodeType)}return{getNode:b(e),tag:function(){return u},type:function(){return r},text:function(){return o}}}function uc(e,t,n,r){var o=r.createElement(e);return se(t,function(e,t){o.setAttribute(t,e+"")}),ac(o,!1,n)}function cc(e,t){return ac(t.createElement(e),!0)}function sc(i){function a(e){c.appendChild(e)}var u=i.createDocumentFragment(),c=u;return{dom:u,receive:function(e){var t,n,r,o;switch(e.type()){case jc:o=e.getNode().cloneNode(!1),a(r=o),c=r;break;case Hc:n=i.createTextNode(e.text()),a(n);break;case Uc:t=c.parentNode,c=null===t?u:t;break;case Wc:break;default:throw new Error("Unsupported token type: "+e.type())}},label:"SERIALISER"}}function lc(n){return function(e){var t,r;t=e,r=Nc({styles:[],attributes:[],classes:[],tags:[]},n),P(ei(t,"*"),function(n){ic(rc,r.styles,n),ic(oc,r.attributes,n),P(r.classes,function(t){P(Dt(n,"class")?(ua(n)?function(e){for(var t=e.dom.classList,n=new Array(t.length),r=0;r<t.length;r++){var o=t.item(r);null!==o&&(n[r]=o)}return n}:ca)(n):[],function(e){Mc.matches(t.name,e)&&la(n,e)})})}),P(ei(t,"*"),function(e){_(r.tags,A(ec,e))&&_u(e)})}}function fc(r){return function(e){var t=e,n=Nc({tags:[]},r);P(ei(t,"*"),function(e){_(n.tags,A(ec,e))&&cu(e)})}}function dc(r){return function(e){var t=e,n=Nc({tags:[]},r);P(ei(t,"*"),function(t){j(n.tags,A(ec,t)).each(function(e){e.mutate(t)})})}}function mc(r){return function(e){var t=Tu(e),n=function(e,t,n){for(var o=sc(e),r=function(e,r){var o=(r=void 0===r?window.document:r).createElement("div");r.body.appendChild(o),o.style.position="absolute",o.style.left="-10000px",o.innerHTML=e;var i=o.firstChild||Bc,a=[],u=!1;return{hasNext:function(){return void 0!==i},next:function(){var e=i,t=i,n=u;return!u&&e.firstChild?(a.push(e),i=e.firstChild):u=!u&&1===e.nodeType||(e.nextSibling?(i=e.nextSibling,!1):(i=a.pop(),!0)),t===Bc||i||(r.body.removeChild(o),i=Bc),t===Bc?t:t?ac(t,n):void 0}}}(t,e),i=function(e,t){for(var n=o,r=t.length-1;0<=r;r--)n=t[r](n,{},e);return n}(e,n);r.hasNext();){var a=r.next();i.receive(a)}return o.dom}(qo(e).dom,t,r);uu(e),e.dom.appendChild(n)}}function pc(t,e,n){var r=Jt.fromTag("div",t.dom);hu(r,{position:"fixed",left:"-100000px",top:"0px"}),za(function(){var e=t.dom.body;if(null==e)throw new Error("Body is not available yet");return Jt.fromDom(e)}(),r),r.dom.innerHTML=e,P(n,function(e){e(r)});var o=Tu(r);return _u(r),o}function gc(i,e){return function(t){function n(e){t.receive(e)}function r(e,t,n){return ac(t,n=void 0!==n?n:e.type()===Uc,{})}var o={emit:n,emitTokens:function(e){P(e,n)},receive:function(e){i(o,e,r)},document:window.document};return e(o),o}}function vc(e,t){if(void 0===e||void 0===t)throw console.trace(),new Error("brick");e.nextFilter.set(t)}function hc(e,t,n,r){var o=n.getCurrentListType(),i=n.getCurrentLevel()==r.level()?o:null,a=r.emblems(),u=i;return j(a,function(e){return"ul"===e.tag||v(u)&&zc(e,u,!0)}).orThunk(function(){return $(a)}).filter(function(e){return!("ol"===e.tag&&function(e){if(E(["p"],e.tag())){var t=At(Jt.fromDom(e.getNode()),"class");return v(t)&&/^MsoHeading/.test(t)}return 1}(t))})}function yc(e,t,n){return{pred:e,action:t,label:b(n)}}var bc,xc,wc,Tc=function(a){var u=A(ht,a);function t(n,r){var e,t,o=u(),i=(t="callback_"+(e=void 0===o.count?0:o.count),o.count=e+1,t);return o.callbacks[i]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r||c(i),n.apply(void 0,e)},a+".callbacks."+i}ht("callbacks",u());function c(e){var t=e.substring(e.lastIndexOf(".")+1),n=u();void 0!==n.callbacks[t]&&delete n.callbacks[t]}return{ephemeral:function(e){return t(e,!1)},permanent:function(e){return t(e,!0)},unregister:c}}("ephox.henchman.features"),Ic=(wc={},bc={getOrSetIndexed:function(e,t){return void 0!==wc[e]?wc[e]:(n=e,r=t(),wc[n]=r);var n,r},waitForLoad:function(){return De(de(wc,o))}},{preload:function(){xc().get(o)},addStylesheet:function(e,t){return bc.getOrSetIndexed(e,function(){return qu(e,t)})},addScript:function(e,t){return bc.getOrSetIndexed(e,function(){return i=e,We.nu(function(t){function e(){r.unbind(),o.unbind()}var n=Jt.fromTag("script");St(n,"src",i),St(n,"type","text/javascript"),St(n,"async","async"),St(n,"data-main",Tc.ephemeral(function(e){t(Ji.value(e))}));var r=Ra(n,"error",function(){e(),t(Ji.error("Error loading external script tag "+i))}),o=Ra(n,"load",e);za(Jt.fromDom(document.head),n)}).map(t);var i})},waitForLoad:xc=function(){return bc.waitForLoad()}}),Sc={loadScript:function(e,r){return new Ue(function(t,n){Ic.addScript(r,o).get(function(e){e.fold(n,t)})})}},Oc=ge([{error:["message"]},{paste:["elements","correlated"]},{cancel:[]},{incomplete:["elements","correlated","message"]}]),Ac=Oc.error,Cc=Oc.paste,Dc=Oc.cancel,kc=Oc.incomplete,Lc=["officeStyles","htmlStyles","gdocsStyles","isWord","isGoogleDocs","proxyBin","isInternal","backgroundAssets"],Ec=function(t){return z(Lc,function(e){return re.from(t[e])})},_c={response:Dc(),bundle:Ec({})},Nc=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var o,i=e[r];for(o in i)Te(i,o)&&(n[o]=(n[o],i[o]))}return n},Pc=ge([{starts:["value","f"]},{pattern:["regex","f"]},{contains:["value","f"]},{exact:["value","f"]},{all:[]},{not:["stringMatch"]}]),Rc=function(e,n){return e.fold(function(e,t){return 0===t(n).indexOf(t(e))},function(e,t){return e.test(t(n))},function(e,t){return 0<=t(n).indexOf(t(e))},function(e,t){return t(n)===t(e)},w,function(e){return!Rc(e,n)})},Mc={starts:Pc.starts,pattern:Pc.pattern,contains:Pc.contains,exact:Pc.exact,all:Pc.all,not:Pc.not,cata:function(e,t,n,r,o,i,a){return e.fold(t,n,r,o,i,a)},matches:Rc,caseSensitive:o,caseInsensitive:function(e){return e.toLowerCase()}},Fc=["mso-list"],jc="startElement",Uc="endElement",Hc="text",Wc="comment",Bc=cc("html",window.document),zc=function(e,t,n){return void 0===n&&(n=!1),e===t||v(e)&&v(t)&&e.tag===t.tag&&e.type===t.type&&(n||e.variant===t.variant)};function $c(e,r,o){function t(e,t,n){j(r,function(e){return e.pred(t,n)}).fold(b(o),function(e){return e.action})(e,t,n)}return t.toString=function(){return"Handlers for "+e},t}function qc(e,t){return{state:b(e),result:b(t)}}function Vc(e,t){return{state:b(e),value:b(t)}}function Gc(e,t,n,r){return{level:b(e),type:b(t),types:b(n),items:b(r)}}function Kc(e){var t=e.items().slice(0);if(0<t.length&&"p"!==t[t.length-1]){var n=t[t.length-1];return t[t.length-1]="p",Vc(Gc(e.level(),e.type(),e.types(),t),re.some(n))}return Vc(e,re.none())}function Xc(e,t,n){for(var r=[],o=e;t(o);)var i=n(o),o=i.state(),r=r.concat(i.result());return qc(o,r)}function Jc(e,t,n){var r=t.start&&1<t.start?{start:t.start}:{},o=e.level()+1,i=t,a=e.types().concat([t]),u=[A(uc,t.tag,r,n)];return qc(Gc(o,i,a,e.items()),u)}function Yc(e){var t=e.types().slice(0),n=[A(cc,t.pop().tag)];return qc(Gc(e.level()-1,t[t.length-1],t,e.items()),n)}function Zc(e,o,t){var n,r,i,a,u,c,s,l,f=o?v(l=yu(Jt.fromDom(o.getNode()),"margin-left"))&&"0px"!==l?{"margin-left":l}:{}:{"list-style-type":"none"},d=e.type()&&!zc(e.type(),t)?(n=t,qc((i=Jc((r=Yc(e)).state(),n,n.type?{"list-style-type":n.type}:{})).state(),r.result().concat(i.result()))):qc(e,[]),m=[A(uc,"li",{},f)],p=(a=d.state(),u=o&&o.tag(),c=a.items().slice(0),(s=void 0!==u&&"p"!==u?re.some(u):re.none()).fold(function(){c.push("p")},function(e){c.push(e)}),Vc(Gc(a.level(),a.type(),a.types(),c),s)),g=p.value().map(function(e){var t=o,n=t.getNode(),r=w;return rc(Jt.fromDom(n),r),[b(t)]}).getOr([]);return qc(p.state(),d.result().concat(m).concat(g))}function Qc(e){var t=A(cc,"li"),n=Kc(e),r=n.value().fold(function(){return[t]},function(e){return[A(cc,e),t]});return qc(n.state(),r)}function es(e){if(0===e.length)throw new Error("Compose must have at least one element in the list");var t=e[e.length-1],n=W(e,function(e){return e.result()});return qc(t.state(),n)}function ts(e){var t=Qc(e),n=Yc(t.state());return es([t,n])}function ns(e,t){return n=t,Xc(e,function(e){return e.level()>n},ts);var n}function rs(e,t,n,r){var o,i,a,u,c,s,l,f,d,m,p,g,v,h,y,b,x,w=e.level()>t?ns(e,t):qc(e,[]),T=w.state().level()===t?(d=r,m=n,g=Zc((p=0<(f=w.state()).level()?Qc(f):qc(f,[])).state(),m,d),es([p,g])):(o=w.state(),i=r,u=n,s=(c=1<(a=t)?Kc(o):Vc(o,re.none())).value().map(function(e){return[A(cc,e)]}).getOr([]),v=c.state(),h=i,b=u,x=y=a,qc((l=Xc(v,function(e){return e.level()<x},function(e){return n=h,r=y,o=b,i=(t=e).level()===r-1&&n.type?{"list-style-type":n.type}:{},u=Zc((a=Jc(t,n,i)).state(),a.state().level()==r?o:void 0,n),es([a,u]);var t,n,r,o,i,a,u})).state(),s.concat(l.result())));return es([w,T])}function os(e){for(var t=[];null!==e.nextNode();)t.push(Jt.fromDom(e.currentNode));return t}function is(e){return e.dom.textContent}function as(e){var t=tc(e,["mso-list"],x)["mso-list"],n=v(t)&&/ level([0-9]+)/.exec(t);return n&&n[1]?re.some(parseInt(n[1],10)):re.none()}function us(e,t){var u,n,r,o,i,a=is(e).trim(),c=(r=js[u=a]?[js[u]]:[],o=(n=t)&&Fs[u]?[Fs[u]]:n?[{tag:"ul",variant:u}]:[],i=W(Ms,function(e){return e.regex.test(u)?[Nc(e.type,(o=(r=u).split("."),i=function(){if(0===o.length)return r;var e=o[o.length-1];return 0===e.length&&1<o.length?o[o.length-2]:e}(),a=parseInt(i,10),isNaN(a)?{}:{start:a}),{variant:(t=e.type,n=u,I(t.variant)?"("===n.charAt(0)?"()":")"===n.charAt(n.length-1)?")":".":t.variant)})]:[];var t,n,r,o,i,a}),N(r.concat(o).concat(i),function(e){return void 0!==e.variant?e:Nc(e,{variant:u})}));return 0<c.length?re.some(c):re.none()}function cs(e){return ga(e,wt).bind(Jo).filter(Tt("span"))}function ss(e){return va(e,function(e){return(Vt(e)?tc(e,["mso-list"],x):{})["mso-list"]})}function ls(e){P(function(e){var t=re.none().fold(Rs,function(t){return function(e){return t(e.nodeValue)}});t.acceptNode=t;var n,r,o=document.createTreeWalker(e.dom,NodeFilter.SHOW_COMMENT,t,!1);return n=o,((r=Di().browser).isIE()||r.isEdge()?function(e){try{return os(e)}catch(e){return[]}}:os)(n)}(e),_u)}function fs(e,t,n,r){var o,i;i=n,St(o=e,"data-list-level",t),St(o,"data-list-emblems",JSON.stringify(i)),ls(e),P(r,_u),kt(e,"style"),kt(e,"class")}function ds(e){return as(r=e).bind(function(n){return ga(r,Us).bind(function(t){return us(t,!0).map(function(e){return{mutate:function(){fs(r,n,e,[t])}}})})}).orThunk(function(){return as(r=e).bind(function(n){return cs(r).bind(function(t){return us(t,Us(t)).map(function(e){return{mutate:function(){fs(r,n,e,[t])}}})})});var r}).orThunk(function(){return as(r=e).bind(function(n){return cs(r).bind(function(t){return us(t,Us(t)).map(function(e){return{mutate:function(){fs(r,n,e,[t])}}})})});var r}).orThunk(function(){return"p"!==yt(r=e)?re.none():as(r).bind(function(n){return ss(r).bind(function(t){return us(t,!1).map(function(e){return{mutate:function(){fs(r,n,e,[Ko(t).getOr(t)])}}})})});var r}).orThunk(function(){return"p"!==yt(r=e)?re.none():ss(r).bind(function(e){var n=Ko(e).getOr(e);return us(e,Us(n)).bind(function(t){return bu(r,"margin-left").bind(function(e){var t=parseInt(e,10);return isNaN(t)?re.none():re.some(Math.max(1,Math.ceil(t/18)))}).map(function(e){return{mutate:function(){fs(r,e,t,[n])}}})})});var r});var r}function ms(e){return(wt(t=e)?(r="v:shape",re.from(t.dom.nodeValue).bind(function(e){var t=e.indexOf("]>"),n=function(t){try{return(new DOMParser).parseFromString(t,"text/html").body}catch(e){var n=document.implementation.createHTMLDocument("").body;return n.innerHTML=t,n}}("<div>"+e.slice(t+"]>".length,e.lastIndexOf("<!["))+"</div>");return va(Jt.fromDom(n),function(e){return yt(e)===r})})):re.none()).map(function(e){var t,n,r,o=At(e,"o:spid"),i=void 0===o?Ct(e,"id").getOr(""):o,a=Jt.fromTag("img");return sa(a,"rtf-data-image"),St(a,"data-image-id",i.substr("_x0000_".length)),St(a,"data-image-type","code"),t=a,n={width:bu(e,"width"),height:bu(e,"height")},r=t.dom,se(n,function(e,t){e.fold(function(){gu(r,t)},function(e){pu(r,t,e)})}),a});var r,t}function ps(e){if(Tt("img")(e)){var t=At(e,"src");if(null!=t&&Bt(t,"file://")){var n=Jt.fromDom(e.dom.cloneNode(!1)),r=t.split(/[\/\\]/);return St(n,"data-image-id",r[r.length-1]),kt(n,"src"),St(n,"data-image-type","local"),sa(n,"rtf-data-image"),re.some(n)}return re.none()}return re.none()}var gs,vs,hs,ys,bs,xs,ws,Ts,Is,Ss,Os=ns,As=["disc","circle","square"],Cs={getCurrentListType:function(){return Ds().getCurrentListType()},getCurrentLevel:function(){return Ds().getCurrentLevel()},closeAllLists:function(){return Ds().closeAllLists()},openItem:function(e,t,n){return Ds().openItem(e,t,n)}},Ds=function(){return{getCurrentListType:b({}),getCurrentLevel:b(1),closeAllLists:S,openItem:o}},ks={inside:function(){return Es},outside:function(){return _s}},Ls=(gs=!1,{check:function(e){return!(!gs||e.type()!==Hc)||(e.type()===jc&&"style"===e.tag()?gs=!0:e.type()===Uc&&"style"===e.tag()&&!(gs=!1))}}),Es=(vs=ks,$c("Inside.List.Item",[yc(function(e,t){var n=e.originalToken.get();return t.type()===Uc&&null!==n&&t.tag()===n.tag()},function(e,t){vc(t,vs.outside())},"Closing open tag")],function(e,t,n){e.emit(n)})),_s=$c("Outside.List.Item",[yc(function(e,t){return Dt(Jt.fromDom(t.getNode()),"data-list-level")},(Ss=hs=ks,function(e,t,n){var r,o,i,a,u=n,c=(r=Jt.fromDom(u.getNode()),o=parseInt(At(r,"data-list-level"),10),a=v(i=At(r,"data-list-emblems"))?JSON.parse(i):[],kt(r,"data-list-level"),kt(r,"data-list-emblems"),{level:b(o),emblems:b(a)});t.originalToken.set(u);var s,l,f,d=(s=u,l=c,hc((f=t).listType.get(),s,f.emitter,l).each(f.listType.set),{level:b(l.level()),token:b(f.originalToken.get()),type:b(f.listType.get())});t.emitter.openItem(d.level(),d.token(),d.type()),vc(t,Ss.inside())}),"Data List ****"),yc(function(e,t){return t.type()===Hc&&(n=t).type()===Hc&&/^[\s\u00A0]*$/.test(n.text());var n},function(e,t,n){e.emit(n)},"Whitespace")],function(e,t,n){t.emitter.closeAllLists(),e.emit(n),vc(t,hs.outside())}),Ns=(bs=Ea(ys=_s),xs=Ea(null),ws=Ea(null),{reset:function(e){function i(e){P(e.result(),function(e){var t=e(r);n.emit(t)})}var n,r,a;bs.set(ys),xs.set(null),ws.set(null),Ds=b((r=(n=e).document,a=Gc(0,void 0,[],[]),{closeAllLists:function(){var e=Os(a,0);a=e.state(),i(e)},openItem:function(e,t,n){var r,o;n&&(r="ul"===n.tag&&As[e-1]===n.type?{tag:"ul"}:n,o=rs(a,e,t,r),a=o.state(),i(o))},getCurrentListType:function(){return a.type()},getCurrentLevel:function(){return a.level()}}))},nextFilter:bs,originalToken:xs,listType:ws,emitter:Cs}),Ps=gc(function(e,t,n){var r,o,i;Ls.check(t)||(r=e,i=t,(o=Ns).nextFilter.get()(r,o,i))},Ns.reset),Rs=b(w),Ms=[{regex:/^\(?[dc][\.\)]$/,type:{tag:"ol",type:"lower-alpha"}},{regex:/^\(?[DC][\.\)]$/,type:{tag:"ol",type:"upper-alpha"}},{regex:/^\(?M*(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})[\.\)]$/,type:{tag:"ol",type:"upper-roman"}},{regex:/^\(?m*(cm|cd|d?c{0,3})(xc|xl|l?x{0,3})(ix|iv|v?i{0,3})[\.\)]$/,type:{tag:"ol",type:"lower-roman"}},{regex:/^\(?[0-9]+[\.\)]$/,type:{tag:"ol"}},{regex:/^([0-9]+\.)*[0-9]+\.?$/,type:{tag:"ol",variant:"outline"}},{regex:/^\(?[a-z]+[\.\)]$/,type:{tag:"ol",type:"lower-alpha"}},{regex:/^\(?[A-Z]+[\.\)]$/,type:{tag:"ol",type:"upper-alpha"}}],Fs={"\u2022":{tag:"ul",type:"disc"},"\xb7":{tag:"ul",type:"disc"},"\xa7":{tag:"ul",type:"square"}},js={o:{tag:"ul",type:"circle"},"-":{tag:"ul",type:"disc"},"\u25cf":{tag:"ul",type:"disc"},"\ufffd":{tag:"ul",type:"circle"}},Us=function(e){return Vt(e)&&bu(e,"font-family").exists(function(e){return E(["wingdings","symbol"],e.toLowerCase())})},Hs=dc({tags:[{name:Mc.pattern(/^(p|h\d+)$/,Mc.caseInsensitive),mutate:function(e){ds(e).each(function(e){e.mutate()})}}]}),Ws=Ps;function Bs(o){return function(r){Ct(r,o.attrName).each(function(e){var t,n=v(o.styleName)?o.styleName:o.attrName;bu(r,n).isNone()&&(t=o.mapValue(e),vu(r,n,t)),kt(r,o.attrName)})}}function zs(e){var t=e.toString(16);return(1===t.length?"0"+t:t).toUpperCase()}function $s(e){return{value:zs(e.red)+zs(e.green)+zs(e.blue)}}function qs(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}}function Vs(e,t,n,r){return qs(parseInt(e,10),parseInt(t,10),parseInt(n,10),parseFloat(r))}function Gs(r){return"currentcolor"===r||"transparent"===r?r:"#"+(e=pt(r,"#").toUpperCase(),(il.test(t=e)||al.test(t)?re.some({value:pt(e,"#").toUpperCase()}):re.none()).orThunk(function(){return function(e){if("transparent"===e)return re.some(qs(0,0,0,0));var t=ul.exec(e);if(null!==t)return re.some(Vs(t[1],t[2],t[3],"1"));var n=cl.exec(e);return null!==n?re.some(Vs(n[1],n[2],n[3],n[4])):re.none()}(r).map($s)}).getOrThunk(function(){var e=document.createElement("canvas");e.height=1,e.width=1;var t=e.getContext("2d");t.clearRect(0,0,e.width,e.height),t.fillStyle="#FFFFFF",t.fillStyle=r,t.fillRect(0,0,1,1);var n=t.getImageData(0,0,1,1).data;return $s(qs(n[0],n[1],n[2],n[3]))}).value);var e,t}function Ks(e,t){switch(t){case"color":return Gs(e);case"font-family":return e.replace(/['"]/g,"");case"font-weight":return function(e){switch(e){case"bold":return"700";case"normal":return"400";default:return e}}(e);default:return zt(t,"-color")?Gs(e):e.replace(/^0(pt|px|pc|in|cm|mm|Q|cap|ch|ic|em|ex|lh|rlh|rem|vw|vh|vb|vi|vmax|vmin|%)$/,"0")}}function Xs(n){return dc({tags:[{name:Mc.exact(n.matchTag,Mc.caseInsensitive),mutate:function(t){pe(xu(t),n.key).exists(function(e){return E(n.values,e)})&&(Oa(t,Jt.fromTag(n.newTag)),wu(t,n.key),l(n.removeExtra)&&P(n.removeExtra,function(e){return wu(t,e),0}))}}]})}function Js(e,t){return va(e,t).isSome()}function Ys(e,t){var n=Jt.fromTag(e);Ta(t,n),P(t.dom.attributes,function(e){n.dom.setAttribute(e.name,e.value)});var r=Zo(t);return Aa(n,r),_u(t),n}function Zs(e){var i=Ys("span",e),a={"font-size":{1:"8pt",2:"10pt",3:"12pt",4:"14pt",5:"18pt",6:"24pt",7:"36pt"}};se({face:"font-family",size:"font-size",color:"color"},function(r,o){Ct(i,o).each(function(e){var t=a[r],n=void 0!==t&&void 0!==t[e]?t[e]:e;vu(i,r,n),kt(i,o)})})}function Qs(e){var t=Ys("span",e);sa(t,"ephox-limbo-transform"),vu(t,"text-decoration","underline")}(Is=Ts=Ts||{})[Is.Word=0]="Word",Is[Is.GoogleDocs=1]="GoogleDocs",Is[Is.Html=2]="Html";function el(e){var t=yt(e);return"td"===t||"tr"===t||"col"===t||"th"===t}function tl(e){var t=e.dom.attributes;return null==t||0===t.length||1===t.length&&"style"===t[0].name}var nl,rl,ol,il=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,al=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,ul=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)/,cl=/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d?(?:\.\d+)?)\)/,sl=dc({tags:[{name:Mc.pattern(/^(p|div)$/,Mc.caseInsensitive),mutate:function(t){var e="ltr"===Ou(t),n=e?"margin-left":"margin-right",r=e?"padding-left":"padding-right";bu(t,n).each(function(){var e=yu(t,n);vu(t,r,e),wu(t,n)})}}]}),ll=fc({tags:[{name:Mc.exact("b",Mc.caseInsensitive),condition:function(e){return Ct(e,"id").exists(function(e){return Bt(e,"docs-internal-guid")})}}]}),fl=lc({attributes:[{name:Mc.exact("id",Mc.caseInsensitive),value:Mc.starts("docs-internal-guid",Mc.caseInsensitive)}]}),dl=[dc({tags:[{name:Mc.exact("col",Mc.caseInsensitive),mutate:Bs({attrName:"width",mapValue:function(e){return e.replace(/^(\d+)$/,"$1px")}})}]})],ml=[Xs({matchTag:"span",key:"font-weight",values:["700","bold"],newTag:"strong"}),Xs({matchTag:"span",key:"font-style",values:["italic"],newTag:"em"}),Xs({matchTag:"span",key:"vertical-align",values:["sub"],newTag:"sub",removeExtra:["font-size"]}),Xs({matchTag:"span",key:"vertical-align",values:["super"],newTag:"sup",removeExtra:["font-size"]})],pl=["p","div","article","aside","details","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"],gl=lc({styles:[{name:Mc.exact("background-color",Mc.caseInsensitive),value:Mc.exact("transparent",Mc.caseInsensitive)},{name:Mc.exact("white-space",Mc.caseInsensitive),value:Mc.starts("pre",Mc.caseInsensitive)},{name:Mc.pattern(/^overflow(-[xy])?$/,Mc.caseInsensitive),condition:function(e){return el(e)&&fu(bu(e,"overflow"),"hidden")}},{name:Mc.exact("overflow-wrap",Mc.caseInsensitive),condition:el},{name:Mc.exact("table-layout",Mc.caseInsensitive),value:Mc.exact("fixed",Mc.caseInsensitive),condition:Tt("table")},{name:Mc.exact("line-height",Mc.caseInsensitive),value:Mc.exact("1.38",Mc.caseInsensitive)},{name:Mc.exact("vertical-align",Mc.caseInsensitive),value:Mc.exact("baseline",Mc.caseInsensitive)},{name:Mc.exact("font-style",Mc.caseInsensitive),value:Mc.exact("normal",Mc.caseInsensitive)},{name:Mc.exact("font-variant",Mc.caseInsensitive),value:Mc.exact("normal",Mc.caseInsensitive)},{name:Mc.exact("background-color",Mc.caseInsensitive),value:Mc.exact("transparent",Mc.caseInsensitive)},{name:Mc.starts("padding",Mc.caseInsensitive),condition:el},{name:Mc.pattern(/^text-decoration(-(line|thickness|style|color))?$/,Mc.caseInsensitive),condition:function(e){return!Tt("a")(e)&&fu(bu(e,"text-decoration"),"none")}}],attributes:[{name:Mc.exact("aria-level",Mc.caseInsensitive),condition:Tt("li")},{name:Mc.exact("dir",Mc.caseInsensitive),value:Mc.exact("ltr",Mc.caseInsensitive),condition:function(e){return E(pl,yt(e))}},{name:Mc.exact("role",Mc.caseInsensitive),value:Mc.exact("presentation",Mc.caseInsensitive),condition:function(e){return Tt("p")(e)&&Ko(e).exists(Tt("li"))}}]}),vl=lc({styles:[{name:Mc.exact("text-align",Mc.caseInsensitive),value:Mc.exact("right",Mc.caseInsensitive),condition:function(e){return"rtl"===Ou(e)}}]}),hl=dc({tags:[{name:Mc.exact("p",Mc.caseInsensitive),condition:function(t){function e(e){return bu(t,e).map(function(e){return parseInt(e,10)}).filter(function(e){return!isNaN(e)}).getOr(0)}var n=Ou(t);return e("text-indent")+e("rtl"===n?"padding-right":"padding-left")===0},mutate:function(e){var t=Ou(e);wu(e,"text-indent"),wu(e,"rtl"===t?"padding-right":"padding-left")}}]}),yl=Tt("li"),bl=function(e){return Xo(e).bind(function(e){return Gt(e)&&0===Za(e).trim().length?bl(e):yl(e)?re.some(e):re.none()})},xl=lc({tags:[{name:Mc.exact("script",Mc.caseInsensitive)},{name:Mc.exact("link",Mc.caseInsensitive)},{name:Mc.exact("style",Mc.caseInsensitive),condition:function(e){return 0===Tu(e).length}}],attributes:[{name:Mc.starts("on",Mc.caseInsensitive)},{name:Mc.exact('"',Mc.caseInsensitive)},{name:Mc.exact("lang",Mc.caseInsensitive)},{name:Mc.exact("language",Mc.caseInsensitive)}],styles:[{name:Mc.all(),value:Mc.pattern(/OLE_LINK/i,Mc.caseInsensitive)}]}),wl=lc({tags:[{name:Mc.exact("meta",Mc.caseInsensitive)}]}),Tl=lc({tags:[{name:Mc.exact("style",Mc.caseInsensitive)}]}),Il=lc({styles:[{name:Mc.not(Mc.pattern(/^(width|height|list-style-type)$/,Mc.caseInsensitive)),condition:function(e){return!fa(e,"ephox-limbo-transform")}},{name:Mc.pattern(/^(width|height)$/,Mc.caseInsensitive),condition:function(e){return"img"!==yt(e)&&!("table"===yt(t=e)||el(t));var t}}]}),Sl=lc({classes:[{name:Mc.not(Mc.exact("rtf-data-image",Mc.caseInsensitive))}]}),Ol=lc({styles:[{name:Mc.pattern(/^(mso-.*|tab-stops|tab-interval|language|text-underline|text-effect|text-line-through|font-color|horiz-align|list-image-[0-9]+|separator-image|table-border-color-(dark|light)|vert-align|vnd\..*)$/,Mc.caseInsensitive)}]}),Al=lc({classes:[{name:Mc.pattern(/mso/i,Mc.caseInsensitive)}]}),Cl=fc({tags:[{name:Mc.exact("img",Mc.caseInsensitive),condition:function(e){var t=At(e,"src");return O(t)&&/^file:/.test(t)}}]}),Dl=fc({tags:[{name:Mc.exact("a",Mc.caseInsensitive),condition:tl}]}),kl=lc({attributes:[{name:Mc.exact("style",Mc.caseInsensitive),value:Mc.exact("",Mc.caseInsensitive)}]}),Ll=lc({attributes:[{name:Mc.exact("class",Mc.caseInsensitive),value:Mc.exact("",Mc.caseInsensitive)}]}),El=fc({tags:[{name:Mc.pattern(/^(font|em|strong|samp|acronym|cite|code|dfn|kbd|tt|b|i|u|s|sub|sup|ins|del|var|span)$/,Mc.caseInsensitive),condition:(nl=function(e){return!tl(e)||(n=null!=(t=e.dom.attributes)&&0<t.length,("span"!==yt(e)||n)&&Js(e,function(e){var t=!tl(e),n=!E(["font","em","strong","samp","acronym","cite","code","dfn","kbd","tt","b","i","u","s","sub","sup","ins","del","var","span"],yt(e));return Gt(e)||t||n}));var t,n},function(e){return!nl(e)})}]}),_l=dc({tags:[{name:Mc.exact("p",Mc.caseInsensitive),mutate:function(e){0===Tu(e).length&&za(e,Jt.fromTag("br"))}}]}),Nl=dc({tags:[{name:Mc.pattern(/ol|ul/,Mc.caseInsensitive),mutate:function(t){Ko(t).each(function(e){E(["ol","ul"],yt(e))&&bl(t).fold(function(){var e=Jt.fromTag("li");vu(e,"list-style-type","none"),Oa(t,e)},function(e){za(e,t)})})}}]}),Pl=lc({classes:[{name:Mc.exact("ephox-limbo-transform",Mc.caseInsensitive)}]}),Rl=lc({tags:[{name:Mc.exact("br",Mc.caseInsensitive),condition:da("Apple-interchange-newline")}]}),Ml=lc({styles:[{name:Mc.pattern(/^-/,Mc.caseInsensitive)},{name:Mc.all(),value:Mc.exact("initial",Mc.caseInsensitive)},{name:Mc.exact("background-color",Mc.caseInsensitive),value:Mc.exact("transparent",Mc.caseInsensitive)},{name:Mc.exact("font-style",Mc.caseInsensitive),value:Mc.exact("normal",Mc.caseInsensitive)},{name:Mc.pattern(/font-variant.*/,Mc.caseInsensitive)},{name:Mc.exact("letter-spacing",Mc.caseInsensitive)},{name:Mc.exact("font-weight",Mc.caseInsensitive),value:Mc.pattern(/400|normal/,Mc.caseInsensitive)},{name:Mc.exact("orphans",Mc.caseInsensitive)},{name:Mc.exact("text-decoration",Mc.caseInsensitive),value:Mc.exact("none",Mc.caseInsensitive)},{name:Mc.exact("text-size-adjust",Mc.caseInsensitive)},{name:Mc.exact("text-indent",Mc.caseInsensitive),value:Mc.exact("0px",Mc.caseInsensitive)},{name:Mc.exact("text-transform",Mc.caseInsensitive),value:Mc.exact("none",Mc.caseInsensitive)},{name:Mc.exact("white-space",Mc.caseInsensitive),value:Mc.exact("normal",Mc.caseInsensitive)},{name:Mc.exact("widows",Mc.caseInsensitive)},{name:Mc.exact("word-spacing",Mc.caseInsensitive),value:Mc.exact("0px",Mc.caseInsensitive)},{name:Mc.exact("text-align",Mc.caseInsensitive),value:Mc.pattern(/start|end/,Mc.caseInsensitive)},{name:Mc.exact("font-weight",Mc.caseInsensitive),value:Mc.pattern(/700|bold/,Mc.caseInsensitive),condition:function(e){return/^h\d$/.test(yt(e))}}]}),Fl=(rl=jl(Xo,zt),ol=jl(Jo,Bt),dc({tags:[{name:Mc.exact("span",Mc.caseInsensitive),condition:da("Apple-converted-space"),mutate:function(e){"\xa0"===is(e)&&(rl(e)||ol(e)?cu(e):(Ta(e,Jt.fromText(" ")),_u(e)))}}]}));function jl(e,n){return function(t){return e(t).filter(function(e){return Gt(t)&&n(is(e)||""," ")}).isSome()}}var Ul,Hl=(Ul=/^file:\/\/\/[^#]+(#[^#]+)$/,dc({tags:[{name:Mc.exact("a",Mc.caseInsensitive),condition:function(e){var t=At(e,"href");return!!t&&Ul.test(t)},mutate:function(t){Ct(t,"href").each(function(e){St(t,"href",e.replace(Ul,"$1"))})}}]})),Wl=lc({attributes:[{name:Mc.exact("href",Mc.caseInsensitive),value:Mc.starts("file:///",Mc.caseInsensitive)}]}),Bl=dc({tags:[zl("a","data-ephox-href","href"),zl("img","data-ephox-src","src")]});function zl(e,n,r){return{name:Mc.exact(e,Mc.caseInsensitive),condition:function(e){return Dt(e,n)},mutate:function(t){Ct(t,n).each(function(e){St(t,r,e),kt(t,n)})}}}function $l(a){var u=["table","thead","tbody","tfoot","th","tr","td","ul","ol","li"],e=Ri(a,wt),t=j(e,function(e){return vt(Fa(e),"StartFragment")}),n=j(e,function(e){return vt(Fa(e),"EndFragment")});t.each(function(i){n.each(function(e){for(var t,n=i,r=[],o=(t=eu(i,0,e,0),Jt.fromDom(t.commonAncestorContainer));void 0!==o&&!$o(o,a);)E(u,yt(o))?n=o:r.push(o),o=Ko(o).getOrUndefined();P(r,cu),P(Yo(n),_u)}),_u(i)}),n.each(_u)}function ql(e,t){return Cu.getOption(e).exists(function(e){return 0===t(e).length})}function Vl(e){return P(Zo(e),function(e){ql(e,$t)&&_u(e)})}var Gl=dc({tags:[{name:Mc.pattern(/^(img|table)$/,Mc.caseInsensitive),mutate:function(e){bu(e,"margin-left").exists(function(e){return Bt(e,"-")})&&wu(e,"margin-left"),Bt(yu(e,"margin-left"),"-")&&(vu(e,"margin-top",yu(e,"margin-top")),vu(e,"margin-bottom",yu(e,"margin-bottom")),vu(e,"margin-right",yu(e,"margin-right")),wu(e,"margin"))}}]}),Kl=dc({tags:[{name:Mc.exact("p",Mc.caseInsensitive),mutate:Bs({attrName:"align",styleName:"text-align",mapValue:o})}]}),Xl=lc({tags:[{name:Mc.exact("font",Mc.caseInsensitive),condition:function(e){function t(e){return e.replace(/[ \r\n\uFEFF]+/g,"")}var n=Zo(e);return 0===n.length||B(n,function(e){return ql(e,t)})}}]}),Jl=dc({tags:[{name:Mc.exact("ol",Mc.caseInsensitive),mutate:Vl},{name:Mc.exact("ul",Mc.caseInsensitive),mutate:Vl}]}),Yl=fc({tags:[{name:Mc.pattern(/^([OVWXP]|U[0-9]+|ST[0-9]+):/i,Mc.caseInsensitive)}]}),Zl=[mc([Ws])],Ql=lc({attributes:[{name:Mc.exact("height",Mc.caseInsensitive),condition:Tt("table")}]}),ef=lc({attributes:[{name:Mc.pattern(/^(width|height)$/,Mc.caseInsensitive),condition:el}]}),tf=dc({tags:[{name:Mc.exact("table",Mc.caseInsensitive),mutate:Bs({attrName:"width",mapValue:function(e){return e.replace(/^(\d+)$/,"$1px")}})}]}),nf=lc({styles:[{name:Mc.exact("height",Mc.caseInsensitive),condition:Tt("td")},{name:Mc.exact("width",Mc.caseInsensitive),condition:Tt("tr")},{name:Mc.exact("height",Mc.caseInsensitive),condition:Tt("col")}]}),rf=lc({attributes:[{name:Mc.pattern(/^v:/,Mc.caseInsensitive)},{name:Mc.exact("href",Mc.caseInsensitive),value:Mc.contains("#_toc",Mc.caseInsensitive)},{name:Mc.exact("href",Mc.caseInsensitive),value:Mc.contains("#_mso",Mc.caseInsensitive)},{name:Mc.pattern(/^xmlns(:|$)/,Mc.caseInsensitive)},{name:Mc.exact("type",Mc.caseInsensitive),condition:function(e){return"ol"===yt(e)||"ul"===yt(e)}}]}),of=fc({tags:[{name:Mc.exact("p",Mc.caseInsensitive),condition:function(e){return Ko(e).exists(function(e){return"li"===yt(e)&&1===Zo(e).length})}}]});function af(e){return e.browser.isIE()&&11<=e.browser.version.major}function uf(n,r){var e,t,o,i,a,u,c,s,l,f,d,m,p,g,v,h,y,b,x,w=r.merge,T=(e=r,i=(o=(t=n).browser.isFirefox()||t.browser.isEdge())?ps:ms,a=!o,u=af(t)?S:mc([(l=i,f=a,gc(function(e,t){var r,o,n=(r=t,o=f,l(Jt.fromDom(r.getNode())).fold(function(){return[r]},function(e){var t=r.type()===Uc,n=[ac(e.dom,t)];return!t&&o&&n.push(ac(e.dom,!0)),n}));e.emitTokens(n)},S))]),{annotate:[e.type===Ts.Word?u:S],local:[o?S:Cl]});return H([T.local,(s=r,af(n)||s.type!==Ts.Word?[]:[Hs]),r.type===Ts.GoogleDocs?[ll]:[],T.annotate,(b=w?[]:r.cleanFilteredInlineElements,[Xl,Jl,(x=b,dc({tags:M([{name:"b",transform:{mutate:A(Ys,"strong")}},{name:"i",transform:{mutate:A(Ys,"em")}},{name:"u",transform:{mutate:Qs}},{name:"s",transform:{mutate:A(Ys,"strike")}},{name:"font",transform:{mutate:Zs,debug:!0}}],function(e){return!E(x,e.name)}).map(function(e){return ue({name:Mc.exact(e.name,Mc.caseInsensitive)},e.transform)})}))]),function(){if(r.type!==Ts.Word)return[];var e=[Yl],t=af(n)?[]:Zl;return e.concat(t).concat([rf])}(),(h=n,(v=r).type===Ts.GoogleDocs?ce(ce(ce(ce([gl],ml),dl),[(y=h,function(e){var r=[],i={border:y.browser.isFirefox()?"medium none":"none","text-decoration":"none"},o=function(t,e){var n;I(e)||(n=Jt.fromTag(yt(t)),za(e,n),r.push({me:t,fake:n})),P(M(Zo(t),Vt),function(e){return o(e,t)})};o(e),P(N(r,function(e){var r=e.fake,n=e.me,t=fe(xu(n),function(e,t){var n=yu(r,t);return Ks(e,t)===Ks(n,t)}),o=fe(i,function(e,t){return fu(bu(n,t),e)});return{fake:r,me:n,toRemove:t,toPreserve:o}}),function(e){var n=e.me,t=e.toRemove,r=e.toPreserve,o=e.fake;se(t,function(e,t){wu(n,t)}),se(r,function(e,t){vu(n,t,e)}),_u(o)})}),vl,hl]),v.type!==Ts.GoogleDocs||v.indentUseMargin?[]:[sl]):[]),[fl],[Nl],[xl],[wl],(p=[Kl,Ol,Al],g=[Kl,Il,fc({tags:N(m=void 0===(m=(d=r).cleanFilteredInlineElements)?[]:m,function(e){return{name:Mc.exact(e,Mc.caseInsensitive)}})}),Sl],d.merge?p:g),[Hl,Wl,Dl,Bl],[kl],[Ll],[El],[Rl],r.type===Ts.Html&&r.merge?[Ml]:[],[Fl],[_l],(c=r,af(n)&&c.type===Ts.Word?[of]:[]),[Gl],r.type===Ts.Word?[nf,tf,ef,Ql]:[],[Pl],[Tl]])}function cf(e,t){void 0===t&&(t=2);var n=Math.pow(10,t),r=Math.round(e*n);return Math.ceil(r/n)}function sf(e,t,n,r,o){return a=t,u=n,c=r,s=o,(i=e).toCanvas().then(function(e){return yf(e,i.getType(),a,u,c,s)});var i,a,u,c,s}function lf(e){return parseInt(e,10)}function ff(e){return e.isPx&&(e.cropWidth!==e.width||e.cropHeight!==e.height)}function df(o,i){return function(r){return e=yu(i,"transform"),re.from(bf.exec(e)).map(function(e){return Math.round(parseFloat(e[1])*(180/Math.PI))}).fold(function(){return Ue.resolve(r)},function(e){return n=e,(t=r).toCanvas().then(function(e){return hf(e,t.getType(),n)}).then(function(e){return wu(i,"transform"),kt(o,"width"),kt(o,"height"),e});var t,n});var e}}function mf(n,e,t){return ct(n.dom).then((a=e,function(e){return t=a.width,n=a.height,o=t,i=n,(r=e).toCanvas().then(function(e){return gf(e,o,i).then(function(e){return at(e,r.getType())})});var t,n,r,o,i})).then((r=n,o=e,function(e){if(ff(o)){var t=-1*lf(yu(r,"margin-top"));return sf(e,-1*lf(yu(r,"margin-left")),t,o.cropWidth,o.cropHeight).then(function(e){return Ot(r,{width:o.cropWidth,height:o.cropHeight}),e})}return Ue.resolve(e)})).then(df(n,t)).then(function(e){var t=lt(e);return St(n,"src",t),Ue.resolve()});var r,o,a}function pf(f){return Ko(f).filter(Tt("span")).map(function(i){function e(){var r,o,e,t,n=i;wu(t=f,"margin-top"),wu(t,"margin-left"),wu(n,"width"),wu(n,"height"),wu(n,"overflow"),wu(n,"display"),o=t,e=["transform"],Vt(r=n)&&Vt(o)&&P(e,function(e){var t,n=o;bu(r,t=e).each(function(e){bu(n,t).isNone()&&vu(n,t,e)})}),wu(n,"transform")}var t,n,r,o,a,u,c,s=(t=f,r=yu(n=i,"width"),o=yu(n,"height"),a=l(t,"width"),u=l(t,"height"),{isPx:(c=/^\d+px$/).test(r)&&c.test(o),cropWidth:lf(r),cropHeight:lf(o),width:a,height:u});function l(e,t){return Ct(e,t).map(lf).filter(function(e){return!isNaN(e)}).getOr(0)}return(ff(s)||bf.test(yu(i,"transform"))?mf(f,s,i):Ue.resolve()).then(e,e)}).getOrThunk(function(){return Ue.resolve()})}dc({tags:[{name:Mc.pattern(/^(img|table)$/,Mc.caseInsensitive),mutate:function(e){bu(e,"margin-left").exists(function(e){return Bt(e,"-")})&&wu(e,"margin-left"),Bt(yu(e,"margin-left"),"-")&&(vu(e,"margin-top",yu(e,"margin-top")),vu(e,"margin-bottom",yu(e,"margin-bottom")),vu(e,"margin-right",yu(e,"margin-right")),wu(e,"margin"))}}]}),ge([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var gf=function(e,t,n){var r=_e(e),o=Ne(e),i=t/r,a=n/o,u=!1;(i<.5||2<i)&&(i=i<.5?.5:2,u=!0),(a<.5||2<a)&&(a=a<.5?.5:2,u=!0);var c=vf(e,i,a);return u?c.then(function(e){return gf(e,t,n)}):c},vf=function(a,u,c){return new Ke(function(e){var t=_e(a),n=Ne(a),r=Math.floor(t*u),o=Math.floor(n*c),i=Le(r,o);Ve(i).drawImage(a,0,0,t,n,0,0,r,o),e(i)})},hf=function(e,t,n){var r=(n<0?360+n:n)*Math.PI/180,o=e.width,i=e.height,a=Math.sin(r),u=Math.cos(r),c=cf(Math.abs(o*u)+Math.abs(i*a)),s=cf(Math.abs(o*a)+Math.abs(i*u)),l=Le(c,s),f=Ve(l);return f.translate(c/2,s/2),f.rotate(r),f.drawImage(e,-o/2,-i/2),at(l,t)},yf=function(e,t,n,r,o,i){var a=Le(o,i);return Ve(a).drawImage(e,-n,-r),at(a,t)},bf=/rotate\((\d\.\d+)rad\)/,xf=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"];function wf(e,t){return U(e,function(e){return e.start===t})}function Tf(e,t,n){return{element:e,start:t,finish:n}}function If(e){return ue(ue({},e),{isBoundary:function(){return e.fold(ud,ad,ad,ad)},toText:function(){return e.fold(re.none,re.none,function(e){return re.some(e)},re.none)},is:function(n){return e.fold(ad,ad,function(e,t){return t.eq(e,n)},ad)},len:function(){return e.fold(cd,sd,function(e,t){return t.property().getText(e).length},sd)}})}function Sf(c,e,t){var n,i,a,r=W(t,function(e){return[e.start,e.finish]}),s=(n=e,a=function(e,t){return function(r,e,t){var n=r.property().getText(e),o=M(function(r,e){if(0===e.length)return[r];var t=F(e,function(e,t){if(0===t)return e;var n=r.substring(e.prev,t);return{prev:t,values:e.values.concat([n])}},{prev:0,values:[]}),n=e[e.length-1];return n<r.length?t.values.concat(r.substring(n)):t.values}(n,t),function(e){return 0<e.length});if(o.length<=1)return[Tf(e,0,n.length)];r.property().setText(e,o[0]);var i=ed(o.slice(1),function(e,t){var n=Tf(r.create().text(e),t,t+e.length);return re.some(n)},o[0].length),a=N(i,function(e){return e.element});return r.insert().afterAll(e,a),[Tf(e,0,o[0].length)].concat(i)}(c,e.element,t)},0===(i=r).length?n:W(n,function(t){var e,n,r,o=W(i,function(e){return e>=t.start&&e<=t.finish?[e-t.start]:[]});return 0<o.length?(n=a(e=t,o),r=e.start,N(n,function(e){return ue(ue({},e),{start:e.start+r,finish:e.finish+r})})):[t]}));return N(t,function(e){var n,t,r,o,i,a=N((n=s,t=e.start,r=e.finish,o=wf(n,t),i=wf(n,r),o.bind(function(e){var t=i.getOr(n[n.length-1]&&n[n.length-1].finish===r?n.length+1:-1);return-1<t?re.some(n.slice(e,t)):re.none()}).getOr([])),function(e){return e.element}),u=N(a,c.property().getText).join("");return{elements:a,word:e.word,exact:u}})}function Of(e){return!ba(e,"a",void 0).isSome()}function Af(e){var t,n;P((t=e,n={word:"__INTERNAL__",pattern:nd(vd)},pd(gd,t,[n],void 0)),function(e){var n,t=e.exact;(t.indexOf("@")<0||hd(t))&&(n=e.elements,re.from(n[0]).filter(Of).map(function(e){var t=Jt.fromTag("a");return Ta(e,t),Aa(t,n),St(t,"href",is(t)),t}))})}function Cf(e){P(e,function(e){Vt(e)&&bu(e,"position").isSome()&&wu(e,"position")})}function Df(e){var t,n,r,o=M(e,Tt("li"));0<o.length&&(t=Yo(o[0]),n=Jt.fromTag("ul"),Ta(e[0],n),0<t.length&&(r=Jt.fromTag("li"),za(n,r),Aa(r,t)),Aa(n,o))}function kf(e){var t=Zo(e);P([Af,Cf,Df],function(e){e(t)})}function Lf(e){return void 0!==e&&void 0!==e.types&&null!==e.types}function Ef(t){return function(e){return{discriminator:t,data:e}}}function _f(t){return function(e){return e.discriminator===t?re.some(e.data):re.none()}}function Nf(e){return vt(t=e,"<html")&&(vt(t,'xmlns:o="urn:schemas-microsoft-com:office:office"')||vt(t,'xmlns:x="urn:schemas-microsoft-com:office:excel"'))||vt(e,'meta name="ProgId" content="Word.Document"');var t}function Pf(e){return vt(e,'id="docs-internal-guid-')}function Rf(e){return 0<e.length}function Mf(t,e){return Id(t.types,e).map(function(e){return t.getData(e.type)}).filter(Rf)}function Ff(e){return Mf(e,"html")}function jf(e){return Ff(e).filter(Pf)}function Uf(e){return Md?re.from(e.clipboardData).filter(Lf):re.none()}function Hf(e){var t,n=Jt.fromTag("div"),r=pc(qo(n),e,[$l]),o=qo(t=n).dom,i=Jt.fromDom(o.createDocumentFragment());return Aa(i,wa(r,o)),uu(t),za(t,i),Od({container:n})}function Wf(e){return N(e,function(e){return e.asset})}function Bf(d,m,u){function c(e,t,n){p.trigger.block(!0);var r,o,i,a=(r=m,i=o=e,q(d,function(t){return t.getAvailable(i).map(function(e){return Yu(t.steps,e,t.label,t.capture())})}).getOrThunk(function(){var e=r.getAvailable(o);return Yu(r.steps,e,r.label,r.capture())}));a.capture&&n();var u,c,s=a.steps,l=(u=a.input,c=F(s,function(e,t){return Ju(e)?e.then(function(e){return Qu(e,u,t)}):Qu(e,u,t)},{response:Cc([],[]),bundle:Ec({})}),Ju(c)?c:Ue.resolve(c)),f=Ud.getLabelForApi(a.label);l.then(function(e){var r=e.bundle.isInternal.getOr(!1),o=e.bundle.officeStyles.fold(b("auto"),function(e){return e?"merge":"clean"});p.trigger.block(!1),Vu(e.response,function(e){p.trigger.error(e)},function(e,t){p.trigger.insert(e,Wf(t),t,r,f,o)},function(){p.trigger.cancel()},function(e,t,n){p.trigger.insert(e,Wf(t),t,r,f,o),p.trigger.error(n)})})}var p=Mo({cancel:Ro([]),error:Ro(["message"]),insert:Ro(["elements","assets","correlated","isInternal","source","mode"]),block:Ro(["state"])}),s=lu(function(a){au(Go(Jt.fromDom(a.target)).dom).each(function(e){var t,n,r;function o(r){return void 0===r.items?re.none():(t=r.types,q(Fd,function(e){return Id(t,e)}).map(function(e){for(var t=[],n=0;n<r.items.length;n++)t.push(r.items[n]);return Ad({images:t})}));var t}function i(t){return q(t.types,function(e){return"text/plain"===e?re.some(t.getData(e)).map(function(e){return Dd({text:r.sanitizeText(e)})}):re.none()})}fa(e.start,Pu())||(n=a,void 0===(r=u)&&(r=Sr),t={getWordData:function(){return Uf(n).bind(function(n){return Ff(n).filter(Nf).map(function(e){var t=Mf(n,"rtf");return Cd({html:e,rtf:t.fold(function(){return wd()},function(e){return Td(e)})})})})},getGoogleDocsData:function(){return Uf(n).bind(jf).map(function(e){return r.sanitizeHtml(e,"googledocs")}).map(Hf)},getImage:function(){return Uf(n).bind(o)},getText:function(){return Uf(n).fold(function(){var e=window.clipboardData;return void 0!==e?re.some(Dd({text:r.sanitizeText(e.getData("text"))})):re.none()},i)},getHtml:function(){return Uf(n).bind(Ff).map(r.sanitizeHtml).map(Hf)},getOnlyText:function(){return Uf(n).bind(function(e){return 1===(t=e.types).length&&"text/plain"===t[0]?i(e):re.none();var t})},getNative:function(){return Sd({nativeEvent:n})},getVoid:function(){return kd({})}},Wu()&&(s.control.block(),a.preventDefault()),c(t,s.control,function(){a.preventDefault()}))})});return{paste:s.instance,pasteCustom:function(e,t){c(e,lu(S).control,t=void 0===t?S:t)},isBlocked:s.control.isBlocked,destroy:S,events:p.registry}}function zf(){var t=re.none();return{convert:function(e){t=Hd(e)},listen:function(e){t.getOrThunk(function(){return Ue.resolve([])}).then(e)},clear:function(){t=re.none()}}}function $f(e,t){return{asset:e,image:t}}function qf(e,r){return Se.cata(e,function(e,t,n){return St(r,"src",n),!0},x)}function Vf(e,r){var o=[];return P(e,function(e,t){var n=r[t];qf(e,n)&&o.push($f(e,n))}),o}function Gf(e){return ft(e).toPromise()}function Kf(e,t){return{asyncAsset:e.then(Ji.value,Ji.error),image:t}}function Xf(e){var t=Jt.fromTag("div");return Aa(t,e),ei(t,"img[src]")}function Jf(e){return 0===e.indexOf("data:")&&-1<e.indexOf("base64")}function Yf(e){return 0===e.indexOf("blob:")}function Zf(e){return Ct(e,"src").exists(function(e){return Jf(e)||Yf(e)})}function Qf(e){return W(Xf(e),function(e){var t,n,r,o=Ct(e,"src").getOr("");return Jf(o)?(n=e,Ut(o).map(function(e){return Kf(Gf(e),n)}).toArray()):Yf(o)?(t=e,re.from(0===(r=o).indexOf("blob:")?Rt(r):0===r.indexOf("data:")?Mt(r):null).map(function(e){return Kf(e.then(Gf),t)}).toArray()):[]})}function ed(e,n,t){return F(e,function(t,e){return n(e,t.len).fold(b(t),function(e){return{len:e.finish,list:t.list.concat([e])}})},{len:t=void 0===t?0:t,list:[]}).list}function td(t,e,n){var r,o,i,a=W(e,function(e){return md(t,e,n)});return M((r=function(e){return e.match({boundary:function(){return od.excludeWithout(e)},empty:function(){return od.excludeWith(e)},text:function(){return od.include(e)},nonEditable:function(){return od.excludeWithout(e)}})},o=[],i=[],P(a,function(e){var t=r(e);od.cata(t,function(){i.push(e)},function(){0<i.length&&o.push(i),o.push([e]),i=[]},function(){0<i.length&&o.push(i),i=[]})}),0<i.length&&o.push(i),o),function(e){return 0<e.length})}var nd=function(e){return t=e,n=b(0),r=b(0),o=re.none(),{term:function(){return new RegExp(t,o.getOr("g"))},prefix:n,suffix:r};var t,n,r,o},rd=ge([{include:["item"]},{excludeWith:["item"]},{excludeWithout:["item"]}]),od={include:rd.include,excludeWith:rd.excludeWith,excludeWithout:rd.excludeWithout,cata:function(e,t,n,r){return e.fold(t,n,r)}},id=ge([{boundary:["item","universe"]},{empty:["item","universe"]},{text:["item","universe"]},{nonEditable:["item","universe"]}]),ad=x,ud=w,cd=b(0),sd=b(1),ld={text:s(If,id.text),boundary:s(If,id.boundary),empty:s(If,id.empty),nonEditable:s(If,id.empty),cata:function(e,t,n,r,o){return e.fold(t,n,r,o)}},fd=b([]),dd=function(t,e,n){if(t.property().isText(e))return[ld.text(e,t)];if(t.property().isEmptyTag(e))return[ld.empty(e,t)];if(t.property().isNonEditable(e))return[];if(t.property().isElement(e)){var r=t.property().children(e),o=t.property().isBoundary(e)?[ld.boundary(e,t)]:[],i=void 0!==n&&n(e)?[]:W(r,function(e){return dd(t,e,n)});return o.concat(i).concat(o)}return[]},md=dd,pd=function(s,e,l,t){return W(td(s,e,t),function(e){var r,n,t,o,i=W(e,function(e){return e.fold(fd,fd,function(e){return[e]},fd)}),a=N(i,s.property().getText).join(""),u=(n=a,o=W(l,function(t){return N(function(e,t){for(var n=t.term(),r=[],o=n.exec(e);o;){var i=o.index+t.prefix(o),a=o[0].length-t.prefix(o)-t.suffix(o);r.push({start:i,finish:i+a}),n.lastIndex=i+a,o=n.exec(e)}return r}(n,t.pattern),function(e){return ue(ue({},t),e)})}),(t=Array.prototype.slice.call(o,0)).sort(function(e,t){return e.start<t.start?-1:t.start<e.start?1:0}),t),c=(r=s,ed(i,function(e,t){var n=t+r.property().getText(e).length;return re.from(Tf(e,t,n))}));return Sf(s,c,u)})},gd={up:b({selector:ha,closest:ba,predicate:pa,all:function(e,t){for(var n=g(t)?t:x,r=e.dom,o=[];null!==r.parentNode&&void 0!==r.parentNode;){var i=r.parentNode,a=Jt.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o}}),down:b({selector:ei,predicate:Ri}),styles:b({get:yu,getRaw:bu,set:vu,remove:wu}),attrs:b({get:At,set:St,remove:kt,copyTo:function(e,t){Ot(t,F(e.dom.attributes,function(e,t){return e[t.name]=t.value,e},{}))}}),insert:b({before:Ta,after:Ia,afterAll:function(n,r){P(r,function(e,t){Ia(0===t?n:r[t-1],e)})},append:za,appendAll:Aa,prepend:Sa,wrap:Oa}),remove:b({unwrap:cu,remove:_u}),create:b({nu:Jt.fromTag,clone:function(e){return Jt.fromDom(e.dom.cloneNode(!1))},text:Jt.fromText}),query:b({comparePosition:function(e,t){return e.dom.compareDocumentPosition(t.dom)},prevSibling:Xo,nextSibling:Jo}),property:b({children:Zo,name:yt,parent:Ko,document:function(e){return Vo(e).dom},isText:Gt,isComment:wt,isElement:Vt,isSpecial:function(e){return E(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],yt(e))},getLanguage:function(e){return Vt(e)?Ct(e,"lang"):re.none()},getText:Za,setText:function(e,t){return Cu.set(e,t)},isBoundary:function(e){return!!Vt(e)&&("body"===yt(e)||E(xf,yt(e)))},isEmptyTag:function(e){return!!Vt(e)&&E(["br","img","hr","input"],yt(e))},isNonEditable:function(e){return Vt(e)&&"false"===At(e,"contenteditable")}}),eq:$o,is:ki},vd=/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-+~=.,%()\/\w]*[-+~=%()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g.source,hd=function(e){var t=e.indexOf("://");return 3<=t&&t<=9},yd=function(e,t){return pc(e,t,[wl,Bl])},bd={disabled:function(){return{discriminator:"disabled",data:{}}},fromClipboard:function(e){return{discriminator:"fromClipboard",data:{rtf:e}}}},xd=be(bd),wd=bd.disabled,Td=bd.fromClipboard,Id=function(e,t){var n=new RegExp(t,"i");return q(e,function(e){return du(null!==n.exec(e),{type:e,flavor:t})})},Sd=Ef("event"),Od=Ef("html"),Ad=Ef("images"),Cd=Ef("word"),Dd=Ef("text"),kd=Ef("void"),Ld=_f("event"),Ed=_f("html"),_d=_f("images"),Nd=_f("word"),Pd=_f("text"),Rd=Di().browser,Md=!(Rd.isIE()||Rd.isEdge()&&Rd.version.major<16),Fd=["^image/","file"],jd={native:"Outside of Textbox.io pasting HTML5 API (could be internal)",fallback:"Outside of Textbox.io pasting offscreen (could be internal)",msoffice:"Word Import pasting",googledocs:"Google Docs pasting",image:"Image pasting",plaintext:"Only plain text is available to paste",text:"Plain text pasting",none:"There is no valid way to paste",discard:"There is no valid way to paste, discarding content"},Ud=ue({getLabelForApi:function(t){return j(be(jd),function(e){return jd[e]===t}).fold(b("unknown"),function(e){switch(e){case"native":case"fallback":return"html";case"none":case"discard":return"invalid";default:return e}})}},jd),Hd=function(n){var e,r,t=function(e){for(var t=null!=r?r:qt,n=0;n<e.length&&null!=t;++n)t=t[e[n]];return t}("window.clipboardData.files".split(".")),o=v((e=n).convertURL)?e.convertURL:v(e.msConvertURL)?e.msConvertURL:void 0;if(void 0!==t&&void 0!==Hd&&0<t.length){var i=Ue.all(N(t,function(e){var t=URL.createObjectURL(e);return o.apply(n,[e,"specified",t]),Wt(e,t).toPromise()}));return re.some(i)}return re.none()};function Wd(f){return function(e,s){function l(){return Ue.resolve(s)}function t(e,t){return!1===f.allowLocalImages?(P(c=M(Xf(o=e),Zf),_u),Ue.resolve({response:0<c.length?(u=M(o,function(e){return!Tt("img")(e)||!Zf(e)}),kc(u,[],"errors.local.images.disallowed")):s.response,bundle:s.bundle})):0===t.length?(n=Qf(i=e),r=Ue.all(N(n,function(e){return e.asyncAsset})),a=N(n,function(e){return e.image}),r.then(function(e){var t,n,r=(t=[],n=[],P(e,function(e){e.fold(function(e){t.push(e)},function(e){n.push(e)})}),{errors:t,values:n}),o=Vf(r.values,a);return{response:0<r.errors.length?kc(i,o,"errors.imageimport.failed"):Cc(i,o),bundle:s.bundle}})):l();var i,n,r,a,o,u,c}return Vu(s.response,Xu,t,l,t)}}function Bd(t,r,o){return void 0===o&&(o=!1),new Ke(function(e){var n=new XMLHttpRequest;n.onreadystatechange=function(){4===n.readyState&&e({status:n.status,blob:n.response})},n.open("GET",t,!0),n.withCredentials=o,se(r,function(e,t){n.setRequestHeader(t,e)}),n.responseType="blob",n.send()})}function zd(e){var t,n=(t=e,"ImageProxy HTTP error: "+j(om,function(e){return t===e.code}).fold(b("Unknown ImageProxy error"),function(e){return e.message}));return Ke.reject(n)}function $d(t){return j(im,function(e){return e.type===t}).fold(b("Unknown service error"),function(e){return e.message})}function qd(e){return r=e,new Ke(function(e,t){var n=new FileReader;n.onload=function(){e(n.result)},n.onerror=function(e){t(e)},n.readAsText(r)}).then(function(e){var t="ImageProxy Service error: "+function(e){try{return re.some(JSON.parse(e))}catch(e){return re.none()}}(e).bind(function(e){return t=F(["error","type"],function(e,t){return v(e)?e[t]:void 0},e),re.from(t).map($d);var t}).getOr("Invalid JSON in service error message");return Ke.reject(t)});var r}function Vd(e){return e<200||300<=e}function Gd(e,t,n){return void 0===n&&(n=!1),t?(a={"Content-Type":"application/json;charset=UTF-8","tiny-api-key":t},Bd((o=t,i=-1===(r=e).indexOf("?")?"?":"&",/[?&]apiKey=/.test(r)?r:r+i+"apiKey="+encodeURIComponent(o)),a).then(function(e){return Vd(e.status)?(t=e.status,"application/json"!==(null==(n=e.blob)?void 0:n.type)||400!==t&&403!==t&&404!==t&&500!==t?zd(t):qd(n)):Ke.resolve(e.blob);var t,n})):Bd(e,{},n).then(function(e){return Vd(e.status)?zd(e.status):Ke.resolve(e.blob)});var r,o,i,a}function Kd(e,a){function t(){return Ue.resolve({response:a.response,bundle:a.bundle})}function u(o){return jt(o).then(function(e){var t=ke("image"),n=ut(o,e),r=URL.createObjectURL(o);return Se.blob(t,n,r)})}function c(e,t){return Se.url(ke("image"),t,e)}function n(n,r){var o=!1,i=W(n,function(e){return ei(e,"img")});return Ue.all(N(i,function(e){var t=e.dom.src,n=$i(t);return vt(n.host,"google")&&!Bt(n.path,"/drawings/")?Gd(e.dom.src).then(u,function(){return o=!0,c(e,t)}):c(e,t)})).then(function(e){var t=r.concat(Vf(e,i));return{response:o?kc(n,t,"errors.imageimport.failed"):Cc(n,t),bundle:a.bundle}},function(){return{response:Ac("errors.imageimport.invalid"),bundle:a.bundle}})}return Vu(a.response,t,n,t,n)}function Xd(e){var t=cm(e);return t&&am(e)||!t&&um(e)}function Jd(e){return e.isInternal.getOr(!1)}function Yd(e){return cm(e)?Ts.Word:e.isGoogleDocs.getOr(!1)?Ts.GoogleDocs:Ts.Html}function Zd(e,t){var u,r,c,o=(u=e,c=(r=t).translations,{get:function(e){var t=function(){switch(e){case Ts.Word:return"officeStyles";case Ts.GoogleDocs:return"gdocsStyles";default:return"htmlStyles"}}(),n=r[t];return g(n)?n().then(function(e){return s("merge"===e)},function(e){return console.error(e),s(!1)}):"clean"===n?Ue.resolve(s(!1)):"merge"===n?Ue.resolve(s(!0)):new Ue(function(e){var t=Jt.fromTag("div");sa(t,sm("styles-dialog-content"));var n=Jt.fromTag("p");Aa(n,wa(c("cement.dialog.paste.instructions"))),za(t,n);var r={text:c("cement.dialog.paste.clean"),tabindex:0,className:sm("clean-styles"),click:function(){i(),e(s(!1))}},o={text:c("cement.dialog.paste.merge"),tabindex:1,className:sm("merge-styles"),click:function(){i(),e(s(!0))}},i=function(){a.destroy()},a=u();a.setTitle(c("cement.dialog.paste.title")),a.setContent(t),a.setButtons([r,o]),a.events.close.bind(function(){i(),e(re.none())}),a.show()})},destroy:S});function s(e){return re.some(Nc(r,{officeStyles:e,gdocsStyles:e,htmlStyles:e}))}return function(e,t){var n=t.bundle,r=t.response;return o.get(Yd(n)).then(function(e){return e.fold(function(){return{response:Dc(),bundle:t.bundle}},function(e){return{response:r,bundle:Ec({officeStyles:e.officeStyles,gdocsStyles:e.gdocsStyles,htmlStyles:e.htmlStyles})}})})}}function Qd(n,r){return function(e,t){return Jd(t.bundle)?Ue.resolve({response:t.response,bundle:Ec({officeStyles:!0,gdocsStyles:!0,htmlStyles:!0})}):Zd(n,r)(e,t)}}function em(e,t){if(!Pi(e))throw new Error("Internal error: attempted to write to an iframe that is not in the DOM");var n,r=function(e){var t=e.dom;try{var n=t.contentWindow?t.contentWindow.document:t.contentDocument,r=Jt.fromDom;return null!=n?re.some(r(n)):re.none()}catch(e){return console.log("Error reading iframe: ",t),console.log("Error was: "+e),re.none()}}(n=e).getOrThunk(function(){return qo(n)}).dom;r.open("text/html","replace"),r.writeln(t),r.close()}var tm,nm,rm,om=[{code:404,message:"Could not find Image Proxy"},{code:403,message:"Rejected request"},{code:0,message:"Incorrect Image Proxy URL"}],im=[{type:"not_found",message:"Failed to load image."},{type:"key_missing",message:"The request did not include an api key."},{type:"key_not_found",message:"The provided api key could not be found."},{type:"domain_not_trusted",message:"The api key is not valid for the request origins."}],am=function(e){return e.officeStyles.getOr(!0)},um=function(e){return e.htmlStyles.getOr(!1)},cm=function(e){return e.isWord.getOr(!1)},sm=ti("ephox-cement").resolve,lm={},fm={exports:lm};function dm(e){return W(e,Fm)}function mm(e,t,n){function r(e){return-1!==e.selector.indexOf(",")}var i,o,a,u=W(M(e,r),function(t){return N(t.selector.split(","),function(e){return{selector:e.trim(),raw:t.raw}})}),c=M(e,function(e){return!r(e)}).concat(u);c.sort(function(e,t){return Mm.compare(e.selector,t.selector)}).reverse(),i=t,o=n,a=W(c,function(o){var e=ei(i,o.selector);return P(e,function(e){var t,n,r;hu(e,(t=o.raw,n=e,r={},P(t,function(e){void 0!==t[e]&&(E(n.dom.style,e)||(r[e]=t[e]))}),r))}),e}),o&&P(a,function(e){kt(e,"class")})}function pm(e,t,n,r){mm(dm(Rm(e)).map(function(e){var t=e.selector;return{selector:n.hasOwnProperty(t)?n[t]:t,raw:e.raw}}),t,r)}function gm(e,t,n,r){mm(M(dm(Rm(e)),function(e){return Bt(e.selector,n)}),t,r)}function vm(e,t,n,r){mm(M(dm(Rm(e)),function(e){return E(n,e.selector)}),t,r)}function hm(a){var e,n=(e=Jt.fromDom(document.body),{play:function(a,u,c){var s=Jt.fromTag("div"),l=Jt.fromTag("iframe");hu(s,{display:"none"});var f=Ra(l,"load",function(){var e;f.unbind(),em(l,a);var t=null===(e=l.dom.contentWindow)||void 0===e?void 0:e.document;if(void 0===t)throw new Error("sandbox iframe load event did not fire correctly");var n=Jt.fromDom(t),r=n.dom.body;if(void 0===r)throw new Error("sandbox iframe does not have a body");var o=Jt.fromDom(r),i=u(n,o);_u(s),setTimeout(A(c,i),0)});za(s,l),za(e,s)}});return function(t){return new Ue(function(e){n.play(t,function(e,t){return n=e,r=t,o={mergeInline:b(a)},(i=o.mergeInline())&&(Um.inlineStyles(n,r,Hm),Gl(r)),Wm(r,i),Tu(t);var n,r,o,i},e)})}}function ym(e,t,u,n){function c(e){return{response:e,bundle:Ec({})}}var r=n.sanitizeHtml(t,"word");return hm(e)(r).then(function(e){function t(e){return c(Cc(n,e))}var n=wa(e),r=Jt.fromTag("div");Aa(r,n);var o=M(zo("img[src]",r),function(e){return Ct(e,"src").exists(function(e){return Bt(e,"blob:")||Bt(e,"data:")})}),i=zo("img[data-image-src]",r);if(0===o.length&&0===i.length)return t([]);if(u)return P(o,function(e){return kt(e,"id"),0}),Ue.all(N(o,function(a){var u=a.dom;return ct(u).then(function(i){return i.toBlob().then(function(e){return t=i,n=e,r=Bt(u.src,"blob:")?u.src:URL.createObjectURL(n),o=ke("image"),$f(Se.blob(o,t,r),a);var t,n,r,o})})})).then(t);P(o,_u),P(i,_u);var a=Zo(r);return c(kc(a,[],"errors.local.images.disallowed"))})}function bm(e){try{var t=e(),n=null!=t&&0<t.length?wa(t):[];return Ji.value(n)}catch(e){return console.error("PowerPaste error code: PT01. Message: ",e),Ji.error("errors.paste.process.failure")}}function xm(e){return e.fold(Ku,function(e){return{response:Cc(e,[]),bundle:Ec({})}})}function wm(u,c,s,l,f){return bm(function(){var e,t,n,r,o,i,a={type:l,merge:s,cleanFilteredInlineElements:null!==(e=f.cleanFilteredInlineElements)&&void 0!==e?e:[],indentUseMargin:null!==(t=f.indentUseMargin)&&void 0!==t&&t};return n=u,r=zm,i=a,kf(o=c),pc(n,Tu(o),uf(r,i))})}function Tm(e){function t(e){return{response:Cc([e],[]),bundle:Ec({})}}return r=ei(n=e,"img"),Ue.all(N(r,pf)).then(function(){return n}).then(t).catch(function(){return t(e)});var n,r}function Im(e,t,n,r,o,i){return wm(e,t,r,n,i).fold(Xu,function(r){return o.then(function(e){var t,o,i,n=(t=e,o=[],i=W(r,function(e){return Tt("img")(e)?[e]:ei(e,"img")}),P(t,function(r){Se.cata(r,function(e,t,n){P(i,function(e){At(e,"src")===n&&o.push($f(r,e))})},S)}),o);return{response:Cc(r,n),bundle:Ec({})}})})}function Sm(e){return"\n"===e||"\r"===e}function Om(e,t){var n,r,o,i,a,u=(n=e,(r=Jt.fromTag("div")).dom.textContent=n,Tu(r)),c=wa((i=t,1===(o=N(F(a=u.replace(/\t/g,i<=0?"":new Array(i+1).join(" ")),function(e,t){return-1!==" \f\t\v".indexOf(t)||"\xa0"===t?e.pcIsSpace||""===e.str||e.str.length===a.length-1||(n=e.str.length+1)<a.length&&0<=n&&Sm(a[n])?{pcIsSpace:!1,str:e.str+"\xa0"}:{pcIsSpace:!0,str:e.str+" "}:{pcIsSpace:Sm(t),str:e.str+t};var n},{pcIsSpace:!1,str:""}).str.replace(/^[\r\n]*|[\r\n]*$/g,"").split(/(?:\r?\n){2}/),function(e){return e.split(/\n|\r\n/).join("<br />")})).length?o[0]:N(o,function(e){return"<p>"+e+"</p>"}).join("")));return Cc(c,[])}function Am(o){return function(e,t){return n=o,{response:0<(r=Pd(e).getOrDie("Required text input for Text Handler")).text.length?Om(r.text,n):Dc(),bundle:Ec({})};var n,r}}function Cm(e,o){function t(e,t){var n=Jt.fromTag("div");Aa(n,e),kf(n);var r=Zo(n);return{response:Cc(r,t),bundle:o.bundle}}var n=b(o);return Vu(o.response,n,t,n,t)}function Dm(u,c,s){return function(e,t){var n,r,o=Ed(e).getOrDie("Wrong input type for HTML handler").container,i=qo(c),a=t.bundle;return Jd(a)?(n=i,r=o,xm(bm(function(){return yd(n,Tu(r))}))):(u(o),xm(wm(i,o,Xd(a),Yd(a),s)))}}function km(c,s,l){return function(e,t){var u=t.bundle;return u.proxyBin.fold(function(){return console.error("There was no proxy bin setup. Ensure you have run proxyStep first."),Ue.resolve({response:Dc(),bundle:Ec({})})},function(e){var n,t=Xd(u),r=Yd(u),o=Jd(u),i=(n=u,new Ue(function(t){n.backgroundAssets.fold(function(){t([])},function(e){e.listen(t)})})),a=qo(c);return o?function(e,t,n,r){var o=Ts.Html,i=t.findClipboardTags(Zo(n)).getOr([]);P(i,_u);var a=Ue.resolve([]);return Im(e,n,o,!0,a,r)}(a,s,e,l):Im(a,e,r,t,i,l)})}}function Lm(e,t){return _c}function Em(r){return function(e,t){var n=Gu(t.bundle,Ec(r));return{response:t.response,bundle:n}}}function _m(e,t){return Tm(Ed(e).getOrDie("Wrong input type for HTML handler").container)}function Nm(e,t){return Js(e,function(e){return Vt(e)&&Ct(e,"style").exists(function(e){return-1<e.indexOf("mso-")})})}function Pm(e,t){var n,r=t;return 0<=(n=Tu(e)).indexOf("<o:p>")||r.browser.isEdge()&&0<=n.indexOf('v:shapes="')||r.browser.isEdge()&&0<=n.indexOf("mso-")||0<=n.indexOf("mso-list")||0<=n.indexOf("p.MsoNormal, li.MsoNormal, div.MsoNormal")||0<=n.indexOf("MsoListParagraphCxSpFirst")||0<=n.indexOf("<w:WordDocument>")}tm=lm,nm=fm,rm=void 0,function(e){"object"==typeof tm&&void 0!==nm?nm.exports=e():("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=e()}(function(){return function i(a,u,c){function s(t,e){if(!u[t]){if(!a[t]){var n="function"==typeof rm;if(!e&&n)return n(t,!0);if(l)return l(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var o=u[t]={exports:{}};a[t][0].call(o.exports,function(e){return s(a[t][1][e]||e)},o,o.exports,i,a,u,c)}return u[t].exports}for(var l="function"==typeof rm,e=0;e<c.length;e++)s(c[e]);return s}({1:[function(e,t,n){var r,a,o=(r=function(e){for(var t,n=[],r=e.split(","),o=0,i=r.length;o<i;o+=1)0<(t=r[o]).length&&n.push(a(t));return n},a=function(c){var e,t,s=c,l={a:0,b:0,c:0},f=[];function n(e){var t,n,r,o;if(e.test(s))for(n=0,r=(t=s.match(e)).length;n<r;n+=1)o=t[n],s=s.replace(o,Array(o.length+1).join("A"))}return e=function(e,t){var n,r,o,i,a,u;if(e.test(s))for(r=0,o=(n=s.match(e)).length;r<o;r+=1)l[t]+=1,i=n[r],a=s.indexOf(i),u=i.length,f.push({selector:c.substr(a,u),type:t,index:a,length:u}),s=s.replace(i,Array(u+1).join(" "))},n(/\\[0-9A-Fa-f]{6}\s?/g),n(/\\[0-9A-Fa-f]{1,5}\s/g),n(/\\./g),(t=/:not\(([^\)]*)\)/g).test(s)&&(s=s.replace(t," $1 ")),function(){var e,t,n,r,o=/{[^]*/gm;if(o.test(s))for(t=0,n=(e=s.match(o)).length;t<n;t+=1)r=e[t],s=s.replace(r,Array(r.length+1).join(" "))}(),e(/(\[[^\]]+\])/g,"b"),e(/(#[^\#\s\+>~\.\[:]+)/g,"a"),e(/(\.[^\s\+>~\.\[:]+)/g,"b"),e(/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,"c"),e(/(:[\w-]+\([^\)]*\))/gi,"b"),e(/(:[^\s\+>~\.\[:]+)/g,"b"),s=(s=s.replace(/[\*\s\+>~]/g," ")).replace(/[#\.]/g," "),e(/([^\s\+>~\.\[:]+)/g,"c"),f.sort(function(e,t){return e.index-t.index}),{selector:c,specificity:"0,"+l.a.toString()+","+l.b.toString()+","+l.c.toString(),specificityArray:[0,l.a,l.b,l.c],parts:f}},{calculate:r,compare:function(e,t){var n,r,o;if("string"==typeof e){if(-1!==e.indexOf(","))throw"Invalid CSS selector";n=a(e).specificityArray}else{if(!Array.isArray(e))throw"Invalid CSS selector or specificity array";if(4!==e.filter(function(e){return"number"==typeof e}).length)throw"Invalid specificity array";n=e}if("string"==typeof t){if(-1!==t.indexOf(","))throw"Invalid CSS selector";r=a(t).specificityArray}else{if(!Array.isArray(t))throw"Invalid CSS selector or specificity array";if(4!==t.filter(function(e){return"number"==typeof e}).length)throw"Invalid specificity array";r=t}for(o=0;o<4;o+=1){if(n[o]<r[o])return-1;if(n[o]>r[o])return 1}return 0}});void 0!==n&&(n.calculate=o.calculate,n.compare=o.compare)},{}],2:[function(e,t,n){var r=e("specificity");t.exports={boltExport:r}},{specificity:1}]},{},[2])(2)});function Rm(e){var t=e.dom.styleSheets;return Array.prototype.slice.call(t)}var Mm=fm.exports.boltExport,Fm=function(e){return W(e.cssRules,function(e){return e.type===window.CSSRule.IMPORT_RULE?Fm(e.styleSheet):e.type===window.CSSRule.STYLE_RULE?[function(e){var t=e.selectorText,n=e.style.cssText;if(void 0===n)throw new Error("WARNING: Browser does not support cssText property");return{selector:t,style:n,raw:e.style}}(e)]:[]})},jm={inlineStyles:function(e,t,n){pm(e,t,n,!0)},inlineStylesKeepClasses:function(e,t,n){pm(e,t,n,!1)},inlinePrefixedStyles:function(e,t,n){gm(e,t,n,!0)},inlinePrefixedStylesKeepClasses:function(e,t,n){gm(e,t,n,!1)},inlineSelectorsStyles:function(e,t,n){vm(e,t,n,!0)},inlineSelectorsStylesKeepClasses:function(e,t,n){vm(e,t,n,!1)}},Um={inlineStyles:jm.inlineStyles,inlineStylesKeepClasses:jm.inlineStylesKeepClasses,inlinePrefixedStyles:jm.inlinePrefixedStyles,inlinePrefixedStylesKeepClasses:jm.inlinePrefixedStylesKeepClasses,inlineSelectorsStyles:jm.inlineSelectorsStyles,inlineSelectorsStylesKeepClasses:jm.inlineSelectorsStylesKeepClasses},Hm={p:"p, li[data-converted-paragraph]"},Wm=function(s,e){P(ei(s,"li[data-converted-paragraph]"),function(e){kt(e,"data-converted-paragraph")}),e&&(P(ei(s,"li"),function(e){var t,n,r,o,i,a=(Sa(s,o=Jt.fromTag("span")),i=o,{convertToPx:function(e){var t;return vu(i,"margin-left",e),t=yu(i,"margin-left"),parseFloat(/-?\d+\.?\d*/.exec(t)[0])},destroy:function(){return _u(i)}}),u=(t=a,n=Ct(s,"data-tab-interval").getOr("36pt"),t.convertToPx(n)),c=Bm(e,u,a).getOr({});kt(r=e,"data-list-level"),kt(r,"data-text-indent-alt"),kt(r,"data-border-margin"),wu(r,"margin-left"),wu(r,"text-indent"),se(xu(r),function(e,t){!Bt(t,"border")||"border-image"!==t&&"none"!==e.trim()&&"initial"!==e.trim()||wu(r,t)}),a.destroy(),hu(e,c)}),P(ei(s,"ol,ul"),function(t){var e=ei(t,"li");bu(t,"margin-top").isNone()&&re.from(e[0]).each(function(e){vu(t,"margin-top",yu(e,"margin-top"))}),bu(t,"margin-bottom").isNone()&&re.from(e[e.length-1]).each(function(e){vu(t,"margin-bottom",yu(e,"margin-bottom"))})})),kt(s,"data-tab-interval")},Bm=function(d,m,p){function g(e){return Ct(e,"data-list-level").map(function(e){return parseInt(e,10)}).getOr(1)}return bu(d,"text-indent").bind(function(f){return bu(d,"margin-left").map(function(e){var t=bu(d,"list-style").exists(function(e){return vt(e,"none")}),n=Ct(d,"data-border-margin").getOr("0px"),r=t?g(d)+1:g(d),o=p.convertToPx(e)+p.convertToPx(n),i=m*r,a=Ct(d,"data-text-indent-alt").getOr(f),u=p.convertToPx(a),c={},s=m/2*-1-u;0<s&&(c["text-indent"]=s+"px");var l=o-i-s;return c["margin-left"]=0<l?l+"px":"0px",c})})},zm=Di(),$m=b(sm("smartpaste-eph-bin")),qm=Di();function Vm(e,t,n){return t.indexOf(e,n)}function Gm(e,t,n,r,o,i,a){return-1===e||-1===t?re.none():re.some({start:e,end:t,bower:n,regex:r,idRef:o,isEquation:i,attrs:a})}function Km(e,t,n){return e.substring(t,n)}function Xm(e,t){if(-1===t)return t;var n=0,r=e.length;do{var o=e.indexOf("{",t),i=e.indexOf("}",t);if(o<i&&-1!==o?(t=o+1,++n):(i<o||o<0)&&-1!==i&&(t=i+1,--n),r<t||-1===i)return-1}while(0<n);return t}function Jm(e,t,n,r,o){var i,a,u;return Gm(n,r,Km(e,n,r),/[^a-fA-F0-9]([a-fA-F0-9]+)\}$/,"i",o,(a=Vm("\\picscalex",i=e,n),u=Vm("\\bliptag",i,a),-1<a&&a<u?re.from(i.substring(a,u)):re.none()))}function Ym(e,t,n,r,o){return Gm(n,r,Km(e,n,r),/([a-fA-F0-9]{64,})(?:\}.*)/,"s",o,re.none())}function Zm(e){for(var c=[],t=function(){return e.length},n=function(e){var r,o,i,a,u,t,n=(o=(r=e).bower,i=r.regex,a=r.isEquation,u=r.attrs,(null!==(t=/\\shplid(\d+)/.exec(o))?re.some(t[1]):re.none()).map(function(e){var t,n=r.idRef+e;return(0<=(t=o).indexOf("\\pngblip")?Ji.value("image/png"):0<=t.indexOf("\\jpegblip")?Ji.value("image/jpeg"):Ji.error("errors.imageimport.unsupported")).fold(function(e){return up.unsupported(n,e,a,u)},function(t){return((e=o.match(i))&&e[1]&&e[1].length%2==0?Ji.value(e[1]):Ji.error("errors.imageimport.invalid")).fold(function(e){return up.unsupported(n,e,a,u)},function(e){return up.supported(n,t,function(e,t){if(0===e.length)throw new Error("Zero length content passed to Hex conversion");var n=function(e){for(var t=new Array(e.length/2),n=0;n<e.length;n+=2){var r=e.substr(n,2);t[Math.floor(n/2)]=parseInt(r,16)}return t}(e),r=new Uint8Array(n);return new Blob([r],{type:t})}(e,t),a,u)});var e})}));return c=c.concat(n.toArray()),e.end},r=0;r<e.length;)r=cp(e,r).fold(t,n);return c}function Qm(e){return up.cata(e,function(e,t,n){return e},function(e,t,n,r,o){return e})}function ep(e){return up.cata(e,function(e,t,n){return n},function(e,t,n,r,o){return r})}function tp(e){return up.cata(e,function(e,t,n){return Ji.error(t)},function(e,t,n,r,o){return Ji.value(n)})}function np(e,t){var n=new RegExp("\\\\pic"+t+"(\\-?\\d+)\\\\").exec(e)[1];return parseInt(n,10)}function rp(e,t,i,a,u){var c=[],s=[],l=!1;return{blobs:W(e,function(n,r){var o=At(n,"data-image-id");return kt(n,"rtf-data-image"),kt(n,"data-image-id"),kt(n,"data-ms-equation"),u||kt(n,"data-image-src"),"unsupported"===o?(l=!0,St(n,"alt",i("errors.imageimport.unsupported")),[]):j(t,function(e,t){return a(e,t,o,r)}).fold(function(){return console.log("WARNING: unable to find data for image ",n.dom),l=!0,St(n,"alt",i("errors.imageimport.unsupported")),[]},function(t){return tp(t).fold(function(e){return l=!0,console.error("PowerPaste error code: RTF04"),St(n,"alt",i(e)),[]},function(e){return c.push(n),s.push(up.cata(t,function(e,t,n){return re.none()},function(e,t,n,r,o){return o})),u&&kt(n,"data-image-src"),[e]})})}),filteredImages:c,imageAttrs:s,failedImage:l}}function op(e,t,r,n,o){var i=F(t,function(t,n){var r=Qm(n),o=ep(n);return U(t,function(e){return!o&&!ep(e)&&Qm(e)===r}).fold(function(){return t.concat([n])},function(e){return tp(t[e]).isValue()?t:t.slice(0,e).concat(t.slice(e+1)).concat([n])})},[]),a=o.keepSrc||!1,u=R(i,function(e){return!ep(e)}),c=u.pass,s=u.fail,l=R(e,function(e){return"true"!==At(e,"data-ms-equation")}),f=l.pass,d=l.fail,m=rp(f,c,n,function(e,t,n,r){return Qm(e)===n},a),p=rp(d,s,n,function(e,t,n,r){return t===r},a),g=m.filteredImages.concat(p.filteredImages),v=m.imageAttrs.concat(p.imageAttrs),h=m.blobs.concat(p.blobs),y=m.failedImage||p.failedImage;dt(h).get(function(e){var t,n=v;((t=e).length===n.length?Ue.all(N(t,function(e,t){return y=e,n[t].fold(function(){return Ue.resolve(y)},function(h){return Se.cata(y,function(p,g,v){return g.toCanvas().then(function(e){var t,n,r,o,i,a,u,c,s,l=Jt.fromDom(e),f=Ct(l,"width").map(function(e){return parseInt(e,10)}).getOr(1),d=Ct(l,"height").map(function(e){return parseInt(e,10)}).getOr(1),m=(t=f,n=d,a=(o=(r=A(np,h))("wgoal"))/t,u=(i=r("hgoal"))/n,{cropl:(c=r("cropl"))/a,cropt:(s=r("cropt"))/u,cropw:(o-c-r("cropr"))/a,croph:(i-s-r("cropb"))/u});return f===m.cropw&&d===m.croph&&0===m.cropl&&0===m.cropt?Ue.resolve(y):sf(g,m.cropl,m.cropt,m.cropw,m.croph).then(function(n){return n.toBlob().then(function(e){URL.revokeObjectURL(v);var t=URL.createObjectURL(e);return Se.blob(p,n,t)})})})},function(e,t,n){return Ue.resolve(y)})});var y})):Ue.resolve(t)).then(function(e){var t=Vf(e,g);r(t,y)})})}function ip(e){return ei(e,"[rtf-data-image]")}var ap=ge([{unsupported:["id","message","isEquation","attrs"]},{supported:["id","contentType","blob","isEquation","attrs"]}]),up={unsupported:ap.unsupported,supported:ap.supported,cata:function(e,t,n){return e.fold(t,n)}},cp=function(e,t){var n=Vm("{\\pict{",e,t),r=Xm(e,n),o=Vm("{\\shp{",e,t),i=Xm(e,o),a=Vm("{\\mmathPict{",e,t),u=Xm(e,a),c=-1!==a&&(a<n&&r<u||a<o&&i<u),s=A(Ym,e,t,o,i,c),l=A(Jm,e,t,n,r,c);return-1===n&&-1===o?re.none():-1===n?s():-1===o||o<n&&r<i?l():n<o&&i<r?s():n<o?l():o<n?s():re.none()},sp=function(e){return Zm(e.replace(/\r/g,"").replace(/\n/g,""))};function lp(s){return function(u,c){return new Ue(function(t,e){function o(e){return t({response:e,bundle:Ec({})})}var r,a,i=(r=s.translations,{events:(a=Mo({insert:Ro(["elements","correlated"]),incomplete:Ro(["elements","correlated","message"])})).registry,processRtf:function(o,i,e,t){var n=sp(e);op(ip(o),n,function(e,t){var n=Zo(o),r=e.concat(i);t?(console.error("PowerPaste error code: RTF01"),a.trigger.incomplete(n,r,"errors.imageimport.failed")):a.trigger.insert(n,r)},r,t)}});function n(t){function e(){return Ue.resolve(c)}function n(e,n){var r=Jt.fromTag("div");return Aa(r,e),t.fold(function(){var e,t=ip(r);return 0<t.length?function(){P(t,_u);var e=Zo(r);return console.error("PowerPaste error code: RTF03"),o(kc(e,n,"errors.imageimport.failed"))}():(e=Zo(r),o(Cc(e,n)))},function(e){i.processRtf(r,n,e,s)})}return Vu(c.response,e,n,e,n)}i.events.insert.bind(function(e){o(Cc(e.elements,e.correlated))}),i.events.incomplete.bind(function(e){console.error("PowerPaste error code: RTF02"),o(kc(e.elements,e.correlated,e.message))}),function(t,n){var e=be(n);if(e.length!==xd.length)throw new Error("Partial match");q(e,function(e){return du(t.discriminator===e,n[e])}).getOrDie("Must find branch for constructor: "+t.discriminator)(t.data)}(Nd(u).getOrDie("Word input required for rtf data").rtf,{disabled:function(){n(re.none())},fromClipboard:function(e){n(!0===s.allowLocalImages?re.some(e.rtf):re.none())}})})}}function fp(r){function o(){return Ue.resolve(r)}return Se.cata(r.asset,function(e,t,n){return/tiff$/.test(t.getType())?st(t,"image/png").then(function(e){return ft(e).toPromise()}).then(re.some).catch(function(e){return console.warn(e),re.none()}).then(function(e){return e.map(function(e){var t=r.image;return URL.revokeObjectURL(n),qf(e,t),$f(e,t)}).getOr(r)}):o()},o)}function dp(e,n){function r(e,t){return Ue.all(N(e,fp)).then(function(e){return{response:t(e),bundle:n.bundle}})}return Vu(n.response,Xu,function(t,e){return r(e,function(e){return Cc(t,e)})},function(){return Ue.resolve(n)},function(t,e,n){return r(e,function(e){return console.error("PowerPaste error code: IMG01"),kc(t,e,n)})})}function mp(e,t){return e.isSupported?t.getWordData():re.none()}function pp(e){return e.getNative()}function gp(e){return e.getImage()}function vp(e){return e.getHtml()}function hp(e){return e.getText()}function yp(e){return e.getOnlyText()}function bp(e){return e.getGoogleDocsData()}function xp(e){return e.getVoid()}function wp(e,t,n,r){return{label:e,getAvailable:t,steps:n,capture:b(r)}}function Tp(e,t,n,r){return{label:e,getAvailable:t,steps:n,capture:b(r)}}function Ip(e,t,n){return wp(Ud.msoffice,A(mp,e),[Em({isWord:!0}),Zd(t,n),(u=e,function(e,t){var n,r,o,i=Nd(e).getOrDie("Wrong input type for Word Import handler"),a=am(t.bundle);return n=a,r=c,o=i.html,u.cleanDocument(o,n,r).then(function(e){if(null==e||0===e.length)return{response:Cc([],[]),bundle:Ec({})};var t=void 0===r.sanitizer?$n(r.intraFlag.isMarked):r.sanitizer;return ym(n,e,r.allowLocalImages,t)},function(e){return console.error("PowerPaste error code: WIM01"),{response:Ac("errors.paste.process.failure"),bundle:Ec({})}})}),lp(c=n),dp],!0);var u,c}function Sp(e){return wp(Ud.image,gp,[!1===e.allowLocalImages?function(e,t){return Xu("errors.local.images.disallowed")}:function(e,t){var n=_d(e).getOrDie("Must have image data for images handler");return dt(F(M(n.images,function(e){return"file"===e.kind&&/image/.test(e.type)}),function(e,t){var n=t.getAsFile();return null!==n?e.concat(n):e},[])).toPromise().then(function(e){var i,a;return{response:(i=[],a=[],P(e,function(o){return Se.cata(o,function(e,t,n){var r=Jt.fromTag("img");St(r,"src",n),i.push(r),a.push($f(o,r))},function(e,t,n){console.error("Internal error: Paste operation produced an image URL instead of a Data URI: ",t)})}),Cc(i,a)),bundle:Ec({})}})},dp],!0)}function Op(e){return wp(Ud.text,hp,[Am(e=void 0===e?4:e),Cm],!0)}function Ap(e,t,n,r,o){var i,a,m,u,p,c,s,l=Ja(o=void 0===o?Sc:o,r.baseUrl,r.cacheSuffix),f=$u(void 0!==r.pasteBinAttrs?r.pasteBinAttrs:{}),d=void 0===r.sanitizer?$n(r.intraFlag.isMarked):r.sanitizer,g=Di().browser.isIE();return Bf(ce([(i=re.from(r.tabSpaces).getOr(4),wp(Ud.plaintext,yp,[Am(i),Cm],!0)),Ip(l,t,r),wp(Ud.googledocs,bp,[Em({isGoogleDocs:!0}),Zd(t,r),_m,Dm(n,e,r),Kd,Wd(r),dp],!0),wp(Ud.native,vp,[(s=r.intraFlag,function(e,t){var n=Ed(e).getOrDie("Wrong input type for HTML handler"),r=s.findClipboardTags(Zo(n.container));r.each(function(e){P(e,_u)});var o=r.isSome();return{response:t.response,bundle:Ec({isInternal:o})}}),Qd(t,r),Dm(n,e,r),Wd(r),dp],!0),Sp(r)],g?[]:[Op(r.tabSpaces)]),Tp(Ud.fallback,pp,[(a=f,m=n,u=e,p=r.intraFlag,c=zf,function(e,t){var n=Ld(e).getOrDie("Must pass through event type").nativeEvent,f=c(),d=t.response;return new Ue(function(l,e){var t=a(u);t.events.after.bind(function(e){var t,n,r,o,i,a,u,c,s=e.container;qm.browser.isSafari()&&ya(s,'img[src^="webkit-fake-url"]').isSome()?(t=qm.deviceType.isWebView()?"webview.imagepaste":"safari.imagepaste",l({response:Ac(t),bundle:Ec({})})):(m(s),sa(s,$m()),u=s,n=((c=(a=qm).browser).isIE()&&11<=c.version.major?Nm:Pm)(u,a),r=_(ei(s,"*[id]"),function(e){return Ct(e,"id").exists(function(e){return Bt(e,"docs-internal-guid-")})}),o=Zo(s),i=p.findClipboardTags(o).isSome(),l({response:d,bundle:Ec({isWord:n,isGoogleDocs:r,isInternal:i,proxyBin:s,backgroundAssets:f})}))}),f.convert(n),t.run()})}),Qd(t,r),km(e,r.intraFlag,r),Wd(r),dp],!1),d)}function Cp(){var n={},u={};tinymce.Resource={add:function(e,t){u[e]&&(u[e](t),delete u[e]),n[e]=Ue.resolve(t)},load:function(r,o){var i='Script at URL "'+o+'" failed to load',a='Script at URL "'+o+"\" did not call `tinymce.Resource.add('"+r+"', data)` within 1 second";if(void 0!==n[r])return n[r];var e=new Ue(function(e,t){var n=function(e,t,n){function r(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o||(o=!0,null!==i&&(clearTimeout(i),i=null),n.apply(void 0,e))}}void 0===n&&(n=1e3);var o=!1,i=null,a=r(e),u=r(t);return{reject:u,resolve:a,start:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o||(i=setTimeout(function(){return u.apply(void 0,e)},n))}}}(e,t);u[r]=n.resolve,tinymce.ScriptLoader.loadScripts([o],function(){return n.start(a)},function(){return n.reject(i)})});return n[r]=e}}}function Dp(e,t,n,r){!function(e,t,n){if(!1===tinymce.Env.iOS&&"function"==typeof(null==e?void 0:e.setData))try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",n),e.setData(Ar(),t),1}catch(e){return}}(e.clipboardData,t.html,t.text)?n(t.html,r):(e.preventDefault(),r())}function kp(a){return function(e,t){var n=a.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),r=a.dom.create("div",{contenteditable:"true","data-mce-bogus":"all"},e);a.dom.setStyles(n,{position:"fixed",top:"50%",left:"-3000px",width:"1000px",overflow:"hidden"}),n.appendChild(r),a.dom.add(a.getBody(),n);var o=a.selection.getRng();r.focus();var i=a.dom.createRng();i.selectNodeContents(r),a.selection.setRng(i),setTimeout(function(){var e;a.selection.setRng(o),null!==(e=n.parentNode)&&void 0!==e&&e.removeChild(n),t()},0)}}function Lp(e){var t=e.selection.getContent({contextual:!0}).replace(/ contenteditable="([^"]+)"/g,' data-mce-contenteditable="$1"');return{html:Cr+t,text:e.selection.getContent({format:"text"})}}function Ep(e){return!e.selection.isCollapsed()||null!==(t=e).dom.getParent(t.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",t.getBody());var t}function _p(e){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(e)}function Np(n){var e=/^<a href="([^"]+)">([^<]+)<\/a>$/.exec(n);return re.from(e).bind(function(e){var t={url:e[1],html:n};return du(e[1]===e[2],t)})}function Pp(e,t,n){return"extra"in e.undoManager?(e.undoManager.extra(function(){Bp(e,t)},n),re.some(!0)):re.none()}function Rp(r,e){return Np(e).bind(function(e){var t,n;return!1===r.selection.isCollapsed()&&_p(e.url)?Pp(t=r,(n=e).html,function(){t.execCommand("mceInsertLink",!1,n.url)}):re.none()})}function Mp(a,e){return Np(e).bind(function(e){return r=e.url,o=ee(a),_p(i=r.toLowerCase())&&_(o,function(e){return zt(i,"."+e.toLowerCase())})?Pp(t=a,(n=e).html,function(){t.insertContent('<img src="'+n.url+'">')}):re.none();var t,n,r,o,i})}function Fp(m,p,e,t,g,v){function h(e,t,n){var r,o=e.getParam("smart_paste",!0,"boolean")?[Rp,Mp]:[],i=e,a=t;q(o.concat([(r=n,function(e,t){return e.undoManager.transact(function(){Bp(e,t),P(N(e.getBody().getElementsByTagName("*"),Jt.fromDom),function(t){Dt(t,"data-mce-style")&&!Dt(t,"style")&&Ct(t,"data-mce-style").each(function(e){return St(t,"style",e)})}),g.prepareImages(r)}),re.some(!0)})]),function(e){return e(i,a)})}function y(){x.on(function(e){return m.selection.moveToBookmark(e)}),x.clear()}var b=_a(function(e){return e.unbind()}),x=Na(),w=(t?t.jsUrl:e).replace(/\/$/,"")+"/"+"/js".replace(/^\//,""),T=Gn(m),I=m.getParam("paste_tab_spaces",4,"number");m.on("init",function(){var e,c,t,s,n={baseUrl:w,cacheSuffix:m.getParam("cache_suffix"),officeStyles:Y(m),htmlStyles:Z(m),gdocsStyles:G(m,"powerpaste_googledocs_import","prompt"),translations:Et,allowLocalImages:m.getParam("powerpaste_allow_local_images",!0,"boolean"),pasteBinAttrs:{"data-mce-bogus":"all",class:"mce-pastebin"},intraFlag:{isMarked:qn,findClipboardTags:function(e){var t=M(e,function(e){return wt(e)&&vt(Fa(e),Ar())});return t.length?re.some(t):re.none()}},keepSrc:m.getParam("powerpaste_keep_unsupported_src",!1,"boolean"),cleanFilteredInlineElements:(e=m.getParam("powerpaste_clean_filtered_inline_elements"),O(e)?N(e.split(","),function(e){return e.trim()}):[]),indentUseMargin:m.getParam("indent_use_margin",!1),sanitizer:T,tabSpaces:I},r=v?(s=m,{createDialog:function(){function r(){e.trigger.close()}var o,i,a="",t=Na(),u=(o=Ea([{text:"Close",name:"close",type:"custom",primary:!0}]),i=Ea({}),{setButtons:function(e){var n={},t=N(e,function(e){var t=e.text;return n[t.toLowerCase()]=e.click,{text:t,name:t.toLowerCase(),type:"custom"}});i.set(n),o.set(t)},getButtons:o.get,getAction:function(e){var t=i.get();return Te(t,e)?re.some(t[e]):re.none()}}),e=Mo({close:Ro([])});return{events:e.registry,setTitle:function(e){return a=e},setContent:function(e){return t.set(e)},setButtons:function(e){u.setButtons(e)},show:function(){t.on(function(e){var t=Kn(e.dom),n={title:a,body:{type:"panel",items:[{type:"htmlpanel",html:t}]},initialData:{},buttons:u.getButtons(),onCancel:r,onAction:function(e,t){u.getAction(t.name).each(D),e.close()}};s.windowManager.open(n)})},hide:S,destroy:function(){t.clear()},reflow:S}}}):(c=m,{createDialog:function(){function t(){n.trigger.close()}function e(){r.off("close",t),r.close("close")}var r,o="",i=[],a=[],u=Na(),n=Mo({close:Ro([])});return{events:n.registry,setTitle:function(e){o=e},setContent:function(e){var t=Kn(e.dom);i=[{type:"container",html:t}],u.set(e)},setButtons:function(e){var t=[];e.forEach(function(e){t.push({text:e.text,ariaLabel:e.text,onclick:e.click})}),a=t},show:function(){0===a.length&&(a=[{text:"Close",onclick:function(){r.close()}}]);var e={title:o,spacing:10,padding:10,minWidth:300,minHeight:100,layout:"flex",items:i,buttons:a};r=c.windowManager.open(e);var n=Jt.fromDom(r.getEl());u.on(function(e){var t=ya(n,"."+At(e,"class")).getOrDie("We must find this element or we cannot continue");Ta(t,e),_u(t)}),r.on("close",t)},hide:function(){e()},destroy:function(){e()},reflow:S}}}),o=Jt.fromDom(m.getBody()),a=Ap(o,r.createDialog,S,n,Up),u=(t=T,Bf([Op(I)],Tp(Ud.discard,xp,[Lm],!0),t=void 0===T?Sr:t));P([a,u],function(e){e.events.cancel.bind(function(){y()}),e.events.error.bind(function(e){y(),m.notificationManager?m.notificationManager.open({text:Et(e.message),type:"error"}):(v?zp:$a).showDialog(m,Et(e.message))}),e.events.insert.bind(function(e){var t=N(e.elements,function(e){return Kn(e.dom)}).join("").replace(/ data-mce-contenteditable="([^"]+)"/g,' contenteditable="$1"');m.focus(),g.importImages(e.assets).get(function(){y(),h(m,Eo(m,t,e.isInternal,e.source,e.mode),e.assets),X(m)&&g.uploadImages(e.assets)})}),k(tinymce,"5.7.0")||e.events.block.bind(function(e){m.setProgressState(e.state)})}),m.addCommand("mceInsertClipboardContent",function(e,t){var n,r,o,i;void 0!==t.content?a.pasteCustom((o=t.content,i=void 0===T?Sr:T,{getWordData:function(){return re.some(Cd({html:i.sanitizeHtml(o),rtf:wd()}))},getGoogleDocsData:re.none,getImage:re.none,getHtml:re.none,getText:re.none,getNative:C("There is no native event"),getOnlyText:re.none,getVoid:C("There is no paste event")})):void 0!==t.text&&u.pasteCustom((n=t.text,r=void 0===T?Sr:T,{getWordData:re.none,getGoogleDocsData:re.none,getImage:re.none,getHtml:re.none,getText:function(){return re.some(Dd({text:r.sanitizeText(n)}))},getNative:C("There is no native event"),getOnlyText:re.none,getVoid:C("There is no paste event")}))});var i,l,f,d=Ra(o,"paste",function(e){var t;m.readonly||(t=e.raw,(Wp?re.from(t.clipboardData).bind(function(e){return re.from(e.getData("text/html"))}):re.none()).bind(function(e){return vt(e,"<google-sheets-html-origin")?re.some("googlesheets"):vt(n=e," data-ccp-props=")&&vt(n," paraid=")&&/font-family:.+?_MSFontService(&quot;)?[,;]/.test(n)?re.some("mswordonline"):vt(t=e,"<meta name=ProgId content=Excel.Sheet>")&&!vt(t,'="urn:schemas-microsoft-com:office:')?re.some("msexcelonline"):re.none();var t,n}).each(function(e){m.fire("PowerPasteTempStats",{source:e})}),x.isSet()||x.set(m.selection.getBookmark(1)),(p.isText()?u:a).paste(e.raw),p.reset())});b.set(d),(i=m).on("cut",(l=i,function(e){Ep(l)&&Dp(e,Lp(l),kp(l),function(){var e,t=Di().browser;t.isChrome()||t.isFirefox()?(e=l.selection.getRng(),tinymce.util.Delay.setEditorTimeout(l,function(){l.selection.setRng(e),l.execCommand("Delete")},0)):l.execCommand("Delete")})})),i.on("copy",(f=i,function(e){Ep(f)&&Dp(e,Lp(f),kp(f),S)}))}),m.on("remove",function(){b.clear()})}function jp(n,r){var o=Ea(n.getParam("paste_as_text",!1,"boolean")),i=Ea(!1);n.on("keydown",function(e){var t=e;tinymce.util.VK.metaKeyPressed(t)&&86===t.keyCode&&t.shiftKey&&(i.set(!0),tinymce.Env.ie&&tinymce.Env.ie<10&&(e.preventDefault(),n.fire("paste",{})))});function a(){var e=!o.get();o.set(e),n.fire("PastePlainTextToggle",{state:e}),n.focus()}return{buttonToggle:function(e){var t=!o.get();r?e.setActive(t):this.active(t),a()},toggle:a,reset:function(){i.set(!1)},isText:function(){return i.get()||o.get()}}}var Up=Object.freeze({__proto__:null,loadScript:function(e,t){return tinymce.Resource||Cp(),tinymce.Resource.load(e,t)}}),Hp=Di().browser,Wp=!(Hp.isIE()||Hp.isEdge()&&Hp.version.major<16),Bp=function(e,t){return e.insertContent(t,{merge:Q(e),paste:!0}),re.some(!0)},zp=Object.freeze({__proto__:null,showDialog:function(e,t){e.windowManager.open({title:"Error",body:{type:"panel",items:[{type:"htmlpanel",html:t}]},initialData:{},buttons:[{text:"OK",type:"cancel",name:"ok",primary:!0}]})}});tinymce.PluginManager.requireLangPack("powerpaste","ar,bg_BG,ca,cs,da,de,el,es,eu,fa,fi,fr_FR,he_IL,hr,hu_HU,id,it,ja,kk,ko_KR,nb_NO,nl,pl,pt_BR,pt_PT,ro,ru,sk,sl_SI,sv_SE,th_TH,tr,uk,zh_CN,zh_TW"),tinymce.PluginManager.add("powerpaste",k(tinymce,"4.0.28")?(console.error('The "powerpaste" plugin requires at least 4.0.28 version of TinyMCE.'),S):function(n,e){function t(t){function e(e){t.setActive(e.state)}return t.setActive(f.isText()),n.on("PastePlainTextToggle",e),function(){return n.off("PastePlainTextToggle",e)}}function r(){var t=this;t.active(f.isText()),n.on("PastePlainTextToggle",function(e){t.active(e.state)})}var o,i,a,u,c,s,l=!k(tinymce,"5.0.0"),f=jp(n,l);tinymce.Env.ie&&tinymce.Env.ie<10?function(t,e){function n(t){return function(e){t(e)}}var r,o,i,a=this,u=ko(t,Et,!1),c=(o=u.showDialog,i=e,function(e){La(r,o,i,e)});(r=t).on("paste",n(c));var s,l,f,d=(l=u.showDialog,f=e,function(e){(tinymce.isOpera||0<navigator.userAgent.indexOf("Firefox/2"))&&((tinymce.isMac?e.metaKey:e.ctrlKey)&&86===e.keyCode||e.shiftKey&&45===e.keyCode)&&La(s,l,f,e)});(s=t).on("keydown",n(d)),t.addCommand("mceInsertClipboardContent",function(e,t){u.showDialog(t.content||t)}),J(t)&&t.on("PastePreProcess",function(e){J(t).call(a,a,e)})}(n,f):(s=(void 0!==n.uploadImages?Da:function(e){if(O(K(e))){var t={url:K(e),basePath:e.getParam("images_upload_base_path"),credentials:e.getParam("images_upload_credentials",!1)};return ka(e,t)}var o;return{importImages:function(){return $e([])},uploadImages:S,prepareImages:function(e){P(e,function(e){Se.cata(e,function(e,t,n){var r=lt(t);P(o.dom.select('img[src="'+n+'"]'),function(e){o.dom.setAttrib(e,"src",r)})},S)})},getLocalURL:Da(o=e).getLocalURL}})(n),Fp(n,f,e,void 0,s,l),n.getParam("powerpaste_block_drop",!1,"boolean")?(c=n).on("init",function(){te(c,c.getBody()),c.inline||te(c,c.getDoc())}):No(n,0,s,l)),i=J(o=n),a=o.getParam("paste_postprocess"),i&&o.on("PastePreProcess",function(e){return i.call(o,_o(o),e)}),a&&o.on("PastePostProcess",function(e){return a.call(o,_o(o),e)}),l?(n.ui.registry.addToggleButton("pastetext",{icon:"paste-text",tooltip:"Paste as text",onAction:f.buttonToggle,onSetup:t}),n.ui.registry.addToggleMenuItem("pastetext",{icon:"paste-text",text:"Paste as text",onAction:f.buttonToggle,onSetup:t})):(n.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:f.buttonToggle,onPostRender:r}),n.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,onclick:f.buttonToggle,onPostRender:r})),u=f,n.addCommand("mceTogglePlainTextPaste",u.toggle)})}();