wysiwyg-rails 4.2.0 → 4.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/froala_editor.min.js +2 -2
  3. data/app/assets/javascripts/froala_editor.pkgd.min.js +2 -2
  4. data/app/assets/javascripts/languages/ar.js +1 -1
  5. data/app/assets/javascripts/languages/bs.js +1 -1
  6. data/app/assets/javascripts/languages/cs.js +1 -1
  7. data/app/assets/javascripts/languages/da.js +1 -1
  8. data/app/assets/javascripts/languages/de.js +1 -1
  9. data/app/assets/javascripts/languages/el.js +1 -1
  10. data/app/assets/javascripts/languages/en_ca.js +1 -1
  11. data/app/assets/javascripts/languages/en_gb.js +1 -1
  12. data/app/assets/javascripts/languages/es.js +1 -1
  13. data/app/assets/javascripts/languages/et.js +1 -1
  14. data/app/assets/javascripts/languages/fa.js +1 -1
  15. data/app/assets/javascripts/languages/fi.js +1 -1
  16. data/app/assets/javascripts/languages/fr.js +1 -1
  17. data/app/assets/javascripts/languages/he.js +1 -1
  18. data/app/assets/javascripts/languages/hr.js +1 -1
  19. data/app/assets/javascripts/languages/hu.js +1 -1
  20. data/app/assets/javascripts/languages/id.js +1 -1
  21. data/app/assets/javascripts/languages/it.js +1 -1
  22. data/app/assets/javascripts/languages/ja.js +1 -1
  23. data/app/assets/javascripts/languages/ko.js +1 -1
  24. data/app/assets/javascripts/languages/ku.js +1 -1
  25. data/app/assets/javascripts/languages/me.js +1 -1
  26. data/app/assets/javascripts/languages/nb.js +1 -1
  27. data/app/assets/javascripts/languages/nl.js +1 -1
  28. data/app/assets/javascripts/languages/pl.js +1 -1
  29. data/app/assets/javascripts/languages/pt_br.js +1 -1
  30. data/app/assets/javascripts/languages/pt_pt.js +1 -1
  31. data/app/assets/javascripts/languages/ro.js +1 -1
  32. data/app/assets/javascripts/languages/ru.js +1 -1
  33. data/app/assets/javascripts/languages/sk.js +1 -1
  34. data/app/assets/javascripts/languages/sl.js +1 -1
  35. data/app/assets/javascripts/languages/sr.js +1 -1
  36. data/app/assets/javascripts/languages/sv.js +1 -1
  37. data/app/assets/javascripts/languages/th.js +1 -1
  38. data/app/assets/javascripts/languages/tr.js +1 -1
  39. data/app/assets/javascripts/languages/uk.js +1 -1
  40. data/app/assets/javascripts/languages/vi.js +1 -1
  41. data/app/assets/javascripts/languages/zh_cn.js +1 -1
  42. data/app/assets/javascripts/languages/zh_tw.js +1 -1
  43. data/app/assets/javascripts/plugins/align.min.js +1 -1
  44. data/app/assets/javascripts/plugins/char_counter.min.js +1 -1
  45. data/app/assets/javascripts/plugins/code_beautifier.min.js +1 -1
  46. data/app/assets/javascripts/plugins/code_view.min.js +1 -1
  47. data/app/assets/javascripts/plugins/colors.min.js +1 -1
  48. data/app/assets/javascripts/plugins/cryptojs.min.js +1 -1
  49. data/app/assets/javascripts/plugins/draggable.min.js +1 -1
  50. data/app/assets/javascripts/plugins/edit_in_popup.min.js +1 -1
  51. data/app/assets/javascripts/plugins/emoticons.min.js +1 -1
  52. data/app/assets/javascripts/plugins/entities.min.js +1 -1
  53. data/app/assets/javascripts/plugins/file.min.js +1 -1
  54. data/app/assets/javascripts/plugins/files_manager.min.js +1 -1
  55. data/app/assets/javascripts/plugins/font_family.min.js +1 -1
  56. data/app/assets/javascripts/plugins/font_size.min.js +2 -2
  57. data/app/assets/javascripts/plugins/forms.min.js +1 -1
  58. data/app/assets/javascripts/plugins/fullscreen.min.js +1 -1
  59. data/app/assets/javascripts/plugins/help.min.js +1 -1
  60. data/app/assets/javascripts/plugins/image.min.js +1 -1
  61. data/app/assets/javascripts/plugins/image_manager.min.js +1 -1
  62. data/app/assets/javascripts/plugins/inline_class.min.js +1 -1
  63. data/app/assets/javascripts/plugins/inline_style.min.js +1 -1
  64. data/app/assets/javascripts/plugins/line_breaker.min.js +2 -2
  65. data/app/assets/javascripts/plugins/line_height.min.js +1 -1
  66. data/app/assets/javascripts/plugins/link.min.js +1 -1
  67. data/app/assets/javascripts/plugins/lists.min.js +1 -1
  68. data/app/assets/javascripts/plugins/markdown.min.js +1 -1
  69. data/app/assets/javascripts/plugins/paragraph_format.min.js +1 -1
  70. data/app/assets/javascripts/plugins/paragraph_style.min.js +1 -1
  71. data/app/assets/javascripts/plugins/print.min.js +1 -1
  72. data/app/assets/javascripts/plugins/quick_insert.min.js +1 -1
  73. data/app/assets/javascripts/plugins/quote.min.js +1 -1
  74. data/app/assets/javascripts/plugins/save.min.js +1 -1
  75. data/app/assets/javascripts/plugins/special_characters.min.js +1 -1
  76. data/app/assets/javascripts/plugins/table.min.js +2 -2
  77. data/app/assets/javascripts/plugins/track_changes.min.js +2 -2
  78. data/app/assets/javascripts/plugins/trim_video.min.js +1 -1
  79. data/app/assets/javascripts/plugins/url.min.js +1 -1
  80. data/app/assets/javascripts/plugins/video.min.js +1 -1
  81. data/app/assets/javascripts/plugins/word_counter.min.js +2 -2
  82. data/app/assets/javascripts/plugins/word_paste.min.js +2 -2
  83. data/app/assets/javascripts/plugins.pkgd.min.js +2 -2
  84. data/app/assets/javascripts/third_party/embedly.min.js +1 -1
  85. data/app/assets/javascripts/third_party/font_awesome.min.js +1 -1
  86. data/app/assets/javascripts/third_party/image_tui.min.js +1 -1
  87. data/app/assets/javascripts/third_party/showdown.min.js +1 -1
  88. data/app/assets/javascripts/third_party/spell_checker.min.js +1 -1
  89. data/app/assets/stylesheets/froala_editor.css +1 -1
  90. data/app/assets/stylesheets/froala_editor.min.css +1 -1
  91. data/app/assets/stylesheets/froala_editor.pkgd.css +1 -1
  92. data/app/assets/stylesheets/froala_editor.pkgd.min.css +1 -1
  93. data/app/assets/stylesheets/froala_style.css +1 -1
  94. data/app/assets/stylesheets/froala_style.min.css +1 -1
  95. data/app/assets/stylesheets/plugins/char_counter.css +1 -1
  96. data/app/assets/stylesheets/plugins/char_counter.min.css +1 -1
  97. data/app/assets/stylesheets/plugins/code_view.css +1 -1
  98. data/app/assets/stylesheets/plugins/code_view.min.css +1 -1
  99. data/app/assets/stylesheets/plugins/colors.css +1 -1
  100. data/app/assets/stylesheets/plugins/colors.min.css +1 -1
  101. data/app/assets/stylesheets/plugins/draggable.css +1 -1
  102. data/app/assets/stylesheets/plugins/draggable.min.css +1 -1
  103. data/app/assets/stylesheets/plugins/emoticons.css +1 -1
  104. data/app/assets/stylesheets/plugins/emoticons.min.css +1 -1
  105. data/app/assets/stylesheets/plugins/file.css +1 -1
  106. data/app/assets/stylesheets/plugins/file.min.css +1 -1
  107. data/app/assets/stylesheets/plugins/files_manager.css +1 -1
  108. data/app/assets/stylesheets/plugins/files_manager.min.css +1 -1
  109. data/app/assets/stylesheets/plugins/fullscreen.css +1 -1
  110. data/app/assets/stylesheets/plugins/fullscreen.min.css +1 -1
  111. data/app/assets/stylesheets/plugins/help.css +1 -1
  112. data/app/assets/stylesheets/plugins/help.min.css +1 -1
  113. data/app/assets/stylesheets/plugins/image.css +1 -1
  114. data/app/assets/stylesheets/plugins/image.min.css +1 -1
  115. data/app/assets/stylesheets/plugins/image_manager.css +1 -1
  116. data/app/assets/stylesheets/plugins/image_manager.min.css +1 -1
  117. data/app/assets/stylesheets/plugins/line_breaker.css +1 -1
  118. data/app/assets/stylesheets/plugins/line_breaker.min.css +1 -1
  119. data/app/assets/stylesheets/plugins/markdown.css +1 -1
  120. data/app/assets/stylesheets/plugins/markdown.min.css +1 -1
  121. data/app/assets/stylesheets/plugins/quick_insert.css +1 -1
  122. data/app/assets/stylesheets/plugins/quick_insert.min.css +1 -1
  123. data/app/assets/stylesheets/plugins/special_characters.css +1 -1
  124. data/app/assets/stylesheets/plugins/special_characters.min.css +1 -1
  125. data/app/assets/stylesheets/plugins/table.css +1 -1
  126. data/app/assets/stylesheets/plugins/table.min.css +1 -1
  127. data/app/assets/stylesheets/plugins/trim_video.css +1 -1
  128. data/app/assets/stylesheets/plugins/trim_video.min.css +1 -1
  129. data/app/assets/stylesheets/plugins/video.css +1 -1
  130. data/app/assets/stylesheets/plugins/video.min.css +1 -1
  131. data/app/assets/stylesheets/plugins.pkgd.css +1 -1
  132. data/app/assets/stylesheets/plugins.pkgd.min.css +1 -1
  133. data/app/assets/stylesheets/themes/dark.css +1 -1
  134. data/app/assets/stylesheets/themes/dark.min.css +1 -1
  135. data/app/assets/stylesheets/themes/gray.css +1 -1
  136. data/app/assets/stylesheets/themes/gray.min.css +1 -1
  137. data/app/assets/stylesheets/themes/royal.css +1 -1
  138. data/app/assets/stylesheets/themes/royal.min.css +1 -1
  139. data/app/assets/stylesheets/third_party/embedly.css +1 -1
  140. data/app/assets/stylesheets/third_party/embedly.min.css +1 -1
  141. data/app/assets/stylesheets/third_party/font_awesome.css +1 -1
  142. data/app/assets/stylesheets/third_party/font_awesome.min.css +1 -1
  143. data/app/assets/stylesheets/third_party/image_tui.css +1 -1
  144. data/app/assets/stylesheets/third_party/image_tui.min.css +1 -1
  145. data/app/assets/stylesheets/third_party/spell_checker.css +1 -1
  146. data/app/assets/stylesheets/third_party/spell_checker.min.css +1 -1
  147. data/lib/wysiwyg-rails/version.rb +1 -1
  148. metadata +2 -2
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * froala_editor v4.2.0 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v4.2.1 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
4
  * Copyright 2014-2024 Froala Labs
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * froala_editor v4.2.0 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v4.2.1 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
4
  * Copyright 2014-2024 Froala Labs
5
5
  */
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v4.2.0 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v4.2.1 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
4
  * Copyright 2014-2024 Froala Labs
5
5
  */
6
6
 
7
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(s){"use strict";s=s&&s.hasOwnProperty("default")?s["default"]:s,Object.assign(s.DEFAULTS,{wordCounterMax:-1,wordCounterCount:!0}),s.PLUGINS.wordCounter=function(o){var r,t=o.$;function n(){var e=o.el.innerText.toString();e=(e=(e=(e=(e=(e=(e=(e=e.replace(/(^\s*)|(\s*$)/gi," ")).replace(/\u00a0/g," ")).replace(/[ ]{2,}/gi," ")).replace(/\n /,"\n")).replace(/[\u200A\u200C-\u200D\uFEFF\u202F\u2000-\u2009\u205F\u3000\u1680\u00A0\u0020]/g," ")).replace(/[\u200B]/g,"")).replace(/\t+/g," ")).split(" ").join("\n");var t=o.$el.find(".fr-pagebreak"),r=e.split(/\r?\n/),n=0;return r.forEach(function(e){0<(e=e.replace(/\s/g,"")).length&&n++}),n-2*t.length}function e(e){if(o.opts.wordCounterMax<0)return!0;if(n()<o.opts.wordCounterMax)return!0;var t=e.which;return!(!o.keys.ctrlKey(e)&&o.keys.isCharacter(t)||t===s.KEYCODE.IME)||(e.preventDefault(),e.stopPropagation(),o.events.trigger("wordCounter.exceeded"),!1)}function u(){if(o.opts.wordCounterCount){var e=n()+(0<o.opts.wordCounterMax?"/"+o.opts.wordCounterMax:"");r.text("".concat(o.language.translate("Words")," : ").concat(e)),o.opts.toolbarBottom&&r.css("margin-bottom",o.$tb.outerHeight(!0));var t=o.$wp.get(0).offsetWidth-o.$wp.get(0).clientWidth;0<=t&&("rtl"==o.opts.direction?r.css("margin-left",t):r.css("margin-right",t))}}function a(e){return o.opts.wordCounterMax<0?e:t("<div>").html(e).text().split(" ").length+n()<=o.opts.wordCounterMax?e:(o.events.trigger("wordCounter.exceeded"),"")}return{_init:function i(){return!!o.$wp&&!!o.opts.wordCounterCount&&((r=t(document.createElement("span")).attr("class","fr-counter fr-wCounter")).css("bottom",o.$wp.css("border-bottom-width")),o.$second_tb?o.$second_tb.append(r):o.$wp.append(r),o.events.on("keydown",e,!0),o.events.on("paste.afterCleanup",a),o.events.on("keyup contentChanged input",function(){o.events.trigger("wordCounter.update")}),o.events.on("wordCounter.update",u),o.events.trigger("wordCounter.update"),void o.events.on("destroy",function(){t(o.o_win).off("resize.char".concat(o.id)),r.removeData().remove(),r=null}))},wordCount:n}}});
7
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(E){"use strict";E=E&&E.hasOwnProperty("default")?E["default"]:E,Object.assign(E.DEFAULTS,{wordCounterMax:-1,wordCounterCount:!0}),E.PLUGINS.wordCounter=function(C){var r,t=C.$;function f(){var e=C.el.innerText.toString();e=(e=(e=(e=(e=(e=(e=(e=e.replace(/(^\s*)|(\s*$)/gi," ")).replace(/\u00a0/g," ")).replace(/[ ]{2,}/gi," ")).replace(/\n /,"\n")).replace(/[\u200A\u200C-\u200D\uFEFF\u202F\u2000-\u2009\u205F\u3000\u1680\u00A0\u0020]/g," ")).replace(/[\u200B]/g,"")).replace(/\t+/g," ")).split(" ").join("\n");var t=C.$el.find(".fr-pagebreak"),r=e.split(/\r?\n/),n=0;return r.forEach(function(e){0<(e=e.replace(/\s/g,"")).length&&n++}),n-2*t.length}function e(e){var t=!1;if(C.opts.wordCounterMax<0)return!0;if(f()<C.opts.wordCounterMax)return!0;var r=e.which,n=C.selection.get(),o=n.focusOffset,a=n.focusNode.textContent,u=(a=a.replace(/\u00a0/g," ")).toUpperCase().charCodeAt(o-1),i=a.toUpperCase().charCodeAt(o);return n.focusNode.data||(u=i=NaN),!function s(e,t){if(C.keys.isCharacter(e)&&C.keys.isCharacter(t)&&e!=E.KEYCODE.SPACE&&t!=E.KEYCODE.SPACE)return!0;return!1}(u,i)||r!==E.KEYCODE.ENTER&&r!==E.KEYCODE.SPACE||(t=!0),(function c(e,t){return e===E.KEYCODE.SPACE&&t===E.KEYCODE.SPACE}(u,i)||function d(e,t){if(isNaN(e)&&t===E.KEYCODE.SPACE||e===E.KEYCODE.SPACE&&isNaN(t))return!0;return!1}(u,i)||function p(e,t){if(isNaN(e)&&isNaN(t))return!0;return!1}(u,i))&&C.keys.isCharacter(r)&&r!=E.KEYCODE.SPACE&&(t=!0),f()>C.opts.wordCounterMax&&(C.keys.isCharacter(r)||r===E.KEYCODE.ENTER)&&(t=!0),!(!C.keys.ctrlKey(e)&&t||r===E.KEYCODE.IME)||(e.preventDefault(),e.stopPropagation(),C.events.trigger("wordCounter.exceeded"),!1)}function n(){if(C.opts.wordCounterCount){var e=f()+(0<C.opts.wordCounterMax?"/"+C.opts.wordCounterMax:"");r.text("".concat(C.language.translate("Words")," : ").concat(e)),C.opts.toolbarBottom&&r.css("margin-bottom",C.$tb.outerHeight(!0));var t=C.$wp.get(0).offsetWidth-C.$wp.get(0).clientWidth;0<=t&&("rtl"==C.opts.direction?r.css("margin-left",t):r.css("margin-right",t))}}function o(e){return C.opts.wordCounterMax<0?e:t("<div>").html(e).text().split(" ").length+f()<=C.opts.wordCounterMax?e:(C.events.trigger("wordCounter.exceeded"),"")}return{_init:function a(){return!!C.$wp&&!!C.opts.wordCounterCount&&((r=t(document.createElement("span")).attr("class","fr-counter fr-wCounter")).css("bottom",C.$wp.css("border-bottom-width")),C.$second_tb?C.$second_tb.append(r):C.$wp.append(r),C.events.on("keydown",e,!0),C.events.on("paste.afterCleanup",o),C.events.on("keyup contentChanged input",function(){C.events.trigger("wordCounter.update")}),C.events.on("wordCounter.update",n),C.events.trigger("wordCounter.update"),void C.events.on("destroy",function(){t(C.o_win).off("resize.char".concat(C.id)),r.removeData().remove(),r=null}))},wordCount:f}}});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v4.2.0 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v4.2.1 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
4
  * Copyright 2014-2024 Froala Labs
5
5
  */
6
6
 
7
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(t.FroalaEditor)}(this,function(I){"use strict";function o(t){return function e(t){if(Array.isArray(t))return l(t)}(t)||function r(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function i(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(t,e)}(t)||function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}I=I&&I.hasOwnProperty("default")?I["default"]:I,Object.assign(I.DEFAULTS,{wordDeniedTags:[],wordDeniedAttrs:[],wordAllowedStyleProps:["font-family","font-size","background","color","width","text-align","vertical-align","background-color","padding","margin","height","margin-top","margin-left","margin-right","margin-bottom","text-decoration","font-weight","font-style","text-indent","border","border-.*","line-height","list-style-type"],wordPasteModal:!0,wordPasteKeepFormatting:!0}),I.PLUGINS.wordPaste=function(E){var a,n,S,D=E.$,s="word_paste",p={},T=!0,w=0;function e(t){var e=E.opts.wordAllowedStyleProps;t||(E.opts.wordAllowedStyleProps=[]),0===n.indexOf("<colgroup>")&&(n="<table>"+n+"</table>"),n=l(n=n.replace(/<span[\n\r ]*style='mso-spacerun:yes'>([\r\n\u00a0 ]*)<\/span>/g,function(t,e){for(var r="",i=0;i++<e.length;)r+="&nbsp;";return r}),E.paste.getRtfClipboard());var r=E.doc.createElement("DIV");r.innerHTML=n,E.html.cleanBlankSpaces(r),n=r.innerHTML,n=(n=E.paste.cleanEmptyTagsAndDivs(n)).replace(/\u200b/g,""),function i(){E.modals.hide(s)}(),E.helpers.isMobile()&&E.events.focus(),E.paste.clean(n,!0,!0),E.opts.wordAllowedStyleProps=e}function L(t){t.parentNode&&t.parentNode.removeChild(t)}function c(t,e){if(e(t))for(var r=t.firstChild;r;){var i=r,n=r.previousSibling;r=r.nextSibling,c(i,e),i.previousSibling||i.nextSibling||i.parentNode||!r||n===r.previousSibling||!r.parentNode?i.previousSibling||i.nextSibling||i.parentNode||!r||r.previousSibling||r.nextSibling||r.parentNode||(n?r=n.nextSibling?n.nextSibling.nextSibling:null:t.firstChild&&(r=t.firstChild.nextSibling)):r=n?n.nextSibling:t.firstChild}}function _(t){return D(t).hasClass("ListContainerWrapper")&&0<D(t).find("ol").length}function $(t){return D(t).hasClass("ListContainerWrapper")&&0<D(t).find("ul").length}function k(t){if(_(t)||$(t))return!0;if(!t.getAttribute("style")||!/mso-list:[\s]*l/gi.test(t.getAttribute("style").replace(/\n/gi,"")))return!1;try{if(!t.querySelector('[style="mso-list:Ignore"]'))return!!(t.outerHTML&&0<=t.outerHTML.indexOf("\x3c!--[if !supportLists]--\x3e"))}catch(e){return!1}return!0}function F(t){return _(t)||$(t)?D(t).find("li").attr("data-aria-level"):t.getAttribute("style").replace(/\n/gi,"").replace(/.*level([0-9]+?).*/gi,"$1")}function W(t,i){var e=t.cloneNode(!0);if(-1!==["H1","H2","H3","H4","H5","H6"].indexOf(t.tagName)){var r=document.createElement(t.tagName.toLowerCase());r.setAttribute("style",t.getAttribute("style")),r.innerHTML=e.innerHTML,e.innerHTML=r.outerHTML}c(e,function(t){if(t.nodeType==Node.COMMENT_NODE&&(E.browser.msie||E.browser.safari||E.browser.edge))try{if("[if !supportLists]"===t.data){for(t=t.nextSibling;t&&t.nodeType!==Node.COMMENT_NODE;){var e=t.nextSibling;t.parentNode.removeChild(t),t=e}t&&t.nodeType==Node.COMMENT_NODE&&t.parentNode.removeChild(t)}}catch(r){return!1}return t.nodeType===Node.ELEMENT_NODE&&("mso-list:\nIgnore"===t.getAttribute("style")&&t.setAttribute("style","mso-list:Ignore"),"mso-list:Ignore"===t.getAttribute("style")&&t.parentNode.removeChild(t),t.setAttribute("style",m(t)),A(t,i)),!0});var n=_(t)?D(t).find("li").get(0).innerHTML:e.innerHTML;if(_(t)||$(t)){n="";for(var l=D(t).find("li"),a=0;a<l.length;a++){var s=D(l.get(a).innerHTML);s.find("span").each(function(){"&nbsp;"===D(this).html()&&(0<D(this).prev().text().trim().length?D(this).remove():D(this).html("&ZeroWidthSpace;"))}),n+="<li >".concat(s.get(0).innerHTML,"</li>")}}else n="<li>".concat(n,"</li>");return n=n.replace(/<!--[\s\S]*?-->/gi,"")}function m(t){var e=1<arguments.length&&arguments[1]!==undefined?arguments[1]:null,r="",i=["line-height","font-family","font-size","color","background"].concat(o(e||[])),n=t.getAttribute("style");return n&&i.forEach(function(e){var t=n.split(";").find(function(t){return t.trim().includes(e+":")});t&&(t.includes("mso")&&(t=t.match(new RegExp(e+":.*(;|)"))[0]),t.trim().startsWith(e)&&(r+=t+";"))}),r}function y(t,e){for(var r=document.createElement(e),i=0;i<t.attributes.length;i++){var n=t.attributes[i].name;"FONT"===t.tagName&&(E.browser.msie&&["id","class","style"].indexOf(n)<0||!E.browser.msie&&CSS.supports(n,t.getAttribute(n)))?D(r).css(n,t.getAttribute(n)):r.setAttribute(n,t.getAttribute(n))}return r.innerHTML=t.innerHTML,t.parentNode.replaceChild(r,t),r}function x(t,e){E.node.clearAttributes(t);for(var r=t.firstElementChild,i=0,n=!1,l=null;r;){if(r.firstElementChild&&-1!==r.firstElementChild.tagName.indexOf("W:"))for(var a=0;a<r.children.length;a++)"<('[^']*'|\"[^\"]*\"|[^\"'>])*>"==r.children[a]&&(r.innerHTML+=r.children[a]);(l=r.getAttribute("width"))||(l=r.style.width),l||n||(n=!0),i+=parseInt(l,10),(!r.firstChild||r.firstChild&&r.firstChild.data===I.UNICODE_NBSP)&&(r.firstChild&&L(r.firstChild),r.innerHTML="<br>");for(var s=r.firstElementChild,o=1===r.children.length;s;)"P"!==s.tagName||k(s)||o&&M(s),s=s.nextElementSibling;if(e){var d=r.getAttribute("class");if(d){var f=(d=H(d)).match(/xl[0-9]+/gi);if(f){var u="."+f[0];e[u]&&O(r,e[u])}}e.td&&O(r,e.td)}var g=r.getAttribute("style");g&&(g=H(g))&&";"!==g.slice(-1)&&(g+=";");var p=r.getAttribute("valign");if(!p&&g){var c=g.match(/vertical-align:.+?[; "]{1,1}/gi);c&&(p=c[c.length-1].replace(/vertical-align:(.+?)[; "]{1,1}/gi,"$1"))}var m=null;if(g){var h=g.match(/text-align:.+?[; "]{1,1}/gi);h&&(m=h[h.length-1].replace(/text-align:(.+?)[; "]{1,1}/gi,"$1")),"general"===m&&(m=null)}var v=null;if(g){var b=g.match(/background:.+?[; "]{1,1}/gi);b&&(v=b[b.length-1].replace(/background:(.+?)[; "]{1,1}/gi,"$1"))}var y=r.getAttribute("colspan"),x=r.getAttribute("rowspan");y&&r.setAttribute("colspan",y),x&&r.setAttribute("rowspan",x),p&&(r.style["vertical-align"]=p),m&&(r.style["text-align"]=m),v&&(r.style["background-color"]=v),l&&r.setAttribute("width",l),r=r.nextElementSibling}for(r=t.firstElementChild;r;)l=r.getAttribute("width"),n&&r.removeAttribute("width"),r=r.nextElementSibling;t.previousSibling?S!=i&&(T=!1):S=i,!t.nextElementSibling&&T&&function C(t){for(;t;){for(var e=t.firstElementChild,r=null,i=0;e;)r=e.getAttribute("width"),i+=parseInt(r,10),e=e.nextElementSibling;for(e=t.firstElementChild;e;)r=e.getAttribute("width"),e.setAttribute("width",100*parseInt(r,10)/i+"%"),e=e.nextElementSibling;t=t.previousElementSibling}}(t);var A=D(t).parentsUntil("table").parent().last();if(w<i&&(w=i),!t.nextElementSibling&&0<A.length){var N=D(A)[0].width;D(A)[0].style.width=N||w,T=!(w=0)}}function M(t){var e=t.getAttribute("align");e&&(t.style["text-align"]=e,t.removeAttribute("align"))}function H(t){return t.replace(/\n|\r|\n\r|&quot;/g,"")}function O(t,e,r){if(e){var i=t.getAttribute("style");i&&";"!==i.slice(-1)&&(i+=";"),e&&";"!==e.slice(-1)&&(e+=";"),e=e.replace(/\n/gi,"");var n=null;n=r?(i||"")+e:e+(i||""),t.setAttribute("style",n)}}var h=null;function v(t,e,r){for(var i=t.split(r),n=1;n<i.length;n++){var l=i[n];if(1<(l=l.split("shplid")).length){l=l[1];for(var a="",s=0;s<l.length&&"\\"!==l[s]&&"{"!==l[s]&&" "!==l[s]&&"\r"!==l[s]&&"\n"!==l[s];)a+=l[s],s++;var o=l.split("bliptag");if(o&&o.length<2)continue;var d=null;if(-1!==o[0].indexOf("pngblip")?d="image/png":-1!==o[0].indexOf("jpegblip")&&(d="image/jpeg"),!d)continue;var f=o[1].split("}");if(f&&f.length<2)continue;var u=void 0;if(2<f.length&&-1!==f[0].indexOf("blipuid"))u=f[1].split(" ");else{if((u=f[0].split(" "))&&u.length<2)continue;u.shift()}var g=u.join("");h[e+a]={image_hex:g,image_type:d}}}}function b(t,e){if(e){var r;if("IMG"===t.tagName){var i,n,l=t.getAttribute("src");if(!l||-1===l.indexOf("file://"))return;if(0===l.indexOf("file://")&&E.helpers.isURL(t.getAttribute("alt")))return void t.setAttribute("src",t.getAttribute("alt"));if(!(r=p[t.getAttribute("v:shapes")]))r=t.getAttribute("v:shapes"),null!=t&&t.parentNode&&null!=t&&null!==(i=t.parentNode)&&void 0!==i&&i.parentNode&&0<=(null==t||null===(n=t.parentNode)||void 0===n||null===(n=n.parentNode)||void 0===n||null===(n=n.innerHTML)||void 0===n?void 0:n.indexOf("msEquation"))&&(r=null)}else{var a;r=null==t||null===(a=t.parentNode)||void 0===a?void 0:a.getAttribute("o:spid")}if(t.removeAttribute("height"),r){!function u(t){h={},v(t,"i","\\shppict"),v(t,"s","\\shp{")}(e);var s=h[r.substring(7)];if(s){var o,d=function g(t){for(var e=t.match(/[0-9a-f]{2}/gi),r=[],i=0;i<e.length;i++)r.push(String.fromCharCode(parseInt(e[i],16)));var n=r.join("");return btoa(n)}(s.image_hex),f="data:"+s.image_type+";base64,"+d;if("IMG"===t.tagName)t.src=f,t.setAttribute("data-fr-image-pasted",!0);else D(null==t?void 0:t.parentNode).before('<img data-fr-image-pasted="true" src="'+f+'" style="'+(null==t||null===(o=t.parentNode)||void 0===o?void 0:o.getAttribute("style"))+'">').remove()}}}}function A(t,e){var r=t.tagName,i=r.toLowerCase();t.firstElementChild&&("I"===t.firstElementChild.tagName?y(t.firstElementChild,"em"):"B"===t.firstElementChild.tagName&&y(t.firstElementChild,"strong"));if(-1!==["SCRIPT","APPLET","EMBED","NOFRAMES","NOSCRIPT"].indexOf(r))return L(t),!1;for(var n=["META","LINK","XML","ST1:","O:","W:","FONT"],l=0;l<n.length;l++)if(-1!==r.indexOf(n[l]))return t.innerHTML&&(t.outerHTML=t.innerHTML),L(t),!1;if("TD"!==r){var a=t.getAttribute("class")||"MsoNormal";if(e&&a){for(var s=(a=H(a)).split(" "),o=0;o<s.length;o++){var d=[],f="."+s[o];d.push(f),f=i+f,d.push(f);for(var u=0;u<d.length;u++)e[d[u]]&&O(t,e[d[u]])}t.removeAttribute("class")}e&&e[i]&&O(t,e[i])}if(-1!==["P","H1","H2","H3","H4","H5","H6","PRE"].indexOf(r)){var g=t.getAttribute("class");if(g&&(e&&e[r.toLowerCase()+"."+g]&&O(t,e[r.toLowerCase()+"."+g]),-1!==g.toLowerCase().indexOf("mso"))){var p=H(g);(p=p.replace(/[0-9a-z-_]*mso[0-9a-z-_]*/gi,""))?t.setAttribute("class",p):t.removeAttribute("class")}var c=t.getAttribute("style");if(c){var m=c.match(/text-align:.+?[; "]{1,1}/gi);m&&m[m.length-1].replace(/(text-align:.+?[; "]{1,1})/gi,"$1")}M(t)}if("TR"===r&&x(t,e),"A"!==r||t.attributes.getNamedItem("href")||t.attributes.getNamedItem("name")||!t.innerHTML||(t.outerHTML=t.innerHTML),"A"==r&&t.getAttribute("href")&&t.querySelector("img"))for(var h=t.querySelectorAll("span"),v=0;v<h.length;v++)h[v].innerText||(h[v].outerHTML=h[v].innerHTML);if("TD"!==r&&"TH"!==r||t.innerHTML||(t.innerHTML="<br>"),t.getAttribute("lang")&&t.removeAttribute("lang"),t.getAttribute("style")&&-1!==t.getAttribute("style").toLowerCase().indexOf("mso")){var b=H(t.getAttribute("style"));(b=b.replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi,"").replace("line-height:107%",""))?t.setAttribute("style",b):t.removeAttribute("style")}return!0}function l(t,e){0<=t.indexOf("<html")&&(t=t.replace(/[.\s\S\w\W<>]*(<html[^>]*>[.\s\S\w\W<>]*<\/html>)[.\s\S\w\W<>]*/i,"$1"));var o=t.match(/(MSFontService|class="?Mso|class='?Mso|class="?Xl|class='?Xl|class=Xl|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument|LibreOffice)/gi);!function u(t){for(var e=t.split("v:shape"),r=1;r<e.length;r++){var i=e[r],n=i.split(' id="')[1];if(n&&1<n.length){n=n.split('"')[0];var l=i.split(' o:spid="')[1];l&&1<l.length&&(l=l.split('"')[0],p[n]=l)}}}(t);var r=(new DOMParser).parseFromString(t,"text/html"),i=r.head,n=r.body,d=function g(t){var e={},r=t.getElementsByTagName("style");if(r.length){var i=r[0].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi);if(i)for(var n=0;n<i.length;n++){var l=i[n],a=l.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),s=l.replace(/[\S ]+\s+{([\s\S]+?)}/gi,"$1");a=a.replace(/^[\s]|[\s]$/gm,""),s=s.replace(/^[\s]|[\s]$/gm,""),a=a.replace(/\n|\r|\n\r/g,""),s=s.replace(/\n|\r|\n\r/g,"");for(var o=a.split(", "),d=0;d<o.length;d++)e[o[d]]=s}}return e}(i);c(n,function(t){if(t.nodeType===Node.TEXT_NODE&&/\n|\u00a0|\r/.test(t.data)){if(!/\S| /.test(t.data)&&!/[\u00a0]+/.test(t.data))return t.data===I.UNICODE_NBSP?(t.data="\u200b",!0):1===t.data.length&&10===t.data.charCodeAt(0)?(t.data=" ",!0):(L(t),!1);t.data=t.data.replace(/\n|\r/gi," ")}return!0}),c(n,function(t){return t.nodeType!==Node.ELEMENT_NODE||"V:IMAGEDATA"!==t.tagName&&"IMG"!==t.tagName||b(t,e),!0});for(var l=n.querySelectorAll("ul > ul, ul > ol, ol > ul, ol > ol"),a=l.length-1;0<=a;a--)l[a].previousElementSibling&&"LI"===l[a].previousElementSibling.tagName&&l[a].previousElementSibling.appendChild(l[a]);c(n,function(t){if(t.nodeType===Node.TEXT_NODE)return t.data=t.data.replace(/<br>(\n|\r)/gi,"<br>"),!1;if(t.nodeType===Node.ELEMENT_NODE){if(k(t)){var e=t.parentNode,r=t.previousSibling,i=function P(t,e,r,i){var n,l,a,s,o,d,f,u=navigator.userAgent.toLowerCase();-1!=u.indexOf("safari")&&(u=-1<u.indexOf("chrome")?1:"safari"),t.innerHTML.includes("mso-list:\nIgnore")&&(t.innerHTML=t.innerHTML.replace(/mso-list:\nIgnore/gi,"mso-list:Ignore"));var g,p,c,m=/[0-9a-zA-Z]./gi,h="",v=_(t),b=null===(n=D(t).find("ol"))||void 0===n||null===(n=n.attr("style"))||void 0===n||null===(n=n.split(";"))||void 0===n?void 0:n.find(function(t){return t.trim().startsWith("list-style-type")});b==undefined&&$(t)&&(b=null===(p=D(t).find("ul"))||void 0===p||null===(p=p.attr("style"))||void 0===p||null===(p=p.split(";"))||void 0===p?void 0:p.find(function(t){return t.trim().startsWith("list-style-type")}));if(v)d="ol",f=b?"list-style-type: "+b.replace("list-style-type:","").trim()+";":"";else if($(t))d="ul",f=b?"list-style-type: "+b.replace("list-style-type:","").trim()+";":"";else{var y=t.querySelector('span[style="mso-list:Ignore"]');null==y&&"safari"==u&&(y=t.querySelector('span[lang="PT-BR"]'));var x=!1;y&&(x=x||m.test(y.textContent)),null!==y&&(g=y.textContent.trim().split(".")[0]),d=1==x?("1"==(g=y.textContent.trim().split(".")[0])?f="decimal;":"i"==g?f="lower-roman;":"I"==g?f="upper-roman;":"o"==g?f="circle;":g.match(/^v$/)||(g.match(/^[a-z]$/)||g.match(/^[a-z]\)$/)?f="lower-alpha;":(g.match(/^[A-Z]$/)||g.match(/^[A-Z]\)$/))&&(f="upper-alpha;")),f="list-style-type: "+f,"ol"):(null!=y&&(g=y.textContent.trim().split(".")[0]),"\xa7"==g?f="square;":"\xb7"==g&&(f="disc;"),f="list-style-type: "+f,"ul"),y==undefined||y.textContent==undefined||isNaN(parseInt(y.textContent.trim().split(".")[1],10))||(h=' class="decimal_type" ')}var A=F(t),N=t.style.marginLeft,C="";if(N.includes("in")?(C="in",N=parseFloat(N)-.5):N.includes("pt")&&(C="px",N=parseFloat(N)-10),N||(N="undefined"),1==A)if(c=f?"<"+d+' style = "'+f+"; margin-left:"+N+C+';">':"<"+d+' style="margin-left:'+N+C+';">',"list-style-type: upper-alpha;"==f){var E=v?parseInt(D(t).find("ol").attr("start")):g.charCodeAt(0)-64;c=f?"<"+d+h+' start="'+E+'" style = "'+f+" margin-left:"+N+C+';">':"<"+d+">"}else if("list-style-type: lower-alpha;"==f){var S=v?parseInt(D(t).find("ol").attr("start")):g.charCodeAt(0)-96;c=f?"<"+d+h+' start="'+S+'" style = "'+f+"margin-left:"+N+C+';">':"<"+d+">"}else c=f?"<"+d+h+' style = "'+f+";margin-left:"+N+C+';">':"<"+d+' style="margin-left:'+N+C+';">';else if("list-style-type: upper-alpha;"==f){var T=v?parseInt(D(t).find("ol").attr("start")):g.charCodeAt(0)-64;c=f?"<"+d+h+' style = "'+f+' start="'+T+'">':"<"+d+">"}else if("list-style-type: lower-alpha;"==f){var w=v?parseInt(D(t).find("ol").attr("start")):g.charCodeAt(0)-96;c=f?"<"+d+h+' style = "'+f+'" start="'+w+'">':"<"+d+">"}else c=f?"<"+d+h+' style = "'+f+'">':"<"+d+">";for(var L=!1;t;){if(!k(t)){if(t.outerHTML&&0<t.outerHTML.indexOf("mso-bookmark")&&0==(t.textContent||"").length){t=t.nextElementSibling;continue}break}var M=F(t);if((r=r||M)<M)c+=(o=P(t,e,M,t.style.marginLeft)).el.outerHTML,t=o.currentNode;else{if(M<r)break;t.firstElementChild&&t.firstElementChild.firstElementChild&&t.firstElementChild.firstElementChild.firstChild&&(m.lastIndex=0),a&&a.firstElementChild&&a.firstElementChild.firstElementChild&&a.firstElementChild.firstElementChild.firstChild&&(m.lastIndex=0,l=m.test(a.firstElementChild.firstElementChild.firstChild.data||a.firstElementChild.firstElementChild.firstChild.firstChild&&a.firstElementChild.firstElementChild.firstChild.firstChild.data||""));var H=!1;(!i&&!t.style.marginLeft||i&&t.style.marginLeft&&i===t.style.marginLeft)&&(H=!0),i=t.style.marginLeft,H||l===undefined?(s=W(t,e),t.nextSibling&&t.nextSibling.innerText!=undefined&&t.nextSibling.innerText!=undefined&&!c.includes('class="decimal_type"')&&(isNaN(parseInt(t.nextSibling.innerText.trim().split(".")[1],10))||(c=c.substring(3,0)+' class="decimal_type"'+c.substring(3,c.length))),c+=s):(1==M&&(c+="</"+d+">",L=!0,a=null),c+=(o=P(t,e,M,t.style.marginLeft)).el.outerHTML,t=o.currentNode);var O=t&&t.nextElementSibling;if(O&&(a=O.previousElementSibling),t&&!k(t)){if(t.outerHTML&&0<t.outerHTML.indexOf("mso-bookmark")&&0==(t.textContent||"").length){t=t.nextElementSibling;continue}break}t&&t.parentNode&&t.parentNode.removeChild(t),t=O}}L||(c+="</"+d+">");var I=document.createElement("div");return I.innerHTML=c,{el:I,currentNode:t}}(t,d).el,n=null;return(n=r?r.nextSibling:e.firstChild)?e.insertBefore(i,n):e.appendChild(i),!1}return"FONT"===t.tagName&&(o&&"LibreOffice"===o[0]||d["."+t.getAttribute("class")])?t=y(t,"span"):o&&"\x3c!--StartFragment--\x3e"===o[0]&&"UL"===t.tagName&&(D(t).find("li span").each(function(){"&nbsp;"===D(this).html()&&(0<D(this).prev().text().trim().length?D(this).remove():D(this).html("&ZeroWidthSpace;"))}),D(t).is("ul")&&t.setAttribute("style",m(t,["margin","margin-left","list-style-type"])),D(t).find("ul").each(function(){this.setAttribute("style",m(this,["margin","margin-left","list-style-type"]))})),function s(e){Array.from(e.attributes).map(function(t){return t.name}).filter(function(t){return t.toLowerCase().startsWith("data-")||t.toLowerCase().startsWith("xml:")}).forEach(function(t){D(e).removeAttr(t)})}(t),A(t,d)}if(t.nodeType!==Node.COMMENT_NODE)return!0;if(-1<t.data.indexOf("[if !supportLineBreakNewLine]"))for(var l=t.nextSibling;l;)(l=t.nextSibling)&&L(l),l.data&&-1<l.data.indexOf("[endif]")&&(l=null);if(-1<t.data.indexOf("[if supportFields]")&&-1<t.data.indexOf("FORMCHECKBOX")){var a=document.createElement("input");a.type="checkbox",t.parentNode.insertBefore(a,t.nextSibling)}return L(t),!1}),c(n,function(t){if(t.nodeType===Node.ELEMENT_NODE){var e=t.tagName;if(!t.innerHTML&&-1===["BR","IMG","INPUT"].indexOf(e)){for(var r=t.parentNode;r&&(L(t),!(t=r).innerHTML)&&"TD"!==t.parentNode.tagName;)r=t.parentNode;return!1}!function u(t){var e=t.getAttribute("style");if(e){(e=H(e))&&";"!==e.slice(-1)&&(e+=";");var r=e.match(/(^|\S+?):.+?;{1,1}/gi);if(r){for(var i={},n=0;n<r.length;n++){var l=r[n].split(":");2===l.length&&("text-align"===l[0]&&"SPAN"===t.tagName||(i[l[0]]=l[1]))}var a="";for(var s in i)if(i.hasOwnProperty(s)){if("font-size"===s&&"pt;"===i[s].slice(-3)){var o=null;try{o=parseFloat(i[s].slice(0,-3),10)}catch(f){o=null}if(o){var d=E.opts.fontSizeUnit;"px"===d?(o=Math.round(1.33*o),i[s]=o+"px;"):"pt"===d&&(o=Math.round(o),i[s]=o+"pt;")}}a+=s+":"+i[s]}a&&t.setAttribute("style",a)}}}(t)}return!0}),c(n,function(t){if(t&&"A"===t.nodeName&&""===t.href){for(var e=document.createDocumentFragment();t.firstChild;)e.appendChild(t.firstChild);t.parentNode.replaceChild(e,t)}return!0}),c(n,function(t){return t&&"P"===t.tagName&&"DIV"===t.parentNode.tagName&&1==t.parentNode.children.length&&D(t).unwrap(),!0});var s=n.outerHTML,f=E.opts.htmlAllowedStyleProps;return E.opts.htmlAllowedStyleProps=E.opts.wordAllowedStyleProps,s=E.clean.html(s,E.opts.wordDeniedTags,E.opts.wordDeniedAttrs,!1),E.opts.htmlAllowedStyleProps=f,s}return{_init:function t(){E.events.on("paste.wordPaste",function(t){return n=t,E.opts.wordPasteModal?function l(){if(!a){var t='<h4><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 74.95 73.23" style="height: 25px; vertical-align: text-bottom; margin-right: 5px; display: inline-block"><defs><style>.a{fill:#2a5699;}.b{fill:#fff;}</style></defs><path class="a" d="M615.15,827.22h5.09V834c9.11.05,18.21-.09,27.32.05a2.93,2.93,0,0,1,3.29,3.25c.14,16.77,0,33.56.09,50.33-.09,1.72.17,3.63-.83,5.15-1.24.89-2.85.78-4.3.84-8.52,0-17,0-25.56,0v6.81h-5.32c-13-2.37-26-4.54-38.94-6.81q0-29.8,0-59.59c13.05-2.28,26.11-4.5,39.17-6.83Z" transform="translate(-575.97 -827.22)"/><path class="b" d="M620.24,836.59h28.1v54.49h-28.1v-6.81h22.14v-3.41H620.24v-4.26h22.14V873.2H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24V846h22.14v-3.41H620.24Zm-26.67,15c1.62-.09,3.24-.16,4.85-.25,1.13,5.75,2.29,11.49,3.52,17.21,1-5.91,2-11.8,3.06-17.7,1.7-.06,3.41-.15,5.1-.26-1.92,8.25-3.61,16.57-5.71,24.77-1.42.74-3.55,0-5.24.09-1.13-5.64-2.45-11.24-3.47-16.9-1,5.5-2.29,10.95-3.43,16.42q-2.45-.13-4.92-.3c-1.41-7.49-3.07-14.93-4.39-22.44l4.38-.18c.88,5.42,1.87,10.82,2.64,16.25,1.2-5.57,2.43-11.14,3.62-16.71Z" transform="translate(-575.97 -827.22)"/></svg> '+E.language.translate("Word Paste Detected")+"</h4>",e=function n(){var t='<div class="fr-word-paste-modal" style="padding: 20px 20px 10px 20px;">';return t+='<p style="text-align: left;">'+E.language.translate("The pasted content is coming from a Microsoft Word document. Do you want to keep the format or clean it up?")+"</p>",t+='<div style="text-align: right; margin-top: 50px;"><button class="fr-remove-word fr-command">'+E.language.translate("Clean")+'</button> <button class="fr-keep-word fr-command">'+E.language.translate("Keep")+"</button></div>",t+="</div>"}(),r=E.modals.create(s,t,e),i=r.$body;a=r.$modal,r.$modal.addClass("fr-middle"),E.events.$on(i,"click","button.fr-remove-word",function(){var t=a.data("instance")||E;t.wordPaste.clean()},!0),E.events.$on(i,"click","button.fr-keep-word",function(){var t=a.data("instance")||E;t.wordPaste.clean(!0)},!0),E.events.$on(D(E.o_win),"resize",function(){E.modals.resize(s)})}E.modals.show(s),E.modals.resize(s)}():e(E.opts.wordPasteKeepFormatting),!1})},clean:e,_wordClean:l}}});
7
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(t.FroalaEditor)}(this,function(k){"use strict";function s(t){return function e(t){if(Array.isArray(t))return l(t)}(t)||function r(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function i(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(t,e)}(t)||function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}k=k&&k.hasOwnProperty("default")?k["default"]:k,Object.assign(k.DEFAULTS,{wordDeniedTags:[],wordDeniedAttrs:[],wordAllowedStyleProps:["font-family","font-size","background","color","width","text-align","vertical-align","background-color","padding","margin","height","margin-top","margin-left","margin-right","margin-bottom","text-decoration","font-weight","font-style","text-indent","border","border-.*","line-height","list-style-type"],wordPasteModal:!0,wordPasteKeepFormatting:!0}),k.PLUGINS.wordPaste=function(E){var a,n,T,I=E.$,o="word_paste",c={},S=!0,w=0;function e(t){var e=E.opts.wordAllowedStyleProps;t||(E.opts.wordAllowedStyleProps=[]),0===n.indexOf("<colgroup>")&&(n="<table>"+n+"</table>"),n=l(n=n.replace(/<span[\n\r ]*style='mso-spacerun:yes'>([\r\n\u00a0 ]*)<\/span>/g,function(t,e){for(var r="",i=0;i++<e.length;)r+="&nbsp;";return r}),E.paste.getRtfClipboard());var r=E.doc.createElement("DIV");r.innerHTML=n,E.html.cleanBlankSpaces(r),n=r.innerHTML,n=(n=E.paste.cleanEmptyTagsAndDivs(n)).replace(/\u200b/g,""),function i(){E.modals.hide(o)}(),E.helpers.isMobile()&&E.events.focus(),E.paste.clean(n,!0,!0),E.opts.wordAllowedStyleProps=e}function L(t){t.parentNode&&t.parentNode.removeChild(t)}function m(t,e){if(e(t))for(var r=t.firstChild;r;){var i=r,n=r.previousSibling;r=r.nextSibling,m(i,e),i.previousSibling||i.nextSibling||i.parentNode||!r||n===r.previousSibling||!r.parentNode?i.previousSibling||i.nextSibling||i.parentNode||!r||r.previousSibling||r.nextSibling||r.parentNode||(n?r=n.nextSibling?n.nextSibling.nextSibling:null:t.firstChild&&(r=t.firstChild.nextSibling)):r=n?n.nextSibling:t.firstChild}}function P(t){return I(t).hasClass("ListContainerWrapper")&&0<I(t).find("ol").length}function D(t){return I(t).hasClass("ListContainerWrapper")&&0<I(t).find("ul").length}function _(t){if(P(t)||D(t))return!0;if(!t.getAttribute("style")||!/mso-list:[\s]*l/gi.test(t.getAttribute("style").replace(/\n/gi,"")))return!1;try{if(!t.querySelector('[style="mso-list:Ignore"]'))return!!(t.outerHTML&&0<=t.outerHTML.indexOf("\x3c!--[if !supportLists]--\x3e"))}catch(e){return!1}return!0}function $(t){return P(t)||D(t)?I(t).find("li").attr("data-aria-level"):t.getAttribute("style").replace(/\n/gi,"").replace(/.*level([0-9]+?).*/gi,"$1")}function F(t,i){var e=t.cloneNode(!0);if(-1!==["H1","H2","H3","H4","H5","H6"].indexOf(t.tagName)){var r=document.createElement(t.tagName.toLowerCase());r.setAttribute("style",t.getAttribute("style")),r.innerHTML=e.innerHTML,e.innerHTML=r.outerHTML}m(e,function(t){if(t.nodeType==Node.COMMENT_NODE&&(E.browser.msie||E.browser.safari||E.browser.edge))try{if("[if !supportLists]"===t.data){for(t=t.nextSibling;t&&t.nodeType!==Node.COMMENT_NODE;){var e=t.nextSibling;t.parentNode.removeChild(t),t=e}t&&t.nodeType==Node.COMMENT_NODE&&t.parentNode.removeChild(t)}}catch(r){return!1}return t.nodeType===Node.ELEMENT_NODE&&("mso-list:\nIgnore"===t.getAttribute("style")&&t.setAttribute("style","mso-list:Ignore"),"mso-list:Ignore"===t.getAttribute("style")&&t.parentNode.removeChild(t),t.setAttribute("style",h(t)),N(t,i)),!0});var n=P(t)?I(t).find("li").get(0).innerHTML:e.innerHTML;if(P(t)||D(t)){n="";for(var l=I(t).find("li"),a=0;a<l.length;a++){var o=I(l.get(a).innerHTML);o.find("span").each(function(){"&nbsp;"===I(this).html()&&(0<I(this).prev().text().trim().length?I(this).remove():I(this).html("&ZeroWidthSpace;"))});var s=l[a].style.marginLeft;s?(s=parseFloat(parseFloat(s).toFixed(2))+s.match(/[a-zA-Z]+/g)[0],n+='<li style = "margin-left: '.concat(s,';">').concat(o.get(0).innerHTML,"</li>")):n+="<li >".concat(o.get(0).innerHTML,"</li>")}}else{var d,f=null===(d=I(t).find("p").get(0))||void 0===d?void 0:d.style.marginLeft;n=f?(f=parseFloat(parseFloat(f).toFixed(2))+f.match(/[a-zA-Z]+/g)[0],'<li style = "margin-left: '.concat(f,';">').concat(n,"</li>")):"<li>".concat(n,"</li>")}return n=n.replace(/<!--[\s\S]*?-->/gi,"")}function h(t){var e=1<arguments.length&&arguments[1]!==undefined?arguments[1]:null,r="",i=["line-height","font-family","font-size","color","background"].concat(s(e||[])),n=t.getAttribute("style");return n&&i.forEach(function(e){var t=n.split(";").find(function(t){return t.trim().includes(e+":")});t&&(t.includes("mso")&&(t=t.match(new RegExp(e+":.*(;|)"))[0]),t.trim().startsWith(e)&&(r+=t+";"))}),r}function y(t,e){for(var r=document.createElement(e),i=0;i<t.attributes.length;i++){var n=t.attributes[i].name;"FONT"===t.tagName&&(E.browser.msie&&["id","class","style"].indexOf(n)<0||!E.browser.msie&&CSS.supports(n,t.getAttribute(n)))?I(r).css(n,t.getAttribute(n)):r.setAttribute(n,t.getAttribute(n))}return r.innerHTML=t.innerHTML,t.parentNode.replaceChild(r,t),r}function x(t,e){E.node.clearAttributes(t);for(var r=t.firstElementChild,i=0,n=!1,l=null;r;){if(r.firstElementChild&&-1!==r.firstElementChild.tagName.indexOf("W:"))for(var a=0;a<r.children.length;a++)"<('[^']*'|\"[^\"]*\"|[^\"'>])*>"==r.children[a]&&(r.innerHTML+=r.children[a]);(l=r.getAttribute("width"))||(l=r.style.width),l||n||(n=!0),i+=parseInt(l,10),(!r.firstChild||r.firstChild&&r.firstChild.data===k.UNICODE_NBSP)&&(r.firstChild&&L(r.firstChild),r.innerHTML="<br>");for(var o=r.firstElementChild,s=1===r.children.length;o;)"P"!==o.tagName||_(o)||s&&M(o),o=o.nextElementSibling;if(e){var d=r.getAttribute("class");if(d){var f=(d=H(d)).match(/xl[0-9]+/gi);if(f){var u="."+f[0];e[u]&&O(r,e[u])}}e.td&&O(r,e.td)}var g=r.getAttribute("style");g&&(g=H(g))&&";"!==g.slice(-1)&&(g+=";");var p=r.getAttribute("valign");if(!p&&g){var c=g.match(/vertical-align:.+?[; "]{1,1}/gi);c&&(p=c[c.length-1].replace(/vertical-align:(.+?)[; "]{1,1}/gi,"$1"))}var m=null;if(g){var h=g.match(/text-align:.+?[; "]{1,1}/gi);h&&(m=h[h.length-1].replace(/text-align:(.+?)[; "]{1,1}/gi,"$1")),"general"===m&&(m=null)}var v=null;if(g){var b=g.match(/background:.+?[; "]{1,1}/gi);b&&(v=b[b.length-1].replace(/background:(.+?)[; "]{1,1}/gi,"$1"))}var y=r.getAttribute("colspan"),x=r.getAttribute("rowspan");y&&r.setAttribute("colspan",y),x&&r.setAttribute("rowspan",x),p&&(r.style["vertical-align"]=p),m&&(r.style["text-align"]=m),v&&(r.style["background-color"]=v),l&&r.setAttribute("width",l),r=r.nextElementSibling}for(r=t.firstElementChild;r;)l=r.getAttribute("width"),n&&r.removeAttribute("width"),r=r.nextElementSibling;t.previousSibling?T!=i&&(S=!1):T=i,!t.nextElementSibling&&S&&function C(t){for(;t;){for(var e=t.firstElementChild,r=null,i=0;e;)r=e.getAttribute("width"),i+=parseInt(r,10),e=e.nextElementSibling;for(e=t.firstElementChild;e;)r=e.getAttribute("width"),e.setAttribute("width",100*parseInt(r,10)/i+"%"),e=e.nextElementSibling;t=t.previousElementSibling}}(t);var N=I(t).parentsUntil("table").parent().last();if(w<i&&(w=i),!t.nextElementSibling&&0<N.length){var A=I(N)[0].width;I(N)[0].style.width=A||w,S=!(w=0)}}function M(t){var e=t.getAttribute("align");e&&(t.style["text-align"]=e,t.removeAttribute("align"))}function H(t){return t.replace(/\n|\r|\n\r|&quot;/g,"")}function O(t,e,r){if(e){var i=t.getAttribute("style");i&&";"!==i.slice(-1)&&(i+=";"),e&&";"!==e.slice(-1)&&(e+=";"),e=e.replace(/\n/gi,"");var n=null;n=r?(i||"")+e:e+(i||""),t.setAttribute("style",n)}}var p=null;function v(t,e,r){for(var i=t.split(r),n=1;n<i.length;n++){var l=i[n];if(1<(l=l.split("shplid")).length){l=l[1];for(var a="",o=0;o<l.length&&"\\"!==l[o]&&"{"!==l[o]&&" "!==l[o]&&"\r"!==l[o]&&"\n"!==l[o];)a+=l[o],o++;var s=l.split("bliptag");if(s&&s.length<2)continue;var d=null;if(-1!==s[0].indexOf("pngblip")?d="image/png":-1!==s[0].indexOf("jpegblip")&&(d="image/jpeg"),!d)continue;var f=s[1].split("}");if(f&&f.length<2)continue;var u=void 0;if(2<f.length&&-1!==f[0].indexOf("blipuid"))u=f[1].split(" ");else{if((u=f[0].split(" "))&&u.length<2)continue;u.shift()}var g=u.join("");p[e+a]={image_hex:g,image_type:d}}}}function b(t,e){if(e){var r;if("IMG"===t.tagName){var i,n,l=t.getAttribute("src");if(!l||-1===l.indexOf("file://"))return;if(0===l.indexOf("file://")&&E.helpers.isURL(t.getAttribute("alt")))return void t.setAttribute("src",t.getAttribute("alt"));if(!(r=c[t.getAttribute("v:shapes")]))r=t.getAttribute("v:shapes"),null!=t&&t.parentNode&&null!=t&&null!==(i=t.parentNode)&&void 0!==i&&i.parentNode&&0<=(null==t||null===(n=t.parentNode)||void 0===n||null===(n=n.parentNode)||void 0===n||null===(n=n.innerHTML)||void 0===n?void 0:n.indexOf("msEquation"))&&(r=null)}else{var a;r=null==t||null===(a=t.parentNode)||void 0===a?void 0:a.getAttribute("o:spid")}if(t.removeAttribute("height"),r){!function u(t){p={},v(t,"i","\\shppict"),v(t,"s","\\shp{")}(e);var o=p[r.substring(7)];if(o){var s,d=function g(t){for(var e=t.match(/[0-9a-f]{2}/gi),r=[],i=0;i<e.length;i++)r.push(String.fromCharCode(parseInt(e[i],16)));var n=r.join("");return btoa(n)}(o.image_hex),f="data:"+o.image_type+";base64,"+d;if("IMG"===t.tagName)t.src=f,t.setAttribute("data-fr-image-pasted",!0);else I(null==t?void 0:t.parentNode).before('<img data-fr-image-pasted="true" src="'+f+'" style="'+(null==t||null===(s=t.parentNode)||void 0===s?void 0:s.getAttribute("style"))+'">').remove()}}}}function N(t,e){var r=t.tagName,i=r.toLowerCase();t.firstElementChild&&("I"===t.firstElementChild.tagName?y(t.firstElementChild,"em"):"B"===t.firstElementChild.tagName&&y(t.firstElementChild,"strong"));if(-1!==["SCRIPT","APPLET","EMBED","NOFRAMES","NOSCRIPT"].indexOf(r))return L(t),!1;for(var n=["META","LINK","XML","ST1:","O:","W:","FONT"],l=0;l<n.length;l++)if(-1!==r.indexOf(n[l]))return t.innerHTML&&(t.outerHTML=t.innerHTML),L(t),!1;if("TD"!==r){var a=t.getAttribute("class")||"MsoNormal";if(e&&a){for(var o=(a=H(a)).split(" "),s=0;s<o.length;s++){var d=[],f="."+o[s];d.push(f),f=i+f,d.push(f);for(var u=0;u<d.length;u++)e[d[u]]&&O(t,e[d[u]])}t.removeAttribute("class")}e&&e[i]&&O(t,e[i])}if(-1!==["P","H1","H2","H3","H4","H5","H6","PRE"].indexOf(r)){var g=t.getAttribute("class");if(g&&(e&&e[r.toLowerCase()+"."+g]&&O(t,e[r.toLowerCase()+"."+g]),-1!==g.toLowerCase().indexOf("mso"))){var p=H(g);(p=p.replace(/[0-9a-z-_]*mso[0-9a-z-_]*/gi,""))?t.setAttribute("class",p):t.removeAttribute("class")}var c=t.getAttribute("style");if(c){var m=c.match(/text-align:.+?[; "]{1,1}/gi);m&&m[m.length-1].replace(/(text-align:.+?[; "]{1,1})/gi,"$1")}M(t)}if("TR"===r&&x(t,e),"A"!==r||t.attributes.getNamedItem("href")||t.attributes.getNamedItem("name")||!t.innerHTML||(t.outerHTML=t.innerHTML),"A"==r&&t.getAttribute("href")&&t.querySelector("img"))for(var h=t.querySelectorAll("span"),v=0;v<h.length;v++)h[v].innerText||(h[v].outerHTML=h[v].innerHTML);if("TD"!==r&&"TH"!==r||t.innerHTML||(t.innerHTML="<br>"),t.getAttribute("lang")&&t.removeAttribute("lang"),t.getAttribute("style")&&-1!==t.getAttribute("style").toLowerCase().indexOf("mso")){var b=H(t.getAttribute("style"));(b=b.replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi,"").replace("line-height:107%",""))?t.setAttribute("style",b):t.removeAttribute("style")}return!0}function l(t,e){0<=t.indexOf("<html")&&(t=t.replace(/[.\s\S\w\W<>]*(<html[^>]*>[.\s\S\w\W<>]*<\/html>)[.\s\S\w\W<>]*/i,"$1"));var s=t.match(/(MSFontService|class="?Mso|class='?Mso|class="?Xl|class='?Xl|class=Xl|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument|LibreOffice)/gi);!function u(t){for(var e=t.split("v:shape"),r=1;r<e.length;r++){var i=e[r],n=i.split(' id="')[1];if(n&&1<n.length){n=n.split('"')[0];var l=i.split(' o:spid="')[1];l&&1<l.length&&(l=l.split('"')[0],c[n]=l)}}}(t);var r=(new DOMParser).parseFromString(t,"text/html"),i=r.head,n=r.body,d=function g(t){var e={},r=t.getElementsByTagName("style");if(r.length){var i=r[0].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi);if(i)for(var n=0;n<i.length;n++){var l=i[n],a=l.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),o=l.replace(/[\S ]+\s+{([\s\S]+?)}/gi,"$1");a=a.replace(/^[\s]|[\s]$/gm,""),o=o.replace(/^[\s]|[\s]$/gm,""),a=a.replace(/\n|\r|\n\r/g,""),o=o.replace(/\n|\r|\n\r/g,"");for(var s=a.split(", "),d=0;d<s.length;d++)e[s[d]]=o}}return e}(i);m(n,function(t){if(t.nodeType===Node.TEXT_NODE&&/\n|\u00a0|\r/.test(t.data)){if(!/\S| /.test(t.data)&&!/[\u00a0]+/.test(t.data))return t.data===k.UNICODE_NBSP?(t.data="\u200b",!0):1===t.data.length&&10===t.data.charCodeAt(0)?(t.data=" ",!0):(L(t),!1);t.data=t.data.replace(/\n|\r/gi," ")}return!0}),m(n,function(t){return t.nodeType!==Node.ELEMENT_NODE||"V:IMAGEDATA"!==t.tagName&&"IMG"!==t.tagName||b(t,e),!0});for(var l=n.querySelectorAll("ul > ul, ul > ol, ol > ul, ol > ol"),a=l.length-1;0<=a;a--)l[a].previousElementSibling&&"LI"===l[a].previousElementSibling.tagName&&l[a].previousElementSibling.appendChild(l[a]);m(n,function(t){if(t.nodeType===Node.TEXT_NODE)return t.data=t.data.replace(/<br>(\n|\r)/gi,"<br>"),!1;if(t.nodeType===Node.ELEMENT_NODE){if(_(t)){var e=t.parentNode,r=t.previousSibling,i=function O(t,e,r,i){var n,l,a,o,s,d,f,u=navigator.userAgent.toLowerCase();-1!=u.indexOf("safari")&&(u=-1<u.indexOf("chrome")?1:"safari"),t.innerHTML.includes("mso-list:\nIgnore")&&(t.innerHTML=t.innerHTML.replace(/mso-list:\nIgnore/gi,"mso-list:Ignore"));var g,p,c,m,h=/[0-9a-zA-Z]./gi,v="",b=P(t),y=null===(n=I(t).find("ol"))||void 0===n||null===(n=n.attr("style"))||void 0===n||null===(n=n.split(";"))||void 0===n?void 0:n.find(function(t){return t.trim().startsWith("list-style-type")});y==undefined&&D(t)&&(y=null===(p=I(t).find("ul"))||void 0===p||null===(p=p.attr("style"))||void 0===p||null===(p=p.split(";"))||void 0===p?void 0:p.find(function(t){return t.trim().startsWith("list-style-type")}));if(b)d="ol",f=y?"list-style-type: "+y.replace("list-style-type:","").trim()+";":"";else if(D(t))d="ul",f=y?"list-style-type: "+y.replace("list-style-type:","").trim()+";":"";else{var x=t.querySelector('span[style="mso-list:Ignore"]');null==x&&"safari"==u&&(x=t.querySelector('span[lang="PT-BR"]'));var N=!1;x&&(N=N||h.test(x.textContent)),null!==x&&(g=x.textContent.trim().split(".")[0]),d=1==N?(g=(g=x.textContent.trim().split(".")[0]).replace(/\(([^)]+)\)/g,"$1"),isNaN(parseInt(g))?"i"==g?f="lower-roman;":"I"==g?f="upper-roman;":"o"==g?f="circle;":g.match(/^v$/)||(g.match(/^[a-z]$/)||g.match(/^[a-z]\)$/)?f="lower-alpha;":(g.match(/^[A-Z]$/)||g.match(/^[A-Z]\)$/))&&(f="upper-alpha;")):f="decimal;",f="list-style-type: "+f,"ol"):(null!=x&&(g=x.textContent.trim().split(".")[0]),"\xa7"==g?f="square;":"\xb7"==g&&(f="disc;"),f="list-style-type: "+f,"ul"),x==undefined||x.textContent==undefined||isNaN(parseInt(x.textContent.trim().split(".")[1],10))||(v=' class="decimal_type" ')}var A=1,C="",E=($(t),t.style.marginLeft),T="";E.includes("in")?(T="in",E=parseFloat(E)-.5):E.includes("pt")&&(T="px",E=parseFloat(E)-10),E&&(m=" margin-left: "+E+T+";"),A="list-style-type: upper-alpha;"==f?b?parseInt(I(t).find("ol").attr("start")):g.charCodeAt(0)-64:"list-style-type: lower-alpha;"==f?b?parseInt(I(t).find("ol").attr("start")):g.charCodeAt(0)-96:b?parseInt(I(t).find("ol").attr("start")):parseInt(g),C+=f||"",C+=m||"",c="<"+d,c+=v||"",c+="ol"!=d||1==A||isNaN(A)?"":' start = "'+A+'"',c+=C?' style = "'+C+'"':"",c+=">";for(var S=!1;t;){if(!_(t)){if(t.outerHTML&&0<t.outerHTML.indexOf("mso-bookmark")&&0==(t.textContent||"").length){t=t.nextElementSibling;continue}break}var w=$(t);if((r=r||w)<w)c+=(s=O(t,e,w,t.style.marginLeft)).el.outerHTML,t=s.currentNode;else{if(w<r)break;t.firstElementChild&&t.firstElementChild.firstElementChild&&t.firstElementChild.firstElementChild.firstChild&&(h.lastIndex=0),a&&a.firstElementChild&&a.firstElementChild.firstElementChild&&a.firstElementChild.firstElementChild.firstChild&&(h.lastIndex=0,l=h.test(a.firstElementChild.firstElementChild.firstChild.data||a.firstElementChild.firstElementChild.firstChild.firstChild&&a.firstElementChild.firstElementChild.firstChild.firstChild.data||""));var L=!1;(!i&&!t.style.marginLeft||i&&t.style.marginLeft&&i===t.style.marginLeft)&&(L=!0),i=t.style.marginLeft,L||l===undefined?(o=F(t,e),t.nextSibling&&t.nextSibling.innerText!=undefined&&t.nextSibling.innerText!=undefined&&!c.includes('class="decimal_type"')&&(isNaN(parseInt(t.nextSibling.innerText.trim().split(".")[1],10))||(c=c.substring(3,0)+' class="decimal_type"'+c.substring(3,c.length))),c+=o):(1==w&&(c+="</"+d+">",S=!0,a=null),c+=(s=O(t,e,w,t.style.marginLeft)).el.outerHTML,t=s.currentNode);var M=t&&t.nextElementSibling;if(M&&(a=M.previousElementSibling),t&&!_(t)){if(t.outerHTML&&0<t.outerHTML.indexOf("mso-bookmark")&&0==(t.textContent||"").length){t=t.nextElementSibling;continue}break}t&&t.parentNode&&t.parentNode.removeChild(t),t=M}}S||(c+="</"+d+">");var H=document.createElement("div");return H.innerHTML=c,{el:H,currentNode:t}}(t,d).el,n=null;return(n=r?r.nextSibling:e.firstChild)?e.insertBefore(i,n):e.appendChild(i),!1}return"FONT"===t.tagName&&(s&&"LibreOffice"===s[0]||d["."+t.getAttribute("class")])?t=y(t,"span"):s&&"\x3c!--StartFragment--\x3e"===s[0]&&"UL"===t.tagName&&(I(t).find("li span").each(function(){"&nbsp;"===I(this).html()&&(0<I(this).prev().text().trim().length?I(this).remove():I(this).html("&ZeroWidthSpace;"))}),I(t).is("ul")&&t.setAttribute("style",h(t,["margin","margin-left","list-style-type"])),I(t).find("ul").each(function(){this.setAttribute("style",h(this,["margin","margin-left","list-style-type"]))})),function o(e){Array.from(e.attributes).map(function(t){return t.name}).filter(function(t){return t.toLowerCase().startsWith("data-")||t.toLowerCase().startsWith("xml:")}).forEach(function(t){I(e).removeAttr(t)})}(t),N(t,d)}if(t.nodeType!==Node.COMMENT_NODE)return!0;if(-1<t.data.indexOf("[if !supportLineBreakNewLine]"))for(var l=t.nextSibling;l;)(l=t.nextSibling)&&L(l),l.data&&-1<l.data.indexOf("[endif]")&&(l=null);if(-1<t.data.indexOf("[if supportFields]")&&-1<t.data.indexOf("FORMCHECKBOX")){var a=document.createElement("input");a.type="checkbox",t.parentNode.insertBefore(a,t.nextSibling)}return L(t),!1}),n.innerHTML=function p(t){var e=I(document.createElement("div")).attr("id","top-level");e.html(t);for(var r=e[0].querySelectorAll("ol, ul"),i=0;i<r.length;i++)if(I(r[i]).parentsUntil("#top-level","ol, ul").length){r[i].style.removeProperty("margin-left");for(var n=r[i].children,l=0;l<n.length;l++)"LI"==n[l].tagName&&n[l].style.removeProperty("margin-left")}return e[0].innerHTML}(n.innerHTML),m(n,function(t){if(t.nodeType===Node.ELEMENT_NODE){var e=t.tagName;if(!t.innerHTML&&-1===["BR","IMG","INPUT"].indexOf(e)){for(var r=t.parentNode;r&&(L(t),!(t=r).innerHTML)&&"TD"!==t.parentNode.tagName;)r=t.parentNode;return!1}!function u(t){var e=t.getAttribute("style");if(e){(e=H(e))&&";"!==e.slice(-1)&&(e+=";");var r=e.match(/(^|\S+?):.+?;{1,1}/gi);if(r){for(var i={},n=0;n<r.length;n++){var l=r[n].split(":");2===l.length&&("text-align"===l[0]&&"SPAN"===t.tagName||(i[l[0]]=l[1]))}var a="";for(var o in i)if(i.hasOwnProperty(o)){if("font-size"===o&&"pt;"===i[o].slice(-3)){var s=null;try{s=parseFloat(i[o].slice(0,-3),10)}catch(f){s=null}if(s){var d=E.opts.fontSizeUnit;"px"===d?(s=Math.round(1.33*s),i[o]=s+"px;"):"pt"===d&&(s=Math.round(s),i[o]=s+"pt;")}}a+=o+":"+i[o]}a&&t.setAttribute("style",a)}}}(t)}return!0}),m(n,function(t){if(t&&"A"===t.nodeName&&""===t.href){for(var e=document.createDocumentFragment();t.firstChild;)e.appendChild(t.firstChild);t.parentNode.replaceChild(e,t)}return!0}),m(n,function(t){return t&&"P"===t.tagName&&"DIV"===t.parentNode.tagName&&1==t.parentNode.children.length&&I(t).unwrap(),!0});var o=n.outerHTML,f=E.opts.htmlAllowedStyleProps;return E.opts.htmlAllowedStyleProps=E.opts.wordAllowedStyleProps,o=E.clean.html(o,E.opts.wordDeniedTags,E.opts.wordDeniedAttrs,!1),E.opts.htmlAllowedStyleProps=f,o}return{_init:function t(){E.events.on("paste.wordPaste",function(t){return n=t,E.opts.wordPasteModal?function l(){if(!a){var t='<h4><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 74.95 73.23" style="height: 25px; vertical-align: text-bottom; margin-right: 5px; display: inline-block"><defs><style>.a{fill:#2a5699;}.b{fill:#fff;}</style></defs><path class="a" d="M615.15,827.22h5.09V834c9.11.05,18.21-.09,27.32.05a2.93,2.93,0,0,1,3.29,3.25c.14,16.77,0,33.56.09,50.33-.09,1.72.17,3.63-.83,5.15-1.24.89-2.85.78-4.3.84-8.52,0-17,0-25.56,0v6.81h-5.32c-13-2.37-26-4.54-38.94-6.81q0-29.8,0-59.59c13.05-2.28,26.11-4.5,39.17-6.83Z" transform="translate(-575.97 -827.22)"/><path class="b" d="M620.24,836.59h28.1v54.49h-28.1v-6.81h22.14v-3.41H620.24v-4.26h22.14V873.2H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24V846h22.14v-3.41H620.24Zm-26.67,15c1.62-.09,3.24-.16,4.85-.25,1.13,5.75,2.29,11.49,3.52,17.21,1-5.91,2-11.8,3.06-17.7,1.7-.06,3.41-.15,5.1-.26-1.92,8.25-3.61,16.57-5.71,24.77-1.42.74-3.55,0-5.24.09-1.13-5.64-2.45-11.24-3.47-16.9-1,5.5-2.29,10.95-3.43,16.42q-2.45-.13-4.92-.3c-1.41-7.49-3.07-14.93-4.39-22.44l4.38-.18c.88,5.42,1.87,10.82,2.64,16.25,1.2-5.57,2.43-11.14,3.62-16.71Z" transform="translate(-575.97 -827.22)"/></svg> '+E.language.translate("Word Paste Detected")+"</h4>",e=function n(){var t='<div class="fr-word-paste-modal" style="padding: 20px 20px 10px 20px;">';return t+='<p style="text-align: left;">'+E.language.translate("The pasted content is coming from a Microsoft Word document. Do you want to keep the format or clean it up?")+"</p>",t+='<div style="text-align: right; margin-top: 50px;"><button class="fr-remove-word fr-command">'+E.language.translate("Clean")+'</button> <button class="fr-keep-word fr-command">'+E.language.translate("Keep")+"</button></div>",t+="</div>"}(),r=E.modals.create(o,t,e),i=r.$body;a=r.$modal,r.$modal.addClass("fr-middle"),E.events.$on(i,"click","button.fr-remove-word",function(){var t=a.data("instance")||E;t.wordPaste.clean()},!0),E.events.$on(i,"click","button.fr-keep-word",function(){var t=a.data("instance")||E;t.wordPaste.clean(!0)},!0),E.events.$on(I(E.o_win),"resize",function(){E.modals.resize(o)})}E.modals.show(o),E.modals.resize(o)}():e(E.opts.wordPasteKeepFormatting),!1})},clean:e,_wordClean:l}}});