wysiwyg-rails 3.2.2 → 3.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +21 -21
  3. data/README.md +148 -148
  4. data/Rakefile +5 -5
  5. data/app/assets/javascripts/froala_editor.min.js +3 -3
  6. data/app/assets/javascripts/froala_editor.pkgd.min.js +3 -3
  7. data/app/assets/javascripts/languages/ar.js +4 -4
  8. data/app/assets/javascripts/languages/bs.js +4 -4
  9. data/app/assets/javascripts/languages/cs.js +4 -4
  10. data/app/assets/javascripts/languages/da.js +4 -4
  11. data/app/assets/javascripts/languages/de.js +4 -4
  12. data/app/assets/javascripts/languages/el.js +4 -4
  13. data/app/assets/javascripts/languages/en_ca.js +4 -4
  14. data/app/assets/javascripts/languages/en_gb.js +4 -4
  15. data/app/assets/javascripts/languages/es.js +23 -4
  16. data/app/assets/javascripts/languages/et.js +4 -4
  17. data/app/assets/javascripts/languages/fa.js +4 -4
  18. data/app/assets/javascripts/languages/fi.js +4 -4
  19. data/app/assets/javascripts/languages/fr.js +4 -4
  20. data/app/assets/javascripts/languages/he.js +4 -4
  21. data/app/assets/javascripts/languages/hr.js +4 -4
  22. data/app/assets/javascripts/languages/hu.js +4 -4
  23. data/app/assets/javascripts/languages/id.js +4 -4
  24. data/app/assets/javascripts/languages/it.js +21 -6
  25. data/app/assets/javascripts/languages/ja.js +4 -4
  26. data/app/assets/javascripts/languages/ko.js +41 -13
  27. data/app/assets/javascripts/languages/ku.js +4 -4
  28. data/app/assets/javascripts/languages/me.js +4 -4
  29. data/app/assets/javascripts/languages/nb.js +4 -4
  30. data/app/assets/javascripts/languages/nl.js +4 -4
  31. data/app/assets/javascripts/languages/pl.js +21 -4
  32. data/app/assets/javascripts/languages/pt_br.js +4 -4
  33. data/app/assets/javascripts/languages/pt_pt.js +21 -4
  34. data/app/assets/javascripts/languages/ro.js +4 -4
  35. data/app/assets/javascripts/languages/ru.js +4 -4
  36. data/app/assets/javascripts/languages/sk.js +4 -4
  37. data/app/assets/javascripts/languages/sl.js +4 -4
  38. data/app/assets/javascripts/languages/sr.js +4 -4
  39. data/app/assets/javascripts/languages/sv.js +4 -4
  40. data/app/assets/javascripts/languages/th.js +4 -4
  41. data/app/assets/javascripts/languages/tr.js +4 -4
  42. data/app/assets/javascripts/languages/uk.js +4 -4
  43. data/app/assets/javascripts/languages/vi.js +2 -2
  44. data/app/assets/javascripts/languages/zh_cn.js +4 -4
  45. data/app/assets/javascripts/languages/zh_tw.js +4 -4
  46. data/app/assets/javascripts/plugins.pkgd.min.js +3 -3
  47. data/app/assets/javascripts/plugins/align.min.js +2 -2
  48. data/app/assets/javascripts/plugins/char_counter.min.js +3 -3
  49. data/app/assets/javascripts/plugins/code_beautifier.min.js +2 -2
  50. data/app/assets/javascripts/plugins/code_view.min.js +2 -2
  51. data/app/assets/javascripts/plugins/colors.min.js +2 -2
  52. data/app/assets/javascripts/plugins/cryptojs.min.js +2 -2
  53. data/app/assets/javascripts/plugins/draggable.min.js +2 -2
  54. data/app/assets/javascripts/plugins/edit_in_popup.min.js +2 -2
  55. data/app/assets/javascripts/plugins/emoticons.min.js +2 -2
  56. data/app/assets/javascripts/plugins/entities.min.js +2 -2
  57. data/app/assets/javascripts/plugins/file.min.js +2 -2
  58. data/app/assets/javascripts/plugins/files_manager.min.js +3 -3
  59. data/app/assets/javascripts/plugins/font_family.min.js +2 -2
  60. data/app/assets/javascripts/plugins/font_size.min.js +2 -2
  61. data/app/assets/javascripts/plugins/forms.min.js +2 -2
  62. data/app/assets/javascripts/plugins/fullscreen.min.js +3 -3
  63. data/app/assets/javascripts/plugins/help.min.js +2 -2
  64. data/app/assets/javascripts/plugins/image.min.js +3 -3
  65. data/app/assets/javascripts/plugins/image_manager.min.js +3 -3
  66. data/app/assets/javascripts/plugins/inline_class.min.js +2 -2
  67. data/app/assets/javascripts/plugins/inline_style.min.js +2 -2
  68. data/app/assets/javascripts/plugins/line_breaker.min.js +3 -3
  69. data/app/assets/javascripts/plugins/line_height.min.js +2 -2
  70. data/app/assets/javascripts/plugins/link.min.js +3 -3
  71. data/app/assets/javascripts/plugins/lists.min.js +3 -3
  72. data/app/assets/javascripts/plugins/paragraph_format.min.js +3 -3
  73. data/app/assets/javascripts/plugins/paragraph_style.min.js +2 -2
  74. data/app/assets/javascripts/plugins/print.min.js +2 -2
  75. data/app/assets/javascripts/plugins/quick_insert.min.js +3 -3
  76. data/app/assets/javascripts/plugins/quote.min.js +2 -2
  77. data/app/assets/javascripts/plugins/save.min.js +2 -2
  78. data/app/assets/javascripts/plugins/special_characters.min.js +2 -2
  79. data/app/assets/javascripts/plugins/table.min.js +3 -3
  80. data/app/assets/javascripts/plugins/trim_video.min.js +7 -0
  81. data/app/assets/javascripts/plugins/url.min.js +3 -3
  82. data/app/assets/javascripts/plugins/video.min.js +3 -3
  83. data/app/assets/javascripts/plugins/word_paste.min.js +3 -3
  84. data/app/assets/javascripts/third_party/embedly.min.js +2 -2
  85. data/app/assets/javascripts/third_party/font_awesome.min.js +3 -3
  86. data/app/assets/javascripts/third_party/image_tui.min.js +2 -2
  87. data/app/assets/javascripts/third_party/spell_checker.min.js +2 -2
  88. data/app/assets/stylesheets/froala_editor.css +1376 -1368
  89. data/app/assets/stylesheets/froala_editor.min.css +3 -3
  90. data/app/assets/stylesheets/froala_editor.pkgd.css +4602 -4354
  91. data/app/assets/stylesheets/froala_editor.pkgd.min.css +3 -3
  92. data/app/assets/stylesheets/froala_style.css +356 -358
  93. data/app/assets/stylesheets/froala_style.min.css +3 -3
  94. data/app/assets/stylesheets/plugins.pkgd.css +2872 -2630
  95. data/app/assets/stylesheets/plugins.pkgd.min.css +3 -3
  96. data/app/assets/stylesheets/plugins/char_counter.css +45 -45
  97. data/app/assets/stylesheets/plugins/char_counter.min.css +3 -3
  98. data/app/assets/stylesheets/plugins/code_view.css +93 -93
  99. data/app/assets/stylesheets/plugins/code_view.min.css +3 -3
  100. data/app/assets/stylesheets/plugins/colors.css +94 -94
  101. data/app/assets/stylesheets/plugins/colors.min.css +3 -3
  102. data/app/assets/stylesheets/plugins/draggable.css +37 -37
  103. data/app/assets/stylesheets/plugins/draggable.min.css +3 -3
  104. data/app/assets/stylesheets/plugins/emoticons.css +30 -30
  105. data/app/assets/stylesheets/plugins/emoticons.min.css +3 -3
  106. data/app/assets/stylesheets/plugins/file.css +124 -124
  107. data/app/assets/stylesheets/plugins/file.min.css +3 -3
  108. data/app/assets/stylesheets/plugins/files_manager.css +1236 -1236
  109. data/app/assets/stylesheets/plugins/files_manager.min.css +3 -3
  110. data/app/assets/stylesheets/plugins/fullscreen.css +73 -73
  111. data/app/assets/stylesheets/plugins/fullscreen.min.css +3 -3
  112. data/app/assets/stylesheets/plugins/help.css +41 -41
  113. data/app/assets/stylesheets/plugins/help.min.css +3 -3
  114. data/app/assets/stylesheets/plugins/image.css +207 -207
  115. data/app/assets/stylesheets/plugins/image.min.css +3 -3
  116. data/app/assets/stylesheets/plugins/image_manager.css +232 -232
  117. data/app/assets/stylesheets/plugins/image_manager.min.css +3 -3
  118. data/app/assets/stylesheets/plugins/line_breaker.css +34 -34
  119. data/app/assets/stylesheets/plugins/line_breaker.min.css +3 -3
  120. data/app/assets/stylesheets/plugins/quick_insert.css +68 -68
  121. data/app/assets/stylesheets/plugins/quick_insert.min.css +3 -3
  122. data/app/assets/stylesheets/plugins/special_characters.css +29 -29
  123. data/app/assets/stylesheets/plugins/special_characters.min.css +3 -3
  124. data/app/assets/stylesheets/plugins/table.css +107 -107
  125. data/app/assets/stylesheets/plugins/table.min.css +3 -3
  126. data/app/assets/stylesheets/plugins/trim_video.css +247 -0
  127. data/app/assets/stylesheets/plugins/trim_video.min.css +7 -0
  128. data/app/assets/stylesheets/plugins/video.css +197 -197
  129. data/app/assets/stylesheets/plugins/video.min.css +3 -3
  130. data/app/assets/stylesheets/themes/dark.css +2165 -2146
  131. data/app/assets/stylesheets/themes/dark.min.css +3 -3
  132. data/app/assets/stylesheets/themes/gray.css +2165 -2146
  133. data/app/assets/stylesheets/themes/gray.min.css +3 -3
  134. data/app/assets/stylesheets/themes/royal.css +2165 -2146
  135. data/app/assets/stylesheets/themes/royal.min.css +3 -3
  136. data/app/assets/stylesheets/third_party/embedly.css +56 -56
  137. data/app/assets/stylesheets/third_party/embedly.min.css +3 -3
  138. data/app/assets/stylesheets/third_party/font_awesome.css +29 -29
  139. data/app/assets/stylesheets/third_party/font_awesome.min.css +3 -3
  140. data/app/assets/stylesheets/third_party/image_tui.css +37 -37
  141. data/app/assets/stylesheets/third_party/image_tui.min.css +3 -3
  142. data/app/assets/stylesheets/third_party/spell_checker.css +60 -60
  143. data/app/assets/stylesheets/third_party/spell_checker.min.css +3 -3
  144. data/lib/wysiwyg-rails.rb +1 -1
  145. data/lib/wysiwyg-rails/engine.rb +16 -16
  146. data/lib/wysiwyg-rails/version.rb +5 -5
  147. metadata +8 -5
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
7
  !function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(n.FroalaEditor)}(this,function(i){"use strict";(i=i&&i.hasOwnProperty("default")?i["default"]:i).PLUGINS.align=function(a){var l=a.$;return{apply:function r(n){var t=a.selection.element();if(l(t).parents(".fr-img-caption").length)l(t).css("text-align",n);else{a.selection.save(),a.html.wrap(!0,!0,!0,!0),a.selection.restore();for(var e=a.selection.blocks(),i=0;i<e.length;i++)l(e[i]).css("text-align",n).removeClass("fr-temp-div"),""===l(e[i]).attr("class")&&l(e[i]).removeAttr("class"),""===l(e[i]).attr("style")&&l(e[i]).removeAttr("style");a.selection.save(),a.html.unwrap(),a.selection.restore()}},refresh:function i(n){var t=a.selection.blocks();if(t.length){var e=a.helpers.getAlignment(l(t[0]));n.find("> *").first().replaceWith(a.icon.create("align-".concat(e)))}},refreshOnShow:function o(n,t){var e=a.selection.blocks();if(e.length){var i=a.helpers.getAlignment(l(e[0]));t.find('a.fr-command[data-param1="'.concat(i,'"]')).addClass("fr-active").attr("aria-selected",!0)}},refreshForToolbar:function s(n){var t=a.selection.blocks();if(t.length){var e=a.helpers.getAlignment(l(t[0]));e=e.charAt(0).toUpperCase()+e.slice(1),"align".concat(e)===n.attr("data-cmd")&&n.addClass("fr-active")}}}},i.DefineIcon("align",{NAME:"align-left",SVG_KEY:"alignLeft"}),i.DefineIcon("align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),i.DefineIcon("align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),i.DefineIcon("align-center",{NAME:"align-center",SVG_KEY:"alignCenter"}),i.DefineIcon("align-justify",{NAME:"align-justify",SVG_KEY:"alignJustify"}),i.RegisterCommand("align",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"Align Center",right:"Align Right",justify:"Align Justify"},html:function(){var n='<ul class="fr-dropdown-list" role="presentation">',t=i.COMMANDS.align.options;for(var e in t)t.hasOwnProperty(e)&&(n+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="align"data-param1="\n '.concat(e,'" title="').concat(this.language.translate(t[e]),'">').concat(this.icon.create("align-".concat(e)),'<span class="fr-sr-only">\n ').concat(this.language.translate(t[e]),"</span></a></li>"));return n+="</ul>"},callback:function(n,t){this.align.apply(t)},refresh:function(n){this.align.refresh(n)},refreshOnShow:function(n,t){this.align.refreshOnShow(n,t)},plugin:"align"}),i.RegisterCommand("alignLeft",{type:"button",icon:"align-left",title:"Align Left",callback:function(){this.align.apply("left")},refresh:function(n){this.align.refreshForToolbar(n)},plugin:"align"}),i.RegisterCommand("alignRight",{type:"button",icon:"align-right",title:"Align Right",callback:function(){this.align.apply("right")},refresh:function(n){this.align.refreshForToolbar(n)},plugin:"align"}),i.RegisterCommand("alignCenter",{type:"button",icon:"align-center",title:"Align Center",callback:function(){this.align.apply("center")},refresh:function(n){this.align.refreshForToolbar(n)},plugin:"align"}),i.RegisterCommand("alignJustify",{type:"button",icon:"align-justify",title:"Align Justify",callback:function(){this.align.apply("justify")},refresh:function(n){this.align.refreshForToolbar(n)},plugin:"align"})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 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";i=i&&i.hasOwnProperty("default")?i["default"]:i,Object.assign(i.DEFAULTS,{charCounterMax:-1,charCounterCount:!0}),i.PLUGINS.charCounter=function(n){var r,e=n.$,o=function o(){return(n.el.textContent||"").replace(/\u200B/g,"").length};function t(t){if(n.opts.charCounterMax<0)return!0;if(o()<n.opts.charCounterMax)return!0;var e=t.which;return!(!n.keys.ctrlKey(t)&&n.keys.isCharacter(e)||e===i.KEYCODE.IME)||(t.preventDefault(),t.stopPropagation(),n.events.trigger("charCounter.exceeded"),!1)}function a(t){return n.opts.charCounterMax<0?t:e("<div>").html(t).text().length+o()<=n.opts.charCounterMax?t:(n.events.trigger("charCounter.exceeded"),"")}function c(){if(n.opts.charCounterCount){var t=o()+(0<n.opts.charCounterMax?"/"+n.opts.charCounterMax:"");r.text("".concat(n.language.translate("Characters")," : ").concat(t)),n.opts.toolbarBottom&&r.css("margin-bottom",n.$tb.outerHeight(!0));var e=n.$wp.get(0).offsetWidth-n.$wp.get(0).clientWidth;0<=e&&("rtl"==n.opts.direction?r.css("margin-left",e):r.css("margin-right",e))}}return{_init:function u(){return!!n.$wp&&!!n.opts.charCounterCount&&((r=e(document.createElement("span")).attr("class","fr-counter")).css("bottom",n.$wp.css("border-bottom-width")),n.$second_tb&&n.$second_tb.append(r),n.events.on("keydown",t,!0),n.events.on("paste.afterCleanup",a),n.events.on("keyup contentChanged input",function(){n.events.trigger("charCounter.update")}),n.events.on("charCounter.update",c),n.events.trigger("charCounter.update"),void n.events.on("destroy",function(){e(n.o_win).off("resize.char".concat(n.id)),r.removeData().remove(),r=null}))},count:o}}});
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";i=i&&i.hasOwnProperty("default")?i["default"]:i,Object.assign(i.DEFAULTS,{charCounterMax:-1,charCounterCount:!0}),i.PLUGINS.charCounter=function(n){var r,e=n.$,o=function o(){return(n.el.textContent||"").replace(/\u200B/g,"").length};function t(t){if(n.opts.charCounterMax<0)return!0;if(o()<n.opts.charCounterMax)return!0;var e=t.which;return!(!n.keys.ctrlKey(t)&&n.keys.isCharacter(e)||e===i.KEYCODE.IME)||(t.preventDefault(),t.stopPropagation(),n.events.trigger("charCounter.exceeded"),!1)}function a(t){return n.opts.charCounterMax<0?t:e("<div>").html(t).text().length+o()<=n.opts.charCounterMax?t:(n.events.trigger("charCounter.exceeded"),"")}function c(){if(n.opts.charCounterCount){var t=o()+(0<n.opts.charCounterMax?"/"+n.opts.charCounterMax:"");r.text("".concat(n.language.translate("Characters")," : ").concat(t)),n.opts.toolbarBottom&&r.css("margin-bottom",n.$tb.outerHeight(!0));var e=n.$wp.get(0).offsetWidth-n.$wp.get(0).clientWidth;0<=e&&("rtl"==n.opts.direction?r.css("margin-left",e):r.css("margin-right",e))}}return{_init:function u(){return!!n.$wp&&!!n.opts.charCounterCount&&((r=e(document.createElement("span")).attr("class","fr-counter")).css("bottom",n.$wp.css("border-bottom-width")),n.$second_tb?n.$second_tb.append(r):n.$wp.append(r),n.events.on("keydown",t,!0),n.events.on("paste.afterCleanup",a),n.events.on("keyup contentChanged input",function(){n.events.trigger("charCounter.update")}),n.events.on("charCounter.update",c),n.events.trigger("charCounter.update"),void n.events.on("destroy",function(){e(n.o_win).off("resize.char".concat(n.id)),r.removeData().remove(),r=null}))},count:o}}});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
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(t){"use strict";(t=t&&t.hasOwnProperty("default")?t["default"]:t).PLUGINS.codeBeautifier=function(){var t,e,n,i,Q={};function y(i,t){var e={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},n={"@media":!0,"@supports":!0,"@document":!0};t=t||{},i=(i=i||"").replace(/\r\n|[\r\u2028\u2029]/g,"\n");var r=t.indent_size||4,s=t.indent_char||" ",a=t.selector_separator_newline===undefined||t.selector_separator_newline,_=t.end_with_newline!==undefined&&t.end_with_newline,o=t.newline_between_rules===undefined||t.newline_between_rules,c=t.eol?t.eol:"\n";"string"==typeof r&&(r=parseInt(r,10)),t.indent_with_tabs&&(s="\t",r=1),c=c.replace(/\\r/,"\r").replace(/\\n/,"\n");var l,h=/^\s+$/,u=-1,p=0;function d(){return(l=i.charAt(++u))||""}function f(t){var e,n=u;return t&&E(),e=i.charAt(u+1)||"",u=n-1,d(),e}function T(t){for(var e=u;d();)if("\\"===l)d();else{if(-1!==t.indexOf(l))break;if("\n"===l)break}return i.substring(e,u+1)}function E(){for(var t="";h.test(f());)d(),t+=l;return t}function g(){var t="";for(l&&h.test(l)&&(t=l);h.test(d());)t+=l;return t}function x(t){var e=u;for(t="/"===f(),d();d();){if(!t&&"*"===l&&"/"===f()){d();break}if(t&&"\n"===l)return i.substring(e,u)}return i.substring(e,u)+l}function w(t){return i.substring(u-t.length,u).toLowerCase()===t}function K(){for(var t=0,e=u+1;e<i.length;e++){var n=i.charAt(e);if("{"===n)return!0;if("("===n)t+=1;else if(")"===n){if(0===t)return!1;t-=1}else if(" "===n||"}"===n)return!1}return!1}var R=i.match(/^[\t ]*/)[0],m=new Array(r+1).join(s),b=0,v=0;for(var S,A,k,y={"{":function(t){y.singleSpace(),O.push(t),y.newLine()},"}":function(t){y.newLine(),O.push(t),y.newLine()},_lastCharWhitespace:function(){return h.test(O[O.length-1])},newLine:function(t){O.length&&(t||"\n"===O[O.length-1]||y.trim(),O.push("\n"),R&&O.push(R))},singleSpace:function(){O.length&&!y._lastCharWhitespace()&&O.push(" ")},preserveSingleSpace:function(){S&&y.singleSpace()},trim:function(){for(;y._lastCharWhitespace();)O.pop()}},O=[],N=!1,D=!1,C=!1,L="",I="";;){var V=g();S=""!==V;var P=-1!==V.indexOf("\n");if(I=L,!(L=l))break;if("/"===l&&"*"===f()){var B=0===b;(P||B)&&y.newLine(),O.push(x()),y.newLine(),B&&y.newLine(!0)}else if("/"===l&&"/"===f())P||"{"===I||y.trim(),y.singleSpace(),O.push(x()),y.newLine();else if("@"===l){y.preserveSingleSpace(),O.push(l);var j=(void 0,A=u,k=T(": , {}()[]/='\""),u=A-1,d(),k);j.match(/[ :]$/)&&(d(),j=T(": ").replace(/\s$/,""),O.push(j),y.singleSpace()),(j=j.replace(/\s$/,""))in e&&(v+=1,j in n&&(C=!0))}else"#"===l&&"{"===f()?(y.preserveSingleSpace(),O.push(T("}"))):"{"===l?"}"===f(!0)?(E(),d(),y.singleSpace(),O.push("{}"),y.newLine(),o&&0===b&&y.newLine(!0)):(b++,R+=m,y["{"](l),N=C?(C=!1,v<b):v<=b):"}"===l?(b--,R=R.slice(0,-r),y["}"](l),D=N=!1,v&&v--,o&&0===b&&y.newLine(!0)):":"===l?(E(),!N&&!C||w("&")||K()?":"===f()?(d(),O.push("::")):O.push(":"):(D=!0,O.push(":"),y.singleSpace())):'"'===l||"'"===l?(y.preserveSingleSpace(),O.push(T(l))):" "===l?(D=!1,O.push(l),y.newLine()):"("===l?w("url")?(O.push(l),E(),d()&&(")"!==l&&'"'!==l&&"'"!==l?O.push(T(")")):u--)):(p++,y.preserveSingleSpace(),O.push(l),E()):")"===l?(O.push(l),p--):","===l?(O.push(l),E(),a&&!D&&p<1?y.newLine():y.singleSpace()):("]"===l||("["===l?y.preserveSingleSpace():"="===l?(E(),l="="):y.preserveSingleSpace()),O.push(l))}var M="";return R&&(M+=R),M+=O.join("").replace(/[\r\n\t ]+$/,""),_&&(M+="\n"),"\n"!=c&&(M=M.replace(/[\n]/g,c)),M}function Y(t,e){for(var n=0;n<e.length;n+=1)if(e[n]===t)return!0;return!1}function H(t){return t.replace(/^\s+|\s+$/g,"")}function O(t,e){return new r(t,e).beautify()}t=Q,e="\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc",n=new RegExp("[".concat(e,"]")),i=new RegExp("[".concat(e," ").concat("\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u0620-\u0649\u0672-\u06d3\u06e7-\u06e8\u06fb-\u06fc\u0730-\u074a\u0800-\u0814\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0840-\u0857\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962-\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09d7\u09df-\u09e0\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5f-\u0b60\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2-\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d46-\u0d48\u0d57\u0d62-\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e34-\u0e3a\u0e40-\u0e45\u0e50-\u0e59\u0eb4-\u0eb9\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f41-\u0f47\u0f71-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1029\u1040-\u1049\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u170e-\u1710\u1720-\u1730\u1740-\u1750\u1772\u1773\u1780-\u17b2\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1920-\u192b\u1930-\u193b\u1951-\u196d\u19b0-\u19c0\u19c8-\u19c9\u19d0-\u19d9\u1a00-\u1a15\u1a20-\u1a53\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b46-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1bb0-\u1bb9\u1be6-\u1bf3\u1c00-\u1c22\u1c40-\u1c49\u1c5b-\u1c7d\u1cd0-\u1cd2\u1d00-\u1dbe\u1e01-\u1f15\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2d81-\u2d96\u2de0-\u2dff\u3021-\u3028\u3099\u309a\ua640-\ua66d\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua7f8-\ua800\ua806\ua80b\ua823-\ua827\ua880-\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8f3-\ua8f7\ua900-\ua909\ua926-\ua92d\ua930-\ua945\ua980-\ua983\ua9b3-\ua9c0\uaa00-\uaa27\uaa40-\uaa41\uaa4c-\uaa4d\uaa50-\uaa59\uaa7b\uaae0-\uaae9\uaaf2-\uaaf3\uabc0-\uabe1\uabec\uabed\uabf0-\uabf9\ufb20-\ufb28\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f","]")),t.newline=/[\n\r\u2028\u2029]/,t.lineBreak=new RegExp("\r\n|".concat(t.newline.source)),t.allLineBreaks=new RegExp(t.lineBreak.source,"g"),t.isIdentifierStart=function(t){return t<65?36===t||64===t:t<91||(t<97?95===t:t<123||170<=t&&n.test(String.fromCharCode(t)))},t.isIdentifierChar=function(t){return t<48?36===t:t<58||!(t<65)&&(t<91||(t<97?95===t:t<123||170<=t&&i.test(String.fromCharCode(t))))};var Z={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function r(i,t){var c,r,s,l,a,_,o,h,u,e,n,p,d,f=[],T="";function E(t,e){var n=0;return t&&(n=t.indentation_level,!c.just_added_newline()&&t.line_indent_level>n&&(n=t.line_indent_level)),{mode:e,parent:t,last_text:t?t.last_text:"",last_word:t?t.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,if_block:!1,else_block:!1,do_block:!1,do_while:!1,in_case_statement:!1,in_case:!1,case_body:!1,indentation_level:n,line_indent_level:t?t.line_indent_level:n,start_line_index:c.get_line_number(),ternary_depth:0}}for(p={TK_START_EXPR:function L(){O();var t=Z.Expression;if("["===l.text){if("TK_WORD"===a||")"===h.last_text)return"TK_RESERVED"===a&&Y(h.last_text,s.line_starters)&&(c.space_before_token=!0),v(t),m(),b(),void(d.space_in_paren&&(c.space_before_token=!0));t=Z.ArrayLiteral,S(h.mode)&&("["!==h.last_text&&(","!==h.last_text||"]"!==_&&"}"!==_)||d.keep_array_indentation||K())}else"TK_RESERVED"===a&&"for"===h.last_text?t=Z.ForInitializer:"TK_RESERVED"===a&&Y(h.last_text,["if","while"])&&(t=Z.Conditional);" "===h.last_text||"TK_START_BLOCK"===a?K():"TK_END_EXPR"===a||"TK_START_EXPR"===a||"TK_END_BLOCK"===a||"."===h.last_text?w(l.wanted_newline):"TK_RESERVED"===a&&"("===l.text||"TK_WORD"===a||"TK_OPERATOR"===a?"TK_RESERVED"===a&&("function"===h.last_word||"typeof"===h.last_word)||"*"===h.last_text&&"function"===_?d.space_after_anon_function&&(c.space_before_token=!0):"TK_RESERVED"!==a||!Y(h.last_text,s.line_starters)&&"catch"!==h.last_text||d.space_before_conditional&&(c.space_before_token=!0):c.space_before_token=!0;"("===l.text&&"TK_RESERVED"===a&&"await"===h.last_word&&(c.space_before_token=!0);"("===l.text&&("TK_EQUALS"!==a&&"TK_OPERATOR"!==a||y()||w());v(t),m(),d.space_in_paren&&(c.space_before_token=!0);b()},TK_END_EXPR:function I(){for(;h.mode===Z.Statement;)k();h.multiline_frame&&w("]"===l.text&&S(h.mode)&&!d.keep_array_indentation);d.space_in_paren&&("TK_START_EXPR"!==a||d.space_in_empty_paren?c.space_before_token=!0:(c.trim(),c.space_before_token=!1));"]"===l.text&&d.keep_array_indentation?(m(),k()):(k(),m());c.remove_redundant_indentation(u),h.do_while&&u.mode===Z.Conditional&&(u.mode=Z.Expression,h.do_block=!1,h.do_while=!1)},TK_START_BLOCK:function V(){var t=D(1),e=D(2);e&&(":"===e.text&&Y(t.type,["TK_STRING","TK_WORD","TK_RESERVED"])||Y(t.text,["get","set"])&&Y(e.type,["TK_WORD","TK_RESERVED"]))?Y(_,["class","interface"])?v(Z.BlockStatement):v(Z.ObjectLiteral):v(Z.BlockStatement);var n=!t.comments_before.length&&"}"===t.text&&"function"===h.last_word&&"TK_END_EXPR"===a;"expand"===d.brace_style||"none"===d.brace_style&&l.wanted_newline?"TK_OPERATOR"!==a&&(n||"TK_EQUALS"===a||"TK_RESERVED"===a&&N(h.last_text)&&"else"!==h.last_text)?c.space_before_token=!0:K(!1,!0):"TK_OPERATOR"!==a&&"TK_START_EXPR"!==a?"TK_START_BLOCK"===a?K():c.space_before_token=!0:S(u.mode)&&","===h.last_text&&("}"===_?c.space_before_token=!0:K());m(),b()},TK_END_BLOCK:function P(){for(;h.mode===Z.Statement;)k();var t="TK_START_BLOCK"===a;"expand"===d.brace_style?t||K():t||(S(h.mode)&&d.keep_array_indentation?(d.keep_array_indentation=!1,K(),d.keep_array_indentation=!0):K());k(),m()},TK_WORD:C,TK_RESERVED:C,TK_SEMICOLON:function B(){O()&&(c.space_before_token=!1);for(;h.mode===Z.Statement&&!h.if_block&&!h.do_block;)k();m()},TK_STRING:function j(){O()?c.space_before_token=!0:"TK_RESERVED"===a||"TK_WORD"===a?c.space_before_token=!0:"TK_COMMA"===a||"TK_START_EXPR"===a||"TK_EQUALS"===a||"TK_OPERATOR"===a?y()||w():K();m()},TK_EQUALS:function M(){O();h.declaration_statement&&(h.declaration_assignment=!0);c.space_before_token=!0,m(),c.space_before_token=!0},TK_OPERATOR:function U(){O();if("TK_RESERVED"===a&&N(h.last_text))return c.space_before_token=!0,void m();if("*"===l.text&&"TK_DOT"===a)return void m();if(":"===l.text&&h.in_case)return h.case_body=!0,b(),m(),K(),void(h.in_case=!1);if("::"===l.text)return void m();"TK_OPERATOR"===a&&w();var t=!0,e=!0;Y(l.text,["--","++","!","~"])||Y(l.text,["-","+"])&&(Y(a,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||Y(h.last_text,s.line_starters)||","===h.last_text)?(e=t=!1,!l.wanted_newline||"--"!==l.text&&"++"!==l.text||K(!1,!0)," "===h.last_text&&A(h.mode)&&(t=!0),"TK_RESERVED"===a?t=!0:"TK_END_EXPR"===a?t=!("]"===h.last_text&&("--"===l.text||"++"===l.text)):"TK_OPERATOR"===a&&(t=Y(l.text,["--","-","++","+"])&&Y(h.last_text,["--","-","++","+"]),Y(l.text,["+","-"])&&Y(h.last_text,["--","++"])&&(e=!0)),h.mode!==Z.BlockStatement&&h.mode!==Z.Statement||"{"!==h.last_text&&" "!==h.last_text||K()):":"===l.text?0===h.ternary_depth?t=!1:h.ternary_depth-=1:"?"===l.text?h.ternary_depth+=1:"*"===l.text&&"TK_RESERVED"===a&&"function"===h.last_text&&(e=t=!1);c.space_before_token=c.space_before_token||t,m(),c.space_before_token=e},TK_COMMA:function W(){if(h.declaration_statement)return A(h.parent.mode)&&(h.declaration_assignment=!1),m(),void(h.declaration_assignment?K(h.declaration_assignment=!1,!0):(c.space_before_token=!0,d.comma_first&&w()));m(),h.mode===Z.ObjectLiteral||h.mode===Z.Statement&&h.parent.mode===Z.ObjectLiteral?(h.mode===Z.Statement&&k(),K()):(c.space_before_token=!0,d.comma_first&&w())},TK_BLOCK_COMMENT:function z(){if(c.raw)return c.add_raw_token(l),void(l.directives&&"end"===l.directives.preserve&&(d.test_output_raw||(c.raw=!1)));if(l.directives)return K(!1,!0),m(),"start"===l.directives.preserve&&(c.raw=!0),void K(!1,!0);if(!Q.newline.test(l.text)&&!l.wanted_newline)return c.space_before_token=!0,m(),void(c.space_before_token=!0);var t,e=function a(t){var e;t=t.replace(/\x0d/g,"");var n=[];e=t.indexOf("\n");for(;-1!==e;)n.push(t.substring(0,e)),t=t.substring(e+1),e=t.indexOf("\n");t.length&&n.push(t);return n}(l.text),n=!1,i=!1,r=l.whitespace_before,s=r.length;K(!1,!0),1<e.length&&(!function _(t,e){for(var n=0;n<t.length;n++){var i=H(t[n]);if(i.charAt(0)!==e)return!1}return!0}(e.slice(1),"*")?function o(t,e){for(var n,i=0,r=t.length;i<r;i++)if((n=t[i])&&0!==n.indexOf(e))return!1;return!0}(e.slice(1),r)&&(i=!0):n=!0);for(m(e[0]),t=1;t<e.length;t++)K(!1,!0),n?m(" ".concat(e[t].replace(/^\s+/g,""))):i&&e[t].length>s?m(e[t].substring(s)):c.add_token(e[t]);K(!1,!0)},TK_COMMENT:function G(){l.wanted_newline?K(!1,!0):c.trim(!0);c.space_before_token=!0,m(),K(!1,!0)},TK_DOT:function X(){O();"TK_RESERVED"===a&&N(h.last_text)?c.space_before_token=!0:w(")"===h.last_text&&d.break_chained_methods);m()},TK_UNKNOWN:function F(){m(),"\n"===l.text[l.text.length-1]&&K()},TK_EOF:function $(){for(;h.mode===Z.Statement;)k()}},d={},(t=t||{}).braces_on_own_line!==undefined&&(d.brace_style=t.braces_on_own_line?"expand":"collapse"),d.brace_style=t.brace_style?t.brace_style:d.brace_style?d.brace_style:"collapse","expand-strict"===d.brace_style&&(d.brace_style="expand"),d.indent_size=t.indent_size?parseInt(t.indent_size,10):4,d.indent_char=t.indent_char?t.indent_char:" ",d.eol=t.eol?t.eol:"\n",d.preserve_newlines=t.preserve_newlines===undefined||t.preserve_newlines,d.break_chained_methods=t.break_chained_methods!==undefined&&t.break_chained_methods,d.max_preserve_newlines=t.max_preserve_newlines===undefined?0:parseInt(t.max_preserve_newlines,10),d.space_in_paren=t.space_in_paren!==undefined&&t.space_in_paren,d.space_in_empty_paren=t.space_in_empty_paren!==undefined&&t.space_in_empty_paren,d.jslint_happy=t.jslint_happy!==undefined&&t.jslint_happy,d.space_after_anon_function=t.space_after_anon_function!==undefined&&t.space_after_anon_function,d.keep_array_indentation=t.keep_array_indentation!==undefined&&t.keep_array_indentation,d.space_before_conditional=t.space_before_conditional===undefined||t.space_before_conditional,d.unescape_strings=t.unescape_strings!==undefined&&t.unescape_strings,d.wrap_line_length=t.wrap_line_length===undefined?0:parseInt(t.wrap_line_length,10),d.e4x=t.e4x!==undefined&&t.e4x,d.end_with_newline=t.end_with_newline!==undefined&&t.end_with_newline,d.comma_first=t.comma_first!==undefined&&t.comma_first,d.test_output_raw=t.test_output_raw!==undefined&&t.test_output_raw,d.jslint_happy&&(d.space_after_anon_function=!0),t.indent_with_tabs&&(d.indent_char="\t",d.indent_size=1),d.eol=d.eol.replace(/\\r/,"\r").replace(/\\n/,"\n"),o="";0<d.indent_size;)o+=d.indent_char,d.indent_size-=1;var g=0;if(i&&i.length){for(;" "===i.charAt(g)||"\t"===i.charAt(g);)T+=i.charAt(g),g+=1;i=i.substring(g)}function x(t){var e=t.newlines;if(d.keep_array_indentation&&S(h.mode))for(var n=0;n<e;n+=1)K(0<n);else if(d.max_preserve_newlines&&e>d.max_preserve_newlines&&(e=d.max_preserve_newlines),d.preserve_newlines&&1<t.newlines){K();for(var i=1;i<e;i+=1)K(!0)}p[(l=t).type]()}function w(t){if(t=t!==undefined&&t,!c.just_added_newline())if(d.preserve_newlines&&l.wanted_newline||t)K(!1,!0);else if(d.wrap_line_length){c.current_line.get_character_count()+l.text.length+(c.space_before_token?1:0)>=d.wrap_line_length&&K(!1,!0)}}function K(t,e){if(!e&&" "!==h.last_text&&","!==h.last_text&&"="!==h.last_text&&"TK_OPERATOR"!==a)for(;h.mode===Z.Statement&&!h.if_block&&!h.do_block;)k();c.add_new_line(t)&&(h.multiline_frame=!0)}function R(){c.just_added_newline()&&(d.keep_array_indentation&&S(h.mode)&&l.wanted_newline?(c.current_line.push(l.whitespace_before),c.space_before_token=!1):c.set_indent(h.indentation_level)&&(h.line_indent_level=h.indentation_level))}function m(t){c.raw?c.add_raw_token(l):(d.comma_first&&"TK_COMMA"===a&&c.just_added_newline()&&","===c.previous_line.last()&&(c.previous_line.pop(),R(),c.add_token(","),c.space_before_token=!0),t=t||l.text,R(),c.add_token(t))}function b(){h.indentation_level+=1}function v(t){u=h?(e.push(h),h):E(null,t),h=E(u,t)}function S(t){return t===Z.ArrayLiteral}function A(t){return Y(t,[Z.Expression,Z.ForInitializer,Z.Conditional])}function k(){0<e.length&&(u=h,h=e.pop(),u.mode===Z.Statement&&c.remove_redundant_indentation(u))}function y(){return h.parent.mode===Z.ObjectLiteral&&h.mode===Z.Statement&&(":"===h.last_text&&0===h.ternary_depth||"TK_RESERVED"===a&&Y(h.last_text,["get","set"]))}function O(){return!!("TK_RESERVED"===a&&Y(h.last_text,["const","let","const"])&&"TK_WORD"===l.type||"TK_RESERVED"===a&&"do"===h.last_text||"TK_RESERVED"===a&&"return"===h.last_text&&!l.wanted_newline||"TK_RESERVED"===a&&"else"===h.last_text&&("TK_RESERVED"!==l.type||"if"!==l.text)||"TK_END_EXPR"===a&&(u.mode===Z.ForInitializer||u.mode===Z.Conditional)||"TK_WORD"===a&&h.mode===Z.BlockStatement&&!h.in_case&&"--"!==l.text&&"++"!==l.text&&"function"!==_&&"TK_WORD"!==l.type&&"TK_RESERVED"!==l.type||h.mode===Z.ObjectLiteral&&(":"===h.last_text&&0===h.ternary_depth||"TK_RESERVED"===a&&Y(h.last_text,["get","set"])))&&(v(Z.Statement),b(),"TK_RESERVED"===a&&Y(h.last_text,["const","let","const"])&&"TK_WORD"===l.type&&(h.declaration_statement=!0),y()||w("TK_RESERVED"===l.type&&Y(l.text,["do","for","if","while"])),!0)}function N(t){return Y(t,["case","return","do","if","throw","else"])}function D(t){var e=r+(t||0);return e<0||e>=f.length?null:f[e]}function C(){("TK_RESERVED"===l.type&&h.mode!==Z.ObjectLiteral&&Y(l.text,["set","get"])&&(l.type="TK_WORD"),"TK_RESERVED"===l.type&&h.mode===Z.ObjectLiteral)&&(":"===D(1).text&&(l.type="TK_WORD"));if(O()||!l.wanted_newline||A(h.mode)||"TK_OPERATOR"===a&&"--"!==h.last_text&&"++"!==h.last_text||"TK_EQUALS"===a||!d.preserve_newlines&&"TK_RESERVED"===a&&Y(h.last_text,["const","let","const","set","get"])||K(),h.do_block&&!h.do_while){if("TK_RESERVED"===l.type&&"while"===l.text)return c.space_before_token=!0,m(),c.space_before_token=!0,void(h.do_while=!0);K(),h.do_block=!1}if(h.if_block)if(h.else_block||"TK_RESERVED"!==l.type||"else"!==l.text){for(;h.mode===Z.Statement;)k();h.if_block=!1,h.else_block=!1}else h.else_block=!0;if("TK_RESERVED"===l.type&&("case"===l.text||"default"===l.text&&h.in_case_statement))return K(),(h.case_body||d.jslint_happy)&&(!function t(){0<h.indentation_level&&(!h.parent||h.indentation_level>h.parent.indentation_level)&&(h.indentation_level-=1)}(),h.case_body=!1),m(),h.in_case=!0,void(h.in_case_statement=!0);if("TK_RESERVED"===l.type&&"function"===l.text&&((Y(h.last_text,["}"," "])||c.just_added_newline()&&!Y(h.last_text,["[","{",":","=",","]))&&(c.just_added_blankline()||l.comments_before.length||(K(),K(!0))),"TK_RESERVED"===a||"TK_WORD"===a?"TK_RESERVED"===a&&Y(h.last_text,["get","set","new","return","export","async"])?c.space_before_token=!0:"TK_RESERVED"===a&&"default"===h.last_text&&"export"===_?c.space_before_token=!0:K():"TK_OPERATOR"===a||"="===h.last_text?c.space_before_token=!0:(h.multiline_frame||!A(h.mode)&&!S(h.mode))&&K()),"TK_COMMA"!==a&&"TK_START_EXPR"!==a&&"TK_EQUALS"!==a&&"TK_OPERATOR"!==a||y()||w(),"TK_RESERVED"===l.type&&Y(l.text,["function","get","set"]))return m(),void(h.last_word=l.text);(n="NONE","TK_END_BLOCK"===a?"TK_RESERVED"===l.type&&Y(l.text,["else","catch","finally"])?"expand"===d.brace_style||"end-expand"===d.brace_style||"none"===d.brace_style&&l.wanted_newline?n="NEWLINE":(n="SPACE",c.space_before_token=!0):n="NEWLINE":"TK_SEMICOLON"===a&&h.mode===Z.BlockStatement?n="NEWLINE":"TK_SEMICOLON"===a&&A(h.mode)?n="SPACE":"TK_STRING"===a?n="NEWLINE":"TK_RESERVED"===a||"TK_WORD"===a||"*"===h.last_text&&"function"===_?n="SPACE":"TK_START_BLOCK"===a?n="NEWLINE":"TK_END_EXPR"===a&&(c.space_before_token=!0,n="NEWLINE"),"TK_RESERVED"===l.type&&Y(l.text,s.line_starters)&&")"!==h.last_text&&(n="else"===h.last_text||"export"===h.last_text?"SPACE":"NEWLINE"),"TK_RESERVED"===l.type&&Y(l.text,["else","catch","finally"]))?"TK_END_BLOCK"!==a||"expand"===d.brace_style||"end-expand"===d.brace_style||"none"===d.brace_style&&l.wanted_newline?K():(c.trim(!0),"}"!==c.current_line.last()&&K(),c.space_before_token=!0):"NEWLINE"===n?"TK_RESERVED"===a&&N(h.last_text)?c.space_before_token=!0:"TK_END_EXPR"!==a?"TK_START_EXPR"===a&&"TK_RESERVED"===l.type&&Y(l.text,["const","let","const"])||":"===h.last_text||("TK_RESERVED"===l.type&&"if"===l.text&&"else"===h.last_text?c.space_before_token=!0:K()):"TK_RESERVED"===l.type&&Y(l.text,s.line_starters)&&")"!==h.last_text&&K():h.multiline_frame&&S(h.mode)&&","===h.last_text&&"}"===_?K():"SPACE"===n&&(c.space_before_token=!0);m(),h.last_word=l.text,"TK_RESERVED"===l.type&&"do"===l.text&&(h.do_block=!0),"TK_RESERVED"===l.type&&"if"===l.text&&(h.if_block=!0)}a="TK_START_BLOCK",_="",(c=new q(o,T)).raw=d.test_output_raw,e=[],v(Z.BlockStatement),this.beautify=function(){var t,e;for(s=new tt(i,d,o),f=s.tokenize(),r=0;t=D();){for(var n=0;n<t.comments_before.length;n++)x(t.comments_before[n]);x(t),_=h.last_text,a=t.type,h.last_text=t.text,r+=1}return e=c.get_code(),d.end_with_newline&&(e+="\n"),"\n"!=d.eol&&(e=e.replace(/[\n]/g,d.eol)),e}}function s(e){var n=0,i=-1,r=[],s=!0;this.set_indent=function(t){n=e.baseIndentLength+t*e.indent_length,i=t},this.get_character_count=function(){return n},this.is_empty=function(){return s},this.last=function(){return this._empty?null:r[r.length-1]},this.push=function(t){r.push(t),n+=t.length,s=!1},this.pop=function(){var t=null;return s||(t=r.pop(),n-=t.length,s=0===r.length),t},this.remove_indent=function(){0<i&&(i-=1,n-=e.indent_length)},this.trim=function(){for(;" "===this.last();)r.pop(),n-=1;s=0===r.length},this.toString=function(){var t="";return this._empty||(0<=i&&(t=e.indent_cache[i]),t+=r.join("")),t}}function q(e,n){n=n||"",this.indent_cache=[n],this.baseIndentLength=n.length,this.indent_length=e.length,this.raw=!1;var i=[];this.baseIndentString=n,this.indent_string=e,this.previous_line=null,this.current_line=null,this.space_before_token=!1,this.add_outputline=function(){this.previous_line=this.current_line,this.current_line=new s(this),i.push(this.current_line)},this.add_outputline(),this.get_line_number=function(){return i.length},this.add_new_line=function(t){return(1!==this.get_line_number()||!this.just_added_newline())&&(!(!t&&this.just_added_newline())&&(this.raw||this.add_outputline(),!0))},this.get_code=function(){return i.join("\n").replace(/[\r\n\t ]+$/,"")},this.set_indent=function(t){if(1<i.length){for(;t>=this.indent_cache.length;)this.indent_cache.push(this.indent_cache[this.indent_cache.length-1]+this.indent_string);return this.current_line.set_indent(t),!0}return this.current_line.set_indent(0),!1},this.add_raw_token=function(t){for(var e=0;e<t.newlines;e++)this.add_outputline();this.current_line.push(t.whitespace_before),this.current_line.push(t.text),this.space_before_token=!1},this.add_token=function(t){this.add_space_before_token(),this.current_line.push(t)},this.add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&this.current_line.push(" "),this.space_before_token=!1},this.remove_redundant_indentation=function(t){if(!t.multiline_frame&&t.mode!==Z.ForInitializer&&t.mode!==Z.Conditional)for(var e=t.start_line_index,n=i.length;e<n;)i[e].remove_indent(),e++},this.trim=function(t){for(t=t!==undefined&&t,this.current_line.trim(e,n);t&&1<i.length&&this.current_line.is_empty();)i.pop(),this.current_line=i[i.length-1],this.current_line.trim();this.previous_line=1<i.length?i[i.length-2]:null},this.just_added_newline=function(){return this.current_line.is_empty()},this.just_added_blankline=function(){return!!this.just_added_newline()&&(1===i.length||i[i.length-2].is_empty())}}var J=function J(t,e,n,i,r,s){this.type=t,this.text=e,this.comments_before=[],this.newlines=n||0,this.wanted_newline=0<n,this.whitespace_before=i||"",this.parent=null,this.directives=null};function tt(k,y,t){var O="\n\r\t ".split(""),N=/[0-9]/,D=/[01234567]/,C=/[0123456789abcdefABCDEF]/,L="+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! ~ , : ? ^ ^= |= :: =>".split(" ");this.line_starters="continue,try,throw,return,const,let,const,if,switch,case,default,for,while,break,function,import,export".split(",");var I,V,P,B,j,M,U=this.line_starters.concat(["do","in","else","get","set","new","catch","finally","typeof","yield","async","await"]),W=/([\s\S]*?)((?:\*\/)|$)/g,z=/([^\n\r\u2028\u2029]*)/g,G=/\/\* beautify( \w+[:]\w+)+ \*\//g,X=/ (\w+)[:](\w+)/g,F=/([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g,$=/((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g;function a(){var t,e,n=[];if(I=0,V="",M<=j)return["","TK_EOF"];e=B.length?B[B.length-1]:new J("TK_START_BLOCK","{");var i=k.charAt(j);for(j+=1;Y(i,O);){if(Q.newline.test(i)?"\n"===i&&"\r"===k.charAt(j-2)||(I+=1,n=[]):n.push(i),M<=j)return["","TK_EOF"];i=k.charAt(j),j+=1}if(n.length&&(V=n.join("")),N.test(i)){var r=!0,s=!0,a=N;for("0"===i&&j<M&&/[Xxo]/.test(k.charAt(j))?(s=r=!1,i+=k.charAt(j),j+=1,a=/[o]/.test(k.charAt(j))?D:C):(i="",j-=1);j<M&&a.test(k.charAt(j));)i+=k.charAt(j),j+=1,r&&j<M&&"."===k.charAt(j)&&(i+=k.charAt(j),j+=1,r=!1),s&&j<M&&/[Ee]/.test(k.charAt(j))&&(i+=k.charAt(j),(j+=1)<M&&/[+-]/.test(k.charAt(j))&&(i+=k.charAt(j),j+=1),r=s=!1);return[i,"TK_WORD"]}if(Q.isIdentifierStart(k.charCodeAt(j-1))){if(j<M)for(;Q.isIdentifierChar(k.charCodeAt(j))&&(i+=k.charAt(j),(j+=1)!==M););return"TK_DOT"===e.type||"TK_RESERVED"===e.type&&Y(e.text,["set","get"])||!Y(i,U)?[i,"TK_WORD"]:"in"===i?[i,"TK_OPERATOR"]:[i,"TK_RESERVED"]}if("("===i||"["===i)return[i,"TK_START_EXPR"];if(")"===i||"]"===i)return[i,"TK_END_EXPR"];if("{"===i)return[i,"TK_START_BLOCK"];if("}"===i)return[i,"TK_END_BLOCK"];if(" "===i)return[i,"TK_SEMICOLON"];if("/"===i){var _="";if("*"===k.charAt(j)){j+=1,W.lastIndex=j;var o=W.exec(k);_="/*".concat(o[0]),j+=o[0].length;var c=function S(t){if(!t.match(G))return null;var e={};X.lastIndex=0;for(var n=X.exec(t);n;)e[n[1]]=n[2],n=X.exec(t);return e}(_);return c&&"start"===c.ignore&&(F.lastIndex=j,_+=(o=F.exec(k))[0],j+=o[0].length),[_=_.replace(Q.lineBreak,"\n"),"TK_BLOCK_COMMENT",c]}if("/"===k.charAt(j)){j+=1,z.lastIndex=j;var l=z.exec(k);return _="//".concat(l[0]),j+=l[0].length,[_,"TK_COMMENT"]}}if("`"===i||"'"===i||'"'===i||("/"===i||y.e4x&&"<"===i&&k.slice(j-1).match(/^<([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/))&&("TK_RESERVED"===e.type&&Y(e.text,["return","case","throw","else","do","typeof","yield"])||"TK_END_EXPR"===e.type&&")"===e.text&&e.parent&&"TK_RESERVED"===e.parent.type&&Y(e.parent.text,["if","while","for"])||Y(e.type,["TK_COMMENT","TK_START_EXPR","TK_START_BLOCK","TK_END_BLOCK","TK_OPERATOR","TK_EQUALS","TK_EOF","TK_SEMICOLON","TK_COMMA"]))){var h=i,u=!1,p=!1;if(t=i,"/"===h)for(var d=!1;j<M&&(u||d||k.charAt(j)!==h)&&!Q.newline.test(k.charAt(j));)t+=k.charAt(j),u?u=!1:(u="\\"===k.charAt(j),"["===k.charAt(j)?d=!0:"]"===k.charAt(j)&&(d=!1)),j+=1;else if(y.e4x&&"<"===h){var f=/<(\/?)([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/g,T=k.slice(j-1),E=f.exec(T);if(E&&0===E.index){for(var g=E[2],x=0;E;){var w=!!E[1],K=E[2],R=!!E[E.length-1]||"![CDATA["===K.slice(0,8);if(K!==g||R||(w?--x:++x),x<=0)break;E=f.exec(T)}var m=E?E.index+E[0].length:T.length;return T=T.slice(0,m),j+=m-1,[T=T.replace(Q.lineBreak,"\n"),"TK_STRING"]}}else for(;j<M&&(u||k.charAt(j)!==h&&("`"===h||!Q.newline.test(k.charAt(j))));)(u||"`"===h)&&Q.newline.test(k.charAt(j))?("\r"===k.charAt(j)&&"\n"===k.charAt(j+1)&&(j+=1),t+="\n"):t+=k.charAt(j),u=u?("x"!==k.charAt(j)&&"u"!==k.charAt(j)||(p=!0),!1):"\\"===k.charAt(j),j+=1;if(p&&y.unescape_strings&&(t=function A(t){var e,n=!1,i="",r=0,s="",a=0;for(;n||r<t.length;)if(e=t.charAt(r),r++,n){if(n=!1,"x"===e)s=t.substr(r,2),r+=2;else{if("u"!==e){i+="\\".concat(e);continue}s=t.substr(r,4),r+=4}if(!s.match(/^[0123456789abcdefABCDEF]+$/))return t;if(0<=(a=parseInt(s,16))&&a<32){i+="x"===e?"\\x".concat(s):"\\u".concat(s);continue}if(34===a||39===a||92===a)i+="\\".concat(String.fromCharCode(a));else{if("x"===e&&126<a&&a<=255)return t;i+=String.fromCharCode(a)}}else"\\"===e?n=!0:i+=e;return i}(t)),j<M&&k.charAt(j)===h&&(t+=h,j+=1,"/"===h))for(;j<M&&Q.isIdentifierStart(k.charCodeAt(j));)t+=k.charAt(j),j+=1;return[t,"TK_STRING"]}if("#"===i){if(0===B.length&&"!"===k.charAt(j)){for(t=i;j<M&&"\n"!==i;)t+=i=k.charAt(j),j+=1;return["".concat(H(t),"\n"),"TK_UNKNOWN"]}var b="#";if(j<M&&N.test(k.charAt(j))){for(;b+=i=k.charAt(j),(j+=1)<M&&"#"!==i&&"="!==i;);return"#"===i||("["===k.charAt(j)&&"]"===k.charAt(j+1)?(b+="[]",j+=2):"{"===k.charAt(j)&&"}"===k.charAt(j+1)&&(b+="{}",j+=2)),[b,"TK_WORD"]}}if("<"===i&&("?"===k.charAt(j)||"%"===k.charAt(j))){$.lastIndex=j-1;var v=$.exec(k);if(v)return i=v[0],j+=i.length-1,[i=i.replace(Q.lineBreak,"\n"),"TK_STRING"]}if("<"===i&&"\x3c!--"===k.substring(j-1,j+3)){for(j+=3,i="\x3c!--";!Q.newline.test(k.charAt(j))&&j<M;)i+=k.charAt(j),j++;return P=!0,[i,"TK_COMMENT"]}if("-"===i&&P&&"--\x3e"===k.substring(j-1,j+2))return P=!1,j+=2,["--\x3e","TK_COMMENT"];if("."===i)return[i,"TK_DOT"];if(Y(i,L)){for(;j<M&&Y(i+k.charAt(j),L)&&(i+=k.charAt(j),!(M<=(j+=1))););return","===i?[i,"TK_COMMA"]:"="===i?[i,"TK_EQUALS"]:[i,"TK_OPERATOR"]}return[i,"TK_UNKNOWN"]}this.tokenize=function(){var t,e,n;M=k.length,j=0,P=!1,B=[];for(var i=null,r=[],s=[];!e||"TK_EOF"!==e.type;){for(n=a(),t=new J(n[1],n[0],I,V);"TK_COMMENT"===t.type||"TK_BLOCK_COMMENT"===t.type||"TK_UNKNOWN"===t.type;)"TK_BLOCK_COMMENT"===t.type&&(t.directives=n[2]),s.push(t),n=a(),t=new J(n[1],n[0],I,V);s.length&&(t.comments_before=s,s=[]),"TK_START_BLOCK"===t.type||"TK_START_EXPR"===t.type?(t.parent=e,r.push(i),i=t):("TK_END_BLOCK"===t.type||"TK_END_EXPR"===t.type)&&i&&("]"===t.text&&"["===i.text||")"===t.text&&"("===i.text||"}"===t.text&&"{"===i.text)&&(t.parent=i.parent,i=r.pop()),B.push(t),e=t}return B}}return{run:function N(t,e){function a(t){return t.replace(/\s+$/g,"")}var n,i,r,T,s,_,E,o,c,g,x,w,l,h;for((e=e||{}).wrap_line_length!==undefined&&0!==parseInt(e.wrap_line_length,10)||e.max_char===undefined||0===parseInt(e.max_char,10)||(e.wrap_line_length=e.max_char),i=e.indent_inner_html!==undefined&&e.indent_inner_html,r=e.indent_size===undefined?4:parseInt(e.indent_size,10),T=e.indent_char===undefined?" ":e.indent_char,_=e.brace_style===undefined?"collapse":e.brace_style,s=0===parseInt(e.wrap_line_length,10)?32786:parseInt(e.wrap_line_length||250,10),E=e.unformatted||["a","span","img","bdo","em","strong","dfn","code","samp","kbd","const","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","address","pre"],o=e.preserve_newlines===undefined||e.preserve_newlines,c=o?isNaN(parseInt(e.max_preserve_newlines,10))?32786:parseInt(e.max_preserve_newlines,10):0,g=e.indent_handlebars!==undefined&&e.indent_handlebars,x=e.wrap_attributes===undefined?"auto":e.wrap_attributes,w=e.wrap_attributes_indent_size===undefined?r:parseInt(e.wrap_attributes_indent_size,10)||r,l=e.end_with_newline!==undefined&&e.end_with_newline,h=Array.isArray(e.extra_liners)?e.extra_liners.concat():"string"==typeof e.extra_liners?e.extra_liners.split(","):"head,body,/html".split(","),e.indent_with_tabs&&(T="\t",r=1),(n=new function k(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.newlines=0,this.indent_content=i,this.Utils={whitespace:"\n\r\t ".split(""),single_token:"br,input,link,meta,source,!doctype,basefont,base,area,hr,wbr,param,img,isindex,embed".split(","),extra_liners:h,in_array:function(t,e){for(var n=0;n<e.length;n++)if(t===e[n])return!0;return!1}},this.is_whitespace=function(t){for(;0<t.length;t++)if(!this.Utils.in_array(t.charAt(0),this.Utils.whitespace))return!1;return!0},this.traverse_whitespace=function(){var t="";if(t=this.input.charAt(this.pos),this.Utils.in_array(t,this.Utils.whitespace)){for(this.newlines=0;this.Utils.in_array(t,this.Utils.whitespace);)o&&"\n"===t&&this.newlines<=c&&(this.newlines+=1),this.pos++,t=this.input.charAt(this.pos);return!0}return!1},this.space_or_wrap=function(t){this.line_char_count>=this.wrap_line_length?(this.print_newline(!1,t),this.print_indentation(t)):(this.line_char_count++,t.push(" "))},this.get_content=function(){for(var t="",e=[];"<"!=this.input.charAt(this.pos);){if(this.pos>=this.input.length)return e.length?e.join(""):["","TK_EOF"];if(this.traverse_whitespace())this.space_or_wrap(e);else{if(g){var n=this.input.substr(this.pos,3);if("{{#"===n||"{{/"===n)break;if("{{!"===n)return[this.get_tag(),"TK_TAG_HANDLEBARS_COMMENT"];if("{{"===this.input.substr(this.pos,2)&&"{{else}}"===this.get_tag(!0))break}t=this.input.charAt(this.pos),this.pos++,this.line_char_count++,e.push(t)}}return e.length?e.join(""):""},this.get_contents_to=function(t){if(this.pos===this.input.length)return["","TK_EOF"];var e="",n=new RegExp("</".concat(t,"\\s*>"),"igm");n.lastIndex=this.pos;var i=n.exec(this.input),r=i?i.index:this.input.length;return this.pos<r&&(e=this.input.substring(this.pos,r),this.pos=r),e},this.record_tag=function(t){this.tags["".concat(t,"count")]?this.tags["".concat(t,"count")]++:this.tags["".concat(t,"count")]=1,this.tags[t+this.tags["".concat(t,"count")]]=this.indent_level,this.tags[t+this.tags["".concat(t,"count")]+"parent"]=this.tags.parent,this.tags.parent=t+this.tags["".concat(t,"count")]},this.retrieve_tag=function(t){if(this.tags["".concat(t,"count")]){for(var e=this.tags.parent;e&&t+this.tags["".concat(t,"count")]!==e;)e=this.tags["".concat(e,"parent")];e&&(this.indent_level=this.tags[t+this.tags["".concat(t,"count")]],this.tags.parent=this.tags[e+"parent"]),delete this.tags[t+this.tags["".concat(t,"count")]+"parent"],delete this.tags[t+this.tags["".concat(t,"count")]],1===this.tags["".concat(t,"count")]?delete this.tags["".concat(t,"count")]:this.tags["".concat(t,"count")]--}},this.indent_to_tag=function(t){if(this.tags["".concat(t,"count")]){for(var e=this.tags.parent;e&&t+this.tags["".concat(t,"count")]!==e;)e=this.tags["".concat(e,"parent")];e&&(this.indent_level=this.tags[t+this.tags["".concat(t,"count")]])}},this.get_tag=function(t){var e,n,i="",r=[],s="",a=!1,_=!0,o=this.pos,c=this.line_char_count;t=t!==undefined&&t;do{if(this.pos>=this.input.length)return t&&(this.pos=o,this.line_char_count=c),r.length?r.join(""):["","TK_EOF"];if(i=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(i,this.Utils.whitespace))a=!0;else{if("'"!==i&&'"'!==i||(i+=this.get_unformatted(i),a=!0),"="===i&&(a=!1),r.length&&"="!=r[r.length-1]&&">"!=i&&a){if(this.space_or_wrap(r),a=!1,!_&&"force"===x&&"/"!=i){this.print_newline(!0,r),this.print_indentation(r);for(var l=0;l<w;l++)r.push(T)}for(var h=0;h<r.length;h++)if(" "===r[h]){_=!1;break}}if(g&&"<"===n&&i+this.input.charAt(this.pos)==="{{"&&(i+=this.get_unformatted("}}"),r.length&&" "!=r[r.length-1]&&"<"!=r[r.length-1]&&(i=" ".concat(i)),a=!0),"<"!==i||n||(e=this.pos-1,n="<"),g&&!n&&2<=r.length&&"{"===r[r.length-1]&&"{"===r[r.length-2]&&(e="#"===i||"/"===i||"!"===i?this.pos-3:this.pos-2,n="{"),this.line_char_count++,r.push(i),r[1]&&("!"===r[1]||"?"===r[1]||"%"===r[1])){r=[this.get_comment(e)];break}if(g&&r[1]&&"{"===r[1]&&r[2]&&"!"===r[2]){r=[this.get_comment(e)];break}if(g&&"{"===n&&2<r.length&&"}"===r[r.length-2]&&"}"===r[r.length-1])break}}while(">"!=i);var u,p,d=r.join("");u=-1!=d.indexOf(" ")?d.indexOf(" "):"{"===d[0]?d.indexOf("}"):d.indexOf(">"),p="<"!==d[0]&&g?"#"===d[2]?3:2:1;var f=d.substring(p,u).toLowerCase();return"/"===d.charAt(d.length-2)||this.Utils.in_array(f,this.Utils.single_token)?t||(this.tag_type="SINGLE"):g&&"{"===d[0]&&"else"===f?t||(this.indent_to_tag("if"),this.tag_type="HANDLEBARS_ELSE",this.indent_content=!0,this.traverse_whitespace()):this.is_unformatted(f,E)?(s=this.get_unformatted("</".concat(f,">"),d),r.push(s),this.pos,this.tag_type="SINGLE"):"script"===f&&(-1===d.search("type")||-1<d.search("type")&&-1<d.search(/\b(text|application)\/(x-)?(javascript|ecmascript|jscript|livescript)/))?t||(this.record_tag(f),this.tag_type="SCRIPT"):"style"===f&&(-1===d.search("type")||-1<d.search("type")&&-1<d.search("text/css"))?t||(this.record_tag(f),this.tag_type="STYLE"):"!"===f.charAt(0)?t||(this.tag_type="SINGLE",this.traverse_whitespace()):t||("/"===f.charAt(0)?(this.retrieve_tag(f.substring(1)),this.tag_type="END"):(this.record_tag(f),"html"!=f.toLowerCase()&&(this.indent_content=!0),this.tag_type="START"),this.traverse_whitespace()&&this.space_or_wrap(r),this.Utils.in_array(f,this.Utils.extra_liners)&&(this.print_newline(!1,this.output),this.output.length&&"\n"!=this.output[this.output.length-2]&&this.print_newline(!0,this.output))),t&&(this.pos=o,this.line_char_count=c),r.join("")},this.get_comment=function(t){var e="",n=">",i=!1;this.pos=t;var r=this.input.charAt(this.pos);for(this.pos++;this.pos<=this.input.length&&((e+=r)[e.length-1]!==n[n.length-1]||-1==e.indexOf(n));)!i&&e.length<10&&(0===e.indexOf("<![if")?(n="<![endif]>",i=!0):0===e.indexOf("<![cdata[")?(n="]]>",i=!0):0===e.indexOf("<![")?(n="]>",i=!0):0===e.indexOf("\x3c!--")?(n="--\x3e",i=!0):0===e.indexOf("{{!")?(n="}}",i=!0):0===e.indexOf("<?")?(n="?>",i=!0):0===e.indexOf("<%")&&(n="%>",i=!0)),r=this.input.charAt(this.pos),this.pos++;return e},this.get_unformatted=function(t,e){if(e&&-1!=e.toLowerCase().indexOf(t))return"";var n="",i="",r=0,s=!0;do{if(this.pos>=this.input.length)return i;if(n=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(n,this.Utils.whitespace)){if(!s){this.line_char_count--;continue}if("\n"===n||"\r"===n){i+="\n",this.line_char_count=0;continue}}i+=n,this.line_char_count++,s=!0,g&&"{"===n&&i.length&&"{"===i[i.length-2]&&(r=(i+=this.get_unformatted("}}")).length)}while(-1===i.toLowerCase().indexOf(t,r));return i},this.get_token=function(){var t;if("TK_TAG_SCRIPT"!==this.last_token&&"TK_TAG_STYLE"!==this.last_token)return"CONTENT"===this.current_mode?"string"!=typeof(t=this.get_content())?t:[t,"TK_CONTENT"]:"TAG"===this.current_mode?"string"!=typeof(t=this.get_tag())?t:[t,"TK_TAG_".concat(this.tag_type)]:void 0;var e=this.last_token.substr(7);return"string"!=typeof(t=this.get_contents_to(e))?t:[t,"TK_".concat(e)]},this.get_full_indent=function(t){return(t=this.indent_level+t||0)<1?"":new Array(t+1).join(this.indent_string)},this.is_unformatted=function(t,e){if(!this.Utils.in_array(t,e))return!1;if("a"!=t.toLowerCase()||!this.Utils.in_array("a",e))return!0;var n=(this.get_tag(!0)||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!(n&&!this.Utils.in_array(n,e))},this.printer=function(t,e,n,i,r){this.input=t||"",this.output=[],this.indent_character=e,this.indent_string="",this.indent_size=n,this.brace_style=r,this.indent_level=0,this.wrap_line_length=i;for(var s=this.line_char_count=0;s<this.indent_size;s++)this.indent_string+=this.indent_character;this.print_newline=function(t,e){this.line_char_count=0,e&&e.length&&(t||"\n"!=e[e.length-1])&&("\n"!=e[e.length-1]&&(e[e.length-1]=a(e[e.length-1])),e.push("\n"))},this.print_indentation=function(t){for(var e=0;e<this.indent_level;e++)t.push(this.indent_string),this.line_char_count+=this.indent_string.length},this.print_token=function(t){this.is_whitespace(t)&&!this.output.length||((t||""!==t)&&this.output.length&&"\n"===this.output[this.output.length-1]&&(this.print_indentation(this.output),t=function e(t){return t.replace(/^\s+/g,"")}(t)),this.print_token_raw(t))},this.print_token_raw=function(t){0<this.newlines&&(t=a(t)),t&&""!==t&&(1<t.length&&"\n"===t[t.length-1]?(this.output.push(t.slice(0,-1)),this.print_newline(!1,this.output)):this.output.push(t));for(var e=0;e<this.newlines;e++)this.print_newline(0<e,this.output);this.newlines=0},this.indent=function(){this.indent_level++},this.unindent=function(){0<this.indent_level&&this.indent_level--}},this}).printer(t,T,r,s,_);;){var u=n.get_token();if(n.token_text=u[0],n.token_type=u[1],"TK_EOF"===n.token_type)break;switch(n.token_type){case"TK_TAG_START":n.print_newline(!1,n.output),n.print_token(n.token_text),n.indent_content&&(n.indent(),n.indent_content=!1),n.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===n.last_token&&""===n.last_text){var p=n.token_text.match(/\w+/)[0],d=null;n.output.length&&(d=n.output[n.output.length-1].match(/(?:<|{{#)\/?\s*(\w+)/)),(null===d||d[1]!=p&&!n.Utils.in_array(d[1],E))&&n.print_newline(!1,n.output)}n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var f=n.token_text.match(/^\s*<([a-z-]+)/i);f&&n.Utils.in_array(f[1],E)||n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_ELSE":n.print_token(n.token_text),n.indent_content&&(n.indent(),n.indent_content=!1),n.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_COMMENT":case"TK_CONTENT":n.print_token(n.token_text),n.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==n.token_text){n.print_newline(!1,n.output);var K=n.token_text,R=void 0,m=1;"TK_SCRIPT"===n.token_type?R=O:"TK_STYLE"===n.token_type&&(R=y),"keep"===e.indent_scripts?m=0:"separate"===e.indent_scripts&&(m=-n.indent_level);var b=n.get_full_indent(m);if(R)K=R(K.replace(/^\s*/,b),e);else{var v=K.match(/^\s*/)[0].match(/[^\n\r]*$/)[0].split(n.indent_string).length-1,S=n.get_full_indent(m-v);K=K.replace(/^\s*/,b).replace(/\r\n|\r|\n/g,"\n"+S).replace(/\s+$/,"")}K&&(n.print_token_raw(K),n.print_newline(!0,n.output))}n.current_mode="TAG";break;default:""!==n.token_text&&n.print_token(n.token_text)}n.last_token=n.token_type,n.last_text=n.token_text}var A=n.output.join("").replace(/[\r\n\t ]+$/,"");return l&&(A+="\n"),A}}}});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
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,{codeMirror:window.CodeMirror,codeMirrorOptions:{lineNumbers:!0,tabMode:"indent",indentWithTabs:!0,lineWrapping:!0,mode:"text/html",tabSize:2},codeBeautifierOptions:{end_with_newline:!0,indent_inner_html:!0,extra_liners:["p","h1","h2","h3","h4","h5","h6","blockquote","pre","ul","ol","table","dl"],brace_style:"expand",indent_char:"\t",indent_size:1,wrap_line_length:0},codeViewKeepActiveButtons:["fullscreen"]}),e.PLUGINS.codeView=function(c){var d,f,h=c.$,p=function p(){return c.$box.hasClass("fr-code-view")};function u(){return f?f.getValue():d.val()}function g(){p()&&(f&&f.setSize(null,c.opts.height?c.opts.height:"auto"),c.opts.heightMin||c.opts.height?(c.$box.find(".CodeMirror-scroll, .CodeMirror-gutters").css("min-height",c.opts.heightMin||c.opts.height),d.css("height",c.opts.height)):c.$box.find(".CodeMirror-scroll, .CodeMirror-gutters").css("min-height",""))}var m,b=!1;function v(){p()&&c.events.trigger("blur")}function w(){p()&&b&&c.events.trigger("focus")}function o(e){d||(!function l(){d=h('<textarea class="fr-code" tabIndex="-1">'),c.$wp.append(d),d.attr("dir",c.opts.direction),c.$box.hasClass("fr-basic")||(m=h('<a data-cmd="html" title="Code View" class="fr-command fr-btn html-switch'.concat(c.helpers.isMobile()?"":" fr-desktop",'" role="button" tabIndex="-1"><i class="fa fa-code"></i></button>')),c.$box.append(m),c.events.bindClick(c.$box,"a.html-switch",function(){c.events.trigger("commands.before",["html"]),M(!1),c.events.trigger("commands.after",["html"])}));var e=function e(){return!p()};c.events.on("buttons.refresh",e),c.events.on("copy",e,!0),c.events.on("cut",e,!0),c.events.on("paste",e,!0),c.events.on("destroy",x,!0),c.events.on("html.set",function(){p()&&M(!0)}),c.events.on("codeView.update",g),c.events.on("codeView.toggle",function(){c.$box.hasClass("fr-code-view")&&M()}),c.events.on("form.submit",function(){p()&&(c.html.set(u()),c.events.trigger("contentChanged",[],!0))},!0)}(),!f&&c.opts.codeMirror?((f=c.opts.codeMirror.fromTextArea(d.get(0),c.opts.codeMirrorOptions)).on("blur",v),f.on("focus",w)):(c.events.$on(d,"keydown keyup change input",function(){c.opts.height?this.removeAttribute("rows"):(this.rows=1,0===this.value.length?this.style.height="auto":this.style.height="".concat(this.scrollHeight,"px"))}),c.events.$on(d,"blur",v),c.events.$on(d,"focus",w))),c.undo.saveStep(),c.html.cleanEmptyTags(),c.html.cleanWhiteTags(!0),c.core.hasFocus()&&(c.core.isEmpty()||(c.selection.save(),c.$el.find('.fr-marker[data-type="true"]').first().replaceWith('<span class="fr-tmp fr-sm">F</span>'),c.$el.find('.fr-marker[data-type="false"]').last().replaceWith('<span class="fr-tmp fr-em">F</span>')));var t=c.html.get(!1,!0);c.$el.find("span.fr-tmp").remove(),c.$box.toggleClass("fr-code-view",!0);var r,o,n=!1;if(c.core.hasFocus()&&(n=!0,c.events.disableBlur(),c.$el.blur()),t=(t=t.replace(/<span class="fr-tmp fr-sm">F<\/span>/,"FROALA-SM")).replace(/<span class="fr-tmp fr-em">F<\/span>/,"FROALA-EM"),c.codeBeautifier&&!t.includes("fr-embedly")&&(t=c.codeBeautifier.run(t,c.opts.codeBeautifierOptions)),f){r=t.indexOf("FROALA-SM"),(o=t.indexOf("FROALA-EM"))<r?r=o:o-=9;var s=(t=t.replace(/FROALA-SM/g,"").replace(/FROALA-EM/g,"")).substring(0,r).length-t.substring(0,r).replace(/\n/g,"").length,i=t.substring(0,o).length-t.substring(0,o).replace(/\n/g,"").length;r=t.substring(0,r).length-t.substring(0,t.substring(0,r).lastIndexOf("\n")+1).length,o=t.substring(0,o).length-t.substring(0,t.substring(0,o).lastIndexOf("\n")+1).length,f.setSize(null,c.opts.height?c.opts.height:"auto"),c.opts.heightMin&&c.$box.find(".CodeMirror-scroll").css("min-height",c.opts.heightMin),f.setValue(t),b=!n,f.focus(),b=!0,f.setSelection({line:s,ch:r},{line:i,ch:o}),f.refresh(),f.clearHistory()}else{r=t.indexOf("FROALA-SM"),o=t.indexOf("FROALA-EM")-9,c.opts.heightMin&&d.css("min-height",c.opts.heightMin),c.opts.height&&d.css("height",c.opts.height),c.opts.heightMax&&d.css("max-height",c.opts.height||c.opts.heightMax),d.val(t.replace(/FROALA-SM/g,"").replace(/FROALA-EM/g,"")).trigger("change");var a=h(c.o_doc).scrollTop();b=!n,d.focus(),b=!0,d.get(0).setSelectionRange(r,o),h(c.o_doc).scrollTop(a)}c.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command, .fr-btn-grp > .fr-btn-wrap > .fr-command, .fr-more-toolbar > .fr-btn-wrap > .fr-command").not(e).filter(function(){return c.opts.codeViewKeepActiveButtons.indexOf(h(this).data("cmd"))<0}).addClass("fr-disabled").attr("aria-disabled",!0),e.addClass("fr-active").attr("aria-pressed",!0),!c.helpers.isMobile()&&c.opts.toolbarInline&&c.toolbar.hide()}function M(e){void 0===e&&(e=!p());var t=c.$tb.find('.fr-command[data-cmd="html"]');e?(c.popups.hideAll(),o(t)):(c.$box.toggleClass("fr-code-view",!1),function r(e){var t=u();c.html.set(t),c.$el.blur(),c.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command, .fr-btn-grp > .fr-btn-wrap > .fr-command, .fr-more-toolbar > .fr-btn-wrap > .fr-command").not(e).removeClass("fr-disabled").attr("aria-disabled",!1),e.removeClass("fr-active").attr("aria-pressed",!1),c.selection.setAtStart(c.el),c.selection.restore(),c.placeholder.refresh(),c.undo.saveStep()}(t),c.events.trigger("codeView.update"))}function x(){p()&&M(!1),f&&f.toTextArea(),d.val("").removeData().remove(),d=null,m&&(m.remove(),m=null)}return{_init:function e(){if(c.events.on("focus",function(){c.opts.toolbarContainer&&function t(){var e=c.$tb.find('.fr-command[data-cmd="html"]');p()?(c.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").not(e).filter(function(){return c.opts.codeViewKeepActiveButtons.indexOf(h(this).data("cmd"))<0}).addClass("fr-disabled").attr("aria-disabled",!1),e.addClass("fr-active").attr("aria-pressed",!1)):(c.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").not(e).removeClass("fr-disabled").attr("aria-disabled",!1),e.removeClass("fr-active").attr("aria-pressed",!1))}()}),!c.$wp)return!1},toggle:M,isActive:p,get:u}},e.RegisterCommand("html",{title:"Code View",undo:!1,focus:!1,forcedRefresh:!0,toggle:!0,callback:function(){this.codeView.toggle()},plugin:"codeView"}),e.DefineIcon("html",{NAME:"code",SVG_KEY:"codeView"})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
7
  !function(o,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(o.FroalaEditor)}(this,function(k){"use strict";k=k&&k.hasOwnProperty("default")?k["default"]:k,Object.assign(k.POPUP_TEMPLATES,{"textColor.picker":"[_BUTTONS_][_TEXT_COLORS_][_CUSTOM_COLOR_]","backgroundColor.picker":"[_BUTTONS_][_BACKGROUND_COLORS_][_CUSTOM_COLOR_]"}),Object.assign(k.DEFAULTS,{colorsText:["#61BD6D","#1ABC9C","#54ACD2","#2C82C9","#9365B8","#475577","#CCCCCC","#41A85F","#00A885","#3D8EB9","#2969B0","#553982","#28324E","#000000","#F7DA64","#FBA026","#EB6B56","#E25041","#A38F84","#EFEFEF","#FFFFFF","#FAC51C","#F37934","#D14841","#B8312F","#7C706B","#D1D5D8","REMOVE"],colorsBackground:["#61BD6D","#1ABC9C","#54ACD2","#2C82C9","#9365B8","#475577","#CCCCCC","#41A85F","#00A885","#3D8EB9","#2969B0","#553982","#28324E","#000000","#F7DA64","#FBA026","#EB6B56","#E25041","#A38F84","#EFEFEF","#FFFFFF","#FAC51C","#F37934","#D14841","#B8312F","#7C706B","#D1D5D8","REMOVE"],colorsStep:7,colorsHEXInput:!0,colorsButtons:["colorsBack","|","-"]}),k.PLUGINS.colors=function(g){var E=g.$,l='<div class="fr-color-hex-layer fr-active fr-layer" id="fr-color-hex-layer- \n '.concat(g.id,'"><div class="fr-input-line"><input maxlength="7" id="[ID]"\n type="text" placeholder="').concat(g.language.translate("HEX Color"),'" \n tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button \n type="button" class="fr-command fr-submit" data-cmd="[COMMAND]" tabIndex="2" role="button">\n ').concat(g.language.translate("OK"),"</button></div></div>");function s(o){for(var t="text"===o?g.opts.colorsText:g.opts.colorsBackground,r='<div class="fr-color-set fr-'.concat(o,'-color fr-selected-set">'),e=0;e<t.length;e++)0!==e&&e%g.opts.colorsStep==0&&(r+="<br>"),"REMOVE"!==t[e]?r+='<span class="fr-command fr-select-color" style="background:'.concat(t[e],';" \n tabIndex="-1" aria-selected="false" role="button" data-cmd="apply').concat(o,'Color" \n data-param1="').concat(t[e],'"><span class="fr-sr-only"> ').concat(g.language.translate("Color")).concat(t[e]," \n &nbsp;&nbsp;&nbsp;</span></span>"):r+='<span class="fr-command fr-select-color" data-cmd="apply'.concat(o,'Color"\n tabIndex="-1" role="button" data-param1="REMOVE" \n title="').concat(g.language.translate("Clear Formatting"),'">').concat(g.icon.create("remove"),' \n <span class="fr-sr-only"> ').concat(g.language.translate("Clear Formatting")," </span></span>");return"".concat(r,"</div>")}function i(o){var t,r=g.popups.get("".concat(o,"Color.picker")),e=E(g.selection.element());t="background"===o?"background-color":"color";var c=r.find(".fr-".concat(o,"-color .fr-select-color"));for(c.find(".fr-selected-color").remove(),c.removeClass("fr-active-item"),c.not('[data-param1="REMOVE"]').attr("aria-selected",!1);e.get(0)!==g.el;){if("transparent"!==e.css(t)&&"rgba(0, 0, 0, 0)"!==e.css(t)){var a=r.find(".fr-".concat(o,'-color .fr-select-color[data-param1="').concat(g.helpers.RGBToHex(e.css(t)),'"]'));a.append('<span class="fr-selected-color" aria-hidden="true">\uf00c</span>'),a.addClass("fr-active-item").attr("aria-selected",!0);break}e=e.parent()}!function n(o){var t=g.popups.get("".concat(o,"Color.picker")),r=t.find(".fr-".concat(o,"-color .fr-active-item")).attr("data-param1"),e=t.find(".fr-color-hex-layer input");r||(r="");e.length&&E(e.val(r).input).trigger("change")}(o)}function e(o){"REMOVE"!==o?g.format.applyStyle("background-color",g.helpers.HEXtoRGB(o)):g.format.removeStyle("background-color"),g.popups.hide("backgroundColor.picker")}function c(o){"REMOVE"!==o?g.format.applyStyle("color",g.helpers.HEXtoRGB(o)):g.format.removeStyle("color"),g.popups.hide("textColor.picker")}return{showColorsPopup:function p(o){var t=g.$tb.find('.fr-command[data-cmd="'.concat(o,'"]')),r=g.popups.get("".concat(o,".picker"));if(r||(r=function n(o){var t="";g.opts.toolbarInline&&0<g.opts.colorsButtons.length&&(t+='<div class="fr-buttons fr-colors-buttons fr-tabs">\n '.concat(g.button.buildList(g.opts.colorsButtons),"\n </div>"));var r,e="";r="textColor"===o?(g.opts.colorsHEXInput&&(e=l.replace(/\[ID\]/g,"fr-color-hex-layer-text-".concat(g.id)).replace(/\[COMMAND\]/g,"customTextColor")),{buttons:t,text_colors:s("text"),custom_color:e}):(g.opts.colorsHEXInput&&(e=l.replace(/\[ID\]/g,"fr-color-hex-layer-background-".concat(g.id)).replace(/\[COMMAND\]/g,"customBackgroundColor")),{buttons:t,background_colors:s("background"),custom_color:e});var c=g.popups.create("".concat(o,".picker"),r);return function a(C,b){g.events.on("popup.tab",function(o){var t=E(o.currentTarget);if(!g.popups.isVisible(b)||!t.is("span"))return!0;var r=o.which,e=!0;if(k.KEYCODE.TAB===r){var c=C.find(".fr-buttons");e=!g.accessibility.focusToolbar(c,!!o.shiftKey)}else if(k.KEYCODE.ARROW_UP===r||k.KEYCODE.ARROW_DOWN===r||k.KEYCODE.ARROW_LEFT===r||k.KEYCODE.ARROW_RIGHT===r){if(t.is("span.fr-select-color")){var a=t.parent().find("span.fr-select-color"),n=a.index(t),l=g.opts.colorsStep,s=Math.floor(a.length/l),i=n%l,p=Math.floor(n/l),u=p*l+i,d=s*l;k.KEYCODE.ARROW_UP===r?u=((u-l)%d+d)%d:k.KEYCODE.ARROW_DOWN===r?u=(u+l)%d:k.KEYCODE.ARROW_LEFT===r?u=((u-1)%d+d)%d:k.KEYCODE.ARROW_RIGHT===r&&(u=(u+1)%d);var f=E(a.get(u));g.events.disableBlur(),f.focus(),e=!1}}else k.KEYCODE.ENTER===r&&(g.button.exec(t),e=!1);return!1===e&&(o.preventDefault(),o.stopPropagation()),e},!0)}(c,"".concat(o,".picker")),c}(o)),!r.hasClass("fr-active"))if(g.popups.setContainer("".concat(o,".picker"),g.$tb),i("textColor"===o?"text":"background"),t.isVisible()){var e=g.button.getPosition(t),c=e.left,a=e.top;g.popups.show("".concat(o,".picker"),c,a,t.outerHeight())}else g.position.forSelection(r),g.popups.show("".concat(o,".picker"))},background:e,customColor:function a(o){var t=g.popups.get("".concat(o,"Color.picker")).find(".fr-color-hex-layer input");if(t.length){var r=t.val();"background"===o?e(r):c(r)}},text:c,back:function o(){g.popups.hide("textColor.picker"),g.popups.hide("backgroundColor.picker"),g.toolbar.showInline()}}},k.DefineIcon("textColor",{NAME:"tint",SVG_KEY:"textColor"}),k.RegisterCommand("textColor",{title:"Text Color",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("textColor.picker")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("textColor.picker")):this.colors.showColorsPopup("textColor")}}),k.RegisterCommand("applytextColor",{undo:!0,callback:function(o,t){this.colors.text(t)}}),k.RegisterCommand("customTextColor",{title:"OK",undo:!0,callback:function(){this.colors.customColor("text")}}),k.DefineIcon("backgroundColor",{NAME:"paint-brush",SVG_KEY:"backgroundColor"}),k.RegisterCommand("backgroundColor",{title:"Background Color",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("backgroundColor.picker")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("backgroundColor.picker")):this.colors.showColorsPopup("backgroundColor")}}),k.RegisterCommand("applybackgroundColor",{undo:!0,callback:function(o,t){this.colors.background(t)}}),k.RegisterCommand("customBackgroundColor",{title:"OK",undo:!0,callback:function(){this.colors.customColor("background")}}),k.DefineIcon("colorsBack",{NAME:"arrow-left",SVG_KEY:"back"}),k.RegisterCommand("colorsBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.colors.back()}}),k.DefineIcon("remove",{NAME:"eraser",SVG_KEY:"remove"})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
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(t){"use strict";(t=t&&t.hasOwnProperty("default")?t["default"]:t).PLUGINS.cryptoJSPlugin=function(t){var e,l,r,i,n,o,s,f,c,a,h,u,d,p,_,y,v,g,B,w,k,S,m,x,b,H,z,A,C,E,D,R,M,P,F,W,O,I,U,K,X,L,j,N,q,T,Z,G,J,V,$,Q,Y,tt,et,rt,it,nt,ot,st,ct,at,ht,lt,ft,ut,dt,pt,_t,vt,yt=yt||function(l,t){var e;if("undefined"!=typeof window&&window.crypto&&(e=window.crypto),!e&&"undefined"!=typeof window&&window.msCrypto&&(e=window.msCrypto),!e&&"undefined"!=typeof global&&global.crypto&&(e=global.crypto),!e&&"function"==typeof require)try{e=require("crypto")}catch(_){}var i=function i(){if(e){if("function"==typeof e.getRandomValues)try{return e.getRandomValues(new Uint32Array(1))[0]}catch(_){}if("function"==typeof e.randomBytes)try{return e.randomBytes(4).readInt32LE()}catch(_){}}throw new Error("Native crypto module could not be used to get secure random number.")},r=Object.create||function(){function r(){}return function(t){var e;return r.prototype=t,e=new r,r.prototype=null,e}}(),n={},o=n.lib={},s=o.Base={extend:function(t){var e=r(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),(e.init.prototype=e).$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},f=o.WordArray=s.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||a).stringify(this)},concat:function(t){var e=this.words,r=t.words,i=this.sigBytes,n=t.sigBytes;if(this.clamp(),i%4)for(var o=0;o<n;o++){var s=r[o>>>2]>>>24-o%4*8&255;e[i+o>>>2]|=s<<24-(i+o)%4*8}else for(o=0;o<n;o+=4)e[i+o>>>2]=r[o>>>2];return this.sigBytes+=n,this},clamp:function(){var t=this.words,e=this.sigBytes;t[e>>>2]&=4294967295<<32-e%4*8,t.length=l.ceil(e/4)},clone:function t(){var t=s.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],r=0;r<t;r+=4)e.push(i());return new f.init(e,t)}}),c=n.enc={},a=c.Hex={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n++){var o=e[n>>>2]>>>24-n%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i<e;i+=2)r[i>>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new f.init(r,e/2)}},h=c.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n++){var o=e[n>>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i<e;i++)r[i>>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new f.init(r,e)}},u=c.Utf8={stringify:function(t){try{return decodeURIComponent(escape(h.stringify(t)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(t){return h.parse(unescape(encodeURIComponent(t)))}},d=o.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=u.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(t){var e,r=this._data,i=r.words,n=r.sigBytes,o=this.blockSize,s=n/(4*o),c=(s=t?l.ceil(s):l.max((0|s)-this._minBufferSize,0))*o,a=l.min(4*c,n);if(c){for(var h=0;h<c;h+=o)this._doProcessBlock(i,h);e=i.splice(0,c),r.sigBytes-=a}return new f.init(e,a)},clone:function t(){var t=s.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),p=(o.Hasher=d.extend({cfg:s.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(r){return function(t,e){return new r.init(e).finalize(t)}},_createHmacHelper:function(r){return function(t,e){return new p.HMAC.init(r,e).finalize(t)}}}),n.algo={});return n}(Math);return l=(e=yt).lib.WordArray,e.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,i=this._map;t.clamp();for(var n=[],o=0;o<r;o+=3)for(var s=(e[o>>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,c=0;c<4&&o+.75*c<r;c++)n.push(i.charAt(s>>>6*(3-c)&63));var a=i.charAt(64);if(a)for(;n.length%4;)n.push(a);return n.join("")},parse:function(t){var e=t.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var n=0;n<r.length;n++)i[r.charCodeAt(n)]=n}var o=r.charAt(64);if(o){var s=t.indexOf(o);-1!==s&&(e=s)}return function h(t,e,r){for(var i=[],n=0,o=0;o<e;o++)if(o%4){var s=r[t.charCodeAt(o-1)]<<o%4*2,c=r[t.charCodeAt(o)]>>>6-o%4*2,a=s|c;i[n>>>2]|=a<<24-n%4*8,n++}return l.create(i,n)}(t,e,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(l){var t=yt,e=t.lib,r=e.WordArray,i=e.Hasher,n=t.algo,H=[];!function(){for(var t=0;t<64;t++)H[t]=4294967296*l.abs(l.sin(t+1))|0}();var o=n.MD5=i.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r,n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o=this._hash.words,s=t[e+0],c=t[e+1],a=t[e+2],h=t[e+3],l=t[e+4],f=t[e+5],u=t[e+6],d=t[e+7],p=t[e+8],_=t[e+9],v=t[e+10],y=t[e+11],g=t[e+12],B=t[e+13],w=t[e+14],k=t[e+15],S=o[0],m=o[1],x=o[2],b=o[3];m=E(m=E(m=E(m=E(m=C(m=C(m=C(m=C(m=A(m=A(m=A(m=A(m=z(m=z(m=z(m=z(m,x=z(x,b=z(b,S=z(S,m,x,b,s,7,H[0]),m,x,c,12,H[1]),S,m,a,17,H[2]),b,S,h,22,H[3]),x=z(x,b=z(b,S=z(S,m,x,b,l,7,H[4]),m,x,f,12,H[5]),S,m,u,17,H[6]),b,S,d,22,H[7]),x=z(x,b=z(b,S=z(S,m,x,b,p,7,H[8]),m,x,_,12,H[9]),S,m,v,17,H[10]),b,S,y,22,H[11]),x=z(x,b=z(b,S=z(S,m,x,b,g,7,H[12]),m,x,B,12,H[13]),S,m,w,17,H[14]),b,S,k,22,H[15]),x=A(x,b=A(b,S=A(S,m,x,b,c,5,H[16]),m,x,u,9,H[17]),S,m,y,14,H[18]),b,S,s,20,H[19]),x=A(x,b=A(b,S=A(S,m,x,b,f,5,H[20]),m,x,v,9,H[21]),S,m,k,14,H[22]),b,S,l,20,H[23]),x=A(x,b=A(b,S=A(S,m,x,b,_,5,H[24]),m,x,w,9,H[25]),S,m,h,14,H[26]),b,S,p,20,H[27]),x=A(x,b=A(b,S=A(S,m,x,b,B,5,H[28]),m,x,a,9,H[29]),S,m,d,14,H[30]),b,S,g,20,H[31]),x=C(x,b=C(b,S=C(S,m,x,b,f,4,H[32]),m,x,p,11,H[33]),S,m,y,16,H[34]),b,S,w,23,H[35]),x=C(x,b=C(b,S=C(S,m,x,b,c,4,H[36]),m,x,l,11,H[37]),S,m,d,16,H[38]),b,S,v,23,H[39]),x=C(x,b=C(b,S=C(S,m,x,b,B,4,H[40]),m,x,s,11,H[41]),S,m,h,16,H[42]),b,S,u,23,H[43]),x=C(x,b=C(b,S=C(S,m,x,b,_,4,H[44]),m,x,g,11,H[45]),S,m,k,16,H[46]),b,S,a,23,H[47]),x=E(x,b=E(b,S=E(S,m,x,b,s,6,H[48]),m,x,d,10,H[49]),S,m,w,15,H[50]),b,S,f,21,H[51]),x=E(x,b=E(b,S=E(S,m,x,b,g,6,H[52]),m,x,h,10,H[53]),S,m,v,15,H[54]),b,S,c,21,H[55]),x=E(x,b=E(b,S=E(S,m,x,b,p,6,H[56]),m,x,k,10,H[57]),S,m,u,15,H[58]),b,S,B,21,H[59]),x=E(x,b=E(b,S=E(S,m,x,b,l,6,H[60]),m,x,y,10,H[61]),S,m,a,15,H[62]),b,S,_,21,H[63]),o[0]=o[0]+S|0,o[1]=o[1]+m|0,o[2]=o[2]+x|0,o[3]=o[3]+b|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;e[i>>>5]|=128<<24-i%32;var n=l.floor(r/4294967296),o=r;e[15+(i+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(e.length+1),this._process();for(var s=this._hash,c=s.words,a=0;a<4;a++){var h=c[a];c[a]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}return s},clone:function t(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});function z(t,e,r,i,n,o,s){var c=t+(e&r|~e&i)+n+s;return(c<<o|c>>>32-o)+e}function A(t,e,r,i,n,o,s){var c=t+(e&i|r&~i)+n+s;return(c<<o|c>>>32-o)+e}function C(t,e,r,i,n,o,s){var c=t+(e^r^i)+n+s;return(c<<o|c>>>32-o)+e}function E(t,e,r,i,n,o,s){var c=t+(r^(e|~i))+n+s;return(c<<o|c>>>32-o)+e}t.MD5=i._createHelper(o),t.HmacMD5=i._createHmacHelper(o)}(Math),i=(r=yt).lib,n=i.WordArray,o=i.Hasher,s=r.algo,f=[],c=s.SHA1=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],c=r[4],a=0;a<80;a++){if(a<16)f[a]=0|t[e+a];else{var h=f[a-3]^f[a-8]^f[a-14]^f[a-16];f[a]=h<<1|h>>>31}var l=(i<<5|i>>>27)+c+f[a];l+=a<20?1518500249+(n&o|~n&s):a<40?1859775393+(n^o^s):a<60?(n&o|n&s|o&s)-1894007588:(n^o^s)-899497514,c=s,s=o,o=n<<30|n>>>2,n=i,i=l}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(i+64>>>9<<4)]=Math.floor(r/4294967296),e[15+(i+64>>>9<<4)]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function t(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}}),r.SHA1=o._createHelper(c),r.HmacSHA1=o._createHmacHelper(c),function(n){var t=yt,e=t.lib,r=e.WordArray,i=e.Hasher,o=t.algo,s=[],B=[];!function(){function t(t){for(var e=n.sqrt(t),r=2;r<=e;r++)if(!(t%r))return!1;return!0}function e(t){return 4294967296*(t-(0|t))|0}for(var r=2,i=0;i<64;)t(r)&&(i<8&&(s[i]=e(n.pow(r,.5))),B[i]=e(n.pow(r,1/3)),i++),r++}();var w=[],c=o.SHA256=i.extend({_doReset:function(){this._hash=new r.init(s.slice(0))},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],c=r[4],a=r[5],h=r[6],l=r[7],f=0;f<64;f++){if(f<16)w[f]=0|t[e+f];else{var u=w[f-15],d=(u<<25|u>>>7)^(u<<14|u>>>18)^u>>>3,p=w[f-2],_=(p<<15|p>>>17)^(p<<13|p>>>19)^p>>>10;w[f]=d+w[f-7]+_+w[f-16]}var v=i&n^i&o^n&o,y=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),g=l+((c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25))+(c&a^~c&h)+B[f]+w[f];l=h,h=a,a=c,c=s+g|0,s=o,o=n,n=i,i=g+(y+v)|0}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0,r[5]=r[5]+a|0,r[6]=r[6]+h|0,r[7]=r[7]+l|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(i+64>>>9<<4)]=n.floor(r/4294967296),e[15+(i+64>>>9<<4)]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function t(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});t.SHA256=i._createHelper(c),t.HmacSHA256=i._createHmacHelper(c)}(Math),function(){var t=yt,n=t.lib.WordArray,e=t.enc;e.Utf16=e.Utf16BE={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n+=2){var o=e[n>>>2]>>>16-n%4*8&65535;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i<e;i++)r[i>>>1]|=t.charCodeAt(i)<<16-i%2*16;return n.create(r,2*e)}};function s(t){return t<<8&4278255360|t>>>8&16711935}e.Utf16LE={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n+=2){var o=s(e[n>>>2]>>>16-n%4*8&65535);i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i<e;i++)r[i>>>1]|=s(t.charCodeAt(i)<<16-i%2*16);return n.create(r,2*e)}}}(),function(){if("function"==typeof ArrayBuffer){var t=yt.lib.WordArray,n=t.init;(t.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var e=t.byteLength,r=[],i=0;i<e;i++)r[i>>>2]|=t[i]<<24-i%4*8;n.call(this,r,e)}else n.apply(this,arguments)}).prototype=t}}(),function(t){var e=yt,r=e.lib,i=r.WordArray,n=r.Hasher,o=e.algo,m=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),x=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),b=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),H=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),z=i.create([0,1518500249,1859775393,2400959708,2840853838]),A=i.create([1352829926,1548603684,1836072691,2053994217,0]),s=o.RIPEMD160=n.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r,n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o,s,c,a,h,l,f,u,d,p,_,v=this._hash.words,y=z.words,g=A.words,B=m.words,w=x.words,k=b.words,S=H.words;l=o=v[0],f=s=v[1],u=c=v[2],d=a=v[3],p=h=v[4];for(r=0;r<80;r+=1)_=o+t[e+B[r]]|0,_+=r<16?C(s,c,a)+y[0]:r<32?E(s,c,a)+y[1]:r<48?D(s,c,a)+y[2]:r<64?R(s,c,a)+y[3]:M(s,c,a)+y[4],_=(_=P(_|=0,k[r]))+h|0,o=h,h=a,a=P(c,10),c=s,s=_,_=l+t[e+w[r]]|0,_+=r<16?M(f,u,d)+g[0]:r<32?R(f,u,d)+g[1]:r<48?D(f,u,d)+g[2]:r<64?E(f,u,d)+g[3]:C(f,u,d)+g[4],_=(_=P(_|=0,S[r]))+p|0,l=p,p=d,d=P(u,10),u=f,f=_;_=v[1]+c+d|0,v[1]=v[2]+a+p|0,v[2]=v[3]+h+l|0,v[3]=v[4]+o+f|0,v[4]=v[0]+s+u|0,v[0]=_},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;e[i>>>5]|=128<<24-i%32,e[14+(i+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(e.length+1),this._process();for(var n=this._hash,o=n.words,s=0;s<5;s++){var c=o[s];o[s]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return n},clone:function t(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}});function C(t,e,r){return t^e^r}function E(t,e,r){return t&e|~t&r}function D(t,e,r){return(t|~e)^r}function R(t,e,r){return t&r|e&~r}function M(t,e,r){return t^(e|~r)}function P(t,e){return t<<e|t>>>32-e}e.RIPEMD160=n._createHelper(s),e.HmacRIPEMD160=n._createHmacHelper(s)}(Math),h=(a=yt).lib.Base,u=a.enc.Utf8,a.algo.HMAC=h.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=u.parse(e));var r=t.blockSize,i=4*r;e.sigBytes>i&&(e=t.finalize(e)),e.clamp();for(var n=this._oKey=e.clone(),o=this._iKey=e.clone(),s=n.words,c=o.words,a=0;a<r;a++)s[a]^=1549556828,c[a]^=909522486;n.sigBytes=o.sigBytes=i,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,r=e.finalize(t);return e.reset(),e.finalize(this._oKey.clone().concat(r))}}),p=(d=yt).lib,_=p.Base,y=p.WordArray,v=d.algo,g=v.SHA1,B=v.HMAC,w=v.PBKDF2=_.extend({cfg:_.extend({keySize:4,hasher:g,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var r=this.cfg,i=B.create(r.hasher,t),n=y.create(),o=y.create([1]),s=n.words,c=o.words,a=r.keySize,h=r.iterations;s.length<a;){var l=i.update(e).finalize(o);i.reset();for(var f=l.words,u=f.length,d=l,p=1;p<h;p++){d=i.finalize(d),i.reset();for(var _=d.words,v=0;v<u;v++)f[v]^=_[v]}n.concat(l),c[0]++}return n.sigBytes=4*a,n}}),d.PBKDF2=function(t,e,r){return w.create(r).compute(t,e)},S=(k=yt).lib,m=S.Base,x=S.WordArray,b=k.algo,H=b.MD5,z=b.EvpKDF=m.extend({cfg:m.extend({keySize:4,hasher:H,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var r,i=this.cfg,n=i.hasher.create(),o=x.create(),s=o.words,c=i.keySize,a=i.iterations;s.length<c;){r&&n.update(r),r=n.update(t).finalize(e),n.reset();for(var h=1;h<a;h++)r=n.finalize(r),n.reset();o.concat(r)}return o.sigBytes=4*c,o}}),k.EvpKDF=function(t,e,r){return z.create(r).compute(t,e)},C=(A=yt).lib.WordArray,E=A.algo,D=E.SHA256,R=E.SHA224=D.extend({_doReset:function(){this._hash=new C.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=D._doFinalize.call(this);return t.sigBytes-=4,t}}),A.SHA224=D._createHelper(R),A.HmacSHA224=D._createHmacHelper(R),P=(M=yt).lib,F=P.Base,W=P.WordArray,(O=M.x64={}).Word=F.extend({init:function(t,e){this.high=t,this.low=e}}),O.WordArray=F.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:8*t.length},toX32:function(){for(var t=this.words,e=t.length,r=[],i=0;i<e;i++){var n=t[i];r.push(n.high),r.push(n.low)}return W.create(r,this.sigBytes)},clone:function t(){for(var t=F.clone.call(this),e=t.words=this.words.slice(0),r=e.length,i=0;i<r;i++)e[i]=e[i].clone();return t}}),function(u){var t=yt,e=t.lib,d=e.WordArray,i=e.Hasher,l=t.x64.Word,r=t.algo,C=[],E=[],D=[];!function(){for(var t=1,e=0,r=0;r<24;r++){C[t+5*e]=(r+1)*(r+2)/2%64;var i=(2*t+3*e)%5;t=e%5,e=i}for(t=0;t<5;t++)for(e=0;e<5;e++)E[t+5*e]=e+(2*t+3*e)%5*5;for(var n=1,o=0;o<24;o++){for(var s=0,c=0,a=0;a<7;a++){if(1&n){var h=(1<<a)-1;h<32?c^=1<<h:s^=1<<h-32}128&n?n=n<<1^113:n<<=1}D[o]=l.create(s,c)}}();var R=[];!function(){for(var t=0;t<25;t++)R[t]=l.create()}();var n=r.SHA3=i.extend({cfg:i.cfg.extend({outputLength:512}),_doReset:function(){for(var t=this._state=[],e=0;e<25;e++)t[e]=new l.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(t,e){for(var r=this._state,i=this.blockSize/2,n=0;n<i;n++){var o=t[e+2*n],s=t[e+2*n+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),(x=r[n]).high^=s,x.low^=o}for(var c=0;c<24;c++){for(var a=0;a<5;a++){for(var h=0,l=0,f=0;f<5;f++){h^=(x=r[a+5*f]).high,l^=x.low}var u=R[a];u.high=h,u.low=l}for(a=0;a<5;a++){var d=R[(a+4)%5],p=R[(a+1)%5],_=p.high,v=p.low;for(h=d.high^(_<<1|v>>>31),l=d.low^(v<<1|_>>>31),f=0;f<5;f++){(x=r[a+5*f]).high^=h,x.low^=l}}for(var y=1;y<25;y++){var g=(x=r[y]).high,B=x.low,w=C[y];l=w<32?(h=g<<w|B>>>32-w,B<<w|g>>>32-w):(h=B<<w-32|g>>>64-w,g<<w-32|B>>>64-w);var k=R[E[y]];k.high=h,k.low=l}var S=R[0],m=r[0];S.high=m.high,S.low=m.low;for(a=0;a<5;a++)for(f=0;f<5;f++){var x=r[y=a+5*f],b=R[y],H=R[(a+1)%5+5*f],z=R[(a+2)%5+5*f];x.high=b.high^~H.high&z.high,x.low=b.low^~H.low&z.low}x=r[0];var A=D[c];x.high^=A.high,x.low^=A.low}},_doFinalize:function(){var t=this._data,e=t.words,r=(this._nDataBytes,8*t.sigBytes),i=32*this.blockSize;e[r>>>5]|=1<<24-r%32,e[(u.ceil((r+1)/i)*i>>>5)-1]|=128,t.sigBytes=4*e.length,this._process();for(var n=this._state,o=this.cfg.outputLength/8,s=o/8,c=[],a=0;a<s;a++){var h=n[a],l=h.high,f=h.low;l=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c.push(f),c.push(l)}return new d.init(c,o)},clone:function t(){for(var t=i.clone.call(this),e=t._state=this._state.slice(0),r=0;r<25;r++)e[r]=e[r].clone();return t}});t.SHA3=i._createHelper(n),t.HmacSHA3=i._createHmacHelper(n)}(Math),function(){var t=yt,e=t.lib.Hasher,r=t.x64,i=r.Word,n=r.WordArray,o=t.algo;function s(){return i.create.apply(i,arguments)}var mt=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],xt=[];!function(){for(var t=0;t<80;t++)xt[t]=s()}();var c=o.SHA512=e.extend({_doReset:function(){this._hash=new n.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],c=r[4],a=r[5],h=r[6],l=r[7],f=i.high,u=i.low,d=n.high,p=n.low,_=o.high,v=o.low,y=s.high,g=s.low,B=c.high,w=c.low,k=a.high,S=a.low,m=h.high,x=h.low,b=l.high,H=l.low,z=f,A=u,C=d,E=p,D=_,R=v,M=y,P=g,F=B,W=w,O=k,I=S,U=m,K=x,X=b,L=H,j=0;j<80;j++){var N,q,T=xt[j];if(j<16)q=T.high=0|t[e+2*j],N=T.low=0|t[e+2*j+1];else{var Z=xt[j-15],G=Z.high,J=Z.low,V=(G>>>1|J<<31)^(G>>>8|J<<24)^G>>>7,$=(J>>>1|G<<31)^(J>>>8|G<<24)^(J>>>7|G<<25),Q=xt[j-2],Y=Q.high,tt=Q.low,et=(Y>>>19|tt<<13)^(Y<<3|tt>>>29)^Y>>>6,rt=(tt>>>19|Y<<13)^(tt<<3|Y>>>29)^(tt>>>6|Y<<26),it=xt[j-7],nt=it.high,ot=it.low,st=xt[j-16],ct=st.high,at=st.low;q=(q=(q=V+nt+((N=$+ot)>>>0<$>>>0?1:0))+et+((N+=rt)>>>0<rt>>>0?1:0))+ct+((N+=at)>>>0<at>>>0?1:0),T.high=q,T.low=N}var ht,lt=F&O^~F&U,ft=W&I^~W&K,ut=z&C^z&D^C&D,dt=A&E^A&R^E&R,pt=(z>>>28|A<<4)^(z<<30|A>>>2)^(z<<25|A>>>7),_t=(A>>>28|z<<4)^(A<<30|z>>>2)^(A<<25|z>>>7),vt=(F>>>14|W<<18)^(F>>>18|W<<14)^(F<<23|W>>>9),yt=(W>>>14|F<<18)^(W>>>18|F<<14)^(W<<23|F>>>9),gt=mt[j],Bt=gt.high,wt=gt.low,kt=X+vt+((ht=L+yt)>>>0<L>>>0?1:0),St=_t+dt;X=U,L=K,U=O,K=I,O=F,I=W,F=M+(kt=(kt=(kt=kt+lt+((ht=ht+ft)>>>0<ft>>>0?1:0))+Bt+((ht=ht+wt)>>>0<wt>>>0?1:0))+q+((ht=ht+N)>>>0<N>>>0?1:0))+((W=P+ht|0)>>>0<P>>>0?1:0)|0,M=D,P=R,D=C,R=E,C=z,E=A,z=kt+(pt+ut+(St>>>0<_t>>>0?1:0))+((A=ht+St|0)>>>0<ht>>>0?1:0)|0}u=i.low=u+A,i.high=f+z+(u>>>0<A>>>0?1:0),p=n.low=p+E,n.high=d+C+(p>>>0<E>>>0?1:0),v=o.low=v+R,o.high=_+D+(v>>>0<R>>>0?1:0),g=s.low=g+P,s.high=y+M+(g>>>0<P>>>0?1:0),w=c.low=w+W,c.high=B+F+(w>>>0<W>>>0?1:0),S=a.low=S+I,a.high=k+O+(S>>>0<I>>>0?1:0),x=h.low=x+K,h.high=m+U+(x>>>0<K>>>0?1:0),H=l.low=H+L,l.high=b+X+(H>>>0<L>>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[30+(i+128>>>10<<5)]=Math.floor(r/4294967296),e[31+(i+128>>>10<<5)]=r,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function t(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});t.SHA512=e._createHelper(c),t.HmacSHA512=e._createHmacHelper(c)}(),U=(I=yt).x64,K=U.Word,X=U.WordArray,L=I.algo,j=L.SHA512,N=L.SHA384=j.extend({_doReset:function(){this._hash=new X.init([new K.init(3418070365,3238371032),new K.init(1654270250,914150663),new K.init(2438529370,812702999),new K.init(355462360,4144912697),new K.init(1731405415,4290775857),new K.init(2394180231,1750603025),new K.init(3675008525,1694076839),new K.init(1203062813,3204075428)])},_doFinalize:function(){var t=j._doFinalize.call(this);return t.sigBytes-=16,t}}),I.SHA384=j._createHelper(N),I.HmacSHA384=j._createHmacHelper(N),yt.lib.Cipher||(T=(q=yt).lib,Z=T.Base,G=T.WordArray,J=T.BufferedBlockAlgorithm,(V=q.enc).Utf8,$=V.Base64,Q=q.algo.EvpKDF,Y=T.Cipher=J.extend({cfg:Z.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,r){this.cfg=this.cfg.extend(r),this._xformMode=t,this._key=e,this.reset()},reset:function(){J.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function n(t){return"string"==typeof t?at:st}return function(i){return{encrypt:function(t,e,r){return n(e).encrypt(i,t,e,r)},decrypt:function(t,e,r){return n(e).decrypt(i,t,e,r)}}}}()}),T.StreamCipher=Y.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),tt=q.mode={},et=T.BlockCipherMode=Z.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),rt=tt.CBC=function(){var t=et.extend();function o(t,e,r){var i,n=this._iv;n?(i=n,this._iv=void 0):i=this._prevBlock;for(var o=0;o<r;o++)t[e+o]^=i[o]}return t.Encryptor=t.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize;o.call(this,t,e,i),r.encryptBlock(t,e),this._prevBlock=t.slice(e,e+i)}}),t.Decryptor=t.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=t.slice(e,e+i);r.decryptBlock(t,e),o.call(this,t,e,i),this._prevBlock=n}}),t}(),it=(q.pad={}).Pkcs7={pad:function(t,e){for(var r=4*e,i=r-t.sigBytes%r,n=i<<24|i<<16|i<<8|i,o=[],s=0;s<i;s+=4)o.push(n);var c=G.create(o,i);t.concat(c)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},T.BlockCipher=Y.extend({cfg:Y.cfg.extend({mode:rt,padding:it}),reset:function(){var t;Y.reset.call(this);var e=this.cfg,r=e.iv,i=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=i.createEncryptor:(t=i.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,r&&r.words):(this._mode=t.call(i,this,r&&r.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),nt=T.CipherParams=Z.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),ot=(q.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,r=t.salt;return(r?G.create([1398893684,1701076831]).concat(r).concat(e):e).toString($)},parse:function(t){var e,r=$.parse(t),i=r.words;return 1398893684==i[0]&&1701076831==i[1]&&(e=G.create(i.slice(2,4)),i.splice(0,4),r.sigBytes-=16),nt.create({ciphertext:r,salt:e})}},st=T.SerializableCipher=Z.extend({cfg:Z.extend({format:ot}),encrypt:function(t,e,r,i){i=this.cfg.extend(i);var n=t.createEncryptor(r,i),o=n.finalize(e),s=n.cfg;return nt.create({ciphertext:o,key:r,iv:s.iv,algorithm:t,mode:s.mode,padding:s.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,e,r,i){return i=this.cfg.extend(i),e=this._parse(e,i.format),t.createDecryptor(r,i).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),ct=(q.kdf={}).OpenSSL={execute:function(t,e,r,i){i||(i=G.random(8));var n=Q.create({keySize:e+r}).compute(t,i),o=G.create(n.words.slice(e),4*r);return n.sigBytes=4*e,nt.create({key:n,iv:o,salt:i})}},at=T.PasswordBasedCipher=st.extend({cfg:st.cfg.extend({kdf:ct}),encrypt:function(t,e,r,i){var n=(i=this.cfg.extend(i)).kdf.execute(r,t.keySize,t.ivSize);i.iv=n.iv;var o=st.encrypt.call(this,t,e,n.key,i);return o.mixIn(n),o},decrypt:function(t,e,r,i){i=this.cfg.extend(i),e=this._parse(e,i.format);var n=i.kdf.execute(r,t.keySize,t.ivSize,e.salt);return i.iv=n.iv,st.decrypt.call(this,t,e,n.key,i)}})),yt.mode.CFB=function(){var t=yt.lib.BlockCipherMode.extend();function o(t,e,r,i){var n,o=this._iv;o?(n=o.slice(0),this._iv=undefined):n=this._prevBlock,i.encryptBlock(n,0);for(var s=0;s<r;s++)t[e+s]^=n[s]}return t.Encryptor=t.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize;o.call(this,t,e,i,r),this._prevBlock=t.slice(e,e+i)}}),t.Decryptor=t.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=t.slice(e,e+i);o.call(this,t,e,i,r),this._prevBlock=n}}),t}(),yt.mode.ECB=((ht=yt.lib.BlockCipherMode.extend()).Encryptor=ht.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),ht.Decryptor=ht.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),ht),yt.pad.AnsiX923={pad:function(t,e){var r=t.sigBytes,i=4*e,n=i-r%i,o=r+n-1;t.clamp(),t.words[o>>>2]|=n<<24-o%4*8,t.sigBytes+=n},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},yt.pad.Iso10126={pad:function(t,e){var r=4*e,i=r-t.sigBytes%r;t.concat(yt.lib.WordArray.random(i-1)).concat(yt.lib.WordArray.create([i<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},yt.pad.Iso97971={pad:function(t,e){t.concat(yt.lib.WordArray.create([2147483648],1)),yt.pad.ZeroPadding.pad(t,e)},unpad:function(t){yt.pad.ZeroPadding.unpad(t),t.sigBytes--}},yt.mode.OFB=(lt=yt.lib.BlockCipherMode.extend(),ft=lt.Encryptor=lt.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,o=this._keystream;n&&(o=this._keystream=n.slice(0),this._iv=undefined),r.encryptBlock(o,0);for(var s=0;s<i;s++)t[e+s]^=o[s]}}),lt.Decryptor=ft,lt),yt.pad.NoPadding={pad:function(){},unpad:function(){}},dt=(ut=yt).lib.CipherParams,pt=ut.enc.Hex,ut.format.Hex={stringify:function(t){return t.ciphertext.toString(pt)},parse:function(t){var e=pt.parse(t);return dt.create({ciphertext:e})}},function(){var t=yt,e=t.lib.BlockCipher,r=t.algo,h=[],l=[],f=[],u=[],d=[],p=[],_=[],v=[],y=[],g=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var r=0,i=0;for(e=0;e<256;e++){var n=i^i<<1^i<<2^i<<3^i<<4;n=n>>>8^255&n^99,h[r]=n;var o=t[l[n]=r],s=t[o],c=t[s],a=257*t[n]^16843008*n;f[r]=a<<24|a>>>8,u[r]=a<<16|a>>>16,d[r]=a<<8|a>>>24,p[r]=a;a=16843009*c^65537*s^257*o^16843008*r;_[n]=a<<24|a>>>8,v[n]=a<<16|a>>>16,y[n]=a<<8|a>>>24,g[n]=a,r?(r=o^t[t[t[c^o]]],i^=t[t[i]]):r=i=1}}();var B=[0,1,2,4,8,16,32,64,128,27,54],i=r.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,r=t.sigBytes/4,i=4*((this._nRounds=r+6)+1),n=this._keySchedule=[],o=0;o<i;o++)o<r?n[o]=e[o]:(a=n[o-1],o%r?6<r&&o%r==4&&(a=h[a>>>24]<<24|h[a>>>16&255]<<16|h[a>>>8&255]<<8|h[255&a]):(a=h[(a=a<<8|a>>>24)>>>24]<<24|h[a>>>16&255]<<16|h[a>>>8&255]<<8|h[255&a],a^=B[o/r|0]<<24),n[o]=n[o-r]^a);for(var s=this._invKeySchedule=[],c=0;c<i;c++){o=i-c;if(c%4)var a=n[o];else a=n[o-4];s[c]=c<4||o<=4?a:_[h[a>>>24]]^v[h[a>>>16&255]]^y[h[a>>>8&255]]^g[h[255&a]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,f,u,d,p,h)},decryptBlock:function(t,e){var r=t[e+1];t[e+1]=t[e+3],t[e+3]=r,this._doCryptBlock(t,e,this._invKeySchedule,_,v,y,g,l);r=t[e+1];t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,i,n,o,s,c){for(var a=this._nRounds,h=t[e]^r[0],l=t[e+1]^r[1],f=t[e+2]^r[2],u=t[e+3]^r[3],d=4,p=1;p<a;p++){var _=i[h>>>24]^n[l>>>16&255]^o[f>>>8&255]^s[255&u]^r[d++],v=i[l>>>24]^n[f>>>16&255]^o[u>>>8&255]^s[255&h]^r[d++],y=i[f>>>24]^n[u>>>16&255]^o[h>>>8&255]^s[255&l]^r[d++],g=i[u>>>24]^n[h>>>16&255]^o[l>>>8&255]^s[255&f]^r[d++];h=_,l=v,f=y,u=g}_=(c[h>>>24]<<24|c[l>>>16&255]<<16|c[f>>>8&255]<<8|c[255&u])^r[d++],v=(c[l>>>24]<<24|c[f>>>16&255]<<16|c[u>>>8&255]<<8|c[255&h])^r[d++],y=(c[f>>>24]<<24|c[u>>>16&255]<<16|c[h>>>8&255]<<8|c[255&l])^r[d++],g=(c[u>>>24]<<24|c[h>>>16&255]<<16|c[l>>>8&255]<<8|c[255&f])^r[d++];t[e]=_,t[e+1]=v,t[e+2]=y,t[e+3]=g},keySize:8});t.AES=e._createHelper(i)}(),function(){var t=yt,e=t.lib,n=e.WordArray,r=e.BlockCipher,i=t.algo,h=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],l=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],f=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],o=i.DES=r.extend({_doReset:function(){for(var t=this._key.words,e=[],r=0;r<56;r++){var i=h[r]-1;e[r]=t[i>>>5]>>>31-i%32&1}for(var n=this._subKeys=[],o=0;o<16;o++){var s=n[o]=[],c=f[o];for(r=0;r<24;r++)s[r/6|0]|=e[(l[r]-1+c)%28]<<31-r%6,s[4+(r/6|0)]|=e[28+(l[r+24]-1+c)%28]<<31-r%6;s[0]=s[0]<<1|s[0]>>>31;for(r=1;r<7;r++)s[r]=s[r]>>>4*(r-1)+3;s[7]=s[7]<<5|s[7]>>>27}var a=this._invSubKeys=[];for(r=0;r<16;r++)a[r]=n[15-r]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,r){this._lBlock=t[e],this._rBlock=t[e+1],p.call(this,4,252645135),p.call(this,16,65535),_.call(this,2,858993459),_.call(this,8,16711935),p.call(this,1,1431655765);for(var i=0;i<16;i++){for(var n=r[i],o=this._lBlock,s=this._rBlock,c=0,a=0;a<8;a++)c|=u[a][((s^n[a])&d[a])>>>0];this._lBlock=s,this._rBlock=o^c}var h=this._lBlock;this._lBlock=this._rBlock,this._rBlock=h,p.call(this,1,1431655765),_.call(this,8,16711935),_.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function p(t,e){var r=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=r,this._lBlock^=r<<t}function _(t,e){var r=(this._rBlock>>>t^this._lBlock)&e;this._lBlock^=r,this._rBlock^=r<<t}t.DES=r._createHelper(o);var s=i.TripleDES=r.extend({_doReset:function(){var t=this._key.words;if(2!==t.length&&4!==t.length&&t.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var e=t.slice(0,2),r=t.length<4?t.slice(0,2):t.slice(2,4),i=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=o.createEncryptor(n.create(e)),this._des2=o.createEncryptor(n.create(r)),this._des3=o.createEncryptor(n.create(i))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=r._createHelper(s)}(),function(){var t=yt,e=t.lib.StreamCipher,r=t.algo,i=r.RC4=e.extend({_doReset:function(){for(var t=this._key,e=t.words,r=t.sigBytes,i=this._S=[],n=0;n<256;n++)i[n]=n;n=0;for(var o=0;n<256;n++){var s=n%r,c=e[s>>>2]>>>24-s%4*8&255;o=(o+i[n]+c)%256;var a=i[n];i[n]=i[o],i[o]=a}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=n.call(this)},keySize:8,ivSize:0});function n(){for(var t=this._S,e=this._i,r=this._j,i=0,n=0;n<4;n++){r=(r+t[e=(e+1)%256])%256;var o=t[e];t[e]=t[r],t[r]=o,i|=t[(t[e]+t[r])%256]<<24-8*n}return this._i=e,this._j=r,i}t.RC4=e._createHelper(i);var o=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var t=this.cfg.drop;0<t;t--)n.call(this)}});t.RC4Drop=e._createHelper(o)}(),yt.mode.CTRGladman=function(){var t=yt.lib.BlockCipherMode.extend();function h(t){if(255==(t>>24&255)){var e=t>>16&255,r=t>>8&255,i=255&t;255===e?(e=0,255===r?(r=0,255===i?i=0:++i):++r):++e,t=0,t+=e<<16,t+=r<<8,t+=i}else t+=1<<24;return t}var e=t.Encryptor=t.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,o=this._counter;n&&(o=this._counter=n.slice(0),this._iv=undefined),function a(t){return 0===(t[0]=h(t[0]))&&(t[1]=h(t[1])),t}(o);var s=o.slice(0);r.encryptBlock(s,0);for(var c=0;c<i;c++)t[e+c]^=s[c]}});return t.Decryptor=e,t}(),function(){var t=yt,e=t.lib.StreamCipher,r=t.algo,n=[],a=[],h=[],i=r.Rabbit=e.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,r=0;r<4;r++)t[r]=16711935&(t[r]<<8|t[r]>>>24)|4278255360&(t[r]<<24|t[r]>>>8);var i=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];for(r=this._b=0;r<4;r++)u.call(this);for(r=0;r<8;r++)n[r]^=i[r+4&7];if(e){var o=e.words,s=o[0],c=o[1],a=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),l=a>>>16|4294901760&h,f=h<<16|65535&a;n[0]^=a,n[1]^=l,n[2]^=h,n[3]^=f,n[4]^=a,n[5]^=l,n[6]^=h,n[7]^=f;for(r=0;r<4;r++)u.call(this)}},_doProcessBlock:function(t,e){var r=this._X;u.call(this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)n[i]=16711935&(n[i]<<8|n[i]>>>24)|4278255360&(n[i]<<24|n[i]>>>8),t[e+i]^=n[i]},blockSize:4,ivSize:2});function u(){for(var t=this._X,e=this._C,r=0;r<8;r++)a[r]=e[r];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<a[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<a[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<a[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<a[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<a[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<a[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<a[6]>>>0?1:0)|0,this._b=e[7]>>>0<a[7]>>>0?1:0;for(r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,c=((4294901760&i)*i|0)+((65535&i)*i|0);h[r]=s^c}t[0]=h[0]+(h[7]<<16|h[7]>>>16)+(h[6]<<16|h[6]>>>16)|0,t[1]=h[1]+(h[0]<<8|h[0]>>>24)+h[7]|0,t[2]=h[2]+(h[1]<<16|h[1]>>>16)+(h[0]<<16|h[0]>>>16)|0,t[3]=h[3]+(h[2]<<8|h[2]>>>24)+h[1]|0,t[4]=h[4]+(h[3]<<16|h[3]>>>16)+(h[2]<<16|h[2]>>>16)|0,t[5]=h[5]+(h[4]<<8|h[4]>>>24)+h[3]|0,t[6]=h[6]+(h[5]<<16|h[5]>>>16)+(h[4]<<16|h[4]>>>16)|0,t[7]=h[7]+(h[6]<<8|h[6]>>>24)+h[5]|0}t.Rabbit=e._createHelper(i)}(),yt.mode.CTR=(_t=yt.lib.BlockCipherMode.extend(),vt=_t.Encryptor=_t.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,o=this._counter;n&&(o=this._counter=n.slice(0),this._iv=undefined);var s=o.slice(0);r.encryptBlock(s,0),o[i-1]=o[i-1]+1|0;for(var c=0;c<i;c++)t[e+c]^=s[c]}}),_t.Decryptor=vt,_t),function(){var t=yt,e=t.lib.StreamCipher,r=t.algo,n=[],a=[],h=[],i=r.RabbitLegacy=e.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,r=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]],n=this._b=0;n<4;n++)u.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(e){var o=e.words,s=o[0],c=o[1],a=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),l=a>>>16|4294901760&h,f=h<<16|65535&a;i[0]^=a,i[1]^=l,i[2]^=h,i[3]^=f,i[4]^=a,i[5]^=l,i[6]^=h,i[7]^=f;for(n=0;n<4;n++)u.call(this)}},_doProcessBlock:function(t,e){var r=this._X;u.call(this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)n[i]=16711935&(n[i]<<8|n[i]>>>24)|4278255360&(n[i]<<24|n[i]>>>8),t[e+i]^=n[i]},blockSize:4,ivSize:2});function u(){for(var t=this._X,e=this._C,r=0;r<8;r++)a[r]=e[r];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<a[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<a[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<a[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<a[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<a[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<a[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<a[6]>>>0?1:0)|0,this._b=e[7]>>>0<a[7]>>>0?1:0;for(r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,c=((4294901760&i)*i|0)+((65535&i)*i|0);h[r]=s^c}t[0]=h[0]+(h[7]<<16|h[7]>>>16)+(h[6]<<16|h[6]>>>16)|0,t[1]=h[1]+(h[0]<<8|h[0]>>>24)+h[7]|0,t[2]=h[2]+(h[1]<<16|h[1]>>>16)+(h[0]<<16|h[0]>>>16)|0,t[3]=h[3]+(h[2]<<8|h[2]>>>24)+h[1]|0,t[4]=h[4]+(h[3]<<16|h[3]>>>16)+(h[2]<<16|h[2]>>>16)|0,t[5]=h[5]+(h[4]<<8|h[4]>>>24)+h[3]|0,t[6]=h[6]+(h[5]<<16|h[5]>>>16)+(h[4]<<16|h[4]>>>16)|0,t[7]=h[7]+(h[6]<<8|h[6]>>>24)+h[5]|0}t.RabbitLegacy=e._createHelper(i)}(),yt.pad.ZeroPadding={pad:function(t,e){var r=4*e;t.clamp(),t.sigBytes+=r-(t.sigBytes%r||r)},unpad:function(t){var e=t.words,r=t.sigBytes-1;for(r=t.sigBytes-1;0<=r;r--)if(e[r>>>2]>>>24-r%4*8&255){t.sigBytes=r+1;break}}},{init:function gt(){},cryptoJS:yt}}});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
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(c){"use strict";c=c&&c.hasOwnProperty("default")?c["default"]:c,Object.assign(c.DEFAULTS,{dragInline:!0}),c.PLUGINS.draggable=function(g){var d=g.$;function e(e){return!(!e.originalEvent||!e.originalEvent.target||e.originalEvent.target.nodeType!==Node.TEXT_NODE)||(e.target&&"A"===e.target.tagName&&1===e.target.childNodes.length&&"IMG"===e.target.childNodes[0].tagName&&(e.target=e.target.childNodes[0]),d(e.target).hasClass("fr-draggable")?(g.undo.canDo()||g.undo.saveStep(),g.opts.dragInline?g.$el.attr("contenteditable",!0):g.$el.attr("contenteditable",!1),g.opts.toolbarInline&&g.toolbar.hide(),d(e.target).addClass("fr-dragging"),g.browser.msie||g.browser.edge||g.selection.clear(),void e.originalEvent.dataTransfer.setData("text","Froala")):(e.preventDefault(),!1))}var p,v=function v(e){return!(e&&("HTML"===e.tagName||"BODY"===e.tagName||g.node.isElement(e)))};function m(e,t,r){if(g.opts.iframe){var n=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-top")),a=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-left"));e+=g.$iframe.offset().top+n,t+=g.$iframe.offset().left+a}p.offset().top!==e&&p.css("top",e),p.offset().left!==t&&p.css("left",t),p.width()!==r&&p.css("width",r)}function t(e){e.originalEvent.dataTransfer.dropEffect="move",g.opts.dragInline?(!function r(){for(var e=null,t=0;t<c.INSTANCES.length;t++)if((e=c.INSTANCES[t].$el.find(".fr-dragging")).length)return e.get(0)}()||g.browser.msie||g.browser.edge)&&e.preventDefault():(e.preventDefault(),function f(e){var t=g.doc.elementFromPoint(e.originalEvent.pageX-g.win.pageXOffset,e.originalEvent.pageY-g.win.pageYOffset);if(!v(t)){for(var r=0,n=t;!v(n)&&n===t&&0<e.originalEvent.pageY-g.win.pageYOffset-r;)r++,n=g.doc.elementFromPoint(e.originalEvent.pageX-g.win.pageXOffset,e.originalEvent.pageY-g.win.pageYOffset-r);(!v(n)||p&&0===g.$el.find(n).length&&n!==p.get(0))&&(n=null);for(var a=0,o=t;!v(o)&&o===t&&e.originalEvent.pageY-g.win.pageYOffset+a<d(g.doc).height();)a++,o=g.doc.elementFromPoint(e.originalEvent.pageX-g.win.pageXOffset,e.originalEvent.pageY-g.win.pageYOffset+a);(!v(o)||p&&0===g.$el.find(o).length&&o!==p.get(0))&&(o=null),t=null===o&&n?n:o&&null===n?o:o&&n?r<a?n:o:null}if(d(t).hasClass("fr-drag-helper"))return!1;if(t&&!g.node.isBlock(t)&&(t=g.node.blockParent(t)),t&&0<=["TD","TH","TR","THEAD","TBODY"].indexOf(t.tagName)&&(t=d(t).parents("table").get(0)),t&&0<=["LI"].indexOf(t.tagName)&&(t=d(t).parents("UL, OL").get(0)),t&&!d(t).hasClass("fr-drag-helper")){var i;p||(c.$draggable_helper||(c.$draggable_helper=d(document.createElement("div")).attr("class","fr-drag-helper")),p=c.$draggable_helper,g.events.on("shared.destroy",function(){p.html("").removeData().remove(),p=null},!0)),i=e.originalEvent.pageY<d(t).offset().top+d(t).outerHeight()/2;var l=d(t),s=0;i||0!==l.next().length?(i||(l=l.next()),"before"===p.data("fr-position")&&l.is(p.data("fr-tag"))||(0<l.prev().length&&(s=parseFloat(l.prev().css("margin-bottom"))||0),s=Math.max(s,parseFloat(l.css("margin-top"))||0),m(l.offset().top-s/2-g.$box.offset().top,l.offset().left-g.win.pageXOffset-g.$box.offset().left,l.width()),p.data("fr-position","before"))):"after"===p.data("fr-position")&&l.is(p.data("fr-tag"))||(s=parseFloat(l.css("margin-bottom"))||0,m(l.offset().top+d(t).height()+s/2-g.$box.offset().top,l.offset().left-g.win.pageXOffset-g.$box.offset().left,l.width()),p.data("fr-position","after")),p.data("fr-tag",l),p.addClass("fr-visible"),g.$box.append(p)}else p&&0<g.$box.find(p).length&&p.removeClass("fr-visible")}(e))}function r(e){e.originalEvent.dataTransfer.dropEffect="move",g.opts.dragInline||e.preventDefault()}function n(e){g.$el.attr("contenteditable",!0);var t=g.$el.find(".fr-dragging");p&&p.hasClass("fr-visible")&&g.$box.find(p).length?a(e):t.length&&(e.preventDefault(),e.stopPropagation()),p&&g.$box.find(p).length&&p.removeClass("fr-visible"),t.removeClass("fr-dragging")}function a(e){var t,r;g.$el.attr("contenteditable",!0);for(var n=0;n<c.INSTANCES.length;n++)if((t=c.INSTANCES[n].$el.find(".fr-dragging")).length){r=c.INSTANCES[n];break}if(t.length){if(e.preventDefault(),e.stopPropagation(),p&&p.hasClass("fr-visible")&&g.$box.find(p).length)p.data("fr-tag")[p.data("fr-position")]('<span class="fr-marker"></span>'),p.removeClass("fr-visible");else if(!1===g.markers.insertAtPoint(e.originalEvent))return!1;if(t.removeClass("fr-dragging"),!1===(t=g.events.chainTrigger("element.beforeDrop",t)))return!1;var a=t;if(t.parent().is("A")&&1===t.parent().get(0).childNodes.length&&(a=t.parent()),g.core.isEmpty())g.events.focus();else g.$el.find(".fr-marker").replaceWith(c.MARKERS),g.selection.restore();if(r===g||g.undo.canDo()||g.undo.saveStep(),g.core.isEmpty())g.$el.html(a);else{var o=g.markers.insert();0===a.find(o).length?d(o).replaceWith(a):0===t.find(o).length&&d(o).replaceWith(t),t.after(c.MARKERS),g.selection.restore()}return g.popups.hideAll(),g.selection.save(),g.$el.find(g.html.emptyBlockTagsQuery()).not("TD, TH, LI, .fr-inner").not(g.opts.htmlAllowedEmptyTags.join(",")).remove(),g.html.wrap(),g.html.fillEmptyBlocks(),g.selection.restore(),g.undo.saveStep(),g.opts.iframe&&g.size.syncIframe(),r!==g&&(r.popups.hideAll(),r.$el.find(r.html.emptyBlockTagsQuery()).not("TD, TH, LI, .fr-inner").remove(),r.html.wrap(),r.html.fillEmptyBlocks(),r.undo.saveStep(),r.events.trigger("element.dropped"),r.opts.iframe&&r.size.syncIframe()),g.events.trigger("element.dropped",[a]),!1}p&&p.removeClass("fr-visible"),g.undo.canDo()||g.undo.saveStep(),setTimeout(function(){g.undo.saveStep()},0)}function o(e){if(e&&"DIV"===e.tagName&&g.node.hasClass(e,"fr-drag-helper"))e.parentNode.removeChild(e);else if(e&&e.nodeType===Node.ELEMENT_NODE)for(var t=e.querySelectorAll("div.fr-drag-helper"),r=0;r<t.length;r++)t[r].parentNode.removeChild(t[r])}return{_init:function i(){g.opts.enter===c.ENTER_BR&&(g.opts.dragInline=!0),g.events.on("dragstart",e,!0),g.events.on("dragover",t,!0),g.events.on("dragenter",r,!0),g.events.on("document.dragend",n,!0),g.events.on("document.drop",n,!0),g.events.on("drop",a,!0),g.events.on("html.processGet",o)}}}});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
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(t){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t,Object.assign(t.DEFAULTS,{editInPopup:!1}),t.MODULES.editInPopup=function(i){function t(){i.events.$on(i.$el,i._mouseup,function(){setTimeout(function(){!function n(){var t,e=i.popups.get("text.edit");t="INPUT"===i.el.tagName?i.$el.attr("placeholder"):i.$el.text(),e.find("input").val(t).trigger("change"),i.popups.setContainer("text.edit",i.$sc),i.popups.show("text.edit",i.$el.offset().left+i.$el.outerWidth()/2,i.$el.offset().top+i.$el.outerHeight(),i.$el.outerHeight())}()},10)})}return{_init:function n(){i.opts.editInPopup&&(!function e(){var t={edit:'<div id="fr-text-edit-'.concat(i.id,'" class="fr-layer fr-text-edit-layer"><div class="fr-input-line"><input type="text" placeholder="').concat(i.language.translate("Text"),'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="updateText" tabIndex="2">').concat(i.language.translate("Update"),"</button></div></div>")};i.popups.create("text.edit",t)}(),t())},update:function e(){var t=i.popups.get("text.edit").find("input").val();0===t.length&&(t=i.opts.placeholderText),"INPUT"===i.el.tagName?i.$el.attr("placeholder",t):i.$el.text(t),i.events.trigger("contentChanged"),i.popups.hide("text.edit")}}},t.RegisterCommand("updateText",{focus:!1,undo:!1,callback:function(){this.editInPopup.update()}})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
7
  !function(e,c){"object"==typeof exports&&"undefined"!=typeof module?c(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],c):c(e.FroalaEditor)}(this,function(S){"use strict";S=S&&S.hasOwnProperty("default")?S["default"]:S,Object.assign(S.POPUP_TEMPLATES,{emoticons:"[_BUTTONS_][_CUSTOM_LAYER_]"}),Object.assign(S.DEFAULTS,{emoticonsSet:[{id:"people",name:"Smileys & People",code:"1f600",emoticons:[{code:"1f600",desc:"Grinning face"},{code:"1f601",desc:"Grinning Face with Smiling Eyes"},{code:"1f602",desc:"Face with Tears of Joy"},{code:"1f603",desc:"Smiling Face with Open Mouth"},{code:"1f604",desc:"Smiling Face with Open Mouth and Smiling Eyes"},{code:"1f605",desc:"Smiling Face with Open Mouth and Cold Sweat"},{code:"1f606",desc:"Smiling Face with Open Mouth and Tightly-Closed Eyes"},{code:"1f609",desc:"Winking Face"},{code:"1f60a",desc:"Smiling Face with Smiling Eyes"},{code:"1f608",desc:"Face Savouring Delicious Food"},{code:"1f60e",desc:"Smiling Face with Sunglasses"},{code:"1f60d",desc:"Smiling Face with Heart-Shaped Eyes"},{code:"1f618",desc:"Face Throwing a Kiss"},{code:"1f617",desc:"Kissing Face"},{code:"1f619",desc:"Kissing Face with Smiling Eyes"},{code:"1f61a",desc:"Kissing Face with Closed Eyes"},{code:"263a",desc:"White Smiling Face"},{code:"1f642",desc:"Slightly Smiling Face"},{code:"1f610",desc:"Neutral Face"},{code:"1f611",desc:"Expressionless Face"},{code:"1f636",desc:"Face Without Mouth"},{code:"1f60f",desc:"Smirking Face"},{code:"1f623",desc:"Persevering Face"},{code:"1f625",desc:"Disappointed but Relieved Face"},{code:"1f62e",desc:"Face with Open Mouth"},{code:"1f62f",desc:"Hushed Face"},{code:"1f62a",desc:"Sleepy Face"},{code:"1f62b",desc:"Tired Face"},{code:"1f634",desc:"Sleeping Face"},{code:"1f60c",desc:"Relieved Face"},{code:"1f61b",desc:"Face with Stuck-out Tongue"},{code:"1f61c",desc:"Face with Stuck-out Tongue and Winking Eye"},{code:"1f61d",desc:"Face with Stuck-out Tongue and Tightly-Closed Eyes"},{code:"1f612",desc:"Unamused Face"},{code:"1f613",desc:"Face with Cold Sweat"},{code:"1f613",desc:"Face with Cold Sweat"},{code:"1f614",desc:"Pensive Face"},{code:"1f615",desc:"Confused Face"},{code:"1f632",desc:"Astonished Face"},{code:"1f616",desc:"Confounded Face"},{code:"1f61e",desc:"Disappointed Face"},{code:"1f61f",desc:"Worried Face"},{code:"1f624",desc:"Face with Look of Triumph"},{code:"1f622",desc:"Crying Face"},{code:"1f62d",desc:"Loudly Crying Face"},{code:"1f626",desc:"Frowning Face with Open Mouth"},{code:"1f627",desc:"Anguished Face"},{code:"1f628",desc:"Fearful Face"},{code:"1f629",desc:"Weary Face"},{code:"1f62c",desc:"Grimacing Face"},{code:"1f630",desc:"Face with Open Mouth and Cold Sweat"},{code:"1f631",desc:"Face Screaming in Fear"},{code:"1f633",desc:"Flushed Face"},{code:"1f635",desc:"Dizzy Face"},{code:"1f621",desc:"Pouting Face"},{code:"1f620",desc:"Angry Face"},{code:"1f637",desc:"Face with Medical Mask"},{code:"1f607",desc:"Smiling Face with Halo"},{code:"1f608",desc:"Smiling Face with Horns"},{code:"1f47f",desc:"Imp"},{code:"1f479",desc:"Japanese Ogre"},{code:"1f47a",desc:"Japanese Goblin"},{code:"1f480",desc:"Skull"},{code:"1f47b",desc:"Ghost"},{code:"1f47d",desc:"Extraterrestrial Alien"},{code:"1f47e",desc:"Alien Monster"},{code:"1f4a9",desc:"Pile of Poo"},{code:"1f63a",desc:"Smiling Cat Face with Open Mouth"},{code:"1f638",desc:"Grinning Cat Face with Smiling Eyes"},{code:"1f639",desc:"Cat Face with Tears of Joy"},{code:"1f63b",desc:"Smiling Cat Face with Heart-Shaped Eyes"},{code:"1f63c",desc:"Cat Face with Wry Smile"},{code:"1f63d",desc:"Kissing Cat Face with Closed Eyes"},{code:"1f640",desc:"Weary Cat Face"},{code:"1f63f",desc:"Crying Cat Face"},{code:"1f63e",desc:"Pouting Cat Face"},{code:"1f648",desc:"See-No-Evil Monkey"},{code:"1f649",desc:"Hear-No-Evil Monkey"},{code:"1f64a",desc:"Speak-No-Evil Monkey"},{code:"1f476",desc:"Baby"},{code:"1f466",desc:"Boy"},{code:"1f467",desc:"Girl"},{code:"1f468",desc:"Man"},{code:"1f469",desc:"Woman"},{code:"1f474",desc:"Older Man"},{code:"1f475",desc:"Older Woman"},{code:"1f46e",desc:"Police Officer"},{code:"1f482",desc:" Guardsman"},{code:"1f477",desc:" Construction Worker"},{code:"1f478",desc:"Princess"},{code:"1f473",desc:"Man with Turban"},{code:"1f472",desc:"Man with Gua Pi Mao"},{code:"1f471",desc:"Person with Blond Hair"},{code:"1f470",desc:"Bride with Veil"},{code:"1f47c",desc:"Baby Angel"},{code:"1f385",desc:"Father Christmas"},{code:"1f64e",desc:"Person with Pouting Face"},{code:"1f645",desc:"Face with No Good Gesture"},{code:"1f646",desc:"Face with Ok Gesture"},{code:"1f481",desc:"Information Desk Person"},{code:"1f64b",desc:"Happy Person Raising One Hand"},{code:"1f647",desc:"Person Bowing Deeply"},{code:"1f486",desc:"Face Massage"},{code:"1f487",desc:"Haircut"},{code:"1f6b6",desc:"Pedestrian"},{code:"1f3c3",desc:"Runner"},{code:"1f483",desc:"Dancer"},{code:"1f46f",desc:"Woman with Bunny Ears"},{code:"1f6c0",desc:"Bath"},{code:"1f464",desc:"Bust in Silhouette"},{code:"1f465",desc:"Busts in Silhouette"},{code:"1f3c7",desc:"Horse Racing"},{code:"1f3c2",desc:" Snowboarder"},{code:"1f3c4",desc:" Surfer"},{code:"1f6a3",desc:" Rowboat"},{code:"1f3ca",desc:" Swimmer"},{code:"1f6b4",desc:" Bicyclist"},{code:"1f6b5",desc:"Mountain Bicyclist"},{code:"1f46b",desc:" Man and Woman Holding Hands"},{code:"1f46c",desc:"Two Men Holding Hands"},{code:"1f46d",desc:"Two Women Holding Hands"},{code:"1f48f",desc:"Kiss"},{code:"1f468-2764-1f48b-1f468",uCode:"\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68",desc:"Man Kiss Man"},{code:"1f469-2764-1f48b-1f469",uCode:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc69",desc:"Woman Kiss Woman"},{code:"1f491",desc:"Couple with Heart"},{code:"1f468-2764-1f468",uCode:"\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68",desc:"Man Heart Man"},{code:"1f469-2764-1f469",uCode:"\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc69",desc:"Woman Heart Woman"},{code:"1f46a",desc:"Family"},{code:"1f468",desc:"Man Woman Boy"},{code:"1f468-1f469-1f467",desc:"Man Woman Girl"},{code:"1f468-1f469-1f467-1f466",desc:"Man Woman Girl Boy"},{code:"1f468-1f469-1f466-1f466",desc:"Man Woman Boy Boy"},{code:"1f468-1f469-1f467-1f467",desc:"Man Woman Girl Girl"},{code:"1f468-1f468-1f466",desc:"Man Man Boy"},{code:"1f468-1f468-1f467",desc:"Man Man Girl"},{code:"1f468-1f468-1f467-1f466",desc:"Man Man Girl Boy"},{code:"1f468-1f468-1f466-1f466",desc:"Man Man Boy Boy"},{code:"1f469-1f469-1f466",desc:"Woman Woman Boy"},{code:"1f469-1f469-1f467",desc:"Woman Woman Girl"},{code:"1f469-1f469-1f467-1f466",desc:"Woman Woman Girl Boy"},{code:"1f469-1f469-1f467-1f467",desc:"Woman Woman Girl Girl"},{code:"1f4aa",desc:"Flexed Biceps"},{code:"1f448",desc:"White Left Pointing Backhand Index"},{code:"1f449",desc:"White Right Pointing Backhand Index"},{code:"1f446",desc:"White Up Pointing Backhand Index"},{code:"1f447",desc:"White Down Pointing Backhand Index"},{code:"270c",desc:"Victory Hand"},{code:"270b",desc:"Raised Hand"},{code:"1f44c",desc:"Ok Hand Sign"},{code:"1f44d",desc:"Thumbs Up Sign"},{code:"1f44e",desc:"Thumbs Down Sign"},{code:"270a",desc:"Raised Fist"},{code:"1f44a",desc:"Fisted Hand Sign"},{code:"1f44b",desc:"Waving Hand Sign"},{code:"1f44f",desc:"Clapping Hands Sign"},{code:"1f450",desc:"Open Hands Sign"},{code:"1f64c",desc:"Person Raising Both Hands in Celebration"},{code:"1f64f",desc:"Person with Folded Hands"},{code:"1f485",desc:"Nail Polish"},{code:"1f442",desc:"Ear"},{code:"1f443",desc:"Nose"},{code:"1f463",desc:"Footprints"},{code:"1f440",desc:"Eyes"},{code:"1f445",desc:"Tongue"},{code:"1f444",desc:"Mouth"},{code:"1f48b",desc:"Kiss Mark"},{code:"1f498",desc:"Heart with Arrow"},{code:"2764",desc:"Heavy Black Heart"},{code:"1f493",desc:"Heavy Black Heart"},{code:"1f494",desc:"Broken Heart"},{code:"1f495",desc:"Two Hearts"},{code:"1f496",desc:"Sparkling Hearts"},{code:"1f497",desc:"Growing Hearts"},{code:"1f499",desc:"Blue Heart"},{code:"1f49a",desc:"Green Heart"},{code:"1f49b",desc:"Yellow Heart"},{code:"1f49c",desc:"Purple Heart"},{code:"1f49d",desc:"Heart with Ribbon"},{code:"1f49e",desc:"Revolving Hearts"},{code:"1f49f",desc:"Heart Decoration"},{code:"1f48c",desc:"Love Letter"},{code:"1f4a4",desc:"Sleeping Symbol"},{code:"1f4a2",desc:"Anger Symbol"},{code:"1f4a3",desc:"Bomb"},{code:"1f4a5",desc:"Collision Symbol"},{code:"1f4a6",desc:"Splashing Sweat Symbol"},{code:"1f4a8",desc:"Dash Symbol"},{code:"1f4ab",desc:"Dizzy Symbol"},{code:"1f4ab",desc:"Dizzy Symbol"},{code:"1f4ac",desc:"Speech Balloon"},{code:"1f4ad",desc:"Thought Balloon"},{code:"1f453",desc:"Eyeglasses"},{code:"1f454",desc:"Necktie"},{code:"1f455",desc:"T-Shirt"},{code:"1f456",desc:"Jeans"},{code:"1f457",desc:"Dress"},{code:"1f458",desc:"Kimono"},{code:"1f459",desc:"Bikini"},{code:"1f45a",desc:"Womans Clothes"},{code:"1f45b",desc:"Purse"},{code:"1f45c",desc:"Handbag"},{code:"1f45d",desc:"Pouch"},{code:"1f392",desc:"School Satchel"},{code:"1f45e",desc:"Mans Shoe"},{code:"1f45f",desc:"Athletic Shoe"},{code:"1f460",desc:"High-Heeled Shoe"},{code:"1f461",desc:"Womans Sandal"},{code:"1f462",desc:"Womans Boots"},{code:"1f451",desc:"Crown"},{code:"1f452",desc:"Womans Hat"},{code:"1f462",desc:"Top Hat"},{code:"1f393",desc:"Graduation Cap"},{code:"1f484",desc:"Lipstick"},{code:"1f48d",desc:"Ring"},{code:"1f48e",desc:"Gem Stone"}]},{id:"nature",name:"Animals & Nature",code:"1F435",emoticons:[{code:"1F435",desc:"Monkey Face"},{code:"1F412",desc:"Monkey"},{code:"1F436",desc:"Dog Face"},{code:"1F415",desc:"Dog"},{code:"1F429",desc:"Poodle"},{code:"1F43A",desc:"Wolf Face"},{code:"1F431",desc:"Cat Face"},{code:"1F408",desc:"Cat"},{code:"1F42F",desc:"Tiger Face"},{code:"1F405",desc:"Tiger"},{code:"1F406",desc:"Leopard"},{code:"1F434",desc:"Horse Face"},{code:"1F40E",desc:"Horse"},{code:"1F42E",desc:"Cow Face"},{code:"1F402",desc:"Ox"},{code:"1F403",desc:"Water Buffalo"},{code:"1F404",desc:"Cow"},{code:"1F437",desc:"Pig Face"},{code:"1F416",desc:"Pig"},{code:"1F417",desc:"Boar"},{code:"1F43D",desc:"Pig Nose"},{code:"1F40F",desc:"Ram"},{code:"1F411",desc:"Sheep"},{code:"1F410",desc:"Goat"},{code:"1F42A",desc:"Dromedary Camel"},{code:"1F42B",desc:"Bactrian Camel"},{code:"1F418",desc:"Elephant"},{code:"1F42D",desc:"Mouse Face"},{code:"1F401",desc:"Mouse"},{code:"1F400",desc:"Rat"},{code:"1F439",desc:"Hamster Face"},{code:"1F430",desc:"Rabbit Face"},{code:"1F407",desc:"Rabbit"},{code:"1F43B",desc:"Bear Face"},{code:"1F428",desc:"Koala"},{code:"1F43C",desc:"Panda Face"},{code:"1F43E",desc:"Paw Prints"},{code:"1F414",desc:"Chicken"},{code:"1F413",desc:"Rooster"},{code:"1F423",desc:"Hatching Chick"},{code:"1F424",desc:"Baby Chick"},{code:"1F425",desc:"Front-Facing Baby Chick"},{code:"1F426",desc:"Bird"},{code:"1F427",desc:"Penguin"},{code:"1F438",desc:"Frog Face"},{code:"1F40A",desc:"Crocodile"},{code:"1F422",desc:"Turtle"},{code:"1F40D",desc:"Snake"},{code:"1F432",desc:"Dragon Face"},{code:"1F409",desc:"Dragon"},{code:"1F433",desc:"Spouting Whale"},{code:"1F40B",desc:"Whale"},{code:"1F42C",desc:"Dolphin"},{code:"1F41F",desc:"Fish"},{code:"1F420",desc:"Tropical Fish"},{code:"1F421",desc:"Blowfish"},{code:"1F419",desc:"Octopus"},{code:"1F41A",desc:"Spiral Shell"},{code:"1F40C",desc:"Snail"},{code:"1F41B",desc:"Bug"},{code:"1F41C",desc:"Ant"},{code:"1F41D",desc:"Honeybee"},{code:"1F41E",desc:"Lady Beetle"},{code:"1F490",desc:"Bouquet"},{code:"1F338",desc:"Cherry Blossom"},{code:"1F4AE",desc:"White Flower"},{code:"1F339",desc:"Rose"},{code:"1F33A",desc:"Hibiscus"},{code:"1F33B",desc:"Sunflower"},{code:"1F33C",desc:"Blossom"},{code:"1F337",desc:"Tulip"},{code:"1F331",desc:"Seedling"},{code:"1F332",desc:"Evergreen Tree"},{code:"1F333",desc:"Deciduous Tree"},{code:"1F334",desc:"Palm Tree"},{code:"1F335",desc:"Cactus"},{code:"1F33E",desc:"Ear of Rice"},{code:"1F33F",desc:"Herb"},{code:"2618",desc:"Four Leaf Clover"},{code:"1F341",desc:"Maple Leaf"},{code:"1F342",desc:"Fallen Leaf"},{code:"1F343",desc:"Leaf Fluttering in Wind"}]},{id:"foods",name:"Food & Drink",code:"1F347",emoticons:[{code:"1F347",desc:"Grapes"},{code:"1F348",desc:"Melon"},{code:"1F349",desc:"Watermelon"},{code:"1F34A",desc:"Tangerine"},{code:"1F34B",desc:"Lemon"},{code:"1F34C",desc:"Banana"},{code:"1F34D",desc:"Pineapple"},{code:"1F34E",desc:"Red Apple"},{code:"1F34F",desc:"Green Apple"},{code:"1F350",desc:"Pear"},{code:"1F351",desc:"Peach"},{code:"1F352",desc:"Cherries"},{code:"1F353",desc:"Strawberry"},{code:"1F345",desc:"Tomato"},{code:"1F346",desc:"Aubergine"},{code:"1F33D",desc:"Ear of Maize"},{code:"1F344",desc:"Mushroom"},{code:"1F330",desc:"Chestnut"},{code:"1F35E",desc:"Bread"},{code:"1F356",desc:"Meat on Bone"},{code:"1F357",desc:"Poultry Leg"},{code:"1F354",desc:"Hamburger"},{code:"1F35F",desc:"French Fries"},{code:"1F355",desc:"Slice of Pizza"},{code:"1F373",desc:"Cooking"},{code:"1F372",desc:"Pot of Food"},{code:"1F371",desc:"Bento Box"},{code:"1F358",desc:"Rice Cracker"},{code:"1F359",desc:"Rice Ball"},{code:"1F35A",desc:"Cooked Rice"},{code:"1F35B",desc:"Curry and Rice"},{code:"1F35C",desc:"Steaming Bowl"},{code:"1F35D",desc:"Spaghetti"},{code:"1F360",desc:"Roasted Sweet Potato"},{code:"1F362",desc:"Oden"},{code:"1F363",desc:"Sushi"},{code:"1F364",desc:"Fried Shrimp"},{code:"1F365",desc:"Fish Cake with Swirl Design"},{code:"1F361",desc:"Dango"},{code:"1F366",desc:"Soft Ice Cream"},{code:"1F367",desc:"Shaved Ice"},{code:"1F368",desc:"Ice Cream"},{code:"1F369",desc:"Doughnut"},{code:"1F36A",desc:"Cookie"},{code:"1F382",desc:"Birthday Cake"},{code:"1F370",desc:"Shortcake"},{code:"1F36B",desc:"Chocolate Bar"},{code:"1F36C",desc:"Candy"},{code:"1F36D",desc:"Lollipop"},{code:"1F36E",desc:"Custard"},{code:"1F36F",desc:"Honey Pot"},{code:"1F37C",desc:"Baby Bottle"},{code:"2615",desc:"Hot Beverage"},{code:"1F375",desc:"Teacup Without Handle"},{code:"1F376",desc:"Sake Bottle and Cup"},{code:"1F377",desc:"Wine Glass"},{code:"1F378",desc:"Cocktail Glass"},{code:"1F379",desc:"Tropical Drink"},{code:"1F37A",desc:"Beer Mug"},{code:"1F37B",desc:"Clinking Beer Mugs"},{code:"1F374",desc:"Fork and Knife"},{code:"1F52A",desc:"Hocho"}]},{id:"activity",name:"Activities",code:"1f383",emoticons:[{code:"1f383",desc:" Jack-O-Lantern"},{code:"1f384",desc:"Christmas Tree"},{code:"1f386",desc:" Fireworks"},{code:"1f387",desc:"Firework Sparkler"},{code:"2728",desc:" Sparkles"},{code:"1f388",desc:"Balloon"},{code:"1f389",desc:"Party Popper"},{code:"1f38a",desc:"Confetti Ball"},{code:"1f38b",desc:"Tanabata Tree"},{code:"1f38d",desc:"Pine Decoration"},{code:"1f38e",desc:"Japanese Dolls"},{code:"1f38f",desc:"Carp Streamer"},{code:"1f390",desc:"Wind Chime"},{code:"1f391",desc:"Moon Viewing Ceremony"},{code:"1f380",desc:"Ribbon"},{code:"1f381",desc:"Wrapped Present"},{code:"1f3ab",desc:"Ticket"},{code:"1f3c6",desc:"Trophy"},{code:"1f388",desc:"Balloon"},{code:"26bd",desc:"Soccer Ball"},{code:"26be",desc:"Baseball"},{code:"1f3c0",desc:"Basketball and Hoop"},{code:"1f3c8",desc:"American Football"},{code:"1f3c9",desc:"Rugby Football"},{code:"1f3be",desc:"Tennis Racquet and Ball"},{code:"1f3b1",desc:"Billiards"},{code:"1f3b3",desc:"Bowling"},{code:"1f3af",desc:"Direct Hit"},{code:"26f3",desc:"Flag in Hole"},{code:"1f3a3",desc:"Fishing Pole and Fish"},{code:"1f3bd",desc:"Running Shirt with Sash"},{code:"1f3bf",desc:"Ski and Ski Boot"},{code:"1f3ae",desc:"Video Game"},{code:"1f3b2",desc:"Game Die"},{code:"2660",desc:"Black Spade Suit"},{code:"2665",desc:"Black Heart SuiT"},{code:"2666",desc:"Black Diamond Suit"},{code:"2663",desc:"Black Club Suit"},{code:"1f0cf",desc:"Playing Card Black Joker"},{code:"1f004",desc:"Mahjong Tile Red Dragon"},{code:"1f3b4",desc:"Flower Playing Cards"}]},{id:"places",name:"Travel & Places",code:"1f30d",emoticons:[{code:"1f30d",desc:"Earth Globe Europe-Africa"},{code:"1f30e",desc:"Earth Globe Americas"},{code:"1f30f",desc:"Earth Globe Asia-Australia"},{code:"1f310",desc:"Globe with Meridians"},{code:"1f5fe",desc:"Silhouette of Japan"},{code:"1f30b",desc:"Volcano"},{code:"1f5fb",desc:"Mount Fuji"},{code:"1f3e0",desc:"House Building"},{code:"1f3e1",desc:"House with Garden"},{code:"1f3e2",desc:"Office Building"},{code:"1f3e3",desc:"Japanese Post Office"},{code:"1f3e4",desc:"European Post Office"},{code:"1f3e5",desc:"Hospital"},{code:"1f3e6",desc:"Bank"},{code:"1f3e8",desc:"Hotel"},{code:"1f3e9",desc:"Love Hotel"},{code:"1f3ea",desc:"Convenience Store"},{code:"1f3eb",desc:"School"},{code:"1f3ec",desc:"Department Store"},{code:"1f3ed",desc:"Factory"},{code:"1f3ef",desc:"Japanese Castle"},{code:"1f3f0",desc:"European Castle"},{code:"1f492",desc:"Wedding"},{code:"1f5fc",desc:"Tokyo Tower"},{code:"1f5fd",desc:"Statue of Liberty"},{code:"26ea",desc:"Church"},{code:"26f2",desc:"Fountain"},{code:"26fa",desc:"Tent"},{code:"1f301",desc:"Foggy"},{code:"1f303",desc:"Night with Stars"},{code:"1f304",desc:"Sunrise over Mountains"},{code:"1f305",desc:"Sunrise"},{code:"1f306",desc:"Cityscape at Dusk"},{code:"1f307",desc:"Sunset over Buildings"},{code:"1f309",desc:"Bridge at Night"},{code:"2668",desc:"Hot Springs"},{code:"1f30c",desc:"Milky Way"},{code:"1f3a0",desc:"Carousel Horse"},{code:"1f3a1",desc:"Ferris Wheel"},{code:"1f3a2",desc:"Roller Coaster"},{code:"1f488",desc:"Barber Pole"},{code:"1f3aa",desc:"Circus Tent"},{code:"1f3ad",desc:"Performing Arts"},{code:"1f3a8",desc:"Artist Palette"},{code:"1f3b0",desc:"Slot Machine"},{code:"1f682",desc:"Steam Locomotive"},{code:"1f683",desc:"Railway Car"},{code:"1f684",desc:"High-Speed Train"},{code:"1f685",desc:"High-Speed Train with Bullet Nose"},{code:"1f686",desc:"Train"},{code:"1f687",desc:"Metro"},{code:"1f688",desc:"Light Rail"},{code:"1f689",desc:"Station"},{code:"1f68a",desc:"Tram"},{code:"1f69d",desc:"Monorail"},{code:"1f69e",desc:"Mountain Railway"},{code:"1f68b",desc:"Tram Car"},{code:"1f68c",desc:"Bus"},{code:"1f68d",desc:"Oncoming Bus"},{code:"1f68e",desc:"Trolleybus"},{code:"1f690",desc:"Minibus"},{code:"1f691",desc:"Ambulance"},{code:"1f692",desc:"Fire Engine"},{code:"1f693",desc:"Police Car"},{code:"1f694",desc:"Oncoming Police Car"},{code:"1f695",desc:"Taxi"},{code:"1f695",desc:"Oncoming Taxi"},{code:"1f697",desc:"Automobile"},{code:"1f698",desc:"Oncoming Automobile"},{code:"1f699",desc:"Recreational Vehicle"},{code:"1f69a",desc:"Delivery Truck"},{code:"1f69b",desc:"Articulated Lorry"},{code:"1f69c",desc:"Tractor"},{code:"1f6b2",desc:"Bicycle"},{code:"1f68f",desc:"Bus Stop"},{code:"26fd",desc:"Fuel Pump"},{code:"1f6a8",desc:"Police Cars Revolving Light"},{code:"1f6a5",desc:"Horizontal Traffic Light"},{code:"1f6a6",desc:"Vertical Traffic Light"},{code:"1f6a7",desc:"Construction Sign"},{code:"2693",desc:"Anchor"},{code:"26f5",desc:"Sailboat"},{code:"1f6a4",desc:"Speedboat"},{code:"1f6a2",desc:"Ship"},{code:"2708",desc:"Airplane"},{code:"1f4ba",desc:"Seat"},{code:"1f681",desc:"Helicopter"},{code:"1f69f",desc:"Suspension Railway"},{code:"1f6a0",desc:"Mountain Cableway"},{code:"1f6a1",desc:"Aerial Tramway"},{code:"1f680",desc:"Rocket"},{code:"1f6aa",desc:"Door"},{code:"1f6bd",desc:"Toilet"},{code:"1f6bf",desc:"Shower"},{code:"1f6c1",desc:"Bathtub"},{code:"231b",desc:"Hourglass"},{code:"23f3",desc:"Hourglass with Flowing Sand"},{code:"231a",desc:"Watch"},{code:"23f0",desc:"Alarm Clock"},{code:"1f55b",desc:"Clock Face Twelve Oclock"},{code:"1f567",desc:"Clock Face Twelve-Thirty"},{code:"1f550",desc:"Clock Face One Oclock"},{code:"1f55c",desc:"Clock Face One-thirty"},{code:"1f551",desc:"Clock Face Two Oclock"},{code:"1f55d",desc:"Clock Face Two-thirty"},{code:"1f552",desc:"Clock Face Three Oclock"},{code:"1f55e",desc:"Clock Face Three-thirty"},{code:"1f553",desc:"Clock Face Four Oclock"},{code:"1f55f",desc:"Clock Face Four-thirty"},{code:"1f554",desc:"Clock Face Five Oclock"},{code:"1f560",desc:"Clock Face Five-thirty"},{code:"1f555",desc:"Clock Face Six Oclock"},{code:"1f561",desc:"Clock Face Six-thirty"},{code:"1f556",desc:"Clock Face Seven Oclock"},{code:"1f562",desc:"Clock Face Seven-thirty"},{code:"1f557",desc:"Clock Face Eight Oclock"},{code:"1f563",desc:"Clock Face Eight-thirty"},{code:"1f558",desc:"Clock Face Nine Oclock"},{code:"1f564",desc:"Clock Face Nine-thirty"},{code:"1f559",desc:"Clock Face Ten Oclock"},{code:"1f565",desc:"Clock Face Ten-thirty"},{code:"1f55a",desc:"Clock Face Eleven Oclock"},{code:"1f566",desc:"Clock Face Eleven-thirty"},{code:"1f311",desc:"New Moon Symbol"},{code:"1f312",desc:"Waxing Crescent Moon Symbol"},{code:"1f313",desc:"First Quarter Moon Symbol"},{code:"1f314",desc:"Waxing Gibbous Moon Symbol"},{code:"1f315",desc:"Full Moon Symbol"},{code:"1f316",desc:"Waning Gibbous Moon Symbol"},{code:"1f317",desc:"Last Quarter Moon Symbol"},{code:"1f318",desc:"Waning Crescent Moon Symbol"},{code:"1f319",desc:"Crescent Moon"},{code:"1f31a",desc:"New Moon with Face"},{code:"1f31b",desc:"First Quarter Moon with Face"},{code:"1f31c",desc:"Last Quarter Moon with Face"},{code:"2600",desc:"Black Sun with Rays"},{code:"1f31d",desc:"Full Moon with Face"},{code:"1f31e",desc:"Sun with Face"},{code:"2b50",desc:"White Medium Star"},{code:"1f31f",desc:"Glowing Star"},{code:"1f320",desc:"Shooting Star"},{code:"2601",desc:"Cloud"},{code:"26c5",desc:"Sun Behind Cloud"},{code:"1f300",desc:"Cyclone"},{code:"1f308",desc:"Rainbow"},{code:"1f302",desc:"Closed Umbrella"},{code:"2614",desc:"Umbrella with Rain Drops"},{code:"26a1",desc:"High Voltage Sign"},{code:"2744",desc:"Snowflake"},{code:"2603",desc:"Snowman Without Snow"},{code:"1f525",desc:"Fire"},{code:"1f4a7",desc:"Droplet"},{code:"1F30A",desc:"Water Wave"}]},{id:"objects",name:"Objects",code:"1F507",emoticons:[{code:"1F507",desc:"Speaker with Cancellation Stroke"},{code:"1F508",desc:"Speaker"},{code:"1F509",desc:"Speaker with One Sound Wave"},{code:"1F50A",desc:"Speaker with Three Sound Wave"},{code:"1F4E2",desc:"Public Address Loudspeaker"},{code:"1F4E3",desc:"Cheering Megaphone"},{code:"1F4EF",desc:"Postal Horn"},{code:"1F514",desc:"Bell"},{code:"1F515",desc:"Bell with Cancellation Stroke"},{code:"1F3BC",desc:"Musical Score"},{code:"1F3B5",desc:"Musical Note"},{code:"1F3B6",desc:"Multiple Musical Notes"},{code:"1F3A4",desc:"Microphone"},{code:"1F3A7",desc:"Headphone"},{code:"1F4FB",desc:"Radio"},{code:"1F3B7",desc:"Saxophone"},{code:"1F3B8",desc:"Guitar"},{code:"1F3B9",desc:"Musical Keyboard"},{code:"1F3BA",desc:"Trumpet"},{code:"1F3BB",desc:"Violin"},{code:"1F4F1",desc:"Mobile Phone"},{code:"1F4F2",desc:"Mobile Phone with Rightwards Arrow at Left"},{code:"260E",desc:"Black Telephone"},{code:"1F4DE",desc:"Telephone Receiver"},{code:"1F4DF",desc:"Pager"},{code:"1F4E0",desc:"Fax Machine"},{code:"1F50B",desc:"Battery"},{code:"1F50C",desc:"Electric Plug"},{code:"1F4BB",desc:"Personal Computer"},{code:"1F4BD",desc:"Minidisc"},{code:"1F4BE",desc:"Floppy Disk"},{code:"1F4BF",desc:"Optical Disk"},{code:"1F4C0",desc:"Dvd"},{code:"1F3A5",desc:"Movie Camera"},{code:"1F3AC",desc:"Clapper Board"},{code:"1F4FA",desc:"Television"},{code:"1F4F7",desc:"Camera"},{code:"1F4F9",desc:"Video Camera"},{code:"1F4FC",desc:"Videocassette"},{code:"1F50D",desc:"Left-Pointing Magnifying Glass"},{code:"1F50E",desc:"Right-Pointing Magnifying Glass"},{code:"1F52C",desc:"Microscope"},{code:"1F52D",desc:"Telelscope"},{code:"1F4E1",desc:"Satellite Antenna"},{code:"1F4A1",desc:"Electric Light Bulb"},{code:"1F526",desc:"Electric Torch"},{code:"1F3EE",desc:"Izakaya Lantern"},{code:"1F4D4",desc:"Notebook with Decorative Cover"},{code:"1F4D5",desc:"Closed Book"},{code:"1F4D6",desc:"Open Book"},{code:"1F4D7",desc:"Green Book"},{code:"1F4D8",desc:"Blue Book"},{code:"1F4D9",desc:"Orange Book"},{code:"1F4DA",desc:"Books"},{code:"1F4D3",desc:"Notebook"},{code:"1F4D2",desc:"Ledger"},{code:"1F4C3",desc:"Curl"},{code:"1F4DC",desc:"Scroll"},{code:"1F4C4",desc:"Page Facing Up"},{code:"1F4F0",desc:"Newspaper"},{code:"1F4D1",desc:"Bookmark Tabs"},{code:"1F516",desc:"Bookmark"},{code:"1F4B0",desc:"Money Bag"},{code:"1F4B4",desc:"Banknote with Yen Sign"},{code:"1F4B5",desc:"Banknote with Dollar Sign"},{code:"1F4B6",desc:"Banknote with Euro Sign"},{code:"1F4B7",desc:"Banknote with Pound Sign"},{code:"1F4B8",desc:"Money with Wings"},{code:"1F4B3",desc:"Credit Card"},{code:"1F4B9",desc:"Chart with Upwards Trend and Yen Sign"},{code:"1F4B1",desc:"Currency Exchange"},{code:"1F4B2",desc:"Heavy Dollar Sign"},{code:"2709",desc:"Envelope"},{code:"1F4E7",desc:"E-Mail Symbol"},{code:"1F4E8",desc:"Incoming Envelope"},{code:"1F4E9",desc:"Envelope with Downwards Arrow Above"},{code:"1F4E4",desc:"Outbox Tray"},{code:"1F4E5",desc:"Inbox Tray"},{code:"1F4E6",desc:"Package"},{code:"1F4BE",desc:"Closed Mailbox with Raised Flag"},{code:"1F4EA",desc:"Closed Mailbox with Lowered Flag"},{code:"1F4EC",desc:"Open Mailbox with Raised Flag"},{code:"1F4ED",desc:"Open Mailbox with Lowered Flag"},{code:"1F5F3",desc:"Postbox"},{code:"270F",desc:"Pencil"},{code:"2712",desc:"Black Nib"},{code:"1F4DD",desc:"Memo"},{code:"1F4BC",desc:"Briefcase"},{code:"1F4C1",desc:"File Folder"},{code:"1F4C2",desc:"Open File Folder"},{code:"1F4C5",desc:"Calender"},{code:"1F4C6",desc:"Tear-off Calender"},{code:"1F4C7",desc:"Card Index"},{code:"1F4C8",desc:"Chart with Upwards Trend"},{code:"1F4C9",desc:"Chart with Downwards Trend"},{code:"1F4CA",desc:"Bar Chart"},{code:"1F4CB",desc:"Clipboard"},{code:"1F4CC",desc:"Pushpin"},{code:"1F4CD",desc:"Round Pushpin"},{code:"1F4CE",desc:"Paperclip"},{code:"1F4CF",desc:"Straight Ruler"},{code:"1F4D0",desc:"Triangular Ruler"},{code:"2702",desc:"Black Scissors"},{code:"1F512",desc:"Lock"},{code:"1F513",desc:"Open Lock"},{code:"1F50F",desc:"Lock with Ink Pen"},{code:"1F510",desc:"Closed Lock with Key"},{code:"1F511",desc:"Key"},{code:"1F528",desc:"Hammer"},{code:"1F52B",desc:"Pistol"},{code:"1F527",desc:"Wrench"},{code:"1F529",desc:"Nut and Bolt"},{code:"1F517",desc:"Link Symbol"},{code:"1F489",desc:"Syringe"},{code:"1F48A",desc:"Pill"},{code:"1F6AC",desc:"Smoking Symbol"},{code:"1F5FF",desc:"Moyai"},{code:"1F52E",desc:"Crystal Ball"}]},{id:"symbols",name:"Symbols",code:"1F3E7",emoticons:[{code:"1F3E7",desc:"Automated Teller Machine"},{code:"1F6AE",desc:"Put Litter in Its Place Symbol"},{code:"1F6B0",desc:"Potable Water Symbol"},{code:"267F",desc:"Wheelchair Symbol"},{code:"1F6B9",desc:"Mens Symbol"},{code:"1F6BA",desc:"Womens Symbol"},{code:"1F6BB",desc:"Restroom"},{code:"1F6BC",desc:"Baby Symbol"},{code:"1F6BE",desc:"Water Closet"},{code:"1F6C2",desc:"Passport Control"},{code:"1F6C3",desc:"Customs"},{code:"1F6C4",desc:"Baggage Claim"},{code:"1F6C5",desc:"Left Luggage"},{code:"26A0",desc:"Warning Sign"},{code:"1F6B8",desc:"Children Crossing"},{code:"26D4",desc:"No Entry"},{code:"1F6AB",desc:"No Entry Sign"},{code:"1F6B3",desc:"No Bicycles"},{code:"1F6AD",desc:"No Smoking Symbol"},{code:"1F6AF",desc:"Do Not Litter Symbol"},{code:"1F6B1",desc:"Non-Potable Water Symbol"},{code:"1F6B7",desc:"No Pedestrians"},{code:"1F4F5",desc:"No Mobile Phones"},{code:"1F51E",desc:"No One Under Eighteen Symbol"},{code:"2B06",desc:"Upwards Black Arrow"},{code:"2197",desc:"North East Arrow"},{code:"27A1",desc:"Black Rightwards Arrow"},{code:"2198",desc:"South East Arrow"},{code:"2B07",desc:"Downwards Black Arrow"},{code:"2199",desc:"South West Arrow"},{code:"2B05",desc:"Leftwards Black Arrow"},{code:"2196",desc:"North West Arrow"},{code:"2195",desc:"Up Down Arrow"},{code:"2194",desc:"Left Right Arrow"},{code:"21A9",desc:"Leftwards Arrow with Hook"},{code:"21AA",desc:"Rightwards Arrow with Hook"},{code:"2934",desc:"Arrow Pointing Rightwards Then Curving Upwards"},{code:"2935",desc:"Arrow Pointing Rightwards Then Curving Downwards"},{code:"1F503",desc:"Clockwise Downwards and Upwards Open Circle Arrows"},{code:"1F504",desc:"Anticlockwise Downwards and Upwards Open Circle Arrows"},{code:"1F519",desc:"Back with Leftwards Arrow Above"},{code:"1F51A",desc:"End with Leftwards Arrow Above"},{code:"1F51B",desc:"On with Exclamation Mark with Left Right Arrow Above"},{code:"1F51C",desc:"Soon with Rightwards Arrow Above"},{code:"1F51D",desc:"Top with Upwards Arrow Above"},{code:"1F52F",desc:"Six Pointed Star with Middle Dot"},{code:"2648",desc:"Aries"},{code:"2649",desc:"Taurus"},{code:"264A",desc:"Gemini"},{code:"264B",desc:"Cancer"},{code:"264C",desc:"Leo"},{code:"264D",desc:"Virgo"},{code:"264E",desc:"Libra"},{code:"264F",desc:"Scorpius"},{code:"2650",desc:"Sagittarius"},{code:"2651",desc:"Capricorn"},{code:"2652",desc:"Aquarius"},{code:"2653",desc:"Pisces"},{code:"26CE",desc:"Ophiuchus"},{code:"1F500",desc:"Twisted Rightwards Arrows"},{code:"1F501",desc:"Clockwise Rightwards and Leftwards Open Circle Arrows"},{code:"1F502",desc:"Clockwise Rightwards and Leftwards Open Circle Arrows with Circled One Overlay"},{code:"25B6",desc:"Black Right-Pointing Triangle"},{code:"23E9",desc:"Black Right-Pointing Double Triangle"},{code:"25C0",desc:"Black Left-Pointing Triangle"},{code:"23EA",desc:"Black Left-Pointing Double Triangle"},{code:"1F53C",desc:"Up-Pointing Small Red Triangle"},{code:"23EB",desc:"Black Up-Pointing Double Triangle"},{code:"1F53D",desc:"Down-Pointing Small Red Triangle"},{code:"23EC",desc:"Black Down-Pointing Double Triangle"},{code:"1F3A6",desc:"Cinema"},{code:"1F505",desc:"Low Brightness Symbol"},{code:"1F506",desc:"High Brightness Symbol"},{code:"1F4F6",desc:"Antenna with Bars"},{code:"1F4F3",desc:"Vibration Mode"},{code:"1F4F4",desc:"Mobile Phone off"},{code:"267B",desc:"Black Universal Recycling Symbol"},{code:"1F531",desc:"Trident Emblem"},{code:"1F4DB",desc:"Name Badge"},{code:"1F530",desc:"Japanese Symbol for Beginner"},{code:"2B55",desc:"Heavy Large Circle"},{code:"2705",desc:"White Heavy Check Mark"},{code:"2611",desc:"Ballot Box with Check"},{code:"2714",desc:"Heavy Check Mark"},{code:"2716",desc:"Heavy Multiplication X"},{code:"274C",desc:"Cross Mark"},{code:"274E",desc:"Negative Squared Cross Mark"},{code:"2795",desc:"Heavy Plus Sign"},{code:"2796",desc:"Heavy Minus Sign"},{code:"2797",desc:"Heavy Division Sign"},{code:"27B0",desc:"Curly Loop"},{code:"27BF",desc:"Double Curly Loop"},{code:"303D",desc:"Part Alternation Mark"},{code:"2733",desc:"Eight Spoked Asterisk"},{code:"2734",desc:"Eight Pointed Black Star"},{code:"2747",desc:"Sparkle"},{code:"203C",desc:"Double Exclamation Mark"},{code:"2049",desc:"Exclamation Question Mark"},{code:"2753",desc:"Black Question Mark Ornament"},{code:"2754",desc:"White Question Mark Ornament"},{code:"2755",desc:"White Exclamation Mark Ornament"},{code:"2757",desc:"Heavy Exclamation Mark Symbol"},{code:"3030",desc:"Wavy Dash"},{code:"2122",desc:"Trade Mark Sign"},{code:"1F51F",desc:"Keycap Ten"},{code:"1F4AF",desc:"Hundred Points Symbol"},{code:"1F520",desc:"Input Symbol for Latin Capital Letters"},{code:"1F521",desc:"Input Symbol for Latin Small Letters"},{code:"1F522",desc:"Input Symbol for Numbers"},{code:"1F523",desc:"Input Symbol for Symbols"},{code:"1F524",desc:"Input Symbol for Latin Letters"},{code:"1F170",desc:"Negative Squared Latin Capital Letter a"},{code:"1F18E",desc:"Negative Squared Ab"},{code:"1F171",desc:"Negative Squared Latin Capital Letter B"},{code:"1F191",desc:"Squared Cl"},{code:"1F192",desc:"Squared Cool"},{code:"1F193",desc:"Squared Free"},{code:"2139",desc:"Information Source"},{code:"1F194",desc:"Squared Id"},{code:"24C2",desc:"Circled Latin Capital Letter M"},{code:"1F195",desc:"Squared New"},{code:"1F196",desc:"Squared Ng"},{code:"1F17E",desc:"Negative Squared Latin Capital Letter O"},{code:"1F197",desc:"Squared Ok"},{code:"1F17F",desc:"Negative Squared Latin Capital Letter P"},{code:"1F198",desc:"Squared Sos"},{code:"1F199",desc:"Squared Up with Exclamation Mark"},{code:"1F19A",desc:"Squared Vs"},{code:"1F201",desc:"Squared Katakana Koko"},{code:"1F202",desc:"Squared Katakana Sa"},{code:"1F237",desc:"Squared Cjk Unified Ideograph-6708"},{code:"1F236",desc:"Squared Cjk Unified Ideograph-6709"},{code:"1F22F",desc:"Squared Cjk Unified Ideograph-6307"},{code:"1F250",desc:"Circled Ideograph Advantage"},{code:"1F239",desc:"Squared Cjk Unified Ideograph-5272"},{code:"1F21A",desc:"Squared Cjk Unified Ideograph-7121"},{code:"1F232",desc:"Squared Cjk Unified Ideograph-7981"},{code:"1F251",desc:"Circled Ideograph Accept"},{code:"1F238",desc:"Squared Cjk Unified Ideograph-7533"},{code:"1F234",desc:"Squared Cjk Unified Ideograph-5408"},{code:"1F233",desc:"Squared Cjk Unified Ideograph-7a7a"},{code:"3297",desc:"Circled Ideograph Congratulation"},{code:"3299",desc:"Circled Ideograph Secret"},{code:"1F23A",desc:"Squared Cjk Unified Ideograph-55b6"},{code:"1F235",desc:"Squared Cjk Unified Ideograph-6e80"},{code:"25AA",desc:"Black Small Square"},{code:"25AB",desc:"White Small Square"},{code:"25FB",desc:"White Medium Square"},{code:"25FC",desc:"Black Medium Square"},{code:"25FD",desc:"White Medium Small Square"},{code:"25FE",desc:"Black Medium Small Square"},{code:"2B1B",desc:"Black Large Square"},{code:"2B1C",desc:"White Large Square"},{code:"1F536",desc:"Large Orange Diamond"},{code:"1F537",desc:"Large Blue Diamond"},{code:"1F538",desc:"Small Orange Diamond"},{code:"1F539",desc:"Small Blue Diamond"},{code:"1F53A",desc:"Up-Pointing Red Triangle"},{code:"1F53B",desc:"Down-Pointing Red Triangle"},{code:"1F4A0",desc:"Diamond Shape with a Dot Inside"},{code:"1F518",desc:"Radio Button"},{code:"1F532",desc:"Black Square Button"},{code:"1F533",desc:"White Square Button"},{code:"26AA",desc:"Medium White Circle"},{code:"26AB",desc:"Medium Black Circle"},{code:"1F534",desc:"Large Red Circle"},{code:"1F535",desc:"Large Blue Circle"}]},{id:"flags",name:"Flags",code:"1F3C1",emoticons:[{code:"1f3c1",desc:"Chequered Flag"},{code:"1f1e8-1f1f3",desc:"China Flag"},{code:"1f38c",desc:"Crossed Flags"},{code:"1f1e9-1f1ea",desc:"Germany Flag"},{code:"1f1ea-1f1f8",desc:"Spain Flag"},{code:"1f1e6-1f1e8",desc:"Ascension Island Flag"},{code:"1f1e6-1f1e9",desc:"Andorra Flag"},{code:"1f1e6-1f1ea",desc:"United Arab Emirates Flag"},{code:"1f1e6-1f1eb",desc:"Afghanistan Flag"},{code:"1f1e6-1f1ec",desc:"Antigua & Barbuda Flag"},{code:"1f1e6-1f1ee",desc:"Anguilla Flag"},{code:"1f1e6-1f1f1",desc:"Albania Flag"},{code:"1f1e6-1f1f2",desc:"Armenia Flag"},{code:"1f1e6-1f1f4",desc:"Angola Flag"},{code:"1f1e6-1f1f6",desc:"Antarctica Flag"},{code:"1f1e6-1f1f7",desc:"Argentina Flag"},{code:"1f1e6-1f1f8",desc:"American Samoa Flag"},{code:"1f1e6-1f1f9",desc:"Austria Flag"},{code:"1f1e6-1f1fa",desc:"Australia Flag"},{code:"1f1e6-1f1fc",desc:"Aruba Flag"},{code:"1f1e6-1f1fd",desc:"\xc5land Islands Flag"},{code:"1f1e6-1f1ff",desc:"Azerbaijan Flag"},{code:"1f1e7-1f1e7",desc:"Barbados Flag"},{code:"1f1e7-1f1e9",desc:"Bangladesh Flag"},{code:"1f1e7-1f1ea",desc:"Belgium Flag"},{code:"1f1e7-1f1eb",desc:"Burkina Faso Flag"},{code:"1f1e7-1f1ec",desc:"Bulgaria Flag"},{code:"1f1e7-1f1ed",desc:"Bahrain Flag"},{code:"1f1e7-1f1ee",desc:"Burundi Flag"},{code:"1f1e7-1f1ef",desc:"Benin Flag"},{code:"1f1e7-1f1f1",desc:"St. Barth\xe9lemy Flag"},{code:"1f1e7-1f1f2",desc:"Bermuda Flag"},{code:"1f1e7-1f1f4",desc:"Bolivia Flag"},{code:"1f1e7-1f1f6",desc:"Caribbean Netherlands Flag"},{code:"1f1e7-1f1f7",desc:"Brazil Flag"},{code:"1f1e7-1f1f8",desc:"Bahamas Flag"},{code:"1f1e7-1f1f9",desc:"Bhutan Flag"},{code:"1f1e7-1f1fb",desc:"Bouvet Island Flag"},{code:"1f1e7-1f1fc",desc:"Botswana Flag"},{code:"1f1e7-1f1fe",desc:"Belarus Flag"},{code:"1f1e7-1f1ff",desc:"Belize Flag"},{code:"1f1e8-1f1e6",desc:"Canada Flag"},{code:"1f1e8-1f1e8",desc:"Cocos (keeling) Islands Flag"},{code:"1f1e8-1f1e9",desc:"Congo - Kinshasa Flag"},{code:"1f1e8-1f1eb",desc:"Central African Republic Flag"},{code:"1f1e8-1f1ec",desc:"Congo - Brazzaville Flag"},{code:"1f1e8-1f1ed",desc:"Switzerland Flag"},{code:"1f1e8-1f1ee",desc:"C\xf4te D\u2019ivoire Flag"},{code:"1f1e8-1f1f0",desc:"Cook Islands Flag"},{code:"1f1e8-1f1f1",desc:"Chile Flag"},{code:"1f1e8-1f1f2",desc:"Cameroon Flag"},{code:"1f1e8-1f1f4",desc:"Colombia Flag"},{code:"1f1e8-1f1f7",desc:"Costa Rica Flag"},{code:"1f1e8-1f1fa",desc:"Cuba Flag"},{code:"1f1e8-1f1fb",desc:"Cape Verde Flag"},{code:"1f1e8-1f1fc",desc:"Cura\xe7ao Flag"},{code:"1f1e8-1f1fd",desc:"Christmas Island Flag"},{code:"1f1e8-1f1fe",desc:"Cyprus Flag"},{code:"1f1e8-1f1ff",desc:'Czechia Flag"'},{code:"1f1e9-1f1ec",desc:"Diego Garcia Flag"},{code:"1f1e9-1f1ef",desc:"Djibouti Flag"},{code:"1f1e9-1f1f0",desc:"Denmark Flag"},{code:"1f1e9-1f1f2",desc:"Dominica Flag"},{code:"1f1e9-1f1f4",desc:"Dominican Republic Flag"},{code:"1f1e9-1f1ff",desc:"Algeria Flag"},{code:"1f1ea-1f1e6",desc:"Ceuta & Melilla Flag"},{code:"1f1ea-1f1e8",desc:"Ecuador Flag"},{code:"1f1ea-1f1ea",desc:"Estonia Flag"},{code:"1f1ea-1f1ec",desc:"Egypt Flag"},{code:"1f1ea-1f1ed",desc:"Western Sahara Flag"},{code:"1f1ea-1f1f7",desc:"Eritrea Flag"},{code:"1f1ea-1f1f9",desc:"Ethiopia Flag"},{code:"1f1ea-1f1fa",desc:"European Union Flag"},{code:"1f1eb-1f1ee",desc:"Finland Flag"},{code:"1f1eb-1f1ef",desc:"Fiji Flag"},{code:"1f1eb-1f1f0",desc:"Falkland Islands Flag"},{code:"1f1eb-1f1f2",desc:"Micronesia Flag"},{code:"1f1eb-1f1f4",desc:"Faroe Islands Flag"},{code:"1f1ec-1f1e6",desc:"Gabon Flag"},{code:"1f1ec-1f1e9",desc:"Grenada Flag"},{code:"1f1ec-1f1ea",desc:"Georgia Flag"},{code:"1f1ec-1f1eb",desc:"French Guiana Flag"},{code:"1f1ec-1f1ec",desc:"Guernsey Flag"},{code:"1f1ec-1f1ed",desc:"Ghana Flag"},{code:"1f1ec-1f1ee",desc:"Gibraltar Flag"},{code:"1f1ec-1f1f1",desc:"Greenland Flag"},{code:"1f1ec-1f1f2",desc:"Gambia Flag"},{code:"1f1ec-1f1f3",desc:"Guinea Flag"},{code:"1f1ec-1f1f5",desc:"Guadeloupe Flag"},{code:"1f1ec-1f1f6",desc:"Equatorial Guinea Flag"},{code:"1f1ec-1f1f7",desc:"Greece Flag"},{code:"1f1ec-1f1f8",desc:"South Georgia & South Sandwich Islands Flag"},{code:"1f1ec-1f1f9",desc:"Guatemala Flag"},{code:"1f1ec-1f1fa",desc:"Guam Flag"},{code:"1f1ec-1f1fc",desc:"Guinea-Bissau Flag"},{code:"1f1ec-1f1fe",desc:"Guyana Flag"},{code:"1f1ed-1f1f0",desc:"Hong Kong Sar China Flag"},{code:"1f1ed-1f1f2",desc:"Heard & Mcdonald Islands Flag"},{code:"1f1ed-1f1f3",desc:"Honduras Flag"},{code:"1f1ed-1f1f7",desc:"Croatia Flag"},{code:"1f1ed-1f1f9",desc:"Haiti Flag"},{code:"1f1ed-1f1fa",desc:"Hungary Flag"},{code:"1f1ee-1f1e8",desc:"Canary Islands Flag"},{code:"1f1ee-1f1e9",desc:"Indonesia Flag"},{code:"1f1ee-1f1ea",desc:"Ireland Flag"},{code:"1f1ee-1f1f1",desc:"Israel Flag"},{code:"1f1ee-1f1f2",desc:"Isle of Man Flag"},{code:"1f1ee-1f1f3",desc:"India Flag"},{code:"1f1ee-1f1f4",desc:"British Indian Ocean Territory Flag"},{code:"1f1ee-1f1f6",desc:"Iraq Flag"},{code:"1f1ee-1f1f7",desc:"Iran Flag"},{code:"1f1ee-1f1f8",desc:"Iceland Flag"},{code:"1f1ef-1f1ea",desc:"Jersey Flag"},{code:"1f1ef-1f1f2",desc:"Jamaica Flag"},{code:"1f1ef-1f1f4",desc:"Jordan Flag"},{code:"1f1f0-1f1ea",desc:"Kenya Flag"},{code:"1f1f0-1f1ec",desc:"Kyrgyzstan Flag"},{code:"1f1f0-1f1ed",desc:"Cambodia Flag"},{code:"1f1f0-1f1ee",desc:"Kiribati Flag"},{code:"1f1f0-1f1f2",desc:"Comoros Flag"},{code:"1f1f0-1f1f3",desc:"St. Kitts & Nevis Flag"},{code:"1f1f0-1f1f5",desc:"North Korea Flag"},{code:"1f1f0-1f1fc",desc:"Kuwait Flag"},{code:"1f1f0-1f1fe",desc:"Cayman Islands Flag"},{code:"1f1f0-1f1ff",desc:"Kazakhstan Flag"},{code:"1f1f1-1f1e6",desc:"Laos Flag"},{code:"1f1f1-1f1e7",desc:"Lebanon Flag"},{code:"1f1f1-1f1e8",desc:"St. Lucia Flag"},{code:"1f1f1-1f1ee",desc:"Liechtenstein Flag"},{code:"1f1f1-1f1f0",desc:"Sri Lanka Flag"},{code:"1f1f1-1f1f7",desc:"Liberia Flag"},{code:"1f1f1-1f1f8",desc:"Lesotho Flag"},{code:"1f1f1-1f1f9",desc:"Lithuania Flag"},{code:"1f1f1-1f1fa",desc:"Luxembourg Flag"},{code:"1f1f1-1f1fb",desc:"Latvia Flag"},{code:"1f1f1-1f1fe",desc:"Libya Flag"},{code:"1f1f2-1f1e6",desc:"Morocco Flag"},{code:"1f1f2-1f1e8",desc:"Monaco Flag"},{code:"1f1f2-1f1e9",desc:"Moldova Flag"},{code:"1f1f2-1f1ea",desc:"Montenegro Flag"},{code:"1f1f2-1f1eb",desc:"St. Martin Flag"},{code:"1f1f2-1f1ec",desc:"Madagascar Flag"},{code:"1f1f2-1f1ed",desc:"Marshall Islands Flag"},{code:"1f1f2-1f1f0",desc:"Macedonia Flag"},{code:"1f1f2-1f1f1",desc:"Mali Flag"},{code:"1f1f2-1f1f2",desc:"Myanmar (burma) Flag"},{code:"1f1f2-1f1f3",desc:"Mongolia Flag"},{code:"1f1f2-1f1f4",desc:"Macau Sar China Flag"},{code:"1f1f2-1f1f5",desc:"Northern Mariana Islands Flag"},{code:"1f1f2-1f1f6",desc:"Martinique Flag"},{code:"1f1f2-1f1f7",desc:"Mauritania Flag"},{code:"1f1f2-1f1f8",desc:"Montserrat Flag"},{code:"1f1f2-1f1f9",desc:"Malta Flag"},{code:"1f1f2-1f1fa",desc:"Mauritius Flag"},{code:"1f1f2-1f1fb",desc:"Maldives Flag"},{code:"1f1f2-1f1fc",desc:"Malawi Flag"},{code:"1f1f2-1f1fd",desc:"Mexico Flag"},{code:"1f1f2-1f1fe",desc:"Malaysia Flag"},{code:"1f1f2-1f1ff",desc:"Mozambique Flag"},{code:"1f1f3-1f1e6",desc:"Namibia Flag"},{code:"1f1f3-1f1e8",desc:"New Caledonia Flag"},{code:"1f1f3-1f1ea",desc:"Niger Flag"},{code:"1f1f3-1f1eb",desc:"Norfolk Island Flag"},{code:"1f1f3-1f1ec",desc:"Nigeria Flag"},{code:"1f1f3-1f1ee",desc:"Nicaragua Flag"},{code:"1f1f3-1f1f1",desc:"Netherlands Flag"},{code:"1f1f3-1f1f4",desc:"Norway Flag"},{code:"1f1f3-1f1f5",desc:"Nepal Flag"},{code:"1f1f3-1f1f7",desc:"Nauru Flag"},{code:"1f1f3-1f1fa",desc:"Niue Flag"},{code:"1f1f3-1f1ff",desc:"New Zealand Flag"},{code:"1f1f4-1f1f2",desc:"Oman Flag"},{code:"1f1f8-1f1ff",desc:"Swaziland Flag"},{code:"1f1f5-1f1e6",desc:"Panama Flag"},{code:"1f1f5-1f1ea",desc:"Peru Flag"},{code:"1f1f5-1f1eb",desc:"French Polynesia Flag"},{code:"1f1f5-1f1ec",desc:"Papua New Guinea Flag"},{code:"1f1f5-1f1ed",desc:"Philippines Flag"},{code:"1f1f5-1f1f0",desc:"Pakistan Flag"},{code:"1f1f5-1f1f1",desc:"Poland Flag"},{code:"1f1f5-1f1f2",desc:"St. Pierre & Miquelon Flag"},{code:"1f1f5-1f1f3",desc:"Pitcairn Islands Flag"},{code:"1f1f5-1f1f7",desc:"Puerto Rico Flag"},{code:"1f1f5-1f1f8",desc:"Palestinian Territories Flag"},{code:"1f1f5-1f1f9",desc:"Portugal Flag"},{code:"1f1f5-1f1fc",desc:"Palau Flag"},{code:"1f1f5-1f1fe",desc:"Paraguay Flag"},{code:"1f1f6-1f1e6",desc:"Qatar Flag"},{code:"1f1f7-1f1ea",desc:"R\xe9union Flag"},{code:"1f1f7-1f1f4",desc:"Romania Flag"},{code:"1f1f7-1f1f8",desc:"Serbia Flag"},{code:"1f1f7-1f1fc",desc:"Rwanda Flag"},{code:"1f1f8-1f1e6",desc:"Saudi Arabia Flag"},{code:"1f1f8-1f1e7",desc:"Solomon Islands Flag"},{code:"1f1f8-1f1e8",desc:"Seychelles Flag"},{code:"1f1f8-1f1e9",desc:"Sudan Flag"},{code:"1f1f8-1f1ea",desc:"Sweden Flag"},{code:"1f1f8-1f1ec",desc:"Singapore Flag"},{code:"1f1f8-1f1ee",desc:"Slovenia Flag"},{code:"1f1f8-1f1ed",desc:"St. Helena Flag"},{code:"1f1f8-1f1ef",desc:"Svalbard & Jan Mayen Flag"},{code:"1f1f8-1f1f1",desc:"Sierra Leone Flag"},{code:"1f1f8-1f1f2",desc:"San Marino Flag"},{code:"1f1f8-1f1f3",desc:"Senegal Flag"},{code:"1f1f8-1f1f4",desc:"Somalia Flag"},{code:"1f1f8-1f1f7",desc:"Suriname Flag"},{code:"1f1f8-1f1f8",desc:"South Sudan Flag"},{code:"1f1f8-1f1f9",desc:"S\xe3o Tom\xe9 & Pr\xedncipe Flag"},{code:"1f1f8-1f1fb",desc:"El Salvador Flag"},{code:"1f1f8-1f1fd",desc:"Sint Maarten Flag"},{code:"1f1f8-1f1fe",desc:"Syria Flag"},{code:"1f1f9-1f1e6",desc:"Tristan Da Cunha Flag"},{code:"1f1f9-1f1e8",desc:"Turks & Caicos Islands Flag"},{code:"1f1f9-1f1eb",desc:"French Southern Territories Flag"},{code:"1f1f9-1f1ec",desc:"Togo Flag"},{code:"1f1f9-1f1ed",desc:"Thailand Flag"},{code:"1f1f9-1f1ef",desc:"Tajikistan Flag"},{code:"1f1f9-1f1f0",desc:"Tokelau Flag"},{code:"1f1f9-1f1f1",desc:"Timor-Leste Flag"},{code:"1f1f9-1f1f2",desc:"Turkmenistan Flag"},{code:"1f1f9-1f1f3",desc:"Tunisia Flag"},{code:"1f1f9-1f1f4",desc:"Tonga Flag"},{code:"1f1f9-1f1f7",desc:"Turkey Flag"},{code:"1f1f9-1f1f9",desc:"Trinidad & Tobago Flag"},{code:"1f1f9-1f1fb",desc:"Tuvalu Flag"},{code:"1f1f9-1f1fc",desc:"Taiwan Flag"},{code:"1f1f9-1f1ff",desc:"Tanzania Flag"},{code:"1f1fa-1f1e6",desc:"Ukraine City Flag"},{code:"1f1fa-1f1ec",desc:"Uganda Flag"},{code:"1f1fa-1f1f2",desc:"U.s. Outlying Islands Flag"},{code:"1f1fa-1f1fe",desc:"Uruguay Flag"},{code:"1f1fa-1f1ff",desc:"Uzbekistan Flag"},{code:"1f1fb-1f1e6",desc:"Vatican City Flag"},{code:"1f1fb-1f1e8",desc:"St. Vincent & Grenadines Flag"},{code:"1f1fb-1f1ea",desc:"Venezuela Flag"},{code:"1f1fb-1f1ec",desc:"British Virgin Islands Flag"},{code:"1f1fb-1f1ee",desc:"U.s. Virgin Islands Flag"},{code:"1f1fb-1f1f3",desc:"Vietnam Flag"},{code:"1f1fc-1f1f8",desc:"Samoa Flag"},{code:"1f1fb-1f1fa",desc:"Vanuatu Flag"},{code:"1f1fc-1f1eb",desc:'"Wallis & Futuna Flag'},{code:"1f1fd-1f1f0",desc:"Kosovo Flag"},{code:"1f1fe-1f1ea",desc:"Yemen Flag"},{code:"1f1fe-1f1f9",desc:"Mayotte Flag"},{code:"1f1ff-1f1e6",desc:"South Africa Flag"},{code:"1f1ff-1f1f2",desc:"Zambia Flag"},{code:"1f1ff-1f1fc",desc:"Zimbabwe Flag"},{code:"1f1eb-1f1f7",desc:"France Flag"},{code:"1f1ec-1f1e7",desc:"United Kingdom Flag"},{code:"1f1ee-1f1f9",desc:"Italy Flag"},{code:"1f1ef-1f1f5",desc:"Japan Flag"},{code:"1f1f0-1f1f7",desc:"South Korea Flag"},{code:"1f1f7-1f1fa",desc:"Russia Flag"},{code:"1F6A9",desc:"Triangular Flag on Post"},{code:"1f1fa-1f1f8",desc:"United States Flag"}]}],emoticonsButtons:["emoticonsBack","|"],emoticonsUseImage:!0}),S.PLUGINS.emoticons=function(m){var C=m.$,a=m.opts.emoticonsSet,s=a&&a[0],f="";function i(){if(!m.selection.isCollapsed())return!1;var e=m.selection.element(),c=m.selection.endElement();if(e&&m.node.hasClass(e,"fr-emoticon"))return e;if(c&&m.node.hasClass(c,"fr-emoticon"))return c;var d=m.selection.ranges(0),o=d.startContainer;if(o.nodeType==Node.ELEMENT_NODE&&0<o.childNodes.length&&0<d.startOffset){var a=o.childNodes[d.startOffset-1];if(m.node.hasClass(a,"fr-emoticon"))return a}return!1}function n(){return"".concat(function o(e,c){return'<div class="fr-buttons fr-tabs fr-tabs-scroll">\n '.concat(function d(e,o){var a="";return e.forEach(function(e){var c={image:e.code.toLowerCase()},d={elementClass:e.id===o.id?"fr-active fr-active-tab":"",emoticonsUnicodeClass:m.opts.emoticonsUseImage?"":"fr-tabs-unicode",title:m.language.translate(e.name),dataCmd:"setEmoticonCategory",dataParam1:e.id,image:m.opts.emoticonsUseImage?'<img src="https://cdnjs.cloudflare.com/ajax/libs/emojione/2.0.1/assets/svg/'.concat(c.image,'.svg"/>'):"&#x".concat(c.image,";")};a+='<button class="fr-command fr-btn '.concat(d.elementClass," ").concat(d.emoticonsUnicodeClass,'" \n title="').concat(d.title,'" data-cmd="').concat(d.dataCmd,'" data-param1="').concat(d.dataParam1,'">\n ').concat(d.image," </button>")}),a}(e,c),"\n </div>")}(a,s),"\n ").concat(function d(e){return'\n <div class="fr-icon-container fr-emoticon-container">\n '.concat(function c(e){var a="";return e.emoticons.forEach(function(e){var c=e.code.split("-").reduce(function(e,c){return e?"".concat(e,"&zwj;&#x").concat(c.toLowerCase(),";"):"&#x".concat(c.toLowerCase(),";")},""),d={image:e.code.toLowerCase(),compiledCode:e.uCode?e.uCode:c},o={dataParam1:e.code.toLowerCase(),dataParam2:d.compiledCode,title:m.language.translate(e.desc),image:m.opts.emoticonsUseImage?'<img src="https://cdnjs.cloudflare.com/ajax/libs/emojione/2.0.1/assets/svg/'.concat(d.image,'.svg"/>'):"".concat(d.compiledCode),desc:m.language.translate(e.desc)};a+='<span class="fr-command fr-emoticon fr-icon" role="button" \n data-cmd="insertEmoticon" data-param1="'.concat(o.dataParam1,'" \n data-param2="').concat(o.dataParam2,'" title="').concat(o.title,'" >\n ').concat(o.image,'<span class="fr-sr-only">').concat(o.desc,"&nbsp;&nbsp;&nbsp;</span></span>")}),a}(e),"\n </div>\n ")}(s),"\n ").concat(function e(){return m.opts.emoticonsUseImage?'<p style="font-size: 12px; text-align: center; padding: 0 5px;">Emoji free by <a class="fr-link" tabIndex="-1" href="http://emojione.com/" target="_blank" rel="nofollow noopener noreferrer" role="link" aria-label="Open Emoji One website.">Emoji One</a></p>':""}())}return{_init:function e(){var d=function d(){for(var e=m.el.querySelectorAll(".fr-emoticon:not(.fr-deletable)"),c=0;c<e.length;c++)e[c].className+=" fr-deletable"};d(),m.events.on("html.set",d),m.events.on("keydown",function(e){if(m.keys.isCharacter(e.which)&&m.selection.inEditor()){var c=m.selection.ranges(0),d=i();m.node.hasClass(d,"fr-emoticon-img")&&d&&(0===c.startOffset&&m.selection.element()===d?C(d).before(S.MARKERS+S.INVISIBLE_SPACE):C(d).after(S.INVISIBLE_SPACE+S.MARKERS),m.selection.restore())}}),m.events.on("keyup",function(e){for(var c=m.el.querySelectorAll(".fr-emoticon"),d=0;d<c.length;d++)"undefined"!=typeof c[d].textContent&&0===c[d].textContent.replace(/\u200B/gi,"").length&&C(c[d]).remove();if(!(e.which>=S.KEYCODE.ARROW_LEFT&&e.which<=S.KEYCODE.ARROW_DOWN)){var o=i();m.node.hasClass(o,"fr-emoticon-img")&&(C(o).append(S.MARKERS),m.selection.restore())}})},insert:function t(e,c){var d=i(),o=m.selection.ranges(0);d?(0===o.startOffset&&m.selection.element()===d?C(d).before(S.MARKERS+S.INVISIBLE_SPACE):0<o.startOffset&&m.selection.element()===d&&o.commonAncestorContainer.parentNode.classList.contains("fr-emoticon")&&C(d).after(S.INVISIBLE_SPACE+S.MARKERS),m.selection.restore(),m.html.insert('<span class="fr-emoticon fr-deletable'.concat(c?" fr-emoticon-img":"",'"').concat(c?' style="background: url('.concat(c,');"'):"",">").concat(c?"&nbsp;":e,"</span>&nbsp;").concat(S.MARKERS),!0)):m.html.insert('<span class="fr-emoticon fr-deletable'.concat(c?" fr-emoticon-img":"",'"').concat(c?' style="background: url('.concat(c,');"'):"",">").concat(c?"&nbsp;":e,"</span>&nbsp;"),!0)},setEmoticonCategory:function d(c){s=a.filter(function(e){return e.id===c})[0],function e(){m.popups.get("emoticons").html(f+n())}()},showEmoticonsPopup:function l(){var e=m.popups.get("emoticons");if(e||(e=function s(){m.opts.toolbarInline&&0<m.opts.emoticonsButtons.length&&(f='<div class="fr-buttons fr-emoticons-buttons fr-tabs">'.concat(m.button.buildList(m.opts.emoticonsButtons),"</div>"));var e={buttons:f,custom_layer:n()},c=m.popups.create("emoticons",e);return function d(h){m.events.on("popup.tab",function(e){var c=C(e.currentTarget);if(!m.popups.isVisible("emoticons")||!c.is("span, a"))return!0;var d,o,a,s=e.which;if(S.KEYCODE.TAB==s){if(c.is("span.fr-emoticon")&&e.shiftKey||c.is("a")&&!e.shiftKey){var f=h.find(".fr-buttons");d=!m.accessibility.focusToolbar(f,!!e.shiftKey)}if(!1!==d){var i=h.find("span.fr-emoticon:focus").first().concat(h.findVisible(" div.fr-tabs").first().concat(h.find("a")));c.is("span.fr-emoticon")&&(i=i.not("span.fr-emoticon:not(:focus)")),o=i.index(c),o=e.shiftKey?((o-1)%i.length+i.length)%i.length:(o+1)%i.length,a=i.get(o),m.events.disableBlur(),a.focus(),d=!1}}else if(S.KEYCODE.ARROW_UP==s||S.KEYCODE.ARROW_DOWN==s||S.KEYCODE.ARROW_LEFT==s||S.KEYCODE.ARROW_RIGHT==s){if(c.is("span.fr-emoticon")){var n=c.parent().find("span.fr-emoticon");o=n.index(c);var t=m.opts.emoticonsStep,l=Math.floor(n.length/t),r=o%t,F=Math.floor(o/t),g=F*t+r,u=l*t;S.KEYCODE.ARROW_UP==s?g=((g-t)%u+u)%u:S.KEYCODE.ARROW_DOWN==s?g=(g+t)%u:S.KEYCODE.ARROW_LEFT==s?g=((g-1)%u+u)%u:S.KEYCODE.ARROW_RIGHT==s&&(g=(g+1)%u),a=C(n.get(g)),m.events.disableBlur(),a.focus(),d=!1}}else S.KEYCODE.ENTER==s&&(c.is("a")?c[0].click():m.button.exec(c),d=!1);return!1===d&&(e.preventDefault(),e.stopPropagation()),d},!0)}(c),c}()),!e.hasClass("fr-active")){m.popups.refresh("emoticons"),m.popups.setContainer("emoticons",m.$tb);var c=m.$tb.find('.fr-command[data-cmd="emoticons"]'),d=m.button.getPosition(c),o=d.left,a=d.top;m.popups.show("emoticons",o,a,c.outerHeight())}},back:function c(){m.popups.hide("emoticons"),m.toolbar.showInline()}}},S.DefineIcon("emoticons",{NAME:"smile-o",FA5NAME:"smile",SVG_KEY:"smile"}),S.RegisterCommand("emoticons",{title:"Emoticons",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("emoticons")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("emoticons")):this.emoticons.showEmoticonsPopup()},plugin:"emoticons"}),S.RegisterCommand("insertEmoticon",{callback:function(e,c,d){this.emoticons.insert(d,this.opts.emoticonsUseImage?"https://cdnjs.cloudflare.com/ajax/libs/emojione/2.0.1/assets/svg/".concat(c,".svg"):null),this.popups.hide("emoticons")}}),S.RegisterCommand("setEmoticonCategory",{undo:!1,focus:!1,callback:function(e,c){this.emoticons.setEmoticonCategory(c)}}),S.DefineIcon("emoticonsBack",{NAME:"arrow-left",SVG_KEY:"back"}),S.RegisterCommand("emoticonsBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.emoticons.back()}})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
7
  !function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],a):a(e.FroalaEditor)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.DEFAULTS,{entities:"&quot;&#39;&iexcl;&cent;&pound;&curren;&yen;&brvbar;&sect;&uml;&copy;&ordf;&laquo;&not;&shy;&reg;&macr;&deg;&plusmn;&sup2;&sup3;&acute;&micro;&para;&middot;&cedil;&sup1;&ordm;&raquo;&frac14;&frac12;&frac34;&iquest;&Agrave;&Aacute;&Acirc;&Atilde;&Auml;&Aring;&AElig;&Ccedil;&Egrave;&Eacute;&Ecirc;&Euml;&Igrave;&Iacute;&Icirc;&Iuml;&ETH;&Ntilde;&Ograve;&Oacute;&Ocirc;&Otilde;&Ouml;&times;&Oslash;&Ugrave;&Uacute;&Ucirc;&Uuml;&Yacute;&THORN;&szlig;&agrave;&aacute;&acirc;&atilde;&auml;&aring;&aelig;&ccedil;&egrave;&eacute;&ecirc;&euml;&igrave;&iacute;&icirc;&iuml;&eth;&ntilde;&ograve;&oacute;&ocirc;&otilde;&ouml;&divide;&oslash;&ugrave;&uacute;&ucirc;&uuml;&yacute;&thorn;&yuml;&OElig;&oelig;&Scaron;&scaron;&Yuml;&fnof;&circ;&tilde;&Alpha;&Beta;&Gamma;&Delta;&Epsilon;&Zeta;&Eta;&Theta;&Iota;&Kappa;&Lambda;&Mu;&Nu;&Xi;&Omicron;&Pi;&Rho;&Sigma;&Tau;&Upsilon;&Phi;&Chi;&Psi;&Omega;&alpha;&beta;&gamma;&delta;&epsilon;&zeta;&eta;&theta;&iota;&kappa;&lambda;&mu;&nu;&xi;&omicron;&pi;&rho;&sigmaf;&sigma;&tau;&upsilon;&phi;&chi;&psi;&omega;&thetasym;&upsih;&piv;&ensp;&emsp;&thinsp;&zwnj;&zwj;&lrm;&rlm;&ndash;&mdash;&lsquo;&rsquo;&sbquo;&ldquo;&rdquo;&bdquo;&dagger;&Dagger;&bull;&hellip;&permil;&prime;&Prime;&lsaquo;&rsaquo;&oline;&frasl;&euro;&image;&weierp;&real;&trade;&alefsym;&larr;&uarr;&rarr;&darr;&harr;&crarr;&lArr;&uArr;&rArr;&dArr;&hArr;&forall;&part;&exist;&empty;&nabla;&isin;&notin;&ni;&prod;&sum;&minus;&lowast;&radic;&prop;&infin;&ang;&and;&or;&cap;&cup;&int;&there4;&sim;&cong;&asymp;&ne;&equiv;&le;&ge;&sub;&sup;&nsub;&sube;&supe;&oplus;&otimes;&perp;&sdot;&lceil;&rceil;&lfloor;&rfloor;&lang;&rang;&loz;&spades;&clubs;&hearts;&diams;"}),e.PLUGINS.entities=function(i){var n,o,l=i.$;function r(e){var a=e.textContent;if(a.match(n)){for(var t="",r=0;r<a.length;r++)o[a[r]]?t+=o[a[r]]:t+=a[r];e.textContent=t}}function u(e){if(e&&0<=["STYLE","SCRIPT","svg","IFRAME"].indexOf(e.tagName))return!0;for(var a=i.node.contents(e),t=0;t<a.length;t++)a[t].nodeType===Node.TEXT_NODE?r(a[t]):u(a[t]);return e.nodeType===Node.TEXT_NODE&&r(e),!1}var c=function c(e){return 0===e.length?"":i.clean.exec(e,u).replace(/\&amp;/g,"&")};return{_init:function s(){i.opts.htmlSimpleAmpersand||(i.opts.entities="".concat(i.opts.entities,"&amp;"));var e=l(document.createElement("div")).html(i.opts.entities).text(),a=i.opts.entities.split(";");o={},n="";for(var t=0;t<e.length;t++){var r=e.charAt(t);o[r]="".concat(a[t],";"),n+="\\".concat(r+(t<e.length-1?"|":""))}n=new RegExp("(".concat(n,")"),"g"),i.events.on("html.get",c,!0)}}}});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
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(m){"use strict";m=m&&m.hasOwnProperty("default")?m["default"]:m,Object.assign(m.POPUP_TEMPLATES,{"file.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_PROGRESS_BAR_]"}),Object.assign(m.DEFAULTS,{fileUpload:!0,fileUploadURL:null,fileUploadParam:"file",fileUploadParams:{},fileUploadToS3:!1,fileUploadToAzure:!1,fileUploadMethod:"POST",fileMaxSize:10485760,fileAllowedTypes:["*"],fileInsertButtons:["fileBack","|"],fileUseSelectedText:!1}),m.PLUGINS.file=function(y){var i,u=y.$,T="https://i.froala.com/upload",c=2,v=3,g=4,A=5,S=6,o={};function P(){var e=y.popups.get("file.insert");e||(e=l()),e.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),e.find(".fr-file-progress-bar-layer").addClass("fr-active"),e.find(".fr-buttons").hide(),r(y.language.translate("Uploading"),0)}function a(e){var t=y.popups.get("file.insert");t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-file-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e&&(y.events.focus(),y.popups.hide("file.insert")))}function r(e,t){var o=y.popups.get("file.insert");if(o){var i=o.find(".fr-file-progress-bar-layer");i.find("h3").text(e+(t?" ".concat(t,"%"):"")),i.removeClass("fr-error"),t?(i.find("div").removeClass("fr-indeterminate"),i.find("div > span").css("width","".concat(t,"%"))):i.find("div").addClass("fr-indeterminate")}}function h(e,t,o){y.edit.on(),y.events.focus(!0),y.selection.restore(),y.opts.fileUseSelectedText&&y.selection.text().length&&(t=y.selection.text()),y.html.insert('<a href="'.concat(e,'" target="_blank" id="fr-inserted-file" class="fr-file">').concat(t,"</a>"));var i=y.$el.find("#fr-inserted-file");i.removeAttr("id"),y.popups.hide("file.insert"),y.undo.saveStep(),f(),y.events.trigger("file.inserted",[i,o])}function w(e,t,o){var i=this.status,r=this.response,a=this.responseXML,n=this.responseText;try{if(y.opts.fileUploadToS3||y.opts.fileUploadToAzure)if(201===i){var s;if(y.opts.fileUploadToAzure){if(!1===y.events.trigger("file.uploadedToAzure",[this.responseURL,o,r],!0))return y.edit.on(),!1;s=t}else s=function p(e){try{var t=u(e).find("Location").text(),o=u(e).find("Key").text();return!1===y.events.trigger("file.uploadedToS3",[t,o,e],!0)?(y.edit.on(),!1):t}catch(i){return C(g,e),!1}}(a);s&&h(s,e,r||a)}else C(g,r||a);else if(200<=i&&i<300){var l=function f(e){try{if(!1===y.events.trigger("file.uploaded",[e],!0))return y.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(C(c,e),!1)}catch(o){return C(g,e),!1}}(n);l&&h(l.link,e,r||n)}else C(v,r||n)}catch(d){C(g,r||n)}}function R(){C(g,this.response||this.responseText||this.responseXML)}function k(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;r(y.language.translate("Uploading"),t)}}function C(e,t){y.edit.on(),function i(e){P();var t=y.popups.get("file.insert").find(".fr-file-progress-bar-layer");t.addClass("fr-error");var o=t.find("h3");o.text(e),y.events.disableBlur(),o.focus()}(y.language.translate("Something went wrong. Please try again.")),y.events.trigger("file.error",[{code:e,message:o[e]},t])}function x(){y.edit.on(),a(!0)}function n(e){if(void 0!==e&&0<e.length){if(!1===y.events.trigger("file.beforeUpload",[e]))return!1;var t,o=e[0];if(!(null!==y.opts.fileUploadURL&&y.opts.fileUploadURL!==T||y.opts.fileUploadToS3||y.opts.fileUploadToAzure))return function b(r){var a=new FileReader;a.onload=function(){for(var e=a.result,t=atob(a.result.split(",")[1]),o=[],i=0;i<t.length;i++)o.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(o)],{type:r.type})),y.file.insert(e,r.name,null)},P(),a.readAsDataURL(r)}(o),!1;if(o.size>y.opts.fileMaxSize)return C(A),!1;if(y.opts.fileAllowedTypes.indexOf("*")<0&&y.opts.fileAllowedTypes.indexOf(o.type.replace(/file\//g,""))<0)return C(S),!1;if(y.drag_support.formdata&&(t=y.drag_support.formdata?new FormData:null),t){var i;if(!1!==y.opts.fileUploadToS3)for(i in t.append("key",y.opts.fileUploadToS3.keyStart+(new Date).getTime()+"-"+(o.name||"untitled")),t.append("success_action_status","201"),t.append("X-Requested-With","xhr"),t.append("Content-Type",o.type),y.opts.fileUploadToS3.params)y.opts.fileUploadToS3.params.hasOwnProperty(i)&&t.append(i,y.opts.fileUploadToS3.params[i]);for(i in y.opts.fileUploadParams)y.opts.fileUploadParams.hasOwnProperty(i)&&t.append(i,y.opts.fileUploadParams[i]);t.append(y.opts.fileUploadParam,o);var r,a,n=y.opts.fileUploadURL;y.opts.fileUploadToS3&&(n=y.opts.fileUploadToS3.uploadURL?y.opts.fileUploadToS3.uploadURL:"https://".concat(y.opts.fileUploadToS3.region,".amazonaws.com/").concat(y.opts.fileUploadToS3.bucket));var s=y.opts.fileUploadMethod;y.opts.fileUploadToAzure&&(n=y.opts.fileUploadToAzure.uploadURL?"".concat(y.opts.fileUploadToAzure.uploadURL,"/").concat(o.name):encodeURI("https://".concat(y.opts.fileUploadToAzure.account,".blob.core.windows.net/").concat(y.opts.fileUploadToAzure.container,"/").concat(o.name)),r=n,y.opts.fileUploadToAzure.SASToken&&(n+=y.opts.fileUploadToAzure.SASToken),s="PUT");var l=y.core.getXHR(n,s);if(y.opts.fileUploadToAzure){var p=(new Date).toUTCString();if(!y.opts.fileUploadToAzure.SASToken&&y.opts.fileUploadToAzure.accessKey){var f=y.opts.fileUploadToAzure.account,d=y.opts.fileUploadToAzure.container;if(y.opts.fileUploadToAzure.uploadURL){var u=y.opts.fileUploadToAzure.uploadURL.split("/");d=u.pop(),f=u.pop().split(".")[0]}var c="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(p,"\nx-ms-version:2019-07-07"),v=encodeURI("/"+f+"/"+d+"/"+o.name),g=s+"\n\n\n"+o.size+"\n\n"+o.type+"\n\n\n\n\n\n\n"+c+"\n"+v,h=y.cryptoJSPlugin.cryptoJS.HmacSHA256(g,y.cryptoJSPlugin.cryptoJS.enc.Base64.parse(y.opts.fileUploadToAzure.accessKey)).toString(y.cryptoJSPlugin.cryptoJS.enc.Base64),U="SharedKey "+f+":"+h;a=h,l.setRequestHeader("Authorization",U)}for(i in l.setRequestHeader("x-ms-version","2019-07-07"),l.setRequestHeader("x-ms-date",p),l.setRequestHeader("Content-Type",o.type),l.setRequestHeader("x-ms-blob-type","BlockBlob"),y.opts.fileUploadParams)y.opts.fileUploadParams.hasOwnProperty(i)&&l.setRequestHeader(i,y.opts.fileUploadParams[i]);for(i in y.opts.fileUploadToAzure.params)y.opts.fileUploadToAzure.params.hasOwnProperty(i)&&l.setRequestHeader(i,y.opts.fileUploadToAzure.params[i])}l.onload=function(){w.call(l,o.name,r,a)},l.onerror=R,l.upload.onprogress=k,l.onabort=x,P();var m=y.popups.get("file.insert");m&&(m.off("abortUpload"),m.on("abortUpload",function(){4!==l.readyState&&l.abort()})),l.send(y.opts.fileUploadToAzure?o:t)}}}function s(){a()}function l(e){if(e)return y.popups.onHide("file.insert",s),!0;var t;y.opts.fileUpload||y.opts.fileInsertButtons.splice(y.opts.fileInsertButtons.indexOf("fileUpload"),1),t='<div class="fr-buttons fr-tabs">'.concat(y.button.buildList(y.opts.fileInsertButtons),"</div>");var o="";y.opts.fileUpload&&(o='<div class="fr-file-upload-layer fr-layer fr-active" id="fr-file-upload-layer-'.concat(y.id,'"><strong>').concat(y.language.translate("Drop file"),"</strong><br>(").concat(y.language.translate("or click"),')<div class="fr-form"><input type="file" name="').concat(y.opts.fileUploadParam,'" accept="').concat(0<=y.opts.fileAllowedTypes.indexOf("*")?"/":"").concat(y.opts.fileAllowedTypes.join(", ").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-file-upload-layer-').concat(y.id,'" role="button"></div></div>'));var i={buttons:t,upload_layer:o,progress_bar:'<div class="fr-file-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="fileDismissError" tabIndex="2" role="button">OK</button></div></div>'},r=y.popups.create("file.insert",i);return function a(o){y.events.$on(o,"dragover dragenter",".fr-file-upload-layer",function(){return u(this).addClass("fr-drop"),!1},!0),y.events.$on(o,"dragleave dragend",".fr-file-upload-layer",function(){return u(this).removeClass("fr-drop"),!1},!0),y.events.$on(o,"drop",".fr-file-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),u(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;t&&t.files&&(o.data("instance")||y).file.upload(t.files)},!0),y.helpers.isIOS()&&y.events.$on(o,"touchstart",'.fr-file-upload-layer input[type="file"]',function(){u(this).trigger("click")}),y.events.$on(o,"change",'.fr-file-upload-layer input[type="file"]',function(){if(this.files){var e=o.data("instance")||y;e.events.disableBlur(),o.find("input:focus").blur(),e.events.enableBlur(),e.file.upload(this.files)}u(this).val("")},!0)}(r),r}function t(e){y.node.hasClass(e,"fr-file")}function p(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var o=t.files[0];if(o&&"undefined"!=typeof o.type){if(o.type.indexOf("image")<0){if(!y.opts.fileUpload)return e.preventDefault(),e.stopPropagation(),!1;y.markers.remove(),y.markers.insertAtPoint(e.originalEvent),y.$el.find(".fr-marker").replaceWith(m.MARKERS),y.popups.hideAll();var i=y.popups.get("file.insert");return i||(i=l()),y.popups.setContainer("file.insert",y.$sc),y.popups.show("file.insert",e.originalEvent.pageX,e.originalEvent.pageY),P(),n(t.files),e.preventDefault(),e.stopPropagation(),!1}}else o.type.indexOf("image")<0&&(e.preventDefault(),e.stopPropagation())}}function f(){var e,t=Array.prototype.slice.call(y.el.querySelectorAll("a.fr-file")),o=[];for(e=0;e<t.length;e++)o.push(t[e].getAttribute("href"));if(i)for(e=0;e<i.length;e++)o.indexOf(i[e].getAttribute("href"))<0&&y.events.trigger("file.unlink",[i[e]]);i=t}return o[1]="File cannot be loaded from the passed link.",o[c]="No link in upload response.",o[v]="Error during file upload.",o[g]="Parsing response failed.",o[A]="File is too large.",o[S]="File file type is invalid.",o[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",{_init:function d(){!function e(){y.events.on("drop",p),y.events.$on(y.$win,"keydown",function(e){var t=e.which,o=y.popups.get("file.insert");o&&t===m.KEYCODE.ESC&&o.trigger("abortUpload")}),y.events.on("destroy",function(){var e=y.popups.get("file.insert");e&&e.trigger("abortUpload")})}(),y.events.on("link.beforeRemove",t),y.$wp&&(f(),y.events.on("contentChanged",f)),l(!0)},showInsertPopup:function U(){var e=y.$tb.find('.fr-command[data-cmd="insertFile"]'),t=y.popups.get("file.insert");if(t||(t=l()),a(),!t.hasClass("fr-active"))if(y.popups.refresh("file.insert"),y.popups.setContainer("file.insert",y.$tb),e.isVisible){var o=y.button.getPosition(e),i=o.left,r=o.top;y.popups.show("file.insert",i,r,e.outerHeight())}else y.position.forSelection(t),y.popups.show("file.insert")},upload:n,insert:h,back:function e(){y.events.disableBlur(),y.selection.restore(),y.events.enableBlur(),y.popups.hide("file.insert"),y.toolbar.showInline()},hideProgressBar:a}},m.DefineIcon("insertFile",{NAME:"file-o",FA5NAME:"file",SVG_KEY:"insertFile"}),m.RegisterCommand("insertFile",{title:"Upload File",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("file.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("file.insert")):this.file.showInsertPopup()},plugin:"file"}),m.DefineIcon("fileBack",{NAME:"arrow-left",SVG_KEY:"back"}),m.RegisterCommand("fileBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.file.back()},refresh:function(e){this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),m.RegisterCommand("fileDismissError",{title:"OK",callback:function(){this.file.hideProgressBar(!0)}})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 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(_t){"use strict";function St(e){return(St="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})(e)}_t=_t&&_t.hasOwnProperty("default")?_t["default"]:_t,Object.assign(_t.POPUP_TEMPLATES,{"filesManager.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_BY_URL_LAYER_][_EMBED_LAYER_][_UPLOAD_PROGRESS_LAYER_][_PROGRESS_BAR_]","image.edit":"[_BUTTONS_]","image.alt":"[_BUTTONS_][_ALT_LAYER_]","image.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(_t.DEFAULTS,{filesInsertButtons:["imageBack","|","filesUpload","filesByURL","filesEmbed"],filesInsertButtons2:["deleteAll","insertAll","cancel","minimize"],imageEditButtons:["imageReplace","imageAlign","imageCaption","imageRemove","imageLink","linkOpen","linkEdit","linkRemove","-","imageDisplay","imageStyle","imageAlt","imageSize"],imageAltButtons:["imageBack","|"],imageSizeButtons:["imageBack","|"],imageUpload:!0,filesManagerUploadURL:null,imageCORSProxy:"https://cors-anywhere.froala.com",imageUploadRemoteUrls:!0,filesManagerUploadParam:"file",filesManagerUploadParams:{},googleOptions:{},filesManagerUploadToS3:!1,filesManagerUploadToAzure:!1,filesManagerUploadMethod:"POST",filesManagerMaxSize:10485760,filesManagerAllowedTypes:["*"],imageResize:!0,imageResizeWithPercent:!1,imageRoundPercent:!1,imageDefaultWidth:300,imageDefaultAlign:"center",imageDefaultDisplay:"block",imageSplitHTML:!1,imageStyles:{"fr-rounded":"Rounded","fr-bordered":"Bordered","fr-shadow":"Shadow"},imageMove:!0,imageMultipleStyles:!0,imageTextNear:!0,imagePaste:!0,imagePasteProcess:!1,imageMinWidth:16,imageOutputSize:!1,imageDefaultMargin:5,imageAddNewLine:!1}),_t.VIDEO_PROVIDERS=[{test_regex:/^.*((youtu.be)|(youtube.com))\/((v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))?\??v?=?([^#\&\?]*).*/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=|embed\/)?([0-9a-zA-Z_\-]+)(.+)?/g,url_text:"https://www.youtube.com/embed/$1?$2",html:'<iframe width="640" height="360" src="{url}&wmode=opaque" frameborder="0" allowfullscreen></iframe>',provider:"youtube"},{test_regex:/^.*(?:vimeo.com)\/(?:channels(\/\w+\/)?|groups\/*\/videos\/\u200b\d+\/|video\/|)(\d+)(?:$|\/|\?)/,url_regex:/(?:https?:\/\/)?(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^\/]*)\/videos\/|album\/(?:\d+)\/video\/|video\/|)(\d+)(?:[a-zA-Z0-9_\-]+)?(\/[a-zA-Z0-9_\-]+)?/i,url_text:"https://player.vimeo.com/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"vimeo"},{test_regex:/^.+(dailymotion.com|dai.ly)\/(video|hub)?\/?([^_]+)[^#]*(#video=([^_&]+))?/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:dailymotion\.com|dai\.ly)\/(?:video|hub)?\/?(.+)/g,url_text:"https://www.dailymotion.com/embed/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"dailymotion"},{test_regex:/^.+(screen.yahoo.com)\/[^_&]+/,url_regex:"",url_text:"",html:'<iframe width="640" height="360" src="{url}?format=embed" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',provider:"yahoo"},{test_regex:/^.+(rutube.ru)\/[^_&]+/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:rutube\.ru)\/(?:video)?\/?(.+)/g,url_text:"https://rutube.ru/play/embed/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',provider:"rutube"},{test_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/,url_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/g,url_text:"https://play.vidyard.com/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"vidyard"}],_t.VIDEO_EMBED_REGEX=/^\W*((<iframe(.|\n)*>(\s|\n)*<\/iframe>)|(<embed(.|\n)*>))\W*$/i,_t.IMAGE_EMBED_REGEX=/^\W*((<img(.|\n)*>(\s|\n)*))\W*$/i,_t.PLUGINS.filesManager=function(A){var x,s,k,l,d,f,o,c,I=A.$,M="https://i.froala.com/upload",p=!1,t=!1,L=new Map,_=new Map,E=new Map,C=new Map,S=new Map,T=new Map,r=0,a=[],g=-1,B=[],u=0,m=["file","image","imageTUI","video"],R=1,v=2,D=3,U=4,z=5,O=6,$=10,P=["video/avi","video/mpeg","video/x-ms-wmv"],h={};function b(){var e=A.popups.get("filesManager.insert"),t=e.find(".fr-files-by-url-layer input");t.val(""),e.find(".fr-files-embed-layer textarea").val("").trigger("change"),t.trigger("change")}function y(e){var t;A.hasOwnProperty("imageTUI")||(o="fr-disabled"),T.forEach(function(e,t){q(t)}),w()?(t=A.popups.get("filesManager.insert"))||(t=Fe()):(t=A.popups.get("filesManager.insert"))||(t=function s(){var e='<div class="fr-buttons fr-tabs">'.concat(A.button.buildList(A.opts.fileInsertButtons),"</div>"),t="<div style= 'padding:10px'>\n <div class = 'fr-message'><h3 style ='font-size: 16px; margin: 10px 10px;font-weight: normal;'>".concat(A.language.translate(function a(){var e="",t=function i(){var t=[];return m.forEach(function(e){A.opts.pluginsEnabled.indexOf(e)<0&&t.push(e.charAt(0).toUpperCase()+e.slice(1))}),t}();e=t.join(", "),1<t.length?e+=" plugin are":e+=" plugin is";return e}()+" not enabled. Do you want to enable?"),"</h3></div>\n <div style='text-align:right;'>\n <button class='fr-trim-button fr-plugins-enable'>").concat(A.language.translate("Enable"),"</button> \n <button class='fr-trim-button fr-plugins-cancel'>").concat(A.language.translate("Cancel"),"</button>\n </div>"),i={buttons:e,upload_layer:t,by_url_layer:"",embed_layer:"",upload_progress_layer:"",progress_bar:""},n=A.popups.create("filesManager.insert",i);return De(n),n}());var i=A.$tb.find('.fr-command[data-cmd="insertFiles"]');if(Q(),e||!t.hasClass("fr-active"))if(e||Z(),A.popups.refresh("filesManager.insert"),A.popups.setContainer("filesManager.insert",A.$tb),i.isVisible()){var n=A.button.getPosition(i,L.size),a=n.left,r=n.top;A.popups.show("filesManager.insert",a,r,i.outerHeight())}else A.position.forSelection(t),A.popups.show("filesManager.insert");A.popups.setPopupDimensions(t),w()&&A.popups.setFileListHeight(t),t.find(".fr-upload-progress")&&0==L.size&&t.find(".fr-upload-progress").addClass("fr-none")}function w(){var t=!0;return m.forEach(function(e){A.opts.pluginsEnabled.indexOf(e)<0&&(t=!1)}),t}function N(){Q()}function F(){if(l||function s(){var e;A.shared.$image_resizer?(l=A.shared.$image_resizer,f=A.shared.$img_overlay,A.events.on("destroy",function(){I("body").first().append(l.removeClass("fr-active"))},!0)):(A.shared.$image_resizer=I(document.createElement("div")).attr("class","fr-image-resizer"),l=A.shared.$image_resizer,A.events.$on(l,"mousedown",function(e){e.stopPropagation()},!0),A.opts.imageResize&&(l.append(H("nw")+H("ne")+H("sw")+H("se")),A.shared.$img_overlay=I(document.createElement("div")).attr("class","fr-image-overlay"),f=A.shared.$img_overlay,e=l.get(0).ownerDocument,I(e).find("body").first().append(f)));A.events.on("shared.destroy",function(){l.html("").removeData().remove(),l=null,A.opts.imageResize&&(f.remove(),f=null)},!0),A.helpers.isMobile()||A.events.$on(I(A.o_win),"resize",function(){x&&!x.hasClass("fr-uploading")?at(!0):x&&(F(),replace(),J(!1))});if(A.opts.imageResize){e=l.get(0).ownerDocument,A.events.$on(l,A._mousedown,".fr-handler",V),A.events.$on(I(e),A._mousemove,Y),A.events.$on(I(e.defaultView||e.parentWindow),A._mouseup,W),A.events.$on(f,"mouseleave",W);var n=1,a=null,r=0;A.events.on("keydown",function(e){if(x){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,i=e.which;(i!==a||200<e.timeStamp-r)&&(n=1),(i==_t.KEYCODE.EQUALS||A.browser.mozilla&&i==_t.KEYCODE.FF_EQUALS)&&t&&!e.altKey?n=je.call(this,e,1,1,n):(i==_t.KEYCODE.HYPHEN||A.browser.mozilla&&i==_t.KEYCODE.FF_HYPHEN)&&t&&!e.altKey?n=je.call(this,e,2,-1,n):A.keys.ctrlKey(e)||i!=_t.KEYCODE.ENTER||(x.before("<br>"),Ee(x)),a=i,r=e.timeStamp}},!0),A.events.on("keyup",function(){n=1})}}(),!x)return!1;var e=A.$wp||A.$sc;e.append(l),l.data("instance",A);var t=e.scrollTop()-("static"!=e.css("position")?e.offset().top:0),i=e.scrollLeft()-("static"!=e.css("position")?e.offset().left:0);i-=A.helpers.getPX(e.css("border-left-width")),t-=A.helpers.getPX(e.css("border-top-width")),A.$el.is("img")&&A.$sc.is("body")&&(i=t=0);var n=ft();ct()&&(n=n.find(".fr-img-wrap"));var a=0,r=0;A.opts.iframe&&(a=A.helpers.getPX(A.$wp.find(".fr-iframe").css("padding-top")),r=A.helpers.getPX(A.$wp.find(".fr-iframe").css("padding-left"))),l.css("top",(A.opts.iframe?n.offset().top+a:n.offset().top+t)-1).css("left",(A.opts.iframe?n.offset().left+r:n.offset().left+i)-1).css("width",n.get(0).getBoundingClientRect().width).css("height",n.get(0).getBoundingClientRect().height).addClass("fr-active")}function H(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function K(e){ct()?x.parents(".fr-img-caption").css("width",e):x.css("width",e)}function V(e){if(!A.core.sameInstance(l))return!0;if(e.preventDefault(),e.stopPropagation(),A.$el.find("img.fr-error").left)return!1;A.undo.canDo()||A.undo.saveStep();var t=e.pageX||e.originalEvent.touches[0].pageX;if("mousedown"==e.type){var i=A.$oel.get(0).ownerDocument,n=i.defaultView||i.parentWindow,a=!1;try{a=n.location!=n.parent.location&&!(n.$&&n.$.FE)}catch(o){}a&&n.frameElement&&(t+=A.helpers.getPX(I(n.frameElement).offset().left)+n.frameElement.clientLeft)}(d=I(this)).data("start-x",t),d.data("start-width",x.width()),d.data("start-height",x.height());var r=x.width();if(A.opts.imageResizeWithPercent){var s=x.parentsUntil(A.$el,A.html.blockTagsQuery()).get(0)||A.el;r=(r/I(s).outerWidth()*100).toFixed(2)+"%"}K(r),f.show(),A.popups.hideAll(),ot()}function Y(e){if(!A.core.sameInstance(l))return!0;var t;if(d&&x){if(e.preventDefault(),A.$el.find("img.fr-error").left)return!1;var i=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null);if(!i)return!1;var n=i-d.data("start-x"),a=d.data("start-width");if((d.hasClass("fr-hnw")||d.hasClass("fr-hsw"))&&(n=0-n),A.opts.imageResizeWithPercent){var r=x.parentsUntil(A.$el,A.html.blockTagsQuery()).get(0)||A.el;a=((a+n)/I(r).outerWidth()*100).toFixed(2),A.opts.imageRoundPercent&&(a=Math.round(a)),K("".concat(a,"%")),(t=ct()?(A.helpers.getPX(x.parents(".fr-img-caption").css("width"))/I(r).outerWidth()*100).toFixed(2):(A.helpers.getPX(x.css("width"))/I(r).outerWidth()*100).toFixed(2))===a||A.opts.imageRoundPercent||K("".concat(t,"%")),x.css("height","").removeAttr("height")}else a+n>=A.opts.imageMinWidth&&(K(a+n),t=ct()?A.helpers.getPX(x.parents(".fr-img-caption").css("width")):A.helpers.getPX(x.css("width"))),t!==a+n&&K(t),((x.attr("style")||"").match(/(^height:)|(; *height:)/)||x.attr("height"))&&(x.css("height",d.data("start-height")*x.width()/d.data("start-width")),x.removeAttr("height"));F(),A.events.trigger("image.resize",[dt()])}}function W(e){if(!A.core.sameInstance(l))return!0;if(d&&x){if(e&&e.stopPropagation(),A.$el.find("img.fr-error").left)return!1;d=null,f.hide(),F(),A.undo.saveStep(),A.events.trigger("image.resizeEnd",[dt()])}else l.removeClass("fr-active")}function G(){T.forEach(function(e,t){var i=A.popups.get("filesManager.insert");i.find(".fr-checkbox-file-"+t).get(0).disabled=!0,document.getElementById("fr-file-autoplay-button-"+t)&&(document.getElementById("fr-file-autoplay-button-"+t).disabled=!0,document.getElementById("fr-file-autoplay-button-"+t).parentElement.classList.add("fr-checkbox-disabled"),document.getElementById("fr-file-autoplay-button-"+t).parentElement.classList.remove("fr-files-checkbox")),i.find(".fr-checkbox-"+t).get(0).classList.remove("fr-files-checkbox"),i.find(".fr-checkbox-"+t).get(0).classList.add("fr-checkbox-disabled")})}function X(e,t,i,n){A.edit.on(),x&&x.addClass("fr-error"),h[e]?(e!=D&&e!=v&&e!=U||we(100,n,!0),T.set(n,h[e]),G(),function a(){T.forEach(function(e,t){A.popups.get("filesManager.insert"),document.getElementById("fr-file-edit-button-".concat(t))&&(document.getElementById("fr-file-edit-button-".concat(t)).classList.add("fr-disabled"),document.getElementById("fr-file-view-button-".concat(t)).classList.add("fr-disabled"),document.getElementById("fr-file-insert-button-".concat(t)).classList.add("fr-disabled"))})}(),ie(A.language.translate(h[e]),n)):ie(A.language.translate("Something went wrong. Please try again."),n),!x&&i&&qe(i),A.events.trigger("filesManager.error",[{code:e,message:h[e]},t,i])}function j(){var e=A.popups.get("filesManager.insert"),t=e.find('.fr-command[data-cmd="insertAll"]'),i=e.find('.fr-command[data-cmd="deleteAll"]'),n=!0;S.forEach(function a(e,t,i){S.get(t)&&(n=!1)}),n?t.addClass("fr-disabled"):t.removeClass("fr-disabled"),n?i.addClass("fr-disabled"):i.removeClass("fr-disabled")}function q(e){_.get(e)&&_.get(e).link&&A.events.trigger("filesManager.removed",[_.get(e).link]);var t=A.popups.get("filesManager.insert");t.find(".fr-file-"+e).get(0)!==undefined&&(t.find(".fr-file-"+e).get(0).outerHTML=""),_["delete"](e),L["delete"](e),S["delete"](e),j(),0==L.size&&(u=0),T["delete"](e),A.popups.setPopupDimensions(t,!0),A.opts.toolbarBottom?y(!0):A.popups.setPopupDimensions(t),t.find(".fr-upload-progress")&&0==L.size&&t.find(".fr-upload-progress").addClass("fr-none")}function Z(){for(var e=A.popups.get("filesManager.insert"),t=e.find(".fr-insert-checkbox"),i=0;i<t.length;i++)t.get(i).children.target.checked=!1,e.find(".fr-file-"+t.get(i).id.split("-").pop()).get(0).classList.add("fr-unchecked");if(k)document.getElementById("fr-file-autoplay-button-".concat(k))&&(document.getElementById("fr-file-autoplay-button-".concat(k)).checked=!1),B=B.filter(function(e){return e!=k});else{for(var n=e.find(".fr-file-autoplay-button"),a=0;a<n.length;a++)n.get(a).checked=!1;B=[]}S=new Map,j()}function J(e){var t=A.popups.get("filesManager.insert");if(t||(t=Fe()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-files-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),x){var i=ft();A.popups.setContainer("filesManager.insert",A.$sc);var n=i.offset().left,a=i.offset().top+i.height();A.popups.show("filesManager.insert",n,a,i.outerHeight())}void 0===e&&ee(A.language.translate("Uploading"),0)}function Q(e){var t=A.popups.get("filesManager.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-files-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||A.$el.find("img.fr-error").length)){if(A.events.focus(),A.$el.find("img.fr-error").length&&(A.$el.find("img.fr-error").remove(),A.undo.saveStep(),A.undo.run(),A.undo.dropRedo()),!A.$wp&&x){var i=x;at(!0),A.selection.setAfter(i.get(0)),A.selection.restore()}A.popups.hide("filesManager.insert")}}function ee(e,t){var i=A.popups.get("filesManager.insert");if(i){var n=i.find(".fr-files-progress-bar-layer");n.find("h3").text(e+(t?" ".concat(t,"%"):"")),n.removeClass("fr-error"),t?(n.find("div").removeClass("fr-indeterminate"),n.find("div > span").css("width","".concat(t,"%"))):n.find("div").addClass("fr-indeterminate")}}function te(e){J();var t=A.popups.get("filesManager.insert").find(".fr-files-progress-bar-layer");t.addClass("fr-error");var i=t.find("h3");i.text(e),A.events.disableBlur(),i.focus()}function ie(e,t){var i=A.popups.get("filesManager.insert"),n=i.find(".fr-upload-progress-layer"),a=i.find(".fr-file-".concat(t));n.addClass("fr-error"),a.find("h5").text(e)}h[R]="File cannot be loaded from the passed link.",h[v]="No link in upload response.",h[D]="Error during file upload.",h[U]="Parsing response failed.",h[z]="File is too large.",h[O]="File type is invalid.",h[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",h[8]="File is corrupted.",h[9]="Error during file loading.",h[$]="File upload cancelled";var i,ne,ae,re,se,oe,n,le,de,fe,ce="";function pe(e){ce=e,i=document.getElementsByClassName(e),Array.prototype.map.call(i,function(e){!function n(e){if(e.addEventListener("dragover",function(e){e.preventDefault(),e.stopPropagation(),ne=e.pageX,ae=e.pageY;var t=document.getElementById("filesList");ae+20>t.getBoundingClientRect().bottom&&ge(t,0,10),ae-20<t.getBoundingClientRect().top&&ge(t,0,-10)},!1),A.helpers.isMobile()){var t=e.getElementsByClassName("dot");t[0].addEventListener("touchmove",function(e){e.preventDefault(),e.stopPropagation();for(var t=e.target;t&&!t.classList.contains(ce);)t=t.parentElement;for(var i=document.elementFromPoint(e.targetTouches[0].clientX,e.targetTouches[0].clientY);i&&!i.classList.contains(ce);)i=i.parentElement;var n=document.getElementsByClassName("fr-hovered-over-file");Array.prototype.forEach.call(n,function(e){e.classList.remove("fr-hovered-over-file")}),i&&!t.classList.contains("fr-unchecked")&&i.classList.add("fr-hovered-over-file");var a=document.getElementById("filesList");e.targetTouches[0].clientY+5>a.getBoundingClientRect().bottom&&ge(a,0,5),e.targetTouches[0].clientY-5<a.getBoundingClientRect().top&&ge(a,0,-5)},!1)}if(e.ondrag=ue,e.ondragend=me,A.helpers.isMobile()){var i=e.getElementsByClassName("dot");i[0].addEventListener("touchmove",ue,!1),i[0].addEventListener("touchend",me,!1)}}(e)})}function ge(e,t,i){e.scrollLeft+=t,e.scrollTop+=i}function ue(e){for(A.helpers.isMobile()&&(se=event.touches[0].clientX,oe=event.touches[0].clientY),re=e.target;!re.classList.contains(ce);)re=re.parentElement;re.classList.contains(ce)&&!re.classList.contains("fr-unchecked")?A.helpers.isMobile()&&re.classList.add("drag-sort-active"):re=undefined}function me(e){var t;if(re!==undefined){var i,n;if(A.helpers.isMobile())for(i=se,n=oe,t=event.target;!t.classList.contains(ce);)t=t.parentElement;else i=event.clientX,n=event.clientY;A.helpers.isMobile()||!A.browser.safari&&!A.browser.mozilla||(i=ne,n=ae);for(var a=document.elementFromPoint(i,n);a&&!a.classList.contains(ce);)a=a.parentElement;a&&!a.classList.contains(ce)?a=undefined:a&&re!==a&&function o(e,t){var i,n,a=e.parentNode,r=t.parentNode;if(!a||!r||a.isEqualNode(t)||r.isEqualNode(e))return;for(var s=0;s<a.children.length;s++)a.children[s].isEqualNode(e)&&(i=s);for(var s=0;s<r.children.length;s++)r.children[s].isEqualNode(t)&&(n=s);a.isEqualNode(r)&&i<n&&n++;a.insertBefore(t,a.children[i]),r.insertBefore(e,r.children[n])}(re,a),A.helpers.isMobile()&&(t.classList.remove("fr-hovered-over-file"),a.classList.remove("fr-hovered-over-file"))}}function ve(e){var n=A.popups.get("filesManager.insert");n.find(".fr-upload-progress-layer").hasClass("fr-active")||n.find(".fr-upload-progress-layer").addClass("fr-active"),n.find(".fr-upload-progress").removeClass("fr-none");var t=L.get(e),i=function s(e){var t,i={weekday:"long",year:"numeric",month:"long",day:"numeric"};try{t=e.toLocaleDateString(A.opts.language?A.opts.language:undefined,i)}catch(n){t=e.toLocaleDateString(undefined,i)}return t+""}(new Date),a=S.get(e)?"":"fr-unchecked ",r="\n <div id='fr-file-".concat(e,"' class='fr-file-list-item fr-file-").concat(e," ").concat(a,"' draggable = \"").concat(!a,'" >\n <div class=\'fr-file-item-left\' >\n\n \n <div class="fr-file-item-insert-checkbox fr-files-checkbox-line">\n ').concat(A.helpers.isMobile()?"<div id='fr-pick-".concat(e,"}' class='dot'>\n </div>"):"",'\n <div id="checkbox-key-').concat(e,'" class="fr-files-checkbox fr-insert-checkbox fr-checkbox-').concat(e,'">\n <input name="target" class="fr-insert-attr fr-checkbox-file-').concat(e,' fr-file-insert-check" data-cmd="fileInsertCheckbox"\n data-checked="_blank" type="checkbox" id="fr-link-target-').concat(A.id,'" tabIndex="0" />\n <span>').concat('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 32 32"><path d="M27 4l-15 15-7-7-5 5 12 12 20-20z" fill="#FFF"></path></svg>','\n </span>\n </div>\n <label id="fr-label-target-').concat(A.id,"\"></label>\n </div>\n \n <div class='fr-file-item-icon fr-file-item-icon-").concat(e,"' >\n <img src='https://secure.webtoolhub.com/static/resources/icons/set112/f2afb6f7.png' alt='Image preview' class='thumbnail-padding' height='36px' width='36px' />\n </div>\n\n <div class='fr-file-item-description' >\n <div class='fr-file-name fr-files-manager-tooltip'>\n ").concat(function o(e,t,i){null==t&&(t=100);null==i&&(i="...");return e.length>t?e.substring(0,t-i.length)+i:e}(t.name,20),'\n <span class="').concat(20<t.name.length?"tooltiptext":"fr-none",'">').concat(t.name,"\n </span>\n </div>\n <div class='fr-file-details'>\n <div class='fr-file-date'>").concat(i,"\n </div>\n \n <div class='fr-file-size'>\n ").concat(function l(e){if(0==e)return"0 Bytes";var t=Math.floor(Math.log(e)/Math.log(1024));return" | "+1*(e/Math.pow(1024,t)).toFixed(2)+" "+["Bytes","KB","MB","GB","TB"][t]}(t.size),"\n </div>\n </div>\n\n <div class='fr-file-error'>\n <h5 class='fr-file-error-h5'></h5>\n </div>\n </div>\n \n </div>\n\n <div class='fr-file-item-right fr-file-item-right-").concat(e,"'>")+ye(e)+"</div>\n </div>";n.find(".fr-upload-progress-layer")[0].innerHTML=r+n.find(".fr-upload-progress-layer")[0].innerHTML,L.forEach(function d(e,t,i){S.get(t)&&n.find("input.fr-insert-attr.fr-checkbox-file-".concat(t))[0].setAttribute("checked",null)}),B.forEach(function(e){document.getElementById("fr-file-autoplay-button-"+e).checked=!0}),be(e,t),Q(),A.opts.toolbarBottom?y(!0):A.popups.setPopupDimensions(n),pe("fr-file-list-item")}function he(e){switch(e){case"application/msword":return A.icon.getFileIcon("docIcon");case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return A.icon.getFileIcon("docxIcon");case"image/gif":return A.icon.getFileIcon("gifIcon");case"image/jpeg":return A.icon.getFileIcon("jpegIcon");case"image/jpeg":return A.icon.getFileIcon("jpgIcon");case"type/text":return A.icon.getFileIcon("logIcon");case"video/quicktime":return A.icon.getFileIcon("movIcon");case"audio/mp3":case"audio/mpeg":return A.icon.getFileIcon("mp3Icon");case"video/mp4":return A.icon.getFileIcon("mp4Icon");case"audio/ogg":return A.icon.getFileIcon("oggIcon");case"video/ogg":return A.icon.getFileIcon("ogvIcon");case"application/pdf":return A.icon.getFileIcon("pdfIcon");case"image/png":return A.icon.getFileIcon("pngIcon");case"text/plain":return A.icon.getFileIcon("txtIcon");case"video/webm":return A.icon.getFileIcon("webmIcon");case"image/webp":return A.icon.getFileIcon("webpIcon");case"video/x-ms-wmv":return A.icon.getFileIcon("wmvIcon");case"application/vnd.ms-excel":return A.icon.getFileIcon("xlsIcon");case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return A.icon.getFileIcon("xlsxIcon");case"application/x-zip-compressed":case"application/zip":return A.icon.getFileIcon("zipIcon");default:return A.icon.getFileIcon("defaultIcon")}}function be(n,a,e){var r=A.popups.get("filesManager.insert"),t=r.find(".fr-file-item-icon-"+n).get(0);if(ze(Le(a))&&"image/gif"!=Le(a)&&"image/webp"!=Le(a)){"a"!=t.children[0].localName&&(t.innerHTML="<a target='_blank' href=''>"+t.innerHTML+"</a>");r.find(".fr-file-item-icon-"+n).get(0).children[0].children[0];var s=new FileReader;if(null!=e&&e){var i=L.get(n);a.name=i.name,L.set(n,a)}if(s.onloadend=function(){r.find(".fr-file-item-icon-"+n).get(0).children[0].children[0].src=s.result;for(var e=atob(s.result.split(",")[1]),t=[],i=0;i<e.length;i++)t.push(e.charCodeAt(i));r.find(".fr-file-item-icon-"+n).get(0).children[0].href=window.URL.createObjectURL(new Blob([new Uint8Array(t)],{type:Le(a)})),r.find(".fr-file-item-icon-"+n).get(0).classList.add("file-item-thumbnail-hover")},a)s.readAsDataURL(a);else{var o=he(Le(a));t.innerHTML='<svg height="40px" width="40px" viewBox="0 0 55 5" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n '.concat(o.path,"\n </svg>")}}else{var l=he(Le(a));t.innerHTML='<svg height="40px" width="40px" viewBox="0 0 55 55" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n '.concat(l.path,"\n </svg>")}}function ye(e){var t="";if($e(Le(L.get(e)))){var i="fr-files-checkbox",n="";Ne(Le(L.get(e)))||(i="fr-checkbox-disabled",n="disabled");t='\n <div class="fr-files-checkbox-line align-autoplay">\n <div id="checkbox-key-'.concat(e,'" class="').concat(i," fr-autoplay-checkbox fr-checkbox-").concat(e,'"> \n \n <input type="checkbox" id="fr-file-autoplay-button-').concat(e,'" class="fr-file-button-').concat(e,' fr-file-autoplay-button" data-title="Edit" data-param1="').concat(e,'" role="button" ').concat(n,"/>\n\n <span>").concat('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 32 32"><path d="M27 4l-15 15-7-7-5 5 12 12 20-20z" fill="#FFF"></path></svg>'," </span>\n </div> \n <label class='fr-autoplay-checkbox-label'>Autoplay </label>\n </div>")}var a="application/msword",r="application/vnd.openxmlformats-officedocument.wordprocessingml.document",s="";return!Pe(Le(L.get(e)))&&Ne(Le(L.get(e)))||(o="fr-disabled"),$e(Le(L.get(e)))&&(o="fr-disabled"),Oe(Le(L.get(e)))&&(o="fr-disabled",Le(L.get(e))!=a&&Le(L.get(e))!=r||A.opts.googleOptions&&!A.helpers.isMobile()&&A.opts.googleOptions.API_KEY&&A.opts.googleOptions.CLIENT_ID&&(o=""),"text/plain"!=Le(L.get(e))&&Le(L.get(e))!=a&&"application/pdf"!=Le(L.get(e))&&Le(L.get(e))!=r&&"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"!=Le(L.get(e))&&"application/vnd.ms-excel"!=Le(L.get(e))&&"type/text"!=Le(L.get(e))||(s="")),"video/url"===Le(L.get(e))&&(o="fr-disabled"),t+='<div class=\'fr-file-item-action-buttons\' >\n <button type="button" id="fr-file-insert-button-'.concat(e,'" class=" fr-doc-edit-').concat(e," fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons \n fr-file-button-").concat(e," fr-file-insert-button-").concat(e,' fr-file-insert-button" data-cmd="imageInsertByUpload" data-title="Insert" data-param1="').concat(e,'" tabIndex="2" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "-5 0 28 28" xlmns = "http://w3.org/200/svg"><path d = \'M 9.25 12 L 6.75 12 C 6.335938 12 6 11.664062 6 11.25 L 6 6 L 3.257812 6 C 2.703125 6 2.425781 5.328125 2.820312 4.933594 L 7.570312 0.179688 C 7.804688 -0.0546875 8.191406 -0.0546875 8.425781 0.179688 L 13.179688 4.933594 C 13.574219 5.328125 13.296875 6 12.742188 6 L 10 6 L 10 11.25 C 10 11.664062 9.664062 12 9.25 12 Z M 16 11.75 L 16 15.25 C 16 15.664062 15.664062 16 15.25 16 L 0.75 16 C 0.335938 16 0 15.664062 0 15.25 L 0 11.75 C 0 11.335938 0.335938 11 0.75 11 L 5 11 L 5 11.25 C 5 12.214844 5.785156 13 6.75 13 L 9.25 13 C 10.214844 13 11 12.214844 11 11.25 L 11 11 L 15.25 11 C 15.664062 11 16 11.335938 16 11.75 Z M 12.125 14.5 C 12.125 14.15625 11.84375 13.875 11.5 13.875 C 11.15625 13.875 10.875 14.15625 10.875 14.5 C 10.875 14.84375 11.15625 15.125 11.5 15.125 C 11.84375 15.125 12.125 14.84375 12.125 14.5 Z M 14.125 14.5 C 14.125 14.15625 13.84375 13.875 13.5 13.875 C 13.15625 13.875 12.875 14.15625 12.875 14.5 C 12.875 14.84375 13.15625 15.125 13.5 15.125 C 13.84375 15.125 14.125 14.84375 14.125 14.5 Z M 14.125 14.5 \'></path></svg>\n </button>\n\n <button type="button" id="fr-file-edit-button-').concat(e,'" class=" fr-doc-edit-').concat(e," ").concat(o," fr-img-icon fr-btn fr-command fr-submit \n fr-file-action-icons fr-file-edit-button-").concat(e," fr-file-button-").concat(e,' fr-file-edit-button" data-cmd="editImage" data-title="Edit" data-param1="').concat(e,'" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "0 4 25 25" xlmns = "http://w3.org/200/svg"><path d = \'M17,11.2L12.8,7L5,14.8V19h4.2L17,11.2z M7,16.8v-1.5l5.6-5.6l1.4,1.5l-5.6,5.6H7z M13.5,6.3l0.7-0.7c0.8-0.8,2.1-0.8,2.8,0 c0,0,0,0,0,0L18.4,7c0.8,0.8,0.8,2,0,2.8l-0.7,0.7L13.5,6.3z\'></path></svg>\n </button>\n \n <span class="fr-file-view-').concat(e,'"><button type="button" id="fr-file-view-button-').concat(e,'" class=" fr-doc-edit-').concat(e," ").concat(s," fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons \n fr-file-view-button-").concat(e,' fr-file-view-button" data-cmd="viewImage" data-title="View" data-param1="').concat(e,'" tabIndex="2" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "15 19 21 21" xlmns = "http://w3.org/200/svg"> <path style="fill:none;stroke-width:0.9077;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 19.086094 16.541466 C 16.185625 16.541466 14.318281 19.447115 14.318281 19.447115 L 14.318281 19.555288 C 14.318281 19.555288 16.176719 22.475962 19.077187 22.475962 C 21.977656 22.475962 23.847969 19.576322 23.847969 19.576322 L 23.847969 19.465144 C 23.847969 19.465144 21.989531 16.541466 19.086094 16.541466 Z M 19.07125 21.024639 C 18.248906 21.024639 17.583906 20.357572 17.583906 19.53726 C 17.583906 18.716947 18.248906 18.04988 19.07125 18.04988 C 19.890625 18.04988 20.555625 18.716947 20.555625 19.53726 C 20.555625 20.357572 19.890625 21.024639 19.07125 21.024639 Z M 19.07125 21.024639 " transform="matrix(1.315789,0,0,1.3,0,0)"/></svg></button></span>\n\n <button type="button" id="fr-file-delete-button-').concat(e,'" class=" fr-doc-edit-').concat(e," fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons\n fr-file-button-").concat(e,' fr-file-delete-button" data-cmd="deleteImage" data-title="Delete" data-param1="').concat(e,'" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "-2 3 30 30" xlmns = "http://w3.org/200/svg"><path d = \'M15,10v8H9v-8H15 M14,4H9.9l-1,1H6v2h12V5h-3L14,4z M17,8H7v10c0,1.1,0.9,2,2,2h6c1.1,0,2-0.9,2-2V8z\'></path></svg>\n </button>\n \n </div>\n <div id="user_area-').concat(e,"\" style=\"display: none;\">\n \n <div id=\"file_container\"></div>\n\n <div style='display:block;text-align: center; margin-left:50%; id='edit-file-loader' class='fr-file-loader'></div>\n\n </div> \n ")}function we(e,t,i){var n=A.popups.get("filesManager.insert");if(!i&&e<=100){n.find(".fr-checkbox-file-"+t).get(0).disabled=!0,n.find(".fr-checkbox-"+t).get(0).classList.remove("fr-files-checkbox"),n.find(".fr-checkbox-"+t).get(0).classList.add("fr-checkbox-disabled");var a=n.find(".fr-file-progress-circle-"+t),r=n.find(".fr-file-upload-percent-"+t);return 50<e?a.get(0).setAttribute("class","fr-file-progress-circle-"+t+" progress-circle p"+Math.floor(e)+" over50"):a.get(0).setAttribute("class","fr-file-progress-circle-"+t+" progress-circle p"+Math.floor(e)),r.get(0).innerHTML=Math.floor(e)+"%",void xe(t,e,i)}i&&(n.find(".fr-checkbox-file-"+t).get(0).disabled=!1,n.find(".fr-checkbox-"+t).get(0).classList.remove("fr-checkbox-disabled"),n.find(".fr-checkbox-"+t).get(0).classList.add("fr-files-checkbox"),n.find(".fr-file-item-right-"+t).get(0).innerHTML=ye(t),xe(t,100,i))}function xe(e,t,i){var n=A.popups.get("filesManager.insert");n.find(".fr-progress-bar").removeClass("fr-none").addClass("fr-display-block"),n.find(".fr-upload-progress").hasClass("fr-height-set")&&A.popups.setFileListHeight(n);var a=0;C.set(e,t),C.forEach(function(e,t){a+=e}),a/=C.size,100==t&&i&&r++,n.find('.fr-command[data-cmd="filesUpload"]').addClass("fr-disabled"),n.find('.fr-command[data-cmd="filesByURL"]').addClass("fr-disabled"),n.find('.fr-command[data-cmd="filesEmbed"]').addClass("fr-disabled"),n.find(".fr-progress-bar").get(0).style.width=a+"%",r==C.size&&(n.find(".fr-progress-bar").removeClass("fr-display-block").addClass("fr-none"),C=new Map,r=0,n.find('.fr-command[data-cmd="filesUpload"]').removeClass("fr-disabled"),n.find('.fr-command[data-cmd="filesByURL"]').removeClass("fr-disabled"),n.find('.fr-command[data-cmd="filesEmbed"]').removeClass("fr-disabled"))}function Me(i,n){Q(),A.popups.get("filesManager.insert").find(".fr-upload-progress-layer").addClass("fr-active"),i.forEach(function(e,t){ze(Le(e))&&A.opts.imageUploadRemoteUrls&&A.opts.imageCORSProxy&&A.opts.imageUpload?Re(e,i,x,n[t]):_.set(n[t],e)})}function Ee(e){e&&e.get&&function i(e){if("false"==I(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(e&&"touchend"==e.type&&fe)return!0;if(e&&A.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;for(var t=0;t<_t.INSTANCES.length;t++)_t.INSTANCES[t]!=A&&_t.INSTANCES[t].events.trigger("image.hideResizer");A.toolbar.disable(),e&&(e.stopPropagation(),e.preventDefault());A.helpers.isMobile()&&(A.events.disableBlur(),A.$el.blur(),A.events.enableBlur());A.opts.iframe&&A.size.syncIframe();x=I(this),F(),A.browser.msie?(A.popups.areVisible()&&A.events.disableBlur(),A.win.getSelection&&(A.win.getSelection().removeAllRanges(),A.win.getSelection().addRange(A.doc.createRange()))):A.selection.clear();A.helpers.isIOS()&&(A.events.disableBlur(),A.$el.blur());A.button.bulkRefresh(),A.events.trigger("video.hideResizer")}.call(e.get(0))}function Ce(){var e=I(this);e.removeClass("fr-uploading"),e.next().is("br")&&e.next().remove(),(0==a.length||0<a.length&&a.length==g)&&(c=e),"VIDEO"==e.get(0).tagName||"AUDIO"==e.get(0).tagName?A.selection.setAfter(e.parent()):A.selection.setAfter(e),A.undo.saveStep(),A.events.trigger("filesManager.loaded",[e]),ke(a)}function Ae(){var e,t=Array.prototype.slice.call(A.el.querySelectorAll("video, .fr-video > *")),i=[];for(e=0;e<t.length;e++)i.push(t[e].getAttribute("src")),I(t[e]).toggleClass("fr-draggable",A.opts.videoMove),""===t[e].getAttribute("class")&&t[e].removeAttribute("class"),""===t[e].getAttribute("style")&&t[e].removeAttribute("style");if(n)for(e=0;e<n.length;e++)i.indexOf(n[e].getAttribute("src"))<0&&A.events.trigger("video.removed",[I(n[e])]);n=t}function ke(e){if(null!=e){if(0==e.length)return void(null!=c&&("VIDEO"==c.get(0).tagName?A.video._editVideo(c.parent()):"IMG"==c.get(0).tagName?A.image.edit(c):c.trigger("click"),A.toolbar.disable()));_e(e.shift(),e)}}function Ie(e){var t=!1;if($e(Le(_.get(e))))A.trimVideoPlugin.trimVideo(L.get(e),e,L),t=!0;else if(ze(Le(_.get(e)))){var i=_.get(e).link,n=A.o_doc.createElement("img");n.src=i,x=n,s=e,A.imageTUI.launch(A,!1,e),t=!0}else if(Oe(Le(_.get(e)))){var a={apiKey:A.opts.googleOptions.API_KEY,clientId:A.opts.googleOptions.CLIENT_ID,authorizeButton:"authorize_button-".concat(e),signoutButton:"signout_button",userArea:"user_area-".concat(e),fileInput:"file_input",fileIndex:e,file:L.get(e),fileContainer:"file_container",loadingText:"File is being uploaded...",events:{onInvalidFile:function(e){},onError:function(e){}}};de=function f(p){var r,e=["https://www.googleapis.com/discovery/v1/apis/drive/v2/rest"],g="id,title,mimeType,userPermission,editable,copyable,shared,fileSize",u="-------314159265358979323846",m="\r\n--"+u+"\r\n",v="\r\n--"+u+"--",t=(document.getElementById(p.authorizeButton),document.getElementById(p.userArea));p.events||(p.events={});function i(){gapi.client.init({apiKey:p.apiKey,clientId:p.clientId,discoveryDocs:e,scope:"https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/drive.appdata"}).then(function(){gapi.auth2.getAuthInstance().isSignedIn.listen(n),n(gapi.auth2.getAuthInstance().isSignedIn.get()),function t(e){!gapi.auth2.getAuthInstance().isSignedIn.get()||gapi.auth.getToken()!==undefined&&gapi.auth.getToken().access_token===undefined?Promise.resolve(gapi.auth2.getAuthInstance().signIn()).then(function(){s()}):s()}()},function(e){p.events.onError(e)})}function n(e){e&&(t.style.display="block")}function a(e){var t=gapi.auth.getToken().access_token,i=r,n="https://docs.google.com/feeds/download/documents/export/Export?id="+i+"&format=docx&access_token="+t,a=new XMLHttpRequest;a.open("get",n),a.responseType="arraybuffer",a.onload=function(){var e=new Blob([new Uint8Array(this.response)],{type:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}),t=L.get(p.fileIndex);e.name=t.name,e.lastModified=t.lastModified,e.lastModifiedDate=t.lastModifiedDate,L.set(p.fileIndex,e),A.filesManager.upload(e,_,x,p.fileIndex),l()},a.send()}function s(e){!function n(e){for(var t=document.getElementsByClassName("fr-doc-edit-".concat(e)),i=0;i<t.length;i++)t[i].setAttribute("disabled",!0),t[i].classList.add("fr-disabled")}(p.fileIndex);var t=p.file;t?function i(d,f){var c=new FileReader;c.readAsArrayBuffer(d),c.onload=function(e){for(var t={title:d.name,mimeType:"application/vnd.google-apps.document"},i="",n=new Uint8Array(c.result),a=n.byteLength,r=0;r<a;r++)i+=String.fromCharCode(n[r]);var s=btoa(i),o=m+"Content-Type: application/json; charset=UTF-8\r\n\r\n"+JSON.stringify(t)+m+"Content-Type: application/octet-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+s+v,l=gapi.client.request({path:"/upload/drive/v2/files",method:"POST",params:{uploadType:"multipart",fields:g},headers:{"Content-Type":'multipart/related; boundary="'+u+'"',"Content-Length":o.Length},body:o});f||(f=function(e){}),l.execute(function(e,t){e.error?p.events.onError(e.error):f(e)})}}(t,o):p.events.onInvalidFile("File is not selected")}function o(e){r=e.id;var t="https://docs.google.com/document/d/"+e.id+"/edit",i=A.o_doc.body,n=A.o_doc.createElement("div");n.setAttribute("id","editDocContainer"),n.style.cssText="position: fixed; top: 0;left: 0;padding: 0;width: 100%;height: 100%;background: rgba(255,255,255,1);z-index: 9998;display:block",n.innerHTML='<div style="margin-top:25px; text-align:center"><label>Sign Out : </label><input type="checkbox" id ="markSignOut" role="button"/> <button id="signout_button" class="fr-trim-button" >Save </button> <button id="cancel_file_edit" class="fr-trim-button">Cancel</button></div> <iframe title="Edit your file" frameBorder="0" width="100%" height="700px" src="'+t+'"></iframe>',i.appendChild(n),document.getElementById("signout_button").onclick=a,document.getElementById("cancel_file_edit").onclick=l}function l(){document.getElementById("markSignOut").checked&&gapi.auth2.getAuthInstance().signOut().then(function(){gapi.auth.getToken()&&(gapi.auth.getToken().access_token=undefined)});var e=document.getElementById("editDocContainer");e.parentNode.removeChild(e),document.getElementById("user_area-".concat(p.fileIndex))&&(document.getElementById("user_area-".concat(p.fileIndex)).style.display="none"),function n(e){for(var t=document.getElementsByClassName("fr-doc-edit-".concat(e)),i=0;i<t.length;i++)t[i].removeAttribute("disabled"),t[i].classList.remove("fr-disabled")}(p.fileIndex)}p.events.onInvalidFile=p.events.onInvalidFile||function(e){},p.events.onError=p.events.onError||function(e){};var d={};return d.handleClientLoad=function(){gapi.load("client:auth2",i)},d}(a),function r(e,t){var n=function n(e,t){var i=document.createElement("script");i.src=e,i.onload=function(){this.onload=function(){},de.handleClientLoad()},i.onreadystatechange=function(){"complete"===this.readyState&&this.onload()},(document.getElementsByTagName("head")[0]||document.body).appendChild(i)};!function i(){0!=e.length?n(e.shift(),i):t&&t()}()}(["https://apis.google.com/js/api.js"],function(){})}t&&(p=!0)}function Le(e){if(""!=e.type)return e.type;var i,n=/(?:\.([^.]+))?$/.exec(e.name)[1];return[[".doc","application/msword"],[".docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],[".gif","image/gif"],[".jpeg","image/jpeg"],[".jpg","image/jpeg"],[".txt","text/plain"],[".log","type/text"],[".mov","video/quicktime"],[".mp3","audio/mpeg"],[".mp4","video/mp4"],[".ogg","audio/ogg"],[".ogv","video/ogg"],[".pdf","application/pdf"],[".png","image/png"],[".webm","video/webm"],[".webp","image/webp"],[".wmv","video/x-ms-wmv"],[".xls","application/vnd.ms-excel"],[".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],[".zip","application/x-zip-compressed"]].forEach(function(e,t){e[0]==".".concat(n)&&(i=e[1])}),i}function _e(o,e){if(Oe(Le(_.get(o)))||!Ne(Le(_.get(o)))){var t=_.get(o).link,i=_.get(o).text;!i&&L.get(o)&&L.get(o).name&&(i=L.get(o).name);var n=_.get(o).response;if(A.edit.on(),A.events.focus(!0),A.selection.restore(),A.opts.fileUseSelectedText&&A.selection.text().length&&(i=A.selection.text()),t.endsWith(".pdf")||t.endsWith(".txt"))Se('<iframe src="'.concat(t,'" title="').concat(i,'" width="\u201d100%\u201d" height="\u201d100%\u201d" class="fr-file"></iframe>'),!0);else A.html.insert('<a href="'.concat(t,'" target="_blank" id="fr-inserted-file" class="fr-file">').concat(i,"</a>"));var a=A.$el.find("#fr-inserted-file");a.removeAttr("id"),A.undo.saveStep(),function M(){var e,t=Array.prototype.slice.call(A.el.querySelectorAll("a.fr-file")),i=[];for(e=0;e<t.length;e++)i.push(t[e].getAttribute("href"));if(le)for(e=0;e<le.length;e++)i.indexOf(le[e].getAttribute("href"))<0&&A.events.trigger("file.unlink",[le[e]]);le=t}(),A.selection.clear(),A.selection.setAfter(a),A.events.trigger("file.inserted",[a,n]),ke(e)}if(ze(Le(_.get(o)))&&Ne(Le(_.get(o)))){var s=_.get(o).link,r=_.get(o).sanitize,l=_.get(o).data,d=_.get(o).$existing_img,f=_.get(o).response;d&&"string"==typeof d&&(d=A.$(d)),A.edit.off(),ee(A.language.translate("Loading image")),r&&(s=A.helpers.sanitizeURL(s));var c=new Image;c.onload=function(){var e,t;if(d){A.undo.canDo()||d.hasClass("fr-uploading")||A.undo.saveStep();var i=d.data("fr-old-src");d.data("fr-image-pasted")&&(i=null),A.$wp?((e=d.clone().removeData("fr-old-src").removeClass("fr-uploading").removeAttr("data-fr-image-pasted")).off("load"),i&&d.attr("src",i),d.replaceWith(e)):e=d;for(var n=e.get(0).attributes,a=0;a<n.length;a++){var r=n[a];0===r.nodeName.indexOf("data-")&&e.removeAttr(r.nodeName)}if(void 0!==l)for(t in l)l.hasOwnProperty(t)&&"link"!=t&&e.attr("data-".concat(t),l[t]);e.on("load",Ce),e.attr("src",s),A.edit.on(),A.undo.saveStep(),A.events.disableBlur(),A.$el.blur(),A.events.trigger(i?"image.replaced":"image.inserted",[e,f])}else e=function o(e,t,i){var n,a=I(document.createElement("img")).attr("src",e);if(t&&void 0!==t)for(n in t)t.hasOwnProperty(n)&&"link"!=n&&(" data-".concat(n,'="').concat(t[n],'"'),a.attr("data-".concat(n),t[n]));var r=A.opts.imageDefaultWidth;r&&"auto"!=r&&(r=A.opts.imageResizeWithPercent?"100%":"".concat(r,"px"));a.attr("style",r?"width: ".concat(r,";"):""),lt(a,A.opts.imageDefaultDisplay,A.opts.imageDefaultAlign),a.on("load",i),a.on("error",i),A.edit.on(),A.events.focus(!0),A.selection.restore(),A.undo.saveStep(),A.opts.imageSplitHTML?A.markers.split():A.markers.insert();A.html.wrap();var s=A.$el.find(".fr-marker");s.length?(s.parent().is("hr")&&s.parent().after(s),A.node.isLastSibling(s)&&s.parent().hasClass("fr-deletable")&&s.insertAfter(s.parent()),s.replaceWith(a)):A.$el.append(a);return a}(s,l,Ce),A.undo.saveStep(),A.events.disableBlur(),A.$el.blur(),A.events.trigger("image.inserted",[e,f])},c.onerror=function(){X(R,null,null,o),ke(e)},c.src=s}if(($e(Le(_.get(o)))||Pe(Le(_.get(o))))&&Ne(Le(_.get(o))))if(k=o,"video/url"==Le(_.get(o))){var p=!1;if(document.getElementById("fr-file-autoplay-button-"+o)!==undefined&&(p=document.getElementById("fr-file-autoplay-button-"+o).checked),p&&_.get(o)!==undefined&&-1<_.get(o).video.indexOf("iframe")&&_.get(o).video.indexOf("autoplay=1")<0){var g=_.get(o).video.substring(_.get(o).video.indexOf("src")+3),u="&";(g=(g=g.substring(g.indexOf('"')+1)).substring(0,g.indexOf('"'))).indexOf("?")<0&&(u="?"),_.get(o).video=_.get(o).video.replace(g,g+=u+"autoplay=1")}else!p&&_.get(o).video.indexOf(!1)&&(-1<_.get(o).video.indexOf("&autoplay=1")&&(_.get(o).video=_.get(o).video.replace("&autoplay=1","")),-1<_.get(o).video.indexOf("?autoplay=1")&&(_.get(o).video=_.get(o).video.replace("?autoplay=1","")));A.events.focus(!0),A.selection.restore(),A.html.insert('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">'.concat(_.get(o).video,"</span>"),!1,A.opts.videoSplitHTML),A.popups.hide("filesManager.insert");var m=A.$el.find(".fr-jiv");m.removeClass("fr-jiv"),m.toggleClass("fr-rv",A.opts.videoResponsive),function E(e,t,i){!A.opts.htmlUntouched&&A.opts.useClasses?(e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),e.addClass("fr-fv".concat(i[0]," fr-dv").concat(t[0]))):"inline"==t?(e.css({display:"inline-block"}),"center"==i?e.css({"float":"none"}):"left"==i?e.css({"float":"left"}):e.css({"float":"right"})):(e.css({display:"block",clear:"both"}),"left"==i?e.css({textAlign:"left"}):"right"==i?e.css({textAlign:"right"}):e.css({textAlign:"center"}))}(m,A.opts.videoDefaultDisplay,A.opts.videoDefaultAlign),m.toggleClass("fr-draggable",A.opts.videoMove),A.events.trigger("video.inserted",[m]),Ce.call(m)}else{var v=_.get(o).link,h=_.get(o).sanitize,b=_.get(o).data,y=_.get(o).$existing_img,w=_.get(o).response;A.edit.off(),h&&(v=A.helpers.sanitizeURL(v)),function C(){var e,t;if(y){A.undo.canDo()||y.find("video").hasClass("fr-uploading")||A.undo.saveStep();var i=y.find("video").data("fr-old-src"),n=y.data("fr-replaced");y.data("fr-replaced",!1),A.$wp?((e=y.clone(!0)).find("video").removeData("fr-old-src").removeClass("fr-uploading"),e.find("video").off("canplay"),i&&y.find("video").attr("src",i),y.replaceWith(e)):e=y;for(var a=e.find("video").get(0).attributes,r=0;r<a.length;r++){var s=a[r];0===s.nodeName.indexOf("data-")&&e.find("video").removeAttr(s.nodeName)}if(void 0!==b)for(t in b)b.hasOwnProperty(t)&&"link"!=t&&e.find("video").attr("data-".concat(t),b[t]);e.find("video").on("canplay",Ce),e.find("video").attr("src",v),A.edit.on(),Ae(),A.undo.saveStep(),A.$el.blur(),A.events.trigger(n?"video.replaced":"video.inserted",[e,w])}else e=function g(e,t,i,n,a){var r,s="";if(t&&void 0!==t)for(r in t)t.hasOwnProperty(r)&&"link"!=r&&(s+=" data-".concat(r,'="').concat(t[r],'"'));var o,l=A.opts.videoDefaultWidth;l&&"auto"!=l&&(l="".concat(l,"px"));if(Pe(n))o=I(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+A.opts.videoDefaultDisplay[0]+("center"!=A.opts.videoDefaultAlign?" fr-fv"+A.opts.videoDefaultAlign[0]:"")).html('<audio src="'+e+'" '+s+" controls>"+A.language.translate("Your browser does not support HTML5 video.")+"</audio>");else{var d="",f=document.getElementById("fr-file-autoplay-button-"+a).checked;f&&(d="autoplay"),o=I(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+A.opts.videoDefaultDisplay[0]+("center"!=A.opts.videoDefaultAlign?" fr-fv"+A.opts.videoDefaultAlign[0]:"")).html('<video src="'+e+'" '+s+(l?' style="width: '+l+';" ':"")+d+" controls>"+A.language.translate("Your browser does not support HTML5 video.")+"</video>")}o.toggleClass("fr-draggable",A.opts.videoMove),A.edit.on(),A.events.focus(!0),A.selection.restore(),A.undo.saveStep(),A.opts.videoSplitHTML?A.markers.split():A.markers.insert();A.html.wrap();var c=A.$el.find(".fr-marker");A.node.isLastSibling(c)&&c.parent().hasClass("fr-deletable")&&c.insertAfter(c.parent());c.replaceWith(o);var p="";p=Pe(n)?"audio":"video",o.find(p).get(0).readyState>o.find(p).get(0).HAVE_FUTURE_DATA||A.helpers.isIOS()?i.call(o.find(p).get(0)):(o.find(p).on("canplaythrough load",i),o.find(p).on("error",i));return o}(v,b,Ce,Le(_.get(o)),o),Ae(),A.undo.saveStep(),A.events.trigger("video.inserted",[e,w])}()}A.popups.hide("filesManager.insert"),S["delete"](o);var x=A.popups.get("filesManager.insert");x.find("input.fr-insert-attr.fr-checkbox-file-".concat(o))[0].checked=!1,x.find(".fr-file-"+o).get(0).classList.add("fr-unchecked"),j(),document.getElementById("fr-file-autoplay-button-"+o)&&(document.getElementById("fr-file-autoplay-button-"+o).checked=!1),B=B.filter(function(e){return e!=o})}function Se(e,t){var i,n;_t.VIDEO_EMBED_REGEX.test(e)?(i="video",n=A.opts.videoSplitHTML):_t.IMAGE_EMBED_REGEX.test(e)&&(i="image",n=A.opts.imageSplitHTML),A.events.focus(!0),A.selection.restore();var a=!1;x&&(qe(),a=!0),A.html.insert('<span id="fr-inserted-file" contenteditable="true" draggable="true" class="fr-'.concat(i,' fr-jiv fr-deletable">').concat(e,"</span>"),!1,n),A.popups.hide("filesManager.insert");var r=A.$el.find(".fr-jiv");r.removeClass("fr-jiv"),"video"==i&&(r.toggleClass("fr-rv",A.opts.videoResponsive),function s(e,t,i){!A.opts.htmlUntouched&&A.opts.useClasses?(e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),e.addClass("fr-fv".concat(i[0]," fr-dv").concat(t[0]))):"inline"==t?(e.css({display:"inline-block"}),"center"==i?e.css({"float":"none"}):"left"==i?e.css({"float":"left"}):e.css({"float":"right"})):(e.css({display:"block",clear:"both"}),"left"==i?e.css({textAlign:"left"}):"right"==i?e.css({textAlign:"right"}):e.css({textAlign:"center"}))}(r,A.opts.videoDefaultDisplay,A.opts.videoDefaultAlign),r.toggleClass("fr-draggable",A.opts.videoMove),A.events.trigger(a?"video.replaced":"video.inserted",[r])),"image"==i&&(lt(r,A.opts.imageDefaultDisplay,A.opts.imageDefaultAlign),r.find("img").removeClass("fr-dii"),r.find("img").addClass("fr-dib"),r.toggleClass("fr-draggable",A.opts.imageMove),A.events.trigger(a?"image.replaced":"image.inserted",[r])),t&&(c=r,A.selection.clear(),A.toolbar.disable(),A.video._editVideo(c))}function Te(e,t){try{if(!1===A.events.trigger("filesManager.uploaded",[e],!0))return A.edit.on(),!1;var i=JSON.parse(e);return i.link?i:(X(v,e,null,t),!1)}catch(n){return X(U,e,null,t),!1}}function Be(e,t){try{var i=I(e).find("Location").text(),n=I(e).find("Key").text();return!1===A.events.trigger("filesManager.uploadedToS3",[i,n,e],!0)?(A.edit.on(),!1):i}catch(a){return X(U,e,null,t),!1}}function Re(e,t,i,n){if(-1<P.indexOf(Le(e))||!Le(e))return X(O,null,null,n),!1;if(!1===A.events.trigger("filesManager.beforeUpload",[t]))return!1;if(!(null!==A.opts.filesManagerUploadURL&&A.opts.filesManagerUploadURL!=M||A.opts.filesManagerUploadToS3||A.opts.filesManagerUploadToAzure))return function y(o,l,d){var f=new FileReader;f.onload=function(){var e=f.result;if(f.result.indexOf("svg+xml")<0){for(var t=atob(f.result.split(",")[1]),i=[],n=0;n<t.length;n++)i.push(t.charCodeAt(n));if(e=window.URL.createObjectURL(new Blob([new Uint8Array(i)],{type:Le(l)})),ze(Le(l))){var a={link:e,sanitize:!1,data:null,$existing_img:d,response:null,type:Le(l)};_.set(o,a)}if(Oe(Le(l))){var r={link:e,text:l.name,response:null,type:Le(l)};_.set(o,r)}if($e(Le(l))||Pe(Le(l))){var s={link:e,sanitize:!1,data:null,$existing_img:d,type:Le(l)};_.set(o,s)}}},f.readAsDataURL(l)}(n,e),!1;if(ze(Le(e))&&(e.name||(e.name=(new Date).getTime()+"."+(Le(e)||"image/jpeg").replace(/image\//g,""))),e.size>A.opts.filesManagerMaxSize)return X(z,null,null,n),!1;if(A.opts.filesManagerAllowedTypes.indexOf("*")<0&&A.opts.filesManagerAllowedTypes.indexOf(Le(e))<0)return X(O,null,null,n),!1;var a;if(function w(e){isNaN(e)||(A.popups.get("filesManager.insert").find(".fr-file-item-right-"+e).get(0).innerHTML='<div class=\'fr-file-item-action-buttons\' >\n <button type="button" id="fr-file-cancel-upload-button-'.concat(e,'" class="fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons \n fr-file-button-').concat(e,' fr-file-cancel-upload-button" data-cmd="cancelUpload" data-title="Cancel" data-param1="').concat(e,'" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "-2 3 30 30" xlmns = "http://w3.org/200/svg"><path d = \'M13.4,12l5.6,5.6L17.6,19L12,13.4L6.4,19L5,17.6l5.6-5.6L5,6.4L6.4,5l5.6,5.6L17.6,5L19,6.4L13.4,12z\'></path></svg>\n </button>\n\n <button type="button" id="fr-upload-delete-button-').concat(e,'" class="fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons \n fr-file-button-').concat(e,' fr-upload-delete-button" data-cmd="deleteUpload" data-title="Delete" data-param1="').concat(e,'" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "-2 3 30 30" xlmns = "http://w3.org/200/svg"><path d = \'M15,10v8H9v-8H15 M14,4H9.9l-1,1H6v2h12V5h-3L14,4z M17,8H7v10c0,1.1,0.9,2,2,2h6c1.1,0,2-0.9,2-2V8z\'></path></svg>\n </button>\n\n <div class=\'progress-circle p0 fr-file-progress-circle-').concat(e,"'>\n <span class='fr-file-upload-percent-").concat(e," fr-file-upload-percent'>0%</span>\n <div class='left-half-clipper'>\n <div class='first50-bar'></div>\n <div class='value-bar'></div>\n </div>\n </div>\n </div>"),C.set(e,0))}(n),A.drag_support.formdata&&(a=A.drag_support.formdata?new FormData:null),a){var r;if(!1!==A.opts.filesManagerUploadToS3)for(r in a.append("key",A.opts.filesManagerUploadToS3.keyStart+(new Date).getTime()+"-"+(e.name||"untitled")),a.append("success_action_status","201"),a.append("X-Requested-With","xhr"),a.append("Content-Type",Le(e)),A.opts.filesManagerUploadToS3.params)A.opts.filesManagerUploadToS3.params.hasOwnProperty(r)&&a.append(r,A.opts.filesManagerUploadToS3.params[r]);for(r in A.opts.filesManagerUploadParams)A.opts.filesManagerUploadParams.hasOwnProperty(r)&&a.append(r,A.opts.filesManagerUploadParams[r]);a.append(A.opts.filesManagerUploadParam,e,e.name);var s,o,l=A.opts.filesManagerUploadURL;A.opts.filesManagerUploadToS3&&(l=A.opts.filesManagerUploadToS3.uploadURL?A.opts.filesManagerUploadToS3.uploadURL:"https://".concat(A.opts.filesManagerUploadToS3.region,".amazonaws.com/").concat(A.opts.filesManagerUploadToS3.bucket)),A.opts.filesManagerUploadToAzure&&(l=A.opts.filesManagerUploadToAzure.uploadURL?"".concat(A.opts.filesManagerUploadToAzure.uploadURL,"/").concat(e.name):encodeURI("https://".concat(A.opts.filesManagerUploadToAzure.account,".blob.core.windows.net/").concat(A.opts.filesManagerUploadToAzure.container,"/").concat(e.name)),s=l,A.opts.filesManagerUploadToAzure.SASToken&&(l+=A.opts.filesManagerUploadToAzure.SASToken),A.opts.filesManagerUploadMethod="PUT");var d=A.core.getXHR(l,A.opts.filesManagerUploadMethod);if(A.opts.filesManagerUploadToAzure){var f=(new Date).toUTCString();if(!A.opts.filesManagerUploadToAzure.SASToken&&A.opts.filesManagerUploadToAzure.accessKey){var c=A.opts.filesManagerUploadToAzure.account,p=A.opts.filesManagerUploadToAzure.container;if(A.opts.filesManagerUploadToAzure.uploadURL){var g=A.opts.filesManagerUploadToAzure.uploadURL.split("/");p=g.pop(),c=g.pop().split(".")[0]}var u="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(f,"\nx-ms-version:2019-07-07"),m=encodeURI("/"+c+"/"+p+"/"+e.name),v=A.opts.filesManagerUploadMethod+"\n\n\n"+e.size+"\n\n"+Le(e)+"\n\n\n\n\n\n\n"+u+"\n"+m,h=A.cryptoJSPlugin.cryptoJS.HmacSHA256(v,A.cryptoJSPlugin.cryptoJS.enc.Base64.parse(A.opts.filesManagerUploadToAzure.accessKey)).toString(A.cryptoJSPlugin.cryptoJS.enc.Base64),b="SharedKey "+c+":"+h;o=h,d.setRequestHeader("Authorization",b)}for(r in d.setRequestHeader("x-ms-version","2019-07-07"),d.setRequestHeader("x-ms-date",f),d.setRequestHeader("Content-Type",Le(e)),d.setRequestHeader("x-ms-blob-type","BlockBlob"),A.opts.filesManagerUploadParams)A.opts.filesManagerUploadParams.hasOwnProperty(r)&&d.setRequestHeader(r,A.opts.filesManagerUploadParams[r]);for(r in A.opts.filesManagerUploadToAzure.params)A.opts.filesManagerUploadToAzure.params.hasOwnProperty(r)&&d.setRequestHeader(r,A.opts.filesManagerUploadToAzure.params[r])}d.onload=function(){Oe(Le(e))?function u(e,t,i,n,a){var r=this.status,s=this.response,o=this.responseXML,l=this.responseText;try{if(A.opts.filesManagerUploadToS3||A.opts.filesManagerUploadToAzure)if(201===r){var d;if(A.opts.filesManagerUploadToAzure){if(!1===A.events.trigger("filesManager.uploadedToAzure",[this.responseURL,a,s],!0))return A.edit.on(),!1;d=n}else d=Be(o,t);if(d){var f={link:d,text:e,response:s,type:i};_.set(t,f)}}else X(U,s||o,null,t);else if(200<=r&&r<300){var c=Te(l,t);if(c){var p={link:c.link,text:e,response:s,type:i};_.set(t,p)}}else X(D,s||l,null,t)}catch(g){X(U,s||l,null,t)}}.call(d,e.name,n,Le(e),s,o):function m(e,t,i,n,a){var r=this.status,s=this.response,o=this.responseXML,l=this.responseText;try{if(A.opts.filesManagerUploadToS3||A.opts.filesManagerUploadToAzure)if(201==r){var d;if(A.opts.filesManagerUploadToAzure){if(!1===A.events.trigger("filesManager.uploadedToAzure",[this.responseURL,a,s],!0))return A.edit.on(),!1;d=n}else d=Be(o,t);if(d){var f={link:d,sanitize:!1,data:[],$existing_img:e,response:s||o,type:i};_.set(t,f)}}else X(U,s||o,e,t);else if(200<=r&&r<300){var c=Te(l,t);if(c){var p={link:c.link,sanitize:!1,data:c,$existing_img:e,response:s||o,type:i};_.set(t,p)}}else X(D,s||l,e,t)}catch(g){X(U,s||l,e,t)}}.call(d,x,n,Le(e),s,o),T.has(n)||we(100,n,!0)},d.onerror=function(){X(U,this.response||this.responseText||this.responseXML,null,n)},d.upload.onprogress=function(e){!function i(e,t){e.lengthComputable&&we(e.loaded/e.total*100|0,t,!1)}(e,n)},d.onabort=function(e){!function i(e,t){X($,t,x,e)}(n,e)},d.send(A.opts.filesManagerUploadToAzure?e:a),E.set(n,d)}}function De(l){A.events.$on(l,"click",".fr-upload-progress-layer",function(e){if(A.helpers.isMobile())return e.stopPropagation(),!1},!0),A.events.$on(l,"dragover dragenter",".fr-upload-progress-layer",function(e){e.preventDefault();for(var t=0;t<e.originalEvent.dataTransfer.types.length;t++)"Files"==e.originalEvent.dataTransfer.types[t]&&(e.originalEvent.dataTransfer.dropEffect="none");return!1},!0),A.events.$on(l,"dragleave dragend",".fr-upload-progress-layer",function(e){return e.preventDefault(),!1},!0),A.events.$on(l,"dragover dragenter",".fr-files-upload-layer",function(e){return I(this).addClass("fr-drop"),(A.browser.msie||A.browser.edge)&&e.preventDefault(),!1},!0),A.events.$on(l,"dragleave dragend",".fr-files-upload-layer",function(e){return I(this).removeClass("fr-drop"),(A.browser.msie||A.browser.edge)&&e.preventDefault(),!1},!0),A.events.$on(l,"click",".fr-insert-checkbox",function(e){if(this.classList.contains("fr-checkbox-disabled"))return this.children.target.disabled=!0,void(this.children.target.checked=!1);var t=parseInt(this.id.split("-").pop());S.set(t,this.children.target.checked);for(var i=l.find('.fr-command[data-cmd="insertAll"]'),n=l.find('.fr-command[data-cmd="deleteAll"]'),a=l.find('input.fr-file-insert-check[type="checkbox"]'),r=a.length,s=!0,o=0;o<r;o++)1==a[o].checked&&(s=!1);if(s?i.addClass("fr-disabled"):i.removeClass("fr-disabled"),s?n.addClass("fr-disabled"):n.removeClass("fr-disabled"),this.children.target.checked)l.find(".fr-file-"+this.id.split("-").pop()).get(0).setAttribute("draggable","true"),l.find(".fr-file-"+this.id.split("-").pop()).get(0).classList.remove("fr-unchecked");else{this.id.split("-").pop();l.find(".fr-file-"+this.id.split("-").pop()).get(0).setAttribute("draggable","false"),l.find(".fr-file-"+this.id.split("-").pop()).get(0).classList.add("fr-unchecked")}}),A.events.$on(l,"click",".fr-file-insert-button",function(e){this.classList.contains("fr-disabled")||_e(parseInt(this.id.split("-").pop()))}),A.events.$on(l,"click",".fr-file-autoplay-button",function(e){if(this.parentNode.classList.contains("fr-checkbox-disabled"))return this.disabled=!0,void(this.checked=!1);Ue(parseInt(this.id.split("-").pop()))}),A.events.$on(l,"click",".fr-file-edit-button",function(e){var t=parseInt(this.id.split("-").pop());l.find(".fr-file-edit-button-".concat(t)).hasClass("fr-disabled")||Ie(t)}),A.events.$on(l,"click",".fr-file-view-button",function(e){var t=parseInt(this.id.split("-").pop());l.find(".fr-file-view-button-".concat(t)).hasClass("fr-disabled")||function h(e){if(!Ne(Le(_.get(e)))){var t=_.get(e).link,i=_.get(e).link;if(L.get(e)&&L.get(e).name?i=L.get(e).name:_.get(e).text&&(i=_.get(e).text),0===t.indexOf("blob:")&&A.browser.msie&&window.navigator&&window.navigator.msSaveBlob)window.navigator.msSaveBlob(L.get(e),i);else{var n=document.createElement("a");n.href=t,n.download=i,n.click()}return!1}var a=A.popups.get("filesManager.insert");if(0<a.find(".fr-file-view-image-"+e).length)a.find(".fr-file-view-image-"+e)[0].remove();else{for(var r=a.find(".fr-file-view"),s=0;s<r.length;s++)r.get(s).remove();var o=a.find(".fr-file-view-"+e);if(ze(Le(_.get(e)))){var l='<div class="fr-file-view-modal">\n <div class="fr-file-view-modal-content">\n <div class="fr-file-view-close">&times;</div> \n <img src="'+_.get(e).link+"\" class ='fr-file-view-image'/>\n </div>\n </div>";o[0].innerHTML=l+o[0].innerHTML}else if($e(Le(_.get(e)))){var d;if(_.get(e).hasOwnProperty("video")){var f=_.get(e).video.substring(_.get(e).video.indexOf("src")+3),c=f.substring(f.indexOf('"')+1);c=c.substring(0,c.indexOf('"')),d='<div class="fr-file-view-modal">\n <div class="fr-file-view-modal-content ">\n <div class="fr-file-view-close">&times;</div> \n <iframe width="640" height="360" src="'.concat(c+"&autoplay=1",'" frameborder="0" class = "fr-file-view-image"></iframe>\n </div>\n </div>')}else d='<div class="fr-file-view-modal">\n <div class="fr-file-view-modal-content ">\n <div class="fr-file-view-close">&times;</div> \n <video controls src="'+_.get(e).link+"\" class ='fr-file-view-image' autoplay></video>\n </div>\n </div>";o[0].innerHTML=d+o[0].innerHTML}else if(Pe(Le(_.get(e)))){var p='<div class="fr-file-view-modal">\n <div class="fr-file-view-modal-content ">\n <div class="fr-file-view-close">&times;</div> \n <audio controls="controls" class =\'fr-file-view-image\' autoplay>\n\n <source src="'.concat(_.get(e).link,'" type="').concat(Le(_.get(e)),'" />\n\n Your browser does not support the audio element.\n </audio>\n </div>\n </div>');o[0].innerHTML=p+o[0].innerHTML}else if(Oe(Le(_.get(e)))){var g=_.get(e).link,u=_.get(e).text;if(g.endsWith(".pdf")||g.endsWith(".txt")){var m='<div class="fr-file-view-modal">\t\n <div class="fr-file-view-modal-content " >\t\n <div class="fr-file-view-close">&times;</div> \t\n <iframe src="'.concat(g,"\" style='background-color: white;' height='50%' width='50%' title=\"").concat(u,'" class="fr-file fr-file-view-image"></iframe>\t\n </div>\t\n </div>');o[0].innerHTML=m+o[0].innerHTML}else if(0===g.indexOf("blob:")&&A.browser.msie&&window.navigator&&window.navigator.msSaveBlob)window.navigator.msSaveBlob(L.get(e),u);else{var v=document.createElement("a");v.href=g,v.download=u,v.click()}}}}(t)}),A.events.$on(l,"click",".fr-file-delete-button",function(e){q(parseInt(this.id.split("-").pop()))}),A.events.$on(l,"click",".fr-file-cancel-upload-button",function(e){!function i(e){var t=A.popups.get("filesManager.insert");t.find(".fr-file-item-right-"+e).get(0).innerHTML=ye(e),E.get(e).abort(),xe(e,100,!0),t.find(".fr-checkbox-file-"+e).get(0).disabled=!0}(parseInt(this.id.split("-").pop()))}),A.events.$on(l,"click",".fr-upload-delete-button",function(e){!function t(e){0!=E.get(e).readyState&&(E.get(e).abort(),xe(e,100,!0),E["delete"](e)),q(e)}(parseInt(this.id.split("-").pop()))}),A.events.$on(l,"click",".fr-file-view-close",function(e){l.find(".fr-file-view-modal").get(0).outerHTML=""}),A.events.$on(l,"click",".fr-plugins-enable",function(e){!function t(){m.forEach(function(e){A.opts.pluginsEnabled.indexOf(e)<0&&A.opts.pluginsEnabled.push(e)})}(),function i(e){for(var t in e)if(!A[t]){if(_t.PLUGINS[t]&&A.opts.pluginsEnabled.indexOf(t)<0)continue;A[t]=new e[t](A),A[t]._init&&A[t]._init()}}(_t.PLUGINS),A.popups.get("filesManager.insert").get(0).outerHTML="",Fe(),y(!0)}),A.events.$on(l,"click",".fr-plugins-cancel",function(e){A.popups.hide("filesManager.insert")}),A.events.$on(l,"drop",".fr-upload-progress",function(e){e.preventDefault(),e.stopPropagation()}),A.events.$on(l,"drop",".fr-files-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),I(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var i=l.data("instance")||A;i.events.disableBlur();for(var n=[],a=0;a<t.files.length;a++){var r=u;L.set(r,t.files[a]),ve(r),S.set(r,!1),n.push(r),u++}for(var s=0;s<n.length;s++)i.filesManager.upload(L.get(n[s]),t.files,x,n[s]);i.events.enableBlur()}},!0),A.helpers.isIOS()&&A.events.$on(l,"touchstart",'.fr-files-upload-layer input[type="file"]',function(){I(this).trigger("click")},!0),A.events.$on(l,"change",'.fr-files-upload-layer input[type="file"]',function(){if(this.files){var e=l.data("instance")||A;e.events.disableBlur(),l.find("input:focus").blur(),e.events.enableBlur();var t=[];if("undefined"!=typeof this.files&&0<this.files.length){for(var i=0;i<this.files.length;i++){var n=u;L.set(n,this.files[i]),ve(n),S.set(n,!1),++u,t.push(n)}for(var a=0;a<t.length;a++)e.filesManager.upload(L.get(t[a]),this.files,x,t[a])}}I(this).val("")},!0)}function Ue(t){document.getElementById("fr-file-autoplay-button-"+t).checked?B.push(t):B=B.filter(function(e){return e!=t})}function ze(e){return e&&"image"===e.split("/")[0]}function Oe(e){return e&&"image"!=e.split("/")[0]&&e&&"video"!=e.split("/")[0]&&e&&"audio"!=e.split("/")[0]}function $e(e){return e&&"video"===e.split("/")[0]}function Pe(e){return e&&"audio"===e.split("/")[0]}function Ne(e){var t="audio/ogg",i="video/ogg";if(e==t||e==i||"image/webp"==e||"video/webm"==e){if(A.browser.msie||A.browser.edge||A.browser.safari)return!1;if(A.helpers.isMobile()){if(e==t||e==i)return!1;if(!A.helpers.isAndroid()&&!A.browser.chrome)return!1}}return!0}function Fe(e){if(e)return A.popups.onRefresh("filesManager.insert",b),A.popups.onHide("filesManager.insert",N),!0;var t,i,n="";A.opts.imageUpload||-1===A.opts.filesInsertButtons.indexOf("filesUpload")||A.opts.imageInsertButtons.splice(A.opts.filesInsertButtons.indexOf("filesUpload"),1);var a=A.button.buildList(A.opts.filesInsertButtons),r=A.button.buildList(A.opts.filesInsertButtons2);""!==a&&(n='<div class="fr-buttons fr-tabs">'.concat(a,'<span class="fr-align-right">').concat(r,"</span></div>"));var s=A.opts.filesInsertButtons.indexOf("filesUpload"),o=A.opts.filesInsertButtons.indexOf("filesByURL"),l=A.opts.filesInsertButtons.indexOf("filesEmbed"),d="";0<=s&&(t=" fr-active",0<=o&&o<s&&(t=""),d='<div class="fr-files-upload-layer'.concat(t,' fr-layer " id="fr-files-upload-layer-').concat(A.id,'"><div style="display:flex"><div class="fr-upload-section"><div class = \'fr-blue-decorator\'><div class = \'fr-cloud-icon\'><svg class = "fr-svg" focusable="false" width="26px" height="26px" viewBox = "0 0 24 24" xlmns = "http://w3.org/200/svg"><path d = \'M12 6.66667a4.87654 4.87654 0 0 1 4.77525 3.92342l0.29618 1.50268 1.52794 0.10578a2.57021 2.57021 0 0 1 -0.1827 5.13478H6.5a3.49774 3.49774 0 0 1 -0.3844 -6.97454l1.06682 -0.11341L7.678 9.29387A4.86024 4.86024 0 0 1 12 6.66667m0 -2A6.871 6.871 0 0 0 5.90417 8.37 5.49773 5.49773 0 0 0 6.5 19.33333H18.41667a4.57019 4.57019 0 0 0 0.32083 -9.13A6.86567 6.86567 0 0 0 12 4.66667Zm0.99976 7.2469h1.91406L11.99976 9 9.08618 11.91357h1.91358v3H11V16h2V14h-0.00024Z\'></path></svg></div>Drag & Drop One or More Files<br><div class="decorated"><span> OR </span></div> Click Browse Files </div> </div><div class="fr-form"><input type="file" accept="').concat(A.opts.filesManagerAllowedTypes.join(",").toLowerCase(),'" tabIndex="-1" aria - labelledby="fr-files-upload-layer-').concat(A.id,'"role="button" multiple></div> </div></div>'));var f="";0<=l&&(t=" fr-active",(s<l&&0<=s||o<l&&0<=o)&&(t=""),f='<div class="fr-files-embed-layer fr-layer'.concat(t,'" id="fr-files-embed-layer-').concat(A.id,'"><div class="fr-input-line padding-top-15"><textarea data-gramm_editor="false" style=\'height:60px\' id="fr-files-embed-layer-text').concat(A.id,'" type="text" placeholder="').concat(A.language.translate("Embedded Code"),'" tabIndex="1" aria-required="true" rows="5"></textarea></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="insertEmbed" tabIndex="2" role="button">').concat(A.language.translate("Insert"),"</button></div></div>"));var c="";0<=o&&(t=" fr-active",0<=s&&s<o&&(t=""),c='<div class="fr-files-by-url-layer'.concat(t,' fr-layer" id="fr-files-by-url-layer-').concat(A.id,'"><div class="fr-input-line fr-by-url-padding"><input id="fr-files-by-url-layer-text-').concat(A.id,'" type="text" placeholder="http://" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="filesInsertByURL" tabIndex="2" role="button">').concat(A.language.translate("Add"),"</button></div></div>"));var p={buttons:n,upload_layer:d,by_url_layer:c,embed_layer:f,upload_progress_layer:"<div class = ' fr-margin-16 fr-upload-progress' id=\"fr-upload-progress-layer-".concat(A.id,"\" ><div class='fr-progress-bar-style'><div class='fr-progress-bar fr-none'></div></div><div id='filesList' class = 'fr-upload-progress-layer fr-layer'></div></div>"),progress_bar:'<div class="fr-files-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="filesDismissError" tabIndex="2" role="button">OK</button></div></div>'};return 1<=A.opts.imageInsertButtons.length&&(i=A.popups.create("filesManager.insert",p)),A.$wp&&A.events.$on(A.$wp,"scroll",function(){x&&A.popups.isVisible("filesManager.insert")&&replace()}),De(i),A.popups.setPopupDimensions(i),i}function He(e){var t=e.split("/").pop();if(t.split(".").length<2){var i=new Date;return t+"-"+i.getDate()+"/"+(i.getMonth()+1)+"/"+i.getFullYear()}return t}function Ke(){x&&A.popups.get("image.alt").find("input").val(x.attr("alt")||"").trigger("change")}function Ve(){var e=A.popups.get("image.alt");e||(e=Ye()),Q(),A.popups.refresh("image.alt"),A.popups.setContainer("image.alt",A.$sc);var t=ft();ct()&&(t=t.find(".fr-img-wrap"));var i=t.offset().left+t.outerWidth()/2,n=t.offset().top+t.outerHeight();A.popups.show("image.alt",i,n,t.outerHeight(),!0)}function Ye(e){if(e)return A.popups.onRefresh("image.alt",Ke),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(A.button.buildList(A.opts.imageAltButtons),"</div>"),alt_layer:'<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-'.concat(A.id,'"><div class="fr-input-line"><input id="fr-image-alt-layer-text-').concat(A.id,'" type="text" placeholder="').concat(A.language.translate("Alternative Text"),'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetAlt" tabIndex="2" role="button">').concat(A.language.translate("Update"),"</button></div></div>")},i=A.popups.create("image.alt",t);return A.$wp&&A.events.$on(A.$wp,"scroll.image-alt",function(){x&&A.popups.isVisible("image.alt")&&Ve()}),i}function We(){var e=A.popups.get("image.size");if(x)if(ct()){var t=x.parent();t.get(0).style.width||(t=x.parent().parent()),e.find('input[name="width"]').val(t.get(0).style.width).trigger("change"),e.find('input[name="height"]').val(t.get(0).style.height).trigger("change")}else e.find('input[name="width"]').val(x.get(0).style.width).trigger("change"),e.find('input[name="height"]').val(x.get(0).style.height).trigger("change")}function Ge(){var e=A.popups.get("image.size");e||(e=Xe()),Q(),A.popups.refresh("image.size"),A.popups.setContainer("image.size",A.$sc);var t=ft();ct()&&(t=t.find(".fr-img-wrap"));var i=t.offset().left+t.outerWidth()/2,n=t.offset().top+t.outerHeight();A.popups.show("image.size",i,n,t.outerHeight(),!0)}function Xe(e){if(e)return A.popups.onRefresh("image.size",We),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(A.button.buildList(A.opts.imageSizeButtons),"</div>"),size_layer:'<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-'.concat(A.id,'"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-size-layer-width-\'').concat(A.id,'" type="text" name="width" placeholder="').concat(A.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-image-size-layer-height').concat(A.id,'" type="text" name="height" placeholder="').concat(A.language.translate("Height"),'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetSize" tabIndex="2" role="button">').concat(A.language.translate("Update"),"</button></div></div>")},i=A.popups.create("image.size",t);return A.$wp&&A.events.$on(A.$wp,"scroll.image-size",function(){x&&A.popups.isVisible("image.size")&&Ge()}),i}function je(e,t,i,n){return e.pageX=t,V.call(this,e),e.pageX=e.pageX+i*Math.floor(Math.pow(1.1,n)),Y.call(this,e),W.call(this,e),++n}function qe(e){(e=e||ft())&&!1!==A.events.trigger("image.beforeRemove",[e])&&(A.popups.hideAll(),at(!0),A.undo.canDo()||A.undo.saveStep(),e.get(0)==A.el?e.removeAttr("src"):(e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?(A.selection.setBefore(e.get(0).parentNode)||A.selection.setAfter(e.get(0).parentNode)||e.parent().after(_t.MARKERS),I(e.get(0).parentNode).remove()):(A.selection.setBefore(e.get(0))||A.selection.setAfter(e.get(0))||e.after(_t.MARKERS),e.remove()),A.html.fillEmptyBlocks(),A.selection.restore()),A.undo.saveStep())}function Ze(e){var t=e.which;if(x&&(t==_t.KEYCODE.BACKSPACE||t==_t.KEYCODE.DELETE))return e.preventDefault(),e.stopPropagation(),qe(),!1;if(x&&t==_t.KEYCODE.ESC){var i=x;return at(!0),A.selection.setAfter(i.get(0)),A.selection.restore(),e.preventDefault(),!1}if(!x||t!=_t.KEYCODE.ARROW_LEFT&&t!=_t.KEYCODE.ARROW_RIGHT)return x&&t===_t.KEYCODE.TAB?(e.preventDefault(),e.stopPropagation(),at(!0),!1):x&&t!=_t.KEYCODE.F10&&!A.keys.isBrowserAction(e)?(e.preventDefault(),e.stopPropagation(),!1):void 0;var n=x.get(0);return at(!0),t==_t.KEYCODE.ARROW_LEFT?A.selection.setBefore(n):A.selection.setAfter(n),A.selection.restore(),e.preventDefault(),!1}function Je(e){if(e&&"IMG"==e.tagName){if(A.node.hasClass(e,"fr-uploading")||A.node.hasClass(e,"fr-error")?e.parentNode.removeChild(e):A.node.hasClass(e,"fr-draggable")&&e.classList.remove("fr-draggable"),e.parentNode&&e.parentNode.parentNode&&A.node.hasClass(e.parentNode.parentNode,"fr-img-caption")){var t=e.parentNode.parentNode;t.removeAttribute("contenteditable"),t.removeAttribute("draggable"),t.classList.remove("fr-draggable");var i=e.nextSibling;i&&i.removeAttribute("contenteditable")}}else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var n=e.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"),a=0;a<n.length;a++)Je(n[a])}function Qe(e){if(!1===A.events.trigger("image.beforePasteUpload",[e]))return!1;x=I(e),F(),replace(),J(),x.on("load",function(){var t=[];F(),I(A.popups.get("filesManager.insert").get(0)).find("div.fr-active.fr-error").length<1&&J(),I(this).data("events").find(function(e){"load"===e[0]&&t.push(e)}),t.length<=1&&I(this).off("load")});for(var t=I(e).attr("src").split(","),i=atob(t[1]),n=[],a=0;a<i.length;a++)n.push(i.charCodeAt(a));Re([new Blob([new Uint8Array(n)],{type:t[0].replace(/data\:/g,"").replace(/;base64/g,"")})],x)}function et(){A.opts.imagePaste?A.$el.find("img[data-fr-image-pasted]").each(function(e,n){if(A.opts.imagePasteProcess){var t=A.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=A.opts.imageResizeWithPercent?"%":"px"),I(n).css("width",t).removeClass("fr-dii fr-dib fr-fir fr-fil"),lt(I(n),A.opts.imageDefaultDisplay,A.opts.imageDefaultAlign)}if(0===n.src.indexOf("data:"))Qe(n);else if(0===n.src.indexOf("blob:")||0===n.src.indexOf("http")&&A.opts.imageUploadRemoteUrls&&A.opts.imageCORSProxy){var i=new Image;i.crossOrigin="Anonymous",i.onload=function(){var e,t=A.o_doc.createElement("CANVAS"),i=t.getContext("2d");t.height=this.naturalHeight,t.width=this.naturalWidth,i.drawImage(this,0,0),setTimeout(function(){Qe(n)},0),e=2e3<this.naturalWidth||1500<this.naturalHeight?"jpeg":"png",n.src=t.toDataURL("image/".concat(e))},i.src=(0===n.src.indexOf("blob:")?"":"".concat(A.opts.imageCORSProxy,"/"))+n.src}else 0!==n.src.indexOf("http")||0===n.src.indexOf("https://mail.google.com/mail")?(A.selection.save(),I(n).remove(),A.selection.restore()):I(n).removeAttr("data-fr-image-pasted")}):A.$el.find("img[data-fr-image-pasted]").remove()}function tt(e){var t=e.target.result,i=A.opts.imageDefaultWidth;i&&"auto"!=i&&(i+=A.opts.imageResizeWithPercent?"%":"px"),A.undo.saveStep(),A.html.insert('<img data-fr-image-pasted="true" src="'.concat(t,'"').concat(i?' style="width: '.concat(i,';"'):"",">"));var n=A.$el.find('img[data-fr-image-pasted="true"]');n&&lt(n,A.opts.imageDefaultDisplay,A.opts.imageDefaultAlign),A.events.trigger("paste.after")}function it(e){if(e&&e.clipboardData&&e.clipboardData.items){var t=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))t=e.clipboardData.items[0].getAsFile();else for(var i=0;i<e.clipboardData.items.length&&!(t=e.clipboardData.items[i].getAsFile());i++);if(t)return function n(e){var t=new FileReader;t.onload=tt,t.readAsDataURL(e)}(t),!1}}function nt(e){return e=e.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function at(e){x&&(function t(){return rt}()||!0===e)&&(A.toolbar.enable(),l&&l.removeClass("fr-active"),A.popups.hide("image.edit"),x=null,ot(),d=null,f&&f.hide())}var rt=!1;function st(){rt=!0}function ot(){rt=!1}function lt(e,t,i){!A.opts.htmlUntouched&&A.opts.useClasses?(e.removeClass("fr-fil fr-fir fr-dib fr-dii"),i&&e.addClass("fr-fi".concat(i[0])),t&&e.addClass("fr-di".concat(t[0]))):"inline"==t?(e.css({display:"inline-block",verticalAlign:"bottom",margin:A.opts.imageDefaultMargin}),"center"==i?e.css({"float":"none",marginBottom:"",marginTop:"",maxWidth:"calc(100% - ".concat(2*A.opts.imageDefaultMargin,"px)"),textAlign:"center"}):"left"==i?e.css({"float":"left",marginLeft:0,maxWidth:"calc(100% - ".concat(A.opts.imageDefaultMargin,"px)"),textAlign:"left"}):e.css({"float":"right",marginRight:0,maxWidth:"calc(100% - ".concat(A.opts.imageDefaultMargin,"px)"),textAlign:"right"})):"block"==t&&(e.css({display:"block","float":"none",verticalAlign:"top",margin:"".concat(A.opts.imageDefaultMargin,"px auto"),textAlign:"center"}),"left"==i?e.css({marginLeft:0,textAlign:"left"}):"right"==i&&e.css({marginRight:0,textAlign:"right"}))}function dt(){return x}function ft(){return ct()?x.parents(".fr-img-caption").first():x}function ct(){return!!x&&0<x.parents(".fr-img-caption").length}return{_init:function pt(){var n;(function e(){A.helpers.isMobile()&&A.events.$on(I(A.o_win),"orientationchange",function(){setTimeout(function(){y(!0)},100)}),A.events.$on(A.$el,A._mousedown,"IMG"==A.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==I(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;A.helpers.isMobile()||A.selection.clear(),t=!0,A.popups.areVisible()&&A.events.disableBlur(),A.browser.msie&&(A.events.disableBlur(),A.$el.attr("contenteditable",!1)),A.draggable||"touchstart"==e.type||e.preventDefault(),e.stopPropagation()}),A.events.$on(A.$el,A._mousedown,".fr-img-caption .fr-inner",function(e){A.core.hasFocus()||A.events.focus(),e.stopPropagation()}),A.events.$on(A.$el,"paste",".fr-img-caption .fr-inner",function(e){A.toolbar.hide(),e.stopPropagation()}),A.events.$on(A.$el,A._mouseup,"IMG"==A.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==I(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t&&(t=!1,e.stopPropagation(),A.browser.msie&&(A.$el.attr("contenteditable",!0),A.events.enableBlur()))}),A.events.on("keyup",function(e){if(e.shiftKey&&""===A.selection.text().replace(/\n/g,"")&&A.keys.isArrow(e.which)){var t=A.selection.element(),i=A.selection.endElement();t&&"IMG"==t.tagName?Ee(I(t)):i&&"IMG"==i.tagName&&Ee(I(i))}},!0),A.events.on("window.mousedown",st),A.events.on("window.touchmove",ot),A.events.on("mouseup window.mouseup",function(){if(x)return at(),!1;ot()}),A.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&at()}),A.events.on("image.resizeEnd",function(){A.opts.iframe&&A.size.syncIframe()}),A.events.on("blur image.hideResizer commands.undo commands.redo element.dropped",function(){at(!(t=!1))}),A.events.on("modals.hide",function(){x&&A.selection.clear()}),A.events.on("image.resizeEnd",function(){A.win.getSelection&&Ee(x)}),A.opts.imageAddNewLine&&A.events.on("image.inserted",function(e){var t=e.get(0);for(t.nextSibling&&"BR"===t.nextSibling.tagName&&(t=t.nextSibling);t&&!A.node.isElement(t);)t=A.node.isLastSibling(t)?t.parentNode:null;A.node.isElement(t)&&(A.opts.enter===_t.ENTER_BR?e.after("<br>"):I(A.node.blockParent(e.get(0))).after("<".concat(A.html.defaultTag(),"><br></").concat(A.html.defaultTag(),">")))})})(),"IMG"==A.el.tagName&&A.$el.addClass("fr-view"),A.helpers.isMobile()&&(A.events.$on(A.$el,"touchstart","IMG"==A.el.tagName?null:'img:not([contenteditable="false"])',function(){fe=!1}),A.events.$on(A.$el,"touchmove",function(){fe=!0})),A.$wp?(A.events.on("window.keydown keydown",Ze,!0),A.events.on("keyup",function(e){if(x&&e.which==_t.KEYCODE.ENTER)return!1},!0),A.events.$on(A.$el,"keydown",function(){var e=A.selection.element();(e.nodeType===Node.TEXT_NODE||"BR"==e.tagName&&A.node.isLastSibling(e))&&(e=e.parentNode),A.node.hasClass(e,"fr-inner")||(A.node.hasClass(e,"fr-img-caption")||(e=I(e).parents(".fr-img-caption").get(0)),A.node.hasClass(e,"fr-img-caption")&&(I(e).after(_t.INVISIBLE_SPACE+_t.MARKERS),A.selection.restore()))})):A.events.$on(A.$win,"keydown",Ze),A.events.on("toolbar.esc",function(){if(x){if(A.$wp)A.events.disableBlur(),A.events.focus();else{var e=x;at(!0),A.selection.setAfter(e.get(0)),A.selection.restore()}return!1}},!0),A.events.on("toolbar.focusEditor",function(){if(x)return!1},!0),A.events.on("window.cut window.copy",function(e){if(x&&A.popups.isVisible("image.edit")&&!A.popups.get("image.edit").find(":focus").length){var t=ft();ct()?(t.before(_t.START_MARKER),t.after(_t.END_MARKER),A.selection.restore(),A.paste.saveCopiedText(t.get(0).outerHTML,t.text())):A.paste.saveCopiedText(x.get(0).outerHTML,x.attr("alt")),"copy"==e.type?setTimeout(function(){Ee(x)}):(at(!0),A.undo.saveStep(),setTimeout(function(){A.undo.saveStep()},0))}},!0),A.browser.msie&&A.events.on("keydown",function(e){if(!A.selection.isCollapsed()||!x)return!0;var t=e.which;t==_t.KEYCODE.C&&A.keys.ctrlKey(e)?A.events.trigger("window.copy"):t==_t.KEYCODE.X&&A.keys.ctrlKey(e)&&A.events.trigger("window.cut")}),A.events.$on(I(A.o_win),"keydown",function(e){var t=e.which;if(x&&t==_t.KEYCODE.BACKSPACE)return e.preventDefault(),!1}),A.events.$on(A.$win,"keydown",function(e){var t=e.which;x&&x.hasClass("fr-uploading")&&t==_t.KEYCODE.ESC&&x.trigger("abortUpload")}),A.events.on("destroy",function(){x&&x.hasClass("fr-uploading")&&x.trigger("abortUpload")}),A.events.on("paste.before",it),A.events.on("paste.beforeCleanup",nt),A.events.on("paste.after",et),A.events.on("html.processGet",Je),A.opts.imageOutputSize&&A.events.on("html.beforeGet",function(){n=A.el.querySelectorAll("img");for(var e=0;e<n.length;e++){var t=n[e].style.width||I(n[e]).width(),i=n[e].style.height||I(n[e]).height();t&&n[e].setAttribute("width","".concat(t).replace(/px/,"")),i&&n[e].setAttribute("height","".concat(i).replace(/px/,""))}}),A.opts.iframe&&A.events.on("image.loaded",A.size.syncIframe),A.events.$on(I(A.o_win),"orientationchange.image",function(){setTimeout(function(){x&&Ee(x)},100)}),function a(e){if(e)return A.$wp&&A.events.$on(A.$wp,"scroll.image-edit",function(){x&&A.popups.isVisible("image.edit")&&A.events.disableBlur()}),!0;var t="";if(0<A.opts.imageEditButtons.length){var i={buttons:t+='<div class="fr-buttons"> \n '.concat(A.button.buildList(A.opts.imageEditButtons),"\n </div>")};return A.popups.create("image.edit",i)}return!1}(!0),Fe(!0),Xe(!0),Ye(!0),A.events.on("node.remove",function(e){if("IMG"==e.get(0).tagName)return qe(e),!1}),A.events.on("popups.hide.filesManager.insert",function(e){A.filesManager.minimizePopup(k)})},showInsertPopup:y,showLayer:function gt(e){var t,i,n=A.popups.get("filesManager.insert");if(x||A.opts.toolbarInline){if(x){var a=ft();ct()&&(a=a.find(".fr-img-wrap")),i=a.offset().top+a.outerHeight(),t=a.offset().left}}else{var r=A.$tb.find('.fr-command[data-cmd="insertFiles"]');t=r.offset().left,i=r.offset().top+(A.opts.toolbarBottom?10:r.outerHeight()-10)}!x&&A.opts.toolbarInline&&(i=n.offset().top-A.helpers.getPX(n.css("margin-top")),n.hasClass("fr-above")&&(i+=n.outerHeight())),n.find(".fr-layer").removeClass("fr-active"),n.find(".fr-".concat(e,"-layer")).addClass("fr-active"),n.find(".fr-upload-progress-layer").addClass("fr-active"),A.popups.show("filesManager.insert",t,i,x?x.outerHeight():0),A.accessibility.focusPopup(n)},refreshUploadButton:function ut(e){var t=A.popups.get("filesManager.insert");t&&t.find(".fr-files-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshByURLButton:function mt(e){var t=A.popups.get("filesManager.insert");t&&t.find(".fr-files-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:Re,insertByURL:function vt(){for(var e,t=A.popups.get("filesManager.insert").find(".fr-files-by-url-layer input"),i=t.val().trim().split(/[ ,]+/),n=[],a=0,r=0;r<i.length;r++)e=i[r],new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e)&&(n[a]=i[r],a++);if(0!=n.length){if(0<t.val().trim().length&&0<n.length){var o=[],l=[],d=u,f=n.length;n.forEach(function(e,i){if(0==e.trim().length)u==d+--f&&Me(o,l);else{Q(),J(),ee(A.language.translate("Loading file(s)"));var n=e.trim(),t=function s(e){if(void 0===e)return e;var t=null;if(/^http/.test(e)||(e="https://".concat(e)),A.helpers.isURL(e))for(var i=0;i<_t.VIDEO_PROVIDERS.length;i++){var n=_t.VIDEO_PROVIDERS[i];if(n.test_regex.test(e)&&new RegExp(A.opts.videoAllowedProviders.join("|")).test(n.provider)){t=e.replace(n.url_regex,n.url_text),t=n.html.replace(/\{url\}/,t);break}}return t}(n);if(t){var a={link:n,name:n,type:"video/url",size:2,video:t};L.set(d+i,a),ve(d+i),Q(),J(),ee(A.language.translate("Loading file(s)")),_.set(d+i,a),++u==d+f&&Me(o,l)}else{var r=new XMLHttpRequest;r.onload=function(){if(200==this.status){var e=new Blob([this.response],{type:this.response.type||""});e.name=He(n),e.link=n,ze(this.response.type)?(e.sanitize=!0,e.existing_image=x):Oe(this.response.type)&&(e.text=He(n)),o.push(e),l.push(d+i),L.set(d+i,e),ve(d+i),(-1<P.indexOf(Le(e))||!Le(e))&&X(O,null,null,d+i)}else{var t=new Blob([this.response],{type:this.response.type||" "});t.name=He(n),t.link=n,L.set(d+i,t),ve(d+i),X(R,this.response,x,d+i)}Q(),J(),ee(A.language.translate("Loading file(s)")),++u==d+f&&Me(o,l)},r.onerror=function(){var e={link:n,name:He(n),size:0,type:""};X(9,this.response,x,d+i);var t=u;L.set(t,e),ve(t),Q(),J(),ee(A.language.translate("Loading file(s)")),++u==d+f&&Me(o,l)},r.open("GET","".concat(A.opts.imageCORSProxy,"/").concat(n),!0),r.responseType="blob",r.send()}}}),t.val(""),t.blur()}}else te(A.language.translate("Url entered is invalid. Please try again."))},insertAllFiles:function ht(){a=[];var e=A.popups.get("filesManager.insert");g=-1,c=null,e.find(".fr-insert-checkbox").toArray().forEach(function n(e,t,i){e.children.target.checked&&(a.push(parseInt(e.id.split("-").pop())),ze(_.get(parseInt(e.id.split("-").pop())).type)&&-1==g&&(g=t))}),ke(a),j()},deleteAllFiles:function e(){A.popups.get("filesManager.insert").find(".fr-insert-checkbox").toArray().forEach(function a(e,t,i){if(e.children.target.checked){var n=parseInt(e.id.split("-").pop());E.has(n)&&E["delete"](n),q(n)}}),j()},get:dt,getEl:ft,insert:_e,showProgressBar:J,remove:qe,hideProgressBar:Q,applyStyle:function bt(e,t,i){if(void 0===t&&(t=A.opts.imageStyles),void 0===i&&(i=A.opts.imageMultipleStyles),!x)return!1;var n=ft();if(!i){var a=Object.keys(t);a.splice(a.indexOf(e),1),n.removeClass(a.join(" "))}"object"==St(t[e])?(n.removeAttr("style"),n.css(t[e].style)):n.toggleClass(e),Ee(x)},showAltPopup:Ve,showSizePopup:Ge,setAlt:function yt(e){if(x){var t=A.popups.get("image.alt");x.attr("alt",e||t.find("input").val()||""),t.find("input:focus").blur(),Ee(x)}},setSize:function wt(e,t){if(x){var i=A.popups.get("image.size");e=e||i.find('input[name="width"]').val()||"",t=t||i.find('input[name="height"]').val()||"";var n=/^[\d]+((px)|%)*$/g;x.removeAttr("width").removeAttr("height"),e.match(n)?x.css("width",e):x.css("width",""),t.match(n)?x.css("height",t):x.css("height",""),ct()&&(x.parents(".fr-img-caption").removeAttr("width").removeAttr("height"),e.match(n)?x.parents(".fr-img-caption").css("width",e):x.parents(".fr-img-caption").css("width",""),t.match(n)?x.parents(".fr-img-caption").css("height",t):x.parents(".fr-img-caption").css("height","")),i&&i.find("input:focus").blur(),Ee(x)}},toggleCaption:function xt(){var e;if(x&&!ct()){(e=x).parent().is("a")&&(e=x.parent());var t,i,n=x.parents("ul")&&0<x.parents("ul").length?x.parents("ul"):x.parents("ol")&&0<x.parents("ol").length?x.parents("ol"):[];if(0<n.length){var a=n.find("li").length,r=x.parents("li"),s=document.createElement("li");a-1===r.index()&&(n.append(s),s.innerHTML="&nbsp;")}e.attr("style")&&(i=-1<(t=e.attr("style").split(":")).indexOf("width")?t[t.indexOf("width")+1].replace(";",""):"");var o=A.opts.imageResizeWithPercent?(-1<i.indexOf("px")?null:i)||"100%":x.width()+"px";e.wrap('<div class="fr-img-space-wrap"><span '+(A.browser.mozilla?"":'contenteditable="false"')+'class="fr-img-caption '+x.attr("class")+'" style="'+(A.opts.useClasses?"":e.attr("style"))+'" draggable="false"></span><p class="fr-img-space-wrap2">&nbsp;</p></div>'),e.wrap('<span class="fr-img-wrap"></span>'),x.after('<span class="fr-inner"'.concat(A.browser.mozilla?"":' contenteditable="true"',">").concat(_t.START_MARKER).concat(A.language.translate("Image Caption")).concat(_t.END_MARKER,"</span>")),x.removeAttr("class").removeAttr("style").removeAttr("width"),x.parents(".fr-img-caption").css("width",o),at(!0),A.selection.restore()}else e=ft(),x.insertAfter(e),x.attr("class",e.attr("class").replace("fr-img-caption","")).attr("style",e.attr("style")),e.remove(),Ee(x)},refreshEmbedButton:function Mt(e){var t=A.popups.get("filesManager.insert");t&&t.find(".fr-files-embed-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},insertEmbed:function Et(e){void 0===e&&(e=A.popups.get("filesManager.insert").find(".fr-files-embed-layer textarea").val()||""),0===e.length||!_t.VIDEO_EMBED_REGEX.test(e)&&!_t.IMAGE_EMBED_REGEX.test(e)?(te(A.language.translate("Something went wrong. Please try again.")),_t.VIDEO_EMBED_REGEX.test(e)&&A.events.trigger("video.codeError",[e])):Se(e)},hasCaption:ct,exitEdit:at,edit:Ee,cancelFileInsert:function Ct(){this.file_manager_dialog_open=!1,E.forEach(function(e,t){4!=e.readyState&&(e.abort(),q(t))});var e=A.popups.get("filesManager.insert");e.find(".fr-progress-bar").removeClass("fr-display-block").addClass("fr-none"),e.find('.fr-command[data-cmd="filesUpload"]').removeClass("fr-disabled"),e.find('.fr-command[data-cmd="filesByURL"]').removeClass("fr-disabled"),e.find('.fr-command[data-cmd="filesEmbed"]').removeClass("fr-disabled"),r=0,E=new Map,C=new Map,Z(),A.popups.hide("filesManager.insert")},minimizePopup:function At(e){this.file_manager_dialog_open=!1,A.popups.hide("filesManager.insert"),Z()},editImage:Ie,saveImage:function kt(e){var t=_.get(s);t.link=window.URL.createObjectURL(new Blob(e,{type:"image/png"})),_.set(s,t)},_showErrorMessage:te,_showFileErrorMessage:ie,getFileThumbnail:be,deleteFile:q,checkAutoplay:Ue,checkInsertAllState:j,_disableInsertCheckbox:G,_getFileType:Le,isChildWindowOpen:function It(){return p},setChildWindowState:function Lt(e){e!==undefined&&(p=e)},resetAllFilesCheckbox:Z}},_t.DefineIcon("insertFiles",{NAME:"image",SVG_KEY:"fileManager"}),_t.RegisterShortcut(_t.KEYCODE.P,"insertFiles",null,"P"),_t.RegisterCommand("insertFiles",{title:"Insert Files",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("filesManager.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("filesManager.insert")):this.filesManager.showInsertPopup()},plugin:"filesManager"}),_t.DefineIcon("cloudIcon",{NAME:"cloudIcon",SVG_KEY:"uploadFiles"}),_t.DefineIcon("filesUpload",{NAME:"uploadFiles",SVG_KEY:"uploadFiles"}),_t.RegisterCommand("filesUpload",{title:"Upload Files",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.showLayer("files-upload")},refresh:function(e){this.filesManager.refreshUploadButton(e)}}),_t.DefineIcon("filesByURL",{NAME:"link",SVG_KEY:"insertLink"}),_t.RegisterCommand("filesByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.showLayer("files-by-url")},refresh:function(e){this.filesManager.refreshByURLButton(e)}}),_t.DefineIcon("filesEmbed",{NAME:"code",SVG_KEY:"codeView"}),_t.RegisterCommand("filesEmbed",{title:"Embedded Code",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.showLayer("files-embed")},refresh:function(e){this.filesManager.refreshEmbedButton(e)}}),_t.DefineIcon("insertAll",{NAME:"insertAll",SVG_KEY:"fileInsert"}),_t.RegisterCommand("insertAll",{title:"Insert",undo:!1,focus:!1,toggle:!0,disabled:!0,callback:function(){this.filesManager.insertAllFiles()}}),_t.DefineIcon("deleteAll",{NAME:"remove",SVG_KEY:"remove"}),_t.RegisterCommand("deleteAll",{title:"Delete",undo:!1,focus:!1,toggle:!0,disabled:!0,callback:function(){this.filesManager.deleteAllFiles()}}),_t.DefineIcon("cancel",{NAME:"cancel",SVG_KEY:"cancel"}),_t.RegisterCommand("cancel",{title:"Cancel",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.cancelFileInsert()},refresh:function(e){}}),_t.DefineIcon("minimize",{NAME:"minimize",SVG_KEY:"minimize"}),_t.RegisterCommand("minimize",{title:"Minimize",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.minimizePopup("image.insert",!0)},refresh:function(e){this.filesManager.refreshEmbedButton(e)}}),_t.RegisterCommand("filesInsertByURL",{title:"Insert Image",undo:!0,refreshAfterCallback:!1,callback:function(){this.filesManager.insertByURL()},refresh:function(e){e.text(this.language.translate("Add"))}}),_t.RegisterCommand("imageInsertByUpload",{title:"Insert",undo:!0,refreshAfterCallback:!1,callback:function(e,t){},refresh:function(e){}}),_t.RegisterCommand("viewImage",{title:"View Image",undo:!0,refreshAfterCallback:!1,callback:function(e,t){},refresh:function(e){}}),_t.RegisterCommand("insertEmbed",{undo:!0,focus:!0,callback:function(){this.filesManager.insertEmbed(),this.popups.get("filesManager.insert").find("textarea")[0].value="",this.popups.get("filesManager.insert").find("textarea").removeClass("fr-not-empty")}}),_t.RegisterCommand("filesDismissError",{title:"OK",undo:!1,callback:function(){this.filesManager.hideProgressBar(!0)}})});
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(Lt){"use strict";function _t(e){return(_t="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})(e)}Lt=Lt&&Lt.hasOwnProperty("default")?Lt["default"]:Lt,Object.assign(Lt.POPUP_TEMPLATES,{"filesManager.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_BY_URL_LAYER_][_EMBED_LAYER_][_UPLOAD_PROGRESS_LAYER_][_PROGRESS_BAR_]","image.edit":"[_BUTTONS_]","image.alt":"[_BUTTONS_][_ALT_LAYER_]","image.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(Lt.DEFAULTS,{filesInsertButtons:["imageBack","|","filesUpload","filesByURL","filesEmbed"],filesInsertButtons2:["deleteAll","insertAll","cancel","minimize"],imageEditButtons:["imageReplace","imageAlign","imageCaption","imageRemove","imageLink","linkOpen","linkEdit","linkRemove","-","imageDisplay","imageStyle","imageAlt","imageSize"],imageAltButtons:["imageBack","|"],imageSizeButtons:["imageBack","|"],imageUpload:!0,filesManagerUploadURL:null,imageCORSProxy:"https://cors-anywhere.froala.com",imageUploadRemoteUrls:!0,filesManagerUploadParam:"file",filesManagerUploadParams:{},googleOptions:{},filesManagerUploadToS3:!1,filesManagerUploadToAzure:!1,filesManagerUploadMethod:"POST",filesManagerMaxSize:10485760,filesManagerAllowedTypes:["*"],imageResize:!0,imageResizeWithPercent:!1,imageRoundPercent:!1,imageDefaultWidth:300,imageDefaultAlign:"center",imageDefaultDisplay:"block",imageSplitHTML:!1,imageStyles:{"fr-rounded":"Rounded","fr-bordered":"Bordered","fr-shadow":"Shadow"},imageMove:!0,imageMultipleStyles:!0,imageTextNear:!0,imagePaste:!0,imagePasteProcess:!1,imageMinWidth:16,imageOutputSize:!1,imageDefaultMargin:5,imageAddNewLine:!1}),Lt.VIDEO_PROVIDERS=[{test_regex:/^.*((youtu.be)|(youtube.com))\/((v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))?\??v?=?([^#\&\?]*).*/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=|embed\/)?([0-9a-zA-Z_\-]+)(.+)?/g,url_text:"https://www.youtube.com/embed/$1?$2",html:'<iframe width="640" height="360" src="{url}&wmode=opaque" frameborder="0" allowfullscreen></iframe>',provider:"youtube"},{test_regex:/^.*(?:vimeo.com)\/(?:channels(\/\w+\/)?|groups\/*\/videos\/\u200b\d+\/|video\/|)(\d+)(?:$|\/|\?)/,url_regex:/(?:https?:\/\/)?(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^\/]*)\/videos\/|album\/(?:\d+)\/video\/|video\/|)(\d+)(?:[a-zA-Z0-9_\-]+)?(\/[a-zA-Z0-9_\-]+)?/i,url_text:"https://player.vimeo.com/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"vimeo"},{test_regex:/^.+(dailymotion.com|dai.ly)\/(video|hub)?\/?([^_]+)[^#]*(#video=([^_&]+))?/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:dailymotion\.com|dai\.ly)\/(?:video|hub)?\/?(.+)/g,url_text:"https://www.dailymotion.com/embed/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"dailymotion"},{test_regex:/^.+(screen.yahoo.com)\/[^_&]+/,url_regex:"",url_text:"",html:'<iframe width="640" height="360" src="{url}?format=embed" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',provider:"yahoo"},{test_regex:/^.+(rutube.ru)\/[^_&]+/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:rutube\.ru)\/(?:video)?\/?(.+)/g,url_text:"https://rutube.ru/play/embed/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',provider:"rutube"},{test_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/,url_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/g,url_text:"https://play.vidyard.com/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"vidyard"}],Lt.VIDEO_EMBED_REGEX=/^\W*((<iframe(.|\n)*>(\s|\n)*<\/iframe>)|(<embed(.|\n)*>))\W*$/i,Lt.IMAGE_EMBED_REGEX=/^\W*((<img(.|\n)*>(\s|\n)*))\W*$/i,Lt.PLUGINS.filesManager=function(A){var x,s,C,l,d,f,o,c,I=A.$,M="https://i.froala.com/upload",p=!1,t=!1,L=new Map,_=new Map,E=new Map,k=new Map,D=new Map,S=new Map,r=0,a=[],g=-1,B=[],u=0,m=["file","image","imageTUI","video"],T=1,v=2,R=3,U=4,z=5,O=6,$=10,P=["video/avi","video/mpeg","video/x-ms-wmv"],h={};function b(){var e=A.popups.get("filesManager.insert"),t=e.find(".fr-files-by-url-layer input");t.val(""),e.find(".fr-files-embed-layer textarea").val("").trigger("change"),t.trigger("change")}function y(e){var t;A.hasOwnProperty("imageTUI")||(o="fr-disabled"),S.forEach(function(e,t){q(t)}),w()?(t=A.popups.get("filesManager.insert"))||(t=Ne()):(t=A.popups.get("filesManager.insert"))||(t=function s(){var e='<div class="fr-buttons fr-tabs">'.concat(A.button.buildList(A.opts.fileInsertButtons),"</div>"),t="<div style= 'padding:10px'>\n <div class = 'fr-message'><h3 style ='font-size: 16px; margin: 10px 10px;font-weight: normal;'>".concat(A.language.translate(function a(){var e="",t=function i(){var t=[];return m.forEach(function(e){A.opts.pluginsEnabled.indexOf(e)<0&&t.push(e.charAt(0).toUpperCase()+e.slice(1))}),t}();e=t.join(", "),1<t.length?e+=" plugin are":e+=" plugin is";return e}()+" not enabled. Do you want to enable?"),"</h3></div>\n <div style='text-align:right;'>\n <button class='fr-trim-button fr-plugins-enable'>").concat(A.language.translate("Enable"),"</button> \n <button class='fr-trim-button fr-plugins-cancel'>").concat(A.language.translate("Cancel"),"</button>\n </div>"),i={buttons:e,upload_layer:t,by_url_layer:"",embed_layer:"",upload_progress_layer:"",progress_bar:""},n=A.popups.create("filesManager.insert",i);return Re(n),n}());var i=A.$tb.find('.fr-command[data-cmd="insertFiles"]');if(Q(),e||!t.hasClass("fr-active"))if(e||Z(),A.popups.refresh("filesManager.insert"),A.popups.setContainer("filesManager.insert",A.$tb),i.isVisible()){var n=A.button.getPosition(i,L.size),a=n.left,r=n.top;A.popups.show("filesManager.insert",a,r,i.outerHeight())}else A.position.forSelection(t),A.popups.show("filesManager.insert");A.popups.setPopupDimensions(t),w()&&A.popups.setFileListHeight(t),t.find(".fr-upload-progress")&&0==L.size&&t.find(".fr-upload-progress").addClass("fr-none")}function w(){var t=!0;return m.forEach(function(e){A.opts.pluginsEnabled.indexOf(e)<0&&(t=!1)}),t}function F(){Q()}function N(){if(l||function s(){var e;A.shared.$image_resizer?(l=A.shared.$image_resizer,f=A.shared.$img_overlay,A.events.on("destroy",function(){I("body").first().append(l.removeClass("fr-active"))},!0)):(A.shared.$image_resizer=I(document.createElement("div")).attr("class","fr-image-resizer"),l=A.shared.$image_resizer,A.events.$on(l,"mousedown",function(e){e.stopPropagation()},!0),A.opts.imageResize&&(l.append(H("nw")+H("ne")+H("sw")+H("se")),A.shared.$img_overlay=I(document.createElement("div")).attr("class","fr-image-overlay"),f=A.shared.$img_overlay,e=l.get(0).ownerDocument,I(e).find("body").first().append(f)));A.events.on("shared.destroy",function(){l.html("").removeData().remove(),l=null,A.opts.imageResize&&(f.remove(),f=null)},!0),A.helpers.isMobile()||A.events.$on(I(A.o_win),"resize",function(){x&&!x.hasClass("fr-uploading")?nt(!0):x&&(N(),replace(),J(!1))});if(A.opts.imageResize){e=l.get(0).ownerDocument,A.events.$on(l,A._mousedown,".fr-handler",Y),A.events.$on(I(e),A._mousemove,V),A.events.$on(I(e.defaultView||e.parentWindow),A._mouseup,W),A.events.$on(f,"mouseleave",W);var n=1,a=null,r=0;A.events.on("keydown",function(e){if(x){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,i=e.which;(i!==a||200<e.timeStamp-r)&&(n=1),(i==Lt.KEYCODE.EQUALS||A.browser.mozilla&&i==Lt.KEYCODE.FF_EQUALS)&&t&&!e.altKey?n=je.call(this,e,1,1,n):(i==Lt.KEYCODE.HYPHEN||A.browser.mozilla&&i==Lt.KEYCODE.FF_HYPHEN)&&t&&!e.altKey?n=je.call(this,e,2,-1,n):A.keys.ctrlKey(e)||i!=Lt.KEYCODE.ENTER||(x.before("<br>"),Ee(x)),a=i,r=e.timeStamp}},!0),A.events.on("keyup",function(){n=1})}}(),!x)return!1;var e=A.$wp||A.$sc;e.append(l),l.data("instance",A);var t=e.scrollTop()-("static"!=e.css("position")?e.offset().top:0),i=e.scrollLeft()-("static"!=e.css("position")?e.offset().left:0);i-=A.helpers.getPX(e.css("border-left-width")),t-=A.helpers.getPX(e.css("border-top-width")),A.$el.is("img")&&A.$sc.is("body")&&(i=t=0);var n=dt();ft()&&(n=n.find(".fr-img-wrap"));var a=0,r=0;A.opts.iframe&&(a=A.helpers.getPX(A.$wp.find(".fr-iframe").css("padding-top")),r=A.helpers.getPX(A.$wp.find(".fr-iframe").css("padding-left"))),l.css("top",(A.opts.iframe?n.offset().top+a:n.offset().top+t)-1).css("left",(A.opts.iframe?n.offset().left+r:n.offset().left+i)-1).css("width",n.get(0).getBoundingClientRect().width).css("height",n.get(0).getBoundingClientRect().height).addClass("fr-active")}function H(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function K(e){ft()?x.parents(".fr-img-caption").css("width",e):x.css("width",e)}function Y(e){if(!A.core.sameInstance(l))return!0;if(e.preventDefault(),e.stopPropagation(),A.$el.find("img.fr-error").left)return!1;A.undo.canDo()||A.undo.saveStep();var t=e.pageX||e.originalEvent.touches[0].pageX;if("mousedown"==e.type){var i=A.$oel.get(0).ownerDocument,n=i.defaultView||i.parentWindow,a=!1;try{a=n.location!=n.parent.location&&!(n.$&&n.$.FE)}catch(o){}a&&n.frameElement&&(t+=A.helpers.getPX(I(n.frameElement).offset().left)+n.frameElement.clientLeft)}(d=I(this)).data("start-x",t),d.data("start-width",x.width()),d.data("start-height",x.height());var r=x.width();if(A.opts.imageResizeWithPercent){var s=x.parentsUntil(A.$el,A.html.blockTagsQuery()).get(0)||A.el;r=(r/I(s).outerWidth()*100).toFixed(2)+"%"}K(r),f.show(),A.popups.hideAll(),st()}function V(e){if(!A.core.sameInstance(l))return!0;var t;if(d&&x){if(e.preventDefault(),A.$el.find("img.fr-error").left)return!1;var i=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null);if(!i)return!1;var n=i-d.data("start-x"),a=d.data("start-width");if((d.hasClass("fr-hnw")||d.hasClass("fr-hsw"))&&(n=0-n),A.opts.imageResizeWithPercent){var r=x.parentsUntil(A.$el,A.html.blockTagsQuery()).get(0)||A.el;a=((a+n)/I(r).outerWidth()*100).toFixed(2),A.opts.imageRoundPercent&&(a=Math.round(a)),K("".concat(a,"%")),(t=ft()?(A.helpers.getPX(x.parents(".fr-img-caption").css("width"))/I(r).outerWidth()*100).toFixed(2):(A.helpers.getPX(x.css("width"))/I(r).outerWidth()*100).toFixed(2))===a||A.opts.imageRoundPercent||K("".concat(t,"%")),x.css("height","").removeAttr("height")}else a+n>=A.opts.imageMinWidth&&(K(a+n),t=ft()?A.helpers.getPX(x.parents(".fr-img-caption").css("width")):A.helpers.getPX(x.css("width"))),t!==a+n&&K(t),((x.attr("style")||"").match(/(^height:)|(; *height:)/)||x.attr("height"))&&(x.css("height",d.data("start-height")*x.width()/d.data("start-width")),x.removeAttr("height"));N(),A.events.trigger("image.resize",[lt()])}}function W(e){if(!A.core.sameInstance(l))return!0;if(d&&x){if(e&&e.stopPropagation(),A.$el.find("img.fr-error").left)return!1;d=null,f.hide(),N(),A.undo.saveStep(),A.events.trigger("image.resizeEnd",[lt()])}else l.removeClass("fr-active")}function G(){S.forEach(function(e,t){var i=A.popups.get("filesManager.insert");i.find(".fr-checkbox-file-"+t).get(0).disabled=!0,document.getElementById("fr-file-autoplay-button-"+t)&&(document.getElementById("fr-file-autoplay-button-"+t).disabled=!0,document.getElementById("fr-file-autoplay-button-"+t).parentElement.classList.add("fr-checkbox-disabled"),document.getElementById("fr-file-autoplay-button-"+t).parentElement.classList.remove("fr-files-checkbox")),i.find(".fr-checkbox-"+t).get(0).classList.remove("fr-files-checkbox"),i.find(".fr-checkbox-"+t).get(0).classList.add("fr-checkbox-disabled")})}function X(e,t,i,n){A.edit.on(),x&&x.addClass("fr-error"),h[e]?(e!=R&&e!=v&&e!=U||we(100,n,!0),S.set(n,h[e]),G(),function a(){S.forEach(function(e,t){A.popups.get("filesManager.insert"),document.getElementById("fr-file-edit-button-".concat(t))&&(document.getElementById("fr-file-edit-button-".concat(t)).classList.add("fr-disabled"),document.getElementById("fr-file-view-button-".concat(t)).classList.add("fr-disabled"),document.getElementById("fr-file-insert-button-".concat(t)).classList.add("fr-disabled"))})}(),ie(A.language.translate(h[e]),n)):ie(A.language.translate("Something went wrong. Please try again."),n),!x&&i&&qe(i),A.events.trigger("filesManager.error",[{code:e,message:h[e]},t,i])}function j(){var e=A.popups.get("filesManager.insert"),t=e.find('.fr-command[data-cmd="insertAll"]'),i=e.find('.fr-command[data-cmd="deleteAll"]'),n=!0;D.forEach(function a(e,t,i){D.get(t)&&(n=!1)}),n?t.addClass("fr-disabled"):t.removeClass("fr-disabled"),n?i.addClass("fr-disabled"):i.removeClass("fr-disabled")}function q(e){_.get(e)&&_.get(e).link&&A.events.trigger("filesManager.removed",[_.get(e).link]);var t=A.popups.get("filesManager.insert");t.find(".fr-file-"+e).get(0)!==undefined&&(t.find(".fr-file-"+e).get(0).outerHTML=""),_["delete"](e),L["delete"](e),D["delete"](e),j(),0==L.size&&(u=0),S["delete"](e),A.popups.setPopupDimensions(t,!0),A.opts.toolbarBottom?y(!0):A.popups.setPopupDimensions(t),t.find(".fr-upload-progress")&&0==L.size&&t.find(".fr-upload-progress").addClass("fr-none")}function Z(){for(var e=A.popups.get("filesManager.insert"),t=e.find(".fr-insert-checkbox"),i=0;i<t.length;i++)t.get(i).children.target.checked=!1,e.find(".fr-file-"+t.get(i).id.split("-").pop()).get(0).classList.add("fr-unchecked");if(C)document.getElementById("fr-file-autoplay-button-".concat(C))&&(document.getElementById("fr-file-autoplay-button-".concat(C)).checked=!1),B=B.filter(function(e){return e!=C});else{for(var n=e.find(".fr-file-autoplay-button"),a=0;a<n.length;a++)n.get(a).checked=!1;B=[]}D=new Map,j()}function J(e){var t=A.popups.get("filesManager.insert");if(t||(t=Ne()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-files-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),x){var i=dt();A.popups.setContainer("filesManager.insert",A.$sc);var n=i.offset().left,a=i.offset().top+i.height();A.popups.show("filesManager.insert",n,a,i.outerHeight())}void 0===e&&ee(A.language.translate("Uploading"),0)}function Q(e){var t=A.popups.get("filesManager.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-files-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||A.$el.find("img.fr-error").length)){if(A.events.focus(),A.$el.find("img.fr-error").length&&(A.$el.find("img.fr-error").remove(),A.undo.saveStep(),A.undo.run(),A.undo.dropRedo()),!A.$wp&&x){var i=x;nt(!0),A.selection.setAfter(i.get(0)),A.selection.restore()}A.popups.hide("filesManager.insert")}}function ee(e,t){var i=A.popups.get("filesManager.insert");if(i){var n=i.find(".fr-files-progress-bar-layer");n.find("h3").text(e+(t?" ".concat(t,"%"):"")),n.removeClass("fr-error"),t?(n.find("div").removeClass("fr-indeterminate"),n.find("div > span").css("width","".concat(t,"%"))):n.find("div").addClass("fr-indeterminate")}}function te(e){J();var t=A.popups.get("filesManager.insert").find(".fr-files-progress-bar-layer");t.addClass("fr-error");var i=t.find("h3");i.text(e),A.events.disableBlur(),i.focus()}function ie(e,t){var i=A.popups.get("filesManager.insert"),n=i.find(".fr-upload-progress-layer"),a=i.find(".fr-file-".concat(t));n.addClass("fr-error"),a.find("h5").text(e)}h[T]="File cannot be loaded from the passed link.",h[v]="No link in upload response.",h[R]="Error during file upload.",h[U]="Parsing response failed.",h[z]="File is too large.",h[O]="File type is invalid.",h[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",h[8]="File is corrupted.",h[9]="Error during file loading.",h[$]="File upload cancelled";var i,ne,ae,re,se,oe,n,le,de,fe,ce="";function pe(e){ce=e,i=document.getElementsByClassName(e),Array.prototype.map.call(i,function(e){!function n(e){if(e.addEventListener("dragover",function(e){e.preventDefault(),e.stopPropagation(),ne=e.pageX,ae=e.pageY;var t=document.getElementById("filesList");ae+20>t.getBoundingClientRect().bottom&&ge(t,0,10),ae-20<t.getBoundingClientRect().top&&ge(t,0,-10)},!1),A.helpers.isMobile()){var t=e.getElementsByClassName("dot");t[0].addEventListener("touchmove",function(e){e.preventDefault(),e.stopPropagation();for(var t=e.target;t&&!t.classList.contains(ce);)t=t.parentElement;for(var i=document.elementFromPoint(e.targetTouches[0].clientX,e.targetTouches[0].clientY);i&&!i.classList.contains(ce);)i=i.parentElement;var n=document.getElementsByClassName("fr-hovered-over-file");Array.prototype.forEach.call(n,function(e){e.classList.remove("fr-hovered-over-file")}),i&&!t.classList.contains("fr-unchecked")&&i.classList.add("fr-hovered-over-file");var a=document.getElementById("filesList");e.targetTouches[0].clientY+5>a.getBoundingClientRect().bottom&&ge(a,0,5),e.targetTouches[0].clientY-5<a.getBoundingClientRect().top&&ge(a,0,-5)},!1)}if(e.ondrag=ue,e.ondragend=me,A.helpers.isMobile()){var i=e.getElementsByClassName("dot");i[0].addEventListener("touchmove",ue,!1),i[0].addEventListener("touchend",me,!1)}}(e)})}function ge(e,t,i){e.scrollLeft+=t,e.scrollTop+=i}function ue(e){for(A.helpers.isMobile()&&(se=event.touches[0].clientX,oe=event.touches[0].clientY),re=e.target;!re.classList.contains(ce);)re=re.parentElement;re.classList.contains(ce)&&!re.classList.contains("fr-unchecked")?A.helpers.isMobile()&&re.classList.add("drag-sort-active"):re=undefined}function me(e){var t;if(re!==undefined){var i,n;if(A.helpers.isMobile())for(i=se,n=oe,t=event.target;!t.classList.contains(ce);)t=t.parentElement;else i=event.clientX,n=event.clientY;A.helpers.isMobile()||!A.browser.safari&&!A.browser.mozilla||(i=ne,n=ae);for(var a=document.elementFromPoint(i,n);a&&!a.classList.contains(ce);)a=a.parentElement;a&&!a.classList.contains(ce)?a=undefined:a&&re!==a&&function o(e,t){var i,n,a=e.parentNode,r=t.parentNode;if(!a||!r||a.isEqualNode(t)||r.isEqualNode(e))return;for(var s=0;s<a.children.length;s++)a.children[s].isEqualNode(e)&&(i=s);for(var s=0;s<r.children.length;s++)r.children[s].isEqualNode(t)&&(n=s);a.isEqualNode(r)&&i<n&&n++;a.insertBefore(t,a.children[i]),r.insertBefore(e,r.children[n])}(re,a),A.helpers.isMobile()&&(t.classList.remove("fr-hovered-over-file"),a.classList.remove("fr-hovered-over-file"))}}function ve(e){var n=A.popups.get("filesManager.insert");n.find(".fr-upload-progress-layer").hasClass("fr-active")||n.find(".fr-upload-progress-layer").addClass("fr-active"),n.find(".fr-upload-progress").removeClass("fr-none");var t=L.get(e),i=function s(e){var t,i={weekday:"long",year:"numeric",month:"long",day:"numeric"};try{t=e.toLocaleDateString(A.opts.language?A.opts.language:undefined,i)}catch(n){t=e.toLocaleDateString(undefined,i)}return t+""}(new Date),a=D.get(e)?"":"fr-unchecked ",r="\n <div id='fr-file-".concat(e,"' class='fr-file-list-item fr-file-").concat(e," ").concat(a,"' draggable = \"").concat(!a,'" >\n <div class=\'fr-file-item-left\' >\n\n \n <div class="fr-file-item-insert-checkbox fr-files-checkbox-line">\n ').concat(A.helpers.isMobile()?"<div id='fr-pick-".concat(e,"}' class='dot'>\n </div>"):"",'\n <div id="checkbox-key-').concat(e,'" class="fr-files-checkbox fr-insert-checkbox fr-checkbox-').concat(e,'">\n <input name="target" class="fr-insert-attr fr-checkbox-file-').concat(e,' fr-file-insert-check" data-cmd="fileInsertCheckbox"\n data-checked="_blank" type="checkbox" id="fr-link-target-').concat(A.id,'" tabIndex="0" />\n <span>').concat('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 32 32"><path d="M27 4l-15 15-7-7-5 5 12 12 20-20z" fill="#FFF"></path></svg>','\n </span>\n </div>\n <label id="fr-label-target-').concat(A.id,"\"></label>\n </div>\n \n <div class='fr-file-item-icon fr-file-item-icon-").concat(e,"' >\n <img src='https://secure.webtoolhub.com/static/resources/icons/set112/f2afb6f7.png' alt='Image preview' class='thumbnail-padding' height='36px' width='36px' />\n </div>\n\n <div class='fr-file-item-description' >\n <div class='fr-file-name fr-files-manager-tooltip'>\n ").concat(function o(e,t,i){null==t&&(t=100);null==i&&(i="...");return e.length>t?e.substring(0,t-i.length)+i:e}(t.name,20),'\n <span class="').concat(20<t.name.length?"tooltiptext":"fr-none",'">').concat(t.name,"\n </span>\n </div>\n <div class='fr-file-details'>\n <div class='fr-file-date'>").concat(i,"\n </div>\n \n <div class='fr-file-size'>\n ").concat(function l(e){if(0==e)return"0 Bytes";var t=Math.floor(Math.log(e)/Math.log(1024));return" | "+1*(e/Math.pow(1024,t)).toFixed(2)+" "+["Bytes","KB","MB","GB","TB"][t]}(t.size),"\n </div>\n </div>\n\n <div class='fr-file-error'>\n <h5 class='fr-file-error-h5'></h5>\n </div>\n </div>\n \n </div>\n\n <div class='fr-file-item-right fr-file-item-right-").concat(e,"'>")+ye(e)+"</div>\n </div>";n.find(".fr-upload-progress-layer")[0].innerHTML=r+n.find(".fr-upload-progress-layer")[0].innerHTML,L.forEach(function d(e,t,i){D.get(t)&&n.find("input.fr-insert-attr.fr-checkbox-file-".concat(t))[0].setAttribute("checked",null)}),B.forEach(function(e){document.getElementById("fr-file-autoplay-button-"+e).checked=!0}),be(e,t),Q(),A.opts.toolbarBottom?y(!0):A.popups.setPopupDimensions(n),pe("fr-file-list-item")}function he(e){switch(e){case"application/msword":return A.icon.getFileIcon("docIcon");case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return A.icon.getFileIcon("docxIcon");case"image/gif":return A.icon.getFileIcon("gifIcon");case"image/jpeg":return A.icon.getFileIcon("jpegIcon");case"image/jpeg":return A.icon.getFileIcon("jpgIcon");case"type/text":return A.icon.getFileIcon("logIcon");case"video/quicktime":return A.icon.getFileIcon("movIcon");case"audio/mp3":case"audio/mpeg":return A.icon.getFileIcon("mp3Icon");case"video/mp4":return A.icon.getFileIcon("mp4Icon");case"audio/ogg":return A.icon.getFileIcon("oggIcon");case"video/ogg":return A.icon.getFileIcon("ogvIcon");case"application/pdf":return A.icon.getFileIcon("pdfIcon");case"image/png":return A.icon.getFileIcon("pngIcon");case"text/plain":return A.icon.getFileIcon("txtIcon");case"video/webm":return A.icon.getFileIcon("webmIcon");case"image/webp":return A.icon.getFileIcon("webpIcon");case"video/x-ms-wmv":return A.icon.getFileIcon("wmvIcon");case"application/vnd.ms-excel":return A.icon.getFileIcon("xlsIcon");case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return A.icon.getFileIcon("xlsxIcon");case"application/x-zip-compressed":case"application/zip":return A.icon.getFileIcon("zipIcon");default:return A.icon.getFileIcon("defaultIcon")}}function be(n,a,e){var r=A.popups.get("filesManager.insert"),t=r.find(".fr-file-item-icon-"+n).get(0);if(ze(Le(a))&&"image/gif"!=Le(a)&&"image/webp"!=Le(a)){"a"!=t.children[0].localName&&(t.innerHTML="<a target='_blank' href=''>"+t.innerHTML+"</a>");r.find(".fr-file-item-icon-"+n).get(0).children[0].children[0];var s=new FileReader;if(null!=e&&e){var i=L.get(n);a.name=i.name,L.set(n,a)}if(s.onloadend=function(){r.find(".fr-file-item-icon-"+n).get(0).children[0].children[0].src=s.result;for(var e=atob(s.result.split(",")[1]),t=[],i=0;i<e.length;i++)t.push(e.charCodeAt(i));r.find(".fr-file-item-icon-"+n).get(0).children[0].href=window.URL.createObjectURL(new Blob([new Uint8Array(t)],{type:Le(a)})),r.find(".fr-file-item-icon-"+n).get(0).classList.add("file-item-thumbnail-hover")},a)s.readAsDataURL(a);else{var o=he(Le(a));t.innerHTML='<svg height="40px" width="40px" viewBox="0 0 55 5" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n '.concat(o.path,"\n </svg>")}}else{var l=he(Le(a));t.innerHTML='<svg height="40px" width="40px" viewBox="0 0 55 55" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n '.concat(l.path,"\n </svg>")}}function ye(e){var t="";if($e(Le(L.get(e)))){var i="fr-files-checkbox",n="";Fe(Le(L.get(e)))||(i="fr-checkbox-disabled",n="disabled");t='\n <div class="fr-files-checkbox-line align-autoplay">\n <div id="checkbox-key-'.concat(e,'" class="').concat(i," fr-autoplay-checkbox fr-checkbox-").concat(e,'"> \n \n <input type="checkbox" id="fr-file-autoplay-button-').concat(e,'" class="fr-file-button-').concat(e,' fr-file-autoplay-button" data-title="Edit" data-param1="').concat(e,'" role="button" ').concat(n,"/>\n\n <span>").concat('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 32 32"><path d="M27 4l-15 15-7-7-5 5 12 12 20-20z" fill="#FFF"></path></svg>'," </span>\n </div> \n <label class='fr-autoplay-checkbox-label'>Autoplay </label>\n </div>")}var a="application/msword",r="application/vnd.openxmlformats-officedocument.wordprocessingml.document",s="";return!Pe(Le(L.get(e)))&&Fe(Le(L.get(e)))||(o="fr-disabled"),$e(Le(L.get(e)))&&(o="fr-disabled"),Oe(Le(L.get(e)))&&(o="fr-disabled",Le(L.get(e))!=a&&Le(L.get(e))!=r||A.opts.googleOptions&&!A.helpers.isMobile()&&A.opts.googleOptions.API_KEY&&A.opts.googleOptions.CLIENT_ID&&(o=""),"text/plain"!=Le(L.get(e))&&Le(L.get(e))!=a&&"application/pdf"!=Le(L.get(e))&&Le(L.get(e))!=r&&"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"!=Le(L.get(e))&&"application/vnd.ms-excel"!=Le(L.get(e))&&"type/text"!=Le(L.get(e))||(s="")),"video/url"===Le(L.get(e))&&(o="fr-disabled"),t+='<div class=\'fr-file-item-action-buttons\' >\n <button type="button" id="fr-file-insert-button-'.concat(e,'" class=" fr-doc-edit-').concat(e," fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons \n fr-file-button-").concat(e," fr-file-insert-button-").concat(e,' fr-file-insert-button" data-cmd="imageInsertByUpload" data-title="Insert" data-param1="').concat(e,'" tabIndex="2" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "-5 0 28 28" xlmns = "http://w3.org/200/svg"><path d = \'M 9.25 12 L 6.75 12 C 6.335938 12 6 11.664062 6 11.25 L 6 6 L 3.257812 6 C 2.703125 6 2.425781 5.328125 2.820312 4.933594 L 7.570312 0.179688 C 7.804688 -0.0546875 8.191406 -0.0546875 8.425781 0.179688 L 13.179688 4.933594 C 13.574219 5.328125 13.296875 6 12.742188 6 L 10 6 L 10 11.25 C 10 11.664062 9.664062 12 9.25 12 Z M 16 11.75 L 16 15.25 C 16 15.664062 15.664062 16 15.25 16 L 0.75 16 C 0.335938 16 0 15.664062 0 15.25 L 0 11.75 C 0 11.335938 0.335938 11 0.75 11 L 5 11 L 5 11.25 C 5 12.214844 5.785156 13 6.75 13 L 9.25 13 C 10.214844 13 11 12.214844 11 11.25 L 11 11 L 15.25 11 C 15.664062 11 16 11.335938 16 11.75 Z M 12.125 14.5 C 12.125 14.15625 11.84375 13.875 11.5 13.875 C 11.15625 13.875 10.875 14.15625 10.875 14.5 C 10.875 14.84375 11.15625 15.125 11.5 15.125 C 11.84375 15.125 12.125 14.84375 12.125 14.5 Z M 14.125 14.5 C 14.125 14.15625 13.84375 13.875 13.5 13.875 C 13.15625 13.875 12.875 14.15625 12.875 14.5 C 12.875 14.84375 13.15625 15.125 13.5 15.125 C 13.84375 15.125 14.125 14.84375 14.125 14.5 Z M 14.125 14.5 \'></path></svg>\n </button>\n\n <button type="button" id="fr-file-edit-button-').concat(e,'" class=" fr-doc-edit-').concat(e," ").concat(o," fr-img-icon fr-btn fr-command fr-submit \n fr-file-action-icons fr-file-edit-button-").concat(e," fr-file-button-").concat(e,' fr-file-edit-button" data-cmd="editImage" data-title="Edit" data-param1="').concat(e,'" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "0 4 25 25" xlmns = "http://w3.org/200/svg"><path d = \'M17,11.2L12.8,7L5,14.8V19h4.2L17,11.2z M7,16.8v-1.5l5.6-5.6l1.4,1.5l-5.6,5.6H7z M13.5,6.3l0.7-0.7c0.8-0.8,2.1-0.8,2.8,0 c0,0,0,0,0,0L18.4,7c0.8,0.8,0.8,2,0,2.8l-0.7,0.7L13.5,6.3z\'></path></svg>\n </button>\n \n <span class="fr-file-view-').concat(e,'"><button type="button" id="fr-file-view-button-').concat(e,'" class=" fr-doc-edit-').concat(e," ").concat(s," fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons \n fr-file-view-button-").concat(e,' fr-file-view-button" data-cmd="viewImage" data-title="View" data-param1="').concat(e,'" tabIndex="2" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "15 19 21 21" xlmns = "http://w3.org/200/svg"> <path style="fill:none;stroke-width:0.9077;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 19.086094 16.541466 C 16.185625 16.541466 14.318281 19.447115 14.318281 19.447115 L 14.318281 19.555288 C 14.318281 19.555288 16.176719 22.475962 19.077187 22.475962 C 21.977656 22.475962 23.847969 19.576322 23.847969 19.576322 L 23.847969 19.465144 C 23.847969 19.465144 21.989531 16.541466 19.086094 16.541466 Z M 19.07125 21.024639 C 18.248906 21.024639 17.583906 20.357572 17.583906 19.53726 C 17.583906 18.716947 18.248906 18.04988 19.07125 18.04988 C 19.890625 18.04988 20.555625 18.716947 20.555625 19.53726 C 20.555625 20.357572 19.890625 21.024639 19.07125 21.024639 Z M 19.07125 21.024639 " transform="matrix(1.315789,0,0,1.3,0,0)"/></svg></button></span>\n\n <button type="button" id="fr-file-delete-button-').concat(e,'" class=" fr-doc-edit-').concat(e," fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons\n fr-file-button-").concat(e,' fr-file-delete-button" data-cmd="deleteImage" data-title="Delete" data-param1="').concat(e,'" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "-2 3 30 30" xlmns = "http://w3.org/200/svg"><path d = \'M15,10v8H9v-8H15 M14,4H9.9l-1,1H6v2h12V5h-3L14,4z M17,8H7v10c0,1.1,0.9,2,2,2h6c1.1,0,2-0.9,2-2V8z\'></path></svg>\n </button>\n \n </div>\n <div id="user_area-').concat(e,"\" style=\"display: none;\">\n \n <div id=\"file_container\"></div>\n\n <div style='display:block;text-align: center; margin-left:50%; id='edit-file-loader' class='fr-file-loader'></div>\n\n </div> \n ")}function we(e,t,i){var n=A.popups.get("filesManager.insert");if(!i&&e<=100){n.find(".fr-checkbox-file-"+t).get(0).disabled=!0,n.find(".fr-checkbox-"+t).get(0).classList.remove("fr-files-checkbox"),n.find(".fr-checkbox-"+t).get(0).classList.add("fr-checkbox-disabled");var a=n.find(".fr-file-progress-circle-"+t),r=n.find(".fr-file-upload-percent-"+t);return 50<e?a.get(0).setAttribute("class","fr-file-progress-circle-"+t+" progress-circle p"+Math.floor(e)+" over50"):a.get(0).setAttribute("class","fr-file-progress-circle-"+t+" progress-circle p"+Math.floor(e)),r.get(0).innerHTML=Math.floor(e)+"%",void xe(t,e,i)}i&&(n.find(".fr-checkbox-file-"+t).get(0).disabled=!1,n.find(".fr-checkbox-"+t).get(0).classList.remove("fr-checkbox-disabled"),n.find(".fr-checkbox-"+t).get(0).classList.add("fr-files-checkbox"),n.find(".fr-file-item-right-"+t).get(0).innerHTML=ye(t),xe(t,100,i))}function xe(e,t,i){var n=A.popups.get("filesManager.insert");n.find(".fr-progress-bar").removeClass("fr-none").addClass("fr-display-block"),n.find(".fr-upload-progress").hasClass("fr-height-set")&&A.popups.setFileListHeight(n);var a=0;k.set(e,t),k.forEach(function(e,t){a+=e}),a/=k.size,100==t&&i&&r++,n.find('.fr-command[data-cmd="filesUpload"]').addClass("fr-disabled"),n.find('.fr-command[data-cmd="filesByURL"]').addClass("fr-disabled"),n.find('.fr-command[data-cmd="filesEmbed"]').addClass("fr-disabled"),n.find(".fr-progress-bar").get(0).style.width=a+"%",r==k.size&&(n.find(".fr-progress-bar").removeClass("fr-display-block").addClass("fr-none"),k=new Map,r=0,n.find('.fr-command[data-cmd="filesUpload"]').removeClass("fr-disabled"),n.find('.fr-command[data-cmd="filesByURL"]').removeClass("fr-disabled"),n.find('.fr-command[data-cmd="filesEmbed"]').removeClass("fr-disabled"))}function Me(i,n){Q(),A.popups.get("filesManager.insert").find(".fr-upload-progress-layer").addClass("fr-active"),i.forEach(function(e,t){ze(Le(e))&&A.opts.imageUploadRemoteUrls&&A.opts.imageCORSProxy&&A.opts.imageUpload?Te(e,i,x,n[t]):_.set(n[t],e)})}function Ee(e){e&&e.get&&function i(e){if("false"==I(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(e&&"touchend"==e.type&&fe)return!0;if(e&&A.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;for(var t=0;t<Lt.INSTANCES.length;t++)Lt.INSTANCES[t]!=A&&Lt.INSTANCES[t].events.trigger("image.hideResizer");A.toolbar.disable(),e&&(e.stopPropagation(),e.preventDefault());A.helpers.isMobile()&&(A.events.disableBlur(),A.$el.blur(),A.events.enableBlur());A.opts.iframe&&A.size.syncIframe();x=I(this),N(),A.browser.msie?(A.popups.areVisible()&&A.events.disableBlur(),A.win.getSelection&&(A.win.getSelection().removeAllRanges(),A.win.getSelection().addRange(A.doc.createRange()))):A.selection.clear();A.helpers.isIOS()&&(A.events.disableBlur(),A.$el.blur());A.button.bulkRefresh(),A.events.trigger("video.hideResizer")}.call(e.get(0))}function ke(){var e=I(this);e.removeClass("fr-uploading"),e.next().is("br")&&e.next().remove(),(0==a.length||0<a.length&&a.length==g)&&(c=e),"VIDEO"==e.get(0).tagName||"AUDIO"==e.get(0).tagName?A.selection.setAfter(e.parent()):A.selection.setAfter(e),A.undo.saveStep(),A.events.trigger("filesManager.loaded",[e]),Ce(a)}function Ae(){var e,t=Array.prototype.slice.call(A.el.querySelectorAll("video, .fr-video > *")),i=[];for(e=0;e<t.length;e++)i.push(t[e].getAttribute("src")),I(t[e]).toggleClass("fr-draggable",A.opts.videoMove),""===t[e].getAttribute("class")&&t[e].removeAttribute("class"),""===t[e].getAttribute("style")&&t[e].removeAttribute("style");if(n)for(e=0;e<n.length;e++)i.indexOf(n[e].getAttribute("src"))<0&&A.events.trigger("video.removed",[I(n[e])]);n=t}function Ce(e){if(null!=e){if(0==e.length)return void(null!=c&&("VIDEO"==c.get(0).tagName?A.video._editVideo(c.parent()):"IMG"==c.get(0).tagName?A.image.edit(c):c.trigger("click"),A.toolbar.disable()));_e(e.shift(),e)}}function Ie(e){var t=!1;if($e(Le(_.get(e))))A.trimVideoPlugin.trimVideo(L.get(e),e,L),t=!0;else if(ze(Le(_.get(e)))){var i=_.get(e).link,n=A.o_doc.createElement("img");n.src=i,x=n,s=e,A.imageTUI.launch(A,!1,e),t=!0}else if(Oe(Le(_.get(e)))){var a={apiKey:A.opts.googleOptions.API_KEY,clientId:A.opts.googleOptions.CLIENT_ID,authorizeButton:"authorize_button-".concat(e),signoutButton:"signout_button",userArea:"user_area-".concat(e),fileInput:"file_input",fileIndex:e,file:L.get(e),fileContainer:"file_container",loadingText:"File is being uploaded...",events:{onInvalidFile:function(e){},onError:function(e){}}};de=function f(p){var r,e=["https://www.googleapis.com/discovery/v1/apis/drive/v2/rest"],g="id,title,mimeType,userPermission,editable,copyable,shared,fileSize",u="-------314159265358979323846",m="\r\n--"+u+"\r\n",v="\r\n--"+u+"--",t=(document.getElementById(p.authorizeButton),document.getElementById(p.userArea));p.events||(p.events={});function i(){gapi.client.init({apiKey:p.apiKey,clientId:p.clientId,discoveryDocs:e,scope:"https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/drive.appdata"}).then(function(){gapi.auth2.getAuthInstance().isSignedIn.listen(n),n(gapi.auth2.getAuthInstance().isSignedIn.get()),function t(e){!gapi.auth2.getAuthInstance().isSignedIn.get()||gapi.auth.getToken()!==undefined&&gapi.auth.getToken().access_token===undefined?Promise.resolve(gapi.auth2.getAuthInstance().signIn()).then(function(){s()}):s()}()},function(e){p.events.onError(e)})}function n(e){e&&(t.style.display="block")}function a(e){var t=gapi.auth.getToken().access_token,i=r,n="https://docs.google.com/feeds/download/documents/export/Export?id="+i+"&format=docx&access_token="+t,a=new XMLHttpRequest;a.open("get",n),a.responseType="arraybuffer",a.onload=function(){var e=new Blob([new Uint8Array(this.response)],{type:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}),t=L.get(p.fileIndex);e.name=t.name,e.lastModified=t.lastModified,e.lastModifiedDate=t.lastModifiedDate,L.set(p.fileIndex,e),A.filesManager.upload(e,_,x,p.fileIndex),l()},a.send()}function s(e){!function n(e){for(var t=document.getElementsByClassName("fr-doc-edit-".concat(e)),i=0;i<t.length;i++)t[i].setAttribute("disabled",!0),t[i].classList.add("fr-disabled")}(p.fileIndex);var t=p.file;t?function i(d,f){var c=new FileReader;c.readAsArrayBuffer(d),c.onload=function(e){for(var t={title:d.name,mimeType:"application/vnd.google-apps.document"},i="",n=new Uint8Array(c.result),a=n.byteLength,r=0;r<a;r++)i+=String.fromCharCode(n[r]);var s=btoa(i),o=m+"Content-Type: application/json; charset=UTF-8\r\n\r\n"+JSON.stringify(t)+m+"Content-Type: application/octet-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+s+v,l=gapi.client.request({path:"/upload/drive/v2/files",method:"POST",params:{uploadType:"multipart",fields:g},headers:{"Content-Type":'multipart/related; boundary="'+u+'"',"Content-Length":o.Length},body:o});f||(f=function(e){}),l.execute(function(e,t){e.error?p.events.onError(e.error):f(e)})}}(t,o):p.events.onInvalidFile("File is not selected")}function o(e){r=e.id;var t="https://docs.google.com/document/d/"+e.id+"/edit",i=A.o_doc.body,n=A.o_doc.createElement("div");n.setAttribute("id","editDocContainer"),n.style.cssText="position: fixed; top: 0;left: 0;padding: 0;width: 100%;height: 100%;background: rgba(255,255,255,1);z-index: 9998;display:block",n.innerHTML='<div style="margin-top:25px; text-align:center"><label>Sign Out : </label><input type="checkbox" id ="markSignOut" role="button"/> <button id="signout_button" class="fr-trim-button" >Save </button> <button id="cancel_file_edit" class="fr-trim-button">Cancel</button></div> <iframe title="Edit your file" frameBorder="0" width="100%" height="700px" src="'+t+'"></iframe>',i.appendChild(n),document.getElementById("signout_button").onclick=a,document.getElementById("cancel_file_edit").onclick=l}function l(){document.getElementById("markSignOut").checked&&gapi.auth2.getAuthInstance().signOut().then(function(){gapi.auth.getToken()&&(gapi.auth.getToken().access_token=undefined)});var e=document.getElementById("editDocContainer");e.parentNode.removeChild(e),document.getElementById("user_area-".concat(p.fileIndex))&&(document.getElementById("user_area-".concat(p.fileIndex)).style.display="none"),function n(e){for(var t=document.getElementsByClassName("fr-doc-edit-".concat(e)),i=0;i<t.length;i++)t[i].removeAttribute("disabled"),t[i].classList.remove("fr-disabled")}(p.fileIndex)}p.events.onInvalidFile=p.events.onInvalidFile||function(e){},p.events.onError=p.events.onError||function(e){};var d={};return d.handleClientLoad=function(){gapi.load("client:auth2",i)},d}(a),function r(e,t){var n=function n(e,t){var i=document.createElement("script");i.src=e,i.onload=function(){this.onload=function(){},de.handleClientLoad()},i.onreadystatechange=function(){"complete"===this.readyState&&this.onload()},(document.getElementsByTagName("head")[0]||document.body).appendChild(i)};!function i(){0!=e.length?n(e.shift(),i):t&&t()}()}(["https://apis.google.com/js/api.js"],function(){})}t&&(p=!0)}function Le(e){if(""!=e.type)return e.type;var i,n=/(?:\.([^.]+))?$/.exec(e.name)[1];return[[".doc","application/msword"],[".docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],[".gif","image/gif"],[".jpeg","image/jpeg"],[".jpg","image/jpeg"],[".txt","text/plain"],[".log","type/text"],[".mov","video/quicktime"],[".mp3","audio/mpeg"],[".mp4","video/mp4"],[".ogg","audio/ogg"],[".ogv","video/ogg"],[".pdf","application/pdf"],[".png","image/png"],[".webm","video/webm"],[".webp","image/webp"],[".wmv","video/x-ms-wmv"],[".xls","application/vnd.ms-excel"],[".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],[".zip","application/x-zip-compressed"]].forEach(function(e,t){e[0]==".".concat(n)&&(i=e[1])}),i}function _e(o,e){if(Oe(Le(_.get(o)))||!Fe(Le(_.get(o)))){var t=_.get(o).link,i=_.get(o).text;!i&&L.get(o)&&L.get(o).name&&(i=L.get(o).name);var n=_.get(o).response;if(A.edit.on(),A.events.focus(!0),A.selection.restore(),A.opts.fileUseSelectedText&&A.selection.text().length&&(i=A.selection.text()),t.endsWith(".pdf")||t.endsWith(".txt"))De('<iframe src="'.concat(t,'" title="').concat(i,'" width="\u201d100%\u201d" height="\u201d100%\u201d" class="fr-file"></iframe>'),!0);else A.html.insert('<a href="'.concat(t,'" target="_blank" id="fr-inserted-file" class="fr-file">').concat(i,"</a>"));var a=A.$el.find("#fr-inserted-file");a.removeAttr("id"),A.undo.saveStep(),function M(){var e,t=Array.prototype.slice.call(A.el.querySelectorAll("a.fr-file")),i=[];for(e=0;e<t.length;e++)i.push(t[e].getAttribute("href"));if(le)for(e=0;e<le.length;e++)i.indexOf(le[e].getAttribute("href"))<0&&A.events.trigger("file.unlink",[le[e]]);le=t}(),A.selection.clear(),A.selection.setAfter(a),A.events.trigger("file.inserted",[a,n]),Ce(e)}if(ze(Le(_.get(o)))&&Fe(Le(_.get(o)))){var s=_.get(o).link,r=_.get(o).sanitize,l=_.get(o).data,d=_.get(o).$existing_img,f=_.get(o).response;d&&"string"==typeof d&&(d=A.$(d)),A.edit.off(),ee(A.language.translate("Loading image")),r&&(s=A.helpers.sanitizeURL(s));var c=new Image;c.onload=function(){var e,t;if(d){A.undo.canDo()||d.hasClass("fr-uploading")||A.undo.saveStep();var i=d.data("fr-old-src");d.data("fr-image-pasted")&&(i=null),A.$wp?((e=d.clone().removeData("fr-old-src").removeClass("fr-uploading").removeAttr("data-fr-image-pasted")).off("load"),i&&d.attr("src",i),d.replaceWith(e)):e=d;for(var n=e.get(0).attributes,a=0;a<n.length;a++){var r=n[a];0===r.nodeName.indexOf("data-")&&e.removeAttr(r.nodeName)}if(void 0!==l)for(t in l)l.hasOwnProperty(t)&&"link"!=t&&e.attr("data-".concat(t),l[t]);e.on("load",ke),e.attr("src",s),A.edit.on(),A.undo.saveStep(),A.events.disableBlur(),A.$el.blur(),A.events.trigger(i?"image.replaced":"image.inserted",[e,f])}else e=function o(e,t,i){var n,a=I(document.createElement("img")).attr("src",e);if(t&&void 0!==t)for(n in t)t.hasOwnProperty(n)&&"link"!=n&&(" data-".concat(n,'="').concat(t[n],'"'),a.attr("data-".concat(n),t[n]));var r=A.opts.imageDefaultWidth;r&&"auto"!=r&&(r=A.opts.imageResizeWithPercent?"100%":"".concat(r,"px"));a.attr("style",r?"width: ".concat(r,";"):""),ot(a,A.opts.imageDefaultDisplay,A.opts.imageDefaultAlign),a.on("load",i),a.on("error",i),A.edit.on(),A.events.focus(!0),A.selection.restore(),A.undo.saveStep(),A.opts.imageSplitHTML?A.markers.split():A.markers.insert();A.html.wrap();var s=A.$el.find(".fr-marker");s.length?(s.parent().is("hr")&&s.parent().after(s),A.node.isLastSibling(s)&&s.parent().hasClass("fr-deletable")&&s.insertAfter(s.parent()),s.replaceWith(a)):A.$el.append(a);return a}(s,l,ke),A.undo.saveStep(),A.events.disableBlur(),A.$el.blur(),A.events.trigger("image.inserted",[e,f])},c.onerror=function(){X(T,null,null,o),Ce(e)},c.src=s}if(($e(Le(_.get(o)))||Pe(Le(_.get(o))))&&Fe(Le(_.get(o))))if(C=o,"video/url"==Le(_.get(o))){var p=!1;if(document.getElementById("fr-file-autoplay-button-"+o)!==undefined&&(p=document.getElementById("fr-file-autoplay-button-"+o).checked),p&&_.get(o)!==undefined&&-1<_.get(o).video.indexOf("iframe")&&_.get(o).video.indexOf("autoplay=1")<0){var g=_.get(o).video.substring(_.get(o).video.indexOf("src")+3),u="&";(g=(g=g.substring(g.indexOf('"')+1)).substring(0,g.indexOf('"'))).indexOf("?")<0&&(u="?"),_.get(o).video=_.get(o).video.replace(g,g+=u+"autoplay=1")}else!p&&_.get(o).video.indexOf(!1)&&(-1<_.get(o).video.indexOf("&autoplay=1")&&(_.get(o).video=_.get(o).video.replace("&autoplay=1","")),-1<_.get(o).video.indexOf("?autoplay=1")&&(_.get(o).video=_.get(o).video.replace("?autoplay=1","")));A.events.focus(!0),A.selection.restore(),A.html.insert('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">'.concat(_.get(o).video,"</span>"),!1,A.opts.videoSplitHTML),A.popups.hide("filesManager.insert");var m=A.$el.find(".fr-jiv");m.removeClass("fr-jiv"),m.toggleClass("fr-rv",A.opts.videoResponsive),function E(e,t,i){!A.opts.htmlUntouched&&A.opts.useClasses?(e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),e.addClass("fr-fv".concat(i[0]," fr-dv").concat(t[0]))):"inline"==t?(e.css({display:"inline-block"}),"center"==i?e.css({"float":"none"}):"left"==i?e.css({"float":"left"}):e.css({"float":"right"})):(e.css({display:"block",clear:"both"}),"left"==i?e.css({textAlign:"left"}):"right"==i?e.css({textAlign:"right"}):e.css({textAlign:"center"}))}(m,A.opts.videoDefaultDisplay,A.opts.videoDefaultAlign),m.toggleClass("fr-draggable",A.opts.videoMove),A.events.trigger("video.inserted",[m]),ke.call(m)}else{var v=_.get(o).link,h=_.get(o).sanitize,b=_.get(o).data,y=_.get(o).$existing_img,w=_.get(o).response;A.edit.off(),h&&(v=A.helpers.sanitizeURL(v)),function k(){var e,t;if(y){A.undo.canDo()||y.find("video").hasClass("fr-uploading")||A.undo.saveStep();var i=y.find("video").data("fr-old-src"),n=y.data("fr-replaced");y.data("fr-replaced",!1),A.$wp?((e=y.clone(!0)).find("video").removeData("fr-old-src").removeClass("fr-uploading"),e.find("video").off("canplay"),i&&y.find("video").attr("src",i),y.replaceWith(e)):e=y;for(var a=e.find("video").get(0).attributes,r=0;r<a.length;r++){var s=a[r];0===s.nodeName.indexOf("data-")&&e.find("video").removeAttr(s.nodeName)}if(void 0!==b)for(t in b)b.hasOwnProperty(t)&&"link"!=t&&e.find("video").attr("data-".concat(t),b[t]);e.find("video").on("canplay",ke),e.find("video").attr("src",v),A.edit.on(),Ae(),A.undo.saveStep(),A.$el.blur(),A.events.trigger(n?"video.replaced":"video.inserted",[e,w])}else e=function g(e,t,i,n,a){var r,s="";if(t&&void 0!==t)for(r in t)t.hasOwnProperty(r)&&"link"!=r&&(s+=" data-".concat(r,'="').concat(t[r],'"'));var o,l=A.opts.videoDefaultWidth;l&&"auto"!=l&&(l="".concat(l,"px"));if(Pe(n))o=I(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+A.opts.videoDefaultDisplay[0]+("center"!=A.opts.videoDefaultAlign?" fr-fv"+A.opts.videoDefaultAlign[0]:"")).html('<audio src="'+e+'" '+s+" controls>"+A.language.translate("Your browser does not support HTML5 video.")+"</audio>");else{var d="",f=document.getElementById("fr-file-autoplay-button-"+a).checked;f&&(d="autoplay"),o=I(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+A.opts.videoDefaultDisplay[0]+("center"!=A.opts.videoDefaultAlign?" fr-fv"+A.opts.videoDefaultAlign[0]:"")).html('<video src="'+e+'" '+s+(l?' style="width: '+l+';" ':"")+d+" controls>"+A.language.translate("Your browser does not support HTML5 video.")+"</video>")}o.toggleClass("fr-draggable",A.opts.videoMove),A.edit.on(),A.events.focus(!0),A.selection.restore(),A.undo.saveStep(),A.opts.videoSplitHTML?A.markers.split():A.markers.insert();A.html.wrap();var c=A.$el.find(".fr-marker");A.node.isLastSibling(c)&&c.parent().hasClass("fr-deletable")&&c.insertAfter(c.parent());c.replaceWith(o);var p="";p=Pe(n)?"audio":"video",o.find(p).get(0).readyState>o.find(p).get(0).HAVE_FUTURE_DATA||A.helpers.isIOS()?i.call(o.find(p).get(0)):(o.find(p).on("canplaythrough load",i),o.find(p).on("error",i));return o}(v,b,ke,Le(_.get(o)),o),Ae(),A.undo.saveStep(),A.events.trigger("video.inserted",[e,w])}()}A.popups.hide("filesManager.insert"),D["delete"](o);var x=A.popups.get("filesManager.insert");x.find("input.fr-insert-attr.fr-checkbox-file-".concat(o))[0].checked=!1,x.find(".fr-file-"+o).get(0).classList.add("fr-unchecked"),j(),document.getElementById("fr-file-autoplay-button-"+o)&&(document.getElementById("fr-file-autoplay-button-"+o).checked=!1),B=B.filter(function(e){return e!=o})}function De(e,t){var i,n;Lt.VIDEO_EMBED_REGEX.test(e)?(i="video",n=A.opts.videoSplitHTML):Lt.IMAGE_EMBED_REGEX.test(e)&&(i="image",n=A.opts.imageSplitHTML),A.events.focus(!0),A.selection.restore();var a=!1;x&&(qe(),a=!0),A.html.insert('<span id="fr-inserted-file" contenteditable="true" draggable="true" class="fr-'.concat(i,' fr-jiv fr-deletable">').concat(e,"</span>"),!1,n),A.popups.hide("filesManager.insert");var r=A.$el.find(".fr-jiv");r.removeClass("fr-jiv"),"video"==i&&(r.toggleClass("fr-rv",A.opts.videoResponsive),function s(e,t,i){!A.opts.htmlUntouched&&A.opts.useClasses?(e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),e.addClass("fr-fv".concat(i[0]," fr-dv").concat(t[0]))):"inline"==t?(e.css({display:"inline-block"}),"center"==i?e.css({"float":"none"}):"left"==i?e.css({"float":"left"}):e.css({"float":"right"})):(e.css({display:"block",clear:"both"}),"left"==i?e.css({textAlign:"left"}):"right"==i?e.css({textAlign:"right"}):e.css({textAlign:"center"}))}(r,A.opts.videoDefaultDisplay,A.opts.videoDefaultAlign),r.toggleClass("fr-draggable",A.opts.videoMove),A.events.trigger(a?"video.replaced":"video.inserted",[r])),"image"==i&&(ot(r,A.opts.imageDefaultDisplay,A.opts.imageDefaultAlign),r.find("img").removeClass("fr-dii"),r.find("img").addClass("fr-dib"),r.toggleClass("fr-draggable",A.opts.imageMove),A.events.trigger(a?"image.replaced":"image.inserted",[r])),t&&(c=r,A.selection.clear(),A.toolbar.disable(),A.video._editVideo(c))}function Se(e,t){try{if(!1===A.events.trigger("filesManager.uploaded",[e],!0))return A.edit.on(),!1;var i=JSON.parse(e);return i.link?i:(X(v,e,null,t),!1)}catch(n){return X(U,e,null,t),!1}}function Be(e,t){try{var i=I(e).find("Location").text(),n=I(e).find("Key").text();return!1===A.events.trigger("filesManager.uploadedToS3",[i,n,e],!0)?(A.edit.on(),!1):i}catch(a){return X(U,e,null,t),!1}}function Te(e,t,i,n){if(-1<P.indexOf(Le(e))||!Le(e))return X(O,null,null,n),!1;if(!1===A.events.trigger("filesManager.beforeUpload",[t]))return!1;if(!(null!==A.opts.filesManagerUploadURL&&A.opts.filesManagerUploadURL!=M||A.opts.filesManagerUploadToS3||A.opts.filesManagerUploadToAzure))return function y(o,l,d){var f=new FileReader;f.onload=function(){var e=f.result;if(f.result.indexOf("svg+xml")<0){for(var t=atob(f.result.split(",")[1]),i=[],n=0;n<t.length;n++)i.push(t.charCodeAt(n));if(e=window.URL.createObjectURL(new Blob([new Uint8Array(i)],{type:Le(l)})),ze(Le(l))){var a={link:e,sanitize:!1,data:null,$existing_img:d,response:null,type:Le(l)};_.set(o,a)}if(Oe(Le(l))){var r={link:e,text:l.name,response:null,type:Le(l)};_.set(o,r)}if($e(Le(l))||Pe(Le(l))){var s={link:e,sanitize:!1,data:null,$existing_img:d,type:Le(l)};_.set(o,s)}}},f.readAsDataURL(l)}(n,e),!1;if(ze(Le(e))&&(e.name||(e.name=(new Date).getTime()+"."+(Le(e)||"image/jpeg").replace(/image\//g,""))),e.size>A.opts.filesManagerMaxSize)return X(z,null,null,n),!1;if(A.opts.filesManagerAllowedTypes.indexOf("*")<0&&A.opts.filesManagerAllowedTypes.indexOf(Le(e))<0)return X(O,null,null,n),!1;var a;if(function w(e){isNaN(e)||(A.popups.get("filesManager.insert").find(".fr-file-item-right-"+e).get(0).innerHTML='<div class=\'fr-file-item-action-buttons\' >\n <button type="button" id="fr-file-cancel-upload-button-'.concat(e,'" class="fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons \n fr-file-button-').concat(e,' fr-file-cancel-upload-button" data-cmd="cancelUpload" data-title="Cancel" data-param1="').concat(e,'" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "-2 3 30 30" xlmns = "http://w3.org/200/svg"><path d = \'M13.4,12l5.6,5.6L17.6,19L12,13.4L6.4,19L5,17.6l5.6-5.6L5,6.4L6.4,5l5.6,5.6L17.6,5L19,6.4L13.4,12z\'></path></svg>\n </button>\n\n <button type="button" id="fr-upload-delete-button-').concat(e,'" class="fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons \n fr-file-button-').concat(e,' fr-upload-delete-button" data-cmd="deleteUpload" data-title="Delete" data-param1="').concat(e,'" role="button">\n <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "-2 3 30 30" xlmns = "http://w3.org/200/svg"><path d = \'M15,10v8H9v-8H15 M14,4H9.9l-1,1H6v2h12V5h-3L14,4z M17,8H7v10c0,1.1,0.9,2,2,2h6c1.1,0,2-0.9,2-2V8z\'></path></svg>\n </button>\n\n <div class=\'progress-circle p0 fr-file-progress-circle-').concat(e,"'>\n <span class='fr-file-upload-percent-").concat(e," fr-file-upload-percent'>0%</span>\n <div class='left-half-clipper'>\n <div class='first50-bar'></div>\n <div class='value-bar'></div>\n </div>\n </div>\n </div>"),k.set(e,0))}(n),A.drag_support.formdata&&(a=A.drag_support.formdata?new FormData:null),a){var r;if(!1!==A.opts.filesManagerUploadToS3)for(r in a.append("key",A.opts.filesManagerUploadToS3.keyStart+(new Date).getTime()+"-"+(e.name||"untitled")),a.append("success_action_status","201"),a.append("X-Requested-With","xhr"),a.append("Content-Type",Le(e)),A.opts.filesManagerUploadToS3.params)A.opts.filesManagerUploadToS3.params.hasOwnProperty(r)&&a.append(r,A.opts.filesManagerUploadToS3.params[r]);for(r in A.opts.filesManagerUploadParams)A.opts.filesManagerUploadParams.hasOwnProperty(r)&&a.append(r,A.opts.filesManagerUploadParams[r]);a.append(A.opts.filesManagerUploadParam,e,e.name);var s,o,l=A.opts.filesManagerUploadURL;A.opts.filesManagerUploadToS3&&(l=A.opts.filesManagerUploadToS3.uploadURL?A.opts.filesManagerUploadToS3.uploadURL:"https://".concat(A.opts.filesManagerUploadToS3.region,".amazonaws.com/").concat(A.opts.filesManagerUploadToS3.bucket)),A.opts.filesManagerUploadToAzure&&(l=A.opts.filesManagerUploadToAzure.uploadURL?"".concat(A.opts.filesManagerUploadToAzure.uploadURL,"/").concat(e.name):encodeURI("https://".concat(A.opts.filesManagerUploadToAzure.account,".blob.core.windows.net/").concat(A.opts.filesManagerUploadToAzure.container,"/").concat(e.name)),s=l,A.opts.filesManagerUploadToAzure.SASToken&&(l+=A.opts.filesManagerUploadToAzure.SASToken),A.opts.filesManagerUploadMethod="PUT");var d=A.core.getXHR(l,A.opts.filesManagerUploadMethod);if(A.opts.filesManagerUploadToAzure){var f=(new Date).toUTCString();if(!A.opts.filesManagerUploadToAzure.SASToken&&A.opts.filesManagerUploadToAzure.accessKey){var c=A.opts.filesManagerUploadToAzure.account,p=A.opts.filesManagerUploadToAzure.container;if(A.opts.filesManagerUploadToAzure.uploadURL){var g=A.opts.filesManagerUploadToAzure.uploadURL.split("/");p=g.pop(),c=g.pop().split(".")[0]}var u="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(f,"\nx-ms-version:2019-07-07"),m=encodeURI("/"+c+"/"+p+"/"+e.name),v=A.opts.filesManagerUploadMethod+"\n\n\n"+e.size+"\n\n"+Le(e)+"\n\n\n\n\n\n\n"+u+"\n"+m,h=A.cryptoJSPlugin.cryptoJS.HmacSHA256(v,A.cryptoJSPlugin.cryptoJS.enc.Base64.parse(A.opts.filesManagerUploadToAzure.accessKey)).toString(A.cryptoJSPlugin.cryptoJS.enc.Base64),b="SharedKey "+c+":"+h;o=h,d.setRequestHeader("Authorization",b)}for(r in d.setRequestHeader("x-ms-version","2019-07-07"),d.setRequestHeader("x-ms-date",f),d.setRequestHeader("Content-Type",Le(e)),d.setRequestHeader("x-ms-blob-type","BlockBlob"),A.opts.filesManagerUploadParams)A.opts.filesManagerUploadParams.hasOwnProperty(r)&&d.setRequestHeader(r,A.opts.filesManagerUploadParams[r]);for(r in A.opts.filesManagerUploadToAzure.params)A.opts.filesManagerUploadToAzure.params.hasOwnProperty(r)&&d.setRequestHeader(r,A.opts.filesManagerUploadToAzure.params[r])}d.onload=function(){Oe(Le(e))?function u(e,t,i,n,a){var r=this.status,s=this.response,o=this.responseXML,l=this.responseText;try{if(A.opts.filesManagerUploadToS3||A.opts.filesManagerUploadToAzure)if(201===r){var d;if(A.opts.filesManagerUploadToAzure){if(!1===A.events.trigger("filesManager.uploadedToAzure",[this.responseURL,a,s],!0))return A.edit.on(),!1;d=n}else d=Be(o,t);if(d){var f={link:d,text:e,response:s,type:i};_.set(t,f)}}else X(U,s||o,null,t);else if(200<=r&&r<300){var c=Se(l,t);if(c){var p={link:c.link,text:e,response:s,type:i};_.set(t,p)}}else X(R,s||l,null,t)}catch(g){X(U,s||l,null,t)}}.call(d,e.name,n,Le(e),s,o):function m(e,t,i,n,a){var r=this.status,s=this.response,o=this.responseXML,l=this.responseText;try{if(A.opts.filesManagerUploadToS3||A.opts.filesManagerUploadToAzure)if(201==r){var d;if(A.opts.filesManagerUploadToAzure){if(!1===A.events.trigger("filesManager.uploadedToAzure",[this.responseURL,a,s],!0))return A.edit.on(),!1;d=n}else d=Be(o,t);if(d){var f={link:d,sanitize:!1,data:[],$existing_img:e,response:s||o,type:i};_.set(t,f)}}else X(U,s||o,e,t);else if(200<=r&&r<300){var c=Se(l,t);if(c){var p={link:c.link,sanitize:!1,data:c,$existing_img:e,response:s||o,type:i};_.set(t,p)}}else X(R,s||l,e,t)}catch(g){X(U,s||l,e,t)}}.call(d,x,n,Le(e),s,o),S.has(n)||we(100,n,!0)},d.onerror=function(){X(U,this.response||this.responseText||this.responseXML,null,n)},d.upload.onprogress=function(e){!function i(e,t){e.lengthComputable&&we(e.loaded/e.total*100|0,t,!1)}(e,n)},d.onabort=function(e){!function i(e,t){X($,t,x,e)}(n,e)},d.send(A.opts.filesManagerUploadToAzure?e:a),E.set(n,d)}}function Re(l){A.events.$on(l,"click",".fr-upload-progress-layer",function(e){if(A.helpers.isMobile())return e.stopPropagation(),!1},!0),A.events.$on(l,"dragover dragenter",".fr-upload-progress-layer",function(e){e.preventDefault();for(var t=0;t<e.originalEvent.dataTransfer.types.length;t++)"Files"==e.originalEvent.dataTransfer.types[t]&&(e.originalEvent.dataTransfer.dropEffect="none");return!1},!0),A.events.$on(l,"dragleave dragend",".fr-upload-progress-layer",function(e){return e.preventDefault(),!1},!0),A.events.$on(l,"dragover dragenter",".fr-files-upload-layer",function(e){return I(this).addClass("fr-drop"),(A.browser.msie||A.browser.edge)&&e.preventDefault(),!1},!0),A.events.$on(l,"dragleave dragend",".fr-files-upload-layer",function(e){return I(this).removeClass("fr-drop"),(A.browser.msie||A.browser.edge)&&e.preventDefault(),!1},!0),A.events.$on(l,"click",".fr-insert-checkbox",function(e){if(this.classList.contains("fr-checkbox-disabled"))return this.children.target.disabled=!0,void(this.children.target.checked=!1);var t=parseInt(this.id.split("-").pop());D.set(t,this.children.target.checked);for(var i=l.find('.fr-command[data-cmd="insertAll"]'),n=l.find('.fr-command[data-cmd="deleteAll"]'),a=l.find('input.fr-file-insert-check[type="checkbox"]'),r=a.length,s=!0,o=0;o<r;o++)1==a[o].checked&&(s=!1);if(s?i.addClass("fr-disabled"):i.removeClass("fr-disabled"),s?n.addClass("fr-disabled"):n.removeClass("fr-disabled"),this.children.target.checked)l.find(".fr-file-"+this.id.split("-").pop()).get(0).setAttribute("draggable","true"),l.find(".fr-file-"+this.id.split("-").pop()).get(0).classList.remove("fr-unchecked");else{this.id.split("-").pop();l.find(".fr-file-"+this.id.split("-").pop()).get(0).setAttribute("draggable","false"),l.find(".fr-file-"+this.id.split("-").pop()).get(0).classList.add("fr-unchecked")}}),A.events.$on(l,"click",".fr-file-insert-button",function(e){this.classList.contains("fr-disabled")||_e(parseInt(this.id.split("-").pop()))}),A.events.$on(l,"click",".fr-file-autoplay-button",function(e){if(this.parentNode.classList.contains("fr-checkbox-disabled"))return this.disabled=!0,void(this.checked=!1);Ue(parseInt(this.id.split("-").pop()))}),A.events.$on(l,"click",".fr-file-edit-button",function(e){var t=parseInt(this.id.split("-").pop());l.find(".fr-file-edit-button-".concat(t)).hasClass("fr-disabled")||Ie(t)}),A.events.$on(l,"click",".fr-file-view-button",function(e){var t=parseInt(this.id.split("-").pop());l.find(".fr-file-view-button-".concat(t)).hasClass("fr-disabled")||function h(e){if(!Fe(Le(_.get(e)))){var t=_.get(e).link,i=_.get(e).link;if(L.get(e)&&L.get(e).name?i=L.get(e).name:_.get(e).text&&(i=_.get(e).text),0===t.indexOf("blob:")&&A.browser.msie&&window.navigator&&window.navigator.msSaveBlob)window.navigator.msSaveBlob(L.get(e),i);else{var n=document.createElement("a");n.href=t,n.download=i,n.click()}return!1}var a=A.popups.get("filesManager.insert");if(0<a.find(".fr-file-view-image-"+e).length)a.find(".fr-file-view-image-"+e)[0].remove();else{for(var r=a.find(".fr-file-view"),s=0;s<r.length;s++)r.get(s).remove();var o=a.find(".fr-file-view-"+e);if(ze(Le(_.get(e)))){var l='<div class="fr-file-view-modal">\n <div class="fr-file-view-modal-content">\n <div class="fr-file-view-close">&times;</div> \n <img src="'+_.get(e).link+"\" class ='fr-file-view-image'/>\n </div>\n </div>";o[0].innerHTML=l+o[0].innerHTML}else if($e(Le(_.get(e)))){var d;if(_.get(e).hasOwnProperty("video")){var f=_.get(e).video.substring(_.get(e).video.indexOf("src")+3),c=f.substring(f.indexOf('"')+1);c=c.substring(0,c.indexOf('"')),d='<div class="fr-file-view-modal">\n <div class="fr-file-view-modal-content ">\n <div class="fr-file-view-close">&times;</div> \n <iframe width="640" height="360" src="'.concat(c+"&autoplay=1",'" frameborder="0" class = "fr-file-view-image"></iframe>\n </div>\n </div>')}else d='<div class="fr-file-view-modal">\n <div class="fr-file-view-modal-content ">\n <div class="fr-file-view-close">&times;</div> \n <video controls src="'+_.get(e).link+"\" class ='fr-file-view-image' autoplay></video>\n </div>\n </div>";o[0].innerHTML=d+o[0].innerHTML}else if(Pe(Le(_.get(e)))){var p='<div class="fr-file-view-modal">\n <div class="fr-file-view-modal-content ">\n <div class="fr-file-view-close">&times;</div> \n <audio controls="controls" class =\'fr-file-view-image\' autoplay>\n\n <source src="'.concat(_.get(e).link,'" type="').concat(Le(_.get(e)),'" />\n\n Your browser does not support the audio element.\n </audio>\n </div>\n </div>');o[0].innerHTML=p+o[0].innerHTML}else if(Oe(Le(_.get(e)))){var g=_.get(e).link,u=_.get(e).text;if(g.endsWith(".pdf")||g.endsWith(".txt")){var m='<div class="fr-file-view-modal">\t\n <div class="fr-file-view-modal-content " >\t\n <div class="fr-file-view-close">&times;</div> \t\n <iframe src="'.concat(g,"\" style='background-color: white;' height='50%' width='50%' title=\"").concat(u,'" class="fr-file fr-file-view-image"></iframe>\t\n </div>\t\n </div>');o[0].innerHTML=m+o[0].innerHTML}else if(0===g.indexOf("blob:")&&A.browser.msie&&window.navigator&&window.navigator.msSaveBlob)window.navigator.msSaveBlob(L.get(e),u);else{var v=document.createElement("a");v.href=g,v.download=u,v.click()}}}}(t)}),A.events.$on(l,"click",".fr-file-delete-button",function(e){q(parseInt(this.id.split("-").pop()))}),A.events.$on(l,"click",".fr-file-cancel-upload-button",function(e){!function i(e){var t=A.popups.get("filesManager.insert");t.find(".fr-file-item-right-"+e).get(0).innerHTML=ye(e),E.get(e).abort(),xe(e,100,!0),t.find(".fr-checkbox-file-"+e).get(0).disabled=!0}(parseInt(this.id.split("-").pop()))}),A.events.$on(l,"click",".fr-upload-delete-button",function(e){!function t(e){0!=E.get(e).readyState&&(E.get(e).abort(),xe(e,100,!0),E["delete"](e)),q(e)}(parseInt(this.id.split("-").pop()))}),A.events.$on(l,"click",".fr-file-view-close",function(e){l.find(".fr-file-view-modal").get(0).outerHTML=""}),A.events.$on(l,"click",".fr-plugins-enable",function(e){!function t(){m.forEach(function(e){A.opts.pluginsEnabled.indexOf(e)<0&&A.opts.pluginsEnabled.push(e)})}(),function i(e){for(var t in e)if(!A[t]){if(Lt.PLUGINS[t]&&A.opts.pluginsEnabled.indexOf(t)<0)continue;A[t]=new e[t](A),A[t]._init&&A[t]._init()}}(Lt.PLUGINS),A.popups.get("filesManager.insert").get(0).outerHTML="",Ne(),y(!0)}),A.events.$on(l,"click",".fr-plugins-cancel",function(e){A.popups.hide("filesManager.insert")}),A.events.$on(l,"drop",".fr-upload-progress",function(e){e.preventDefault(),e.stopPropagation()}),A.events.$on(l,"drop",".fr-files-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),I(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var i=l.data("instance")||A;i.events.disableBlur();for(var n=[],a=0;a<t.files.length;a++){var r=u;L.set(r,t.files[a]),ve(r),D.set(r,!1),n.push(r),u++}for(var s=0;s<n.length;s++)i.filesManager.upload(L.get(n[s]),t.files,x,n[s]);i.events.enableBlur()}},!0),A.helpers.isIOS()&&A.events.$on(l,"touchstart",'.fr-files-upload-layer input[type="file"]',function(){I(this).trigger("click")},!0),A.events.$on(l,"change",'.fr-files-upload-layer input[type="file"]',function(){if(this.files){var e=l.data("instance")||A;e.events.disableBlur(),l.find("input:focus").blur(),e.events.enableBlur();var t=[];if("undefined"!=typeof this.files&&0<this.files.length){for(var i=0;i<this.files.length;i++){var n=u;L.set(n,this.files[i]),ve(n),D.set(n,!1),++u,t.push(n)}for(var a=0;a<t.length;a++)e.filesManager.upload(L.get(t[a]),this.files,x,t[a])}}I(this).val("")},!0)}function Ue(t){document.getElementById("fr-file-autoplay-button-"+t).checked?B.push(t):B=B.filter(function(e){return e!=t})}function ze(e){return e&&"image"===e.split("/")[0]}function Oe(e){return e&&"image"!=e.split("/")[0]&&e&&"video"!=e.split("/")[0]&&e&&"audio"!=e.split("/")[0]}function $e(e){return e&&"video"===e.split("/")[0]}function Pe(e){return e&&"audio"===e.split("/")[0]}function Fe(e){var t="audio/ogg",i="video/ogg";if(e==t||e==i||"image/webp"==e||"video/webm"==e){if(A.browser.msie||A.browser.edge||A.browser.safari)return!1;if(A.helpers.isMobile()){if(e==t||e==i)return!1;if(!A.helpers.isAndroid()&&!A.browser.chrome)return!1}}return!0}function Ne(e){if(e)return A.popups.onRefresh("filesManager.insert",b),A.popups.onHide("filesManager.insert",F),!0;var t,i,n="";A.opts.imageUpload||-1===A.opts.filesInsertButtons.indexOf("filesUpload")||A.opts.imageInsertButtons.splice(A.opts.filesInsertButtons.indexOf("filesUpload"),1);var a=A.button.buildList(A.opts.filesInsertButtons),r=A.button.buildList(A.opts.filesInsertButtons2);""!==a&&(n='<div class="fr-buttons fr-tabs">'.concat(a,'<span class="fr-align-right">').concat(r,"</span></div>"));var s=A.opts.filesInsertButtons.indexOf("filesUpload"),o=A.opts.filesInsertButtons.indexOf("filesByURL"),l=A.opts.filesInsertButtons.indexOf("filesEmbed"),d="";0<=s&&(t=" fr-active",0<=o&&o<s&&(t=""),d='<div class="fr-files-upload-layer'.concat(t,' fr-layer " id="fr-files-upload-layer-').concat(A.id,'"><div style="display:flex"><div class="fr-upload-section"><div class = \'fr-blue-decorator\'><div class = \'fr-cloud-icon\'><svg class = "fr-svg" focusable="false" width="26px" height="26px" viewBox = "0 0 24 24" xlmns = "http://w3.org/200/svg"><path d = \'M12 6.66667a4.87654 4.87654 0 0 1 4.77525 3.92342l0.29618 1.50268 1.52794 0.10578a2.57021 2.57021 0 0 1 -0.1827 5.13478H6.5a3.49774 3.49774 0 0 1 -0.3844 -6.97454l1.06682 -0.11341L7.678 9.29387A4.86024 4.86024 0 0 1 12 6.66667m0 -2A6.871 6.871 0 0 0 5.90417 8.37 5.49773 5.49773 0 0 0 6.5 19.33333H18.41667a4.57019 4.57019 0 0 0 0.32083 -9.13A6.86567 6.86567 0 0 0 12 4.66667Zm0.99976 7.2469h1.91406L11.99976 9 9.08618 11.91357h1.91358v3H11V16h2V14h-0.00024Z\'></path></svg></div>Drag & Drop One or More Files<br><div class="decorated"><span> OR </span></div> Click Browse Files </div> </div><div class="fr-form"><input type="file" accept="').concat(A.opts.filesManagerAllowedTypes.join(",").toLowerCase(),'" tabIndex="-1" aria - labelledby="fr-files-upload-layer-').concat(A.id,'"role="button" multiple></div> </div></div>'));var f="";0<=l&&(t=" fr-active",(s<l&&0<=s||o<l&&0<=o)&&(t=""),f='<div class="fr-files-embed-layer fr-layer'.concat(t,'" id="fr-files-embed-layer-').concat(A.id,'"><div class="fr-input-line padding-top-15"><textarea data-gramm_editor="false" style=\'height:60px\' id="fr-files-embed-layer-text').concat(A.id,'" type="text" placeholder="').concat(A.language.translate("Embedded Code"),'" tabIndex="1" aria-required="true" rows="5"></textarea></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="insertEmbed" tabIndex="2" role="button">').concat(A.language.translate("Insert"),"</button></div></div>"));var c="";0<=o&&(t=" fr-active",0<=s&&s<o&&(t=""),c='<div class="fr-files-by-url-layer'.concat(t,' fr-layer" id="fr-files-by-url-layer-').concat(A.id,'"><div class="fr-input-line fr-by-url-padding"><input id="fr-files-by-url-layer-text-').concat(A.id,'" type="text" placeholder="http://" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="filesInsertByURL" tabIndex="2" role="button">').concat(A.language.translate("Add"),"</button></div></div>"));var p={buttons:n,upload_layer:d,by_url_layer:c,embed_layer:f,upload_progress_layer:"<div class = ' fr-margin-16 fr-upload-progress' id=\"fr-upload-progress-layer-".concat(A.id,"\" ><div class='fr-progress-bar-style'><div class='fr-progress-bar fr-none'></div></div><div id='filesList' class = 'fr-upload-progress-layer fr-layer'></div></div>"),progress_bar:'<div class="fr-files-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="filesDismissError" tabIndex="2" role="button">OK</button></div></div>'};return 1<=A.opts.imageInsertButtons.length&&(i=A.popups.create("filesManager.insert",p)),A.$wp&&A.events.$on(A.$wp,"scroll",function(){x&&A.popups.isVisible("filesManager.insert")&&replace()}),Re(i),A.popups.setPopupDimensions(i),i}function He(e){var t=e.split("/").pop();if(t.split(".").length<2){var i=new Date;return t+"-"+i.getDate()+"/"+(i.getMonth()+1)+"/"+i.getFullYear()}return t}function Ke(){x&&A.popups.get("image.alt").find("input").val(x.attr("alt")||"").trigger("change")}function Ye(){var e=A.popups.get("image.alt");e||(e=Ve()),Q(),A.popups.refresh("image.alt"),A.popups.setContainer("image.alt",A.$sc);var t=dt();ft()&&(t=t.find(".fr-img-wrap"));var i=t.offset().left+t.outerWidth()/2,n=t.offset().top+t.outerHeight();A.popups.show("image.alt",i,n,t.outerHeight(),!0)}function Ve(e){if(e)return A.popups.onRefresh("image.alt",Ke),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(A.button.buildList(A.opts.imageAltButtons),"</div>"),alt_layer:'<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-'.concat(A.id,'"><div class="fr-input-line"><input id="fr-image-alt-layer-text-').concat(A.id,'" type="text" placeholder="').concat(A.language.translate("Alternative Text"),'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetAlt" tabIndex="2" role="button">').concat(A.language.translate("Update"),"</button></div></div>")},i=A.popups.create("image.alt",t);return A.$wp&&A.events.$on(A.$wp,"scroll.image-alt",function(){x&&A.popups.isVisible("image.alt")&&Ye()}),i}function We(){var e=A.popups.get("image.size");if(x)if(ft()){var t=x.parent();t.get(0).style.width||(t=x.parent().parent()),e.find('input[name="width"]').val(t.get(0).style.width).trigger("change"),e.find('input[name="height"]').val(t.get(0).style.height).trigger("change")}else e.find('input[name="width"]').val(x.get(0).style.width).trigger("change"),e.find('input[name="height"]').val(x.get(0).style.height).trigger("change")}function Ge(){var e=A.popups.get("image.size");e||(e=Xe()),Q(),A.popups.refresh("image.size"),A.popups.setContainer("image.size",A.$sc);var t=dt();ft()&&(t=t.find(".fr-img-wrap"));var i=t.offset().left+t.outerWidth()/2,n=t.offset().top+t.outerHeight();A.popups.show("image.size",i,n,t.outerHeight(),!0)}function Xe(e){if(e)return A.popups.onRefresh("image.size",We),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(A.button.buildList(A.opts.imageSizeButtons),"</div>"),size_layer:'<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-'.concat(A.id,'"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-size-layer-width-\'').concat(A.id,'" type="text" name="width" placeholder="').concat(A.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-image-size-layer-height').concat(A.id,'" type="text" name="height" placeholder="').concat(A.language.translate("Height"),'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetSize" tabIndex="2" role="button">').concat(A.language.translate("Update"),"</button></div></div>")},i=A.popups.create("image.size",t);return A.$wp&&A.events.$on(A.$wp,"scroll.image-size",function(){x&&A.popups.isVisible("image.size")&&Ge()}),i}function je(e,t,i,n){return e.pageX=t,Y.call(this,e),e.pageX=e.pageX+i*Math.floor(Math.pow(1.1,n)),V.call(this,e),W.call(this,e),++n}function qe(e){(e=e||dt())&&!1!==A.events.trigger("image.beforeRemove",[e])&&(A.popups.hideAll(),nt(!0),A.undo.canDo()||A.undo.saveStep(),e.get(0)==A.el?e.removeAttr("src"):(e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?(A.selection.setBefore(e.get(0).parentNode)||A.selection.setAfter(e.get(0).parentNode)||e.parent().after(Lt.MARKERS),I(e.get(0).parentNode).remove()):(A.selection.setBefore(e.get(0))||A.selection.setAfter(e.get(0))||e.after(Lt.MARKERS),e.remove()),A.html.fillEmptyBlocks(),A.selection.restore()),A.undo.saveStep())}function Ze(e){var t=e.which;if(x&&(t==Lt.KEYCODE.BACKSPACE||t==Lt.KEYCODE.DELETE))return e.preventDefault(),e.stopPropagation(),qe(),!1;if(x&&t==Lt.KEYCODE.ESC){var i=x;return nt(!0),A.selection.setAfter(i.get(0)),A.selection.restore(),e.preventDefault(),!1}if(!x||t!=Lt.KEYCODE.ARROW_LEFT&&t!=Lt.KEYCODE.ARROW_RIGHT)return x&&t===Lt.KEYCODE.TAB?(e.preventDefault(),e.stopPropagation(),nt(!0),!1):x&&t!=Lt.KEYCODE.F10&&!A.keys.isBrowserAction(e)?(e.preventDefault(),e.stopPropagation(),!1):void 0;var n=x.get(0);return nt(!0),t==Lt.KEYCODE.ARROW_LEFT?A.selection.setBefore(n):A.selection.setAfter(n),A.selection.restore(),e.preventDefault(),!1}function Je(e){if(e&&"IMG"==e.tagName){if(A.node.hasClass(e,"fr-uploading")||A.node.hasClass(e,"fr-error")?e.parentNode.removeChild(e):A.node.hasClass(e,"fr-draggable")&&e.classList.remove("fr-draggable"),e.parentNode&&e.parentNode.parentNode&&A.node.hasClass(e.parentNode.parentNode,"fr-img-caption")){var t=e.parentNode.parentNode;t.removeAttribute("contenteditable"),t.removeAttribute("draggable"),t.classList.remove("fr-draggable");var i=e.nextSibling;i&&i.removeAttribute("contenteditable")}}else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var n=e.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"),a=0;a<n.length;a++)Je(n[a])}function Qe(e){var t=e.target.result,i=A.opts.imageDefaultWidth;i&&"auto"!=i&&(i+=A.opts.imageResizeWithPercent?"%":"px"),A.undo.saveStep(),A.html.insert('<img data-fr-image-pasted="true" src="'.concat(t,'"').concat(i?' style="width: '.concat(i,';"'):"",">"));var n=A.$el.find('img[data-fr-image-pasted="true"]');n&&ot(n,A.opts.imageDefaultDisplay,A.opts.imageDefaultAlign),A.events.trigger("paste.after")}function et(e,t){var i=new FileReader;i.onload=function n(e){var t=A.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=A.opts.imageResizeWithPercent?"%":"px"),A.html.insert('<img data-fr-image-pasted="true" src="'.concat(e,'"').concat(t?' style="width: '.concat(t,';"'):"",">"));var i=A.$el.find('img[data-fr-image-pasted="true"]');i&&ot(i,A.opts.imageDefaultDisplay,A.opts.imageDefaultAlign),A.events.trigger("paste.after")}(t),i.readAsDataURL(e,t)}function tt(e){if(e&&e.clipboardData&&e.clipboardData.items){var t=(e.clipboardData||window.clipboardData).getData("text/html")||"",i=(new DOMParser).parseFromString(t,"text/html").querySelector("img");if(i){if(!i)return!1;var n=i.src,a=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))a=e.clipboardData.items[0].getAsFile();else for(var r=0;r<e.clipboardData.items.length&&!(a=e.clipboardData.items[r].getAsFile());r++);if(a)return et(a,n),!1}else{var s=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))s=e.clipboardData.items[0].getAsFile();else for(var o=0;o<e.clipboardData.items.length&&!(s=e.clipboardData.items[o].getAsFile());o++);if(s)return function l(e){var t=new FileReader;t.onload=Qe,t.readAsDataURL(e)}(s),!1}}}function it(e){return e=e.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function nt(e){x&&(function t(){return at}()||!0===e)&&(A.toolbar.enable(),l&&l.removeClass("fr-active"),A.popups.hide("image.edit"),x=null,st(),d=null,f&&f.hide())}var at=!1;function rt(){at=!0}function st(){at=!1}function ot(e,t,i){!A.opts.htmlUntouched&&A.opts.useClasses?(I(e[e.length-1]).removeClass("fr-fil fr-fir fr-dib fr-dii"),i&&I(e[e.length-1]).addClass("fr-fi".concat(i[0])),t&&I(e[e.length-1]).addClass("fr-di".concat(t[0]))):"inline"==t?(e.css({display:"inline-block",verticalAlign:"bottom",margin:A.opts.imageDefaultMargin}),"center"==i?e.css({"float":"none",marginBottom:"",marginTop:"",maxWidth:"calc(100% - ".concat(2*A.opts.imageDefaultMargin,"px)"),textAlign:"center"}):"left"==i?e.css({"float":"left",marginLeft:0,maxWidth:"calc(100% - ".concat(A.opts.imageDefaultMargin,"px)"),textAlign:"left"}):e.css({"float":"right",marginRight:0,maxWidth:"calc(100% - ".concat(A.opts.imageDefaultMargin,"px)"),textAlign:"right"})):"block"==t&&(e.css({display:"block","float":"none",verticalAlign:"top",margin:"".concat(A.opts.imageDefaultMargin,"px auto"),textAlign:"center"}),"left"==i?e.css({marginLeft:0,textAlign:"left"}):"right"==i&&e.css({marginRight:0,textAlign:"right"}))}function lt(){return x}function dt(){return ft()?x.parents(".fr-img-caption").first():x}function ft(){return!!x&&0<x.parents(".fr-img-caption").length}return{_init:function ct(){var n;(function e(){A.events.$on(A.$el,A._mousedown,"IMG"==A.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==I(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;A.helpers.isMobile()||A.selection.clear(),t=!0,A.popups.areVisible()&&A.events.disableBlur(),A.browser.msie&&(A.events.disableBlur(),A.$el.attr("contenteditable",!1)),A.draggable||"touchstart"==e.type||e.preventDefault(),e.stopPropagation()}),A.events.$on(A.$el,A._mousedown,".fr-img-caption .fr-inner",function(e){A.core.hasFocus()||A.events.focus(),e.stopPropagation()}),A.events.$on(A.$el,"paste",".fr-img-caption .fr-inner",function(e){!0===A.opts.toolbarInline&&(A.toolbar.hide(),e.stopPropagation())}),A.events.$on(A.$el,A._mouseup,"IMG"==A.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==I(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t&&(t=!1,e.stopPropagation(),A.browser.msie&&(A.$el.attr("contenteditable",!0),A.events.enableBlur()))}),A.events.on("keyup",function(e){if(e.shiftKey&&""===A.selection.text().replace(/\n/g,"")&&A.keys.isArrow(e.which)){var t=A.selection.element(),i=A.selection.endElement();t&&"IMG"==t.tagName?Ee(I(t)):i&&"IMG"==i.tagName&&Ee(I(i))}},!0),A.events.on("window.mousedown",rt),A.events.on("window.touchmove",st),A.events.on("mouseup window.mouseup",function(){if(x)return nt(),!1;st()}),A.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&nt()}),A.events.on("image.resizeEnd",function(){A.opts.iframe&&A.size.syncIframe()}),A.events.on("blur image.hideResizer commands.undo commands.redo element.dropped",function(){nt(!(t=!1))}),A.events.on("modals.hide",function(){x&&A.selection.clear()}),A.events.on("image.resizeEnd",function(){A.win.getSelection&&Ee(x)}),A.opts.imageAddNewLine&&A.events.on("image.inserted",function(e){var t=e.get(0);for(t.nextSibling&&"BR"===t.nextSibling.tagName&&(t=t.nextSibling);t&&!A.node.isElement(t);)t=A.node.isLastSibling(t)?t.parentNode:null;A.node.isElement(t)&&(A.opts.enter===Lt.ENTER_BR?e.after("<br>"):I(A.node.blockParent(e.get(0))).after("<".concat(A.html.defaultTag(),"><br></").concat(A.html.defaultTag(),">")))})})(),"IMG"==A.el.tagName&&A.$el.addClass("fr-view"),A.helpers.isMobile()&&(A.events.$on(A.$el,"touchstart","IMG"==A.el.tagName?null:'img:not([contenteditable="false"])',function(){fe=!1}),A.events.$on(A.$el,"touchmove",function(){fe=!0})),A.$wp?(A.events.on("window.keydown keydown",Ze,!0),A.events.on("keyup",function(e){if(x&&e.which==Lt.KEYCODE.ENTER)return!1},!0),A.events.$on(A.$el,"keydown",function(){var e=A.selection.element();(e.nodeType===Node.TEXT_NODE||"BR"==e.tagName&&A.node.isLastSibling(e))&&(e=e.parentNode),A.node.hasClass(e,"fr-inner")||(A.node.hasClass(e,"fr-img-caption")||(e=I(e).parents(".fr-img-caption").get(0)),A.node.hasClass(e,"fr-img-caption")&&(I(e).after(Lt.INVISIBLE_SPACE+Lt.MARKERS),A.selection.restore()))})):A.events.$on(A.$win,"keydown",Ze),A.events.on("toolbar.esc",function(){if(x){if(A.$wp)A.events.disableBlur(),A.events.focus();else{var e=x;nt(!0),A.selection.setAfter(e.get(0)),A.selection.restore()}return!1}},!0),A.events.on("toolbar.focusEditor",function(){if(x)return!1},!0),A.events.on("window.cut window.copy",function(e){if(x&&A.popups.isVisible("image.edit")&&!A.popups.get("image.edit").find(":focus").length){var t=dt();ft()?(t.before(Lt.START_MARKER),t.after(Lt.END_MARKER),A.selection.restore(),A.paste.saveCopiedText(t.get(0).outerHTML,t.text())):A.paste.saveCopiedText(x.get(0).outerHTML,x.attr("alt")),"copy"==e.type?setTimeout(function(){Ee(x)}):(nt(!0),A.undo.saveStep(),setTimeout(function(){A.undo.saveStep()},0))}},!0),A.browser.msie&&A.events.on("keydown",function(e){if(!A.selection.isCollapsed()||!x)return!0;var t=e.which;t==Lt.KEYCODE.C&&A.keys.ctrlKey(e)?A.events.trigger("window.copy"):t==Lt.KEYCODE.X&&A.keys.ctrlKey(e)&&A.events.trigger("window.cut")}),A.events.$on(I(A.o_win),"keydown",function(e){var t=e.which;if(x&&t==Lt.KEYCODE.BACKSPACE)return e.preventDefault(),!1}),A.events.$on(A.$win,"keydown",function(e){var t=e.which;x&&x.hasClass("fr-uploading")&&t==Lt.KEYCODE.ESC&&x.trigger("abortUpload")}),A.events.on("destroy",function(){x&&x.hasClass("fr-uploading")&&x.trigger("abortUpload")}),A.events.on("paste.before",tt),A.events.on("paste.beforeCleanup",it),A.events.on("html.processGet",Je),A.opts.imageOutputSize&&A.events.on("html.beforeGet",function(){n=A.el.querySelectorAll("img");for(var e=0;e<n.length;e++){var t=n[e].style.width||I(n[e]).width(),i=n[e].style.height||I(n[e]).height();t&&n[e].setAttribute("width","".concat(t).replace(/px/,"")),i&&n[e].setAttribute("height","".concat(i).replace(/px/,""))}}),A.opts.iframe&&A.events.on("image.loaded",A.size.syncIframe),A.events.$on(I(A.o_win),"orientationchange.image",function(){setTimeout(function(){x&&Ee(x)},100)}),function a(e){if(e)return A.$wp&&A.events.$on(A.$wp,"scroll.image-edit",function(){x&&A.popups.isVisible("image.edit")&&A.events.disableBlur()}),!0;var t="";if(0<A.opts.imageEditButtons.length){var i={buttons:t+='<div class="fr-buttons"> \n '.concat(A.button.buildList(A.opts.imageEditButtons),"\n </div>")};return A.popups.create("image.edit",i)}return!1}(!0),Ne(!0),Xe(!0),Ve(!0),A.events.on("node.remove",function(e){if("IMG"==e.get(0).tagName)return qe(e),!1}),A.events.on("popups.hide.filesManager.insert",function(e){A.filesManager.minimizePopup(C)})},showInsertPopup:y,showLayer:function pt(e){var t,i,n=A.popups.get("filesManager.insert");if(x||A.opts.toolbarInline){if(x){var a=dt();ft()&&(a=a.find(".fr-img-wrap")),i=a.offset().top+a.outerHeight(),t=a.offset().left}}else{var r=A.$tb.find('.fr-command[data-cmd="insertFiles"]');t=r.offset().left,i=r.offset().top+(A.opts.toolbarBottom?10:r.outerHeight()-10)}!x&&A.opts.toolbarInline&&(i=n.offset().top-A.helpers.getPX(n.css("margin-top")),n.hasClass("fr-above")&&(i+=n.outerHeight())),n.find(".fr-layer").removeClass("fr-active"),n.find(".fr-".concat(e,"-layer")).addClass("fr-active"),n.find(".fr-upload-progress-layer").addClass("fr-active"),A.popups.show("filesManager.insert",t,i,x?x.outerHeight():0),A.accessibility.focusPopup(n)},refreshUploadButton:function gt(e){var t=A.popups.get("filesManager.insert");t&&t.find(".fr-files-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshByURLButton:function ut(e){var t=A.popups.get("filesManager.insert");t&&t.find(".fr-files-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:Te,insertByURL:function mt(){for(var e,t=A.popups.get("filesManager.insert").find(".fr-files-by-url-layer input"),i=t.val().trim().split(/[ ,]+/),n=[],a=0,r=0;r<i.length;r++)e=i[r],new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e)&&(n[a]=i[r],a++);if(0!=n.length){if(0<t.val().trim().length&&0<n.length){var o=[],l=[],d=u,f=n.length;n.forEach(function(e,i){if(0==e.trim().length)u==d+--f&&Me(o,l);else{Q(),J(),ee(A.language.translate("Loading file(s)"));var n=e.trim(),t=function s(e){if(void 0===e)return e;var t=null;if(/^http/.test(e)||(e="https://".concat(e)),A.helpers.isURL(e))for(var i=0;i<Lt.VIDEO_PROVIDERS.length;i++){var n=Lt.VIDEO_PROVIDERS[i];if(n.test_regex.test(e)&&new RegExp(A.opts.videoAllowedProviders.join("|")).test(n.provider)){t=e.replace(n.url_regex,n.url_text),t=n.html.replace(/\{url\}/,t);break}}return t}(n);if(t){var a={link:n,name:n,type:"video/url",size:2,video:t};L.set(d+i,a),ve(d+i),Q(),J(),ee(A.language.translate("Loading file(s)")),_.set(d+i,a),++u==d+f&&Me(o,l)}else{var r=new XMLHttpRequest;r.onload=function(){if(200==this.status){var e=new Blob([this.response],{type:this.response.type||""});e.name=He(n),e.link=n,ze(this.response.type)?(e.sanitize=!0,e.existing_image=x):Oe(this.response.type)&&(e.text=He(n)),o.push(e),l.push(d+i),L.set(d+i,e),ve(d+i),(-1<P.indexOf(Le(e))||!Le(e))&&X(O,null,null,d+i)}else{var t=new Blob([this.response],{type:this.response.type||" "});t.name=He(n),t.link=n,L.set(d+i,t),ve(d+i),X(T,this.response,x,d+i)}Q(),J(),ee(A.language.translate("Loading file(s)")),++u==d+f&&Me(o,l)},r.onerror=function(){var e={link:n,name:He(n),size:0,type:""};X(9,this.response,x,d+i);var t=u;L.set(t,e),ve(t),Q(),J(),ee(A.language.translate("Loading file(s)")),++u==d+f&&Me(o,l)},r.open("GET","".concat(A.opts.imageCORSProxy,"/").concat(n),!0),r.responseType="blob",r.send()}}}),t.val(""),t.blur()}}else te(A.language.translate("Url entered is invalid. Please try again."))},insertAllFiles:function vt(){a=[];var e=A.popups.get("filesManager.insert");g=-1,c=null,e.find(".fr-insert-checkbox").toArray().forEach(function n(e,t,i){e.children.target.checked&&(a.push(parseInt(e.id.split("-").pop())),ze(_.get(parseInt(e.id.split("-").pop())).type)&&-1==g&&(g=t))}),Ce(a),j()},deleteAllFiles:function e(){A.popups.get("filesManager.insert").find(".fr-insert-checkbox").toArray().forEach(function a(e,t,i){if(e.children.target.checked){var n=parseInt(e.id.split("-").pop());E.has(n)&&E["delete"](n),q(n)}}),j()},get:lt,getEl:dt,insert:_e,showProgressBar:J,remove:qe,hideProgressBar:Q,applyStyle:function ht(e,t,i){if(void 0===t&&(t=A.opts.imageStyles),void 0===i&&(i=A.opts.imageMultipleStyles),!x)return!1;var n=dt();if(!i){var a=Object.keys(t);a.splice(a.indexOf(e),1),n.removeClass(a.join(" "))}"object"==_t(t[e])?(n.removeAttr("style"),n.css(t[e].style)):n.toggleClass(e),Ee(x)},showAltPopup:Ye,showSizePopup:Ge,setAlt:function bt(e){if(x){var t=A.popups.get("image.alt");x.attr("alt",e||t.find("input").val()||""),t.find("input:focus").blur(),Ee(x)}},setSize:function yt(e,t){if(x){var i=A.popups.get("image.size");e=e||i.find('input[name="width"]').val()||"",t=t||i.find('input[name="height"]').val()||"";var n=/^[\d]+((px)|%)*$/g;x.removeAttr("width").removeAttr("height"),e.match(n)?x.css("width",e):x.css("width",""),t.match(n)?x.css("height",t):x.css("height",""),ft()&&(x.parents(".fr-img-caption").removeAttr("width").removeAttr("height"),e.match(n)?x.parents(".fr-img-caption").css("width",e):x.parents(".fr-img-caption").css("width",""),t.match(n)?x.parents(".fr-img-caption").css("height",t):x.parents(".fr-img-caption").css("height","")),i&&i.find("input:focus").blur(),Ee(x)}},toggleCaption:function wt(){var e;if(x&&!ft()){(e=x).parent().is("a")&&(e=x.parent());var t,i,n=x.parents("ul")&&0<x.parents("ul").length?x.parents("ul"):x.parents("ol")&&0<x.parents("ol").length?x.parents("ol"):[];if(0<n.length){var a=n.find("li").length,r=x.parents("li"),s=document.createElement("li");a-1===r.index()&&(n.append(s),s.innerHTML="&nbsp;")}e.attr("style")&&(i=-1<(t=e.attr("style").split(":")).indexOf("width")?t[t.indexOf("width")+1].replace(";",""):"");var o=A.opts.imageResizeWithPercent?(-1<i.indexOf("px")?null:i)||"100%":x.width()+"px";e.wrap('<div class="fr-img-space-wrap"><span '+(A.browser.mozilla?"":'contenteditable="false"')+'class="fr-img-caption '+x.attr("class")+'" style="'+(A.opts.useClasses?"":e.attr("style"))+'" draggable="false"></span><p class="fr-img-space-wrap2">&nbsp;</p></div>'),e.wrap('<span class="fr-img-wrap"></span>'),x.after('<span class="fr-inner"'.concat(A.browser.mozilla?"":' contenteditable="true"',">").concat(Lt.START_MARKER).concat(A.language.translate("Image Caption")).concat(Lt.END_MARKER,"</span>")),x.removeAttr("class").removeAttr("style").removeAttr("width"),x.parents(".fr-img-caption").css("width",o),nt(!0),A.selection.restore()}else e=dt(),x.insertAfter(e),x.attr("class",e.attr("class").replace("fr-img-caption","")).attr("style",e.attr("style")),e.remove(),Ee(x)},refreshEmbedButton:function xt(e){var t=A.popups.get("filesManager.insert");t&&t.find(".fr-files-embed-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},insertEmbed:function Mt(e){void 0===e&&(e=A.popups.get("filesManager.insert").find(".fr-files-embed-layer textarea").val()||""),0===e.length||!Lt.VIDEO_EMBED_REGEX.test(e)&&!Lt.IMAGE_EMBED_REGEX.test(e)?(te(A.language.translate("Something went wrong. Please try again.")),Lt.VIDEO_EMBED_REGEX.test(e)&&A.events.trigger("video.codeError",[e])):De(e)},hasCaption:ft,exitEdit:nt,edit:Ee,cancelFileInsert:function Et(){this.file_manager_dialog_open=!1,E.forEach(function(e,t){4!=e.readyState&&(e.abort(),q(t))});var e=A.popups.get("filesManager.insert");e.find(".fr-progress-bar").removeClass("fr-display-block").addClass("fr-none"),e.find('.fr-command[data-cmd="filesUpload"]').removeClass("fr-disabled"),e.find('.fr-command[data-cmd="filesByURL"]').removeClass("fr-disabled"),e.find('.fr-command[data-cmd="filesEmbed"]').removeClass("fr-disabled"),r=0,E=new Map,k=new Map,Z(),A.popups.hide("filesManager.insert")},minimizePopup:function kt(e){this.file_manager_dialog_open=!1,A.popups.hide("filesManager.insert"),Z()},editImage:Ie,saveImage:function At(e){var t=_.get(s);t.link=window.URL.createObjectURL(new Blob(e,{type:"image/png"})),_.set(s,t)},_showErrorMessage:te,_showFileErrorMessage:ie,getFileThumbnail:be,deleteFile:q,checkAutoplay:Ue,checkInsertAllState:j,_disableInsertCheckbox:G,_getFileType:Le,isChildWindowOpen:function Ct(){return p},setChildWindowState:function It(e){e!==undefined&&(p=e)},resetAllFilesCheckbox:Z}},Lt.DefineIcon("insertFiles",{NAME:"image",SVG_KEY:"fileManager"}),Lt.RegisterShortcut(Lt.KEYCODE.P,"insertFiles",null,"P"),Lt.RegisterCommand("insertFiles",{title:"Insert Files",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("filesManager.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("filesManager.insert")):this.filesManager.showInsertPopup()},plugin:"filesManager"}),Lt.DefineIcon("cloudIcon",{NAME:"cloudIcon",SVG_KEY:"uploadFiles"}),Lt.DefineIcon("filesUpload",{NAME:"uploadFiles",SVG_KEY:"uploadFiles"}),Lt.RegisterCommand("filesUpload",{title:"Upload Files",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.showLayer("files-upload")},refresh:function(e){this.filesManager.refreshUploadButton(e)}}),Lt.DefineIcon("filesByURL",{NAME:"link",SVG_KEY:"insertLink"}),Lt.RegisterCommand("filesByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.showLayer("files-by-url")},refresh:function(e){this.filesManager.refreshByURLButton(e)}}),Lt.DefineIcon("filesEmbed",{NAME:"code",SVG_KEY:"codeView"}),Lt.RegisterCommand("filesEmbed",{title:"Embedded Code",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.showLayer("files-embed")},refresh:function(e){this.filesManager.refreshEmbedButton(e)}}),Lt.DefineIcon("insertAll",{NAME:"insertAll",SVG_KEY:"fileInsert"}),Lt.RegisterCommand("insertAll",{title:"Insert",undo:!1,focus:!1,toggle:!0,disabled:!0,callback:function(){this.filesManager.insertAllFiles()}}),Lt.DefineIcon("deleteAll",{NAME:"remove",SVG_KEY:"remove"}),Lt.RegisterCommand("deleteAll",{title:"Delete",undo:!1,focus:!1,toggle:!0,disabled:!0,callback:function(){this.filesManager.deleteAllFiles()}}),Lt.DefineIcon("cancel",{NAME:"cancel",SVG_KEY:"cancel"}),Lt.RegisterCommand("cancel",{title:"Cancel",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.cancelFileInsert()},refresh:function(e){}}),Lt.DefineIcon("minimize",{NAME:"minimize",SVG_KEY:"minimize"}),Lt.RegisterCommand("minimize",{title:"Minimize",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.minimizePopup("image.insert",!0)},refresh:function(e){this.filesManager.refreshEmbedButton(e)}}),Lt.RegisterCommand("filesInsertByURL",{title:"Insert Image",undo:!0,refreshAfterCallback:!1,callback:function(){this.filesManager.insertByURL()},refresh:function(e){e.text(this.language.translate("Add"))}}),Lt.RegisterCommand("imageInsertByUpload",{title:"Insert",undo:!0,refreshAfterCallback:!1,callback:function(e,t){},refresh:function(e){}}),Lt.RegisterCommand("viewImage",{title:"View Image",undo:!0,refreshAfterCallback:!1,callback:function(e,t){},refresh:function(e){}}),Lt.RegisterCommand("insertEmbed",{undo:!0,focus:!0,callback:function(){this.filesManager.insertEmbed(),this.popups.get("filesManager.insert").find("textarea")[0].value="",this.popups.get("filesManager.insert").find("textarea").removeClass("fr-not-empty")}}),Lt.RegisterCommand("filesDismissError",{title:"OK",undo:!1,callback:function(){this.filesManager.hideProgressBar(!0)}})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
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,{fontFamily:{"Arial,Helvetica,sans-serif":"Arial","Georgia,serif":"Georgia","Impact,Charcoal,sans-serif":"Impact","Tahoma,Geneva,sans-serif":"Tahoma","Times New Roman,Times,serif,-webkit-standard":"Times New Roman","Verdana,Geneva,sans-serif":"Verdana"},fontFamilySelection:!1,fontFamilyDefaultSelection:"Font Family"}),e.PLUGINS.fontFamily=function(o){var i=o.$;function r(e){var t=e.replace(/(sans-serif|serif|monospace|cursive|fantasy)/gi,"").replace(/"|'| /g,"").split(",");return i(this).grep(t,function(e){return 0<e.length})}function f(e,t){for(var n=0;n<e.length;n++)for(var a=0;a<t.length;a++)if(e[n].toLowerCase()===t[a].toLowerCase())return[n,a];return null}function n(){var e=r(i(o.selection.element()).css("font-family")),t=[];for(var n in o.opts.fontFamily)if(o.opts.fontFamily.hasOwnProperty(n)){var a=f(e,r(n));a&&t.push([n,a])}return 0===t.length?null:(t.sort(function(e,t){var n=e[1][0]-t[1][0];return 0===n?e[1][1]-t[1][1]:n}),t[0][0])}return{apply:function t(e){o.format.applyStyle("font-family",e)},refreshOnShow:function a(e,t){t.find(".fr-command.fr-active").removeClass("fr-active").attr("aria-selected",!1),t.find('.fr-command[data-param1="'.concat(n(),'"]')).addClass("fr-active").attr("aria-selected",!0)},refresh:function l(e){if(o.opts.fontFamilySelection){var t=i(o.selection.element()).css("font-family").replace(/(sans-serif|serif|monospace|cursive|fantasy)/gi,"").replace(/"|'|/g,"").split(",");e.find("> span").text(o.opts.fontFamily[n()]||t[0]||o.language.translate(o.opts.fontFamilyDefaultSelection))}}}},e.RegisterCommand("fontFamily",{type:"dropdown",displaySelection:function(e){return e.opts.fontFamilySelection},defaultSelection:function(e){return e.opts.fontFamilyDefaultSelection},displaySelectionWidth:120,html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.fontFamily;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="fontFamily" data-param1="'.concat(n,'" \n style="font-family: ').concat(n,'" title="').concat(t[n],'">').concat(t[n],"</a></li>"));return e+="</ul>"},title:"Font Family",callback:function(e,t){this.fontFamily.apply(t)},refresh:function(e){this.fontFamily.refresh(e)},refreshOnShow:function(e,t){this.fontFamily.refreshOnShow(e,t)},plugin:"fontFamily"}),e.DefineIcon("fontFamily",{NAME:"font",SVG_KEY:"fontFamily"})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
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(t){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t,Object.assign(t.DEFAULTS,{fontSize:["8","9","10","11","12","14","18","24","30","36","48","60","72","96"],fontSizeSelection:!1,fontSizeDefaultSelection:"12",fontSizeUnit:"px"}),t.PLUGINS.fontSize=function(o){var i=o.$;return{apply:function e(t){o.format.applyStyle("font-size",t)},refreshOnShow:function a(t,e){var n=i(o.selection.element()).css("font-size");"pt"===o.opts.fontSizeUnit&&(n="".concat(Math.round(72*parseFloat(n,10)/96),"pt")),e.find(".fr-command.fr-active").removeClass("fr-active").attr("aria-selected",!1),e.find('.fr-command[data-param1="'.concat(n,'"]')).addClass("fr-active").attr("aria-selected",!0)},refresh:function n(t){if(o.opts.fontSizeSelection){var e=o.helpers.getPX(i(o.selection.element()).css("font-size"));"pt"===o.opts.fontSizeUnit&&(e="".concat(Math.round(72*parseFloat(e,10)/96),"pt")),t.find("> span").text(e)}}}},t.RegisterCommand("fontSize",{type:"dropdown",title:"Font Size",displaySelection:function(t){return t.opts.fontSizeSelection},displaySelectionWidth:30,defaultSelection:function(t){return t.opts.fontSizeDefaultSelection},html:function(){for(var t='<ul class="fr-dropdown-list" role="presentation">',e=this.opts.fontSize,n=0;n<e.length;n++){var o=e[n];t+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="fontSize" data-param1="'.concat(o).concat(this.opts.fontSizeUnit,'" title="').concat(o,'">').concat(o,"</a></li>")}return t+="</ul>"},callback:function(t,e){this.fontSize.apply(e)},refresh:function(t){this.fontSize.refresh(t)},refreshOnShow:function(t,e){this.fontSize.refreshOnShow(t,e)},plugin:"fontSize"}),t.DefineIcon("fontSize",{NAME:"text-height",SVG_KEY:"fontSize"})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
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(t){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t,Object.assign(t.POPUP_TEMPLATES,{"forms.edit":"[_BUTTONS_]","forms.update":"[_BUTTONS_][_TEXT_LAYER_]"}),Object.assign(t.DEFAULTS,{formEditButtons:["inputStyle","inputEdit"],formStyles:{"fr-rounded":"Rounded","fr-large":"Large"},formMultipleStyles:!0,formUpdateButtons:["inputBack","|"]}),t.PLUGINS.forms=function(s){var u,r=s.$;function e(t){s.selection.clear(),r(this).data("mousedown",!0)}function o(t){r(this).data("mousedown")&&(t.stopPropagation(),r(this).removeData("mousedown"),f(u=this)),t.preventDefault()}function n(){s.$el.find("input, textarea, button").removeData("mousedown")}function a(){r(this).removeData("mousedown")}function p(){return u||null}function f(t){if(-1==["checkbox","radio"].indexOf(t.type)){var e=s.popups.get("forms.edit");e||(e=function i(){var t="";0<s.opts.formEditButtons.length&&(t='<div class="fr-buttons">'.concat(s.button.buildList(s.opts.formEditButtons),"</div>"));var e={buttons:t},o=s.popups.create("forms.edit",e);return s.$wp&&s.events.$on(s.$wp,"scroll.link-edit",function(){p()&&s.popups.isVisible("forms.edit")&&f(p())}),o}());var o=r(u=t);s.popups.refresh("forms.edit"),s.popups.setContainer("forms.edit",s.$sc);var n=o.offset().left+o.outerWidth()/2,a=o.offset().top+o.outerHeight();s.popups.show("forms.edit",n,a,o.outerHeight())}}function i(){var t=s.popups.get("forms.update"),e=p();if(e){var o=r(e);o.is("button")?t.find('input[type="text"][name="text"]').val(o.text()):o.is("input[type=button]")||o.is("input[type=submit]")||o.is("input[type=reset]")?t.find('input[type="text"][name="text"]').val(o.val()):t.find('input[type="text"][name="text"]').val(o.attr("placeholder"))}t.find('input[type="text"][name="text"]').trigger("change")}function d(){u=null}function l(t){if(t)return s.popups.onRefresh("forms.update",i),s.popups.onHide("forms.update",d),!0;var e="";1<=s.opts.formUpdateButtons.length&&(e='<div class="fr-buttons">'.concat(s.button.buildList(s.opts.formUpdateButtons),"</div>"));var o=0,n={buttons:e,text_layer:'<div class="fr-forms-text-layer fr-layer fr-active"> \n <div class="fr-input-line"><input name="text" type="text" placeholder="Text" tabIndex=" '.concat(++o,' "></div>\n <div class="fr-action-buttons"><button class="fr-command fr-submit" data-cmd="updateInput" href="#" tabIndex="').concat(2,'" type="button">').concat(s.language.translate("Update"),"</button></div></div>")};return s.popups.create("forms.update",n)}return{_init:function c(){!function t(){s.events.$on(s.$el,s._mousedown,"input, textarea, button",e),s.events.$on(s.$el,s._mouseup,"input, textarea, button",o),s.events.$on(s.$el,"touchmove","input, textarea, button",a),s.events.$on(s.$el,s._mouseup,n),s.events.$on(s.$win,s._mouseup,n),l(!0)}(),s.events.$on(s.$el,"submit","form",function(t){return t.preventDefault(),!1})},updateInput:function m(){var t=s.popups.get("forms.update"),e=p();if(e){var o=r(e),n=t.find('input[type="text"][name="text"]').val()||"";o.is("button")?n.length?o.text(n):o.text("\u200b"):-1!=["button","submit","reset"].indexOf(e.type)?o.attr("value",n):o.attr("placeholder",n),s.popups.hide("forms.update"),f(e)}},getInput:p,applyStyle:function v(t,e,o){void 0===e&&(e=s.opts.formStyles),void 0===o&&(o=s.opts.formMultipleStyles);var n=p();if(!n)return!1;if(!o){var a=Object.keys(e);a.splice(a.indexOf(t),1),r(n).removeClass(a.join(" "))}r(n).toggleClass(t)},showUpdatePopup:function h(){var t=p();if(t){var e=r(t),o=s.popups.get("forms.update");o||(o=l()),s.popups.isVisible("forms.update")||s.popups.refresh("forms.update"),s.popups.setContainer("forms.update",s.$sc);var n=e.offset().left+e.outerWidth()/2,a=e.offset().top+e.outerHeight();s.popups.show("forms.update",n,a,e.outerHeight())}},showEditPopup:f,back:function b(){s.events.disableBlur(),s.selection.restore(),s.events.enableBlur();var t=p();t&&s.$wp&&("BUTTON"===t.tagName&&s.selection.restore(),f(t))}}},t.RegisterCommand("updateInput",{undo:!1,focus:!1,title:"Update",callback:function(){this.forms.updateInput()}}),t.DefineIcon("inputStyle",{NAME:"magic",SVG_KEY:"inlineStyle"}),t.RegisterCommand("inputStyle",{title:"Style",type:"dropdown",html:function(){var t='<ul class="fr-dropdown-list">',e=this.opts.formStyles;for(var o in e)e.hasOwnProperty(o)&&(t+='<li><a class="fr-command" tabIndex="-1" data-cmd="inputStyle" data-param1="'.concat(o,'">').concat(this.language.translate(e[o]),"</a></li>"));return t+="</ul>"},callback:function(t,e){var o=this.forms.getInput();o&&(this.forms.applyStyle(e),this.forms.showEditPopup(o))},refreshOnShow:function(t,e){var o=this.$,n=this.forms.getInput();if(n){var a=o(n);e.find(".fr-command").each(function(){var t=o(this).data("param1");o(this).toggleClass("fr-active",a.hasClass(t))})}}}),t.DefineIcon("inputEdit",{NAME:"edit",SVG_KEY:"edit"}),t.RegisterCommand("inputEdit",{title:"Edit Button",undo:!1,refreshAfterCallback:!1,callback:function(){this.forms.showUpdatePopup()}}),t.DefineIcon("inputBack",{NAME:"arrow-left",SVG_KEY:"back"}),t.RegisterCommand("inputBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.forms.back()}}),t.RegisterCommand("updateInput",{undo:!1,focus:!1,title:"Update",callback:function(){this.forms.updateInput()}})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 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(e){"use strict";(e=e&&e.hasOwnProperty("default")?e["default"]:e).PLUGINS.fullscreen=function(s){var t,r,o,n,i=s.$,a=function a(){return s.$box.hasClass("fr-fullscreen")};function l(){if(s.helpers.isIOS()&&s.core.hasFocus())return s.$el.blur(),setTimeout(c,250),!1;t=s.helpers.scrollTop(),s.$box.toggleClass("fr-fullscreen"),i("body").first().toggleClass("fr-fullscreen"),s.helpers.isMobile()&&(s.$tb.data("parent",s.$tb.parent()),s.$box.prepend(s.$tb),s.$tb.data("sticky-dummy")&&s.$tb.after(s.$tb.data("sticky-dummy"))),r=s.opts.height,o=s.opts.heightMax,n=s.opts.z_index,s.opts.height=s.o_win.innerHeight-(s.opts.toolbarInline?0:s.$tb.outerHeight()+(s.$second_tb?s.$second_tb.outerHeight():0)),s.opts.zIndex=2147483641,s.opts.heightMax=null,s.size.refresh(),s.opts.toolbarInline&&s.toolbar.showInline();for(var e=s.$box.parent();!e.first().is("body");)e.addClass("fr-fullscreen-wrapper"),e=e.parent();s.opts.toolbarContainer&&s.$box.prepend(s.$tb),s.events.trigger("charCounter.update"),s.events.trigger("codeView.update"),s.$win.trigger("scroll")}function f(){if(s.helpers.isIOS()&&s.core.hasFocus())return s.$el.blur(),setTimeout(c,250),!1;s.$box.toggleClass("fr-fullscreen"),i("body").first().toggleClass("fr-fullscreen"),s.$tb.data("parent")&&s.$tb.data("parent").prepend(s.$tb),s.$tb.data("sticky-dummy")&&s.$tb.after(s.$tb.data("sticky-dummy")),s.opts.height=r,s.opts.heightMax=o,s.opts.zIndex=n,s.size.refresh(),i(s.o_win).scrollTop(t),s.opts.toolbarInline&&s.toolbar.showInline(),s.events.trigger("charCounter.update"),s.opts.toolbarSticky&&s.opts.toolbarStickyOffset&&(s.opts.toolbarBottom?s.$tb.css("bottom",s.opts.toolbarStickyOffset).data("bottom",s.opts.toolbarStickyOffset):s.$tb.css("top",s.opts.toolbarStickyOffset).data("top",s.opts.toolbarStickyOffset));for(var e=s.$box.parent();!e.first().is("body");)e.removeClass("fr-fullscreen-wrapper"),e=e.parent();s.opts.toolbarContainer&&i(s.opts.toolbarContainer).append(s.$tb),i(s.o_win).trigger("scroll"),s.events.trigger("codeView.update")}function c(){a()?f():l(),d(s.$tb.find('.fr-command[data-cmd="fullscreen"]'));var e=s.$tb.find('.fr-command[data-cmd="moreText"]'),t=s.$tb.find('.fr-command[data-cmd="moreParagraph"]'),r=s.$tb.find('.fr-command[data-cmd="moreRich"]'),o=s.$tb.find('.fr-command[data-cmd="moreMisc"]');e.length&&s.refresh.moreText(e),t.length&&s.refresh.moreParagraph(t),r.length&&s.refresh.moreRich(r),o.length&&s.refresh.moreMisc(o)}function d(e){var t=a();e.toggleClass("fr-active",t).attr("aria-pressed",t),e.find("> *").not(".fr-sr-only").replaceWith(t?s.icon.create("fullscreenCompress"):s.icon.create("fullscreen"))}return{_init:function e(){if(!s.$wp)return!1;s.events.$on(i(s.o_win),"resize",function(){a()&&(f(),l())}),s.events.on("toolbar.hide",function(){if(a()&&s.helpers.isMobile())return!1}),s.events.on("position.refresh",function(){if(s.helpers.isIOS())return!a()}),s.events.on("destroy",function(){a()&&f()},!0)},toggle:c,refresh:d,isActive:a}},e.RegisterCommand("fullscreen",{title:"Fullscreen",undo:!1,focus:!1,accessibilityFocus:!0,forcedRefresh:!0,toggle:!0,callback:function(){this.fullscreen.toggle()},refresh:function(e){this.fullscreen.refresh(e)},plugin:"fullscreen"}),e.DefineIcon("fullscreen",{NAME:"expand",SVG_KEY:"fullscreen"}),e.DefineIcon("fullscreenCompress",{NAME:"compress",SVG_KEY:"exitFullscreen"})});
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).PLUGINS.fullscreen=function(s){var t,r,o,n,i=s.$,a=function a(){return s.$box.hasClass("fr-fullscreen")};function l(){if(s.helpers.isIOS()&&s.core.hasFocus())return s.$el.blur(),setTimeout(c,250),!1;t=s.helpers.scrollTop(),s.$box.toggleClass("fr-fullscreen"),i("body").first().toggleClass("fr-fullscreen"),s.helpers.isMobile()&&(s.opts.toolbarBottom?s.$tb[0].removeAttribute("style"):(s.$tb.data("parent",s.$tb.parent()),s.$box.prepend(s.$tb),s.$tb.data("sticky-dummy")&&s.$tb.after(s.$tb.data("sticky-dummy")))),r=s.opts.height,o=s.opts.heightMax,n=s.opts.z_index,s.opts.height=s.o_win.innerHeight-(s.opts.toolbarInline?0:s.$tb.outerHeight()+(s.$second_tb?s.$second_tb.outerHeight():0)),s.opts.zIndex=2147483641,s.opts.heightMax=null,s.size.refresh(),s.opts.toolbarInline&&s.toolbar.showInline();for(var e=s.$box.parent();!e.first().is("body");)e.addClass("fr-fullscreen-wrapper"),e=e.parent();s.opts.toolbarContainer&&s.$box.prepend(s.$tb),s.events.trigger("charCounter.update"),s.events.trigger("codeView.update"),s.$win.trigger("scroll")}function f(){if(s.helpers.isIOS()&&s.core.hasFocus())return s.$el.blur(),setTimeout(c,250),!1;s.$box.toggleClass("fr-fullscreen"),i("body").first().toggleClass("fr-fullscreen"),s.$tb.data("parent")&&s.$tb.data("parent").prepend(s.$tb),s.$tb.data("sticky-dummy")&&s.$tb.after(s.$tb.data("sticky-dummy")),s.opts.height=r,s.opts.heightMax=o,s.opts.zIndex=n,s.size.refresh(),i(s.o_win).scrollTop(t),s.opts.toolbarInline&&s.toolbar.showInline(),s.events.trigger("charCounter.update"),s.opts.toolbarSticky&&s.opts.toolbarStickyOffset&&(s.opts.toolbarBottom?s.$tb.css("bottom",s.opts.toolbarStickyOffset).data("bottom",s.opts.toolbarStickyOffset):s.$tb.css("top",s.opts.toolbarStickyOffset).data("top",s.opts.toolbarStickyOffset));for(var e=s.$box.parent();!e.first().is("body");)e.removeClass("fr-fullscreen-wrapper"),e=e.parent();s.opts.toolbarContainer&&i(s.opts.toolbarContainer).append(s.$tb),i(s.o_win).trigger("scroll"),s.events.trigger("codeView.update")}function c(){a()?f():l(),d(s.$tb.find('.fr-command[data-cmd="fullscreen"]'));var e=s.$tb.find('.fr-command[data-cmd="moreText"]'),t=s.$tb.find('.fr-command[data-cmd="moreParagraph"]'),r=s.$tb.find('.fr-command[data-cmd="moreRich"]'),o=s.$tb.find('.fr-command[data-cmd="moreMisc"]');e.length&&s.refresh.moreText(e),t.length&&s.refresh.moreParagraph(t),r.length&&s.refresh.moreRich(r),o.length&&s.refresh.moreMisc(o)}function d(e){var t=a();e.toggleClass("fr-active",t).attr("aria-pressed",t),e.find("> *").not(".fr-sr-only").replaceWith(t?s.icon.create("fullscreenCompress"):s.icon.create("fullscreen"))}return{_init:function e(){if(!s.$wp)return!1;s.events.$on(i(s.o_win),"resize",function(){a()&&(f(),l())}),s.events.on("toolbar.hide",function(){if(a()&&s.helpers.isMobile())return!1}),s.events.on("position.refresh",function(){if(s.helpers.isIOS())return!a()}),s.events.on("destroy",function(){a()&&f()},!0)},toggle:c,refresh:d,isActive:a}},e.RegisterCommand("fullscreen",{title:"Fullscreen",undo:!1,focus:!1,accessibilityFocus:!0,forcedRefresh:!0,toggle:!0,callback:function(){this.fullscreen.toggle()},refresh:function(e){this.fullscreen.refresh(e)},plugin:"fullscreen"}),e.DefineIcon("fullscreen",{NAME:"expand",SVG_KEY:"fullscreen"}),e.DefineIcon("fullscreenCompress",{NAME:"compress",SVG_KEY:"exitFullscreen"})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
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,{helpSets:[{title:"Inline Editor",commands:[{val:"OSkeyE",desc:"Show the editor"}]},{title:"Common actions",commands:[{val:"OSkeyC",desc:"Copy"},{val:"OSkeyX",desc:"Cut"},{val:"OSkeyV",desc:"Paste"},{val:"OSkeyZ",desc:"Undo"},{val:"OSkeyShift+Z",desc:"Redo"},{val:"OSkeyK",desc:"Insert Link"},{val:"OSkeyP",desc:"Insert Image"}]},{title:"Basic Formatting",commands:[{val:"OSkeyA",desc:"Select All"},{val:"OSkeyB",desc:"Bold"},{val:"OSkeyI",desc:"Italic"},{val:"OSkeyU",desc:"Underline"},{val:"OSkeyS",desc:"Strikethrough"},{val:"OSkey]",desc:"Increase Indent"},{val:"OSkey[",desc:"Decrease Indent"}]},{title:"Quote",commands:[{val:"OSkey'",desc:"Increase quote level"},{val:"OSkeyShift+'",desc:"Decrease quote level"}]},{title:"Image / Video",commands:[{val:"OSkey+",desc:"Resize larger"},{val:"OSkey-",desc:"Resize smaller"}]},{title:"Table",commands:[{val:"Alt+Space",desc:"Select table cell"},{val:"Shift+Left/Right arrow",desc:"Extend selection one cell"},{val:"Shift+Up/Down arrow",desc:"Extend selection one row"}]},{title:"Navigation",commands:[{val:"OSkey/",desc:"Shortcuts"},{val:"Alt+F10",desc:"Focus popup / toolbar"},{val:"Esc",desc:"Return focus to previous position"}]}]}),e.PLUGINS.help=function(c){var a,o=c.$,s="help";return{_init:function e(){},show:function d(){if(!a){var e="<h4>".concat(c.language.translate("Shortcuts"),"</h4>"),t=function n(){for(var e='<div class="fr-help-modal">',t=0;t<c.opts.helpSets.length;t++){var l=c.opts.helpSets[t],a="<table>";a+="<thead><tr><th>".concat(c.language.translate(l.title),"</th></tr></thead>"),a+="<tbody>";for(var o=0;o<l.commands.length;o++){var s=l.commands[o];a+="<tr>",a+="<td>".concat(c.language.translate(s.desc),"</td>"),a+="<td>".concat(s.val.replace("OSkey",c.helpers.isMac()?"&#8984;":"Ctrl+"),"</td>"),a+="</tr>"}e+=a+="</tbody></table>"}return e+="</div>"}(),l=c.modals.create(s,e,t);a=l.$modal,c.events.$on(o(c.o_win),"resize",function(){c.modals.resize(s)})}c.modals.show(s),c.modals.resize(s)},hide:function t(){c.modals.hide(s)}}},e.DefineIcon("help",{NAME:"question",SVG_KEY:"help"}),e.RegisterShortcut(e.KEYCODE.SLASH,"help",null,"/"),e.RegisterCommand("help",{title:"Help",icon:"help",undo:!1,focus:!1,modal:!0,callback:function(){this.help.show()},plugin:"help",showOnMobile:!1})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 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(Le){"use strict";function _e(e){return(_e="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})(e)}Le=Le&&Le.hasOwnProperty("default")?Le["default"]:Le,Object.assign(Le.POPUP_TEMPLATES,{"image.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_BY_URL_LAYER_][_PROGRESS_BAR_]","image.edit":"[_BUTTONS_]","image.alt":"[_BUTTONS_][_ALT_LAYER_]","image.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(Le.DEFAULTS,{imageInsertButtons:["imageBack","|","imageUpload","imageByURL"],imageEditButtons:["imageReplace","imageAlign","imageCaption","imageRemove","imageLink","linkOpen","linkEdit","linkRemove","-","imageDisplay","imageStyle","imageAlt","imageSize"],imageAltButtons:["imageBack","|"],imageSizeButtons:["imageBack","|"],imageUpload:!0,imageUploadURL:null,imageCORSProxy:"https://cors-anywhere.froala.com",imageUploadRemoteUrls:!0,imageUploadParam:"file",imageUploadParams:{},imageUploadToS3:!1,imageUploadToAzure:!1,imageUploadMethod:"POST",imageMaxSize:10485760,imageAllowedTypes:["jpeg","jpg","png","gif","webp"],imageResize:!0,imageResizeWithPercent:!1,imageRoundPercent:!1,imageDefaultWidth:300,imageDefaultAlign:"center",imageDefaultDisplay:"block",imageSplitHTML:!1,imageStyles:{"fr-rounded":"Rounded","fr-bordered":"Bordered","fr-shadow":"Shadow"},imageMove:!0,imageMultipleStyles:!0,imageTextNear:!0,imagePaste:!0,imagePasteProcess:!1,imageMinWidth:16,imageOutputSize:!1,imageDefaultMargin:5,imageAddNewLine:!1}),Le.PLUGINS.image=function(A){var C,l,p,f,s,a,S=A.$,E="https://i.froala.com/upload",t=!1,i=1,c=2,d=3,m=4,R=5,U=6,n={};function g(){var e=A.popups.get("image.insert").find(".fr-image-by-url-layer input");e.val(""),C&&e.val(C.attr("src")),e.trigger("change")}function r(){var e=A.popups.get("image.edit");if(e||(e=P()),e){var t=we();Ae()&&(t=t.find(".fr-img-wrap")),A.popups.setContainer("image.edit",A.$sc),A.popups.refresh("image.edit");var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();C.hasClass("fr-uploading")?I():A.popups.show("image.edit",a,i,t.outerHeight(),!0)}}function u(){z()}function o(e){0<e.parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first());var t=e.hasClass("fr-dib")?"block":e.hasClass("fr-dii")?"inline":null,a=e.hasClass("fr-fil")?"left":e.hasClass("fr-fir")?"right":ue(e);me(e,t,a),e.removeClass("fr-dib fr-dii fr-fir fr-fil")}function h(){for(var e,t="IMG"==A.el.tagName?[A.el]:A.el.querySelectorAll("img"),a=0;a<t.length;a++){var i=S(t[a]);!A.opts.htmlUntouched&&A.opts.useClasses?((A.opts.imageDefaultAlign||A.opts.imageDefaultDisplay)&&(0<(e=i).parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first()),e.hasClass("fr-dii")||e.hasClass("fr-dib")||(e.addClass("fr-fi".concat(ue(e)[0])),e.addClass("fr-di".concat(he(e)[0])),e.css("margin",""),e.css("float",""),e.css("display",""),e.css("z-index",""),e.css("position",""),e.css("overflow",""),e.css("vertical-align",""))),A.opts.imageTextNear||(0<i.parents(".fr-img-caption").length?i.parents(".fr-img-caption").first().removeClass("fr-dii").addClass("fr-dib"):i.removeClass("fr-dii").addClass("fr-dib"))):A.opts.htmlUntouched||A.opts.useClasses||(A.opts.imageDefaultAlign||A.opts.imageDefaultDisplay)&&o(i),A.opts.iframe&&i.on("load",A.size.syncIframe)}}function v(e){void 0===e&&(e=!0);var t,a=Array.prototype.slice.call(A.el.querySelectorAll("img")),i=[];for(t=0;t<a.length;t++)if(i.push(a[t].getAttribute("src")),S(a[t]).toggleClass("fr-draggable",A.opts.imageMove),""===a[t].getAttribute("class")&&a[t].removeAttribute("class"),""===a[t].getAttribute("style")&&a[t].removeAttribute("style"),a[t].parentNode&&a[t].parentNode.parentNode&&A.node.hasClass(a[t].parentNode.parentNode,"fr-img-caption")){var n=a[t].parentNode.parentNode;A.browser.mozilla||n.setAttribute("contenteditable",!1),n.setAttribute("draggable",!1),n.classList.add("fr-draggable");var r=a[t].nextSibling;r&&!A.browser.mozilla&&r.setAttribute("contenteditable",!0)}if(s)for(t=0;t<s.length;t++)i.indexOf(s[t].getAttribute("src"))<0&&A.events.trigger("image.removed",[S(s[t])]);if(s&&e){var o=[];for(t=0;t<s.length;t++)o.push(s[t].getAttribute("src"));for(t=0;t<a.length;t++)o.indexOf(a[t].getAttribute("src"))<0&&A.events.trigger("image.loaded",[S(a[t])])}s=a}function x(){if(l||function o(){var e;A.shared.$image_resizer?(l=A.shared.$image_resizer,f=A.shared.$img_overlay,A.events.on("destroy",function(){S("body").first().append(l.removeClass("fr-active"))},!0)):(A.shared.$image_resizer=S(document.createElement("div")).attr("class","fr-image-resizer"),l=A.shared.$image_resizer,A.events.$on(l,"mousedown",function(e){e.stopPropagation()},!0),A.opts.imageResize&&(l.append(b("nw")+b("ne")+b("sw")+b("se")),A.shared.$img_overlay=S(document.createElement("div")).attr("class","fr-image-overlay"),f=A.shared.$img_overlay,e=l.get(0).ownerDocument,S(e).find("body").first().append(f)));A.events.on("shared.destroy",function(){l.html("").removeData().remove(),l=null,A.opts.imageResize&&(f.remove(),f=null)},!0),A.helpers.isMobile()||A.events.$on(S(A.o_win),"resize",function(){C&&!C.hasClass("fr-uploading")?fe(!0):C&&(x(),ve(),I(!1))});if(A.opts.imageResize){e=l.get(0).ownerDocument,A.events.$on(l,A._mousedown,".fr-handler",w),A.events.$on(S(e),A._mousemove,D),A.events.$on(S(e.defaultView||e.parentWindow),A._mouseup,T),A.events.$on(f,"mouseleave",T);var i=1,n=null,r=0;A.events.on("keydown",function(e){if(C){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,a=e.which;(a!==n||200<e.timeStamp-r)&&(i=1),(a==Le.KEYCODE.EQUALS||A.browser.mozilla&&a==Le.KEYCODE.FF_EQUALS)&&t&&!e.altKey?i=ee.call(this,e,1,1,i):(a==Le.KEYCODE.HYPHEN||A.browser.mozilla&&a==Le.KEYCODE.FF_HYPHEN)&&t&&!e.altKey?i=ee.call(this,e,2,-1,i):A.keys.ctrlKey(e)||a!=Le.KEYCODE.ENTER||(C.before("<br>"),O(C)),n=a,r=e.timeStamp}},!0),A.events.on("keyup",function(){i=1})}}(),!C)return!1;var e=A.$wp||A.$sc;e.append(l),l.data("instance",A);var t=e.scrollTop()-("static"!=e.css("position")?e.offset().top:0),a=e.scrollLeft()-("static"!=e.css("position")?e.offset().left:0);a-=A.helpers.getPX(e.css("border-left-width")),t-=A.helpers.getPX(e.css("border-top-width")),A.$el.is("img")&&A.$sc.is("body")&&(a=t=0);var i=we();Ae()&&(i=i.find(".fr-img-wrap"));var n=0,r=0;A.opts.iframe&&(n=A.helpers.getPX(A.$wp.find(".fr-iframe").css("padding-top")),r=A.helpers.getPX(A.$wp.find(".fr-iframe").css("padding-left"))),l.css("top",(A.opts.iframe?i.offset().top+n:i.offset().top+t)-1).css("left",(A.opts.iframe?i.offset().left+r:i.offset().left+a)-1).css("width",i.get(0).getBoundingClientRect().width).css("height",i.get(0).getBoundingClientRect().height).addClass("fr-active")}function b(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function y(e){Ae()?C.parents(".fr-img-caption").css("width",e):C.css("width",e)}function w(e){if(!A.core.sameInstance(l))return!0;if(e.preventDefault(),e.stopPropagation(),A.$el.find("img.fr-error").left)return!1;A.undo.canDo()||A.undo.saveStep();var t=e.pageX||e.originalEvent.touches[0].pageX;if("mousedown"==e.type){var a=A.$oel.get(0).ownerDocument,i=a.defaultView||a.parentWindow,n=!1;try{n=i.location!=i.parent.location&&!(i.$&&i.$.FE)}catch(s){}n&&i.frameElement&&(t+=A.helpers.getPX(S(i.frameElement).offset().left)+i.frameElement.clientLeft)}(p=S(this)).data("start-x",t),p.data("start-width",C.width()),p.data("start-height",C.height());var r=C.width();if(A.opts.imageResizeWithPercent){var o=C.parentsUntil(A.$el,A.html.blockTagsQuery()).get(0)||A.el;r=(r/S(o).outerWidth()*100).toFixed(2)+"%"}y(r),f.show(),A.popups.hideAll(),de()}function D(e){if(!A.core.sameInstance(l))return!0;var t;if(p&&C){if(e.preventDefault(),A.$el.find("img.fr-error").left)return!1;var a=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null);if(!a)return!1;var i=a-p.data("start-x"),n=p.data("start-width");if((p.hasClass("fr-hnw")||p.hasClass("fr-hsw"))&&(i=0-i),A.opts.imageResizeWithPercent){var r=C.parentsUntil(A.$el,A.html.blockTagsQuery()).get(0)||A.el;n=((n+i)/S(r).outerWidth()*100).toFixed(2),A.opts.imageRoundPercent&&(n=Math.round(n)),y("".concat(n,"%")),(t=Ae()?(A.helpers.getPX(C.parents(".fr-img-caption").css("width"))/S(r).outerWidth()*100).toFixed(2):(A.helpers.getPX(C.css("width"))/S(r).outerWidth()*100).toFixed(2))===n||A.opts.imageRoundPercent||y("".concat(t,"%")),C.css("height","").removeAttr("height")}else n+i>=A.opts.imageMinWidth&&(y(n+i),t=Ae()?A.helpers.getPX(C.parents(".fr-img-caption").css("width")):A.helpers.getPX(C.css("width"))),t!==n+i&&y(t),((C.attr("style")||"").match(/(^height:)|(; *height:)/)||C.attr("height"))&&(C.css("height",p.data("start-height")*C.width()/p.data("start-width")),C.removeAttr("height"));x(),A.events.trigger("image.resize",[ye()])}}function T(e){if(!A.core.sameInstance(l))return!0;if(p&&C){if(e&&e.stopPropagation(),A.$el.find("img.fr-error").left)return!1;p=null,f.hide(),x(),r(),A.undo.saveStep(),A.events.trigger("image.resizeEnd",[ye()])}else l.removeClass("fr-active")}function $(e,t,a){A.edit.on(),C&&C.addClass("fr-error"),n[e]?B(A.language.translate(n[e])):B(A.language.translate("Something went wrong. Please try again.")),!C&&a&&te(a),A.events.trigger("image.error",[{code:e,message:n[e]},t,a])}function P(e){if(e)return A.$wp&&A.events.$on(A.$wp,"scroll.image-edit",function(){C&&A.popups.isVisible("image.edit")&&(A.events.disableBlur(),r())}),!0;var t="";if(0<A.opts.imageEditButtons.length){var a={buttons:t+='<div class="fr-buttons"> \n '.concat(A.button.buildList(A.opts.imageEditButtons),"\n </div>")};return A.popups.create("image.edit",a)}return!1}function I(e){var t=A.popups.get("image.insert");if(t||(t=X()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),C){var a=we();A.popups.setContainer("image.insert",A.$sc);var i=a.offset().left,n=a.offset().top+a.height();A.popups.show("image.insert",i,n,a.outerHeight())}void 0===e&&k(A.language.translate("Uploading"),0)}function z(e){var t=A.popups.get("image.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||A.$el.find("img.fr-error").length)){if(A.events.focus(),A.$el.find("img.fr-error").length&&(A.$el.find("img.fr-error").remove(),A.undo.saveStep(),A.undo.run(),A.undo.dropRedo()),!A.$wp&&C){var a=C;fe(!0),A.selection.setAfter(a.get(0)),A.selection.restore()}A.popups.hide("image.insert")}}function k(e,t){var a=A.popups.get("image.insert");if(a){var i=a.find(".fr-image-progress-bar-layer");i.find("h3").text(e+(t?" ".concat(t,"%"):"")),i.removeClass("fr-error"),t?(i.find("div").removeClass("fr-indeterminate"),i.find("div > span").css("width","".concat(t,"%"))):i.find("div").addClass("fr-indeterminate")}}function B(e){I();var t=A.popups.get("image.insert").find(".fr-image-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),A.events.disableBlur(),a.focus()}function O(e){pe.call(e.get(0))}function N(){var e=S(this);A.popups.hide("image.insert"),e.removeClass("fr-uploading"),e.next().is("br")&&e.next().remove(),O(e),A.events.trigger("image.loaded",[e])}function L(o,e,s,l,p){l&&"string"==typeof l&&(l=A.$(l)),A.edit.off(),k(A.language.translate("Loading image")),e&&(o=A.helpers.sanitizeURL(o));var t=new Image;t.onload=function(){var e,t;if(l){A.undo.canDo()||l.hasClass("fr-uploading")||A.undo.saveStep();var a=l.data("fr-old-src");l.data("fr-image-pasted")&&(a=null),A.$wp?((e=l.clone().removeData("fr-old-src").removeClass("fr-uploading").removeAttr("data-fr-image-pasted")).off("load"),a&&l.attr("src",a),l.replaceWith(e)):e=l;for(var i=e.get(0).attributes,n=0;n<i.length;n++){var r=i[n];0===r.nodeName.indexOf("data-")?e.removeAttr(r.nodeName):s&&s.hasOwnProperty(r.nodeName)&&e.removeAttr(r.nodeName)}if(void 0!==s)for(t in s)s.hasOwnProperty(t)&&"link"!=t&&e.attr("".concat(t),s[t]);e.on("load",N),e.attr("src",o),A.edit.on(),v(!1),A.undo.saveStep(),A.events.disableBlur(),A.$el.blur(),A.events.trigger(a?"image.replaced":"image.inserted",[e,p])}else e=Y(o,s,N),v(!1),A.undo.saveStep(),A.events.disableBlur(),A.$el.blur(),A.events.trigger("image.inserted",[e,p])},t.onerror=function(){$(i)},I(A.language.translate("Loading image")),t.src=o}function _(e,t,a){k(A.language.translate("Loading image"));var i=this.status,n=this.response,r=this.responseXML,o=this.responseText;try{if(A.opts.imageUploadToS3||A.opts.imageUploadToAzure)if(201==i){var s;if(A.opts.imageUploadToAzure){if(!1===A.events.trigger("image.uploadedToAzure",[this.responseURL,a,n],!0))return A.edit.on(),!1;s=t}else s=function p(e){try{var t=S(e).find("Location").text(),a=S(e).find("Key").text();return!1===A.events.trigger("image.uploadedToS3",[t,a,e],!0)?(A.edit.on(),!1):t}catch(i){return $(m,e),!1}}(r);s&&L(s,!1,[],e,n||r)}else $(m,n||r,e);else if(200<=i&&i<300){var l=function f(e){try{if(!1===A.events.trigger("image.uploaded",[e],!0))return A.edit.on(),!1;var t=JSON.parse(e);return t.link?t:($(c,e),!1)}catch(a){return $(m,e),!1}}(o);l&&L(l.link,!1,l,e,n||o)}else $(d,n||o,e)}catch(g){$(m,n||o,e)}}function M(){$(m,this.response||this.responseText||this.responseXML)}function K(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;k(A.language.translate("Uploading"),t)}}function Y(e,t,a){var i,n=S(document.createElement("img")).attr("src",e);if(t&&void 0!==t)for(i in t)t.hasOwnProperty(i)&&"link"!=i&&(" data-".concat(i,'="').concat(t[i],'"'),n.attr("".concat(i),t[i]));var r=A.opts.imageDefaultWidth;r&&"auto"!=r&&(r=A.opts.imageResizeWithPercent?"100%":"".concat(r,"px")),n.attr("style",r?"width: ".concat(r,";"):""),me(n,A.opts.imageDefaultDisplay,A.opts.imageDefaultAlign),n.on("load",a),n.on("error",a),A.edit.on(),A.events.focus(!0),A.selection.restore(),A.undo.saveStep(),A.opts.imageSplitHTML?A.markers.split():A.markers.insert(),A.html.wrap();var o=A.$el.find(".fr-marker");return o.length?(o.parent().is("hr")&&o.parent().after(o),A.node.isLastSibling(o)&&o.parent().hasClass("fr-deletable")&&o.insertAfter(o.parent()),o.replaceWith(n)):A.$el.append(n),A.selection.clear(),n}function H(){A.edit.on(),z(!0)}function W(e,t){if(void 0!==e&&0<e.length){if(!1===A.events.trigger("image.beforeUpload",[e,t]))return!1;var a,i=e[0];if(!(null!==A.opts.imageUploadURL&&A.opts.imageUploadURL!=E||A.opts.imageUploadToS3||A.opts.imageUploadToAzure))return function y(n,r){var o=new FileReader;o.onload=function(){var e=o.result;if(o.result.indexOf("svg+xml")<0){for(var t=atob(o.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:n.type})),r&&r.data("fr-old-src",r.attr("src")),A.image.insert(e,!1,null,r)}},I(),o.readAsDataURL(n)}(i,t||C),!1;if(i.name||(i.name=(new Date).getTime()+"."+(i.type||"image/jpeg").replace(/image\//g,"")),i.size>A.opts.imageMaxSize)return $(R),!1;if(A.opts.imageAllowedTypes.indexOf(i.type.replace(/image\//g,""))<0)return $(U),!1;if(A.drag_support.formdata&&(a=A.drag_support.formdata?new FormData:null),a){var n;if(!1!==A.opts.imageUploadToS3)for(n in a.append("key",A.opts.imageUploadToS3.keyStart+(new Date).getTime()+"-"+(i.name||"untitled")),a.append("success_action_status","201"),a.append("X-Requested-With","xhr"),a.append("Content-Type",i.type),A.opts.imageUploadToS3.params)A.opts.imageUploadToS3.params.hasOwnProperty(n)&&a.append(n,A.opts.imageUploadToS3.params[n]);for(n in A.opts.imageUploadParams)A.opts.imageUploadParams.hasOwnProperty(n)&&a.append(n,A.opts.imageUploadParams[n]);a.append(A.opts.imageUploadParam,i,i.name);var r,o,s=A.opts.imageUploadURL,l=A.opts.imageUploadMethod;A.opts.imageUploadToS3&&(s=A.opts.imageUploadToS3.uploadURL?A.opts.imageUploadToS3.uploadURL:"https://".concat(A.opts.imageUploadToS3.region,".amazonaws.com/").concat(A.opts.imageUploadToS3.bucket)),A.opts.imageUploadToAzure&&(r=s=A.opts.imageUploadToAzure.uploadURL?"".concat(A.opts.imageUploadToAzure.uploadURL,"/").concat(i.name):encodeURI("https://".concat(A.opts.imageUploadToAzure.account,".blob.core.windows.net/").concat(A.opts.imageUploadToAzure.container,"/").concat(i.name)),A.opts.imageUploadToAzure.SASToken&&(s+=A.opts.imageUploadToAzure.SASToken),l="PUT");var p=A.core.getXHR(s,l);if(A.opts.imageUploadToAzure){var f=(new Date).toUTCString();if(!A.opts.imageUploadToAzure.SASToken&&A.opts.imageUploadToAzure.accessKey){var g=A.opts.imageUploadToAzure.account,c=A.opts.imageUploadToAzure.container;if(A.opts.imageUploadToAzure.uploadURL){var d=A.opts.imageUploadToAzure.uploadURL.split("/");c=d.pop(),g=d.pop().split(".")[0]}var m="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(f,"\nx-ms-version:2019-07-07"),u=encodeURI("/"+g+"/"+c+"/"+i.name),h=l+"\n\n\n"+i.size+"\n\n"+i.type+"\n\n\n\n\n\n\n"+m+"\n"+u,v=A.cryptoJSPlugin.cryptoJS.HmacSHA256(h,A.cryptoJSPlugin.cryptoJS.enc.Base64.parse(A.opts.imageUploadToAzure.accessKey)).toString(A.cryptoJSPlugin.cryptoJS.enc.Base64),b="SharedKey "+g+":"+v;o=v,p.setRequestHeader("Authorization",b)}for(n in p.setRequestHeader("x-ms-version","2019-07-07"),p.setRequestHeader("x-ms-date",f),p.setRequestHeader("Content-Type",i.type),p.setRequestHeader("x-ms-blob-type","BlockBlob"),A.opts.imageUploadParams)A.opts.imageUploadParams.hasOwnProperty(n)&&p.setRequestHeader(n,A.opts.imageUploadParams[n]);for(n in A.opts.imageUploadToAzure.params)A.opts.imageUploadToAzure.params.hasOwnProperty(n)&&p.setRequestHeader(n,A.opts.imageUploadToAzure.params[n])}!function w(t,a,i,n,r,o){function s(){var e=S(this);e.off("load"),e.addClass("fr-uploading"),e.next().is("br")&&e.next().remove(),A.placeholder.refresh(),O(e),x(),I(),A.edit.off(),t.onload=function(){_.call(t,e,r,o)},t.onerror=M,t.upload.onprogress=K,t.onabort=H,S(e.off("abortUpload")).on("abortUpload",function(){4!=t.readyState&&(t.abort(),n?(n.attr("src",n.data("fr-old-src")),n.removeClass("fr-uploading")):e.remove(),fe(!0))}),t.send(A.opts.imageUploadToAzure?i:a)}var l=new FileReader;l.onload=function(){var e=l.result;if(l.result.indexOf("svg+xml")<0){for(var t=atob(l.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:"image/jpeg"}))}n?(n.on("load",s),n.on("error",function(){s(),S(this).off("error")}),A.edit.on(),A.undo.saveStep(),n.data("fr-old-src",n.attr("src")),n.attr("src",e)):Y(e,null,s)},l.readAsDataURL(i)}(p,a,i,t||C,r,o)}}}function G(e){if(e.is("img")&&0<e.parents(".fr-img-caption").length)return e.parents(".fr-img-caption")}function V(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var a=t.files[0];if(a&&a.type&&-1!==a.type.indexOf("image")&&0<=A.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))){if(!A.opts.imageUpload)return e.preventDefault(),e.stopPropagation(),!1;A.markers.remove(),A.markers.insertAtPoint(e.originalEvent),A.$el.find(".fr-marker").replaceWith(Le.MARKERS),0===A.$el.find(".fr-marker").length&&A.selection.setAtEnd(A.el),A.popups.hideAll();var i=A.popups.get("image.insert");i||(i=X()),A.popups.setContainer("image.insert",A.$sc);var n=e.originalEvent.pageX,r=e.originalEvent.pageY;if(A.opts.iframe){var o=A.helpers.getPX(A.$wp.find(".fr-iframe").css("padding-top")),s=A.helpers.getPX(A.$wp.find(".fr-iframe").css("padding-left"));r+=A.$iframe.offset().top+o,n+=A.$iframe.offset().left+s}return A.popups.show("image.insert",n,r),I(),0<=A.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))?(fe(!0),W(t.files)):$(U),e.preventDefault(),e.stopPropagation(),!1}}}function X(e){if(e)return A.popups.onRefresh("image.insert",g),A.popups.onHide("image.insert",u),!0;var t,a,i="";A.opts.imageUpload||-1===A.opts.imageInsertButtons.indexOf("imageUpload")||A.opts.imageInsertButtons.splice(A.opts.imageInsertButtons.indexOf("imageUpload"),1);var n=A.button.buildList(A.opts.imageInsertButtons);""!==n&&(i='<div class="fr-buttons fr-tabs">'.concat(n,"</div>"));var r=A.opts.imageInsertButtons.indexOf("imageUpload"),o=A.opts.imageInsertButtons.indexOf("imageByURL"),s="";0<=r&&(t=" fr-active",0<=o&&o<r&&(t=""),s='<div class="fr-image-upload-layer'.concat(t,' fr-layer" id="fr-image-upload-layer-').concat(A.id,'"><strong>').concat(A.language.translate("Drop image"),"</strong><br>(").concat(A.language.translate("or click"),')<div class="fr-form"><input type="file" accept="image/').concat(A.opts.imageAllowedTypes.join(", image/").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-image-upload-layer-').concat(A.id,'" role="button"></div></div>'));var l="";0<=o&&(t=" fr-active",0<=r&&r<o&&(t=""),l='<div class="fr-image-by-url-layer'.concat(t,' fr-layer" id="fr-image-by-url-layer-').concat(A.id,'"><div class="fr-input-line"><input id="fr-image-by-url-layer-text-').concat(A.id,'" type="text" placeholder="http://" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageInsertByURL" tabIndex="2" role="button">').concat(A.language.translate("Insert"),"</button></div></div>"));var p={buttons:i,upload_layer:s,by_url_layer:l,progress_bar:'<div class="fr-image-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="imageDismissError" tabIndex="2" role="button">OK</button></div></div>'};return 1<=A.opts.imageInsertButtons.length&&(a=A.popups.create("image.insert",p)),A.$wp&&A.events.$on(A.$wp,"scroll",function(){C&&A.popups.isVisible("image.insert")&&ve()}),function f(i){A.events.$on(i,"dragover dragenter",".fr-image-upload-layer",function(e){return S(this).addClass("fr-drop"),(A.browser.msie||A.browser.edge)&&e.preventDefault(),!1},!0),A.events.$on(i,"dragleave dragend",".fr-image-upload-layer",function(e){return S(this).removeClass("fr-drop"),(A.browser.msie||A.browser.edge)&&e.preventDefault(),!1},!0),A.events.$on(i,"drop",".fr-image-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),S(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var a=i.data("instance")||A;a.events.disableBlur(),a.image.upload(t.files),a.events.enableBlur()}},!0),A.helpers.isIOS()&&A.events.$on(i,"touchstart",'.fr-image-upload-layer input[type="file"]',function(){S(this).trigger("click")},!0),A.events.$on(i,"change",'.fr-image-upload-layer input[type="file"]',function(){if(this.files){var e=i.data("instance")||A;e.events.disableBlur(),i.find("input:focus").blur(),e.events.enableBlur(),e.image.upload(this.files,C)}S(this).val("")},!0)}(a),a}function F(){C&&A.popups.get("image.alt").find("input").val(C.attr("alt")||"").trigger("change")}function q(){var e=A.popups.get("image.alt");e||(e=j()),z(),A.popups.refresh("image.alt"),A.popups.setContainer("image.alt",A.$sc);var t=we();Ae()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();A.popups.show("image.alt",a,i,t.outerHeight(),!0)}function j(e){if(e)return A.popups.onRefresh("image.alt",F),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(A.button.buildList(A.opts.imageAltButtons),"</div>"),alt_layer:'<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-'.concat(A.id,'"><div class="fr-input-line"><input id="fr-image-alt-layer-text-').concat(A.id,'" type="text" placeholder="').concat(A.language.translate("Alternative Text"),'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetAlt" tabIndex="2" role="button">').concat(A.language.translate("Update"),"</button></div></div>")},a=A.popups.create("image.alt",t);return A.$wp&&A.events.$on(A.$wp,"scroll.image-alt",function(){C&&A.popups.isVisible("image.alt")&&q()}),a}function J(){var e=A.popups.get("image.size"),t=C.get(0).style.height?C.get(0).style.height:"auto",a=C.get(0).style.width?C.get(0).style.width:"auto";if(C)if(Ae()){var i=C.parent();i.get(0).style.width||(i=C.parent().parent()),e.find('input[name="width"]').val(a).trigger("change"),e.find('input[name="height"]').val(t).trigger("change")}else e.find('input[name="width"]').val(a).trigger("change"),e.find('input[name="height"]').val(t).trigger("change")}function Q(){var e=A.popups.get("image.size");e||(e=Z()),z(),A.popups.refresh("image.size"),A.popups.setContainer("image.size",A.$sc);var t=we();Ae()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();A.popups.show("image.size",a,i,t.outerHeight(),!0)}function Z(e){if(e)return A.popups.onRefresh("image.size",J),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(A.button.buildList(A.opts.imageSizeButtons),"</div>"),size_layer:'<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-'.concat(A.id,'"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-size-layer-width-\'').concat(A.id,'" type="text" name="width" placeholder="').concat(A.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-image-size-layer-height').concat(A.id,'" type="text" name="height" placeholder="').concat(A.language.translate("Height"),'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetSize" tabIndex="2" role="button">').concat(A.language.translate("Update"),"</button></div></div>")},a=A.popups.create("image.size",t);return A.$wp&&A.events.$on(A.$wp,"scroll.image-size",function(){C&&A.popups.isVisible("image.size")&&Q()}),a}function ee(e,t,a,i){return e.pageX=t,w.call(this,e),e.pageX=e.pageX+a*Math.floor(Math.pow(1.1,i)),D.call(this,e),T.call(this,e),++i}function te(e){(e=e||we())&&!1!==A.events.trigger("image.beforeRemove",[e])&&(A.popups.hideAll(),be(),fe(!0),A.undo.canDo()||A.undo.saveStep(),e.get(0)==A.el?e.removeAttr("src"):(e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?(A.selection.setBefore(e.get(0).parentNode)||A.selection.setAfter(e.get(0).parentNode)||e.parent().after(Le.MARKERS),S(e.get(0).parentNode).remove()):(A.selection.setBefore(e.get(0))||A.selection.setAfter(e.get(0))||e.after(Le.MARKERS),e.remove()),A.html.fillEmptyBlocks(),A.selection.restore()),A.undo.saveStep())}function ae(e){var t=e.which;if(C&&(t==Le.KEYCODE.BACKSPACE||t==Le.KEYCODE.DELETE))return e.preventDefault(),e.stopPropagation(),te(),!1;if(C&&t==Le.KEYCODE.ESC){var a=C;return fe(!0),A.selection.setAfter(a.get(0)),A.selection.restore(),e.preventDefault(),!1}if(!C||t!=Le.KEYCODE.ARROW_LEFT&&t!=Le.KEYCODE.ARROW_RIGHT)return C&&t===Le.KEYCODE.TAB?(e.preventDefault(),e.stopPropagation(),fe(!0),!1):C&&t!=Le.KEYCODE.F10&&!A.keys.isBrowserAction(e)?(e.preventDefault(),e.stopPropagation(),!1):void 0;var i=C.get(0);return fe(!0),t==Le.KEYCODE.ARROW_LEFT?A.selection.setBefore(i):A.selection.setAfter(i),A.selection.restore(),e.preventDefault(),!1}function ie(e){if(e&&"IMG"==e.tagName){if(A.node.hasClass(e,"fr-uploading")||A.node.hasClass(e,"fr-error")?e.parentNode.removeChild(e):A.node.hasClass(e,"fr-draggable")&&e.classList.remove("fr-draggable"),e.parentNode&&e.parentNode.parentNode&&A.node.hasClass(e.parentNode.parentNode,"fr-img-caption")){var t=e.parentNode.parentNode;t.removeAttribute("contenteditable"),t.removeAttribute("draggable"),t.classList.remove("fr-draggable");var a=e.nextSibling;a&&a.removeAttribute("contenteditable")}}else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var i=e.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"),n=0;n<i.length;n++)ie(i[n])}function ne(e){if(!1===A.events.trigger("image.beforePasteUpload",[e]))return!1;C=S(e),x(),r(),ve(),I(),C.on("load",function(){var t=[];x(),S(A.popups.get("image.insert").get(0)).find("div.fr-active.fr-error").length<1&&I(),S(this).data("events").find(function(e){"load"===e[0]&&t.push(e)}),t.length<=1&&S(this).off("load")});for(var t=S(e).attr("src").split(","),a=atob(t[1]),i=[],n=0;n<a.length;n++)i.push(a.charCodeAt(n));W([new Blob([new Uint8Array(i)],{type:t[0].replace(/data\:/g,"").replace(/;base64/g,"")})],C)}function re(){A.opts.imagePaste?A.$el.find("img[data-fr-image-pasted]").each(function(e,i){if(A.opts.imagePasteProcess){var t=A.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=A.opts.imageResizeWithPercent?"%":"px"),S(i).css("width",t).removeClass("fr-dii fr-dib fr-fir fr-fil"),me(S(i),A.opts.imageDefaultDisplay,A.opts.imageDefaultAlign)}if(0===i.src.indexOf("data:"))ne(i);else if(0===i.src.indexOf("blob:")||0===i.src.indexOf("http")&&A.opts.imageUploadRemoteUrls&&A.opts.imageCORSProxy){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var e,t=A.o_doc.createElement("CANVAS"),a=t.getContext("2d");t.height=this.naturalHeight,t.width=this.naturalWidth,a.drawImage(this,0,0),setTimeout(function(){ne(i)},0),e=2e3<this.naturalWidth||1500<this.naturalHeight?"jpeg":"png",i.src=t.toDataURL("image/".concat(e))},a.src=(0===i.src.indexOf("blob:")?"":"".concat(A.opts.imageCORSProxy,"/"))+i.src}else 0!==i.src.indexOf("http")||0===i.src.indexOf("https://mail.google.com/mail")?(A.selection.save(),S(i).remove(),A.selection.restore()):S(i).removeAttr("data-fr-image-pasted")}):A.$el.find("img[data-fr-image-pasted]").remove()}function oe(e){var t=e.target.result,a=A.opts.imageDefaultWidth;a&&"auto"!=a&&(a+=A.opts.imageResizeWithPercent?"%":"px"),A.undo.saveStep(),A.html.insert('<img data-fr-image-pasted="true" src="'.concat(t,'"').concat(a?' style="width: '.concat(a,';"'):"",">"));var i=A.$el.find('img[data-fr-image-pasted="true"]');i&&me(i,A.opts.imageDefaultDisplay,A.opts.imageDefaultAlign),A.events.trigger("paste.after")}function se(e){if(e&&e.clipboardData&&e.clipboardData.items){var t=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))t=e.clipboardData.items[0].getAsFile();else for(var a=0;a<e.clipboardData.items.length&&!(t=e.clipboardData.items[a].getAsFile());a++);if(t)return function i(e){var t=new FileReader;t.onload=oe,t.readAsDataURL(e)}(t),!1}}function le(e){return e=e.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function pe(e){if("false"==S(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(e&&"touchend"==e.type&&a)return!0;if(e&&A.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;for(var t=0;t<Le.INSTANCES.length;t++)Le.INSTANCES[t]!=A&&Le.INSTANCES[t].events.trigger("image.hideResizer");A.toolbar.disable(),e&&(e.stopPropagation(),e.preventDefault()),A.helpers.isMobile()&&(A.events.disableBlur(),A.$el.blur(),A.events.enableBlur()),A.opts.iframe&&A.size.syncIframe(),C=S(this),be(),x(),r(),A.browser.msie?(A.popups.areVisible()&&A.events.disableBlur(),A.win.getSelection&&(A.win.getSelection().removeAllRanges(),A.win.getSelection().addRange(A.doc.createRange()))):A.selection.clear(),A.helpers.isIOS()&&(A.events.disableBlur(),A.$el.blur()),A.button.bulkRefresh(),A.events.trigger("video.hideResizer")}function fe(e){C&&(function t(){return ge}()||!0===e)&&(A.toolbar.enable(),l.removeClass("fr-active"),A.popups.hideAll(),C=null,de(),p=null,f&&f.hide())}n[i]="Image cannot be loaded from the passed link.",n[c]="No link in upload response.",n[d]="Error during file upload.",n[m]="Parsing response failed.",n[R]="File is too large.",n[U]="Image file type is invalid.",n[7]="Files can be uploaded only to same domain in IE 8 and IE 9.";var ge=!(n[8]="Image file is corrupted.");function ce(){ge=!0}function de(){ge=!1}function me(e,t,a){!A.opts.htmlUntouched&&A.opts.useClasses?(e.removeClass("fr-fil fr-fir fr-dib fr-dii"),a&&e.addClass("fr-fi".concat(a[0])),t&&e.addClass("fr-di".concat(t[0]))):"inline"==t?(e.css({display:"inline-block",verticalAlign:"bottom",margin:A.opts.imageDefaultMargin}),"center"==a?e.css({"float":"none",marginBottom:"",marginTop:"",maxWidth:"calc(100% - ".concat(2*A.opts.imageDefaultMargin,"px)"),textAlign:"center"}):"left"==a?e.css({"float":"left",marginLeft:0,maxWidth:"calc(100% - ".concat(A.opts.imageDefaultMargin,"px)"),textAlign:"left"}):e.css({"float":"right",marginRight:0,maxWidth:"calc(100% - ".concat(A.opts.imageDefaultMargin,"px)"),textAlign:"right"})):"block"==t&&(e.css({display:"block","float":"none",verticalAlign:"top",margin:"".concat(A.opts.imageDefaultMargin,"px auto"),textAlign:"center"}),"left"==a?e.css({marginLeft:0,textAlign:"left"}):"right"==a&&e.css({marginRight:0,textAlign:"right"}))}function ue(e){if(void 0===e&&(e=we()),e){if(e.hasClass("fr-fil"))return"left";if(e.hasClass("fr-fir"))return"right";if(e.hasClass("fr-dib")||e.hasClass("fr-dii"))return"center";var t=e.css("float");if(e.css("float","none"),"block"==e.css("display")){if(e.css("float",""),e.css("float")!=t&&e.css("float",t),0===parseInt(e.css("margin-left"),10))return"left";if(0===parseInt(e.css("margin-right"),10))return"right"}else{if(e.css("float",""),e.css("float")!=t&&e.css("float",t),"left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function he(e){void 0===e&&(e=we());var t=e.css("float");return e.css("float","none"),"block"==e.css("display")?(e.css("float",""),e.css("float")!=t&&e.css("float",t),"block"):(e.css("float",""),e.css("float")!=t&&e.css("float",t),"inline")}function ve(){var e=A.popups.get("image.insert");e||(e=X()),A.popups.isVisible("image.insert")||(z(),A.popups.refresh("image.insert"),A.popups.setContainer("image.insert",A.$sc));var t=we();Ae()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();A.popups.show("image.insert",a,i,t.outerHeight(!0),!0)}function be(){if(C){A.events.disableBlur(),A.selection.clear();var e=A.doc.createRange();e.selectNode(C.get(0)),A.browser.msie&&e.collapse(!0),A.selection.get().addRange(e),A.events.enableBlur()}}function ye(){return C}function we(){return Ae()?C.parents(".fr-img-caption").first():C}function Ae(){return!!C&&0<C.parents(".fr-img-caption").length}function Ce(e){for(var t=document.createDocumentFragment();e.firstChild;){var a=e.removeChild(e.firstChild);t.appendChild(a)}e.parentNode.replaceChild(t,e)}return{_init:function Se(){var i;(function e(){A.events.$on(A.$el,A._mousedown,"IMG"==A.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==S(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;A.helpers.isMobile()||A.selection.clear(),t=!0,A.popups.areVisible()&&A.events.disableBlur(),A.browser.msie&&(A.events.disableBlur(),A.$el.attr("contenteditable",!1)),A.draggable||"touchstart"==e.type||e.preventDefault(),e.stopPropagation()}),A.events.$on(A.$el,A._mousedown,".fr-img-caption .fr-inner",function(e){A.core.hasFocus()||A.events.focus(),e.stopPropagation()}),A.events.$on(A.$el,"paste",".fr-img-caption .fr-inner",function(e){A.toolbar.hide(),e.stopPropagation()}),A.events.$on(A.$el,A._mouseup,"IMG"==A.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==S(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t&&(t=!1,e.stopPropagation(),A.browser.msie&&(A.$el.attr("contenteditable",!0),A.events.enableBlur()))}),A.events.on("keyup",function(e){if(e.shiftKey&&""===A.selection.text().replace(/\n/g,"")&&A.keys.isArrow(e.which)){var t=A.selection.element(),a=A.selection.endElement();t&&"IMG"==t.tagName?O(S(t)):a&&"IMG"==a.tagName&&O(S(a))}},!0),A.events.on("drop",V),A.events.on("element.beforeDrop",G),A.events.on("mousedown window.mousedown",ce),A.events.on("window.touchmove",de),A.events.on("mouseup window.mouseup",function(){if(C)return fe(),!1;de()}),A.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&fe()}),A.events.on("image.resizeEnd",function(){A.opts.iframe&&A.size.syncIframe()}),A.events.on("blur image.hideResizer commands.undo commands.redo element.dropped",function(){fe(!(t=!1))}),A.events.on("modals.hide",function(){C&&(be(),A.selection.clear())}),A.events.on("image.resizeEnd",function(){A.win.getSelection&&O(C)}),A.opts.imageAddNewLine&&A.events.on("image.inserted",function(e){var t=e.get(0);for(t.nextSibling&&"BR"===t.nextSibling.tagName&&(t=t.nextSibling);t&&!A.node.isElement(t);)t=A.node.isLastSibling(t)?t.parentNode:null;A.node.isElement(t)&&(A.opts.enter===Le.ENTER_BR?e.after("<br>"):S(A.node.blockParent(e.get(0))).after("<".concat(A.html.defaultTag(),"><br></").concat(A.html.defaultTag(),">")))})})(),"IMG"==A.el.tagName&&A.$el.addClass("fr-view"),A.events.$on(A.$el,A.helpers.isMobile()&&!A.helpers.isWindowsPhone()?"touchend":"click","IMG"==A.el.tagName?null:'img:not([contenteditable="false"])',pe),A.helpers.isMobile()&&(A.events.$on(A.$el,"touchstart","IMG"==A.el.tagName?null:'img:not([contenteditable="false"])',function(){a=!1}),A.events.$on(A.$el,"touchmove",function(){a=!0})),A.$wp?(A.events.on("window.keydown keydown",ae,!0),A.events.on("keyup",function(e){if(C&&e.which==Le.KEYCODE.ENTER)return!1},!0),A.events.$on(A.$el,"keydown",function(){var e=A.selection.element();(e.nodeType===Node.TEXT_NODE||"BR"==e.tagName&&A.node.isLastSibling(e))&&(e=e.parentNode),A.node.hasClass(e,"fr-inner")||(A.node.hasClass(e,"fr-img-caption")||(e=S(e).parents(".fr-img-caption").get(0)),A.node.hasClass(e,"fr-img-caption")&&(S(e).after(Le.INVISIBLE_SPACE+Le.MARKERS),A.selection.restore()))})):A.events.$on(A.$win,"keydown",ae),A.events.on("toolbar.esc",function(){if(C){if(A.$wp)A.events.disableBlur(),A.events.focus();else{var e=C;fe(!0),A.selection.setAfter(e.get(0)),A.selection.restore()}return!1}},!0),A.events.on("toolbar.focusEditor",function(){if(C)return!1},!0),A.events.on("window.cut window.copy",function(e){if(C&&A.popups.isVisible("image.edit")&&!A.popups.get("image.edit").find(":focus").length){var t=we();Ae()?(t.before(Le.START_MARKER),t.after(Le.END_MARKER),A.selection.restore(),A.paste.saveCopiedText(t.get(0).outerHTML,t.text())):(be(),A.paste.saveCopiedText(C.get(0).outerHTML,C.attr("alt"))),"copy"==e.type?setTimeout(function(){O(C)}):(fe(!0),A.undo.saveStep(),setTimeout(function(){A.undo.saveStep()},0))}},!0),A.browser.msie&&A.events.on("keydown",function(e){if(!A.selection.isCollapsed()||!C)return!0;var t=e.which;t==Le.KEYCODE.C&&A.keys.ctrlKey(e)?A.events.trigger("window.copy"):t==Le.KEYCODE.X&&A.keys.ctrlKey(e)&&A.events.trigger("window.cut")}),A.events.$on(S(A.o_win),"keydown",function(e){var t=e.which;if(C&&t==Le.KEYCODE.BACKSPACE)return e.preventDefault(),!1}),A.events.$on(A.$win,"keydown",function(e){var t=e.which;C&&C.hasClass("fr-uploading")&&t==Le.KEYCODE.ESC&&C.trigger("abortUpload")}),A.events.on("destroy",function(){C&&C.hasClass("fr-uploading")&&C.trigger("abortUpload")}),A.events.on("paste.before",se),A.events.on("paste.beforeCleanup",le),A.events.on("paste.after",re),A.events.on("html.set",h),A.events.on("html.inserted",h),h(),A.events.on("destroy",function(){s=[]}),A.events.on("html.processGet",ie),A.opts.imageOutputSize&&A.events.on("html.beforeGet",function(){i=A.el.querySelectorAll("img");for(var e=0;e<i.length;e++){var t=i[e].style.width||S(i[e]).width(),a=i[e].style.height||S(i[e]).height();t&&i[e].setAttribute("width","".concat(t).replace(/px/,"")),a&&i[e].setAttribute("height","".concat(a).replace(/px/,""))}}),A.opts.iframe&&A.events.on("image.loaded",A.size.syncIframe),A.$wp&&(v(),A.events.on("contentChanged",v)),A.events.$on(S(A.o_win),"orientationchange.image",function(){setTimeout(function(){C&&O(C)},100)}),P(!0),X(!0),Z(!0),j(!0),A.events.on("node.remove",function(e){if("IMG"==e.get(0).tagName)return te(e),!1})},showInsertPopup:function Ee(){var e=A.$tb.find('.fr-command[data-cmd="insertImage"]'),t=A.popups.get("image.insert");if(t||(t=X()),z(),!t.hasClass("fr-active"))if(A.popups.refresh("image.insert"),A.popups.setContainer("image.insert",A.$tb),e.isVisible()){var a=A.button.getPosition(e),i=a.left,n=a.top;A.popups.show("image.insert",i,n,e.outerHeight())}else A.position.forSelection(t),A.popups.show("image.insert")},showLayer:function Re(e){var t,a,i=A.popups.get("image.insert");if(C||A.opts.toolbarInline){if(C){var n=we();Ae()&&(n=n.find(".fr-img-wrap")),a=n.offset().top+n.outerHeight(),t=n.offset().left}}else{var r=A.$tb.find('.fr-command[data-cmd="insertImage"]');t=r.offset().left,a=r.offset().top+(A.opts.toolbarBottom?10:r.outerHeight()-10)}!C&&A.opts.toolbarInline&&(a=i.offset().top-A.helpers.getPX(i.css("margin-top")),i.hasClass("fr-above")&&(a+=i.outerHeight())),i.find(".fr-layer").removeClass("fr-active"),i.find(".fr-".concat(e,"-layer")).addClass("fr-active"),A.popups.show("image.insert",t,a,C?C.outerHeight():0),A.accessibility.focusPopup(i)},refreshUploadButton:function Ue(e){var t=A.popups.get("image.insert");t&&t.find(".fr-image-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshByURLButton:function xe(e){var t=A.popups.get("image.insert");t&&t.find(".fr-image-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:W,insertByURL:function De(){var e=A.popups.get("image.insert").find(".fr-image-by-url-layer input");if(0<e.val().length){I(),k(A.language.translate("Loading image"));var t=e.val().trim();if(A.opts.imageUploadRemoteUrls&&A.opts.imageCORSProxy&&A.opts.imageUpload){var a=new XMLHttpRequest;a.onload=function(){200==this.status?W([new Blob([this.response],{type:this.response.type||"image/png"})],C):$(i)},a.onerror=function(){L(t,!0,[],C)},a.open("GET","".concat(A.opts.imageCORSProxy,"/").concat(t),!0),a.responseType="blob",a.send()}else L(t,!0,[],C);e.val(""),e.blur()}},align:function Te(e){var t=we();t.removeClass("fr-fir fr-fil"),!A.opts.htmlUntouched&&A.opts.useClasses?"left"==e?t.addClass("fr-fil"):"right"==e&&t.addClass("fr-fir"):me(t,he(),e),be(),x(),r(),A.selection.clear()},refreshAlign:function $e(e){C&&e.find("> *").first().replaceWith(A.icon.create("image-align-".concat(ue())))},refreshAlignOnShow:function Pe(e,t){C&&t.find('.fr-command[data-param1="'.concat(ue(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function Ie(e){var t=we();t.removeClass("fr-dii fr-dib"),!A.opts.htmlUntouched&&A.opts.useClasses?"inline"==e?t.addClass("fr-dii"):"block"==e&&t.addClass("fr-dib"):me(t,e,ue()),be(),x(),r(),A.selection.clear()},refreshDisplayOnShow:function ze(e,t){C&&t.find('.fr-command[data-param1="'.concat(he(),'"]')).addClass("fr-active").attr("aria-selected",!0)},replace:ve,back:function e(){C?(A.events.disableBlur(),S(".fr-popup input:focus").blur(),O(C)):(A.events.disableBlur(),A.selection.restore(),A.events.enableBlur(),A.popups.hide("image.insert"),A.toolbar.showInline())},get:ye,getEl:we,insert:L,showProgressBar:I,remove:te,hideProgressBar:z,applyStyle:function ke(e,t,a){if(void 0===t&&(t=A.opts.imageStyles),void 0===a&&(a=A.opts.imageMultipleStyles),!C)return!1;var i=we();if(!a){var n=Object.keys(t);n.splice(n.indexOf(e),1),i.removeClass(n.join(" "))}"object"==_e(t[e])?(i.removeAttr("style"),i.css(t[e].style)):i.toggleClass(e),O(C)},showAltPopup:q,showSizePopup:Q,setAlt:function Be(e){if(C){var t=A.popups.get("image.alt");C.attr("alt",e||t.find("input").val()||""),t.find("input:focus").blur(),O(C)}},setSize:function Oe(e,t){if(C){var a=A.popups.get("image.size");e=e||a.find('input[name="width"]').val()||"",t=t||a.find('input[name="height"]').val()||"";var i=/^[\d]+((px)|%)*$/g;C.removeAttr("width").removeAttr("height"),e.match(i)?C.css("width",e):C.css("width",""),t.match(i)?C.css("height",t):C.css("height",""),Ae()&&(C.parents(".fr-img-caption").removeAttr("width").removeAttr("height"),e.match(i)?C.parents(".fr-img-caption").css("width",e):C.parents(".fr-img-caption").css("width",""),t.match(i)?C.parents(".fr-img-caption").css("height",t):C.parents(".fr-img-caption").css("height","")),a&&a.find("input:focus").blur(),O(C)}},toggleCaption:function Ne(){var e;if(C&&!Ae()){(e=C).parent().is("a")&&(e=C.parent());var t,a,i=C.parents("ul")&&0<C.parents("ul").length?C.parents("ul"):C.parents("ol")&&0<C.parents("ol").length?C.parents("ol"):[];if(0<i.length){var n=i.find("li").length,r=C.parents("li"),o=document.createElement("li");n-1===r.index()&&(i.append(o),o.innerHTML="&nbsp;")}e.attr("style")?a=-1<(t=e.attr("style").split(":")).indexOf("width")?t[t.indexOf("width")+1].replace(";",""):"":e.attr("width")&&(a=e.attr("width"));var s=A.opts.imageResizeWithPercent?(-1<a.indexOf("px")?null:a)||"100%":C.width()+"px";e.wrap('<div class="fr-img-space-wrap"><span '+(A.browser.mozilla?"":'contenteditable="false"')+'class="fr-img-caption '+C.attr("class")+'" style="'+(A.opts.useClasses?"":e.attr("style"))+'" draggable="false"></span><p class="fr-img-space-wrap2">&nbsp;</p></div>'),e.wrap('<span class="fr-img-wrap"></span>'),C.after('<span class="fr-inner"'.concat(A.browser.mozilla?"":' contenteditable="true"',">").concat(Le.START_MARKER).concat(A.language.translate("Image Caption")).concat(Le.END_MARKER,"</span>")),C.parents(".fr-img-caption").css("width",s),1<C.parents(".fr-img-space-wrap").length&&(Ce(document.querySelector(".fr-img-space-wrap")),Ce(document.querySelector(".fr-img-space-wrap2"))),fe(!0),A.selection.restore()}else{if(e=we(),C.insertBefore(e),null!==e[0].querySelector("a")){for(var l,p=e[0].querySelector("a"),f=document.createElement("a"),g=0,c=p.attributes,d=c.length;g<d;g++)l=c[g],f.setAttribute(l.nodeName,l.nodeValue);C.wrap(f)}C.attr("class",e.attr("class").replace("fr-img-caption","")).attr("style",e.attr("style")),e.remove(),1<C.parents(".fr-img-space-wrap").length&&(Ce(document.querySelector(".fr-img-space-wrap")),Ce(document.querySelector(".fr-img-space-wrap2"))),O(C)}},hasCaption:Ae,exitEdit:fe,edit:O}},Le.DefineIcon("insertImage",{NAME:"image",SVG_KEY:"insertImage"}),Le.RegisterShortcut(Le.KEYCODE.P,"insertImage",null,"P"),Le.RegisterCommand("insertImage",{title:"Insert Image",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("image.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("image.insert")):this.image.showInsertPopup()},plugin:"image"}),Le.DefineIcon("imageUpload",{NAME:"upload",SVG_KEY:"upload"}),Le.RegisterCommand("imageUpload",{title:"Upload Image",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-upload")},refresh:function(e){this.image.refreshUploadButton(e)}}),Le.DefineIcon("imageByURL",{NAME:"link",SVG_KEY:"insertLink"}),Le.RegisterCommand("imageByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-by-url")},refresh:function(e){this.image.refreshByURLButton(e)}}),Le.RegisterCommand("imageInsertByURL",{title:"Insert Image",undo:!0,refreshAfterCallback:!1,callback:function(){this.image.insertByURL()},refresh:function(e){this.image.get()?e.text(this.language.translate("Replace")):e.text(this.language.translate("Insert"))}}),Le.DefineIcon("imageDisplay",{NAME:"star",SVG_KEY:"imageDisplay"}),Le.RegisterCommand("imageDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(e,t){this.image.display(t)},refresh:function(e){this.opts.imageTextNear||e.addClass("fr-hidden")},refreshOnShow:function(e,t){this.image.refreshDisplayOnShow(e,t)}}),Le.DefineIcon("image-align",{NAME:"align-left",SVG_KEY:"alignLeft"}),Le.DefineIcon("image-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),Le.DefineIcon("image-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),Le.DefineIcon("image-align-center",{NAME:"align-justify",SVG_KEY:"alignCenter"}),Le.DefineIcon("imageAlign",{NAME:"align-justify",SVG_KEY:"alignJustify"}),Le.RegisterCommand("imageAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=Le.COMMANDS.imageAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="imageAlign" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.icon.create("image-align-".concat(a)),'<span class="fr-sr-only">').concat(this.language.translate(t[a]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.image.align(t)},refresh:function(e){this.image.refreshAlign(e)},refreshOnShow:function(e,t){this.image.refreshAlignOnShow(e,t)}}),Le.DefineIcon("imageReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),Le.RegisterCommand("imageReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.image.replace()}}),Le.DefineIcon("imageRemove",{NAME:"trash",SVG_KEY:"remove"}),Le.RegisterCommand("imageRemove",{title:"Remove",callback:function(){this.image.remove()}}),Le.DefineIcon("imageBack",{NAME:"arrow-left",SVG_KEY:"back"}),Le.RegisterCommand("imageBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.image.back()},refresh:function(e){this.$;this.image.get()||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),Le.RegisterCommand("imageDismissError",{title:"OK",undo:!1,callback:function(){this.image.hideProgressBar(!0)}}),Le.DefineIcon("imageStyle",{NAME:"magic",SVG_KEY:"imageClass"}),Le.RegisterCommand("imageStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.imageStyles;for(var a in t)if(t.hasOwnProperty(a)){var i=t[a];"object"==_e(i)&&(i=i.title),e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="imageStyle" data-param1="'.concat(a,'">').concat(this.language.translate(i),"</a></li>")}return e+="</ul>"},callback:function(e,t){this.image.applyStyle(t)},refreshOnShow:function(e,t){var a=this.$,i=this.image.getEl();i&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=i.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),Le.DefineIcon("imageAlt",{NAME:"info",SVG_KEY:"imageAltText"}),Le.RegisterCommand("imageAlt",{undo:!1,focus:!1,popup:!0,title:"Alternative Text",callback:function(){this.image.showAltPopup()}}),Le.RegisterCommand("imageSetAlt",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setAlt()}}),Le.DefineIcon("imageSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),Le.RegisterCommand("imageSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.image.showSizePopup()}}),Le.RegisterCommand("imageSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setSize()}}),Le.DefineIcon("imageCaption",{NAME:"commenting",FA5NAME:"comment-alt",SVG_KEY:"imageCaption"}),Le.RegisterCommand("imageCaption",{undo:!0,focus:!1,title:"Image Caption",refreshAfterCallback:!0,callback:function(){this.image.toggleCaption()},refresh:function(e){this.image.get()&&e.toggleClass("fr-active",this.image.hasCaption())}})});
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";function Me(e){return(Me="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})(e)}_e=_e&&_e.hasOwnProperty("default")?_e["default"]:_e,Object.assign(_e.POPUP_TEMPLATES,{"image.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_BY_URL_LAYER_][_PROGRESS_BAR_]","image.edit":"[_BUTTONS_]","image.alt":"[_BUTTONS_][_ALT_LAYER_]","image.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(_e.DEFAULTS,{imageInsertButtons:["imageBack","|","imageUpload","imageByURL"],imageEditButtons:["imageReplace","imageAlign","imageCaption","imageRemove","imageLink","linkOpen","linkEdit","linkRemove","-","imageDisplay","imageStyle","imageAlt","imageSize"],imageAltButtons:["imageBack","|"],imageSizeButtons:["imageBack","|"],imageUpload:!0,imageUploadURL:null,imageCORSProxy:"https://cors-anywhere.froala.com",imageUploadRemoteUrls:!0,imageUploadParam:"file",imageUploadParams:{},imageUploadToS3:!1,imageUploadToAzure:!1,imageUploadMethod:"POST",imageMaxSize:10485760,imageAllowedTypes:["jpeg","jpg","png","gif","webp"],imageResize:!0,imageResizeWithPercent:!1,imageRoundPercent:!1,imageDefaultWidth:300,imageDefaultAlign:"center",imageDefaultDisplay:"block",imageSplitHTML:!1,imageStyles:{"fr-rounded":"Rounded","fr-bordered":"Bordered","fr-shadow":"Shadow"},imageMove:!0,imageMultipleStyles:!0,imageTextNear:!0,imagePaste:!0,imagePasteProcess:!1,imageMinWidth:16,imageOutputSize:!1,imageDefaultMargin:5,imageAddNewLine:!1}),_e.PLUGINS.image=function(C){var S,l,p,f,s,a,E=C.$,R="https://i.froala.com/upload",t=!1,i=1,c=2,d=3,m=4,D=5,U=6,r={};function g(){var e=C.popups.get("image.insert").find(".fr-image-by-url-layer input");e.val(""),S&&e.val(S.attr("src")),e.trigger("change")}function n(){var e=C.popups.get("image.edit");if(e||(e=P()),e){var t=Ae();Ce()&&(t=t.find(".fr-img-wrap")),C.popups.setContainer("image.edit",C.$sc),C.popups.refresh("image.edit");var a=t.offset().left+t.outerWidth()/2,i=(function r(e){for(var t=0;e;){if("BODY"==e.tagName){var a=e.scrollTop||document.documentElement.scrollTop;t+=e.offsetTop-a+e.clientTop}else t+=e.offsetTop-e.scrollTop+e.clientTop;e=e.offsetParent}return{y:t}}(S[0]).y+t.outerHeight())/5;t.offset().top<0||!C.opts.height||C.helpers.isMobile()||C.opts.iframe?i=t.offset().top+t.outerHeight():Ce()&&C.opts.height&&(i=t.offset().top+t.outerHeight()/4),S.hasClass("fr-uploading")?I():C.popups.show("image.edit",a,i,t.outerHeight(),!0)}}function u(){z()}function o(e){0<e.parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first());var t=e.hasClass("fr-dib")?"block":e.hasClass("fr-dii")?"inline":null,a=e.hasClass("fr-fil")?"left":e.hasClass("fr-fir")?"right":he(e);ue(e,t,a),e.removeClass("fr-dib fr-dii fr-fir fr-fil")}function h(){for(var e,t="IMG"==C.el.tagName?[C.el]:C.el.querySelectorAll("img"),a=0;a<t.length;a++){var i=E(t[a]);!C.opts.htmlUntouched&&C.opts.useClasses?((C.opts.imageDefaultAlign||C.opts.imageDefaultDisplay)&&(0<(e=i).parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first()),e.hasClass("fr-dii")||e.hasClass("fr-dib")||(e.addClass("fr-fi".concat(he(e)[0])),e.addClass("fr-di".concat(ve(e)[0])),e.css("margin",""),e.css("float",""),e.css("display",""),e.css("z-index",""),e.css("position",""),e.css("overflow",""),e.css("vertical-align",""))),C.opts.imageTextNear||(0<i.parents(".fr-img-caption").length?i.parents(".fr-img-caption").first().removeClass("fr-dii").addClass("fr-dib"):i.removeClass("fr-dii").addClass("fr-dib"))):C.opts.htmlUntouched||C.opts.useClasses||(C.opts.imageDefaultAlign||C.opts.imageDefaultDisplay)&&o(i),C.opts.iframe&&i.on("load",C.size.syncIframe)}}function v(e){void 0===e&&(e=!0);var t,a=Array.prototype.slice.call(C.el.querySelectorAll("img")),i=[];for(t=0;t<a.length;t++)if(i.push(a[t].getAttribute("src")),E(a[t]).toggleClass("fr-draggable",C.opts.imageMove),""===a[t].getAttribute("class")&&a[t].removeAttribute("class"),""===a[t].getAttribute("style")&&a[t].removeAttribute("style"),a[t].parentNode&&a[t].parentNode.parentNode&&C.node.hasClass(a[t].parentNode.parentNode,"fr-img-caption")){var r=a[t].parentNode.parentNode;C.browser.mozilla||r.setAttribute("contenteditable",!1),r.setAttribute("draggable",!1),r.classList.add("fr-draggable");var n=a[t].nextSibling;n&&!C.browser.mozilla&&n.setAttribute("contenteditable",!0)}if(s)for(t=0;t<s.length;t++)i.indexOf(s[t].getAttribute("src"))<0&&C.events.trigger("image.removed",[E(s[t])]);if(s&&e){var o=[];for(t=0;t<s.length;t++)o.push(s[t].getAttribute("src"));for(t=0;t<a.length;t++)o.indexOf(a[t].getAttribute("src"))<0&&C.events.trigger("image.loaded",[E(a[t])])}s=a}function x(){if(l||function o(){var e;C.shared.$image_resizer?(l=C.shared.$image_resizer,f=C.shared.$img_overlay,C.events.on("destroy",function(){E("body").first().append(l.removeClass("fr-active"))},!0)):(C.shared.$image_resizer=E(document.createElement("div")).attr("class","fr-image-resizer"),l=C.shared.$image_resizer,C.events.$on(l,"mousedown",function(e){e.stopPropagation()},!0),C.opts.imageResize&&(l.append(b("nw")+b("ne")+b("sw")+b("se")),C.shared.$img_overlay=E(document.createElement("div")).attr("class","fr-image-overlay"),f=C.shared.$img_overlay,e=l.get(0).ownerDocument,E(e).find("body").first().append(f)));C.events.on("shared.destroy",function(){l.html("").removeData().remove(),l=null,C.opts.imageResize&&(f.remove(),f=null)},!0),C.helpers.isMobile()||C.events.$on(E(C.o_win),"resize",function(){S&&!S.hasClass("fr-uploading")?ge(!0):S&&(x(),be(),I(!1))});if(C.opts.imageResize){e=l.get(0).ownerDocument,C.events.$on(l,C._mousedown,".fr-handler",w),C.events.$on(E(e),C._mousemove,A),C.events.$on(E(e.defaultView||e.parentWindow),C._mouseup,T),C.events.$on(f,"mouseleave",T);var i=1,r=null,n=0;C.events.on("keydown",function(e){if(S){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,a=e.which;(a!==r||200<e.timeStamp-n)&&(i=1),(a==_e.KEYCODE.EQUALS||C.browser.mozilla&&a==_e.KEYCODE.FF_EQUALS)&&t&&!e.altKey?i=ee.call(this,e,1,1,i):(a==_e.KEYCODE.HYPHEN||C.browser.mozilla&&a==_e.KEYCODE.FF_HYPHEN)&&t&&!e.altKey?i=ee.call(this,e,2,-1,i):C.keys.ctrlKey(e)||a!=_e.KEYCODE.ENTER||(S.before("<br>"),k(S)),r=a,n=e.timeStamp}},!0),C.events.on("keyup",function(){i=1})}}(),!S)return!1;var e=C.$wp||C.$sc;e.append(l),l.data("instance",C);var t=e.scrollTop()-("static"!=e.css("position")?e.offset().top:0),a=e.scrollLeft()-("static"!=e.css("position")?e.offset().left:0);a-=C.helpers.getPX(e.css("border-left-width")),t-=C.helpers.getPX(e.css("border-top-width")),C.$el.is("img")&&C.$sc.is("body")&&(a=t=0);var i=Ae();Ce()&&(i=i.find(".fr-img-wrap"));var r=0,n=0;C.opts.iframe&&(r=C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-top")),n=C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-left"))),l.css("top",(C.opts.iframe?i.offset().top+r:i.offset().top+t)-1).css("left",(C.opts.iframe?i.offset().left+n:i.offset().left+a)-1).css("width",i.get(0).getBoundingClientRect().width).css("height",i.get(0).getBoundingClientRect().height).addClass("fr-active")}function b(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function y(e){Ce()?S.parents(".fr-img-caption").css("width",e):S.css("width",e)}function w(e){if(!C.core.sameInstance(l))return!0;if(e.preventDefault(),e.stopPropagation(),C.$el.find("img.fr-error").left)return!1;C.undo.canDo()||C.undo.saveStep();var t=e.pageX||e.originalEvent.touches[0].pageX;if("mousedown"==e.type){var a=C.$oel.get(0).ownerDocument,i=a.defaultView||a.parentWindow,r=!1;try{r=i.location!=i.parent.location&&!(i.$&&i.$.FE)}catch(s){}r&&i.frameElement&&(t+=C.helpers.getPX(E(i.frameElement).offset().left)+i.frameElement.clientLeft)}(p=E(this)).data("start-x",t),p.data("start-width",S.width()),p.data("start-height",S.height());var n=S.width();if(C.opts.imageResizeWithPercent){var o=S.parentsUntil(C.$el,C.html.blockTagsQuery()).get(0)||C.el;n=(n/E(o).outerWidth()*100).toFixed(2)+"%"}y(n),f.show(),C.popups.hideAll(),me()}function A(e){if(!C.core.sameInstance(l))return!0;var t;if(p&&S){if(e.preventDefault(),C.$el.find("img.fr-error").left)return!1;var a=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null);if(!a)return!1;var i=a-p.data("start-x"),r=p.data("start-width");if((p.hasClass("fr-hnw")||p.hasClass("fr-hsw"))&&(i=0-i),C.opts.imageResizeWithPercent){var n=S.parentsUntil(C.$el,C.html.blockTagsQuery()).get(0)||C.el;r=((r+i)/E(n).outerWidth()*100).toFixed(2),C.opts.imageRoundPercent&&(r=Math.round(r)),y("".concat(r,"%")),(t=Ce()?(C.helpers.getPX(S.parents(".fr-img-caption").css("width"))/E(n).outerWidth()*100).toFixed(2):(C.helpers.getPX(S.css("width"))/E(n).outerWidth()*100).toFixed(2))===r||C.opts.imageRoundPercent||y("".concat(t,"%")),S.css("height","").removeAttr("height")}else r+i>=C.opts.imageMinWidth&&(y(r+i),t=Ce()?C.helpers.getPX(S.parents(".fr-img-caption").css("width")):C.helpers.getPX(S.css("width"))),t!==r+i&&y(t),((S.attr("style")||"").match(/(^height:)|(; *height:)/)||S.attr("height"))&&(S.css("height",p.data("start-height")*S.width()/p.data("start-width")),S.removeAttr("height"));x(),C.events.trigger("image.resize",[we()])}}function T(e){if(!C.core.sameInstance(l))return!0;if(p&&S){if(e&&e.stopPropagation(),C.$el.find("img.fr-error").left)return!1;p=null,f.hide(),x(),n(),C.undo.saveStep(),C.events.trigger("image.resizeEnd",[we()])}else l.removeClass("fr-active")}function $(e,t,a){C.edit.on(),S&&S.addClass("fr-error"),r[e]?B(C.language.translate(r[e])):B(C.language.translate("Something went wrong. Please try again.")),!S&&a&&te(a),C.events.trigger("image.error",[{code:e,message:r[e]},t,a])}function P(e){if(e)return C.$wp&&C.events.$on(C.$wp,"scroll.image-edit",function(){S&&C.popups.isVisible("image.edit")&&(C.events.disableBlur(),n())}),!0;var t="";if(0<C.opts.imageEditButtons.length){var a={buttons:t+='<div class="fr-buttons"> \n '.concat(C.button.buildList(C.opts.imageEditButtons),"\n </div>")};return C.popups.create("image.edit",a)}return!1}function I(e){var t=C.popups.get("image.insert");if(t||(t=V()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),S){var a=Ae();C.popups.setContainer("image.insert",C.$sc);var i=a.offset().left,r=a.offset().top+a.height();C.popups.show("image.insert",i,r,a.outerHeight())}void 0===e&&O(C.language.translate("Uploading"),0)}function z(e){var t=C.popups.get("image.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||C.$el.find("img.fr-error").length)){if(C.events.focus(),C.$el.find("img.fr-error").length&&(C.$el.find("img.fr-error").remove(),C.undo.saveStep(),C.undo.run(),C.undo.dropRedo()),!C.$wp&&S){var a=S;ge(!0),C.selection.setAfter(a.get(0)),C.selection.restore()}C.popups.hide("image.insert")}}function O(e,t){var a=C.popups.get("image.insert");if(a){var i=a.find(".fr-image-progress-bar-layer");i.find("h3").text(e+(t?" ".concat(t,"%"):"")),i.removeClass("fr-error"),t?(i.find("div").removeClass("fr-indeterminate"),i.find("div > span").css("width","".concat(t,"%"))):i.find("div").addClass("fr-indeterminate")}}function B(e){I();var t=C.popups.get("image.insert").find(".fr-image-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),C.events.disableBlur(),a.focus()}function k(e){fe.call(e.get(0))}function N(){var e=E(this);C.popups.hide("image.insert"),e.removeClass("fr-uploading"),e.next().is("br")&&e.next().remove(),k(e),C.events.trigger("image.loaded",[e])}function L(o,e,s,l,p){l&&"string"==typeof l&&(l=C.$(l)),C.edit.off(),O(C.language.translate("Loading image")),e&&(o=C.helpers.sanitizeURL(o));var t=new Image;t.onload=function(){var e,t;if(l){C.undo.canDo()||l.hasClass("fr-uploading")||C.undo.saveStep();var a=l.data("fr-old-src");l.data("fr-image-pasted")&&(a=null),C.$wp?((e=l.clone().removeData("fr-old-src").removeClass("fr-uploading").removeAttr("data-fr-image-pasted")).off("load"),a&&l.attr("src",a),l.replaceWith(e)):e=l;for(var i=e.get(0).attributes,r=0;r<i.length;r++){var n=i[r];0===n.nodeName.indexOf("data-")?e.removeAttr(n.nodeName):s&&s.hasOwnProperty(n.nodeName)&&e.removeAttr(n.nodeName)}if(void 0!==s)for(t in s)s.hasOwnProperty(t)&&"link"!=t&&e.attr("".concat(t),s[t]);e.on("load",N),e.attr("src",o),C.edit.on(),v(!1),C.undo.saveStep(),C.events.disableBlur(),C.$el.blur(),C.events.trigger(a?"image.replaced":"image.inserted",[e,p])}else e=Y(o,s,N),v(!1),C.undo.saveStep(),C.events.disableBlur(),C.$el.blur(),C.events.trigger("image.inserted",[e,p])},t.onerror=function(){$(i)},I(C.language.translate("Loading image")),t.src=o}function _(e,t,a){O(C.language.translate("Loading image"));var i=this.status,r=this.response,n=this.responseXML,o=this.responseText;try{if(C.opts.imageUploadToS3||C.opts.imageUploadToAzure)if(201==i){var s;if(C.opts.imageUploadToAzure){if(!1===C.events.trigger("image.uploadedToAzure",[this.responseURL,a,r],!0))return C.edit.on(),!1;s=t}else s=function p(e){try{var t=E(e).find("Location").text(),a=E(e).find("Key").text();return!1===C.events.trigger("image.uploadedToS3",[t,a,e],!0)?(C.edit.on(),!1):t}catch(i){return $(m,e),!1}}(n);s&&L(s,!1,[],e,r||n)}else $(m,r||n,e);else if(200<=i&&i<300){var l=function f(e){try{if(!1===C.events.trigger("image.uploaded",[e],!0))return C.edit.on(),!1;var t=JSON.parse(e);return t.link?t:($(c,e),!1)}catch(a){return $(m,e),!1}}(o);l&&L(l.link,!1,l,e,r||o)}else $(d,r||o,e)}catch(g){$(m,r||o,e)}}function M(){$(m,this.response||this.responseText||this.responseXML)}function K(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;O(C.language.translate("Uploading"),t)}}function Y(e,t,a){var i,r=E(document.createElement("img")).attr("src",e);if(t&&void 0!==t)for(i in t)t.hasOwnProperty(i)&&"link"!=i&&(" data-".concat(i,'="').concat(t[i],'"'),r.attr("".concat(i),t[i]));var n=C.opts.imageDefaultWidth;n&&"auto"!=n&&(n=C.opts.imageResizeWithPercent?"100%":"".concat(n,"px")),r.attr("style",n?"width: ".concat(n,";"):""),ue(r,C.opts.imageDefaultDisplay,C.opts.imageDefaultAlign),r.on("load",a),r.on("error",a),C.edit.on(),C.events.focus(!0),C.selection.restore(),C.undo.saveStep(),C.opts.imageSplitHTML?C.markers.split():C.markers.insert(),C.html.wrap();var o=C.$el.find(".fr-marker");return o.length?(o.parent().is("hr")&&o.parent().after(o),C.node.isLastSibling(o)&&o.parent().hasClass("fr-deletable")&&o.insertAfter(o.parent()),o.replaceWith(r)):C.$el.append(r),C.selection.clear(),r}function H(){C.edit.on(),z(!0)}function W(e,t){if(void 0!==e&&0<e.length){if(e&&"image/svg+xml"==e[0].type){var a=new FileReader;a.onload=function(e){var t=e.target.result;C.image.insert(t,null,null,C.image.get())},a.readAsDataURL(e[0])}if(!1===C.events.trigger("image.beforeUpload",[e,t]))return!1;var i,r=e[0];if(!(null!==C.opts.imageUploadURL&&C.opts.imageUploadURL!=R||C.opts.imageUploadToS3||C.opts.imageUploadToAzure))return function w(r,n){var o=new FileReader;o.onload=function(){var e=o.result;if(o.result.indexOf("svg+xml")<0){for(var t=atob(o.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:r.type})),n&&n.data("fr-old-src",n.attr("src")),C.image.insert(e,!1,null,n)}},I(),o.readAsDataURL(r)}(r,t||S),!1;if(r.name||(r.name=(new Date).getTime()+"."+(r.type||"image/jpeg").replace(/image\//g,"")),r.size>C.opts.imageMaxSize)return $(D),!1;if(C.opts.imageAllowedTypes.indexOf(r.type.replace(/image\//g,""))<0)return $(U),!1;if(C.drag_support.formdata&&(i=C.drag_support.formdata?new FormData:null),i){var n;if(!1!==C.opts.imageUploadToS3)for(n in i.append("key",C.opts.imageUploadToS3.keyStart+(new Date).getTime()+"-"+(r.name||"untitled")),i.append("success_action_status","201"),i.append("X-Requested-With","xhr"),i.append("Content-Type",r.type),C.opts.imageUploadToS3.params)C.opts.imageUploadToS3.params.hasOwnProperty(n)&&i.append(n,C.opts.imageUploadToS3.params[n]);for(n in C.opts.imageUploadParams)C.opts.imageUploadParams.hasOwnProperty(n)&&i.append(n,C.opts.imageUploadParams[n]);i.append(C.opts.imageUploadParam,r,r.name);var o,s,l=C.opts.imageUploadURL,p=C.opts.imageUploadMethod;C.opts.imageUploadToS3&&(l=C.opts.imageUploadToS3.uploadURL?C.opts.imageUploadToS3.uploadURL:"https://".concat(C.opts.imageUploadToS3.region,".amazonaws.com/").concat(C.opts.imageUploadToS3.bucket)),C.opts.imageUploadToAzure&&(o=l=C.opts.imageUploadToAzure.uploadURL?"".concat(C.opts.imageUploadToAzure.uploadURL,"/").concat(r.name):encodeURI("https://".concat(C.opts.imageUploadToAzure.account,".blob.core.windows.net/").concat(C.opts.imageUploadToAzure.container,"/").concat(r.name)),C.opts.imageUploadToAzure.SASToken&&(l+=C.opts.imageUploadToAzure.SASToken),p="PUT");var f=C.core.getXHR(l,p);if(C.opts.imageUploadToAzure){var g=(new Date).toUTCString();if(!C.opts.imageUploadToAzure.SASToken&&C.opts.imageUploadToAzure.accessKey){var c=C.opts.imageUploadToAzure.account,d=C.opts.imageUploadToAzure.container;if(C.opts.imageUploadToAzure.uploadURL){var m=C.opts.imageUploadToAzure.uploadURL.split("/");d=m.pop(),c=m.pop().split(".")[0]}var u="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(g,"\nx-ms-version:2019-07-07"),h=encodeURI("/"+c+"/"+d+"/"+r.name),v=p+"\n\n\n"+r.size+"\n\n"+r.type+"\n\n\n\n\n\n\n"+u+"\n"+h,b=C.cryptoJSPlugin.cryptoJS.HmacSHA256(v,C.cryptoJSPlugin.cryptoJS.enc.Base64.parse(C.opts.imageUploadToAzure.accessKey)).toString(C.cryptoJSPlugin.cryptoJS.enc.Base64),y="SharedKey "+c+":"+b;s=b,f.setRequestHeader("Authorization",y)}for(n in f.setRequestHeader("x-ms-version","2019-07-07"),f.setRequestHeader("x-ms-date",g),f.setRequestHeader("Content-Type",r.type),f.setRequestHeader("x-ms-blob-type","BlockBlob"),C.opts.imageUploadParams)C.opts.imageUploadParams.hasOwnProperty(n)&&f.setRequestHeader(n,C.opts.imageUploadParams[n]);for(n in C.opts.imageUploadToAzure.params)C.opts.imageUploadToAzure.params.hasOwnProperty(n)&&f.setRequestHeader(n,C.opts.imageUploadToAzure.params[n])}!function A(t,a,i,r,n,o){function s(){var e=E(this);e.off("load"),e.addClass("fr-uploading"),e.next().is("br")&&e.next().remove(),C.placeholder.refresh(),k(e),x(),I(),C.edit.off(),t.onload=function(){_.call(t,e,n,o)},t.onerror=M,t.upload.onprogress=K,t.onabort=H,E(e.off("abortUpload")).on("abortUpload",function(){4!=t.readyState&&(t.abort(),r?(r.attr("src",r.data("fr-old-src")),r.removeClass("fr-uploading")):e.remove(),ge(!0))}),t.send(C.opts.imageUploadToAzure?i:a)}var l=new FileReader;l.onload=function(){var e=l.result;if(l.result.indexOf("svg+xml")<0){for(var t=atob(l.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:"image/jpeg"}))}r?(r.on("load",s),r.on("error",function(){s(),E(this).off("error")}),C.edit.on(),C.undo.saveStep(),r.data("fr-old-src",r.attr("src")),r.attr("src",e)):Y(e,null,s)},l.readAsDataURL(i)}(f,i,r,t||S,o,s)}}}function G(e){if(e.is("img")&&0<e.parents(".fr-img-caption").length)return e.parents(".fr-img-caption")}function F(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var a=t.files[0];if(a&&a.type&&-1!==a.type.indexOf("image")&&0<=C.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))){if(!C.opts.imageUpload)return e.preventDefault(),e.stopPropagation(),!1;C.markers.remove(),C.markers.insertAtPoint(e.originalEvent),C.$el.find(".fr-marker").replaceWith(_e.MARKERS),0===C.$el.find(".fr-marker").length&&C.selection.setAtEnd(C.el),C.popups.hideAll();var i=C.popups.get("image.insert");i||(i=V()),C.popups.setContainer("image.insert",C.$sc);var r=e.originalEvent.pageX,n=e.originalEvent.pageY;if(C.opts.iframe){var o=C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-top")),s=C.helpers.getPX(C.$wp.find(".fr-iframe").css("padding-left"));n+=C.$iframe.offset().top+o,r+=C.$iframe.offset().left+s}return C.popups.show("image.insert",r,n),I(),0<=C.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))?(ge(!0),W(t.files)):$(U),e.preventDefault(),e.stopPropagation(),!1}}}function V(e){if(e)return C.popups.onRefresh("image.insert",g),C.popups.onHide("image.insert",u),!0;var t,a,i="";C.opts.imageUpload||-1===C.opts.imageInsertButtons.indexOf("imageUpload")||C.opts.imageInsertButtons.splice(C.opts.imageInsertButtons.indexOf("imageUpload"),1);var r=C.button.buildList(C.opts.imageInsertButtons);""!==r&&(i='<div class="fr-buttons fr-tabs">'.concat(r,"</div>"));var n=C.opts.imageInsertButtons.indexOf("imageUpload"),o=C.opts.imageInsertButtons.indexOf("imageByURL"),s="";0<=n&&(t=" fr-active",0<=o&&o<n&&(t=""),s='<div class="fr-image-upload-layer'.concat(t,' fr-layer" id="fr-image-upload-layer-').concat(C.id,'"><strong>').concat(C.language.translate("Drop image"),"</strong><br>(").concat(C.language.translate("or click"),')<div class="fr-form"><input type="file" accept="image/').concat(C.opts.imageAllowedTypes.join(", image/").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-image-upload-layer-').concat(C.id,'" role="button"></div></div>'));var l="";0<=o&&(t=" fr-active",0<=n&&n<o&&(t=""),l='<div class="fr-image-by-url-layer'.concat(t,' fr-layer" id="fr-image-by-url-layer-').concat(C.id,'"><div class="fr-input-line"><input id="fr-image-by-url-layer-text-').concat(C.id,'" type="text" placeholder="http://" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageInsertByURL" tabIndex="2" role="button">').concat(C.language.translate("Insert"),"</button></div></div>"));var p={buttons:i,upload_layer:s,by_url_layer:l,progress_bar:'<div class="fr-image-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="imageDismissError" tabIndex="2" role="button">OK</button></div></div>'};return 1<=C.opts.imageInsertButtons.length&&(a=C.popups.create("image.insert",p)),C.$wp&&C.events.$on(C.$wp,"scroll",function(){S&&C.popups.isVisible("image.insert")&&be()}),function f(i){C.events.$on(i,"dragover dragenter",".fr-image-upload-layer",function(e){return E(this).addClass("fr-drop"),(C.browser.msie||C.browser.edge)&&e.preventDefault(),!1},!0),C.events.$on(i,"dragleave dragend",".fr-image-upload-layer",function(e){return E(this).removeClass("fr-drop"),(C.browser.msie||C.browser.edge)&&e.preventDefault(),!1},!0),C.events.$on(i,"drop",".fr-image-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),E(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var a=i.data("instance")||C;a.events.disableBlur(),a.image.upload(t.files),a.events.enableBlur()}},!0),C.helpers.isIOS()&&C.events.$on(i,"touchstart",'.fr-image-upload-layer input[type="file"]',function(){E(this).trigger("click")},!0),C.events.$on(i,"change",'.fr-image-upload-layer input[type="file"]',function(){if(this.files){var e=i.data("instance")||C;e.events.disableBlur(),i.find("input:focus").blur(),e.events.enableBlur(),e.image.upload(this.files,S)}E(this).val("")},!0)}(a),a}function X(){S&&C.popups.get("image.alt").find("input").val(S.attr("alt")||"").trigger("change")}function q(){var e=C.popups.get("image.alt");e||(e=j()),z(),C.popups.refresh("image.alt"),C.popups.setContainer("image.alt",C.$sc);var t=Ae();Ce()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();C.popups.show("image.alt",a,i,t.outerHeight(),!0)}function j(e){if(e)return C.popups.onRefresh("image.alt",X),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(C.button.buildList(C.opts.imageAltButtons),"</div>"),alt_layer:'<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-'.concat(C.id,'"><div class="fr-input-line"><input id="fr-image-alt-layer-text-').concat(C.id,'" type="text" placeholder="').concat(C.language.translate("Alternative Text"),'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetAlt" tabIndex="2" role="button">').concat(C.language.translate("Update"),"</button></div></div>")},a=C.popups.create("image.alt",t);return C.$wp&&C.events.$on(C.$wp,"scroll.image-alt",function(){S&&C.popups.isVisible("image.alt")&&q()}),a}function J(){var e=C.popups.get("image.size"),t=S.get(0).style.height?S.get(0).style.height:"auto",a=S.get(0).style.width?S.get(0).style.width:"auto";if(S)if(Ce()){var i=S.parent();i.get(0).style.width||(i=S.parent().parent()),e.find('input[name="width"]').val(a).trigger("change"),e.find('input[name="height"]').val(t).trigger("change")}else e.find('input[name="width"]').val(a).trigger("change"),e.find('input[name="height"]').val(t).trigger("change")}function Q(){var e=C.popups.get("image.size");e||(e=Z()),z(),C.popups.refresh("image.size"),C.popups.setContainer("image.size",C.$sc);var t=Ae();Ce()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();C.popups.show("image.size",a,i,t.outerHeight(),!0)}function Z(e){if(e)return C.popups.onRefresh("image.size",J),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(C.button.buildList(C.opts.imageSizeButtons),"</div>"),size_layer:'<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-'.concat(C.id,'"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-size-layer-width-\'').concat(C.id,'" type="text" name="width" placeholder="').concat(C.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-image-size-layer-height').concat(C.id,'" type="text" name="height" placeholder="').concat(C.language.translate("Height"),'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetSize" tabIndex="2" role="button">').concat(C.language.translate("Update"),"</button></div></div>")},a=C.popups.create("image.size",t);return C.$wp&&C.events.$on(C.$wp,"scroll.image-size",function(){S&&C.popups.isVisible("image.size")&&Q()}),a}function ee(e,t,a,i){return e.pageX=t,w.call(this,e),e.pageX=e.pageX+a*Math.floor(Math.pow(1.1,i)),A.call(this,e),T.call(this,e),++i}function te(e){(e=e||Ae())&&!1!==C.events.trigger("image.beforeRemove",[e])&&(C.popups.hideAll(),ye(),ge(!0),C.undo.canDo()||C.undo.saveStep(),e.get(0)==C.el?e.removeAttr("src"):(e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?(C.selection.setBefore(e.get(0).parentNode)||C.selection.setAfter(e.get(0).parentNode)||e.parent().after(_e.MARKERS),E(e.get(0).parentNode).remove()):(C.selection.setBefore(e.get(0))||C.selection.setAfter(e.get(0))||e.after(_e.MARKERS),e.remove()),C.html.fillEmptyBlocks(),C.selection.restore()),C.undo.saveStep())}function ae(e){var t=e.which;if(S&&(t==_e.KEYCODE.BACKSPACE||t==_e.KEYCODE.DELETE))return e.preventDefault(),e.stopPropagation(),te(),!1;if(S&&t==_e.KEYCODE.ESC){var a=S;return ge(!0),C.selection.setAfter(a.get(0)),C.selection.restore(),e.preventDefault(),!1}if(!S||t!=_e.KEYCODE.ARROW_LEFT&&t!=_e.KEYCODE.ARROW_RIGHT)return S&&t===_e.KEYCODE.TAB?(e.preventDefault(),e.stopPropagation(),ge(!0),!1):S&&t!=_e.KEYCODE.F10&&!C.keys.isBrowserAction(e)?(e.preventDefault(),e.stopPropagation(),!1):void 0;var i=S.get(0);return ge(!0),t==_e.KEYCODE.ARROW_LEFT?C.selection.setBefore(i):C.selection.setAfter(i),C.selection.restore(),e.preventDefault(),!1}function ie(e){if(e&&"IMG"==e.tagName){if(C.node.hasClass(e,"fr-uploading")||C.node.hasClass(e,"fr-error")?e.parentNode.removeChild(e):C.node.hasClass(e,"fr-draggable")&&e.classList.remove("fr-draggable"),e.parentNode&&e.parentNode.parentNode&&C.node.hasClass(e.parentNode.parentNode,"fr-img-caption")){var t=e.parentNode.parentNode;t.removeAttribute("contenteditable"),t.removeAttribute("draggable"),t.classList.remove("fr-draggable");var a=e.nextSibling;a&&a.removeAttribute("contenteditable")}}else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var i=e.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"),r=0;r<i.length;r++)ie(i[r])}function re(e){if(!1===C.events.trigger("image.beforePasteUpload",[e]))return!1;S=E(e),x(),n(),be(),I(),S.on("load",function(){var t=[];x(),E(C.popups.get("image.insert").get(0)).find("div.fr-active.fr-error").length<1&&I(),E(this).data("events").filter(function(e){"load"===e[0]&&t.push(e)}),t.length<=1&&E(this).off("load")});for(var t=E(e).attr("src").split(","),a=atob(t[1]),i=[],r=0;r<a.length;r++)i.push(a.charCodeAt(r));W([new Blob([new Uint8Array(i)],{type:t[0].replace(/data\:/g,"").replace(/;base64/g,"")})],S)}function ne(){C.opts.imagePaste?C.$el.find("img[data-fr-image-pasted]").each(function(e,i){if(C.opts.imagePasteProcess){var t=C.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=C.opts.imageResizeWithPercent?"%":"px"),E(i).css("width",t).removeClass("fr-dii fr-dib fr-fir fr-fil"),ue(E(i),C.opts.imageDefaultDisplay,C.opts.imageDefaultAlign)}if(0===i.src.indexOf("data:"))re(i);else if(0===i.src.indexOf("blob:")||0===i.src.indexOf("http")&&C.opts.imageUploadRemoteUrls&&C.opts.imageCORSProxy){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var e,t=C.o_doc.createElement("CANVAS"),a=t.getContext("2d");t.height=this.naturalHeight,t.width=this.naturalWidth,a.drawImage(this,0,0),setTimeout(function(){re(i)},0),e=2e3<this.naturalWidth||1500<this.naturalHeight?"jpeg":"png",i.src=t.toDataURL("image/".concat(e))},a.src=(0===i.src.indexOf("blob:")?"":"".concat(C.opts.imageCORSProxy,"/"))+i.src}else 0!==i.src.indexOf("http")||0===i.src.indexOf("https://mail.google.com/mail")?(C.selection.save(),E(i).remove(),C.selection.restore()):E(i).removeAttr("data-fr-image-pasted")}):C.$el.find("img[data-fr-image-pasted]").remove()}function oe(e){var t=e.target.result,a=C.opts.imageDefaultWidth;a&&"auto"!=a&&(a+=C.opts.imageResizeWithPercent?"%":"px"),C.undo.saveStep(),C.html.insert('<img data-fr-image-pasted="true" src="'.concat(t,'"').concat(a?' style="width: '.concat(a,';"'):"",">"));var i=C.$el.find('img[data-fr-image-pasted="true"]');i&&ue(i,C.opts.imageDefaultDisplay,C.opts.imageDefaultAlign),C.events.trigger("paste.after")}function se(e,t){var a=new FileReader;a.onload=function i(e){var t=C.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=C.opts.imageResizeWithPercent?"%":"px"),C.html.insert('<img data-fr-image-pasted="true" src="'.concat(e,'"').concat(t?' style="width: '.concat(t,';"'):"",">"));var a=C.$el.find('img[data-fr-image-pasted="true"]');a&&ue(a,C.opts.imageDefaultDisplay,C.opts.imageDefaultAlign),C.events.trigger("paste.after")}(t),a.readAsDataURL(e,t)}function le(e){if(e&&e.clipboardData&&e.clipboardData.items){var t=(e.clipboardData||window.clipboardData).getData("text/html")||"",a=(new DOMParser).parseFromString(t,"text/html").querySelector("img");if(a){if(!a)return!1;var i=a.src,r=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))r=e.clipboardData.items[0].getAsFile();else for(var n=0;n<e.clipboardData.items.length&&!(r=e.clipboardData.items[n].getAsFile());n++);if(r)return se(r,i),!1}else{var o=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))o=e.clipboardData.items[0].getAsFile();else for(var s=0;s<e.clipboardData.items.length&&!(o=e.clipboardData.items[s].getAsFile());s++);if(o)return function l(e){var t=new FileReader;t.onload=oe,t.readAsDataURL(e)}(o),!1}}}function pe(e){return e=e.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function fe(e){if("false"==E(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(e&&"touchend"==e.type&&a)return!0;if(e&&C.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;for(var t=0;t<_e.INSTANCES.length;t++)_e.INSTANCES[t]!=C&&_e.INSTANCES[t].events.trigger("image.hideResizer");C.toolbar.disable(),e&&(e.stopPropagation(),e.preventDefault()),C.helpers.isMobile()&&(C.events.disableBlur(),C.$el.blur(),C.events.enableBlur()),C.opts.iframe&&C.size.syncIframe(),S=E(this),ye(),x(),n(),C.browser.msie?(C.popups.areVisible()&&C.events.disableBlur(),C.win.getSelection&&(C.win.getSelection().removeAllRanges(),C.win.getSelection().addRange(C.doc.createRange()))):C.selection.clear(),C.helpers.isIOS()&&(C.events.disableBlur(),C.$el.blur()),C.button.bulkRefresh(),C.events.trigger("video.hideResizer")}function ge(e){S&&(function t(){return ce}()||!0===e)&&(C.toolbar.enable(),l.removeClass("fr-active"),C.popups.hideAll(),S=null,me(),p=null,f&&f.hide())}r[i]="Image cannot be loaded from the passed link.",r[c]="No link in upload response.",r[d]="Error during file upload.",r[m]="Parsing response failed.",r[D]="File is too large.",r[U]="Image file type is invalid.",r[7]="Files can be uploaded only to same domain in IE 8 and IE 9.";var ce=!(r[8]="Image file is corrupted.");function de(){ce=!0}function me(){ce=!1}function ue(e,t,a){!C.opts.htmlUntouched&&C.opts.useClasses?(e.removeClass("fr-fil fr-fir fr-dib fr-dii"),a&&e.addClass("fr-fi".concat(a[0])),t&&e.addClass("fr-di".concat(t[0]))):"inline"==t?(e.css({display:"inline-block",verticalAlign:"bottom",margin:C.opts.imageDefaultMargin}),"center"==a?e.css({"float":"none",marginBottom:"",marginTop:"",maxWidth:"calc(100% - ".concat(2*C.opts.imageDefaultMargin,"px)"),textAlign:"center"}):"left"==a?e.css({"float":"left",marginLeft:0,maxWidth:"calc(100% - ".concat(C.opts.imageDefaultMargin,"px)"),textAlign:"left"}):e.css({"float":"right",marginRight:0,maxWidth:"calc(100% - ".concat(C.opts.imageDefaultMargin,"px)"),textAlign:"right"})):"block"==t&&(e.css({display:"block","float":"none",verticalAlign:"top",margin:"".concat(C.opts.imageDefaultMargin,"px auto"),textAlign:"center"}),"left"==a?e.css({marginLeft:0,textAlign:"left"}):"right"==a&&e.css({marginRight:0,textAlign:"right"}))}function he(e){if(void 0===e&&(e=Ae()),e){if(e.hasClass("fr-fil"))return"left";if(e.hasClass("fr-fir"))return"right";if(e.hasClass("fr-dib")||e.hasClass("fr-dii"))return"center";var t=e.css("float");if(e.css("float","none"),"block"==e.css("display")){if(e.css("float",""),e.css("float")!=t&&e.css("float",t),0===parseInt(e.css("margin-left"),10))return"left";if(0===parseInt(e.css("margin-right"),10))return"right"}else{if(e.css("float",""),e.css("float")!=t&&e.css("float",t),"left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function ve(e){void 0===e&&(e=Ae());var t=e.css("float");return e.css("float","none"),"block"==e.css("display")?(e.css("float",""),e.css("float")!=t&&e.css("float",t),"block"):(e.css("float",""),e.css("float")!=t&&e.css("float",t),"inline")}function be(){var e=C.popups.get("image.insert");e||(e=V()),C.popups.isVisible("image.insert")||(z(),C.popups.refresh("image.insert"),C.popups.setContainer("image.insert",C.$sc));var t=Ae();Ce()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();C.popups.show("image.insert",a,i,t.outerHeight(!0),!0)}function ye(){if(S){C.events.disableBlur(),C.selection.clear();var e=C.doc.createRange();e.selectNode(S.get(0)),C.browser.msie&&e.collapse(!0),C.selection.get().addRange(e),C.events.enableBlur()}}function we(){return S}function Ae(){return Ce()?S.parents(".fr-img-caption").first():S}function Ce(){return!!S&&0<S.parents(".fr-img-caption").length}function Se(e){for(var t=document.createDocumentFragment();e.firstChild;){var a=e.removeChild(e.firstChild);t.appendChild(a)}e.parentNode.replaceChild(t,e)}return{_init:function Ee(){var i;(function e(){C.events.$on(C.$el,C._mousedown,"IMG"==C.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==E(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;C.helpers.isMobile()||C.selection.clear(),t=!0,C.popups.areVisible()&&C.events.disableBlur(),C.browser.msie&&(C.events.disableBlur(),C.$el.attr("contenteditable",!1)),C.draggable||"touchstart"==e.type||e.preventDefault(),e.stopPropagation()}),C.events.$on(C.$el,C._mousedown,".fr-img-caption .fr-inner",function(e){C.core.hasFocus()||C.events.focus(),e.stopPropagation()}),C.events.$on(C.$el,"paste",".fr-img-caption .fr-inner",function(e){!0===C.opts.toolbarInline&&(C.toolbar.hide(),e.stopPropagation())}),C.events.$on(C.$el,C._mouseup,"IMG"==C.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==E(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t&&(t=!1,e.stopPropagation(),C.browser.msie&&(C.$el.attr("contenteditable",!0),C.events.enableBlur()))}),C.events.on("keyup",function(e){if(e.shiftKey&&""===C.selection.text().replace(/\n/g,"")&&C.keys.isArrow(e.which)){var t=C.selection.element(),a=C.selection.endElement();t&&"IMG"==t.tagName?k(E(t)):a&&"IMG"==a.tagName&&k(E(a))}},!0),C.events.on("drop",F),C.events.on("element.beforeDrop",G),C.events.on("mousedown window.mousedown",de),C.events.on("window.touchmove",me),C.events.on("mouseup window.mouseup",function(){if(S&&!C.helpers.isMobile())return ge(),!1;me()}),C.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&ge()}),C.events.on("image.resizeEnd",function(){C.opts.iframe&&C.size.syncIframe()}),C.events.on("blur image.hideResizer commands.undo commands.redo element.dropped",function(){ge(!(t=!1))}),C.events.on("modals.hide",function(){S&&(ye(),C.selection.clear())}),C.events.on("image.resizeEnd",function(){C.win.getSelection&&k(S)}),C.opts.imageAddNewLine&&C.events.on("image.inserted",function(e){var t=e.get(0);for(t.nextSibling&&"BR"===t.nextSibling.tagName&&(t=t.nextSibling);t&&!C.node.isElement(t);)t=C.node.isLastSibling(t)?t.parentNode:null;C.node.isElement(t)&&(C.opts.enter===_e.ENTER_BR?e.after("<br>"):E(C.node.blockParent(e.get(0))).after("<".concat(C.html.defaultTag(),"><br></").concat(C.html.defaultTag(),">")))})})(),"IMG"==C.el.tagName&&C.$el.addClass("fr-view"),C.events.$on(C.$el,C.helpers.isMobile()&&!C.helpers.isWindowsPhone()?"touchend":"click","IMG"==C.el.tagName?null:'img:not([contenteditable="false"])',fe),C.helpers.isMobile()&&(C.events.$on(C.$el,"touchstart","IMG"==C.el.tagName?null:'img:not([contenteditable="false"])',function(){a=!1}),C.events.$on(C.$el,"touchmove",function(){a=!0})),C.$wp?(C.events.on("window.keydown keydown",ae,!0),C.events.on("keyup",function(e){if(S&&e.which==_e.KEYCODE.ENTER)return!1},!0),C.events.$on(C.$el,"keydown",function(){var e=C.selection.element();(e.nodeType===Node.TEXT_NODE||"BR"==e.tagName&&C.node.isLastSibling(e))&&(e=e.parentNode),C.node.hasClass(e,"fr-inner")||(C.node.hasClass(e,"fr-img-caption")||(e=E(e).parents(".fr-img-caption").get(0)),C.node.hasClass(e,"fr-img-caption")&&(E(e).after(_e.INVISIBLE_SPACE+_e.MARKERS),C.selection.restore()))})):C.events.$on(C.$win,"keydown",ae),C.events.on("toolbar.esc",function(){if(S){if(C.$wp)C.events.disableBlur(),C.events.focus();else{var e=S;ge(!0),C.selection.setAfter(e.get(0)),C.selection.restore()}return!1}},!0),C.events.on("toolbar.focusEditor",function(){if(S)return!1},!0),C.events.on("window.cut window.copy",function(e){if(S&&C.popups.isVisible("image.edit")&&!C.popups.get("image.edit").find(":focus").length){var t=Ae();Ce()?(t.before(_e.START_MARKER),t.after(_e.END_MARKER),C.selection.restore(),C.paste.saveCopiedText(t.get(0).outerHTML,t.text())):(ye(),C.paste.saveCopiedText(S.get(0).outerHTML,S.attr("alt"))),"copy"==e.type?setTimeout(function(){k(S)}):(ge(!0),C.undo.saveStep(),setTimeout(function(){C.undo.saveStep()},0))}},!0),C.browser.msie&&C.events.on("keydown",function(e){if(!C.selection.isCollapsed()||!S)return!0;var t=e.which;t==_e.KEYCODE.C&&C.keys.ctrlKey(e)?C.events.trigger("window.copy"):t==_e.KEYCODE.X&&C.keys.ctrlKey(e)&&C.events.trigger("window.cut")}),C.events.$on(E(C.o_win),"keydown",function(e){var t=e.which;if(S&&t==_e.KEYCODE.BACKSPACE)return e.preventDefault(),!1}),C.events.$on(C.$win,"keydown",function(e){var t=e.which;S&&S.hasClass("fr-uploading")&&t==_e.KEYCODE.ESC&&S.trigger("abortUpload")}),C.events.on("destroy",function(){S&&S.hasClass("fr-uploading")&&S.trigger("abortUpload")}),C.events.on("paste.before",le),C.events.on("paste.beforeCleanup",pe),C.events.on("paste.after",ne),C.events.on("html.set",h),C.events.on("html.inserted",h),h(),C.events.on("destroy",function(){s=[]}),C.events.on("html.processGet",ie),C.opts.imageOutputSize&&C.events.on("html.beforeGet",function(){i=C.el.querySelectorAll("img");for(var e=0;e<i.length;e++){var t=i[e].style.width||E(i[e]).width(),a=i[e].style.height||E(i[e]).height();t&&i[e].setAttribute("width","".concat(t).replace(/px/,"")),a&&i[e].setAttribute("height","".concat(a).replace(/px/,""))}}),C.opts.iframe&&C.events.on("image.loaded",C.size.syncIframe),C.$wp&&(v(),C.events.on("contentChanged",v)),C.events.$on(E(C.o_win),"orientationchange.image",function(){setTimeout(function(){S&&k(S)},100)}),P(!0),V(!0),Z(!0),j(!0),C.events.on("node.remove",function(e){if("IMG"==e.get(0).tagName)return te(e),!1})},showInsertPopup:function Re(){var e=C.$tb.find('.fr-command[data-cmd="insertImage"]'),t=C.popups.get("image.insert");if(t||(t=V()),z(),!t.hasClass("fr-active"))if(C.popups.refresh("image.insert"),C.popups.setContainer("image.insert",C.$tb),e.isVisible()){var a=C.button.getPosition(e),i=a.left,r=a.top;C.popups.show("image.insert",i,r,e.outerHeight())}else C.position.forSelection(t),C.popups.show("image.insert")},showLayer:function De(e){var t,a,i=C.popups.get("image.insert");if(S||C.opts.toolbarInline){if(S){var r=Ae();Ce()&&(r=r.find(".fr-img-wrap")),a=r.offset().top+r.outerHeight(),t=r.offset().left}}else{var n=C.$tb.find('.fr-command[data-cmd="insertImage"]');t=n.offset().left,a=n.offset().top+(C.opts.toolbarBottom?10:n.outerHeight()-10)}!S&&C.opts.toolbarInline&&(a=i.offset().top-C.helpers.getPX(i.css("margin-top")),i.hasClass("fr-above")&&(a+=i.outerHeight())),i.find(".fr-layer").removeClass("fr-active"),i.find(".fr-".concat(e,"-layer")).addClass("fr-active"),C.popups.show("image.insert",t,a,S?S.outerHeight():0),C.accessibility.focusPopup(i)},refreshUploadButton:function Ue(e){var t=C.popups.get("image.insert");t&&t.find(".fr-image-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshByURLButton:function xe(e){var t=C.popups.get("image.insert");t&&t.find(".fr-image-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:W,insertByURL:function Te(){var e=C.popups.get("image.insert").find(".fr-image-by-url-layer input");if(0<e.val().length){I(),O(C.language.translate("Loading image"));var t=e.val().trim();if(C.opts.imageUploadRemoteUrls&&C.opts.imageCORSProxy&&C.opts.imageUpload){var a=new XMLHttpRequest;a.onload=function(){200==this.status?W([new Blob([this.response],{type:this.response.type||"image/png"})],S):$(i)},a.onerror=function(){L(t,!0,[],S)},a.open("GET","".concat(C.opts.imageCORSProxy,"/").concat(t),!0),a.responseType="blob",a.send()}else L(t,!0,[],S);e.val(""),e.blur()}},align:function $e(e){var t=Ae();t.removeClass("fr-fir fr-fil"),!C.opts.htmlUntouched&&C.opts.useClasses?"left"==e?t.addClass("fr-fil"):"right"==e&&t.addClass("fr-fir"):ue(t,ve(),e),ye(),x(),n(),C.selection.clear()},refreshAlign:function Pe(e){S&&e.find("> *").first().replaceWith(C.icon.create("image-align-".concat(he())))},refreshAlignOnShow:function Ie(e,t){S&&t.find('.fr-command[data-param1="'.concat(he(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function ze(e){var t=Ae();t.removeClass("fr-dii fr-dib"),!C.opts.htmlUntouched&&C.opts.useClasses?"inline"==e?t.addClass("fr-dii"):"block"==e&&t.addClass("fr-dib"):ue(t,e,he()),ye(),x(),n(),C.selection.clear()},refreshDisplayOnShow:function Oe(e,t){S&&t.find('.fr-command[data-param1="'.concat(ve(),'"]')).addClass("fr-active").attr("aria-selected",!0)},replace:be,back:function e(){S?(C.events.disableBlur(),E(".fr-popup input:focus").blur(),k(S)):(C.events.disableBlur(),C.selection.restore(),C.events.enableBlur(),C.popups.hide("image.insert"),C.toolbar.showInline())},get:we,getEl:Ae,insert:L,showProgressBar:I,remove:te,hideProgressBar:z,applyStyle:function Be(e,t,a){if(void 0===t&&(t=C.opts.imageStyles),void 0===a&&(a=C.opts.imageMultipleStyles),!S)return!1;var i=Ae();if(!a){var r=Object.keys(t);r.splice(r.indexOf(e),1),i.removeClass(r.join(" "))}"object"==Me(t[e])?(i.removeAttr("style"),i.css(t[e].style)):i.toggleClass(e),k(S)},showAltPopup:q,showSizePopup:Q,setAlt:function ke(e){if(S){var t=C.popups.get("image.alt");S.attr("alt",e||t.find("input").val()||""),t.find("input:focus").blur(),k(S)}},setSize:function Ne(e,t){if(S){var a=C.popups.get("image.size");e=e||a.find('input[name="width"]').val()||"",t=t||a.find('input[name="height"]').val()||"";var i=/^[\d]+((px)|%)*$/g;S.removeAttr("width").removeAttr("height"),e.match(i)?S.css("width",e):S.css("width",""),t.match(i)?S.css("height",t):S.css("height",""),Ce()&&(S.parents(".fr-img-caption").removeAttr("width").removeAttr("height"),e.match(i)?S.parents(".fr-img-caption").css("width",e):S.parents(".fr-img-caption").css("width",""),t.match(i)?S.parents(".fr-img-caption").css("height",t):S.parents(".fr-img-caption").css("height","")),a&&a.find("input:focus").blur(),k(S)}},toggleCaption:function Le(){var e;if(S&&!Ce()){((e=S).parent().is("a")||S.parent().is("p"))&&(e=S.parent());var t,a,i=S.parents("ul")&&0<S.parents("ul").length?S.parents("ul"):S.parents("ol")&&0<S.parents("ol").length?S.parents("ol"):[];if(0<i.length){var r=i.find("li").length,n=S.parents("li"),o=document.createElement("li");r-1===n.index()&&(i.append(o),o.innerHTML="&nbsp;")}e.attr("style")?a=-1<(t=e.attr("style").split(":")).indexOf("width")?t[t.indexOf("width")+1].replace(";",""):"":e.attr("width")&&(a=e.attr("width"));var s=C.opts.imageResizeWithPercent?(-1<a.indexOf("px")?null:a)||"100%":S.width()+"px";e.wrap('<div class="fr-img-space-wrap"><span '+(C.browser.mozilla?"":'contenteditable="false"')+'class="fr-img-caption '+S.attr("class")+'" style="'+(C.opts.useClasses?"":e.attr("style"))+'" draggable="false"></span><p class="fr-img-space-wrap2">&nbsp;</p></div>'),e.wrap('<span class="fr-img-wrap"></span>'),S.after('<span class="fr-inner"'.concat(C.browser.mozilla?"":' contenteditable="true"',">").concat(_e.START_MARKER).concat(C.language.translate("Image Caption")).concat(_e.END_MARKER,"</span>")),S.parents(".fr-img-caption").css("width",s),1<S.parents(".fr-img-space-wrap").length&&(Se(document.querySelector(".fr-img-space-wrap")),Se(document.querySelector(".fr-img-space-wrap2"))),ge(!0),C.selection.restore()}else{if(e=Ae(),S.insertBefore(e),null!==e[0].querySelector("a")){for(var l,p=e[0].querySelector("a"),f=document.createElement("a"),g=0,c=p.attributes,d=c.length;g<d;g++)l=c[g],f.setAttribute(l.nodeName,l.nodeValue);S.wrap(f)}S.attr("class",e.attr("class").replace("fr-img-caption","")).attr("style",e.attr("style")),e.remove(),1<S.parents(".fr-img-space-wrap").length&&(Se(document.querySelector(".fr-img-space-wrap")),Se(document.querySelector(".fr-img-space-wrap2"))),k(S)}},hasCaption:Ce,exitEdit:ge,edit:k}},_e.DefineIcon("insertImage",{NAME:"image",SVG_KEY:"insertImage"}),_e.RegisterShortcut(_e.KEYCODE.P,"insertImage",null,"P"),_e.RegisterCommand("insertImage",{title:"Insert Image",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("image.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("image.insert")):this.image.showInsertPopup()},plugin:"image"}),_e.DefineIcon("imageUpload",{NAME:"upload",SVG_KEY:"upload"}),_e.RegisterCommand("imageUpload",{title:"Upload Image",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-upload")},refresh:function(e){this.image.refreshUploadButton(e)}}),_e.DefineIcon("imageByURL",{NAME:"link",SVG_KEY:"insertLink"}),_e.RegisterCommand("imageByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-by-url")},refresh:function(e){this.image.refreshByURLButton(e)}}),_e.RegisterCommand("imageInsertByURL",{title:"Insert Image",undo:!0,refreshAfterCallback:!1,callback:function(){this.image.insertByURL()},refresh:function(e){this.image.get()?e.text(this.language.translate("Replace")):e.text(this.language.translate("Insert"))}}),_e.DefineIcon("imageDisplay",{NAME:"star",SVG_KEY:"imageDisplay"}),_e.RegisterCommand("imageDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(e,t){this.image.display(t)},refresh:function(e){this.opts.imageTextNear||e.addClass("fr-hidden")},refreshOnShow:function(e,t){this.image.refreshDisplayOnShow(e,t)}}),_e.DefineIcon("image-align",{NAME:"align-left",SVG_KEY:"alignLeft"}),_e.DefineIcon("image-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),_e.DefineIcon("image-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),_e.DefineIcon("image-align-center",{NAME:"align-justify",SVG_KEY:"alignCenter"}),_e.DefineIcon("imageAlign",{NAME:"align-justify",SVG_KEY:"alignJustify"}),_e.RegisterCommand("imageAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=_e.COMMANDS.imageAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="imageAlign" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.icon.create("image-align-".concat(a)),'<span class="fr-sr-only">').concat(this.language.translate(t[a]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.image.align(t)},refresh:function(e){this.image.refreshAlign(e)},refreshOnShow:function(e,t){this.image.refreshAlignOnShow(e,t)}}),_e.DefineIcon("imageReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),_e.RegisterCommand("imageReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.image.replace()}}),_e.DefineIcon("imageRemove",{NAME:"trash",SVG_KEY:"remove"}),_e.RegisterCommand("imageRemove",{title:"Remove",callback:function(){this.image.remove()}}),_e.DefineIcon("imageBack",{NAME:"arrow-left",SVG_KEY:"back"}),_e.RegisterCommand("imageBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.image.back()},refresh:function(e){this.$;this.image.get()||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),_e.RegisterCommand("imageDismissError",{title:"OK",undo:!1,callback:function(){this.image.hideProgressBar(!0)}}),_e.DefineIcon("imageStyle",{NAME:"magic",SVG_KEY:"imageClass"}),_e.RegisterCommand("imageStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.imageStyles;for(var a in t)if(t.hasOwnProperty(a)){var i=t[a];"object"==Me(i)&&(i=i.title),e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="imageStyle" data-param1="'.concat(a,'">').concat(this.language.translate(i),"</a></li>")}return e+="</ul>"},callback:function(e,t){this.image.applyStyle(t)},refreshOnShow:function(e,t){var a=this.$,i=this.image.getEl();i&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=i.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),_e.DefineIcon("imageAlt",{NAME:"info",SVG_KEY:"imageAltText"}),_e.RegisterCommand("imageAlt",{undo:!1,focus:!1,popup:!0,title:"Alternative Text",callback:function(){this.image.showAltPopup()}}),_e.RegisterCommand("imageSetAlt",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setAlt()}}),_e.DefineIcon("imageSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),_e.RegisterCommand("imageSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.image.showSizePopup()}}),_e.RegisterCommand("imageSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setSize()}}),_e.DefineIcon("imageCaption",{NAME:"commenting",FA5NAME:"comment-alt",SVG_KEY:"imageCaption"}),_e.RegisterCommand("imageCaption",{undo:!0,focus:!1,title:"Image Caption",refreshAfterCallback:!0,callback:function(){this.image.toggleCaption()},refresh:function(e){this.image.get()&&e.toggleClass("fr-active",this.image.hasCaption())}})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
- !function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],a):a(e.FroalaEditor)}(this,function($){"use strict";if($=$&&$.hasOwnProperty("default")?$["default"]:$,Object.assign($.DEFAULTS,{imageManagerLoadURL:"https://i.froala.com/load-files",imageManagerLoadMethod:"get",imageManagerLoadParams:{},imageManagerPreloader:null,imageManagerDeleteURL:"",imageManagerDeleteMethod:"post",imageManagerDeleteParams:{},imageManagerPageSize:12,imageManagerScrollOffset:20,imageManagerToggleTags:!0}),$.PLUGINS.imageManager=function(s){var g,l,i,o,d,m,c,f,u,p,h,v=s.$,M="image_manager",e=10,b=11,w=12,C=13,L=14,D=15,t=21,r=22,n={};function y(){var e=v(window).outerWidth();return e<768?2:e<1200?3:4}function I(){d.empty();for(var e=0;e<h;e++)d.append('<div class="fr-list-column"></div>')}function P(){if(u<c.length&&(d.outerHeight()<=i.outerHeight()+s.opts.imageManagerScrollOffset||i.scrollTop()+s.opts.imageManagerScrollOffset>d.outerHeight()-i.outerHeight())){f++;for(var e=s.opts.imageManagerPageSize*(f-1);e<Math.min(c.length,s.opts.imageManagerPageSize*f);e++)a(c[e])}}function a(n){var i=new Image,o=v(document.createElement("div")).attr("class","fr-image-container fr-empty fr-image-"+p++).attr("data-loading",s.language.translate("Loading")+"..").attr("data-deleting",s.language.translate("Deleting")+"..");R(!1),i.onload=function(){o.height(Math.floor(o.width()/i.width*i.height));var t=v(document.createElement("img"));if(n.thumb)t.attr("src",n.thumb);else{if(O(L,n),!n.url)return O(D,n),!1;t.attr("src",n.url)}if(n.url&&t.attr("data-url",n.url),n.tag)if(l.find(".fr-modal-more.fr-not-available").removeClass("fr-not-available"),l.find(".fr-modal-tags").show(),0<=n.tag.indexOf(",")){for(var e=n.tag.split(","),a=0;a<e.length;a++)e[a]=e[a].trim(),0===m.find('a[title="'.concat(e[a],'"]')).length&&m.append('<a role="button" title="'.concat(e[a],'">').concat(e[a],"</a>"));t.attr("data-tag",e.join())}else 0===m.find('a[title="'.concat(n.tag.trim(),'"]')).length&&m.append('<a role="button" title="'.concat(n.tag.trim(),'">').concat(n.tag.trim(),"</a>")),t.attr("data-tag",n.tag.trim());for(var r in n.name&&t.attr("alt",n.name),n)n.hasOwnProperty(r)&&"thumb"!==r&&"url"!==r&&"tag"!==r&&t.attr("data-".concat(r),n[r]);o.append(t).append(v(s.icon.create("imageManagerDelete")).addClass("fr-delete-img").attr("title",s.language.translate("Delete"))).append(v(s.icon.create("imageManagerInsert")).addClass("fr-insert-img").attr("title",s.language.translate("Insert"))),m.find(".fr-selected-tag").each(function(e,a){j(t,a.text)||o.hide()}),t.on("load",function(){o.removeClass("fr-empty"),o.height("auto"),u++,E(T(parseInt(t.parent().attr("class").match(/fr-image-(\d+)/)[1],10)+1)),R(!1),u%s.opts.imageManagerPageSize==0&&P()}),s.events.trigger("imageManager.imageLoaded",[t])},i.onerror=function(){u++,o.remove(),E(T(parseInt(o.attr("class").match(/fr-image-(\d+)/)[1],10)+1)),O(e,n),u%s.opts.imageManagerPageSize==0&&P()},i.src=n.thumb||n.url,S().append(o)}function S(){var r,n;return d.find(".fr-list-column").each(function(e,a){var t=v(a);0===e?(n=t.outerHeight(),r=t):t.outerHeight()<n&&(n=t.outerHeight(),r=t)}),r}function T(e){e===undefined&&(e=0);for(var a=[],t=p-1;e<=t;t--){var r=d.find(".fr-image-".concat(t));r.length&&(a.push(r),v(document.createElement("div")).attr("id","fr-image-hidden-container").append(r),d.find(".fr-image-".concat(t)).remove())}return a}function E(e){for(var a=e.length-1;0<=a;a--)S().append(e[a])}function R(e){if(e===undefined&&(e=!0),!g.isVisible())return!0;var a=y();if(a!==h){h=a;var t=T();I(),E(t)}s.modals.resize(M),e&&P()}function U(e){for(var a,t=e[0].attributes,r=t.length,n={};r--;)t[r]&&"src"!==(a=t[r].name)&&(n[a]=t[r].value);return n}function x(e){var a=v(e.currentTarget).siblings("img"),t=g.data("instance")||s,r=g.data("current-image");if(s.modals.hide(M),t.image.showProgressBar(),r)r.data("fr-old-src",r.attr("src")),r.trigger("click");else{t.events.focus(!0),t.selection.restore();var n=t.position.getBoundingRect(),i=n.left+n.width/2+v(s.doc).scrollLeft(),o=n.top+n.height+v(s.doc).scrollTop();t.popups.setContainer("image.insert",s.$sc),t.popups.show("image.insert",i,o)}t.image.insert(a.data("url"),!1,U(a),r)}function H(e){var i=v(e.currentTarget).siblings("img"),a=s.language.translate("Are you sure? Image will be deleted.");confirm(a)&&(s.opts.imageManagerDeleteURL?!1!==s.events.trigger("imageManager.beforeDeleteImage",[i])&&(i.parent().addClass("fr-image-deleting"),v(this).ajax({method:s.opts.imageManagerDeleteMethod,url:s.opts.imageManagerDeleteURL,data:Object.assign(Object.assign({src:i.attr("src")},U(i)),s.opts.imageManagerDeleteParams),crossDomain:s.opts.requestWithCORS,withCredentials:s.opts.requestWithCredentials,headers:s.opts.requestHeaders,done:function(e,a,t){s.events.trigger("imageManager.imageDeleted",[e]);var r=T(parseInt(i.parent().attr("class").match(/fr-image-(\d+)/)[1],10)+1);i.parent().remove(),E(r),function n(){g.find("#fr-modal-tags > a").each(function(){0===g.find('#fr-image-list [data-tag*="'.concat(v(this).text(),'"]')).length&&v(this).removeClass("fr-selected-tag").hide()}),_()}(),R(!0)},fail:function(e){O(t,e.response||e.responseText)}})):O(r))}function O(e,a){10<=e&&e<20?o.hide():20<=e&&e<30&&v(".fr-image-deleting").removeClass("fr-image-deleting"),s.events.trigger("imageManager.error",[{code:e,message:n[e]},a])}function q(){var e=l.find(".fr-modal-head-line").outerHeight(),a=m.outerHeight();l.toggleClass("fr-show-tags"),l.hasClass("fr-show-tags")?(l.css("height",e+a),i.css("marginTop",e+a),m.find("a").css("opacity",1)):(l.css("height",e),i.css("marginTop",e),m.find("a").css("opacity",0))}function _(){var e=m.find(".fr-selected-tag");0<e.length?(d.find("img").parents().show(),e.each(function(e,r){d.find("img").each(function(e,a){var t=v(a);j(t,r.text)||t.parent().hide()})})):d.find("img").parents().show(),E(T()),P()}function k(e){e.preventDefault();var a=v(e.currentTarget);a.toggleClass("fr-selected-tag"),s.opts.imageManagerToggleTags&&a.siblings("a").removeClass("fr-selected-tag"),_()}function j(e,a){for(var t=(e.attr("data-tag")||"").split(","),r=0;r<t.length;r++)if(t[r]===a)return!0;return!1}return n[e]="Image cannot be loaded from the passed link.",n[b]="Error during load images request.",n[w]="Missing imageManagerLoadURL option.",n[C]="Parsing load response failed.",n[L]="Missing image thumb.",n[D]="Missing image URL.",n[t]="Error during delete image request.",n[r]="Missing imageManagerDeleteURL option.",{require:["image"],_init:function z(){if(!s.$wp&&"IMG"!==s.el.tagName)return!1},show:function G(){if(!g){var e,a='<button class="fr-command fr-btn fr-modal-more fr-not-available" id="fr-modal-more-'.concat(s.sid,'"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24""><path d="').concat($.SVG.tags,'"/></svg></button><h4 data-text="true">').concat(s.language.translate("Manage Images"),'</h4></div>\n <div class="fr-modal-tags" id="fr-modal-tags">');e=s.opts.imageManagerPreloader?'<img class="fr-preloader" id="fr-preloader" alt="'.concat(s.language.translate("Loading"),'.." src="').concat(s.opts.imageManagerPreloader,'" style="display: none;">'):'<span class="fr-preloader" id="fr-preloader" style="display: none;">'.concat(s.language.translate("Loading"),"</span>"),e+='<div class="fr-image-list" id="fr-image-list"></div>';var t=s.modals.create(M,a,e);g=t.$modal,l=t.$head,i=t.$body}g.data("current-image",s.image.get()),s.modals.show(M),o||function r(){o=g.find("#fr-preloader"),d=g.find("#fr-image-list"),m=g.find("#fr-modal-tags"),h=y(),I(),l.css("height",l.find(".fr-modal-head-line").outerHeight()),s.events.$on(v(s.o_win),"resize",function(){R(!!c)}),s.events.bindClick(d,".fr-insert-img",x),s.events.bindClick(d,".fr-delete-img",H),s.helpers.isMobile()&&(s.events.bindClick(d,"div.fr-image-container",function(e){g.find(".fr-mobile-selected").removeClass("fr-mobile-selected"),v(e.currentTarget).addClass("fr-mobile-selected")}),g.on(s._mousedown,function(){g.find(".fr-mobile-selected").removeClass("fr-mobile-selected")})),g.on(s._mousedown+" "+s._mouseup,function(e){e.stopPropagation()}),g.on(s._mousedown,"*",function(){s.events.disableBlur()}),i.on("scroll",P),s.events.bindClick(g,"button#fr-modal-more-".concat(s.sid),q),s.events.bindClick(m,"a",k)}(),function n(){o.show(),d.find(".fr-list-column").empty(),s.opts.imageManagerLoadURL?v(this).ajax({url:s.opts.imageManagerLoadURL,method:s.opts.imageManagerLoadMethod,data:s.opts.imageManagerLoadParams,crossDomain:s.opts.requestWithCORS,withCredentials:s.opts.requestWithCredentials,headers:s.opts.requestHeaders,done:function(e,a,t){s.events.trigger("imageManager.imagesLoaded",[e]),function r(e,a){try{d.find(".fr-list-column").empty(),p=u=f=0,c=JSON.parse(e),P()}catch(t){O(C,a)}}(e,t.response),o.hide()},fail:function(e){O(b,e.response||e.responseText)}}):O(w)}()},hide:function N(){s.modals.hide(M)}}},!$.PLUGINS.image)throw new Error("Image manager plugin requires image plugin.");$.DEFAULTS.imageInsertButtons.push("imageManager"),$.RegisterCommand("imageManager",{title:"Browse",undo:!1,focus:!1,modal:!0,callback:function(){this.imageManager.show()},plugin:"imageManager"}),$.DefineIcon("imageManager",{NAME:"folder",SVG_KEY:"imageManager"}),$.DefineIcon("imageManagerInsert",{NAME:"plus",SVG_KEY:"add"}),$.DefineIcon("imageManagerDelete",{NAME:"trash",SVG_KEY:"remove"})});
7
+ !function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],a):a(e.FroalaEditor)}(this,function($){"use strict";if($=$&&$.hasOwnProperty("default")?$["default"]:$,Object.assign($.DEFAULTS,{imageManagerLoadURL:"https://i.froala.com/load-files",imageManagerLoadMethod:"get",imageManagerLoadParams:{},imageManagerPreloader:null,imageManagerDeleteURL:"",imageManagerDeleteMethod:"post",imageManagerDeleteParams:{},imageManagerPageSize:12,imageManagerScrollOffset:20,imageManagerToggleTags:!0}),$.PLUGINS.imageManager=function(s){var g,l,i,o,d,m,c,f,u,p,h,v=s.$,M="image_manager",e=10,b=11,w=12,C=13,L=14,D=15,t=21,r=22,n={};function y(){var e=v(window).outerWidth();return e<768?2:e<1200?3:4}function I(){d.empty();for(var e=0;e<h;e++)d.append('<div class="fr-list-column"></div>')}function P(){if(u<c.length&&i[0].scrollTop>=i[0].scrollHeight-s.opts.imageManagerScrollOffset-i.outerHeight()){f++;for(var e=s.opts.imageManagerPageSize*(f-1);e<Math.min(c.length,s.opts.imageManagerPageSize*f);e++)a(c[e])}}function a(n){var i=new Image,o=v(document.createElement("div")).attr("class","fr-image-container fr-empty fr-image-"+p++).attr("data-loading",s.language.translate("Loading")+"..").attr("data-deleting",s.language.translate("Deleting")+"..");R(!1),i.onload=function(){o.height(Math.floor(o.width()/i.width*i.height));var t=v(document.createElement("img"));if(n.thumb)t.attr("src",n.thumb);else{if(O(L,n),!n.url)return O(D,n),!1;t.attr("src",n.url)}if(n.url&&t.attr("data-url",n.url),n.tag)if(l.find(".fr-modal-more.fr-not-available").removeClass("fr-not-available"),l.find(".fr-modal-tags").show(),0<=n.tag.indexOf(",")){for(var e=n.tag.split(","),a=0;a<e.length;a++)e[a]=e[a].trim(),0===m.find('a[title="'.concat(e[a],'"]')).length&&m.append('<a role="button" title="'.concat(e[a],'">').concat(e[a],"</a>"));t.attr("data-tag",e.join())}else 0===m.find('a[title="'.concat(n.tag.trim(),'"]')).length&&m.append('<a role="button" title="'.concat(n.tag.trim(),'">').concat(n.tag.trim(),"</a>")),t.attr("data-tag",n.tag.trim());for(var r in n.name&&t.attr("alt",n.name),n)n.hasOwnProperty(r)&&"thumb"!==r&&"url"!==r&&"tag"!==r&&t.attr("data-".concat(r),n[r]);o.append(t).append(v(s.icon.create("imageManagerDelete")).addClass("fr-delete-img").attr("title",s.language.translate("Delete"))).append(v(s.icon.create("imageManagerInsert")).addClass("fr-insert-img").attr("title",s.language.translate("Insert"))),m.find(".fr-selected-tag").each(function(e,a){j(t,a.text)||o.hide()}),t.on("load",function(){o.removeClass("fr-empty"),o.height("auto"),u++,E(T(parseInt(t.parent().attr("class").match(/fr-image-(\d+)/)[1],10)+1)),R(!1),u%s.opts.imageManagerPageSize==0&&P()}),s.events.trigger("imageManager.imageLoaded",[t])},i.onerror=function(){u++,o.remove(),E(T(parseInt(o.attr("class").match(/fr-image-(\d+)/)[1],10)+1)),O(e,n),u%s.opts.imageManagerPageSize==0&&P()},i.src=n.thumb||n.url,S().append(o)}function S(){var r,n;return d.find(".fr-list-column").each(function(e,a){var t=v(a);0===e?(n=t.outerHeight(),r=t):t.outerHeight()<n&&(n=t.outerHeight(),r=t)}),r}function T(e){e===undefined&&(e=0);for(var a=[],t=p-1;e<=t;t--){var r=d.find(".fr-image-".concat(t));r.length&&(a.push(r),v(document.createElement("div")).attr("id","fr-image-hidden-container").append(r),d.find(".fr-image-".concat(t)).remove())}return a}function E(e){for(var a=e.length-1;0<=a;a--)S().append(e[a])}function R(e){if(e===undefined&&(e=!0),!g.isVisible())return!0;var a=y();if(a!==h){h=a;var t=T();I(),E(t)}s.modals.resize(M),e&&P()}function U(e){for(var a,t=e[0].attributes,r=t.length,n={};r--;)t[r]&&"src"!==(a=t[r].name)&&(n[a]=t[r].value);return n}function x(e){var a=v(e.currentTarget).siblings("img"),t=g.data("instance")||s,r=g.data("current-image");if(s.modals.hide(M),t.image.showProgressBar(),r)r.data("fr-old-src",r.attr("src")),r.trigger("click");else{t.events.focus(!0),t.selection.restore();var n=t.position.getBoundingRect(),i=n.left+n.width/2+v(s.doc).scrollLeft(),o=n.top+n.height+v(s.doc).scrollTop();t.popups.setContainer("image.insert",s.$sc),t.popups.show("image.insert",i,o)}t.image.insert(a.data("url"),!1,U(a),r)}function q(e){var i=v(e.currentTarget).siblings("img"),a=s.language.translate("Are you sure? Image will be deleted.");confirm(a)&&(s.opts.imageManagerDeleteURL?!1!==s.events.trigger("imageManager.beforeDeleteImage",[i])&&(i.parent().addClass("fr-image-deleting"),v(this).ajax({method:s.opts.imageManagerDeleteMethod,url:s.opts.imageManagerDeleteURL,data:Object.assign(Object.assign({src:i.attr("src")},U(i)),s.opts.imageManagerDeleteParams),crossDomain:s.opts.requestWithCORS,withCredentials:s.opts.requestWithCredentials,headers:s.opts.requestHeaders,done:function(e,a,t){s.events.trigger("imageManager.imageDeleted",[e]);var r=T(parseInt(i.parent().attr("class").match(/fr-image-(\d+)/)[1],10)+1);i.parent().remove(),E(r),function n(){g.find("#fr-modal-tags > a").each(function(){0===g.find('#fr-image-list [data-tag*="'.concat(v(this).text(),'"]')).length&&v(this).removeClass("fr-selected-tag").hide()}),_()}(),R(!0)},fail:function(e){O(t,e.response||e.responseText)}})):O(r))}function O(e,a){10<=e&&e<20?o.hide():20<=e&&e<30&&v(".fr-image-deleting").removeClass("fr-image-deleting"),s.events.trigger("imageManager.error",[{code:e,message:n[e]},a])}function H(){var e=l.find(".fr-modal-head-line").outerHeight(),a=m.outerHeight();l.toggleClass("fr-show-tags"),l.hasClass("fr-show-tags")?(l.css("height",e+a),i.css("marginTop",e+a),m.find("a").css("opacity",1)):(l.css("height",e),i.css("marginTop",e),m.find("a").css("opacity",0))}function _(){var e=m.find(".fr-selected-tag");0<e.length?(d.find("img").parents().show(),e.each(function(e,r){d.find("img").each(function(e,a){var t=v(a);j(t,r.text)||t.parent().hide()})})):d.find("img").parents().show(),E(T()),P()}function k(e){e.preventDefault();var a=v(e.currentTarget);a.toggleClass("fr-selected-tag"),s.opts.imageManagerToggleTags&&a.siblings("a").removeClass("fr-selected-tag"),_()}function j(e,a){for(var t=(e.attr("data-tag")||"").split(","),r=0;r<t.length;r++)if(t[r]===a)return!0;return!1}return n[e]="Image cannot be loaded from the passed link.",n[b]="Error during load images request.",n[w]="Missing imageManagerLoadURL option.",n[C]="Parsing load response failed.",n[L]="Missing image thumb.",n[D]="Missing image URL.",n[t]="Error during delete image request.",n[r]="Missing imageManagerDeleteURL option.",{require:["image"],_init:function z(){if(!s.$wp&&"IMG"!==s.el.tagName)return!1},show:function G(){if(!g){var e,a='<button class="fr-command fr-btn fr-modal-more fr-not-available" id="fr-modal-more-'.concat(s.sid,'"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24""><path d="').concat($.SVG.tags,'"/></svg></button><h4 data-text="true">').concat(s.language.translate("Manage Images"),'</h4></div>\n <div class="fr-modal-tags" id="fr-modal-tags">');e=s.opts.imageManagerPreloader?'<img class="fr-preloader" id="fr-preloader" alt="'.concat(s.language.translate("Loading"),'.." src="').concat(s.opts.imageManagerPreloader,'" style="display: none;">'):'<span class="fr-preloader" id="fr-preloader" style="display: none;">'.concat(s.language.translate("Loading"),"</span>"),e+='<div class="fr-image-list" id="fr-image-list"></div>';var t=s.modals.create(M,a,e);g=t.$modal,l=t.$head,i=t.$body}g.data("current-image",s.image.get()),s.modals.show(M),o||function r(){o=g.find("#fr-preloader"),d=g.find("#fr-image-list"),m=g.find("#fr-modal-tags"),h=y(),I(),l.css("height",l.find(".fr-modal-head-line").outerHeight()),s.events.$on(v(s.o_win),"resize",function(){R(!!c)}),s.events.bindClick(d,".fr-insert-img",x),s.events.bindClick(d,".fr-delete-img",q),s.helpers.isMobile()&&(s.events.bindClick(d,"div.fr-image-container",function(e){g.find(".fr-mobile-selected").removeClass("fr-mobile-selected"),v(e.currentTarget).addClass("fr-mobile-selected")}),g.on(s._mousedown,function(){g.find(".fr-mobile-selected").removeClass("fr-mobile-selected")})),g.on(s._mousedown+" "+s._mouseup,function(e){e.stopPropagation()}),g.on(s._mousedown,"*",function(){s.events.disableBlur()}),i.on("scroll",P),s.events.bindClick(g,"button#fr-modal-more-".concat(s.sid),H),s.events.bindClick(m,"a",k)}(),function n(){o.show(),d.find(".fr-list-column").empty(),s.opts.imageManagerLoadURL?v(this).ajax({url:s.opts.imageManagerLoadURL,method:s.opts.imageManagerLoadMethod,data:s.opts.imageManagerLoadParams,crossDomain:s.opts.requestWithCORS,withCredentials:s.opts.requestWithCredentials,headers:s.opts.requestHeaders,done:function(e,a,t){s.events.trigger("imageManager.imagesLoaded",[e]),function r(e,a){try{d.find(".fr-list-column").empty(),p=u=f=0,c=JSON.parse(e),P()}catch(t){O(C,a)}}(e,t.response),o.hide()},fail:function(e){O(b,e.response||e.responseText)}}):O(w)}()},hide:function N(){s.modals.hide(M)}}},!$.PLUGINS.image)throw new Error("Image manager plugin requires image plugin.");$.DEFAULTS.imageInsertButtons.push("imageManager"),$.RegisterCommand("imageManager",{title:"Browse",undo:!1,focus:!1,modal:!0,callback:function(){this.imageManager.show()},plugin:"imageManager"}),$.DefineIcon("imageManager",{NAME:"folder",SVG_KEY:"imageManager"}),$.DefineIcon("imageManagerInsert",{NAME:"plus",SVG_KEY:"add"}),$.DefineIcon("imageManagerDelete",{NAME:"trash",SVG_KEY:"remove"})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
7
  !function(n,a){"object"==typeof exports&&"undefined"!=typeof module?a(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],a):a(n.FroalaEditor)}(this,function(n){"use strict";n=n&&n.hasOwnProperty("default")?n["default"]:n,Object.assign(n.DEFAULTS,{inlineClasses:{"fr-class-code":"Code","fr-class-highlighted":"Highlighted","fr-class-transparency":"Transparent"}}),n.PLUGINS.inlineClass=function(e){var i=e.$;return{apply:function a(n){e.format.toggle("span",{"class":n})},refreshOnShow:function s(n,a){a.find(".fr-command").each(function(){var n=i(this).data("param1"),a=e.format.is("span",{"class":n});i(this).toggleClass("fr-active",a).attr("aria-selected",a)})}}},n.RegisterCommand("inlineClass",{type:"dropdown",title:"Inline Class",html:function(){var n='<ul class="fr-dropdown-list" role="presentation">',a=this.opts.inlineClasses;for(var e in a)a.hasOwnProperty(e)&&(n+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="inlineClass" data-param1="'.concat(e,'" title="').concat(a[e],'">').concat(a[e],"</a></li>"));return n+="</ul>"},callback:function(n,a){this.inlineClass.apply(a)},refreshOnShow:function(n,a){this.inlineClass.refreshOnShow(n,a)},plugin:"inlineClass"}),n.DefineIcon("inlineClass",{NAME:"tag",SVG_KEY:"inlineClass"})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
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,{inlineStyles:{"Big Red":"font-size: 20px; color: red;","Small Blue":"font-size: 14px; color: blue;"}}),e.PLUGINS.inlineStyle=function(i){return{apply:function a(e){for(var t=e.split(";"),n=0;n<t.length;n++){var l=t[n].split(":");t[n].length&&2==l.length&&i.format.applyStyle(l[0].trim(),l[1].trim())}}}},e.RegisterCommand("inlineStyle",{type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.inlineStyles;for(var n in t)if(t.hasOwnProperty(n)){var l=t[n]+(-1===t[n].indexOf("display:block;")?" display:block;":"");e+='<li role="presentation"><span style="'.concat(l,'" role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="inlineStyle" data-param1="').concat(t[n],'" title="').concat(this.language.translate(n),'">').concat(this.language.translate(n),"</a></span></li>")}return e+="</ul>"},title:"Inline Style",callback:function(e,t){this.inlineStyle.apply(t)},plugin:"inlineStyle"}),e.DefineIcon("inlineStyle",{NAME:"paint-brush",SVG_KEY:"inlineStyle"})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 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(b){"use strict";b=b&&b.hasOwnProperty("default")?b["default"]:b,Object.assign(b.DEFAULTS,{lineBreakerTags:["table","hr","form","dl","span.fr-video",".fr-embedly","img"],lineBreakerOffset:15,lineBreakerHorizontalOffset:10}),b.PLUGINS.lineBreaker=function(g){var v,t,a,m=g.$;function f(e,t){var n,r,a,o,i,s,f,l;if(null==e)i=(o=t.parent()).offset().top,n=(f=t.offset().top)-Math.min((f-i)/2,g.opts.lineBreakerOffset),a=o.outerWidth(),r=o.offset().left;else if(null==t)(s=(o=e.parent()).offset().top+o.outerHeight())<(l=e.offset().top+e.outerHeight())&&(s=(o=m(o).parent()).offset().top+o.outerHeight()),n=l+Math.min(Math.abs(s-l)/2,g.opts.lineBreakerOffset),a=o.outerWidth(),r=o.offset().left;else{o=e.parent();var p=e.offset().top+e.height(),u=t.offset().top;if(u<p)return!1;n=(p+u)/2,a=o.outerWidth(),r=o.offset().left}if(g.opts.iframe){var c=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-top")),d=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-left"));r+=g.$iframe.offset().left-g.helpers.scrollLeft()+d,n+=g.$iframe.offset().top-g.helpers.scrollTop()+c}g.$box.append(v),v.css("top",n-g.win.pageYOffset),v.css("left",r-g.win.pageXOffset),v.css("width",a),v.data("tag1",e),v.data("tag2",t),v.addClass("fr-visible").data("instance",g)}function l(e){if(e){var t=m(e);if(0===g.$el.find(t).length)return null;if(e.nodeType!=Node.TEXT_NODE&&t.is(g.opts.lineBreakerTags.join(",")))return t;if(0<t.parents(g.opts.lineBreakerTags.join(",")).length)return e=t.parents(g.opts.lineBreakerTags.join(",")).get(0),0!==g.$el.find(m(e)).length&&m(e).is(g.opts.lineBreakerTags.join(","))?m(e):null}return null}function o(e,t){var n=g.doc.elementFromPoint(e,t);return n&&!m(n).closest(".fr-line-breaker").length&&!g.node.isElement(n)&&n!=g.$wp.get(0)&&function r(e){if("undefined"!=typeof e.inFroalaWrapper)return e.inFroalaWrapper;for(var t=e;e.parentNode&&e.parentNode!==g.$wp.get(0);)e=e.parentNode;return t.inFroalaWrapper=e.parentNode==g.$wp.get(0),t.inFroalaWrapper}(n)?n:null}function i(e,t,n){for(var r=n,a=null;r<=g.opts.lineBreakerOffset&&!a;)(a=o(e,t-r))||(a=o(e,t+r)),r+=n;return a}function p(e,t,n){for(var r=null,a=100;!r&&e>g.$box.offset().left&&e<g.$box.offset().left+g.$box.outerWidth()&&0<a;)(r=o(e,t))||(r=i(e,t,5)),"left"==n?e-=g.opts.lineBreakerHorizontalOffset:e+=g.opts.lineBreakerHorizontalOffset,a-=g.opts.lineBreakerHorizontalOffset;return r}function n(e){var t=a=null,n=null,r=g.doc.elementFromPoint(e.pageX-g.win.pageXOffset,e.pageY-g.win.pageYOffset);(t=r&&("HTML"==r.tagName||"BODY"==r.tagName||g.node.isElement(r)||0<=(r.getAttribute("class")||"").indexOf("fr-line-breaker"))?((n=i(e.pageX-g.win.pageXOffset,e.pageY-g.win.pageYOffset,1))||(n=p(e.pageX-g.win.pageXOffset-g.opts.lineBreakerHorizontalOffset,e.pageY-g.win.pageYOffset,"left")),n||(n=p(e.pageX-g.win.pageXOffset+g.opts.lineBreakerHorizontalOffset,e.pageY-g.win.pageYOffset,"right")),l(n)):l(r))?function s(e,t){var n,r,a=e.offset().top,o=e.offset().top+e.outerHeight();if(Math.abs(o-t)<=g.opts.lineBreakerOffset||Math.abs(t-a)<=g.opts.lineBreakerOffset)if(Math.abs(o-t)<Math.abs(t-a)){for(var i=(r=e.get(0)).nextSibling;i&&i.nodeType==Node.TEXT_NODE&&0===i.textContent.length;)i=i.nextSibling;if(!i)return f(e,null),!0;if(n=l(i))return f(e,n),!0}else{if(!(r=e.get(0)).previousSibling)return f(null,e),!0;if(n=l(r.previousSibling))return f(n,e),!0}v.removeClass("fr-visible").removeData("instance")}(t,e.pageY):g.core.sameInstance(v)&&v.removeClass("fr-visible").removeData("instance")}function r(e){return!(v.hasClass("fr-visible")&&!g.core.sameInstance(v))&&(g.popups.areVisible()||g.el.querySelector(".fr-selected-cell")?(v.removeClass("fr-visible"),!0):void(!1!==t||g.edit.isDisabled()||(a&&clearTimeout(a),a=setTimeout(n,30,e))))}function s(){a&&clearTimeout(a),v&&v.hasClass("fr-visible")&&v.removeClass("fr-visible").removeData("instance")}var u=function u(){t=!0,s()},c=function c(){t=!1};function d(e){e.preventDefault();var t=v.data("instance")||g;v.removeClass("fr-visible").removeData("instance");var n=v.data("tag1"),r=v.data("tag2"),a=g.html.defaultTag();null==n?a&&"TD"!=r.parent().get(0).tagName&&0===r.parents(a).length?r.before("<".concat(a,">").concat(b.MARKERS,"<br></").concat(a,">")):r.before("".concat(b.MARKERS,"<br>")):a&&"TD"!=n.parent().get(0).tagName&&0===n.parents(a).length?n.after("<".concat(a,">").concat(b.MARKERS,"<br></").concat(a,">")):n.after("".concat(b.MARKERS,"<br>")),t.selection.restore(),g.toolbar.enable()}return{_init:function h(){if(!g.$wp)return!1;!function e(){g.shared.$line_breaker||(g.shared.$line_breaker=m(document.createElement("div")).attr("class","fr-line-breaker").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'.concat(g.language.translate("Break"),'"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="17" y="7" width="2" height="8"/><rect x="10" y="13" width="7" height="2"/><path d="M10.000,10.000 L10.000,18.013 L5.000,14.031 L10.000,10.000 Z"/></svg></a>'))),v=g.shared.$line_breaker,g.events.on("shared.destroy",function(){v.html("").removeData().remove(),v=null},!0),g.events.on("destroy",function(){v.removeData("instance").removeClass("fr-visible"),m("body").first().append(v),clearTimeout(a)},!0),g.events.$on(v,"mousemove",function(e){e.stopPropagation()},!0),g.events.bindClick(v,"a",d)}(),t=!1,g.events.$on(g.$win,"mousemove",r),g.events.$on(m(g.win),"scroll",s),g.events.on("popups.show.table.edit",s),g.events.on("commands.after",s),g.events.$on(m(g.win),"mousedown",u),g.events.$on(m(g.win),"mouseup",c)}}}});
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(h){"use strict";h=h&&h.hasOwnProperty("default")?h["default"]:h,Object.assign(h.DEFAULTS,{lineBreakerTags:["table","hr","form","dl","span.fr-video",".fr-embedly","img"],lineBreakerOffset:15,lineBreakerHorizontalOffset:10}),h.PLUGINS.lineBreaker=function(d){var v,t,a,m=d.$;function f(e,t){var n,r,a,o,i,s,f,l;if(null==e)i=(o=t.parent()).offset().top,n=(f=t.offset().top)-Math.min((f-i)/2,d.opts.lineBreakerOffset),a=o.outerWidth(),r=o.offset().left;else if(null==t)(s=(o=e.parent()).offset().top+o.outerHeight())<(l=e.offset().top+e.outerHeight())&&(s=(o=m(o).parent()).offset().top+o.outerHeight()),n=l+Math.min(Math.abs(s-l)/2,d.opts.lineBreakerOffset),a=o.outerWidth(),r=o.offset().left;else{o=e.parent();var p=e.offset().top+e.height(),u=t.offset().top;if(u<p)return!1;n=(p+u)/2,a=o.outerWidth(),r=o.offset().left}if(d.opts.iframe){var c=d.helpers.getPX(d.$wp.find(".fr-iframe").css("padding-top")),g=d.helpers.getPX(d.$wp.find(".fr-iframe").css("padding-left"));r+=d.$iframe.offset().left-d.helpers.scrollLeft()+g,n+=d.$iframe.offset().top-d.helpers.scrollTop()+c}d.$box.append(v),v.css("top",n-d.win.pageYOffset),v.css("left",r-d.win.pageXOffset),v.css("width",a),v.data("tag1",e),v.data("tag2",t),v.addClass("fr-visible").data("instance",d)}function l(e){if(e){var t=m(e);if(0===d.$el.find(t).length)return null;if(e.nodeType!=Node.TEXT_NODE&&t.is(d.opts.lineBreakerTags.join(",")))return t;if(0<t.parents(d.opts.lineBreakerTags.join(",")).length)return e=t.parents(d.opts.lineBreakerTags.join(",")).get(0),0!==d.$el.find(m(e)).length&&m(e).is(d.opts.lineBreakerTags.join(","))?m(e):null}return null}function o(e,t){var n=d.doc.elementFromPoint(e,t);return n&&!m(n).closest(".fr-line-breaker").length&&!d.node.isElement(n)&&n!=d.$wp.get(0)&&function r(e){if("undefined"!=typeof e.inFroalaWrapper)return e.inFroalaWrapper;for(var t=e;e.parentNode&&e.parentNode!==d.$wp.get(0);)e=e.parentNode;return t.inFroalaWrapper=e.parentNode==d.$wp.get(0),t.inFroalaWrapper}(n)?n:null}function i(e,t,n){for(var r=n,a=null;r<=d.opts.lineBreakerOffset&&!a;)(a=o(e,t-r))||(a=o(e,t+r)),r+=n;return a}function p(e,t,n){for(var r=null,a=100;!r&&e>d.$box.offset().left&&e<d.$box.offset().left+d.$box.outerWidth()&&0<a;)(r=o(e,t))||(r=i(e,t,5)),"left"==n?e-=d.opts.lineBreakerHorizontalOffset:e+=d.opts.lineBreakerHorizontalOffset,a-=d.opts.lineBreakerHorizontalOffset;return r}function n(e){var t=a=null,n=null,r=d.doc.elementFromPoint(e.pageX-d.win.pageXOffset,e.pageY-d.win.pageYOffset);(t=r&&("HTML"==r.tagName||"BODY"==r.tagName||d.node.isElement(r)||0<=(r.getAttribute("class")||"").indexOf("fr-line-breaker"))?((n=i(e.pageX-d.win.pageXOffset,e.pageY-d.win.pageYOffset,1))||(n=p(e.pageX-d.win.pageXOffset-d.opts.lineBreakerHorizontalOffset,e.pageY-d.win.pageYOffset,"left")),n||(n=p(e.pageX-d.win.pageXOffset+d.opts.lineBreakerHorizontalOffset,e.pageY-d.win.pageYOffset,"right")),l(n)):l(r))?function s(e,t){var n,r,a=e.offset().top,o=e.offset().top+e.outerHeight();if(Math.abs(o-t)<=d.opts.lineBreakerOffset||Math.abs(t-a)<=d.opts.lineBreakerOffset)if(Math.abs(o-t)<Math.abs(t-a)){var i=null;for((r=e.get(0)).nextSibling&&(i=r.nextSibling.offsetParent?r.nextSibling:null);i&&i.nodeType==Node.TEXT_NODE&&0===i.textContent.length;)i=i.nextSibling;if(!i)return f(e,null),!0;if(n=l(i))return f(e,n),!0}else{if(!(r=e.get(0)).previousSibling)return f(null,e),!0;if(n=l(r.previousSibling))return f(n,e),!0}v.removeClass("fr-visible").removeData("instance")}(t,e.pageY):d.core.sameInstance(v)&&v.removeClass("fr-visible").removeData("instance")}function r(e){return!(v.hasClass("fr-visible")&&!d.core.sameInstance(v))&&(d.popups.areVisible()||d.el.querySelector(".fr-selected-cell")?(v.removeClass("fr-visible"),!0):void(!1!==t||d.edit.isDisabled()||(a&&clearTimeout(a),a=setTimeout(n,30,e))))}function s(){a&&clearTimeout(a),v&&v.hasClass("fr-visible")&&v.removeClass("fr-visible").removeData("instance")}var u=function u(){t=!0,s()},c=function c(){t=!1};function g(e){e.preventDefault();var t=v.data("instance")||d;v.removeClass("fr-visible").removeData("instance");var n=v.data("tag1"),r=v.data("tag2"),a=d.html.defaultTag();null==n?a&&"TD"!=r.parent().get(0).tagName&&0===r.parents(a).length?r.before("<".concat(a,">").concat(h.MARKERS,"<br></").concat(a,">")):r.before("".concat(h.MARKERS,"<br>")):a&&"TD"!=n.parent().get(0).tagName&&0===n.parents(a).length?n.after("<".concat(a,">").concat(h.MARKERS,"<br></").concat(a,">")):n.after("".concat(h.MARKERS,"<br>")),t.selection.restore(),d.toolbar.enable()}return{_init:function b(){if(!d.$wp)return!1;!function e(){d.shared.$line_breaker||(d.shared.$line_breaker=m(document.createElement("div")).attr("class","fr-line-breaker").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'.concat(d.language.translate("Break"),'"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="17" y="7" width="2" height="8"/><rect x="10" y="13" width="7" height="2"/><path d="M10.000,10.000 L10.000,18.013 L5.000,14.031 L10.000,10.000 Z"/></svg></a>'))),v=d.shared.$line_breaker,d.events.on("shared.destroy",function(){v.html("").removeData().remove(),v=null},!0),d.events.on("destroy",function(){v.removeData("instance").removeClass("fr-visible"),m("body").first().append(v),clearTimeout(a)},!0),d.events.$on(v,"mousemove",function(e){e.stopPropagation()},!0),d.events.bindClick(v,"a",g)}(),t=!1,d.events.$on(d.$win,"mousemove",r),d.events.$on(m(d.win),"scroll",s),d.events.on("popups.show.table.edit",s),d.events.on("commands.after",s),d.events.$on(m(d.win),"mousedown",u),d.events.$on(m(d.win),"mouseup",c)}}}});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
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,{lineHeights:{Default:"",Single:"1",1.15:"1.15",1.5:"1.5",Double:"2"}}),e.PLUGINS.lineHeight=function(n){var o=n.$;return{_init:function e(){},apply:function a(e){n.selection.save(),n.html.wrap(!0,!0,!0,!0),n.selection.restore();var t=n.selection.blocks();t.length&&o(t[0]).parent().is("td")&&n.format.applyStyle("line-height",e.toString()),n.selection.save();for(var i=0;i<t.length;i++)o(t[i]).css("line-height",e),""===o(t[i]).attr("style")&&o(t[i]).removeAttr("style");n.html.unwrap(),n.selection.restore()},refreshOnShow:function r(e,t){var i=n.selection.blocks();if(i.length){var l=o(i[0]);t.find(".fr-command").each(function(){var e=o(this).data("param1"),t=l.attr("style"),i=0<=(t||"").indexOf("line-height: "+e+";");if(t){var n=t.substring(t.indexOf("line-height")),a=n.substr(0,n.indexOf(";")),r=a&&a.split(":")[1];r&&r.length||"Default"!==l.text()||(i=!0)}t&&-1!==t.indexOf("line-height")||""!==e||(i=!0),o(this).toggleClass("fr-active",i).attr("aria-selected",i)})}}}},e.RegisterCommand("lineHeight",{type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.lineHeights;for(var i in t)t.hasOwnProperty(i)&&(e+='<li role="presentation"><a class="fr-command '.concat(i,'" tabIndex="-1" role="option" data-cmd="lineHeight" data-param1="').concat(t[i],'" title="').concat(this.language.translate(i),'">').concat(this.language.translate(i),"</a></li>"));return e+="</ul>"},title:"Line Height",callback:function(e,t){this.lineHeight.apply(t)},refreshOnShow:function(e,t){this.lineHeight.refreshOnShow(e,t)},plugin:"lineHeight"}),e.DefineIcon("lineHeight",{NAME:"arrows-v",FA5NAME:"arrows-alt-v",SVG_KEY:"lineHeight"})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 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(y){"use strict";y=y&&y.hasOwnProperty("default")?y["default"]:y,Object.assign(y.POPUP_TEMPLATES,{"link.edit":"[_BUTTONS_]","link.insert":"[_BUTTONS_][_INPUT_LAYER_]"}),Object.assign(y.DEFAULTS,{linkEditButtons:["linkOpen","linkStyle","linkEdit","linkRemove"],linkInsertButtons:["linkBack","|","linkList"],linkAttributes:{},linkAutoPrefix:"http://",linkStyles:{"fr-green":"Green","fr-strong":"Thick"},linkMultipleStyles:!0,linkConvertEmailAddress:!0,linkAlwaysBlank:!1,linkAlwaysNoFollow:!1,linkNoOpener:!0,linkNoReferrer:!0,linkList:[{text:"Froala",href:"https://froala.com",target:"_blank"},{text:"Google",href:"https://google.com",target:"_blank"},{displayText:"Facebook",href:"https://facebook.com"}],linkText:!0}),y.PLUGINS.link=function(u){var k=u.$;function g(){var e=u.image?u.image.get():null;if(e||!u.$wp)return"A"==u.el.tagName?u.el:e&&e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?e.get(0).parentNode:void 0;var t=u.selection.ranges(0).commonAncestorContainer;try{t&&(t.contains&&t.contains(u.el)||!u.el.contains(t)||u.el==t)&&(t=null)}catch(r){t=null}if(t&&"A"===t.tagName)return t;var n=u.selection.element(),i=u.selection.endElement();"A"==n.tagName||u.node.isElement(n)||(n=k(n).parentsUntil(u.$el,"a").first().get(0)),"A"==i.tagName||u.node.isElement(i)||(i=k(i).parentsUntil(u.$el,"a").first().get(0));try{i&&(i.contains&&i.contains(u.el)||!u.el.contains(i)||u.el==i)&&(i=null)}catch(r){i=null}try{n&&(n.contains&&n.contains(u.el)||!u.el.contains(n)||u.el==n)&&(n=null)}catch(r){n=null}return i&&i==n&&"A"==i.tagName?(u.browser.msie||u.helpers.isMobile())&&(u.selection.info(n).atEnd||u.selection.info(n).atStart)?null:n:null}function h(){var e,t,n,i,r=u.image?u.image.get():null,a=[];if(r)"A"==r.get(0).parentNode.tagName&&a.push(r.get(0).parentNode);else if(u.win.getSelection){var l=u.win.getSelection();if(l.getRangeAt&&l.rangeCount){i=u.doc.createRange();for(var s=0;s<l.rangeCount;++s)if((t=(e=l.getRangeAt(s)).commonAncestorContainer)&&1!=t.nodeType&&(t=t.parentNode),t&&"a"==t.nodeName.toLowerCase())a.push(t);else{n=t.getElementsByTagName("a");for(var o=0;o<n.length;++o)i.selectNodeContents(n[o]),i.compareBoundaryPoints(e.END_TO_START,e)<1&&-1<i.compareBoundaryPoints(e.START_TO_END,e)&&a.push(n[o])}}}else if(u.doc.selection&&"Control"!=u.doc.selection.type)if("a"==(t=(e=u.doc.selection.createRange()).parentElement()).nodeName.toLowerCase())a.push(t);else{n=t.getElementsByTagName("a"),i=u.doc.body.createTextRange();for(var p=0;p<n.length;++p)i.moveToElementText(n[p]),-1<i.compareEndPoints("StartToEnd",e)&&i.compareEndPoints("EndToStart",e)<1&&a.push(n[p])}return a}function m(r){if(u.core.hasFocus()){if(a(),r&&"keyup"===r.type&&(r.altKey||r.which==y.KEYCODE.ALT))return!0;setTimeout(function(){if(!r||r&&(1==r.which||"mouseup"!=r.type)){var e=g(),t=u.image?u.image.get():null;if(e&&!t){if(u.image){var n=u.node.contents(e);if(1==n.length&&"IMG"==n[0].tagName){var i=u.selection.ranges(0);return 0===i.startOffset&&0===i.endOffset?k(e).before(y.MARKERS):k(e).after(y.MARKERS),u.selection.restore(),!1}}r&&r.stopPropagation(),l(e)}}},u.helpers.isIOS()?100:0)}}function l(e){var t=u.popups.get("link.edit");t||(t=function a(){var e="";1<=u.opts.linkEditButtons.length&&("A"==u.el.tagName&&0<=u.opts.linkEditButtons.indexOf("linkRemove")&&u.opts.linkEditButtons.splice(u.opts.linkEditButtons.indexOf("linkRemove"),1),e='<div class="fr-buttons">'.concat(u.button.buildList(u.opts.linkEditButtons),"</div>"));var t={buttons:e},n=u.popups.create("link.edit",t);u.$wp&&u.events.$on(u.$wp,"scroll.link-edit",function(){g()&&u.popups.isVisible("link.edit")&&l(g())});return n}());var n=k(e);u.popups.isVisible("link.edit")||u.popups.refresh("link.edit"),u.popups.setContainer("link.edit",u.$sc);var i=n.offset().left+n.outerWidth()/2,r=n.offset().top+n.outerHeight();u.popups.show("link.edit",i,r,n.outerHeight(),!0)}function a(){u.popups.hide("link.edit")}function o(){var e=u.popups.get("link.insert"),t=g();if(t){var n,i,r=k(t),a=e.find('input.fr-link-attr[type="text"]'),l=e.find('input.fr-link-attr[type="checkbox"]');for(n=0;n<a.length;n++)(i=k(a[n])).val(r.attr(i.attr("name")||""));for(l.attr("checked",!1),n=0;n<l.length;n++)i=k(l[n]),r.attr(i.attr("name"))==i.data("checked")&&i.attr("checked",!0);e.find('input.fr-link-attr[type="text"][name="text"]').val(r.text())}else e.find('input.fr-link-attr[type="text"]').val(""),e.find('input.fr-link-attr[type="checkbox"]').attr("checked",!1),e.find('input.fr-link-attr[type="text"][name="text"]').val(u.selection.text());e.find("input.fr-link-attr").trigger("change"),(u.image?u.image.get():null)?e.find('.fr-link-attr[name="text"]').parent().hide():e.find('.fr-link-attr[name="text"]').parent().show()}function s(e){if(e)return u.popups.onRefresh("link.insert",o),!0;var t="";1<=u.opts.linkInsertButtons.length&&(t='<div class="fr-buttons fr-tabs">'.concat(u.button.buildList(u.opts.linkInsertButtons),"</div>"));var n="",i=0;for(var r in n='<div class="fr-link-insert-layer fr-layer fr-active" id="fr-link-insert-layer-'.concat(u.id,'">'),n+='<div class="fr-input-line"><input id="fr-link-insert-layer-url-'.concat(u.id,'" name="href" type="text" class="fr-link-attr" placeholder="').concat(u.language.translate("URL"),'" tabIndex="').concat(++i,'"></div>'),u.opts.linkText&&(n+='<div class="fr-input-line"><input id="fr-link-insert-layer-text-'.concat(u.id,'" name="text" type="text" class="fr-link-attr" placeholder="').concat(u.language.translate("Text"),'" tabIndex="').concat(++i,'"></div>')),u.opts.linkAttributes)if(u.opts.linkAttributes.hasOwnProperty(r)){var a=u.opts.linkAttributes[r];n+='<div class="fr-input-line"><input name="'.concat(r,'" type="text" class="fr-link-attr" placeholder="').concat(u.language.translate(a),'" tabIndex="').concat(++i,'"></div>')}u.opts.linkAlwaysBlank||(n+='<div class="fr-checkbox-line"><span class="fr-checkbox"><input name="target" class="fr-link-attr" data-checked="_blank" type="checkbox" id="fr-link-target-'.concat(u.id,'" tabIndex="').concat(++i,'"><span>').concat('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 32 32"><path d="M27 4l-15 15-7-7-5 5 12 12 20-20z" fill="#FFF"></path></svg>','</span></span><label id="fr-label-target-').concat(u.id,'">').concat(u.language.translate("Open in new tab"),"</label></div>"));var l={buttons:t,input_layer:n+='<div class="fr-action-buttons"><button class="fr-command fr-submit" role="button" data-cmd="linkInsert" href="#" tabIndex="'.concat(++i,'" type="button">').concat(u.language.translate("Insert"),"</button></div></div>")},s=u.popups.create("link.insert",l);return u.$wp&&u.events.$on(u.$wp,"scroll.link-insert",function(){(u.image?u.image.get():null)&&u.popups.isVisible("link.insert")&&f(),u.popups.isVisible("link.insert")&&c()}),s}function p(e,t,n){if(void 0===n&&(n={}),!1===u.events.trigger("link.beforeInsert",[e,t,n]))return!1;var i=u.image?u.image.get():null;i||"A"==u.el.tagName?"A"==u.el.tagName&&u.$el.focus():(u.selection.restore(),u.popups.hide("link.insert"));var r=e;u.opts.linkConvertEmailAddress&&u.helpers.isEmail(e)&&!/^mailto:.*/i.test(e)&&(e="mailto:".concat(e));if(""===u.opts.linkAutoPrefix||new RegExp("^("+y.LinkProtocols.join("|")+"):.","i").test(e)||/^data:image.*/i.test(e)||/^(https?:|ftps?:|file:|)\/\//i.test(e)||/^([A-Za-z]:(\\){1,2}|[A-Za-z]:((\\){1,2}[^\\]+)+)(\\)?$/i.test(e)||["/","{","[","#","(","."].indexOf((e||"")[0])<0&&(e=u.opts.linkAutoPrefix+e),e=u.helpers.sanitizeURL(e),u.opts.linkAlwaysBlank&&(n.target="_blank"),u.opts.linkAlwaysNoFollow&&(n.rel="nofollow"),u.helpers.isEmail(r)&&(n.target=null,n.rel=null),"_blank"==n.target?(u.opts.linkNoOpener&&(n.rel?n.rel+=" noopener":n.rel="noopener"),u.opts.linkNoReferrer&&(n.rel?n.rel+=" noreferrer":n.rel="noreferrer")):null==n.target&&(n.rel?n.rel=n.rel.replace(/noopener/,"").replace(/noreferrer/,""):n.rel=null),t=t||"",e===u.opts.linkAutoPrefix)return u.popups.get("link.insert").find('input[name="href"]').addClass("fr-error"),u.events.trigger("link.bad",[r]),!1;var a,l=g();if(l){if((a=k(l)).attr("href",e),0<t.length&&a.text()!=t&&!i){for(var s=a.get(0);1===s.childNodes.length&&s.childNodes[0].nodeType==Node.ELEMENT_NODE;)s=s.childNodes[0];k(s).text(t)}for(var o in i||a.prepend(y.START_MARKER).append(y.END_MARKER),n)n[o]?a.attr(o,n[o]):a.removeAttr(o);i||u.selection.restore()}else{i?(i.wrap('<a href="'.concat(e,'"></a>')),u.image.hasCaption()&&i.parent().append(i.parents(".fr-img-caption").find(".fr-inner"))):(u.format.remove("a"),u.selection.isCollapsed()?(t=0===t.length?r:t,u.html.insert('<a href="'.concat(e,'">').concat(y.START_MARKER).concat(t.replace(/&/g,"&amp;").replace(/</,"&lt;",">","&gt;")).concat(y.END_MARKER,"</a>")),u.selection.restore()):0<t.length&&t!=u.selection.text().replace(/\n/g,"")?(u.selection.remove(),u.html.insert('<a href="'.concat(e,'">').concat(y.START_MARKER).concat(t.replace(/&/g,"&amp;")).concat(y.END_MARKER,"</a>")),u.selection.restore()):(!function d(){if(!u.selection.isCollapsed()){u.selection.save();for(var e=u.$el.find(".fr-marker").addClass("fr-unprocessed").toArray();e.length;){var t=k(e.pop());t.removeClass("fr-unprocessed");var n=u.node.deepestParent(t.get(0));if(n){for(var i=t.get(0),r="",a="";i=i.parentNode,u.node.isBlock(i)||(r+=u.node.closeTagString(i),a=u.node.openTagString(i)+a),i!=n;);var l=u.node.openTagString(t.get(0))+t.html()+u.node.closeTagString(t.get(0));t.replaceWith('<span id="fr-break"></span>');var s=n.outerHTML;s=(s=s.replace(/<span id="fr-break"><\/span>/g,r+l+a)).replace(a+r,""),n.outerHTML=s}e=u.$el.find(".fr-marker.fr-unprocessed").toArray()}u.html.cleanEmptyTags(),u.selection.restore()}}(),u.format.apply("a",{href:e})));for(var p=h(),c=0;c<p.length;c++)(a=k(p[c])).attr(n),a.removeAttr("_moz_dirty");1==p.length&&u.$wp&&!i&&(k(p[0]).prepend(y.START_MARKER).append(y.END_MARKER),u.selection.restore())}if(i){var f=u.popups.get("link.insert");f&&f.find("input:focus").blur(),u.image.edit(i)}else m()}function c(){a();var e=g();if(e){var t=u.popups.get("link.insert");t||(t=s()),u.popups.isVisible("link.insert")||(u.popups.refresh("link.insert"),u.selection.save(),u.helpers.isMobile()&&(u.events.disableBlur(),u.$el.blur(),u.events.enableBlur())),u.popups.setContainer("link.insert",u.$sc);var n=(u.image?u.image.get():null)||k(e),i=n.offset().left+n.outerWidth()/2,r=n.offset().top+n.outerHeight();u.popups.show("link.insert",i,r,n.outerHeight(),!0)}}function f(){var e=u.image?u.image.getEl():null;if(e){var t=u.popups.get("link.insert");u.image.hasCaption()&&(e=e.find(".fr-img-wrap")),t||(t=s()),o(),u.popups.setContainer("link.insert",u.$sc);var n=e.offset().left+e.outerWidth()/2,i=e.offset().top+e.outerHeight();u.popups.show("link.insert",n,i,e.outerHeight(),!0)}}return{_init:function e(){u.events.on("keyup",function(e){e.which!=y.KEYCODE.ESC&&m(e)}),u.events.on("window.mouseup",m),u.events.$on(u.$el,"click","a",function(e){u.edit.isDisabled()&&e.preventDefault()}),u.helpers.isMobile()&&u.events.$on(u.$doc,"selectionchange",m),s(!0),"A"==u.el.tagName&&u.$el.addClass("fr-view"),u.events.on("toolbar.esc",function(){if(u.popups.isVisible("link.edit"))return u.events.disableBlur(),u.events.focus(),!1},!0)},remove:function n(){var e=g(),t=u.image?u.image.get():null;if(!1===u.events.trigger("link.beforeRemove",[e]))return!1;t&&e?(t.unwrap(),u.image.edit(t)):e&&(u.selection.save(),k(e).replaceWith(k(e).html()),u.selection.restore(),a())},showInsertPopup:function d(){var e=u.$tb.find('.fr-command[data-cmd="insertLink"]'),t=u.popups.get("link.insert");if(t||(t=s()),!t.hasClass("fr-active"))if(u.popups.refresh("link.insert"),u.popups.setContainer("link.insert",u.$tb||u.$sc),e.isVisible()){var n=u.button.getPosition(e),i=n.left,r=n.top;u.popups.show("link.insert",i,r,e.outerHeight())}else u.position.forSelection(t),u.popups.show("link.insert")},usePredefined:function v(e){var t,n,i=u.opts.linkList[e],r=u.popups.get("link.insert"),a=r.find('input.fr-link-attr[type="text"]'),l=r.find('input.fr-link-attr[type="checkbox"]');for(i.rel&&(r.rel=i.rel),n=0;n<a.length;n++)i[(t=k(a[n])).attr("name")]?(t.val(i[t.attr("name")]),t.toggleClass("fr-not-empty",!0)):"text"!=t.attr("name")&&t.val("");for(n=0;n<l.length;n++)(t=k(l[n])).attr("checked",t.data("checked")==i[t.attr("name")]);u.accessibility.focusPopup(r)},insertCallback:function b(){var e,t,n=u.popups.get("link.insert"),i=n.find('input.fr-link-attr[type="text"]'),r=n.find('input.fr-link-attr[type="checkbox"]'),a=(i.filter('[name="href"]').val()||"").trim(),l=u.opts.linkText?i.filter('[name="text"]').val():"",s={};for(t=0;t<i.length;t++)e=k(i[t]),["href","text"].indexOf(e.attr("name"))<0&&(s[e.attr("name")]=e.val());for(t=0;t<r.length;t++)(e=k(r[t])).is(":checked")?s[e.attr("name")]=e.data("checked"):s[e.attr("name")]=e.data("unchecked")||null;n.rel&&(s.rel=n.rel);var o=u.helpers.scrollTop();p(a,l,s),k(u.o_win).scrollTop(o)},insert:p,update:c,get:g,allSelected:h,back:function t(){u.image&&u.image.get()?u.image.back():(u.events.disableBlur(),u.selection.restore(),u.events.enableBlur(),g()&&u.$wp?(u.selection.restore(),a(),m()):"A"==u.el.tagName?(u.$el.focus(),m()):(u.popups.hide("link.insert"),u.toolbar.showInline()))},imageLink:f,applyStyle:function E(e,t,n){void 0===n&&(n=u.opts.linkMultipleStyles),void 0===t&&(t=u.opts.linkStyles);var i=g();if(!i)return!1;if(!n){var r=Object.keys(t);r.splice(r.indexOf(e),1),k(i).removeClass(r.join(" "))}k(i).toggleClass(e),m()}}},y.DefineIcon("insertLink",{NAME:"link",SVG_KEY:"insertLink"}),y.RegisterShortcut(y.KEYCODE.K,"insertLink",null,"K"),y.RegisterCommand("insertLink",{title:"Insert Link",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("link.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("link.insert")):this.link.showInsertPopup()},plugin:"link"}),y.DefineIcon("linkOpen",{NAME:"external-link",FA5NAME:"external-link-alt",SVG_KEY:"openLink"}),y.RegisterCommand("linkOpen",{title:"Open Link",undo:!1,refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},callback:function(){var e=this.link.get();e&&(-1!==e.href.indexOf("mailto:")?this.o_win.open(e.href).close():(e.target||(e.target="_self"),this.browser.msie||this.browser.edge?this.o_win.open(e.href,e.target):this.o_win.open(e.href,e.target,"noopener")),this.popups.hide("link.edit"))},plugin:"link"}),y.DefineIcon("linkEdit",{NAME:"edit",SVG_KEY:"edit"}),y.RegisterCommand("linkEdit",{title:"Edit Link",undo:!1,refreshAfterCallback:!1,popup:!0,callback:function(){this.link.update()},refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},plugin:"link"}),y.DefineIcon("linkRemove",{NAME:"unlink",SVG_KEY:"unlink"}),y.RegisterCommand("linkRemove",{title:"Unlink",callback:function(){this.link.remove()},refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},plugin:"link"}),y.DefineIcon("linkBack",{NAME:"arrow-left",SVG_KEY:"back"}),y.RegisterCommand("linkBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.link.back()},refresh:function(e){var t=this.link.get()&&this.doc.hasFocus();(this.image?this.image.get():null)||t||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))},plugin:"link"}),y.DefineIcon("linkList",{NAME:"search",SVG_KEY:"search"}),y.RegisterCommand("linkList",{title:"Choose Link",type:"dropdown",focus:!1,undo:!1,refreshAfterCallback:!1,html:function(){for(var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.linkList,n=0;n<t.length;n++)e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="linkList" data-param1="'.concat(n,'">').concat(t[n].displayText||t[n].text,"</a></li>");return e+="</ul>"},callback:function(e,t){this.link.usePredefined(t)},plugin:"link"}),y.RegisterCommand("linkInsert",{focus:!1,refreshAfterCallback:!1,callback:function(){this.link.insertCallback()},refresh:function(e){this.link.get()?e.text(this.language.translate("Update")):e.text(this.language.translate("Insert"))},plugin:"link"}),y.DefineIcon("imageLink",{NAME:"link",SVG_KEY:"insertLink"}),y.RegisterCommand("imageLink",{title:"Insert Link",undo:!1,focus:!1,popup:!0,callback:function(){this.link.imageLink()},refresh:function(e){var t;this.link.get()?((t=e.prev()).hasClass("fr-separator")&&t.removeClass("fr-hidden"),e.addClass("fr-hidden")):((t=e.prev()).hasClass("fr-separator")&&t.addClass("fr-hidden"),e.removeClass("fr-hidden"))},plugin:"link"}),y.DefineIcon("linkStyle",{NAME:"magic",SVG_KEY:"linkStyles"}),y.RegisterCommand("linkStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.linkStyles;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="linkStyle" data-param1="'.concat(n,'">').concat(this.language.translate(t[n]),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.link.applyStyle(t)},refreshOnShow:function(e,t){var n=this.$,i=this.link.get();if(i){var r=n(i);t.find(".fr-command").each(function(){var e=n(this).data("param1"),t=r.hasClass(e);n(this).toggleClass("fr-active",t).attr("aria-selected",t)})}},refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},plugin:"link"})});
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(y){"use strict";y=y&&y.hasOwnProperty("default")?y["default"]:y,Object.assign(y.POPUP_TEMPLATES,{"link.edit":"[_BUTTONS_]","link.insert":"[_BUTTONS_][_INPUT_LAYER_]"}),Object.assign(y.DEFAULTS,{linkEditButtons:["linkOpen","linkStyle","linkEdit","linkRemove"],linkInsertButtons:["linkBack","|","linkList"],linkAttributes:{},linkAutoPrefix:"http://",linkStyles:{"fr-green":"Green","fr-strong":"Thick"},linkMultipleStyles:!0,linkConvertEmailAddress:!0,linkAlwaysBlank:!1,linkAlwaysNoFollow:!1,linkNoOpener:!0,linkNoReferrer:!0,linkList:[{text:"Froala",href:"https://froala.com",target:"_blank"},{text:"Google",href:"https://google.com",target:"_blank"},{displayText:"Facebook",href:"https://facebook.com"}],linkText:!0}),y.PLUGINS.link=function(u){var k=u.$;function g(){var e=u.image?u.image.get():null;if(e||!u.$wp)return"A"==u.el.tagName?u.el:e&&e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?e.get(0).parentNode:void 0;var t=u.selection.ranges(0).commonAncestorContainer;try{t&&(t.contains&&t.contains(u.el)||!u.el.contains(t)||u.el==t)&&(t=null)}catch(r){t=null}if(t&&"A"===t.tagName)return t;var n=u.selection.element(),i=u.selection.endElement();"A"==n.tagName||u.node.isElement(n)||(n=k(n).parentsUntil(u.$el,"a").first().get(0)),"A"==i.tagName||u.node.isElement(i)||(i=k(i).parentsUntil(u.$el,"a").first().get(0));try{i&&(i.contains&&i.contains(u.el)||!u.el.contains(i)||u.el==i)&&(i=null)}catch(r){i=null}try{n&&(n.contains&&n.contains(u.el)||!u.el.contains(n)||u.el==n)&&(n=null)}catch(r){n=null}return i&&i==n&&"A"==i.tagName?(u.browser.msie||u.helpers.isMobile())&&(u.selection.info(n).atEnd||u.selection.info(n).atStart)?null:n:null}function h(){var e,t,n,i,r=u.image?u.image.get():null,a=[];if(r)"A"==r.get(0).parentNode.tagName&&a.push(r.get(0).parentNode);else if(u.win.getSelection){var l=u.win.getSelection();if(l.getRangeAt&&l.rangeCount){i=u.doc.createRange();for(var s=0;s<l.rangeCount;++s)if((t=(e=l.getRangeAt(s)).commonAncestorContainer)&&1!=t.nodeType&&(t=t.parentNode),t&&"a"==t.nodeName.toLowerCase())a.push(t);else{n=t.getElementsByTagName("a");for(var o=0;o<n.length;++o)i.selectNodeContents(n[o]),i.compareBoundaryPoints(e.END_TO_START,e)<1&&-1<i.compareBoundaryPoints(e.START_TO_END,e)&&a.push(n[o])}}}else if(u.doc.selection&&"Control"!=u.doc.selection.type)if("a"==(t=(e=u.doc.selection.createRange()).parentElement()).nodeName.toLowerCase())a.push(t);else{n=t.getElementsByTagName("a"),i=u.doc.body.createTextRange();for(var p=0;p<n.length;++p)i.moveToElementText(n[p]),-1<i.compareEndPoints("StartToEnd",e)&&i.compareEndPoints("EndToStart",e)<1&&a.push(n[p])}return a}function m(r){if(u.core.hasFocus()){if(a(),r&&"keyup"===r.type&&(r.altKey||r.which==y.KEYCODE.ALT))return!0;setTimeout(function(){if(!r||r&&(1==r.which||"mouseup"!=r.type)){var e=g(),t=u.image?u.image.get():null;if(e&&!t){if(u.image){var n=u.node.contents(e);if(1==n.length&&"IMG"==n[0].tagName){var i=u.selection.ranges(0);return 0===i.startOffset&&0===i.endOffset?k(e).before(y.MARKERS):k(e).after(y.MARKERS),u.selection.restore(),!1}}r&&r.stopPropagation(),l(e)}}},u.helpers.isIOS()?100:0)}}function l(e){var t=u.popups.get("link.edit");t||(t=function a(){var e="";1<=u.opts.linkEditButtons.length&&("A"==u.el.tagName&&0<=u.opts.linkEditButtons.indexOf("linkRemove")&&u.opts.linkEditButtons.splice(u.opts.linkEditButtons.indexOf("linkRemove"),1),e='<div class="fr-buttons">'.concat(u.button.buildList(u.opts.linkEditButtons),"</div>"));var t={buttons:e},n=u.popups.create("link.edit",t);u.$wp&&u.events.$on(u.$wp,"scroll.link-edit",function(){g()&&u.popups.isVisible("link.edit")&&l(g())});return n}());var n=k(e);u.popups.isVisible("link.edit")||u.popups.refresh("link.edit"),u.popups.setContainer("link.edit",u.$sc);var i=n.offset().left+n.outerWidth()/2,r=n.offset().top+n.outerHeight();u.popups.show("link.edit",i,r,n.outerHeight(),!0)}function a(){u.popups.hide("link.edit")}function o(){var e=u.popups.get("link.insert"),t=g();if(t){var n,i,r=k(t),a=e.find('input.fr-link-attr[type="text"]'),l=e.find('input.fr-link-attr[type="checkbox"]');for(n=0;n<a.length;n++)(i=k(a[n])).val(r.attr(i.attr("name")||""));for(l.attr("checked",!1),n=0;n<l.length;n++)i=k(l[n]),r.attr(i.attr("name"))==i.data("checked")&&i.attr("checked",!0);e.find('input.fr-link-attr[type="text"][name="text"]').val(r.text())}else e.find('input.fr-link-attr[type="text"]').val(""),e.find('input.fr-link-attr[type="checkbox"]').attr("checked",!1),e.find('input.fr-link-attr[type="text"][name="text"]').val(u.selection.text());e.find("input.fr-link-attr").trigger("change"),(u.image?u.image.get():null)?e.find('.fr-link-attr[name="text"]').parent().hide():e.find('.fr-link-attr[name="text"]').parent().show()}function s(e){if(e)return u.popups.onRefresh("link.insert",o),!0;var t="";1<=u.opts.linkInsertButtons.length&&(t='<div class="fr-buttons fr-tabs">'.concat(u.button.buildList(u.opts.linkInsertButtons),"</div>"));var n="",i=0;for(var r in n='<div class="fr-link-insert-layer fr-layer fr-active" id="fr-link-insert-layer-'.concat(u.id,'">'),n+='<div class="fr-input-line"><input id="fr-link-insert-layer-url-'.concat(u.id,'" name="href" type="text" class="fr-link-attr" placeholder="').concat(u.language.translate("URL"),'" tabIndex="').concat(++i,'"></div>'),u.opts.linkText&&(n+='<div class="fr-input-line"><input id="fr-link-insert-layer-text-'.concat(u.id,'" name="text" type="text" class="fr-link-attr" placeholder="').concat(u.language.translate("Text"),'" tabIndex="').concat(++i,'"></div>')),u.opts.linkAttributes)if(u.opts.linkAttributes.hasOwnProperty(r)){var a=u.opts.linkAttributes[r];n+='<div class="fr-input-line"><input name="'.concat(r,'" type="text" class="fr-link-attr" placeholder="').concat(u.language.translate(a),'" tabIndex="').concat(++i,'"></div>')}u.opts.linkAlwaysBlank||(n+='<div class="fr-checkbox-line"><span class="fr-checkbox"><input name="target" class="fr-link-attr" data-checked="_blank" type="checkbox" id="fr-link-target-'.concat(u.id,'" tabIndex="').concat(++i,'"><span>').concat('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 32 32"><path d="M27 4l-15 15-7-7-5 5 12 12 20-20z" fill="#FFF"></path></svg>','</span></span><label id="fr-label-target-').concat(u.id,'">').concat(u.language.translate("Open in new tab"),"</label></div>"));var l={buttons:t,input_layer:n+='<div class="fr-action-buttons"><button class="fr-command fr-submit" role="button" data-cmd="linkInsert" href="#" tabIndex="'.concat(++i,'" type="button">').concat(u.language.translate("Insert"),"</button></div></div>")},s=u.popups.create("link.insert",l);return u.$wp&&u.events.$on(u.$wp,"scroll.link-insert",function(){(u.image?u.image.get():null)&&u.popups.isVisible("link.insert")&&f(),u.popups.isVisible("link.insert")&&c()}),s}function p(e,t,n){if(void 0===n&&(n={}),!1===u.events.trigger("link.beforeInsert",[e,t,n]))return!1;var i=u.image?u.image.get():null;i||"A"==u.el.tagName?"A"==u.el.tagName&&u.$el.focus():(u.selection.restore(),u.popups.hide("link.insert"));var r=e;u.opts.linkConvertEmailAddress&&u.helpers.isEmail(e)&&!/^mailto:.*/i.test(e)&&(e="mailto:".concat(e));if(""===u.opts.linkAutoPrefix||new RegExp("^("+y.LinkProtocols.join("|")+"):.","i").test(e)||/^data:image.*/i.test(e)||/^(https?:|ftps?:|file:|)\/\//i.test(e)||/^([A-Za-z]:(\\){1,2}|[A-Za-z]:((\\){1,2}[^\\]+)+)(\\)?$/i.test(e)||["/","{","[","#","(","."].indexOf((e||"")[0])<0&&(e=u.opts.linkAutoPrefix+e),e=u.helpers.sanitizeURL(e),u.opts.linkAlwaysBlank&&(n.target="_blank"),u.opts.linkAlwaysNoFollow&&(n.rel="nofollow"),u.helpers.isEmail(r)&&(n.target=null,n.rel=null),"_blank"==n.target?(u.opts.linkNoOpener&&(n.rel?n.rel+=" noopener":n.rel="noopener"),u.opts.linkNoReferrer&&(n.rel?n.rel+=" noreferrer":n.rel="noreferrer")):null==n.target&&(n.rel?n.rel=n.rel.replace(/noopener/,"").replace(/noreferrer/,""):n.rel=null),t=t||"",e===u.opts.linkAutoPrefix)return u.popups.get("link.insert").find('input[name="href"]').addClass("fr-error"),u.events.trigger("link.bad",[r]),!1;var a,l=g();if(l){if((a=k(l)).attr("href",e),0<t.length&&a.text()!=t&&!i){for(var s=a.get(0);1===s.childNodes.length&&s.childNodes[0].nodeType==Node.ELEMENT_NODE;)s=s.childNodes[0];k(s).text(t)}for(var o in i||a.prepend(y.START_MARKER).append(y.END_MARKER),n)n[o]?a.attr(o,n[o]):a.removeAttr(o);i||u.selection.restore()}else{i?(i.wrap('<a href="'.concat(e,'"></a>')),u.image.hasCaption()&&i.parent().append(i.parents(".fr-img-caption").find(".fr-inner"))):(u.format.remove("a"),u.selection.isCollapsed()?(t=0===t.length?r:t,u.html.insert('<a href="'.concat(e,'">').concat(y.START_MARKER).concat(t.replace(/&/g,"&amp;").replace(/</,"&lt;",">","&gt;")).concat(y.END_MARKER,"</a>")),u.selection.restore()):0<t.length&&t!=u.selection.text().replace(/\n/g,"")?(u.selection.remove(),u.html.insert('<a href="'.concat(e,'">').concat(y.START_MARKER).concat(t.replace(/&/g,"&amp;")).concat(y.END_MARKER,"</a>")),u.selection.restore()):(!function d(){if(!u.selection.isCollapsed()){u.selection.save();for(var e=u.$el.find(".fr-marker").addClass("fr-unprocessed").toArray();e.length;){var t=k(e.pop());t.removeClass("fr-unprocessed");var n=u.node.deepestParent(t.get(0));if(n){for(var i=t.get(0),r="",a="";i=i.parentNode,u.node.isBlock(i)||(r+=u.node.closeTagString(i),a=u.node.openTagString(i)+a),i!=n;);var l=u.node.openTagString(t.get(0))+t.html()+u.node.closeTagString(t.get(0));t.replaceWith('<span id="fr-break"></span>');var s=n.outerHTML;s=(s=s.replace(/<span id="fr-break"><\/span>/g,r+l+a)).replace(a+r,""),n.outerHTML=s}e=u.$el.find(".fr-marker.fr-unprocessed").toArray()}u.html.cleanEmptyTags(),u.selection.restore()}}(),u.format.apply("a",{href:e})));for(var p=h(),c=0;c<p.length;c++)(a=k(p[c])).attr(n),a.removeAttr("_moz_dirty");1==p.length&&u.$wp&&!i&&(k(p[0]).prepend(y.START_MARKER).append(y.END_MARKER),u.selection.restore())}if(i){var f=u.popups.get("link.insert");f&&f.find("input:focus").blur(),u.image.edit(i)}else m()}function c(){a();var e=g();if(e){var t=u.popups.get("link.insert");t||(t=s()),u.popups.isVisible("link.insert")||(u.popups.refresh("link.insert"),u.selection.save(),u.helpers.isMobile()&&(u.events.disableBlur(),u.$el.blur(),u.events.enableBlur())),u.popups.setContainer("link.insert",u.$sc);var n=(u.image?u.image.get():null)||k(e),i=n.offset().left+n.outerWidth()/2,r=n.offset().top+n.outerHeight();u.popups.show("link.insert",i,r,n.outerHeight(),!0)}}function f(){var e=u.image?u.image.getEl():null;if(e){var t=u.popups.get("link.insert");u.image.hasCaption()&&(e=e.find(".fr-img-wrap")),t||(t=s()),o(),u.popups.setContainer("link.insert",u.$sc);var n=e.offset().left+e.outerWidth()/2,i=e.offset().top+e.outerHeight();u.popups.show("link.insert",n,i,e.outerHeight(),!0)}}return{_init:function e(){u.events.on("keyup",function(e){e.which!=y.KEYCODE.ESC&&m(e)}),u.events.on("window.mouseup",m),u.events.$on(u.$el,"click","a",function(e){u.edit.isDisabled()&&e.preventDefault()}),u.helpers.isMobile()&&u.events.$on(u.$doc,"selectionchange",m),s(!0),"A"==u.el.tagName&&u.$el.addClass("fr-view"),u.events.on("toolbar.esc",function(){if(u.popups.isVisible("link.edit"))return u.events.disableBlur(),u.events.focus(),!1},!0)},remove:function i(){var e=g(),t=u.image?u.image.get():null;if(!1===u.events.trigger("link.beforeRemove",[e]))return!1;if(t&&e)if(u.image.hasCaption()){t.addClass("img-link-caption"),k(e).replaceWith(k(e).html());var n=document.querySelectorAll("img.img-link-caption");u.image.edit(k(n[0])),k(n[0]).removeClass("img-link-caption")}else t.unwrap(),u.image.edit(t);else e&&(u.selection.save(),k(e).replaceWith(k(e).html()),u.selection.restore(),a())},showInsertPopup:function d(){var e=u.$tb.find('.fr-command[data-cmd="insertLink"]'),t=u.popups.get("link.insert");if(t||(t=s()),!t.hasClass("fr-active"))if(u.popups.refresh("link.insert"),u.popups.setContainer("link.insert",u.$tb||u.$sc),e.isVisible()){var n=u.button.getPosition(e),i=n.left,r=n.top;u.popups.show("link.insert",i,r,e.outerHeight())}else u.position.forSelection(t),u.popups.show("link.insert")},usePredefined:function v(e){var t,n,i=u.opts.linkList[e],r=u.popups.get("link.insert"),a=r.find('input.fr-link-attr[type="text"]'),l=r.find('input.fr-link-attr[type="checkbox"]');for(i.rel&&(r.rel=i.rel),n=0;n<a.length;n++)i[(t=k(a[n])).attr("name")]?(t.val(i[t.attr("name")]),t.toggleClass("fr-not-empty",!0)):"text"!=t.attr("name")&&t.val("");for(n=0;n<l.length;n++)(t=k(l[n])).attr("checked",t.data("checked")==i[t.attr("name")]);u.accessibility.focusPopup(r)},insertCallback:function b(){var e,t,n=u.popups.get("link.insert"),i=n.find('input.fr-link-attr[type="text"]'),r=n.find('input.fr-link-attr[type="checkbox"]'),a=(i.filter('[name="href"]').val()||"").trim(),l=u.opts.linkText?i.filter('[name="text"]').val():"",s={};for(t=0;t<i.length;t++)e=k(i[t]),["href","text"].indexOf(e.attr("name"))<0&&(s[e.attr("name")]=e.val());for(t=0;t<r.length;t++)(e=k(r[t])).is(":checked")?s[e.attr("name")]=e.data("checked"):s[e.attr("name")]=e.data("unchecked")||null;n.rel&&(s.rel=n.rel);var o=u.helpers.scrollTop();p(a,l,s),k(u.o_win).scrollTop(o)},insert:p,update:c,get:g,allSelected:h,back:function t(){u.image&&u.image.get()?u.image.back():(u.events.disableBlur(),u.selection.restore(),u.events.enableBlur(),g()&&u.$wp?(u.selection.restore(),a(),m()):"A"==u.el.tagName?(u.$el.focus(),m()):(u.popups.hide("link.insert"),u.toolbar.showInline()))},imageLink:f,applyStyle:function E(e,t,n){void 0===n&&(n=u.opts.linkMultipleStyles),void 0===t&&(t=u.opts.linkStyles);var i=g();if(!i)return!1;if(!n){var r=Object.keys(t);r.splice(r.indexOf(e),1),k(i).removeClass(r.join(" "))}k(i).toggleClass(e),m()}}},y.DefineIcon("insertLink",{NAME:"link",SVG_KEY:"insertLink"}),y.RegisterShortcut(y.KEYCODE.K,"insertLink",null,"K"),y.RegisterCommand("insertLink",{title:"Insert Link",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("link.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("link.insert")):this.link.showInsertPopup()},plugin:"link"}),y.DefineIcon("linkOpen",{NAME:"external-link",FA5NAME:"external-link-alt",SVG_KEY:"openLink"}),y.RegisterCommand("linkOpen",{title:"Open Link",undo:!1,refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},callback:function(){var e=this.link.get();e&&(-1!==e.href.indexOf("mailto:")?this.o_win.open(e.href).close():(e.target||(e.target="_self"),this.browser.msie||this.browser.edge?this.o_win.open(e.href,e.target):this.o_win.open(e.href,e.target,"noopener")),this.popups.hide("link.edit"))},plugin:"link"}),y.DefineIcon("linkEdit",{NAME:"edit",SVG_KEY:"edit"}),y.RegisterCommand("linkEdit",{title:"Edit Link",undo:!1,refreshAfterCallback:!1,popup:!0,callback:function(){this.link.update()},refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},plugin:"link"}),y.DefineIcon("linkRemove",{NAME:"unlink",SVG_KEY:"unlink"}),y.RegisterCommand("linkRemove",{title:"Unlink",callback:function(){this.link.remove()},refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},plugin:"link"}),y.DefineIcon("linkBack",{NAME:"arrow-left",SVG_KEY:"back"}),y.RegisterCommand("linkBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.link.back()},refresh:function(e){var t=this.link.get()&&this.doc.hasFocus();(this.image?this.image.get():null)||t||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))},plugin:"link"}),y.DefineIcon("linkList",{NAME:"search",SVG_KEY:"search"}),y.RegisterCommand("linkList",{title:"Choose Link",type:"dropdown",focus:!1,undo:!1,refreshAfterCallback:!1,html:function(){for(var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.linkList,n=0;n<t.length;n++)e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="linkList" data-param1="'.concat(n,'">').concat(t[n].displayText||t[n].text,"</a></li>");return e+="</ul>"},callback:function(e,t){this.link.usePredefined(t)},plugin:"link"}),y.RegisterCommand("linkInsert",{focus:!1,refreshAfterCallback:!1,callback:function(){this.link.insertCallback()},refresh:function(e){this.link.get()?e.text(this.language.translate("Update")):e.text(this.language.translate("Insert"))},plugin:"link"}),y.DefineIcon("imageLink",{NAME:"link",SVG_KEY:"insertLink"}),y.RegisterCommand("imageLink",{title:"Insert Link",undo:!1,focus:!1,popup:!0,callback:function(){this.link.imageLink()},refresh:function(e){var t;this.link.get()?((t=e.prev()).hasClass("fr-separator")&&t.removeClass("fr-hidden"),e.addClass("fr-hidden")):((t=e.prev()).hasClass("fr-separator")&&t.addClass("fr-hidden"),e.removeClass("fr-hidden"))},plugin:"link"}),y.DefineIcon("linkStyle",{NAME:"magic",SVG_KEY:"linkStyles"}),y.RegisterCommand("linkStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.linkStyles;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="linkStyle" data-param1="'.concat(n,'">').concat(this.language.translate(t[n]),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.link.applyStyle(t)},refreshOnShow:function(e,t){var n=this.$,i=this.link.get();if(i){var r=n(i);t.find(".fr-command").each(function(){var e=n(this).data("param1"),t=r.hasClass(e);n(this).toggleClass("fr-active",t).attr("aria-selected",t)})}},refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},plugin:"link"})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 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(f){"use strict";f=f&&f.hasOwnProperty("default")?f["default"]:f,Object.assign(f.DEFAULTS,{listAdvancedTypes:!0}),f.PLUGINS.lists=function(p){var d=p.$;function g(e){return'<span class="fr-open-'.concat(e.toLowerCase(),'"></span>')}function m(e){return'<span class="fr-close-'.concat(e.toLowerCase(),'"></span>')}function o(e,t){!function c(e,t){for(var a=[],n=0;n<e.length;n++){var r=e[n].parentNode;"LI"==e[n].tagName&&r.tagName!=t&&a.indexOf(r)<0&&a.push(r)}for(var o=a.length-1;0<=o;o--){var i=d(a[o]);i.replaceWith("<".concat(t.toLowerCase()," ").concat(p.node.attributes(i.get(0)),">").concat(i.html(),"</").concat(t.toLowerCase(),">"))}}(e,t);var a,n=p.html.defaultTag(),r=null;e.length&&(a="rtl"==p.opts.direction||"rtl"==d(e[0]).css("direction")?"margin-right":"margin-left");for(var o=0;o<e.length;o++)if("TD"!=e[o].tagName&&"TH"!=e[o].tagName&&"LI"!=e[o].tagName){var i=p.helpers.getPX(d(e[o]).css(a))||0;(e[o].style.marginLeft=null)===r&&(r=i);var s=0<r?"<".concat(t,' style="').concat(a,": ").concat(r,'px ">'):"<".concat(t,">"),l="</".concat(t,">");for(i-=r;0<i/p.opts.indentMargin;)s+="</".concat(t,">"),l+=l,i-=p.opts.indentMargin;n&&e[o].tagName.toLowerCase()==n?d(e[o]).replaceWith("".concat(s,"<li").concat(p.node.attributes(e[o]),">").concat(d(e[o]).html(),"</li>").concat(l)):d(e[o]).wrap("".concat(s,"<li></li>").concat(l))}p.clean.lists()}function i(e){var t,a;for(t=e.length-1;0<=t;t--)for(a=t-1;0<=a;a--)if(d(e[a]).find(e[t]).length||e[a]==e[t]){e.splice(t,1);break}var n=[];for(t=0;t<e.length;t++){var r=d(e[t]),o=e[t].parentNode,i=r.attr("class");if(r.before(m(o.tagName)),"LI"==o.parentNode.tagName)r.before(m("LI")),r.after(g("LI"));else{var s="";i&&(s+=' class="'.concat(i,'"'));var l="rtl"==p.opts.direction||"rtl"==r.css("direction")?"margin-right":"margin-left";p.helpers.getPX(d(o).css(l))&&0<=(d(o).attr("style")||"").indexOf("".concat(l,":"))&&(s+=' style="'.concat(l,":").concat(p.helpers.getPX(d(o).css(l)),'px;"')),p.html.defaultTag()&&0===r.find(p.html.blockTagsQuery()).length&&r.wrapInner(p.html.defaultTag()+s),p.node.isEmpty(r.get(0),!0)||0!==r.find(p.html.blockTagsQuery()).length||r.append("<br>"),r.append(g("LI")),r.prepend(m("LI"))}r.after(g(o.tagName)),"LI"==o.parentNode.tagName&&(o=o.parentNode.parentNode),n.indexOf(o)<0&&n.push(o)}for(t=0;t<n.length;t++){var c=d(n[t]),f=c.html();f=(f=f.replace(/<span class="fr-close-([a-z]*)"><\/span>/g,"</$1>")).replace(/<span class="fr-open-([a-z]*)"><\/span>/g,"<$1>"),c.replaceWith(p.node.openTagString(c.get(0))+f+p.node.closeTagString(c.get(0)))}p.$el.find("li:empty").remove(),p.$el.find("ul:empty, ol:empty").remove(),p.clean.lists(),p.html.wrap()}function s(e){p.selection.save();for(var t=0;t<e.length;t++){var a=e[t].previousSibling;if(a){var n=d(e[t]).find("> ul, > ol").last().get(0);if(n){var r=d(document.createElement("li"));d(n).prepend(r);for(var o=p.node.contents(e[t])[0];o&&!p.node.isList(o);){var i=o.nextSibling;r.append(o),o=i}d(a).append(d(n)),d(e[t]).remove()}else{var s=d(a).find("> ul, > ol").last().get(0);if(s)d(s).append(d(e[t]));else{var l=d("<".concat(e[t].parentNode.tagName,">"));d(a).append(l),l.append(d(e[t]))}}}}p.clean.lists(),p.selection.restore()}function l(e){p.selection.save(),i(e),p.selection.restore()}function e(e){if("indent"==e||"outdent"==e){var t=!1,a=p.selection.blocks(),n=[],r=a[0].previousSibling||a[0].parentElement;if("outdent"==e){if("LI"==r.tagName||"LI"!=r.parentNode.tagName)return}else if(!a[0].previousSibling||"LI"!=a[0].previousSibling.tagName)return;for(var o=0;o<a.length;o++)"LI"==a[o].tagName?(t=!0,n.push(a[o])):"LI"==a[o].parentNode.tagName&&(t=!0,n.push(a[o].parentNode));t&&("indent"==e?s(n):l(n))}}return{_init:function t(){p.events.on("commands.after",e),p.events.on("keydown",function(e){if(e.which==f.KEYCODE.TAB){for(var t=p.selection.blocks(),a=[],n=0;n<t.length;n++)"LI"==t[n].tagName?a.push(t[n]):"LI"==t[n].parentNode.tagName&&a.push(t[n].parentNode);if(1<a.length||a.length&&(p.selection.info(a[0]).atStart||p.node.isEmpty(a[0])))return e.preventDefault(),e.stopPropagation(),e.shiftKey?l(a):s(a),!1}},!0)},format:function c(e,t){var a,n;for(p.html.syncInputs(),p.selection.save(),p.html.wrap(!0,!0,!0,!0),p.selection.restore(),n=p.selection.blocks(!0),a=0;a<n.length;a++)"LI"!=n[a].tagName&&"LI"==n[a].parentNode.tagName&&(n[a]=n[a].parentNode);if(p.selection.save(),function r(e,t){for(var a=!0,n=0;n<e.length;n++){if("LI"!=e[n].tagName)return!1;e[n].parentNode.tagName!=t&&(a=!1)}return a}(n,e)?t||i(n):o(n,e),p.html.unwrap(),p.selection.restore(),t=t||"default"){for(n=p.selection.blocks(),a=0;a<n.length;a++)"LI"!=n[a].tagName&&"LI"==n[a].parentNode.tagName&&(n[a]=n[a].parentNode);for(a=0;a<n.length;a++)"LI"==n[a].tagName&&(d(n[a].parentNode).css("list-style-type","default"===t?"":t),0===(d(n[a].parentNode).attr("style")||"").length&&d(n[a].parentNode).removeAttr("style"))}},refresh:function r(e,t){var a=d(p.selection.element());if(a.get(0)!=p.el){var n=a.get(0);(n="LI"!=n.tagName&&n.firstElementChild&&"LI"!=n.firstElementChild.tagName?a.parents("li").get(0):"LI"==n.tagName||n.firstElementChild?n.firstElementChild&&"LI"==n.firstElementChild.tagName?a.get(0).firstChild:a.get(0):a.parents("li").get(0))&&n.parentNode.tagName==t&&p.el.contains(n.parentNode)&&e.addClass("fr-active")}}}},f.DefineIcon("formatOLSimple",{NAME:"list-ol",SVG_KEY:"orderedList"}),f.RegisterCommand("formatOLSimple",{title:"Ordered List",type:"button",options:{"default":"Default",circle:"Circle",disc:"Disc",square:"Square"},refresh:function(e){this.lists.refresh(e,"OL")},callback:function(e,t){this.lists.format("OL",t)},plugin:"lists"}),f.RegisterCommand("formatUL",{title:"Unordered List",type:"button",hasOptions:function(){return this.opts.listAdvancedTypes},options:{"default":"Default",circle:"Circle",disc:"Disc",square:"Square"},refresh:function(e){this.lists.refresh(e,"UL")},callback:function(e,t){this.lists.format("UL",t)},plugin:"lists"}),f.RegisterCommand("formatOL",{title:"Ordered List",hasOptions:function(){return this.opts.listAdvancedTypes},options:{"default":"Default","lower-alpha":"Lower Alpha","lower-greek":"Lower Greek","lower-roman":"Lower Roman","upper-alpha":"Upper Alpha","upper-roman":"Upper Roman"},refresh:function(e){this.lists.refresh(e,"OL")},callback:function(e,t){this.lists.format("OL",t)},plugin:"lists"}),f.DefineIcon("formatUL",{NAME:"list-ul",SVG_KEY:"unorderedList"}),f.DefineIcon("formatOL",{NAME:"list-ol",SVG_KEY:"orderedList"})});
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(p){"use strict";p=p&&p.hasOwnProperty("default")?p["default"]:p,Object.assign(p.DEFAULTS,{listAdvancedTypes:!0}),p.PLUGINS.lists=function(d){var f=d.$;function g(e){return'<span class="fr-open-'.concat(e.toLowerCase(),'"></span>')}function m(e){return'<span class="fr-close-'.concat(e.toLowerCase(),'"></span>')}function o(e,t){!function c(e,t){for(var n=[],a=0;a<e.length;a++){var r=e[a].parentNode;"LI"==e[a].tagName&&r.tagName!=t&&n.indexOf(r)<0&&n.push(r)}for(var o=n.length-1;0<=o;o--){var i=f(n[o]);i.replaceWith("<".concat(t.toLowerCase()," ").concat(d.node.attributes(i.get(0)),">").concat(i.html(),"</").concat(t.toLowerCase(),">"))}}(e,t);var n,a=d.html.defaultTag(),r=null;e.length&&(n="rtl"==d.opts.direction||"rtl"==f(e[0]).css("direction")?"margin-right":"margin-left");for(var o=0;o<e.length;o++)if("TD"!=e[o].tagName&&"TH"!=e[o].tagName&&"LI"!=e[o].tagName){var i=d.helpers.getPX(f(e[o]).css(n))||0;(e[o].style.marginLeft=null)===r&&(r=i);var l=0<r?"<".concat(t,' style="').concat(n,": ").concat(r,'px ">'):"<".concat(t,">"),s="</".concat(t,">");for(i-=r;0<i/d.opts.indentMargin;)l+="</".concat(t,">"),s+=s,i-=d.opts.indentMargin;a&&e[o].tagName.toLowerCase()==a?f(e[o]).replaceWith("".concat(l,"<li").concat(d.node.attributes(e[o]),">").concat(f(e[o]).html(),"</li>").concat(s)):f(e[o]).wrap("".concat(l,"<li></li>").concat(s))}d.clean.lists()}function i(e){var t,n;for(t=e.length-1;0<=t;t--)for(n=t-1;0<=n;n--)if(f(e[n]).find(e[t]).length||e[n]==e[t]){e.splice(t,1);break}var a=[];for(t=0;t<e.length;t++){var r=f(e[t]),o=e[t].parentNode,i=r.attr("class");if(r.before(m(o.tagName)),"LI"==o.parentNode.tagName)r.before(m("LI")),r.after(g("LI"));else{var l="";i&&(l+=' class="'.concat(i,'"'));var s="rtl"==d.opts.direction||"rtl"==r.css("direction")?"margin-right":"margin-left";d.helpers.getPX(f(o).css(s))&&0<=(f(o).attr("style")||"").indexOf("".concat(s,":"))&&(l+=' style="'.concat(s,":").concat(d.helpers.getPX(f(o).css(s)),'px;"')),d.html.defaultTag()&&0===r.find(d.html.blockTagsQuery()).length&&r.wrapInner(d.html.defaultTag()+l),d.node.isEmpty(r.get(0),!0)||0!==r.find(d.html.blockTagsQuery()).length||r.append("<br>"),r.append(g("LI")),r.prepend(m("LI"))}r.after(g(o.tagName)),"LI"==o.parentNode.tagName&&(o=o.parentNode.parentNode),a.indexOf(o)<0&&a.push(o)}for(t=0;t<a.length;t++){var c=f(a[t]),p=c.html();p=(p=p.replace(/<span class="fr-close-([a-z]*)"><\/span>/g,"</$1>")).replace(/<span class="fr-open-([a-z]*)"><\/span>/g,"<$1>"),c.replaceWith(d.node.openTagString(c.get(0))+p+d.node.closeTagString(c.get(0)))}d.$el.find("li:empty").remove(),d.$el.find("ul:empty, ol:empty").remove(),d.clean.lists(),d.$el.find("ul:empty, ol:empty").remove(),d.html.wrap()}function s(e){d.selection.save();for(var t=0;t<e.length;t++){var n=e[t].previousSibling;if(n){var a=f(e[t]).find("> ul, > ol").last().get(0);if(a){var r=f(document.createElement("li"));f(a).prepend(r);for(var o=d.node.contents(e[t])[0];o&&!d.node.isList(o);){var i=o.nextSibling;r.append(o),o=i}f(n).append(f(a)),f(e[t]).remove()}else{var l=f(n).find("> ul, > ol").last().get(0);if(l)f(l).append(f(e[t]));else{var s=f("<".concat(e[t].parentNode.tagName,">"));f(n).append(s),s.append(f(e[t]))}}}}d.clean.lists(),d.selection.restore()}function c(e){d.selection.save(),i(e),d.selection.restore()}function e(e){if("indent"==e||"outdent"==e){var t=!1,n=d.selection.blocks(),a=[],r=n[0].previousSibling||n[0].parentElement;if("outdent"==e){if("UL"!=r.parentNode.tagName&&"OL"!=r.parentNode.tagName&&"LI"!=r.parentNode.tagName)return;if(!n[0].previousSibling&&"none"==r.parentNode.style.listStyleType)return void function i(e){for(d.selection.save();0<e.childNodes.length;)e.parentNode.parentNode.append(e.childNodes[0]);d.clean.lists(),d.selection.restore()}(r)}else{if("UL"!=r.parentNode.tagName&&"OL"!=r.parentNode.tagName&&"LI"!=r.parentNode.tagName)return;if(!n[0].previousSibling||"LI"!=n[0].previousSibling.tagName)return void function l(e){d.selection.save();for(var t="OL"==e.tagName?document.createElement("ol"):document.createElement("ul");0<e.childNodes.length;)t.append(e.childNodes[0]);var n=document.createElement("li");t.style.listStyleType="none",t.append(n),e.append(t),d.clean.lists(),d.selection.restore()}(r)}for(var o=0;o<n.length;o++)"LI"==n[o].tagName?(t=!0,a.push(n[o])):"LI"==n[o].parentNode.tagName&&(t=!0,a.push(n[o].parentNode));t&&("indent"==e?s(a):c(a))}}return{_init:function t(){d.events.on("commands.after",e),d.events.on("keydown",function(e){if(e.which==p.KEYCODE.TAB){for(var t=d.selection.blocks(),n=[],a=0;a<t.length;a++)"LI"==t[a].tagName?n.push(t[a]):"LI"==t[a].parentNode.tagName&&n.push(t[a].parentNode);if(1<n.length||n.length&&(d.selection.info(n[0]).atStart||d.node.isEmpty(n[0])))return e.preventDefault(),e.stopPropagation(),e.shiftKey?c(n):s(n),!1}},!0)},format:function l(e,t){var n,a;for(d.html.syncInputs(),d.selection.save(),d.html.wrap(!0,!0,!0,!0),d.selection.restore(),a=d.selection.blocks(!0),n=0;n<a.length;n++)"LI"!=a[n].tagName&&"LI"==a[n].parentNode.tagName&&(a[n]=a[n].parentNode);if(d.selection.save(),function r(e,t){for(var n=!0,a=0;a<e.length;a++){if("LI"!=e[a].tagName)return!1;e[a].parentNode.tagName!=t&&(n=!1)}return n}(a,e)?t||i(a):o(a,e),d.html.unwrap(),d.selection.restore(),t=t||"default"){for(a=d.selection.blocks(),n=0;n<a.length;n++)"LI"!=a[n].tagName&&"LI"==a[n].parentNode.tagName&&(a[n]=a[n].parentNode);for(n=0;n<a.length;n++)"LI"==a[n].tagName&&(f(a[n].parentNode).css("list-style-type","default"===t?"":t),0===(f(a[n].parentNode).attr("style")||"").length&&f(a[n].parentNode).removeAttr("style"))}},refresh:function r(e,t){var n=f(d.selection.element());if(n.get(0)!=d.el){var a=n.get(0);(a="LI"!=a.tagName&&a.firstElementChild&&"LI"!=a.firstElementChild.tagName?n.parents("li").get(0):"LI"==a.tagName||a.firstElementChild?a.firstElementChild&&"LI"==a.firstElementChild.tagName?n.get(0).firstChild:n.get(0):n.parents("li").get(0))&&a.parentNode.tagName==t&&d.el.contains(a.parentNode)&&e.addClass("fr-active")}}}},p.DefineIcon("formatOLSimple",{NAME:"list-ol",SVG_KEY:"orderedList"}),p.RegisterCommand("formatOLSimple",{title:"Ordered List",type:"button",options:{"default":"Default",circle:"Circle",disc:"Disc",square:"Square"},refresh:function(e){this.lists.refresh(e,"OL")},callback:function(e,t){this.lists.format("OL",t)},plugin:"lists"}),p.RegisterCommand("formatUL",{title:"Unordered List",type:"button",hasOptions:function(){return this.opts.listAdvancedTypes},options:{"default":"Default",circle:"Circle",disc:"Disc",square:"Square"},refresh:function(e){this.lists.refresh(e,"UL")},callback:function(e,t){this.lists.format("UL",t)},plugin:"lists"}),p.RegisterCommand("formatOL",{title:"Ordered List",hasOptions:function(){return this.opts.listAdvancedTypes},options:{"default":"Default","lower-alpha":"Lower Alpha","lower-greek":"Lower Greek","lower-roman":"Lower Roman","upper-alpha":"Upper Alpha","upper-roman":"Upper Roman"},refresh:function(e){this.lists.refresh(e,"OL")},callback:function(e,t){this.lists.format("OL",t)},plugin:"lists"}),p.DefineIcon("formatUL",{NAME:"list-ul",SVG_KEY:"unorderedList"}),p.DefineIcon("formatOL",{NAME:"list-ol",SVG_KEY:"orderedList"})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
- !function(a,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(a.FroalaEditor)}(this,function(a){"use strict";a=a&&a.hasOwnProperty("default")?a["default"]:a,Object.assign(a.DEFAULTS,{paragraphFormat:{N:"Normal",H1:"Heading 1",H2:"Heading 2",H3:"Heading 3",H4:"Heading 4",PRE:"Code"},paragraphFormatSelection:!1,paragraphDefaultSelection:"Paragraph Format"}),a.PLUGINS.paragraphFormat=function(h){var f=h.$;function g(a,t){var e=h.html.defaultTag();if(t&&t.toLowerCase()!=e)if(0<a.find("ul, ol").length){var r=f("<"+t+">");a.prepend(r);for(var n=h.node.contents(a.get(0))[0];n&&["UL","OL"].indexOf(n.tagName)<0;){var o=n.nextSibling;r.append(n),n=o}}else a.html("<"+t+">"+a.html()+"</"+t+">")}return{apply:function c(a){"N"==a&&(a=h.html.defaultTag()),h.selection.save(),h.html.wrap(!0,!0,!h.opts.paragraphFormat.BLOCKQUOTE,!0,!0),h.selection.restore();var t,e,r,n,o,i,l,p,s=h.selection.blocks();h.selection.save(),h.$el.find("pre").attr("skip",!0);for(var d=0;d<s.length;d++)if(s[d].tagName!=a&&!h.node.isList(s[d])){var m=f(s[d]);"LI"==s[d].tagName?g(m,a):"LI"==s[d].parentNode.tagName&&s[d]?(i=m,l=a,p=h.html.defaultTag(),l&&l.toLowerCase()!=p||(l='div class="fr-temp-div"'),i.replaceWith(f("<"+l+">").html(i.html()))):0<=["TD","TH"].indexOf(s[d].parentNode.tagName)?(r=m,n=a,o=h.html.defaultTag(),n||(n='div class="fr-temp-div"'+(h.node.isEmpty(r.get(0),!0)?' data-empty="true"':"")),n.toLowerCase()==o?(h.node.isEmpty(r.get(0),!0)||r.append("<br/>"),r.replaceWith(r.html())):r.replaceWith(f("<"+n+">").html(r.html()))):(t=m,(e=a)||(e='div class="fr-temp-div"'+(h.node.isEmpty(t.get(0),!0)?' data-empty="true"':"")),"H1"!=e&&"H2"!=e&&"H3"!=e&&"H4"!=e&&"H5"!=e||!h.node.attributes(t.get(0)).includes("font-size:")?t.replaceWith(f("<"+e+" "+h.node.attributes(t.get(0))+">").html(t.html()).removeAttr("data-empty")):t.replaceWith(f("<"+e+" "+h.node.attributes(t.get(0)).replace(/font-size:[0-9]+px;?/,"")+">").html(t.html()).removeAttr("data-empty")))}h.$el.find('pre:not([skip="true"]) + pre:not([skip="true"])').each(function(){f(this).prev().append("<br>"+f(this).html()),f(this).remove()}),h.$el.find("pre").removeAttr("skip"),h.html.unwrap(),h.selection.restore()},refreshOnShow:function i(a,t){var e=h.selection.blocks();if(e.length){var r=e[0],n="N",o=h.html.defaultTag();r.tagName.toLowerCase()!=o&&r!=h.el&&(n=r.tagName),t.find('.fr-command[data-param1="'+n+'"]').addClass("fr-active").attr("aria-selected",!0)}else t.find('.fr-command[data-param1="N"]').addClass("fr-active").attr("aria-selected",!0)},refresh:function o(a){if(h.opts.paragraphFormatSelection){var t=h.selection.blocks();if(t.length){var e=t[0],r="N",n=h.html.defaultTag();e.tagName.toLowerCase()!=n&&e!=h.el&&(r=e.tagName),0<=["LI","TD","TH"].indexOf(r)&&(r="N"),a.find(">span").text(h.language.translate(h.opts.paragraphFormat[r]))}else a.find(">span").text(h.language.translate(h.opts.paragraphFormat.N))}}}},a.RegisterCommand("paragraphFormat",{type:"dropdown",displaySelection:function(a){return a.opts.paragraphFormatSelection},defaultSelection:function(a){return a.language.translate(a.opts.paragraphDefaultSelection)},displaySelectionWidth:80,html:function(){var a='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.paragraphFormat;for(var e in t)if(t.hasOwnProperty(e)){var r=this.shortcuts.get("paragraphFormat."+e);r=r?'<span class="fr-shortcut">'+r+"</span>":"",a+='<li role="presentation"><'+("N"==e?this.html.defaultTag()||"DIV":e)+' style="padding: 0 !important; margin: 0 !important;" role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="paragraphFormat" data-param1="'+e+'" title="'+this.language.translate(t[e])+'">'+this.language.translate(t[e])+"</a></"+("N"==e?this.html.defaultTag()||"DIV":e)+"></li>"}return a+="</ul>"},title:"Paragraph Format",callback:function(a,t){this.paragraphFormat.apply(t)},refresh:function(a){this.paragraphFormat.refresh(a)},refreshOnShow:function(a,t){this.paragraphFormat.refreshOnShow(a,t)},plugin:"paragraphFormat"}),a.DefineIcon("paragraphFormat",{NAME:"paragraph",SVG_KEY:"paragraphFormat"})});
7
+ !function(a,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(a.FroalaEditor)}(this,function(a){"use strict";a=a&&a.hasOwnProperty("default")?a["default"]:a,Object.assign(a.DEFAULTS,{paragraphFormat:{N:"Normal",H1:"Heading 1",H2:"Heading 2",H3:"Heading 3",H4:"Heading 4",PRE:"Code"},paragraphFormatSelection:!1,paragraphDefaultSelection:"Paragraph Format"}),a.PLUGINS.paragraphFormat=function(h){var f=h.$;function g(a,t){var e=h.html.defaultTag();if(t&&t.toLowerCase()!=e)if(0<a.find("ul, ol").length){var r=f("<"+t+">");a.prepend(r);for(var n=h.node.contents(a.get(0))[0];n&&["UL","OL"].indexOf(n.tagName)<0;){var o=n.nextSibling;r.append(n),n=o}}else a.html("<"+t+">"+a.html()+"</"+t+">")}return{apply:function c(a){"N"==a&&(a=h.html.defaultTag()),h.selection.save(),h.html.wrap(!0,!0,!h.opts.paragraphFormat.BLOCKQUOTE,!0,!0),h.selection.restore();var t,e,r,n,o,i,p,l,s=h.selection.blocks();h.selection.save(),h.$el.find("pre").attr("skip",!0);for(var m=0;m<s.length;m++)if(s[m].tagName!=a&&!h.node.isList(s[m])){var d=f(s[m]);"LI"==s[m].tagName?g(d,a):"LI"==s[m].parentNode.tagName&&s[m]?(i=d,p=a,l=h.html.defaultTag(),p&&p.toLowerCase()!=l||(p='div class="fr-temp-div"'),i.replaceWith(f("<"+p+">").html(i.html()))):0<=["TD","TH"].indexOf(s[m].parentNode.tagName)?(r=d,n=a,o=h.html.defaultTag(),n||(n='div class="fr-temp-div"'+(h.node.isEmpty(r.get(0),!0)?' data-empty="true"':"")),n.toLowerCase()==o?(h.node.isEmpty(r.get(0),!0)||r.append("<br/>"),r.replaceWith(r.html())):r.replaceWith(f("<"+n+">").html(r.html()))):(t=d,(e=a)||(e='div class="fr-temp-div"'+(h.node.isEmpty(t.get(0),!0)?' data-empty="true"':"")),"H1"!=e&&"H2"!=e&&"H3"!=e&&"H4"!=e&&"H5"!=e||!h.node.attributes(t.get(0)).includes("font-size:")?t.replaceWith(f("<"+e+" "+h.node.attributes(t.get(0))+">").html(t.html()).removeAttr("data-empty")):t.replaceWith(f("<"+e+" "+h.node.attributes(t.get(0)).replace(/font-size:[0-9]+px;?/,"")+">").html(t.html()).removeAttr("data-empty")))}h.$el.find('pre:not([skip="true"]) + pre:not([skip="true"])').each(function(){f(this).prev().append("<br>"+f(this).html()),f(this).remove()}),h.$el.find("pre").removeAttr("skip"),h.html.unwrap(),h.selection.restore()},refreshOnShow:function i(a,t){var e=h.selection.blocks();if(e.length){var r=e[0],n="N",o=h.html.defaultTag();r.tagName.toLowerCase()!=o&&r!=h.el&&(n=r.tagName),t.find('.fr-command[data-param1="'+n+'"]').addClass("fr-active").attr("aria-selected",!0)}else t.find('.fr-command[data-param1="N"]').addClass("fr-active").attr("aria-selected",!0)},refresh:function o(a){if(h.opts.paragraphFormatSelection){var t=h.selection.blocks();if(t.length){var e=t[0],r="N",n=h.html.defaultTag();e.tagName.toLowerCase()!=n&&e!=h.el&&(r=e.tagName),0<=["LI","TD","TH"].indexOf(r)&&(r="N"),a.find(">span").text(h.language.translate(h.opts.paragraphFormat[r]))}else a.find(">span").text(h.language.translate(h.opts.paragraphFormat.N))}}}},a.RegisterCommand("paragraphFormat",{type:"dropdown",displaySelection:function(a){return a.opts.paragraphFormatSelection},defaultSelection:function(a){return a.language.translate(a.opts.paragraphDefaultSelection)},displaySelectionWidth:80,html:function(){var a='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.paragraphFormat;for(var e in t)if(t.hasOwnProperty(e)){var r=this.shortcuts.get("paragraphFormat."+e);r=r?'<span class="fr-shortcut">'+r+"</span>":"",a+='<li role="presentation"><'+("N"==e?this.html.defaultTag()||"DIV":e)+' style="padding: 0 !important; margin: 0 !important; border: 0 !important; background-color: transparent !important; '+("PRE"==e||"N"==e?"font-size: 15px":"font-weight: bold !important; ")+("H1"==e?"font-size: 2em !important; ":"")+("H2"==e?"font-size: 1.5em !important; ":"")+("H3"==e?"font-size: 1.17em !important; ":"")+("H4"==e?"font-size: 15px !important;":"")+'" role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="paragraphFormat" data-param1="'+e+'" title="'+this.language.translate(t[e])+'">'+this.language.translate(t[e])+"</a></"+("N"==e?this.html.defaultTag()||"DIV":e)+"></li>"}return a+="</ul>"},title:"Paragraph Format",callback:function(a,t){this.paragraphFormat.apply(t)},refresh:function(a){this.paragraphFormat.refresh(a)},refreshOnShow:function(a,t){this.paragraphFormat.refreshOnShow(a,t)},plugin:"paragraphFormat"}),a.DefineIcon("paragraphFormat",{NAME:"paragraph",SVG_KEY:"paragraphFormat"})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
7
  !function(a,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(a.FroalaEditor)}(this,function(a){"use strict";a=a&&a.hasOwnProperty("default")?a["default"]:a,Object.assign(a.DEFAULTS,{paragraphStyles:{"fr-text-gray":"Gray","fr-text-bordered":"Bordered","fr-text-spaced":"Spaced","fr-text-uppercase":"Uppercase"},paragraphMultipleStyles:!0}),a.PLUGINS.paragraphStyle=function(n){var i=n.$;return{_init:function a(){},apply:function p(a,e,t){void 0===e&&(e=n.opts.paragraphStyles),void 0===t&&(t=n.opts.paragraphMultipleStyles);var r="";t||((r=Object.keys(e)).splice(r.indexOf(a),1),r=r.join(" ")),n.selection.save(),n.html.wrap(!0,!0,!0,!0),n.selection.restore();var s=n.selection.blocks();n.selection.save();for(var o=i(s[0]).hasClass(a),l=0;l<s.length;l++)i(s[l]).removeClass(r).toggleClass(a,!o),i(s[l]).hasClass("fr-temp-div")&&i(s[l]).removeClass("fr-temp-div"),""===i(s[l]).attr("class")&&i(s[l]).removeAttr("class");n.html.unwrap(),n.selection.restore()},refreshOnShow:function s(a,e){var t=n.selection.blocks();if(t.length){var r=i(t[0]);e.find(".fr-command").each(function(){var a=i(this).data("param1"),e=r.hasClass(a);i(this).toggleClass("fr-active",e).attr("aria-selected",e)})}}}},a.RegisterCommand("paragraphStyle",{type:"dropdown",html:function(){var a='<ul class="fr-dropdown-list" role="presentation">',e=this.opts.paragraphStyles;for(var t in e)e.hasOwnProperty(t)&&(a+='<li role="presentation"><a class="fr-command '.concat(t,'" tabIndex="-1" role="option" data-cmd="paragraphStyle" data-param1="').concat(t,'" title="').concat(this.language.translate(e[t]),'">').concat(this.language.translate(e[t]),"</a></li>"));return a+="</ul>"},title:"Paragraph Style",callback:function(a,e){this.paragraphStyle.apply(e)},refreshOnShow:function(a,e){this.paragraphStyle.refreshOnShow(a,e)},plugin:"paragraphStyle"}),a.DefineIcon("paragraphStyle",{NAME:"magic",SVG_KEY:"paragraphStyle"})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
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,{html2pdf:window.html2pdf}),e.PLUGINS.print=function(a){return{run:function e(){!function l(e){var t=a.html.get(),n=null;a.shared.print_iframe?n=a.shared.print_iframe:((n=document.createElement("iframe")).name="fr-print",n.style.position="fixed",n.style.top="0",n.style.left="-9999px",n.style.height="100%",n.style.width="0",n.style.overflow="hidden",n.style["z-index"]="2147483647",n.style.tabIndex="-1",a.events.on("shared.destroy",function(){n.remove()}),a.shared.print_iframe=n);try{document.body.removeChild(n)}catch(d){}document.body.appendChild(n);var i=function i(){e(),n.removeEventListener("load",i)};n.addEventListener("load",i);var o=n.contentWindow;o.document.open(),o.document.write("<!DOCTYPE html><html "+(a.opts.documentReady?'style="margin: 0; padding: 0;"':"")+"><head><title>"+document.title+"</title>"),Array.prototype.forEach.call(document.querySelectorAll("style"),function(e){e=e.cloneNode(!0),o.document.write(e.outerHTML)});var r=document.querySelectorAll("link[rel=stylesheet]");Array.prototype.forEach.call(r,function(e){var t=document.createElement("link");t.rel=e.rel,t.href=e.href,t.media="print",t.type="text/css",t.media="all",o.document.write(t.outerHTML)}),o.document.write('</head><body style="height:auto;text-align: '+("rtl"==a.opts.direction?"right":"left")+"; direction: "+a.opts.direction+"; "+(a.opts.documentReady?" padding: 2cm; width: 17cm; margin: 0;":"")+'"><div class="fr-view">'),o.document.write(t),o.document.write("</div></body></html>"),o.document.close()}(function(){setTimeout(function(){a.events.disableBlur(),window.frames["fr-print"].focus(),window.frames["fr-print"].print(),a.$win.get(0).focus(),a.events.disableBlur(),a.events.focus()},0)})},toPDF:function t(){a.opts.html2pdf&&(a.$el.css("text-align","left"),a.opts.html2pdf().set({margin:[10,20],html2canvas:{useCORS:!0}}).from(a.el).save(),setTimeout(function(){a.$el.css("text-align","")},100))}}},e.DefineIcon("print",{NAME:"print",SVG_KEY:"print"}),e.RegisterCommand("print",{title:"Print",undo:!1,focus:!1,plugin:"print",callback:function(){this.print.run()}}),e.DefineIcon("getPDF",{NAME:"file-pdf-o",FA5NAME:"file-pdf",SVG_KEY:"pdfExport"}),e.RegisterCommand("getPDF",{title:"Download PDF",type:"button",focus:!1,undo:!1,callback:function(){this.print.toPDF()}})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 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(p){"use strict";p=p&&p.hasOwnProperty("default")?p["default"]:p,Object.assign(p.DEFAULTS,{quickInsertButtons:["image","video","embedly","table","ul","ol","hr"],quickInsertTags:["p","div","h1","h2","h3","h4","h5","h6","pre","blockquote"],quickInsertEnabled:!0}),p.QUICK_INSERT_BUTTONS={},p.DefineIcon("quickInsert",{SVG_KEY:"add",template:"svg"}),p.RegisterQuickInsertButton=function(e,t){p.QUICK_INSERT_BUTTONS[e]=Object.assign({undo:!0},t)},p.RegisterQuickInsertButton("image",{icon:"insertImage",requiredPlugin:"image",title:"Insert Image",undo:!1,callback:function(){var e=this,t=e.$;e.shared.$qi_image_input||(e.shared.$qi_image_input=t(document.createElement("input")).attr("accept","image/"+e.opts.imageAllowedTypes.join(", image/").toLowerCase()).attr("name","quickInsertImage".concat(this.id)).attr("style","display: none;").attr("type","file"),t("body").first().append(e.shared.$qi_image_input),e.events.$on(e.shared.$qi_image_input,"change",function(){var e=t(this).data("inst");this.files&&(e.quickInsert.hide(),e.image.upload(this.files)),t(this).val("")},!0)),e.$qi_image_input=e.shared.$qi_image_input,e.helpers.isMobile()&&e.selection.save(),e.events.disableBlur(),e.$qi_image_input.data("inst",e)[0].click()}}),p.RegisterQuickInsertButton("video",{icon:"insertVideo",requiredPlugin:"video",title:"Insert Video",undo:!1,callback:function(){var e=prompt(this.language.translate("Paste the URL of the video you want to insert."));e&&this.video.insertByURL(e)}}),p.RegisterQuickInsertButton("embedly",{icon:"embedly",requiredPlugin:"embedly",title:"Embed URL",undo:!1,callback:function(){var e=prompt(this.language.translate("Paste the URL of any web content you want to insert."));e&&this.embedly.add(e)}}),p.RegisterQuickInsertButton("table",{icon:"insertTable",requiredPlugin:"table",title:"Insert Table",callback:function(){this.table.insert(2,2)}}),p.RegisterQuickInsertButton("ol",{icon:"formatOL",requiredPlugin:"lists",title:"Ordered List",callback:function(){this.lists.format("OL")}}),p.RegisterQuickInsertButton("ul",{icon:"formatUL",requiredPlugin:"lists",title:"Unordered List",callback:function(){this.lists.format("UL")}}),p.RegisterQuickInsertButton("hr",{icon:"insertHR",title:"Insert Horizontal Line",callback:function(){this.commands.insertHR()}}),p.PLUGINS.quickInsert=function(r){var a,l,c=r.$;function n(e){var t,n,i;(t=e.offset().top-r.$box.offset().top,n=(r.$iframe&&r.$iframe.offset().left||0)+e.offset().left<a.outerWidth()?e.offset().left+a.outerWidth():0-a.outerWidth(),r.opts.enter!=p.ENTER_BR)?i=(a.outerHeight()-e.outerHeight())/2:(c(document.createElement("span")).html(p.INVISIBLE_SPACE).insertAfter(e),i=(a.outerHeight()-e.next().outerHeight())/2,e.next().remove());if(r.opts.iframe){var s=r.helpers.getPX(r.$wp.find(".fr-iframe").css("padding-top"));t+=r.$iframe.offset().top+s}a.hasClass("fr-on")&&0<=t&&l.css("top",t-i),0<=t&&t-Math.abs(i)<=r.$box.outerHeight()-e.outerHeight()?(a.hasClass("fr-hidden")&&(a.hasClass("fr-on")&&u(),a.removeClass("fr-hidden")),a.css("top",t-i)):a.hasClass("fr-visible")&&(a.addClass("fr-hidden"),d()),a.css("left",n)}function s(e){a||function t(){r.shared.$quick_insert||(r.shared.$quick_insert=c(document.createElement("div")).attr("class","fr-quick-insert").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'.concat(r.language.translate("Quick Insert"),'">').concat(r.icon.create("quickInsert"),"</a>")));a=r.shared.$quick_insert,r.tooltip.bind(r.$box,".fr-quick-insert > a.fr-floating-btn"),r.events.on("destroy",function(){c("body").first().append(a.removeClass("fr-on")),l&&(d(),c("body").first().append(l.css("left",-9999).css("top",-9999)))},!0),r.events.on("shared.destroy",function(){a.html("").removeData().remove(),a=null,l&&(l.html("").removeData().remove(),l=null)},!0),r.events.on("commands.before",o),r.events.on("commands.after",function(){r.popups.areVisible()||i()}),r.events.bindClick(r.$box,".fr-quick-insert > a",u),r.events.bindClick(r.$box,".fr-qi-helper > a.fr-btn",function(e){var t=c(e.currentTarget).data("cmd");if(!1===r.events.trigger("quickInsert.commands.before",[t]))return!1;p.QUICK_INSERT_BUTTONS[t].callback.apply(r,[e.currentTarget]),p.QUICK_INSERT_BUTTONS[t].undo&&r.undo.saveStep(),r.events.trigger("quickInsert.commands.after",[t]),r.quickInsert.hide()}),r.events.$on(r.$wp,"scroll",f),r.events.$on(r.$tb,"transitionend",".fr-more-toolbar",f)}(),a.hasClass("fr-on")&&d(),r.$box.append(a),n(e),a.data("tag",e),a.addClass("fr-visible")}function i(){if(r.core.hasFocus()){var e=r.selection.element();if(r.opts.enter==p.ENTER_BR||r.node.isBlock(e)||(e=r.node.blockParent(e)),r.opts.enter==p.ENTER_BR&&!r.node.isBlock(e)){var t=r.node.deepestParent(e);t&&(e=t)}var n=function n(){return r.opts.enter!=p.ENTER_BR&&r.node.isEmpty(e)&&0<=r.opts.quickInsertTags.indexOf(e.tagName.toLowerCase())},i=function i(){return r.opts.enter==p.ENTER_BR&&("BR"==e.tagName&&(!e.previousSibling||"BR"==e.previousSibling.tagName||r.node.isBlock(e.previousSibling))||r.node.isEmpty(e)&&(!e.previousSibling||"BR"==e.previousSibling.tagName||r.node.isBlock(e.previousSibling))&&(!e.nextSibling||"BR"==e.nextSibling.tagName||r.node.isBlock(e.nextSibling)))};e&&(n()||i())?a&&a.data("tag").is(c(e))&&a.hasClass("fr-on")?d():r.selection.isCollapsed()&&s(c(e)):o()}}function o(){a&&(a.hasClass("fr-on")&&d(),a.removeClass("fr-visible fr-on"),a.css("left",-9999).css("top",-9999))}function u(e){if(e&&e.preventDefault(),a.hasClass("fr-on")&&!a.hasClass("fr-hidden"))d();else{if(!r.shared.$qi_helper){for(var t=r.opts.quickInsertButtons,n='<div class="fr-qi-helper">',i=0,s=0;s<t.length;s++){var o=p.QUICK_INSERT_BUTTONS[t[s]];o&&(!o.requiredPlugin||p.PLUGINS[o.requiredPlugin]&&0<=r.opts.pluginsEnabled.indexOf(o.requiredPlugin))&&(n+='<a class="fr-btn fr-floating-btn" role="button" title="'.concat(r.language.translate(o.title),'" tabIndex="-1" data-cmd="').concat(t[s],'" style="transition-delay: ').concat(.025*i++,'s;">').concat(r.icon.create(o.icon),"</a>"))}n+="</div>",r.shared.$qi_helper=c(n),r.tooltip.bind(r.shared.$qi_helper,"a.fr-btn"),r.events.$on(r.shared.$qi_helper,"mousedown",function(e){e.preventDefault()},!0)}l=r.shared.$qi_helper,r.$box.append(l),setTimeout(function(){l.css("top",parseFloat(a.css("top"))),l.css("left",parseFloat(a.css("left"))+a.outerWidth()),l.find("a").addClass("fr-size-1"),a.addClass("fr-on")},10)}}function d(){var n=r.$box.find(".fr-qi-helper");n.length&&function(){for(var t=n.find("a"),e=0;e<t.length;e++)!function(e){setTimeout(function(){n.children().eq(t.length-1-e).removeClass("fr-size-1")},25*e)}(e);setTimeout(function(){n.css("left",-9999),a&&!a.hasClass("fr-hidden")&&a.removeClass("fr-on")},25*e)}()}function f(){a.hasClass("fr-visible")&&n(a.data("tag"))}return{_init:function e(){if(!r.$wp||!r.opts.quickInsertEnabled)return!1;r.popups.onShow("image.edit",o),r.events.on("mouseup",i),r.helpers.isMobile()&&r.events.$on(c(r.o_doc),"selectionchange",i),r.events.on("blur",o),r.events.on("keyup",i),r.events.on("keydown",function(){setTimeout(function(){i()},0)})},hide:o}}});
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(h){"use strict";h=h&&h.hasOwnProperty("default")?h["default"]:h,Object.assign(h.DEFAULTS,{quickInsertButtons:["image","video","embedly","table","ul","ol","hr"],quickInsertTags:["p","div","h1","h2","h3","h4","h5","h6","pre","blockquote"],quickInsertEnabled:!0}),h.QUICK_INSERT_BUTTONS={},h.DefineIcon("quickInsert",{SVG_KEY:"add",template:"svg"}),h.RegisterQuickInsertButton=function(e,t){h.QUICK_INSERT_BUTTONS[e]=Object.assign({undo:!0},t)},h.RegisterQuickInsertButton("image",{icon:"insertImage",requiredPlugin:"image",title:"Insert Image",undo:!1,callback:function(){var e=this,t=e.$;e.shared.$qi_image_input||(e.shared.$qi_image_input=t(document.createElement("input")).attr("accept","image/"+e.opts.imageAllowedTypes.join(", image/").toLowerCase()).attr("name","quickInsertImage".concat(this.id)).attr("style","display: none;").attr("type","file"),t("body").first().append(e.shared.$qi_image_input),e.events.$on(e.shared.$qi_image_input,"change",function(){var e=t(this).data("inst");this.files&&(e.quickInsert.hide(),e.image.upload(this.files)),t(this).val("")},!0)),e.$qi_image_input=e.shared.$qi_image_input,e.helpers.isMobile()&&e.selection.save(),e.events.disableBlur(),e.$qi_image_input.data("inst",e)[0].click()}}),h.RegisterQuickInsertButton("video",{icon:"insertVideo",requiredPlugin:"video",title:"Insert Video",undo:!1,callback:function(){var e=prompt(this.language.translate("Paste the URL of the video you want to insert."));e&&this.video.insertByURL(e)}}),h.RegisterQuickInsertButton("embedly",{icon:"embedly",requiredPlugin:"embedly",title:"Embed URL",undo:!1,callback:function(){var e=prompt(this.language.translate("Paste the URL of any web content you want to insert."));e&&this.embedly.add(e)}}),h.RegisterQuickInsertButton("table",{icon:"insertTable",requiredPlugin:"table",title:"Insert Table",callback:function(){this.table.insert(2,2)}}),h.RegisterQuickInsertButton("ol",{icon:"formatOL",requiredPlugin:"lists",title:"Ordered List",callback:function(){this.lists.format("OL")}}),h.RegisterQuickInsertButton("ul",{icon:"formatUL",requiredPlugin:"lists",title:"Unordered List",callback:function(){this.lists.format("UL")}}),h.RegisterQuickInsertButton("hr",{icon:"insertHR",title:"Insert Horizontal Line",callback:function(){this.commands.insertHR()}}),h.PLUGINS.quickInsert=function(r){var a,l,c=r.$,u=!1;function n(e){var t,n,i;(t=e.offset().top-r.$box.offset().top,n=(r.$iframe&&r.$iframe.offset().left||0)+e.offset().left-e.position().left-4<a.outerWidth()?e.offset().left+a.outerWidth():0-a.outerWidth(),r.opts.enter!=h.ENTER_BR)?i=(a.outerHeight()-e.outerHeight())/2:(c(document.createElement("span")).html(h.INVISIBLE_SPACE).insertAfter(e),i=(a.outerHeight()-e.next().outerHeight())/2,e.next().remove());if(r.opts.iframe){var s=r.helpers.getPX(r.$wp.find(".fr-iframe").css("padding-top"));t+=r.$iframe.offset().top+s}a.hasClass("fr-on")&&0<=t&&l.css("top",t-i),0<=t&&t-Math.abs(i)<=r.$box.outerHeight()-e.outerHeight()?(a.hasClass("fr-hidden")&&(a.hasClass("fr-on")&&d(),a.removeClass("fr-hidden")),a.css("top",t-i)):a.hasClass("fr-visible")&&!r.opts.toolbarInline&&(a.addClass("fr-hidden"),f()),a.css("left",n)}function s(e){a||function t(){r.shared.$quick_insert||(r.shared.$quick_insert=c(document.createElement("div")).attr("class","fr-quick-insert").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'.concat(r.language.translate("Quick Insert"),'">').concat(r.icon.create("quickInsert"),"</a>")));a=r.shared.$quick_insert,r.tooltip.bind(r.$box,".fr-quick-insert > a.fr-floating-btn"),r.events.on("destroy",function(){c("body").first().append(a.removeClass("fr-on")),l&&(f(),c("body").first().append(l.css("left",-9999).css("top",-9999)))},!0),r.events.on("shared.destroy",function(){a.html("").removeData().remove(),a=null,l&&(l.html("").removeData().remove(),l=null)},!0),r.events.on("commands.before",o),r.events.on("commands.after",function(){r.popups.areVisible()||i()}),r.events.bindClick(r.$box,".fr-quick-insert > a",d),r.events.bindClick(r.$box,".fr-qi-helper > a.fr-btn",function(e){var t=c(e.currentTarget).data("cmd");if(!1===r.events.trigger("quickInsert.commands.before",[t]))return!1;h.QUICK_INSERT_BUTTONS[t].callback.apply(r,[e.currentTarget]),h.QUICK_INSERT_BUTTONS[t].undo&&r.undo.saveStep(),r.events.trigger("quickInsert.commands.after",[t]),r.quickInsert.hide()}),r.events.$on(r.$wp,"scroll",p),r.events.$on(r.$tb,"transitionend",".fr-more-toolbar",p)}(),a.hasClass("fr-on")&&f(),r.$box.append(a),n(e),a.data("tag",e),a.addClass("fr-visible")}function i(){if(r.core.hasFocus()){var e=r.selection.element();if(r.opts.enter==h.ENTER_BR||r.node.isBlock(e)||(e=r.node.blockParent(e)),r.opts.enter==h.ENTER_BR&&!r.node.isBlock(e)){var t=r.node.deepestParent(e);t&&(e=t)}var n=function n(){return r.opts.enter!=h.ENTER_BR&&r.node.isEmpty(e)&&0<=r.opts.quickInsertTags.indexOf(e.tagName.toLowerCase())},i=function i(){return r.opts.enter==h.ENTER_BR&&("BR"==e.tagName&&(!e.previousSibling||"BR"==e.previousSibling.tagName||r.node.isBlock(e.previousSibling))||r.node.isEmpty(e)&&(!e.previousSibling||"BR"==e.previousSibling.tagName||r.node.isBlock(e.previousSibling))&&(!e.nextSibling||"BR"==e.nextSibling.tagName||r.node.isBlock(e.nextSibling)))};e&&(n()||i())?a&&a.data("tag").is(c(e))&&a.hasClass("fr-on")?f():r.selection.isCollapsed()&&s(c(e)):o()}}function o(){a&&!u&&(a.hasClass("fr-on")&&f(),a.removeClass("fr-visible fr-on"),a.css("left",-9999).css("top",-9999))}function d(e){if(e&&e.preventDefault(),a.hasClass("fr-on")&&!a.hasClass("fr-hidden"))f();else{if(!r.shared.$qi_helper){for(var t=r.opts.quickInsertButtons,n='<div class="fr-qi-helper">',i=0,s=0;s<t.length;s++){var o=h.QUICK_INSERT_BUTTONS[t[s]];o&&(!o.requiredPlugin||h.PLUGINS[o.requiredPlugin]&&0<=r.opts.pluginsEnabled.indexOf(o.requiredPlugin))&&(n+='<a class="fr-btn fr-floating-btn" role="button" title="'.concat(r.language.translate(o.title),'" tabIndex="-1" data-cmd="').concat(t[s],'" style="transition-delay: ').concat(.025*i++,'s;">').concat(r.icon.create(o.icon),"</a>"))}n+="</div>",r.shared.$qi_helper=c(n),r.tooltip.bind(r.shared.$qi_helper,"a.fr-btn"),r.events.$on(r.shared.$qi_helper,"mousedown",function(e){e.preventDefault()},!0)}l=r.shared.$qi_helper,r.$box.append(l),u=!0,setTimeout(function(){u=!1,l.css("top",parseFloat(a.css("top"))),l.css("left",parseFloat(a.css("left"))+a.outerWidth()),l.find("a").addClass("fr-size-1"),a.addClass("fr-on")},10)}}function f(){var n=r.$box.find(".fr-qi-helper");n.length&&function(){for(var t=n.find("a"),e=0;e<t.length;e++)!function(e){setTimeout(function(){n.children().eq(t.length-1-e).removeClass("fr-size-1")},25*e)}(e);setTimeout(function(){n.css("left",-9999),a&&!a.hasClass("fr-hidden")&&a.removeClass("fr-on")},25*e)}()}function p(){a.hasClass("fr-visible")&&n(a.data("tag"))}return{_init:function e(){if(!r.$wp||!r.opts.quickInsertEnabled)return!1;r.popups.onShow("image.edit",o),r.events.on("mouseup",i),r.helpers.isMobile()&&r.events.$on(c(r.o_doc),"selectionchange",i),r.events.on("blur",o),r.events.on("keyup",i),r.events.on("keydown",function(){setTimeout(function(){i()},0)})},hide:o}}});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
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).PLUGINS.quote=function(r){var a=r.$;function c(e){for(;e.parentNode&&e.parentNode!=r.el;)e=e.parentNode;return e}return{apply:function t(e){r.selection.save(),r.html.wrap(!0,!0,!0,!0),r.selection.restore(),"increase"==e?function n(){var e,t=r.selection.blocks();for(e=0;e<t.length;e++)t[e]=c(t[e]);r.selection.save();var o=a(document.createElement("blockquote"));for(o.insertBefore(t[0]),e=0;e<t.length;e++)o.append(t[e]);r.html.unwrap(),r.selection.restore()}():"decrease"==e&&function o(){var e,t=r.selection.blocks();for(e=0;e<t.length;e++)"BLOCKQUOTE"!=t[e].tagName&&(t[e]=a(t[e]).parentsUntil(r.$el,"BLOCKQUOTE").get(0));for(r.selection.save(),e=0;e<t.length;e++)t[e]&&a(t[e]).replaceWith(t[e].innerHTML);r.html.unwrap(),r.selection.restore()}()}}},e.RegisterShortcut(e.KEYCODE.SINGLE_QUOTE,"quote","increase","'"),e.RegisterShortcut(e.KEYCODE.SINGLE_QUOTE,"quote","decrease","'",!0),e.RegisterCommand("quote",{title:"Quote",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t={increase:"Increase",decrease:"Decrease"};for(var o in t)if(t.hasOwnProperty(o)){var n=this.shortcuts.get("quote.".concat(o));e+='<li role="presentation"><a class="fr-command fr-active '.concat(o,'" tabIndex="-1" role="option" data-cmd="quote" data-param1="').concat(o,'" title="').concat(t[o],'">').concat(this.language.translate(t[o])).concat(n?'<span class="fr-shortcut">'.concat(n,"</span>"):"","</a></li>")}return e+="</ul>"},callback:function(e,t){this.quote.apply(t)},plugin:"quote"}),e.DefineIcon("quote",{NAME:"quote-left",SVG_KEY:"blockquote"})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
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,{saveInterval:1e4,saveURL:null,saveParams:{},saveParam:"body",saveMethod:"POST"}),e.PLUGINS.save=function(i){var f=i.$,n=null,l=null,t=!1,v=1,c=2,s={};function u(e,t){i.events.trigger("save.error",[{code:e,message:s[e]},t])}function a(e){void 0===e&&(e=i.html.get());var n=e,t=i.events.trigger("save.before",[e]);if(!1===t)return!1;if("string"==typeof t&&(e=t),i.opts.saveURL){var s={};for(var a in i.opts.saveParams)if(i.opts.saveParams.hasOwnProperty(a)){var o=i.opts.saveParams[a];s[a]="function"==typeof o?o.call(this):o}var r={};r[i.opts.saveParam]=e,f(this).ajax({method:i.opts.saveMethod,url:i.opts.saveURL,data:Object.assign(r,s),crossDomain:i.opts.requestWithCORS,withCredentials:i.opts.requestWithCredentials,headers:i.opts.requestHeaders,done:function(e,t,s){l=n,i.events.trigger("save.after",[e])},fail:function(e){u(c,e.response||e.responseText)}})}else u(v)}function o(){clearTimeout(n),n=setTimeout(function(){var e=i.html.get();(l!=e||t)&&(t=!1,a(l=e))},0)}return s[v]="Missing saveURL option.",s[c]="Something went wrong during save.",{_init:function r(){if(i.opts.letteringClass)for(var e=i.opts.letteringClass,t=i.$el.find(".".concat(e)).length,s=0;s<t;s++)i.$el.find(".".concat(e))[s].innerHTML=i.$el.find(".".concat(e))[s].innerText.replace(/([\w'-]+|[?.",])/g,"<span class = 'fr-word-select'>$1</span>");i.opts.saveInterval&&(l=i.html.get(),i.events.on("contentChanged",function(){setTimeout(o,i.opts.saveInterval)}),i.events.on("keydown destroy",function(){clearTimeout(n)}))},save:a,reset:function e(){o(),t=!1},force:function d(){t=!0}}},e.DefineIcon("save",{NAME:"floppy-o",FA5NAME:"save"}),e.RegisterCommand("save",{title:"Save",undo:!1,focus:!1,refreshAfterCallback:!1,callback:function(){this.save.save()},plugin:"save"})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
7
  !function(c,E){"object"==typeof exports&&"undefined"!=typeof module?E(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],E):E(c.FroalaEditor)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t,Object.assign(t.DEFAULTS,{specialCharactersSets:[{title:"Latin","char":"&iexcl;",list:[{"char":"&iexcl;",desc:"INVERTED EXCLAMATION MARK"},{"char":"&cent;",desc:"CENT SIGN"},{"char":"&pound;",desc:"POUND SIGN"},{"char":"&curren;",desc:"CURRENCY SIGN"},{"char":"&yen;",desc:"YEN SIGN"},{"char":"&brvbar;",desc:"BROKEN BAR"},{"char":"&sect;",desc:"SECTION SIGN"},{"char":"&uml;",desc:"DIAERESIS"},{"char":"&copy;",desc:"COPYRIGHT SIGN"},{"char":"&trade;",desc:"TRADEMARK SIGN"},{"char":"&ordf;",desc:"FEMININE ORDINAL INDICATOR"},{"char":"&laquo;",desc:"LEFT-POINTING DOUBLE ANGLE QUOTATION MARK"},{"char":"&not;",desc:"NOT SIGN"},{"char":"&reg;",desc:"REGISTERED SIGN"},{"char":"&macr;",desc:"MACRON"},{"char":"&deg;",desc:"DEGREE SIGN"},{"char":"&plusmn;",desc:"PLUS-MINUS SIGN"},{"char":"&sup2;",desc:"SUPERSCRIPT TWO"},{"char":"&sup3;",desc:"SUPERSCRIPT THREE"},{"char":"&acute;",desc:"ACUTE ACCENT"},{"char":"&micro;",desc:"MICRO SIGN"},{"char":"&para;",desc:"PILCROW SIGN"},{"char":"&middot;",desc:"MIDDLE DOT"},{"char":"&cedil;",desc:"CEDILLA"},{"char":"&sup1;",desc:"SUPERSCRIPT ONE"},{"char":"&ordm;",desc:"MASCULINE ORDINAL INDICATOR"},{"char":"&raquo;",desc:"RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK"},{"char":"&frac14;",desc:"VULGAR FRACTION ONE QUARTER"},{"char":"&frac12;",desc:"VULGAR FRACTION ONE HALF"},{"char":"&frac34;",desc:"VULGAR FRACTION THREE QUARTERS"},{"char":"&iquest;",desc:"INVERTED QUESTION MARK"},{"char":"&Agrave;",desc:"LATIN CAPITAL LETTER A WITH GRAVE"},{"char":"&Aacute;",desc:"LATIN CAPITAL LETTER A WITH ACUTE"},{"char":"&Acirc;",desc:"LATIN CAPITAL LETTER A WITH CIRCUMFLEX"},{"char":"&Atilde;",desc:"LATIN CAPITAL LETTER A WITH TILDE"},{"char":"&Auml;",desc:"LATIN CAPITAL LETTER A WITH DIAERESIS "},{"char":"&Aring;",desc:"LATIN CAPITAL LETTER A WITH RING ABOVE"},{"char":"&AElig;",desc:"LATIN CAPITAL LETTER AE"},{"char":"&Ccedil;",desc:"LATIN CAPITAL LETTER C WITH CEDILLA"},{"char":"&Egrave;",desc:"LATIN CAPITAL LETTER E WITH GRAVE"},{"char":"&Eacute;",desc:"LATIN CAPITAL LETTER E WITH ACUTE"},{"char":"&Ecirc;",desc:"LATIN CAPITAL LETTER E WITH CIRCUMFLEX"},{"char":"&Euml;",desc:"LATIN CAPITAL LETTER E WITH DIAERESIS"},{"char":"&Igrave;",desc:"LATIN CAPITAL LETTER I WITH GRAVE"},{"char":"&Iacute;",desc:"LATIN CAPITAL LETTER I WITH ACUTE"},{"char":"&Icirc;",desc:"LATIN CAPITAL LETTER I WITH CIRCUMFLEX"},{"char":"&Iuml;",desc:"LATIN CAPITAL LETTER I WITH DIAERESIS"},{"char":"&ETH;",desc:"LATIN CAPITAL LETTER ETH"},{"char":"&Ntilde;",desc:"LATIN CAPITAL LETTER N WITH TILDE"},{"char":"&Ograve;",desc:"LATIN CAPITAL LETTER O WITH GRAVE"},{"char":"&Oacute;",desc:"LATIN CAPITAL LETTER O WITH ACUTE"},{"char":"&Ocirc;",desc:"LATIN CAPITAL LETTER O WITH CIRCUMFLEX"},{"char":"&Otilde;",desc:"LATIN CAPITAL LETTER O WITH TILDE"},{"char":"&Ouml;",desc:"LATIN CAPITAL LETTER O WITH DIAERESIS"},{"char":"&times;",desc:"MULTIPLICATION SIGN"},{"char":"&Oslash;",desc:"LATIN CAPITAL LETTER O WITH STROKE"},{"char":"&Ugrave;",desc:"LATIN CAPITAL LETTER U WITH GRAVE"},{"char":"&Uacute;",desc:"LATIN CAPITAL LETTER U WITH ACUTE"},{"char":"&Ucirc;",desc:"LATIN CAPITAL LETTER U WITH CIRCUMFLEX"},{"char":"&Uuml;",desc:"LATIN CAPITAL LETTER U WITH DIAERESIS"},{"char":"&Yacute;",desc:"LATIN CAPITAL LETTER Y WITH ACUTE"},{"char":"&THORN;",desc:"LATIN CAPITAL LETTER THORN"},{"char":"&szlig;",desc:"LATIN SMALL LETTER SHARP S"},{"char":"&agrave;",desc:"LATIN SMALL LETTER A WITH GRAVE"},{"char":"&aacute;",desc:"LATIN SMALL LETTER A WITH ACUTE "},{"char":"&acirc;",desc:"LATIN SMALL LETTER A WITH CIRCUMFLEX"},{"char":"&atilde;",desc:"LATIN SMALL LETTER A WITH TILDE"},{"char":"&auml;",desc:"LATIN SMALL LETTER A WITH DIAERESIS"},{"char":"&aring;",desc:"LATIN SMALL LETTER A WITH RING ABOVE"},{"char":"&aelig;",desc:"LATIN SMALL LETTER AE"},{"char":"&ccedil;",desc:"LATIN SMALL LETTER C WITH CEDILLA"},{"char":"&egrave;",desc:"LATIN SMALL LETTER E WITH GRAVE"},{"char":"&eacute;",desc:"LATIN SMALL LETTER E WITH ACUTE"},{"char":"&ecirc;",desc:"LATIN SMALL LETTER E WITH CIRCUMFLEX"},{"char":"&euml;",desc:"LATIN SMALL LETTER E WITH DIAERESIS"},{"char":"&igrave;",desc:"LATIN SMALL LETTER I WITH GRAVE"},{"char":"&iacute;",desc:"LATIN SMALL LETTER I WITH ACUTE"},{"char":"&icirc;",desc:"LATIN SMALL LETTER I WITH CIRCUMFLEX"},{"char":"&iuml;",desc:"LATIN SMALL LETTER I WITH DIAERESIS"},{"char":"&eth;",desc:"LATIN SMALL LETTER ETH"},{"char":"&ntilde;",desc:"LATIN SMALL LETTER N WITH TILDE"},{"char":"&ograve;",desc:"LATIN SMALL LETTER O WITH GRAVE"},{"char":"&oacute;",desc:"LATIN SMALL LETTER O WITH ACUTE"},{"char":"&ocirc;",desc:"LATIN SMALL LETTER O WITH CIRCUMFLEX"},{"char":"&otilde;",desc:"LATIN SMALL LETTER O WITH TILDE"},{"char":"&ouml;",desc:"LATIN SMALL LETTER O WITH DIAERESIS"},{"char":"&divide;",desc:"DIVISION SIGN"},{"char":"&oslash;",desc:"LATIN SMALL LETTER O WITH STROKE"},{"char":"&ugrave;",desc:"LATIN SMALL LETTER U WITH GRAVE"},{"char":"&uacute;",desc:"LATIN SMALL LETTER U WITH ACUTE"},{"char":"&ucirc;",desc:"LATIN SMALL LETTER U WITH CIRCUMFLEX"},{"char":"&uuml;",desc:"LATIN SMALL LETTER U WITH DIAERESIS"},{"char":"&yacute;",desc:"LATIN SMALL LETTER Y WITH ACUTE"},{"char":"&thorn;",desc:"LATIN SMALL LETTER THORN"},{"char":"&yuml;",desc:"LATIN SMALL LETTER Y WITH DIAERESIS"}]},{title:"Greek","char":"&Alpha;",list:[{"char":"&Alpha;",desc:"GREEK CAPITAL LETTER ALPHA"},{"char":"&Beta;",desc:"GREEK CAPITAL LETTER BETA"},{"char":"&Gamma;",desc:"GREEK CAPITAL LETTER GAMMA"},{"char":"&Delta;",desc:"GREEK CAPITAL LETTER DELTA"},{"char":"&Epsilon;",desc:"GREEK CAPITAL LETTER EPSILON"},{"char":"&Zeta;",desc:"GREEK CAPITAL LETTER ZETA"},{"char":"&Eta;",desc:"GREEK CAPITAL LETTER ETA"},{"char":"&Theta;",desc:"GREEK CAPITAL LETTER THETA"},{"char":"&Iota;",desc:"GREEK CAPITAL LETTER IOTA"},{"char":"&Kappa;",desc:"GREEK CAPITAL LETTER KAPPA"},{"char":"&Lambda;",desc:"GREEK CAPITAL LETTER LAMBDA"},{"char":"&Mu;",desc:"GREEK CAPITAL LETTER MU"},{"char":"&Nu;",desc:"GREEK CAPITAL LETTER NU"},{"char":"&Xi;",desc:"GREEK CAPITAL LETTER XI"},{"char":"&Omicron;",desc:"GREEK CAPITAL LETTER OMICRON"},{"char":"&Pi;",desc:"GREEK CAPITAL LETTER PI"},{"char":"&Rho;",desc:"GREEK CAPITAL LETTER RHO"},{"char":"&Sigma;",desc:"GREEK CAPITAL LETTER SIGMA"},{"char":"&Tau;",desc:"GREEK CAPITAL LETTER TAU"},{"char":"&Upsilon;",desc:"GREEK CAPITAL LETTER UPSILON"},{"char":"&Phi;",desc:"GREEK CAPITAL LETTER PHI"},{"char":"&Chi;",desc:"GREEK CAPITAL LETTER CHI"},{"char":"&Psi;",desc:"GREEK CAPITAL LETTER PSI"},{"char":"&Omega;",desc:"GREEK CAPITAL LETTER OMEGA"},{"char":"&alpha;",desc:"GREEK SMALL LETTER ALPHA"},{"char":"&beta;",desc:"GREEK SMALL LETTER BETA"},{"char":"&gamma;",desc:"GREEK SMALL LETTER GAMMA"},{"char":"&delta;",desc:"GREEK SMALL LETTER DELTA"},{"char":"&epsilon;",desc:"GREEK SMALL LETTER EPSILON"},{"char":"&zeta;",desc:"GREEK SMALL LETTER ZETA"},{"char":"&eta;",desc:"GREEK SMALL LETTER ETA"},{"char":"&theta;",desc:"GREEK SMALL LETTER THETA"},{"char":"&iota;",desc:"GREEK SMALL LETTER IOTA"},{"char":"&kappa;",desc:"GREEK SMALL LETTER KAPPA"},{"char":"&lambda;",desc:"GREEK SMALL LETTER LAMBDA"},{"char":"&mu;",desc:"GREEK SMALL LETTER MU"},{"char":"&nu;",desc:"GREEK SMALL LETTER NU"},{"char":"&xi;",desc:"GREEK SMALL LETTER XI"},{"char":"&omicron;",desc:"GREEK SMALL LETTER OMICRON"},{"char":"&pi;",desc:"GREEK SMALL LETTER PI"},{"char":"&rho;",desc:"GREEK SMALL LETTER RHO"},{"char":"&sigmaf;",desc:"GREEK SMALL LETTER FINAL SIGMA"},{"char":"&sigma;",desc:"GREEK SMALL LETTER SIGMA"},{"char":"&tau;",desc:"GREEK SMALL LETTER TAU"},{"char":"&upsilon;",desc:"GREEK SMALL LETTER UPSILON"},{"char":"&phi;",desc:"GREEK SMALL LETTER PHI"},{"char":"&chi;",desc:"GREEK SMALL LETTER CHI"},{"char":"&psi;",desc:"GREEK SMALL LETTER PSI"},{"char":"&omega;",desc:"GREEK SMALL LETTER OMEGA"},{"char":"&thetasym;",desc:"GREEK THETA SYMBOL"},{"char":"&upsih;",desc:"GREEK UPSILON WITH HOOK SYMBOL"},{"char":"&straightphi;",desc:"GREEK PHI SYMBOL"},{"char":"&piv;",desc:"GREEK PI SYMBOL"},{"char":"&Gammad;",desc:"GREEK LETTER DIGAMMA"},{"char":"&gammad;",desc:"GREEK SMALL LETTER DIGAMMA"},{"char":"&varkappa;",desc:"GREEK KAPPA SYMBOL"},{"char":"&varrho;",desc:"GREEK RHO SYMBOL"},{"char":"&straightepsilon;",desc:"GREEK LUNATE EPSILON SYMBOL"},{"char":"&backepsilon;",desc:"GREEK REVERSED LUNATE EPSILON SYMBOL"}]},{title:"Cyrillic","char":"&#x400",list:[{"char":"&#x400",desc:"CYRILLIC CAPITAL LETTER IE WITH GRAVE"},{"char":"&#x401",desc:"CYRILLIC CAPITAL LETTER IO"},{"char":"&#x402",desc:"CYRILLIC CAPITAL LETTER DJE"},{"char":"&#x403",desc:"CYRILLIC CAPITAL LETTER GJE"},{"char":"&#x404",desc:"CYRILLIC CAPITAL LETTER UKRAINIAN IE"},{"char":"&#x405",desc:"CYRILLIC CAPITAL LETTER DZE"},{"char":"&#x406",desc:"CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I"},{"char":"&#x407",desc:"CYRILLIC CAPITAL LETTER YI"},{"char":"&#x408",desc:"CYRILLIC CAPITAL LETTER JE"},{"char":"&#x409",desc:"CYRILLIC CAPITAL LETTER LJE"},{"char":"&#x40A",desc:"CYRILLIC CAPITAL LETTER NJE"},{"char":"&#x40B",desc:"CYRILLIC CAPITAL LETTER TSHE"},{"char":"&#x40C",desc:"CYRILLIC CAPITAL LETTER KJE"},{"char":"&#x40D",desc:"CYRILLIC CAPITAL LETTER I WITH GRAVE"},{"char":"&#x40E",desc:"CYRILLIC CAPITAL LETTER SHORT U"},{"char":"&#x40F",desc:"CYRILLIC CAPITAL LETTER DZHE"},{"char":"&#x410",desc:"CYRILLIC CAPITAL LETTER A"},{"char":"&#x411",desc:"CYRILLIC CAPITAL LETTER BE"},{"char":"&#x412",desc:"CYRILLIC CAPITAL LETTER VE"},{"char":"&#x413",desc:"CYRILLIC CAPITAL LETTER GHE"},{"char":"&#x414",desc:"CYRILLIC CAPITAL LETTER DE"},{"char":"&#x415",desc:"CYRILLIC CAPITAL LETTER IE"},{"char":"&#x416",desc:"CYRILLIC CAPITAL LETTER ZHE"},{"char":"&#x417",desc:"CYRILLIC CAPITAL LETTER ZE"},{"char":"&#x418",desc:"CYRILLIC CAPITAL LETTER I"},{"char":"&#x419",desc:"CYRILLIC CAPITAL LETTER SHORT I"},{"char":"&#x41A",desc:"CYRILLIC CAPITAL LETTER KA"},{"char":"&#x41B",desc:"CYRILLIC CAPITAL LETTER EL"},{"char":"&#x41C",desc:"CYRILLIC CAPITAL LETTER EM"},{"char":"&#x41D",desc:"CYRILLIC CAPITAL LETTER EN"},{"char":"&#x41E",desc:"CYRILLIC CAPITAL LETTER O"},{"char":"&#x41F",desc:"CYRILLIC CAPITAL LETTER PE"},{"char":"&#x420",desc:"CYRILLIC CAPITAL LETTER ER"},{"char":"&#x421",desc:"CYRILLIC CAPITAL LETTER ES"},{"char":"&#x422",desc:"CYRILLIC CAPITAL LETTER TE"},{"char":"&#x423",desc:"CYRILLIC CAPITAL LETTER U"},{"char":"&#x424",desc:"CYRILLIC CAPITAL LETTER EF"},{"char":"&#x425",desc:"CYRILLIC CAPITAL LETTER HA"},{"char":"&#x426",desc:"CYRILLIC CAPITAL LETTER TSE"},{"char":"&#x427",desc:"CYRILLIC CAPITAL LETTER CHE"},{"char":"&#x428",desc:"CYRILLIC CAPITAL LETTER SHA"},{"char":"&#x429",desc:"CYRILLIC CAPITAL LETTER SHCHA"},{"char":"&#x42A",desc:"CYRILLIC CAPITAL LETTER HARD SIGN"},{"char":"&#x42B",desc:"CYRILLIC CAPITAL LETTER YERU"},{"char":"&#x42C",desc:"CYRILLIC CAPITAL LETTER SOFT SIGN"},{"char":"&#x42D",desc:"CYRILLIC CAPITAL LETTER E"},{"char":"&#x42E",desc:"CYRILLIC CAPITAL LETTER YU"},{"char":"&#x42F",desc:"CYRILLIC CAPITAL LETTER YA"},{"char":"&#x430",desc:"CYRILLIC SMALL LETTER A"},{"char":"&#x431",desc:"CYRILLIC SMALL LETTER BE"},{"char":"&#x432",desc:"CYRILLIC SMALL LETTER VE"},{"char":"&#x433",desc:"CYRILLIC SMALL LETTER GHE"},{"char":"&#x434",desc:"CYRILLIC SMALL LETTER DE"},{"char":"&#x435",desc:"CYRILLIC SMALL LETTER IE"},{"char":"&#x436",desc:"CYRILLIC SMALL LETTER ZHE"},{"char":"&#x437",desc:"CYRILLIC SMALL LETTER ZE"},{"char":"&#x438",desc:"CYRILLIC SMALL LETTER I"},{"char":"&#x439",desc:"CYRILLIC SMALL LETTER SHORT I"},{"char":"&#x43A",desc:"CYRILLIC SMALL LETTER KA"},{"char":"&#x43B",desc:"CYRILLIC SMALL LETTER EL"},{"char":"&#x43C",desc:"CYRILLIC SMALL LETTER EM"},{"char":"&#x43D",desc:"CYRILLIC SMALL LETTER EN"},{"char":"&#x43E",desc:"CYRILLIC SMALL LETTER O"},{"char":"&#x43F",desc:"CYRILLIC SMALL LETTER PE"},{"char":"&#x440",desc:"CYRILLIC SMALL LETTER ER"},{"char":"&#x441",desc:"CYRILLIC SMALL LETTER ES"},{"char":"&#x442",desc:"CYRILLIC SMALL LETTER TE"},{"char":"&#x443",desc:"CYRILLIC SMALL LETTER U"},{"char":"&#x444",desc:"CYRILLIC SMALL LETTER EF"},{"char":"&#x445",desc:"CYRILLIC SMALL LETTER HA"},{"char":"&#x446",desc:"CYRILLIC SMALL LETTER TSE"},{"char":"&#x447",desc:"CYRILLIC SMALL LETTER CHE"},{"char":"&#x448",desc:"CYRILLIC SMALL LETTER SHA"},{"char":"&#x449",desc:"CYRILLIC SMALL LETTER SHCHA"},{"char":"&#x44A",desc:"CYRILLIC SMALL LETTER HARD SIGN"},{"char":"&#x44B",desc:"CYRILLIC SMALL LETTER YERU"},{"char":"&#x44C",desc:"CYRILLIC SMALL LETTER SOFT SIGN"},{"char":"&#x44D",desc:"CYRILLIC SMALL LETTER E"},{"char":"&#x44E",desc:"CYRILLIC SMALL LETTER YU"},{"char":"&#x44F",desc:"CYRILLIC SMALL LETTER YA"},{"char":"&#x450",desc:"CYRILLIC SMALL LETTER IE WITH GRAVE"},{"char":"&#x451",desc:"CYRILLIC SMALL LETTER IO"},{"char":"&#x452",desc:"CYRILLIC SMALL LETTER DJE"},{"char":"&#x453",desc:"CYRILLIC SMALL LETTER GJE"},{"char":"&#x454",desc:"CYRILLIC SMALL LETTER UKRAINIAN IE"},{"char":"&#x455",desc:"CYRILLIC SMALL LETTER DZE"},{"char":"&#x456",desc:"CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I"},{"char":"&#x457",desc:"CYRILLIC SMALL LETTER YI"},{"char":"&#x458",desc:"CYRILLIC SMALL LETTER JE"},{"char":"&#x459",desc:"CYRILLIC SMALL LETTER LJE"},{"char":"&#x45A",desc:"CYRILLIC SMALL LETTER NJE"},{"char":"&#x45B",desc:"CYRILLIC SMALL LETTER TSHE"},{"char":"&#x45C",desc:"CYRILLIC SMALL LETTER KJE"},{"char":"&#x45D",desc:"CYRILLIC SMALL LETTER I WITH GRAVE"},{"char":"&#x45E",desc:"CYRILLIC SMALL LETTER SHORT U"},{"char":"&#x45F",desc:"CYRILLIC SMALL LETTER DZHE"}]},{title:"Punctuation","char":"&ndash;",list:[{"char":"&ndash;",desc:"EN DASH"},{"char":"&mdash;",desc:"EM DASH"},{"char":"&lsquo;",desc:"LEFT SINGLE QUOTATION MARK"},{"char":"&rsquo;",desc:"RIGHT SINGLE QUOTATION MARK"},{"char":"&sbquo;",desc:"SINGLE LOW-9 QUOTATION MARK"},{"char":"&ldquo;",desc:"LEFT DOUBLE QUOTATION MARK"},{"char":"&rdquo;",desc:"RIGHT DOUBLE QUOTATION MARK"},{"char":"&bdquo;",desc:"DOUBLE LOW-9 QUOTATION MARK"},{"char":"&dagger;",desc:"DAGGER"},{"char":"&Dagger;",desc:"DOUBLE DAGGER"},{"char":"&bull;",desc:"BULLET"},{"char":"&hellip;",desc:"HORIZONTAL ELLIPSIS"},{"char":"&permil;",desc:"PER MILLE SIGN"},{"char":"&prime;",desc:"PRIME"},{"char":"&Prime;",desc:"DOUBLE PRIME"},{"char":"&lsaquo;",desc:"SINGLE LEFT-POINTING ANGLE QUOTATION MARK"},{"char":"&rsaquo;",desc:"SINGLE RIGHT-POINTING ANGLE QUOTATION MARK"},{"char":"&oline;",desc:"OVERLINE"},{"char":"&frasl;",desc:"FRACTION SLASH"}]},{title:"Currency","char":"&#x20A0",list:[{"char":"&#x20A0",desc:"EURO-CURRENCY SIGN"},{"char":"&#x20A1",desc:"COLON SIGN"},{"char":"&#x20A2",desc:"CRUZEIRO SIGN"},{"char":"&#x20A3",desc:"FRENCH FRANC SIGN"},{"char":"&#x20A4",desc:"LIRA SIGN"},{"char":"&#x20A5",desc:"MILL SIGN"},{"char":"&#x20A6",desc:"NAIRA SIGN"},{"char":"&#x20A7",desc:"PESETA SIGN"},{"char":"&#x20A8",desc:"RUPEE SIGN"},{"char":"&#x20A9",desc:"WON SIGN"},{"char":"&#x20AA",desc:"NEW SHEQEL SIGN"},{"char":"&#x20AB",desc:"DONG SIGN"},{"char":"&#x20AC",desc:"EURO SIGN"},{"char":"&#x20AD",desc:"KIP SIGN"},{"char":"&#x20AE",desc:"TUGRIK SIGN"},{"char":"&#x20AF",desc:"DRACHMA SIGN"},{"char":"&#x20B0",desc:"GERMAN PENNY SYMBOL"},{"char":"&#x20B1",desc:"PESO SIGN"},{"char":"&#x20B2",desc:"GUARANI SIGN"},{"char":"&#x20B3",desc:"AUSTRAL SIGN"},{"char":"&#x20B4",desc:"HRYVNIA SIGN"},{"char":"&#x20B5",desc:"CEDI SIGN"},{"char":"&#x20B6",desc:"LIVRE TOURNOIS SIGN"},{"char":"&#x20B7",desc:"SPESMILO SIGN"},{"char":"&#x20B8",desc:"TENGE SIGN"},{"char":"&#x20B9",desc:"INDIAN RUPEE SIGN"}]},{title:"Arrows","char":"&#x2190",list:[{"char":"&#x2190",desc:"LEFTWARDS ARROW"},{"char":"&#x2191",desc:"UPWARDS ARROW"},{"char":"&#x2192",desc:"RIGHTWARDS ARROW"},{"char":"&#x2193",desc:"DOWNWARDS ARROW"},{"char":"&#x2194",desc:"LEFT RIGHT ARROW"},{"char":"&#x2195",desc:"UP DOWN ARROW"},{"char":"&#x2196",desc:"NORTH WEST ARROW"},{"char":"&#x2197",desc:"NORTH EAST ARROW"},{"char":"&#x2198",desc:"SOUTH EAST ARROW"},{"char":"&#x2199",desc:"SOUTH WEST ARROW"},{"char":"&#x219A",desc:"LEFTWARDS ARROW WITH STROKE"},{"char":"&#x219B",desc:"RIGHTWARDS ARROW WITH STROKE"},{"char":"&#x219C",desc:"LEFTWARDS WAVE ARROW"},{"char":"&#x219D",desc:"RIGHTWARDS WAVE ARROW"},{"char":"&#x219E",desc:"LEFTWARDS TWO HEADED ARROW"},{"char":"&#x219F",desc:"UPWARDS TWO HEADED ARROW"},{"char":"&#x21A0",desc:"RIGHTWARDS TWO HEADED ARROW"},{"char":"&#x21A1",desc:"DOWNWARDS TWO HEADED ARROW"},{"char":"&#x21A2",desc:"LEFTWARDS ARROW WITH TAIL"},{"char":"&#x21A3",desc:"RIGHTWARDS ARROW WITH TAIL"},{"char":"&#x21A4",desc:"LEFTWARDS ARROW FROM BAR"},{"char":"&#x21A5",desc:"UPWARDS ARROW FROM BAR"},{"char":"&#x21A6",desc:"RIGHTWARDS ARROW FROM BAR"},{"char":"&#x21A7",desc:"DOWNWARDS ARROW FROM BAR"},{"char":"&#x21A8",desc:"UP DOWN ARROW WITH BASE"},{"char":"&#x21A9",desc:"LEFTWARDS ARROW WITH HOOK"},{"char":"&#x21AA",desc:"RIGHTWARDS ARROW WITH HOOK"},{"char":"&#x21AB",desc:"LEFTWARDS ARROW WITH LOOP"},{"char":"&#x21AC",desc:"RIGHTWARDS ARROW WITH LOOP"},{"char":"&#x21AD",desc:"LEFT RIGHT WAVE ARROW"},{"char":"&#x21AE",desc:"LEFT RIGHT ARROW WITH STROKE"},{"char":"&#x21AF",desc:"DOWNWARDS ZIGZAG ARROW"},{"char":"&#x21B0",desc:"UPWARDS ARROW WITH TIP LEFTWARDS"},{"char":"&#x21B1",desc:"UPWARDS ARROW WITH TIP RIGHTWARDS"},{"char":"&#x21B2",desc:"DOWNWARDS ARROW WITH TIP LEFTWARDS"},{"char":"&#x21B3",desc:"DOWNWARDS ARROW WITH TIP RIGHTWARDS"},{"char":"&#x21B4",desc:"RIGHTWARDS ARROW WITH CORNER DOWNWARDS"},{"char":"&#x21B5",desc:"DOWNWARDS ARROW WITH CORNER LEFTWARDS"},{"char":"&#x21B6",desc:"ANTICLOCKWISE TOP SEMICIRCLE ARROW"},{"char":"&#x21B7",desc:"CLOCKWISE TOP SEMICIRCLE ARROW"},{"char":"&#x21B8",desc:"NORTH WEST ARROW TO LONG BAR"},{"char":"&#x21B9",desc:"LEFTWARDS ARROW TO BAR OVER RIGHTWARDS ARROW TO BAR"},{"char":"&#x21BA",desc:"ANTICLOCKWISE OPEN CIRCLE ARROW"},{"char":"&#x21BB",desc:"CLOCKWISE OPEN CIRCLE ARROW"},{"char":"&#x21BC",desc:"LEFTWARDS HARPOON WITH BARB UPWARDS"},{"char":"&#x21BD",desc:"LEFTWARDS HARPOON WITH BARB DOWNWARDS"},{"char":"&#x21BE",desc:"UPWARDS HARPOON WITH BARB RIGHTWARDS"},{"char":"&#x21BF",desc:"UPWARDS HARPOON WITH BARB LEFTWARDS"},{"char":"&#x21C0",desc:"RIGHTWARDS HARPOON WITH BARB UPWARDS"},{"char":"&#x21C1",desc:"RIGHTWARDS HARPOON WITH BARB DOWNWARDS"},{"char":"&#x21C2",desc:"DOWNWARDS HARPOON WITH BARB RIGHTWARDS"},{"char":"&#x21C3",desc:"DOWNWARDS HARPOON WITH BARB LEFTWARDS"},{"char":"&#x21C4",desc:"RIGHTWARDS ARROW OVER LEFTWARDS ARROW"},{"char":"&#x21C5",desc:"UPWARDS ARROW LEFTWARDS OF DOWNWARDS ARROW"},{"char":"&#x21C6",desc:"LEFTWARDS ARROW OVER RIGHTWARDS ARROW"},{"char":"&#x21C7",desc:"LEFTWARDS PAIRED ARROWS"},{"char":"&#x21C8",desc:"UPWARDS PAIRED ARROWS"},{"char":"&#x21C9",desc:"RIGHTWARDS PAIRED ARROWS"},{"char":"&#x21CA",desc:"DOWNWARDS PAIRED ARROWS"},{"char":"&#x21CB",desc:"LEFTWARDS HARPOON OVER RIGHTWARDS HARPOON"},{"char":"&#x21CC",desc:"RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON"},{"char":"&#x21CD",desc:"LEFTWARDS DOUBLE ARROW WITH STROKE"},{"char":"&#x21CE",desc:"LEFT RIGHT DOUBLE ARROW WITH STROKE"},{"char":"&#x21CF",desc:"RIGHTWARDS DOUBLE ARROW WITH STROKE"},{"char":"&#x21D0",desc:"LEFTWARDS DOUBLE ARROW"},{"char":"&#x21D1",desc:"UPWARDS DOUBLE ARROW"},{"char":"&#x21D2",desc:"RIGHTWARDS DOUBLE ARROW"},{"char":"&#x21D3",desc:"DOWNWARDS DOUBLE ARROW"},{"char":"&#x21D4",desc:"LEFT RIGHT DOUBLE ARROW"},{"char":"&#x21D5",desc:"UP DOWN DOUBLE ARROW"},{"char":"&#x21D6",desc:"NORTH WEST DOUBLE ARROW"},{"char":"&#x21D7",desc:"NORTH EAST DOUBLE ARROW"},{"char":"&#x21D8",desc:"SOUTH EAST DOUBLE ARROW"},{"char":"&#x21D9",desc:"SOUTH WEST DOUBLE ARROW"},{"char":"&#x21DA",desc:"LEFTWARDS TRIPLE ARROW"},{"char":"&#x21DB",desc:"RIGHTWARDS TRIPLE ARROW"},{"char":"&#x21DC",desc:"LEFTWARDS SQUIGGLE ARROW"},{"char":"&#x21DD",desc:"RIGHTWARDS SQUIGGLE ARROW"},{"char":"&#x21DE",desc:"UPWARDS ARROW WITH DOUBLE STROKE"},{"char":"&#x21DF",desc:"DOWNWARDS ARROW WITH DOUBLE STROKE"},{"char":"&#x21E0",desc:"LEFTWARDS DASHED ARROW"},{"char":"&#x21E1",desc:"UPWARDS DASHED ARROW"},{"char":"&#x21E2",desc:"RIGHTWARDS DASHED ARROW"},{"char":"&#x21E3",desc:"DOWNWARDS DASHED ARROW"},{"char":"&#x21E4",desc:"LEFTWARDS ARROW TO BAR"},{"char":"&#x21E5",desc:"RIGHTWARDS ARROW TO BAR"},{"char":"&#x21E6",desc:"LEFTWARDS WHITE ARROW"},{"char":"&#x21E7",desc:"UPWARDS WHITE ARROW"},{"char":"&#x21E8",desc:"RIGHTWARDS WHITE ARROW"},{"char":"&#x21E9",desc:"DOWNWARDS WHITE ARROW"},{"char":"&#x21EA",desc:"UPWARDS WHITE ARROW FROM BAR"},{"char":"&#x21EB",desc:"UPWARDS WHITE ARROW ON PEDESTAL"},{"char":"&#x21EC",desc:"UPWARDS WHITE ARROW ON PEDESTAL WITH HORIZONTAL BAR"},{"char":"&#x21ED",desc:"UPWARDS WHITE ARROW ON PEDESTAL WITH VERTICAL BAR"},{"char":"&#x21EE",desc:"UPWARDS WHITE DOUBLE ARROW"},{"char":"&#x21EF",desc:"UPWARDS WHITE DOUBLE ARROW ON PEDESTAL"},{"char":"&#x21F0",desc:"RIGHTWARDS WHITE ARROW FROM WALL"},{"char":"&#x21F1",desc:"NORTH WEST ARROW TO CORNER"},{"char":"&#x21F2",desc:"SOUTH EAST ARROW TO CORNER"},{"char":"&#x21F3",desc:"UP DOWN WHITE ARROW"},{"char":"&#x21F4",desc:"RIGHT ARROW WITH SMALL CIRCLE"},{"char":"&#x21F5",desc:"DOWNWARDS ARROW LEFTWARDS OF UPWARDS ARROW"},{"char":"&#x21F6",desc:"THREE RIGHTWARDS ARROWS"},{"char":"&#x21F7",desc:"LEFTWARDS ARROW WITH VERTICAL STROKE"},{"char":"&#x21F8",desc:"RIGHTWARDS ARROW WITH VERTICAL STROKE"},{"char":"&#x21F9",desc:"LEFT RIGHT ARROW WITH VERTICAL STROKE"},{"char":"&#x21FA",desc:"LEFTWARDS ARROW WITH DOUBLE VERTICAL STROKE"},{"char":"&#x21FB",desc:"RIGHTWARDS ARROW WITH DOUBLE VERTICAL STROKE"},{"char":"&#x21FC",desc:"LEFT RIGHT ARROW WITH DOUBLE VERTICAL STROKE"},{"char":"&#x21FD",desc:"LEFTWARDS OPEN-HEADED ARROW"},{"char":"&#x21FE",desc:"RIGHTWARDS OPEN-HEADED ARROW"},{"char":"&#x21FF",desc:"LEFT RIGHT OPEN-HEADED ARROW"}]},{title:"Math","char":"&forall;",list:[{"char":"&forall;",desc:"FOR ALL"},{"char":"&part;",desc:"PARTIAL DIFFERENTIAL"},{"char":"&exist;",desc:"THERE EXISTS"},{"char":"&empty;",desc:"EMPTY SET"},{"char":"&nabla;",desc:"NABLA"},{"char":"&isin;",desc:"ELEMENT OF"},{"char":"&notin;",desc:"NOT AN ELEMENT OF"},{"char":"&ni;",desc:"CONTAINS AS MEMBER"},{"char":"&prod;",desc:"N-ARY PRODUCT"},{"char":"&sum;",desc:"N-ARY SUMMATION"},{"char":"&minus;",desc:"MINUS SIGN"},{"char":"&lowast;",desc:"ASTERISK OPERATOR"},{"char":"&radic;",desc:"SQUARE ROOT"},{"char":"&prop;",desc:"PROPORTIONAL TO"},{"char":"&infin;",desc:"INFINITY"},{"char":"&ang;",desc:"ANGLE"},{"char":"&and;",desc:"LOGICAL AND"},{"char":"&or;",desc:"LOGICAL OR"},{"char":"&cap;",desc:"INTERSECTION"},{"char":"&cup;",desc:"UNION"},{"char":"&int;",desc:"INTEGRAL"},{"char":"&there4;",desc:"THEREFORE"},{"char":"&sim;",desc:"TILDE OPERATOR"},{"char":"&cong;",desc:"APPROXIMATELY EQUAL TO"},{"char":"&asymp;",desc:"ALMOST EQUAL TO"},{"char":"&ne;",desc:"NOT EQUAL TO"},{"char":"&equiv;",desc:"IDENTICAL TO"},{"char":"&le;",desc:"LESS-THAN OR EQUAL TO"},{"char":"&ge;",desc:"GREATER-THAN OR EQUAL TO"},{"char":"&sub;",desc:"SUBSET OF"},{"char":"&sup;",desc:"SUPERSET OF"},{"char":"&nsub;",desc:"NOT A SUBSET OF"},{"char":"&sube;",desc:"SUBSET OF OR EQUAL TO"},{"char":"&supe;",desc:"SUPERSET OF OR EQUAL TO"},{"char":"&oplus;",desc:"CIRCLED PLUS"},{"char":"&otimes;",desc:"CIRCLED TIMES"},{"char":"&perp;",desc:"UP TACK"}]},{title:"Misc","char":"&spades;",list:[{"char":"&spades;",desc:"BLACK SPADE SUIT"},{"char":"&clubs;",desc:"BLACK CLUB SUIT"},{"char":"&hearts;",desc:"BLACK HEART SUIT"},{"char":"&diams;",desc:"BLACK DIAMOND SUIT"},{"char":"&#x2669",desc:"QUARTER NOTE"},{"char":"&#x266A",desc:"EIGHTH NOTE"},{"char":"&#x266B",desc:"BEAMED EIGHTH NOTES"},{"char":"&#x266C",desc:"BEAMED SIXTEENTH NOTES"},{"char":"&#x266D",desc:"MUSIC FLAT SIGN"},{"char":"&#x266E",desc:"MUSIC NATURAL SIGN"},{"char":"&#x2600",desc:"BLACK SUN WITH RAYS"},{"char":"&#x2601",desc:"CLOUD"},{"char":"&#x2602",desc:"UMBRELLA"},{"char":"&#x2603",desc:"SNOWMAN"},{"char":"&#x2615",desc:"HOT BEVERAGE"},{"char":"&#x2618",desc:"SHAMROCK"},{"char":"&#x262F",desc:"YIN YANG"},{"char":"&#x2714",desc:"HEAVY CHECK MARK"},{"char":"&#x2716",desc:"HEAVY MULTIPLICATION X"},{"char":"&#x2744",desc:"SNOWFLAKE"},{"char":"&#x275B",desc:"HEAVY SINGLE TURNED COMMA QUOTATION MARK ORNAMENT"},{"char":"&#x275C",desc:"HEAVY SINGLE COMMA QUOTATION MARK ORNAMENT"},{"char":"&#x275D",desc:"HEAVY DOUBLE TURNED COMMA QUOTATION MARK ORNAMENT"},{"char":"&#x275E",desc:"HEAVY DOUBLE COMMA QUOTATION MARK ORNAMENT"},{"char":"&#x2764",desc:"HEAVY BLACK HEART"}]}],specialCharButtons:["specialCharBack","|"]}),Object.assign(t.POPUP_TEMPLATES,{specialCharacters:"[_BUTTONS_][_CUSTOM_LAYER_]"}),t.PLUGINS.specialCharacters=function(W){var N=W.$,T=W.opts.specialCharactersSets[0],L=W.opts.specialCharactersSets,a="";function I(){return'\n <div class="fr-buttons fr-tabs fr-tabs-scroll">\n '.concat(function E(c,T){var R="";return c.forEach(function(c){var E={elementClass:c.title===T.title?"fr-active fr-active-tab":"",title:c.title,dataParam1:c.title,desc:c["char"]};R+='<button class="fr-command fr-btn fr-special-character-category '.concat(E.elementClass,'" title="').concat(E.title,'" data-cmd="setSpecialCharacterCategory" data-param1="').concat(E.dataParam1,'"><span>').concat(E.desc,"</span></button>")}),R}(L,T),'\n </div>\n <div class="fr-icon-container fr-sc-container">\n ').concat(function R(c){var T="";return c.list.forEach(function(c){var E={dataParam1:c["char"],title:c.desc,splCharValue:c["char"]};T+='<span class="fr-command fr-special-character fr-icon" role="button" \n data-cmd="insertSpecialCharacter" data-param1="'.concat(E.dataParam1,'" \n title="').concat(E.title,'">').concat(E.splCharValue,"</span>")}),T}(T),"\n </div>")}return{setSpecialCharacterCategory:function R(E){T=L.filter(function(c){return c.title===E})[0],function c(){W.popups.get("specialCharacters").html(a+I())}()},showSpecialCharsPopup:function e(){var c=W.popups.get("specialCharacters");if(c||(c=function A(){W.opts.toolbarInline&&0<W.opts.specialCharButtons.length&&(a='<div class="fr-buttons fr-tabs">'.concat(W.button.buildList(W.opts.specialCharButtons),"</div>"));var c={buttons:a,custom_layer:I()},E=W.popups.create("specialCharacters",c);return function T(S){W.events.on("popup.tab",function(c){var E=N(c.currentTarget);if(!W.popups.isVisible("specialCharacters")||!E.is("span, a"))return!0;var T,R,L,A=c.which;if(t.KEYCODE.TAB==A){if(E.is("span.fr-icon")&&c.shiftKey||E.is("a")&&!c.shiftKey){var a=S.find(".fr-buttons");T=!W.accessibility.focusToolbar(a,!!c.shiftKey)}if(!1!==T){var I=S.find("span.fr-icon:focus").first().concat(S.findVisible(" span.fr-icon").first().concat(S.find("a")));E.is("span.fr-icon")&&(I=I.not("span.fr-icon:not(:focus)")),R=I.index(E),R=c.shiftKey?((R-1)%I.length+I.length)%I.length:(R+1)%I.length,L=I.get(R),W.events.disableBlur(),L.focus(),T=!1}}else if(t.KEYCODE.ARROW_UP==A||t.KEYCODE.ARROW_DOWN==A||t.KEYCODE.ARROW_LEFT==A||t.KEYCODE.ARROW_RIGHT==A){if(E.is("span.fr-icon")){var e=E.parent().find("span.fr-icon");R=e.index(E);var r=11,s=Math.floor(e.length/r),h=R%r,d=Math.floor(R/r),C=d*r+h,O=s*r;t.KEYCODE.ARROW_UP==A?C=((C-r)%O+O)%O:t.KEYCODE.ARROW_DOWN==A?C=(C+r)%O:t.KEYCODE.ARROW_LEFT==A?C=((C-1)%O+O)%O:t.KEYCODE.ARROW_RIGHT==A&&(C=(C+1)%O),L=N(e.get(C)),W.events.disableBlur(),L.focus(),T=!1}}else t.KEYCODE.ENTER==A&&(E.is("a")?E[0].click():W.button.exec(E),T=!1);return!1===T&&(c.preventDefault(),c.stopPropagation()),T},!0)}(E),E}()),!c.hasClass("fr-active")){W.popups.refresh("specialCharacters"),W.popups.setContainer("specialCharacters",W.$tb);var E=W.$tb.find('.fr-command[data-cmd="specialCharacters"]'),T=W.button.getPosition(E),R=T.left,L=T.top;W.popups.show("specialCharacters",R,L,outerHeight)}},back:function c(){W.popups.hide("specialCharacters"),W.toolbar.showInline()}}},t.DefineIcon("specialCharacters",{NAME:"dollar-sign",SVG_KEY:"symbols"}),t.RegisterCommand("specialCharacters",{title:"Special Characters",icon:"specialCharacters",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,plugin:"specialCharacters",showOnMobile:!0,callback:function(){this.popups.isVisible("specialCharacters")?(this.$el.find(".fr-marker")&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("specialCharacters")):this.specialCharacters.showSpecialCharsPopup()}}),t.RegisterCommand("insertSpecialCharacter",{callback:function(c,E){this.undo.saveStep(),this.html.insert(E),this.undo.saveStep(),this.popups.hide("specialCharacters")}}),t.RegisterCommand("setSpecialCharacterCategory",{undo:!1,focus:!1,callback:function(c,E){this.specialCharacters.setSpecialCharacterCategory(E)}}),t.DefineIcon("specialCharBack",{NAME:"arrow-left",SVG_KEY:"back"}),t.RegisterCommand("specialCharBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.specialCharacters.back()}})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 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(me){"use strict";me=me&&me.hasOwnProperty("default")?me["default"]:me,Object.assign(me.POPUP_TEMPLATES,{"table.insert":"[_BUTTONS_][_ROWS_COLUMNS_]","table.edit":"[_BUTTONS_]","table.colors":"[_BUTTONS_][_COLORS_][_CUSTOM_COLOR_]"}),Object.assign(me.DEFAULTS,{tableInsertMaxSize:10,tableEditButtons:["tableHeader","tableRemove","tableRows","tableColumns","tableStyle","-","tableCells","tableCellBackground","tableCellVerticalAlign","tableCellHorizontalAlign","tableCellStyle"],tableInsertButtons:["tableBack","|"],tableResizer:!0,tableDefaultWidth:"100%",tableResizerOffset:5,tableResizingLimit:30,tableColorsButtons:["tableBack","|"],tableColors:["#61BD6D","#1ABC9C","#54ACD2","#2C82C9","#9365B8","#475577","#CCCCCC","#41A85F","#00A885","#3D8EB9","#2969B0","#553982","#28324E","#000000","#F7DA64","#FBA026","#EB6B56","#E25041","#A38F84","#EFEFEF","#FFFFFF","#FAC51C","#F37934","#D14841","#B8312F","#7C706B","#D1D5D8","REMOVE"],tableColorsStep:7,tableCellStyles:{"fr-highlighted":"Highlighted","fr-thick":"Thick"},tableStyles:{"fr-dashed-borders":"Dashed Borders","fr-alternate-rows":"Alternate Rows"},tableCellMultipleStyles:!0,tableMultipleStyles:!0,tableInsertHelper:!0,tableInsertHelperOffset:15}),me.PLUGINS.table=function(R){var O,f,n,r,l,o,A,x=R.$;function h(){var e=_();if(e){var t=R.popups.get("table.edit");if(t||(t=p()),t){R.popups.setContainer("table.edit",R.$sc);var a=S(e),l=a.left+(a.right-a.left)/2,n=a.bottom;R.popups.show("table.edit",l,n,a.bottom-a.top,!0),R.edit.isDisabled()&&(1<Z().length&&R.toolbar.disable(),R.$el.removeClass("fr-no-selection"),R.edit.on(),R.button.bulkRefresh(),R.selection.setAtEnd(R.$el.find(".fr-selected-cell").last().get(0)),R.selection.restore())}}}function s(){var e=_();if(e){var t=R.popups.get("table.colors");t||(t=function o(){var e="";0<R.opts.tableColorsButtons.length&&(e='<div class="fr-buttons fr-tabs">'.concat(R.button.buildList(R.opts.tableColorsButtons),"</div>"));var t="";R.opts.colorsHEXInput&&(t='<div class="fr-color-hex-layer fr-table-colors-hex-layer fr-active fr-layer" id="fr-table-colors-hex-layer-'.concat(R.id,'"><div class="fr-input-line"><input maxlength="7" id="fr-table-colors-hex-layer-text-').concat(R.id,'" type="text" placeholder="').concat(R.language.translate("HEX Color"),'" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="tableCellBackgroundCustomColor" tabIndex="2" role="button">').concat(R.language.translate("OK"),"</button></div></div>"));var a={buttons:e,colors:function n(){for(var e='<div class="fr-color-set fr-table-colors">',t=0;t<R.opts.tableColors.length;t++)0!==t&&t%R.opts.tableColorsStep==0&&(e+="<br>"),"REMOVE"!=R.opts.tableColors[t]?e+='<span class="fr-command" style="background: '.concat(R.opts.tableColors[t],';" tabIndex="-1" role="button" data-cmd="tableCellBackgroundColor" data-param1="').concat(R.opts.tableColors[t],'"><span class="fr-sr-only">').concat(R.language.translate("Color")," ").concat(R.opts.tableColors[t],"&nbsp;&nbsp;&nbsp;</span></span>"):e+='<span class="fr-command" data-cmd="tableCellBackgroundColor" tabIndex="-1" role="button" data-param1="REMOVE" title="'.concat(R.language.translate("Clear Formatting"),'">').concat(R.icon.create("tableColorRemove"),'<span class="fr-sr-only">').concat(R.language.translate("Clear Formatting"),"</span></span>");return e+="</div>"}(),custom_color:t},l=R.popups.create("table.colors",a);return R.events.$on(R.$wp,"scroll.table-colors",function(){R.popups.isVisible("table.colors")&&s()}),function r(u){R.events.on("popup.tab",function(e){var t=x(e.currentTarget);if(!R.popups.isVisible("table.colors")||!t.is("span"))return!0;var a=e.which,l=!0;if(me.KEYCODE.TAB==a){var n=u.find(".fr-buttons");l=!R.accessibility.focusToolbar(n,!!e.shiftKey)}else if(me.KEYCODE.ARROW_UP==a||me.KEYCODE.ARROW_DOWN==a||me.KEYCODE.ARROW_LEFT==a||me.KEYCODE.ARROW_RIGHT==a){var r=t.parent().find("span.fr-command"),o=r.index(t),s=R.opts.colorsStep,i=Math.floor(r.length/s),f=o%s,c=Math.floor(o/s),d=c*s+f,p=i*s;me.KEYCODE.ARROW_UP==a?d=((d-s)%p+p)%p:me.KEYCODE.ARROW_DOWN==a?d=(d+s)%p:me.KEYCODE.ARROW_LEFT==a?d=((d-1)%p+p)%p:me.KEYCODE.ARROW_RIGHT==a&&(d=(d+1)%p);var h=x(r.get(d));R.events.disableBlur(),h.focus(),l=!1}else me.KEYCODE.ENTER==a&&(R.button.exec(t),l=!1);return!1===l&&(e.preventDefault(),e.stopPropagation()),l},!0)}(l),l}()),R.popups.setContainer("table.colors",R.$sc);var a=S(e),l=(a.left+a.right)/2,n=a.bottom;!function r(){var e=R.popups.get("table.colors"),t=R.$el.find(".fr-selected-cell").first(),a=R.helpers.RGBToHex(t.css("background-color")),l=e.find(".fr-table-colors-hex-layer input");e.find(".fr-selected-color").removeClass("fr-selected-color fr-active-item"),e.find('span[data-param1="'.concat(a,'"]')).addClass("fr-selected-color fr-active-item"),l.val(a).trigger("change")}(),R.popups.show("table.colors",l,n,a.bottom-a.top,!0)}}function i(){0===Z().length&&R.toolbar.enable()}function c(e){if(e)return R.popups.onHide("table.insert",function(){R.popups.get("table.insert").find('.fr-table-size .fr-select-table-size > span[data-row="1"][data-col="1"]').trigger("mouseover")}),!0;var t="";0<R.opts.tableInsertButtons.length&&(t='<div class="fr-buttons fr-tabs">'.concat(R.button.buildList(R.opts.tableInsertButtons),"</div>"));var a={buttons:t,rows_columns:function r(){for(var e='<div class="fr-table-size"><div class="fr-table-size-info">1 &times; 1</div><div class="fr-select-table-size">',t=1;t<=R.opts.tableInsertMaxSize;t++){for(var a=1;a<=R.opts.tableInsertMaxSize;a++){var l="inline-block";2<t&&!R.helpers.isMobile()&&(l="none");var n="fr-table-cell ";1==t&&1==a&&(n+=" hover"),e+='<span class="fr-command '.concat(n,'" tabIndex="-1" data-cmd="tableInsert" data-row="').concat(t,'" data-col="').concat(a,'" data-param1="').concat(t,'" data-param2="').concat(a,'" style="display: ').concat(l,';" role="button"><span></span><span class="fr-sr-only">').concat(t," &times; ").concat(a,"&nbsp;&nbsp;&nbsp;</span></span>")}e+='<div class="new-line"></div>'}return e+="</div></div>"}()},l=R.popups.create("table.insert",a);return R.events.$on(l,"mouseover",".fr-table-size .fr-select-table-size .fr-table-cell",function(e){d(x(e.currentTarget))},!0),function n(e){R.events.$on(e,"focus","[tabIndex]",function(e){var t=x(e.currentTarget);d(t)}),R.events.on("popup.tab",function(e){var t=x(e.currentTarget);if(!R.popups.isVisible("table.insert")||!t.is("span, a"))return!0;var a,l=e.which;if(me.KEYCODE.ARROW_UP==l||me.KEYCODE.ARROW_DOWN==l||me.KEYCODE.ARROW_LEFT==l||me.KEYCODE.ARROW_RIGHT==l){if(t.is("span.fr-table-cell")){var n=t.parent().find("span.fr-table-cell"),r=n.index(t),o=R.opts.tableInsertMaxSize,s=r%o,i=Math.floor(r/o);me.KEYCODE.ARROW_UP==l?i=Math.max(0,i-1):me.KEYCODE.ARROW_DOWN==l?i=Math.min(R.opts.tableInsertMaxSize-1,i+1):me.KEYCODE.ARROW_LEFT==l?s=Math.max(0,s-1):me.KEYCODE.ARROW_RIGHT==l&&(s=Math.min(R.opts.tableInsertMaxSize-1,s+1));var f=i*o+s,c=x(n.get(f));d(c),R.events.disableBlur(),c.focus(),a=!1}}else me.KEYCODE.ENTER==l&&(R.button.exec(t),a=!1);return!1===a&&(e.preventDefault(),e.stopPropagation()),a},!0)}(l),l}function d(e){var t=e.data("row");null!==t&&(t=parseInt(t));var a=e.data("col");null!==a&&(a=parseInt(a));var l=e.parent();l.siblings(".fr-table-size-info").html("".concat(t," &times; ").concat(a)),l.find("> span").removeClass("hover fr-active-item");for(var n=1;n<=R.opts.tableInsertMaxSize;n++)for(var r=0;r<=R.opts.tableInsertMaxSize;r++){var o=l.find('> span[data-row="'.concat(n,'"][data-col="').concat(r,'"]'));n<=t&&r<=a?o.addClass("hover"):n<=t+1||n<=2&&!R.helpers.isMobile()?o.css("display","inline-block"):2<n&&!R.helpers.isMobile()&&o.css("display","none")}e.addClass("fr-active-item")}function p(e){if(e)return R.popups.onHide("table.edit",i),!0;if(0<R.opts.tableEditButtons.length){var t={buttons:'<div class="fr-buttons">'.concat(R.button.buildList(R.opts.tableEditButtons),"</div>")},a=R.popups.create("table.edit",t);return R.events.$on(R.$wp,"scroll.table-edit",function(){R.popups.isVisible("table.edit")&&h()}),a}return!1}function u(){if(0<Z().length){var e=Q();R.selection.setBefore(e.get(0))||R.selection.setAfter(e.get(0)),R.selection.restore(),R.popups.hide("table.edit"),e.remove(),R.toolbar.enable()}}function b(e){var t=Q();if(0<t.length){if(0<R.$el.find("th.fr-selected-cell").length&&"above"==e)return;var a,l,n,r=_(),o=M(r);if(null==o)return;l="above"==e?o.min_i:o.max_i;var s="<tr>";for(a=0;a<r[l].length;a++){if("below"==e&&l<r.length-1&&r[l][a]==r[l+1][a]||"above"==e&&0<l&&r[l][a]==r[l-1][a]){if(0===a||0<a&&r[l][a]!=r[l][a-1]){var i=x(r[l][a]);i.attr("rowspan",parseInt(i.attr("rowspan"),10)+1)}}else s+='<td style="'+x(r[l][a]).attr("style")+'" ><br></td>'}s+="</tr>",n=0<R.$el.find("th.fr-selected-cell").length&&"below"==e?x(t.find("tbody").not(t.find("> table tbody"))):x(t.find("tr").not(t.find("> table tr")).get(l)),"below"==e?"TBODY"==n.attr("tagName")?n.prepend(s):n[0].parentNode&&n[0].insertAdjacentHTML("afterend",s):"above"==e&&(n.before(s),R.popups.isVisible("table.edit")&&h())}}function g(e,t,a){var l,n,r,o,s,i=0,f=_(a);if(e<(t=Math.min(t,f[0].length-1)))for(n=e;n<=t;n++)if(!(e<n&&f[0][n]==f[0][n-1])&&1<(o=Math.min(parseInt(f[0][n].getAttribute("colspan"),10)||1,t-e+1))&&f[0][n]==f[0][n+1])for(i=o-1,l=1;l<f.length;l++)if(f[l][n]!=f[l-1][n]){for(r=n;r<n+o;r++)if(1<(s=parseInt(f[l][r].getAttribute("colspan"),10)||1)&&f[l][r]==f[l][r+1])r+=i=Math.min(i,s-1);else if(!(i=Math.max(0,i-1)))break;if(!i)break}i&&v(f,i,"colspan",0,f.length-1,e,t)}function m(e,t,a){var l,n,r,o,s,i=0,f=_(a);if(e<(t=Math.min(t,f.length-1)))for(l=e;l<=t;l++)if(!(e<l&&f[l][0]==f[l-1][0])&&1<(o=Math.min(parseInt(f[l][0].getAttribute("rowspan"),10)||1,t-e+1))&&f[l][0]==f[l+1][0])for(i=o-1,n=1;n<f[0].length;n++)if(f[l][n]!=f[l][n-1]){for(r=l;r<l+o;r++)if(1<(s=parseInt(f[r][n].getAttribute("rowspan"),10)||1)&&f[r][n]==f[r+1][n])r+=i=Math.min(i,s-1);else if(!(i=Math.max(0,i-1)))break;if(!i)break}i&&v(f,i,"rowspan",e,t,0,f[0].length-1)}function v(e,t,a,l,n,r,o){var s,i,f;for(s=l;s<=n;s++)for(i=r;i<=o;i++)l<s&&e[s][i]==e[s-1][i]||r<i&&e[s][i]==e[s][i-1]||1<(f=parseInt(e[s][i].getAttribute(a),10)||1)&&(1<f-t?e[s][i].setAttribute(a,f-t):e[s][i].removeAttribute(a))}function w(e,t,a,l,n){m(e,t,n),g(a,l,n)}function t(e){var t=R.$el.find(".fr-selected-cell");"REMOVE"!=e?t.css("background-color",R.helpers.HEXtoRGB(e)):t.css("background-color",""),h()}function _(e){var f=[];return null==(e=e||null)&&0<Z().length&&(e=Q()),e&&e.findVisible("tr").not(e.find("> table tr")).each(function(s,e){var t=x(e),i=0;t.find("> th, > td").each(function(e,t){for(var a=x(t),l=parseInt(a.attr("colspan"),10)||1,n=parseInt(a.attr("rowspan"),10)||1,r=s;r<s+n;r++)for(var o=i;o<i+l;o++)f[r]||(f[r]=[]),f[r][o]?i++:f[r][o]=t;i+=l})}),f}function $(e,t){for(var a=0;a<t.length;a++)for(var l=0;l<t[a].length;l++)if(t[a][l]==e)return{row:a,col:l}}function D(e,t,a){for(var l=e+1,n=t+1;l<a.length;){if(a[l][t]!=a[e][t]){l--;break}l++}for(l==a.length&&l--;n<a[e].length;){if(a[e][n]!=a[e][t]){n--;break}n++}return n==a[e].length&&n--,{row:l,col:n}}function C(){R.el.querySelector(".fr-cell-fixed")&&R.el.querySelector(".fr-cell-fixed").classList.remove("fr-cell-fixed"),R.el.querySelector(".fr-cell-handler")&&R.el.querySelector(".fr-cell-handler").classList.remove("fr-cell-handler")}function E(){var e=R.$el.find(".fr-selected-cell");0<e.length&&e.each(function(){var e=x(this);e.removeClass("fr-selected-cell"),""===e.attr("class")&&e.removeAttr("class")}),C()}function y(){R.events.disableBlur(),R.selection.clear(),R.$el.addClass("fr-no-selection"),R.$el.blur(),R.events.enableBlur()}function M(e){var t=R.$el.find(".fr-selected-cell");if(0<t.length){var a,l=e.length,n=0,r=e[0].length,o=0;for(a=0;a<t.length;a++){var s=$(t[a],e),i=D(s.row,s.col,e);l=Math.min(s.row,l),n=Math.max(i.row,n),r=Math.min(s.col,r),o=Math.max(i.col,o)}return{min_i:l,max_i:n,min_j:r,max_j:o}}return null}function S(e){var t=M(e);if(null!=t){var a=x(e[t.min_i][t.min_j]),l=x(e[t.min_i][t.max_j]),n=x(e[t.max_i][t.min_j]);return{left:a.length&&a.offset().left,right:l.length&&l.offset().left+l.outerWidth(),top:a.length&&a.offset().top,bottom:n.length&&n.offset().top+n.outerHeight()}}}function I(e,t){if(x(e).is(t))E(),x(e).addClass("fr-selected-cell");else{y(),R.edit.off();var a=_(),l=$(e,a),n=$(t,a),r=function h(e,t,a,l,n){var r,o,s,i,f=e,c=t,d=a,p=l;for(r=f;r<=c;r++)(1<(parseInt(x(n[r][d]).attr("rowspan"),10)||1)||1<(parseInt(x(n[r][d]).attr("colspan"),10)||1))&&(i=D((s=$(n[r][d],n)).row,s.col,n),f=Math.min(s.row,f),c=Math.max(i.row,c),d=Math.min(s.col,d),p=Math.max(i.col,p)),(1<(parseInt(x(n[r][p]).attr("rowspan"),10)||1)||1<(parseInt(x(n[r][p]).attr("colspan"),10)||1))&&(i=D((s=$(n[r][p],n)).row,s.col,n),f=Math.min(s.row,f),c=Math.max(i.row,c),d=Math.min(s.col,d),p=Math.max(i.col,p));for(o=d;o<=p;o++)(1<(parseInt(x(n[f][o]).attr("rowspan"),10)||1)||1<(parseInt(x(n[f][o]).attr("colspan"),10)||1))&&(i=D((s=$(n[f][o],n)).row,s.col,n),f=Math.min(s.row,f),c=Math.max(i.row,c),d=Math.min(s.col,d),p=Math.max(i.col,p)),(1<(parseInt(x(n[c][o]).attr("rowspan"),10)||1)||1<(parseInt(x(n[c][o]).attr("colspan"),10)||1))&&(i=D((s=$(n[c][o],n)).row,s.col,n),f=Math.min(s.row,f),c=Math.max(i.row,c),d=Math.min(s.col,d),p=Math.max(i.col,p));return f==e&&c==t&&d==a&&p==l?{min_i:e,max_i:t,min_j:a,max_j:l}:h(f,c,d,p,n)}(Math.min(l.row,n.row),Math.max(l.row,n.row),Math.min(l.col,n.col),Math.max(l.col,n.col),a);E(),e.classList.add("fr-cell-fixed"),t.classList.add("fr-cell-handler");for(var o=r.min_i;o<=r.max_i;o++)for(var s=r.min_j;s<=r.max_j;s++)x(a[o][s]).addClass("fr-selected-cell")}}function N(e){var t=null,a=x(e.target);return"TD"==e.target.tagName||"TH"==e.target.tagName?t=e.target:0<a.closest("th",a.closest("thead")[0]).length?t=a.closest("th",a.closest("thead")[0]).get(0):0<a.closest("td",a.closest("tr")[0]).length&&(t=a.closest("td",a.closest("tr")[0]).get(0)),-1===R.$el.html.toString().search(t)?null:t}function T(){E(),R.popups.hide("table.edit")}function e(e){var t=N(e);if("false"==x(t).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(0<Z().length&&!t&&T(),!R.edit.isDisabled()||R.popups.isVisible("table.edit"))if(1!=e.which||1==e.which&&R.helpers.isMac()&&e.ctrlKey)(3==e.which||1==e.which&&R.helpers.isMac()&&e.ctrlKey)&&t&&T();else if(r=!0,t){0<Z().length&&!e.shiftKey&&T(),e.stopPropagation(),R.events.trigger("image.hideResizer"),R.events.trigger("video.hideResizer"),n=!0;var a=t.tagName.toLowerCase();e.shiftKey&&0<R.$el.find("".concat(a,".fr-selected-cell")).length?x(R.$el.find("".concat(a,".fr-selected-cell")).closest("table")).is(x(t).closest("table"))?I(l,t):y():((R.keys.ctrlKey(e)||e.shiftKey)&&(1<Z().length||0===x(t).find(R.selection.element()).length&&!x(t).is(R.selection.element()))&&y(),l=t,0<R.opts.tableEditButtons.length&&I(l,l))}}function a(e){if(!R.edit.isDisabled()&&R.popups.areVisible())return!0;if(n||R.$tb.is(e.target)||R.$tb.is(x(e.target).closest(".fr-toolbar"))||(0<Z().length&&R.toolbar.enable(),E()),!(1!=e.which||1==e.which&&R.helpers.isMac()&&e.ctrlKey)){if(r=!1,n)n=!1,N(e)||1!=Z().length?0<Z().length&&(R.selection.isCollapsed()?h():(E(),R.edit.on())):E();if(A){A=!1,O.removeClass("fr-moving"),R.$el.removeClass("fr-no-selection"),R.edit.on();var t=parseFloat(O.css("left"))+R.opts.tableResizerOffset+R.$wp.offset().left;R.opts.iframe&&(t-=R.$iframe.offset().left),O.data("release-position",t),O.removeData("max-left"),O.removeData("max-right"),function C(){var e=O.data("origin"),t=O.data("release-position");if(e!==t){var a=O.data("first"),l=O.data("second"),n=O.data("table"),r=n.outerWidth();if(R.undo.canDo()||R.undo.saveStep(),null!=a&&null!=l){var o,s,i,f=_(n),c=[],d=[],p=[],h=[];for(o=0;o<f.length;o++)s=x(f[o][a]),i=x(f[o][l]),c[o]=s.outerWidth(),p[o]=i.outerWidth(),d[o]=c[o]/r*100,h[o]=p[o]/r*100;for(o=0;o<f.length;o++)if(s=x(f[o][a]),i=x(f[o][l]),f[o][a]!=f[o][l]){var u=(d[o]*(c[o]+t-e)/c[o]).toFixed(4);s.css("width",u+"%"),i.css("width",(d[o]+h[o]-u).toFixed(4)+"%")}}else{var b,g=n.parent(),m=r/g.width()*100,v=(parseInt(n.css("margin-left"),10)||0)/g.width()*100,w=(parseInt(n.css("margin-right"),10)||0)/g.width()*100;"rtl"==R.opts.direction&&0===l||"rtl"!=R.opts.direction&&0!==l?(b=(r+t-e)/r*m,n.css("margin-right","calc(100% - ".concat(Math.round(b).toFixed(4),"% - ").concat(Math.round(v).toFixed(4),"%)"))):("rtl"==R.opts.direction&&0!==l||"rtl"!=R.opts.direction&&0===l)&&(b=(r-t+e)/r*m,n.css("margin-left","calc(100% - ".concat(Math.round(b).toFixed(4),"% - ").concat(Math.round(w).toFixed(4),"%)"))),n.css("width","".concat(Math.round(b).toFixed(4),"%"))}R.selection.restore(),R.undo.saveStep(),R.events.trigger("table.resized",[n.get(0)])}O.removeData("origin"),O.removeData("release-position"),O.removeData("first"),O.removeData("second"),O.removeData("table")}(),Y()}}Z().length||(R.$el.removeClass("fr-no-selection"),R.edit.on())}function K(e){if(R.events.$on(x("input"),"click",ee),!0===n&&0<R.opts.tableEditButtons.length){if(x(e.currentTarget).closest("table").is(Q())){if("TD"==e.currentTarget.tagName&&0===R.$el.find("th.fr-selected-cell").length)return void I(l,e.currentTarget);if("TH"==e.currentTarget.tagName&&0===R.$el.find("td.fr-selected-cell").length)return void I(l,e.currentTarget)}y()}}function B(e,t,a,l){for(var n,r=t;r!=R.el&&"TD"!=r.tagName&&"TH"!=r.tagName&&("up"==l?n=r.previousElementSibling:"down"==l&&(n=r.nextElementSibling),!n);)r=r.parentNode;"TD"==r.tagName||"TH"==r.tagName?function o(e,t){for(var a=e;a&&"TABLE"!=a.tagName&&a.parentNode!=R.el;)a=a.parentNode;if(a&&"TABLE"==a.tagName){var l=_(x(a));"up"==t?z($(e,l),a,l):"down"==t&&k($(e,l),a,l)}}(r,l):n&&("up"==l&&R.selection.setAtEnd(n),"down"==l&&R.selection.setAtStart(n))}function z(e,t,a){0<e.row?R.selection.setAtEnd(a[e.row-1][e.col]):B(0,t,0,"up")}function k(e,t,a){var l=parseInt(a[e.row][e.col].getAttribute("rowspan"),10)||1;e.row<a.length-l?R.selection.setAtStart(a[e.row+l][e.col]):B(0,t,0,"down")}function Y(){O&&(O.find("div").css("opacity",0),O.css("top",0),O.css("left",0),O.css("height",0),O.find("div").css("height",0),O.hide())}function W(){f&&f.removeClass("fr-visible").css("left","-9999px")}function L(e,t){var a=x(t),l=a.closest("table"),n=l.parent();if(t&&"TD"!=t.tagName&&"TH"!=t.tagName&&(0<a.closest("td").length?t=a.closest("td"):0<a.closest("th").length&&(t=a.closest("th"))),!t||"TD"!=t.tagName&&"TH"!=t.tagName)O&&a.get(0)!=O.get(0)&&a.parent().get(0)!=O.get(0)&&R.core.sameInstance(O)&&Y();else{if(a=x(t),0===R.$el.find(a).length)return!1;var r=a.offset().left-1,o=r+a.outerWidth();if(Math.abs(e.pageX-r)<=R.opts.tableResizerOffset||Math.abs(o-e.pageX)<=R.opts.tableResizerOffset){var s,i,f,c,d,p=_(l),h=$(t,p),u=D(h.row,h.col,p),b=l.offset().top,g=l.outerHeight()-1;"rtl"!=R.opts.direction?e.pageX-r<=R.opts.tableResizerOffset?(f=r,0<h.col?(c=r-j(h.col-1,p)+R.opts.tableResizingLimit,d=r+j(h.col,p)-R.opts.tableResizingLimit,s=h.col-1,i=h.col):(s=null,i=0,c=l.offset().left-1-parseInt(l.css("margin-left"),10),d=l.offset().left-1+l.width()-p[0].length*R.opts.tableResizingLimit)):o-e.pageX<=R.opts.tableResizerOffset&&(f=o,u.col<p[u.row].length&&p[u.row][u.col+1]?(c=o-j(u.col,p)+R.opts.tableResizingLimit,d=o+j(u.col+1,p)-R.opts.tableResizingLimit,s=u.col,i=u.col+1):(s=u.col,i=null,c=l.offset().left-1+p[0].length*R.opts.tableResizingLimit,d=n.offset().left-1+n.width()+parseFloat(n.css("padding-left")))):o-e.pageX<=R.opts.tableResizerOffset?(f=o,0<h.col?(c=o-j(h.col,p)+R.opts.tableResizingLimit,d=o+j(h.col-1,p)-R.opts.tableResizingLimit,s=h.col,i=h.col-1):(s=null,i=0,c=l.offset().left+p[0].length*R.opts.tableResizingLimit,d=n.offset().left-1+n.width()+parseFloat(n.css("padding-left")))):e.pageX-r<=R.opts.tableResizerOffset&&(f=r,u.col<p[u.row].length&&p[u.row][u.col+1]?(c=r-j(u.col+1,p)+R.opts.tableResizingLimit,d=r+j(u.col,p)-R.opts.tableResizingLimit,s=u.col+1,i=u.col):(s=u.col,i=null,c=n.offset().left+parseFloat(n.css("padding-left")),d=l.offset().left-1+l.width()-p[0].length*R.opts.tableResizingLimit)),O||function E(){R.shared.$table_resizer||(R.shared.$table_resizer=x(document.createElement("div")).attr("class","fr-table-resizer").html("<div></div>")),O=R.shared.$table_resizer,R.events.$on(O,"mousedown",function(e){return!R.core.sameInstance(O)||(0<Z().length&&T(),1==e.which?(R.selection.save(),A=!0,O.addClass("fr-moving"),y(),R.edit.off(),O.find("div").css("opacity",1),!1):void 0)}),R.events.$on(O,"mousemove",function(e){if(!R.core.sameInstance(O))return!0;A&&(R.opts.iframe&&(e.pageX-=R.$iframe.offset().left),G(e))}),R.events.on("shared.destroy",function(){O.html("").removeData().remove(),O=null},!0),R.events.on("destroy",function(){R.$el.find(".fr-selected-cell").removeClass("fr-selected-cell"),x("body").first().append(O.hide())},!0)}(),O.data("table",l),O.data("first",s),O.data("second",i),O.data("instance",R),R.$wp.append(O);var m=f-R.win.pageXOffset-R.opts.tableResizerOffset-R.$wp.offset().left,v=b-R.$wp.offset().top+R.$wp.scrollTop();if(R.opts.iframe){var w=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-top")),C=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-left"));m+=R.$iframe.offset().left+C,v+=R.$iframe.offset().top+w,c+=R.$iframe.offset().left,d+=R.$iframe.offset().left}O.data("max-left",c),O.data("max-right",d),O.data("origin",f-R.win.pageXOffset),O.css("top",v),O.css("left",m),O.css("height",g),O.find("div").css("height",g),O.css("padding-left",R.opts.tableResizerOffset),O.css("padding-right",R.opts.tableResizerOffset),O.show()}else R.core.sameInstance(O)&&Y()}}function F(e,t){if(R.$box.find(".fr-line-breaker").isVisible())return!1;f||q(),R.$box.append(f),f.data("instance",R);var a,l=x(t).find("tr").first(),n=e.pageX,r=0,o=0;if(R.opts.iframe){var s=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-top")),i=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-left"));r+=R.$iframe.offset().left-R.helpers.scrollLeft()+i,o+=R.$iframe.offset().top-R.helpers.scrollTop()+s}l.find("th, td").each(function(){var e=x(this);return e.offset().left<=n&&n<e.offset().left+e.outerWidth()/2?(a=parseInt(f.find("a").css("width"),10),f.css("top",o+e.offset().top-R.$box.offset().top-a-5),f.css("left",r+e.offset().left-R.$box.offset().left-a/2),f.data("selected-cell",e),f.data("position","before"),f.addClass("fr-visible"),!1):e.offset().left+e.outerWidth()/2<=n&&n<e.offset().left+e.outerWidth()?(a=parseInt(f.find("a").css("width"),10),f.css("top",o+e.offset().top-R.$box.offset().top-a-5),f.css("left",r+e.offset().left-R.$box.offset().left+e.outerWidth()-a/2),f.data("selected-cell",e),f.data("position","after"),f.addClass("fr-visible"),!1):void 0})}function H(e,t){if(R.$box.find(".fr-line-breaker").isVisible())return!1;f||q(),R.$box.append(f),f.data("instance",R);var a,l=x(t),n=e.pageY,r=0,o=0;if(R.opts.iframe){var s=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-top")),i=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-left"));r+=R.$iframe.offset().left-R.helpers.scrollLeft()+i,o+=R.$iframe.offset().top-R.helpers.scrollTop()+s}l.find("tr").each(function(){var e=x(this);return e.offset().top<=n&&n<e.offset().top+e.outerHeight()/2?(a=parseInt(f.find("a").css("width"),10),f.css("top",o+e.offset().top-R.$box.offset().top-a/2),f.css("left",r+e.offset().left-R.$box.offset().left-a-5),f.data("selected-cell",e.find("td").first()),f.data("position","above"),f.addClass("fr-visible"),!1):e.offset().top+e.outerHeight()/2<=n&&n<e.offset().top+e.outerHeight()?(a=parseInt(f.find("a").css("width"),10),f.css("top",o+e.offset().top-R.$box.offset().top+e.outerHeight()-a/2),f.css("left",r+e.offset().left-R.$box.offset().left-a-5),f.data("selected-cell",e.find("td").first()),f.data("position","below"),f.addClass("fr-visible"),!1):void 0})}function V(e){o=null;var t=R.doc.elementFromPoint(e.pageX-R.win.pageXOffset,e.pageY-R.win.pageYOffset);R.opts.tableResizer&&(!R.popups.areVisible()||R.popups.areVisible()&&R.popups.isVisible("table.edit"))&&L(e,t),!R.opts.tableInsertHelper||R.popups.areVisible()||R.$tb.hasClass("fr-inline")&&R.$tb.isVisible()||function r(e,t){if(0===Z().length){var a,l,n;if(t&&("HTML"==t.tagName||"BODY"==t.tagName||R.node.isElement(t)))for(a=1;a<=R.opts.tableInsertHelperOffset;a++){if(l=R.doc.elementFromPoint(e.pageX-R.win.pageXOffset,e.pageY-R.win.pageYOffset+a),x(l).hasClass("fr-tooltip"))return!0;if(l&&("TH"==l.tagName||"TD"==l.tagName||"TABLE"==l.tagName)&&(x(l).parents(".fr-wrapper").length||R.opts.iframe)&&"false"!=x(l).closest("table").attr("contenteditable"))return F(e,x(l).closest("table")),!0;if(n=R.doc.elementFromPoint(e.pageX-R.win.pageXOffset+a,e.pageY-R.win.pageYOffset),x(n).hasClass("fr-tooltip"))return!0;if(n&&("TH"==n.tagName||"TD"==n.tagName||"TABLE"==n.tagName)&&(x(n).parents(".fr-wrapper").length||R.opts.iframe)&&"false"!=x(n).closest("table").attr("contenteditable"))return H(e,x(n).closest("table")),!0}R.core.sameInstance(f)&&W()}}(e,t)}function P(){if(A){var e=O.data("table").offset().top-R.win.pageYOffset;if(R.opts.iframe){var t=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-top"));e+=R.$iframe.offset().top-R.helpers.scrollTop()+t}O.css("top",e)}}function j(e,t){var a,l=x(t[0][e]).outerWidth();for(a=1;a<t.length;a++)l=Math.min(l,x(t[a][e]).outerWidth());return l}function X(e,t,a){var l,n=0;for(l=e;l<=t;l++)n+=j(l,a);return n}function G(e){if(1<Z().length&&r&&y(),!1===r&&!1===n&&!1===A)o&&clearTimeout(o),R.edit.isDisabled()&&!R.popups.isVisible("table.edit")||(o=setTimeout(V,30,e));else if(A){var t=e.pageX-R.win.pageXOffset;R.opts.iframe&&(t+=R.$iframe.offset().left);var a=O.data("max-left"),l=O.data("max-right");a<=t&&t<=l?O.css("left",t-R.opts.tableResizerOffset-R.$wp.offset().left):t<a&&parseFloat(O.css("left"),10)>a-R.opts.tableResizerOffset?O.css("left",a-R.opts.tableResizerOffset-R.$wp.offset().left):l<t&&parseFloat(O.css("left"),10)<l-R.opts.tableResizerOffset&&O.css("left",l-R.opts.tableResizerOffset-R.$wp.offset().left)}else r&&W()}function U(e){R.node.isEmpty(e.get(0))?e.prepend(me.MARKERS):e.prepend(me.START_MARKER).append(me.END_MARKER)}function q(){R.shared.$ti_helper||(R.shared.$ti_helper=x(document.createElement("div")).attr("class","fr-insert-helper").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'.concat(R.language.translate("Insert"),'"><svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M22,16.75 L16.75,16.75 L16.75,22 L15.25,22.000 L15.25,16.75 L10,16.75 L10,15.25 L15.25,15.25 L15.25,10 L16.75,10 L16.75,15.25 L22,15.25 L22,16.75 Z"/></svg></a>')),R.events.bindClick(R.shared.$ti_helper,"a",function(){var e=f.data("selected-cell"),t=f.data("position"),a=f.data("instance")||R;"before"==t?(R.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertColumn(t),e.removeClass("fr-selected-cell"),R.undo.saveStep()):"after"==t?(R.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertColumn(t),e.removeClass("fr-selected-cell"),R.undo.saveStep()):"above"==t?(R.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertRow(t),e.removeClass("fr-selected-cell"),R.undo.saveStep()):"below"==t&&(R.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertRow(t),e.removeClass("fr-selected-cell"),R.undo.saveStep()),W()}),R.events.on("shared.destroy",function(){R.shared.$ti_helper.html("").removeData().remove(),R.shared.$ti_helper=null},!0),R.events.$on(R.shared.$ti_helper,"mousemove",function(e){e.stopPropagation()},!0),R.events.$on(x(R.o_win),"scroll",function(){W()},!0),R.events.$on(R.$wp,"scroll",function(){W()},!0)),f=R.shared.$ti_helper,R.events.on("destroy",function(){f=null}),R.tooltip.bind(R.$box,".fr-insert-helper > a.fr-floating-btn")}function J(){l=null,clearTimeout(o)}function Z(){return R.el.querySelectorAll(".fr-selected-cell")}function Q(){var e=Z();if(e.length){for(var t=e[0];t&&"TABLE"!=t.tagName&&t.parentNode!=R.el;)t=t.parentNode;return t&&"TABLE"==t.tagName?x(t):x([])}return x([])}function ee(e){n=!1}return{_init:function te(){if(!R.$wp)return!1;if(!R.helpers.isMobile()){A=n=r=!1,R.events.$on(R.$el,"mousedown",e),R.popups.onShow("image.edit",function(){E(),n=r=!1}),R.popups.onShow("link.edit",function(){E(),n=r=!1}),R.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&E()}),R.events.$on(R.$el,"mouseover","th, td",K),R.events.$on(R.$win,"mouseup",a),R.opts.iframe&&R.events.$on(x(R.o_win),"mouseup",a),R.events.$on(R.$win,"mousemove",G),R.events.$on(x(R.o_win),"scroll",P),R.events.on("contentChanged",function(){0<Z().length&&(h(),R.$el.find("img").on("load.selected-cells",function(){x(this).off("load.selected-cells"),0<Z().length&&h()}))}),R.events.$on(x(R.o_win),"resize",function(){E()}),R.events.on("toolbar.esc",function(){if(0<Z().length)return R.events.disableBlur(),R.events.focus(),!1},!0),R.events.$on(x(R.o_win),"keydown",function(){r&&n&&(n=r=!1,R.$el.removeClass("fr-no-selection"),R.edit.on(),R.selection.setAtEnd(R.$el.find(".fr-selected-cell").last().get(0)),R.selection.restore(),E())}),R.events.$on(R.$el,"keydown",function(e){e.shiftKey?!1===function o(e){var t=Z();if(null!=t&&0<t.length){var a,l=_(),n=e.which,r=$(1==t.length?a=t[0]:(a=R.el.querySelector(".fr-cell-fixed"),R.el.querySelector(".fr-cell-handler")),l);if(me.KEYCODE.ARROW_RIGHT==n){if(r.col<l[0].length-1)return I(a,l[r.row][r.col+1]),!1}else if(me.KEYCODE.ARROW_DOWN==n){if(r.row<l.length-1)return I(a,l[r.row+1][r.col]),!1}else if(me.KEYCODE.ARROW_LEFT==n){if(0<r.col)return I(a,l[r.row][r.col-1]),!1}else if(me.KEYCODE.ARROW_UP==n&&0<r.row)return I(a,l[r.row-1][r.col]),!1}}(e)&&setTimeout(function(){h()},0):function s(e){var t=e.which,a=R.selection.blocks();if(a.length&&("TD"==(a=a[0]).tagName||"TH"==a.tagName)){for(var l=a;l&&"TABLE"!=l.tagName&&l.parentNode!=R.el;)l=l.parentNode;if(l&&"TABLE"==l.tagName&&(me.KEYCODE.ARROW_LEFT==t||me.KEYCODE.ARROW_UP==t||me.KEYCODE.ARROW_RIGHT==t||me.KEYCODE.ARROW_DOWN==t)&&(0<Z().length&&T(),R.browser.webkit&&(me.KEYCODE.ARROW_UP==t||me.KEYCODE.ARROW_DOWN==t))){var n=R.selection.ranges(0).startContainer;if(n.nodeType==Node.TEXT_NODE&&(me.KEYCODE.ARROW_UP==t&&(n.previousSibling&&"BR"!==n.previousSibling.tagName||n.previousSibling&&"BR"===n.previousSibling.tagName&&n.previousSibling.previousSibling)||me.KEYCODE.ARROW_DOWN==t&&(n.nextSibling&&"BR"!==n.nextSibling.tagName||n.nextSibling&&"BR"===n.nextSibling.tagName&&n.nextSibling.nextSibling)))return;e.preventDefault(),e.stopPropagation();var r=_(x(l)),o=$(a,r);return me.KEYCODE.ARROW_UP==t?z(o,l,r):me.KEYCODE.ARROW_DOWN==t&&k(o,l,r),R.selection.restore(),!1}}}(e)}),R.events.on("keydown",function(e){if(!1===function l(e){if(e.which==me.KEYCODE.TAB){var t;if(0<Z().length)t=R.$el.find(".fr-selected-cell").last();else{var a=R.selection.element();"TD"==a.tagName||"TH"==a.tagName?t=x(a):a!=R.el&&(0<x(a).parentsUntil(R.$el,"td").length?t=x(a).parents("td").first():0<x(a).parentsUntil(R.$el,"th").length&&(t=x(a).parents("th").first()))}if(t)return e.preventDefault(),!!(0===R.selection.get().focusOffset&&0<x(R.selection.element()).parentsUntil(R.$el,"ol, ul").length&&(0<x(R.selection.element()).closest("li").prev().length||x(R.selection.element()).is("li")&&0<x(R.selection.element()).prev().length))||(T(),e.shiftKey?0<t.prev().length?U(t.prev()):0<t.closest("tr").length&&0<t.closest("tr").prev().length?U(t.closest("tr").prev().find("td").last()):0<t.closest("tbody").length&&0<t.closest("table").find("thead tr").length&&U(t.closest("table").find("thead tr th").last()):0<t.next().length?U(t.next()):0<t.closest("tr").length&&0<t.closest("tr").next().length?U(t.closest("tr").next().find("td").first()):0<t.closest("thead").length&&0<t.closest("table").find("tbody tr").length?U(t.closest("table").find("tbody tr td").first()):(t.addClass("fr-selected-cell"),b("below"),E(),U(t.closest("tr").next().find("td").first())),R.selection.restore(),!1)}}(e))return!1;var t=Z();if(0<t.length){if(0<t.length&&R.keys.ctrlKey(e)&&e.which==me.KEYCODE.A)return E(),R.popups.isVisible("table.edit")&&R.popups.hide("table.edit"),t=[],!0;if(e.which==me.KEYCODE.ESC&&R.popups.isVisible("table.edit"))return E(),R.popups.hide("table.edit"),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),!(t=[]);if(1<t.length&&(e.which==me.KEYCODE.BACKSPACE||e.which==me.KEYCODE.DELETE)){R.undo.saveStep();for(var a=0;a<t.length;a++)x(t[a]).html("<br>"),a==t.length-1&&x(t[a]).prepend(me.MARKERS);return R.selection.restore(),R.undo.saveStep(),!(t=[])}if(1<t.length&&e.which!=me.KEYCODE.F10&&!R.keys.isBrowserAction(e))return e.preventDefault(),!(t=[])}else if(!(t=[])===function n(e){if(e.altKey&&e.which==me.KEYCODE.SPACE){var t,a=R.selection.element();if("TD"==a.tagName||"TH"==a.tagName?t=a:0<x(a).closest("td").length?t=x(a).closest("td").get(0):0<x(a).closest("th").length&&(t=x(a).closest("th").get(0)),t)return e.preventDefault(),I(t,t),h(),!1}}(e))return!1},!0);var t=[];R.events.on("html.beforeGet",function(){t=Z();for(var e=0;e<t.length;e++)t[e].className=(t[e].className||"").replace(/fr-selected-cell/g,"")}),R.events.on("html.afterGet",function(){for(var e=0;e<t.length;e++)t[e].className=(t[e].className?t[e].className.trim()+" ":"")+"fr-selected-cell";t=[]}),c(!0),p(!0)}R.events.on("destroy",J)},insert:function ae(e,t){var a,l,n="<table "+(R.opts.tableDefaultWidth?'style="width: '+R.opts.tableDefaultWidth+';" ':"")+'class="fr-inserted-table"><tbody>',r=100/t;for(a=0;a<e;a++){for(n+="<tr>",l=0;l<t;l++)n+="<td"+(R.opts.tableDefaultWidth?' style="width: '+r.toFixed(4)+'%;"':"")+">",0===a&&0===l&&(n+=me.MARKERS),n+="<br></td>";n+="</tr>"}n+="</tbody></table>",R.html.insert(n),R.selection.restore();var o=R.$el.find(".fr-inserted-table");o.removeClass("fr-inserted-table"),R.events.trigger("table.inserted",[o.get(0)])},remove:u,insertRow:b,deleteRow:function le(){var e=Q();if(0<e.length){var t,a,l,n=_(),r=M(n);if(null==r)return;if(0===r.min_i&&r.max_i==n.length-1)u();else{for(t=r.max_i;t>=r.min_i;t--){for(l=x(e.find("tr").not(e.find("> table tr")).get(t)),a=0;a<n[t].length;a++)if(0===a||n[t][a]!=n[t][a-1]){var o=x(n[t][a]);if(1<parseInt(o.attr("rowspan"),10)){var s=parseInt(o.attr("rowspan"),10)-1;1==s?o.removeAttr("rowspan"):o.attr("rowspan",s)}if(t<n.length-1&&n[t][a]==n[t+1][a]&&(0===t||n[t][a]!=n[t-1][a])){for(var i=n[t][a],f=a;0<f&&n[t][f]==n[t][f-1];)f--;0===f?x(e.find("tr").not(e.find("> table tr")).get(t+1)).prepend(i):x(n[t+1][f-1])[0].parentNode&&x(n[t+1][f-1])[0].insertAdjacentElement("afterend",i)}}var c=l.parent();l.remove(),0===c.find("tr").length&&c.remove(),n=_(e)}w(0,n.length-1,0,n[0].length-1,e),0<r.min_i?R.selection.setAtEnd(n[r.min_i-1][0]):R.selection.setAtEnd(n[0][0]),R.selection.restore(),R.popups.hide("table.edit")}}},insertColumn:function ne(i){var e=Q();if(0<e.length){var f,c=_(),t=M(c);f="before"==i?t.min_j:t.max_j;var a,d=100/c[0].length,p=100/(c[0].length+1);e.find("th, td").each(function(){(a=x(this)).data("old-width",a.outerWidth()/e.outerWidth()*100)}),e.find("tr").not(e.find("> table tr")).each(function(e){for(var t,a=x(this),l=0,n=0;l-1<f;){if(!(t=a.find("> th, > td").get(n))){t=null;break}t==c[e][l]?(l+=parseInt(x(t).attr("colspan"),10)||1,n++):(l+=parseInt(x(c[e][l]).attr("colspan"),10)||1,"after"==i&&(t=0===n?-1:a.find("> th, > td").get(n-1)))}var r,o=x(t);if("after"==i&&f<l-1||"before"==i&&0<f&&c[e][f]==c[e][f-1]){if(0===e||0<e&&c[e][f]!=c[e-1][f]){var s=parseInt(o.attr("colspan"),10)+1;o.attr("colspan",s),o.css("width",(o.data("old-width")*p/d+p).toFixed(4)+"%"),o.removeData("old-width")}}else r=0<a.find("th").length?'<th style="width: '.concat(p.toFixed(4),'%;"><br></th>'):'<td style="width: '.concat(p.toFixed(4),'%;"><br></td>'),-1==t?a.prepend(r):null==t?a.append(r):"before"==i?o.before(r):"after"==i&&o[0].parentNode&&o[0].insertAdjacentHTML("afterend",r)}),e.find("th, td").each(function(){(a=x(this)).data("old-width")&&(a.css("width",(a.data("old-width")*p/d).toFixed(4)+"%"),a.removeData("old-width"))}),R.popups.isVisible("table.edit")&&h()}},deleteColumn:function re(){var e=Q();if(0<e.length){var t,a,l,n=_(),r=M(n);if(null==r)return;if(0===r.min_j&&r.max_j==n[0].length-1)u();else{var o=0;for(t=0;t<n.length;t++)for(a=0;a<n[0].length;a++)(l=x(n[t][a])).hasClass("fr-selected-cell")||(l.data("old-width",l.outerWidth()/e.outerWidth()*100),(a<r.min_j||a>r.max_j)&&(o+=l.outerWidth()/e.outerWidth()*100));for(o/=n.length,a=r.max_j;a>=r.min_j;a--)for(t=0;t<n.length;t++)if(0===t||n[t][a]!=n[t-1][a])if(l=x(n[t][a]),1<(parseInt(l.attr("colspan"),10)||1)){var s=parseInt(l.attr("colspan"),10)-1;1==s?l.removeAttr("colspan"):l.attr("colspan",s),l.css("width",(100*(l.data("old-width")-j(a,n))/o).toFixed(4)+"%"),l.removeData("old-width")}else{var i=x(l.parent().get(0));l.remove(),0===i.find("> th, > td").length&&(0===i.prev().length||0===i.next().length||i.prev().find("> th[rowspan], > td[rowspan]").length<i.prev().find("> th, > td").length)&&i.remove()}w(0,n.length-1,0,n[0].length-1,e),0<r.min_j?R.selection.setAtEnd(n[r.min_i][r.min_j-1]):R.selection.setAtEnd(n[r.min_i][0]),R.selection.restore(),R.popups.hide("table.edit"),e.find("th, td").each(function(){(l=x(this)).data("old-width")&&(l.css("width",(100*l.data("old-width")/o).toFixed(4)+"%"),l.removeData("old-width"))})}}},mergeCells:function oe(){if(1<Z().length&&(0===R.$el.find("th.fr-selected-cell").length||0===R.$el.find("td.fr-selected-cell").length)){C();var e,t,a=M(_());if(null==a)return;var l=R.$el.find(".fr-selected-cell"),n=x(l[0]),r=n.parent().find(".fr-selected-cell"),o=n.closest("table"),s=n.html(),i=0;for(e=0;e<r.length;e++)i+=x(r[e]).outerWidth();for(n.css("width",Math.min(100,i/o.outerWidth()*100).toFixed(4)+"%"),a.min_j<a.max_j&&n.attr("colspan",a.max_j-a.min_j+1),a.min_i<a.max_i&&n.attr("rowspan",a.max_i-a.min_i+1),e=1;e<l.length;e++)"<br>"!=(t=x(l[e])).html()&&""!==t.html()&&(s+="<br>".concat(t.html())),t.remove();n.html(s),R.selection.setAtEnd(n.get(0)),R.selection.restore(),R.toolbar.enable(),m(a.min_i,a.max_i,o);var f=o.find("tr:empty");for(e=f.length-1;0<=e;e--)x(f[e]).remove();g(a.min_j,a.max_j,o),h()}},splitCellVertically:function se(){if(1==Z().length){var e=R.$el.find(".fr-selected-cell"),t=parseInt(e.attr("colspan"),10)||1,a=e.parent().outerWidth(),l=e.outerWidth(),n=e.clone().html("<br>"),r=_(),o=$(e.get(0),r);if(1<t){var s=Math.ceil(t/2);l=X(o.col,o.col+s-1,r)/a*100;var i=X(o.col+s,o.col+t-1,r)/a*100;1<s?e.attr("colspan",s):e.removeAttr("colspan"),1<t-s?n.attr("colspan",t-s):n.removeAttr("colspan"),e.css("width",l.toFixed(4)+"%"),n.css("width",i.toFixed(4)+"%")}else{var f;for(f=0;f<r.length;f++)if(0===f||r[f][o.col]!=r[f-1][o.col]){var c=x(r[f][o.col]);if(!c.is(e)){var d=(parseInt(c.attr("colspan"),10)||1)+1;c.attr("colspan",d)}}l=l/a*100/2,e.css("width","".concat(l.toFixed(4),"%")),n.css("width","".concat(l.toFixed(4),"%"))}e[0].parentNode&&e[0].insertAdjacentElement("afterend",n[0]),E(),R.popups.hide("table.edit")}},splitCellHorizontally:function ie(){if(1==Z().length){var e=R.$el.find(".fr-selected-cell"),t=e.parent(),a=e.closest("table"),l=parseInt(e.attr("rowspan"),10),n=_(),r=$(e.get(0),n),o=e.clone().html("<br>");if(1<l){var s=Math.ceil(l/2);1<s?e.attr("rowspan",s):e.removeAttr("rowspan"),1<l-s?o.attr("rowspan",l-s):o.removeAttr("rowspan");for(var i=r.row+s,f=0===r.col?r.col:r.col-1;0<=f&&(n[i][f]==n[i][f-1]||0<i&&n[i][f]==n[i-1][f]);)f--;-1==f?x(a.find("tr").not(a.find("> table tr")).get(i)).prepend(o):x(n[i][f])[0].parentNode&&x(n[i][f])[0].insertAdjacentElement("afterend",o[0])}else{var c,d=x(document.createElement("tr")).append(o);for(c=0;c<n[0].length;c++)if(0===c||n[r.row][c]!=n[r.row][c-1]){var p=x(n[r.row][c]);p.is(e)||p.attr("rowspan",(parseInt(p.attr("rowspan"),10)||1)+1)}t[0].parentNode&&t[0].insertAdjacentElement("afterend",d[0])}E(),R.popups.hide("table.edit")}},addHeader:function fe(){var e=Q();if(0<e.length&&0===e.find("th").length){var t,a="<thead><tr>",l=0;for(e.find("tr").first().find("> td").each(function(){var e=x(this);l+=parseInt(e.attr("colspan"),10)||1}),t=0;t<l;t++)a+="<th><br></th>";a+="</tr></thead>",e.prepend(a),h()}},removeHeader:function ce(){var e=Q(),t=e.find("thead");if(0<t.length)if(0===e.find("tbody tr").length)u();else if(t.remove(),0<Z().length)h();else{R.popups.hide("table.edit");var a=e.find("tbody tr").first().find("td").first().get(0);a&&(R.selection.setAtEnd(a),R.selection.restore())}},setBackground:t,showInsertPopup:function de(){var e=R.$tb.find('.fr-command[data-cmd="insertTable"]'),t=R.popups.get("table.insert");if(t||(t=c()),!t.hasClass("fr-active")){R.popups.refresh("table.insert"),R.popups.setContainer("table.insert",R.$tb);var a=R.button.getPosition(e),l=a.left,n=a.top;R.popups.show("table.insert",l,n,e.outerHeight())}},showEditPopup:h,showColorsPopup:s,back:function pe(){0<Z().length?h():(R.popups.hide("table.insert"),R.toolbar.showInline())},verticalAlign:function he(e){R.$el.find(".fr-selected-cell").css("vertical-align",e)},horizontalAlign:function ue(e){R.$el.find(".fr-selected-cell").css("text-align",e)},applyStyle:function be(e,t,a,l){if(0<t.length){if(!a){var n=Object.keys(l);n.splice(n.indexOf(e),1),t.removeClass(n.join(" "))}t.toggleClass(e)}},selectedTable:Q,selectedCells:Z,customColor:function ge(){var e=R.popups.get("table.colors").find(".fr-table-colors-hex-layer input");e.length&&t(e.val())},selectCells:I}},me.DefineIcon("insertTable",{NAME:"table",SVG_KEY:"insertTable"}),me.RegisterCommand("insertTable",{title:"Insert Table",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("table.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("table.insert")):this.table.showInsertPopup()},plugin:"table"}),me.RegisterCommand("tableInsert",{callback:function(e,t,a){this.table.insert(t,a),this.popups.hide("table.insert")}}),me.DefineIcon("tableHeader",{NAME:"header",FA5NAME:"heading",SVG_KEY:"tableHeader"}),me.RegisterCommand("tableHeader",{title:"Table Header",focus:!1,toggle:!0,callback:function(){this.popups.get("table.edit").find('.fr-command[data-cmd="tableHeader"]').hasClass("fr-active")?this.table.removeHeader():this.table.addHeader()},refresh:function(e){var t=this.table.selectedTable();0<t.length&&(0===t.find("th").length?e.removeClass("fr-active").attr("aria-pressed",!1):e.addClass("fr-active").attr("aria-pressed",!0))}}),me.DefineIcon("tableRows",{NAME:"bars",SVG_KEY:"row"}),me.RegisterCommand("tableRows",{type:"dropdown",focus:!1,title:"Row",options:{above:"Insert row above",below:"Insert row below","delete":"Delete row"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=me.COMMANDS.tableRows.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableRows" data-param1="'+a+'" title="'+this.language.translate(t[a])+'">'+this.language.translate(t[a])+"</a></li>");return e+="</ul>"},callback:function(e,t){"above"==t||"below"==t?this.table.insertRow(t):this.table.deleteRow()}}),me.DefineIcon("tableColumns",{NAME:"bars fa-rotate-90",SVG_KEY:"columns"}),me.RegisterCommand("tableColumns",{type:"dropdown",focus:!1,title:"Column",options:{before:"Insert column before",after:"Insert column after","delete":"Delete column"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=me.COMMANDS.tableColumns.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableColumns" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){"before"==t||"after"==t?this.table.insertColumn(t):this.table.deleteColumn()}}),me.DefineIcon("tableCells",{NAME:"square-o",FA5NAME:"square",SVG_KEY:"cellOptions"}),me.RegisterCommand("tableCells",{type:"dropdown",focus:!1,title:"Cell",options:{merge:"Merge cells","vertical-split":"Vertical split","horizontal-split":"Horizontal split"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=me.COMMANDS.tableCells.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCells" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){"merge"==t?this.table.mergeCells():"vertical-split"==t?this.table.splitCellVertically():this.table.splitCellHorizontally()},refreshOnShow:function(e,t){1<this.$el.find(".fr-selected-cell").length?(t.find('a[data-param1="vertical-split"]').addClass("fr-disabled").attr("aria-disabled",!0),t.find('a[data-param1="horizontal-split"]').addClass("fr-disabled").attr("aria-disabled",!0),t.find('a[data-param1="merge"]').removeClass("fr-disabled").attr("aria-disabled",!1)):(t.find('a[data-param1="merge"]').addClass("fr-disabled").attr("aria-disabled",!0),t.find('a[data-param1="vertical-split"]').removeClass("fr-disabled").attr("aria-disabled",!1),t.find('a[data-param1="horizontal-split"]').removeClass("fr-disabled").attr("aria-disabled",!1))}}),me.DefineIcon("tableRemove",{NAME:"trash",SVG_KEY:"removeTable"}),me.RegisterCommand("tableRemove",{title:"Remove Table",focus:!1,callback:function(){this.table.remove()}}),me.DefineIcon("tableStyle",{NAME:"paint-brush",SVG_KEY:"tableStyle"}),me.RegisterCommand("tableStyle",{title:"Table Style",type:"dropdown",focus:!1,html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.tableStyles;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableStyle" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.table.applyStyle(t,this.$el.find(".fr-selected-cell").closest("table"),this.opts.tableMultipleStyles,this.opts.tableStyles)},refreshOnShow:function(e,t){var a=this.$,l=this.$el.find(".fr-selected-cell").closest("table");l&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=l.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),me.DefineIcon("tableCellBackground",{NAME:"tint",SVG_KEY:"cellBackground"}),me.RegisterCommand("tableCellBackground",{title:"Cell Background",focus:!1,popup:!0,callback:function(){this.table.showColorsPopup()}}),me.RegisterCommand("tableCellBackgroundColor",{undo:!0,focus:!1,callback:function(e,t){this.table.setBackground(t)}}),me.DefineIcon("tableBack",{NAME:"arrow-left",SVG_KEY:"back"}),me.RegisterCommand("tableBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.table.back()},refresh:function(e){0!==this.table.selectedCells().length||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),me.DefineIcon("tableCellVerticalAlign",{NAME:"arrows-v",FA5NAME:"arrows-alt-v",SVG_KEY:"verticalAlignMiddle"}),me.RegisterCommand("tableCellVerticalAlign",{type:"dropdown",focus:!1,title:"Vertical Align",options:{Top:"Align Top",Middle:"Align Middle",Bottom:"Align Bottom"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=me.COMMANDS.tableCellVerticalAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCellVerticalAlign" data-param1="'.concat(a.toLowerCase(),'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(a),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.table.verticalAlign(t)},refreshOnShow:function(e,t){t.find('.fr-command[data-param1="'+this.$el.find(".fr-selected-cell").css("vertical-align")+'"]').addClass("fr-active").attr("aria-selected",!0)}}),me.DefineIcon("tableCellHorizontalAlign",{NAME:"align-left",SVG_KEY:"alignLeft"}),me.DefineIcon("align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),me.DefineIcon("align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),me.DefineIcon("align-center",{NAME:"align-center",SVG_KEY:"alignCenter"}),me.DefineIcon("align-justify",{NAME:"align-justify",SVG_KEY:"alignJustify"}),me.RegisterCommand("tableCellHorizontalAlign",{type:"dropdown",focus:!1,title:"Horizontal Align",options:{left:"Align Left",center:"Align Center",right:"Align Right",justify:"Align Justify"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=me.COMMANDS.tableCellHorizontalAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="tableCellHorizontalAlign" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.icon.create("align-".concat(a)),'<span class="fr-sr-only">').concat(this.language.translate(t[a]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.table.horizontalAlign(t)},refresh:function(e){var t=this.table.selectedCells(),a=this.$;t.length&&e.find("> *").first().replaceWith(this.icon.create("align-".concat(this.helpers.getAlignment(a(t[0])))))},refreshOnShow:function(e,t){t.find('.fr-command[data-param1="'+this.helpers.getAlignment(this.$el.find(".fr-selected-cell").first())+'"]').addClass("fr-active").attr("aria-selected",!0)}}),me.DefineIcon("tableCellStyle",{NAME:"magic",SVG_KEY:"cellStyle"}),me.RegisterCommand("tableCellStyle",{title:"Cell Style",type:"dropdown",focus:!1,html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.tableCellStyles;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCellStyle" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.table.applyStyle(t,this.$el.find(".fr-selected-cell"),this.opts.tableCellMultipleStyles,this.opts.tableCellStyles)},refreshOnShow:function(e,t){var a=this.$,l=this.$el.find(".fr-selected-cell").first();l&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=l.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),me.RegisterCommand("tableCellBackgroundCustomColor",{title:"OK",undo:!0,callback:function(){this.table.customColor()}}),me.DefineIcon("tableColorRemove",{NAME:"eraser",SVG_KEY:"remove"})});
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(me){"use strict";me=me&&me.hasOwnProperty("default")?me["default"]:me,Object.assign(me.POPUP_TEMPLATES,{"table.insert":"[_BUTTONS_][_ROWS_COLUMNS_]","table.edit":"[_BUTTONS_]","table.colors":"[_BUTTONS_][_COLORS_][_CUSTOM_COLOR_]"}),Object.assign(me.DEFAULTS,{tableInsertMaxSize:10,tableEditButtons:["tableHeader","tableRemove","tableRows","tableColumns","tableStyle","-","tableCells","tableCellBackground","tableCellVerticalAlign","tableCellHorizontalAlign","tableCellStyle"],tableInsertButtons:["tableBack","|"],tableResizer:!0,tableDefaultWidth:"100%",tableResizerOffset:5,tableResizingLimit:30,tableColorsButtons:["tableBack","|"],tableColors:["#61BD6D","#1ABC9C","#54ACD2","#2C82C9","#9365B8","#475577","#CCCCCC","#41A85F","#00A885","#3D8EB9","#2969B0","#553982","#28324E","#000000","#F7DA64","#FBA026","#EB6B56","#E25041","#A38F84","#EFEFEF","#FFFFFF","#FAC51C","#F37934","#D14841","#B8312F","#7C706B","#D1D5D8","REMOVE"],tableColorsStep:7,tableCellStyles:{"fr-highlighted":"Highlighted","fr-thick":"Thick"},tableStyles:{"fr-dashed-borders":"Dashed Borders","fr-alternate-rows":"Alternate Rows"},tableCellMultipleStyles:!0,tableMultipleStyles:!0,tableInsertHelper:!0,tableInsertHelperOffset:15}),me.PLUGINS.table=function(R){var O,f,n,r,l,o,A,x=R.$;function h(){var e=$();if(e){var t=R.popups.get("table.edit");if(t||(t=p()),t){R.popups.setContainer("table.edit",R.$sc);var a=S(e),l=a.left+(a.right-a.left)/2,n=a.bottom;R.popups.show("table.edit",l,n,a.bottom-a.top,!0),R.edit.isDisabled()&&(1<Z().length&&R.toolbar.disable(),R.$el.removeClass("fr-no-selection"),R.edit.on(),R.button.bulkRefresh(),R.selection.setAtEnd(R.$el.find(".fr-selected-cell").last().get(0)),R.selection.restore())}}}function s(){var e=$();if(e){var t=R.popups.get("table.colors");t||(t=function o(){var e="";0<R.opts.tableColorsButtons.length&&(e='<div class="fr-buttons fr-tabs">'.concat(R.button.buildList(R.opts.tableColorsButtons),"</div>"));var t="";R.opts.colorsHEXInput&&(t='<div class="fr-color-hex-layer fr-table-colors-hex-layer fr-active fr-layer" id="fr-table-colors-hex-layer-'.concat(R.id,'"><div class="fr-input-line"><input maxlength="7" id="fr-table-colors-hex-layer-text-').concat(R.id,'" type="text" placeholder="').concat(R.language.translate("HEX Color"),'" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="tableCellBackgroundCustomColor" tabIndex="2" role="button">').concat(R.language.translate("OK"),"</button></div></div>"));var a={buttons:e,colors:function n(){for(var e='<div class="fr-color-set fr-table-colors">',t=0;t<R.opts.tableColors.length;t++)0!==t&&t%R.opts.tableColorsStep==0&&(e+="<br>"),"REMOVE"!=R.opts.tableColors[t]?e+='<span class="fr-command" style="background: '.concat(R.opts.tableColors[t],';" tabIndex="-1" role="button" data-cmd="tableCellBackgroundColor" data-param1="').concat(R.opts.tableColors[t],'"><span class="fr-sr-only">').concat(R.language.translate("Color")," ").concat(R.opts.tableColors[t],"&nbsp;&nbsp;&nbsp;</span></span>"):e+='<span class="fr-command" data-cmd="tableCellBackgroundColor" tabIndex="-1" role="button" data-param1="REMOVE" title="'.concat(R.language.translate("Clear Formatting"),'">').concat(R.icon.create("tableColorRemove"),'<span class="fr-sr-only">').concat(R.language.translate("Clear Formatting"),"</span></span>");return e+="</div>"}(),custom_color:t},l=R.popups.create("table.colors",a);return R.events.$on(R.$wp,"scroll.table-colors",function(){R.popups.isVisible("table.colors")&&s()}),function r(u){R.events.on("popup.tab",function(e){var t=x(e.currentTarget);if(!R.popups.isVisible("table.colors")||!t.is("span"))return!0;var a=e.which,l=!0;if(me.KEYCODE.TAB==a){var n=u.find(".fr-buttons");l=!R.accessibility.focusToolbar(n,!!e.shiftKey)}else if(me.KEYCODE.ARROW_UP==a||me.KEYCODE.ARROW_DOWN==a||me.KEYCODE.ARROW_LEFT==a||me.KEYCODE.ARROW_RIGHT==a){var r=t.parent().find("span.fr-command"),o=r.index(t),s=R.opts.colorsStep,i=Math.floor(r.length/s),f=o%s,c=Math.floor(o/s),d=c*s+f,p=i*s;me.KEYCODE.ARROW_UP==a?d=((d-s)%p+p)%p:me.KEYCODE.ARROW_DOWN==a?d=(d+s)%p:me.KEYCODE.ARROW_LEFT==a?d=((d-1)%p+p)%p:me.KEYCODE.ARROW_RIGHT==a&&(d=(d+1)%p);var h=x(r.get(d));R.events.disableBlur(),h.focus(),l=!1}else me.KEYCODE.ENTER==a&&(R.button.exec(t),l=!1);return!1===l&&(e.preventDefault(),e.stopPropagation()),l},!0)}(l),l}()),R.popups.setContainer("table.colors",R.$sc);var a=S(e),l=(a.left+a.right)/2,n=a.bottom;!function r(){var e=R.popups.get("table.colors"),t=R.$el.find(".fr-selected-cell").first(),a=R.helpers.RGBToHex(t.css("background-color")),l=e.find(".fr-table-colors-hex-layer input");e.find(".fr-selected-color").removeClass("fr-selected-color fr-active-item"),e.find('span[data-param1="'.concat(a,'"]')).addClass("fr-selected-color fr-active-item"),l.val(a).trigger("change")}(),R.popups.show("table.colors",l,n,a.bottom-a.top,!0)}}function i(){0===Z().length&&R.toolbar.enable()}function c(e){if(e)return R.popups.onHide("table.insert",function(){R.popups.get("table.insert").find('.fr-table-size .fr-select-table-size > span[data-row="1"][data-col="1"]').trigger("mouseover")}),!0;var t="";0<R.opts.tableInsertButtons.length&&(t='<div class="fr-buttons fr-tabs">'.concat(R.button.buildList(R.opts.tableInsertButtons),"</div>"));var a={buttons:t,rows_columns:function r(){for(var e='<div class="fr-table-size"><div class="fr-table-size-info">1 &times; 1</div><div class="fr-select-table-size">',t=1;t<=R.opts.tableInsertMaxSize;t++){for(var a=1;a<=R.opts.tableInsertMaxSize;a++){var l="inline-block";2<t&&!R.helpers.isMobile()&&(l="none");var n="fr-table-cell ";1==t&&1==a&&(n+=" hover"),e+='<span class="fr-command '.concat(n,'" tabIndex="-1" data-cmd="tableInsert" data-row="').concat(t,'" data-col="').concat(a,'" data-param1="').concat(t,'" data-param2="').concat(a,'" style="display: ').concat(l,';" role="button"><span></span><span class="fr-sr-only">').concat(t," &times; ").concat(a,"&nbsp;&nbsp;&nbsp;</span></span>")}e+='<div class="new-line"></div>'}return e+="</div></div>"}()},l=R.popups.create("table.insert",a);return R.events.$on(l,"mouseover",".fr-table-size .fr-select-table-size .fr-table-cell",function(e){d(x(e.currentTarget))},!0),function n(e){R.events.$on(e,"focus","[tabIndex]",function(e){var t=x(e.currentTarget);d(t)}),R.events.on("popup.tab",function(e){var t=x(e.currentTarget);if(!R.popups.isVisible("table.insert")||!t.is("span, a"))return!0;var a,l=e.which;if(me.KEYCODE.ARROW_UP==l||me.KEYCODE.ARROW_DOWN==l||me.KEYCODE.ARROW_LEFT==l||me.KEYCODE.ARROW_RIGHT==l){if(t.is("span.fr-table-cell")){var n=t.parent().find("span.fr-table-cell"),r=n.index(t),o=R.opts.tableInsertMaxSize,s=r%o,i=Math.floor(r/o);me.KEYCODE.ARROW_UP==l?i=Math.max(0,i-1):me.KEYCODE.ARROW_DOWN==l?i=Math.min(R.opts.tableInsertMaxSize-1,i+1):me.KEYCODE.ARROW_LEFT==l?s=Math.max(0,s-1):me.KEYCODE.ARROW_RIGHT==l&&(s=Math.min(R.opts.tableInsertMaxSize-1,s+1));var f=i*o+s,c=x(n.get(f));d(c),R.events.disableBlur(),c.focus(),a=!1}}else me.KEYCODE.ENTER==l&&(R.button.exec(t),a=!1);return!1===a&&(e.preventDefault(),e.stopPropagation()),a},!0)}(l),l}function d(e){var t=e.data("row");null!==t&&(t=parseInt(t));var a=e.data("col");null!==a&&(a=parseInt(a));var l=e.parent();l.siblings(".fr-table-size-info").html("".concat(t," &times; ").concat(a)),l.find("> span").removeClass("hover fr-active-item");for(var n=1;n<=R.opts.tableInsertMaxSize;n++)for(var r=0;r<=R.opts.tableInsertMaxSize;r++){var o=l.find('> span[data-row="'.concat(n,'"][data-col="').concat(r,'"]'));n<=t&&r<=a?o.addClass("hover"):n<=t+1||n<=2&&!R.helpers.isMobile()?o.css("display","inline-block"):2<n&&!R.helpers.isMobile()&&o.css("display","none")}e.addClass("fr-active-item")}function p(e){if(e)return R.popups.onHide("table.edit",i),!0;if(0<R.opts.tableEditButtons.length){var t={buttons:'<div class="fr-buttons">'.concat(R.button.buildList(R.opts.tableEditButtons),"</div>")},a=R.popups.create("table.edit",t);return R.events.$on(R.$wp,"scroll.table-edit",function(){R.popups.isVisible("table.edit")&&h()}),a}return!1}function u(){if(0<Z().length){var e=Q();R.selection.setBefore(e.get(0))||R.selection.setAfter(e.get(0)),R.selection.restore(),R.popups.hide("table.edit"),e.remove(),R.toolbar.enable()}}function b(e){var t=Q();if(0<t.length){if(0<R.$el.find("th.fr-selected-cell").length&&"above"==e)return;var a,l,n,r=$(),o=M(r);if(null==o)return;l="above"==e?o.min_i:o.max_i;var s="<tr>";for(a=0;a<r[l].length;a++){if("below"==e&&l<r.length-1&&r[l][a]==r[l+1][a]||"above"==e&&0<l&&r[l][a]==r[l-1][a]){if(0===a||0<a&&r[l][a]!=r[l][a-1]){var i=x(r[l][a]);i.attr("rowspan",parseInt(i.attr("rowspan"),10)+1)}}else s+='<td style="'+x(r[l][a]).attr("style")+'" ><br></td>'}s+="</tr>",n=0<R.$el.find("th.fr-selected-cell").length&&"below"==e?x(t.find("tbody").not(t.find("> table tbody"))):x(t.find("tr").not(t.find("> table tr")).get(l)),"below"==e?"TBODY"==n.attr("tagName")?n.prepend(s):n[0].parentNode&&n[0].insertAdjacentHTML("afterend",s):"above"==e&&(n.before(s),R.popups.isVisible("table.edit")&&h())}}function g(e,t,a){var l,n,r,o,s,i=0,f=$(a);if(e<(t=Math.min(t,f[0].length-1)))for(n=e;n<=t;n++)if(!(e<n&&f[0][n]==f[0][n-1])&&1<(o=Math.min(parseInt(f[0][n].getAttribute("colspan"),10)||1,t-e+1))&&f[0][n]==f[0][n+1])for(i=o-1,l=1;l<f.length;l++)if(f[l][n]!=f[l-1][n]){for(r=n;r<n+o;r++)if(1<(s=parseInt(f[l][r].getAttribute("colspan"),10)||1)&&f[l][r]==f[l][r+1])r+=i=Math.min(i,s-1);else if(!(i=Math.max(0,i-1)))break;if(!i)break}i&&v(f,i,"colspan",0,f.length-1,e,t)}function m(e,t,a){var l,n,r,o,s,i=0,f=$(a);if(e<(t=Math.min(t,f.length-1)))for(l=e;l<=t;l++)if(!(e<l&&f[l][0]==f[l-1][0])&&f[l][0]!==undefined&&1<(o=Math.min(parseInt(f[l][0].getAttribute("rowspan"),10)||1,t-e+1))&&f[l][0]==f[l+1][0])for(i=o-1,n=1;n<f[0].length;n++)if(f[l][n]!=f[l][n-1]){for(r=l;r<l+o;r++)if(1<(s=parseInt(f[r][n].getAttribute("rowspan"),10)||1)&&f[r][n]==f[r+1][n])r+=i=Math.min(i,s-1);else if(!(i=Math.max(0,i-1)))break;if(!i)break}i&&v(f,i,"rowspan",e,t,0,f[0].length-1)}function v(e,t,a,l,n,r,o){var s,i,f;for(s=l;s<=n;s++)for(i=r;i<=o;i++)l<s&&e[s][i]==e[s-1][i]||r<i&&e[s][i]==e[s][i-1]||e[s][i]!==undefined&&1<(f=parseInt(e[s][i].getAttribute(a),10)||1)&&(1<f-t?e[s][i].setAttribute(a,f-t):e[s][i].removeAttribute(a))}function w(e,t,a,l,n){m(e,t,n),g(a,l,n)}function t(e){var t=R.$el.find(".fr-selected-cell");"REMOVE"!=e?t.css("background-color",R.helpers.HEXtoRGB(e)):t.css("background-color",""),h()}function $(e){var f=[];if(null==(e=e||null)&&0<Z().length&&(e=Q()),e){for(var t=e.find("tr:empty"),a=t.length-1;0<=a;a--)x(t[a]).remove();e.findVisible("tr").not(e.find("> table tr")).each(function(s,e){var t=x(e),i=0;t.find("> th, > td").each(function(e,t){for(var a=x(t),l=parseInt(a.attr("colspan"),10)||1,n=parseInt(a.attr("rowspan"),10)||1,r=s;r<s+n;r++)for(var o=i;o<i+l;o++)f[r]||(f[r]=[]),f[r][o]?i++:f[r][o]=t;i+=l})})}return f}function _(e,t){for(var a=0;a<t.length;a++)for(var l=0;l<t[a].length;l++)if(t[a][l]==e)return{row:a,col:l}}function y(e,t,a){for(var l=e+1,n=t+1;l<a.length;){if(a[l][t]!=a[e][t]){l--;break}l++}for(l==a.length&&l--;n<a[e].length;){if(a[e][n]!=a[e][t]){n--;break}n++}return n==a[e].length&&n--,{row:l,col:n}}function C(){R.el.querySelector(".fr-cell-fixed")&&R.el.querySelector(".fr-cell-fixed").classList.remove("fr-cell-fixed"),R.el.querySelector(".fr-cell-handler")&&R.el.querySelector(".fr-cell-handler").classList.remove("fr-cell-handler")}function E(){var e=R.$el.find(".fr-selected-cell");0<e.length&&e.each(function(){var e=x(this);e.removeClass("fr-selected-cell"),""===e.attr("class")&&e.removeAttr("class")}),C()}function D(){R.events.disableBlur(),R.selection.clear(),R.$el.addClass("fr-no-selection"),R.$el.blur(),R.events.enableBlur()}function M(e){var t=R.$el.find(".fr-selected-cell");if(0<t.length){var a,l=e.length,n=0,r=e[0].length,o=0;for(a=0;a<t.length;a++){var s=_(t[a],e),i=y(s.row,s.col,e);l=Math.min(s.row,l),n=Math.max(i.row,n),r=Math.min(s.col,r),o=Math.max(i.col,o)}return{min_i:l,max_i:n,min_j:r,max_j:o}}return null}function S(e){var t=M(e);if(null!=t){var a=x(e[t.min_i][t.min_j]),l=x(e[t.min_i][t.max_j]),n=x(e[t.max_i][t.min_j]);return{left:a.length&&a.offset().left,right:l.length&&l.offset().left+l.outerWidth(),top:a.length&&a.offset().top,bottom:n.length&&n.offset().top+n.outerHeight()}}}function I(e,t){if(x(e).is(t))E(),x(e).addClass("fr-selected-cell");else{D(),R.edit.off();var a=$(),l=_(e,a),n=_(t,a),r=function h(e,t,a,l,n){var r,o,s,i,f=e,c=t,d=a,p=l;for(r=f;r<=c;r++)(1<(parseInt(x(n[r][d]).attr("rowspan"),10)||1)||1<(parseInt(x(n[r][d]).attr("colspan"),10)||1))&&(i=y((s=_(n[r][d],n)).row,s.col,n),f=Math.min(s.row,f),c=Math.max(i.row,c),d=Math.min(s.col,d),p=Math.max(i.col,p)),(1<(parseInt(x(n[r][p]).attr("rowspan"),10)||1)||1<(parseInt(x(n[r][p]).attr("colspan"),10)||1))&&(i=y((s=_(n[r][p],n)).row,s.col,n),f=Math.min(s.row,f),c=Math.max(i.row,c),d=Math.min(s.col,d),p=Math.max(i.col,p));for(o=d;o<=p;o++)(1<(parseInt(x(n[f][o]).attr("rowspan"),10)||1)||1<(parseInt(x(n[f][o]).attr("colspan"),10)||1))&&(i=y((s=_(n[f][o],n)).row,s.col,n),f=Math.min(s.row,f),c=Math.max(i.row,c),d=Math.min(s.col,d),p=Math.max(i.col,p)),(1<(parseInt(x(n[c][o]).attr("rowspan"),10)||1)||1<(parseInt(x(n[c][o]).attr("colspan"),10)||1))&&(i=y((s=_(n[c][o],n)).row,s.col,n),f=Math.min(s.row,f),c=Math.max(i.row,c),d=Math.min(s.col,d),p=Math.max(i.col,p));return f==e&&c==t&&d==a&&p==l?{min_i:e,max_i:t,min_j:a,max_j:l}:h(f,c,d,p,n)}(Math.min(l.row,n.row),Math.max(l.row,n.row),Math.min(l.col,n.col),Math.max(l.col,n.col),a);E(),e.classList.add("fr-cell-fixed"),t.classList.add("fr-cell-handler");for(var o=r.min_i;o<=r.max_i;o++)for(var s=r.min_j;s<=r.max_j;s++)x(e).closest("table").is(x(a[o][s]).closest("table"))&&x(a[o][s]).addClass("fr-selected-cell")}}function T(e){var t=null,a=x(e.target);return"TD"==e.target.tagName||"TH"==e.target.tagName?t=e.target:0<a.closest("th",a.closest("thead")[0]).length?t=a.closest("th",a.closest("thead")[0]).get(0):0<a.closest("td",a.closest("tr")[0]).length&&(t=a.closest("td",a.closest("tr")[0]).get(0)),-1===R.$el.html.toString().search(t)?null:t}function N(){E(),R.popups.hide("table.edit")}function e(e){var t=T(e);if("false"==x(t).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(0<Z().length&&!t&&N(),!R.edit.isDisabled()||R.popups.isVisible("table.edit"))if(1!=e.which||1==e.which&&R.helpers.isMac()&&e.ctrlKey)(3==e.which||1==e.which&&R.helpers.isMac()&&e.ctrlKey)&&t&&N();else if(r=!0,t){0<Z().length&&!e.shiftKey&&N(),e.stopPropagation(),R.events.trigger("image.hideResizer"),R.events.trigger("video.hideResizer"),n=!0;var a=t.tagName.toLowerCase();e.shiftKey&&0<R.$el.find("".concat(a,".fr-selected-cell")).length?x(R.$el.find("".concat(a,".fr-selected-cell")).closest("table")).is(x(t).closest("table"))?I(l,t):D():((R.keys.ctrlKey(e)||e.shiftKey)&&(1<Z().length||0===x(t).find(R.selection.element()).length&&!x(t).is(R.selection.element()))&&D(),l=t,0<R.opts.tableEditButtons.length&&I(l,l))}}function a(e){if(!R.edit.isDisabled()&&R.popups.areVisible())return!0;if(n||R.$tb.is(e.target)||R.$tb.is(x(e.target).closest(".fr-toolbar"))||(0<Z().length&&R.toolbar.enable(),E()),!(1!=e.which||1==e.which&&R.helpers.isMac()&&e.ctrlKey)){if(r=!1,n)n=!1,T(e)||1!=Z().length?0<Z().length?R.selection.isCollapsed()?h():(E(),R.edit.on()):Z().length||(R.$el.removeClass("fr-no-selection"),R.edit.on()):E();if(A){A=!1,O.removeClass("fr-moving"),R.$el.removeClass("fr-no-selection"),R.edit.on();var t=parseFloat(O.css("left"))+R.opts.tableResizerOffset+R.$wp.offset().left;R.opts.iframe&&(t-=R.$iframe.offset().left),O.data("release-position",t),O.removeData("max-left"),O.removeData("max-right"),function C(){var e=O.data("origin"),t=O.data("release-position");if(e!==t){var a=O.data("first"),l=O.data("second"),n=O.data("table"),r=n.outerWidth();if(R.undo.canDo()||R.undo.saveStep(),null!=a&&null!=l){var o,s,i,f=$(n),c=[],d=[],p=[],h=[];for(o=0;o<f.length;o++)s=x(f[o][a]),i=x(f[o][l]),c[o]=s.outerWidth(),p[o]=i.outerWidth(),d[o]=c[o]/r*100,h[o]=p[o]/r*100;for(o=0;o<f.length;o++)if(s=x(f[o][a]),i=x(f[o][l]),f[o][a]!=f[o][l]){var u=(d[o]*(c[o]+t-e)/c[o]).toFixed(4);s.css("width",u+"%"),i.css("width",(d[o]+h[o]-u).toFixed(4)+"%")}}else{var b,g=n.parent(),m=r/g.width()*100,v=(parseInt(n.css("margin-left"),10)||0)/g.width()*100,w=(parseInt(n.css("margin-right"),10)||0)/g.width()*100;"rtl"==R.opts.direction&&0===l||"rtl"!=R.opts.direction&&0!==l?(b=(r+t-e)/r*m,n.css("margin-right","calc(100% - ".concat(Math.round(b).toFixed(4),"% - ").concat(Math.round(v).toFixed(4),"%)"))):("rtl"==R.opts.direction&&0!==l||"rtl"!=R.opts.direction&&0===l)&&(b=(r-t+e)/r*m,n.css("margin-left","calc(100% - ".concat(Math.round(b).toFixed(4),"% - ").concat(Math.round(w).toFixed(4),"%)"))),n.css("width","".concat(Math.round(b).toFixed(4),"%"))}R.selection.restore(),R.undo.saveStep(),R.events.trigger("table.resized",[n.get(0)])}O.removeData("origin"),O.removeData("release-position"),O.removeData("first"),O.removeData("second"),O.removeData("table")}(),Y()}}}function K(e){if(!(x(e.currentTarget).is(x(e.originalEvent.relatedTarget))||e.currentTarget.contains(e.originalEvent.relatedTarget)||e.originalEvent.relatedTarget&&e.originalEvent.relatedTarget.contains(e.currentTarget))&&(R.events.$on(x("input"),"click",ee),!0===n&&0<R.opts.tableEditButtons.length)){if(x(e.currentTarget).closest("table").is(Q())){if("TD"==e.currentTarget.tagName&&0===R.$el.find("th.fr-selected-cell").length)return void I(l,e.currentTarget);if("TH"==e.currentTarget.tagName&&0===R.$el.find("td.fr-selected-cell").length)return void I(l,e.currentTarget)}D()}}function B(e,t,a,l){for(var n,r=t;r!=R.el&&"TD"!=r.tagName&&"TH"!=r.tagName&&("up"==l?n=r.previousElementSibling:"down"==l&&(n=r.nextElementSibling),!n);)r=r.parentNode;"TD"==r.tagName||"TH"==r.tagName?function o(e,t){for(var a=e;a&&"TABLE"!=a.tagName&&a.parentNode!=R.el;)a=a.parentNode;if(a&&"TABLE"==a.tagName){var l=$(x(a));"up"==t?z(_(e,l),a,l):"down"==t&&k(_(e,l),a,l)}}(r,l):n&&("up"==l&&R.selection.setAtEnd(n),"down"==l&&R.selection.setAtStart(n))}function z(e,t,a){0<x(".tribute-container").length&&"none"!=x(".tribute-container").css("display")||(0<e.row?R.selection.setAtEnd(a[e.row-1][e.col]):B(0,t,0,"up"))}function k(e,t,a){if(!(0<x(".tribute-container").length&&"none"!=x(".tribute-container").css("display"))){var l=parseInt(a[e.row][e.col].getAttribute("rowspan"),10)||1;e.row<a.length-l?R.selection.setAtStart(a[e.row+l][e.col]):B(0,t,0,"down")}}function Y(){O&&(O.find("div").css("opacity",0),O.css("top",0),O.css("left",0),O.css("height",0),O.find("div").css("height",0),O.hide())}function W(){f&&f.removeClass("fr-visible").css("left","-9999px")}function L(e,t){var a=x(t),l=a.closest("table"),n=l.parent();if(t&&"TD"!=t.tagName&&"TH"!=t.tagName&&(0<a.closest("td").length?t=a.closest("td"):0<a.closest("th").length&&(t=a.closest("th"))),!t||"TD"!=t.tagName&&"TH"!=t.tagName)O&&a.get(0)!=O.get(0)&&a.parent().get(0)!=O.get(0)&&R.core.sameInstance(O)&&Y();else{if(a=x(t),0===R.$el.find(a).length)return!1;var r=a.offset().left-1,o=r+a.outerWidth();if(Math.abs(e.pageX-r)<=R.opts.tableResizerOffset||Math.abs(o-e.pageX)<=R.opts.tableResizerOffset){var s,i,f,c,d,p=$(l),h=_(t,p),u=y(h.row,h.col,p),b=l.offset().top,g=l.outerHeight()-1;"rtl"!=R.opts.direction?e.pageX-r<=R.opts.tableResizerOffset?(f=r,0<h.col?(c=r-j(h.col-1,p)+R.opts.tableResizingLimit,d=r+j(h.col,p)-R.opts.tableResizingLimit,s=h.col-1,i=h.col):(s=null,i=0,c=l.offset().left-1-parseInt(l.css("margin-left"),10),d=l.offset().left-1+l.width()-p[0].length*R.opts.tableResizingLimit)):o-e.pageX<=R.opts.tableResizerOffset&&(f=o,u.col<p[u.row].length&&p[u.row][u.col+1]?(c=o-j(u.col,p)+R.opts.tableResizingLimit,d=o+j(u.col+1,p)-R.opts.tableResizingLimit,s=u.col,i=u.col+1):(s=u.col,i=null,c=l.offset().left-1+p[0].length*R.opts.tableResizingLimit,d=n.offset().left-1+n.width()+parseFloat(n.css("padding-left")))):o-e.pageX<=R.opts.tableResizerOffset?(f=o,0<h.col?(c=o-j(h.col,p)+R.opts.tableResizingLimit,d=o+j(h.col-1,p)-R.opts.tableResizingLimit,s=h.col,i=h.col-1):(s=null,i=0,c=l.offset().left+p[0].length*R.opts.tableResizingLimit,d=n.offset().left-1+n.width()+parseFloat(n.css("padding-left")))):e.pageX-r<=R.opts.tableResizerOffset&&(f=r,u.col<p[u.row].length&&p[u.row][u.col+1]?(c=r-j(u.col+1,p)+R.opts.tableResizingLimit,d=r+j(u.col,p)-R.opts.tableResizingLimit,s=u.col+1,i=u.col):(s=u.col,i=null,c=n.offset().left+parseFloat(n.css("padding-left")),d=l.offset().left-1+l.width()-p[0].length*R.opts.tableResizingLimit)),O||function E(){R.shared.$table_resizer||(R.shared.$table_resizer=x(document.createElement("div")).attr("class","fr-table-resizer").html("<div></div>")),O=R.shared.$table_resizer,R.events.$on(O,"mousedown",function(e){return!R.core.sameInstance(O)||(0<Z().length&&N(),1==e.which?(R.selection.save(),A=!0,O.addClass("fr-moving"),D(),R.edit.off(),O.find("div").css("opacity",1),!1):void 0)}),R.events.$on(O,"mousemove",function(e){if(!R.core.sameInstance(O))return!0;A&&(R.opts.iframe&&(e.pageX-=R.$iframe.offset().left),G(e))}),R.events.on("shared.destroy",function(){O.html("").removeData().remove(),O=null},!0),R.events.on("destroy",function(){R.$el.find(".fr-selected-cell").removeClass("fr-selected-cell"),x("body").first().append(O.hide())},!0)}(),O.data("table",l),O.data("first",s),O.data("second",i),O.data("instance",R),R.$wp.append(O);var m=f-R.win.pageXOffset-R.opts.tableResizerOffset-R.$wp.offset().left,v=b-R.$wp.offset().top+R.$wp.scrollTop();if(R.opts.iframe){var w=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-top")),C=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-left"));m+=R.$iframe.offset().left+C,v+=R.$iframe.offset().top+w,c+=R.$iframe.offset().left,d+=R.$iframe.offset().left}O.data("max-left",c),O.data("max-right",d),O.data("origin",f-R.win.pageXOffset),O.css("top",v),O.css("left",m),O.css("height",g),O.find("div").css("height",g),O.css("padding-left",R.opts.tableResizerOffset),O.css("padding-right",R.opts.tableResizerOffset),O.show()}else R.core.sameInstance(O)&&Y()}}function F(e,t){if(R.$box.find(".fr-line-breaker").isVisible())return!1;f||q(),R.$box.append(f),f.data("instance",R);var a,l=x(t).find("tr").first(),n=e.pageX,r=0,o=0;if(R.opts.iframe){var s=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-top")),i=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-left"));r+=R.$iframe.offset().left-R.helpers.scrollLeft()+i,o+=R.$iframe.offset().top-R.helpers.scrollTop()+s}l.find("th, td").each(function(){var e=x(this);return e.offset().left<=n&&n<e.offset().left+e.outerWidth()/2?(a=parseInt(f.find("a").css("width"),10),f.css("top",o+e.offset().top-R.$box.offset().top-a-5),f.css("left",r+e.offset().left-R.$box.offset().left-a/2),f.data("selected-cell",e),f.data("position","before"),f.addClass("fr-visible"),!1):e.offset().left+e.outerWidth()/2<=n&&n<e.offset().left+e.outerWidth()?(a=parseInt(f.find("a").css("width"),10),f.css("top",o+e.offset().top-R.$box.offset().top-a-5),f.css("left",r+e.offset().left-R.$box.offset().left+e.outerWidth()-a/2),f.data("selected-cell",e),f.data("position","after"),f.addClass("fr-visible"),!1):void 0})}function H(e,t){if(R.$box.find(".fr-line-breaker").isVisible())return!1;f||q(),R.$box.append(f),f.data("instance",R);var a,l=x(t),n=e.pageY,r=0,o=0;if(R.opts.iframe){var s=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-top")),i=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-left"));r+=R.$iframe.offset().left-R.helpers.scrollLeft()+i,o+=R.$iframe.offset().top-R.helpers.scrollTop()+s}l.find("tr").each(function(){var e=x(this);a=parseInt(f.find("a").css("width"),10);var t=r+e.offset().left-R.$box.offset().left;return t=0!==R.$box.offset().left?t-a-5:t+a-5,e.offset().top<=n&&n<e.offset().top+e.outerHeight()/2?(f.css("top",o+e.offset().top-R.$box.offset().top-a/2),f.css("left",t),f.data("selected-cell",e.find("td").first()),f.data("position","above"),f.addClass("fr-visible"),!1):e.offset().top+e.outerHeight()/2<=n&&n<e.offset().top+e.outerHeight()?(f.css("top",o+e.offset().top-R.$box.offset().top+e.outerHeight()-a/2),f.css("left",t),f.data("selected-cell",e.find("td").first()),f.data("position","below"),f.addClass("fr-visible"),!1):void 0})}function V(e){o=null;var t=R.doc.elementFromPoint(e.pageX-R.win.pageXOffset,e.pageY-R.win.pageYOffset);R.opts.tableResizer&&(!R.popups.areVisible()||R.popups.areVisible()&&R.popups.isVisible("table.edit"))&&L(e,t),!R.opts.tableInsertHelper||R.popups.areVisible()||R.$tb.hasClass("fr-inline")&&R.$tb.isVisible()||function r(e,t){if(0===Z().length){var a,l,n;if(t&&("HTML"==t.tagName||"BODY"==t.tagName||R.node.isElement(t)))for(a=1;a<=R.opts.tableInsertHelperOffset;a++){if(l=R.doc.elementFromPoint(e.pageX-R.win.pageXOffset,e.pageY-R.win.pageYOffset+a),x(l).hasClass("fr-tooltip"))return!0;if(l&&("TH"==l.tagName||"TD"==l.tagName||"TABLE"==l.tagName)&&(x(l).parents(".fr-wrapper").length||R.opts.iframe)&&"false"!=x(l).closest("table").attr("contenteditable"))return F(e,x(l).closest("table")),!0;if(n=R.doc.elementFromPoint(e.pageX-R.win.pageXOffset+a,e.pageY-R.win.pageYOffset),x(n).hasClass("fr-tooltip"))return!0;if(n&&("TH"==n.tagName||"TD"==n.tagName||"TABLE"==n.tagName)&&(x(n).parents(".fr-wrapper").length||R.opts.iframe)&&"false"!=x(n).closest("table").attr("contenteditable"))return H(e,x(n).closest("table")),!0}R.core.sameInstance(f)&&W()}}(e,t)}function P(){if(A){var e=O.data("table").offset().top-R.win.pageYOffset;if(R.opts.iframe){var t=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-top"));e+=R.$iframe.offset().top-R.helpers.scrollTop()+t}O.css("top",e)}}function j(e,t){var a,l=x(t[0][e]).outerWidth();for(a=1;a<t.length;a++)l=Math.min(l,x(t[a][e]).outerWidth());return l}function X(e,t,a){var l,n=0;for(l=e;l<=t;l++)n+=j(l,a);return n}function G(e){if(1<Z().length&&r&&D(),!1===r&&!1===n&&!1===A)o&&clearTimeout(o),R.edit.isDisabled()&&!R.popups.isVisible("table.edit")||(o=setTimeout(V,30,e));else if(A){var t=e.pageX-R.win.pageXOffset;R.opts.iframe&&(t+=R.$iframe.offset().left);var a=O.data("max-left"),l=O.data("max-right");a<=t&&t<=l?O.css("left",t-R.opts.tableResizerOffset-R.$wp.offset().left):t<a&&parseFloat(O.css("left"),10)>a-R.opts.tableResizerOffset?O.css("left",a-R.opts.tableResizerOffset-R.$wp.offset().left):l<t&&parseFloat(O.css("left"),10)<l-R.opts.tableResizerOffset&&O.css("left",l-R.opts.tableResizerOffset-R.$wp.offset().left)}else r&&W()}function U(e){R.node.isEmpty(e.get(0))?e.prepend(me.MARKERS):e.prepend(me.START_MARKER).append(me.END_MARKER)}function q(){R.shared.$ti_helper||(R.shared.$ti_helper=x(document.createElement("div")).attr("class","fr-insert-helper").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'.concat(R.language.translate("Insert"),'"><svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M22,16.75 L16.75,16.75 L16.75,22 L15.25,22.000 L15.25,16.75 L10,16.75 L10,15.25 L15.25,15.25 L15.25,10 L16.75,10 L16.75,15.25 L22,15.25 L22,16.75 Z"/></svg></a>')),R.events.bindClick(R.shared.$ti_helper,"a",function(){var e=f.data("selected-cell"),t=f.data("position"),a=f.data("instance")||R;"before"==t?(R.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertColumn(t),e.removeClass("fr-selected-cell"),R.undo.saveStep()):"after"==t?(R.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertColumn(t),e.removeClass("fr-selected-cell"),R.undo.saveStep()):"above"==t?(R.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertRow(t),e.removeClass("fr-selected-cell"),R.undo.saveStep()):"below"==t&&(R.undo.saveStep(),e.addClass("fr-selected-cell"),a.table.insertRow(t),e.removeClass("fr-selected-cell"),R.undo.saveStep()),W()}),R.events.on("shared.destroy",function(){R.shared.$ti_helper.html("").removeData().remove(),R.shared.$ti_helper=null},!0),R.events.$on(R.shared.$ti_helper,"mousemove",function(e){e.stopPropagation()},!0),R.events.$on(x(R.o_win),"scroll",function(){W()},!0),R.events.$on(R.$wp,"scroll",function(){W()},!0)),f=R.shared.$ti_helper,R.events.on("destroy",function(){f=null}),R.tooltip.bind(R.$box,".fr-insert-helper > a.fr-floating-btn")}function J(){l=null,clearTimeout(o)}function Z(){return R.el.querySelectorAll(".fr-selected-cell")}function Q(){var e=Z();if(e.length){for(var t=e[0];t&&"TABLE"!=t.tagName&&t.parentNode!=R.el;)t=t.parentNode;return t&&"TABLE"==t.tagName?x(t):x([])}return x([])}function ee(e){n=!1}return{_init:function te(){if(!R.$wp)return!1;if(R.helpers.isMobile()&&(R.events.$on(R.$el,"mousedown",e),R.events.$on(R.$win,"mouseup",a)),!R.helpers.isMobile()){A=n=r=!1,R.events.$on(R.$el,"mousedown",e),R.popups.onShow("image.edit",function(){E(),n=r=!1}),R.popups.onShow("link.edit",function(){E(),n=r=!1}),R.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&E()}),R.events.$on(R.$el,"mouseover","th, td",K),R.events.$on(R.$win,"mouseup",a),R.opts.iframe&&R.events.$on(x(R.o_win),"mouseup",a),R.events.$on(R.$win,"mousemove",G),R.events.$on(x(R.o_win),"scroll",P),R.events.on("contentChanged",function(){0<Z().length&&(h(),R.$el.find("img").on("load.selected-cells",function(){x(this).off("load.selected-cells"),0<Z().length&&h()}))}),R.events.$on(x(R.o_win),"resize",function(){E()}),R.events.on("toolbar.esc",function(){if(0<Z().length)return R.events.disableBlur(),R.events.focus(),!1},!0),R.events.$on(x(R.o_win),"keydown",function(){r&&n&&(n=r=!1,R.$el.removeClass("fr-no-selection"),R.edit.on(),R.selection.setAtEnd(R.$el.find(".fr-selected-cell").last().get(0)),R.selection.restore(),E())}),R.events.$on(R.$el,"keydown",function(e){e.shiftKey?!1===function o(e){var t=Z();if(null!=t&&0<t.length){var a,l=$(),n=e.which,r=_(1==t.length?a=t[0]:(a=R.el.querySelector(".fr-cell-fixed"),R.el.querySelector(".fr-cell-handler")),l);if(me.KEYCODE.ARROW_RIGHT==n){if(r.col<l[0].length-1)return I(a,l[r.row][r.col+1]),!1}else if(me.KEYCODE.ARROW_DOWN==n){if(r.row<l.length-1)return I(a,l[r.row+1][r.col]),!1}else if(me.KEYCODE.ARROW_LEFT==n){if(0<r.col)return I(a,l[r.row][r.col-1]),!1}else if(me.KEYCODE.ARROW_UP==n&&0<r.row)return I(a,l[r.row-1][r.col]),!1}}(e)&&setTimeout(function(){h()},0):function s(e){var t=e.which,a=R.selection.blocks();if(a.length&&("TD"==(a=a[0]).tagName||"TH"==a.tagName)){for(var l=a;l&&"TABLE"!=l.tagName&&l.parentNode!=R.el;)l=l.parentNode;if(l&&"TABLE"==l.tagName&&(me.KEYCODE.ARROW_LEFT==t||me.KEYCODE.ARROW_UP==t||me.KEYCODE.ARROW_RIGHT==t||me.KEYCODE.ARROW_DOWN==t)&&(0<Z().length&&N(),R.browser.webkit&&(me.KEYCODE.ARROW_UP==t||me.KEYCODE.ARROW_DOWN==t))){var n=R.selection.ranges(0).startContainer;if(n.nodeType==Node.TEXT_NODE&&(me.KEYCODE.ARROW_UP==t&&(n.previousSibling&&"BR"!==n.previousSibling.tagName||n.previousSibling&&"BR"===n.previousSibling.tagName&&n.previousSibling.previousSibling)||me.KEYCODE.ARROW_DOWN==t&&(n.nextSibling&&"BR"!==n.nextSibling.tagName||n.nextSibling&&"BR"===n.nextSibling.tagName&&n.nextSibling.nextSibling)))return;e.preventDefault(),e.stopPropagation();var r=$(x(l)),o=_(a,r);return me.KEYCODE.ARROW_UP==t?z(o,l,r):me.KEYCODE.ARROW_DOWN==t&&k(o,l,r),R.selection.restore(),!1}}}(e)}),R.events.on("keydown",function(e){if(!1===function l(e){if(e.which==me.KEYCODE.TAB){var t;if(0<Z().length)t=R.$el.find(".fr-selected-cell").last();else{var a=R.selection.element();"TD"==a.tagName||"TH"==a.tagName?t=x(a):a!=R.el&&(0<x(a).parentsUntil(R.$el,"td").length?t=x(a).parents("td").first():0<x(a).parentsUntil(R.$el,"th").length&&(t=x(a).parents("th").first()))}if(t)return e.preventDefault(),!!(0===R.selection.get().focusOffset&&0<x(R.selection.element()).parentsUntil(R.$el,"ol, ul").length&&(0<x(R.selection.element()).closest("li").prev().length||x(R.selection.element()).is("li")&&0<x(R.selection.element()).prev().length))||(N(),e.shiftKey?0<t.prev().length?U(t.prev()):0<t.closest("tr").length&&0<t.closest("tr").prev().length?U(t.closest("tr").prev().find("td").last()):0<t.closest("tbody").length&&0<t.closest("table").find("thead tr").length&&U(t.closest("table").find("thead tr th").last()):0<t.next().length?U(t.next()):0<t.closest("tr").length&&0<t.closest("tr").next().length?U(t.closest("tr").next().find("td").first()):0<t.closest("thead").length&&0<t.closest("table").find("tbody tr").length?U(t.closest("table").find("tbody tr td").first()):(t.addClass("fr-selected-cell"),b("below"),E(),U(t.closest("tr").next().find("td").first())),R.selection.restore(),!1)}}(e))return!1;var t=Z();if(0<t.length){if(0<t.length&&R.keys.ctrlKey(e)&&e.which==me.KEYCODE.A)return E(),R.popups.isVisible("table.edit")&&R.popups.hide("table.edit"),t=[],!0;if(e.which==me.KEYCODE.ESC&&R.popups.isVisible("table.edit"))return E(),R.popups.hide("table.edit"),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),!(t=[]);if(1<t.length&&(e.which==me.KEYCODE.BACKSPACE||e.which==me.KEYCODE.DELETE)){R.undo.saveStep();for(var a=0;a<t.length;a++)x(t[a]).html("<br>"),a==t.length-1&&x(t[a]).prepend(me.MARKERS);return R.selection.restore(),R.undo.saveStep(),!(t=[])}if(1<t.length&&e.which!=me.KEYCODE.F10&&!R.keys.isBrowserAction(e))return e.preventDefault(),!(t=[])}else if(!(t=[])===function n(e){if(e.altKey&&e.which==me.KEYCODE.SPACE){var t,a=R.selection.element();if("TD"==a.tagName||"TH"==a.tagName?t=a:0<x(a).closest("td").length?t=x(a).closest("td").get(0):0<x(a).closest("th").length&&(t=x(a).closest("th").get(0)),t)return e.preventDefault(),I(t,t),h(),!1}}(e))return!1},!0);var t=[];R.events.on("html.beforeGet",function(){t=Z();for(var e=0;e<t.length;e++)t[e].className=(t[e].className||"").replace(/fr-selected-cell/g,"")}),R.events.on("html.afterGet",function(){for(var e=0;e<t.length;e++)t[e].className=(t[e].className?t[e].className.trim()+" ":"")+"fr-selected-cell";t=[]}),c(!0),p(!0)}R.events.on("destroy",J)},insert:function ae(e,t){var a,l,n="<table "+(R.opts.tableDefaultWidth?'style="width: '+R.opts.tableDefaultWidth+';" ':"")+'class="fr-inserted-table"><tbody>',r=100/t;for(a=0;a<e;a++){for(n+="<tr>",l=0;l<t;l++)n+="<td"+(R.opts.tableDefaultWidth?' style="width: '+r.toFixed(4)+'%;"':"")+">",0===a&&0===l&&(n+=me.MARKERS),n+="<br></td>";n+="</tr>"}n+="</tbody></table>",R.html.insert(n),R.selection.restore();var o=R.$el.find(".fr-inserted-table");o.removeClass("fr-inserted-table"),R.events.trigger("table.inserted",[o.get(0)])},remove:u,insertRow:b,deleteRow:function le(){var e=Q();if(0<e.length){var t,a,l,n=$(),r=M(n);if(null==r)return;if(0===r.min_i&&r.max_i==n.length-1)u();else{for(t=r.max_i;t>=r.min_i;t--){for(l=x(e.find("tr").not(e.find("> table tr")).get(t)),a=0;a<n[t].length;a++)if(0===a||n[t][a]!=n[t][a-1]){var o=x(n[t][a]);if(1<parseInt(o.attr("rowspan"),10)){var s=parseInt(o.attr("rowspan"),10)-1;1==s?o.removeAttr("rowspan"):o.attr("rowspan",s)}if(t<n.length-1&&n[t][a]==n[t+1][a]&&(0===t||n[t][a]!=n[t-1][a])){for(var i=n[t][a],f=a;0<f&&n[t][f]==n[t][f-1];)f--;0===f?x(e.find("tr").not(e.find("> table tr")).get(t+1)).prepend(i):x(n[t+1][f-1])[0].parentNode&&x(n[t+1][f-1])[0].insertAdjacentElement("afterend",i)}}var c=l.parent();l.remove(),0===c.find("tr").length&&c.remove(),n=$(e)}w(0,n.length-1,0,n[0].length-1,e),0<r.min_i?R.selection.setAtEnd(n[r.min_i-1][0]):R.selection.setAtEnd(n[0][0]),R.selection.restore(),R.popups.hide("table.edit")}}},insertColumn:function ne(i){var e=Q();if(0<e.length){var f,c=$(),t=M(c);f="before"==i?t.min_j:t.max_j;var a,d=100/c[0].length,p=100/(c[0].length+1);e.find("th, td").each(function(){(a=x(this)).data("old-width",a.outerWidth()/e.outerWidth()*100)}),e.find("tr").not(e.find("> table tr")).each(function(e){for(var t,a=x(this),l=0,n=0;l-1<f;){if(!(t=a.find("> th, > td").get(n))){t=null;break}t==c[e][l]?(l+=parseInt(x(t).attr("colspan"),10)||1,n++):(l+=parseInt(x(c[e][l]).attr("colspan"),10)||1,"after"==i&&(t=0===n?-1:a.find("> th, > td").get(n-1)))}var r,o=x(t);if("after"==i&&f<l-1||"before"==i&&0<f&&c[e][f]==c[e][f-1]){if(0===e||0<e&&c[e][f]!=c[e-1][f]){var s=parseInt(o.attr("colspan"),10)+1;o.attr("colspan",s),o.css("width",(o.data("old-width")*p/d+p).toFixed(4)+"%"),o.removeData("old-width")}}else r=0<a.find("th").length?'<th style="width: '.concat(p.toFixed(4),'%;"><br></th>'):'<td style="width: '.concat(p.toFixed(4),'%;"><br></td>'),-1==t?a.prepend(r):null==t?a.append(r):"before"==i?o.before(r):"after"==i&&o[0].parentNode&&o[0].insertAdjacentHTML("afterend",r)}),e.find("th, td").each(function(){(a=x(this)).data("old-width")&&(a.css("width",(a.data("old-width")*p/d).toFixed(4)+"%"),a.removeData("old-width"))}),R.popups.isVisible("table.edit")&&h()}},deleteColumn:function re(){var e=Q();if(0<e.length){var t,a,l,n=$(),r=M(n);if(null==r)return;if(0===r.min_j&&r.max_j==n[0].length-1)u();else{var o=0;for(t=0;t<n.length;t++)for(a=0;a<n[0].length;a++)(l=x(n[t][a])).hasClass("fr-selected-cell")||(l.data("old-width",l.outerWidth()/e.outerWidth()*100),(a<r.min_j||a>r.max_j)&&(o+=l.outerWidth()/e.outerWidth()*100));for(o/=n.length,a=r.max_j;a>=r.min_j;a--)for(t=0;t<n.length;t++)if(0===t||n[t][a]!=n[t-1][a])if(l=x(n[t][a]),1<(parseInt(l.attr("colspan"),10)||1)){var s=parseInt(l.attr("colspan"),10)-1;1==s?l.removeAttr("colspan"):l.attr("colspan",s),l.css("width",(100*(l.data("old-width")-j(a,n))/o).toFixed(4)+"%"),l.removeData("old-width")}else{var i=x(l.parent().get(0));l.remove(),0===i.find("> th, > td").length&&(0===i.prev().length||0===i.next().length||i.prev().find("> th[rowspan], > td[rowspan]").length<i.prev().find("> th, > td").length)&&i.remove()}w(0,n.length-1,0,n[0].length-1,e),0<r.min_j?R.selection.setAtEnd(n[r.min_i][r.min_j-1]):R.selection.setAtEnd(n[r.min_i][0]),R.selection.restore(),R.popups.hide("table.edit"),e.find("th, td").each(function(){(l=x(this)).data("old-width")&&(l.css("width",(100*l.data("old-width")/o).toFixed(4)+"%"),l.removeData("old-width"))})}}},mergeCells:function oe(){if(1<Z().length&&(0===R.$el.find("th.fr-selected-cell").length||0===R.$el.find("td.fr-selected-cell").length)){C();var e,t,a=M($());if(null==a)return;var l=R.$el.find(".fr-selected-cell"),n=x(l[0]),r=n.parent().find(".fr-selected-cell"),o=n.closest("table"),s=n.html(),i=0;for(e=0;e<r.length;e++)i+=x(r[e]).outerWidth();for(n.css("width",Math.min(100,i/o.outerWidth()*100).toFixed(4)+"%"),a.min_j<a.max_j&&n.attr("colspan",a.max_j-a.min_j+1),a.min_i<a.max_i&&n.attr("rowspan",a.max_i-a.min_i+1),e=1;e<l.length;e++)"<br>"!=(t=x(l[e])).html()&&""!==t.html()&&(s+="<br>".concat(t.html())),t.remove();n.html(s),R.selection.setAtEnd(n.get(0)),R.selection.restore(),R.toolbar.enable(),m(a.min_i,a.max_i,o);var f=o.find("tr:empty");for(e=f.length-1;0<=e;e--)x(f[e]).remove();g(a.min_j,a.max_j,o),h()}},splitCellVertically:function se(){if(1==Z().length){var e=R.$el.find(".fr-selected-cell"),t=parseInt(e.attr("colspan"),10)||1,a=e.parent().outerWidth(),l=e.outerWidth(),n=e.clone().html("<br>"),r=$(),o=_(e.get(0),r);if(1<t){var s=Math.ceil(t/2);l=X(o.col,o.col+s-1,r)/a*100;var i=X(o.col+s,o.col+t-1,r)/a*100;1<s?e.attr("colspan",s):e.removeAttr("colspan"),1<t-s?n.attr("colspan",t-s):n.removeAttr("colspan"),e.css("width",l.toFixed(4)+"%"),n.css("width",i.toFixed(4)+"%")}else{var f;for(f=0;f<r.length;f++)if(0===f||r[f][o.col]!=r[f-1][o.col]){var c=x(r[f][o.col]);if(!c.is(e)){var d=(parseInt(c.attr("colspan"),10)||1)+1;c.attr("colspan",d)}}l=l/a*100/2,e.css("width","".concat(l.toFixed(4),"%")),n.css("width","".concat(l.toFixed(4),"%"))}e[0].parentNode&&e[0].insertAdjacentElement("afterend",n[0]),E(),R.popups.hide("table.edit")}},splitCellHorizontally:function ie(){if(1==Z().length){var e=R.$el.find(".fr-selected-cell"),t=e.parent(),a=e.closest("table"),l=parseInt(e.attr("rowspan"),10),n=$(),r=_(e.get(0),n),o=e.clone().html("<br>");if(1<l){var s=Math.ceil(l/2);1<s?e.attr("rowspan",s):e.removeAttr("rowspan"),1<l-s?o.attr("rowspan",l-s):o.removeAttr("rowspan");for(var i=r.row+s,f=0===r.col?r.col:r.col-1;0<=f&&(n[i][f]==n[i][f-1]||0<i&&n[i][f]==n[i-1][f]);)f--;-1==f?x(a.find("tr").not(a.find("> table tr")).get(i)).prepend(o):x(n[i][f])[0].parentNode&&x(n[i][f])[0].insertAdjacentElement("afterend",o[0])}else{var c,d=x(document.createElement("tr")).append(o);for(c=0;c<n[0].length;c++)if(0===c||n[r.row][c]!=n[r.row][c-1]){var p=x(n[r.row][c]);p.is(e)||p.attr("rowspan",(parseInt(p.attr("rowspan"),10)||1)+1)}t[0].parentNode&&t[0].insertAdjacentElement("afterend",d[0])}E(),R.popups.hide("table.edit")}},addHeader:function fe(){var e=Q();if(0<e.length&&0===e.find("th").length){var t,a="<thead><tr>",l=0;for(e.find("tr").first().find("> td").each(function(){var e=x(this);l+=parseInt(e.attr("colspan"),10)||1}),t=0;t<l;t++)a+="<th><br></th>";a+="</tr></thead>",e.prepend(a),h()}},removeHeader:function ce(){var e=Q(),t=e.find("thead");if(0<t.length)if(0===e.find("tbody tr").length)u();else if(t.remove(),0<Z().length)h();else{R.popups.hide("table.edit");var a=e.find("tbody tr").first().find("td").first().get(0);a&&(R.selection.setAtEnd(a),R.selection.restore())}},setBackground:t,showInsertPopup:function de(){var e=R.$tb.find('.fr-command[data-cmd="insertTable"]'),t=R.popups.get("table.insert");if(t||(t=c()),!t.hasClass("fr-active")){R.popups.refresh("table.insert"),R.popups.setContainer("table.insert",R.$tb);var a=R.button.getPosition(e),l=a.left,n=a.top;R.popups.show("table.insert",l,n,e.outerHeight())}},showEditPopup:h,showColorsPopup:s,back:function pe(){0<Z().length?h():(R.popups.hide("table.insert"),R.toolbar.showInline())},verticalAlign:function he(e){R.$el.find(".fr-selected-cell").css("vertical-align",e)},horizontalAlign:function ue(e){R.$el.find(".fr-selected-cell").css("text-align",e)},applyStyle:function be(e,t,a,l){if(0<t.length){if(!a){var n=Object.keys(l);n.splice(n.indexOf(e),1),t.removeClass(n.join(" "))}t.toggleClass(e)}},selectedTable:Q,selectedCells:Z,customColor:function ge(){var e=R.popups.get("table.colors").find(".fr-table-colors-hex-layer input");e.length&&t(e.val())},selectCells:I}},me.DefineIcon("insertTable",{NAME:"table",SVG_KEY:"insertTable"}),me.RegisterCommand("insertTable",{title:"Insert Table",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("table.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("table.insert")):this.table.showInsertPopup()},plugin:"table"}),me.RegisterCommand("tableInsert",{callback:function(e,t,a){this.table.insert(t,a),this.popups.hide("table.insert")}}),me.DefineIcon("tableHeader",{NAME:"header",FA5NAME:"heading",SVG_KEY:"tableHeader"}),me.RegisterCommand("tableHeader",{title:"Table Header",focus:!1,toggle:!0,callback:function(){this.popups.get("table.edit").find('.fr-command[data-cmd="tableHeader"]').hasClass("fr-active")?this.table.removeHeader():this.table.addHeader()},refresh:function(e){var t=this.table.selectedTable();0<t.length&&(0===t.find("th").length?e.removeClass("fr-active").attr("aria-pressed",!1):e.addClass("fr-active").attr("aria-pressed",!0))}}),me.DefineIcon("tableRows",{NAME:"bars",SVG_KEY:"row"}),me.RegisterCommand("tableRows",{type:"dropdown",focus:!1,title:"Row",options:{above:"Insert row above",below:"Insert row below","delete":"Delete row"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=me.COMMANDS.tableRows.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableRows" data-param1="'+a+'" title="'+this.language.translate(t[a])+'">'+this.language.translate(t[a])+"</a></li>");return e+="</ul>"},callback:function(e,t){"above"==t||"below"==t?this.table.insertRow(t):this.table.deleteRow()}}),me.DefineIcon("tableColumns",{NAME:"bars fa-rotate-90",SVG_KEY:"columns"}),me.RegisterCommand("tableColumns",{type:"dropdown",focus:!1,title:"Column",options:{before:"Insert column before",after:"Insert column after","delete":"Delete column"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=me.COMMANDS.tableColumns.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableColumns" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){"before"==t||"after"==t?this.table.insertColumn(t):this.table.deleteColumn()}}),me.DefineIcon("tableCells",{NAME:"square-o",FA5NAME:"square",SVG_KEY:"cellOptions"}),me.RegisterCommand("tableCells",{type:"dropdown",focus:!1,title:"Cell",options:{merge:"Merge cells","vertical-split":"Vertical split","horizontal-split":"Horizontal split"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=me.COMMANDS.tableCells.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCells" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){"merge"==t?this.table.mergeCells():"vertical-split"==t?this.table.splitCellVertically():this.table.splitCellHorizontally()},refreshOnShow:function(e,t){1<this.$el.find(".fr-selected-cell").length?(t.find('a[data-param1="vertical-split"]').addClass("fr-disabled").attr("aria-disabled",!0),t.find('a[data-param1="horizontal-split"]').addClass("fr-disabled").attr("aria-disabled",!0),t.find('a[data-param1="merge"]').removeClass("fr-disabled").attr("aria-disabled",!1)):(t.find('a[data-param1="merge"]').addClass("fr-disabled").attr("aria-disabled",!0),t.find('a[data-param1="vertical-split"]').removeClass("fr-disabled").attr("aria-disabled",!1),t.find('a[data-param1="horizontal-split"]').removeClass("fr-disabled").attr("aria-disabled",!1))}}),me.DefineIcon("tableRemove",{NAME:"trash",SVG_KEY:"removeTable"}),me.RegisterCommand("tableRemove",{title:"Remove Table",focus:!1,callback:function(){this.table.remove()}}),me.DefineIcon("tableStyle",{NAME:"paint-brush",SVG_KEY:"tableStyle"}),me.RegisterCommand("tableStyle",{title:"Table Style",type:"dropdown",focus:!1,html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.tableStyles;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableStyle" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.table.applyStyle(t,this.$el.find(".fr-selected-cell").closest("table"),this.opts.tableMultipleStyles,this.opts.tableStyles)},refreshOnShow:function(e,t){var a=this.$,l=this.$el.find(".fr-selected-cell").closest("table");l&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=l.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),me.DefineIcon("tableCellBackground",{NAME:"tint",SVG_KEY:"cellBackground"}),me.RegisterCommand("tableCellBackground",{title:"Cell Background",focus:!1,popup:!0,callback:function(){this.table.showColorsPopup()}}),me.RegisterCommand("tableCellBackgroundColor",{undo:!0,focus:!1,callback:function(e,t){this.table.setBackground(t)}}),me.DefineIcon("tableBack",{NAME:"arrow-left",SVG_KEY:"back"}),me.RegisterCommand("tableBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.table.back()},refresh:function(e){0!==this.table.selectedCells().length||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),me.DefineIcon("tableCellVerticalAlign",{NAME:"arrows-v",FA5NAME:"arrows-alt-v",SVG_KEY:"verticalAlignMiddle"}),me.RegisterCommand("tableCellVerticalAlign",{type:"dropdown",focus:!1,title:"Vertical Align",options:{Top:"Align Top",Middle:"Align Middle",Bottom:"Align Bottom"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=me.COMMANDS.tableCellVerticalAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCellVerticalAlign" data-param1="'.concat(a.toLowerCase(),'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(a),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.table.verticalAlign(t)},refreshOnShow:function(e,t){t.find('.fr-command[data-param1="'+this.$el.find(".fr-selected-cell").css("vertical-align")+'"]').addClass("fr-active").attr("aria-selected",!0)}}),me.DefineIcon("tableCellHorizontalAlign",{NAME:"align-left",SVG_KEY:"alignLeft"}),me.DefineIcon("align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),me.DefineIcon("align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),me.DefineIcon("align-center",{NAME:"align-center",SVG_KEY:"alignCenter"}),me.DefineIcon("align-justify",{NAME:"align-justify",SVG_KEY:"alignJustify"}),me.RegisterCommand("tableCellHorizontalAlign",{type:"dropdown",focus:!1,title:"Horizontal Align",options:{left:"Align Left",center:"Align Center",right:"Align Right",justify:"Align Justify"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=me.COMMANDS.tableCellHorizontalAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="tableCellHorizontalAlign" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.icon.create("align-".concat(a)),'<span class="fr-sr-only">').concat(this.language.translate(t[a]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.table.horizontalAlign(t)},refresh:function(e){var t=this.table.selectedCells(),a=this.$;t.length&&e.find("> *").first().replaceWith(this.icon.create("align-".concat(this.helpers.getAlignment(a(t[0])))))},refreshOnShow:function(e,t){t.find('.fr-command[data-param1="'+this.helpers.getAlignment(this.$el.find(".fr-selected-cell").first())+'"]').addClass("fr-active").attr("aria-selected",!0)}}),me.DefineIcon("tableCellStyle",{NAME:"magic",SVG_KEY:"cellStyle"}),me.RegisterCommand("tableCellStyle",{title:"Cell Style",type:"dropdown",focus:!1,html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.tableCellStyles;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCellStyle" data-param1="'.concat(a,'" title="').concat(this.language.translate(t[a]),'">').concat(this.language.translate(t[a]),"</a></li>"));return e+="</ul>"},callback:function(e,t){this.table.applyStyle(t,this.$el.find(".fr-selected-cell"),this.opts.tableCellMultipleStyles,this.opts.tableCellStyles)},refreshOnShow:function(e,t){var a=this.$,l=this.$el.find(".fr-selected-cell").first();l&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=l.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),me.RegisterCommand("tableCellBackgroundCustomColor",{title:"OK",undo:!0,callback:function(){this.table.customColor()}}),me.DefineIcon("tableColorRemove",{NAME:"eraser",SVG_KEY:"remove"})});
@@ -0,0 +1,7 @@
1
+ /*!
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
+ * License https://froala.com/wysiwyg-editor/terms/
4
+ * Copyright 2014-2021 Froala Labs
5
+ */
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(e){"use strict";(e=e&&e.hasOwnProperty("default")?e["default"]:e).PLUGINS.trimVideoPlugin=function(c){var o,d,s,l,u,m,f,v,r;function p(e){e.preventDefault(),null!=l&&l.abort(),l=null;var t=document.getElementById("videoTrimContainer");t.parentNode.removeChild(t),c.filesManager.setChildWindowState(!1)}function g(e){var t=parseInt(e,10),n=Math.floor(t/3600)?String(Math.floor(t/3600)):"00",a=Math.floor(t/60)%60?String(Math.floor(t/60)%60):"00",i=t%60?String(t%60):"00";return i=i.length<2?"0"+i:i,a=a.length<2?"0"+a:a,(n=n.length<2?"0"+n:n)+":"+a+":"+i}function y(e){e.preventDefault();var t=g(document.getElementById("startTime").value),n=g(document.getElementById("endTime").value);o.constructor===Blob&&(o=new File([o],o.name,{type:o.type||"",lastModified:o.lastModified}));var a=new FormData;a.append("startTime",t),a.append("endTime",n),a.append("file",o);var i=new XMLHttpRequest;document.getElementById("trim-file-loader").classList.add("fr-file-loader"),document.getElementsByClassName("fr-trim-button")[0].style.display="none",i.onload=function(){if(200==this.status){var e=new Blob([this.response],{type:this.response.type||""});e.name=o.name,e.lastModified=o.lastModified,e.lastModifiedDate=o.lastModifiedDate,r.set(d,e),c.filesManager.upload(e,[],null,d),document.getElementById("trim-file-loader").classList.remove("fr-file-loader"),document.getElementsByClassName("fr-trim-button")[0].style.display="block";var t=document.getElementById("videoTrimContainer");t.parentNode.removeChild(t),c.filesManager.setChildWindowState(!1)}},i.open("POST","http://localhost:3000/convert",!0),i.responseType="blob",(l=i).send(a)}return{_init:function e(){},trimVideo:function i(e,t,n){o=e,d=t,r=n,function a(){var e=URL.createObjectURL(o),t=c.o_doc.body,n=c.o_doc.createElement("div");n.setAttribute("id","videoTrimContainer"),n.style.cssText="position: fixed; top: 0;left: 0;padding: 0;overflow-y:auto;width: 100%;height: 100%;background: rgba(0,0,0,0.4);z-index: 9998;display:block",t.appendChild(n);var r=document.createElement("div");r.setAttribute("id","fr-form-container"),r.innerHTML='\n <h3 class="fr-trim-video-name"> '.concat(o.name.replace(/\.[^.]*$/,""),"</h3>\n <div style='display:block;text-align: center; margin-left:50%;' id='trim-file-loader'></div>\n <video id='fr-video-edit' controls>\n <source src=").concat(e," >\n Your browser does not support the video tag.\n </video> \n "),document.getElementById("videoTrimContainer").appendChild(r),document.getElementById("fr-video-edit").addEventListener("loadedmetadata",function(){s=document.getElementById("fr-video-edit").duration,r.innerHTML+=' \n \n <form>\n <center>\n <section class="fr-range-slider ">\n <div id="startTimeValue" class=" fr-range-value-start"> </div>\n <input type="range" class="fr-slider" value=\'0\' min="0" max='.concat(s,' id=\'startTime\' >\n <div id="endTimeValue" class="fr-range-value-end" ></div>\n <input type="range"class="fr-slider" value=').concat(s," min='0' max=").concat(s," id='endTime'>\n <div id=\"selectedRange\"style=\" pointer-events: none; position: absolute;left: 0;top: 12px;width: 100%;\n outline: none;\n height: 6px;\n border-radius: 10px;\"></div>\n </section>\n </center>\n <div class=\"fr-video-trim-buttons\" >\n <button id='convert' class='fr-trim-button'>").concat(c.language.translate("Trim"),"</button> \n <button id='cancel' class='fr-trim-button' onsubmit='cancel()'>").concat(c.language.translate("Cancel"),"</button>\n </div>\n </form>\n ");var t=document.getElementById("startTime"),e=document.getElementById("startTimeValue"),n=function n(){u=Number(100*(t.value-t.min)/(t.max-t.min)),m=10-.2*u,f=Number(100*(a.value-a.min)/(a.max-a.min)),v=10-.2*f,e.innerHTML="<span>".concat(g(t.value),"</span>"),e.style.left="calc(".concat(u,"% + (").concat(m,"px))"),selectedRange.style.left=e.style.left,selectedRange.style.width="calc((".concat(f,"% + (").concat(v,"px)) - (").concat(u,"% + (").concat(m,"px)))"),selectedRange.style.backgroundColor="#03A9F4"};document.addEventListener("DOMContentLoaded",n);var a=document.getElementById("endTime"),i=document.getElementById("endTimeValue"),o=function o(){u=Number(100*(t.value-t.min)/(t.max-t.min)),m=10-.2*u,f=Number(100*(a.value-a.min)/(a.max-a.min)),v=10-.2*f,i.innerHTML="<span>".concat(g(a.value),"</span>"),i.style.left="calc(".concat(f,"% + (").concat(v,"px))");var e=document.getElementById("selectedRange");e.style.left="calc(".concat(u,"% + (").concat(m,"px))"),e.style.width="calc((".concat(f,"% + (").concat(v,"px)) - (").concat(u,"% + (").concat(m,"px)))"),e.style.backgroundColor="#03A9F4"};document.addEventListener("DOMContentLoaded",o),document.getElementById("convert").addEventListener("click",y),document.getElementById("cancel").addEventListener("click",p);var d=document.getElementById("startTime"),l=document.getElementById("endTime");d.oninput=function(e){if(Number(d.value)>=Number(l.value))return e.preventDefault(),d.value=String(Number(l.value)-1),!1;n()},l.oninput=function(e){if(Number(l.value)<=Number(d.value))return e.preventDefault(),l.value=String(Number(d.value)+1),!1;o()}})}()}}}});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 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(r){"use strict";(r=r&&r.hasOwnProperty("default")?r["default"]:r).URLRegEx="(^| |\\u00A0)(".concat(r.LinkRegEx,"|([a-z0-9+-_.]{1,}@[a-z0-9+-_.]{1,}\\.[a-z0-9+-_]{1,}))$"),r.PLUGINS.url=function(i){var l=i.$,a=null;function t(e,t,n){for(var r="";n.length&&"."==n[n.length-1];)r+=".",n=n.substring(0,n.length-1);var o=n;if(i.opts.linkConvertEmailAddress)i.helpers.isEmail(o)&&!/^mailto:.*/i.test(o)&&(o="mailto:".concat(o));else if(i.helpers.isEmail(o))return t+n;return/^((http|https|ftp|ftps|mailto|tel|sms|notes|data)\:)/i.test(o)||(o="//".concat(o)),(t||"")+"<a".concat(i.opts.linkAlwaysBlank?' target="_blank"':"").concat(a?' rel="'.concat(a,'"'):"",' data-fr-linked="true" href="').concat(o,'">').concat(n.replace(/&amp;/g,"&").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"</a>").concat(r)}var s=function s(){return new RegExp(r.URLRegEx,"gi")};function p(e){return i.opts.linkAlwaysNoFollow&&(a="nofollow"),i.opts.linkAlwaysBlank&&(i.opts.linkNoOpener&&(a?a+=" noopener":a="noopener"),i.opts.linkNoReferrer&&(a?a+=" noreferrer":a="noreferrer")),e.replace(s(),t)}function c(e){var t=e.split(" ");return t[t.length-1]}function n(){var e=i.selection.ranges(0),t=e.startContainer;if(!t||t.nodeType!==Node.TEXT_NODE||e.startOffset!==(t.textContent||"").length)return!1;if(function a(e){return!!e&&("A"===e.tagName||!(!e.parentNode||e.parentNode==i.el)&&a(e.parentNode))}(t))return!1;if(s().test(c(t.textContent))){l(t).before(p(t.textContent));var n=l(t.parentNode).find("a[data-fr-linked]");n.removeAttr("data-fr-linked"),t.parentNode.removeChild(t),i.events.trigger("url.linked",[n.get(0)])}else if(t.textContent.split(" ").length<=2&&t.previousSibling&&"A"===t.previousSibling.tagName){var r=t.previousSibling.innerText+t.textContent;if(s().test(c(r))){var o=(new DOMParser).parseFromString(p(r),"text/html").body.childNodes;t.parentNode.replaceChild(o[0],t.previousSibling),o.length&&l(t).before(o[0]),t.parentNode.removeChild(t)}}}return{_init:function e(){i.events.on("keypress",function(e){!i.selection.isCollapsed()||"."!=e.key&&")"!=e.key&&"("!=e.key||n()},!0),i.events.on("keydown",function(e){var t=e.which;!i.selection.isCollapsed()||t!=r.KEYCODE.ENTER&&t!=r.KEYCODE.SPACE||n()},!0),i.events.on("paste.beforeCleanup",function(e){if(i.helpers.isURL(e)){var t=null;return i.opts.linkAlwaysBlank&&(i.opts.linkNoOpener&&(t?t+=" noopener":t="noopener"),i.opts.linkNoReferrer&&(t?t+=" noreferrer":t="noreferrer")),"<a".concat(i.opts.linkAlwaysBlank?' target="_blank"':"").concat(t?' rel="'.concat(t,'"'):"",' href="').concat(e,'" >').concat(e,"</a>")}})}}}});
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(r){"use strict";(r=r&&r.hasOwnProperty("default")?r["default"]:r).URLRegEx="(^| |\\u00A0)(".concat(r.LinkRegEx,"|([a-z0-9+-_.]{1,}@[a-z0-9+-_.]{1,}\\.[a-z0-9+-_]{1,}))$"),r.PLUGINS.url=function(i){var l=i.$,a=null;function t(e,t,n){for(var r="";n.length&&"."==n[n.length-1];)r+=".",n=n.substring(0,n.length-1);var o=n;if(i.opts.linkConvertEmailAddress)i.helpers.isEmail(o)&&!/^mailto:.*/i.test(o)&&(o="mailto:".concat(o));else if(i.helpers.isEmail(o))return t+n;return/^((http|https|ftp|ftps|mailto|tel|sms|notes|data)\:)/i.test(o)||(o="//".concat(o)),(t||"")+"<a".concat(i.opts.linkAlwaysBlank?' target="_blank"':"").concat(a?' rel="'.concat(a,'"'):"",' data-fr-linked="true" href="').concat(o,'">').concat(n.replace(/&amp;/g,"&").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"</a>").concat(r)}var s=function s(){return new RegExp(r.URLRegEx,"gi")};function p(e){return i.opts.linkAlwaysNoFollow&&(a="nofollow"),i.opts.linkAlwaysBlank&&(i.opts.linkNoOpener&&(a?a+=" noopener":a="noopener"),i.opts.linkNoReferrer&&(a?a+=" noreferrer":a="noreferrer")),e.replace(s(),t)}function c(e){var t=e.split(" ");return t[t.length-1]}function n(){var e=i.selection.ranges(0),t=e.startContainer;if(!t||t.nodeType!==Node.TEXT_NODE||e.startOffset!==(t.textContent||"").length)return!1;if(function a(e){return!!e&&("A"===e.tagName||!(!e.parentNode||e.parentNode==i.el)&&a(e.parentNode))}(t))return!1;if(s().test(c(t.textContent))){l(t).before(p(t.textContent));var n=l(t.parentNode).find("a[data-fr-linked]");n.removeAttr("data-fr-linked"),t.parentNode.removeChild(t),i.events.trigger("url.linked",[n.get(0)])}else if(t.textContent.split(" ").length<=2&&t.previousSibling&&"A"===t.previousSibling.tagName){var r=t.previousSibling.innerText+t.textContent;if(s().test(c(r))){var o=(new DOMParser).parseFromString(p(r),"text/html").body.childNodes;t.parentNode.replaceChild(o[0],t.previousSibling),o.length&&l(t).before(o[0]),t.parentNode.removeChild(t)}}}return{_init:function e(){i.events.on("keypress",function(e){!i.selection.isCollapsed()||")"!=e.key&&"("!=e.key||n()},!0),i.events.on("keydown",function(e){var t=e.which;!i.selection.isCollapsed()||t!=r.KEYCODE.ENTER&&t!=r.KEYCODE.SPACE||n()},!0),i.events.on("paste.beforeCleanup",function(e){if(i.helpers.isURL(e)){var t=null;return i.opts.linkAlwaysBlank&&(i.opts.linkNoOpener&&(t?t+=" noopener":t="noopener"),i.opts.linkNoReferrer&&(t?t+=" noreferrer":t="noreferrer")),"<a".concat(i.opts.linkAlwaysBlank?' target="_blank"':"").concat(t?' rel="'.concat(t,'"'):"",' href="').concat(e,'" >').concat(e,"</a>")}})}}}});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 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(ye){"use strict";ye=ye&&ye.hasOwnProperty("default")?ye["default"]:ye,Object.assign(ye.POPUP_TEMPLATES,{"video.insert":"[_BUTTONS_][_BY_URL_LAYER_][_EMBED_LAYER_][_UPLOAD_LAYER_][_PROGRESS_BAR_]","video.edit":"[_BUTTONS_]","video.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(ye.DEFAULTS,{videoAllowedTypes:["mp4","webm","ogg","mp3","mpeg","url"],videoAllowedProviders:[".*"],videoDefaultAlign:"center",videoDefaultDisplay:"block",videoDefaultWidth:600,videoEditButtons:["videoReplace","videoRemove","videoDisplay","videoAlign","videoSize","autoplay"],videoInsertButtons:["videoBack","|","videoByURL","videoEmbed","videoUpload"],videoMaxSize:52428800,videoMove:!0,videoResize:!0,videoResponsive:!1,videoSizeButtons:["videoBack","|"],videoSplitHTML:!1,videoTextNear:!0,videoUpload:!0,videoUploadMethod:"POST",videoUploadParam:"file",videoUploadParams:{},videoUploadToS3:!1,videoUploadToAzure:!1,videoUploadURL:null}),ye.VIDEO_PROVIDERS=[{test_regex:/^.*((youtu.be)|(youtube.com))\/((v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))?\??v?=?([^#\&\?]*).*/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=|embed\/)?([0-9a-zA-Z_\-]+)(.+)?/g,url_text:"https://www.youtube.com/embed/$1?$2",html:'<iframe width="640" height="360" src="{url}&wmode=opaque&rel=0" frameborder="0" allowfullscreen></iframe>',provider:"youtube"},{test_regex:/^.*(?:vimeo.com)\/(?:channels(\/\w+\/)?|groups\/*\/videos\/\u200b\d+\/|video\/|)(\d+)(?:$|\/|\?)/,url_regex:/(?:https?:\/\/)?(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^\/]*)\/videos\/|album\/(?:\d+)\/video\/|video\/|)(\d+)(?:[a-zA-Z0-9_\-]+)?(\/[a-zA-Z0-9_\-]+)?/i,url_text:"https://player.vimeo.com/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"vimeo"},{test_regex:/^.+(dailymotion.com|dai.ly)\/(video|hub)?\/?([^_]+)[^#]*(#video=([^_&]+))?/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:dailymotion\.com|dai\.ly)\/(?:video|hub)?\/?(.+)/g,url_text:"https://www.dailymotion.com/embed/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"dailymotion"},{test_regex:/^.+(screen.yahoo.com)\/[^_&]+/,url_regex:"",url_text:"",html:'<iframe width="640" height="360" src="{url}?format=embed" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',provider:"yahoo"},{test_regex:/^.+(rutube.ru)\/[^_&]+/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:rutube\.ru)\/(?:video)?\/?(.+)/g,url_text:"https://rutube.ru/play/embed/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',provider:"rutube"},{test_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/,url_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/g,url_text:"https://play.vidyard.com/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"vidyard"}],ye.VIDEO_EMBED_REGEX=/^\W*((<iframe(.|\n)*>(\s|\n)*<\/iframe>)|(<embed(.|\n)*>))\W*$/i,ye.PLUGINS.video=function(w){var s,f,p,E,i,o,A=w.$,C="https://i.froala.com/upload",v=2,c=3,u=4,S=5,U=6,r={};function g(){var e=w.popups.get("video.insert");e.find(".fr-video-by-url-layer input").val("").trigger("change");var t=e.find(".fr-video-embed-layer textarea");t.val("").trigger("change"),(t=e.find(".fr-video-upload-layer input")).val("").trigger("change")}function a(){var e=w.popups.get("video.edit");if(e||(e=function n(){var e="";if(0<w.opts.videoEditButtons.length){w.opts.videoResponsive&&(-1<w.opts.videoEditButtons.indexOf("videoSize")&&w.opts.videoEditButtons.splice(w.opts.videoEditButtons.indexOf("videoSize"),1),-1<w.opts.videoEditButtons.indexOf("videoDisplay")&&w.opts.videoEditButtons.splice(w.opts.videoEditButtons.indexOf("videoDisplay"),1),-1<w.opts.videoEditButtons.indexOf("videoAlign")&&w.opts.videoEditButtons.splice(w.opts.videoEditButtons.indexOf("videoAlign"),1));var t={buttons:e+='<div class="fr-buttons"> \n '.concat(w.button.buildList(w.opts.videoEditButtons)," \n </div>")},o=w.popups.create("video.edit",t);return w.events.$on(w.$wp,"scroll.video-edit",function(){E&&w.popups.isVisible("video.edit")&&(w.events.disableBlur(),y(E))}),o}return!1}()),e){w.popups.setContainer("video.edit",w.$sc),w.popups.refresh("video.edit");var t=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video")),o=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight(),r=t.get(0).src?t.get(0).src:null,a=!(!(r=(r=r.split("."))[r.length-1]).includes("pdf")&&!r.includes("txt"));t.hasClass("fr-file")||a||E.find("audio").get(0)?(document.getElementById("autoplay-".concat(w.id))&&(document.getElementById("autoplay-".concat(w.id)).style.display="none"),document.getElementById("videoReplace-".concat(w.id))&&(document.getElementById("videoReplace-".concat(w.id)).style.display="none")):(document.getElementById("autoplay-".concat(w.id)).style.display="",document.getElementById("videoReplace-".concat(w.id)).style.display=""),w.popups.show("video.edit",o,i,t.outerHeight(),!0)}}function n(e){if(e)return w.popups.onRefresh("video.insert",g),w.popups.onHide("video.insert",q),!0;var t="";w.opts.videoUpload||-1===w.opts.videoInsertButtons.indexOf("videoUpload")||w.opts.videoInsertButtons.splice(w.opts.videoInsertButtons.indexOf("videoUpload"),1);var o=w.button.buildList(w.opts.videoInsertButtons);""!==o&&(t='<div class="fr-buttons">'+o+"</div>");var i,r="",a=w.opts.videoInsertButtons.indexOf("videoUpload"),n=w.opts.videoInsertButtons.indexOf("videoByURL"),s=w.opts.videoInsertButtons.indexOf("videoEmbed");if(0<=n){i=" fr-active",(a<n&&0<=a||s<n&&0<=s)&&(i="");r='<div class="fr-video-by-url-layer fr-layer'.concat(i,'" id="fr-video-by-url-layer-').concat(w.id,'"><div class="fr-input-line"><input id="fr-video-by-url-layer-text-').concat(w.id,'" type="text" placeholder="').concat(w.language.translate("Paste in a video URL"),'" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><span style=\'float:left\'><div class="fr-checkbox-line fr-autoplay-margin"><span class="fr-checkbox"> <input id=\'videoPluginAutoplay\' data-checked="_blank" type="checkbox"> <span>').concat('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 32 32"><path d="M27 4l-15 15-7-7-5 5 12 12 20-20z" fill="#FFF"></path></svg>','</span></span> <label id="fr-label-target-').concat(w.id,'">Autoplay</label></div> </span><button type="button" class="fr-command fr-submit" data-cmd="videoInsertByURL" tabIndex="2" role="button">').concat(w.language.translate("Insert"),"</button></div></div>")}var d="";0<=s&&(i=" fr-active",(a<s&&0<=a||n<s&&0<=n)&&(i=""),d='<div class="fr-video-embed-layer fr-layer'.concat(i,'" id="fr-video-embed-layer-').concat(w.id,'"><div class="fr-input-line"><textarea id="fr-video-embed-layer-text').concat(w.id,'" type="text" placeholder="').concat(w.language.translate("Embedded Code"),'" tabIndex="1" aria-required="true" rows="5"></textarea></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoInsertEmbed" tabIndex="2" role="button">').concat(w.language.translate("Insert"),"</button></div></div>"));var l="";0<=a&&(i=" fr-active",(s<a&&0<=s||n<a&&0<=n)&&(i=""),l='<div class="fr-video-upload-layer fr-layer'.concat(i,'" id="fr-video-upload-layer-').concat(w.id,'"><strong>').concat(w.language.translate("Drop video"),"</strong><br>(").concat(w.language.translate("or click"),')<div class="fr-form"><input type="file" accept="video/').concat(w.opts.videoAllowedTypes.join(", video/").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-video-upload-layer-').concat(w.id,'" role="button"></div></div>'));var f={buttons:t,by_url_layer:r,embed_layer:d,upload_layer:l,progress_bar:'<div class="fr-video-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="videoDismissError" tabIndex="2" role="button">OK</button></div></div>'},p=w.popups.create("video.insert",f);return function v(i){w.events.$on(i,"dragover dragenter",".fr-video-upload-layer",function(){return A(this).addClass("fr-drop"),!1},!0),w.events.$on(i,"dragleave dragend",".fr-video-upload-layer",function(){return A(this).removeClass("fr-drop"),!1},!0),w.events.$on(i,"drop",".fr-video-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),A(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var o=i.data("instance")||w;o.events.disableBlur(),o.video.upload(t.files),o.events.enableBlur()}},!0),w.helpers.isIOS()&&w.events.$on(i,"touchstart",'.fr-video-upload-layer input[type="file"]',function(){A(this).trigger("click")},!0);w.events.$on(i,"change",'.fr-video-upload-layer input[type="file"]',function(){if(this.files){var e=i.data("instance")||w;e.events.disableBlur(),i.find("input:focus").blur(),e.events.enableBlur(),e.video.upload(this.files)}A(this).val("")},!0)}(p),p}function d(e){w.events.focus(!0),w.selection.restore();var t=!1;E&&(W(),t=!0),w.html.insert('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">'.concat(e,"</span>"),!1,w.opts.videoSplitHTML),w.popups.hide("video.insert");var o=w.$el.find(".fr-jiv");o.removeClass("fr-jiv"),o.toggleClass("fr-rv",w.opts.videoResponsive),J(o,w.opts.videoDefaultDisplay,w.opts.videoDefaultAlign),o.toggleClass("fr-draggable",w.opts.videoMove),w.events.trigger(t?"video.replaced":"video.inserted",[o])}function h(){var e=A(this);w.popups.hide("video.insert"),e.removeClass("fr-uploading"),e.parent().next().is("br")&&e.parent().next().remove(),y(e.parent()),w.events.trigger("video.loaded",[e.parent()])}function x(s,e,l,f,p){w.edit.off(),m("Loading video"),e&&(s=w.helpers.sanitizeURL(s));var v=function v(){var e,t;if(f){w.undo.canDo()||f.find("video").hasClass("fr-uploading")||w.undo.saveStep();var o=f.find("video").data("fr-old-src"),i=f.data("fr-replaced");f.data("fr-replaced",!1),w.$wp?((e=f.clone(!0)).find("video").removeData("fr-old-src").removeClass("fr-uploading"),e.find("video").off("canplay"),o&&f.find("video").attr("src",o),f.replaceWith(e)):e=f;for(var r=e.find("video").get(0).attributes,a=0;a<r.length;a++){var n=r[a];0===n.nodeName.indexOf("data-")&&e.find("video").removeAttr(n.nodeName)}if(void 0!==l)for(t in l)l.hasOwnProperty(t)&&"link"!=t&&e.find("video").attr("data-".concat(t),l[t]);e.find("video").on("canplay",h),e.find("video").attr("src",s),w.edit.on(),L(),w.undo.saveStep(),w.$el.blur(),w.events.trigger(i?"video.replaced":"video.inserted",[e,p])}else e=function d(e,t,o){var i,r="";if(t&&void 0!==t)for(i in t)t.hasOwnProperty(i)&&"link"!=i&&(r+=" data-".concat(i,'="').concat(t[i],'"'));var a=w.opts.videoDefaultWidth;a&&"auto"!=a&&(a="".concat(a,"px"));var n=A(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+w.opts.videoDefaultDisplay[0]+("center"!=w.opts.videoDefaultAlign?" fr-fv"+w.opts.videoDefaultAlign[0]:"")).html('<video src="'+e+'" '+r+(a?' style="width: '+a+';" ':"")+" controls>"+w.language.translate("Your browser does not support HTML5 video.")+"</video>");n.toggleClass("fr-draggable",w.opts.videoMove),w.edit.on(),w.events.focus(!0),w.selection.restore(),w.undo.saveStep(),w.opts.videoSplitHTML?w.markers.split():w.markers.insert();w.html.wrap();var s=w.$el.find(".fr-marker");w.node.isLastSibling(s)&&s.parent().hasClass("fr-deletable")&&s.insertAfter(s.parent());s.replaceWith(n),w.selection.clear(),n.find("video").get(0).readyState>n.find("video").get(0).HAVE_FUTURE_DATA||w.helpers.isIOS()?o.call(n.find("video").get(0)):n.find("video").on("canplaythrough load",o);return n}(s,l,h),L(),w.undo.saveStep(),w.events.trigger("video.inserted",[e,p])};R("Loading video"),v()}function R(e){var t=w.popups.get("video.insert");if(t||(t=n()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-video-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),E){var o=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video"));w.popups.setContainer("video.insert",w.$sc);var i=o.offset().left,r=o.offset().top+o.height();w.popups.show("video.insert",i,r,o.outerHeight())}void 0===e&&m(w.language.translate("Uploading"),0)}function l(e){var t=w.popups.get("video.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-video-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||w.$el.find("video.fr-error").length)){if(w.events.focus(),w.$el.find("video.fr-error").length&&(w.$el.find("video.fr-error").parent().remove(),w.undo.saveStep(),w.undo.run(),w.undo.dropRedo()),!w.$wp&&E){var o=E;M(!0),w.selection.setAfter(o.find("video").get(0)),w.selection.restore()}w.popups.hide("video.insert")}}function m(e,t){var o=w.popups.get("video.insert");if(o){var i=o.find(".fr-video-progress-bar-layer");i.find("h3").text(e+(t?" ".concat(t,"%"):"")),i.removeClass("fr-error"),t?(i.find("div").removeClass("fr-indeterminate"),i.find("div > span").css("width","".concat(t,"%"))):i.find("div").addClass("fr-indeterminate")}}function b(e){R();var t=w.popups.get("video.insert").find(".fr-video-progress-bar-layer");t.addClass("fr-error");var o=t.find("h3");o.text(e),w.events.disableBlur(),o.focus()}function y(e){t.call(e.get(0))}function _(e,t,o){m("Loading video");var i=this.status,r=this.response,a=this.responseXML,n=this.responseText;try{if(w.opts.videoUploadToS3||w.opts.videoUploadToAzure)if(201==i){var s;if(w.opts.videoUploadToAzure){if(!1===w.events.trigger("video.uploadedToAzure",[this.responseURL,o,r],!0))return w.edit.on(),!1;s=t}else s=function l(e){try{var t=A(e).find("Location").text(),o=A(e).find("Key").text();return!1===w.events.trigger("video.uploadedToS3",[t,o,e],!0)?(w.edit.on(),!1):t}catch(i){return K(u,e),!1}}(a);s&&x(s,!1,[],e,r||a)}else K(u,r||a);else if(200<=i&&i<300){var d=function f(e){try{if(!1===w.events.trigger("video.uploaded",[e],!0))return w.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(K(v,e),!1)}catch(o){return K(u,e),!1}}(n);d&&x(d.link,!1,d,e,r||n)}else K(c,r||n)}catch(p){K(u,r||n)}}function B(){K(u,this.response||this.responseText||this.responseXML)}function D(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;m(w.language.translate("Uploading"),t)}}function T(){w.edit.on(),l(!0)}function I(e){if(!w.core.sameInstance(p))return!0;e.preventDefault(),e.stopPropagation();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),o=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!o)return!1;if("mousedown"==e.type){var i=w.$oel.get(0).ownerDocument,r=i.defaultView||i.parentWindow,a=!1;try{a=r.location!=r.parent.location&&!(r.$&&r.$.FE)}catch(n){}a&&r.frameElement&&(t+=w.helpers.getPX(A(r.frameElement).offset().left)+r.frameElement.clientLeft,o=e.clientY+w.helpers.getPX(A(r.frameElement).offset().top)+r.frameElement.clientTop)}w.undo.canDo()||w.undo.saveStep(),(f=A(this)).data("start-x",t),f.data("start-y",o),s.show(),w.popups.hideAll(),Y()}function k(e){if(!w.core.sameInstance(p))return!0;if(f){e.preventDefault();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),o=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!o)return!1;var i=f.data("start-x"),r=f.data("start-y");f.data("start-x",t),f.data("start-y",o);var a=t-i,n=o-r,s=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video")),d=s.width(),l=s.height();(f.hasClass("fr-hnw")||f.hasClass("fr-hsw"))&&(a=0-a),(f.hasClass("fr-hnw")||f.hasClass("fr-hne"))&&(n=0-n),s.css("width",d+a),s.css("height",l+n),s.removeAttr("width"),s.removeAttr("height"),O()}}function z(e){if(!w.core.sameInstance(p))return!0;f&&E&&(e&&e.stopPropagation(),f=null,s.hide(),O(),a(),w.undo.saveStep())}function P(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function $(e,t,o,i){return e.pageX=t,e.pageY=t,I.call(this,e),e.pageX=e.pageX+o*Math.floor(Math.pow(1.1,i)),e.pageY=e.pageY+o*Math.floor(Math.pow(1.1,i)),k.call(this,e),z.call(this,e),++i}function L(){var e,t=Array.prototype.slice.call(w.el.querySelectorAll("video, .fr-video > *")),o=[];for(e=0;e<t.length;e++)o.push(t[e].getAttribute("src")),A(t[e]).toggleClass("fr-draggable",w.opts.videoMove),""===t[e].getAttribute("class")&&t[e].removeAttribute("class"),""===t[e].getAttribute("style")&&t[e].removeAttribute("style");if(i)for(e=0;e<i.length;e++)o.indexOf(i[e].getAttribute("src"))<0&&w.events.trigger("video.removed",[A(i[e])]);i=t}function O(){p||function n(){var e;if(w.shared.$video_resizer?(p=w.shared.$video_resizer,s=w.shared.$vid_overlay,w.events.on("destroy",function(){A("body").first().append(p.removeClass("fr-active"))},!0)):(w.shared.$video_resizer=A(document.createElement("div")).attr("class","fr-video-resizer"),p=w.shared.$video_resizer,w.events.$on(p,"mousedown",function(e){e.stopPropagation()},!0),w.opts.videoResize&&(p.append(P("nw")+P("ne")+P("sw")+P("se")),w.shared.$vid_overlay=A(document.createElement("div")).attr("class","fr-video-overlay"),s=w.shared.$vid_overlay,e=p.get(0).ownerDocument,A(e).find("body").first().append(s))),w.events.on("shared.destroy",function(){p.html("").removeData().remove(),p=null,w.opts.videoResize&&(s.remove(),s=null)},!0),w.helpers.isMobile()||w.events.$on(A(w.o_win),"resize.video",function(){M(!0)}),w.opts.videoResize){e=p.get(0).ownerDocument,w.events.$on(p,w._mousedown,".fr-handler",I),w.events.$on(A(e),w._mousemove,k),w.events.$on(A(e.defaultView||e.parentWindow),w._mouseup,z),w.events.$on(s,"mouseleave",z);var i=1,r=null,a=0;w.events.on("keydown",function(e){if(E){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,o=e.which;(o!==r||200<e.timeStamp-a)&&(i=1),(o==ye.KEYCODE.EQUALS||w.browser.mozilla&&o==ye.KEYCODE.FF_EQUALS)&&t&&!e.altKey?i=$.call(this,e,1,1,i):(o==ye.KEYCODE.HYPHEN||w.browser.mozilla&&o==ye.KEYCODE.FF_HYPHEN)&&t&&!e.altKey&&(i=$.call(this,e,2,-1,i)),r=o,a=e.timeStamp}}),w.events.on("keyup",function(){i=1})}}(),(w.$wp||w.$sc).append(p),p.data("instance",w);var e=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video")),t=0,o=0;w.opts.iframe&&(o=w.helpers.getPX(w.$wp.find(".fr-iframe").css("padding-top")),t=w.helpers.getPX(w.$wp.find(".fr-iframe").css("padding-left"))),p.css("top",(w.opts.iframe?e.offset().top+o-1:e.offset().top-w.$wp.offset().top-1)+w.$wp.scrollTop()).css("left",(w.opts.iframe?e.offset().left+t-1:e.offset().left-w.$wp.offset().left-1)+w.$wp.scrollLeft()).css("width",e.get(0).getBoundingClientRect().width).css("height",e.get(0).getBoundingClientRect().height).addClass("fr-active")}function t(e){if(e&&"touchend"==e.type&&o)return!0;if(e&&w.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;if(w.edit.isDisabled())return!1;for(var t=0;t<ye.INSTANCES.length;t++)ye.INSTANCES[t]!=w&&ye.INSTANCES[t].events.trigger("video.hideResizer");w.toolbar.disable(),w.helpers.isMobile()&&(w.events.disableBlur(),w.$el.blur(),w.events.enableBlur()),w.$el.find(".fr-video.fr-active").removeClass("fr-active"),(E=A(this)).addClass("fr-active"),w.opts.iframe&&w.size.syncIframe(),ee(),O(),a(),w.selection.clear(),w.button.bulkRefresh(),w.events.trigger("image.hideResizer")}function M(e){E&&(function t(){return w.shared.vid_exit_flag}()||!0===e)&&(p.removeClass("fr-active"),w.toolbar.enable(),E.removeClass("fr-active"),E=null,Y())}function V(){w.shared.vid_exit_flag=!0}function Y(){w.shared.vid_exit_flag=!1}function N(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var o=t.files[0];if(o&&o.type&&-1!==o.type.indexOf("video")){if(!w.opts.videoUpload)return e.preventDefault(),e.stopPropagation(),!1;w.markers.remove(),w.markers.insertAtPoint(e.originalEvent),w.$el.find(".fr-marker").replaceWith(ye.MARKERS),w.popups.hideAll();var i=w.popups.get("video.insert");return i||(i=n()),w.popups.setContainer("video.insert",w.$sc),w.popups.show("video.insert",e.originalEvent.pageX,e.originalEvent.pageY),R(),0<=w.opts.videoAllowedTypes.indexOf(o.type.replace(/video\//g,""))?H(t.files):K(U),e.preventDefault(),e.stopPropagation(),!1}}}function H(e){if(void 0!==e&&0<e.length){if(!1===w.events.trigger("video.beforeUpload",[e]))return!1;var t,o=e[0];if(!(null!==w.opts.videoUploadURL&&w.opts.videoUploadURL!=C||w.opts.videoUploadToS3||w.opts.videoUploadToAzure))return function y(i){E&&E.find("iframe")&&E.find("iframe").length&&W();var r=new FileReader;r.onload=function(){r.result;for(var e=atob(r.result.split(",")[1]),t=[],o=0;o<e.length;o++)t.push(e.charCodeAt(o));x(window.URL.createObjectURL(new Blob([new Uint8Array(t)],{type:i.type})),!1,null,E)},R(),r.readAsDataURL(i)}(o),!1;if(o.size>w.opts.videoMaxSize)return K(S),!1;if(w.opts.videoAllowedTypes.indexOf(o.type.replace(/video\//g,""))<0)return K(U),!1;if(w.drag_support.formdata&&(t=w.drag_support.formdata?new FormData:null),t){var i;if(!1!==w.opts.videoUploadToS3)for(i in t.append("key",w.opts.videoUploadToS3.keyStart+(new Date).getTime()+"-"+(o.name||"untitled")),t.append("success_action_status","201"),t.append("X-Requested-With","xhr"),t.append("Content-Type",o.type),w.opts.videoUploadToS3.params)w.opts.videoUploadToS3.params.hasOwnProperty(i)&&t.append(i,w.opts.videoUploadToS3.params[i]);for(i in w.opts.videoUploadParams)w.opts.videoUploadParams.hasOwnProperty(i)&&t.append(i,w.opts.videoUploadParams[i]);t.append(w.opts.videoUploadParam,o);var r,a,n=w.opts.videoUploadURL;w.opts.videoUploadToS3&&(n=w.opts.videoUploadToS3.uploadURL?w.opts.videoUploadToS3.uploadURL:"https://".concat(w.opts.videoUploadToS3.region,".amazonaws.com/").concat(w.opts.videoUploadToS3.bucket));var s=w.opts.videoUploadMethod;w.opts.videoUploadToAzure&&(n=w.opts.videoUploadToAzure.uploadURL?"".concat(w.opts.videoUploadToAzure.uploadURL,"/").concat(o.name):encodeURI("https://".concat(w.opts.videoUploadToAzure.account,".blob.core.windows.net/").concat(w.opts.videoUploadToAzure.container,"/").concat(o.name)),r=n,w.opts.videoUploadToAzure.SASToken&&(n+=w.opts.videoUploadToAzure.SASToken),s="PUT");var d=w.core.getXHR(n,s);if(w.opts.videoUploadToAzure){var l=(new Date).toUTCString();if(!w.opts.videoUploadToAzure.SASToken&&w.opts.videoUploadToAzure.accessKey){var f=w.opts.videoUploadToAzure.account,p=w.opts.videoUploadToAzure.container;if(w.opts.videoUploadToAzure.uploadURL){var v=w.opts.videoUploadToAzure.uploadURL.split("/");p=v.pop(),f=v.pop().split(".")[0]}var c="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(l,"\nx-ms-version:2019-07-07"),u=encodeURI("/"+f+"/"+p+"/"+o.name),g=s+"\n\n\n"+o.size+"\n\n"+o.type+"\n\n\n\n\n\n\n"+c+"\n"+u,h=w.cryptoJSPlugin.cryptoJS.HmacSHA256(g,w.cryptoJSPlugin.cryptoJS.enc.Base64.parse(w.opts.videoUploadToAzure.accessKey)).toString(w.cryptoJSPlugin.cryptoJS.enc.Base64),m="SharedKey "+f+":"+h;a=h,d.setRequestHeader("Authorization",m)}for(i in d.setRequestHeader("x-ms-version","2019-07-07"),d.setRequestHeader("x-ms-date",l),d.setRequestHeader("Content-Type",o.type),d.setRequestHeader("x-ms-blob-type","BlockBlob"),w.opts.videoUploadParams)w.opts.videoUploadParams.hasOwnProperty(i)&&d.setRequestHeader(i,w.opts.videoUploadParams[i]);for(i in w.opts.videoUploadToAzure.params)w.opts.videoUploadToAzure.params.hasOwnProperty(i)&&d.setRequestHeader(i,w.opts.videoUploadToAzure.params[i])}d.onload=function(){_.call(d,E,r,a)},d.onerror=B,d.upload.onprogress=D,d.onabort=T,R(),w.events.disableBlur(),w.edit.off(),w.events.enableBlur();var b=w.popups.get("video.insert");b&&A(b.off("abortUpload")).on("abortUpload",function(){4!=d.readyState&&d.abort()}),d.send(w.opts.videoUploadToAzure?o:t)}}}function K(e,t){w.edit.on(),E&&E.find("video").addClass("fr-error"),b(w.language.translate("Something went wrong. Please try again.")),w.events.trigger("video.error",[{code:e,message:r[e]},t])}function F(){if(E){var e=w.popups.get("video.size"),t=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video"));e.find('input[name="width"]').val(t.get(0).style.width||t.attr("width")).trigger("change"),e.find('input[name="height"]').val(t.get(0).style.height||t.attr("height")).trigger("change")}}function X(e){if(e)return w.popups.onRefresh("video.size",F),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(w.button.buildList(w.opts.videoSizeButtons),"</div>"),size_layer:'<div class="fr-video-size-layer fr-layer fr-active" id="fr-video-size-layer-'.concat(w.id,'"><div class="fr-video-group"><div class="fr-input-line"><input id="fr-video-size-layer-width-').concat(w.id,'" type="text" name="width" placeholder="').concat(w.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-video-size-layer-height-').concat(w.id,'" type="text" name="height" placeholder="').concat(w.language.translate("Height"),'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoSetSize" tabIndex="2" role="button">').concat(w.language.translate("Update"),"</button></div></div>")},o=w.popups.create("video.size",t);return w.events.$on(w.$wp,"scroll",function(){E&&w.popups.isVisible("video.size")&&(w.events.disableBlur(),y(E))}),o}function G(e){if(void 0===e&&(e=E),e){if(e.hasClass("fr-fvl"))return"left";if(e.hasClass("fr-fvr"))return"right";if(e.hasClass("fr-dvb")||e.hasClass("fr-dvi"))return"center";if("block"==e.css("display")){if("left"==e.css("text-algin"))return"left";if("right"==e.css("text-align"))return"right"}else{if("left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function j(e){void 0===e&&(e=E);var t=e.css("float");return e.css("float","none"),"block"==e.css("display")?(e.css("float",""),e.css("float")!=t&&e.css("float",t),"block"):(e.css("float",""),e.css("float")!=t&&e.css("float",t),"inline")}function W(){if(E&&!1!==w.events.trigger("video.beforeRemove",[E])){var e=E;w.popups.hideAll(),M(!0),w.selection.setBefore(e.get(0))||w.selection.setAfter(e.get(0)),e.remove(),w.selection.restore(),w.html.fillEmptyBlocks()}}function q(){l()}function J(e,t,o){!w.opts.htmlUntouched&&w.opts.useClasses?(e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),e.addClass("fr-fv".concat(o[0]," fr-dv").concat(t[0]))):"inline"==t?(e.css({display:"inline-block"}),"center"==o?e.css({"float":"none"}):"left"==o?e.css({"float":"left"}):e.css({"float":"right"})):(e.css({display:"block",clear:"both"}),"left"==o?e.css({textAlign:"left"}):"right"==o?e.css({textAlign:"right"}):e.css({textAlign:"center"}))}function Z(){var e=w.$el.find("video").filter(function(){return 0===A(this).parents("span.fr-video").length});if(0!=e.length){e.wrap(A(document.createElement("span")).attr("class","fr-video fr-deletable").attr("contenteditable","false")),w.$el.find("embed, iframe").filter(function(){if(w.browser.safari&&this.getAttribute("src")&&this.setAttribute("src",this.src),0<A(this).parents("span.fr-video").length)return!1;for(var e=A(this).attr("src"),t=0;t<ye.VIDEO_PROVIDERS.length;t++){var o=ye.VIDEO_PROVIDERS[t];if(o.test_regex.test(e)&&new RegExp(w.opts.videoAllowedProviders.join("|")).test(o.provider))return!0}return!1}).map(function(){return 0===A(this).parents("object").length?this:A(this).parents("object").get(0)}).wrap(A(document.createElement("span")).attr("class","fr-video").attr("contenteditable","false"));for(var t,o,i,r,a=w.$el.find("span.fr-video, video"),n=0;n<a.length;n++){var s=A(a[n]);!w.opts.htmlUntouched&&w.opts.useClasses?((r=s).hasClass("fr-dvi")||r.hasClass("fr-dvb")||(r.addClass("fr-fv".concat(G(r)[0])),r.addClass("fr-dv".concat(j(r)[0]))),w.opts.videoTextNear||s.removeClass("fr-dvi").addClass("fr-dvb")):w.opts.htmlUntouched||w.opts.useClasses||(void 0,o=(t=s).hasClass("fr-dvb")?"block":t.hasClass("fr-dvi")?"inline":null,i=t.hasClass("fr-fvl")?"left":t.hasClass("fr-fvr")?"right":G(t),J(t,o,i),t.removeClass("fr-dvb fr-dvi fr-fvr fr-fvl"))}a.toggleClass("fr-draggable",w.opts.videoMove)}}function Q(e){document.getElementById("autoplay-".concat(w.id)).style.cssText="background:".concat(e)}function ee(){if(E){w.selection.clear();var e=w.doc.createRange();e.selectNode(E.get(0)),w.selection.get().addRange(e)}}return r[1]="Video cannot be loaded from the passed link.",r[v]="No link in upload response.",r[c]="Error during file upload.",r[u]="Parsing response failed.",r[S]="File is too large.",r[U]="Video file type is invalid.",r[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",w.shared.vid_exit_flag=!1,{_init:function te(){w.opts.videoResponsive&&(w.opts.videoResize=!1),function e(){w.events.on("drop",N,!0),w.events.on("mousedown window.mousedown",V),w.events.on("window.touchmove",Y),w.events.on("mouseup window.mouseup",M),w.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&M()}),w.events.on("video.hideResizer commands.undo commands.redo element.dropped",function(){M(!0)})}(),w.helpers.isMobile()&&(w.events.$on(w.$el,"touchstart","span.fr-video",function(){o=!1}),w.events.$on(w.$el,"touchmove",function(){o=!0})),w.events.on("html.set",Z),Z(),w.events.$on(w.$el,"mousedown","span.fr-video",function(e){e.stopPropagation(),(w.browser.msie||w.browser.edge)&&(e.target.innerText||(e.target.dragDrop(),t.call(this,e)))}),w.events.$on(w.$el,"click touchend","span.fr-video",function(e){if(e.target.innerText.length||"false"==A(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t.call(this,e)}),w.events.on("keydown",function(e){var t=e.which;return!E||t!=ye.KEYCODE.BACKSPACE&&t!=ye.KEYCODE.DELETE?E&&t==ye.KEYCODE.ESC?(M(!0),e.preventDefault(),!1):E&&t!=ye.KEYCODE.F10&&!w.keys.isBrowserAction(e)?(e.preventDefault(),!1):void 0:(e.preventDefault(),W(),w.undo.saveStep(),!1)},!0),w.events.on("toolbar.esc",function(){if(E)return w.events.disableBlur(),w.events.focus(),!1},!0),w.events.on("toolbar.focusEditor",function(){if(E)return!1},!0),w.events.on("keydown",function(){w.$el.find("span.fr-video:empty").remove()}),w.$wp&&(L(),w.events.on("contentChanged",L)),n(!0),X(!0)},showInsertPopup:function oe(){var e=w.$tb.find('.fr-command[data-cmd="insertVideo"]'),t=w.popups.get("video.insert");if(t||(t=n()),l(),!t.hasClass("fr-active"))if(w.popups.refresh("video.insert"),w.popups.setContainer("video.insert",w.$tb),e.isVisible()){var o=w.button.getPosition(e),i=o.left,r=o.top;w.popups.show("video.insert",i,r,e.outerHeight())}else w.position.forSelection(t),w.popups.show("video.insert")},showLayer:function ie(e){var t,o,i=w.popups.get("video.insert");if(!E&&!w.opts.toolbarInline){var r=w.$tb.find('.fr-command[data-cmd="insertVideo"]');t=r.offset().left,o=r.offset().top+(w.opts.toolbarBottom?10:r.outerHeight()-10)}w.opts.toolbarInline&&(o=i.offset().top-w.helpers.getPX(i.css("margin-top")),i.hasClass("fr-above")&&(o+=i.outerHeight())),i.find(".fr-layer").removeClass("fr-active"),i.find(".fr-".concat(e,"-layer")).addClass("fr-active"),w.popups.show("video.insert",t,o,0),w.accessibility.focusPopup(i)},refreshByURLButton:function re(e){var t=w.popups.get("video.insert");t&&t.find(".fr-video-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshEmbedButton:function ae(e){var t=w.popups.get("video.insert");t&&t.find(".fr-video-embed-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshUploadButton:function ne(e){var t=w.popups.get("video.insert");t&&t.find(".fr-video-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:H,insertByURL:function se(e){var t=!!document.getElementById("videoPluginAutoplay")&&document.getElementById("videoPluginAutoplay").checked;void 0===e&&(e=(w.popups.get("video.insert").find('.fr-video-by-url-layer input[type="text"]').val()||"").trim());var o=null;if(/^http/.test(e)||(e="https://".concat(e)),w.helpers.isURL(e))for(var i=0;i<ye.VIDEO_PROVIDERS.length;i++){var r=ye.VIDEO_PROVIDERS[i],a="autoplay=1";if(r.html.includes("autoplay=1")&&document.getElementById("videoPluginAutoplay").checked)r.html=r.html,document.getElementById("videoPluginAutoplay").checked=!1;else if(t){var n=r.html.indexOf("{url}")+5;r.html=[r.html.slice(0,n),a,r.html.slice(n)].join(""),t=!1,document.getElementById("videoPluginAutoplay").checked=!1}else(r=ye.VIDEO_PROVIDERS[i]).html=r.html.replace(a,"");if(r.test_regex.test(e)&&new RegExp(w.opts.videoAllowedProviders.join("|")).test(r.provider)){o=e.replace(r.url_regex,r.url_text),o=r.html.replace(/\{url\}/,o);break}}o?d(o):(b(w.language.translate("Something went wrong. Please try again.")),w.events.trigger("video.linkError",[e]))},insertEmbed:function de(e){void 0===e&&(e=w.popups.get("video.insert").find(".fr-video-embed-layer textarea").val()||""),0!==e.length&&ye.VIDEO_EMBED_REGEX.test(e)?d(e):(b(w.language.translate("Something went wrong. Please try again.")),w.events.trigger("video.codeError",[e]))},insert:d,align:function le(e){E.removeClass("fr-fvr fr-fvl"),!w.opts.htmlUntouched&&w.opts.useClasses?"left"==e?E.addClass("fr-fvl"):"right"==e&&E.addClass("fr-fvr"):J(E,j(),e),ee(),O(),a(),w.selection.clear()},refreshAlign:function fe(e){if(!E)return!1;e.find(">*").first().replaceWith(w.icon.create("video-align-".concat(G())))},refreshAlignOnShow:function pe(e,t){E&&t.find('.fr-command[data-param1="'.concat(G(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function ve(e){E.removeClass("fr-dvi fr-dvb"),!w.opts.htmlUntouched&&w.opts.useClasses?"inline"==e?E.addClass("fr-dvi"):"block"==e&&E.addClass("fr-dvb"):J(E,e,G()),ee(),O(),a(),w.selection.clear()},refreshDisplayOnShow:function ce(e,t){E&&t.find('.fr-command[data-param1="'.concat(j(),'"]')).addClass("fr-active").attr("aria-selected",!0)},remove:W,hideProgressBar:l,showSizePopup:function ue(){var e=w.popups.get("video.size");e||(e=X()),l(),w.popups.refresh("video.size"),w.popups.setContainer("video.size",w.$sc);var t=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video")),o=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.height();w.popups.show("video.size",o,i,t.height(),!0)},replace:function ge(){var e=w.popups.get("video.insert");e||(e=n()),w.popups.isVisible("video.insert")||(l(),w.popups.refresh("video.insert"),w.popups.setContainer("video.insert",w.$sc));var t=E.offset().left+E.outerWidth()/2,o=E.offset().top+E.height();w.popups.show("video.insert",t,o,E.outerHeight(),!0)},back:function e(){E?(w.events.disableBlur(),E[0].click()):(w.events.disableBlur(),w.selection.restore(),w.events.enableBlur(),w.popups.hide("video.insert"),w.toolbar.showInline())},setSize:function he(e,t){if(E){var o=w.popups.get("video.size"),i=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video"));i.css("width",e||o.find('input[name="width"]').val()),i.css("height",t||o.find('input[name="height"]').val()),i.get(0).style.width&&i.removeAttr("width"),i.get(0).style.height&&i.removeAttr("height"),o.find("input:focus").blur(),setTimeout(function(){E.trigger("click")},w.helpers.isAndroid()?50:0)}},get:function me(){return E},showProgressBar:R,_editVideo:y,setAutoplay:function be(){var e;if(E.find("iframe, embed, audio").get(0))(e=E.find("iframe, embed, audio")).get(0).src.includes("autoplay=1")?(Q("#FFFFFF"),e.get(0).src=e.get(0).src.replace("&autoplay=1","")):(Q("#D6D6D6"),e.get(0).src=e.get(0).src+"&autoplay=1");else if((e=E.find("iframe, embed, video")).get(0).outerHTML.includes("autoplay"))Q("#FFFFFF"),e.get(0).outerHTML=e.get(0).outerHTML.replace("autoplay","");else{Q("#D6D6D6");var t=e.get(0).outerHTML.indexOf("class")-1;e.get(0).outerHTML=[e.get(0).outerHTML.slice(0,t),"autoplay",e.get(0).outerHTML.slice(t)].join("")}}}},ye.RegisterCommand("insertVideo",{title:"Insert Video",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("video.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("video.insert")):this.video.showInsertPopup()},plugin:"video"}),ye.DefineIcon("insertVideo",{NAME:"video-camera",FA5NAME:"camera",SVG_KEY:"insertVideo"}),ye.DefineIcon("videoByURL",{NAME:"link",SVG_KEY:"insertLink"}),ye.RegisterCommand("videoByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-by-url")},refresh:function(e){this.video.refreshByURLButton(e)}}),ye.DefineIcon("videoEmbed",{NAME:"code",SVG_KEY:"codeView"}),ye.RegisterCommand("videoEmbed",{title:"Embedded Code",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-embed")},refresh:function(e){this.video.refreshEmbedButton(e)}}),ye.DefineIcon("videoUpload",{NAME:"upload",SVG_KEY:"upload"}),ye.RegisterCommand("videoUpload",{title:"Upload Video",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-upload")},refresh:function(e){this.video.refreshUploadButton(e)}}),ye.RegisterCommand("videoInsertByURL",{undo:!0,focus:!0,callback:function(){this.video.insertByURL()}}),ye.RegisterCommand("videoInsertEmbed",{undo:!0,focus:!0,callback:function(){this.video.insertEmbed()}}),ye.DefineIcon("videoDisplay",{NAME:"star",SVG_KEY:"star"}),ye.RegisterCommand("videoDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(e,t){this.video.display(t)},refresh:function(e){this.opts.videoTextNear||e.addClass("fr-hidden")},refreshOnShow:function(e,t){this.video.refreshDisplayOnShow(e,t)}}),ye.DefineIcon("video-align",{NAME:"align-left",SVG_KEY:"align Left"}),ye.DefineIcon("video-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),ye.DefineIcon("video-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),ye.DefineIcon("video-align-center",{NAME:"align-justify",SVG_KEY:"alignJustify"}),ye.DefineIcon("videoAlign",{NAME:"align-center",SVG_KEY:"alignCenter"}),ye.RegisterCommand("videoAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=ye.COMMANDS.videoAlign.options;for(var o in t)t.hasOwnProperty(o)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="videoAlign" data-param1="'.concat(o,'" title="').concat(this.language.translate(t[o]),'">').concat(this.icon.create("video-align-".concat(o)),'<span class="fr-sr-only">').concat(this.language.translate(t[o]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.video.align(t)},refresh:function(e){this.video.refreshAlign(e)},refreshOnShow:function(e,t){this.video.refreshAlignOnShow(e,t)}}),ye.DefineIcon("videoReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),ye.RegisterCommand("videoReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.video.replace()}}),ye.DefineIcon("videoRemove",{NAME:"trash",SVG_KEY:"remove"}),ye.RegisterCommand("videoRemove",{title:"Remove",callback:function(){this.video.remove()}}),ye.DefineIcon("autoplay",{NAME:"autoplay",SVG_KEY:"autoplay"}),ye.RegisterCommand("autoplay",{undo:!1,focus:!1,popup:!0,title:"Autoplay",callback:function(){this.video.setAutoplay()}}),ye.DefineIcon("videoSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),ye.RegisterCommand("videoSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.video.showSizePopup()}}),ye.DefineIcon("videoBack",{NAME:"arrow-left",SVG_KEY:"back"}),ye.RegisterCommand("videoBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.video.back()},refresh:function(e){this.video.get()||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),ye.RegisterCommand("videoDismissError",{title:"OK",undo:!1,callback:function(){this.video.hideProgressBar(!0)}}),ye.RegisterCommand("videoSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.video.setSize()}})});
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(ye){"use strict";ye=ye&&ye.hasOwnProperty("default")?ye["default"]:ye,Object.assign(ye.POPUP_TEMPLATES,{"video.insert":"[_BUTTONS_][_BY_URL_LAYER_][_EMBED_LAYER_][_UPLOAD_LAYER_][_PROGRESS_BAR_]","video.edit":"[_BUTTONS_]","video.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(ye.DEFAULTS,{videoAllowedTypes:["mp4","webm","ogg","mp3","mpeg","url"],videoAllowedProviders:[".*"],videoDefaultAlign:"center",videoDefaultDisplay:"block",videoDefaultWidth:600,videoEditButtons:["videoReplace","videoRemove","videoDisplay","videoAlign","videoSize","autoplay"],videoInsertButtons:["videoBack","|","videoByURL","videoEmbed","videoUpload"],videoMaxSize:52428800,videoMove:!0,videoResize:!0,videoResponsive:!1,videoSizeButtons:["videoBack","|"],videoSplitHTML:!1,videoTextNear:!0,videoUpload:!0,videoUploadMethod:"POST",videoUploadParam:"file",videoUploadParams:{},videoUploadToS3:!1,videoUploadToAzure:!1,videoUploadURL:null}),ye.VIDEO_PROVIDERS=[{test_regex:/^.*((youtu.be)|(youtube.com))\/((v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))?\??v?=?([^#\&\?]*).*/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=|embed\/)?([0-9a-zA-Z_\-]+)(.+)?/g,url_text:"https://www.youtube.com/embed/$1?$2",html:'<iframe width="640" height="360" src="{url}&wmode=opaque&rel=0" frameborder="0" allowfullscreen></iframe>',provider:"youtube"},{test_regex:/^.*(?:vimeo.com)\/(?:channels(\/\w+\/)?|groups\/*\/videos\/\u200b\d+\/|video\/|)(\d+)(?:$|\/|\?)/,url_regex:/(?:https?:\/\/)?(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^\/]*)\/videos\/|album\/(?:\d+)\/video\/|video\/|)(\d+)(?:[a-zA-Z0-9_\-]+)?(\/[a-zA-Z0-9_\-]+)?/i,url_text:"https://player.vimeo.com/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"vimeo"},{test_regex:/^.+(dailymotion.com|dai.ly)\/(video|hub)?\/?([^_]+)[^#]*(#video=([^_&]+))?/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:dailymotion\.com|dai\.ly)\/(?:video|hub)?\/?(.+)/g,url_text:"https://www.dailymotion.com/embed/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"dailymotion"},{test_regex:/^.+(screen.yahoo.com)\/[^_&]+/,url_regex:"",url_text:"",html:'<iframe width="640" height="360" src="{url}?format=embed" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',provider:"yahoo"},{test_regex:/^.+(rutube.ru)\/[^_&]+/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:rutube\.ru)\/(?:video)?\/?(.+)/g,url_text:"https://rutube.ru/play/embed/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',provider:"rutube"},{test_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/,url_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/g,url_text:"https://play.vidyard.com/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"vidyard"}],ye.VIDEO_EMBED_REGEX=/^\W*((<iframe(.|\n)*>(\s|\n)*<\/iframe>)|(<embed(.|\n)*>))\W*$/i,ye.PLUGINS.video=function(w){var s,p,f,E,i,o,A=w.$,C="https://i.froala.com/upload",c=2,v=3,u=4,S=5,U=6,r={};function g(){var e=w.popups.get("video.insert");e.find(".fr-video-by-url-layer input").val("").trigger("change");var t=e.find(".fr-video-embed-layer textarea");t.val("").trigger("change"),(t=e.find(".fr-video-upload-layer input")).val("").trigger("change")}function a(){var e=w.popups.get("video.edit");if(e||(e=function n(){var e="";if(0<w.opts.videoEditButtons.length){w.opts.videoResponsive&&(-1<w.opts.videoEditButtons.indexOf("videoSize")&&w.opts.videoEditButtons.splice(w.opts.videoEditButtons.indexOf("videoSize"),1),-1<w.opts.videoEditButtons.indexOf("videoDisplay")&&w.opts.videoEditButtons.splice(w.opts.videoEditButtons.indexOf("videoDisplay"),1),-1<w.opts.videoEditButtons.indexOf("videoAlign")&&w.opts.videoEditButtons.splice(w.opts.videoEditButtons.indexOf("videoAlign"),1));var t={buttons:e+='<div class="fr-buttons"> \n '.concat(w.button.buildList(w.opts.videoEditButtons)," \n </div>")},o=w.popups.create("video.edit",t);return w.events.$on(w.$wp,"scroll.video-edit",function(){E&&w.popups.isVisible("video.edit")&&(w.events.disableBlur(),y(E))}),o}return!1}()),e){w.popups.setContainer("video.edit",w.$sc),w.popups.refresh("video.edit");var t=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video")),o=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight(),r=t.get(0).src?t.get(0).src:t.get(0).currentSrc,a=!(!(r=(r=r.split("."))[r.length-1]).includes("pdf")&&!r.includes("txt"));t.hasClass("fr-file")||a||E.find("audio").get(0)?(document.getElementById("autoplay-".concat(w.id))&&(document.getElementById("autoplay-".concat(w.id)).style.display="none"),document.getElementById("videoReplace-".concat(w.id))&&(document.getElementById("videoReplace-".concat(w.id)).style.display="none")):(document.getElementById("autoplay-".concat(w.id))&&(document.getElementById("autoplay-".concat(w.id)).style.display=""),document.getElementById("videoReplace-".concat(w.id))&&(document.getElementById("videoReplace-".concat(w.id)).style.display="")),w.popups.show("video.edit",o,i,t.outerHeight(),!0)}}function n(e){if(e)return w.popups.onRefresh("video.insert",g),w.popups.onHide("video.insert",q),!0;var t="";w.opts.videoUpload||-1===w.opts.videoInsertButtons.indexOf("videoUpload")||w.opts.videoInsertButtons.splice(w.opts.videoInsertButtons.indexOf("videoUpload"),1);var o=w.button.buildList(w.opts.videoInsertButtons);""!==o&&(t='<div class="fr-buttons">'+o+"</div>");var i,r="",a=w.opts.videoInsertButtons.indexOf("videoUpload"),n=w.opts.videoInsertButtons.indexOf("videoByURL"),s=w.opts.videoInsertButtons.indexOf("videoEmbed");if(0<=n){i=" fr-active",(a<n&&0<=a||s<n&&0<=s)&&(i="");r='<div class="fr-video-by-url-layer fr-layer'.concat(i,'" id="fr-video-by-url-layer-').concat(w.id,'"><div class="fr-input-line"><input id="fr-video-by-url-layer-text-').concat(w.id,'" type="text" placeholder="').concat(w.language.translate("Paste in a video URL"),'" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><span style=\'float:left\'><div class="fr-checkbox-line fr-autoplay-margin"><span class="fr-checkbox"> <input id=\'videoPluginAutoplay\' data-checked="_blank" type="checkbox"> <span>').concat('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 32 32"><path d="M27 4l-15 15-7-7-5 5 12 12 20-20z" fill="#FFF"></path></svg>','</span></span> <label id="fr-label-target-').concat(w.id,'">Autoplay</label></div> </span><button type="button" class="fr-command fr-submit" data-cmd="videoInsertByURL" tabIndex="2" role="button">').concat(w.language.translate("Insert"),"</button></div></div>")}var d="";0<=s&&(i=" fr-active",(a<s&&0<=a||n<s&&0<=n)&&(i=""),d='<div class="fr-video-embed-layer fr-layer'.concat(i,'" id="fr-video-embed-layer-').concat(w.id,'"><div class="fr-input-line"><textarea id="fr-video-embed-layer-text').concat(w.id,'" type="text" placeholder="').concat(w.language.translate("Embedded Code"),'" tabIndex="1" aria-required="true" rows="5"></textarea></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoInsertEmbed" tabIndex="2" role="button">').concat(w.language.translate("Insert"),"</button></div></div>"));var l="";0<=a&&(i=" fr-active",(s<a&&0<=s||n<a&&0<=n)&&(i=""),l='<div class="fr-video-upload-layer fr-layer'.concat(i,'" id="fr-video-upload-layer-').concat(w.id,'"><strong>').concat(w.language.translate("Drop video"),"</strong><br>(").concat(w.language.translate("or click"),')<div class="fr-form"><input type="file" accept="video/').concat(w.opts.videoAllowedTypes.join(", video/").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-video-upload-layer-').concat(w.id,'" role="button"></div></div>'));var p={buttons:t,by_url_layer:r,embed_layer:d,upload_layer:l,progress_bar:'<div class="fr-video-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="videoDismissError" tabIndex="2" role="button">OK</button></div></div>'},f=w.popups.create("video.insert",p);return function c(i){w.events.$on(i,"dragover dragenter",".fr-video-upload-layer",function(){return A(this).addClass("fr-drop"),!1},!0),w.events.$on(i,"dragleave dragend",".fr-video-upload-layer",function(){return A(this).removeClass("fr-drop"),!1},!0),w.events.$on(i,"drop",".fr-video-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),A(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var o=i.data("instance")||w;o.events.disableBlur(),o.video.upload(t.files),o.events.enableBlur()}},!0),w.helpers.isIOS()&&w.events.$on(i,"touchstart",'.fr-video-upload-layer input[type="file"]',function(){A(this).trigger("click")},!0);w.events.$on(i,"change",'.fr-video-upload-layer input[type="file"]',function(){if(this.files){var e=i.data("instance")||w;e.events.disableBlur(),i.find("input:focus").blur(),e.events.enableBlur(),e.video.upload(this.files)}A(this).val("")},!0)}(f),f}function d(e){w.events.focus(!0),w.selection.restore();var t=!1;E&&(W(),t=!0),w.html.insert('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">'.concat(e,"</span>"),!1,w.opts.videoSplitHTML),w.popups.hide("video.insert");var o=w.$el.find(".fr-jiv");o.removeClass("fr-jiv"),o.toggleClass("fr-rv",w.opts.videoResponsive),J(o,w.opts.videoDefaultDisplay,w.opts.videoDefaultAlign),o.toggleClass("fr-draggable",w.opts.videoMove),w.events.trigger(t?"video.replaced":"video.inserted",[o])}function h(){var e=A(this);w.popups.hide("video.insert"),e.removeClass("fr-uploading"),e.parent().next().is("br")&&e.parent().next().remove(),y(e.parent()),w.events.trigger("video.loaded",[e.parent()])}function R(s,e,l,p,f){w.edit.off(),m("Loading video"),e&&(s=w.helpers.sanitizeURL(s));var c=function c(){var e,t;if(p){w.undo.canDo()||p.find("video").hasClass("fr-uploading")||w.undo.saveStep();var o=p.find("video").data("fr-old-src"),i=p.data("fr-replaced");p.data("fr-replaced",!1),w.$wp?((e=p.clone(!0)).find("video").removeData("fr-old-src").removeClass("fr-uploading"),e.find("video").off("canplay"),o&&p.find("video").attr("src",o),p.replaceWith(e)):e=p;for(var r=e.find("video").get(0).attributes,a=0;a<r.length;a++){var n=r[a];0===n.nodeName.indexOf("data-")&&e.find("video").removeAttr(n.nodeName)}if(void 0!==l)for(t in l)l.hasOwnProperty(t)&&"link"!=t&&e.find("video").attr("data-".concat(t),l[t]);e.find("video").on("canplay",h),e.find("video").attr("src",s),w.edit.on(),L(),w.undo.saveStep(),w.$el.blur(),w.events.trigger(i?"video.replaced":"video.inserted",[e,f])}else e=function d(e,t,o){var i,r="";if(t&&void 0!==t)for(i in t)t.hasOwnProperty(i)&&"link"!=i&&(r+=" data-".concat(i,'="').concat(t[i],'"'));var a=w.opts.videoDefaultWidth;a&&"auto"!=a&&(a="".concat(a,"px"));var n=A(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+w.opts.videoDefaultDisplay[0]+("center"!=w.opts.videoDefaultAlign?" fr-fv"+w.opts.videoDefaultAlign[0]:"")).html('<video src="'+e+'" '+r+(a?' style="width: '+a+';" ':"")+" controls>"+w.language.translate("Your browser does not support HTML5 video.")+"</video>");n.toggleClass("fr-draggable",w.opts.videoMove),w.edit.on(),w.events.focus(!0),w.selection.restore(),w.undo.saveStep(),w.opts.videoSplitHTML?w.markers.split():w.markers.insert();w.html.wrap();var s=w.$el.find(".fr-marker");w.node.isLastSibling(s)&&s.parent().hasClass("fr-deletable")&&s.insertAfter(s.parent());s.replaceWith(n),w.selection.clear(),n.find("video").get(0).readyState>n.find("video").get(0).HAVE_FUTURE_DATA||w.helpers.isIOS()?o.call(n.find("video").get(0)):n.find("video").on("canplaythrough load",o);return n}(s,l,h),L(),w.undo.saveStep(),w.events.trigger("video.inserted",[e,f])};x("Loading video"),c()}function x(e){var t=w.popups.get("video.insert");if(t||(t=n()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-video-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),E){var o=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video"));w.popups.setContainer("video.insert",w.$sc);var i=o.offset().left,r=o.offset().top+o.height();w.popups.show("video.insert",i,r,o.outerHeight())}void 0===e&&m(w.language.translate("Uploading"),0)}function l(e){var t=w.popups.get("video.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-video-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||w.$el.find("video.fr-error").length)){if(w.events.focus(),w.$el.find("video.fr-error").length&&(w.$el.find("video.fr-error").parent().remove(),w.undo.saveStep(),w.undo.run(),w.undo.dropRedo()),!w.$wp&&E){var o=E;M(!0),w.selection.setAfter(o.find("video").get(0)),w.selection.restore()}w.popups.hide("video.insert")}}function m(e,t){var o=w.popups.get("video.insert");if(o){var i=o.find(".fr-video-progress-bar-layer");i.find("h3").text(e+(t?" ".concat(t,"%"):"")),i.removeClass("fr-error"),t?(i.find("div").removeClass("fr-indeterminate"),i.find("div > span").css("width","".concat(t,"%"))):i.find("div").addClass("fr-indeterminate")}}function b(e){x();var t=w.popups.get("video.insert").find(".fr-video-progress-bar-layer");t.addClass("fr-error");var o=t.find("h3");o.text(e),w.events.disableBlur(),o.focus()}function y(e){t.call(e.get(0))}function _(e,t,o){m("Loading video");var i=this.status,r=this.response,a=this.responseXML,n=this.responseText;try{if(w.opts.videoUploadToS3||w.opts.videoUploadToAzure)if(201==i){var s;if(w.opts.videoUploadToAzure){if(!1===w.events.trigger("video.uploadedToAzure",[this.responseURL,o,r],!0))return w.edit.on(),!1;s=t}else s=function l(e){try{var t=A(e).find("Location").text(),o=A(e).find("Key").text();return!1===w.events.trigger("video.uploadedToS3",[t,o,e],!0)?(w.edit.on(),!1):t}catch(i){return K(u,e),!1}}(a);s&&R(s,!1,[],e,r||a)}else K(u,r||a);else if(200<=i&&i<300){var d=function p(e){try{if(!1===w.events.trigger("video.uploaded",[e],!0))return w.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(K(c,e),!1)}catch(o){return K(u,e),!1}}(n);d&&R(d.link,!1,d,e,r||n)}else K(v,r||n)}catch(f){K(u,r||n)}}function B(){K(u,this.response||this.responseText||this.responseXML)}function D(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;m(w.language.translate("Uploading"),t)}}function I(){w.edit.on(),l(!0)}function T(e){if(!w.core.sameInstance(f))return!0;e.preventDefault(),e.stopPropagation();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),o=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!o)return!1;if("mousedown"==e.type){var i=w.$oel.get(0).ownerDocument,r=i.defaultView||i.parentWindow,a=!1;try{a=r.location!=r.parent.location&&!(r.$&&r.$.FE)}catch(n){}a&&r.frameElement&&(t+=w.helpers.getPX(A(r.frameElement).offset().left)+r.frameElement.clientLeft,o=e.clientY+w.helpers.getPX(A(r.frameElement).offset().top)+r.frameElement.clientTop)}w.undo.canDo()||w.undo.saveStep(),(p=A(this)).data("start-x",t),p.data("start-y",o),s.show(),w.popups.hideAll(),Y()}function k(e){if(!w.core.sameInstance(f))return!0;if(p){e.preventDefault();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),o=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!o)return!1;var i=p.data("start-x"),r=p.data("start-y");p.data("start-x",t),p.data("start-y",o);var a=t-i,n=o-r,s=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video")),d=s.width(),l=s.height();(p.hasClass("fr-hnw")||p.hasClass("fr-hsw"))&&(a=0-a),(p.hasClass("fr-hnw")||p.hasClass("fr-hne"))&&(n=0-n),s.css("width",d+a),s.css("height",l+n),s.removeAttr("width"),s.removeAttr("height"),O()}}function z(e){if(!w.core.sameInstance(f))return!0;p&&E&&(e&&e.stopPropagation(),p=null,s.hide(),O(),a(),w.undo.saveStep())}function P(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function $(e,t,o,i){return e.pageX=t,e.pageY=t,T.call(this,e),e.pageX=e.pageX+o*Math.floor(Math.pow(1.1,i)),e.pageY=e.pageY+o*Math.floor(Math.pow(1.1,i)),k.call(this,e),z.call(this,e),++i}function L(){var e,t=Array.prototype.slice.call(w.el.querySelectorAll("video, .fr-video > *")),o=[];for(e=0;e<t.length;e++)o.push(t[e].getAttribute("src")),A(t[e]).toggleClass("fr-draggable",w.opts.videoMove),""===t[e].getAttribute("class")&&t[e].removeAttribute("class"),""===t[e].getAttribute("style")&&t[e].removeAttribute("style");if(i)for(e=0;e<i.length;e++)o.indexOf(i[e].getAttribute("src"))<0&&w.events.trigger("video.removed",[A(i[e])]);i=t}function O(){f||function n(){var e;if(w.shared.$video_resizer?(f=w.shared.$video_resizer,s=w.shared.$vid_overlay,w.events.on("destroy",function(){A("body").first().append(f.removeClass("fr-active"))},!0)):(w.shared.$video_resizer=A(document.createElement("div")).attr("class","fr-video-resizer"),f=w.shared.$video_resizer,w.events.$on(f,"mousedown",function(e){e.stopPropagation()},!0),w.opts.videoResize&&(f.append(P("nw")+P("ne")+P("sw")+P("se")),w.shared.$vid_overlay=A(document.createElement("div")).attr("class","fr-video-overlay"),s=w.shared.$vid_overlay,e=f.get(0).ownerDocument,A(e).find("body").first().append(s))),w.events.on("shared.destroy",function(){f.html("").removeData().remove(),f=null,w.opts.videoResize&&(s.remove(),s=null)},!0),w.helpers.isMobile()||w.events.$on(A(w.o_win),"resize.video",function(){M(!0)}),w.opts.videoResize){e=f.get(0).ownerDocument,w.events.$on(f,w._mousedown,".fr-handler",T),w.events.$on(A(e),w._mousemove,k),w.events.$on(A(e.defaultView||e.parentWindow),w._mouseup,z),w.events.$on(s,"mouseleave",z);var i=1,r=null,a=0;w.events.on("keydown",function(e){if(E){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,o=e.which;(o!==r||200<e.timeStamp-a)&&(i=1),(o==ye.KEYCODE.EQUALS||w.browser.mozilla&&o==ye.KEYCODE.FF_EQUALS)&&t&&!e.altKey?i=$.call(this,e,1,1,i):(o==ye.KEYCODE.HYPHEN||w.browser.mozilla&&o==ye.KEYCODE.FF_HYPHEN)&&t&&!e.altKey&&(i=$.call(this,e,2,-1,i)),r=o,a=e.timeStamp}}),w.events.on("keyup",function(){i=1})}}(),(w.$wp||w.$sc).append(f),f.data("instance",w);var e=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video")),t=0,o=0;w.opts.iframe&&(o=w.helpers.getPX(w.$wp.find(".fr-iframe").css("padding-top")),t=w.helpers.getPX(w.$wp.find(".fr-iframe").css("padding-left"))),f.css("top",(w.opts.iframe?e.offset().top+o-1:e.offset().top-w.$wp.offset().top-1)+w.$wp.scrollTop()).css("left",(w.opts.iframe?e.offset().left+t-1:e.offset().left-w.$wp.offset().left-1)+w.$wp.scrollLeft()).css("width",e.get(0).getBoundingClientRect().width).css("height",e.get(0).getBoundingClientRect().height).addClass("fr-active")}function t(e){if(e&&"touchend"==e.type&&o)return!0;if(e&&w.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;if(w.edit.isDisabled())return!1;for(var t=0;t<ye.INSTANCES.length;t++)ye.INSTANCES[t]!=w&&ye.INSTANCES[t].events.trigger("video.hideResizer");w.toolbar.disable(),w.helpers.isMobile()&&(w.events.disableBlur(),w.$el.blur(),w.events.enableBlur()),w.$el.find(".fr-video.fr-active").removeClass("fr-active"),(E=A(this)).addClass("fr-active"),w.opts.iframe&&w.size.syncIframe(),ee(),O(),a(),w.selection.clear(),w.button.bulkRefresh(),w.events.trigger("image.hideResizer")}function M(e){E&&(function t(){return w.shared.vid_exit_flag}()||!0===e)&&(f.removeClass("fr-active"),w.toolbar.enable(),E.removeClass("fr-active"),E=null,Y())}function V(){w.shared.vid_exit_flag=!0}function Y(){w.shared.vid_exit_flag=!1}function N(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var o=t.files[0];if(o&&o.type&&-1!==o.type.indexOf("video")){if(!w.opts.videoUpload)return e.preventDefault(),e.stopPropagation(),!1;w.markers.remove(),w.markers.insertAtPoint(e.originalEvent),w.$el.find(".fr-marker").replaceWith(ye.MARKERS),w.popups.hideAll();var i=w.popups.get("video.insert");return i||(i=n()),w.popups.setContainer("video.insert",w.$sc),w.popups.show("video.insert",e.originalEvent.pageX,e.originalEvent.pageY),x(),0<=w.opts.videoAllowedTypes.indexOf(o.type.replace(/video\//g,""))?H(t.files):K(U),e.preventDefault(),e.stopPropagation(),!1}}}function H(e){if(void 0!==e&&0<e.length){if(!1===w.events.trigger("video.beforeUpload",[e]))return!1;var t,o=e[0];if(!(null!==w.opts.videoUploadURL&&w.opts.videoUploadURL!=C||w.opts.videoUploadToS3||w.opts.videoUploadToAzure))return function y(i){E&&E.find("iframe")&&E.find("iframe").length&&W();var r=new FileReader;r.onload=function(){r.result;for(var e=atob(r.result.split(",")[1]),t=[],o=0;o<e.length;o++)t.push(e.charCodeAt(o));R(window.URL.createObjectURL(new Blob([new Uint8Array(t)],{type:i.type})),!1,null,E)},x(),r.readAsDataURL(i)}(o),!1;if(o.size>w.opts.videoMaxSize)return K(S),!1;if(w.opts.videoAllowedTypes.indexOf(o.type.replace(/video\//g,""))<0)return K(U),!1;if(w.drag_support.formdata&&(t=w.drag_support.formdata?new FormData:null),t){var i;if(!1!==w.opts.videoUploadToS3)for(i in t.append("key",w.opts.videoUploadToS3.keyStart+(new Date).getTime()+"-"+(o.name||"untitled")),t.append("success_action_status","201"),t.append("X-Requested-With","xhr"),t.append("Content-Type",o.type),w.opts.videoUploadToS3.params)w.opts.videoUploadToS3.params.hasOwnProperty(i)&&t.append(i,w.opts.videoUploadToS3.params[i]);for(i in w.opts.videoUploadParams)w.opts.videoUploadParams.hasOwnProperty(i)&&t.append(i,w.opts.videoUploadParams[i]);t.append(w.opts.videoUploadParam,o);var r,a,n=w.opts.videoUploadURL;w.opts.videoUploadToS3&&(n=w.opts.videoUploadToS3.uploadURL?w.opts.videoUploadToS3.uploadURL:"https://".concat(w.opts.videoUploadToS3.region,".amazonaws.com/").concat(w.opts.videoUploadToS3.bucket));var s=w.opts.videoUploadMethod;w.opts.videoUploadToAzure&&(n=w.opts.videoUploadToAzure.uploadURL?"".concat(w.opts.videoUploadToAzure.uploadURL,"/").concat(o.name):encodeURI("https://".concat(w.opts.videoUploadToAzure.account,".blob.core.windows.net/").concat(w.opts.videoUploadToAzure.container,"/").concat(o.name)),r=n,w.opts.videoUploadToAzure.SASToken&&(n+=w.opts.videoUploadToAzure.SASToken),s="PUT");var d=w.core.getXHR(n,s);if(w.opts.videoUploadToAzure){var l=(new Date).toUTCString();if(!w.opts.videoUploadToAzure.SASToken&&w.opts.videoUploadToAzure.accessKey){var p=w.opts.videoUploadToAzure.account,f=w.opts.videoUploadToAzure.container;if(w.opts.videoUploadToAzure.uploadURL){var c=w.opts.videoUploadToAzure.uploadURL.split("/");f=c.pop(),p=c.pop().split(".")[0]}var v="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(l,"\nx-ms-version:2019-07-07"),u=encodeURI("/"+p+"/"+f+"/"+o.name),g=s+"\n\n\n"+o.size+"\n\n"+o.type+"\n\n\n\n\n\n\n"+v+"\n"+u,h=w.cryptoJSPlugin.cryptoJS.HmacSHA256(g,w.cryptoJSPlugin.cryptoJS.enc.Base64.parse(w.opts.videoUploadToAzure.accessKey)).toString(w.cryptoJSPlugin.cryptoJS.enc.Base64),m="SharedKey "+p+":"+h;a=h,d.setRequestHeader("Authorization",m)}for(i in d.setRequestHeader("x-ms-version","2019-07-07"),d.setRequestHeader("x-ms-date",l),d.setRequestHeader("Content-Type",o.type),d.setRequestHeader("x-ms-blob-type","BlockBlob"),w.opts.videoUploadParams)w.opts.videoUploadParams.hasOwnProperty(i)&&d.setRequestHeader(i,w.opts.videoUploadParams[i]);for(i in w.opts.videoUploadToAzure.params)w.opts.videoUploadToAzure.params.hasOwnProperty(i)&&d.setRequestHeader(i,w.opts.videoUploadToAzure.params[i])}d.onload=function(){_.call(d,E,r,a)},d.onerror=B,d.upload.onprogress=D,d.onabort=I,x(),w.events.disableBlur(),w.edit.off(),w.events.enableBlur();var b=w.popups.get("video.insert");b&&A(b.off("abortUpload")).on("abortUpload",function(){4!=d.readyState&&d.abort()}),d.send(w.opts.videoUploadToAzure?o:t)}}}function K(e,t){w.edit.on(),E&&E.find("video").addClass("fr-error"),b(w.language.translate("Something went wrong. Please try again.")),w.events.trigger("video.error",[{code:e,message:r[e]},t])}function F(){if(E){var e=w.popups.get("video.size"),t=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video"));e.find('input[name="width"]').val(t.get(0).style.width||t.attr("width")).trigger("change"),e.find('input[name="height"]').val(t.get(0).style.height||t.attr("height")).trigger("change")}}function X(e){if(e)return w.popups.onRefresh("video.size",F),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'.concat(w.button.buildList(w.opts.videoSizeButtons),"</div>"),size_layer:'<div class="fr-video-size-layer fr-layer fr-active" id="fr-video-size-layer-'.concat(w.id,'"><div class="fr-video-group"><div class="fr-input-line"><input id="fr-video-size-layer-width-').concat(w.id,'" type="text" name="width" placeholder="').concat(w.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-video-size-layer-height-').concat(w.id,'" type="text" name="height" placeholder="').concat(w.language.translate("Height"),'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoSetSize" tabIndex="2" role="button">').concat(w.language.translate("Update"),"</button></div></div>")},o=w.popups.create("video.size",t);return w.events.$on(w.$wp,"scroll",function(){E&&w.popups.isVisible("video.size")&&(w.events.disableBlur(),y(E))}),o}function G(e){if(void 0===e&&(e=E),e){if(e.hasClass("fr-fvl"))return"left";if(e.hasClass("fr-fvr"))return"right";if(e.hasClass("fr-dvb")||e.hasClass("fr-dvi"))return"center";if("block"==e.css("display")){if("left"==e.css("text-algin"))return"left";if("right"==e.css("text-align"))return"right"}else{if("left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function j(e){void 0===e&&(e=E);var t=e.css("float");return e.css("float","none"),"block"==e.css("display")?(e.css("float",""),e.css("float")!=t&&e.css("float",t),"block"):(e.css("float",""),e.css("float")!=t&&e.css("float",t),"inline")}function W(){if(E&&!1!==w.events.trigger("video.beforeRemove",[E])){var e=E;w.popups.hideAll(),M(!0),w.selection.setBefore(e.get(0))||w.selection.setAfter(e.get(0)),e.remove(),w.selection.restore(),w.html.fillEmptyBlocks()}}function q(){l()}function J(e,t,o){!w.opts.htmlUntouched&&w.opts.useClasses?(e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),e.addClass("fr-fv".concat(o[0]," fr-dv").concat(t[0]))):"inline"==t?(e.css({display:"inline-block"}),"center"==o?e.css({"float":"none"}):"left"==o?e.css({"float":"left"}):e.css({"float":"right"})):(e.css({display:"block",clear:"both"}),"left"==o?e.css({textAlign:"left"}):"right"==o?e.css({textAlign:"right"}):e.css({textAlign:"center"}))}function Z(){var e=w.$el.find("video").filter(function(){return 0===A(this).parents("span.fr-video").length});if(0!=e.length){e.wrap(A(document.createElement("span")).attr("class","fr-video fr-deletable").attr("contenteditable","false")),w.$el.find("embed, iframe").filter(function(){if(w.browser.safari&&this.getAttribute("src")&&this.setAttribute("src",this.src),0<A(this).parents("span.fr-video").length)return!1;for(var e=A(this).attr("src"),t=0;t<ye.VIDEO_PROVIDERS.length;t++){var o=ye.VIDEO_PROVIDERS[t];if(o.test_regex.test(e)&&new RegExp(w.opts.videoAllowedProviders.join("|")).test(o.provider))return!0}return!1}).map(function(){return 0===A(this).parents("object").length?this:A(this).parents("object").get(0)}).wrap(A(document.createElement("span")).attr("class","fr-video").attr("contenteditable","false"));for(var t,o,i,r,a=w.$el.find("span.fr-video, video"),n=0;n<a.length;n++){var s=A(a[n]);!w.opts.htmlUntouched&&w.opts.useClasses?((r=s).hasClass("fr-dvi")||r.hasClass("fr-dvb")||(r.addClass("fr-fv".concat(G(r)[0])),r.addClass("fr-dv".concat(j(r)[0]))),w.opts.videoTextNear||s.removeClass("fr-dvi").addClass("fr-dvb")):w.opts.htmlUntouched||w.opts.useClasses||(void 0,o=(t=s).hasClass("fr-dvb")?"block":t.hasClass("fr-dvi")?"inline":null,i=t.hasClass("fr-fvl")?"left":t.hasClass("fr-fvr")?"right":G(t),J(t,o,i),t.removeClass("fr-dvb fr-dvi fr-fvr fr-fvl"))}a.toggleClass("fr-draggable",w.opts.videoMove)}}function Q(e){document.getElementById("autoplay-".concat(w.id)).style.cssText="background:".concat(e)}function ee(){if(E){w.selection.clear();var e=w.doc.createRange();e.selectNode(E.get(0)),w.selection.get().addRange(e)}}return r[1]="Video cannot be loaded from the passed link.",r[c]="No link in upload response.",r[v]="Error during file upload.",r[u]="Parsing response failed.",r[S]="File is too large.",r[U]="Video file type is invalid.",r[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",w.shared.vid_exit_flag=!1,{_init:function te(){w.opts.videoResponsive&&(w.opts.videoResize=!1),function e(){w.events.on("drop",N,!0),w.events.on("mousedown window.mousedown",V),w.events.on("window.touchmove",Y),w.events.on("mouseup window.mouseup",M),w.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&M()}),w.events.on("video.hideResizer commands.undo commands.redo element.dropped",function(){M(!0)})}(),w.helpers.isMobile()&&(w.events.$on(w.$el,"touchstart","span.fr-video",function(){o=!1}),w.events.$on(w.$el,"touchmove",function(){o=!0})),w.events.on("html.set",Z),Z(),w.events.$on(w.$el,"mousedown","span.fr-video",function(e){e.stopPropagation(),(w.browser.msie||w.browser.edge)&&(e.target.innerText||(e.target.dragDrop(),t.call(this,e)))}),w.events.$on(w.$el,"click touchend","span.fr-video",function(e){if(e.target.innerText.length||"false"==A(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t.call(this,e)}),w.events.on("keydown",function(e){var t=e.which;return!E||t!=ye.KEYCODE.BACKSPACE&&t!=ye.KEYCODE.DELETE?E&&t==ye.KEYCODE.ESC?(M(!0),e.preventDefault(),!1):E&&t!=ye.KEYCODE.F10&&!w.keys.isBrowserAction(e)?(e.preventDefault(),!1):void 0:(e.preventDefault(),W(),w.undo.saveStep(),!1)},!0),w.events.on("toolbar.esc",function(){if(E)return w.events.disableBlur(),w.events.focus(),!1},!0),w.events.on("toolbar.focusEditor",function(){if(E)return!1},!0),w.events.on("keydown",function(){w.$el.find("span.fr-video:empty").remove()}),w.$wp&&(L(),w.events.on("contentChanged",L)),n(!0),X(!0)},showInsertPopup:function oe(){var e=w.$tb.find('.fr-command[data-cmd="insertVideo"]'),t=w.popups.get("video.insert");if(t||(t=n()),l(),!t.hasClass("fr-active"))if(w.popups.refresh("video.insert"),w.popups.setContainer("video.insert",w.$tb),e.isVisible()){var o=w.button.getPosition(e),i=o.left,r=o.top;w.popups.show("video.insert",i,r,e.outerHeight())}else w.position.forSelection(t),w.popups.show("video.insert")},showLayer:function ie(e){var t,o,i=w.popups.get("video.insert");if(!E&&!w.opts.toolbarInline){var r=w.$tb.find('.fr-command[data-cmd="insertVideo"]');t=r.offset().left,o=r.offset().top+(w.opts.toolbarBottom?10:r.outerHeight()-10)}w.opts.toolbarInline&&(o=i.offset().top-w.helpers.getPX(i.css("margin-top")),i.hasClass("fr-above")&&(o+=i.outerHeight())),i.find(".fr-layer").removeClass("fr-active"),i.find(".fr-".concat(e,"-layer")).addClass("fr-active"),w.popups.show("video.insert",t,o,0),w.accessibility.focusPopup(i)},refreshByURLButton:function re(e){var t=w.popups.get("video.insert");t&&t.find(".fr-video-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshEmbedButton:function ae(e){var t=w.popups.get("video.insert");t&&t.find(".fr-video-embed-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshUploadButton:function ne(e){var t=w.popups.get("video.insert");t&&t.find(".fr-video-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:H,insertByURL:function se(e){var t=!!document.getElementById("videoPluginAutoplay")&&document.getElementById("videoPluginAutoplay").checked;void 0===e&&(e=(w.popups.get("video.insert").find('.fr-video-by-url-layer input[type="text"]').val()||"").trim());var o=null;if(/^http/.test(e)||(e="https://".concat(e)),w.helpers.isURL(e))for(var i=0;i<ye.VIDEO_PROVIDERS.length;i++){var r=ye.VIDEO_PROVIDERS[i],a="autoplay=1";if(r.html.includes("autoplay=1")&&document.getElementById("videoPluginAutoplay").checked)r.html=r.html,document.getElementById("videoPluginAutoplay").checked=!1;else if(t){var n=r.html.indexOf("{url}")+5;r.html=[r.html.slice(0,n),a,r.html.slice(n)].join(""),t=!1,document.getElementById("videoPluginAutoplay").checked=!1}else(r=ye.VIDEO_PROVIDERS[i]).html=r.html.replace(a,"");if(r.test_regex.test(e)&&new RegExp(w.opts.videoAllowedProviders.join("|")).test(r.provider)){o=e.replace(r.url_regex,r.url_text),o=r.html.replace(/\{url\}/,o);break}}o?d(o):(b(w.language.translate("Something went wrong. Please try again.")),w.events.trigger("video.linkError",[e]))},insertEmbed:function de(e){void 0===e&&(e=w.popups.get("video.insert").find(".fr-video-embed-layer textarea").val()||""),0!==e.length&&ye.VIDEO_EMBED_REGEX.test(e)?d(e):(b(w.language.translate("Something went wrong. Please try again.")),w.events.trigger("video.codeError",[e]))},insert:d,align:function le(e){E.removeClass("fr-fvr fr-fvl"),!w.opts.htmlUntouched&&w.opts.useClasses?"left"==e?E.addClass("fr-fvl"):"right"==e&&E.addClass("fr-fvr"):J(E,j(),e),ee(),O(),a(),w.selection.clear()},refreshAlign:function pe(e){if(!E)return!1;e.find(">*").first().replaceWith(w.icon.create("video-align-".concat(G())))},refreshAlignOnShow:function fe(e,t){E&&t.find('.fr-command[data-param1="'.concat(G(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function ce(e){E.removeClass("fr-dvi fr-dvb"),!w.opts.htmlUntouched&&w.opts.useClasses?"inline"==e?E.addClass("fr-dvi"):"block"==e&&E.addClass("fr-dvb"):J(E,e,G()),ee(),O(),a(),w.selection.clear()},refreshDisplayOnShow:function ve(e,t){E&&t.find('.fr-command[data-param1="'.concat(j(),'"]')).addClass("fr-active").attr("aria-selected",!0)},remove:W,hideProgressBar:l,showSizePopup:function ue(){var e=w.popups.get("video.size");e||(e=X()),l(),w.popups.refresh("video.size"),w.popups.setContainer("video.size",w.$sc);var t=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video")),o=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.height();w.popups.show("video.size",o,i,t.height(),!0)},replace:function ge(){var e=w.popups.get("video.insert");e||(e=n()),w.popups.isVisible("video.insert")||(l(),w.popups.refresh("video.insert"),w.popups.setContainer("video.insert",w.$sc));var t=E.offset().left+E.outerWidth()/2,o=E.offset().top+E.height();w.popups.show("video.insert",t,o,E.outerHeight(),!0)},back:function e(){E?(w.events.disableBlur(),E[0].click()):(w.events.disableBlur(),w.selection.restore(),w.events.enableBlur(),w.popups.hide("video.insert"),w.toolbar.showInline())},setSize:function he(e,t){if(E){var o=w.popups.get("video.size"),i=E.find("iframe, embed, ".concat(E.find("iframe, embed, audio").get(0)?"audio":"video"));i.css("width",e||o.find('input[name="width"]').val()),i.css("height",t||o.find('input[name="height"]').val()),i.get(0).style.width&&i.removeAttr("width"),i.get(0).style.height&&i.removeAttr("height"),o.find("input:focus").blur(),setTimeout(function(){E.trigger("click")},w.helpers.isAndroid()?50:0)}},get:function me(){return E},showProgressBar:x,_editVideo:y,setAutoplay:function be(){var e;if(E.find("iframe, embed, audio").get(0))(e=E.find("iframe, embed, audio")).get(0).src.includes("autoplay=1")?(Q("#FFFFFF"),e.get(0).src=e.get(0).src.replace("&autoplay=1","")):(Q("#D6D6D6"),e.get(0).src=e.get(0).src+"&autoplay=1");else if((e=E.find("iframe, embed, video")).get(0).outerHTML.includes("autoplay"))Q("#FFFFFF"),e.get(0).outerHTML=e.get(0).outerHTML.replace("autoplay","");else{Q("#D6D6D6");var t=e.get(0).outerHTML.indexOf("class")-1;e.get(0).outerHTML=[e.get(0).outerHTML.slice(0,t),"autoplay",e.get(0).outerHTML.slice(t)].join("")}}}},ye.RegisterCommand("insertVideo",{title:"Insert Video",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("video.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("video.insert")):this.video.showInsertPopup()},plugin:"video"}),ye.DefineIcon("insertVideo",{NAME:"video-camera",FA5NAME:"camera",SVG_KEY:"insertVideo"}),ye.DefineIcon("videoByURL",{NAME:"link",SVG_KEY:"insertLink"}),ye.RegisterCommand("videoByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-by-url")},refresh:function(e){this.video.refreshByURLButton(e)}}),ye.DefineIcon("videoEmbed",{NAME:"code",SVG_KEY:"codeView"}),ye.RegisterCommand("videoEmbed",{title:"Embedded Code",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-embed")},refresh:function(e){this.video.refreshEmbedButton(e)}}),ye.DefineIcon("videoUpload",{NAME:"upload",SVG_KEY:"upload"}),ye.RegisterCommand("videoUpload",{title:"Upload Video",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-upload")},refresh:function(e){this.video.refreshUploadButton(e)}}),ye.RegisterCommand("videoInsertByURL",{undo:!0,focus:!0,callback:function(){this.video.insertByURL()}}),ye.RegisterCommand("videoInsertEmbed",{undo:!0,focus:!0,callback:function(){this.video.insertEmbed()}}),ye.DefineIcon("videoDisplay",{NAME:"star",SVG_KEY:"star"}),ye.RegisterCommand("videoDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(e,t){this.video.display(t)},refresh:function(e){this.opts.videoTextNear||e.addClass("fr-hidden")},refreshOnShow:function(e,t){this.video.refreshDisplayOnShow(e,t)}}),ye.DefineIcon("video-align",{NAME:"align-left",SVG_KEY:"align Left"}),ye.DefineIcon("video-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),ye.DefineIcon("video-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),ye.DefineIcon("video-align-center",{NAME:"align-justify",SVG_KEY:"alignJustify"}),ye.DefineIcon("videoAlign",{NAME:"align-center",SVG_KEY:"alignCenter"}),ye.RegisterCommand("videoAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=ye.COMMANDS.videoAlign.options;for(var o in t)t.hasOwnProperty(o)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="videoAlign" data-param1="'.concat(o,'" title="').concat(this.language.translate(t[o]),'">').concat(this.icon.create("video-align-".concat(o)),'<span class="fr-sr-only">').concat(this.language.translate(t[o]),"</span></a></li>"));return e+="</ul>"},callback:function(e,t){this.video.align(t)},refresh:function(e){this.video.refreshAlign(e)},refreshOnShow:function(e,t){this.video.refreshAlignOnShow(e,t)}}),ye.DefineIcon("videoReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),ye.RegisterCommand("videoReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.video.replace()}}),ye.DefineIcon("videoRemove",{NAME:"trash",SVG_KEY:"remove"}),ye.RegisterCommand("videoRemove",{title:"Remove",callback:function(){this.video.remove()}}),ye.DefineIcon("autoplay",{NAME:"autoplay",SVG_KEY:"autoplay"}),ye.RegisterCommand("autoplay",{undo:!1,focus:!1,popup:!0,title:"Autoplay",callback:function(){this.video.setAutoplay()}}),ye.DefineIcon("videoSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),ye.RegisterCommand("videoSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.video.showSizePopup()}}),ye.DefineIcon("videoBack",{NAME:"arrow-left",SVG_KEY:"back"}),ye.RegisterCommand("videoBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.video.back()},refresh:function(e){this.video.get()||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),ye.RegisterCommand("videoDismissError",{title:"OK",undo:!1,callback:function(){this.video.hideProgressBar(!0)}}),ye.RegisterCommand("videoSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.video.setSize()}})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 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(w){"use strict";w=w&&w.hasOwnProperty("default")?w["default"]:w,Object.assign(w.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}),w.PLUGINS.wordPaste=function(C){var l,n,d=C.$,s="word_paste",u={};function t(e){var t=C.opts.wordAllowedStyleProps;e||(C.opts.wordAllowedStyleProps=[]),0===n.indexOf("<colgroup>")&&(n="<table>"+n+"</table>"),n=a(n=n.replace(/<span[\n\r ]*style='mso-spacerun:yes'>([\r\n\u00a0 ]*)<\/span>/g,function(e,t){for(var r="",i=0;i++<t.length;)r+="&nbsp;";return r}),C.paste.getRtfClipboard());var r=C.doc.createElement("DIV");r.innerHTML=n,C.html.cleanBlankSpaces(r),n=r.innerHTML,n=(n=C.paste.cleanEmptyTagsAndDivs(n)).replace(/\u200b/g,""),function i(){C.modals.hide(s)}(),C.paste.clean(n,!0,!0),C.opts.wordAllowedStyleProps=t}function N(e){e.parentNode&&e.parentNode.removeChild(e)}function p(e,t){if(t(e))for(var r=e.firstChild;r;){var i=r,n=r.previousSibling;r=r.nextSibling,p(i,t),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:e.firstChild&&(r=e.firstChild.nextSibling)):r=n?n.nextSibling:e.firstChild}}function H(e){if(!e.getAttribute("style")||!/mso-list:[\s]*l/gi.test(e.getAttribute("style").replace(/\n/gi,"")))return!1;try{if(!e.querySelector('[style="mso-list:Ignore"]'))return!!(e.outerHTML&&0<=e.outerHTML.indexOf("\x3c!--[if !supportLists]--\x3e"))}catch(t){return!1}return!0}function O(e){return e.getAttribute("style").replace(/\n/gi,"").replace(/.*level([0-9]+?).*/gi,"$1")}function I(e,i){var t=e.cloneNode(!0);if(-1!==["H1","H2","H3","H4","H5","H6"].indexOf(e.tagName)){var r=document.createElement(e.tagName.toLowerCase());r.setAttribute("style",e.getAttribute("style")),r.innerHTML=t.innerHTML,t.innerHTML=r.outerHTML}p(t,function(e){if(e.nodeType==Node.COMMENT_NODE&&(C.browser.msie||C.browser.safari||C.browser.edge))try{if("[if !supportLists]"===e.data){for(e=e.nextSibling;e&&e.nodeType!==Node.COMMENT_NODE;){var t=e.nextSibling;e.parentNode.removeChild(e),e=t}e&&e.nodeType==Node.COMMENT_NODE&&e.parentNode.removeChild(e)}}catch(r){}return e.nodeType===Node.ELEMENT_NODE&&("mso-list:\nIgnore"===e.getAttribute("style")&&e.setAttribute("style","mso-list:Ignore"),"mso-list:Ignore"===e.getAttribute("style")&&e.parentNode.removeChild(e),e.setAttribute("style",function n(e){var r="",i=e.getAttribute("style");i&&["line-height","font-family","font-size","color","background"].forEach(function(e){var t=i.match(new RegExp(e+":.*(;|)"));t&&(r+=t[0]+";")});return r}(e)),h(e,i)),!0});var n=t.innerHTML;return n=n.replace(/<!--[\s\S]*?-->/gi,"")}function y(e,t){for(var r=document.createElement(t),i=0;i<e.attributes.length;i++){var n=e.attributes[i].name;r.setAttribute(n,e.getAttribute(n))}return r.innerHTML=e.innerHTML,e.parentNode.replaceChild(r,e),r}function A(e){var t=e.getAttribute("align");t&&(e.style["text-align"]=t,e.removeAttribute("align"))}function E(e){return e.replace(/\n|\r|\n\r|&quot;/g,"")}function T(e,t,r){if(t){var i=e.getAttribute("style");i&&";"!==i.slice(-1)&&(i+=";"),t&&";"!==t.slice(-1)&&(t+=";"),t=t.replace(/\n/gi,"");var n=null;n=r?(i||"")+t:t+(i||""),e.setAttribute("style",n)}}var c=null;function f(e,t,r){for(var i=e.split(r),n=1;n<i.length;n++){var a=i[n];if(1<(a=a.split("shplid")).length){a=a[1];for(var l="",s=0;s<a.length&&"\\"!==a[s]&&"{"!==a[s]&&" "!==a[s]&&"\r"!==a[s]&&"\n"!==a[s];)l+=a[s],s++;var o=a.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 g=void 0;if(2<f.length&&-1!==f[0].indexOf("blipuid"))g=f[1].split(" ");else{if((g=f[0].split(" "))&&g.length<2)continue;g.shift()}var u=g.join("");c[t+l]={image_hex:u,image_type:d}}}}function m(e,t){if(t){var r;if("IMG"===e.tagName){var i=e.getAttribute("src");if(!i||-1===i.indexOf("file://"))return;if(0===i.indexOf("file://")&&C.helpers.isURL(e.getAttribute("alt")))return void e.setAttribute("src",e.getAttribute("alt"));(r=u[e.getAttribute("v:shapes")])||(r=e.getAttribute("v:shapes"),e.parentNode&&e.parentNode.parentNode&&0<=e.parentNode.parentNode.innerHTML.indexOf("msEquation")&&(r=null))}else r=e.parentNode.getAttribute("o:spid");if(e.removeAttribute("height"),r){!function s(e){c={},f(e,"i","\\shppict"),f(e,"s","\\shp{")}(t);var n=c[r.substring(7)];if(n){var a=function o(e){for(var t=e.match(/[0-9a-f]{2}/gi),r=[],i=0;i<t.length;i++)r.push(String.fromCharCode(parseInt(t[i],16)));var n=r.join("");return btoa(n)}(n.image_hex),l="data:"+n.image_type+";base64,"+a;"IMG"===e.tagName?(e.src=l,e.setAttribute("data-fr-image-pasted",!0)):d(e.parentNode).before('<img data-fr-image-pasted="true" src="'+l+'" style="'+e.parentNode.getAttribute("style")+'">').remove()}}}}function h(e,t){var r=e.tagName,i=r.toLowerCase();e.firstElementChild&&("I"===e.firstElementChild.tagName?y(e.firstElementChild,"em"):"B"===e.firstElementChild.tagName&&y(e.firstElementChild,"strong"));if(-1!==["SCRIPT","APPLET","EMBED","NOFRAMES","NOSCRIPT"].indexOf(r))return N(e),!1;for(var n=["META","LINK","XML","ST1:","O:","W:","FONT"],a=0;a<n.length;a++)if(-1!==r.indexOf(n[a]))return e.innerHTML&&(e.outerHTML=e.innerHTML),N(e),!1;if("TD"!==r){var l=e.getAttribute("class")||"MsoNormal";if(t&&l){for(var s=(l=E(l)).split(" "),o=0;o<s.length;o++){var d=[],f="."+s[o];d.push(f),f=i+f,d.push(f);for(var g=0;g<d.length;g++)t[d[g]]&&T(e,t[d[g]])}e.removeAttribute("class")}t&&t[i]&&T(e,t[i])}if(-1!==["P","H1","H2","H3","H4","H5","H6","PRE"].indexOf(r)){var u=e.getAttribute("class");if(u&&(t&&t[r.toLowerCase()+"."+u]&&T(e,t[r.toLowerCase()+"."+u]),-1!==u.toLowerCase().indexOf("mso"))){var p=E(u);(p=p.replace(/[0-9a-z-_]*mso[0-9a-z-_]*/gi,""))?e.setAttribute("class",p):e.removeAttribute("class")}var c=e.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")}A(e)}if("TR"===r&&function x(e,t){C.node.clearAttributes(e);for(var r=e.firstElementChild,i=0,n=!1,a=null;r;){r.firstElementChild&&-1!==r.firstElementChild.tagName.indexOf("W:")&&(r.innerHTML=r.firstElementChild.innerHTML),(a=r.getAttribute("width"))||n||(n=!0),i+=parseInt(a,10),(!r.firstChild||r.firstChild&&r.firstChild.data===w.UNICODE_NBSP)&&(r.firstChild&&N(r.firstChild),r.innerHTML="<br>");for(var l=r.firstElementChild,s=1===r.children.length;l;)"P"!==l.tagName||H(l)||s&&A(l),l=l.nextElementSibling;if(t){var o=r.getAttribute("class");if(o){var d=(o=E(o)).match(/xl[0-9]+/gi);if(d){var f="."+d[0];t[f]&&T(r,t[f])}}t.td&&T(r,t.td)}var g=r.getAttribute("style");g&&(g=E(g))&&";"!==g.slice(-1)&&(g+=";");var u=r.getAttribute("valign");if(!u&&g){var p=g.match(/vertical-align:.+?[; "]{1,1}/gi);p&&(u=p[p.length-1].replace(/vertical-align:(.+?)[; "]{1,1}/gi,"$1"))}var c=null;if(g){var m=g.match(/text-align:.+?[; "]{1,1}/gi);m&&(c=m[m.length-1].replace(/text-align:(.+?)[; "]{1,1}/gi,"$1")),"general"===c&&(c=null)}var h=null;if(g){var v=g.match(/background:.+?[; "]{1,1}/gi);v&&(h=v[v.length-1].replace(/background:(.+?)[; "]{1,1}/gi,"$1"))}var b=r.getAttribute("colspan"),y=r.getAttribute("rowspan");b&&r.setAttribute("colspan",b),y&&r.setAttribute("rowspan",y),u&&(r.style["vertical-align"]=u),c&&(r.style["text-align"]=c),h&&(r.style["background-color"]=h),a&&r.setAttribute("width",a),r=r.nextElementSibling}for(r=e.firstElementChild;r;)a=r.getAttribute("width"),n?r.removeAttribute("width"):r.setAttribute("width",100*parseInt(a,10)/i+"%"),r=r.nextElementSibling}(e,t),"A"!==r||e.attributes.getNamedItem("href")||e.attributes.getNamedItem("name")||!e.innerHTML||(e.outerHTML=e.innerHTML),"A"==r&&e.getAttribute("href")&&e.querySelector("img"))for(var h=e.querySelectorAll("span"),v=0;v<h.length;v++)h[v].innerText||(h[v].outerHTML=h[v].innerHTML);if("TD"!==r&&"TH"!==r||e.innerHTML||(e.innerHTML="<br>"),"TABLE"===r&&(e.style.width=e.style.width),e.getAttribute("lang")&&e.removeAttribute("lang"),e.getAttribute("style")&&-1!==e.getAttribute("style").toLowerCase().indexOf("mso")){var b=E(e.getAttribute("style"));(b=b.replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi,""))?e.setAttribute("style",b):e.removeAttribute("style")}return!0}function a(e,t){0<=e.indexOf("<html")&&(e=e.replace(/[.\s\S\w\W<>]*(<html[^>]*>[.\s\S\w\W<>]*<\/html>)[.\s\S\w\W<>]*/i,"$1")),function f(e){for(var t=e.split("v:shape"),r=1;r<t.length;r++){var i=t[r],n=i.split(' id="')[1];if(n&&1<n.length){n=n.split('"')[0];var a=i.split(' o:spid="')[1];a&&1<a.length&&(a=a.split('"')[0],u[n]=a)}}}(e);var r=(new DOMParser).parseFromString(e,"text/html"),i=r.head,n=r.body,s=function g(e){var t={},r=e.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 a=i[n],l=a.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),s=a.replace(/[\S ]+\s+{([\s\S]+?)}/gi,"$1");l=l.replace(/^[\s]|[\s]$/gm,""),s=s.replace(/^[\s]|[\s]$/gm,""),l=l.replace(/\n|\r|\n\r/g,""),s=s.replace(/\n|\r|\n\r/g,"");for(var o=l.split(", "),d=0;d<o.length;d++)t[o[d]]=s}}return t}(i);p(n,function(e){if(e.nodeType===Node.TEXT_NODE&&/\n|\u00a0|\r/.test(e.data)){if(!/\S| /.test(e.data)&&!/[\u00a0]+/.test(e.data))return e.data===w.UNICODE_NBSP?(e.data="\u200b",!0):1===e.data.length&&10===e.data.charCodeAt(0)?(e.data=" ",!0):(N(e),!1);e.data=e.data.replace(/\n|\r/gi," ")}return!0}),p(n,function(e){return e.nodeType!==Node.ELEMENT_NODE||"V:IMAGEDATA"!==e.tagName&&"IMG"!==e.tagName||m(e,t),!0});for(var a=n.querySelectorAll("ul > ul, ul > ol, ol > ul, ol > ol"),l=a.length-1;0<=l;l--)a[l].previousElementSibling&&"LI"===a[l].previousElementSibling.tagName&&a[l].previousElementSibling.appendChild(a[l]);p(n,function(e){if(e.nodeType===Node.TEXT_NODE)return e.data=e.data.replace(/<br>(\n|\r)/gi,"<br>"),!1;if(e.nodeType===Node.ELEMENT_NODE){if(H(e)){var t=e.parentNode,r=e.previousSibling,i=function M(e,t,r,i){var n,a,l=/[0-9a-zA-Z]./gi,s=!1,o=navigator.userAgent.toLowerCase();-1!=o.indexOf("safari")&&(o=-1<o.indexOf("chrome")?1:"safari"),e.innerHTML.includes("mso-list:\nIgnore")&&(e.innerHTML=e.innerHTML.replace(/mso-list:\nIgnore/gi,"mso-list:Ignore"));var d,f,g,u,p=e.querySelector('span[style="mso-list:Ignore"]');null==p&&"safari"==o&&(p=e.querySelector('span[lang="PT-BR"]'));var c;p&&(s=s||l.test(p.textContent)),null!==p&&(c=p.textContent.trim().split(".")[0]),g=1==s?("1"==(c=p.textContent.trim().split(".")[0])?u="decimal;":"i"==c?u="lower-roman;":"I"==c?u="upper-roman;":"o"==c?u="circle;":c.match(/^v$/)||(c.match(/^[a-z]$/)||c.match(/^[a-z]\)$/)?u="lower-alpha;":(c.match(/^[A-Z]$/)||c.match(/^[A-Z]\)$/))&&(u="upper-alpha;")),u="list-style-type: "+u,"ol"):(null!=p&&(c=p.textContent.trim().split(".")[0]),"\xa7"==c?u="square;":"\xb7"==c&&(u="disc;"),u="list-style-type: "+u,"ul");var m,h="";p==undefined||p.textContent==undefined||isNaN(parseInt(p.textContent.trim().split(".")[1],10))||(h=' class="decimal_type" ');var v,b=O(e),y=e.style.marginLeft;if(y.includes("in")?(v="in",y=parseFloat(y)-.5):y.includes("pt")&&(v="px",y=parseFloat(y)-10),1==b)if(m=u?"<"+g+' style = "'+u+"; margin-left:"+y+v+';">':"<"+g+' style="margin-left:'+y+v+';">',"list-style-type: upper-alpha;"==u){var x=c.charCodeAt(0)-64;m=u?"<"+g+h+' start="'+x+'" style = "'+u+" margin-left:"+y+v+';">':"<"+g+">"}else if("list-style-type: lower-alpha;"==u){var C=c.charCodeAt(0)-96;m=u?"<"+g+h+' start="'+C+'" style = "'+u+"margin-left:"+y+v+';">':"<"+g+">"}else m=u?"<"+g+h+' style = "'+u+";margin-left:"+y+v+';">':"<"+g+' style="margin-left:'+y+v+';">';else if("list-style-type: upper-alpha;"==u){var N=c.charCodeAt(0)-64;m=u?"<"+g+h+' style = "'+u+' start="'+N+'">':"<"+g+">"}else if("list-style-type: lower-alpha;"==u){var A=c.charCodeAt(0)-96;m=u?"<"+g+h+' style = "'+u+' start="'+A+'">':"<"+g+">"}else m=u?"<"+g+h+' style = "'+u+'">':"<"+g+">";for(var E=!1;e;){if(!H(e)){if(e.outerHTML&&0<e.outerHTML.indexOf("mso-bookmark")&&0==(e.textContent||"").length){e=e.nextElementSibling;continue}break}var T=O(e);if((r=r||T)<T)m+=(f=M(e,t,T,e.style.marginLeft)).el.outerHTML,e=f.currentNode;else{if(T<r)break;e.firstElementChild&&e.firstElementChild.firstElementChild&&e.firstElementChild.firstElementChild.firstChild&&(l.lastIndex=0),a&&a.firstElementChild&&a.firstElementChild.firstElementChild&&a.firstElementChild.firstElementChild.firstChild&&(l.lastIndex=0,n=l.test(a.firstElementChild.firstElementChild.firstChild.data||a.firstElementChild.firstElementChild.firstChild.firstChild&&a.firstElementChild.firstElementChild.firstChild.firstChild.data||""));var w=!1;(!i&&!e.style.marginLeft||i&&e.style.marginLeft&&i===e.style.marginLeft)&&(w=!0),i=e.style.marginLeft,w||n===undefined?(d=I(e,t),e.nextSibling.innerText==undefined||e.nextSibling.innerText==undefined||m.includes('class="decimal_type"')||isNaN(parseInt(e.nextSibling.innerText.trim().split(".")[1],10))||(m=m.substring(3,0)+' class="decimal_type"'+m.substring(3,m.length)),m+="<li>"+d+"</li>"):(1==T&&(m+="</"+g+">",E=!0,a=null),m+=(f=M(e,t,T,e.style.marginLeft)).el.outerHTML,e=f.currentNode);var S=e&&e.nextElementSibling;if(S&&(a=S.previousElementSibling),e&&!H(e)){if(e.outerHTML&&0<e.outerHTML.indexOf("mso-bookmark")&&0==(e.textContent||"").length){e=e.nextElementSibling;continue}break}e&&e.parentNode&&e.parentNode.removeChild(e),e=S}}E||(m+="</"+g+">");var L=document.createElement("div");return L.innerHTML=m,{el:L,currentNode:e}}(e,s).el,n=null;return(n=r?r.nextSibling:t.firstChild)?t.insertBefore(i,n):t.appendChild(i),!1}return"FONT"===e.tagName&&s["."+e.getAttribute("class")]&&(e=y(e,"span")),h(e,s)}if(e.nodeType!==Node.COMMENT_NODE)return!0;if(-1<e.data.indexOf("[if !supportLineBreakNewLine]"))for(var a=e.nextSibling;a;)(a=e.nextSibling)&&N(a),a.data&&-1<a.data.indexOf("[endif]")&&(a=null);if(-1<e.data.indexOf("[if supportFields]")&&-1<e.data.indexOf("FORMCHECKBOX")){var l=document.createElement("input");l.type="checkbox",e.parentNode.insertBefore(l,e.nextSibling)}return N(e),!1}),p(n,function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=e.tagName;if(!e.innerHTML&&-1===["BR","IMG","INPUT"].indexOf(t)){for(var r=e.parentNode;r&&(N(e),!(e=r).innerHTML);)r=e.parentNode;return!1}!function f(e){var t=e.getAttribute("style");if(t){(t=E(t))&&";"!==t.slice(-1)&&(t+=";");var r=t.match(/(^|\S+?):.+?;{1,1}/gi);if(r){for(var i={},n=0;n<r.length;n++){var a=r[n].split(":");2===a.length&&("text-align"===a[0]&&"SPAN"===e.tagName||(i[a[0]]=a[1]))}var l="";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(d){o=null}o&&(o=Math.round(1.33*o),i[s]=o+"px;")}l+=s+":"+i[s]}l&&e.setAttribute("style",l)}}}(e)}return!0}),p(n,function(e){if(e&&"A"===e.nodeName&&""===e.href){for(var t=document.createDocumentFragment();e.firstChild;)t.appendChild(e.firstChild);e.parentNode.replaceChild(t,e)}return!0});var o=n.outerHTML,d=C.opts.htmlAllowedStyleProps;return C.opts.htmlAllowedStyleProps=C.opts.wordAllowedStyleProps,o=C.clean.html(o,C.opts.wordDeniedTags,C.opts.wordDeniedAttrs,!1),C.opts.htmlAllowedStyleProps=d,o}return{_init:function e(){C.events.on("paste.wordPaste",function(e){return n=e,C.opts.wordPasteModal?function a(){if(!l){var e='<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> '+C.language.translate("Word Paste Detected")+"</h4>",t=function n(){var e='<div class="fr-word-paste-modal" style="padding: 20px 20px 10px 20px;">';return e+='<p style="text-align: left;">'+C.language.translate("The pasted content is coming from a Microsoft Word document. Do you want to keep the format or clean it up?")+"</p>",e+='<div style="text-align: right; margin-top: 50px;"><button class="fr-remove-word fr-command">'+C.language.translate("Clean")+'</button> <button class="fr-keep-word fr-command">'+C.language.translate("Keep")+"</button></div>",e+="</div>"}(),r=C.modals.create(s,e,t),i=r.$body;l=r.$modal,r.$modal.addClass("fr-middle"),C.events.bindClick(i,"button.fr-remove-word",function(){var e=l.data("instance")||C;e.wordPaste.clean()}),C.events.bindClick(i,"button.fr-keep-word",function(){var e=l.data("instance")||C;e.wordPaste.clean(!0)}),C.events.$on(d(C.o_win),"resize",function(){C.modals.resize(s)})}C.modals.show(s),C.modals.resize(s)}():t(C.opts.wordPasteKeepFormatting),!1})},clean:t,_wordClean:a}}});
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(w){"use strict";w=w&&w.hasOwnProperty("default")?w["default"]:w,Object.assign(w.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}),w.PLUGINS.wordPaste=function(N){var l,n,d=N.$,s="word_paste",u={};function t(e){var t=N.opts.wordAllowedStyleProps;e||(N.opts.wordAllowedStyleProps=[]),0===n.indexOf("<colgroup>")&&(n="<table>"+n+"</table>"),n=a(n=n.replace(/<span[\n\r ]*style='mso-spacerun:yes'>([\r\n\u00a0 ]*)<\/span>/g,function(e,t){for(var r="",i=0;i++<t.length;)r+="&nbsp;";return r}),N.paste.getRtfClipboard());var r=N.doc.createElement("DIV");r.innerHTML=n,N.html.cleanBlankSpaces(r),n=r.innerHTML,n=(n=N.paste.cleanEmptyTagsAndDivs(n)).replace(/\u200b/g,""),function i(){N.modals.hide(s)}(),N.paste.clean(n,!0,!0),N.opts.wordAllowedStyleProps=t}function C(e){e.parentNode&&e.parentNode.removeChild(e)}function p(e,t){if(t(e))for(var r=e.firstChild;r;){var i=r,n=r.previousSibling;r=r.nextSibling,p(i,t),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:e.firstChild&&(r=e.firstChild.nextSibling)):r=n?n.nextSibling:e.firstChild}}function H(e){if(!e.getAttribute("style")||!/mso-list:[\s]*l/gi.test(e.getAttribute("style").replace(/\n/gi,"")))return!1;try{if(!e.querySelector('[style="mso-list:Ignore"]'))return!!(e.outerHTML&&0<=e.outerHTML.indexOf("\x3c!--[if !supportLists]--\x3e"))}catch(t){return!1}return!0}function O(e){return e.getAttribute("style").replace(/\n/gi,"").replace(/.*level([0-9]+?).*/gi,"$1")}function I(e,i){var t=e.cloneNode(!0);if(-1!==["H1","H2","H3","H4","H5","H6"].indexOf(e.tagName)){var r=document.createElement(e.tagName.toLowerCase());r.setAttribute("style",e.getAttribute("style")),r.innerHTML=t.innerHTML,t.innerHTML=r.outerHTML}p(t,function(e){if(e.nodeType==Node.COMMENT_NODE&&(N.browser.msie||N.browser.safari||N.browser.edge))try{if("[if !supportLists]"===e.data){for(e=e.nextSibling;e&&e.nodeType!==Node.COMMENT_NODE;){var t=e.nextSibling;e.parentNode.removeChild(e),e=t}e&&e.nodeType==Node.COMMENT_NODE&&e.parentNode.removeChild(e)}}catch(r){}return e.nodeType===Node.ELEMENT_NODE&&("mso-list:\nIgnore"===e.getAttribute("style")&&e.setAttribute("style","mso-list:Ignore"),"mso-list:Ignore"===e.getAttribute("style")&&e.parentNode.removeChild(e),e.setAttribute("style",function n(e){var r="",i=e.getAttribute("style");i&&["line-height","font-family","font-size","color","background"].forEach(function(e){var t=i.match(new RegExp(e+":.*(;|)"));t&&(r+=t[0]+";")});return r}(e)),h(e,i)),!0});var n=t.innerHTML;return n=n.replace(/<!--[\s\S]*?-->/gi,"")}function y(e,t){for(var r=document.createElement(t),i=0;i<e.attributes.length;i++){var n=e.attributes[i].name;r.setAttribute(n,e.getAttribute(n))}return r.innerHTML=e.innerHTML,e.parentNode.replaceChild(r,e),r}function A(e){var t=e.getAttribute("align");t&&(e.style["text-align"]=t,e.removeAttribute("align"))}function E(e){return e.replace(/\n|\r|\n\r|&quot;/g,"")}function T(e,t,r){if(t){var i=e.getAttribute("style");i&&";"!==i.slice(-1)&&(i+=";"),t&&";"!==t.slice(-1)&&(t+=";"),t=t.replace(/\n/gi,"");var n=null;n=r?(i||"")+t:t+(i||""),e.setAttribute("style",n)}}var c=null;function f(e,t,r){for(var i=e.split(r),n=1;n<i.length;n++){var a=i[n];if(1<(a=a.split("shplid")).length){a=a[1];for(var l="",s=0;s<a.length&&"\\"!==a[s]&&"{"!==a[s]&&" "!==a[s]&&"\r"!==a[s]&&"\n"!==a[s];)l+=a[s],s++;var o=a.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 g=void 0;if(2<f.length&&-1!==f[0].indexOf("blipuid"))g=f[1].split(" ");else{if((g=f[0].split(" "))&&g.length<2)continue;g.shift()}var u=g.join("");c[t+l]={image_hex:u,image_type:d}}}}function m(e,t){if(t){var r;if("IMG"===e.tagName){var i=e.getAttribute("src");if(!i||-1===i.indexOf("file://"))return;if(0===i.indexOf("file://")&&N.helpers.isURL(e.getAttribute("alt")))return void e.setAttribute("src",e.getAttribute("alt"));(r=u[e.getAttribute("v:shapes")])||(r=e.getAttribute("v:shapes"),e.parentNode&&e.parentNode.parentNode&&0<=e.parentNode.parentNode.innerHTML.indexOf("msEquation")&&(r=null))}else r=e.parentNode.getAttribute("o:spid");if(e.removeAttribute("height"),r){!function s(e){c={},f(e,"i","\\shppict"),f(e,"s","\\shp{")}(t);var n=c[r.substring(7)];if(n){var a=function o(e){for(var t=e.match(/[0-9a-f]{2}/gi),r=[],i=0;i<t.length;i++)r.push(String.fromCharCode(parseInt(t[i],16)));var n=r.join("");return btoa(n)}(n.image_hex),l="data:"+n.image_type+";base64,"+a;"IMG"===e.tagName?(e.src=l,e.setAttribute("data-fr-image-pasted",!0)):d(e.parentNode).before('<img data-fr-image-pasted="true" src="'+l+'" style="'+e.parentNode.getAttribute("style")+'">').remove()}}}}function h(e,t){var r=e.tagName,i=r.toLowerCase();e.firstElementChild&&("I"===e.firstElementChild.tagName?y(e.firstElementChild,"em"):"B"===e.firstElementChild.tagName&&y(e.firstElementChild,"strong"));if(-1!==["SCRIPT","APPLET","EMBED","NOFRAMES","NOSCRIPT"].indexOf(r))return C(e),!1;for(var n=["META","LINK","XML","ST1:","O:","W:","FONT"],a=0;a<n.length;a++)if(-1!==r.indexOf(n[a]))return e.innerHTML&&(e.outerHTML=e.innerHTML),C(e),!1;if("TD"!==r){var l=e.getAttribute("class")||"MsoNormal";if(t&&l){for(var s=(l=E(l)).split(" "),o=0;o<s.length;o++){var d=[],f="."+s[o];d.push(f),f=i+f,d.push(f);for(var g=0;g<d.length;g++)t[d[g]]&&T(e,t[d[g]])}e.removeAttribute("class")}t&&t[i]&&T(e,t[i])}if(-1!==["P","H1","H2","H3","H4","H5","H6","PRE"].indexOf(r)){var u=e.getAttribute("class");if(u&&(t&&t[r.toLowerCase()+"."+u]&&T(e,t[r.toLowerCase()+"."+u]),-1!==u.toLowerCase().indexOf("mso"))){var p=E(u);(p=p.replace(/[0-9a-z-_]*mso[0-9a-z-_]*/gi,""))?e.setAttribute("class",p):e.removeAttribute("class")}var c=e.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")}A(e)}if("TR"===r&&function x(e,t){N.node.clearAttributes(e);for(var r=e.firstElementChild,i=0,n=!1,a=null;r;){r.firstElementChild&&-1!==r.firstElementChild.tagName.indexOf("W:")&&(r.innerHTML=r.firstElementChild.innerHTML),(a=r.getAttribute("width"))||n||(n=!0),i+=parseInt(a,10),(!r.firstChild||r.firstChild&&r.firstChild.data===w.UNICODE_NBSP)&&(r.firstChild&&C(r.firstChild),r.innerHTML="<br>");for(var l=r.firstElementChild,s=1===r.children.length;l;)"P"!==l.tagName||H(l)||s&&A(l),l=l.nextElementSibling;if(t){var o=r.getAttribute("class");if(o){var d=(o=E(o)).match(/xl[0-9]+/gi);if(d){var f="."+d[0];t[f]&&T(r,t[f])}}t.td&&T(r,t.td)}var g=r.getAttribute("style");g&&(g=E(g))&&";"!==g.slice(-1)&&(g+=";");var u=r.getAttribute("valign");if(!u&&g){var p=g.match(/vertical-align:.+?[; "]{1,1}/gi);p&&(u=p[p.length-1].replace(/vertical-align:(.+?)[; "]{1,1}/gi,"$1"))}var c=null;if(g){var m=g.match(/text-align:.+?[; "]{1,1}/gi);m&&(c=m[m.length-1].replace(/text-align:(.+?)[; "]{1,1}/gi,"$1")),"general"===c&&(c=null)}var h=null;if(g){var v=g.match(/background:.+?[; "]{1,1}/gi);v&&(h=v[v.length-1].replace(/background:(.+?)[; "]{1,1}/gi,"$1"))}var b=r.getAttribute("colspan"),y=r.getAttribute("rowspan");b&&r.setAttribute("colspan",b),y&&r.setAttribute("rowspan",y),u&&(r.style["vertical-align"]=u),c&&(r.style["text-align"]=c),h&&(r.style["background-color"]=h),a&&r.setAttribute("width",a),r=r.nextElementSibling}for(r=e.firstElementChild;r;)a=r.getAttribute("width"),n?r.removeAttribute("width"):r.setAttribute("width",100*parseInt(a,10)/i+"%"),r=r.nextElementSibling}(e,t),"A"!==r||e.attributes.getNamedItem("href")||e.attributes.getNamedItem("name")||!e.innerHTML||(e.outerHTML=e.innerHTML),"A"==r&&e.getAttribute("href")&&e.querySelector("img"))for(var h=e.querySelectorAll("span"),v=0;v<h.length;v++)h[v].innerText||(h[v].outerHTML=h[v].innerHTML);if("TD"!==r&&"TH"!==r||e.innerHTML||(e.innerHTML="<br>"),"TABLE"===r&&(e.style.width=e.style.width),e.getAttribute("lang")&&e.removeAttribute("lang"),e.getAttribute("style")&&-1!==e.getAttribute("style").toLowerCase().indexOf("mso")){var b=E(e.getAttribute("style"));(b=b.replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi,""))?e.setAttribute("style",b):e.removeAttribute("style")}return!0}function a(e,t){0<=e.indexOf("<html")&&(e=e.replace(/[.\s\S\w\W<>]*(<html[^>]*>[.\s\S\w\W<>]*<\/html>)[.\s\S\w\W<>]*/i,"$1")),function f(e){for(var t=e.split("v:shape"),r=1;r<t.length;r++){var i=t[r],n=i.split(' id="')[1];if(n&&1<n.length){n=n.split('"')[0];var a=i.split(' o:spid="')[1];a&&1<a.length&&(a=a.split('"')[0],u[n]=a)}}}(e);var r=(new DOMParser).parseFromString(e,"text/html"),i=r.head,n=r.body,s=function g(e){var t={},r=e.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 a=i[n],l=a.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),s=a.replace(/[\S ]+\s+{([\s\S]+?)}/gi,"$1");l=l.replace(/^[\s]|[\s]$/gm,""),s=s.replace(/^[\s]|[\s]$/gm,""),l=l.replace(/\n|\r|\n\r/g,""),s=s.replace(/\n|\r|\n\r/g,"");for(var o=l.split(", "),d=0;d<o.length;d++)t[o[d]]=s}}return t}(i);p(n,function(e){if(e.nodeType===Node.TEXT_NODE&&/\n|\u00a0|\r/.test(e.data)){if(!/\S| /.test(e.data)&&!/[\u00a0]+/.test(e.data))return e.data===w.UNICODE_NBSP?(e.data="\u200b",!0):1===e.data.length&&10===e.data.charCodeAt(0)?(e.data=" ",!0):(C(e),!1);e.data=e.data.replace(/\n|\r/gi," ")}return!0}),p(n,function(e){return e.nodeType!==Node.ELEMENT_NODE||"V:IMAGEDATA"!==e.tagName&&"IMG"!==e.tagName||m(e,t),!0});for(var a=n.querySelectorAll("ul > ul, ul > ol, ol > ul, ol > ol"),l=a.length-1;0<=l;l--)a[l].previousElementSibling&&"LI"===a[l].previousElementSibling.tagName&&a[l].previousElementSibling.appendChild(a[l]);p(n,function(e){if(e.nodeType===Node.TEXT_NODE)return e.data=e.data.replace(/<br>(\n|\r)/gi,"<br>"),!1;if(e.nodeType===Node.ELEMENT_NODE){if(H(e)){var t=e.parentNode,r=e.previousSibling,i=function M(e,t,r,i){var n,a,l=/[0-9a-zA-Z]./gi,s=!1,o=navigator.userAgent.toLowerCase();-1!=o.indexOf("safari")&&(o=-1<o.indexOf("chrome")?1:"safari"),e.innerHTML.includes("mso-list:\nIgnore")&&(e.innerHTML=e.innerHTML.replace(/mso-list:\nIgnore/gi,"mso-list:Ignore"));var d,f,g,u,p=e.querySelector('span[style="mso-list:Ignore"]');null==p&&"safari"==o&&(p=e.querySelector('span[lang="PT-BR"]'));var c;p&&(s=s||l.test(p.textContent)),null!==p&&(c=p.textContent.trim().split(".")[0]),g=1==s?("1"==(c=p.textContent.trim().split(".")[0])?u="decimal;":"i"==c?u="lower-roman;":"I"==c?u="upper-roman;":"o"==c?u="circle;":c.match(/^v$/)||(c.match(/^[a-z]$/)||c.match(/^[a-z]\)$/)?u="lower-alpha;":(c.match(/^[A-Z]$/)||c.match(/^[A-Z]\)$/))&&(u="upper-alpha;")),u="list-style-type: "+u,"ol"):(null!=p&&(c=p.textContent.trim().split(".")[0]),"\xa7"==c?u="square;":"\xb7"==c&&(u="disc;"),u="list-style-type: "+u,"ul");var m,h="";p==undefined||p.textContent==undefined||isNaN(parseInt(p.textContent.trim().split(".")[1],10))||(h=' class="decimal_type" ');var v,b=O(e),y=e.style.marginLeft;if(y.includes("in")?(v="in",y=parseFloat(y)-.5):y.includes("pt")&&(v="px",y=parseFloat(y)-10),1==b)if(m=u?"<"+g+' style = "'+u+"; margin-left:"+y+v+';">':"<"+g+' style="margin-left:'+y+v+';">',"list-style-type: upper-alpha;"==u){var x=c.charCodeAt(0)-64;m=u?"<"+g+h+' start="'+x+'" style = "'+u+" margin-left:"+y+v+';">':"<"+g+">"}else if("list-style-type: lower-alpha;"==u){var N=c.charCodeAt(0)-96;m=u?"<"+g+h+' start="'+N+'" style = "'+u+"margin-left:"+y+v+';">':"<"+g+">"}else m=u?"<"+g+h+' style = "'+u+";margin-left:"+y+v+';">':"<"+g+' style="margin-left:'+y+v+';">';else if("list-style-type: upper-alpha;"==u){var C=c.charCodeAt(0)-64;m=u?"<"+g+h+' style = "'+u+' start="'+C+'">':"<"+g+">"}else if("list-style-type: lower-alpha;"==u){var A=c.charCodeAt(0)-96;m=u?"<"+g+h+' style = "'+u+' start="'+A+'">':"<"+g+">"}else m=u?"<"+g+h+' style = "'+u+'">':"<"+g+">";for(var E=!1;e;){if(!H(e)){if(e.outerHTML&&0<e.outerHTML.indexOf("mso-bookmark")&&0==(e.textContent||"").length){e=e.nextElementSibling;continue}break}var T=O(e);if((r=r||T)<T)m+=(f=M(e,t,T,e.style.marginLeft)).el.outerHTML,e=f.currentNode;else{if(T<r)break;e.firstElementChild&&e.firstElementChild.firstElementChild&&e.firstElementChild.firstElementChild.firstChild&&(l.lastIndex=0),a&&a.firstElementChild&&a.firstElementChild.firstElementChild&&a.firstElementChild.firstElementChild.firstChild&&(l.lastIndex=0,n=l.test(a.firstElementChild.firstElementChild.firstChild.data||a.firstElementChild.firstElementChild.firstChild.firstChild&&a.firstElementChild.firstElementChild.firstChild.firstChild.data||""));var w=!1;(!i&&!e.style.marginLeft||i&&e.style.marginLeft&&i===e.style.marginLeft)&&(w=!0),i=e.style.marginLeft,w||n===undefined?(d=I(e,t),e.nextSibling.innerText==undefined||e.nextSibling.innerText==undefined||m.includes('class="decimal_type"')||isNaN(parseInt(e.nextSibling.innerText.trim().split(".")[1],10))||(m=m.substring(3,0)+' class="decimal_type"'+m.substring(3,m.length)),m+="<li>"+d+"</li>"):(1==T&&(m+="</"+g+">",E=!0,a=null),m+=(f=M(e,t,T,e.style.marginLeft)).el.outerHTML,e=f.currentNode);var S=e&&e.nextElementSibling;if(S&&(a=S.previousElementSibling),e&&!H(e)){if(e.outerHTML&&0<e.outerHTML.indexOf("mso-bookmark")&&0==(e.textContent||"").length){e=e.nextElementSibling;continue}break}e&&e.parentNode&&e.parentNode.removeChild(e),e=S}}E||(m+="</"+g+">");var L=document.createElement("div");return L.innerHTML=m,{el:L,currentNode:e}}(e,s).el,n=null;return(n=r?r.nextSibling:t.firstChild)?t.insertBefore(i,n):t.appendChild(i),!1}return"FONT"===e.tagName&&s["."+e.getAttribute("class")]&&(e=y(e,"span")),h(e,s)}if(e.nodeType!==Node.COMMENT_NODE)return!0;if(-1<e.data.indexOf("[if !supportLineBreakNewLine]"))for(var a=e.nextSibling;a;)(a=e.nextSibling)&&C(a),a.data&&-1<a.data.indexOf("[endif]")&&(a=null);if(-1<e.data.indexOf("[if supportFields]")&&-1<e.data.indexOf("FORMCHECKBOX")){var l=document.createElement("input");l.type="checkbox",e.parentNode.insertBefore(l,e.nextSibling)}return C(e),!1}),p(n,function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=e.tagName;if(!e.innerHTML&&-1===["BR","IMG","INPUT"].indexOf(t)){for(var r=e.parentNode;r&&(C(e),!(e=r).innerHTML)&&"TD"!==e.parentNode.tagName;)r=e.parentNode;return!1}!function f(e){var t=e.getAttribute("style");if(t){(t=E(t))&&";"!==t.slice(-1)&&(t+=";");var r=t.match(/(^|\S+?):.+?;{1,1}/gi);if(r){for(var i={},n=0;n<r.length;n++){var a=r[n].split(":");2===a.length&&("text-align"===a[0]&&"SPAN"===e.tagName||(i[a[0]]=a[1]))}var l="";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(d){o=null}o&&(o=Math.round(1.33*o),i[s]=o+"px;")}l+=s+":"+i[s]}l&&e.setAttribute("style",l)}}}(e)}return!0}),p(n,function(e){if(e&&"A"===e.nodeName&&""===e.href){for(var t=document.createDocumentFragment();e.firstChild;)t.appendChild(e.firstChild);e.parentNode.replaceChild(t,e)}return!0});var o=n.outerHTML,d=N.opts.htmlAllowedStyleProps;return N.opts.htmlAllowedStyleProps=N.opts.wordAllowedStyleProps,o=N.clean.html(o,N.opts.wordDeniedTags,N.opts.wordDeniedAttrs,!1),N.opts.htmlAllowedStyleProps=d,o}return{_init:function e(){N.events.on("paste.wordPaste",function(e){return n=e,N.opts.wordPasteModal?function a(){if(!l){var e='<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> '+N.language.translate("Word Paste Detected")+"</h4>",t=function n(){var e='<div class="fr-word-paste-modal" style="padding: 20px 20px 10px 20px;">';return e+='<p style="text-align: left;">'+N.language.translate("The pasted content is coming from a Microsoft Word document. Do you want to keep the format or clean it up?")+"</p>",e+='<div style="text-align: right; margin-top: 50px;"><button class="fr-remove-word fr-command">'+N.language.translate("Clean")+'</button> <button class="fr-keep-word fr-command">'+N.language.translate("Keep")+"</button></div>",e+="</div>"}(),r=N.modals.create(s,e,t),i=r.$body;l=r.$modal,r.$modal.addClass("fr-middle"),N.events.bindClick(i,"button.fr-remove-word",function(){var e=l.data("instance")||N;e.wordPaste.clean()}),N.events.bindClick(i,"button.fr-keep-word",function(){var e=l.data("instance")||N;e.wordPaste.clean(!0)}),N.events.$on(d(N.o_win),"resize",function(){N.modals.resize(s)})}N.modals.show(s),N.modals.resize(s)}():t(N.opts.wordPasteKeepFormatting),!1})},clean:t,_wordClean:a}}});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
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.POPUP_TEMPLATES,{"embedly.insert":"[_BUTTONS_][_URL_LAYER_]","embedly.edit":"[_BUTTONS_]"}),Object.assign(E.DEFAULTS,{embedlyKey:null,embedlyInsertButtons:["embedlyBack","|"],embedlyEditButtons:["embedlyRemove"],embedlyScriptPath:"https://cdn.embedly.com/widgets/platform.js"}),E.PLUGINS.embedly=function(o){var i,d,l=o.$;function t(e){o.events.on("html.processGet",s),e&&o.html._setHtml(o.$el,o.html.get()),o.events.$on(o.$el,"click touchend","div.fr-embedly",a),o.events.on("mousedown window.mousedown",b),o.events.on("window.touchmove",c),o.events.on("mouseup window.mouseup",u),o.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&u()}),o.events.on("blur video.hideResizer commands.undo commands.redo element.dropped",function(){u(!0)}),o.events.on("element.beforeDrop",function(e){if(e.hasClass("fr-embedly"))return e.html(e.attr("data-original-embed")),e}),o.events.on("keydown",function(e){var t=e.which;return!i||t!=E.KEYCODE.BACKSPACE&&t!=E.KEYCODE.DELETE?i&&t==E.KEYCODE.ESC?(u(!0),e.preventDefault(),!1):i&&t!=E.KEYCODE.F10&&!o.keys.isBrowserAction(e)?(e.preventDefault(),!1):void 0:(e.preventDefault(),m(),!1)},!0),o.events.on("toolbar.esc",function(){if(i)return o.events.disableBlur(),o.events.focus(),!1},!0),o.events.on("toolbar.focusEditor",function(){if(i)return!1},!0),o.events.on("snapshot.after",function(e){var t=o.doc.createElement("div");t.innerHTML=e.html,s(t),e.html=t.innerHTML}),o.win.embedly&&(o.win.embedly("on","card.rendered",function(e){n(e)}),o.win.embedly("on","card.resize",function(e){n(e)})),f(!0)}function n(e){var t=l(e);t.parents(".fr-embedly").attr("contenteditable",!1).attr("draggable",!0).addClass("fr-draggable").css("height",t.height()).addClass("fr-draggable"),o.opts.iframe&&o.size.syncIframe()}function a(e){i=l(this),function s(){d||function n(){o.shared.$embedly_resizer?(d=o.shared.$embedly_resizer,o.shared.$embedly_overlay,o.events.on("destroy",function(){l("body").first().append(d)},!0)):(o.shared.$embedly_resizer=l(document.createElement("div")).attr("class","fr-embedly-resizer"),d=o.shared.$embedly_resizer,o.events.$on(d,"mousedown",function(e){e.stopPropagation()},!0));o.events.on("shared.destroy",function(){d.html("").removeData().remove(),d=null},!0)}();(o.$wp||o.$sc).append(d),d.data("instance",o);var e=0,t=0;o.opts.iframe&&(t=o.helpers.getPX(o.$wp.find(".fr-iframe").css("padding-top")),e=o.helpers.getPX(o.$wp.find(".fr-iframe").css("padding-left")));d.css("top",(o.opts.iframe?i.offset().top+t-1+o.$iframe.position().top:i.offset().top-o.$wp.offset().top-1)+o.$wp.scrollTop()).css("left",(o.opts.iframe?i.offset().left+e-1:i.offset().left-o.$wp.offset().left-1)+o.$wp.scrollLeft()).css("width",i.outerWidth()).css("height",i.height()).addClass("fr-active")}(),function r(){var e=o.popups.get("embedly.edit");e||(e=function s(){var e="";if(0<o.opts.embedlyEditButtons.length){var t={buttons:e+='<div class="fr-buttons">\n '.concat(o.button.buildList(o.opts.embedlyEditButtons),"\n </div>")},n=o.popups.create("embedly.edit",t);return o.events.$on(o.$wp,"scroll.emebdly-edit",function(){i&&o.popups.isVisible("embedly.edit")&&(o.events.disableBlur(),function t(e){a.call(e.get(0))}(i))}),n}return!1}());if(e){o.popups.setContainer("embedly.edit",o.$sc),o.popups.refresh("embedly.edit");var t=i.offset().left+i.outerWidth()/2,n=i.offset().top+i.outerHeight();o.popups.show("embedly.edit",t,n,i.outerHeight())}}()}function s(e){if(e&&o.node.hasClass(e,"fr-embedly"))e.innerHTML=e.getAttribute("data-original-embed"),e.removeAttribute("draggable"),e.removeAttribute("contenteditable"),e.setAttribute("class",(e.getAttribute("class")||"").replace("fr-draggable",""));else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var t=e.querySelectorAll(".fr-embedly"),n=0;n<t.length;n++)s(t[n])}function f(e){if(e)return o.popups.onRefresh("embedly.insert",r),!0;var t="";0<o.opts.embedlyInsertButtons.length&&(t+='<div class="fr-buttons fr-tabs">',t+=o.button.buildList(o.opts.embedlyInsertButtons),t+="</div>");var n={buttons:t,url_layer:'<div class="fr-embedly-layer fr-active fr-layer" id="fr-embedly-layer-'+o.id+'"><div class="fr-input-line"><input id="fr-embedly-layer-text-'+o.id+'" type="text" placeholder="'+o.language.translate("Paste in a URL to embed")+'" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="embedlyInsert" tabIndex="2" role="button">'+o.language.translate("Insert")+"</button></div></div>"};return o.popups.create("embedly.insert",n)}function r(){o.popups.get("embedly.insert").find(".fr-embedly-layer input").val("").trigger("change")}function e(e){if(e.length){var t="<a href='"+e+"' data-card-branding='0' class='embedly-card'"+(o.opts.embedlyKey?" data-card-key='"+o.opts.embedlyKey+"'":"")+"></a>";o.html.insert('<div class="fr-embedly fr-draggable" draggable="true" contenteditable="false" data-original-embed="'+t+'">'+t+"</div>"),o.popups.hideAll()}}function m(){if(i&&!1!==o.events.trigger("embedly.beforeRemove",[i])){var e=i;o.popups.hideAll(),u(!0),o.selection.setBefore(e.get(0))||o.selection.setAfter(e.get(0)),e.remove(),o.selection.restore(),o.html.fillEmptyBlocks(),o.undo.saveStep(),o.events.trigger("video.removed",[e])}}function u(e){i&&(function t(){return o.shared.embedly_exit_flag}()||!0===e)&&(d.removeClass("fr-active"),o.toolbar.enable(),i.removeClass("fr-active"),i=null,c())}function b(){o.shared.embedly_exit_flag=!0}function c(){o.shared.embedly_exit_flag=!1}return o.shared.embedly_exit_flag=!1,{_init:function p(){if(!o.$wp)return!1;if("undefined"!=typeof embedly)t(!0);else if(o.shared.embedlyLoaded)o.shared.embedlyCallbacks.push(t);else{o.shared.embedlyLoaded=!0,o.shared.embedlyCallbacks=[],o.shared.embedlyCallbacks.push(t);var e=o.doc.createElement("script");e.type="text/javascript",e.src=o.opts.embedlyScriptPath,e.innerText="",e.onload=function(){if(o.shared.embedlyCallbacks)for(var e=0;e<o.shared.embedlyCallbacks.length;e++)o.shared.embedlyCallbacks[e]()},o.doc.getElementsByTagName("head")[0].appendChild(e)}},showInsertPopup:function y(){var e=o.$tb.find('.fr-command[data-cmd="embedly"]'),t=o.popups.get("embedly.insert");if(t||(t=f()),!t.hasClass("fr-active"))if(o.popups.refresh("embedly.insert"),o.popups.setContainer("embedly.insert",o.$tb),e.isVisible()){var n=o.button.getPosition(e),s=n.left,r=n.top;o.popups.show("embedly.insert",s,r,e.outerHeight())}else o.position.forSelection(t),o.popups.show("embedly.insert")},insert:function h(){e(o.popups.get("embedly.insert").find(".fr-embedly-layer input").val())},remove:m,get:function v(){return i},add:e,back:function g(){i?(o.events.disableBlur(),i.trigger("click")):(o.events.disableBlur(),o.selection.restore(),o.events.enableBlur(),o.popups.hide("embedly.insert"),o.toolbar.showInline())}}},E.DefineIcon("embedly",{NAME:"share-alt",SVG_KEY:"insertEmbed"}),E.RegisterCommand("embedly",{undo:!0,focus:!0,title:"Embed URL",popup:!0,callback:function(){this.popups.isVisible("embedly.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("embedly.insert")):this.embedly.showInsertPopup()},plugin:"embedly"}),E.RegisterCommand("embedlyInsert",{undo:!0,focus:!0,callback:function(){this.embedly.insert()}}),E.DefineIcon("embedlyRemove",{NAME:"trash",SVG_KEY:"remove"}),E.RegisterCommand("embedlyRemove",{title:"Remove",undo:!1,callback:function(){this.embedly.remove()}}),E.DefineIcon("embedlyBack",{NAME:"arrow-left",SVG_KEY:"back"}),E.RegisterCommand("embedlyBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.embedly.back()},refresh:function(e){this.embedly.get()||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}})});
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * froala_editor v3.2.2 (https://www.froala.com/wysiwyg-editor)
2
+ * froala_editor v3.2.7 (https://www.froala.com/wysiwyg-editor)
3
3
  * License https://froala.com/wysiwyg-editor/terms/
4
- * Copyright 2014-2020 Froala Labs
4
+ * Copyright 2014-2021 Froala Labs
5
5
  */
6
6
 
7
- !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],o):o(e.FroalaEditor)}(this,function(g){"use strict";g=g&&g.hasOwnProperty("default")?g["default"]:g,Object.assign(g.DEFAULTS,{fontAwesomeTemplate:'<i class="fa fa-[NAME] fr-deletable" aria-hidden="true"></i>',fontAwesomeSets:[{title:"Web Application Icons",icon:"address-book",list:["address-book","address-book-o","address-card","address-card-o","adjust","american-sign-language-interpreting","anchor","archive","area-chart","arrows","arrows-h","arrows-v","asl-interpreting ","assistive-listening-systems","asterisk","at","audio-description","automobile ","balance-scale","ban","bank ","bar-chart","bar-chart-o ","barcode","bars","bath","bathtub ","battery ","battery-0 ","battery-1 ","battery-2 ","battery-3 ","battery-4 ","battery-empty","battery-full","battery-half","battery-quarter","battery-three-quarters","bed","beer","bell","bell-o","bell-slash","bell-slash-o","bicycle","binoculars","birthday-cake","blind","bluetooth","bluetooth-b","bolt","bomb","book","bookmark","bookmark-o","braille","briefcase","bug","building","building-o","bullhorn","bullseye","bus","cab ","calculator","calendar","calendar-check-o","calendar-minus-o","calendar-o","calendar-plus-o","calendar-times-o","camera","camera-retro","car","caret-square-o-down","caret-square-o-left","caret-square-o-right","caret-square-o-up","cart-arrow-down","cart-plus","cc","certificate","check","check-circle","check-circle-o","check-square","check-square-o","child","circle","circle-o","circle-o-notch","circle-thin","clock-o","clone","close ","cloud","cloud-download","cloud-upload","code","code-fork","coffee","cog","cogs","comment","comment-o","commenting","commenting-o","comments","comments-o","compass","copyright","creative-commons","credit-card","credit-card-alt","crop","crosshairs","cube","cubes","cutlery","dashboard ","database","deaf","deafness ","desktop","diamond","dot-circle-o","download","drivers-license ","drivers-license-o ","edit ","ellipsis-h","ellipsis-v","envelope","envelope-o","envelope-open","envelope-open-o","envelope-square","eraser","exchange","exclamation","exclamation-circle","exclamation-triangle","external-link","external-link-square","eye","eye-slash","eyedropper","fax","feed ","female","fighter-jet","file-archive-o","file-audio-o","file-code-o","file-excel-o","file-image-o","file-movie-o ","file-pdf-o","file-photo-o ","file-picture-o ","file-powerpoint-o","file-sound-o ","file-video-o","file-word-o","file-zip-o ","film","filter","fire","fire-extinguisher","flag","flag-checkered","flag-o","flash ","flask","folder","folder-o","folder-open","folder-open-o","frown-o","futbol-o","gamepad","gavel","gear ","gears ","gift","glass","globe","graduation-cap","group ","hand-grab-o ","hand-lizard-o","hand-paper-o","hand-peace-o","hand-pointer-o","hand-rock-o","hand-scissors-o","hand-spock-o","hand-stop-o ","handshake-o","hard-of-hearing ","hashtag","hdd-o","headphones","heart","heart-o","heartbeat","history","home","hotel ","hourglass","hourglass-1 ","hourglass-2 ","hourglass-3 ","hourglass-end","hourglass-half","hourglass-o","hourglass-start","i-cursor","id-badge","id-card","id-card-o","image ","inbox","industry","info","info-circle","institution ","key","keyboard-o","language","laptop","leaf","legal ","lemon-o","level-down","level-up","life-bouy ","life-buoy ","life-ring","life-saver ","lightbulb-o","line-chart","location-arrow","lock","low-vision","magic","magnet","mail-forward ","mail-reply ","mail-reply-all ","male","map","map-marker","map-o","map-pin","map-signs","meh-o","microchip","microphone","microphone-slash","minus","minus-circle","minus-square","minus-square-o","mobile","mobile-phone ","money","moon-o","mortar-board ","motorcycle","mouse-pointer","music","navicon ","newspaper-o","object-group","object-ungroup","paint-brush","paper-plane","paper-plane-o","paw","pencil","pencil-square","pencil-square-o","percent","phone","phone-square","photo ","picture-o","pie-chart","plane","plug","plus","plus-circle","plus-square","plus-square-o","podcast","power-off","print","puzzle-piece","qrcode","question","question-circle","question-circle-o","quote-left","quote-right","random","recycle","refresh","registered","remove ","reorder ","reply","reply-all","retweet","road","rocket","rss","rss-square","s15 ","search","search-minus","search-plus","send ","send-o ","server","share","share-alt","share-alt-square","share-square","share-square-o","shield","ship","shopping-bag","shopping-basket","shopping-cart","shower","sign-in","sign-language","sign-out","signal","signing ","sitemap","sliders","smile-o","snowflake-o","soccer-ball-o ","sort","sort-alpha-asc","sort-alpha-desc","sort-amount-asc","sort-amount-desc","sort-asc","sort-desc","sort-down ","sort-numeric-asc","sort-numeric-desc","sort-up ","space-shuttle","spinner","spoon","square","square-o","star","star-half","star-half-empty ","star-half-full ","star-half-o","star-o","sticky-note","sticky-note-o","street-view","suitcase","sun-o","support ","tablet","tachometer","tag","tags","tasks","taxi","television","terminal","thermometer ","thermometer-0 ","thermometer-1 ","thermometer-2 ","thermometer-3 ","thermometer-4 ","thermometer-empty","thermometer-full","thermometer-half","thermometer-quarter","thermometer-three-quarters","thumb-tack","thumbs-down","thumbs-o-down","thumbs-o-up","thumbs-up","ticket","times","times-circle","times-circle-o","times-rectangle ","times-rectangle-o ","tint","toggle-down ","toggle-left ","toggle-off","toggle-on","toggle-right ","toggle-up ","trademark","trash","trash-o","tree","trophy","truck","tty","tv ","umbrella","universal-access","university","unlock","unlock-alt","unsorted ","upload","user","user-circle","user-circle-o","user-o","user-plus","user-secret","user-times","users","vcard ","vcard-o ","video-camera","volume-control-phone","volume-down","volume-off","volume-up","warning ","wheelchair","wheelchair-alt","wifi","window-close","window-close-o","window-maximize","window-minimize","window-restore","wrench"]},{title:"Accessibility Icons",icon:"american-sign-language-interpreting",list:["american-sign-language-interpreting","asl-interpreting ","assistive-listening-systems","audio-description","blind","braille","cc","deaf","deafness ","hard-of-hearing ","low-vision","question-circle-o","sign-language","signing ","tty","universal-access","volume-control-phone","wheelchair","wheelchair-alt"]},{title:"Hand Icons",icon:"hand-grab-o",list:["hand-grab-o ","hand-lizard-o","hand-o-down","hand-o-left","hand-o-right","hand-o-up","hand-paper-o","hand-peace-o","hand-pointer-o","hand-rock-o","hand-scissors-o","hand-spock-o","hand-stop-o ","thumbs-down","thumbs-o-down","thumbs-o-up","thumbs-up"]},{title:"Transportation Icons",icon:"ambulance",list:["ambulance","automobile ","bicycle","bus","cab ","car","fighter-jet","motorcycle","plane","rocket","ship","space-shuttle","subway","taxi","train","truck","wheelchair","wheelchair-alt"]},{title:"Gender Icons",icon:"genderless",list:["genderless","intersex ","mars","mars-double","mars-stroke","mars-stroke-h","mars-stroke-v","mercury","neuter","transgender","transgender-alt","venus","venus-double","venus-mars"]},{title:"Form Control Icons",icon:"check-square",list:["check-square","check-square-o","circle","circle-o","dot-circle-o","minus-square","minus-square-o","plus-square","plus-square-o","square","square-o"]},{title:"Payment Icons",icon:"cc-amex",list:["cc-amex","cc-diners-club","cc-discover","cc-jcb","cc-mastercard","cc-paypal","cc-stripe","cc-visa","credit-card","credit-card-alt","google-wallet","paypal"]},{title:"Chart Icons",icon:"area-chart",list:["area-chart","bar-chart","bar-chart-o ","line-chart","pie-chart"]},{title:"Currency Icons",icon:"bitcoin",list:["bitcoin ","btc","cny ","dollar ","eur","euro ","gbp","gg","gg-circle","ils","inr","jpy","krw","money","rmb ","rouble ","rub","ruble ","rupee ","shekel ","sheqel ","try","turkish-lira ","usd","viacoin","won ","yen"]},{title:"Text Editor Icons",icon:"align-center",list:["align-center","align-justify","align-left","align-right","bold","chain ","chain-broken","clipboard","columns","copy ","cut ","dedent ","eraser","file","file-o","file-text","file-text-o","files-o","floppy-o","font","header","indent","italic","link","list","list-alt","list-ol","list-ul","outdent","paperclip","paragraph","paste ","repeat","rotate-left ","rotate-right ","save ","scissors","strikethrough","subscript","superscript","table","text-height","text-width","th","th-large","th-list","underline","undo","unlink"]},{title:"Brand Icons",icon:"500px",list:["500px","adn","amazon","android","angellist","apple","bandcamp","behance","behance-square","bitbucket","bitbucket-square","bitcoin ","black-tie","bluetooth","bluetooth-b","btc","buysellads","cc-amex","cc-diners-club","cc-discover","cc-jcb","cc-mastercard","cc-paypal","cc-stripe","cc-visa","chrome","codepen","codiepie","connectdevelop","contao","css3","dashcube","delicious","deviantart","digg","dribbble","dropbox","drupal","edge","eercast","empire","envira","etsy","expeditedssl","fa ","facebook","facebook-f ","facebook-official","facebook-square","firefox","first-order","flickr","font-awesome","fonticons","fort-awesome","forumbee","foursquare","free-code-camp","ge ","get-pocket","gg","gg-circle","git","git-square","github","github-alt","github-square","gitlab","gittip ","glide","glide-g","google","google-plus","google-plus-circle ","google-plus-official","google-plus-square","google-wallet","gratipay","grav","hacker-news","houzz","html5","imdb","instagram","internet-explorer","ioxhost","joomla","jsfiddle","lastfm","lastfm-square","leanpub","linkedin","linkedin-square","linode","linux","maxcdn","meanpath","medium","meetup","mixcloud","modx","odnoklassniki","odnoklassniki-square","opencart","openid","opera","optin-monster","pagelines","paypal","pied-piper","pied-piper-alt","pied-piper-pp","pinterest","pinterest-p","pinterest-square","product-hunt","qq","quora","ra ","ravelry","rebel","reddit","reddit-alien","reddit-square","renren","resistance ","safari","scribd","sellsy","share-alt","share-alt-square","shirtsinbulk","simplybuilt","skyatlas","skype","slack","slideshare","snapchat","snapchat-ghost","snapchat-square","soundcloud","spotify","stack-exchange","stack-overflow","steam","steam-square","stumbleupon","stumbleupon-circle","superpowers","telegram","tencent-weibo","themeisle","trello","tripadvisor","tumblr","tumblr-square","twitch","twitter","twitter-square","usb","viacoin","viadeo","viadeo-square","vimeo","vimeo-square","vine","vk","wechat ","weibo","weixin","whatsapp","wikipedia-w","windows","wordpress","wpbeginner","wpexplorer","wpforms","xing","xing-square","y-combinator","y-combinator-square ","yahoo","yc ","yc-square ","yelp","yoast","youtube","youtube-play","youtube-square"]}],faButtons:["fontAwesomeBack","|"]}),Object.assign(g.POPUP_TEMPLATES,{fontAwesome:"[_BUTTONS_][_CUSTOM_LAYER_]"}),g.PLUGINS.fontAwesome=function(f){var b=f.$,r=f.opts.fontAwesomeSets[0],s=f.opts.fontAwesomeSets,a="";function i(){f.opts.toolbarInline&&0<f.opts.faButtons.length&&(a='<div class="fr-buttons fr-tabs">'.concat(f.button.buildList(f.opts.faButtons),"</div>"));var e={buttons:a,custom_layer:n()},o=f.popups.create("fontAwesome",e);return function t(m){f.events.on("popup.tab",function(e){var o=b(e.currentTarget);if(!f.popups.isVisible("fontAwesome")||!o.is("span, a"))return!0;var t,a,r,s=e.which;if(g.KEYCODE.TAB==s){if(o.is("span.fr-icon")&&e.shiftKey||o.is("a")&&!e.shiftKey){var i=m.find(".fr-buttons");t=!f.accessibility.focusToolbar(i,!!e.shiftKey)}if(!1!==t){var n=m.find("span.fr-icon:focus").first().concat(m.findVisible(" span.fr-icon").first().concat(m.find("a")));o.is("span.fr-icon")&&(n=n.not("span.fr-icon:not(:focus)")),a=n.index(o),a=e.shiftKey?((a-1)%n.length+n.length)%n.length:(a+1)%n.length,r=n.get(a),f.events.disableBlur(),r.focus(),t=!1}}else if(g.KEYCODE.ARROW_UP==s||g.KEYCODE.ARROW_DOWN==s||g.KEYCODE.ARROW_LEFT==s||g.KEYCODE.ARROW_RIGHT==s){if(o.is("span.fr-icon")){var c=o.parent().find("span.fr-icon");a=c.index(o);var l=Math.floor(c.length/8),u=a%8,p=Math.floor(a/8),d=8*p+u,h=8*l;g.KEYCODE.ARROW_UP==s?d=((d-8)%h+h)%h:g.KEYCODE.ARROW_DOWN==s?d=(d+8)%h:g.KEYCODE.ARROW_LEFT==s?d=((d-1)%h+h)%h:g.KEYCODE.ARROW_RIGHT==s&&(d=(d+1)%h),r=b(c.get(d)),f.events.disableBlur(),r.focus(),t=!1}}else g.KEYCODE.ENTER==s&&(o.is("a")?o[0].click():f.button.exec(o),t=!1);return!1===t&&(e.preventDefault(),e.stopPropagation()),t},!0)}(o),o}function n(){return"".concat(function a(e,o,t){return'\n <div class="fr-buttons fr-tabs fr-tabs-scroll">\n '.concat(function s(e,t,a){var r="";return e.forEach(function(e){var o={elementClass:e.title===t.title?"fr-active fr-active-tab":"",title:e.title,dataCmd:"setIconCategory",dataParam1:e.title,iconValue:a.replace(/\[NAME\]/g,e.icon)};r+='<button class="fr-fa-icon-category fr-command fr-btn '.concat(o.elementClass,'" title="').concat(o.title,'" data-cmd="').concat(o.dataCmd,'" data-param1="').concat(o.dataParam1,'"</button><span>').concat(o.iconValue,"</span>")}),r}(e,o,t),"\n </div>\n ")}(s,r,f.opts.fontAwesomeTemplate),"\n ").concat(function t(e,o){return'\n <div class="fr-icon-container fr-fa-container">\n '.concat(function r(e,t){var a="";return e.list.forEach(function(e){var o={dataParam1:e,title:e,iconValue:t.replace(/\[NAME\]/g,e)};a+='<span class="fr-command fr-fa-icon fr-icon" role="button" data-cmd="insertIcon" data-param1="'.concat(o.dataParam1,'" title="').concat(o.title,'">').concat(o.iconValue,"</span>")}),a}(e,o),"\n </div>\n ")}(r,f.opts.fontAwesomeTemplate))}return{setIconCategory:function t(o){r=s.filter(function(e){return e.title===o})[0],function e(){f.popups.get("fontAwesome").html(a+n())}()},showFontAwesomePopup:function c(){var e=f.popups.get("fontAwesome");if(e||(e=i()),!e.hasClass("fr-active")){f.popups.refresh("fontAwesome"),f.popups.setContainer("fontAwesome",f.$tb);var o=f.$tb.find('.fr-command[data-cmd="fontAwesome"]'),t=f.button.getPosition(o),a=t.left,r=t.top;f.popups.show("fontAwesome",a,r,o.outerHeight())}},back:function e(){f.popups.hide("fontAwesome"),f.toolbar.showInline()}}},g.DefineIcon("fontAwesome",{NAME:"flag",SVG_KEY:"fontAwesome"}),g.RegisterCommand("fontAwesome",{title:"Font Awesome",icon:"fontAwesome",undo:!1,focus:!1,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("fontAwesome")?(this.$el.find(".fr-marker")&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("fontAwesome")):this.fontAwesome.showFontAwesomePopup()},plugin:"fontAwesome",showOnMobile:!0}),g.RegisterCommand("insertIcon",{callback:function(e,o){this.undo.saveStep(),this.html.insert("".concat(this.opts.fontAwesomeTemplate.replace(/\[NAME\]/g,o),"&nbsp;")),this.undo.saveStep(),this.popups.hide("fontAwesome")}}),g.RegisterCommand("setIconCategory",{undo:!1,focus:!1,callback:function(e,o){this.fontAwesome.setIconCategory(o)}}),g.DefineIcon("fontAwesomeBack",{NAME:"arrow-left",SVG_KEY:"back"}),g.RegisterCommand("fontAwesomeBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.fontAwesome.back()}})});
7
+ !function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],a):a(e.FroalaEditor)}(this,function(g){"use strict";g=g&&g.hasOwnProperty("default")?g["default"]:g,Object.assign(g.DEFAULTS,{fontAwesomeTemplate:'<i class="fa fa-[NAME] fr-deletable" aria-hidden="true">&nbsp;</i>',fontAwesomeTemplate5:'<i class="fa [FPREFIX] fa-[NAME] fr-deletable" aria-hidden="true">&nbsp;</i>',fontAwesomeSets:[{title:"Web Application Icons",icon:"address-book",list:["address-book","address-book-o","address-card","address-card-o","adjust","american-sign-language-interpreting","anchor","archive","area-chart","arrows","arrows-h","arrows-v","asl-interpreting ","assistive-listening-systems","asterisk","at","audio-description","automobile ","balance-scale","ban","bank ","bar-chart","bar-chart-o ","barcode","bars","bath","bathtub ","battery ","battery-0 ","battery-1 ","battery-2 ","battery-3 ","battery-4 ","battery-empty","battery-full","battery-half","battery-quarter","battery-three-quarters","bed","beer","bell","bell-o","bell-slash","bell-slash-o","bicycle","binoculars","birthday-cake","blind","bluetooth","bluetooth-b","bolt","bomb","book","bookmark","bookmark-o","braille","briefcase","bug","building","building-o","bullhorn","bullseye","bus","cab ","calculator","calendar","calendar-check-o","calendar-minus-o","calendar-o","calendar-plus-o","calendar-times-o","camera","camera-retro","car","caret-square-o-down","caret-square-o-left","caret-square-o-right","caret-square-o-up","cart-arrow-down","cart-plus","cc","certificate","check","check-circle","check-circle-o","check-square","check-square-o","child","circle","circle-o","circle-o-notch","circle-thin","clock-o","clone","close ","cloud","cloud-download","cloud-upload","code","code-fork","coffee","cog","cogs","comment","comment-o","commenting","commenting-o","comments","comments-o","compass","copyright","creative-commons","credit-card","credit-card-alt","crop","crosshairs","cube","cubes","cutlery","dashboard ","database","deaf","deafness ","desktop","diamond","dot-circle-o","download","drivers-license ","drivers-license-o ","edit ","ellipsis-h","ellipsis-v","envelope","envelope-o","envelope-open","envelope-open-o","envelope-square","eraser","exchange","exclamation","exclamation-circle","exclamation-triangle","external-link","external-link-square","eye","eye-slash","eyedropper","fax","feed ","female","fighter-jet","file-archive-o","file-audio-o","file-code-o","file-excel-o","file-image-o","file-movie-o ","file-pdf-o","file-photo-o ","file-picture-o ","file-powerpoint-o","file-sound-o ","file-video-o","file-word-o","file-zip-o ","film","filter","fire","fire-extinguisher","flag","flag-checkered","flag-o","flash ","flask","folder","folder-o","folder-open","folder-open-o","frown-o","futbol-o","gamepad","gavel","gear ","gears ","gift","glass","globe","graduation-cap","group ","hand-grab-o ","hand-lizard-o","hand-paper-o","hand-peace-o","hand-pointer-o","hand-rock-o","hand-scissors-o","hand-spock-o","hand-stop-o ","handshake-o","hard-of-hearing ","hashtag","hdd-o","headphones","heart","heart-o","heartbeat","history","home","hotel ","hourglass","hourglass-1 ","hourglass-2 ","hourglass-3 ","hourglass-end","hourglass-half","hourglass-o","hourglass-start","i-cursor","id-badge","id-card","id-card-o","image ","inbox","industry","info","info-circle","institution ","key","keyboard-o","language","laptop","leaf","legal ","lemon-o","level-down","level-up","life-bouy ","life-buoy ","life-ring","life-saver ","lightbulb-o","line-chart","location-arrow","lock","low-vision","magic","magnet","mail-forward ","mail-reply ","mail-reply-all ","male","map","map-marker","map-o","map-pin","map-signs","meh-o","microchip","microphone","microphone-slash","minus","minus-circle","minus-square","minus-square-o","mobile","mobile-phone ","money","moon-o","mortar-board ","motorcycle","mouse-pointer","music","navicon ","newspaper-o","object-group","object-ungroup","paint-brush","paper-plane","paper-plane-o","paw","pencil","pencil-square","pencil-square-o","percent","phone","phone-square","photo ","picture-o","pie-chart","plane","plug","plus","plus-circle","plus-square","plus-square-o","podcast","power-off","print","puzzle-piece","qrcode","question","question-circle","question-circle-o","quote-left","quote-right","random","recycle","refresh","registered","remove ","reorder ","reply","reply-all","retweet","road","rocket","rss","rss-square","s15 ","search","search-minus","search-plus","send ","send-o ","server","share","share-alt","share-alt-square","share-square","share-square-o","shield","ship","shopping-bag","shopping-basket","shopping-cart","shower","sign-in","sign-language","sign-out","signal","signing ","sitemap","sliders","smile-o","snowflake-o","soccer-ball-o ","sort","sort-alpha-asc","sort-alpha-desc","sort-amount-asc","sort-amount-desc","sort-asc","sort-desc","sort-down ","sort-numeric-asc","sort-numeric-desc","sort-up ","space-shuttle","spinner","spoon","square","square-o","star","star-half","star-half-empty ","star-half-full ","star-half-o","star-o","sticky-note","sticky-note-o","street-view","suitcase","sun-o","support ","tablet","tachometer","tag","tags","tasks","taxi","television","terminal","thermometer ","thermometer-0 ","thermometer-1 ","thermometer-2 ","thermometer-3 ","thermometer-4 ","thermometer-empty","thermometer-full","thermometer-half","thermometer-quarter","thermometer-three-quarters","thumb-tack","thumbs-down","thumbs-o-down","thumbs-o-up","thumbs-up","ticket","times","times-circle","times-circle-o","times-rectangle ","times-rectangle-o ","tint","toggle-down ","toggle-left ","toggle-off","toggle-on","toggle-right ","toggle-up ","trademark","trash","trash-o","tree","trophy","truck","tty","tv ","umbrella","universal-access","university","unlock","unlock-alt","unsorted ","upload","user","user-circle","user-circle-o","user-o","user-plus","user-secret","user-times","users","vcard ","vcard-o ","video-camera","volume-control-phone","volume-down","volume-off","volume-up","warning ","wheelchair","wheelchair-alt","wifi","window-close","window-close-o","window-maximize","window-minimize","window-restore","wrench"]},{title:"Accessibility Icons",icon:"american-sign-language-interpreting",list:["american-sign-language-interpreting","asl-interpreting ","assistive-listening-systems","audio-description","blind","braille","cc","deaf","deafness ","hard-of-hearing ","low-vision","question-circle-o","sign-language","signing ","tty","universal-access","volume-control-phone","wheelchair","wheelchair-alt"]},{title:"Hand Icons",icon:"hand-grab-o",list:["hand-grab-o ","hand-lizard-o","hand-o-down","hand-o-left","hand-o-right","hand-o-up","hand-paper-o","hand-peace-o","hand-pointer-o","hand-rock-o","hand-scissors-o","hand-spock-o","hand-stop-o ","thumbs-down","thumbs-o-down","thumbs-o-up","thumbs-up"]},{title:"Transportation Icons",icon:"ambulance",list:["ambulance","automobile ","bicycle","bus","cab ","car","fighter-jet","motorcycle","plane","rocket","ship","space-shuttle","subway","taxi","train","truck","wheelchair","wheelchair-alt"]},{title:"Gender Icons",icon:"genderless",list:["genderless","intersex ","mars","mars-double","mars-stroke","mars-stroke-h","mars-stroke-v","mercury","neuter","transgender","transgender-alt","venus","venus-double","venus-mars"]},{title:"Form Control Icons",icon:"check-square",list:["check-square","check-square-o","circle","circle-o","dot-circle-o","minus-square","minus-square-o","plus-square","plus-square-o","square","square-o"]},{title:"Payment Icons",icon:"cc-amex",list:["cc-amex","cc-diners-club","cc-discover","cc-jcb","cc-mastercard","cc-paypal","cc-stripe","cc-visa","credit-card","credit-card-alt","google-wallet","paypal"]},{title:"Chart Icons",icon:"area-chart",list:["area-chart","bar-chart","bar-chart-o ","line-chart","pie-chart"]},{title:"Currency Icons",icon:"bitcoin",list:["bitcoin ","btc","cny ","dollar ","eur","euro ","gbp","gg","gg-circle","ils","inr","jpy","krw","money","rmb ","rouble ","rub","ruble ","rupee ","shekel ","sheqel ","try","turkish-lira ","usd","viacoin","won ","yen"]},{title:"Text Editor Icons",icon:"align-center",list:["align-center","align-justify","align-left","align-right","bold","chain ","chain-broken","clipboard","columns","copy ","cut ","dedent ","eraser","file","file-o","file-text","file-text-o","files-o","floppy-o","font","header","indent","italic","link","list","list-alt","list-ol","list-ul","outdent","paperclip","paragraph","paste ","repeat","rotate-left ","rotate-right ","save ","scissors","strikethrough","subscript","superscript","table","text-height","text-width","th","th-large","th-list","underline","undo","unlink"]},{title:"Brand Icons",icon:"500px",list:["500px","adn","amazon","android","angellist","apple","bandcamp","behance","behance-square","bitbucket","bitbucket-square","bitcoin ","black-tie","bluetooth","bluetooth-b","btc","buysellads","cc-amex","cc-diners-club","cc-discover","cc-jcb","cc-mastercard","cc-paypal","cc-stripe","cc-visa","chrome","codepen","codiepie","connectdevelop","contao","css3","dashcube","delicious","deviantart","digg","dribbble","dropbox","drupal","edge","eercast","empire","envira","etsy","expeditedssl","fa ","facebook","facebook-f ","facebook-official","facebook-square","firefox","first-order","flickr","font-awesome","fonticons","fort-awesome","forumbee","foursquare","free-code-camp","ge ","get-pocket","gg","gg-circle","git","git-square","github","github-alt","github-square","gitlab","gittip ","glide","glide-g","google","google-plus","google-plus-circle ","google-plus-official","google-plus-square","google-wallet","gratipay","grav","hacker-news","houzz","html5","imdb","instagram","internet-explorer","ioxhost","joomla","jsfiddle","lastfm","lastfm-square","leanpub","linkedin","linkedin-square","linode","linux","maxcdn","meanpath","medium","meetup","mixcloud","modx","odnoklassniki","odnoklassniki-square","opencart","openid","opera","optin-monster","pagelines","paypal","pied-piper","pied-piper-alt","pied-piper-pp","pinterest","pinterest-p","pinterest-square","product-hunt","qq","quora","ra ","ravelry","rebel","reddit","reddit-alien","reddit-square","renren","resistance ","safari","scribd","sellsy","share-alt","share-alt-square","shirtsinbulk","simplybuilt","skyatlas","skype","slack","slideshare","snapchat","snapchat-ghost","snapchat-square","soundcloud","spotify","stack-exchange","stack-overflow","steam","steam-square","stumbleupon","stumbleupon-circle","superpowers","telegram","tencent-weibo","themeisle","trello","tripadvisor","tumblr","tumblr-square","twitch","twitter","twitter-square","usb","viacoin","viadeo","viadeo-square","vimeo","vimeo-square","vine","vk","wechat ","weibo","weixin","whatsapp","wikipedia-w","windows","wordpress","wpbeginner","wpexplorer","wpforms","xing","xing-square","y-combinator","y-combinator-square ","yahoo","yc ","yc-square ","yelp","yoast","youtube","youtube-play","youtube-square"]}],fontAwesome5Sets:[{title:"Web Application Icons",icon:"address-book",list:["address-book","far address-book","fas address-card","far address-card","adjust","fas american-sign-language-interpreting","anchor","archive","fas chart-area","fas arrows-alt","fas arrows-alt-h","fas arrows-alt-v","assistive-listening-systems","asterisk","at","audio-description","fas car","balance-scale","ban","fas university","far chart-bar","barcode","bars","fas bath","fas battery-full","fas battery-empty","fas battery-quarter","fas battery-half","fas battery-three-quarters","bed","beer","bell","far bell","bell-slash","far bell-slash","bicycle","binoculars","birthday-cake","blind","fab bluetooth","fab bluetooth-b","bolt","bomb","book","bookmark","far bookmark","braille","briefcase","bug","building","far building","bullhorn","bullseye","bus","fas taxi","calculator","calendar","far calendar-check","far calendar-minus","far calendar","far calendar-plus","far calendar-times","camera","camera-retro","car","far caret-square-down","far caret-square-left","far caret-square-right","far caret-square-up","cart-arrow-down","cart-plus","far closed-captioning","certificate","check","check-circle","far check-circle","check-square","far check-square","child","circle","far circle","fas circle-notch","far clock","clone","fas times","cloud","fas cloud-download-alt","fas cloud-upload-alt","code","fas code-branch","coffee","fas cog","fas cogs","comment","far comment","comments","far comments","compass","copyright","fab creative-commons","far credit-card","fas credit-card","crop","crosshairs","cube","cubes","fas utensils","fas tachometer-alt","database","fas deaf","desktop","far gem","far dot-circle","download","fas id-card","far id-card","edit ","ellipsis-h","ellipsis-v","envelope","far envelope","envelope-open","far envelope-open","envelope-square","eraser","fas exchange-alt","exclamation","exclamation-circle","fas exclamation-triangle","fas external-link-alt","fas external-link-square-alt","eye","eye-slash","fas eye-dropper","fax","fas rss","female","fighter-jet","far file-archive","far file-audio","far file-code","far file-excel","far file-image","far file-video","far file-pdf","far file-powerpoint","far file-word","film","filter","fire","fire-extinguisher","flag","flag-checkered","far flag","fas bolt","flask","folder","far folder","folder-open","far folder-open","far frown","far futbol","gamepad","fas gavel","gift","fas glass-martini","globe","fas graduation-cap","fas users","far hand-rock","far hand-lizard","far hand-paper","far hand-peace","far hand-pointer","far hand-scissors","far hand-spock","far handshake","hashtag","far hdd","headphones","heart","far heart","heartbeat","history","home","fas bed","hourglass","fas hourglass-start","fas hourglass-half","fas hourglass-end","far hourglass","i-cursor","id-badge","image ","inbox","industry","info","info-circle","key","far keyboard","language","laptop","leaf","far lemon","fas level-down-alt","fas level-up-alt","far life-ring","far lightbulb","fas chart-line","location-arrow","lock","low-vision","magic","magnet","fas share","fas reply ","fas reply-all ","male","map","map-marker","far map","map-pin","map-signs","far meh","microchip","microphone","microphone-slash","minus","minus-circle","minus-square","far minus-square","mobile","far money-bill-alt","far moon","motorcycle","mouse-pointer","music","fas bars","far newspaper","object-group","object-ungroup","paint-brush","fas paper-plane","far paper-plane","paw","fas pencil-alt","fas pen-square","far edit","percent","phone","phone-square","far image","fas chart-pie","plane","plug","plus","plus-circle","plus-square","far plus-square","podcast","power-off","print","puzzle-piece","qrcode","question","question-circle","far question-circle","quote-left","quote-right","random","recycle","fas sync","registered","reply","reply-all","retweet","road","rocket","rss","rss-square","search","search-minus","search-plus","server","share-alt","share-alt-square","share-square","far share-square","fas shield-alt","ship","shopping-bag","shopping-basket","shopping-cart","shower","fas sign-in-alt","fas sign-language","fas sign-out-alt","signal","sitemap","fas sliders-h","far smile","far snowflake","sort","fas sort-alpha-down","fas sort-alpha-up","fas sort-amount-down","fas sort-amount-up","fas sort-up","fas sort-down","fas sort-numeric-down","fas sort-numeric-up","space-shuttle","spinner","fas utensil-spoon","square","far square","star","far star-half","far star","sticky-note","far sticky-note","street-view","suitcase","far sun","tablet","tag","tags","tasks","taxi","fas tv","terminal","fas thermometer-empty","fas thermometer-full","fas thermometer-half","fas thermometer-quarter","fas thermometer-three-quarters","fas thumbtack","thumbs-down","far thumbs-down","far thumbs-up","thumbs-up","fas ticket-alt","times","times-circle","far times-circle","fas window-close","far window-close ","tint","toggle-off","toggle-on","trademark","trash","far trash-alt","tree","trophy","truck","tty","tv ","umbrella","universal-access","university","unlock","unlock-alt","fas sort","upload","user","user-circle","far user-circle","far user","user-plus","user-secret","user-times","fas video","fas phone-volume","volume-down","volume-off","volume-up","wheelchair","fab accessible-icon","wifi","window-maximize","window-minimize","window-restore","wrench"]},{title:"Accessibility Icons",icon:"american-sign-language-interpreting",list:["fas american-sign-language-interpreting","assistive-listening-systems","audio-description","blind","braille","far closed-captioning","fas deaf","low-vision","far question-circle","fas sign-language","tty","universal-access","fas phone-volume","wheelchair","fab accessible-icon"]},{title:"Hand Icons",icon:"hand-grab-o",list:["far hand-rock","far hand-lizard","far hand-point-down","far hand-point-left","far hand-point-right","far hand-point-up","far hand-paper","far hand-peace","far hand-pointer","far hand-scissors","far hand-spock","thumbs-down","far thumbs-down","far thumbs-up","thumbs-up"]},{title:"Transportation Icons",icon:"ambulance",list:["ambulance","fas car","bicycle","bus","fas taxi","car","fighter-jet","motorcycle","plane","rocket","ship","space-shuttle","subway","taxi","train","truck","wheelchair","fab accessible-icon"]},{title:"Gender Icons",icon:"genderless",list:["genderless","mars","mars-double","mars-stroke","mars-stroke-h","mars-stroke-v","mercury","neuter","fas transgender","transgender-alt","venus","venus-double","venus-mars"]},{title:"Form Control Icons",icon:"check-square",list:["check-square","far check-square","circle","far circle","far dot-circle","minus-square","far minus-square","plus-square","far plus-square","square","far square"]},{title:"Payment Icons",icon:"cc-amex",list:["fab cc-amex","fab cc-diners-club","fab cc-discover","fab cc-jcb","fab cc-mastercard","fab cc-paypal","fab cc-stripe","fab cc-visa","far credit-card","fas credit-card","fab google-wallet","fab paypal"]},{title:"Chart Icons",icon:"area-chart",list:["fas chart-area","far chart-bar","fas chart-line","fas chart-pie"]},{title:"Currency Icons",icon:"bitcoin",list:["fab btc","fas yen-sign","fas dollar-sign","fas euro-sign","fas pound-sign","fab gg","fab gg-circle","fas shekel-sign","fas rupee-sign","fas won-sign","far money-bill-alt","fas ruble-sign ","fas lira-sign","fab viacoin"]},{title:"Text Editor Icons",icon:"align-center",list:["align-center","align-justify","align-left","align-right","bold","fas link","fas unlink","clipboard","columns","copy ","cut ","fas outdent","eraser","file","far file","fas file-alt","far file-alt","far copy","far save","font","fas heading","indent","italic","list","list-alt","list-ol","list-ul","paperclip","paragraph","paste ","fas undo","fas redo ","save","strikethrough","subscript","superscript","table","text-height","text-width","th","th-large","th-list","underline"]},{title:"Brand Icons",icon:"500px",list:["fab 500px","fab adn","fab amazon","fab android","fab angellist","fab apple","fab bandcamp","fab behance","fab behance-square","fab bitbucket","fab btc","fab black-tie","fab bluetooth","fab bluetooth-b","fab buysellads","fab cc-amex","fab cc-diners-club","fab cc-discover","fab cc-jcb","fab cc-mastercard","fab cc-paypal","fab cc-stripe","fab cc-visa","fab chrome","fab codepen","fab codiepie","fab connectdevelop","fab contao","fab css3","fab dashcube","fab delicious","fab deviantart","fab digg","fab dribbble","fab dropbox","fab drupal","fab edge","fab sellcast","fab empire","fab envira","fab etsy","fab expeditedssl","fab font-awesome","fab facebook-f","fab facebook","fab facebook-square","fab firefox","fab first-order","fab flickr","fab fonticons","fab fort-awesome","fab forumbee","fab foursquare","fab free-code-camp","fab get-pocket","fab gg","fab gg-circle","fab git","fab git-square","fab github","fab github-alt","fab github-square","fab gitlab","fab gratipay","fab glide","fab glide-g","fab google","fab google-plus-g","fab google-plus","fab google-plus-square","fab google-wallet","fab grav","fab hacker-news","fab houzz","fab html5","fab imdb","fab instagram","fab internet-explorer","fab ioxhost","fab joomla","fab jsfiddle","fab lastfm","fab lastfm-square","fab leanpub","fab linkedin-in","fab linkedin","fab linode","fab linux","fab maxcdn","fab medium","fab meetup","fab mixcloud","fab modx","fab odnoklassniki","fab odnoklassniki-square","fab opencart","fab openid","fab opera","fab optin-monster","fab pagelines","fab paypal","fab pied-piper","fab pied-piper-alt","fab pied-piper-pp","fab pinterest","fab pinterest-p","fab pinterest-square","fab product-hunt","fab qq","fab quora","fab rebel","fab ravelry","fab reddit","fab reddit-alien","fab reddit-square","fab renren","fab safari","fab scribd","fab sellsy","share-alt","share-alt-square","fab shirtsinbulk","fab simplybuilt","fab skyatlas","fab skype","fab slack","fab slideshare","fab snapchat","fab snapchat-ghost","fab snapchat-square","fab soundcloud","fab spotify","fab stack-exchange","fab stack-overflow","fab steam","fab steam-square","fab stumbleupon","fab stumbleupon-circle","fab superpowers","fab telegram","fab tencent-weibo","fab themeisle","fab trello","fab tripadvisor","fab tumblr","fab tumblr-square","fab twitch","fab twitter","fab twitter-square","fab usb","fab viacoin","fab viadeo","fab viadeo-square","fab vimeo","fab vimeo-square","fab vine","fab vk","fab weixin","fab weibo","fab whatsapp","fab wikipedia-w","fab windows","fab wordpress","fab wpbeginner","fab wpexplorer","fab wpforms","fab xing","fab xing-square","fab y-combinator","fab yahoo","fab yelp","fab yoast","fab youtube","fab youtube-square"]}],faButtons:["fontAwesomeBack","|"]}),Object.assign(g.POPUP_TEMPLATES,{fontAwesome:"[_BUTTONS_][_CUSTOM_LAYER_]"}),g.PLUGINS.fontAwesome=function(h){var m=h.$;"font_awesome_5"===h.opts.iconsTemplate&&(h.opts.fontAwesomeSets=h.opts.fontAwesome5Sets,h.opts.fontAwesomeTemplate=h.opts.fontAwesomeTemplate5);var t=h.opts.fontAwesomeSets[0],o=h.opts.fontAwesomeSets,r="";function i(){h.opts.toolbarInline&&0<h.opts.faButtons.length&&(r='<div class="fr-buttons fr-tabs">'.concat(h.button.buildList(h.opts.faButtons),"</div>"));var e={buttons:r,custom_layer:s()},a=h.popups.create("fontAwesome",e);return function t(d){h.events.on("popup.tab",function(e){var a=m(e.currentTarget);if(!h.popups.isVisible("fontAwesome")||!a.is("span, a"))return!0;var t,r,s,o=e.which;if(g.KEYCODE.TAB==o){if(a.is("span.fr-icon")&&e.shiftKey||a.is("a")&&!e.shiftKey){var i=d.find(".fr-buttons");t=!h.accessibility.focusToolbar(i,!!e.shiftKey)}if(!1!==t){var n=d.find("span.fr-icon:focus").first().concat(d.findVisible(" span.fr-icon").first().concat(d.find("a")));a.is("span.fr-icon")&&(n=n.not("span.fr-icon:not(:focus)")),r=n.index(a),r=e.shiftKey?((r-1)%n.length+n.length)%n.length:(r+1)%n.length,s=n.get(r),h.events.disableBlur(),s.focus(),t=!1}}else if(g.KEYCODE.ARROW_UP==o||g.KEYCODE.ARROW_DOWN==o||g.KEYCODE.ARROW_LEFT==o||g.KEYCODE.ARROW_RIGHT==o){if(a.is("span.fr-icon")){var l=a.parent().find("span.fr-icon");r=l.index(a);var c=Math.floor(l.length/8),f=r%8,u=Math.floor(r/8),p=8*u+f,b=8*c;g.KEYCODE.ARROW_UP==o?p=((p-8)%b+b)%b:g.KEYCODE.ARROW_DOWN==o?p=(p+8)%b:g.KEYCODE.ARROW_LEFT==o?p=((p-1)%b+b)%b:g.KEYCODE.ARROW_RIGHT==o&&(p=(p+1)%b),s=m(l.get(p)),h.events.disableBlur(),s.focus(),t=!1}}else g.KEYCODE.ENTER==o&&(a.is("a")?a[0].click():h.button.exec(a),t=!1);return!1===t&&(e.preventDefault(),e.stopPropagation()),t},!0)}(a),a}function s(){return"".concat(function r(e,a,t){return'\n <div class="fr-buttons fr-tabs fr-tabs-scroll">\n '.concat(function n(e,t,r){var s="";if("font_awesome_5"===h.opts.iconsTemplate){var o="",i=r;e.forEach(function(e){o="cc-amex"===e.icon||"bitcoin"==e.icon||"500px"==e.icon?i.replace("fa ","fab "):r;var a={elementClass:e.title===t.title?"fr-active fr-active-tab":"",title:e.title,dataCmd:"setIconCategory",dataParam1:e.title,iconValue:o.replace(/\[NAME\]/g,e.icon)};s+='<button class="fr-fa-icon-category fr-command fr-btn '.concat(a.elementClass,'" title="').concat(a.title,'" data-cmd="').concat(a.dataCmd,'" data-param1="').concat(a.dataParam1,'"</button><span>').concat(a.iconValue,"</span>")})}else e.forEach(function(e){var a={elementClass:e.title===t.title?"fr-active fr-active-tab":"",title:e.title,dataCmd:"setIconCategory",dataParam1:e.title,iconValue:r.replace(/\[NAME\]/g,e.icon)};s+='<button class="fr-fa-icon-category fr-command fr-btn '.concat(a.elementClass,'" title="').concat(a.title,'" data-cmd="').concat(a.dataCmd,'" data-param1="').concat(a.dataParam1,'"</button><span>').concat(a.iconValue,"</span>")});return s}(e,a,t),"\n </div>\n ")}(o,t,h.opts.fontAwesomeTemplate),"\n ").concat(function s(e,a){return'\n <div class="fr-icon-container fr-fa-container">\n '.concat(function t(e,n){var l="";return e.list.forEach(function(e){if("font_awesome_5"===h.opts.iconsTemplate){var a={name:e,fprefix:"fa"},t=e.trim().split(" ");1<t.length&&(a={name:t[1],fprefix:t[0]});var r=h.opts.fontAwesomeTemplate.replace(/\[NAME\]|\[FPREFIX\]/g,function(e){return a[e.substring(1,e.length-1).toLowerCase()]});0<r.search("fab")&&(r=r.replace("fa",""));var s=e,o=e;n.replace(/\[NAME\]/g,e),l+='<span class="fr-command fr-fa-icon fr-icon" data-cmd="insertIcon" data-param1="'+s+'" title="'+o+'" tabIndex="-1" role="button" value="'+a.name+'" data-fprefix="'+a.fprefix+'">'+r+'<span class="fr-sr-only">'+h.language.translate("Example of")+a.name+"&nbsp;&nbsp;&nbsp;</span></span>"}else{var i={dataParam1:e,title:e,iconValue:n.replace(/\[NAME\]/g,e)};l+='<span class="fr-command fr-fa-icon fr-icon" role="button" data-cmd="insertIcon" data-param1="'.concat(i.dataParam1,'" title="').concat(i.title,'">').concat(i.iconValue,"</span>")}}),l}(e,a),"\n </div>\n ")}(t,h.opts.fontAwesomeTemplate))}return{setIconCategory:function n(a){t=o.filter(function(e){return e.title===a})[0],function e(){h.popups.get("fontAwesome").html(r+s())}()},showFontAwesomePopup:function l(){var e=h.popups.get("fontAwesome");if(e||(e=i()),!e.hasClass("fr-active")){h.popups.refresh("fontAwesome"),h.popups.setContainer("fontAwesome",h.$tb);var a=h.$tb.find('.fr-command[data-cmd="fontAwesome"]'),t=h.button.getPosition(a),r=t.left,s=t.top;h.popups.show("fontAwesome",r,s,a.outerHeight())}},back:function e(){h.popups.hide("fontAwesome"),h.toolbar.showInline()}}},g.DefineIcon("fontAwesome",{NAME:"flag",SVG_KEY:"fontAwesome"}),g.RegisterCommand("fontAwesome",{title:"Font Awesome",icon:"fontAwesome",undo:!1,focus:!1,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("fontAwesome")?(this.$el.find(".fr-marker")&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("fontAwesome")):this.fontAwesome.showFontAwesomePopup()},plugin:"fontAwesome",showOnMobile:!0}),g.RegisterCommand("insertIcon",{callback:function(e,a){if(this.opts&&"font_awesome_5"===this.opts.iconsTemplate){var t={name:a,fprefix:"fa"},r=this.opts.fontAwesomeTemplate.replace(/\[NAME\]|\[FPREFIX\]/g,function(e){return t[e.substring(1,e.length-1).toLowerCase()]});this.undo.saveStep(),this.html.insert(r,!0),this.undo.saveStep()}else this.undo.saveStep(),this.html.insert("".concat(this.opts.fontAwesomeTemplate.replace(/\[NAME\]/g,a),"&nbsp;")),this.undo.saveStep();this.popups.hide("fontAwesome")}}),g.RegisterCommand("setIconCategory",{undo:!1,focus:!1,callback:function(e,a){this.fontAwesome.setIconCategory(a)}}),g.DefineIcon("fontAwesomeBack",{NAME:"arrow-left",SVG_KEY:"back"}),g.RegisterCommand("fontAwesomeBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.fontAwesome.back()}})});