card-mod-tinymce_editor 0.15.5 → 0.15.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/assets/script/nest_editor.js.coffee +76 -63
  3. data/assets/script/script_tinymce.js +2 -2
  4. data/assets/script/tinymce_config.js.coffee +6 -0
  5. data/data/files/mod_tinymce_editor_script_asset_output/file.js +15 -17
  6. data/public/icons/default/icons.min.js +1 -0
  7. data/public/jquery.tinymce.min.js +40 -41
  8. data/public/langs/{readme.md → README.md} +0 -0
  9. data/public/license.txt +0 -0
  10. data/public/plugins/advlist/plugin.min.js +2 -2
  11. data/public/plugins/anchor/plugin.min.js +2 -2
  12. data/public/plugins/autolink/plugin.min.js +2 -2
  13. data/public/plugins/autoresize/plugin.min.js +2 -2
  14. data/public/plugins/autosave/plugin.min.js +2 -2
  15. data/public/plugins/bbcode/plugin.min.js +2 -2
  16. data/public/plugins/charmap/plugin.min.js +2 -2
  17. data/public/plugins/code/plugin.min.js +2 -2
  18. data/public/plugins/codesample/plugin.min.js +2 -2
  19. data/public/plugins/colorpicker/plugin.min.js +2 -2
  20. data/public/plugins/contextmenu/plugin.min.js +2 -2
  21. data/public/plugins/directionality/plugin.min.js +2 -2
  22. data/public/plugins/emoticons/js/emojiimages.js +9424 -0
  23. data/public/plugins/emoticons/js/emojiimages.min.js +3 -0
  24. data/public/plugins/emoticons/js/emojis.js +1916 -1508
  25. data/public/plugins/emoticons/js/emojis.min.js +2 -2
  26. data/public/plugins/emoticons/plugin.min.js +2 -2
  27. data/public/plugins/fullpage/plugin.min.js +2 -2
  28. data/public/plugins/fullscreen/plugin.min.js +2 -2
  29. data/public/plugins/help/plugin.min.js +2 -2
  30. data/public/plugins/hr/plugin.min.js +2 -2
  31. data/public/plugins/image/plugin.min.js +2 -2
  32. data/public/plugins/imagetools/plugin.min.js +2 -2
  33. data/public/plugins/importcss/plugin.min.js +2 -2
  34. data/public/plugins/insertdatetime/plugin.min.js +2 -2
  35. data/public/plugins/legacyoutput/plugin.min.js +2 -2
  36. data/public/plugins/link/plugin.min.js +2 -2
  37. data/public/plugins/lists/plugin.min.js +2 -2
  38. data/public/plugins/media/plugin.min.js +2 -2
  39. data/public/plugins/nonbreaking/plugin.min.js +2 -2
  40. data/public/plugins/noneditable/plugin.min.js +2 -2
  41. data/public/plugins/pagebreak/plugin.min.js +2 -2
  42. data/public/plugins/paste/plugin.min.js +2 -2
  43. data/public/plugins/preview/plugin.min.js +2 -2
  44. data/public/plugins/print/plugin.min.js +2 -2
  45. data/public/plugins/quickbars/plugin.min.js +2 -2
  46. data/public/plugins/save/plugin.min.js +2 -2
  47. data/public/plugins/searchreplace/plugin.min.js +2 -2
  48. data/public/plugins/spellchecker/plugin.min.js +2 -2
  49. data/public/plugins/tabfocus/plugin.min.js +2 -2
  50. data/public/plugins/table/plugin.min.js +2 -2
  51. data/public/plugins/template/plugin.min.js +2 -2
  52. data/public/plugins/textcolor/plugin.min.js +2 -2
  53. data/public/plugins/textpattern/plugin.min.js +2 -2
  54. data/public/plugins/toc/plugin.min.js +2 -2
  55. data/public/plugins/visualblocks/plugin.min.js +2 -2
  56. data/public/plugins/visualchars/plugin.min.js +2 -2
  57. data/public/plugins/wordcount/plugin.min.js +2 -2
  58. data/public/skins/content/dark/content.min.css +7 -0
  59. data/public/skins/content/default/content.min.css +1 -1
  60. data/public/skins/content/document/content.min.css +1 -1
  61. data/public/skins/content/writer/content.min.css +1 -1
  62. data/public/skins/ui/oxide/content.inline.min.css +1 -1
  63. data/public/skins/ui/oxide/content.min.css +1 -1
  64. data/public/skins/ui/oxide/content.mobile.min.css +0 -0
  65. data/public/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
  66. data/public/skins/ui/oxide/skin.min.css +1 -1
  67. data/public/skins/ui/oxide/skin.mobile.min.css +1 -1
  68. data/public/skins/ui/oxide/skin.shadowdom.min.css +7 -0
  69. data/public/skins/ui/oxide-dark/content.inline.min.css +1 -1
  70. data/public/skins/ui/oxide-dark/content.min.css +1 -1
  71. data/public/skins/ui/oxide-dark/content.mobile.min.css +0 -0
  72. data/public/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
  73. data/public/skins/ui/oxide-dark/skin.min.css +1 -1
  74. data/public/skins/ui/oxide-dark/skin.mobile.min.css +1 -1
  75. data/public/skins/ui/oxide-dark/skin.shadowdom.min.css +7 -0
  76. data/public/themes/mobile/theme.min.js +2 -2
  77. data/public/themes/silver/theme.min.js +2 -2
  78. data/public/tinymce.d.ts +3039 -0
  79. data/public/tinymce.min.js +2 -2
  80. data/set/all/reference_editor/link_editor.rb +1 -1
  81. metadata +15 -8
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.0.11 (2019-07-04)
7
+ * Version: 5.10.7 (2022-12-06)
8
8
  */
9
- !function(){"use strict";var t,e,n,r,o,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),v=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),f=tinymce.util.Tools.resolve("tinymce.EditorManager"),m=tinymce.util.Tools.resolve("tinymce.Env"),d=tinymce.util.Tools.resolve("tinymce.util.Tools"),c=function(t){return t.getParam("importcss_merge_classes")},u=function(t){return t.getParam("importcss_exclusive")},h=function(t){return t.getParam("importcss_selector_converter")},l=function(t){return t.getParam("importcss_selector_filter")},p=function(t){return t.getParam("importcss_groups")},_=function(t){return t.getParam("importcss_append")},O=function(t){return t.getParam("importcss_file_filter")},s=function(t){return function(){return t}},a=s(!1),y=s(!0),g=function(){return x},x=(r={fold:function(t,e){return t()},is:a,isSome:a,isNone:y,getOr:n=function(t){return t},getOrThunk:e=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:n,orThunk:e,map:g,ap:g,each:function(){},bind:g,flatten:g,exists:a,forall:y,filter:g,equals:t=function(t){return t.isNone()},equals_:t,toArray:function(){return[]},toString:s("none()")},Object.freeze&&Object.freeze(r),r),T=(o="function",function(t){return function(t){if(null===t)return"null";var e=typeof t;return"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e}(t)===o}),b=Array.prototype.slice,k=Array.prototype.push,S=function(t,e){return function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!Array.prototype.isPrototypeOf(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);k.apply(e,t[n])}return e}(function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o,t)}return r}(t,e))},A=(T(Array.from)&&Array.from,function(e){return"string"==typeof e?function(t){return-1!==t.indexOf(e)}:e instanceof RegExp?function(t){return e.test(t)}:e}),P=function(c,t,s){var a=[],n={};function l(t,e){var n,r,o,i=t.href;if(r=i,o=m.cacheSuffix,"string"==typeof r&&(r=r.replace("?"+o,"").replace("&"+o,"")),(i=r)&&s(i,e)&&!function(t,e){var n=t.settings,r=!1!==n.skin&&(n.skin||"oxide");if(r){var o=n.skin_url?t.documentBaseURI.toAbsolute(n.skin_url):f.baseURL+"/skins/ui/"+r,i=f.baseURL+"/skins/content/";return e===o+"/content"+(t.inline?".inline":"")+".min.css"||-1!==e.indexOf(i)}return!1}(c,i)){d.each(t.imports,function(t){l(t,!0)});try{n=t.cssRules||t.rules}catch(u){}d.each(n,function(t){t.styleSheet?l(t.styleSheet,!0):t.selectorText&&d.each(t.selectorText.split(","),function(t){a.push(d.trim(t))})})}}d.each(c.contentCSS,function(t){n[t]=!0}),s||(s=function(t,e){return e||n[t]});try{d.each(t.styleSheets,function(t){l(t)})}catch(e){}return a},w=function(t,e){var n,r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(e);if(r){var o=r[1],i=r[2].substr(1).split(".").join(" "),u=d.makeMap("a,img");return r[1]?(n={title:e},t.schema.getTextBlockElements()[o]?n.block=o:t.schema.getBlockElements()[o]||u[o.toLowerCase()]?n.selector=o:n.inline=o):r[2]&&(n={inline:"span",title:e.substr(1),classes:i}),!1!==c(t)?n.classes=i:n.attributes={"class":i},n}},E=function(t,e){return null===e||!1!==u(t)},I=w,M=function(g){g.on("init",function(t){var e,n,r,o,i=(e=[],n=[],r={},{addItemToGroup:function(t,e){r[t]?r[t].push(e):(n.push(t),r[t]=[e])},addItem:function(t){e.push(t)},toFormats:function(){return S(n,function(t){var e=r[t];return 0===e.length?[]:[{title:t,items:e}]}).concat(e)}}),y={},u=A(l(g)),c=(o=p(g),d.map(o,function(t){return d.extend({},t,{original:t,selectors:{},filter:A(t.filter),item:{text:t.title,menu:[]}})})),s=function(t,e){if(f=t,p=y,!(E(g,m=e)?f in p:f in m.selectors)){s=t,l=y,E(g,a=e)?l[s]=!0:a.selectors[s]=!0;var n=(i=(o=g).plugins.importcss,u=t,((c=e)&&c.selector_converter?c.selector_converter:h(o)?h(o):function(){return w(o,u)}).call(i,u,c));if(n){var r=n.name||v.DOM.uniqueId();return g.formatter.register(r,n),d.extend({},{title:n.title,format:r})}}var o,i,u,c,s,a,l,f,m,p;return null};d.each(P(g,g.getDoc(),A(O(g))),function(n){if(-1===n.indexOf(".mce-")&&(!u||u(n))){var t=(r=c,o=n,d.grep(r,function(t){return!t.filter||t.filter(o)}));if(0<t.length)d.each(t,function(t){var e=s(n,t);e&&i.addItemToGroup(t.title,e)});else{var e=s(n,null);e&&i.addItem(e)}}var r,o});var a=i.toFormats();g.fire("addStyleModifications",{items:a,replace:!_(g)})})},j=function(e){return{convertSelectorToFormat:function(t){return I(e,t)}}};!function D(){i.add("importcss",function(t){return M(t),j(t)})}()}();
9
+ !function(){"use strict";function t(n){return function(t){return r=typeof(e=t),(null===e?"null":"object"==r&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":r)===n;var e,r}}function y(t){return t.getParam("importcss_selector_converter")}function u(e){return l(e)?function(t){return-1!==t.indexOf(e)}:e instanceof RegExp?function(t){return e.test(t)}:e}function h(t,e){var r,n=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(e);if(n){var o=n[1],i=n[2].substr(1).split(".").join(" "),c=x.makeMap("a,img");return n[1]?(r={title:e},t.schema.getTextBlockElements()[o]?r.block=o:t.schema.getBlockElements()[o]||c[o.toLowerCase()]?r.selector=o:r.inline=o):n[2]&&(r={inline:"span",title:e.substr(1),classes:i}),!1!==t.getParam("importcss_merge_classes")?r.classes=i:r.attributes={class:i},r}}function d(t,e){return null===e||!1!==t.getParam("importcss_exclusive")}function r(v){v.on("init",function(){function o(t,e){if(f=t,p=g,!(d(v,m=e)?f in p:f in m.selectors)){a=t,l=g,d(v,u=e)?l[a]=!0:u.selectors[a]=!0;var r=(i=(o=v).plugins.importcss,c=t,((s=e)&&s.selector_converter?s.selector_converter:y(o)?y(o):function(){return h(o,c)}).call(i,c,s));if(r){var n=r.name||_.DOM.uniqueId();return v.formatter.register(n,r),{title:r.title,format:n}}}var o,i,c,s,a,u,l,f,m,p;return null}var e,r,n,t,i=(e=[],r=[],n={},{addItemToGroup:function(t,e){n[t]?n[t].push(e):(r.push(t),n[t]=[e])},addItem:function(t){e.push(t)},toFormats:function(){return function(t){for(var e=[],r=0,n=t.length;r<n;++r){if(!f(t[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+t);P.apply(e,t[r])}return e}(function(t,e){for(var r=t.length,n=new Array(r),o=0;o<r;o++){var i=t[o];n[o]=e(i,o)}return n}(r,function(t){var e=n[t];return 0===e.length?[]:[{title:t,items:e}]})).concat(e)}}),g={},c=u(v.getParam("importcss_selector_filter")),s=(t=v.getParam("importcss_groups"),x.map(t,function(t){return x.extend({},t,{original:t,selectors:{},filter:u(t.filter)})}));x.each(function(c,t,s){var a=[],r={},u=function(t,e){var r,n,o=n=t.href,i=p.cacheSuffix;if((n=o=l(o)?o.replace("?"+i,"").replace("&"+i,""):o)&&s(n,e)&&!function(t,e){var r,n=!1!==(r=t.getParam("skin"))&&(r||"oxide");if(n){var o=t.getParam("skin_url"),i=o?t.documentBaseURI.toAbsolute(o):m.baseURL+"/skins/ui/"+n,c=m.baseURL+"/skins/content/";return e===i+"/content"+(t.inline?".inline":"")+".min.css"||-1!==e.indexOf(c)}}(c,n)){x.each(t.imports,function(t){u(t,!0)});try{r=t.cssRules||t.rules}catch(t){}x.each(r,function(t){t.styleSheet?u(t.styleSheet,!0):t.selectorText&&x.each(t.selectorText.split(","),function(t){a.push(x.trim(t))})})}};x.each(c.contentCSS,function(t){r[t]=!0}),s=s||function(t,e){return e||r[t]};try{x.each(t.styleSheets,function(t){u(t)})}catch(t){}return a}(v,v.getDoc(),u(v.getParam("importcss_file_filter"))),function(r){var t,e,n;T.test(r)||c&&!c(r)||(n=r,0<(t=x.grep(s,function(t){return!t.filter||t.filter(n)})).length?x.each(t,function(t){var e=o(r,t);e&&i.addItemToGroup(t.title,e)}):(e=o(r,null))&&i.addItem(e))});var a=i.toFormats();v.fire("addStyleModifications",{items:a,replace:!v.getParam("importcss_append")})})}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=t("string"),f=t("array"),_=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),m=tinymce.util.Tools.resolve("tinymce.EditorManager"),p=tinymce.util.Tools.resolve("tinymce.Env"),x=tinymce.util.Tools.resolve("tinymce.util.Tools"),P=Array.prototype.push,T=/^\.(?:ephox|tiny-pageembed|mce)(?:[.-]+\w+)+$/;e.add("importcss",function(t){return r(t),e=t,{convertSelectorToFormat:function(t){return h(e,t)}};var e})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.0.11 (2019-07-04)
7
+ * Version: 5.10.7 (2022-12-06)
8
8
  */
9
- !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S"))},r=function(e){return e.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])},t=function(e){return e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d"))},a=n,i=r,o=function(e){var t=r(e);return 0<t.length?t[0]:n(e)},l=function(e){return e.getParam("insertdatetime_element",!1)},u="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),c="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),m="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),s="January February March April May June July August September October November December".split(" "),d=function(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},f=function(e,t,n){return n=n||new Date,t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",d(n.getMonth()+1,2))).replace("%d",d(n.getDate(),2))).replace("%H",""+d(n.getHours(),2))).replace("%M",""+d(n.getMinutes(),2))).replace("%S",""+d(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(s[n.getMonth()]))).replace("%b",""+e.translate(m[n.getMonth()]))).replace("%A",""+e.translate(c[n.getDay()]))).replace("%a",""+e.translate(u[n.getDay()]))).replace("%%","%")},p=function(e,t){if(l(e)){var n=f(e,t),r=void 0;r=/%[HMSIp]/.test(t)?f(e,"%Y-%m-%dT%H:%M"):f(e,"%Y-%m-%d");var a=e.dom.getParent(e.selection.getStart(),"time");a?(o=a,u=r,c=n,m=(i=e).dom.create("time",{datetime:u},c),o.parentNode.insertBefore(m,o),i.dom.remove(o),i.selection.select(m,!0),i.selection.collapse(!1)):e.insertContent('<time datetime="'+r+'">'+n+"</time>")}else e.insertContent(f(e,t));var i,o,u,c,m},g=f,y=function(e){e.addCommand("mceInsertDate",function(){p(e,t(e))}),e.addCommand("mceInsertTime",function(){p(e,a(e))})},M=tinymce.util.Tools.resolve("tinymce.util.Tools"),S=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return S(n())}}},v=function(n){var t=i(n),r=S(o(n));n.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:function(e){return e===r.get()},fetch:function(e){e(M.map(t,function(e){return{type:"choiceitem",text:g(n,e),value:e}}))},onAction:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];p(n,r.get())},onItemAction:function(e,t){r.set(t),p(n,t)}});n.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:function(){return M.map(t,function(e){return{type:"menuitem",text:g(n,e),onAction:(t=e,function(){r.set(t),p(n,t)})};var t})}})};!function h(){e.add("insertdatetime",function(e){y(e),v(e)})}()}();
9
+ !function(){"use strict";function l(e){return e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S"))}function s(e){return e.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])}function r(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e}function d(e,t,n){return void 0===n&&(n=new Date),(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",r(n.getMonth()+1,2))).replace("%d",r(n.getDate(),2))).replace("%H",""+r(n.getHours(),2))).replace("%M",""+r(n.getMinutes(),2))).replace("%S",""+r(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(u[n.getMonth()]))).replace("%b",""+e.translate(o[n.getMonth()]))).replace("%A",""+e.translate(i[n.getDay()]))).replace("%a",""+e.translate(a[n.getDay()]))).replace("%%","%")}function p(e,t){var n,r,a,i,o,u;e.getParam("insertdatetime_element",!1)?(n=d(e,t),r=/%[HMSIp]/.test(t)?d(e,"%Y-%m-%dT%H:%M"):d(e,"%Y-%m-%d"),(a=e.dom.getParent(e.selection.getStart(),"time"))?(o=a,u=(i=e).dom.create("time",{datetime:r},n),o.parentNode.insertBefore(u,o),i.dom.remove(o),i.selection.select(u,!0),i.selection.collapse(!1)):e.insertContent('<time datetime="'+r+'">'+n+"</time>")):e.insertContent(d(e,t))}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),i="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),o="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),u="January February March April May June July August September October November December".split(" "),g=tinymce.util.Tools.resolve("tinymce.util.Tools");e.add("insertdatetime",function(e){var n,r,t,a,i,o,u,c;function m(e){return r.execCommand("mceInsertDate",!1,e)}(n=e).addCommand("mceInsertDate",function(e,t){p(n,null!=t?t:n.getParam("insertdatetime_dateformat",n.translate("%Y-%m-%d")))}),n.addCommand("mceInsertTime",function(e,t){p(n,null!=t?t:l(n))}),u=s(r=e),t=0<(o=s(i=r)).length?o[0]:l(i),a=t,c={get:function(){return a},set:function(e){a=e}},r.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:function(e){return e===c.get()},fetch:function(e){e(g.map(u,function(e){return{type:"choiceitem",text:d(r,e),value:e}}))},onAction:function(e){m(c.get())},onItemAction:function(e,t){c.set(t),m(t)}}),r.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:function(){return g.map(u,function(e){return{type:"menuitem",text:d(r,e),onAction:(t=e,function(){c.set(t),m(t)})};var t})}})})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.0.11 (2019-07-04)
7
+ * Version: 5.10.7 (2022-12-06)
8
8
  */
9
- !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=function(e){return e.getParam("font_formats")},i=function(e){return e.getParam("fontsize_formats")},n=function(e,t){e.settings.fontsize_formats=t},s=function(e,t){e.settings.font_formats=t},r=function(e){return e.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large")},o=function(e,t){e.settings.inline_styles=t},a=function(a){var e;o(e=a,!1),i(e)||n(e,"8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7"),t(e)||s(e,"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats"),a.on("init",function(){return e=a,t="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table",i=l.explode(r(e)),n=e.schema,e.formatter.register({alignleft:{selector:t,attributes:{align:"left"}},aligncenter:{selector:t,attributes:{align:"center"}},alignright:{selector:t,attributes:{align:"right"}},alignjustify:{selector:t,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",toggle:!1,attributes:{face:"%value"}},fontsize:{inline:"font",toggle:!1,attributes:{size:function(e){return l.inArray(i,e.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0}}),l.each("b,i,u,strike".split(","),function(e){n.addValidElements(e+"[*]")}),n.getElementRule("font")||n.addValidElements("font[face|size|color|style]"),void l.each(t.split(","),function(e){var t=n.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))});var e,t,i,n})};!function c(){e.add("legacyoutput",function(e){a(e)})}()}();
9
+ !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Tools");e.add("legacyoutput",function(e){var s,t;(t=s=e).settings.inline_styles=!1,t.getParam("fontsize_formats")||(t.settings.fontsize_formats="8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7"),t.getParam("font_formats")||(t.settings.font_formats="Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats"),s.on("PreInit",function(){var e=s,t="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table",i=l.explode(e.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large")),a=e.schema;e.formatter.register({alignleft:{selector:t,attributes:{align:"left"}},aligncenter:{selector:t,attributes:{align:"center"}},alignright:{selector:t,attributes:{align:"right"}},alignjustify:{selector:t,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all",preserve_attributes:["class","style"]},{inline:"strong",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all",preserve_attributes:["class","style"]},{inline:"em",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",toggle:!1,attributes:{face:"%value"}},fontsize:{inline:"font",toggle:!1,attributes:{size:function(e){return String(l.inArray(i,e.value)+1)}}},forecolor:{inline:"font",attributes:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0}}),l.each("b,i,u,strike".split(","),function(e){a.addValidElements(e+"[*]")}),a.getElementRule("font")||a.addValidElements("font[face|size|color|style]"),l.each(t.split(","),function(e){var t=a.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))})})})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.0.11 (2019-07-04)
7
+ * Version: 5.10.7 (2022-12-06)
8
8
  */
9
- !function(c){"use strict";var n,t,e,r,o,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.util.VK"),a=function(n){return n.target_list},l=function(n){return n.rel_list},f=function(n){return n.link_class_list},v=function(n){var t=n.link_assume_external_targets;return"boolean"==typeof t&&t?1:"string"!=typeof t||"http"!==t&&"https"!==t?0:t},s=function(n){return"boolean"==typeof n.link_context_toolbar&&n.link_context_toolbar},g=function(n){return n.link_list},y=function(n){return"string"==typeof n.default_link_target},k=function(n){return n.default_link_target},m=a,d=function(n){return!1!==a(n)},h=l,x=function(n){return l(n)!==undefined},p=f,b=function(n){return f(n)!==undefined},O=function(n){return!1!==n.link_title},w=function(n){return"boolean"==typeof n.allow_unsafe_link_target&&n.allow_unsafe_link_target},A=function(n){return!0===n.link_quicklink},C=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),_=tinymce.util.Tools.resolve("tinymce.Env"),T=function(n){if(!_.ie||10<_.ie){var t=c.document.createElement("a");t.target="_blank",t.href=n,t.rel="noreferrer noopener";var e=c.document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,c.window,0,0,0,0,0,!1,!1,!1,!1,0,null),i=t,u=e,c.document.body.appendChild(i),i.dispatchEvent(u),c.document.body.removeChild(i)}else{var r=c.window.open("","_blank");if(r){r.opener=null;var o=r.document;o.open(),o.write('<meta http-equiv="refresh" content="0; url='+C.DOM.encode(n)+'">'),o.close()}}var i,u},N=function(){},S=function(n){return function(){return n}},D=S(!1),M=S(!0),L=D,E=M,U=function(){return P},P=(r={fold:function(n,t){return n()},is:L,isSome:L,isNone:E,getOr:e=function(n){return n},getOrThunk:t=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:e,orThunk:t,map:U,ap:U,each:function(){},bind:U,flatten:U,exists:L,forall:E,filter:U,equals:n=function(n){return n.isNone()},equals_:n,toArray:function(){return[]},toString:S("none()")},Object.freeze&&Object.freeze(r),r),R=function(e){var n=function(){return e},t=function(){return o},r=function(n){return n(e)},o={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:E,isNone:L,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return R(n(e))},ap:function(n){return n.fold(U,function(n){return R(n(e))})},each:function(n){n(e)},bind:r,flatten:n,exists:r,forall:r,filter:function(n){return n(e)?o:P},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(L,function(n){return t(e,n)})},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return o},z={some:R,none:U,from:function(n){return null===n||n===undefined?P:R(n)}},q=function(t){return function(n){return function(n){if(null===n)return"null";var t=typeof n;return"object"===t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t}(n)===t}},K=q("string"),I=q("function"),j=Array.prototype.slice,B=(o=Array.prototype.indexOf)===undefined?function(n,t){return F(n,t)}:function(n,t){return o.call(n,t)},V=function(n,t){for(var e=0,r=n.length;e<r;e++){t(n[e],e,n)}},F=function(n,t){for(var e=0,r=n.length;e<r;++e)if(n[e]===t)return e;return-1},W=Array.prototype.push,H=function(n){for(var t=[],e=0,r=n.length;e<r;++e){if(!Array.prototype.isPrototypeOf(n[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+n);W.apply(t,n[e])}return t},$=function(n,t){var e=function(n,t){for(var e=n.length,r=new Array(e),o=0;o<e;o++){var i=n[o];r[o]=t(i,o,n)}return r}(n,t);return H(e)},G=(I(Array.from)&&Array.from,tinymce.util.Tools.resolve("tinymce.util.Tools")),J=function(n){return/^\w+:/i.test(n)},X=function(n,t){var e,r,o=["noopener"],i=n?n.split(/\s+/):[],u=function(n){return n.filter(function(n){return-1===G.inArray(o,n)})},a=t?0<(e=u(e=i)).length?e.concat(o):o:u(i);return 0<a.length?(r=a,G.trim(r.sort().join(" "))):""},Q=function(n,t){return t=t||n.selection.getNode(),Z(t)?n.dom.select("a[href]",t)[0]:n.dom.getParent(t,"a[href]")},Y=function(n){return n&&"A"===n.nodeName&&!!n.href},Z=function(n){return n&&"FIGURE"===n.nodeName&&/\bimage\b/i.test(n.className)},nn=function(n){return t=["title","rel","class","target"],e=function(t,e){return n[e].each(function(n){t[e]=0<n.length?n:null}),t},r={href:n.href},V(t,function(n){r=e(r,n)}),r;var t,e,r},tn=function(n,t){var e=n.dom.select("img",t)[0];if(e){var r=n.dom.getParents(e,"a[href]",t)[0];r&&(r.parentNode.insertBefore(e,r),n.dom.remove(r))}},en=function(n,t,e){var r=n.dom.select("img",t)[0];if(r){var o=n.dom.create("a",e);r.parentNode.insertBefore(o,r),o.appendChild(r)}},rn=function(d,h,p){d.undoManager.transact(function(){var n,t,e,r,o,i,u,a,c,l,f=d.selection.getNode(),s=Q(d,f),g=nn(p);if(!x(d.settings)&&!1===w(d.settings)){var m=X(g.rel,"_blank"===g.target);g.rel=m||null}g.href=(n=g.href,"http"!==(t=v(d.settings))&&"https"!==t||J(n)?n:t+"://"+n),p.href===h.href&&h.attach(),s?(d.focus(),u=d,a=s,c=p.text,l=g,c.each(function(n){a.hasOwnProperty("innerText")?a.innerText=n:a.textContent=n}),u.dom.setAttribs(a,l),u.selection.select(a)):(e=d,r=f,o=p.text,i=g,Z(r)?en(e,r,i):o.fold(function(){e.execCommand("mceInsertLink",!1,i)},function(n){e.insertContent(e.dom.createHTML("a",i,e.dom.encode(n)))}))})},on=function(e){e.undoManager.transact(function(){var n=e.selection.getNode();if(Z(n))tn(e,n);else{var t=e.dom.getParent(n,"a[href]",e.getBody());t&&e.dom.remove(t,!0)}e.focus()})},un=function(n){return 0<G.grep(n,Y).length},an=function(n){var t=n.getAttribute("data-mce-href");return t||n.getAttribute("href")},cn=function(n){return!(/</.test(n)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(n)||-1===n.indexOf("href=")))},ln=Q,fn=function(n,t){var e=t?t.innerText||t.textContent:n.getContent({format:"text"});return e.replace(/\uFEFF/g,"")},sn=X,gn=J,mn=function(n,t){for(var e=0;e<n.length;e++){var r=t(n[e],e);if(r.isSome())return r}return z.none()},dn=function(n){return K(n.value)?n.value:""},hn=function(e){return void 0===e&&(e=dn),function(n){return z.from(n).map(function(n){return t=n,r=e,o=[],G.each(t,function(n){var t=K(n.text)?n.text:K(n.title)?n.title:"";if(n.menu!==undefined);else{var e=r(n);o.push({text:t,value:e})}}),o;var t,r,o})}},pn={sanitize:function(n){return hn(dn)(n)},sanitizeWith:hn,createUi:function(t,e){return function(n){return{name:t,type:"selectbox",label:e,items:n}}},getValue:dn},vn=function(n){var t=n,e=function(){return t};return{get:e,set:function(n){t=n},clone:function(){return vn(e())}}},yn=function(t,n,e,r){var o,i,u=r[n],a=0<t.length;return u!==undefined?(o=u,i=e,mn(i,function(n){return z.some(n).filter(function(n){return n.value===o})})).map(function(n){return{url:{value:n.value,meta:{text:a?t:n.text,attach:N}},text:a?t:n.text}}):z.none()},kn=function(n,i){var u=vn(n.text),o=function(n,t){var e,r,o=(e=i,r=t.name,"link"===r?e.catalogs.link:"anchor"===r?e.catalogs.anchor:z.none()).getOr([]);return yn(u.get(),t.name,o,n)};return{onChange:function(n,t){return"url"===t.name?function(n){if(u.get().length<=0){var t=n.url.meta.text!==undefined?n.url.meta.text:n.url.value;return z.some({text:t})}return z.none()}(n()):(e=["anchor","link"],r=t.name,-1<B(e,r)?o(n(),t):("text"===t.name&&u.set(n().text),z.none()));var e,r}}},xn=function(){return(xn=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}).apply(this,arguments)},bn=function(n){var e=z.none(),t=[],r=function(n){o()?u(n):t.push(n)},o=function(){return e.isSome()},i=function(n){V(n,u)},u=function(t){e.each(function(n){c.setTimeout(function(){t(n)},0)})};return n(function(n){e=z.some(n),i(t),t=[]}),{get:r,map:function(e){return bn(function(t){r(function(n){t(e(n))})})},isReady:o}},On={nu:bn,pure:function(t){return bn(function(n){n(t)})}},wn=function(t){var n=function(n){var r;t((r=n,function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=this;c.setTimeout(function(){r.apply(e,n)},0)}))},e=function(){return On.nu(n)};return{map:function(r){return wn(function(e){n(function(n){var t=r(n);e(t)})})},bind:function(e){return wn(function(t){n(function(n){e(n).get(t)})})},anonBind:function(e){return wn(function(t){n(function(n){e.get(t)})})},toLazy:e,toCached:function(){var t=null;return wn(function(n){null===t&&(t=e()),t.get(n)})},get:n}},An={nu:wn,pure:function(t){return wn(function(n){n(t)})}},Cn=tinymce.util.Tools.resolve("tinymce.util.Delay"),_n=function(n){var t=n.href;return 0<t.indexOf("@")&&-1===t.indexOf("//")&&-1===t.indexOf("mailto:")?z.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:function(n){return xn({},n,{href:"mailto:"+t})}}):z.none()},Tn=function(u,n,a){return mn([_n,(e=n,function(n){var t=n.href;return 1===e&&!gn(t)||0===e&&/^\s*www[\.|\d\.]/i.test(t)?z.some({message:"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",preprocess:function(n){return xn({},n,{href:"http://"+t})}}):z.none()})],function(n){return n(a)}).fold(function(){return An.pure(a)},function(i){return An.nu(function(t){var e,n,r,o;e=u,n=i.message,r=function(n){c.console.log("state",n),t(n?i.preprocess(a):a)},o=e.selection.getRng(),Cn.setEditorTimeout(e,function(){e.windowManager.confirm(n,function(n){e.selection.setRng(o),r(n)})})})});var e},Nn=function(n){var t=n.dom.select("a:not([href])"),e=$(t,function(n){var t=n.name||n.id;return t?[{text:t,value:"#"+t}]:[]});return 0<e.length?z.some([{text:"None",value:""}].concat(e)):z.none()},Sn=function(n){if(b(n.settings)){var t=p(n.settings);return pn.sanitize(t)}return z.none()},Dn=tinymce.util.Tools.resolve("tinymce.util.XHR"),Mn=function(t){var e=function(n){return t.convertURL(n.value||n.url,"href")},n=g(t.settings);return An.nu(function(t){"string"==typeof n?Dn.send({url:n,success:function(n){return t(function(n){try{return z.some(JSON.parse(n))}catch(t){return z.none()}}(n))},error:function(n){return t(z.none())}}):"function"==typeof n?n(function(n){return t(z.some(n))}):t(z.from(n))}).map(function(n){return n.bind(pn.sanitizeWith(e)).map(function(n){return 0<n.length?[{text:"None",value:""}].concat(n):n})})},Ln=function(n,t){if(x(n.settings)){var e=h(n.settings),r=t.is("_blank");return(!1===w(n.settings)?pn.sanitizeWith(function(n){return sn(pn.getValue(n),r)}):pn.sanitize)(e)}return z.none()},En=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],Un=function(n){if(d(n.settings)){var t=m(n.settings);return pn.sanitize(t).orThunk(function(){return z.some(En)})}return z.none()},Pn=function(n,t,e){var r=n.getAttrib(t,e);return null!==r&&0<r.length?z.some(r):z.none()},Rn=function(s,g,m){return Mn(s).map(function(n){var t,e,r,o,i,u,a,c,l,f=(e=m,r=(t=s).selection,o=t.dom,i=cn(r.getContent())?z.some(fn(r,e)):z.none(),u=e?z.some(o.getAttrib(e,"href")):z.none(),a=e?z.from(o.getAttrib(e,"target")):z.none(),c=Pn(o,e,"rel"),l=Pn(o,e,"class"),{url:u,text:i,title:Pn(o,e,"title"),target:a,rel:c,linkClass:l});return{anchor:f,catalogs:{targets:Un(s),rels:Ln(s,f.target),classes:Sn(s),anchor:Nn(s),link:n},optNode:z.from(m),flags:{titleEnabled:O(g)}}})},zn=function(p){var n,t,e;(t=(n=p).settings,e=ln(n),Rn(n,t,e)).map(function(n){var i,u,a,t,e,r,o,c,l,f,s,g,m,d,h=(u=n,a=v((i=p).settings),function(n){var e=n.getData();if(!e.url.value)return on(i),void n.close();var t=function(t){return z.from(e[t]).filter(function(n){return!u.anchor[t].is(n)})},r={href:e.url.value,text:t("text"),target:t("target"),rel:t("rel"),"class":t("linkClass"),title:t("title")},o={href:e.url.value,attach:e.url.meta!==undefined&&e.url.meta.attach?e.url.meta.attach:function(){}};Tn(i,a,r).get(function(n){rn(i,o,n)}),n.close()});return t=n,e=h,r=p.settings,l=t.anchor.text.map(function(){return{name:"text",type:"input",label:"Text to display"}}).toArray(),f=t.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],s=y(r)?z.some(k(r)):z.none(),c=s,g={url:{value:(o=t).anchor.url.getOr(""),meta:{attach:function(){},text:o.anchor.url.fold(function(){return""},function(){return o.anchor.text.getOr("")}),original:{value:o.anchor.url.getOr("")}}},text:o.anchor.text.getOr(""),title:o.anchor.title.getOr(""),anchor:o.anchor.url.getOr(""),link:o.anchor.url.getOr(""),rel:o.anchor.rel.getOr(""),target:o.anchor.target.or(c).getOr(""),linkClass:o.anchor.linkClass.getOr("")},m=kn(g,t),d=t.catalogs,{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:H([[{name:"url",type:"urlinput",filetype:"file",label:"URL"}],l,f,function(n){for(var t=[],e=function(n){t.push(n)},r=0;r<n.length;r++)n[r].each(e);return t}([d.anchor.map(pn.createUi("anchor","Anchors")),d.rels.map(pn.createUi("rel","Rel")),d.targets.map(pn.createUi("target","Open link in...")),d.link.map(pn.createUi("link","Link list")),d.classes.map(pn.createUi("linkClass","Class"))])])},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:g,onChange:function(t,n){var e=n.name;m.onChange(t.getData,{name:e}).each(function(n){t.setData(n)})},onSubmit:e}}).get(function(n){p.windowManager.open(n)})},qn=function(n,t){return n.dom.getParent(t,"a[href]")},Kn=function(n){return qn(n,n.selection.getStart())},In=function(n,t){if(t){var e=an(t);if(/^#/.test(e)){var r=n.$(e);r.length&&n.selection.scrollIntoView(r[0],!0)}else T(t.href)}},jn=function(n){return function(){zn(n)}},Bn=function(n){return function(){In(n,Kn(n))}},Vn=function(r){r.on("click",function(n){var t=qn(r,n.target);t&&u.metaKeyPressed(n)&&(n.preventDefault(),In(r,t))}),r.on("keydown",function(n){var t,e=Kn(r);e&&13===n.keyCode&&!0===(t=n).altKey&&!1===t.shiftKey&&!1===t.ctrlKey&&!1===t.metaKey&&(n.preventDefault(),In(r,e))})},Fn=function(e){return function(t){var n=function(n){return t.setActive(!e.readonly&&!!ln(e,n.element))};return e.on("NodeChange",n),function(){return e.off("NodeChange",n)}}},Wn=function(e){return function(t){t.setDisabled(!un(e.dom.getParents(e.selection.getStart())));var n=function(n){return t.setDisabled(!un(n.parents))};return e.on("NodeChange",n),function(){return e.off("NodeChange",n)}}},Hn=function(n){n.addCommand("mceLink",function(){A(n.settings)?n.fire("contexttoolbar-show",{toolbarKey:"quicklink"}):jn(n)()})},$n=function(n){n.addShortcut("Meta+K","",function(){n.execCommand("mceLink")})},Gn=function(n){n.ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",onAction:jn(n),onSetup:Fn(n)}),n.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:function(){return on(n)},onSetup:Wn(n)})},Jn=function(n){n.ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:Bn(n),onSetup:Wn(n)}),n.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:jn(n)}),n.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:function(){return on(n)},onSetup:Wn(n)})},Xn=function(t){t.ui.registry.addContextMenu("link",{update:function(n){return un(t.dom.getParents(n,"a"))?"link unlink openlink":"link"}})},Qn=function(i){var n=function(n){var t=i.selection.getNode();return n.setDisabled(!ln(i,t)),function(){}};i.ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:Fn(i)},label:"Link",predicate:function(n){return!!ln(i,n)&&s(i.settings)},initValue:function(){var n=ln(i);return n?an(n):""},commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:function(n){var t=i.selection.getNode();return n.setActive(!!ln(i,t)),Fn(i)(n)},onAction:function(n){var t=ln(i),e=n.getValue();if(t)i.dom.setAttrib(t,"href",e),i.selection.collapse(!1),n.hide();else{var r={href:e,attach:function(){}},o=cn(i.selection.getContent())?z.some(fn(i.selection,t)).filter(function(n){return 0<n.length}).or(z.from(e)):z.none();rn(i,r,{href:e,text:o,title:z.none(),rel:z.none(),target:z.none(),"class":z.none()}),n.hide()}}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:n,onAction:function(n){on(i),n.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:n,onAction:function(n){Bn(i)(),n.hide()}}]})};!function Yn(){i.add("link",function(n){Gn(n),Jn(n),Xn(n),Qn(n),Vn(n),Hn(n),$n(n)})}()}(window);
9
+ !function(){"use strict";function t(r){return function(t){return e=typeof(n=t),(null===n?"null":"object"==e&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==e&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":e)===r;var n,e}}function n(n){return function(t){return typeof t===n}}function h(){}function i(t){return function(){return t}}function e(t){return t}function r(t,n){return t===n}function o(){return v}var u,a=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.VK"),l=t("string"),d=t("array"),p=function(t){return u===t},f=n("boolean"),s=n("function"),m=i(!1),g=i(!(u=null)),v={fold:function(t,n){return t()},isSome:m,isNone:g,getOr:e,getOrThunk:y,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(void 0),or:e,orThunk:y,map:o,each:h,bind:o,exists:m,forall:g,filter:function(){return v},toArray:function(){return[]},toString:i("none()")};function y(t){return t()}function k(t,o,i){return function(t){for(var n,e=0,r=t.length;e<r;e++)n=t[e],i=o(i,n,e)}(t),i}function x(t){for(var n=[],e=0,r=t.length;e<r;++e){if(!d(t[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+t);at.apply(n,t[e])}return n}function b(t,n){for(var e=0;e<t.length;e++){var r=n(t[e],e);if(r.isSome())return r}return it.none()}function O(t,n,e){return void 0===e&&(e=r),t.exists(function(t){return e(t,n)})}function w(t,n){return t?it.some(n):it.none()}function C(t){var n=t.getParam("link_assume_external_targets",!1);return f(n)&&n?1:!l(n)||"http"!==n&&"https"!==n?0:n}function N(t){return t.getParam("default_link_target")}function A(t){return t.getParam("target_list",!0)}function T(t){return t.getParam("rel_list",[],"array")}function P(t){return t.getParam("allow_unsafe_link_target",!1,"boolean")}function S(t){return l(t.value)?t.value:""}function _(n){return void 0===n&&(n=S),function(t){return it.from(t).map(function(t){return ct(t,n)})}}function R(t,i,u,a){return function(t){for(var n=mt(t),e=0,r=n.length;e<r;e++){var o=n[e];!function(t,n){(i(t,n)?u:a)(t,n)}(t[o],o)}}(t),1}function D(t,n){return gt.call(t,n)}function L(t){return t&&"a"===t.nodeName.toLowerCase()}function E(t){return L(t)&&!!pt(t)}function M(t,n){if(t.collapsed)return[];for(var e=t.cloneContents(),r=new dt(e.firstChild,e),o=[],i=e.firstChild;n(i)&&o.push(i),i=r.next(););return o}function U(t){return/^\w+:/i.test(t)}function B(t,n){function e(t){return t.filter(function(t){return-1===lt.inArray(o,t)})}var r,o=["noopener"],i=t?t.split(/\s+/):[],u=n?0<(r=e(r=i)).length?r.concat(o):o:e(i);return 0<u.length?lt.trim(u.sort().join(" ")):""}function I(t,n){return n=n||t.selection.getNode(),vt(n)?t.dom.select("a[href]",n)[0]:t.dom.getParent(n,"a[href]")}function K(t,n){return(n?n.innerText||n.textContent:t.getContent({format:"text"})).replace(/\uFEFF/g,"")}function z(t){return 0<lt.grep(t,E).length}function j(t){var n=t.schema.getTextInlineElements();return 0===M(t.selection.getRng(),function(t){return 1===t.nodeType&&!L(t)&&!D(n,t.nodeName.toLowerCase())}).length}function V(l,c,f){var t,n,e,r,o,i,u,s=l.selection.getNode(),m=I(l,s),g=(n=l,e=k(["title","rel","class","target"],function(n,e){return t[e].each(function(t){n[e]=0<t.length?t:null}),n},{href:(t=f).href}),u=st({},e),0<T(n).length||!1!==P(n)||(r=B(u.rel,"_blank"===u.target),u.rel=r||null),it.from(u.target).isNone()&&!1===A(n)&&(u.target=N(n)),u.href=(o=u.href,"http"!==(i=C(n))&&"https"!==i||U(o)?o:i+"://"+o),u);l.undoManager.transact(function(){var n,t,e,r,o,i,u,a;f.href===c.href&&c.attach(),m?(l.focus(),o=l,i=m,u=f.text,a=g,u.each(function(t){D(i,"innerText")?i.innerText=t:i.textContent=t}),o.dom.setAttribs(i,a),o.selection.select(i)):(n=l,e=f.text,r=g,vt(t=s)?kt(n,t,r):e.fold(function(){n.execCommand("mceInsertLink",!1,r)},function(t){n.insertContent(n.dom.createHTML("a",r,n.dom.encode(t)))}))})}function q(t,n,e){var r,o,i,u,a,l,c,f,s,m,g=(r=t,o=e.href,st(st({},e),{href:ht.isDomSafe(o,"a",r.settings)?o:""}));t.hasPlugin("rtc",!0)?t.execCommand("createlink",!1,(a=g.class,l=g.href,c=g.rel,f=g.target,s=g.text,m=g.title,R({class:a.getOrNull(),href:l,rel:c.getOrNull(),target:f.getOrNull(),text:s.getOrNull(),title:m.getOrNull()},function(t,n){return!1===p(t)},(i=u={},function(t,n){i[n]=t}),h),u)):V(t,n,g)}function F(t){var l;t.hasPlugin("rtc",!0)?t.execCommand("unlink"):(l=t).undoManager.transact(function(){var t,n,e,r,o,i,u,a=l.selection.getNode();vt(a)?yt(l,a):(n=(t=l).dom,r=(e=t.selection).getBookmark(),o=e.getRng().cloneRange(),i=n.getParent(o.startContainer,"a[href]",t.getBody()),u=n.getParent(o.endContainer,"a[href]",t.getBody()),i&&o.setStartBefore(i),u&&o.setEndAfter(u),e.setRng(o),t.execCommand("unlink"),e.moveToBookmark(r)),l.focus()})}function W(t){var n=t.href;return 0<n.indexOf("@")&&-1===n.indexOf("/")&&-1===n.indexOf("mailto:")?it.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:function(t){return st(st({},t),{href:"mailto:"+n})}}):it.none()}function H(t,n,e){var r=t.getAttrib(n,e);return null!==r&&0<r.length?it.some(r):it.none()}function G(d){var t,n=I(t=d);Tt(t,n).then(function(t){var n,e,i,u,r=function(t){var e=t.getData();if(!e.url.value)return F(i),void t.close();function n(n){return it.from(e[n]).filter(function(t){return!O(u.anchor[n],t)})}var r={href:e.url.value,text:n("text"),target:n("target"),rel:n("rel"),class:n("linkClass"),title:n("title")},o={href:e.url.value,attach:void 0!==e.url.meta&&e.url.meta.attach?e.url.meta.attach:h};Ct(i,r).then(function(t){q(i,o,t)}),t.close()},o=i=d,a=(n=u=t).anchor.text.map(function(){return{name:"text",type:"input",label:"Text to display"}}).toArray(),l=n.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],c=it.from(N(o)),f=n.anchor,s={url:{value:e=f.url.getOr(""),meta:{original:{value:e}}},text:f.text.getOr(""),title:f.title.getOr(""),anchor:e,link:e,rel:f.rel.getOr(""),target:f.target.or(c).getOr(""),linkClass:f.linkClass.getOr("")},m=n.catalogs,g=bt(s,m);return{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:x([[{name:"url",type:"urlinput",filetype:"file",label:"URL"}],a,l,function(t){for(var n=[],e=function(t){n.push(t)},r=0;r<t.length;r++)t[r].each(e);return n}([m.anchor.map(ft.createUi("anchor","Anchors")),m.rels.map(ft.createUi("rel","Rel")),m.targets.map(ft.createUi("target","Open link in...")),m.link.map(ft.createUi("link","Link list")),m.classes.map(ft.createUi("linkClass","Class"))])])},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:s,onChange:function(n,t){var e=t.name;g.onChange(n.getData,{name:e}).each(function(t){n.setData(t)})},onSubmit:r}}).then(function(t){d.windowManager.open(t)})}function J(t,n){return t.dom.getParent(n,"a[href]")}function X(t){return J(t,t.selection.getStart())}function $(t,n){var e,r;n&&(e=pt(n),/^#/.test(e)?(r=t.$(e)).length&&t.selection.scrollIntoView(r[0],!0):function(t){var n=document.createElement("a");n.target="_blank",n.href=t,n.rel="noreferrer noopener";var e,r,o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e=n,r=o,document.body.appendChild(e),e.dispatchEvent(r),document.body.removeChild(e)}(n.href))}function Q(t){return function(){G(t)}}function Y(t){return function(){$(t,X(t))}}function Z(t,n){return t.on("NodeChange",n),function(){return t.off("NodeChange",n)}}function tt(e){return function(t){function n(){return t.setActive(!e.mode.isReadOnly()&&null!==I(e,e.selection.getNode()))}return n(),Z(e,n)}}function nt(e){return function(t){function n(){return t.setDisabled(null===I(e,e.selection.getNode()))}return n(),Z(e,n)}}function et(r){return function(n){function e(t){return z(t)||0<M(r.selection.getRng(),E).length}var t=r.dom.getParents(r.selection.getStart());return n.setDisabled(!e(t)),Z(r,function(t){return n.setDisabled(!e(t.parents))})}}function rt(t){var n=x(function(t,n){for(var e=t.length,r=new Array(e),o=0;o<e;o++){var i=t[o];r[o]=n(i,o)}return r}(t.dom.select("a:not([href])"),function(t){var n=t.name||t.id;return n?[{text:n,value:"#"+n}]:[]}));return 0<n.length?it.some([{text:"None",value:""}].concat(n)):it.none()}var ot=function(e){function t(){return o}function n(t){return t(e)}var r=i(e),o={fold:function(t,n){return n(e)},isSome:g,isNone:m,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:t,orThunk:t,map:function(t){return ot(t(e))},each:function(t){t(e)},bind:n,exists:n,forall:n,filter:function(t){return t(e)?o:v},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return o},it={some:ot,none:o,from:function(t){return null==t?v:ot(t)}},ut=Array.prototype.indexOf,at=Array.prototype.push,lt=tinymce.util.Tools.resolve("tinymce.util.Tools"),ct=function(t,i){var u=[];return lt.each(t,function(t){var n,e,r,o=l((n=t).text)?n.text:l(n.title)?n.title:"";void 0!==t.menu?(e=ct(t.menu,i),u.push({text:o,items:e})):(r=i(t),u.push({text:o,value:r}))}),u},ft={sanitize:function(t){return _(S)(t)},sanitizeWith:_,createUi:function(n,e){return function(t){return{name:n,type:"listbox",label:e,items:t}}},getValue:S},st=function(){return(st=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)},mt=Object.keys,gt=Object.hasOwnProperty,dt=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),ht=tinymce.util.Tools.resolve("tinymce.util.URI"),pt=function(t){return t.getAttribute("data-mce-href")||t.getAttribute("href")},vt=function(t){return t&&"FIGURE"===t.nodeName&&/\bimage\b/i.test(t.className)},yt=function(t,n){var e,r=t.dom.select("img",n)[0];!r||(e=t.dom.getParents(r,"a[href]",n)[0])&&(e.parentNode.insertBefore(r,e),t.dom.remove(e))},kt=function(t,n,e){var r,o=t.dom.select("img",n)[0];o&&(r=t.dom.create("a",e),o.parentNode.insertBefore(r,o),r.appendChild(o))},xt=function(e,t){return b(t,function(t){return D(n=t,"items")&&void 0!==n.items&&null!==n.items?xt(e,t.items):w(t.value===e,t);var n})},bt=function(t,c){function f(t,n){var e,r,o,i,u,a,l=("link"===(e=n.name)?c.link:"anchor"===e?c.anchor:it.none()).getOr([]);return r=s.text,o=n.name,i=l,u=t[o],a=0<r.length,void 0!==u?xt(u,i).map(function(t){return{url:{value:t.value,meta:{text:a?r:t.text,attach:h}},text:a?r:t.text}}):it.none()}var s={text:t.text,title:t.title};return{onChange:function(t,n){var e,r,o,i,u,a,l=n.name;return"url"===l?(r=t(),o=r.url,u=w(s.text.length<=0,it.from(o.meta.text).getOr(o.value)),i=r.url,a=w(s.title.length<=0,it.from(i.meta.title).getOr("")),u.isSome()||a.isSome()?it.some(st(st({},u.map(function(t){return{text:t}}).getOr({})),a.map(function(t){return{title:t}}).getOr({}))):it.none()):(e=["anchor","link"],-1<ut.call(e,l)?f(t(),n):("text"!==l&&"title"!==l||(s[l]=t()[l]),it.none()))}}},Ot=tinymce.util.Tools.resolve("tinymce.util.Delay"),wt=tinymce.util.Tools.resolve("tinymce.util.Promise"),Ct=function(u,a){return b([W,(e=C(u),r=u.getParam("link_default_protocol","http","string"),function(t){var n=t.href;return 1===e&&!U(n)||0===e&&/^\s*www(\.|\d\.)/i.test(n)?it.some({message:"The URL you entered seems to be an external link. Do you want to add the required "+r+":// prefix?",preprocess:function(t){return st(st({},t),{href:r+"://"+n})}}):it.none()})],function(t){return t(a)}).fold(function(){return wt.resolve(a)},function(i){return new wt(function(n){var e=u,t=i.message,r=function(t){n(t?i.preprocess(a):a)},o=e.selection.getRng();Ot.setEditorTimeout(e,function(){e.windowManager.confirm(t,function(t){e.selection.setRng(o),r(t)})})})});var e,r},Nt=tinymce.util.Tools.resolve("tinymce.util.XHR"),At=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],Tt=function(m,g){return t=(e=m).getParam("link_list"),new wt(function(n){l(t)?Nt.send({url:t,success:function(t){return n(function(t){try{return it.some(JSON.parse(t))}catch(t){return it.none()}}(t))},error:function(t){return n(it.none())}}):s(t)?t(function(t){return n(it.some(t))}):n(it.from(t))}).then(function(t){return t.bind(ft.sanitizeWith(n)).map(function(t){return 0<t.length?[{text:"None",value:""}].concat(t):t})}).then(function(t){var n,e,r,o,i,u,a,l,c,f,s=(e=g,r=(n=m).dom,o=j(n)?it.some(K(n.selection,e)):it.none(),i=e?it.some(r.getAttrib(e,"href")):it.none(),u=e?it.from(r.getAttrib(e,"target")):it.none(),a=H(r,e,"rel"),l=H(r,e,"class"),{url:i,text:o,title:H(r,e,"title"),target:u,rel:a,linkClass:l});return{anchor:s,catalogs:{targets:(f=A(m),d(f)?ft.sanitize(f).orThunk(function(){return it.some(At)}):!1===f?it.none():it.some(At)),rels:function(t,n){var e=T(t);if(0<e.length){var r=O(n,"_blank");return(!1===P(t)?ft.sanitizeWith(function(t){return B(ft.getValue(t),r)}):ft.sanitize)(e)}return it.none()}(m,s.target),classes:0<(c=m.getParam("link_class_list",[],"array")).length?ft.sanitize(c):it.none(),anchor:rt(m),link:t},optNode:it.from(g),flags:{titleEnabled:m.getParam("link_title",!0,"boolean")}}});function n(t){return e.convertURL(t.value||t.url,"href")}var e,t};a.add("link",function(t){var n,e,r,o,i,u,a;function l(t){var n=a.selection.getNode();return t.setDisabled(!I(a,n)),h}(n=t).ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",onAction:Q(n),onSetup:tt(n)}),n.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:Y(n),onSetup:nt(n)}),n.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:function(){return F(n)},onSetup:et(n)}),(e=t).ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:Y(e),onSetup:nt(e)}),e.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:Q(e)}),e.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:function(){return F(e)},onSetup:et(e)}),(r=t).ui.registry.addContextMenu("link",{update:function(t){return z(r.dom.getParents(t,"a"))?"link unlink openlink":"link"}}),(a=t).ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:tt(a)},label:"Link",predicate:function(t){return!!I(a,t)&&a.getParam("link_context_toolbar",!1,"boolean")},initValue:function(){var t=I(a);return t?pt(t):""},commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:function(t){var n=a.selection.getNode();return t.setActive(!!I(a,n)),tt(a)(t)},onAction:function(t){var n=t.getValue(),e=function(t){var n=I(a),e=j(a);if(n||!e)return it.none();var r=K(a.selection,n);return it.some(0<r.length?r:t)}(n);q(a,{href:n,attach:h},{href:n,text:e,title:it.none(),rel:it.none(),target:it.none(),class:it.none()}),a.selection.collapse(!1),t.hide()}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:l,onAction:function(t){F(a),t.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:l,onAction:function(t){Y(a)(),t.hide()}}]}),(u=t).on("click",function(t){var n=J(u,t.target);n&&c.metaKeyPressed(t)&&(t.preventDefault(),$(u,n))}),u.on("keydown",function(t){var n=X(u);n&&13===t.keyCode&&!0===t.altKey&&!1===t.shiftKey&&!1===t.ctrlKey&&!1===t.metaKey&&(t.preventDefault(),$(u,n))}),(o=t).addCommand("mceLink",function(){o.getParam("link_quicklink",!1,"boolean")?o.fire("contexttoolbar-show",{toolbarKey:"quicklink"}):Q(o)()}),(i=t).addShortcut("Meta+K","",function(){i.execCommand("mceLink")})})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.0.11 (2019-07-04)
7
+ * Version: 5.10.7 (2022-12-06)
8
8
  */
9
- !function(u){"use strict";var e,n,t,r,o,i,a,s,c=tinymce.util.Tools.resolve("tinymce.PluginManager"),v=function(e){return function(){return e}},f=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return!t.apply(null,e)}},d=v(!1),l=v(!0),m=d,g=l,p=function(){return h},h=(r={fold:function(e,n){return e()},is:m,isSome:m,isNone:g,getOr:t=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:t,orThunk:n,map:p,ap:p,each:function(){},bind:p,flatten:p,exists:m,forall:g,filter:p,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:v("none()")},Object.freeze&&Object.freeze(r),r),y=function(t){var e=function(){return t},n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:g,isNone:m,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return y(e(t))},ap:function(e){return e.fold(p,function(e){return y(e(t))})},each:function(e){e(t)},bind:r,flatten:e,exists:r,forall:r,filter:function(e){return e(t)?o:h},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(m,function(e){return n(t,e)})},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},N={some:y,none:p,from:function(e){return null===e||e===undefined?h:y(e)}},S=function(n){return function(e){return function(e){if(null===e)return"null";var n=typeof e;return"object"===n&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===n&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":n}(e)===n}},O=S("string"),C=S("boolean"),b=S("function"),L=S("number"),T=Array.prototype.slice,D=function(e,n){for(var t=e.length,r=new Array(t),o=0;o<t;o++){var i=e[o];r[o]=n(i,o,e)}return r},E=function(e,n){for(var t=0,r=e.length;t<r;t++){n(e[t],t,e)}},w=function(e,n){for(var t=[],r=0,o=e.length;r<o;r++){var i=e[r];n(i,r,e)&&t.push(i)}return t},k=function(e,n,t){return E(e,function(e){t=n(t,e)}),t},A=function(e,n){for(var t=0,r=e.length;t<r;t++){var o=e[t];if(n(o,t,e))return N.some(o)}return N.none()},x=Array.prototype.push,R=function(e,n){return function(e){for(var n=[],t=0,r=e.length;t<r;++t){if(!Array.prototype.isPrototypeOf(e[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+e);x.apply(n,e[t])}return n}(D(e,n))},I=function(e){return 0===e.length?N.none():N.some(e[0])},_=function(e){return 0===e.length?N.none():N.some(e[e.length-1])},B=(b(Array.from)&&Array.from,function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:v(e)}}),P={fromHtml:function(e,n){var t=(n||u.document).createElement("div");if(t.innerHTML=e,!t.hasChildNodes()||1<t.childNodes.length)throw u.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return B(t.childNodes[0])},fromTag:function(e,n){var t=(n||u.document).createElement(e);return B(t)},fromText:function(e,n){var t=(n||u.document).createTextNode(e);return B(t)},fromDom:B,fromPoint:function(e,n,t){var r=e.dom();return N.from(r.elementFromPoint(n,t)).map(B)}},M="undefined"!=typeof u.window?u.window:Function("return this;")(),U=function(e,n){return function(e,n){for(var t=n!==undefined&&null!==n?n:M,r=0;r<e.length&&t!==undefined&&null!==t;++r)t=t[e[r]];return t}(e.split("."),n)},F=function(e,n){var t=U(e,n);if(t===undefined||null===t)throw e+" not available on this browser";return t},j=function(){return F("Node")},H=function(e,n,t){return 0!=(e.compareDocumentPosition(n)&t)},$=function(e,n){return H(e,n,j().DOCUMENT_POSITION_CONTAINED_BY)},q=function(e,n){var t=function(e,n){for(var t=0;t<e.length;t++){var r=e[t];if(r.test(n))return r}return undefined}(e,n);if(!t)return{major:0,minor:0};var r=function(e){return Number(n.replace(t,"$"+e))};return V(r(1),r(2))},W=function(){return V(0,0)},V=function(e,n){return{major:e,minor:n}},z={nu:V,detect:function(e,n){var t=String(n).toLowerCase();return 0===e.length?W():q(e,t)},unknown:W},K="Firefox",X=function(e,n){return function(){return n===e}},Q=function(e){var n=e.current;return{current:n,version:e.version,isEdge:X("Edge",n),isChrome:X("Chrome",n),isIE:X("IE",n),isOpera:X("Opera",n),isFirefox:X(K,n),isSafari:X("Safari",n)}},Y={unknown:function(){return Q({current:undefined,version:z.unknown()})},nu:Q,edge:v("Edge"),chrome:v("Chrome"),ie:v("IE"),opera:v("Opera"),firefox:v(K),safari:v("Safari")},G="Windows",J="Android",Z="Solaris",ee="FreeBSD",ne=function(e,n){return function(){return n===e}},te=function(e){var n=e.current;return{current:n,version:e.version,isWindows:ne(G,n),isiOS:ne("iOS",n),isAndroid:ne(J,n),isOSX:ne("OSX",n),isLinux:ne("Linux",n),isSolaris:ne(Z,n),isFreeBSD:ne(ee,n)}},re={unknown:function(){return te({current:undefined,version:z.unknown()})},nu:te,windows:v(G),ios:v("iOS"),android:v(J),linux:v("Linux"),osx:v("OSX"),solaris:v(Z),freebsd:v(ee)},oe=function(e,n){var t=String(n).toLowerCase();return A(e,function(e){return e.search(t)})},ie=function(e,t){return oe(e,t).map(function(e){var n=z.detect(e.versionRegexes,t);return{current:e.name,version:n}})},ue=function(e,t){return oe(e,t).map(function(e){var n=z.detect(e.versionRegexes,t);return{current:e.name,version:n}})},ae=function(e,n){return-1!==e.indexOf(n)},se=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,ce=function(n){return function(e){return ae(e,n)}},fe=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return ae(e,"edge/")&&ae(e,"chrome")&&ae(e,"safari")&&ae(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,se],search:function(e){return ae(e,"chrome")&&!ae(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return ae(e,"msie")||ae(e,"trident")}},{name:"Opera",versionRegexes:[se,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:ce("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:ce("firefox")},{name:"Safari",versionRegexes:[se,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(ae(e,"safari")||ae(e,"mobile/"))&&ae(e,"applewebkit")}}],de=[{name:"Windows",search:ce("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return ae(e,"iphone")||ae(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:ce("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:ce("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:ce("linux"),versionRegexes:[]},{name:"Solaris",search:ce("sunos"),versionRegexes:[]},{name:"FreeBSD",search:ce("freebsd"),versionRegexes:[]}],le={browsers:v(fe),oses:v(de)},me=function(e){var n,t,r,o,i,u,a,s,c,f,d,l=le.browsers(),m=le.oses(),g=ie(l,e).fold(Y.unknown,Y.nu),p=ue(m,e).fold(re.unknown,re.nu);return{browser:g,os:p,deviceType:(t=g,r=e,o=(n=p).isiOS()&&!0===/ipad/i.test(r),i=n.isiOS()&&!o,u=n.isAndroid()&&3===n.version.major,a=n.isAndroid()&&4===n.version.major,s=o||u||a&&!0===/mobile/i.test(r),c=n.isiOS()||n.isAndroid(),f=c&&!s,d=t.isSafari()&&n.isiOS()&&!1===/safari/i.test(r),{isiPad:v(o),isiPhone:v(i),isTablet:v(s),isPhone:v(f),isTouch:v(c),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:v(d)})}},ge={detect:(a=!(o=function(){var e=u.navigator.userAgent;return me(e)}),function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return a||(a=!0,i=o.apply(null,e)),i})},pe=(u.Node.ATTRIBUTE_NODE,u.Node.CDATA_SECTION_NODE,u.Node.COMMENT_NODE,u.Node.DOCUMENT_NODE,u.Node.DOCUMENT_TYPE_NODE,u.Node.DOCUMENT_FRAGMENT_NODE,u.Node.ELEMENT_NODE),ve=(u.Node.TEXT_NODE,u.Node.PROCESSING_INSTRUCTION_NODE,u.Node.ENTITY_REFERENCE_NODE,u.Node.ENTITY_NODE,u.Node.NOTATION_NODE,pe),he=function(e,n){return e.dom()===n.dom()},ye=ge.detect().browser.isIE()?function(e,n){return $(e.dom(),n.dom())}:function(e,n){var t=e.dom(),r=n.dom();return t!==r&&t.contains(r)},Ne=function(e,n){var t=e.dom();if(t.nodeType!==ve)return!1;if(t.matches!==undefined)return t.matches(n);if(t.msMatchesSelector!==undefined)return t.msMatchesSelector(n);if(t.webkitMatchesSelector!==undefined)return t.webkitMatchesSelector(n);if(t.mozMatchesSelector!==undefined)return t.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")},Se=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Oe=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),Ce=tinymce.util.Tools.resolve("tinymce.util.VK"),be=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),Le=tinymce.util.Tools.resolve("tinymce.util.Tools"),Te=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),De=function(e){return e&&"BR"===e.nodeName},Ee=function(e){return e&&3===e.nodeType},we=function(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)},ke=function(e){return e&&/^(OL|UL)$/.test(e.nodeName)},Ae=function(e){return e&&/^(DT|DD)$/.test(e.nodeName)},xe=function(e){return e&&/^(LI|DT|DD)$/.test(e.nodeName)},Re=function(e){return e&&/^(TH|TD)$/.test(e.nodeName)},Ie=De,_e=function(e,n){return n&&!!e.schema.getTextBlockElements()[n.nodeName]},Be=function(e,n){return e&&e.nodeName in n},Pe=function(e,n){return!!De(n)&&!(!e.isBlock(n.nextSibling)||De(n.previousSibling))},Me=function(e,n,t){var r=e.isEmpty(n);return!(t&&0<e.select("span[data-mce-type=bookmark]",n).length)&&r},Ue=function(e,n){return e.isChildOf(n,e.getRoot())},Fe=function(e,n){if(Ee(e))return{container:e,offset:n};var t=Se.getNode(e,n);return Ee(t)?{container:t,offset:n>=e.childNodes.length?t.data.length:0}:t.previousSibling&&Ee(t.previousSibling)?{container:t.previousSibling,offset:t.previousSibling.data.length}:t.nextSibling&&Ee(t.nextSibling)?{container:t.nextSibling,offset:0}:{container:e,offset:n}},je=function(e){var n=e.cloneRange(),t=Fe(e.startContainer,e.startOffset);n.setStart(t.container,t.offset);var r=Fe(e.endContainer,e.endOffset);return n.setEnd(r.container,r.offset),n},He=Te.DOM,$e=function(o){var i={},e=function(e){var n,t,r;t=o[e?"startContainer":"endContainer"],r=o[e?"startOffset":"endOffset"],1===t.nodeType&&(n=He.create("span",{"data-mce-type":"bookmark"}),t.hasChildNodes()?(r=Math.min(r,t.childNodes.length-1),e?t.insertBefore(n,t.childNodes[r]):He.insertAfter(n,t.childNodes[r])):t.appendChild(n),t=n,r=0),i[e?"startContainer":"endContainer"]=t,i[e?"startOffset":"endOffset"]=r};return e(!0),o.collapsed||e(),i},qe=function(o){function e(e){var n,t,r;n=r=o[e?"startContainer":"endContainer"],t=o[e?"startOffset":"endOffset"],n&&(1===n.nodeType&&(t=function(e){for(var n=e.parentNode.firstChild,t=0;n;){if(n===e)return t;1===n.nodeType&&"bookmark"===n.getAttribute("data-mce-type")||t++,n=n.nextSibling}return-1}(n),n=n.parentNode,He.remove(r),!n.hasChildNodes()&&He.isBlock(n)&&n.appendChild(He.create("br"))),o[e?"startContainer":"endContainer"]=n,o[e?"startOffset":"endOffset"]=t)}e(!0),e();var n=He.createRng();return n.setStart(o.startContainer,o.startOffset),o.endContainer&&n.setEnd(o.endContainer,o.endOffset),je(n)},We=function(e){var n,t=U("ownerDocument.defaultView",e);return(n=t,F("HTMLElement",n)).prototype.isPrototypeOf(e)},Ve=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),ze=function(e){var n=e.selection.getStart(!0);return e.dom.getParent(n,"OL,UL,DL",Xe(e,n))},Ke=function(e){var t,n,r,o=e.selection.getSelectedBlocks();return Le.grep((t=e,n=o,r=Le.map(n,function(e){var n=t.dom.getParent(e,"li,dd,dt",Xe(t,e));return n||e}),Ve.unique(r)),function(e){return xe(e)})},Xe=function(e,n){var t=e.dom.getParents(n,"TD,TH");return 0<t.length?t[0]:e.getBody()},Qe=function(e,n){var t=e.dom.getParents(n,"ol,ul",Xe(e,n));return _(t)},Ye=function(n,e){var t=D(e,function(e){return Qe(n,e).getOr(e)});return Ve.unique(t)},Ge={isList:function(e){var n=ze(e);return We(n)},getParentList:ze,getSelectedSubLists:function(e){var n,t,r,o=ze(e),i=e.selection.getSelectedBlocks();return r=i,(t=o)&&1===r.length&&r[0]===t?(n=o,Le.grep(n.querySelectorAll("ol,ul,dl"),function(e){return we(e)})):Le.grep(i,function(e){return we(e)&&o!==e})},getSelectedListItems:Ke,getClosestListRootElm:Xe,getSelectedDlItems:function(e){return w(Ke(e),Ae)},getSelectedListRoots:function(e){var n,t,r,o=(t=Qe(n=e,n.selection.getStart()),r=w(n.selection.getSelectedBlocks(),ke),t.toArray().concat(r));return Ye(e,o)}},Je=function(e,n){for(var t=[],r=0;r<e.length;r++){var o=e[r];if(!o.isSome())return N.none();t.push(o.getOrDie())}return N.some(n.apply(null,t))},Ze=Object.keys,en=function(e){var n=e.dom();return N.from(n.parentNode).map(P.fromDom)},nn=function(e){var n=e.dom();return D(n.childNodes,P.fromDom)},tn=function(e,n){var t=e.dom().childNodes;return N.from(t[n]).map(P.fromDom)},rn=function(e){return tn(e,0)},on=function(e){return tn(e,e.dom().childNodes.length-1)},un=(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n]}("element","offset"),function(n,t){en(n).each(function(e){e.dom().insertBefore(t.dom(),n.dom())})}),an=function(e,n){e.dom().appendChild(n.dom())},sn=function(n,e){E(e,function(e){an(n,e)})},cn=function(e){var n=e.dom();null!==n.parentNode&&n.parentNode.removeChild(n)},fn=function(e){return e.dom().nodeName.toLowerCase()},dn=function(e,n){var t=e.dom();!function(e,n){for(var t=Ze(e),r=0,o=t.length;r<o;r++){var i=t[r];n(e[i],i,e)}}(n,function(e,n){!function(e,n,t){if(!(O(t)||C(t)||L(t)))throw u.console.error("Invalid call to Attr.set. Key ",n,":: Value ",t,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(n,t+"")}(t,n,e)})},ln=function(e){return k(e.dom().attributes,function(e,n){return e[n.name]=n.value,e},{})},mn=function(e,n,t){if(!O(t))throw u.console.error("Invalid call to CSS.set. Property ",n,":: Value ",t,":: Element ",e),new Error("CSS value must be a string: "+t);var r;(r=e).style!==undefined&&b(r.style.getPropertyValue)&&e.style.setProperty(n,t)},gn=function(e){return n=e,t=!0,P.fromDom(n.dom().cloneNode(t));var n,t},pn=function(e,n){var t,r,o,i,u=(t=e,r=n,o=P.fromTag(r),i=ln(t),dn(o,i),o);un(e,u);var a=nn(e);return sn(u,a),cn(e),u},vn=function(e,n){an(e.item,n.list)},hn=function(f,e,d){var n=e.slice(0,d.depth);return _(n).each(function(e){var n,t,r,o,i,u,a,s,c=(n=f,t=d.itemAttributes,r=d.content,o=P.fromTag("li",n),dn(o,t),sn(o,r),o);u=c,an((i=e).list,u),i.item=u,s=d,fn((a=e).list)!==s.listType&&(a.list=pn(a.list,s.listType)),dn(a.list,s.listAttributes)}),n},yn=function(e,n,t){var r,o=function(e,n,t){for(var r,o,i,u=[],a=0;a<t;a++)u.push((r=e,o=n.listType,i={list:P.fromTag(o,r),item:P.fromTag("li",r)},an(i.list,i.item),i));return u}(e,t,t.depth-n.length);return function(e){for(var n=1;n<e.length;n++)vn(e[n-1],e[n])}(o),function(e,n){for(var t=0;t<e.length-1;t++)r=e[t].item,o="list-style-type",i="none",u=r.dom(),mn(u,o,i);var r,o,i,u;_(e).each(function(e){dn(e.list,n.listAttributes),dn(e.item,n.itemAttributes),sn(e.item,n.content)})}(o,t),r=o,Je([_(n),I(r)],vn),n.concat(o)},Nn=function(e){return Ne(e,"OL,UL")},Sn=function(e){return rn(e).map(Nn).getOr(!1)},On=function(e){return 0<e.depth},Cn=function(e){return e.isSelected},bn=function(e){var n=nn(e),t=on(e).map(Nn).getOr(!1)?n.slice(0,-1):n;return D(t,gn)},Ln=Object.prototype.hasOwnProperty,Tn=(s=function(e,n){return n},function(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Can't merge zero objects");for(var t={},r=0;r<e.length;r++){var o=e[r];for(var i in o)Ln.call(o,i)&&(t[i]=s(t[i],o[i]))}return t}),Dn=function(n){E(n,function(r,e){(function(e,n){for(var t=e[n].depth,r=n-1;0<=r;r--){if(e[r].depth===t)return N.some(e[r]);if(e[r].depth<t)break}return N.none()})(n,e).each(function(e){var n,t;t=e,(n=r).listType=t.listType,n.listAttributes=Tn({},t.listAttributes)})})},En=function(e){var n=e,t=function(){return n};return{get:t,set:function(e){n=e},clone:function(){return En(t())}}},wn=function(i,u,a,s){return rn(s).filter(Nn).fold(function(){u.each(function(e){he(e.start,s)&&a.set(!0)});var n,t,r,e=(n=s,t=i,r=a.get(),en(n).map(function(e){return{depth:t,isSelected:r,content:bn(n),itemAttributes:ln(n),listAttributes:ln(e),listType:fn(e)}}));u.each(function(e){he(e.end,s)&&a.set(!1)});var o=on(s).filter(Nn).map(function(e){return kn(i,u,a,e)}).getOr([]);return e.toArray().concat(o)},function(e){return kn(i,u,a,e)})},kn=function(n,t,r,e){return R(nn(e),function(e){return(Nn(e)?kn:wn)(n+1,t,r,e)})},An=tinymce.util.Tools.resolve("tinymce.Env"),xn=function(e,n){var t,r,o,i,u=e.dom,a=e.schema.getBlockElements(),s=u.createFragment();if(e.settings.forced_root_block&&(o=e.settings.forced_root_block),o&&((r=u.create(o)).tagName===e.settings.forced_root_block&&u.setAttribs(r,e.settings.forced_root_block_attrs),Be(n.firstChild,a)||s.appendChild(r)),n)for(;t=n.firstChild;){var c=t.nodeName;i||"SPAN"===c&&"bookmark"===t.getAttribute("data-mce-type")||(i=!0),Be(t,a)?(s.appendChild(t),r=null):o?(r||(r=u.create(o),s.appendChild(r)),r.appendChild(t)):s.appendChild(t)}return e.settings.forced_root_block?i||An.ie&&!(10<An.ie)||r.appendChild(u.create("br",{"data-mce-bogus":"1"})):s.appendChild(u.create("br")),s},Rn=function(e,n,t){return e.fire("ListMutation",{action:n,element:t})},In=function(i,e){return D(e,function(e){var n,t,r,o=(n=e.content,r=(t||u.document).createDocumentFragment(),E(n,function(e){r.appendChild(e.dom())}),P.fromDom(r));return P.fromDom(xn(i,o.dom()))})},_n=function(e,n){return Dn(n),(t=e.contentDocument,r=n,o=k(r,function(e,n){return n.depth>e.length?yn(t,e,n):hn(t,e,n)},[]),I(o).map(function(e){return e.list})).toArray();var t,r,o},Bn=function(e){var n,t,r=D(Ge.getSelectedListItems(e),P.fromDom);return Je([A(r,f(Sn)),A((n=r,t=T.call(n,0),t.reverse(),t),f(Sn))],function(e,n){return{start:e,end:n}})},Pn=function(a,e,s){var n,t,r,o=(n=e,t=Bn(a),r=En(!1),D(n,function(e){return{sourceList:e,entries:kn(0,t,r,e)}}));E(o,function(e){var n,t;n=e.entries,t=s,E(w(n,Cn),function(e){return function(e,n){switch(e){case"Indent":n.depth++;break;case"Outdent":n.depth--;break;case"Flatten":n.depth=0}}(t,e)});var r,o,i,u=(r=a,o=e.entries,R(function(e,n){if(0===e.length)return[];for(var t=n(e[0]),r=[],o=[],i=0,u=e.length;i<u;i++){var a=e[i],s=n(a);s!==t&&(r.push(o),o=[]),t=s,o.push(a)}return 0!==o.length&&r.push(o),r}(o,On),function(e){return I(e).map(On).getOr(!1)?_n(r,e):In(r,e)}));E(u,function(e){Rn(a,"Indent"===s?"IndentList":"OutdentList",e.dom())}),i=e.sourceList,E(u,function(e){un(i,e)}),cn(e.sourceList)})},Mn=Te.DOM,Un=function(e,n,t){var r,o,i,u,a,s;for(i=Mn.select('span[data-mce-type="bookmark"]',n),a=xn(e,t),(r=Mn.createRng()).setStartAfter(t),r.setEndAfter(n),u=(o=r.extractContents()).firstChild;u;u=u.firstChild)if("LI"===u.nodeName&&e.dom.isEmpty(u)){Mn.remove(u);break}e.dom.isEmpty(o)||Mn.insertAfter(o,n),Mn.insertAfter(a,n),Me(e.dom,t.parentNode)&&(s=t.parentNode,Le.each(i,function(e){s.parentNode.insertBefore(e,t.parentNode)}),Mn.remove(s)),Mn.remove(t),Me(e.dom,n)&&Mn.remove(n)},Fn=function(e){Ne(e,"DT")&&pn(e,"DD")},jn=function(r,e,n){E(n,"Indent"===e?Fn:function(e){return n=r,void(Ne(t=e,"DD")?pn(t,"DT"):Ne(t,"DT")&&en(t).each(function(e){return Un(n,e.dom(),t.dom())}));var n,t})},Hn=function(e,n){var t=D(Ge.getSelectedListRoots(e),P.fromDom),r=D(Ge.getSelectedDlItems(e),P.fromDom),o=!1;if(t.length||r.length){var i=e.selection.getBookmark();Pn(e,t,n),jn(e,n,r),e.selection.moveToBookmark(i),e.selection.setRng(je(e.selection.getRng())),e.nodeChanged(),o=!0}return o},$n=function(e){return Hn(e,"Indent")},qn=function(e){return Hn(e,"Outdent")},Wn=function(e){return Hn(e,"Flatten")},Vn=function(e){return/\btox\-/.test(e.className)},zn=function(e){switch(e){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}},Kn=function(t,e){Le.each(e,function(e,n){t.setAttribute(n,e)})},Xn=function(e,n,t){var r,o,i,u,a,s,c;r=e,o=n,u=(i=t)["list-style-type"]?i["list-style-type"]:null,r.setStyle(o,"list-style-type",u),a=e,Kn(s=n,(c=t)["list-attributes"]),Le.each(a.select("li",s),function(e){Kn(e,c["list-item-attributes"])})},Qn=function(e,n,t,r){var o,i;for(o=n[t?"startContainer":"endContainer"],i=n[t?"startOffset":"endOffset"],1===o.nodeType&&(o=o.childNodes[Math.min(i,o.childNodes.length-1)]||o),!t&&Ie(o.nextSibling)&&(o=o.nextSibling);o.parentNode!==r;){if(_e(e,o))return o;if(/^(TD|TH)$/.test(o.parentNode.nodeName))return o;o=o.parentNode}return o},Yn=function(f,d,l){void 0===l&&(l={});var e,n=f.selection.getRng(!0),m="LI",t=Ge.getClosestListRootElm(f,f.selection.getStart(!0)),g=f.dom;"false"!==g.getContentEditable(f.selection.getNode())&&("DL"===(d=d.toUpperCase())&&(m="DT"),e=$e(n),Le.each(function(t,e,r){for(var o,i=[],u=t.dom,n=Qn(t,e,!0,r),a=Qn(t,e,!1,r),s=[],c=n;c&&(s.push(c),c!==a);c=c.nextSibling);return Le.each(s,function(e){if(_e(t,e))return i.push(e),void(o=null);if(u.isBlock(e)||Ie(e))return Ie(e)&&u.remove(e),void(o=null);var n=e.nextSibling;be.isBookmarkNode(e)&&(_e(t,n)||!n&&e.parentNode===r)?o=null:(o||(o=u.create("p"),e.parentNode.insertBefore(o,e),i.push(o)),o.appendChild(e))}),i}(f,n,t),function(e){var n,t,r,o,i,u,a,s,c;(t=e.previousSibling)&&we(t)&&t.nodeName===d&&(r=t,o=l,i=g.getStyle(r,"list-style-type"),u=o?o["list-style-type"]:"",i===(u=null===u?"":u))?(n=t,e=g.rename(e,m),t.appendChild(e)):(n=g.create(d),e.parentNode.insertBefore(n,e),n.appendChild(e),e=g.rename(e,m)),a=g,s=e,c=["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"],Le.each(c,function(e){var n;return a.setStyle(s,((n={})[e]="",n))}),Xn(g,n,l),Jn(f.dom,n)}),f.selection.setRng(qe(e)))},Gn=function(e,n,t){return s=t,(a=n)&&s&&we(a)&&a.nodeName===s.nodeName&&(i=n,u=t,(o=e).getStyle(i,"list-style-type",!0)===o.getStyle(u,"list-style-type",!0))&&(r=t,n.className===r.className);var r,o,i,u,a,s},Jn=function(e,n){var t,r;if(t=n.nextSibling,Gn(e,n,t)){for(;r=t.firstChild;)n.appendChild(r);e.remove(t)}if(t=n.previousSibling,Gn(e,n,t)){for(;r=t.lastChild;)n.insertBefore(r,n.firstChild);e.remove(t)}},Zn=function(n,e,t,r,o){if(e.nodeName!==r||et(o)){var i=$e(n.selection.getRng(!0));Le.each([e].concat(t),function(e){!function(e,n,t,r){if(n.nodeName!==t){var o=e.dom.rename(n,t);Xn(e.dom,o,r),Rn(e,zn(t),o)}else Xn(e.dom,n,r),Rn(e,zn(t),n)}(n,e,r,o)}),n.selection.setRng(qe(i))}else Wn(n)},et=function(e){return"list-style-type"in e},nt={toggleList:function(e,n,t){var r=Ge.getParentList(e),o=Ge.getSelectedSubLists(e);t=t||{},r&&0<o.length?Zn(e,r,o,n,t):function(e,n,t,r){if(n!==e.getBody())if(n)if(n.nodeName!==t||et(r)||Vn(n)){var o=$e(e.selection.getRng(!0));Xn(e.dom,n,r);var i=e.dom.rename(n,t);Jn(e.dom,i),e.selection.setRng(qe(o)),Rn(e,zn(t),i)}else Wn(e);else Yn(e,t,r),Rn(e,zn(t),n)}(e,r,n,t)},mergeWithAdjacentLists:Jn},tt=Te.DOM,rt=function(e,n){var t,r=n.parentNode;"LI"===r.nodeName&&r.firstChild===n&&((t=r.previousSibling)&&"LI"===t.nodeName?(t.appendChild(n),Me(e,r)&&tt.remove(r)):tt.setStyle(r,"listStyleType","none")),we(r)&&(t=r.previousSibling)&&"LI"===t.nodeName&&t.appendChild(n)},ot=function(n,e){Le.each(Le.grep(n.select("ol,ul",e)),function(e){rt(n,e)})},it=function(e,n,t,r){var o=n.startContainer,i=n.startOffset;if(Ee(o)&&(t?i<o.data.length:0<i))return o;var u=e.schema.getNonEmptyElements();1===o.nodeType&&(o=Se.getNode(o,i));var a=new Oe(o,r);for(t&&Pe(e.dom,o)&&a.next();o=a[t?"next":"prev2"]();){if("LI"===o.nodeName&&!o.hasChildNodes())return o;if(u[o.nodeName])return o;if(Ee(o)&&0<o.data.length)return o}},ut=function(e,n){var t=n.childNodes;return 1===t.length&&!we(t[0])&&e.isBlock(t[0])},at=function(e,n,t){var r,o,i,u;if(o=ut(e,t)?t.firstChild:t,ut(i=e,u=n)&&i.remove(u.firstChild,!0),!Me(e,n,!0))for(;r=n.firstChild;)o.appendChild(r)},st=function(n,e,t){var r,o,i=e.parentNode;if(Ue(n,e)&&Ue(n,t)){we(t.lastChild)&&(o=t.lastChild),i===t.lastChild&&Ie(i.previousSibling)&&n.remove(i.previousSibling),(r=t.lastChild)&&Ie(r)&&e.hasChildNodes()&&n.remove(r),Me(n,t,!0)&&n.$(t).empty(),at(n,e,t),o&&t.appendChild(o);var u=ye(P.fromDom(t),P.fromDom(e))?n.getParents(e,we,t):[];n.remove(e),E(u,function(e){Me(n,e)&&e!==n.getRoot()&&n.remove(e)})}},ct=function(e,n,t,r){var o,i,u,a=e.dom;if(a.isEmpty(r))i=t,u=r,(o=e).dom.$(u).empty(),st(o.dom,i,u),o.selection.setCursorLocation(u);else{var s=$e(n);st(a,t,r),e.selection.setRng(qe(s))}},ft=function(e,n){var t=e.dom,r=e.selection,o=r.getStart(),i=Ge.getClosestListRootElm(e,o),u=t.getParent(r.getStart(),"LI",i);if(u){var a=u.parentNode;if(a===e.getBody()&&Me(t,a))return!0;var s=je(r.getRng()),c=t.getParent(it(e,s,n,i),"LI",i);if(c&&c!==u)return e.undoManager.transact(function(){n?ct(e,s,c,u):function(e,n,t,r){var o=$e(n);st(e.dom,t,r);var i=qe(o);e.selection.setRng(i)}(e,s,u,c)}),!0;if(!c&&!n&&0===s.startOffset&&0===s.endOffset)return e.undoManager.transact(function(){Wn(e)}),!0}return!1},dt=function(e,n){return ft(e,n)||function(o,i){var u=o.dom,e=o.selection.getStart(),a=Ge.getClosestListRootElm(o,e),s=u.getParent(e,u.isBlock,a);if(s&&u.isEmpty(s)){var n=je(o.selection.getRng()),c=u.getParent(it(o,n,i,a),"LI",a);if(c)return o.undoManager.transact(function(){var e,n,t,r;n=s,t=a,r=(e=u).getParent(n.parentNode,e.isBlock,t),e.remove(n),r&&e.isEmpty(r)&&e.remove(r),nt.mergeWithAdjacentLists(u,c.parentNode),o.selection.select(c,!0),o.selection.collapse(i)}),!0}return!1}(e,n)},lt=function(e,n){return e.selection.isCollapsed()?dt(e,n):(r=(t=e).selection.getStart(),o=Ge.getClosestListRootElm(t,r),!!(t.dom.getParent(r,"LI,DT,DD",o)||0<Ge.getSelectedListItems(t).length)&&(t.undoManager.transact(function(){t.execCommand("Delete"),ot(t.dom,t.getBody())}),!0));var t,r,o},mt=function(n){n.on("keydown",function(e){e.keyCode===Ce.BACKSPACE?lt(n,!1)&&e.preventDefault():e.keyCode===Ce.DELETE&&lt(n,!0)&&e.preventDefault()})},gt=lt,pt=function(n){return{backspaceDelete:function(e){gt(n,e)}}},vt=function(n,t){return function(){var e=n.dom.getParent(n.selection.getStart(),"UL,OL,DL");return e&&e.nodeName===t}},ht=function(t){t.on("BeforeExecCommand",function(e){var n=e.command.toLowerCase();"indent"===n?$n(t):"outdent"===n&&qn(t)}),t.addCommand("InsertUnorderedList",function(e,n){nt.toggleList(t,"UL",n)}),t.addCommand("InsertOrderedList",function(e,n){nt.toggleList(t,"OL",n)}),t.addCommand("InsertDefinitionList",function(e,n){nt.toggleList(t,"DL",n)}),t.addCommand("RemoveList",function(){Wn(t)}),t.addQueryStateHandler("InsertUnorderedList",vt(t,"UL")),t.addQueryStateHandler("InsertOrderedList",vt(t,"OL")),t.addQueryStateHandler("InsertDefinitionList",vt(t,"DL"))},yt=function(e){return e.getParam("lists_indent_on_tab",!0)},Nt=function(e){var n;yt(e)&&(n=e).on("keydown",function(e){e.keyCode!==Ce.TAB||Ce.metaKeyPressed(e)||n.undoManager.transact(function(){(e.shiftKey?qn(n):$n(n))&&e.preventDefault()})}),mt(e)},St=function(n,i){return function(o){var e=function(e){var n=function(e,n){for(var t=0;t<e.length;t++)if(n(e[t]))return t;return-1}(e.parents,Re),t=-1!==n?e.parents.slice(0,n):e.parents,r=Le.grep(t,we);o.setActive(0<r.length&&r[0].nodeName===i&&!Vn(r[0]))};return n.on("NodeChange",e),function(){return n.off("NodeChange",e)}}},Ot=function(n){var e,t,r,o=function(e){return function(){return n.execCommand(e)}};t="advlist",r=(e=n).settings.plugins?e.settings.plugins:"",-1===Le.inArray(r.split(/[ ,]/),t)&&(n.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:o("InsertOrderedList"),onSetup:St(n,"OL")}),n.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:o("InsertUnorderedList"),onSetup:St(n,"UL")}))};!function Ct(){c.add("lists",function(e){return Nt(e),Ot(e),ht(e),pt(e)})}()}(window);
9
+ !function(){"use strict";function e(r){return function(e){return n=typeof(t=e),(null===t?"null":"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n)===r;var t,n}}function t(t){return function(e){return typeof e===t}}function u(){}function S(e){return function(){return e}}function n(e){return e}function r(e,t){return e===t}function y(t){return function(e){return!t(e)}}function o(){return p}var i=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=e("string"),O=e("object"),s=e("array"),c=t("boolean"),f=t("function"),d=t("number"),l=S(!1),m=S(!0),p={fold:function(e,t){return e()},isSome:l,isNone:m,getOr:n,getOrThunk:g,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:S(null),getOrUndefined:S(void 0),or:n,orThunk:g,map:o,each:u,bind:o,exists:l,forall:m,filter:function(){return p},toArray:function(){return[]},toString:S("none()")};function g(e){return e()}function C(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r}function b(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function L(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r)&&n.push(i)}return n}function v(e,n,r){return b(e,function(e,t){r=n(r,e,t)}),r}function h(e,t,n){for(var r=0,o=e.length;r<o;r++){var i=e[r];if(t(i,r))return E.some(i);if(n(i,r))break}return E.none()}function N(e,t){return h(e,t,l)}function T(e,t){return function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!s(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);P.apply(t,e[n])}return t}(C(e,t))}function D(e){var t=I.call(e,0);return t.reverse(),t}function x(e,t){return 0<=t&&t<e.length?E.some(e[t]):E.none()}function A(e){return x(e,0)}function w(e){return x(e,e.length-1)}var k=function(n){function e(){return o}function t(e){return e(n)}var r=S(n),o={fold:function(e,t){return t(n)},isSome:m,isNone:l,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:e,orThunk:e,map:function(e){return k(e(n))},each:function(e){e(n)},bind:t,exists:t,forall:t,filter:function(e){return e(n)?o:p},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},E={some:k,none:o,from:function(e){return null==e?p:k(e)}},I=Array.prototype.slice,P=Array.prototype.push,B=function(){return(B=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function R(r,e){return function(e){for(var t=0;t<e.length;t++){var n=function(t){var n=t.brand.toLowerCase();return N(r,function(e){var t;return n===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())}).map(function(e){return{current:e.name,version:G.nu(parseInt(t.version,10),0)}})}(e[t]);if(n.isSome())return n}return E.none()}(e.brands)}function M(e,t){var n=String(t).toLowerCase();return N(e,function(e){return e.search(n)})}function U(e,t){return-1!==e.indexOf(t)}function _(t){return function(e){return U(e,t)}}function $(e){return window.matchMedia(e).matches}function F(e,t){return e.dom===t.dom}function H(e,t){return le().browser.isIE()?(n=e.dom,r=t.dom,o=Node.DOCUMENT_POSITION_CONTAINED_BY,0!=(n.compareDocumentPosition(r)&o)):(i=e.dom)!==(a=t.dom)&&i.contains(a);var n,r,o,i,a}function j(e,t){for(var n=ye(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i)}}function K(){return Z(0,0)}function V(e){function t(e){return function(){return n===e}}var n=e.current,r=e.version;return{current:n,version:r,isEdge:t("Edge"),isChrome:t("Chrome"),isIE:t("IE"),isOpera:t("Opera"),isFirefox:t(ne),isSafari:t("Safari")}}function W(e){function t(e){return function(){return n===e}}var n=e.current,r=e.version;return{current:n,version:r,isWindows:t(ie),isiOS:t("iOS"),isAndroid:t(ae),isOSX:t("OSX"),isLinux:t("Linux"),isSolaris:t(se),isFreeBSD:t(ue),isChromeOS:t(ce)}}function Q(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}}var X,q,z,Y,Z=function(e,t){return{major:e,minor:t}},G={nu:Z,detect:function(e,t){var n,r,o=String(t).toLowerCase();return 0===e.length?K():(r=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}}(e,n=o))?Z(i(1),i(2)):{major:0,minor:0};function i(e){return Number(n.replace(r,"$"+e))}},unknown:K},J=(X=/^\s+|\s+$/g,function(e){return e.replace(X,"")}),ee=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,te={browsers:S([{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return U(e,"edge/")&&U(e,"chrome")&&U(e,"safari")&&U(e,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ee],search:function(e){return U(e,"chrome")&&!U(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return U(e,"msie")||U(e,"trident")}},{name:"Opera",versionRegexes:[ee,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:_("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:_("firefox")},{name:"Safari",versionRegexes:[ee,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(U(e,"safari")||U(e,"mobile/"))&&U(e,"applewebkit")}}]),oses:S([{name:"Windows",search:_("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return U(e,"iphone")||U(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:_("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:_("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:_("linux"),versionRegexes:[]},{name:"Solaris",search:_("sunos"),versionRegexes:[]},{name:"FreeBSD",search:_("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:_("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}])},ne="Firefox",re=function(){return V({current:void 0,version:G.unknown()})},oe=V,ie=(S("Edge"),S("Chrome"),S("IE"),S("Opera"),S(ne),S("Safari"),"Windows"),ae="Android",se="Solaris",ue="FreeBSD",ce="ChromeOS",fe=function(){return W({current:void 0,version:G.unknown()})},de=W,le=(S(ie),S("iOS"),S(ae),S("Linux"),S("OSX"),S(se),S(ue),S(ce),Y=!(q=function(){return e=navigator.userAgent,t=E.from(navigator.userAgentData),n=$,g=te.browsers(),v=te.oses(),h=t.bind(function(e){return R(g,e)}).orThunk(function(){return M(g,n=e).map(function(e){var t=G.detect(e.versionRegexes,n);return{current:e.name,version:t}});var n}).fold(re,oe),y=M(v,r=e).map(function(e){var t=G.detect(e.versionRegexes,r);return{current:e.name,version:t}}).fold(fe,de),{browser:h,os:y,deviceType:(i=h,a=e,s=n,u=(o=y).isiOS()&&!0===/ipad/i.test(a),c=o.isiOS()&&!u,d=(f=o.isiOS()||o.isAndroid())||s("(pointer:coarse)"),l=u||!c&&f&&s("(min-device-width:768px)"),m=c||f&&!l,p=i.isSafari()&&o.isiOS()&&!1===/safari/i.test(a),{isiPad:S(u),isiPhone:S(c),isTablet:S(l),isPhone:S(m),isTouch:S(d),isAndroid:o.isAndroid,isiOS:o.isiOS,isWebView:S(p),isDesktop:S(!m&&!l&&!p)})};var e,t,n,r,o,i,a,s,u,c,f,d,l,m,p,g,v,h,y}),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Y||(Y=!0,z=q.apply(null,e)),z}),me={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return Q(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return Q(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return Q(n)},fromDom:Q,fromPoint:function(e,t,n){return E.from(e.dom.elementFromPoint(t,n)).map(Q)}},pe=function(e,t){var n=e.dom;if(1!==n.nodeType)return!1;var r=n;if(void 0!==r.matches)return r.matches(t);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(t);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(t);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},ge=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),ve=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),he=tinymce.util.Tools.resolve("tinymce.util.VK"),ye=Object.keys;function Se(e){return e.dom.nodeName.toLowerCase()}function Ce(t){return function(e){return Bt(e)&&Se(e)===t}}function be(e,t){var n=e.dom;j(t,function(e,t){!function(e,t,n){if(!(a(n)||c(n)||d(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")}(n,t,e)})}function Ne(e){return v(e.dom.attributes,function(e,t){return e[t.name]=t.value,e},{})}function Oe(e){return E.from(e.dom.parentNode).map(me.fromDom)}function Le(e){return C(e.dom.childNodes,me.fromDom)}function Te(e,t){var n=e.dom.childNodes;return E.from(n[t]).map(me.fromDom)}function De(e){return Te(e,0)}function xe(e){return Te(e,e.dom.childNodes.length-1)}function Ae(t,n){Oe(t).each(function(e){e.dom.insertBefore(n.dom,t.dom)})}function we(e,t){e.dom.appendChild(t.dom)}function ke(t,e){b(e,function(e){we(t,e)})}function Ee(e){var t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)}function Ie(e){return me.fromDom(e.dom.cloneNode(!0))}function Pe(e,t){var n,r,o=(n=e,be(r=me.fromTag(t),Ne(n)),r);return Ae(e,o),ke(o,Le(e)),Ee(e),o}function Be(t){return function(e){return e&&e.nodeName.toLowerCase()===t}}function Re(t){return function(e){return e&&t.test(e.nodeName)}}function Me(e){return e&&3===e.nodeType}function Ue(e,t){return t&&e.schema.getTextBlockElements()[t.nodeName]}function _e(e,t){return e&&e.nodeName in t}function $e(e,t,n){var r=e.isEmpty(t);return!(n&&0<e.select("span[data-mce-type=bookmark]",t).length)&&r}function Fe(e,t){return e.isChildOf(t,e.getRoot())}function He(e,t){var n,r,o,i,a=e.dom,s=e.schema.getBlockElements(),u=a.createFragment(),c=!1===(n=e.getParam("forced_root_block","p"))?"":!0===n?"p":n;if(c&&((o=a.create(c)).tagName===c.toUpperCase()&&a.setAttribs(o,e.getParam("forced_root_block_attrs",{})),_e(t.firstChild,s)||u.appendChild(o)),t)for(;r=t.firstChild;){var f=r.nodeName;i||"SPAN"===f&&"bookmark"===r.getAttribute("data-mce-type")||(i=!0),_e(r,s)?(u.appendChild(r),o=null):c?(o||(o=a.create(c),u.appendChild(o)),o.appendChild(r)):u.appendChild(r)}return c?i||o.appendChild(a.create("br",{"data-mce-bogus":"1"})):u.appendChild(a.create("br")),u}function je(e){Qt(e)&&Pe(e,"dd")}function Ke(r,e,t){b(t,"Indent"===e?je:function(e){return t=r,Wt(n=e)?Pe(n,"dt"):Qt(n)&&Oe(n).each(function(e){return function(e,t,n){var r=Vt.select('span[data-mce-type="bookmark"]',t),o=He(e,n),i=Vt.createRng();i.setStartAfter(n),i.setEndAfter(t);for(var a,s=i.extractContents(),u=s.firstChild;u;u=u.firstChild)if("LI"===u.nodeName&&e.dom.isEmpty(u)){Vt.remove(u);break}e.dom.isEmpty(s)||Vt.insertAfter(s,t),Vt.insertAfter(o,t),$e(e.dom,n.parentNode)&&(a=n.parentNode,Mt.each(r,function(e){a.parentNode.insertBefore(e,n.parentNode)}),Vt.remove(a)),Vt.remove(n),$e(e.dom,t)&&Vt.remove(t)}(t,e.dom,n.dom)}),0;var t,n})}function Ve(e,t){if(Me(e))return{container:e,offset:t};var n=ge.getNode(e,t);return Me(n)?{container:n,offset:t>=e.childNodes.length?n.data.length:0}:n.previousSibling&&Me(n.previousSibling)?{container:n.previousSibling,offset:n.previousSibling.data.length}:n.nextSibling&&Me(n.nextSibling)?{container:n.nextSibling,offset:0}:{container:e,offset:t}}function We(e){var t=e.cloneRange(),n=Ve(e.startContainer,e.startOffset);t.setStart(n.container,n.offset);var r=Ve(e.endContainer,e.endOffset);return t.setEnd(r.container,r.offset),t}function Qe(e,t){var n=t||e.selection.getStart(!0);return e.dom.getParent(n,"OL,UL,DL",qt(e,n))}function Xe(e){var t,n,r=e.selection.getSelectedBlocks();return L((t=e,n=Mt.map(r,function(e){return t.dom.getParent(e,"li,dd,dt",qt(t,e))||e}),Xt.unique(n)),Ft)}function qe(e,t){return w(e.dom.getParents(t,"ol,ul",qt(e,t)))}function ze(e,t,n){return void 0===n&&(n=r),e.exists(function(e){return n(e,t)})}function Ye(e,t,n){return e.isSome()&&t.isSome()?E.some(n(e.getOrDie(),t.getOrDie())):E.none()}function Ze(e,t,n){return e.fire("ListMutation",{action:t,element:n})}function Ge(e,t){we(e.item,t.list)}function Je(e,t){for(var n=0;n<e.length-1;n++)(function(e,t,n){if(!a(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);void 0!==e.style&&f(e.style.getPropertyValue)&&e.style.setProperty(t,n)})(e[n].item.dom,"list-style-type","none");w(e).each(function(e){be(e.list,t.listAttributes),be(e.item,t.itemAttributes),ke(e.item,t.content)})}function et(u,e,c){var t=e.slice(0,c.depth);return w(t).each(function(e){var t,n,r,o,i,a,s=(t=c.itemAttributes,n=c.content,be(r=me.fromTag("li",u),t),ke(r,n),r);we((o=e).list,s),o.item=s,a=c,Se((i=e).list)!==a.listType&&(i.list=Pe(i.list,a.listType)),be(i.list,a.listAttributes)}),t}function tt(e,t,n){var r,o=function(e,t,n){for(var r,o,i,a=[],s=0;s<n;s++)a.push((o=t.listType,we((i={list:me.fromTag(o,r=e),item:me.fromTag("li",r)}).list,i.item),i));return a}(e,n,n.depth-t.length);return function(e){for(var t=1;t<e.length;t++)Ge(e[t-1],e[t])}(o),Je(o,n),r=o,Ye(w(t),A(r),Ge),t.concat(o)}function nt(e){return pe(e,"OL,UL")}function rt(e){return De(e).exists(nt)}function ot(e){return 0<e.depth}function it(e){return e.isSelected}function at(s){return b(s,function(a,e){function t(e){return e.depth===i&&!e.dirty}function n(e){return e.depth<i}var r,o,i;i=(r=s)[o=e].depth,h(D(r.slice(0,o)),t,n).orThunk(function(){return h(r.slice(o+1),t,n)}).fold(function(){var e,t,n,r,o,i;a.dirty&&(a.listAttributes=(e=a.listAttributes,n=function(e,t){return"start"!==t},r=t={},o=function(e,t){r[t]=e},i=u,j(e,function(e,t){(n(e,t)?o:i)(e,t)}),t))},function(e){var t=e;a.listType=t.listType,a.listAttributes=B({},t.listAttributes)})}),s}function st(n,a,s,u){return De(u).filter(nt).fold(function(){a.each(function(e){F(e.start,u)&&s.set(!0)});var r,o,i,e=(r=u,o=n,i=s.get(),Oe(r).filter(Bt).map(function(e){return{depth:o,dirty:!1,isSelected:i,content:(n=Le(t=r),C(xe(t).exists(nt)?n.slice(0,-1):n,Ie)),itemAttributes:Ne(r),listAttributes:Ne(e),listType:Se(e)};var t,n}));a.each(function(e){F(e.end,u)&&s.set(!1)});var t=xe(u).filter(nt).map(function(e){return Yt(n,a,s,e)}).getOr([]);return e.toArray().concat(t)},function(e){return Yt(n,a,s,e)})}function ut(o,e){return C(at(e),function(e){var t,n,r=(t=e.content,n=document.createDocumentFragment(),b(t,function(e){n.appendChild(e.dom)}),me.fromDom(n));return me.fromDom(He(o,r.dom))})}function ct(e,t){var n=at(t),r=e.contentDocument;return A(v(n,function(e,t){return(t.depth>e.length?tt:et)(r,e,t)},[])).map(function(e){return e.list}).toArray()}function ft(e,t){b(L(e,it),function(e){return function(e){switch(t){case"Indent":e.depth++;break;case"Outdent":e.depth--;break;case"Flatten":e.depth=0}e.dirty=!0}(e),0})}function dt(e,t){var n,r,o,i,a,s,u,c,f,d,l,m,p,g=C((i=qe(o=r=e,o.selection.getStart()),a=L(o.selection.getSelectedBlocks(),_t),s=i.toArray().concat(a),zt(r,s)),me.fromDom),v=C(L(Xe(e),Ht),me.fromDom),h=!1;return(g.length||v.length)&&(n=e.selection.getBookmark(),c=t,b((f=g,p=C(Xe(u=e),me.fromDom),d=Ye(N(p,y(rt)),N(D(p),y(rt)),function(e,t){return{start:e,end:t}}),l=!1,m={get:function(){return l},set:function(e){l=e}},C(f,function(e){return{sourceList:e,entries:Yt(0,d,m,e)}})),function(e){ft(e.entries,c);var t,n,r=(t=u,T(function(e,t){if(0===e.length)return[];for(var n=t(e[0]),r=[],o=[],i=0,a=e.length;i<a;i++){var s=e[i],u=t(s);u!==n&&(r.push(o),o=[]),n=u,o.push(s)}return 0!==o.length&&r.push(o),r}(e.entries,ot),function(e){return(A(e).exists(ot)?ct:ut)(t,e)}));b(r,function(e){Ze(u,"Indent"===c?"IndentList":"OutdentList",e.dom)}),n=e.sourceList,b(r,function(e){Ae(n,e)}),Ee(e.sourceList)}),Ke(e,t,v),e.selection.moveToBookmark(n),e.selection.setRng(We(e.selection.getRng())),e.nodeChanged(),h=!0),h}function lt(e){return dt(e,"Indent")}function mt(e){return dt(e,"Outdent")}function pt(e){return dt(e,"Flatten")}function gt(o){function e(e){var t,n=o[e?"startContainer":"endContainer"],r=o[e?"startOffset":"endOffset"];1===n.nodeType&&(t=Gt.create("span",{"data-mce-type":"bookmark"}),n.hasChildNodes()?(r=Math.min(r,n.childNodes.length-1),e?n.insertBefore(t,n.childNodes[r]):Gt.insertAfter(t,n.childNodes[r])):n.appendChild(t),n=t,r=0),i[e?"startContainer":"endContainer"]=n,i[e?"startOffset":"endOffset"]=r}var i={};return e(!0),o.collapsed||e(),i}function vt(o){function e(e){var t,n=t=o[e?"startContainer":"endContainer"],r=o[e?"startOffset":"endOffset"];n&&(1===n.nodeType&&(r=function(e){for(var t=e.parentNode.firstChild,n=0;t;){if(t===e)return n;1===t.nodeType&&"bookmark"===t.getAttribute("data-mce-type")||n++,t=t.nextSibling}return-1}(n),n=n.parentNode,Gt.remove(t),!n.hasChildNodes()&&Gt.isBlock(n)&&n.appendChild(Gt.create("br"))),o[e?"startContainer":"endContainer"]=n,o[e?"startOffset":"endOffset"]=r)}e(!0),e();var t=Gt.createRng();return t.setStart(o.startContainer,o.startOffset),o.endContainer&&t.setEnd(o.endContainer,o.endOffset),We(t)}function ht(e){switch(e){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}}function yt(e){return/\btox\-/.test(e.className)}function St(e,n,r){function t(e){var t=h(e.parents,Ut,jt).filter(function(e){return e.nodeName===n&&!yt(e)}).isSome();r(t)}return t({parents:e.dom.getParents(e.selection.getNode())}),e.on("NodeChange",t),function(){return e.off("NodeChange",t)}}function Ct(n,e){Mt.each(e,function(e,t){n.setAttribute(t,e)})}function bt(e,t,n){var r,o,i,a=n["list-style-type"]||null;e.setStyle(t,"list-style-type",a),r=e,Ct(o=t,(i=n)["list-attributes"]),Mt.each(r.select("li",o),function(e){Ct(e,i["list-item-attributes"])})}function Nt(e,t,n,r){var o=t[n?"startContainer":"endContainer"],i=t[n?"startOffset":"endOffset"];for(1===o.nodeType&&(o=o.childNodes[Math.min(i,o.childNodes.length-1)]||o),!n&&Kt(o.nextSibling)&&(o=o.nextSibling);o.parentNode!==r;){if(Ue(e,o))return o;if(/^(TD|TH)$/.test(o.parentNode.nodeName))return o;o=o.parentNode}return o}function Ot(u,c,f){var e,t,n=u.selection.getRng(),d="LI",r=qt(u,u.selection.getStart(!0)),l=u.dom;"false"!==l.getContentEditable(u.selection.getNode())&&("DL"===(c=c.toUpperCase())&&(d="DT"),e=gt(n),t=function(n,e,r){for(var o,i=[],a=n.dom,t=Nt(n,e,!0,r),s=Nt(n,e,!1,r),u=[],c=t;c&&(u.push(c),c!==s);c=c.nextSibling);return Mt.each(u,function(e){if(Ue(n,e))return i.push(e),void(o=null);if(a.isBlock(e)||Kt(e))return Kt(e)&&a.remove(e),void(o=null);var t=e.nextSibling;Zt.isBookmarkNode(e)&&(Ut(t)||Ue(n,t)||!t&&e.parentNode===r)?o=null:(o||(o=a.create("p"),e.parentNode.insertBefore(o,e),i.push(o)),o.appendChild(e))}),i}(u,n,r),Mt.each(t,function(e){var t,n,r,o,i,a=e.previousSibling,s=e.parentNode;Ft(s)||(a&&Ut(a)&&a.nodeName===c&&(o=f,l.getStyle(a,"list-style-type")===(i=null===(i=o?o["list-style-type"]:"")?"":i))?(t=a,e=l.rename(e,d),a.appendChild(e)):(t=l.create(c),e.parentNode.insertBefore(t,e),t.appendChild(e),e=l.rename(e,d)),n=l,r=e,Mt.each(["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"],function(e){var t;return n.setStyle(r,((t={})[e]="",t))}),bt(l,t,f),Jt(u.dom,t))}),u.selection.setRng(vt(e)))}function Lt(e,t,n){return a=n,(i=t)&&a&&Ut(i)&&i.nodeName===a.nodeName&&(o=n,(r=e).getStyle(t,"list-style-type",!0)===r.getStyle(o,"list-style-type",!0))&&t.className===n.className;var r,o,i,a}function Tt(e,t,n){var r,o,i,a,s,u,c,f,d,l,m,p,g,v,h,y,S,C=Qe(e),b=(f=Qe(c=e),d=c.selection.getSelectedBlocks(),f&&1===d.length&&d[0]===f?L(f.querySelectorAll("ol,ul,dl"),Ut):L(d,function(e){return Ut(e)&&f!==e})),N=O(n)?n:{};0<b.length?(l=e,p=b,g=t,v=N,(S=Ut(m=C))&&m.nodeName===g&&!en(v)?pt(l):(Ot(l,g,v),h=gt(l.selection.getRng()),y=S?function(e,t){for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||((n=n||Array.prototype.slice.call(t,0,r))[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))}([m],p,!0):p,Mt.each(y,function(e){var t,n,r=l,o=g,i=v;(t=e).nodeName!==o?(n=r.dom.rename(t,o),bt(r.dom,n,i),Ze(r,ht(o),n)):(bt(r.dom,t,i),Ze(r,ht(o),t))}),l.selection.setRng(vt(h)))):(i=t,a=N,(o=C)!==(r=e).getBody()&&(o?o.nodeName!==i||en(a)||yt(o)?(s=gt(r.selection.getRng()),bt(r.dom,o,a),u=r.dom.rename(o,i),Jt(r.dom,u),r.selection.setRng(vt(s)),Ot(r,i,a),Ze(r,ht(i),u)):pt(r):(Ot(r,i,a),Ze(r,ht(i),o))))}function Dt(e,t,n,r){var o=t.startContainer,i=t.startOffset;if(Me(o)&&(n?i<o.data.length:0<i))return o;var a=e.schema.getNonEmptyElements();1===o.nodeType&&(o=ge.getNode(o,i));var s,u,c=new ve(o,r);for(n&&(s=e.dom,Kt(u=o)&&s.isBlock(u.nextSibling)&&!Kt(u.previousSibling)&&c.next());o=c[n?"next":"prev2"]();){if("LI"===o.nodeName&&!o.hasChildNodes())return o;if(a[o.nodeName])return o;if(Me(o)&&0<o.data.length)return o}}function xt(e,t){var n=t.childNodes;return 1===n.length&&!Ut(n[0])&&e.isBlock(n[0])}function At(t,e,n){var r,o,i,a=e.parentNode;Fe(t,e)&&Fe(t,n)&&(Ut(n.lastChild)&&(r=n.lastChild),a===n.lastChild&&Kt(a.previousSibling)&&t.remove(a.previousSibling),(o=n.lastChild)&&Kt(o)&&e.hasChildNodes()&&t.remove(o),$e(t,n,!0)&&t.$(n).empty(),function(e,t,n){var r,o,i,a=xt(e,n)?n.firstChild:n;if(xt(o=e,i=t)&&o.remove(i.firstChild,!0),!$e(e,t,!0))for(;r=t.firstChild;)a.appendChild(r)}(t,e,n),r&&n.appendChild(r),i=H(me.fromDom(n),me.fromDom(e))?t.getParents(e,Ut,n):[],t.remove(e),b(i,function(e){$e(t,e)&&e!==t.getRoot()&&t.remove(e)}))}function wt(c,f){var e=c.dom,t=c.selection,n=t.getStart(),r=qt(c,n),d=e.getParent(t.getStart(),"LI",r);if(d){var o=d.parentNode;if(o===c.getBody()&&$e(e,o))return 1;var l=We(t.getRng()),m=e.getParent(Dt(c,l,f,r),"LI",r);if(m&&m!==d)return c.undoManager.transact(function(){var e,t,n,r,o,i,a,s,u;f?(t=l,n=m,r=d,(u=(e=c).dom).isEmpty(r)?(a=n,(i=e).dom.$(s=r).empty(),At(i.dom,a,s),i.selection.setCursorLocation(s,0)):(o=gt(t),At(u,n,r),e.selection.setRng(vt(o)))):d.parentNode.firstChild===d?mt(c):function(e,t,n){var r=gt(l);At(e.dom,t,n);var o=vt(r);e.selection.setRng(o)}(c,d,m)}),1;if(!m&&!f&&0===l.startOffset&&0===l.endOffset)return c.undoManager.transact(function(){pt(c)}),1}}function kt(e,t){return e.selection.isCollapsed()?wt(i=e,a=t)||function(r,o){var i=r.dom,e=r.selection.getStart(),a=qt(r,e),s=i.getParent(e,i.isBlock,a);if(s&&i.isEmpty(s)){var t=We(r.selection.getRng()),u=i.getParent(Dt(r,t,o,a),"LI",a);if(u)return r.undoManager.transact(function(){var e,t=s,n=(e=i).getParent(t.parentNode,e.isBlock,a);e.remove(t),n&&e.isEmpty(n)&&e.remove(n),Jt(i,u.parentNode),r.selection.select(u,!0),r.selection.collapse(o)}),1}}(i,a):(r=(n=e).selection.getStart(),o=qt(n,r),(n.dom.getParent(r,"LI,DT,DD",o)||0<Xe(n).length)&&(n.undoManager.transact(function(){var i,e,t;n.execCommand("Delete"),i=n.dom,e=n.getBody(),t=Mt.grep(i.select("ol,ul",e)),Mt.each(t,function(e){var t,n,r,o=i;"LI"===(r=(t=e).parentNode).nodeName&&r.firstChild===t&&((n=r.previousSibling)&&"LI"===n.nodeName?(n.appendChild(t),$e(o,r)&&tn.remove(r)):tn.setStyle(r,"listStyleType","none")),Ut(r)&&(n=r.previousSibling)&&"LI"===n.nodeName&&n.appendChild(t)})}),1));var n,r,o,i,a}function Et(e){return v(C(D(J(e).split("")),function(e,t){var n=e.toUpperCase().charCodeAt(0)-"A".charCodeAt(0)+1;return Math.pow(26,t)*n}),function(e,t){return e+t},0)}function It(t,n){return function(){var e=Qe(t);return e&&e.nodeName===n}}function Pt(o){o.addCommand("mceListProps",function(){var t,e,n,r;r=Qe(t=o),$t(r)&&t.windowManager.open({title:"List Properties",body:{type:"panel",items:[{type:"input",name:"start",label:"Start list at number",inputMode:"numeric"}]},initialData:{start:(e={start:t.dom.getAttrib(r,"start","1"),listStyleType:E.some(t.dom.getStyle(r,"list-style-type"))},n=parseInt(e.start,10),ze(e.listStyleType,"upper-alpha")?nn(n):ze(e.listStyleType,"lower-alpha")?nn(n).toLowerCase():e.start)},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(e){!function(e){switch(/^[0-9]+$/.test(t=e)?2:/^[A-Z]+$/.test(t)?0:/^[a-z]+$/.test(t)?1:0<t.length?4:3){case 2:return E.some({listStyleType:E.none(),start:e});case 0:return E.some({listStyleType:E.some("upper-alpha"),start:Et(e).toString()});case 1:return E.some({listStyleType:E.some("lower-alpha"),start:Et(e).toString()});case 3:return E.some({listStyleType:E.none(),start:""});case 4:return E.none()}var t}(e.getData().start).each(function(e){t.execCommand("mceListUpdate",!1,{attrs:{start:"1"===e.start?"":e.start},styles:{"list-style-type":e.listStyleType.getOr("")}})}),e.close()}})})}"undefined"!=typeof window||Function("return this;")();function Bt(e){return 1===e.dom.nodeType}var Rt=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Mt=tinymce.util.Tools.resolve("tinymce.util.Tools"),Ut=Re(/^(OL|UL|DL)$/),_t=Re(/^(OL|UL)$/),$t=Be("ol"),Ft=Re(/^(LI|DT|DD)$/),Ht=Re(/^(DT|DD)$/),jt=Re(/^(TH|TD)$/),Kt=Be("br"),Vt=Rt.DOM,Wt=Ce("dd"),Qt=Ce("dt"),Xt=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),qt=function(e,t){var n=e.dom.getParents(t,"TD,TH");return 0<n.length?n[0]:e.getBody()},zt=function(t,e){var n=C(e,function(e){return qe(t,e).getOr(e)});return Xt.unique(n)},Yt=function(t,n,r,e){return T(Le(e),function(e){return(nt(e)?Yt:st)(t+1,n,r,e)})},Zt=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),Gt=Rt.DOM,Jt=function(e,t){var n,r=t.nextSibling;if(Lt(e,t,r)){for(;n=r.firstChild;)t.appendChild(n);e.remove(r)}if(Lt(e,t,r=t.previousSibling)){for(;n=r.lastChild;)t.insertBefore(n,t.firstChild);e.remove(r)}},en=function(e){return"list-style-type"in e},tn=Rt.DOM,nn=function(e){if(--e<0)return"";var t=e%26,n=Math.floor(e/26);return nn(n)+String.fromCharCode("A".charCodeAt(0)+t)};i.add("lists",function(e){var n,t,r,o,i,a,s,u;return!1===e.hasPlugin("rtc",!0)?((a=e).getParam("lists_indent_on_tab",!0)&&(s=a).on("keydown",function(e){e.keyCode!==he.TAB||he.metaKeyPressed(e)||s.undoManager.transact(function(){(e.shiftKey?mt:lt)(s)&&e.preventDefault()})}),(u=a).on("keydown",function(e){e.keyCode===he.BACKSPACE?kt(u,!1)&&e.preventDefault():e.keyCode===he.DELETE&&kt(u,!0)&&e.preventDefault()}),(i=e).on("BeforeExecCommand",function(e){var t=e.command.toLowerCase();"indent"===t?lt(i):"outdent"===t&&mt(i)}),i.addCommand("InsertUnorderedList",function(e,t){Tt(i,"UL",t)}),i.addCommand("InsertOrderedList",function(e,t){Tt(i,"OL",t)}),i.addCommand("InsertDefinitionList",function(e,t){Tt(i,"DL",t)}),i.addCommand("RemoveList",function(){pt(i)}),Pt(i),i.addCommand("mceListUpdate",function(e,t){var n,r,o;O(t)&&(r=t,o=Qe(n=i),n.undoManager.transact(function(){O(r.styles)&&n.dom.setStyles(o,r.styles),O(r.attrs)&&j(r.attrs,function(e,t){return n.dom.setAttrib(o,t,e)})}))}),i.addQueryStateHandler("InsertUnorderedList",It(i,"UL")),i.addQueryStateHandler("InsertOrderedList",It(i,"OL")),i.addQueryStateHandler("InsertDefinitionList",It(i,"DL"))):Pt(e),(o=e).hasPlugin("advlist")||(o.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:c("InsertOrderedList"),onSetup:function(e){return St(o,"OL",e.setActive)}}),o.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:c("InsertUnorderedList"),onSetup:function(e){return St(o,"UL",e.setActive)}})),t={text:"List properties...",icon:"ordered-list",onAction:function(){return n.execCommand("mceListProps")},onSetup:function(t){return St(n,"OL",function(e){return t.setDisabled(!e)})}},(n=e).ui.registry.addMenuItem("listprops",t),n.ui.registry.addContextMenu("lists",{update:function(e){var t=Qe(n,e);return $t(t)?["listprops"]:[]}}),r=e,{backspaceDelete:function(e){kt(r,e)}};function c(e){return function(){return o.execCommand(e)}}})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.0.11 (2019-07-04)
7
+ * Version: 5.10.7 (2022-12-06)
8
8
  */
9
- !function(){"use strict";var e,t,r,n,a,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=function(e){return function(){return e}},u=o(!1),s=o(!0),l=u,m=s,d=function(){return f},f=(n={fold:function(e,t){return e()},is:l,isSome:l,isNone:m,getOr:r=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:r,orThunk:t,map:d,ap:d,each:function(){},bind:d,flatten:d,exists:l,forall:m,filter:d,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:o("none()")},Object.freeze&&Object.freeze(n),n),h=function(r){var e=function(){return r},t=function(){return i},n=function(e){return e(r)},i={fold:function(e,t){return t(r)},is:function(e){return r===e},isSome:m,isNone:l,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return h(e(r))},ap:function(e){return e.fold(d,function(e){return h(e(r))})},each:function(e){e(r)},bind:n,flatten:e,exists:n,forall:n,filter:function(e){return e(r)?i:f},equals:function(e){return e.is(r)},equals_:function(e,t){return e.fold(l,function(e){return t(r,e)})},toArray:function(){return[r]},toString:function(){return"some("+r+")"}};return i},p=d,g=function(e){return null===e||e===undefined?f:h(e)},v=function(t){return function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t}(e)===t}},w=v("string"),b=v("function"),y=Array.prototype.slice,x=function(e,t){for(var r=0,n=e.length;r<n;r++){t(e[r],r,e)}},j=Array.prototype.push,O=(b(Array.from)&&Array.from,function(e){var t=e,r=function(){return t};return{get:r,set:function(e){t=e},clone:function(){return O(r())}}}),A=Object.prototype.hasOwnProperty,S=(a=function(e,t){return t},function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var r={},n=0;n<e.length;n++){var i=e[n];for(var o in i)A.call(i,o)&&(r[o]=a(r[o],i[o]))}return r}),_=Object.hasOwnProperty,C=function(e,t){return M(e,t)?g(e[t]):p()},M=function(e,t){return _.call(e,t)},P=function(e){return e.getParam("media_scripts")},F=function(e){return e.getParam("audio_template_callback")},k=function(e){return e.getParam("video_template_callback")},T=function(e){return e.getParam("media_live_embeds",!0)},$=function(e){return e.getParam("media_filter_html",!0)},z=function(e){return e.getParam("media_url_resolver")},D=function(e){return e.getParam("media_alt_source",!0)},E=function(e){return e.getParam("media_poster",!0)},N=function(e){return e.getParam("media_dimensions",!0)},U=tinymce.util.Tools.resolve("tinymce.util.Tools"),R=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),L=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),W=function(t){return function(e){return e?e.style[t].replace(/px$/,""):""}},H=function(n){return function(e,t){var r;e&&(e.style[n]=/^[0-9.]+$/.test(r=t)?r+"px":r)}},I={getMaxWidth:W("maxWidth"),getMaxHeight:W("maxHeight"),setMaxWidth:H("maxWidth"),setMaxHeight:H("maxHeight")},q=function(e,t){if(e)for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r].filter))return e[r]},B=L.DOM,G=function(e){return B.getAttrib(e,"data-ephox-embed-iri")},J=function(e,t){return c=t,u=B.createFragment(c),""!==G(u.firstChild)?(o=t,a=B.createFragment(o).firstChild,{type:"ephox-embed-iri",source1:G(a),source2:"",poster:"",width:I.getMaxWidth(a),height:I.getMaxHeight(a)}):(n=e,r=t,R({validate:!(i={}),allow_conditional_comments:!0,start:function(e,t){if(i.source1||"param"!==e||(i.source1=t.map.movie),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(i.type||(i.type=e),i=U.extend(t.map,i)),"script"===e){var r=q(n,t.map.src);if(!r)return;i={type:"script",source1:t.map.src,width:String(r.width),height:String(r.height)}}"source"===e&&(i.source1?i.source2||(i.source2=t.map.src):i.source1=t.map.src),"img"!==e||i.poster||(i.poster=t.map.src)}}).parse(r),i.source1=i.source1||i.src||i.data,i.source2=i.source2||"",i.poster=i.poster||"",i);var n,r,i,o,a,c,u},K=tinymce.util.Tools.resolve("tinymce.util.Promise"),Q=function(e){var t={mp3:"audio/mpeg",m4a:"audio/x-m4a",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"}[e.toLowerCase().split(".").pop()];return t||""},V=tinymce.util.Tools.resolve("tinymce.html.Writer"),X=tinymce.util.Tools.resolve("tinymce.html.Schema"),Y=L.DOM,Z=function(e,t){var r,n,i,o;for(r in t)if(i=""+t[r],e.map[r])for(n=e.length;n--;)(o=e[n]).name===r&&(i?(e.map[r]=i,o.value=i):(delete e.map[r],e.splice(n,1)));else i&&(e.push({name:r,value:i}),e.map[r]=i)},ee=function(e,t){var r,n,i=Y.createFragment(e).firstChild;return I.setMaxWidth(i,t.width),I.setMaxHeight(i,t.height),r=i.outerHTML,n=V(),R(n).parse(r),n.getContent()},te=function(e,t,r){return s=e,l=Y.createFragment(s),""!==Y.getAttrib(l.firstChild,"data-ephox-embed-iri")?ee(e,t):(n=e,i=t,o=r,c=V(),R({validate:!1,allow_conditional_comments:!(u=0),comment:function(e){c.comment(e)},cdata:function(e){c.cdata(e)},text:function(e,t){c.text(e,t)},start:function(e,t,r){switch(e){case"video":case"object":case"embed":case"img":case"iframe":i.height!==undefined&&i.width!==undefined&&Z(t,{width:i.width,height:i.height})}if(o)switch(e){case"video":Z(t,{poster:i.poster,src:""}),i.source2&&Z(t,{src:""});break;case"iframe":Z(t,{src:i.source1});break;case"source":if(++u<=2&&(Z(t,{src:i["source"+u],type:i["source"+u+"mime"]}),!i["source"+u]))return;break;case"img":if(!i.poster)return;a=!0}c.start(e,t,r)},end:function(e){if("video"===e&&o)for(var t=1;t<=2;t++)if(i["source"+t]){var r=[];r.map={},u<t&&(Z(r,{src:i["source"+t],type:i["source"+t+"mime"]}),c.start("source",r,!0))}if(i.poster&&"object"===e&&o&&!a){var n=[];n.map={},Z(n,{src:i.poster,width:i.width,height:i.height}),c.start("img",n,!0)}c.end(e)}},X({})).parse(n),c.getContent());var n,i,o,a,c,u,s,l},re=[{regex:/youtu\.be\/([\w\-_\?&=.]+)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$2?$4",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$2?title=0&amp;byline=0",allowFullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0},{regex:/dai\.ly\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],ne=function(r,e){var n=U.extend({},e);if(!n.source1&&(U.extend(n,J(P(r),n.embed)),!n.source1))return"";n.source2||(n.source2=""),n.poster||(n.poster=""),n.source1=r.convertURL(n.source1,"source"),n.source2=r.convertURL(n.source2,"source"),n.source1mime=Q(n.source1),n.source2mime=Q(n.source2),n.poster=r.convertURL(n.poster,"poster");var t,i,o=(t=n.source1,0<(i=re.filter(function(e){return e.regex.test(t)})).length?U.extend({},i[0],{url:function(e,t){for(var r=e.regex.exec(t),n=e.url,i=function(e){n=n.replace("$"+e,function(){return r[e]?r[e]:""})},o=0;o<r.length;o++)i(o);return n.replace(/\?$/,"")}(i[0],t)}):null);if(o&&(n.source1=o.url,n.type=o.type,n.allowFullscreen=o.allowFullscreen,n.width=n.width||String(o.w),n.height=n.height||String(o.h)),n.embed)return te(n.embed,n,!0);var a=q(P(r),n.source1);a&&(n.type="script",n.width=String(a.width),n.height=String(a.height));var c,u,s,l,m,d,f,h,p=F(r),g=k(r);return n.width=n.width||"300",n.height=n.height||"150",U.each(n,function(e,t){n[t]=r.dom.encode(""+e)}),"iframe"===n.type?(h=(f=n).allowFullscreen?' allowFullscreen="1"':"",'<iframe src="'+f.source1+'" width="'+f.width+'" height="'+f.height+'"'+h+"></iframe>"):"application/x-shockwave-flash"===n.source1mime?(d='<object data="'+(m=n).source1+'" width="'+m.width+'" height="'+m.height+'" type="application/x-shockwave-flash">',m.poster&&(d+='<img src="'+m.poster+'" width="'+m.width+'" height="'+m.height+'" />'),d+="</object>"):-1!==n.source1mime.indexOf("audio")?(s=n,(l=p)?l(s):'<audio controls="controls" src="'+s.source1+'">'+(s.source2?'\n<source src="'+s.source2+'"'+(s.source2mime?' type="'+s.source2mime+'"':"")+" />\n":"")+"</audio>"):"script"===n.type?'<script src="'+n.source1+'"><\/script>':(c=n,(u=g)?u(c):'<video width="'+c.width+'" height="'+c.height+'"'+(c.poster?' poster="'+c.poster+'"':"")+' controls="controls">\n<source src="'+c.source1+'"'+(c.source1mime?' type="'+c.source1mime+'"':"")+" />\n"+(c.source2?'<source src="'+c.source2+'"'+(c.source2mime?' type="'+c.source2mime+'"':"")+" />\n":"")+"</video>")},ie={},oe=function(t){return function(e){return ne(t,e)}},ae=function(e,t){var r,n,i,o,a,c=z(e);return c?(i=t,o=oe(e),a=c,new K(function(t,e){var r=function(e){return e.html&&(ie[i.source1]=e),t({url:i.source1,html:e.html?e.html:o(i)})};ie[i.source1]?r(ie[i.source1]):a({url:i.source1},r,e)})):(r=t,n=oe(e),new K(function(e){e({html:n(r),url:r.source1})}))},ce=function(e){return ie.hasOwnProperty(e)},ue=function(e){var r=S(e,{source1:e.source1.value,source2:C(e,"source2").bind(function(e){return C(e,"value")}).getOr(""),poster:C(e,"poster").bind(function(e){return C(e,"value")}).getOr("")});return C(e,"dimensions").each(function(e){x(["width","height"],function(t){C(e,t).each(function(e){return r[t]=e})})}),r},se=function(e){var n=S(e,{source1:{value:C(e,"source1").getOr("")},source2:{value:C(e,"source2").getOr("")},poster:{value:C(e,"poster").getOr("")}});return x(["width","height"],function(r){C(e,r).each(function(e){var t=n.dimensions||{};t[r]=e,n.dimensions=t})}),n},le=function(r){return function(e){var t=e&&e.msg?"Media embed handler error: "+e.msg:"Media embed handler threw unknown error.";r.notificationManager.open({type:"error",text:t})}},me=function(e,t){return J(P(e),t)},de=function(i,o){return function(e){if(w(e.url)&&0<e.url.trim().length){var t=e.html,r=me(o,t),n=c({},r,{source1:e.url,embed:t});i.setData(se(n))}}},fe=function(e,t){var r=e.dom.select("img[data-mce-object]");e.insertContent(t),function(e,t){for(var r=e.dom.select("img[data-mce-object]"),n=0;n<t.length;n++)for(var i=r.length-1;0<=i;i--)t[n]===r[i]&&r.splice(i,1);e.selection.select(r[0])}(e,r),e.nodeChanged()},he=function(c){var e,t,r,n,i=(r=(e=c).selection.getNode(),n=(t=r).getAttribute("data-mce-object")||t.getAttribute("data-ephox-embed-iri")?e.serializer.serialize(r,{selection:!0}):"",S({embed:n},J(P(e),n))),u=O(i),o=se(i),s=function(e){return ue(e.getData())},a={title:"General",name:"general",items:function(e){for(var t=[],r=0,n=e.length;r<n;++r){if(!Array.prototype.isPrototypeOf(e[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+e);j.apply(t,e[r])}return t}([[{name:"source1",type:"urlinput",filetype:"media",label:"Source"}],N(c)?[{type:"sizeinput",name:"dimensions",label:"Constrain proportions",constrain:!0}]:[]])},l={title:"Embed",items:[{type:"textarea",name:"embed",label:"Paste your embed code below:"}]},m=[];D(c)&&m.push({name:"source2",type:"urlinput",filetype:"media",label:"Alternative source URL"}),E(c)&&m.push({name:"poster",type:"urlinput",filetype:"image",label:"Media poster (Image URL)"});var d={title:"Advanced",name:"advanced",items:m},f=[a,l];0<m.length&&f.push(d);var h={type:"tabpanel",tabs:f},p=c.windowManager.open({title:"Insert/Edit Media",size:"normal",body:h,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(e){var t,r,n,i=s(e);t=u.get(),n=c,(r=i).embed=te(r.embed,r),r.embed&&(t.source1===r.source1||ce(r.source1))?fe(n,r.embed):ae(n,r).then(function(e){fe(n,e.html)})["catch"](le(n)),e.close()},onChange:function(e,t){switch(t.name){case"source1":o=u.get(),a=s(e),o.source1!==a.source1&&(de(p,c)({url:a.source1,html:""}),ae(c,a).then(de(p,c))["catch"](le(c)));break;case"embed":n=ue((r=e).getData()),i=me(c,n.embed),r.setData(se(i))}var r,n,i,o,a;u.set(s(e))},initialData:o})},pe=function(e){return{showDialog:function(){he(e)}}},ge=function(e){e.addCommand("mceMedia",function(){he(e)})},ve=tinymce.util.Tools.resolve("tinymce.html.Node"),we=tinymce.util.Tools.resolve("tinymce.Env"),be=function(i,e){if(!1===$(i))return e;var o,a=V();return R({validate:!1,allow_conditional_comments:!1,comment:function(e){a.comment(e)},cdata:function(e){a.cdata(e)},text:function(e,t){a.text(e,t)},start:function(e,t,r){if(o=!0,"script"!==e&&"noscript"!==e){for(var n=0;n<t.length;n++){if(0===t[n].name.indexOf("on"))return;"style"===t[n].name&&(t[n].value=i.dom.serializeStyle(i.dom.parseStyle(t[n].value),e))}a.start(e,t,r),o=!1}},end:function(e){o||a.end(e)}},X({})).parse(e),a.getContent()},ye=function(e,t){var r,n=t.name;return(r=new ve("img",1)).shortEnded=!0,je(e,t,r),r.attr({width:t.attr("width")||"300",height:t.attr("height")||("audio"===n?"30":"150"),style:t.attr("style"),src:we.transparentSrc,"data-mce-object":n,"class":"mce-object mce-object-"+n}),r},xe=function(e,t){var r,n,i,o=t.name;return(r=new ve("span",1)).attr({contentEditable:"false",style:t.attr("style"),"data-mce-object":o,"class":"mce-preview-object mce-object-"+o}),je(e,t,r),(n=new ve(o,1)).attr({src:t.attr("src"),allowfullscreen:t.attr("allowfullscreen"),style:t.attr("style"),"class":t.attr("class"),width:t.attr("width"),height:t.attr("height"),frameborder:"0"}),(i=new ve("span",1)).attr("class","mce-shim"),r.append(n),r.append(i),r},je=function(e,t,r){var n,i,o,a,c;for(a=(o=t.attributes).length;a--;)n=o[a].name,i=o[a].value,"width"!==n&&"height"!==n&&"style"!==n&&("data"!==n&&"src"!==n||(i=e.convertURL(i,n)),r.attr("data-mce-p-"+n,i));(c=t.firstChild&&t.firstChild.value)&&(r.attr("data-mce-html",escape(be(e,c))),r.firstChild=null)},Oe=function(e){for(;e=e.parent;)if(e.attr("data-ephox-embed-iri")||(void 0,(t=e.attr("class"))&&/\btiny-pageembed\b/.test(t)))return!0;var t;return!1},Ae=function(i){return function(e){for(var t,r,n=e.length;n--;)(t=e[n]).parent&&(t.parent.attr("data-mce-object")||("script"!==t.name||(r=q(P(i),t.attr("src"))))&&(r&&(r.width&&t.attr("width",r.width.toString()),r.height&&t.attr("height",r.height.toString())),"iframe"===t.name&&T(i)&&we.ceFalse?Oe(t)||t.replace(xe(i,t)):Oe(t)||t.replace(ye(i,t))))}},Se=function(d){d.on("preInit",function(){var t=d.schema.getSpecialElements();U.each("video audio iframe object".split(" "),function(e){t[e]=new RegExp("</"+e+"[^>]*>","gi")});var r=d.schema.getBoolAttrs();U.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(e){r[e]={}}),d.parser.addNodeFilter("iframe,video,audio,object,embed,script",Ae(d)),d.serializer.addAttributeFilter("data-mce-object",function(e,t){for(var r,n,i,o,a,c,u,s,l=e.length;l--;)if((r=e[l]).parent){for(u=r.attr(t),n=new ve(u,1),"audio"!==u&&"script"!==u&&((s=r.attr("class"))&&-1!==s.indexOf("mce-preview-object")?n.attr({width:r.firstChild.attr("width"),height:r.firstChild.attr("height")}):n.attr({width:r.attr("width"),height:r.attr("height")})),n.attr({style:r.attr("style")}),i=(o=r.attributes).length;i--;){var m=o[i].name;0===m.indexOf("data-mce-p-")&&n.attr(m.substr(11),o[i].value)}"script"===u&&n.attr("type","text/javascript"),(a=r.attr("data-mce-html"))&&((c=new ve("#text",3)).raw=!0,c.value=be(d,unescape(a)),n.append(c)),r.replace(n)}})}),d.on("SetContent",function(){d.$("span.mce-preview-object").each(function(e,t){var r=d.$(t);0===r.find("span.mce-shim").length&&r.append('<span class="mce-shim"></span>')})})},_e=function(e){e.on("ResolveName",function(e){var t;1===e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)})},Ce=function(t){t.on("click keyup",function(){var e=t.selection.getNode();e&&t.dom.hasClass(e,"mce-preview-object")&&t.dom.getAttrib(e,"data-mce-selected")&&e.setAttribute("data-mce-selected","2")}),t.on("ObjectSelected",function(e){var t=e.target.getAttribute("data-mce-object");"audio"!==t&&"script"!==t||e.preventDefault()}),t.on("ObjectResized",function(e){var t,r=e.target;r.getAttribute("data-mce-object")&&(t=r.getAttribute("data-mce-html"))&&(t=unescape(t),r.setAttribute("data-mce-html",escape(te(t,{width:String(e.width),height:String(e.height)}))))})},Me=function(e){var t,r;e.ui.registry.addToggleButton("media",{tooltip:"Insert/edit media",icon:"embed",onAction:function(){e.execCommand("mceMedia")},onSetup:(t=e,r=["img[data-mce-object]","span[data-mce-object]","div[data-ephox-embed-iri]"],function(e){return t.selection.selectorChangedWithUnbind(r.join(","),e.setActive).unbind})}),e.ui.registry.addMenuItem("media",{icon:"embed",text:"Media...",onAction:function(){e.execCommand("mceMedia")}})};!function Pe(){i.add("media",function(e){return ge(e),Me(e),_e(e),Se(e),Ce(e),pe(e)})}()}();
9
+ !function(){"use strict";function e(n){return function(e){return r=typeof(t=e),(null===t?"null":"object"==r&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":r)===n;var t,r}}function s(e){return null!=e}function o(e){return function(){return e}}function t(e){return e}function r(){return d}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),p=function(){return(p=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},i=e("string"),u=e("object"),l=e("array"),c=o(!1),m=o(!0),d={fold:function(e,t){return e()},isSome:c,isNone:m,getOr:t,getOrThunk:a,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(void 0),or:t,orThunk:a,map:r,each:function(){},bind:r,exists:c,forall:m,filter:function(){return d},toArray:function(){return[]},toString:o("none()")};function a(e){return e()}function h(e,t){for(var r=0,n=e.length;r<n;r++)t(e[r],r)}function f(e){var t=e;return{get:function(){return t},set:function(e){t=e}}}function g(e,t){return J(e,t)?W.from(e[t]):W.none()}function v(e){return e.getParam("media_scripts")}function b(e,t){if(e)for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r].filter))return e[r]}function w(e){return e.replace(/px$/,"")}function y(i,e){var c=f(!1),s={};return V({validate:!1,allow_conditional_comments:!0,start:function(e,t){if(!c.get())if(J(t.map,"data-ephox-embed-iri"))c.set(!0),o=(a=(n=t).map.style)?X.parseStyle(a):{},s={type:"ephox-embed-iri",source:n.map["data-ephox-embed-iri"],altsource:"",poster:"",width:g(o,"max-width").map(w).getOr(""),height:g(o,"max-height").map(w).getOr("")};else{if(s.source||"param"!==e||(s.source=t.map.movie),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(s.type||(s.type=e),s=K.extend(t.map,s)),"script"===e){var r=b(i,t.map.src);if(!r)return;s={type:"script",source:t.map.src,width:String(r.width),height:String(r.height)}}"source"===e&&(s.source?s.altsource||(s.altsource=t.map.src):s.source=t.map.src),"img"!==e||s.poster||(s.poster=t.map.src)}var n,a,o}}).parse(e),s.source=s.source||s.src||s.data,s.altsource=s.altsource||"",s.poster=s.poster||"",s}function x(e){return{mp3:"audio/mpeg",m4a:"audio/x-m4a",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"}[e.toLowerCase().split(".").pop()]||""}function j(e){return/^[0-9.]+$/.test(e)?e+"px":e}function O(o,e){!function(e){for(var t=q(e),r=0,n=t.length;r<n;r++){var a=t[r];!function(e,t){var r=""+e;if(o.map[t])for(var n=o.length;n--;){var a=o[n];a.name===t&&(r?(o.map[t]=r,a.value=r):(delete o.map[t],o.splice(n,1)))}else r&&(o.push({name:t,value:r}),o.map[t]=r)}(e[a],a)}}(e)}function S(e,c,s){var u,l=Z(),m=f(!1),d=0;return V({validate:!1,allow_conditional_comments:!0,comment:function(e){l.comment(e)},cdata:function(e){l.cdata(e)},text:function(e,t){l.text(e,t)},start:function(e,t,r){if(!m.get())if(J(t.map,"data-ephox-embed-iri"))m.set(!0),n=c,(i=(o=(a=t).map.style)?ee.parseStyle(o):{})["max-width"]=j(n.width),i["max-height"]=j(n.height),O(a,{style:ee.serializeStyle(i)});else{switch(e){case"video":case"object":case"embed":case"img":case"iframe":void 0!==c.height&&void 0!==c.width&&O(t,{width:c.width,height:c.height})}if(s)switch(e){case"video":O(t,{poster:c.poster,src:""}),c.altsource&&O(t,{src:""});break;case"iframe":O(t,{src:c.source});break;case"source":if(d<2&&(O(t,{src:c[te[d]],type:c[te[d]+"mime"]}),!c[te[d]]))return;d++;break;case"img":if(!c.poster)return;u=!0}}var n,a,o,i;l.start(e,t,r)},end:function(e){if(!m.get()){if("video"===e&&s)for(var t,r=0;r<2;r++)c[te[r]]&&((t=[]).map={},d<=r&&(O(t,{src:c[te[r]],type:c[te[r]+"mime"]}),l.start("source",t,!0)));var n;c.poster&&"object"===e&&s&&!u&&((n=[]).map={},O(n,{src:c.poster,width:c.width,height:c.height}),l.start("img",n,!0))}l.end(e)}},Y({})).parse(e),l.getContent()}function _(e,t){for(var r,n=(r=t.match(/^(https?:\/\/|www\.)(.+)$/i))&&1<r.length&&"www."!==r[1]?r[1]:"https://",a=e.regex.exec(t),o=n+e.url,i=0;i<a.length;i++)!function(e){o=o.replace("$"+e,function(){return a[e]||""})}(i);return o.replace(/\?$/,"")}function k(r,e){var n=K.extend({},e);if(!n.source&&(K.extend(n,y(v(r),n.embed)),!n.source))return"";n.altsource||(n.altsource=""),n.poster||(n.poster=""),n.source=r.convertURL(n.source,"source"),n.altsource=r.convertURL(n.altsource,"source"),n.sourcemime=x(n.source),n.altsourcemime=x(n.altsource),n.poster=r.convertURL(n.poster,"poster");var t,a,o=(t=n.source,0<(a=re.filter(function(e){return e.regex.test(t)})).length?K.extend({},a[0],{url:_(a[0],t)}):null);if(o&&(n.source=o.url,n.type=o.type,n.allowfullscreen=o.allowFullscreen,n.width=n.width||String(o.w),n.height=n.height||String(o.h)),n.embed)return S(n.embed,n,!0);var i=b(v(r),n.source);i&&(n.type="script",n.width=String(i.width),n.height=String(i.height));var c,s,u,l,m=r.getParam("audio_template_callback"),d=r.getParam("video_template_callback");return n.width=n.width||"300",n.height=n.height||"150",K.each(n,function(e,t){n[t]=r.dom.encode(""+e)}),"iframe"===n.type?(l=n.allowfullscreen?' allowFullscreen="1"':"",'<iframe src="'+n.source+'" width="'+n.width+'" height="'+n.height+'"'+l+"></iframe>"):"application/x-shockwave-flash"===n.sourcemime?(u='<object data="'+n.source+'" width="'+n.width+'" height="'+n.height+'" type="application/x-shockwave-flash">',n.poster&&(u+='<img src="'+n.poster+'" width="'+n.width+'" height="'+n.height+'" />'),u+"</object>"):-1!==n.sourcemime.indexOf("audio")?(s=n,m?m(s):'<audio controls="controls" src="'+s.source+'">'+(s.altsource?'\n<source src="'+s.altsource+'"'+(s.altsourcemime?' type="'+s.altsourcemime+'"':"")+" />\n":"")+"</audio>"):"script"===n.type?'<script src="'+n.source+'"><\/script>':(c=n,d?d(c):'<video width="'+c.width+'" height="'+c.height+'"'+(c.poster?' poster="'+c.poster+'"':"")+' controls="controls">\n<source src="'+c.source+'"'+(c.sourcemime?' type="'+c.sourcemime+'"':"")+" />\n"+(c.altsource?'<source src="'+c.altsource+'"'+(c.altsourcemime?' type="'+c.altsourcemime+'"':"")+" />\n":"")+"</video>")}function A(e){return e.hasAttribute("data-mce-object")||e.hasAttribute("data-ephox-embed-iri")}function T(t){return function(e){return k(t,e)}}function C(e,t){var r,n,a,o,i,c=e.getParam("media_url_resolver");return c?(a=t,o=T(e),i=c,new ne(function(t,e){function r(e){return e.html&&(ae[a.source]=e),t({url:a.source,html:e.html||o(a)})}ae[a.source]?r(ae[a.source]):i({url:a.source},r,e)})):(n=T(e),ne.resolve({html:n(r=t),url:r.source}))}function D(e,t){var r,n,o,i,c,a=t?g(e,t).bind(function(e){return g(e,"meta")}).getOr({}):{},s=(o=e,i=a,c=t,function(e){function t(){return g(o,e)}function r(){return g(i,e)}function n(e){return g(e,"value").bind(function(e){return 0<e.length?W.some(e):W.none()})}var a={};return a[e]=(e===c?t().bind(function(e){return u(e)?n(e).orThunk(r):r().orThunk(function(){return W.from(e)})}):r().orThunk(function(){return t().bind(function(e){return u(e)?n(e):W.from(e)})})).getOr(""),a});return p(p(p(p(p({},s("source")),s("altsource")),s("poster")),s("embed")),(r=a,n={},g(e,"dimensions").each(function(e){h(["width","height"],function(t){g(r,t).orThunk(function(){return g(e,t)}).each(function(e){return n[t]=e})})}),n))}function P(e){var n=p(p({},e),{source:{value:g(e,"source").getOr("")},altsource:{value:g(e,"altsource").getOr("")},poster:{value:g(e,"poster").getOr("")}});return h(["width","height"],function(r){g(e,r).each(function(e){var t=n.dimensions||{};t[r]=e,n.dimensions=t})}),n}function $(r){return function(e){var t=e&&e.msg?"Media embed handler error: "+e.msg:"Media embed handler threw unknown error.";r.notificationManager.open({type:"error",text:t})}}function M(e,t){return y(v(e),t)}function F(a,o){return function(e){var t,r,n;i(e.url)&&0<e.url.trim().length&&(t=e.html,r=M(o,t),n=p(p({},r),{source:e.url,embed:t}),a.setData(P(n)))}}function z(e,t){var r=e.dom.select("*[data-mce-object]");e.insertContent(t),function(e,t){for(var r=e.dom.select("*[data-mce-object]"),n=0;n<t.length;n++)for(var a=r.length-1;0<=a;a--)t[n]===r[a]&&r.splice(a,1);e.selection.select(r[0])}(e,r),e.nodeChanged()}function N(m){var e,t,r,n=(r=A(t=(e=m).selection.getNode())?e.serializer.serialize(t,{selection:!0}):"",p({embed:r},y(v(e),r))),d=f(n),a=P(n),o={title:"General",name:"general",items:function(e){for(var t=[],r=0,n=e.length;r<n;++r){if(!l(e[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+e);G.apply(t,e[r])}return t}([[{name:"source",type:"urlinput",filetype:"media",label:"Source"}],m.getParam("media_dimensions",!0)?[{type:"sizeinput",name:"dimensions",label:"Constrain proportions",constrain:!0}]:[]])},i=[];m.getParam("media_alt_source",!0)&&i.push({name:"altsource",type:"urlinput",filetype:"media",label:"Alternative source URL"}),m.getParam("media_poster",!0)&&i.push({name:"poster",type:"urlinput",filetype:"image",label:"Media poster (Image URL)"});var c=[o,{title:"Embed",items:[{type:"textarea",name:"embed",label:"Paste your embed code below:"}]}];0<i.length&&c.push({title:"Advanced",name:"advanced",items:i});var h=m.windowManager.open({title:"Insert/Edit Media",size:"normal",body:{type:"tabpanel",tabs:c},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(e){var t,r,n,a,o=D(e.getData());t=d.get(),n=m,(r=o).embed=S(r.embed,r),r.embed&&(t.source===r.source||(a=r.source,J(ae,a)))?z(n,r.embed):C(n,r).then(function(e){z(n,e.html)}).catch($(n)),e.close()},onChange:function(e,t){switch(t.name){case"source":u=d.get(),l=D(e.getData(),"source"),u.source!==l.source&&(F(h,m)({url:l.source,html:""}),C(m,l).then(F(h,m)).catch($(m)));break;case"embed":c=D((i=e).getData()),s=M(m,c.embed),i.setData(P(s));break;case"dimensions":case"altsource":case"poster":n=t.name,a=D((r=e).getData(),n),o=k(m,a),r.setData(P(p(p({},a),{embed:o})))}var r,n,a,o,i,c,s,u,l;d.set(D(e.getData()))},initialData:a})}function U(o,e){if(!1===o.getParam("media_filter_html",!0))return e;var i,c=Z();return V({validate:!1,allow_conditional_comments:!1,comment:function(e){i||c.comment(e)},cdata:function(e){i||c.cdata(e)},text:function(e,t){i||c.text(e,t)},start:function(e,t,r){if(i=!0,"script"!==e&&"noscript"!==e&&"svg"!==e){for(var n=t.length-1;0<=n;n--){var a=t[n].name;0===a.indexOf("on")&&(delete t.map[a],t.splice(n,1)),"style"===a&&(t[n].value=o.dom.serializeStyle(o.dom.parseStyle(t[n].value),e))}c.start(e,t,r),i=!1}},end:function(e){i||c.end(e)}},Y({})).parse(e),c.getContent()}function E(e,t,r,n){void 0===n&&(n=null);var a=e.attr(r);return s(a)?a:J(t,r)?null:n}function R(e,t,r){var n="img"===t.name||"video"===e.name,a="audio"===e.name?"30":"150",o=n?a:null;t.attr({width:E(e,r,"width",n?"300":null),height:E(e,r,"height",o)})}function L(e,t){var r=t.name,n=new oe("span",1);n.attr({contentEditable:"false",style:t.attr("style"),"data-mce-object":r,class:"mce-preview-object mce-object-"+r}),se(e,t,n);var a,o=e.dom.parseStyle(t.attr("style")),i=new oe(r,1);R(t,i,o),i.attr({src:t.attr("src"),style:t.attr("style"),class:t.attr("class")}),"iframe"===r?i.attr({allowfullscreen:t.attr("allowfullscreen"),frameborder:"0"}):(h(["controls","crossorigin","currentTime","loop","muted","poster","preload"],function(e){i.attr(e,t.attr(e))}),s(a=n.attr("data-mce-html"))&&function(e,t,r,n){for(var a=ce({forced_root_block:!1,validate:!1},e.schema).parse(n,{context:t});a.firstChild;)r.append(a.firstChild)}(e,r,i,unescape(a)));var c=new oe("span",1);return c.attr("class","mce-shim"),n.append(i),n.append(c),n}function I(e){for(;e=e.parent;)if(e.attr("data-ephox-embed-iri")||(t=e.attr("class"))&&/\btiny-pageembed\b/.test(t))return 1;var t}var B=function(r){function e(){return a}function t(e){return e(r)}var n=o(r),a={fold:function(e,t){return t(r)},isSome:m,isNone:c,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:e,orThunk:e,map:function(e){return B(e(r))},each:function(e){e(r)},bind:t,exists:t,forall:t,filter:function(e){return e(r)?a:d},toArray:function(){return[r]},toString:function(){return"some("+r+")"}};return a},W={some:B,none:r,from:function(e){return null==e?d:B(e)}},G=Array.prototype.push,q=Object.keys,H=Object.hasOwnProperty,J=function(e,t){return H.call(e,t)},K=tinymce.util.Tools.resolve("tinymce.util.Tools"),Q=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),V=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),X=Q.DOM,Y=tinymce.util.Tools.resolve("tinymce.html.Schema"),Z=tinymce.util.Tools.resolve("tinymce.html.Writer"),ee=Q.DOM,te=["source","altsource"],re=[{regex:/youtu\.be\/([\w\-_\?&=.]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$2?$4",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$2?title=0&amp;byline=0",allowFullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0},{regex:/dai\.ly\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],ne=tinymce.util.Tools.resolve("tinymce.util.Promise"),ae={},oe=tinymce.util.Tools.resolve("tinymce.html.Node"),ie=tinymce.util.Tools.resolve("tinymce.Env"),ce=tinymce.util.Tools.resolve("tinymce.html.DomParser"),se=function(e,t,r){for(var n=t.attributes,a=n.length;a--;){var o=n[a].name,i=n[a].value;"width"!==o&&"height"!==o&&"style"!==o&&("data"!==o&&"src"!==o||(i=e.convertURL(i,o)),r.attr("data-mce-p-"+o,i))}var c=t.firstChild&&t.firstChild.value;c&&(r.attr("data-mce-html",escape(U(e,c))),r.firstChild=null)};n.add("media",function(e){var t,r,d,n,a;function o(){return r.execCommand("mceMedia")}return(t=e).addCommand("mceMedia",function(){N(t)}),(r=e).ui.registry.addToggleButton("media",{tooltip:"Insert/edit media",icon:"embed",onAction:o,onSetup:function(e){var t=r.selection;return e.setActive(A(t.getNode())),t.selectorChangedWithUnbind("img[data-mce-object],span[data-mce-object],div[data-ephox-embed-iri]",e.setActive).unbind}}),r.ui.registry.addMenuItem("media",{icon:"embed",text:"Media...",onAction:o}),e.on("ResolveName",function(e){var t;1===e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)}),(d=e).on("preInit",function(){var t=d.schema.getSpecialElements();K.each("video audio iframe object".split(" "),function(e){t[e]=new RegExp("</"+e+"[^>]*>","gi")});var u,r=d.schema.getBoolAttrs();K.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(e){r[e]={}}),d.parser.addNodeFilter("iframe,video,audio,object,embed,script",(u=d,function(e){for(var t,r,n,a,o,i,c,s=e.length;s--;)(t=e[s]).parent&&(t.parent.attr("data-mce-object")||"script"===t.name&&!(r=b(v(u),t.attr("src")))||(r&&(r.width&&t.attr("width",r.width.toString()),r.height&&t.attr("height",r.height.toString())),("iframe"===(c=t.name)||"video"===c||"audio"===c)&&u.getParam("media_live_embeds",!0)&&ie.ceFalse?I(t)||t.replace(L(u,t)):I(t)||t.replace((n=u,i=void 0,o=(a=t).name,(i=new oe("img",1)).shortEnded=!0,se(n,a,i),R(a,i,{}),i.attr({style:a.attr("style"),src:ie.transparentSrc,"data-mce-object":o,class:"mce-object mce-object-"+o}),i))))})),d.serializer.addAttributeFilter("data-mce-object",function(e,t){for(var r,n,a,o,i,c,s,u,l=e.length;l--;)if((r=e[l]).parent){for(s=r.attr(t),n=new oe(s,1),"audio"!==s&&"script"!==s&&((u=r.attr("class"))&&-1!==u.indexOf("mce-preview-object")?n.attr({width:r.firstChild.attr("width"),height:r.firstChild.attr("height")}):n.attr({width:r.attr("width"),height:r.attr("height")})),n.attr({style:r.attr("style")}),a=(o=r.attributes).length;a--;){var m=o[a].name;0===m.indexOf("data-mce-p-")&&n.attr(m.substr(11),o[a].value)}"script"===s&&n.attr("type","text/javascript"),(i=r.attr("data-mce-html"))&&((c=new oe("#text",3)).raw=!0,c.value=U(d,unescape(i)),n.append(c)),r.replace(n)}})}),d.on("SetContent",function(){d.$("span.mce-preview-object").each(function(e,t){var r=d.$(t);0===r.find("span.mce-shim").length&&r.append('<span class="mce-shim"></span>')})}),(n=e).on("click keyup touchend",function(){var e=n.selection.getNode();e&&n.dom.hasClass(e,"mce-preview-object")&&n.dom.getAttrib(e,"data-mce-selected")&&e.setAttribute("data-mce-selected","2")}),n.on("ObjectSelected",function(e){"script"===e.target.getAttribute("data-mce-object")&&e.preventDefault()}),n.on("ObjectResized",function(e){var t,r=e.target;!r.getAttribute("data-mce-object")||(t=r.getAttribute("data-mce-html"))&&(t=unescape(t),r.setAttribute("data-mce-html",escape(S(t,{width:String(e.width),height:String(e.height)}))))}),a=e,{showDialog:function(){N(a)}}})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.0.11 (2019-07-04)
7
+ * Version: 5.10.7 (2022-12-06)
8
8
  */
9
- !function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(n,e){var o,t=(o=n).plugins.visualchars&&o.plugins.visualchars.isEnabled()?'<span class="mce-nbsp">&nbsp;</span>':"&nbsp;";n.insertContent(function(n,e){for(var o="",t=0;t<e;t++)o+=n;return o}(t,e)),n.dom.setAttrib(n.dom.select("span.mce-nbsp"),"data-mce-bogus","1")},e=function(n){n.addCommand("mceNonBreaking",function(){t(n,1)})},i=tinymce.util.Tools.resolve("tinymce.util.VK"),a=function(n){var e=n.getParam("nonbreaking_force_tab",0);return"boolean"==typeof e?!0===e?3:0:e},o=function(e){var o=a(e);0<o&&e.on("keydown",function(n){if(n.keyCode===i.TAB&&!n.isDefaultPrevented()){if(n.shiftKey)return;n.preventDefault(),n.stopImmediatePropagation(),t(e,o)}})},r=function(n){n.ui.registry.addButton("nonbreaking",{icon:"non-breaking",tooltip:"Nonbreaking space",onAction:function(){return n.execCommand("mceNonBreaking")}}),n.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:function(){return n.execCommand("mceNonBreaking")}})};!function c(){n.add("nonbreaking",function(n){e(n),r(n),o(n)})}()}();
9
+ !function(){"use strict";function o(n,e){for(var a="",o=0;o<e;o++)a+=n;return a}function s(n,e){var a=n.getParam("nonbreaking_wrap",!0,"boolean")||n.plugins.visualchars?'<span class="'+(n.plugins.visualchars&&n.plugins.visualchars.isEnabled()?"mce-nbsp-wrap mce-nbsp":"mce-nbsp-wrap")+'" contenteditable="false">'+o("&nbsp;",e)+"</span>":o("&nbsp;",e);n.undoManager.transact(function(){return n.insertContent(a)})}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.VK");n.add("nonbreaking",function(n){var e,a,o,t,i;function r(){return a.execCommand("mceNonBreaking")}(e=n).addCommand("mceNonBreaking",function(){s(e,1)}),(a=n).ui.registry.addButton("nonbreaking",{icon:"non-breaking",tooltip:"Nonbreaking space",onAction:r}),a.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:r}),0<(i="boolean"==typeof(t=(o=n).getParam("nonbreaking_force_tab",0))?!0===t?3:0:t)&&o.on("keydown",function(n){n.keyCode!==c.TAB||n.isDefaultPrevented()||n.shiftKey||(n.preventDefault(),n.stopImmediatePropagation(),s(o,i))})})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.0.11 (2019-07-04)
7
+ * Version: 5.10.7 (2022-12-06)
8
8
  */
9
- !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=function(t){return t.getParam("noneditable_noneditable_class","mceNonEditable")},u=function(t){return t.getParam("noneditable_editable_class","mceEditable")},f=function(t){var n=t.getParam("noneditable_regexp",[]);return n&&n.constructor===RegExp?[n]:n},s=function(n){return function(t){return-1!==(" "+t.attr("class")+" ").indexOf(n)}},d=function(i,o,c){return function(t){var n=arguments,e=n[n.length-2],r=0<e?o.charAt(e-1):"";if('"'===r)return t;if(">"===r){var a=o.lastIndexOf("<",e);if(-1!==a)if(-1!==o.substring(a,e).indexOf('contenteditable="false"'))return t}return'<span class="'+c+'" data-mce-content="'+i.dom.encode(n[0])+'">'+i.dom.encode("string"==typeof n[1]?n[1]:n[0])+"</span>"}},n=function(n){var t,e,r="contenteditable";t=" "+c.trim(u(n))+" ",e=" "+c.trim(l(n))+" ";var a=s(t),i=s(e),o=f(n);n.on("PreInit",function(){0<o.length&&n.on("BeforeSetContent",function(t){!function(t,n,e){var r=n.length,a=e.content;if("raw"!==e.format){for(;r--;)a=a.replace(n[r],d(t,a,l(t)));e.content=a}}(n,o,t)}),n.parser.addAttributeFilter("class",function(t){for(var n,e=t.length;e--;)n=t[e],a(n)?n.attr(r,"true"):i(n)&&n.attr(r,"false")}),n.serializer.addAttributeFilter(r,function(t){for(var n,e=t.length;e--;)n=t[e],(a(n)||i(n))&&(0<o.length&&n.attr("data-mce-content")?(n.name="#text",n.type=3,n.raw=!0,n.value=n.attr("data-mce-content")):n.attr(r,null))})})};!function e(){t.add("noneditable",function(t){n(t)})}()}();
9
+ !function(){"use strict";function l(t){return t.getParam("noneditable_noneditable_class","mceNonEditable")}function u(e){return function(t){return-1!==(" "+t.attr("class")+" ").indexOf(e)}}function e(e){var t,r="contenteditable",n=" "+f.trim(e.getParam("noneditable_editable_class","mceEditable"))+" ",a=" "+f.trim(l(e))+" ",i=u(n),o=u(a),c=(t=e.getParam("noneditable_regexp",[]))&&t.constructor===RegExp?[t]:t;e.on("PreInit",function(){0<c.length&&e.on("BeforeSetContent",function(t){!function(t,e,n){var r=e.length,a=n.content;if("raw"!==n.format){for(;r--;)a=a.replace(e[r],function(i,o,c){return function(t){var e=arguments,n=e[e.length-2],r=0<n?o.charAt(n-1):"";if('"'===r)return t;if(">"===r){var a=o.lastIndexOf("<",n);if(-1!==a&&-1!==o.substring(a,n).indexOf('contenteditable="false"'))return t}return'<span class="'+c+'" data-mce-content="'+i.dom.encode(e[0])+'">'+i.dom.encode("string"==typeof e[1]?e[1]:e[0])+"</span>"}}(t,a,l(t)));n.content=a}}(e,c,t)}),e.parser.addAttributeFilter("class",function(t){for(var e,n=t.length;n--;)e=t[n],i(e)?e.attr(r,"true"):o(e)&&e.attr(r,"false")}),e.serializer.addAttributeFilter(r,function(t){for(var e,n=t.length;n--;)e=t[n],(i(e)||o(e))&&(0<c.length&&e.attr("data-mce-content")?(e.name="#text",e.type=3,e.raw=!0,e.value=e.attr("data-mce-content")):e.attr(r,null))})})}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),f=tinymce.util.Tools.resolve("tinymce.util.Tools");t.add("noneditable",function(t){e(t)})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.0.11 (2019-07-04)
7
+ * Version: 5.10.7 (2022-12-06)
8
8
  */
9
- !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.Env"),a=function(e){return e.getParam("pagebreak_separator","\x3c!-- pagebreak --\x3e")},i=function(e){return e.getParam("pagebreak_split_block",!1)},t=function(){return"mce-pagebreak"},r=function(){return'<img src="'+n.transparentSrc+'" class="mce-pagebreak" data-mce-resize="false" data-mce-placeholder />'},o=function(o){var c=a(o),n=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi");o.on("BeforeSetContent",function(e){e.content=e.content.replace(n,r())}),o.on("PreInit",function(){o.serializer.addNodeFilter("img",function(e){for(var n,a,t=e.length;t--;)if((a=(n=e[t]).attr("class"))&&-1!==a.indexOf("mce-pagebreak")){var r=n.parent;if(o.schema.getBlockElements()[r.name]&&i(o)){r.type=3,r.value=c,r.raw=!0,n.remove();continue}n.type=3,n.value=c,n.raw=!0}})})},c=r,u=t,g=function(e){e.addCommand("mcePageBreak",function(){e.settings.pagebreak_split_block?e.insertContent("<p>"+c()+"</p>"):e.insertContent(c())})},m=function(n){n.on("ResolveName",function(e){"IMG"===e.target.nodeName&&n.dom.hasClass(e.target,u())&&(e.name="pagebreak")})},s=function(e){e.ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:function(){return e.execCommand("mcePageBreak")}}),e.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:function(){return e.execCommand("mcePageBreak")}})};!function l(){e.add("pagebreak",function(e){g(e),s(e),o(e),m(e)})}()}();
9
+ !function(){"use strict";function u(e){return e.getParam("pagebreak_split_block",!1)}function l(e){var a='<img src="'+n.transparentSrc+'" class="'+m+'" data-mce-resize="false" data-mce-placeholder />';return e?"<p>"+a+"</p>":a}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.Env"),m="mce-pagebreak";e.add("pagebreak",function(e){var a,n,o,i,t,r;function c(){return n.execCommand("mcePageBreak")}function g(){return u(o)}(a=e).addCommand("mcePageBreak",function(){a.insertContent(l(u(a)))}),(n=e).ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:c}),n.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:c}),i=(o=e).getParam("pagebreak_separator","\x3c!-- pagebreak --\x3e"),t=new RegExp(i.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi"),o.on("BeforeSetContent",function(e){e.content=e.content.replace(t,l(g()))}),o.on("PreInit",function(){o.serializer.addNodeFilter("img",function(e){for(var a,n,t,r=e.length;r--;)(t=(n=e[r]).attr("class"))&&-1!==t.indexOf(m)&&(a=n.parent,o.schema.getBlockElements()[a.name]&&g()?(a.type=3,a.value=i,a.raw=!0,n.remove()):(n.type=3,n.value=i,n.raw=!0))})}),(r=e).on("ResolveName",function(e){"IMG"===e.target.nodeName&&r.dom.hasClass(e.target,m)&&(e.name="pagebreak")})})}();