tinymce-rails 5.3.0 → 5.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/source/tinymce/tinymce.js +26 -8
  3. data/lib/tinymce/rails/version.rb +2 -2
  4. data/vendor/assets/javascripts/tinymce/plugins/advlist/plugin.js +1 -1
  5. data/vendor/assets/javascripts/tinymce/plugins/anchor/plugin.js +1 -1
  6. data/vendor/assets/javascripts/tinymce/plugins/autolink/plugin.js +1 -1
  7. data/vendor/assets/javascripts/tinymce/plugins/autoresize/plugin.js +1 -1
  8. data/vendor/assets/javascripts/tinymce/plugins/autosave/plugin.js +1 -1
  9. data/vendor/assets/javascripts/tinymce/plugins/bbcode/plugin.js +1 -1
  10. data/vendor/assets/javascripts/tinymce/plugins/charmap/plugin.js +1 -1
  11. data/vendor/assets/javascripts/tinymce/plugins/code/plugin.js +1 -1
  12. data/vendor/assets/javascripts/tinymce/plugins/codesample/plugin.js +1 -1
  13. data/vendor/assets/javascripts/tinymce/plugins/colorpicker/plugin.js +1 -1
  14. data/vendor/assets/javascripts/tinymce/plugins/contextmenu/plugin.js +1 -1
  15. data/vendor/assets/javascripts/tinymce/plugins/directionality/plugin.js +1 -1
  16. data/vendor/assets/javascripts/tinymce/plugins/emoticons/plugin.js +1 -1
  17. data/vendor/assets/javascripts/tinymce/plugins/fullpage/plugin.js +1 -1
  18. data/vendor/assets/javascripts/tinymce/plugins/fullscreen/plugin.js +1 -1
  19. data/vendor/assets/javascripts/tinymce/plugins/help/plugin.js +1 -1
  20. data/vendor/assets/javascripts/tinymce/plugins/hr/plugin.js +1 -1
  21. data/vendor/assets/javascripts/tinymce/plugins/image/plugin.js +2 -2
  22. data/vendor/assets/javascripts/tinymce/plugins/imagetools/plugin.js +1 -1
  23. data/vendor/assets/javascripts/tinymce/plugins/importcss/plugin.js +1 -1
  24. data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/plugin.js +1 -1
  25. data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/plugin.js +1 -1
  26. data/vendor/assets/javascripts/tinymce/plugins/link/plugin.js +1 -1
  27. data/vendor/assets/javascripts/tinymce/plugins/lists/plugin.js +1 -1
  28. data/vendor/assets/javascripts/tinymce/plugins/media/plugin.js +1 -1
  29. data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/plugin.js +1 -1
  30. data/vendor/assets/javascripts/tinymce/plugins/noneditable/plugin.js +1 -1
  31. data/vendor/assets/javascripts/tinymce/plugins/pagebreak/plugin.js +1 -1
  32. data/vendor/assets/javascripts/tinymce/plugins/paste/plugin.js +1 -1
  33. data/vendor/assets/javascripts/tinymce/plugins/preview/plugin.js +1 -1
  34. data/vendor/assets/javascripts/tinymce/plugins/print/plugin.js +1 -1
  35. data/vendor/assets/javascripts/tinymce/plugins/quickbars/plugin.js +1 -1
  36. data/vendor/assets/javascripts/tinymce/plugins/save/plugin.js +1 -1
  37. data/vendor/assets/javascripts/tinymce/plugins/searchreplace/plugin.js +1 -1
  38. data/vendor/assets/javascripts/tinymce/plugins/spellchecker/plugin.js +1 -1
  39. data/vendor/assets/javascripts/tinymce/plugins/tabfocus/plugin.js +1 -1
  40. data/vendor/assets/javascripts/tinymce/plugins/table/plugin.js +1 -1
  41. data/vendor/assets/javascripts/tinymce/plugins/template/plugin.js +1 -1
  42. data/vendor/assets/javascripts/tinymce/plugins/textcolor/plugin.js +1 -1
  43. data/vendor/assets/javascripts/tinymce/plugins/textpattern/plugin.js +1 -1
  44. data/vendor/assets/javascripts/tinymce/plugins/toc/plugin.js +1 -1
  45. data/vendor/assets/javascripts/tinymce/plugins/visualblocks/plugin.js +1 -1
  46. data/vendor/assets/javascripts/tinymce/plugins/visualchars/plugin.js +1 -1
  47. data/vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js +1 -1
  48. data/vendor/assets/javascripts/tinymce/skins/content/dark/content.css +1 -1
  49. data/vendor/assets/javascripts/tinymce/skins/content/dark/content.min.css +1 -1
  50. data/vendor/assets/javascripts/tinymce/skins/content/default/content.css +1 -1
  51. data/vendor/assets/javascripts/tinymce/skins/content/default/content.min.css +1 -1
  52. data/vendor/assets/javascripts/tinymce/skins/content/document/content.css +1 -1
  53. data/vendor/assets/javascripts/tinymce/skins/content/document/content.min.css +1 -1
  54. data/vendor/assets/javascripts/tinymce/skins/content/writer/content.css +1 -1
  55. data/vendor/assets/javascripts/tinymce/skins/content/writer/content.min.css +1 -1
  56. data/vendor/assets/javascripts/tinymce/themes/mobile/theme.js +2 -2
  57. data/vendor/assets/javascripts/tinymce/themes/silver/theme.js +2 -2
  58. data/vendor/assets/javascripts/tinymce/tinymce.js +2 -2
  59. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 81c46206b067ce7a87e4941abad390dc2bc223f7ce10068f8cacc2b947ddf8d8
4
- data.tar.gz: b02fb166242c0575e5ad0e7d5fc96e2275adc5063e9452d1e21354153ddff0bb
3
+ metadata.gz: 357cc8ed852666bbc6e5a058aeda3f341dfc3b27d9786cc5e82b15c1209fb205
4
+ data.tar.gz: 89173f806374f64265ceedc22e1ef7a1f1f718c6281da2504e35d3c2ae13e0f1
5
5
  SHA512:
6
- metadata.gz: a713e4609ecbb248496d3edea3e3f51c754e94c145d1bf99fd262f75b2e49ccaa896880cccf47decece314d02c2d623206d19e0f9867a2e23384912fecc574e5
7
- data.tar.gz: 94a5b4657cbb0da0e1e400b94fbb5c23d98a5923791dd1e79e6b0efecc694cab55dc7b15351f3b64224692853d12a57171e5c5a0d08e3bc43f643bff093ed036
6
+ metadata.gz: ebe01483f0243cfed613ede054f38e82eff4b4ad02163f0691aa265df57f3f3794f0cb941cf99a558d1c46b91e81536fedfc1a6c435b2c72cc5ca1b37854c9ad
7
+ data.tar.gz: 942d0272049ecb7443064ea3a7bc7a775848fbb5a41a3079bc7606b9c28830353757c1209679bd51926544cba556d70ce4afc0ceef878ae6072b7c47568c174a
@@ -4,7 +4,7 @@
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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  (function (domGlobals) {
10
10
  'use strict';
@@ -18244,17 +18244,34 @@
18244
18244
  return node && (blockElements[node.name] || node.name === 'br');
18245
18245
  };
18246
18246
 
18247
- var isInternalImageSource = function (src) {
18248
- return src === Env.transparentSrc;
18247
+ var isBogusImage = function (img) {
18248
+ return img.attr('data-mce-bogus');
18249
+ };
18250
+ var isInternalImageSource = function (img) {
18251
+ return img.attr('src') === Env.transparentSrc || img.attr('data-mce-placeholder');
18252
+ };
18253
+ var isValidDataImg = function (img, settings) {
18254
+ if (settings.images_dataimg_filter) {
18255
+ var imgElem_1 = new domGlobals.Image();
18256
+ imgElem_1.src = img.attr('src');
18257
+ each$1(img.attributes.map, function (value, key) {
18258
+ imgElem_1.setAttribute(key, value);
18259
+ });
18260
+ return settings.images_dataimg_filter(imgElem_1);
18261
+ } else {
18262
+ return true;
18263
+ }
18249
18264
  };
18250
18265
  var registerBase64ImageFilter = function (parser, settings) {
18251
18266
  var blobCache = settings.blob_cache;
18252
18267
  var processImage = function (img) {
18253
18268
  var inputSrc = img.attr('src');
18254
- if (isInternalImageSource(inputSrc)) {
18269
+ if (isInternalImageSource(img) || isBogusImage(img)) {
18255
18270
  return;
18256
18271
  }
18257
- parseDataUri(inputSrc).bind(function (_a) {
18272
+ parseDataUri(inputSrc).filter(function () {
18273
+ return isValidDataImg(img, settings);
18274
+ }).bind(function (_a) {
18258
18275
  var type = _a.type, data = _a.data;
18259
18276
  return Option.from(blobCache.getByData(data, type)).orThunk(function () {
18260
18277
  return buildBlob(type, data).map(function (blob) {
@@ -25252,7 +25269,8 @@
25252
25269
  inline_styles: settings.inline_styles,
25253
25270
  root_name: getRootName(editor),
25254
25271
  validate: true,
25255
- blob_cache: blobCache
25272
+ blob_cache: blobCache,
25273
+ images_dataimg_filter: settings.images_dataimg_filter
25256
25274
  });
25257
25275
  };
25258
25276
  var mkSerializerSettings = function (editor) {
@@ -27923,8 +27941,8 @@
27923
27941
  suffix: null,
27924
27942
  $: DomQuery,
27925
27943
  majorVersion: '5',
27926
- minorVersion: '3.0',
27927
- releaseDate: '2020-05-21',
27944
+ minorVersion: '3.2',
27945
+ releaseDate: '2020-06-10',
27928
27946
  editors: legacyEditors,
27929
27947
  i18n: I18n,
27930
27948
  activeEditor: null,
@@ -1,6 +1,6 @@
1
1
  module TinyMCE
2
2
  module Rails
3
- VERSION = "5.3.0"
4
- TINYMCE_VERSION = "5.3.0"
3
+ VERSION = "5.3.2"
4
+ TINYMCE_VERSION = "5.3.2"
5
5
  end
6
6
  end
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(){"use strict";var n,t,e,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),s=tinymce.util.Tools.resolve("tinymce.util.Tools"),c=function(n,t,e){var r="UL"===t?"InsertUnorderedList":"InsertOrderedList";n.execCommand(r,!1,!1===e?null:{"list-style-type":e})},o=function(n){return function(){return n}},u=o(!1),l=o(!0),i=function(){return a},a=(n=function(n){return n.isNone()},{fold:function(n,t){return n()},is:u,isSome:u,isNone:l,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:o(null),getOrUndefined:o(undefined),or:e,orThunk:t,map:i,each:function(){},bind:i,exists:u,forall:l,filter:i,equals:n,equals_:n,toArray:function(){return[]},toString:o("none()")}),f=function(e){var n=o(e),t=function(){return i},r=function(n){return n(e)},i={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:l,isNone:u,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return f(n(e))},each:function(n){n(e)},bind:r,exists:r,forall:r,filter:function(n){return n(e)?i:a},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(u,function(n){return t(e,n)})}};return i},d=function(n){return null===n||n===undefined?a:f(n)},g=function(n){return n&&/^(TH|TD)$/.test(n.nodeName)},p=function(r){return function(n){return n&&/^(OL|UL|DL)$/.test(n.nodeName)&&(e=n,(t=r).$.contains(t.getBody(),e));var t,e}},m=function(n,t,e){var r=function(n,t){for(var e=0;e<n.length;e++){if(t(n[e]))return e}return-1}(t.parents,g),i=-1!==r?t.parents.slice(0,r):t.parents,o=s.grep(i,p(n));return 0<o.length&&o[0].nodeName===e},y=function(i,n,t,e,r,o){i.ui.registry.addSplitButton(n,{tooltip:t,icon:"OL"===r?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:function(n){n(s.map(o,function(n){return{type:"choiceitem",value:"default"===n?"":n,icon:"list-"+("OL"===r?"num":"bull")+"-"+("disc"===n||"decimal"===n?"default":n),text:n.replace(/\-/g," ").replace(/\b\w/g,function(n){return n.toUpperCase()})}}))},onAction:function(){return i.execCommand(e)},onItemAction:function(n,t){c(i,r,t)},select:function(t){var n,e,r;return(e=(n=i).dom.getParent(n.selection.getNode(),"ol,ul"),r=n.dom.getStyle(e,"listStyleType"),d(r)).map(function(n){return t===n}).getOr(!1)},onSetup:function(t){var n=function(n){t.setActive(m(i,n,r))};return i.on("NodeChange",n),function(){return i.off("NodeChange",n)}}})},v=function(n,t,e,r,i,o){var u,l,s,c,a;0<o.length?y(n,t,e,r,i,o):(l=t,s=e,c=r,a=i,(u=n).ui.registry.addToggleButton(l,{active:!1,tooltip:s,icon:"OL"===a?"ordered-list":"unordered-list",onSetup:function(t){var n=function(n){t.setActive(m(u,n,a))};return u.on("NodeChange",n),function(){return u.off("NodeChange",n)}},onAction:function(){return u.execCommand(c)}}))};!function O(){r.add("advlist",function(n){var e,t,r,i,o,u,l;u="lists",l=(o=n).settings.plugins?o.settings.plugins:"",-1!==s.inArray(l.split(/[ ,]/),u)&&(v(t=n,"numlist","Numbered list","InsertOrderedList","OL",(r=t.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman"))?r.split(/[ ,]/):[]),v(t,"bullist","Bullet list","InsertUnorderedList","UL",(i=t.getParam("advlist_bullet_styles","default,circle,square"))?i.split(/[ ,]/):[]),(e=n).addCommand("ApplyUnorderedListStyle",function(n,t){c(e,"UL",t["list-style-type"])}),e.addCommand("ApplyOrderedListStyle",function(n,t){c(e,"OL",t["list-style-type"])}))})}()}();
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(e,t){return"A"===t.tagName&&""===e.dom.getAttrib(t,"href")},r=function(e,t){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)?(o=t,r=(n=e).selection.getNode(),a(n,r)?(r.removeAttribute("name"),r.id=o,n.undoManager.add()):(n.focus(),n.selection.collapse(!0),n.insertContent(n.dom.createHTML("a",{id:o}))),!0):(e.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),!1);var n,o,r},i=function(t){var e,n,o=(n=(e=t).selection.getNode(),a(e,n)?n.getAttribute("id")||n.getAttribute("name"):"");t.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:o},onSubmit:function(e){r(t,e.getData().id)&&e.close()}})},c=function(o){return function(e){for(var t=0;t<e.length;t++)(n=e[t]).attr("href")||!n.attr("id")&&!n.attr("name")||n.firstChild||e[t].attr("contenteditable",o);var n}};!function t(){e.add("anchor",function(e){var t,n,o;(t=e).on("PreInit",function(){t.parser.addNodeFilter("a",c("false")),t.serializer.addNodeFilter("a",c(null))}),(n=e).addCommand("mceAnchor",function(){i(n)}),(o=e).ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:function(){return o.execCommand("mceAnchor")},onSetup:function(e){return o.selection.selectorChangedWithUnbind("a:not([href])",e.setActive).unbind}}),o.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:function(){return o.execCommand("mceAnchor")}})})}()}();
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=tinymce.util.Tools.resolve("tinymce.Env"),o=function(e,t){if(t<0&&(t=0),3===e.nodeType){var n=e.data.length;n<t&&(t=n)}return t},y=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setStart(t,o(t,n)):e.setStartBefore(t)},k=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setEnd(t,o(t,n)):e.setEndAfter(t)},r=function(e,t,n){var i,o,r,a,s,f,l,d,c,g,u=e.getParam("autolink_pattern",/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i),h=e.getParam("default_link_target",!1);if("A"!==e.selection.getNode().tagName){if((i=e.selection.getRng(!0).cloneRange()).startOffset<5){if(!(d=i.endContainer.previousSibling)){if(!i.endContainer.firstChild||!i.endContainer.firstChild.nextSibling)return;d=i.endContainer.firstChild.nextSibling}if(c=d.length,y(i,d,c),k(i,d,c),i.endOffset<5)return;o=i.endOffset,a=d}else{if(3!==(a=i.endContainer).nodeType&&a.firstChild){for(;3!==a.nodeType&&a.firstChild;)a=a.firstChild;3===a.nodeType&&(y(i,a,0),k(i,a,a.nodeValue.length))}o=1===i.endOffset?2:i.endOffset-1-t}for(r=o;y(i,a,2<=o?o-2:0),k(i,a,1<=o?o-1:0),--o," "!==(g=i.toString())&&""!==g&&160!==g.charCodeAt(0)&&0<=o-2&&g!==n;);var m;(m=i.toString())===n||" "===m||160===m.charCodeAt(0)?(y(i,a,o),k(i,a,r),o+=1):(0===i.startOffset?y(i,a,0):y(i,a,o),k(i,a,r)),"."===(f=i.toString()).charAt(f.length-1)&&k(i,a,r-1),l=(f=i.toString().trim()).match(u);var C=e.getParam("link_default_protocol","http","string");l&&("www."===l[1]?l[1]=C+"://www.":/@$/.test(l[1])&&!/^mailto:/.test(l[1])&&(l[1]="mailto:"+l[1]),s=e.selection.getBookmark(),e.selection.setRng(i),e.execCommand("createlink",!1,l[1]+l[2]),!1!==h&&e.dom.setAttrib(e.selection.getNode(),"target",h),e.selection.moveToBookmark(s),e.nodeChanged())}},t=function(t){var n;t.on("keydown",function(e){if(13!==e.keyCode);else r(t,-1,"")}),i.browser.isIE()?t.on("focus",function(){if(!n){n=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(e){}}}):(t.on("keypress",function(e){if(41!==e.keyCode);else r(t,-1,"(")}),t.on("keyup",function(e){if(32!==e.keyCode);else r(t,0,"")}))};!function n(){e.add("autolink",function(e){t(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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),h=tinymce.util.Tools.resolve("tinymce.Env"),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),v=function(e){return e.getParam("min_height",e.getElement().offsetHeight,"number")},s=function(e,t,n,i,o){r.setEditorTimeout(e,function(){b(e,t),n--?s(e,t,n,i,o):o&&o()},i)},y=function(e,t){var n=e.getBody();n&&(n.style.overflowY=t?"":"hidden",t||(n.scrollTop=0))},p=function(e,t,n,i){var o=parseInt(e.getStyle(t,n,i),10);return isNaN(o)?0:o},b=function(e,t){var n,i,o,r=e.dom,a=e.getDoc();if(a)if((s=e).plugins.fullscreen&&s.plugins.fullscreen.isFullscreen())y(e,!0);else{var s,u=a.documentElement,g=e.getParam("autoresize_bottom_margin",50,"number");i=v(e);var l=p(r,u,"margin-top",!0),f=p(r,u,"margin-bottom",!0);(o=u.offsetHeight+l+f+g)<0&&(o=0);var c=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight;o+c>v(e)&&(i=o+c);var m=e.getParam("max_height",0,"number");if(m&&m<i?(i=m,y(e,!0)):y(e,!1),i!==t.get()){if(n=i-t.get(),r.setStyle(e.getContainer(),"height",i+"px"),t.set(i),e.fire("ResizeEditor"),h.browser.isSafari()&&h.mac){var d=e.getWin();d.scrollTo(d.pageXOffset,d.pageYOffset)}e.hasFocus()&&e.selection.scrollIntoView(e.selection.getNode()),h.webkit&&n<0&&b(e,t)}}};!function t(){e.add("autoresize",function(e){if(e.settings.hasOwnProperty("resize")||(e.settings.resize=!1),!e.inline){var t=(a=0,{get:function(){return a},set:function(e){a=e}});r=t,(o=e).addCommand("mceAutoResize",function(){b(o,r)}),i=t,(n=e).on("init",function(){var e=n.getParam("autoresize_overflow_padding",1,"number"),t=n.dom;t.setStyles(n.getDoc().documentElement,{height:"auto"}),t.setStyles(n.getBody(),{paddingLeft:e,paddingRight:e,"min-height":0})}),n.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",function(){b(n,i)}),n.getParam("autoresize_on_init",!0,"boolean")&&n.on("init",function(){s(n,i,20,100,function(){s(n,i,5,1e3)})})}var n,i,o,r,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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(r){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.util.Delay"),o=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(t,e){var r=t||e,n=/^(\d+)([ms]?)$/.exec(""+r);return(n[2]?{s:1e3,m:6e4}[n[2]]:1)*parseInt(r,10)},u=function(t){var e=r.document.location;return t.getParam("autosave_prefix","tinymce-autosave-{path}{query}{hash}-{id}-").replace(/{path}/g,e.pathname).replace(/{query}/g,e.search).replace(/{hash}/g,e.hash).replace(/{id}/g,t.id)},s=function(t,e){var r=t.settings.forced_root_block;return""===(e=a.trim(void 0===e?t.getBody().innerHTML:e))||new RegExp("^<"+r+"[^>]*>((\xa0|&nbsp;|[ \t]|<br[^>]*>)+?|)</"+r+">|<br>$","i").test(e)},f=function(t){var e=parseInt(o.getItem(u(t)+"time"),10)||0;return!((new Date).getTime()-e>i(t.settings.autosave_retention,"20m"))||(c(t,!1),!1)},c=function(t,e){var r=u(t);o.removeItem(r+"draft"),o.removeItem(r+"time"),!1!==e&&t.fire("RemoveDraft")},m=function(t){var e=u(t);!s(t)&&t.isDirty()&&(o.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),o.setItem(e+"time",(new Date).getTime().toString()),t.fire("StoreDraft"))},l=function(t){var e=u(t);f(t)&&(t.setContent(o.getItem(e+"draft"),{format:"raw"}),t.fire("RestoreDraft"))},v=function(t){var e=i(t.settings.autosave_interval,"30s");n.setInterval(function(){t.removed||m(t)},e)},d=function(t){t.undoManager.transact(function(){l(t),c(t)}),t.focus()},g=tinymce.util.Tools.resolve("tinymce.EditorManager"),y=function(r){return function(t){t.setDisabled(!f(r));var e=function(){return t.setDisabled(!f(r))};return r.on("StoreDraft RestoreDraft RemoveDraft",e),function(){return r.off("StoreDraft RestoreDraft RemoveDraft",e)}}};!function e(){t.add("autosave",function(t){var e,r;return t.editorManager.on("BeforeUnload",function(t){var e;a.each(g.get(),function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&t.getParam("autosave_ask_before_unload",!0)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e&&(t.preventDefault(),t.returnValue=e)}),v(e=t),e.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:function(){d(e)},onSetup:y(e)}),e.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:function(){d(e)},onSetup:y(e)}),t.on("init",function(){t.getParam("autosave_restore_when_empty",!1)&&t.dom.isEmpty(t.getBody())&&l(t)}),r=t,{hasDraft:function(){return f(r)},storeDraft:function(){return m(r)},restoreDraft:function(){return l(r)},removeDraft:function(t){return c(r,t)},isEmpty:function(t){return s(r,t)}}})}()}(window);
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(){"use strict";var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=function(t){t=e.trim(t);var o=function(o,e){t=t.replace(o,e)};return o(/\n/gi,"<br />"),o(/\[b\]/gi,"<strong>"),o(/\[\/b\]/gi,"</strong>"),o(/\[i\]/gi,"<em>"),o(/\[\/i\]/gi,"</em>"),o(/\[u\]/gi,"<u>"),o(/\[\/u\]/gi,"</u>"),o(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>'),o(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>'),o(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />'),o(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>'),o(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span>&nbsp;'),o(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span>&nbsp;'),t};!function i(){o.add("bbcode",function(o){o.on("BeforeSetContent",function(o){o.content=t(o.content)}),o.on("PostProcess",function(o){o.set&&(o.content=t(o.content)),o.get&&(o.content=function(t){t=e.trim(t);var o=function(o,e){t=t.replace(o,e)};return o(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"),o(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]"),o(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"),o(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]"),o(/<font>(.*?)<\/font>/gi,"$1"),o(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]"),o(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]"),o(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]"),o(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),o(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),o(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),o(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),o(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),o(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),o(/<\/(strong|b)>/gi,"[/b]"),o(/<(strong|b)>/gi,"[b]"),o(/<\/(em|i)>/gi,"[/i]"),o(/<(em|i)>/gi,"[i]"),o(/<\/u>/gi,"[/u]"),o(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]"),o(/<u>/gi,"[u]"),o(/<blockquote[^>]*>/gi,"[quote]"),o(/<\/blockquote>/gi,"[/quote]"),o(/<br \/>/gi,"\n"),o(/<br\/>/gi,"\n"),o(/<br>/gi,"\n"),o(/<p>/gi,""),o(/<\/p>/gi,"\n"),o(/&nbsp;|\u00a0/gi," "),o(/&quot;/gi,'"'),o(/&lt;/gi,"<"),o(/&gt;/gi,">"),o(/&amp;/gi,"&"),t}(o.content))})})}()}();
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(s){"use strict";var e,n,r,t,a=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=function(e,n){var r,t=(r=n,e.fire("insertCustomChar",{chr:r}).chr);e.execCommand("mceInsertContent",!1,t)},i=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(e){return function(){return e}},c=o(!1),u=o(!0),g=function(){return m},m=(e=function(e){return e.isNone()},{fold:function(e,n){return e()},is:c,isSome:c,isNone:u,getOr:r=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(undefined),or:r,orThunk:n,map:g,each:function(){},bind:g,exists:c,forall:u,filter:g,equals:e,equals_:e,toArray:function(){return[]},toString:o("none()")}),f=function(r){var e=o(r),n=function(){return a},t=function(e){return e(r)},a={fold:function(e,n){return n(r)},is:function(e){return r===e},isSome:u,isNone:c,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return f(e(r))},each:function(e){e(r)},bind:t,exists:t,forall:t,filter:function(e){return e(r)?a:m},toArray:function(){return[r]},toString:function(){return"some("+r+")"},equals:function(e){return e.is(r)},equals_:function(e,n){return e.fold(c,function(e){return n(r,e)})}};return a},h={some:f,none:g,from:function(e){return null===e||e===undefined?m:f(e)}},d=(t="array",function(e){return r=typeof(n=e),(null===n?"null":"object"==r&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":r)===t;var n,r}),p=Array.prototype.push,y=function(e,n){for(var r=e.length,t=new Array(r),a=0;a<r;a++){var i=e[a];t[a]=n(i,a)}return t},v=function(e,n){return function(e,n,r){for(var t=0,a=e.length;t<a;t++){var i=e[t];if(n(i,t))return h.some(i);if(r(i,t))break}return h.none()}(e,n,c)},w=function(e,n){return function(e){for(var n=[],r=0,t=e.length;r<t;++r){if(!d(e[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+e);p.apply(n,e[r])}return n}(y(e,n))},b=i.isArray,k="User Defined",C=function(e){return b(e)?[].concat((n=e,i.grep(n,function(e){return b(e)&&2===e.length}))):"function"==typeof e?e():[];var n},x=function(e){var n=function(e,n){var r=e.settings.charmap;r&&(n=[{name:k,characters:C(r)}]);var t=e.settings.charmap_append;if(t){var a=i.grep(n,function(e){return e.name===k});return a.length?(a[0].characters=[].concat(a[0].characters).concat(C(t)),n):[].concat(n).concat({name:k,characters:C(t)})}return n}(e,[{name:"Currency",characters:[[36,"dollar sign"],[162,"cent sign"],[8364,"euro sign"],[163,"pound sign"],[165,"yen sign"],[164,"currency sign"],[8352,"euro-currency sign"],[8353,"colon sign"],[8354,"cruzeiro sign"],[8355,"french franc sign"],[8356,"lira sign"],[8357,"mill sign"],[8358,"naira sign"],[8359,"peseta sign"],[8360,"rupee sign"],[8361,"won sign"],[8362,"new sheqel sign"],[8363,"dong sign"],[8365,"kip sign"],[8366,"tugrik sign"],[8367,"drachma sign"],[8368,"german penny symbol"],[8369,"peso sign"],[8370,"guarani sign"],[8371,"austral sign"],[8372,"hryvnia sign"],[8373,"cedi sign"],[8374,"livre tournois sign"],[8375,"spesmilo sign"],[8376,"tenge sign"],[8377,"indian rupee sign"],[8378,"turkish lira sign"],[8379,"nordic mark sign"],[8380,"manat sign"],[8381,"ruble sign"],[20870,"yen character"],[20803,"yuan character"],[22291,"yuan character, in hong kong and taiwan"],[22278,"yen/yuan character variant one"]]},{name:"Text",characters:[[169,"copyright sign"],[174,"registered sign"],[8482,"trade mark sign"],[8240,"per mille sign"],[181,"micro sign"],[183,"middle dot"],[8226,"bullet"],[8230,"three dot leader"],[8242,"minutes / feet"],[8243,"seconds / inches"],[167,"section sign"],[182,"paragraph sign"],[223,"sharp s / ess-zed"]]},{name:"Quotations",characters:[[8249,"single left-pointing angle quotation mark"],[8250,"single right-pointing angle quotation mark"],[171,"left pointing guillemet"],[187,"right pointing guillemet"],[8216,"left single quotation mark"],[8217,"right single quotation mark"],[8220,"left double quotation mark"],[8221,"right double quotation mark"],[8218,"single low-9 quotation mark"],[8222,"double low-9 quotation mark"],[60,"less-than sign"],[62,"greater-than sign"],[8804,"less-than or equal to"],[8805,"greater-than or equal to"],[8211,"en dash"],[8212,"em dash"],[175,"macron"],[8254,"overline"],[164,"currency sign"],[166,"broken bar"],[168,"diaeresis"],[161,"inverted exclamation mark"],[191,"turned question mark"],[710,"circumflex accent"],[732,"small tilde"],[176,"degree sign"],[8722,"minus sign"],[177,"plus-minus sign"],[247,"division sign"],[8260,"fraction slash"],[215,"multiplication sign"],[185,"superscript one"],[178,"superscript two"],[179,"superscript three"],[188,"fraction one quarter"],[189,"fraction one half"],[190,"fraction three quarters"]]},{name:"Mathematical",characters:[[402,"function / florin"],[8747,"integral"],[8721,"n-ary sumation"],[8734,"infinity"],[8730,"square root"],[8764,"similar to"],[8773,"approximately equal to"],[8776,"almost equal to"],[8800,"not equal to"],[8801,"identical to"],[8712,"element of"],[8713,"not an element of"],[8715,"contains as member"],[8719,"n-ary product"],[8743,"logical and"],[8744,"logical or"],[172,"not sign"],[8745,"intersection"],[8746,"union"],[8706,"partial differential"],[8704,"for all"],[8707,"there exists"],[8709,"diameter"],[8711,"backward difference"],[8727,"asterisk operator"],[8733,"proportional to"],[8736,"angle"]]},{name:"Extended Latin",characters:[[192,"A - grave"],[193,"A - acute"],[194,"A - circumflex"],[195,"A - tilde"],[196,"A - diaeresis"],[197,"A - ring above"],[256,"A - macron"],[198,"ligature AE"],[199,"C - cedilla"],[200,"E - grave"],[201,"E - acute"],[202,"E - circumflex"],[203,"E - diaeresis"],[274,"E - macron"],[204,"I - grave"],[205,"I - acute"],[206,"I - circumflex"],[207,"I - diaeresis"],[298,"I - macron"],[208,"ETH"],[209,"N - tilde"],[210,"O - grave"],[211,"O - acute"],[212,"O - circumflex"],[213,"O - tilde"],[214,"O - diaeresis"],[216,"O - slash"],[332,"O - macron"],[338,"ligature OE"],[352,"S - caron"],[217,"U - grave"],[218,"U - acute"],[219,"U - circumflex"],[220,"U - diaeresis"],[362,"U - macron"],[221,"Y - acute"],[376,"Y - diaeresis"],[562,"Y - macron"],[222,"THORN"],[224,"a - grave"],[225,"a - acute"],[226,"a - circumflex"],[227,"a - tilde"],[228,"a - diaeresis"],[229,"a - ring above"],[257,"a - macron"],[230,"ligature ae"],[231,"c - cedilla"],[232,"e - grave"],[233,"e - acute"],[234,"e - circumflex"],[235,"e - diaeresis"],[275,"e - macron"],[236,"i - grave"],[237,"i - acute"],[238,"i - circumflex"],[239,"i - diaeresis"],[299,"i - macron"],[240,"eth"],[241,"n - tilde"],[242,"o - grave"],[243,"o - acute"],[244,"o - circumflex"],[245,"o - tilde"],[246,"o - diaeresis"],[248,"o slash"],[333,"o macron"],[339,"ligature oe"],[353,"s - caron"],[249,"u - grave"],[250,"u - acute"],[251,"u - circumflex"],[252,"u - diaeresis"],[363,"u - macron"],[253,"y - acute"],[254,"thorn"],[255,"y - diaeresis"],[563,"y - macron"],[913,"Alpha"],[914,"Beta"],[915,"Gamma"],[916,"Delta"],[917,"Epsilon"],[918,"Zeta"],[919,"Eta"],[920,"Theta"],[921,"Iota"],[922,"Kappa"],[923,"Lambda"],[924,"Mu"],[925,"Nu"],[926,"Xi"],[927,"Omicron"],[928,"Pi"],[929,"Rho"],[931,"Sigma"],[932,"Tau"],[933,"Upsilon"],[934,"Phi"],[935,"Chi"],[936,"Psi"],[937,"Omega"],[945,"alpha"],[946,"beta"],[947,"gamma"],[948,"delta"],[949,"epsilon"],[950,"zeta"],[951,"eta"],[952,"theta"],[953,"iota"],[954,"kappa"],[955,"lambda"],[956,"mu"],[957,"nu"],[958,"xi"],[959,"omicron"],[960,"pi"],[961,"rho"],[962,"final sigma"],[963,"sigma"],[964,"tau"],[965,"upsilon"],[966,"phi"],[967,"chi"],[968,"psi"],[969,"omega"]]},{name:"Symbols",characters:[[8501,"alef symbol"],[982,"pi symbol"],[8476,"real part symbol"],[978,"upsilon - hook symbol"],[8472,"Weierstrass p"],[8465,"imaginary part"]]},{name:"Arrows",characters:[[8592,"leftwards arrow"],[8593,"upwards arrow"],[8594,"rightwards arrow"],[8595,"downwards arrow"],[8596,"left right arrow"],[8629,"carriage return"],[8656,"leftwards double arrow"],[8657,"upwards double arrow"],[8658,"rightwards double arrow"],[8659,"downwards double arrow"],[8660,"left right double arrow"],[8756,"therefore"],[8834,"subset of"],[8835,"superset of"],[8836,"not a subset of"],[8838,"subset of or equal to"],[8839,"superset of or equal to"],[8853,"circled plus"],[8855,"circled times"],[8869,"perpendicular"],[8901,"dot operator"],[8968,"left ceiling"],[8969,"right ceiling"],[8970,"left floor"],[8971,"right floor"],[9001,"left-pointing angle bracket"],[9002,"right-pointing angle bracket"],[9674,"lozenge"],[9824,"black spade suit"],[9827,"black club suit"],[9829,"black heart suit"],[9830,"black diamond suit"],[8194,"en space"],[8195,"em space"],[8201,"thin space"],[8204,"zero width non-joiner"],[8205,"zero width joiner"],[8206,"left-to-right mark"],[8207,"right-to-left mark"]]}]);return 1<n.length?[{name:"All",characters:w(n,function(e){return e.characters})}].concat(n):n},A=function(e){var n=e;return{get:function(){return n},set:function(e){n=e}}},O=String.fromCodePoint,q=function(e,n){return-1!==e.indexOf(n)},S=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(O)return O.apply(void 0,e);for(var r=[],t="",a=0,i=e.length;a!==i;++a){var o=+e[a];if(!(o<1114111&&o>>>0===o))throw RangeError("Invalid code point: "+o);16383<=(o<=65535?r.push(o):(o-=65536,r.push(55296+(o>>10),o%1024+56320)))&&(t+=String.fromCharCode.apply(null,r),r.length=0)}return t+String.fromCharCode.apply(null,r)},T=function(e,n){var a=[],i=n.toLowerCase();return function(e,n){for(var r=0,t=e.length;r<t;r++){n(e[r],r)}}(e.characters,function(e){var n,r,t;n=e[0],r=e[1],t=i,(q(S(n).toLowerCase(),t)||q(r.toLowerCase(),t)||q(r.toLowerCase().replace(/\s+/g,""),t))&&a.push(e)}),y(a,function(e){return{text:e[1],value:S(e[0]),icon:S(e[0])}})},E="pattern",I=function(r,a){var t,i,o,n=function(){return[{label:"Search",type:"input",name:E},{type:"collection",name:"results"}]},c=1===a.length?A(k):A("All"),u=(t=function(e){var r,t,n=e.getData().pattern;r=e,t=n,v(a,function(e){return e.name===c.get()}).each(function(e){var n=T(e,t);r.setData({results:n})})},i=40,o=null,{cancel:function(){null!==o&&(s.clearTimeout(o),o=null)},throttle:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];null!==o&&s.clearTimeout(o),o=s.setTimeout(function(){t.apply(null,e),o=null},i)}}),e={title:"Special Character",size:"normal",body:1===a.length?{type:"panel",items:n()}:{type:"tabpanel",tabs:y(a,function(e){return{title:e.name,name:e.name,items:n()}})},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{pattern:"",results:T(a[0],"")},onAction:function(e,n){"results"===n.name&&(l(r,n.value),e.close())},onTabChange:function(e,n){c.set(n.newTabName),u.throttle(e)},onChange:function(e,n){n.name===E&&u.throttle(e)}};r.windowManager.open(e).focus(E)},N=tinymce.util.Tools.resolve("tinymce.util.Promise");!function U(){a.add("charmap",function(e){var n,r,t,a,i,o,c=x(e);return r=c,(n=e).addCommand("mceShowCharmap",function(){I(n,r)}),(t=e).ui.registry.addButton("charmap",{icon:"insert-character",tooltip:"Special character",onAction:function(){return t.execCommand("mceShowCharmap")}}),t.ui.registry.addMenuItem("charmap",{icon:"insert-character",text:"Special character...",onAction:function(){return t.execCommand("mceShowCharmap")}}),a=e,i=c[0],a.ui.registry.addAutocompleter("charmap",{ch:":",columns:"auto",minChars:2,fetch:function(r,e){return new N(function(e,n){e(T(i,r))})},onAction:function(e,n,r){a.selection.setRng(n),a.insertContent(r),e.hide()}}),o=e,{getCharMap:function(){return x(o)},insertChar:function(e){l(o,e)}}})}()}(window);
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(o){var e=o.getContent({source_view:!0});o.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:e},onSubmit:function(e){var t,n;t=o,n=e.getData().code,t.focus(),t.undoManager.transact(function(){t.setContent(n)}),t.selection.setCursorLocation(),t.nodeChanged(),e.close()}})};!function t(){e.add("code",function(e){var t,n;return(t=e).addCommand("mceCodeEditor",function(){o(t)}),(n=e).ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:function(){return o(n)}}),n.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:function(){return o(n)}}),{}})}()}();
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(e){"use strict";var n,t,a,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(e){return function(){return e}},s=i(!1),o=i(!0),l=function(){return u},u=(n=function(e){return e.isNone()},{fold:function(e,n){return e()},is:s,isSome:s,isNone:o,getOr:a=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(undefined),or:a,orThunk:t,map:l,each:function(){},bind:l,exists:s,forall:o,filter:l,equals:n,equals_:n,toArray:function(){return[]},toString:i("none()")}),c=function(t){var e=i(t),n=function(){return r},a=function(e){return e(t)},r={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:o,isNone:s,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return c(e(t))},each:function(e){e(t)},bind:a,exists:a,forall:a,filter:function(e){return e(t)?r:u},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(s,function(e){return n(t,e)})}};return r},d={some:c,none:l,from:function(e){return null===e||e===undefined?u:c(e)}},p=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils");function g(e){return e&&"PRE"===e.nodeName&&-1!==e.className.indexOf("language-")}function m(t){return function(e,n){return t(n)}}var f="undefined"!=typeof e.window?e.window:Function("return this;")(),h={},b={exports:h},y={};!function(n,t,a,d){var e=window.Prism;window.Prism={manual:!0},function(e){if("object"==typeof t&&void 0!==a)a.exports=e();else if("function"==typeof n&&n.amd)n([],e);else{("undefined"!=typeof window?window:void 0!==y?y:"undefined"!=typeof self?self:this).EphoxContactWrapper=e()}}(function(){return function c(i,s,o){function l(n,e){if(!s[n]){if(!i[n]){var t="function"==typeof d&&d;if(!e&&t)return t(n,!0);if(u)return u(n,!0);var a=new Error("Cannot find module '"+n+"'");throw a.code="MODULE_NOT_FOUND",a}var r=s[n]={exports:{}};i[n][0].call(r.exports,function(e){return l(i[n][1][e]||e)},r,r.exports,c,i,s,o)}return s[n].exports}for(var u="function"==typeof d&&d,e=0;e<o.length;e++)l(o[e]);return l}({1:[function(e,n,t){Prism.languages.c=Prism.languages.extend("clike",{"class-name":{pattern:/(\b(?:enum|struct)\s+)\w+/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c["boolean"]},{}],2:[function(e,n,t){Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(?:true|false)\b/,"function":/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}},{}],3:[function(e,t,n){(function(e){var n=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,C={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof O?new O(e.type,C.util.encode(e.content),e.alias):Array.isArray(e)?e.map(C.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function s(e,t){var a,n,r=C.util.type(e);switch(t=t||{},r){case"Object":if(n=C.util.objId(e),t[n])return t[n];for(var i in a={},t[n]=a,e)e.hasOwnProperty(i)&&(a[i]=s(e[i],t));return a;case"Array":return(n=C.util.objId(e),t[n])?t[n]:(a=[],t[n]=a,e.forEach(function(e,n){a[n]=s(e,t)}),a);default:return e}},getLanguage:function(e){for(;e&&!c.test(e.className);)e=e.parentElement;return e?(e.className.match(c)||[,"none"])[1].toLowerCase():"none"},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(a){var e=(/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(a.stack)||[])[1];if(e){var n=document.getElementsByTagName("script");for(var t in n)if(n[t].src==e)return n[t]}return null}}},languages:{extend:function(e,n){var t=C.util.clone(C.languages[e]);for(var a in n)t[a]=n[a];return t},insertBefore:function(t,e,n,a){var r=(a=a||C.languages)[t],i={};for(var s in r)if(r.hasOwnProperty(s)){if(s==e)for(var o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);n.hasOwnProperty(s)||(i[s]=r[s])}var l=a[t];return a[t]=i,C.languages.DFS(C.languages,function(e,n){n===l&&e!=t&&(this[e]=i)}),i},DFS:function l(e,n,t,a){a=a||{};var r=C.util.objId;for(var i in e)if(e.hasOwnProperty(i)){n.call(e,i,e[i],t||i);var s=e[i],o=C.util.type(s);"Object"!==o||a[r(s)]?"Array"!==o||a[r(s)]||(a[r(s)]=!0,l(s,n,i,a)):(a[r(s)]=!0,l(s,n,null,a))}}},plugins:{},highlightAll:function(e,n){C.highlightAllUnder(document,e,n)},highlightAllUnder:function(e,n,t){var a={callback:t,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};C.hooks.run("before-highlightall",a),a.elements=Array.prototype.slice.apply(a.container.querySelectorAll(a.selector)),C.hooks.run("before-all-elements-highlight",a);for(var r,i=0;r=a.elements[i++];)C.highlightElement(r,!0===n,a.callback)},highlightElement:function(e,n,t){var a=C.util.getLanguage(e),r=C.languages[a];e.className=e.className.replace(c,"").replace(/\s+/g," ")+" language-"+a;var i=e.parentNode;i&&"pre"===i.nodeName.toLowerCase()&&(i.className=i.className.replace(c,"").replace(/\s+/g," ")+" language-"+a);var s={element:e,language:a,grammar:r,code:e.textContent};function o(e){s.highlightedCode=e,C.hooks.run("before-insert",s),s.element.innerHTML=s.highlightedCode,C.hooks.run("after-highlight",s),C.hooks.run("complete",s),t&&t.call(s.element)}if(C.hooks.run("before-sanity-check",s),!s.code)return C.hooks.run("complete",s),void(t&&t.call(s.element));if(C.hooks.run("before-highlight",s),s.grammar)if(n&&u.Worker){var l=new Worker(C.filename);l.onmessage=function(e){o(e.data)},l.postMessage(JSON.stringify({language:s.language,code:s.code,immediateClose:!0}))}else o(C.highlight(s.code,s.grammar,s.language));else o(C.util.encode(s.code))},highlight:function(e,n,t){var a={code:e,grammar:n,language:t};return C.hooks.run("before-tokenize",a),a.tokens=C.tokenize(a.code,a.grammar),C.hooks.run("after-tokenize",a),O.stringify(C.util.encode(a.tokens),a.language)},matchGrammar:function(e,n,t,a,r,i,s){for(var o in t)if(t.hasOwnProperty(o)&&t[o]){var l=t[o];l=Array.isArray(l)?l:[l];for(var u=0;u<l.length;++u){if(s&&s==o+","+u)return;var c=l[u],d=c.inside,p=!!c.lookbehind,g=!!c.greedy,m=0,f=c.alias;if(g&&!c.pattern.global){var h=c.pattern.toString().match(/[imsuy]*$/)[0];c.pattern=RegExp(c.pattern.source,h+"g")}c=c.pattern||c;for(var b=a,y=r;b<n.length;y+=n[b].length,++b){var w=n[b];if(n.length>e.length)return;if(!(w instanceof O)){if(g&&b!=n.length-1){if(c.lastIndex=y,!(P=c.exec(e)))break;for(var v=P.index+(p&&P[1]?P[1].length:0),k=P.index+P[0].length,x=b,_=y,F=n.length;x<F&&(_<k||!n[x].type&&!n[x-1].greedy);++x)(_+=n[x].length)<=v&&(++b,y=_);if(n[b]instanceof O)continue;A=x-b,w=e.slice(y,_),P.index-=y}else{c.lastIndex=0;var P=c.exec(w),A=1}if(P){p&&(m=P[1]?P[1].length:0);k=(v=P.index+m)+(P=P[0].slice(m)).length;var S=w.slice(0,v),j=w.slice(k),$=[b,A];S&&(++b,y+=S.length,$.push(S));var E=new O(o,d?C.tokenize(P,d):P,f,P,g);if($.push(E),j&&$.push(j),Array.prototype.splice.apply(n,$),1!=A&&C.matchGrammar(e,n,t,b,y,!0,o+","+u),i)break}else if(i)break}}}}},tokenize:function(e,n){var t=[e],a=n.rest;if(a){for(var r in a)n[r]=a[r];delete n.rest}return C.matchGrammar(e,t,n,0,0,!1),t},hooks:{all:{},add:function(e,n){var t=C.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=C.hooks.all[e];if(t&&t.length)for(var a,r=0;a=t[r++];)a(n)}},Token:O};function O(e,n,t,a,r){this.type=e,this.content=n,this.alias=t,this.length=0|(a||"").length,this.greedy=!!r}if(u.Prism=C,O.stringify=function(e,n){if("string"==typeof e)return e;if(Array.isArray(e))return e.map(function(e){return O.stringify(e,n)}).join("");var t={type:e.type,content:O.stringify(e.content,n),tag:"span",classes:["token",e.type],attributes:{},language:n};if(e.alias){var a=Array.isArray(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(t.classes,a)}C.hooks.run("wrap",t);var r=Object.keys(t.attributes).map(function(e){return e+'="'+(t.attributes[e]||"").replace(/"/g,"&quot;")+'"'}).join(" ");return"<"+t.tag+' class="'+t.classes.join(" ")+'"'+(r?" "+r:"")+">"+t.content+"</"+t.tag+">"},!u.document)return u.addEventListener&&(C.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,a=n.code,r=n.immediateClose;u.postMessage(C.highlight(a,C.languages[t],t)),r&&u.close()},!1)),C;var e=C.util.currentScript();if(e&&(C.filename=e.src,e.hasAttribute("data-manual")&&(C.manual=!0)),!C.manual){var t=function(){C.manual||C.highlightAll()},a=document.readyState;"loading"===a||"interactive"===a&&e&&e.defer?document.addEventListener("DOMContentLoaded",t):window.requestAnimationFrame?window.requestAnimationFrame(t):window.setTimeout(t,16)}return C}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});void 0!==t&&t.exports&&(t.exports=n),void 0!==e&&(e.Prism=n)}).call(this,void 0!==y?y:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(e,n,t){Prism.languages.cpp=Prism.languages.extend("c",{"class-name":{pattern:/(\b(?:class|enum|struct)\s+)\w+/,lookbehind:!0},keyword:/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+\.?[\da-f']*|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+\.?[\d']*|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]*/i,greedy:!0},operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,"boolean":/\b(?:true|false)\b/}),Prism.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}})},{}],5:[function(e,n,t){Prism.languages.csharp=Prism.languages.extend("clike",{keyword:/\b(?:abstract|add|alias|as|ascending|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|descending|do|double|dynamic|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|from|get|global|goto|group|if|implicit|in|int|interface|internal|into|is|join|let|lock|long|namespace|new|null|object|operator|orderby|out|override|params|partial|private|protected|public|readonly|ref|remove|return|sbyte|sealed|select|set|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|value|var|virtual|void|volatile|where|while|yield)\b/,string:[{pattern:/@("|')(?:\1\1|\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*?\1/,greedy:!0}],"class-name":[{pattern:/\b[A-Z]\w*(?:\.\w+)*\b(?=\s+\w+)/,inside:{punctuation:/\./}},{pattern:/(\[)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/((?:\b(?:class|interface|new)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}}],number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)f?/i,operator:/>>=?|<<=?|[-=]>|([-+&|?])\1|~|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),Prism.languages.insertBefore("csharp","class-name",{"generic-method":{pattern:/\w+\s*<[^>\r\n]+?>\s*(?=\()/,inside:{"function":/^\w+/,"class-name":{pattern:/\b[A-Z]\w*(?:\.\w+)*\b/,inside:{punctuation:/\./}},keyword:Prism.languages.csharp.keyword,punctuation:/[<>(),.:]/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}}),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp},{}],6:[function(e,n,t){!function(e){var n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/@[\w-]+/}},url:{pattern:RegExp("url\\((?:"+n.source+"|[^\n\r()]*)\\)","i"),inside:{"function":/^url/i,punctuation:/^\(|\)$/}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+n.source+")*?(?=\\s*\\{)"),string:{pattern:n,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var t=e.languages.markup;t&&(t.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:t.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:e.languages.css}},alias:"language-css"}},t.tag))}(Prism)},{}],7:[function(e,n,t){var a,r,i;a=Prism,r=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|null|open|opens|package|private|protected|provides|public|requires|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,i=/\b[A-Z](?:\w*[a-z]\w*)?\b/,a.languages.java=a.languages.extend("clike",{"class-name":[i,/\b[A-Z]\w*(?=\s+\w+\s*[;,=())])/],keyword:r,"function":[a.languages.clike["function"],{pattern:/(\:\:)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),a.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"}}),a.languages.insertBefore("java","class-name",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0},namespace:{pattern:/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)[a-z]\w*(?:\.[a-z]\w*)+/,lookbehind:!0,inside:{punctuation:/\./}},generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":i,keyword:r,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})},{}],8:[function(e,n,t){Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,"function":/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?[.?]?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*[\s\S]*?\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript},{}],9:[function(e,n,t){function b(e,n){return"___"+e.toUpperCase()+n+"___"}var y;y=Prism,Object.defineProperties(y.languages["markup-templating"]={},{buildPlaceholders:{value:function(a,r,e,i){if(a.language===r){var s=a.tokenStack=[];a.code=a.code.replace(e,function(e){if("function"==typeof i&&!i(e))return e;for(var n,t=s.length;-1!==a.code.indexOf(n=b(r,t));)++t;return s[t]=e,n}),a.grammar=y.languages.markup}}},tokenizePlaceholders:{value:function(p,g){if(p.language===g&&p.tokenStack){p.grammar=y.languages[g];var m=0,f=Object.keys(p.tokenStack);!function h(e){for(var n=0;n<e.length&&!(m>=f.length);n++){var t=e[n];if("string"==typeof t||t.content&&"string"==typeof t.content){var a=f[m],r=p.tokenStack[a],i="string"==typeof t?t:t.content,s=b(g,a),o=i.indexOf(s);if(-1<o){++m;var l=i.substring(0,o),u=new y.Token(g,y.tokenize(r,p.grammar),"language-"+g,r),c=i.substring(o+s.length),d=[];l&&d.push.apply(d,h([l])),d.push(u),c&&d.push.apply(d,h([c])),"string"==typeof t?e.splice.apply(e,[n,1].concat(d)):t.content=d}}else t.content&&h(t.content)}return e}(p.tokens)}}}})},{}],10:[function(e,n,t){Prism.languages.markup={comment:/<!--[\s\S]*?-->/,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:(?!<!--)[^"'\]]|"[^"]*"|'[^']*'|<!--[\s\S]*?-->)*\]\s*)?>/i,greedy:!0},cdata:/<!\[CDATA\[[\s\S]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,n){var t={};t["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},t.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:t}};a["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var r={};r[e]={pattern:RegExp(/(<__[\s\S]*?>)(?:<!\[CDATA\[[\s\S]*?\]\]>\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g,e),"i"),lookbehind:!0,greedy:!0,inside:a},Prism.languages.insertBefore("markup","cdata",r)}}),Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup},{}],11:[function(e,n,t){!function(n){n.languages.php=n.languages.extend("clike",{keyword:/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,"boolean":{pattern:/\b(?:false|true)\b/i,alias:"constant"},constant:[/\b[A-Z_][A-Z0-9_]*\b/,/\b(?:null)\b/i],comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),n.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),n.languages.insertBefore("php","comment",{delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"}}),n.languages.insertBefore("php","keyword",{variable:/\$+(?:\w+\b|(?={))/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),n.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}});var e={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/,lookbehind:!0,inside:n.languages.php};n.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:e}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:e}}}),delete n.languages.php.string,n.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){n.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/gi)}}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism)},{}],12:[function(e,n,t){Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|rf|fr)(?:("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|rb|br)?("""|''')[\s\S]+?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^\s*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,"boolean":/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python},{}],13:[function(e,n,t){!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin\s[\s\S]*?^=end/m,greedy:!0}],"class-name":{pattern:/(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby["function"],e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^/])\/(?!\/)(?:\[.+?]|\\.|[^/\\\r\n])+\/[gim]{0,3}(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{"function":/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:n}}],e.languages.rb=e.languages.ruby}(Prism)},{}],14:[function(e,n,t){var a=e("prismjs/components/prism-core");e("prismjs/components/prism-clike"),e("prismjs/components/prism-markup-templating"),e("prismjs/components/prism-c"),e("prismjs/components/prism-cpp"),e("prismjs/components/prism-csharp"),e("prismjs/components/prism-css"),e("prismjs/components/prism-java"),e("prismjs/components/prism-javascript"),e("prismjs/components/prism-markup"),e("prismjs/components/prism-php"),e("prismjs/components/prism-python"),e("prismjs/components/prism-ruby"),n.exports={boltExport:a}},{"prismjs/components/prism-c":1,"prismjs/components/prism-clike":2,"prismjs/components/prism-core":3,"prismjs/components/prism-cpp":4,"prismjs/components/prism-csharp":5,"prismjs/components/prism-css":6,"prismjs/components/prism-java":7,"prismjs/components/prism-javascript":8,"prismjs/components/prism-markup":10,"prismjs/components/prism-markup-templating":9,"prismjs/components/prism-php":11,"prismjs/components/prism-python":12,"prismjs/components/prism-ruby":13}]},{},[14])(14)});var r=window.Prism;window.Prism=e}(undefined,h,b,undefined);var w=b.exports.boltExport,v=function(e){return f.Prism&&e.getParam("codesample_global_prismjs",!1,"boolean")?f.Prism:w},k=function(e){var n=e.selection?e.selection.getNode():null;return g(n)?d.some(n):d.none()},x=function(i){var e,t,n=i.getParam("codesample_languages")||[{text:"HTML/XML",value:"markup"},{text:"JavaScript",value:"javascript"},{text:"CSS",value:"css"},{text:"PHP",value:"php"},{text:"Ruby",value:"ruby"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C",value:"c"},{text:"C#",value:"csharp"},{text:"C++",value:"cpp"}],a=(0===(e=n).length?d.none():d.some(e[0])).fold(function(){return""},function(e){return e.value}),r=(t=a,k(i).fold(function(){return t},function(e){var n=e.className.match(/language-(\w+)/);return n?n[1]:t})),s=k(i).fold(function(){return""},function(e){return e.textContent});i.windowManager.open({title:"Insert/Edit Code Sample",size:"large",body:{type:"panel",items:[{type:"selectbox",name:"language",label:"Language",items:n},{type:"textarea",name:"code",label:"Code view"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{language:r,code:s},onSubmit:function(e){var n,t,a,r=e.getData();n=i,t=r.language,a=r.code,n.undoManager.transact(function(){var e=k(n);return a=p.DOM.encode(a),e.fold(function(){n.insertContent('<pre id="__new" class="language-'+t+'">'+a+"</pre>"),n.selection.select(n.$("#__new").removeAttr("id")[0])},function(e){n.dom.setAttrib(e,"class","language-"+t),e.innerHTML=a,v(n).highlightElement(e),n.selection.select(e)})}),e.close()}})},_=function(a){a.ui.registry.addToggleButton("codesample",{icon:"code-sample",tooltip:"Insert/edit code sample",onAction:function(){return x(a)},onSetup:function(t){var e=function(){var e,n;t.setActive((n=(e=a).selection.getStart(),e.dom.is(n,'pre[class*="language-"]')))};return a.on("NodeChange",e),function(){return a.off("NodeChange",e)}}}),a.ui.registry.addMenuItem("codesample",{text:"Code sample...",icon:"code-sample",onAction:function(){return x(a)}})};!function F(){r.add("codesample",function(n){var t,r,a;r=(t=n).$,t.on("PreProcess",function(e){r("pre[contenteditable=false]",e.node).filter(m(g)).each(function(e,n){var t=r(n),a=n.textContent;t.attr("class",r.trim(t.attr("class"))),t.removeAttr("contentEditable"),t.empty().append(r("<code></code>").each(function(){this.textContent=a}))})}),t.on("SetContent",function(){var e=r("pre").filter(m(g)).filter(function(e,n){return"false"!==n.contentEditable});e.length&&t.undoManager.transact(function(){e.each(function(e,n){r(n).find("br").each(function(e,n){n.parentNode.replaceChild(t.getDoc().createTextNode("\n"),n)}),n.contentEditable="false",n.innerHTML=t.dom.encode(n.textContent),v(t).highlightElement(n),n.className=r.trim(n.className)})})}),_(n),(a=n).addCommand("codesample",function(){var e=a.selection.getNode();a.selection.isCollapsed()||g(e)?x(a):a.formatter.toggle("code")}),n.on("dblclick",function(e){g(e.target)&&x(n)})})}()}(window);
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(o){"use strict";var i=tinymce.util.Tools.resolve("tinymce.PluginManager");!function n(){i.add("colorpicker",function(){o.console.warn("Color picker plugin is now built in to the core editor, please remove it from your editor configuration")})}()}(window);
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(n){"use strict";var o=tinymce.util.Tools.resolve("tinymce.PluginManager");!function e(){o.add("contextmenu",function(){n.console.warn("Context menu plugin is now built in to the core editor, please remove it from your editor configuration")})}()}(window);
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(u){"use strict";var n,t,e,r,o,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=function(n,t){var e,r=n.dom,o=n.selection.getSelectedBlocks();o.length&&(e=r.getAttrib(o[0],"dir"),c.each(o,function(n){r.getParent(n.parentNode,'*[dir="'+t+'"]',r.getRoot())||r.setAttrib(n,"dir",e!==t?t:null)}),n.nodeChanged())},d=function(n){return function(){return n}},f=d(!1),a=d(!0),m=function(){return s},s=(n=function(n){return n.isNone()},{fold:function(n,t){return n()},is:f,isSome:f,isNone:a,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:d(null),getOrUndefined:d(undefined),or:e,orThunk:t,map:m,each:function(){},bind:m,exists:f,forall:a,filter:m,equals:n,equals_:n,toArray:function(){return[]},toString:d("none()")}),g=function(e){var n=d(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:a,isNone:f,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return g(n(e))},each:function(n){n(e)},bind:r,exists:r,forall:r,filter:function(n){return n(e)?o:s},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(f,function(n){return t(e,n)})}};return o},h=function(n){return null===n||n===undefined?s:g(n)},y=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:d(n)}},T={fromHtml:function(n,t){var e=(t||u.document).createElement("div");if(e.innerHTML=n,!e.hasChildNodes()||1<e.childNodes.length)throw u.console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return y(e.childNodes[0])},fromTag:function(n,t){var e=(t||u.document).createElement(n);return y(e)},fromText:function(n,t){var e=(t||u.document).createTextNode(n);return y(e)},fromDom:y,fromPoint:function(n,t,e){var r=n.dom();return h(r.elementFromPoint(t,e)).map(y)}},v=(r="function",function(n){return typeof n===r}),p=("undefined"!=typeof u.window?u.window:Function("return this;")(),o=3,function(n){return n.dom().nodeType===o}),w=function(n,t){var e,r,o=n.dom(),i=u.window.getComputedStyle(o).getPropertyValue(t);return""!==i||(r=p(e=n)?e.dom().parentNode:e.dom())!==undefined&&null!==r&&r.ownerDocument.body.contains(r)?i:N(o,t)},N=function(n,t){return(e=n).style!==undefined&&v(e.style.getPropertyValue)?n.style.getPropertyValue(t):"";var e},O=function(t,r){return function(e){var n=function(n){var t=T.fromDom(n.element);e.setActive(("rtl"===w(t,"direction")?"rtl":"ltr")===r)};return t.on("NodeChange",n),function(){return t.off("NodeChange",n)}}};!function D(){i.add("directionality",function(n){var t,e;(t=n).addCommand("mceDirectionLTR",function(){l(t,"ltr")}),t.addCommand("mceDirectionRTL",function(){l(t,"rtl")}),(e=n).ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr",onAction:function(){return e.execCommand("mceDirectionLTR")},onSetup:O(e,"ltr")}),e.ui.registry.addToggleButton("rtl",{tooltip:"Right to left",icon:"rtl",onAction:function(){return e.execCommand("mceDirectionRTL")},onSetup:O(e,"rtl")})})}()}(window);
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(m){"use strict";var n,t,e,u,o=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(n){return function(){return n}},a=i(!1),c=i(!0),r=function(){return l},l=(n=function(n){return n.isNone()},{fold:function(n,t){return n()},is:a,isSome:a,isNone:c,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:i(null),getOrUndefined:i(undefined),or:e,orThunk:t,map:r,each:function(){},bind:r,exists:a,forall:c,filter:r,equals:n,equals_:n,toArray:function(){return[]},toString:i("none()")}),s=function(e){var n=i(e),t=function(){return r},o=function(n){return n(e)},r={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:c,isNone:a,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return s(n(e))},each:function(n){n(e)},bind:o,exists:o,forall:o,filter:function(n){return n(e)?r:l},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(a,function(n){return t(e,n)})}};return r},g={some:s,none:r,from:function(n){return null===n||n===undefined?l:s(n)}},f=function(n,t){return-1!==n.indexOf(t)},d=function(n,t){return f(n.title.toLowerCase(),t)||function(n,t){for(var e=0,o=n.length;e<o;e++){if(t(n[e],e))return!0}return!1}(n.keywords,function(n){return f(n.toLowerCase(),t)})},y=function(n,t,e){for(var o=[],r=t.toLowerCase(),i=e.fold(function(){return a},function(t){return function(n){return t<=n}}),u=0;u<n.length&&(0!==t.length&&!d(n[u],r)||(o.push({value:n[u]["char"],text:n[u].title,icon:n[u]["char"]}),!i(o.length)));u++);return o},h=function(n){var t=n;return{get:function(){return t},set:function(n){t=n}}},v=function(){return(v=Object.assign||function(n){for(var t,e=1,o=arguments.length;e<o;e++)for(var r in t=arguments[e])Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}).apply(this,arguments)},p=Object.prototype.hasOwnProperty,b=(u=function(n,t){return t},function(){for(var n=new Array(arguments.length),t=0;t<n.length;t++)n[t]=arguments[t];if(0===n.length)throw new Error("Can't merge zero objects");for(var e={},o=0;o<n.length;o++){var r=n[o];for(var i in r)p.call(r,i)&&(e[i]=u(e[i],r[i]))}return e}),w=Object.keys,O=Object.hasOwnProperty,C=function(n,t){for(var e=w(n),o=0,r=e.length;o<r;o++){var i=e[o];t(n[i],i)}},k=function(n,o){var r={};return C(n,function(n,t){var e=o(n,t);r[e.k]=e.v}),r},j=tinymce.util.Tools.resolve("tinymce.Resource"),A=tinymce.util.Tools.resolve("tinymce.util.Delay"),T=tinymce.util.Tools.resolve("tinymce.util.Promise"),_="All",D={symbols:"Symbols",people:"People",animals_and_nature:"Animals and Nature",food_and_drink:"Food and Drink",activity:"Activity",travel_and_places:"Travel and Places",objects:"Objects",flags:"Flags",user:"User Defined"},P=function(n,t){return e=n,o=t,O.call(e,o)?n[t]:t;var e,o},x=function(n){var e,t=n.getParam("emoticons_append",{},"object");return e=function(n){return v({keywords:[],category:"user"},n)},k(t,function(n,t){return{k:t,v:e(n,t)}})},L=function(o,r,n){var u=h(g.none()),a=h(g.none());o.on("init",function(){j.load(n,r).then(function(n){var t,r,i,e=x(o);t=b(n,e),r={},i=[],C(t,function(n,t){var e={title:t,keywords:n.keywords,"char":n["char"],category:P(D,n.category)},o=r[e.category]!==undefined?r[e.category]:[];r[e.category]=o.concat([e]),i.push(e)}),u.set(g.some(r)),a.set(g.some(i))},function(n){m.console.log("Failed to load emoticons: "+n),u.set(g.some({})),a.set(g.some([]))})});var e=function(){return a.get().getOr([])},i=function(){return u.get().isSome()&&a.get().isSome()};return{listCategories:function(){return[_].concat(w(u.get().getOr({})))},hasLoaded:i,waitForLoad:function(){return i()?T.resolve(!0):new T(function(n,t){var e=15,o=A.setInterval(function(){i()?(A.clearInterval(o),n(!0)):--e<0&&(m.console.log("Could not load emojis from url: "+r),A.clearInterval(o),t(!1))},100)})},listAll:e,listCategory:function(t){return t===_?e():u.get().bind(function(n){return g.from(n[t])}).getOr([])}}},S="pattern",N=function(r,u){var e,o,i,n={pattern:"",results:y(u.listAll(),"",g.some(300))},a=h(_),c=(e=function(n){var t,e,o,r,i;e=(t=n).getData(),o=a.get(),r=u.listCategory(o),i=y(r,e[S],o===_?g.some(300):g.none()),t.setData({results:i})},o=200,i=null,{cancel:function(){null!==i&&(m.clearTimeout(i),i=null)},throttle:function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];null!==i&&m.clearTimeout(i),i=m.setTimeout(function(){e.apply(null,n),i=null},o)}}),t={label:"Search",type:"input",name:S},l={type:"collection",name:"results"},s=function(){return{title:"Emoticons",size:"normal",body:{type:"tabpanel",tabs:function(n,t){for(var e=n.length,o=new Array(e),r=0;r<e;r++){var i=n[r];o[r]=t(i,r)}return o}(u.listCategories(),function(n){return{title:n,name:n,items:[t,l]}})},initialData:n,onTabChange:function(n,t){a.set(t.newTabName),c.throttle(n)},onChange:c.throttle,onAction:function(n,t){var e,o;"results"===t.name&&(e=r,o=t.value,e.insertContent(o),n.close())},buttons:[{type:"cancel",text:"Close",primary:!0}]}},f=r.windowManager.open(s());f.focus(S),u.hasLoaded()||(f.block("Loading emoticons..."),u.waitForLoad().then(function(){f.redial(s()),c.throttle(f),f.focus(S),f.unblock()})["catch"](function(n){f.redial({title:"Emoticons",body:{type:"panel",items:[{type:"alertbanner",level:"error",icon:"warning",text:"<p>Could not load emoticons</p>"}]},buttons:[{type:"cancel",text:"Close",primary:!0}],initialData:{pattern:"",results:[]}}),f.focus(S),f.unblock()}))};!function E(){o.add("emoticons",function(n,t){var e,o,r,i,u,a,c,l=(o=t,(e=n).getParam("emoticons_database_url",o+"/js/emojis"+e.suffix+".js")),s=n.getParam("emoticons_database_id","tinymce.plugins.emoticons","string"),f=L(n,l,s);i=f,u=function(){return N(r,i)},(r=n).ui.registry.addButton("emoticons",{tooltip:"Emoticons",icon:"emoji",onAction:u}),r.ui.registry.addMenuItem("emoticons",{text:"Emoticons...",icon:"emoji",onAction:u}),c=f,(a=n).ui.registry.addAutocompleter("emoticons",{ch:":",columns:"auto",minChars:2,fetch:function(t,e){return c.waitForLoad().then(function(){var n=c.listAll();return y(n,t,g.some(e))})},onAction:function(n,t,e){a.selection.setRng(t),a.insertContent(e),n.hide()}})})}()}(window);
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(p){"use strict";var s=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(){return(u=Object.assign||function(e){for(var t,n=1,l=arguments.length;n<l;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},y=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=tinymce.util.Tools.resolve("tinymce.html.DomParser"),m=tinymce.util.Tools.resolve("tinymce.html.Node"),f=tinymce.util.Tools.resolve("tinymce.html.Serializer"),h=function(e){return e.getParam("fullpage_hide_in_source_view")},o=function(e){return e.getParam("fullpage_default_encoding")},g=function(e){return e.getParam("fullpage_default_font_family")},v=function(e){return e.getParam("fullpage_default_font_size")},_=function(e){return t({validate:!1,root_name:"#document"}).parse(e,{format:"xhtml"})},d=function(l,i){var e,t,n,o,r,a,c=(e=l,t=i.get(),r=_(t),(a={}).fontface=g(e),a.fontsize=v(e),7===(n=r.firstChild).type&&(a.xml_pi=!0,(o=/encoding="([^"]+)"/.exec(n.value))&&(a.docencoding=o[1])),(n=r.getAll("#doctype")[0])&&(a.doctype="<!DOCTYPE"+n.value+">"),(n=r.getAll("title")[0])&&n.firstChild&&(a.title=n.firstChild.value),y.each(r.getAll("meta"),function(e){var t,n=e.attr("name"),l=e.attr("http-equiv");n?a[n.toLowerCase()]=e.attr("content"):"Content-Type"===l&&(t=/charset\s*=\s*(.*)\s*/gi.exec(e.attr("content")))&&(a.docencoding=t[1])}),(n=r.getAll("html")[0])&&(a.langcode=s(n,"lang")||s(n,"xml:lang")),a.stylesheets=[],y.each(r.getAll("link"),function(e){"stylesheet"===e.attr("rel")&&a.stylesheets.push(e.attr("href"))}),(n=r.getAll("body")[0])&&(a.langdir=s(n,"dir"),a.style=s(n,"style"),a.visited_color=s(n,"vlink"),a.link_color=s(n,"link"),a.active_color=s(n,"alink")),a);function s(e,t){return e.attr(t)||""}var d=u(u({},{title:"",keywords:"",description:"",robots:"",author:"",docencoding:""}),c);l.windowManager.open({title:"Metadata and Document Properties",size:"normal",body:{type:"panel",items:[{name:"title",type:"input",label:"Title"},{name:"keywords",type:"input",label:"Keywords"},{name:"description",type:"input",label:"Description"},{name:"robots",type:"input",label:"Robots"},{name:"author",type:"input",label:"Author"},{name:"docencoding",type:"input",label:"Encoding"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:d,onSubmit:function(e){var t=e.getData(),n=function(e,o,t){var r,n,l,a,i,c=e.dom;function s(e,t,n){e.attr(t,n||undefined)}function d(e){n.firstChild?n.insert(e,n.firstChild):n.append(e)}r=_(t),(n=r.getAll("head")[0])||(a=r.getAll("html")[0],n=new m("head",1),a.firstChild?a.insert(n,a.firstChild,!0):a.append(n)),a=r.firstChild,o.xml_pi?(i='version="1.0"',o.docencoding&&(i+=' encoding="'+o.docencoding+'"'),7!==a.type&&(a=new m("xml",7),r.insert(a,r.firstChild,!0)),a.value=i):a&&7===a.type&&a.remove(),a=r.getAll("#doctype")[0],o.doctype?(a||(a=new m("#doctype",10),o.xml_pi?r.insert(a,r.firstChild):d(a)),a.value=o.doctype.substring(9,o.doctype.length-1)):a&&a.remove(),a=null,y.each(r.getAll("meta"),function(e){"Content-Type"===e.attr("http-equiv")&&(a=e)}),o.docencoding?(a||((a=new m("meta",1)).attr("http-equiv","Content-Type"),a.shortEnded=!0,d(a)),a.attr("content","text/html; charset="+o.docencoding)):a&&a.remove(),a=r.getAll("title")[0],o.title?(a?a.empty():d(a=new m("title",1)),a.append(new m("#text",3)).value=o.title):a&&a.remove(),y.each("keywords,description,author,copyright,robots".split(","),function(e){var t,n,l=r.getAll("meta"),i=o[e];for(t=0;t<l.length;t++)if((n=l[t]).attr("name")===e)return void(i?n.attr("content",i):n.remove());i&&((a=new m("meta",1)).attr("name",e),a.attr("content",i),a.shortEnded=!0,d(a))});var u={};return y.each(r.getAll("link"),function(e){"stylesheet"===e.attr("rel")&&(u[e.attr("href")]=e)}),y.each(o.stylesheets,function(e){u[e]||((a=new m("link",1)).attr({rel:"stylesheet",text:"text/css",href:e}),a.shortEnded=!0,d(a)),delete u[e]}),y.each(u,function(e){e.remove()}),(a=r.getAll("body")[0])&&(s(a,"dir",o.langdir),s(a,"style",o.style),s(a,"vlink",o.visited_color),s(a,"link",o.link_color),s(a,"alink",o.active_color),c.setAttribs(e.getBody(),{style:o.style,dir:o.dir,vLink:o.visited_color,link:o.link_color,aLink:o.active_color})),(a=r.getAll("html")[0])&&(s(a,"lang",o.langcode),s(a,"xml:lang",o.langcode)),n.firstChild||n.remove(),(l=f({validate:!1,indent:!0,indent_before:"head,html,body,meta,title,script,link,style",indent_after:"head,html,body,meta,title,script,link,style"}).serialize(r)).substring(0,l.indexOf("</body>"))}(l,y.extend(c,t),i.get());i.set(n),e.close()}})},b=y.each,x=function(e){return e.replace(/<\/?[A-Z]+/g,function(e){return e.toLowerCase()})},k=function(e,t,n,l){var i,o,r,a,c,s,d="",u=e.dom;if(!l.selection&&(c=e.settings.protect,s=l.content,y.each(c,function(e){s=s.replace(e,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})}),r=s,!("raw"===l.format&&t.get()||l.source_view&&h(e)))){0!==r.length||l.source_view||(r=y.trim(t.get())+"\n"+y.trim(r)+"\n"+y.trim(n.get())),-1!==(i=(r=r.replace(/<(\/?)BODY/gi,"<$1body")).indexOf("<body"))?(i=r.indexOf(">",i),t.set(x(r.substring(0,i+1))),-1===(o=r.indexOf("</body",i))&&(o=r.length),l.content=y.trim(r.substring(i+1,o)),n.set(x(r.substring(o)))):(t.set(C(e)),n.set("\n</body>\n</html>")),a=_(t.get()),b(a.getAll("style"),function(e){e.firstChild&&(d+=e.firstChild.value)});var m=a.getAll("body")[0];m&&u.setAttribs(e.getBody(),{style:m.attr("style")||"",dir:m.attr("dir")||"",vLink:m.attr("vlink")||"",link:m.attr("link")||"",aLink:m.attr("alink")||""}),u.remove("fullpage_styles");var f=e.getDoc().getElementsByTagName("head")[0];if(d)u.add(f,"style",{id:"fullpage_styles"}).appendChild(p.document.createTextNode(d));var g={};y.each(f.getElementsByTagName("link"),function(e){"stylesheet"===e.rel&&e.getAttribute("data-mce-fullpage")&&(g[e.href]=e)}),y.each(a.getAll("link"),function(e){var t=e.attr("href");if(!t)return!0;g[t]||"stylesheet"!==e.attr("rel")||u.add(f,"link",{rel:"stylesheet",text:"text/css",href:t,"data-mce-fullpage":"1"}),delete g[t]}),y.each(g,function(e){e.parentNode.removeChild(e)})}},C=function(e){var t,n="",l="";if(e.getParam("fullpage_default_xml_pi")){var i=o(e);n+='<?xml version="1.0" encoding="'+(i||"ISO-8859-1")+'" ?>\n'}return n+=e.getParam("fullpage_default_doctype","<!DOCTYPE html>"),n+="\n<html>\n<head>\n",(t=e.getParam("fullpage_default_title"))&&(n+="<title>"+t+"</title>\n"),(t=o(e))&&(n+='<meta http-equiv="Content-Type" content="text/html; charset='+t+'" />\n'),(t=g(e))&&(l+="font-family: "+t+";"),(t=v(e))&&(l+="font-size: "+t+";"),(t=e.getParam("fullpage_default_text_color"))&&(l+="color: "+t+";"),n+="</head>\n<body"+(l?' style="'+l+'"':"")+">\n"},A=function(e,t,n,l){l.selection||l.source_view&&h(e)||(l.content=(y.trim(t)+"\n"+y.trim(l.content)+"\n"+y.trim(n)).replace(/<!--mce:protected ([\s\S]*?)-->/g,function(e,t){return unescape(t)}))};!function n(){e.add("fullpage",function(e){var t,n,l,i,o,r,a=s(""),c=s("");n=a,(t=e).addCommand("mceFullPageProperties",function(){d(t,n)}),(l=e).ui.registry.addButton("fullpage",{tooltip:"Metadata and document properties",icon:"document-properties",onAction:function(){l.execCommand("mceFullPageProperties")}}),l.ui.registry.addMenuItem("fullpage",{text:"Metadata and document properties",icon:"document-properties",onAction:function(){l.execCommand("mceFullPageProperties")}}),o=a,r=c,(i=e).on("BeforeSetContent",function(e){k(i,o,r,e)}),i.on("GetContent",function(e){A(i,o.get(),r.get(),e)})})}()}(window);
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(g){"use strict";var n,t,e,r,c=function(n){var t=n;return{get:function(){return t},set:function(n){t=n}}},o=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(n){return{isFullscreen:function(){return null!==n.get()}}},i=function(){},a=function(n){return function(){return n}},l=a(!1),f=a(!0),d=function(){return s},s=(n=function(n){return n.isNone()},{fold:function(n,t){return n()},is:l,isSome:l,isNone:f,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:a(null),getOrUndefined:a(undefined),or:e,orThunk:t,map:d,each:i,bind:d,exists:l,forall:f,filter:d,equals:n,equals_:n,toArray:function(){return[]},toString:a("none()")}),m=function(e){var n=a(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:f,isNone:l,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return m(n(e))},each:function(n){n(e)},bind:r,exists:r,forall:r,filter:function(n){return n(e)?o:s},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(l,function(n){return t(e,n)})}};return o},h={some:m,none:d,from:function(n){return null===n||n===undefined?s:m(n)}},p=function(){return n=function(n){n.unbind()},t=c(h.none()),e=function(){t.get().each(n)},{clear:function(){e(),t.set(h.none())},isSet:function(){return t.get().isSome()},set:function(n){e(),t.set(h.some(n))}};var n,t,e},v=function(r){return function(n){return e=typeof(t=n),(null===t?"null":"object"==e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e)===r;var t,e}},y=function(t){return function(n){return typeof n===t}},w=v("string"),b=v("array"),S=y("boolean"),T=y("function"),x=y("number"),C=Array.prototype.push,A=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)}return r},E=function(n,t){for(var e=0,r=n.length;e<r;e++){t(n[e],e)}},O=function(n,t){for(var e=[],r=0,o=n.length;r<o;r++){var i=n[r];t(i,r)&&e.push(i)}return e},D=function(n,t){return function(n){for(var t=[],e=0,r=n.length;e<r;++e){if(!b(n[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+n);C.apply(t,n[e])}return t}(A(n,t))},M=Object.keys,N=function(n){return n.style!==undefined&&T(n.style.getPropertyValue)},k=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:a(n)}},F={fromHtml:function(n,t){var e=(t||g.document).createElement("div");if(e.innerHTML=n,!e.hasChildNodes()||1<e.childNodes.length)throw g.console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return k(e.childNodes[0])},fromTag:function(n,t){var e=(t||g.document).createElement(n);return k(e)},fromText:function(n,t){var e=(t||g.document).createTextNode(n);return k(e)},fromDom:k,fromPoint:function(n,t,e){var r=n.dom();return h.from(r.elementFromPoint(t,e)).map(k)}},P=("undefined"!=typeof g.window?g.window:Function("return this;")(),r=3,function(n){return n.dom().nodeType===r}),L=function(n,t,e){!function(n,t,e){if(!(w(e)||S(e)||x(e)))throw g.console.error("Invalid call to Attr.set. Key ",t,":: Value ",e,":: Element ",n),new Error("Attribute value was not simple");n.setAttribute(t,e+"")}(n.dom(),t,e)},H=function(n,t){var e=n.dom().getAttribute(t);return null===e?undefined:e},q=function(n,t){n.dom().removeAttribute(t)},V=function(n,t){var e=n.dom();!function(n,t){for(var e=M(n),r=0,o=e.length;r<o;r++){var i=e[r];t(n[i],i)}}(t,function(n,t){!function(n,t,e){if(!w(e))throw g.console.error("Invalid call to CSS.set. Property ",t,":: Value ",e,":: Element ",n),new Error("CSS value must be a string: "+e);N(n)&&n.style.setProperty(t,e)}(e,t,n)})},W=function(n,t){var e,r,o=n.dom(),i=g.window.getComputedStyle(o).getPropertyValue(t);return""!==i||(r=P(e=n)?e.dom().parentNode:e.dom())!==undefined&&null!==r&&r.ownerDocument.body.contains(r)?i:j(o,t)},j=function(n,t){return N(n)?n.style.getPropertyValue(t):""},z=function(n){var e,r,t,o,i,u=F.fromDom(n.target),c=function(){return n.stopPropagation()},l=function(){return n.preventDefault()},f=(e=l,r=c,function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return e(r.apply(null,n))});return t=u,o=n.clientX,i=n.clientY,{target:a(t),x:a(o),y:a(i),stop:c,prevent:l,kill:f,raw:a(n)}},B=function(n,t){var e=n.dom();if(1!==e.nodeType)return!1;var r=e;if(r.matches!==undefined)return r.matches(t);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(t);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(t);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},I=function(e){var n;return n=e,h.from(n.dom().parentNode).map(F.fromDom).map(U).map(function(n){return O(n,function(n){return t=n,e.dom()!==t.dom();var t})}).getOr([])},U=function(n){return A(n.dom().childNodes,F.fromDom)},_=function(e,r){return{left:a(e),top:a(r),translate:function(n,t){return _(e+n,r+t)}}},K=_,X=function(n){var t=n===undefined?g.window:n;return h.from(t.visualViewport)},Y=function(n,t,e,r){return{x:n,y:t,width:e,height:r,right:n+e,bottom:t+r}},G=function(n){var t,e,r,o,i=n===undefined?g.window:n,u=i.document,c=(t=F.fromDom(u),e=t!==undefined?t.dom():g.document,r=e.body.scrollLeft||e.documentElement.scrollLeft,o=e.body.scrollTop||e.documentElement.scrollTop,K(r,o));return X(i).fold(function(){var n=i.document.documentElement,t=n.clientWidth,e=n.clientHeight;return Y(c.left(),c.top(),t,e)},function(n){return Y(Math.max(n.pageLeft,c.left()),Math.max(n.pageTop,c.top()),n.width,n.height)})},J=function(e,n,t){return X(t).map(function(n){var t=function(n){return z(n)};return n.addEventListener(e,t),{unbind:function(){return n.removeEventListener(e,t)}}}).getOrThunk(function(){return{unbind:i}})},Q=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),R=tinymce.util.Tools.resolve("tinymce.Env"),Z=tinymce.util.Tools.resolve("tinymce.util.Delay"),$=function(n,t){n.fire("FullscreenStateChanged",{state:t})},nn=function(n,t,e){return O(function(n,t){for(var e=T(t)?t:l,r=n.dom(),o=[];null!==r.parentNode&&r.parentNode!==undefined;){var i=r.parentNode,u=F.fromDom(i);if(o.push(u),!0===e(u))break;r=i}return o}(n,e),t)},tn=function(n){return t=n,o=e===undefined?g.document:e.dom(),1!==(r=o).nodeType&&9!==r.nodeType||0===r.childElementCount?[]:A(o.querySelectorAll(t),F.fromDom);var t,e,r,o},en=function(n,t){return e=function(n){return B(n,t)},O(I(n),e);var e},rn="data-ephox-mobile-fullscreen-style",on="position:absolute!important;",un="top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;",cn=R.os.isAndroid(),ln=function(o,n,t){var e,r,i,u=function(r){return function(n){var t=H(n,"style"),e=t===undefined?"no-styles":t.trim();e!==r&&(L(n,rn,e),V(n,o.parseStyle(r)))}},c=(e="*",nn(n,function(n){return B(n,e)},r)),l=D(c,function(n){return en(n,"*:not(.tox-silver-sink)")}),f=(i=W(t,"background-color"))!==undefined&&""!==i?"background-color:"+i+"!important":"background-color:rgb(255,255,255)!important;";E(l,u("display:none!important;")),E(c,u(on+un+f)),u((!0===cn?"":on)+un+f)(n)},fn=Q.DOM,an=X().fold(function(){return{bind:i,unbind:i}},function(t){var e,r=(e=c(h.none()),{clear:function(){e.set(h.none())},set:function(n){e.set(h.some(n))},isSet:function(){return e.get().isSome()},on:function(n){e.get().each(n)}}),o=p(),i=p(),u=Z.throttle(function(){g.document.body.scrollTop=0,g.document.documentElement.scrollTop=0,g.window.requestAnimationFrame(function(){r.on(function(n){return V(n,{top:t.offsetTop+"px",left:t.offsetLeft+"px",height:t.height+"px",width:t.width+"px"})})})},50);return{bind:function(n){r.set(n),u(),o.set(J("resize")),i.set(J("scroll"))},unbind:function(){r.on(function(){o.clear(),i.clear()}),r.clear()}}}),dn=function(n,t){var e,r,o,i=g.document.body,u=g.document.documentElement;r=n.getContainer();var c,l,f,a,d=F.fromDom(r),s=t.get(),m=F.fromDom(n.getBody()),h=R.deviceType.isTouch();if(e=r.style,o=n.getContentAreaContainer().firstChild.style,s)o.width=s.iframeWidth,o.height=s.iframeHeight,e.width=s.containerWidth,e.height=s.containerHeight,e.top=s.containerTop,e.left=s.containerLeft,h&&(l=n.dom,f=tn("["+rn+"]"),E(f,function(n){var t=H(n,rn);"no-styles"!==t?V(n,l.parseStyle(t)):q(n,"style"),q(n,rn)})),fn.removeClass(i,"tox-fullscreen"),fn.removeClass(u,"tox-fullscreen"),fn.removeClass(r,"tox-fullscreen"),c=s.scrollPos,g.window.scrollTo(c.x,c.y),t.set(null),$(n,!1),an.unbind(),n.off("remove",an.unbind);else{var p={scrollPos:{x:(a=G(g.window)).x,y:a.y},containerWidth:e.width,containerHeight:e.height,containerTop:e.top,containerLeft:e.left,iframeWidth:o.width,iframeHeight:o.height};h&&ln(n.dom,d,m),o.width=o.height="100%",e.width=e.height="",fn.addClass(i,"tox-fullscreen"),fn.addClass(u,"tox-fullscreen"),fn.addClass(r,"tox-fullscreen"),an.bind(d),n.on("remove",an.unbind),t.set(p),$(n,!0)}},sn=function(e,r){return function(t){t.setActive(null!==r.get());var n=function(n){return t.setActive(n.state)};return e.on("FullscreenStateChanged",n),function(){return e.off("FullscreenStateChanged",n)}}};!function mn(){o.add("fullscreen",function(n){var t,e,r,o,i=c(null);return n.settings.inline||(e=i,(t=n).addCommand("mceFullScreen",function(){dn(t,e)}),o=i,(r=n).ui.registry.addToggleMenuItem("fullscreen",{text:"Fullscreen",icon:"fullscreen",shortcut:"Meta+Shift+F",onAction:function(){return r.execCommand("mceFullScreen")},onSetup:sn(r,o)}),r.ui.registry.addToggleButton("fullscreen",{tooltip:"Fullscreen",icon:"fullscreen",onAction:function(){return r.execCommand("mceFullScreen")},onSetup:sn(r,o)}),n.addShortcut("Meta+Shift+F","","mceFullScreen")),u(i)})}()}(window);
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(){"use strict";var e,t,n,a=tinymce.util.Tools.resolve("tinymce.PluginManager"),m=function(){return(m=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},i=function(e){return function(){return e}},r=i(!1),s=i(!0),o=function(){return c},c=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:r,isSome:r,isNone:s,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(undefined),or:n,orThunk:t,map:o,each:function(){},bind:o,exists:r,forall:s,filter:o,equals:e,equals_:e,toArray:function(){return[]},toString:i("none()")}),l=function(n){var e=i(n),t=function(){return o},a=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:s,isNone:r,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return l(e(n))},each:function(e){e(n)},bind:a,exists:a,forall:a,filter:function(e){return e(n)?o:c},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(r,function(e){return t(n,e)})}};return o},d={some:l,none:o,from:function(e){return null===e||e===undefined?c:l(e)}},u=Array.prototype.indexOf,h=function(e,t){return n=e,a=t,-1<u.call(n,a);var n,a},p=function(e,t){for(var n=e.length,a=new Array(n),o=0;o<n;o++){var i=e[o];a[o]=t(i,o)}return a},g=function(e,t){return function(e,t,n){for(var a=0,o=e.length;a<o;a++){var i=e[a];if(t(i,a))return d.some(i);if(n(i,a))break}return d.none()}(e,t,r)},f=Object.keys,b=Object.hasOwnProperty,y=function(e,t){return b.call(e,t)},k=[{shortcuts:["Meta + B"],action:"Bold"},{shortcuts:["Meta + I"],action:"Italic"},{shortcuts:["Meta + U"],action:"Underline"},{shortcuts:["Meta + A"],action:"Select all"},{shortcuts:["Meta + Y","Meta + Shift + Z"],action:"Redo"},{shortcuts:["Meta + Z"],action:"Undo"},{shortcuts:["Access + 1"],action:"Header 1"},{shortcuts:["Access + 2"],action:"Header 2"},{shortcuts:["Access + 3"],action:"Header 3"},{shortcuts:["Access + 4"],action:"Header 4"},{shortcuts:["Access + 5"],action:"Header 5"},{shortcuts:["Access + 6"],action:"Header 6"},{shortcuts:["Access + 7"],action:"Paragraph"},{shortcuts:["Access + 8"],action:"Div"},{shortcuts:["Access + 9"],action:"Address"},{shortcuts:["Alt + 0"],action:"Open help dialog"},{shortcuts:["Alt + F9"],action:"Focus to menubar"},{shortcuts:["Alt + F10"],action:"Focus to toolbar"},{shortcuts:["Alt + F11"],action:"Focus to element path"},{shortcuts:["Ctrl + F9"],action:"Focus to contextual toolbar"},{shortcuts:["Shift + Enter"],action:"Open popup menu for split buttons"},{shortcuts:["Meta + K"],action:"Insert link (if link plugin activated)"},{shortcuts:["Meta + S"],action:"Save (if save plugin activated)"},{shortcuts:["Meta + F"],action:"Find (if searchreplace plugin activated)"},{shortcuts:["Meta + Shift + F"],action:"Switch to or from fullscreen mode"}],v=tinymce.util.Tools.resolve("tinymce.Env"),w=function(e){var n=v.mac?{alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"}:{meta:"Ctrl ",access:"Shift + Alt "},t=e.split("+"),a=p(t,function(e){var t=e.toLowerCase().trim();return y(n,t)?n[t]:e});return v.mac?a.join("").replace(/\s/,""):a.join("+")},A=tinymce.util.Tools.resolve("tinymce.util.I18n"),C=[{key:"advlist",name:"Advanced List"},{key:"anchor",name:"Anchor"},{key:"autolink",name:"Autolink"},{key:"autoresize",name:"Autoresize"},{key:"autosave",name:"Autosave"},{key:"bbcode",name:"BBCode"},{key:"charmap",name:"Character Map"},{key:"code",name:"Code"},{key:"codesample",name:"Code Sample"},{key:"colorpicker",name:"Color Picker"},{key:"directionality",name:"Directionality"},{key:"emoticons",name:"Emoticons"},{key:"fullpage",name:"Full Page"},{key:"fullscreen",name:"Full Screen"},{key:"help",name:"Help"},{key:"hr",name:"Horizontal Rule"},{key:"image",name:"Image"},{key:"imagetools",name:"Image Tools"},{key:"importcss",name:"Import CSS"},{key:"insertdatetime",name:"Insert Date/Time"},{key:"legacyoutput",name:"Legacy Output"},{key:"link",name:"Link"},{key:"lists",name:"Lists"},{key:"media",name:"Media"},{key:"nonbreaking",name:"Nonbreaking"},{key:"noneditable",name:"Noneditable"},{key:"pagebreak",name:"Page Break"},{key:"paste",name:"Paste"},{key:"preview",name:"Preview"},{key:"print",name:"Print"},{key:"save",name:"Save"},{key:"searchreplace",name:"Search and Replace"},{key:"spellchecker",name:"Spell Checker"},{key:"tabfocus",name:"Tab Focus"},{key:"table",name:"Table"},{key:"template",name:"Template"},{key:"textcolor",name:"Text Color"},{key:"textpattern",name:"Text Pattern"},{key:"toc",name:"Table of Contents"},{key:"visualblocks",name:"Visual Blocks"},{key:"visualchars",name:"Visual Characters"},{key:"wordcount",name:"Word Count"},{key:"advcode",name:"Advanced Code Editor*"},{key:"formatpainter",name:"Format Painter*"},{key:"powerpaste",name:"PowerPaste*"},{key:"tinydrive",name:"Tiny Drive*"},{key:"tinymcespellchecker",name:"Spell Checker Pro*"},{key:"a11ychecker",name:"Accessibility Checker*"},{key:"linkchecker",name:"Link Checker*"},{key:"mentions",name:"Mentions*"},{key:"mediaembed",name:"Enhanced Media Embed*"},{key:"checklist",name:"Checklist*"},{key:"casechange",name:"Case Change*"},{key:"permanentpen",name:"Permanent Pen*"},{key:"pageembed",name:"Page Embed*"},{key:"tinycomments",name:"Tiny Comments*"},{key:"advtable",name:"Advanced Tables*"},{key:"autocorrect",name:"Autocorrect*"}],T=function(e){var t,n,s=function(e){return'<a href="'+e.url+'" target="_blank" rel="noopener">'+e.name+"</a>"};return{name:"plugins",title:"Plugins",items:[{type:"htmlpanel",presets:"document",html:[null==(n=e)?"":'<div data-mce-tabstop="1" tabindex="-1">'+function(a){var t,e,n=(e=f((t=a).plugins),t.settings.forced_plugins===undefined?e:function(e,t){for(var n=[],a=0,o=e.length;a<o;a++){var i=e[a];t(i,a)&&n.push(i)}return n}(e,function(e){return!h(t.settings.forced_plugins,e)})),o=p(n,function(e){return"<li>"+(t=a,n=e,g(C,function(e){return e.key===n}).fold(function(){var e=t.plugins[n].getMetadata;return"function"==typeof e?s(e()):n},function(e){return s({name:e.name,url:"https://www.tiny.cloud/docs/plugins/"+e.key})}))+"</li>";var t,n}),i=o.length,r=o.join("");return"<p><b>"+A.translate(["Plugins installed ({0}):",i])+"</b></p><ul>"+r+"</ul>"}(n)+"</div>",(t=p(["Accessibility Checker","Advanced Code Editor","Advanced Tables","Case Change","Checklist","Tiny Comments","Tiny Drive","Enhanced Media Embed","Format Painter","Link Checker","Mentions","MoxieManager","Page Embed","Permanent Pen","PowerPaste","Spell Checker Pro"],function(e){return"<li>"+A.translate(e)+"</li>"}).join(""),'<div data-mce-tabstop="1" tabindex="-1"><p><b>'+A.translate("Premium plugins:")+"</b></p><ul>"+t+'<li class="tox-help__more-link" "><a href="https://www.tiny.cloud/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">'+A.translate("Learn more...")+"</a></li></ul></div>")].join("")}]}},x=tinymce.util.Tools.resolve("tinymce.EditorManager"),M=function(e,t){var n,a,o,i,r,s={name:"shortcuts",title:"Handy Shortcuts",items:[{type:"table",header:["Action","Shortcut"],cells:p(k,function(e){var t=p(e.shortcuts,w).join(" or ");return[e.action,t]})}]},c={name:"keyboardnav",title:"Keyboard Navigation",items:[{type:"htmlpanel",presets:"document",html:"<h1>Editor UI keyboard navigation</h1>\n\n<h2>Activating keyboard navigation</h2>\n\n<p>The sections of the outer UI of the editor - the menubar, toolbar, sidebar and footer - are all keyboard navigable. As such, there are multiple ways to activate keyboard navigation:</p>\n<ul>\n <li>Focus the menubar: Alt + F9 (Windows) or &#x2325;F9 (MacOS)</li>\n <li>Focus the toolbar: Alt + F10 (Windows) or &#x2325;F10 (MacOS)</li>\n <li>Focus the footer: Alt + F11 (Windows) or &#x2325;F11 (MacOS)</li>\n</ul>\n\n<p>Focusing the menubar or toolbar will start keyboard navigation at the first item in the menubar or toolbar, which will be highlighted with a gray background. Focusing the footer will start keyboard navigation at the first item in the element path, which will be highlighted with an underline. </p>\n\n<h2>Moving between UI sections</h2>\n\n<p>When keyboard navigation is active, pressing tab will move the focus to the next major section of the UI, where applicable. These sections are:</p>\n<ul>\n <li>the menubar</li>\n <li>each group of the toolbar </li>\n <li>the sidebar</li>\n <li>the element path in the footer </li>\n <li>the wordcount toggle button in the footer </li>\n <li>the branding link in the footer </li>\n</ul>\n\n<p>Pressing shift + tab will move backwards through the same sections, except when moving from the footer to the toolbar. Focusing the element path then pressing shift + tab will move focus to the first toolbar group, not the last.</p>\n\n<h2>Moving within UI sections</h2>\n\n<p>Keyboard navigation within UI sections can usually be achieved using the left and right arrow keys. This includes:</p>\n<ul>\n <li>moving between menus in the menubar</li>\n <li>moving between buttons in a toolbar group</li>\n <li>moving between items in the element path</li>\n</ul>\n\n<p>In all these UI sections, keyboard navigation will cycle within the section. For example, focusing the last button in a toolbar group then pressing right arrow will move focus to the first item in the same toolbar group. </p>\n\n<h1>Executing buttons</h1>\n\n<p>To execute a button, navigate the selection to the desired button and hit space or enter.</p>\n\n<h1>Opening, navigating and closing menus</h1>\n\n<p>When focusing a menubar button or a toolbar button with a menu, pressing space, enter or down arrow will open the menu. When the menu opens the first item will be selected. To move up or down the menu, press the up or down arrow key respectively. This is the same for submenus, which can also be opened and closed using the left and right arrow keys.</p>\n\n<p>To close any active menu, hit the escape key. When a menu is closed the selection will be restored to its previous selection. This also works for closing submenus.</p>\n\n<h1>Context toolbars and menus</h1>\n\n<p>To focus an open context toolbar such as the table context toolbar, press Ctrl + F9 (Windows) or &#x2303;F9 (MacOS).</p>\n\n<p>Context toolbar navigation is the same as toolbar navigation, and context menu navigation is the same as standard menu navigation.</p>\n\n<h1>Dialog navigation</h1>\n\n<p>There are two types of dialog UIs in TinyMCE: tabbed dialogs and non-tabbed dialogs.</p>\n\n<p>When a non-tabbed dialog is opened, the first interactive component in the dialog will be focused. Users can navigate between interactive components by pressing tab. This includes any footer buttons. Navigation will cycle back to the first dialog component if tab is pressed while focusing the last component in the dialog. Pressing shift + tab will navigate backwards.</p>\n\n<p>When a tabbed dialog is opened, the first button in the tab menu is focused. Pressing tab will navigate to the first interactive component in that tab, and will cycle through the tab\u2019s components, the footer buttons, then back to the tab button. To switch to another tab, focus the tab button for the current tab, then use the arrow keys to cycle through the tab buttons.</p>"}]},l=T(e),u=(i='<a href="https://www.tinymce.com/docs/changelog/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">TinyMCE '+(a=x.majorVersion,o=x.minorVersion,0===a.indexOf("@")?"X.X.X":a+"."+o)+"</a>",{name:"versions",title:"Version",items:[{type:"htmlpanel",html:"<p>"+A.translate(["You are using {0}",i])+"</p>",presets:"document"}]}),h=m(((n={})[s.name]=s,n[c.name]=c,n[l.name]=l,n[u.name]=u,n),t.get());return r=e,d.from(r.getParam("help_tabs")).fold(function(){return t=f(e=h),-1!==(n=t.indexOf("versions"))&&(t.splice(n,1),t.push("versions")),{tabs:e,names:t};var e,t,n},function(e){return t=h,n={},a=p(e,function(e){return"string"==typeof e?(y(t,e)&&(n[e]=t[e]),e):(n[e.name]=e).name}),{tabs:n,names:a};var t,n,a})},P=function(o,i){return function(){var e=M(o,i),a=e.tabs,t=e.names,n={type:"tabpanel",tabs:function(e){for(var t=[],n=function(e){t.push(e)},a=0;a<e.length;a++)e[a].each(n);return t}(p(t,function(e){return y(t=a,n=e)?d.from(t[n]):d.none();var t,n}))};o.windowManager.open({title:"Help",size:"medium",body:n,buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{}})}};!function F(){a.add("help",function(e){var t,n,a,o,i,r=(t={},{get:function(){return t},set:function(e){t=e}}),s={addTab:function(e){var t=n.get();t[e.name]=e,n.set(t)}},c=P(e,n=r);return o=c,(a=e).ui.registry.addButton("help",{icon:"help",tooltip:"Help",onAction:o}),a.ui.registry.addMenuItem("help",{text:"Help",icon:"help",shortcut:"Alt+0",onAction:o}),i=c,e.addCommand("mceHelp",i),e.shortcuts.add("Alt+0","Open help dialog","mceHelp"),s})}()}();
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager");!function o(){n.add("hr",function(n){var o,t;(o=n).addCommand("InsertHorizontalRule",function(){o.execCommand("mceInsertContent",!1,"<hr />")}),(t=n).ui.registry.addButton("hr",{icon:"horizontal-rule",tooltip:"Horizontal line",onAction:function(){return t.execCommand("InsertHorizontalRule")}}),t.ui.registry.addMenuItem("hr",{icon:"horizontal-rule",text:"Horizontal line",onAction:function(){return t.execCommand("InsertHorizontalRule")}})})}()}();
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
- !function(m){"use strict";var e,t,n,r,o,a=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(){},l=function(e){return function(){return e}},s=l(!1),u=l(!0),c=function(){return d},d=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:s,isSome:s,isNone:u,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:l(null),getOrUndefined:l(undefined),or:n,orThunk:t,map:c,each:i,bind:c,exists:s,forall:u,filter:c,equals:e,equals_:e,toArray:function(){return[]},toString:l("none()")}),g=function(n){var e=l(n),t=function(){return a},r=function(e){return e(n)},a={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:u,isNone:s,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return g(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?a:d},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(s,function(e){return t(n,e)})}};return a},A={some:g,none:c,from:function(e){return null===e||e===undefined?d:g(e)}},f=function(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}},p=function(t){return function(e){return typeof e===t}},S=f("string"),h=f("object"),b=f("array"),v=(r=null,function(e){return r===e}),y=p("boolean"),w=p("number"),D=Array.prototype.push,x=function(e){for(var t=[],n=0,r=e.length;n
9
+ !function(m){"use strict";var e,t,n,r,o,a=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(){},l=function(e){return function(){return e}},s=l(!1),u=l(!0),c=function(){return d},d=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:s,isSome:s,isNone:u,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:l(null),getOrUndefined:l(undefined),or:n,orThunk:t,map:c,each:i,bind:c,exists:s,forall:u,filter:c,equals:e,equals_:e,toArray:function(){return[]},toString:l("none()")}),g=function(n){var e=l(n),t=function(){return a},r=function(e){return e(n)},a={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:u,isNone:s,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return g(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?a:d},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(s,function(e){return t(n,e)})}};return a},A={some:g,none:c,from:function(e){return null===e||e===undefined?d:g(e)}},f=function(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}},p=function(t){return function(e){return typeof e===t}},S=f("string"),h=f("object"),b=f("array"),v=(r=null,function(e){return r===e}),y=p("boolean"),w=p("number"),D=Array.prototype.push,x=function(e){for(var t=[],n=0,r=e.length;n
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(p){"use strict";var t,e,n,l=function(t){var e=t;return{get:function(){return e},set:function(t){e=t}}},r=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(){},f=function(t){return function(){return t}},i=f(!1),u=f(!0),a=function(){return c},c=(t=function(t){return t.isNone()},{fold:function(t,e){return t()},is:i,isSome:i,isNone:u,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:f(null),getOrUndefined:f(undefined),or:n,orThunk:e,map:a,each:o,bind:a,exists:i,forall:u,filter:a,equals:t,equals_:t,toArray:function(){return[]},toString:f("none()")}),s=function(n){var t=f(n),e=function(){return o},r=function(t){return t(n)},o={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:u,isNone:i,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return s(t(n))},each:function(t){t(n)},bind:r,exists:r,forall:r,filter:function(t){return t(n)?o:c},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(i,function(t){return e(n,t)})}};return o},v={some:s,none:a,from:function(t){return null===t||t===undefined?c:s(t)}};function m(t,e){return y(p.document.createElement("canvas"),t,e)}function h(t){var e=m(t.width,t.height);return g(e).drawImage(t,0,0),e}function g(t){return t.getContext("2d")}function y(t,e,n){return t.width=e,t.height=n,t}var w,b,I,T=window.Promise?window.Promise:(b=(w=function(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],L(t,_(U,this),_(A,this))}).immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(t){p.setTimeout(t,1)},I=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},w.prototype["catch"]=function(t){return this.then(null,t)},w.prototype.then=function(n,r){var o=this;return new w(function(t,e){R.call(o,new E(n,r,t,e))})},w.all=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var c=Array.prototype.slice.call(1===t.length&&I(t[0])?t[0]:t);return new w(function(o,i){if(0===c.length)return o([]);var u=c.length;function a(e,t){try{if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void n.call(t,function(t){a(e,t)},i)}c[e]=t,0==--u&&o(c)}catch(r){i(r)}}for(var t=0;t<c.length;t++)a(t,c[t])})},w.resolve=function(e){return e&&"object"==typeof e&&e.constructor===w?e:new w(function(t){t(e)})},w.reject=function(n){return new w(function(t,e){e(n)})},w.race=function(o){return new w(function(t,e){for(var n=0,r=o;n<r.length;n++)r[n].then(t,e)})},w);function _(t,e){return function(){return t.apply(e,arguments)}}function R(r){var o=this;null!==this._state?b(function(){var t=o._state?r.onFulfilled:r.onRejected;if(null!==t){var e;try{e=t(o._value)}catch(n){return void r.reject(n)}r.resolve(e)}else(o._state?r.resolve:r.reject)(o._value)}):this._deferreds.push(r)}function U(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var e=t.then;if("function"==typeof e)return void L(_(e,t),_(U,this),_(A,this))}this._state=!0,this._value=t,x.call(this)}catch(n){A.call(this,n)}}function A(t){this._state=!1,this._value=t,x.call(this)}function x(){for(var t=0,e=this._deferreds;t<e.length;t++){var n=e[t];R.call(this,n)}this._deferreds=[]}function E(t,e,n,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r}function L(t,e,n){var r=!1;try{t(function(t){r||(r=!0,e(t))},function(t){r||(r=!0,n(t))})}catch(o){if(r)return;r=!0,n(o)}}function j(t){var e=t.src;return(0===e.indexOf("data:")?k:function n(r){return new T(function(t,n){var e=new p.XMLHttpRequest;e.open("GET",r,!0),e.responseType="blob",e.onload=function(){200===this.status&&t(this.response)},e.onerror=function(){var t,e=this;n(0===this.status?((t=new Error("No access to download image")).code=18,t.name="SecurityError",t):new Error("Error "+e.status+" downloading image"))},e.send()})})(e)}function C(a){return new T(function(t,e){var n=p.URL.createObjectURL(a),r=new p.Image,o=function(){r.removeEventListener("load",i),r.removeEventListener("error",u)};function i(){o(),t(r)}function u(){o(),e("Unable to load data of type "+a.type+": "+n)}r.addEventListener("load",i),r.addEventListener("error",u),r.src=n,r.complete&&i()})}function k(n){return new T(function(t,e){(function g(t){var e=t.split(","),n=/data:([^;]+)/.exec(e[0]);if(!n)return v.none();for(var r=n[1],o=e[1],i=p.atob(o),u=i.length,a=Math.ceil(u/1024),c=new Array(a),s=0;s<a;++s){for(var f=1024*s,l=Math.min(1024+f,u),d=new Array(l-f),m=f,h=0;m<l;++h,++m)d[h]=i[m].charCodeAt(0);c[s]=new Uint8Array(d)}return v.some(new p.Blob(c,{type:r}))})(n).fold(function(){e("uri is not base64: "+n)},t)})}function O(t,r,o){return r=r||"image/png",p.HTMLCanvasElement.prototype.toBlob?new T(function(e,n){t.toBlob(function(t){t?e(t):n()},r,o)}):k(t.toDataURL(r,o))}function P(t){return C(t).then(function(t){!function n(t){p.URL.revokeObjectURL(t.src)}(t);var e=m(function r(t){return t.naturalWidth||t.width}(t),function o(t){return t.naturalHeight||t.height}(t));return g(e).drawImage(t,0,0),e})}function S(t,e,n){var r=e.type;function o(e,n){return t.then(function(t){return function r(t,e,n){return e=e||"image/png",t.toDataURL(e,n)}(t,e,n)})}return{getType:f(r),toBlob:function i(){return T.resolve(e)},toDataURL:f(n),toBase64:function u(){return n.split(",")[1]},toAdjustedBlob:function a(e,n){return t.then(function(t){return O(t,e,n)})},toAdjustedDataURL:o,toAdjustedBase64:function c(t,e){return o(t,e).then(function(t){return t.split(",")[1]})},toCanvas:function s(){return t.then(h)}}}function M(e){return function t(n){return new T(function(t){var e=new p.FileReader;e.onloadend=function(){t(e.result)},e.readAsDataURL(n)})}(e).then(function(t){return S(P(e),e,t)})}function B(e,t){return O(e,t).then(function(t){return S(T.resolve(e),t,e.toDataURL())})}function N(e,n){return e.toCanvas().then(function(t){return function a(t,e,n){var r=m(t.width,t.height),o=g(r),i=0,u=0;90!==(n=n<0?360+n:n)&&270!==n||y(r,r.height,r.width);90!==n&&180!==n||(i=r.width);270!==n&&180!==n||(u=r.height);return o.translate(i,u),o.rotate(n*Math.PI/180),o.drawImage(t,0,0),B(r,e)}(t,e.getType(),n)})}function D(e,n){return e.toCanvas().then(function(t){return function i(t,e,n){var r=m(t.width,t.height),o=g(r);"v"===n?(o.scale(1,-1),o.drawImage(t,0,-r.height)):(o.scale(-1,1),o.drawImage(t,-r.width,0));return B(r,e)}(t,e.getType(),n)})}var F=function(t,e){return function(t,e,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];if(e(i,r))return v.some(i);if(n(i,r))break}return v.none()}(t,e,i)},H=function(t){return M(t)},q=tinymce.util.Tools.resolve("tinymce.util.Delay"),z=tinymce.util.Tools.resolve("tinymce.util.Promise"),$=tinymce.util.Tools.resolve("tinymce.util.URI");function G(t){var e,n;function r(t){return/^[0-9\.]+px$/.test(t)}return e=t.style.width,n=t.style.height,e||n?r(e)&&r(n)?{w:parseInt(e,10),h:parseInt(n,10)}:null:(e=t.width,n=t.height,e&&n?{w:parseInt(e,10),h:parseInt(n,10)}:null)}function J(t){return{w:t.naturalWidth,h:t.naturalHeight}}var K=function(t){return null!==t&&t!==undefined},V=function(e,r,o){return new z(function(t){var n;(n=new p.XMLHttpRequest).onreadystatechange=function(){4===n.readyState&&t({status:n.status,blob:this.response})},n.open("GET",e,!0),n.withCredentials=o,d.each(r,function(t,e){n.setRequestHeader(e,t)}),n.responseType="blob",n.send()})},W=[{code:404,message:"Could not find Image Proxy"},{code:403,message:"Rejected request"},{code:0,message:"Incorrect Image Proxy URL"}],X=[{type:"key_missing",message:"The request did not include an api key."},{type:"key_not_found",message:"The provided api key could not be found."},{type:"domain_not_trusted",message:"The api key is not valid for the request origins."}],Q=function(t){var e,n=(e=t,"ImageProxy HTTP error: "+F(W,function(t){return e===t.code}).fold(f("Unknown ImageProxy error"),function(t){return t.message}));return z.reject(n)},Y=function(t){var e,n,r=function(t){var e;try{e=JSON.parse(t)}catch(n){}return e}(t),o=(e=["error","type"].reduce(function(t,e){return K(t)?t[e]:undefined},r),K(e)?e:null);return"ImageProxy Service error: "+(o?(n=o,F(X,function(t){return t.type===n}).fold(f("Unknown service error"),function(t){return t.message})):"Invalid JSON in service error message")},Z=function(t,e){return r=e,new z(function(n){var t=new p.FileReader;t.onload=function(t){var e=t.target;n(e.result)},t.readAsText(r)}).then(function(t){var e=Y(t);return z.reject(e)});var r},tt=function(t,e){var n,r,o,i={"Content-Type":"application/json;charset=UTF-8","tiny-api-key":e};return V((r=e,o=-1===(n=t).indexOf("?")?"?":"&",/[?&]apiKey=/.test(n)||!r?n:n+o+"apiKey="+encodeURIComponent(r)),i,!1).then(function(t){return t.status<200||300<=t.status?(e=t.status,n=t.blob,400===(r=e)||403===r||500===r?Z(0,n):Q(e)):z.resolve(t.blob);var e,n,r})};var et=function(t,e,n){return e?tt(t,e):function r(t,e){return V(t,{},e).then(function(t){return t.status<200||300<=t.status?Q(t.status):z.resolve(t.blob)})}(t,n)},nt=function(t){if(null===t||t===undefined)throw new Error("Node cannot be null or undefined");return{dom:f(t)}},rt={fromHtml:function(t,e){var n=(e||p.document).createElement("div");if(n.innerHTML=t,!n.hasChildNodes()||1<n.childNodes.length)throw p.console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return nt(n.childNodes[0])},fromTag:function(t,e){var n=(e||p.document).createElement(t);return nt(n)},fromText:function(t,e){var n=(e||p.document).createTextNode(t);return nt(n)},fromDom:nt,fromPoint:function(t,e,n){var r=t.dom();return v.from(r.elementFromPoint(e,n)).map(nt)}},ot=("undefined"!=typeof p.window?p.window:Function("return this;")(),function(t,e){return n=function(t){return function(t,e){var n=t.dom();if(1!==n.nodeType)return!1;var r=n;if(r.matches!==undefined)return r.matches(e);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(e);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(e);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")}(t,e)},F(t.dom().childNodes,function(t){return n(rt.fromDom(t))}).map(rt.fromDom);var n}),it=0,ut=function(t){return ot(rt.fromDom(t),"img")},at=function(t,e){return t.dom.is(e,"figure")},ct=function(n,t){var e=function(t){return e=t,n.dom.is(e,"img:not([data-mce-object],[data-mce-placeholder])")&&(lt(n,t)||dt(n,t)||n.settings.imagetools_proxy);var e};return at(n,t)?ut(t).map(function(t){return e(t.dom())?v.some(t.dom()):v.none()}):e(t)?v.some(t):v.none()},st=function(t,e){t.notificationManager.open({text:e,type:"error"})},ft=function(t){var e=t.selection.getNode();return at(t,e)?ut(e):v.some(rt.fromDom(e))},lt=function(t,e){var n=e.src;return 0===n.indexOf("data:")||0===n.indexOf("blob:")||new $(n).host===t.documentBaseURI.host},dt=function(t,e){return-1!==d.inArray(t.getParam("imagetools_cors_hosts",[],"string[]"),new $(e.src).host)},mt=function(t,e){var n,r,o,i,u=e.src;return dt(t,e)?et(e.src,null,(r=t,o=e,-1!==d.inArray(r.getParam("imagetools_credentials_hosts",[],"string[]"),new $(o.src).host))):lt(t,e)?j(e):(u=t.getParam("imagetools_proxy"),u+=(-1===u.indexOf("?")?"?":"&")+"url="+encodeURIComponent(e.src),n=(i=t).getParam("api_key",i.getParam("imagetools_api_key","","string"),"string"),et(u,n,!1))},ht=function(t,e){return n=t,v.from(n.getParam("imagetools_fetch_image",null,"function")).fold(function(){return mt(t,e)},function(t){return t(e)});var n},gt=function(t,e){var n;return(n=t.editorUpload.blobCache.getByUri(e.src))?z.resolve(n.blob()):ht(t,e)},pt=function(t){q.clearTimeout(t.get())},vt=function(a,c,s,f,l,d){return c.toBlob().then(function(t){var e,n,r,o,i,u;return r=a.editorUpload.blobCache,e=l.src,a.getParam("images_reuse_filename",!1,"boolean")&&(n=(o=r.getByUri(e))?(e=o.uri(),o.name()):(i=a,(u=e.match(/\/([^\/\?]+)?\.(?:jpeg|jpg|png|gif)(?:\?|$)/i))?i.dom.encode(u[1]):null)),o=r.create({id:"imagetools"+it++,blob:t,base64:c.toBase64(),uri:e,name:n}),r.add(o),a.undoManager.transact(function(){a.$(l).on("load",function r(){var t,e,n;a.$(l).off("load",r),a.nodeChanged(),s?a.editorUpload.uploadImagesAuto():(pt(f),t=a,e=f,n=q.setEditorTimeout(t,function(){t.editorUpload.uploadImagesAuto()},t.getParam("images_upload_timeout",3e4,"number")),e.set(n))}),d&&a.$(l).attr({width:d.w,height:d.h}),a.$(l).attr({src:o.blobUri()}).removeAttr("data-mce-src")}),o})},yt=function(n,r,t,o){return function(){return ft(n).fold(function(){st(n,"Could not find selected image")},function(e){return n._scanForImages().then(function(){return gt(n,e.dom())}).then(H).then(t).then(function(t){return vt(n,t,!1,r,e.dom(),o)},function(t){st(n,t)})})}},wt=function(e,n,r){return function(){var t=ft(e).fold(function(){return null},function(t){var e=G(t.dom());return e?{w:e.h,h:e.w}:null});return yt(e,n,function(t){return N(t,r)},t)()}},bt=function(t,e,n){return function(){return yt(t,e,function(t){return D(t,n)})()}},It=function(e,n,r,i,u){return C(u).then(function(t){var e=J(t);return i.w===e.w&&i.h===e.h||G(r)&&function o(t,e){var n,r;e&&(n=t.style.width,r=t.style.height,(n||r)&&(t.style.width=e.w+"px",t.style.height=e.h+"px",t.removeAttribute("data-mce-style")),n=t.width,r=t.height,(n||r)&&(t.setAttribute("width",e.w),t.setAttribute("height",e.h)))}(r,e),p.URL.revokeObjectURL(t.src),u}).then(H).then(function(t){return vt(e,t,!0,n,r)},function(){})},Tt=function(i,u){return function(){var r=ft(i),o=r.map(function(t){return J(t.dom())});ft(i).each(function(e){ct(i,e.dom()).each(function(t){gt(i,e.dom()).then(function(t){var e,n={blob:e=t,url:p.URL.createObjectURL(e)};i.windowManager.open({title:"Edit Image",size:"large",body:{type:"panel",items:[{type:"imagetools",name:"imagetools",label:"Edit Image",currentState:n}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0,disabled:!0}],onSubmit:function(t){var n=t.getData().imagetools.blob;r.each(function(e){o.each(function(t){It(i,u,e.dom(),t,n)})}),t.close()},onCancel:function(){},onAction:function(t,e){switch(e.name){case"save-state":e.value?t.enable("save"):t.disable("save");break;case"disable":t.disable("save"),t.disable("cancel");break;case"enable":t.enable("cancel")}}})})})})}};!function _t(){r.add("imagetools",function(t){var n,e,r,o,i,u,a,c,s=l(0),f=l(null);n=t,e=s,d.each({mceImageRotateLeft:wt(n,e,-90),mceImageRotateRight:wt(n,e,90),mceImageFlipVertical:bt(n,e,"v"),mceImageFlipHorizontal:bt(n,e,"h"),mceEditImage:Tt(n,e)},function(t,e){n.addCommand(e,t)}),o=function(t){return function(){return r.execCommand(t)}},(r=t).ui.registry.addButton("rotateleft",{tooltip:"Rotate counterclockwise",icon:"rotate-left",onAction:o("mceImageRotateLeft")}),r.ui.registry.addButton("rotateright",{tooltip:"Rotate clockwise",icon:"rotate-right",onAction:o("mceImageRotateRight")}),r.ui.registry.addButton("flipv",{tooltip:"Flip vertically",icon:"flip-vertically",onAction:o("mceImageFlipVertical")}),r.ui.registry.addButton("fliph",{tooltip:"Flip horizontally",icon:"flip-horizontally",onAction:o("mceImageFlipHorizontal")}),r.ui.registry.addButton("editimage",{tooltip:"Edit image",icon:"edit-image",onAction:o("mceEditImage"),onSetup:function(n){var t=function(){ft(r).each(function(t){var e=ct(r,t.dom()).isNone();n.setDisabled(e)})};return r.on("NodeChange",t),function(){r.off("NodeChange",t)}}}),r.ui.registry.addButton("imageoptions",{tooltip:"Image options",icon:"image-options",onAction:o("mceImage")}),r.ui.registry.addContextMenu("imagetools",{update:function(t){return ct(r,t).fold(function(){return[]},function(t){return[{text:"Edit image",icon:"edit-image",onAction:o("mceEditImage")}]})}}),(i=t).ui.registry.addContextToolbar("imagetools",{items:i.getParam("imagetools_toolbar","rotateleft rotateright flipv fliph editimage imageoptions"),predicate:function(t){return ct(i,t).isSome()},position:"node",scope:"node"}),a=s,c=f,(u=t).on("NodeChange",function(t){var e=c.get();e&&e.src!==t.element.src&&(pt(a),u.editorUpload.uploadImagesAuto(),c.set(null)),ct(u,t.element).each(c.set)})})}()}(window);
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(){"use strict";var n,t=tinymce.util.Tools.resolve("tinymce.PluginManager"),g=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),f=tinymce.util.Tools.resolve("tinymce.EditorManager"),m=tinymce.util.Tools.resolve("tinymce.Env"),h=tinymce.util.Tools.resolve("tinymce.util.Tools"),d=function(t){return t.getParam("importcss_selector_converter")},i=(n="array",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}),o=Array.prototype.push,l=function(t,e){return function(t){for(var e=[],r=0,n=t.length;r<n;++r){if(!i(t[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+t);o.apply(e,t[r])}return e}(function(t,e){for(var r=t.length,n=new Array(r),i=0;i<r;i++){var o=t[i];n[i]=e(o,i)}return n}(t,e))},p=function(e){return"string"==typeof e?function(t){return-1!==t.indexOf(e)}:e instanceof RegExp?function(t){return e.test(t)}:e},_=function(c,t,a){var u=[],r={};function l(t,e){var r,n,i,o=t.href;if(n=o,i=m.cacheSuffix,"string"==typeof n&&(n=n.replace("?"+i,"").replace("&"+i,"")),(o=n)&&a(o,e)&&!function(t,e){var r=t.settings,n=!1!==r.skin&&(r.skin||"oxide");if(n){var i=r.skin_url?t.documentBaseURI.toAbsolute(r.skin_url):f.baseURL+"/skins/ui/"+n,o=f.baseURL+"/skins/content/";return e===i+"/content"+(t.inline?".inline":"")+".min.css"||-1!==e.indexOf(o)}return!1}(c,o)){h.each(t.imports,function(t){l(t,!0)});try{r=t.cssRules||t.rules}catch(s){}h.each(r,function(t){t.styleSheet?l(t.styleSheet,!0):t.selectorText&&h.each(t.selectorText.split(","),function(t){u.push(h.trim(t))})})}}h.each(c.contentCSS,function(t){r[t]=!0}),a=a||function(t,e){return e||r[t]};try{h.each(t.styleSheets,function(t){l(t)})}catch(e){}return u},x=function(t,e){var r,n=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(e);if(n){var i=n[1],o=n[2].substr(1).split(".").join(" "),s=h.makeMap("a,img");return n[1]?(r={title:e},t.schema.getTextBlockElements()[i]?r.block=i:t.schema.getBlockElements()[i]||s[i.toLowerCase()]?r.selector=i:r.inline=i):n[2]&&(r={inline:"span",title:e.substr(1),classes:o}),!1!==t.getParam("importcss_merge_classes")?r.classes=o:r.attributes={"class":o},r}},T=function(t,e){return null===e||!1!==t.getParam("importcss_exclusive")},r=function(y){y.on("init",function(t){var e,r,n,i,o=(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 l(r,function(t){var e=n[t];return 0===e.length?[]:[{title:t,items:e}]}).concat(e)}}),v={},s=p(y.getParam("importcss_selector_filter")),c=(i=y.getParam("importcss_groups"),h.map(i,function(t){return h.extend({},t,{original:t,selectors:{},filter:p(t.filter),item:{text:t.title,menu:[]}})})),a=function(t,e){if(f=t,p=v,!(T(y,m=e)?f in p:f in m.selectors)){a=t,l=v,T(y,u=e)?l[a]=!0:u.selectors[a]=!0;var r=(o=(i=y).plugins.importcss,s=t,((c=e)&&c.selector_converter?c.selector_converter:d(i)?d(i):function(){return x(i,s)}).call(o,s,c));if(r){var n=r.name||g.DOM.uniqueId();return y.formatter.register(n,r),h.extend({},{title:r.title,format:n})}}var i,o,s,c,a,u,l,f,m,p;return null};h.each(_(y,y.getDoc(),p(y.getParam("importcss_file_filter"))),function(r){if(-1===r.indexOf(".mce-")&&(!s||s(r))){var t=(n=c,i=r,h.grep(n,function(t){return!t.filter||t.filter(i)}));if(0<t.length)h.each(t,function(t){var e=a(r,t);e&&o.addItemToGroup(t.title,e)});else{var e=a(r,null);e&&o.addItem(e)}}var n,i});var u=o.toFormats();y.fire("addStyleModifications",{items:u,replace:!y.getParam("importcss_append")})})};!function e(){t.add("importcss",function(t){return r(t),e=t,{convertSelectorToFormat:function(t){return x(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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(e){return e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S"))},c=function(e){return e.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])},r="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),a="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),i="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),o="January February March April May June July August September October November December".split(" "),m=function(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},s=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",m(n.getMonth()+1,2))).replace("%d",m(n.getDate(),2))).replace("%H",""+m(n.getHours(),2))).replace("%M",""+m(n.getMinutes(),2))).replace("%S",""+m(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(o[n.getMonth()]))).replace("%b",""+e.translate(i[n.getMonth()]))).replace("%A",""+e.translate(a[n.getDay()]))).replace("%a",""+e.translate(r[n.getDay()]))).replace("%%","%")},l=function(e,t){if(e.getParam("insertdatetime_element",!1)){var n=s(e,t),r=void 0;r=/%[HMSIp]/.test(t)?s(e,"%Y-%m-%dT%H:%M"):s(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(s(e,t));var i,o,u,c,m},t=function(t){t.addCommand("mceInsertDate",function(){var e;l(t,(e=t).getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d")))}),t.addCommand("mceInsertTime",function(){l(t,u(t))})},d=tinymce.util.Tools.resolve("tinymce.util.Tools"),n=function(n){var e,t,r,a,i=c(n),o=(a=c(r=n),e=0<a.length?a[0]:u(r),t=e,{get:function(){return t},set:function(e){t=e}});n.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:function(e){return e===o.get()},fetch:function(e){e(d.map(i,function(e){return{type:"choiceitem",text:s(n,e),value:e}}))},onAction:function(e){l(n,o.get())},onItemAction:function(e,t){o.set(t),l(n,t)}});n.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:function(){return d.map(i,function(e){return{type:"menuitem",text:s(n,e),onAction:(t=e,function(){o.set(t),l(n,t)})};var t})}})};!function p(){e.add("insertdatetime",function(e){t(e),n(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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=function(s){var e,t,i,a;t=!1,(e=s).settings.inline_styles=t,e.getParam("fontsize_formats")||(i="8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7",e.settings.fontsize_formats=i),e.getParam("font_formats")||(a="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",e.settings.font_formats=a),s.on("PreInit",function(){return 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]"),void l.each(t.split(","),function(e){var t=a.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))});var e,t,i,a})};!function i(){e.add("legacyoutput",function(e){t(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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(i){"use strict";var n,t,e,r,o=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.util.VK"),a=function(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}},l=function(n){return function(t){return typeof t===n}},c=a("string"),f=a("array"),s=function(t){return n===t},m=l("boolean"),g=l("function"),d=function(t){var n=t.getParam("link_assume_external_targets",!1);return m(n)&&n?1:!c(n)||"http"!==n&&"https"!==n?0:n},h=function(t){return t.getParam("default_link_target")},v=function(t){return t.getParam("target_list",!0)},p=function(t){return t.getParam("rel_list",[],"array")},y=function(t){return t.getParam("allow_unsafe_link_target",!1,"boolean")},k=function(t){var n=i.document.createElement("a");n.target="_blank",n.href=t,n.rel="noreferrer noopener";var e,r,o=i.document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!0,i.window,0,0,0,0,0,!1,!1,!1,!1,0,null),e=n,r=o,i.document.body.appendChild(e),e.dispatchEvent(r),i.document.body.removeChild(e)},x=function(){return(x=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)},b=function(){},O=function(t){return function(){return t}},w=O(!1),C=O(!(n=null)),A=function(){return N},N=(t=function(t){return t.isNone()},{fold:function(t,n){return t()},is:w,isSome:w,isNone:C,getOr:r=function(t){return t},getOrThunk:e=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:O(null),getOrUndefined:O(undefined),or:r,orThunk:e,map:A,each:b,bind:A,exists:w,forall:C,filter:A,equals:t,equals_:t,toArray:function(){return[]},toString:O("none()")}),_=function(e){var t=O(e),n=function(){return o},r=function(t){return t(e)},o={fold:function(t,n){return n(e)},is:function(t){return e===t},isSome:C,isNone:w,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return _(t(e))},each:function(t){t(e)},bind:r,exists:r,forall:r,filter:function(t){return t(e)?o:N},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(t){return t.is(e)},equals_:function(t,n){return t.fold(w,function(t){return n(e,t)})}};return o},P={some:_,none:A,from:function(t){return null===t||t===undefined?N:_(t)}},S=Array.prototype.indexOf,T=Array.prototype.push,D=function(t,n){return e=t,r=n,-1<S.call(e,r);var e,r},L=function(t){for(var n=[],e=0,r=t.length;e<r;++e){if(!f(t[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+t);T.apply(n,t[e])}return n},M=function(t,n){return L(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,n))},E=function(t,n){for(var e=0;e<t.length;e++){var r=n(t[e],e);if(r.isSome())return r}return P.none()},R=Object.keys,U=function(t,e,r,o){return function(t,n){for(var e=R(t),r=0,o=e.length;r<o;r++){var i=e[r];n(t[i],i)}}(t,function(t,n){(e(t,n)?r:o)(t,n)}),{}},q=function(t,n){var e,r={};return U(t,n,(e=r,function(t,n){e[n]=t}),b),r},K=tinymce.util.Tools.resolve("tinymce.util.Tools"),z=function(t){return!(!/(^|[ ,])rtc([, ]|$)/.test(t.settings.plugins)||!o.get("rtc"))},I=function(t){return/^\w+:/i.test(t)},j=function(t){var n=t.getAttribute("data-mce-href");return n||t.getAttribute("href")},B=function(t,n){var e,r,o=["noopener"],i=t?t.split(/\s+/):[],u=function(t){return t.filter(function(t){return-1===K.inArray(o,t)})},a=n?0<(e=u(e=i)).length?e.concat(o):o:u(i);return 0<a.length?(r=a,K.trim(r.sort().join(" "))):""},V=function(t,n){return n=n||t.selection.getNode(),G(n)?t.dom.select("a[href]",n)[0]:t.dom.getParent(n,"a[href]")},F=function(t,n){var e=n?n.innerText||n.textContent:t.getContent({format:"text"});return e.replace(/\uFEFF/g,"")},W=function(t){return t&&"A"===t.nodeName&&!!j(t)},$=function(t){return 0<K.grep(t,W).length},H=function(t){return!(/</.test(t)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(t)||-1===t.indexOf("href=")))},G=function(t){return t&&"FIGURE"===t.nodeName&&/\bimage\b/i.test(t.className)},J=function(t){return n=["title","rel","class","target"],e=function(n,e){return t[e].each(function(t){n[e]=0<t.length?t:null}),n},r={href:t.href},function(t,n){for(var e=0,r=t.length;e<r;e++)n(t[e],e)}(n,function(t){r=e(r,t)}),r;var n,e,r},X=function(t,n){var e,r,o=x({},n);if(!(0<p(t).length)&&!1===y(t)){var i=B(o.rel,"_blank"===o.target);o.rel=i||null}return P.from(o.target).isNone()&&!1===v(t)&&(o.target=h(t)),o.href=(e=o.href,"http"!==(r=d(t))&&"https"!==r||I(e)?e:r+"://"+e),o},Q=function(l,c,f){var s=l.selection.getNode(),m=V(l,s),g=X(l,J(f));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){i.hasOwnProperty("innerText")?i.innerText=t:i.textContent=t}),o.dom.setAttribs(i,a),o.selection.select(i)):(n=l,t=s,e=f.text,r=g,G(t)?nt(n,t,r):e.fold(function(){n.execCommand("mceInsertLink",!1,r)},function(t){n.insertContent(n.dom.createHTML("a",r,n.dom.encode(t)))}))})},Y=function(t,n,e){var r,o,i,u,a,l,c;z(t)?t.execCommand("createlink",!1,(o=(r=e)["class"],i=r.href,u=r.rel,a=r.target,l=r.text,c=r.title,q({"class":o.getOrNull(),href:i,rel:u.getOrNull(),target:a.getOrNull(),text:l.getOrNull(),title:c.getOrNull()},function(t,n){return!1===s(t)}))):Q(t,n,e)},Z=function(t){var e;z(t)?t.execCommand("unlink"):(e=t).undoManager.transact(function(){var t=e.selection.getNode();if(G(t))tt(e,t);else{var n=e.dom.getParent(t,"a[href]",e.getBody());n&&e.dom.remove(n,!0)}e.focus()})},tt=function(t,n){var e=t.dom.select("img",n)[0];if(e){var r=t.dom.getParents(e,"a[href]",n)[0];r&&(r.parentNode.insertBefore(e,r),t.dom.remove(r))}},nt=function(t,n,e){var r=t.dom.select("img",n)[0];if(r){var o=t.dom.create("a",e);r.parentNode.insertBefore(o,r),o.appendChild(r)}},et=function(t){return c(t.value)?t.value:""},rt=function(e){return void 0===e&&(e=et),function(t){return P.from(t).map(function(t){return n=t,r=e,o=[],K.each(n,function(t){var n=c(t.text)?t.text:c(t.title)?t.title:"";if(t.menu===undefined){var e=r(t);o.push({text:n,value:e})}}),o;var n,r,o})}},ot={sanitize:function(t){return rt(et)(t)},sanitizeWith:rt,createUi:function(n,e){return function(t){return{name:n,type:"selectbox",label:e,items:t}}},getValue:et},it=function(n,t,e,r){var o,i=r[t],u=0<n.length;return i!==undefined?(o=i,E(e,function(t){return P.some(t).filter(function(t){return t.value===o})}).map(function(t){return{url:{value:t.value,meta:{text:u?n:t.text,attach:b}},text:u?n:t.text}})):P.none()},ut=function(t,i){var n,e,u=(n=t.text,e=n,{get:function(){return e},set:function(t){e=t}}),r=function(t,n){var e,r,o=(e=i,("link"===(r=n.name)?e.catalogs.link:"anchor"===r?e.catalogs.anchor:P.none()).getOr([]));return it(u.get(),n.name,o,t)};return{onChange:function(t,n){return"url"===n.name?function(t){if(u.get().length<=0){var n=t.url.meta.text!==undefined?t.url.meta.text:t.url.value,e=t.url.meta.title!==undefined?t.url.meta.title:"";return P.some({text:n,title:e})}return P.none()}(t()):D(["anchor","link"],n.name)?r(t(),n):("text"===n.name&&u.set(t().text),P.none())}}},at=tinymce.util.Tools.resolve("tinymce.util.Delay"),lt=tinymce.util.Tools.resolve("tinymce.util.Promise"),ct=function(t){var n=t.href;return 0<n.indexOf("@")&&-1===n.indexOf("//")&&-1===n.indexOf("mailto:")?P.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 x(x({},t),{href:"mailto:"+n})}}):P.none()},ft=function(u,a){return E([ct,(e=d(u),r=u.getParam("link_default_protocol","http","string"),function(t){var n=t.href;return 1===e&&!I(n)||0===e&&/^\s*www[\.|\d\.]/i.test(n)?P.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 x(x({},t),{href:r+"://"+n})}}):P.none()})],function(t){return t(a)}).fold(function(){return lt.resolve(a)},function(i){return new lt(function(n){var e,t,r,o;e=u,t=i.message,r=function(t){n(t?i.preprocess(a):a)},o=e.selection.getRng(),at.setEditorTimeout(e,function(){e.windowManager.confirm(t,function(t){e.selection.setRng(o),r(t)})})})});var e,r},st=function(t){var n=t.dom.select("a:not([href])"),e=M(n,function(t){var n=t.name||t.id;return n?[{text:n,value:"#"+n}]:[]});return 0<e.length?P.some([{text:"None",value:""}].concat(e)):P.none()},mt=function(t){var n=t.getParam("link_class_list",[],"array");return 0<n.length?ot.sanitize(n):P.none()},gt=tinymce.util.Tools.resolve("tinymce.util.XHR"),dt=function(n){var e=function(t){return n.convertURL(t.value||t.url,"href")},t=n.getParam("link_list");return new lt(function(n){c(t)?gt.send({url:t,success:function(t){return n(function(t){try{return P.some(JSON.parse(t))}catch(n){return P.none()}}(t))},error:function(t){return n(P.none())}}):g(t)?t(function(t){return n(P.some(t))}):n(P.from(t))}).then(function(t){return t.bind(ot.sanitizeWith(e)).map(function(t){return 0<t.length?[{text:"None",value:""}].concat(t):t})})},ht=function(t,n){var e=p(t);if(0<e.length){var r=n.is("_blank");return(!1===y(t)?ot.sanitizeWith(function(t){return B(ot.getValue(t),r)}):ot.sanitize)(e)}return P.none()},vt=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],pt=function(t){var n=v(t);return f(n)?ot.sanitize(n).orThunk(function(){return P.some(vt)}):!1===n?P.none():P.some(vt)},yt=function(t,n,e){var r=t.getAttrib(n,e);return null!==r&&0<r.length?P.some(r):P.none()},kt=function(f,s){return dt(f).then(function(t){var n,e,r,o,i,u,a,l,c=(e=s,r=(n=f).dom,o=H(n.selection.getContent())?P.some(F(n.selection,e)):P.none(),i=e?P.some(r.getAttrib(e,"href")):P.none(),u=e?P.from(r.getAttrib(e,"target")):P.none(),a=yt(r,e,"rel"),l=yt(r,e,"class"),{url:i,text:o,title:yt(r,e,"title"),target:u,rel:a,linkClass:l});return{anchor:c,catalogs:{targets:pt(f),rels:ht(f,c.target),classes:mt(f),anchor:st(f),link:t},optNode:P.from(s),flags:{titleEnabled:f.getParam("link_title",!0,"boolean")}}})},xt=function(d){var t,n;(n=V(t=d),kt(t,n)).then(function(t){var i,u,n,e,r,o,a,l,c,f,s,m,g;return e=function(t){var e=t.getData();if(!e.url.value)return Z(i),void t.close();var n=function(n){return P.from(e[n]).filter(function(t){return!u.anchor[n].is(t)})},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:e.url.meta!==undefined&&e.url.meta.attach?e.url.meta.attach:function(){}};ft(i,r).then(function(t){Y(i,o,t)}),t.close()},r=i=d,l=(n=u=t).anchor.text.map(function(){return{name:"text",type:"input",label:"Text to display"}}).toArray(),c=n.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],f=P.from(h(r)),a=f,s={url:{value:(o=n).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(a).getOr(""),linkClass:o.anchor.linkClass.getOr("")},m=ut(s,n),g=n.catalogs,{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:L([[{name:"url",type:"urlinput",filetype:"file",label:"URL"}],l,c,function(t){for(var n=[],e=function(t){n.push(t)},r=0;r<t.length;r++)t[r].each(e);return n}([g.anchor.map(ot.createUi("anchor","Anchors")),g.rels.map(ot.createUi("rel","Rel")),g.targets.map(ot.createUi("target","Open link in...")),g.link.map(ot.createUi("link","Link list")),g.classes.map(ot.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;m.onChange(n.getData,{name:e}).each(function(t){n.setData(t)})},onSubmit:e}}).then(function(t){d.windowManager.open(t)})},bt=function(t,n){return t.dom.getParent(n,"a[href]")},Ot=function(t){return bt(t,t.selection.getStart())},wt=function(t,n){if(n){var e=j(n);if(/^#/.test(e)){var r=t.$(e);r.length&&t.selection.scrollIntoView(r[0],!0)}else k(n.href)}},Ct=function(t){return function(){xt(t)}},At=function(t){return function(){wt(t,Ot(t))}},Nt=function(r){r.on("click",function(t){var n=bt(r,t.target);n&&u.metaKeyPressed(t)&&(t.preventDefault(),wt(r,n))}),r.on("keydown",function(t){var n,e=Ot(r);e&&13===t.keyCode&&(!0===(n=t).altKey&&!1===n.shiftKey&&!1===n.ctrlKey&&!1===n.metaKey)&&(t.preventDefault(),wt(r,e))})},_t=function(e){return function(n){var t=function(t){return n.setActive(!e.mode.isReadOnly()&&!!V(e,t.element))};return e.on("NodeChange",t),function(){return e.off("NodeChange",t)}}},Pt=function(r){return function(n){var t=r.dom.getParents(r.selection.getStart());n.setDisabled(!$(t));var e=function(t){return n.setDisabled(!$(t.parents))};return r.on("NodeChange",e),function(){return r.off("NodeChange",e)}}};!function St(){o.add("link",function(t){var n,e,r,i,o,u,a;(n=t).ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",onAction:Ct(n),onSetup:_t(n)}),n.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:At(n),onSetup:Pt(n)}),n.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:function(){return Z(n)},onSetup:Pt(n)}),(e=t).ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:At(e),onSetup:Pt(e)}),e.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:Ct(e)}),e.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:function(){return Z(e)},onSetup:Pt(e)}),(r=t).ui.registry.addContextMenu("link",{update:function(t){return $(r.dom.getParents(t,"a"))?"link unlink openlink":"link"}}),o=function(t){var n=i.selection.getNode();return t.setDisabled(!V(i,n)),function(){}},(i=t).ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:_t(i)},label:"Link",predicate:function(t){return!!V(i,t)&&i.getParam("link_context_toolbar",!1,"boolean")},initValue:function(){var t=V(i);return t?j(t):""},commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:function(t){var n=i.selection.getNode();return t.setActive(!!V(i,n)),_t(i)(t)},onAction:function(t){var n=V(i),e=t.getValue();if(n)i.dom.setAttrib(n,"href",e),i.selection.collapse(!1),t.hide();else{var r={href:e,attach:function(){}},o=H(i.selection.getContent())?P.some(F(i.selection,n)).filter(function(t){return 0<t.length}).or(P.from(e)):P.none();Y(i,r,{href:e,text:o,title:P.none(),rel:P.none(),target:P.none(),"class":P.none()}),t.hide()}}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:o,onAction:function(t){Z(i),t.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:o,onAction:function(t){At(i)(),t.hide()}}]}),Nt(t),(u=t).addCommand("mceLink",function(){u.getParam("link_quicklink",!1,"boolean")?u.fire("contexttoolbar-show",{toolbarKey:"quicklink"}):Ct(u)()}),(a=t).addShortcut("Meta+K","",function(){a.execCommand("mceLink")})})}()}(window);
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(a){"use strict";var e,n,t,r,o,i,u,f=tinymce.util.Tools.resolve("tinymce.PluginManager"),s=function(){},y=function(e){return function(){return e}},c=function(n){return function(e){return!n(e)}},d=y(!1),l=y(!0),m=function(){return p},p=(e=function(e){return e.isNone()},{fold:function(e,n){return e()},is:d,isSome:d,isNone:l,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:y(null),getOrUndefined:y(undefined),or:t,orThunk:n,map:m,each:s,bind:m,exists:d,forall:l,filter:m,equals:e,equals_:e,toArray:function(){return[]},toString:y("none()")}),g=function(t){var e=y(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:l,isNone:d,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return g(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:p},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(d,function(e){return n(t,e)})}};return o},v={some:g,none:m,from:function(e){return null===e||e===undefined?p:g(e)}},h=function(r){return function(e){return t=typeof(n=e),(null===n?"null":"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)===r;var n,t}},S=function(n){return function(e){return typeof e===n}},b=h("string"),C=h("array"),O=S("boolean"),N=S("function"),L=S("number"),T=Array.prototype.slice,w=Array.prototype.push,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)}return r},k=function(e,n){for(var t=0,r=e.length;t<r;t++){n(e[t],t)}},x=function(e,n){for(var t=[],r=0,o=e.length;r<o;r++){var i=e[r];n(i,r)&&t.push(i)}return t},A=function(e,n,t){return k(e,function(e){t=n(t,e)}),t},E=function(e,n,t){for(var r=0,o=e.length;r<o;r++){var i=e[r];if(n(i,r))return v.some(i);if(t(i,r))break}return v.none()},B=function(e,n){return E(e,n,d)},I=function(e,n){return function(e){for(var n=[],t=0,r=e.length;t<r;++t){if(!C(e[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+e);w.apply(n,e[t])}return n}(D(e,n))},R=function(e){var n=T.call(e,0);return n.reverse(),n},P=function(e){return 0===e.length?v.none():v.some(e[0])},M=function(e){return 0===e.length?v.none():v.some(e[e.length-1])},U=function(){return(U=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)},_=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 $(r(1),r(2))},F=function(){return $(0,0)},$=function(e,n){return{major:e,minor:n}},H={nu:$,detect:function(e,n){var t=String(n).toLowerCase();return 0===e.length?F():_(e,t)},unknown:F},j="Edge",q="Chrome",K="Opera",V="Firefox",W="Safari",Q=function(e){var n=e.current,t=e.version,r=function(e){return function(){return n===e}};return{current:n,version:t,isEdge:r(j),isChrome:r(q),isIE:r("IE"),isOpera:r(K),isFirefox:r(V),isSafari:r(W)}},X={unknown:function(){return Q({current:undefined,version:H.unknown()})},nu:Q,edge:y(j),chrome:y(q),ie:y("IE"),opera:y(K),firefox:y(V),safari:y(W)},z="Windows",Y="Android",G="Solaris",J="FreeBSD",Z="ChromeOS",ee=function(e){var n=e.current,t=e.version,r=function(e){return function(){return n===e}};return{current:n,version:t,isWindows:r(z),isiOS:r("iOS"),isAndroid:r(Y),isOSX:r("OSX"),isLinux:r("Linux"),isSolaris:r(G),isFreeBSD:r(J),isChromeOS:r(Z)}},ne={unknown:function(){return ee({current:undefined,version:H.unknown()})},nu:ee,windows:y(z),ios:y("iOS"),android:y(Y),linux:y("Linux"),osx:y("OSX"),solaris:y(G),freebsd:y(J),chromeos:y(Z)},te=function(e,n){var t=String(n).toLowerCase();return B(e,function(e){return e.search(t)})},re=function(e,t){return te(e,t).map(function(e){var n=H.detect(e.versionRegexes,t);return{current:e.name,version:n}})},oe=function(e,t){return te(e,t).map(function(e){var n=H.detect(e.versionRegexes,t);return{current:e.name,version:n}})},ie=function(e,n){return-1!==e.indexOf(n)},ue=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,ae=function(n){return function(e){return ie(e,n)}},se=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return ie(e,"edge/")&&ie(e,"chrome")&&ie(e,"safari")&&ie(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ue],search:function(e){return ie(e,"chrome")&&!ie(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return ie(e,"msie")||ie(e,"trident")}},{name:"Opera",versionRegexes:[ue,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:ae("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:ae("firefox")},{name:"Safari",versionRegexes:[ue,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(ie(e,"safari")||ie(e,"mobile/"))&&ie(e,"applewebkit")}}],ce=[{name:"Windows",search:ae("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return ie(e,"iphone")||ie(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:ae("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:ae("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:ae("linux"),versionRegexes:[]},{name:"Solaris",search:ae("sunos"),versionRegexes:[]},{name:"FreeBSD",search:ae("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:ae("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],fe={browsers:y(se),oses:y(ce)},de=function(e,n){var t,r,o,i,u,a,s,c,f,d,l,m,p=fe.browsers(),g=fe.oses(),v=re(p,e).fold(X.unknown,X.nu),h=oe(g,e).fold(ne.unknown,ne.nu);return{browser:v,os:h,deviceType:(r=v,o=e,i=n,u=(t=h).isiOS()&&!0===/ipad/i.test(o),a=t.isiOS()&&!u,s=t.isiOS()||t.isAndroid(),c=s||i("(pointer:coarse)"),f=u||!a&&s&&i("(min-device-width:768px)"),d=a||s&&!f,l=r.isSafari()&&t.isiOS()&&!1===/safari/i.test(o),m=!d&&!f&&!l,{isiPad:y(u),isiPhone:y(a),isTablet:y(f),isPhone:y(d),isTouch:y(c),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:y(l),isDesktop:y(m)})}},le=function(e){return a.window.matchMedia(e).matches},me=(i=!(r=function(){return de(a.navigator.userAgent,le)}),function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return i||(i=!0,o=r.apply(null,e)),o}),pe=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:y(e)}},ge={fromHtml:function(e,n){var t=(n||a.document).createElement("div");if(t.innerHTML=e,!t.hasChildNodes()||1<t.childNodes.length)throw a.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return pe(t.childNodes[0])},fromTag:function(e,n){var t=(n||a.document).createElement(e);return pe(t)},fromText:function(e,n){var t=(n||a.document).createTextNode(e);return pe(t)},fromDom:pe,fromPoint:function(e,n,t){var r=e.dom();return v.from(r.elementFromPoint(n,t)).map(pe)}},ve=function(e,n){return e.dom()===n.dom()},he=function(e,n){return t=e.dom(),r=n.dom(),o=t,i=r,u=a.Node.DOCUMENT_POSITION_CONTAINED_BY,0!=(o.compareDocumentPosition(i)&u);var t,r,o,i,u},ye=function(e,n){return me().browser.isIE()?he(e,n):(t=n,r=e.dom(),o=t.dom(),r!==o&&r.contains(o));var t,r,o},Se=function(e,n){var t=e.dom();if(1!==t.nodeType)return!1;var r=t;if(r.matches!==undefined)return r.matches(n);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(n);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(n);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")},be=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Ce=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),Oe=tinymce.util.Tools.resolve("tinymce.util.VK"),Ne=function(e,n,t){return e.isSome()&&n.isSome()?v.some(t(e.getOrDie(),n.getOrDie())):v.none()},Le=function(e){return v.from(e.dom().parentNode).map(ge.fromDom)},Te=function(e){return D(e.dom().childNodes,ge.fromDom)},we=function(e,n){var t=e.dom().childNodes;return v.from(t[n]).map(ge.fromDom)},De=function(e){return we(e,0)},ke=function(e){return we(e,e.dom().childNodes.length-1)},xe=function(n,t){Le(n).each(function(e){e.dom().insertBefore(t.dom(),n.dom())})},Ae=function(e,n){e.dom().appendChild(n.dom())},Ee=function(n,e){k(e,function(e){Ae(n,e)})},Be=function(e){var n=e.dom();null!==n.parentNode&&n.parentNode.removeChild(n)},Ie=function(e,n,t){return e.fire("ListMutation",{action:n,element:t})},Re=("undefined"!=typeof a.window?a.window:Function("return this;")(),tinymce.util.Tools.resolve("tinymce.dom.DomQuery")),Pe=tinymce.util.Tools.resolve("tinymce.util.Tools"),Me=function(n){return function(e){return e&&e.nodeName.toLowerCase()===n}},Ue=function(n){return function(e){return e&&n.test(e.nodeName)}},_e=function(e){return e&&3===e.nodeType},Fe=Ue(/^(OL|UL|DL)$/),$e=Ue(/^(OL|UL)$/),He=Me("ol"),je=Ue(/^(LI|DT|DD)$/),qe=Ue(/^(DT|DD)$/),Ke=Ue(/^(TH|TD)$/),Ve=Me("br"),We=function(e,n){return n&&!!e.schema.getTextBlockElements()[n.nodeName]},Qe=function(e,n){return e&&e.nodeName in n},Xe=function(e,n,t){var r=e.isEmpty(n);return!(t&&0<e.select("span[data-mce-type=bookmark]",n).length)&&r},ze=function(e,n){return e.isChildOf(n,e.getRoot())},Ye=function(e,n){var t=n||e.selection.getStart(!0);return e.dom.getParent(t,"OL,UL,DL",Ze(e,t))},Ge=function(e){var n,t,r,o=Ye(e),i=e.selection.getSelectedBlocks();return r=i,(t=o)&&1===r.length&&r[0]===t?(n=o,Pe.grep(n.querySelectorAll("ol,ul,dl"),function(e){return Fe(e)})):Pe.grep(i,function(e){return Fe(e)&&o!==e})},Je=function(e){var t,n,r,o=e.selection.getSelectedBlocks();return Pe.grep((t=e,n=o,r=Pe.map(n,function(e){var n=t.dom.getParent(e,"li,dd,dt",Ze(t,e));return n||e}),Re.unique(r)),function(e){return je(e)})},Ze=function(e,n){var t=e.dom.getParents(n,"TD,TH");return 0<t.length?t[0]:e.getBody()},en=function(e,n){var t=e.dom.getParents(n,"ol,ul",Ze(e,n));return M(t)},nn=function(e){var n,t,r,o=(t=en(n=e,n.selection.getStart()),r=x(n.selection.getSelectedBlocks(),$e),t.toArray().concat(r));return tn(e,o)},tn=function(n,e){var t=D(e,function(e){return en(n,e).getOr(e)});return Re.unique(t)},rn=function(e,n){var t,r,o,i,u=e.dom,a=e.schema.getBlockElements(),s=u.createFragment(),c=!1===(t=e.getParam("forced_root_block","p"))?"":!0===t?"p":t;if(c&&((o=u.create(c)).tagName===c.toUpperCase()&&u.setAttribs(o,e.getParam("forced_root_block_attrs",{})),Qe(n.firstChild,a)||s.appendChild(o)),n)for(;r=n.firstChild;){var f=r.nodeName;i||"SPAN"===f&&"bookmark"===r.getAttribute("data-mce-type")||(i=!0),Qe(r,a)?(s.appendChild(r),o=null):c?(o||(o=u.create(c),s.appendChild(o)),o.appendChild(r)):s.appendChild(r)}return c?i||o.appendChild(u.create("br",{"data-mce-bogus":"1"})):s.appendChild(u.create("br")),s},on=Object.keys,un=function(e,n){for(var t=on(e),r=0,o=t.length;r<o;r++){var i=t[r];n(e[i],i)}},an=function(e,n){var t,r,o,i,u={};return t=n,i=u,r=function(e,n){i[n]=e},o=s,un(e,function(e,n){(t(e,n)?r:o)(e,n)}),u},sn=function(e){return e.dom().nodeName.toLowerCase()},cn=(u=1,function(e){return e.dom().nodeType===u}),fn=function(e,n){var t=e.dom();un(n,function(e,n){!function(e,n,t){if(!(b(t)||O(t)||L(t)))throw a.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)})},dn=function(e){return A(e.dom().attributes,function(e,n){return e[n.name]=n.value,e},{})},ln=function(e,n,t){if(!b(t))throw a.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&&N(r.style.getPropertyValue)&&e.style.setProperty(n,t)},mn=function(e){return n=e,t=!0,ge.fromDom(n.dom().cloneNode(t));var n,t},pn=function(e,n){var t,r,o,i,u=(t=e,r=n,o=ge.fromTag(r),i=dn(t),fn(o,i),o);xe(e,u);var a=Te(e);return Ee(u,a),Be(e),u},gn=function(e,n){Ae(e.item,n.list)},vn=function(f,e,d){var n=e.slice(0,d.depth);return M(n).each(function(e){var n,t,r,o,i,u,a,s,c=(n=f,t=d.itemAttributes,r=d.content,o=ge.fromTag("li",n),fn(o,t),Ee(o,r),o);u=c,Ae((i=e).list,u),i.item=u,s=d,sn((a=e).list)!==s.listType&&(a.list=pn(a.list,s.listType)),fn(a.list,s.listAttributes)}),n},hn=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:ge.fromTag(o,r),item:ge.fromTag("li",r)},Ae(i.list,i.item),i));return u}(e,t,t.depth-n.length);return function(e){for(var n=1;n<e.length;n++)gn(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(),ln(u,o,i);var r,o,i,u;M(e).each(function(e){fn(e.list,n.listAttributes),fn(e.item,n.itemAttributes),Ee(e.item,n.content)})}(o,t),r=o,Ne(M(n),P(r),gn),n.concat(o)},yn=function(e){return Se(e,"OL,UL")},Sn=function(e){return De(e).map(yn).getOr(!1)},bn=function(e){return 0<e.depth},Cn=function(e){return e.isSelected},On=function(e){var n=Te(e),t=ke(e).map(yn).getOr(!1)?n.slice(0,-1):n;return D(t,mn)},Nn=function(a){return k(a,function(r,e){var n,t,o,i,u;o=(n=a)[t=e].depth,i=function(e){return e.depth===o&&!e.dirty},u=function(e){return e.depth<o},E(R(n.slice(0,t)),i,u).orThunk(function(){return E(n.slice(t+1),i,u)}).fold(function(){var e;r.dirty&&((e=r).listAttributes=an(e.listAttributes,function(e,n){return"start"!==n}))},function(e){return t=e,(n=r).listType=t.listType,void(n.listAttributes=U({},t.listAttributes));var n,t})}),a},Ln=function(i,u,a,s){return De(s).filter(yn).fold(function(){u.each(function(e){ve(e.start,s)&&a.set(!0)});var n,t,r,e=(n=s,t=i,r=a.get(),Le(n).filter(cn).map(function(e){return{depth:t,dirty:!1,isSelected:r,content:On(n),itemAttributes:dn(n),listAttributes:dn(e),listType:sn(e)}}));u.each(function(e){ve(e.end,s)&&a.set(!1)});var o=ke(s).filter(yn).map(function(e){return Tn(i,u,a,e)}).getOr([]);return e.toArray().concat(o)},function(e){return Tn(i,u,a,e)})},Tn=function(n,t,r,e){return I(Te(e),function(e){return(yn(e)?Tn:Ln)(n+1,t,r,e)})},wn=function(e,n){var t,r=(t=!1,{get:function(){return t},set:function(e){t=e}});return D(e,function(e){return{sourceList:e,entries:Tn(0,n,r,e)}})},Dn=function(i,e){var n=Nn(e);return D(n,function(e){var n,t,r,o=(n=e.content,r=(t||a.document).createDocumentFragment(),k(n,function(e){r.appendChild(e.dom())}),ge.fromDom(r));return ge.fromDom(rn(i,o.dom()))})},kn=function(e,n){var t,r,o=Nn(n);return t=e.contentDocument,r=A(o,function(e,n){return(n.depth>e.length?hn:vn)(t,e,n)},[]),P(r).map(function(e){return e.list}).toArray()},xn=function(a,e,s){var n,t=wn(e,(n=D(Je(a),ge.fromDom),Ne(B(n,c(Sn)),B(R(n),c(Sn)),function(e,n){return{start:e,end:n}})));k(t,function(e){var n,t;n=e.entries,t=s,k(x(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}n.dirty=!0}(t,e)});var r,o,i,u=(r=a,o=e.entries,I(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,bn),function(e){return(P(e).map(bn).getOr(!1)?kn:Dn)(r,e)}));k(u,function(e){Ie(a,"Indent"===s?"IndentList":"OutdentList",e.dom())}),i=e.sourceList,k(u,function(e){xe(i,e)}),Be(e.sourceList)})},An=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),En=An.DOM,Bn=function(n,t){Se(t,"dd")?pn(t,"dt"):Se(t,"dt")&&Le(t).each(function(e){return function(e,n,t){var r,o,i,u,a,s;for(i=En.select('span[data-mce-type="bookmark"]',n),a=rn(e,t),(r=En.createRng()).setStartAfter(t),r.setEndAfter(n),u=(o=r.extractContents()).firstChild;u;u=u.firstChild)if("LI"===u.nodeName&&e.dom.isEmpty(u)){En.remove(u);break}e.dom.isEmpty(o)||En.insertAfter(o,n),En.insertAfter(a,n),Xe(e.dom,t.parentNode)&&(s=t.parentNode,Pe.each(i,function(e){s.parentNode.insertBefore(e,t.parentNode)}),En.remove(s)),En.remove(t),Xe(e.dom,n)&&En.remove(n)}(n,e.dom(),t.dom())})},In=function(e){Se(e,"dt")&&pn(e,"dd")},Rn=function(e,n){if(_e(e))return{container:e,offset:n};var t=be.getNode(e,n);return _e(t)?{container:t,offset:n>=e.childNodes.length?t.data.length:0}:t.previousSibling&&_e(t.previousSibling)?{container:t.previousSibling,offset:t.previousSibling.data.length}:t.nextSibling&&_e(t.nextSibling)?{container:t.nextSibling,offset:0}:{container:e,offset:n}},Pn=function(e){var n=e.cloneRange(),t=Rn(e.startContainer,e.startOffset);n.setStart(t.container,t.offset);var r=Rn(e.endContainer,e.endOffset);return n.setEnd(r.container,r.offset),n},Mn=function(e,n){var t,r=D(nn(e),ge.fromDom),o=D(x(Je(e),qe),ge.fromDom),i=!1;if(r.length||o.length){var u=e.selection.getBookmark();xn(e,r,n),t=e,k(o,"Indent"===n?In:function(e){return Bn(t,e)}),e.selection.moveToBookmark(u),e.selection.setRng(Pn(e.selection.getRng())),e.nodeChanged(),i=!0}return i},Un=function(e){return Mn(e,"Indent")},_n=function(e){return Mn(e,"Outdent")},Fn=function(e){return Mn(e,"Flatten")},$n=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),Hn=An.DOM,jn=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=Hn.create("span",{"data-mce-type":"bookmark"}),t.hasChildNodes()?(r=Math.min(r,t.childNodes.length-1),e?t.insertBefore(n,t.childNodes[r]):Hn.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},qn=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,Hn.remove(r),!n.hasChildNodes()&&Hn.isBlock(n)&&n.appendChild(Hn.create("br"))),o[e?"startContainer":"endContainer"]=n,o[e?"startOffset":"endOffset"]=t)}e(!0),e();var n=Hn.createRng();return n.setStart(o.startContainer,o.startOffset),o.endContainer&&n.setEnd(o.endContainer,o.endOffset),Pn(n)},Kn=function(e){return/\btox\-/.test(e.className)},Vn=function(n,t,r){return function(){var e=function(e){var n=E(e.parents,Fe,Ke).filter(function(e){return e.nodeName===t&&!Kn(e)}).isSome();r(n)};return n.on("NodeChange",e),function(){return n.off("NodeChange",e)}}},Wn=function(e){switch(e){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}},Qn=function(t,e){Pe.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,Qn(s=n,(c=t)["list-attributes"]),Pe.each(a.select("li",s),function(e){Qn(e,c["list-item-attributes"])})},zn=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&&Ve(o.nextSibling)&&(o=o.nextSibling);o.parentNode!==r;){if(We(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=Ze(f,f.selection.getStart(!0)),p=f.dom;"false"!==p.getContentEditable(f.selection.getNode())&&("DL"===(d=d.toUpperCase())&&(m="DT"),e=jn(n),Pe.each(function(t,e,r){for(var o,i=[],u=t.dom,n=zn(t,e,!0,r),a=zn(t,e,!1,r),s=[],c=n;c&&(s.push(c),c!==a);c=c.nextSibling);return Pe.each(s,function(e){if(We(t,e))return i.push(e),void(o=null);if(u.isBlock(e)||Ve(e))return Ve(e)&&u.remove(e),void(o=null);var n=e.nextSibling;$n.isBookmarkNode(e)&&(We(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)&&Fe(t)&&t.nodeName===d&&(r=t,o=l,i=p.getStyle(r,"list-style-type"),u=o?o["list-style-type"]:"",i===(u=null===u?"":u))?(n=t,e=p.rename(e,m),t.appendChild(e)):(n=p.create(d),e.parentNode.insertBefore(n,e),n.appendChild(e),e=p.rename(e,m)),a=p,s=e,c=["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"],Pe.each(c,function(e){var n;return a.setStyle(s,((n={})[e]="",n))}),Xn(p,n,l),Jn(f.dom,n)}),f.selection.setRng(qn(e)))},Gn=function(e,n,t){return s=t,(a=n)&&s&&Fe(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=jn(n.selection.getRng(!0));Pe.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),Ie(e,Wn(t),o)}else Xn(e.dom,n,r),Ie(e,Wn(t),n)}(n,e,r,o)}),n.selection.setRng(qn(i))}else Fn(n)},et=function(e){return"list-style-type"in e},nt=function(e,n,t){var r=Ye(e),o=Ge(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)||Kn(n)){var o=jn(e.selection.getRng(!0));Xn(e.dom,n,r);var i=e.dom.rename(n,t);Jn(e.dom,i),e.selection.setRng(qn(o)),Ie(e,Wn(t),i)}else Fn(e);else Yn(e,t,r),Ie(e,Wn(t),n)}(e,r,n,t)},tt=An.DOM,rt=function(i,e){Pe.each(Pe.grep(i.select("ol,ul",e)),function(e){var n,t,r,o;n=i,"LI"===(o=(t=e).parentNode).nodeName&&o.firstChild===t&&((r=o.previousSibling)&&"LI"===r.nodeName?(r.appendChild(t),Xe(n,o)&&tt.remove(o)):tt.setStyle(o,"listStyleType","none")),Fe(o)&&(r=o.previousSibling)&&"LI"===r.nodeName&&r.appendChild(t)})},ot=function(e,n,t,r){var o=n.startContainer,i=n.startOffset;if(_e(o)&&(t?i<o.data.length:0<i))return o;var u=e.schema.getNonEmptyElements();1===o.nodeType&&(o=be.getNode(o,i));var a,s,c=new Ce(o,r);for(t&&(a=e.dom,Ve(s=o)&&a.isBlock(s.nextSibling)&&!Ve(s.previousSibling)&&c.next());o=c[t?"next":"prev2"]();){if("LI"===o.nodeName&&!o.hasChildNodes())return o;if(u[o.nodeName])return o;if(_e(o)&&0<o.data.length)return o}},it=function(e,n){var t=n.childNodes;return 1===t.length&&!Fe(t[0])&&e.isBlock(t[0])},ut=function(e,n,t){var r,o,i,u;if(o=it(e,t)?t.firstChild:t,it(i=e,u=n)&&i.remove(u.firstChild,!0),!Xe(e,n,!0))for(;r=n.firstChild;)o.appendChild(r)},at=function(n,e,t){var r,o,i=e.parentNode;if(ze(n,e)&&ze(n,t)){Fe(t.lastChild)&&(o=t.lastChild),i===t.lastChild&&Ve(i.previousSibling)&&n.remove(i.previousSibling),(r=t.lastChild)&&Ve(r)&&e.hasChildNodes()&&n.remove(r),Xe(n,t,!0)&&n.$(t).empty(),ut(n,e,t),o&&t.appendChild(o);var u=ye(ge.fromDom(t),ge.fromDom(e))?n.getParents(e,Fe,t):[];n.remove(e),k(u,function(e){Xe(n,e)&&e!==n.getRoot()&&n.remove(e)})}},st=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(),at(o.dom,i,u),o.selection.setCursorLocation(u);else{var s=jn(n);at(a,t,r),e.selection.setRng(qn(s))}},ct=function(n,t){var e=n.dom,r=n.selection,o=r.getStart(),i=Ze(n,o),u=e.getParent(r.getStart(),"LI",i);if(u){var a=u.parentNode;if(a===n.getBody()&&Xe(e,a))return!0;var s=Pn(r.getRng()),c=e.getParent(ot(n,s,t,i),"LI",i);if(c&&c!==u)return n.undoManager.transact(function(){var e;t?st(n,s,c,u):(e=u).parentNode.firstChild===e?_n(n):function(e,n,t,r){var o=jn(n);at(e.dom,t,r);var i=qn(o);e.selection.setRng(i)}(n,s,u,c)}),!0;if(!c&&!t&&0===s.startOffset&&0===s.endOffset)return n.undoManager.transact(function(){Fn(n)}),!0}return!1},ft=function(o,i){var u=o.dom,e=o.selection.getStart(),a=Ze(o,e),s=u.getParent(e,u.isBlock,a);if(s&&u.isEmpty(s)){var n=Pn(o.selection.getRng()),c=u.getParent(ot(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),Jn(u,c.parentNode),o.selection.select(c,!0),o.selection.collapse(i)}),!0}return!1},dt=function(e,n){return e.selection.isCollapsed()?ct(i=e,u=n)||ft(i,u):(r=(t=e).selection.getStart(),o=Ze(t,r),!!(t.dom.getParent(r,"LI,DT,DD",o)||0<Je(t).length)&&(t.undoManager.transact(function(){t.execCommand("Delete"),rt(t.dom,t.getBody())}),!0));var t,r,o,i,u},lt=function(t){var r=t.dom,e=Ye(t);He(e)&&t.windowManager.open({title:"List Properties",body:{type:"panel",items:[{type:"input",name:"start",label:"Start list at number",inputMode:"numeric"}]},initialData:{start:r.getAttrib(e,"start")||"1"},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(e){var n=e.getData();t.undoManager.transact(function(){r.setAttrib(Ye(t),"start","1"===n.start?"":n.start)}),e.close()}})},mt=function(n,t){return function(){var e=n.dom.getParent(n.selection.getStart(),"UL,OL,DL");return e&&e.nodeName===t}},pt=function(e){var n,t;e.getParam("lists_indent_on_tab",!0)&&(n=e).on("keydown",function(e){e.keyCode!==Oe.TAB||Oe.metaKeyPressed(e)||n.undoManager.transact(function(){(e.shiftKey?_n:Un)(n)&&e.preventDefault()})}),(t=e).on("keydown",function(e){e.keyCode===Oe.BACKSPACE?dt(t,!1)&&e.preventDefault():e.keyCode===Oe.DELETE&&dt(t,!0)&&e.preventDefault()})};!function gt(){f.add("lists",function(e){var t,n,r,o,i,u,a,s,c;return!1==!(!/(^|[ ,])rtc([, ]|$)/.test(e.settings.plugins)||!f.get("rtc"))&&(pt(e),(t=e).on("BeforeExecCommand",function(e){var n=e.command.toLowerCase();"indent"===n?Un(t):"outdent"===n&&_n(t)}),t.addCommand("InsertUnorderedList",function(e,n){nt(t,"UL",n)}),t.addCommand("InsertOrderedList",function(e,n){nt(t,"OL",n)}),t.addCommand("InsertDefinitionList",function(e,n){nt(t,"DL",n)}),t.addCommand("RemoveList",function(){Fn(t)}),t.addCommand("mceListProps",function(){lt(t)}),t.addQueryStateHandler("InsertUnorderedList",mt(t,"UL")),t.addQueryStateHandler("InsertOrderedList",mt(t,"OL")),t.addQueryStateHandler("InsertDefinitionList",mt(t,"DL"))),u=function(e){return function(){return n.execCommand(e)}},o="advlist",i=(r=n=e).settings.plugins?r.settings.plugins:"",-1===Pe.inArray(i.split(/[ ,]/),o)&&(n.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:u("InsertOrderedList"),onSetup:function(e){return Vn(n,"OL",e.setActive)}}),n.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:u("InsertUnorderedList"),onSetup:function(e){return Vn(n,"UL",e.setActive)}})),s={text:"List properties...",icon:"ordered-list",onAction:function(){return lt(a)},onSetup:function(n){return Vn(a,"OL",function(e){return n.setDisabled(!e)})}},(a=e).ui.registry.addMenuItem("listprops",s),a.ui.registry.addContextMenu("lists",{update:function(e){var n=Ye(a,e);return He(n)?["listprops"]:[]}}),c=e,{backspaceDelete:function(e){dt(c,e)}}})}()}(window);
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(){"use strict";var e,t,r,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 i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},a=function(e){return function(){return e}},o=a(!1),c=a(!0),i=function(){return u},u=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:o,isSome:o,isNone:c,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:a(null),getOrUndefined:a(undefined),or:r,orThunk:t,map:i,each:function(){},bind:i,exists:o,forall:c,filter:i,equals:e,equals_:e,toArray:function(){return[]},toString:a("none()")}),s=function(r){var e=a(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:c,isNone:o,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return s(e(r))},each:function(e){e(r)},bind:n,exists:n,forall:n,filter:function(e){return e(r)?i:u},toArray:function(){return[r]},toString:function(){return"some("+r+")"},equals:function(e){return e.is(r)},equals_:function(e,t){return e.fold(o,function(e){return t(r,e)})}};return i},l={some:s,none:i,from:function(e){return null===e||e===undefined?u:s(e)}},m=function(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}},d=m("string"),h=m("object"),g=m("array"),v=Array.prototype.push,f=function(e,t){for(var r=0,n=e.length;r<n;r++){t(e[r],r)}},w=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},b=Object.keys,y=Object.hasOwnProperty,x=function(e,t){return j(e,t)?l.from(e[t]):l.none()},j=function(e,t){return y.call(e,t)},O=function(e){return e.getParam("media_scripts")},S=tinymce.util.Tools.resolve("tinymce.util.Tools"),_=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),k=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),A=function(e,t){if(e)for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r].filter))return e[r]},T=_.DOM,C=function(e){return e.replace(/px$/,"")},P=function(o,e){var c=w(!1),u={};return k({validate:!1,allow_conditional_comments:!0,start:function(e,t){if(!c.get())if(j(t.map,"data-ephox-embed-iri"))c.set(!0),i=(n=t).map.style,a=i?T.parseStyle(i):{},u={type:"ephox-embed-iri",source:n.map["data-ephox-embed-iri"],altsource:"",poster:"",width:x(a,"max-width").map(C).getOr(""),height:x(a,"max-height").map(C).getOr("")};else{if(u.source||"param"!==e||(u.source=t.map.movie),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(u.type||(u.type=e),u=S.extend(t.map,u)),"script"===e){var r=A(o,t.map.src);if(!r)return;u={type:"script",source:t.map.src,width:String(r.width),height:String(r.height)}}"source"===e&&(u.source?u.altsource||(u.altsource=t.map.src):u.source=t.map.src),"img"!==e||u.poster||(u.poster=t.map.src)}var n,i,a}}).parse(e),u.source=u.source||u.src||u.data,u.altsource=u.altsource||"",u.poster=u.poster||"",u},D=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||""},$=tinymce.util.Tools.resolve("tinymce.html.Schema"),F=tinymce.util.Tools.resolve("tinymce.html.Writer"),M=_.DOM,z=function(e){return/^[0-9.]+$/.test(e)?e+"px":e},N=function(a,e){!function(e,t){for(var r=b(e),n=0,i=r.length;n<i;n++){var a=r[n];t(e[a],a)}}(e,function(e,t){var r=""+e;if(a.map[t])for(var n=a.length;n--;){var i=a[n];i.name===t&&(r?(a.map[t]=r,i.value=r):(delete a.map[t],a.splice(n,1)))}else r&&(a.push({name:t,value:r}),a.map[t]=r)})},U=["source","altsource"],E=function(e,c,u){var s,l=F(),m=w(!1),d=0;return k({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,a=(i=t).map.style,(o=a?M.parseStyle(a):{})["max-width"]=z(n.width),o["max-height"]=z(n.height),N(i,{style:M.serializeStyle(o)});else{switch(e){case"video":case"object":case"embed":case"img":case"iframe":c.height!==undefined&&c.width!==undefined&&N(t,{width:c.width,height:c.height})}if(u)switch(e){case"video":N(t,{poster:c.poster,src:""}),c.altsource&&N(t,{src:""});break;case"iframe":N(t,{src:c.source});break;case"source":if(d<2&&(N(t,{src:c[U[d]],type:c[U[d]+"mime"]}),!c[U[d]]))return;d++;break;case"img":if(!c.poster)return;s=!0}}var n,i,a,o;l.start(e,t,r)},end:function(e){if(!m.get()){if("video"===e&&u)for(var t=0;t<2;t++)if(c[U[t]]){var r=[];r.map={},d<t&&(N(r,{src:c[U[t]],type:c[U[t]+"mime"]}),l.start("source",r,!0))}if(c.poster&&"object"===e&&u&&!s){var n=[];n.map={},N(n,{src:c.poster,width:c.width,height:c.height}),l.start("img",n,!0)}}l.end(e)}},$({})).parse(e),l.getContent()},R=[{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}],L=function(t){var e=R.filter(function(e){return e.regex.test(t)});return 0<e.length?S.extend({},e[0],{url:function(e,t){for(var r,n=(r=t.match(/^(https?:\/\/|www\.)(.+)$/i))&&1<r.length&&"www."!==r[1]?r[1]:"https://",i=e.regex.exec(t),a=n+e.url,o=function(e){a=a.replace("$"+e,function(){return i[e]?i[e]:""})},c=0;c<i.length;c++)o(c);return a.replace(/\?$/,"")}(e[0],t)}):null},I=function(r,e){var n=S.extend({},e);if(!n.source&&(S.extend(n,P(O(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=D(n.source),n.altsourcemime=D(n.altsource),n.poster=r.convertURL(n.poster,"poster");var t=L(n.source);if(t&&(n.source=t.url,n.type=t.type,n.allowFullscreen=t.allowFullscreen,n.width=n.width||String(t.w),n.height=n.height||String(t.h)),n.embed)return E(n.embed,n,!0);var i=A(O(r),n.source);i&&(n.type="script",n.width=String(i.width),n.height=String(i.height));var a,o,c,u,s,l,m,d,h=r.getParam("audio_template_callback"),f=r.getParam("video_template_callback");return n.width=n.width||"300",n.height=n.height||"150",S.each(n,function(e,t){n[t]=r.dom.encode(""+e)}),"iframe"===n.type?(d=(m=n).allowFullscreen?' allowFullscreen="1"':"",'<iframe src="'+m.source+'" width="'+m.width+'" height="'+m.height+'"'+d+"></iframe>"):"application/x-shockwave-flash"===n.sourcemime?(l='<object data="'+(s=n).source+'" width="'+s.width+'" height="'+s.height+'" type="application/x-shockwave-flash">',s.poster&&(l+='<img src="'+s.poster+'" width="'+s.width+'" height="'+s.height+'" />'),l+="</object>"):-1!==n.sourcemime.indexOf("audio")?(c=n,(u=h)?u(c):'<audio controls="controls" src="'+c.source+'">'+(c.altsource?'\n<source src="'+c.altsource+'"'+(c.altsourcemime?' type="'+c.altsourcemime+'"':"")+" />\n":"")+"</audio>"):"script"===n.type?'<script src="'+n.source+'"><\/script>':(a=n,(o=f)?o(a):'<video width="'+a.width+'" height="'+a.height+'"'+(a.poster?' poster="'+a.poster+'"':"")+' controls="controls">\n<source src="'+a.source+'"'+(a.sourcemime?' type="'+a.sourcemime+'"':"")+" />\n"+(a.altsource?'<source src="'+a.altsource+'"'+(a.altsourcemime?' type="'+a.altsourcemime+'"':"")+" />\n":"")+"</video>")},q=tinymce.util.Tools.resolve("tinymce.util.Promise"),B={},W=function(t){return function(e){return I(t,e)}},G=function(e,t){var r,n,i,a,o,c=e.getParam("media_url_resolver");return c?(i=t,a=W(e),o=c,new q(function(t,e){var r=function(e){return e.html&&(B[i.source]=e),t({url:i.source,html:e.html?e.html:a(i)})};B[i.source]?r(B[i.source]):o({url:i.source},r,e)})):(r=t,n=W(e),new q(function(e){e({html:n(r),url:r.source})}))},H=function(a,o,c){return function(e){var t,r=function(){return x(a,e)},n=function(){return x(o,e)},i=function(e){return x(e,"value").bind(function(e){return 0<e.length?l.some(e):l.none()})};return(t={})[e]=(e===c?r().bind(function(e){return h(e)?i(e).orThunk(n):n().orThunk(function(){return l.from(e)})}):n().orThunk(function(){return r().bind(function(e){return h(e)?i(e):l.from(e)})})).getOr(""),t}},J=function(e,t){var r,n,i=t?x(e,t).bind(function(e){return x(e,"meta")}).getOr({}):{},a=H(e,i,t);return p(p(p(p(p({},a("source")),a("altsource")),a("poster")),a("embed")),(r=i,n={},x(e,"dimensions").each(function(e){f(["width","height"],function(t){x(r,t).orThunk(function(){return x(e,t)}).each(function(e){return n[t]=e})})}),n))},K=function(e){var n=p(p({},e),{source:{value:x(e,"source").getOr("")},altsource:{value:x(e,"altsource").getOr("")},poster:{value:x(e,"poster").getOr("")}});return f(["width","height"],function(r){x(e,r).each(function(e){var t=n.dimensions||{};t[r]=e,n.dimensions=t})}),n},Q=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})}},V=function(e,t){return P(O(e),t)},X=function(i,a){return function(e){if(d(e.url)&&0<e.url.trim().length){var t=e.html,r=V(a,t),n=p(p({},r),{source:e.url,embed:t});i.setData(K(n))}}},Y=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()},Z=function(e,t,r){var n;t.embed=E(t.embed,t),t.embed&&(e.source===t.source||(n=t.source,B.hasOwnProperty(n)))?Y(r,t.embed):G(r,t).then(function(e){Y(r,e.html)})["catch"](Q(r))},ee=function(m){var e,t,r,n,i=(r=(e=m).selection.getNode(),n=(t=r).getAttribute("data-mce-object")||t.getAttribute("data-ephox-embed-iri")?e.serializer.serialize(r,{selection:!0}):"",p({embed:n},P(O(e),n))),d=w(i),a=K(i),o={title:"General",name:"general",items:function(e){for(var t=[],r=0,n=e.length;r<n;++r){if(!g(e[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+e);v.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}]:[]])},c={title:"Embed",items:[{type:"textarea",name:"embed",label:"Paste your embed code below:"}]},u=[];m.getParam("media_alt_source",!0)&&u.push({name:"altsource",type:"urlinput",filetype:"media",label:"Alternative source URL"}),m.getParam("media_poster",!0)&&u.push({name:"poster",type:"urlinput",filetype:"image",label:"Media poster (Image URL)"});var s={title:"Advanced",name:"advanced",items:u},l=[o,c];0<u.length&&l.push(s);var h={type:"tabpanel",tabs:l},f=m.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=J(e.getData());Z(d.get(),t,m),e.close()},onChange:function(e,t){switch(t.name){case"source":s=d.get(),l=J(e.getData(),"source"),s.source!==l.source&&(X(f,m)({url:l.source,html:""}),G(m,l).then(X(f,m))["catch"](Q(m)));break;case"embed":c=J((o=e).getData()),u=V(m,c.embed),o.setData(K(u));break;case"dimensions":case"altsource":case"poster":r=e,n=t.name,i=J(r.getData(),n),a=I(m,i),r.setData(K(p(p({},i),{embed:a})))}var r,n,i,a,o,c,u,s,l;d.set(J(e.getData()))},initialData:a})},te=tinymce.util.Tools.resolve("tinymce.html.Node"),re=tinymce.util.Tools.resolve("tinymce.Env"),ne=function(a,e){if(!1===a.getParam("media_filter_html",!0))return e;var o,c=F();return k({validate:!1,allow_conditional_comments:!1,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){if(o=!0,"script"!==e&&"noscript"!==e&&"svg"!==e){for(var n=t.length-1;0<=n;n--){var i=t[n].name;0===i.indexOf("on")&&(delete t.map[i],t.splice(n,1)),"style"===i&&(t[n].value=a.dom.serializeStyle(a.dom.parseStyle(t[n].value),e))}c.start(e,t,r),o=!1}},end:function(e){o||c.end(e)}},$({})).parse(e),c.getContent()},ie=function(e,t,r){var n,i,a,o,c;for(o=(a=t.attributes).length;o--;)n=a[o].name,i=a[o].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(ne(e,c))),r.firstChild=null)},ae=function(e){for(;e=e.parent;)if(e.attr("data-ephox-embed-iri")||(t=e.attr("class"))&&/\btiny-pageembed\b/.test(t))return!0;var t;return!1},oe=function(f){return function(e){for(var t,r,n,i,a,o,c,u,s,l,m,d,h=e.length;h--;)(t=e[h]).parent&&(t.parent.attr("data-mce-object")||"script"===t.name&&!(r=A(O(f),t.attr("src")))||(r&&(r.width&&t.attr("width",r.width.toString()),r.height&&t.attr("height",r.height.toString())),"iframe"===t.name&&f.getParam("media_live_embeds",!0)&&re.ceFalse?ae(t)||t.replace((c=f,m=l=s=void 0,d=(u=t).name,(s=new te("span",1)).attr({contentEditable:"false",style:u.attr("style"),"data-mce-object":d,"class":"mce-preview-object mce-object-"+d}),ie(c,u,s),(l=new te(d,1)).attr({src:u.attr("src"),allowfullscreen:u.attr("allowfullscreen"),style:u.attr("style"),"class":u.attr("class"),width:u.attr("width"),height:u.attr("height"),frameborder:"0"}),(m=new te("span",1)).attr("class","mce-shim"),s.append(l),s.append(m),s)):ae(t)||t.replace((n=f,a=void 0,o=(i=t).name,(a=new te("img",1)).shortEnded=!0,ie(n,i,a),a.attr({width:i.attr("width")||"300",height:i.attr("height")||("audio"===o?"30":"150"),style:i.attr("style"),src:re.transparentSrc,"data-mce-object":o,"class":"mce-object mce-object-"+o}),a))))}},ce=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 ue(){n.add("media",function(e){var t,d,r,n;return(t=e).addCommand("mceMedia",function(){ee(t)}),ce(e),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();S.each("video audio iframe object".split(" "),function(e){t[e]=new RegExp("</"+e+"[^>]*>","gi")});var r=d.schema.getBoolAttrs();S.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(e){r[e]={}}),d.parser.addNodeFilter("iframe,video,audio,object,embed,script",oe(d)),d.serializer.addAttributeFilter("data-mce-object",function(e,t){for(var r,n,i,a,o,c,u,s,l=e.length;l--;)if((r=e[l]).parent){for(u=r.attr(t),n=new te(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=(a=r.attributes).length;i--;){var m=a[i].name;0===m.indexOf("data-mce-p-")&&n.attr(m.substr(11),a[i].value)}"script"===u&&n.attr("type","text/javascript"),(o=r.attr("data-mce-html"))&&((c=new te("#text",3)).raw=!0,c.value=ne(d,unescape(o)),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>')})}),(r=e).on("click keyup touchend",function(){var e=r.selection.getNode();e&&r.dom.hasClass(e,"mce-preview-object")&&r.dom.getAttrib(e,"data-mce-selected")&&e.setAttribute("data-mce-selected","2")}),r.on("ObjectSelected",function(e){var t=e.target.getAttribute("data-mce-object");"audio"!==t&&"script"!==t||e.preventDefault()}),r.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(E(t,{width:String(e.width),height:String(e.height)}))))}),n=e,{showDialog:function(){ee(n)}}})}()}();
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(n,e){for(var a="",o=0;o<e;o++)a+=n;return a},r=function(n,e){var a,o=n.getParam("nonbreaking_wrap",!0,"boolean")||n.plugins.visualchars?'<span class="'+((a=n).plugins.visualchars&&a.plugins.visualchars.isEnabled()?"mce-nbsp-wrap mce-nbsp":"mce-nbsp-wrap")+'" contenteditable="false">'+i("&nbsp;",e)+"</span>":i("&nbsp;",e);n.undoManager.transact(function(){return n.insertContent(o)})},c=tinymce.util.Tools.resolve("tinymce.util.VK");!function e(){n.add("nonbreaking",function(n){var e,a,o,i,t;(e=n).addCommand("mceNonBreaking",function(){r(e,1)}),(a=n).ui.registry.addButton("nonbreaking",{icon:"non-breaking",tooltip:"Nonbreaking space",onAction:function(){return a.execCommand("mceNonBreaking")}}),a.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:function(){return a.execCommand("mceNonBreaking")}}),0<(t="boolean"==typeof(i=(o=n).getParam("nonbreaking_force_tab",0))?!0===i?3:0:i)&&o.on("keydown",function(n){if(n.keyCode===c.TAB&&!n.isDefaultPrevented()){if(n.shiftKey)return;n.preventDefault(),n.stopImmediatePropagation(),r(o,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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Tools"),u=function(t){return t.getParam("noneditable_noneditable_class","mceNonEditable")},f=function(n){return function(t){return-1!==(" "+t.attr("class")+" ").indexOf(n)}},s=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=" "+l.trim(n.getParam("noneditable_editable_class","mceEditable"))+" ",e=" "+l.trim(u(n))+" ";var a,i=f(t),o=f(e),c=(a=n.getParam("noneditable_regexp",[]))&&a.constructor===RegExp?[a]:a;n.on("PreInit",function(){0<c.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],s(t,a,u(t)));e.content=a}}(n,c,t)}),n.parser.addAttributeFilter("class",function(t){for(var n,e=t.length;e--;)n=t[e],i(n)?n.attr(r,"true"):o(n)&&n.attr(r,"false")}),n.serializer.addAttributeFilter(r,function(t){for(var n,e=t.length;e--;)n=t[e],(i(n)||o(n))&&(0<c.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)})}()}();
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.Env"),c=function(){return"mce-pagebreak"},g=function(){return'<img src="'+a.transparentSrc+'" class="'+c()+'" data-mce-resize="false" data-mce-placeholder />'};!function n(){e.add("pagebreak",function(e){var a,n,o,i,t,r;(a=e).addCommand("mcePageBreak",function(){a.settings.pagebreak_split_block?a.insertContent("<p>"+g()+"</p>"):a.insertContent(g())}),(n=e).ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:function(){return n.execCommand("mcePageBreak")}}),n.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:function(){return n.execCommand("mcePageBreak")}}),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,g())}),o.on("PreInit",function(){o.serializer.addNodeFilter("img",function(e){for(var a,n,t=e.length;t--;)if((n=(a=e[t]).attr("class"))&&-1!==n.indexOf("mce-pagebreak")){var r=a.parent;if(o.schema.getBlockElements()[r.name]&&o.getParam("pagebreak_split_block",!1)){r.type=3,r.value=i,r.raw=!0,a.remove();continue}a.type=3,a.value=i,a.raw=!0}})}),(r=e).on("ResolveName",function(e){"IMG"===e.target.nodeName&&r.dom.hasClass(e.target,c())&&(e.name="pagebreak")})})}()}();
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(y){"use strict";var e,t,n,r,p=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},c=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(e,t){return e.fire("PastePlainTextToggle",{state:t})},f=function(n,r){n.addCommand("mceTogglePlainTextPaste",function(){var e,t;e=n,"text"===(t=r).pasteFormat.get()?(t.pasteFormat.set("html"),i(e,!1)):(t.pasteFormat.set("text"),i(e,!0)),e.focus()}),n.addCommand("mceInsertClipboardContent",function(e,t){t.content&&r.pasteHtml(t.content,t.internal),t.text&&r.pasteText(t.text)})},o=function(e){return function(){return e}},a=o(!1),s=o(!0),u=function(){return l},l=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:a,isSome:a,isNone:s,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(undefined),or:n,orThunk:t,map:u,each:function(){},bind:u,exists:a,forall:s,filter:u,equals:e,equals_:e,toArray:function(){return[]},toString:o("none()")}),d=function(n){var e=o(n),t=function(){return i},r=function(e){return e(n)},i={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:s,isNone:a,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return d(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?i:l},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(a,function(e){return t(n,e)})}};return i},g={some:d,none:u,from:function(e){return null===e||e===undefined?l:d(e)}},m=(r="function",function(e){return typeof e===r}),v=Array.prototype.slice,h=function(e,t){for(var n=e.length,r=new Array(n),i=0;i<n;i++){var o=e[i];r[i]=t(o,i)}return r},b=function(e,t){for(var n=0,r=e.length;n<r;n++){t(e[n],n)}},x=m(Array.from)?Array.from:function(e){return v.call(e)},w=tinymce.util.Tools.resolve("tinymce.Env"),P=tinymce.util.Tools.resolve("tinymce.util.Delay"),_=tinymce.util.Tools.resolve("tinymce.util.Promise"),T=tinymce.util.Tools.resolve("tinymce.util.Tools"),C=tinymce.util.Tools.resolve("tinymce.util.VK"),D="x-tinymce/html",k="\x3c!-- "+D+" --\x3e",S=function(e){return-1!==e.indexOf(k)},O=tinymce.util.Tools.resolve("tinymce.html.Entities"),R=function(e,t,n){var r=e.split(/\n\n/),i=function(e,t){var n,r=[],i="<"+e;if("object"==typeof t){for(n in t)t.hasOwnProperty(n)&&r.push(n+'="'+O.encodeAllRaw(t[n])+'"');r.length&&(i+=" "+r.join(" "))}return i+">"}(t,n),o="</"+t+">",a=T.map(r,function(e){return e.split(/\n/).join("<br />")});return 1===a.length?a[0]:T.map(a,function(e){return i+e+o}).join("")},A=tinymce.util.Tools.resolve("tinymce.html.DomParser"),I=tinymce.util.Tools.resolve("tinymce.html.Serializer"),E=tinymce.util.Tools.resolve("tinymce.html.Node"),F=tinymce.util.Tools.resolve("tinymce.html.Schema"),M=function(e){return e.getParam("paste_data_images",!1)},N=function(e){return e.getParam("paste_retain_style_properties")},B="\xa0";function $(t,e){return T.each(e,function(e){t=e.constructor===RegExp?t.replace(e,""):t.replace(e[0],e[1])}),t}function H(e){var t=F(),n=A({},t),r="",i=t.getShortEndedElements(),o=T.makeMap("script noscript style textarea video audio iframe object"," "),a=t.getBlockElements();return e=$(e,[/<!\[[^\]]+\]>/g]),function s(e){var t=e.name,n=e;if("br"!==t){if("wbr"!==t)if(i[t]&&(r+=" "),o[t])r+=" ";else{if(3===e.type&&(r+=e.value),!e.shortEnded&&(e=e.firstChild))for(;s(e),e=e.next;);a[t]&&n.next&&(r+="\n","p"===t&&(r+="\n"))}}else r+="\n"}(n.parse(e)),r}function j(e){return e=$(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function r(e,t,n){return t||n?B:" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])}var L=function(){return-1!==y.navigator.userAgent.indexOf(" Edge/")};function z(e){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(e)||/class="OutlineElement/.test(e)||/id="?docs\-internal\-guid\-/.test(e)}function U(t){var n,e;return e=[/^[IVXLMCD]{1,2}\.[ \u00a0]/,/^[ivxlmcd]{1,2}\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],t=t.replace(/^[\u00a0 ]+/,""),T.each(e,function(e){if(e.test(t))return!(n=!0)}),n}function q(e){var o,a,s=1;function n(e){var t="";if(3===e.type)return e.value;if(e=e.firstChild)for(;t+=n(e),e=e.next;);return t}function u(e,t){if(3!==e.type||!t.test(e.value)){if(e=e.firstChild)do{if(!u(e,t))return}while(e=e.next);return 1}e.value=e.value.replace(t,"")}function t(e,t,n){var r=e._listLevel||s;r!==s&&(o=r<s?o&&o.parent.parent:(a=o,null)),o&&o.name===t?o.append(e):(a=a||o,o=new E(t,1),1<n&&o.attr("start",""+n),e.wrap(o)),e.name="li",s<r&&a&&a.lastChild.append(o),s=r,function i(e){if(e._listIgnore)e.remove();else if(e=e.firstChild)for(;i(e),e=e.next;);}(e),u(e,/^\u00a0+/),u(e,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),u(e,/^\u00a0+/)}for(var r=[],i=e.firstChild;null!=i;)if(r.push(i),null!==(i=i.walk()))for(;void 0!==i&&i.parent!==e;)i=i.walk();for(var l=0;l<r.length;l++)if("p"===(e=r[l]).name&&e.firstChild){var c=n(e);if(/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(c)){t(e,"ul");continue}if(U(c)){var f=/([0-9]+)\./.exec(c),d=1;f&&(d=parseInt(f[1],10)),t(e,"ol",d);continue}if(e._listLevel){t(e,"ul",1);continue}o=null}else a=o,o=null}function V(n,r,i,o){var a,s={},e=n.dom.parseStyle(o);return T.each(e,function(e,t){switch(t){case"mso-list":(a=/\w+ \w+([0-9]+)/i.exec(o))&&(i._listLevel=parseInt(a[1],10)),/Ignore/i.test(e)&&i.firstChild&&(i._listIgnore=!0,i.firstChild._listIgnore=!0);break;case"horiz-align":t="text-align";break;case"vert-align":t="vertical-align";break;case"font-color":case"mso-foreground":t="color";break;case"mso-background":case"mso-highlight":t="background";break;case"font-weight":case"font-style":return void("normal"!==e&&(s[t]=e));case"mso-element":if(/^(comment|comment-list)$/i.test(e))return void i.remove()}0!==t.indexOf("mso-comment")?0!==t.indexOf("mso-")&&("all"===N(n)||r&&r[t])&&(s[t]=e):i.remove()}),/(bold)/i.test(s["font-weight"])&&(delete s["font-weight"],i.wrap(new E("b",1))),/(italic)/i.test(s["font-style"])&&(delete s["font-style"],i.wrap(new E("i",1))),(s=n.dom.serializeStyle(s,i.name))||null}var K=function(e,t){return e.getParam("paste_enable_default_filters",!0)?function(r,e){var t,i;(t=N(r))&&(i=T.makeMap(t.split(/[, ]/))),e=$(e,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi,B],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(e,t){return 0<t.length?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join(B):""}]]);var n=r.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody"),o=F({valid_elements:n,valid_children:"-li[p]"});T.each(o.elements,function(e){e.attributes["class"]||(e.attributes["class"]={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))});var a=A({},o);a.addAttributeFilter("style",function(e){for(var t,n=e.length;n--;)(t=e[n]).attr("style",V(r,i,t,t.attr("style"))),"span"===t.name&&t.parent&&!t.attributes.length&&t.unwrap()}),a.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)n=(t=e[r]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&t.remove(),t.attr("class",null)}),a.addNodeFilter("del",function(e){for(var t=e.length;t--;)e[t].remove()}),a.addNodeFilter("a",function(e){for(var t,n,r,i=e.length;i--;)if(n=(t=e[i]).attr("href"),r=t.attr("name"),n&&-1!==n.indexOf("#_msocom_"))t.remove();else if(n&&0===n.indexOf("file://")&&(n=(n=n.split("#")[1])&&"#"+n),n||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){t.unwrap();continue}t.attr({href:n,name:r})}else t.unwrap()});var s=a.parse(e);return r.getParam("paste_convert_word_fake_lists",!0)&&q(s),e=I({validate:r.settings.validate},o).serialize(s)}(e,t):t},X=function(e,t){return{content:e,cancelled:t}},W=function(e,t,n,r){var i,o,a,s,u,l,c,f,d,m,p,g,v=(i=t,o=n,a=r,e.fire("PastePreProcess",{content:i,internal:o,wordContent:a})),h=function(e,t){var n=A({},e.schema);n.addNodeFilter("meta",function(e){T.each(e,function(e){return e.remove()})});var r=n.parse(t,{forced_root_block:!1,isRootContent:!0});return I({validate:e.settings.validate},e.schema).serialize(r)}(e,v.content);return e.hasEventListeners("PastePostProcess")&&!v.isDefaultPrevented()?(u=h,l=n,c=r,p=(s=e).dom.create("div",{style:"display:none"},u),f=p,d=l,m=c,g=s.fire("PastePostProcess",{node:f,internal:d,wordContent:m}),X(g.node.innerHTML,g.isDefaultPrevented())):X(h,v.isDefaultPrevented())},Y=function(e,t){return e.insertContent(t,{merge:e.getParam("paste_merge_formats",!0),paste:!0}),!0},Z=function(e){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(e)},G=function(e){return Z(e)&&/.(gif|jpe?g|png)$/.test(e)},J=function(e,t,n){return!(!1!==e.selection.isCollapsed()||!Z(t))&&(i=t,o=n,(r=e).undoManager.extra(function(){o(r,i)},function(){r.execCommand("mceInsertLink",!1,i)}),!0);var r,i,o},Q=function(e,t,n){return!!G(t)&&(i=t,o=n,(r=e).undoManager.extra(function(){o(r,i)},function(){r.insertContent('<img src="'+i+'">')}),!0);var r,i,o},ee=function(e,t,n){var r,i;n||!1===e.getParam("smart_paste",!0)?Y(e,t):(r=e,i=t,T.each([J,Q,Y],function(e){return!0!==e(r,i,Y)}))},te=function(e){return"\n"===e||"\r"===e},ne=function(i){var t,n;return(n={pcIsSpace:!(t=function(e,t){return-1!==" \f\t\x0B".indexOf(t)||t===B?e.pcIsSpace||""===e.str||e.str.length===i.length-1||(n=i,(r=e.str.length+1)<n.length&&0<=r&&te(n[r]))?{pcIsSpace:!1,str:e.str+B}:{pcIsSpace:!0,str:e.str+" "}:{pcIsSpace:te(t),str:e.str+t};var n,r}),str:""},b(i,function(e){n=t(n,e)}),n).str},re=function(e,t,n,r){var i,o,a,s,u,l=(i=e,a=n,s=z(o=t),u=s?K(i,o):o,W(i,u,a,s));!1===l.cancelled&&ee(e,l.content,r)},ie=function(e,t,n){var r=n||S(t);re(e,t.replace(k,""),r,!1)},oe=function(e,t){var n,r,i,o=e.dom.encode(t).replace(/\r\n/g,"\n"),a=ne(o),s=(n=a,r=e.settings.forced_root_block,i=e.settings.forced_root_block_attrs,r?R(n,!0===r?"p":r,i):n.replace(/\r?\n/g,"<br>"));re(e,s,!1,!0)},ae=function(e){var t={};if(e){if(e.getData){var n=e.getData("Text");n&&0<n.length&&-1===n.indexOf("data:text/mce-internal,")&&(t["text/plain"]=n)}if(e.types)for(var r=0;r<e.types.length;r++){var i=e.types[r];try{t[i]=e.getData(i)}catch(o){t[i]=""}}}return t},se=function(e,t){return t in e&&0<e[t].length},ue=function(e){return se(e,"text/html")||se(e,"text/plain")},le=function Be(e){var t=0;return function(){return e+t++}}("mceclip"),ce=function(e,t){var n,r,i,o,a,s,u,l=(n=t.uri,(r=/data:([^;]+);base64,([a-z0-9\+\/=]+)/i.exec(n))?{type:r[1],data:decodeURIComponent(r[2])}:{type:null,data:null}),c=l.data,f=l.type,d=le(),m=e.settings.images_reuse_filename&&t.blob.name?(i=e,o=t.blob.name,(a=o.match(/([\s\S]+?)\.(?:jpeg|jpg|png|gif)$/i))?i.dom.encode(a[1]):null):d,p=new y.Image;if(p.src=t.uri,s=e.settings,u=p,!s.images_dataimg_filter||s.images_dataimg_filter(u)){var g=e.editorUpload.blobCache,v=void 0,h=g.getByData(c,f);h?v=h:(v=g.create(d,t.blob,c,m),g.add(v)),ie(e,'<img src="'+v.blobUri()+'">',!1)}else ie(e,'<img src="'+t.uri+'">',!1)},fe=function(t,e,n){var r,i,o,a,s="paste"===e.type?e.clipboardData:e.dataTransfer;if(t.settings.paste_data_images&&s){var u=(o=(i=s).items?h(x(i.items),function(e){return e.getAsFile()}):[],a=i.files?x(i.files):[],function(e,t){for(var n=[],r=0,i=e.length;r<i;r++){var o=e[r];t(o,r)&&n.push(o)}return n}(0<o.length?o:a,function(e){return/^image\/(jpeg|png|gif|bmp)$/.test(e.type)}));if(0<u.length)return e.preventDefault(),r=u,_.all(h(r,function(r){return new _(function(e){var t=r.getAsFile?r.getAsFile():r,n=new window.FileReader;n.onload=function(){e({blob:t,uri:n.result})},n.readAsDataURL(t)})})).then(function(e){n&&t.selection.setRng(n),b(e,function(e){ce(t,e)})}),!0}return!1},de=function(e){return C.metaKeyPressed(e)&&86===e.keyCode||e.shiftKey&&45===e.keyCode},me=function(u,l,c){var t,f,d=(t=p(g.none()),{clear:function(){t.set(g.none())},set:function(e){t.set(g.some(e))},isSet:function(){return t.get().isSome()},on:function(e){t.get().each(e)}});function m(e,t,n,r){var i,o,a;se(e,"text/html")?i=e["text/html"]:(i=l.getHtml(),r=r||S(i),l.isDefaultContent(i)&&(n=!0)),i=j(i),l.remove(),o=!1===r&&!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(i),a=G(i),i.length&&(!o||a)||(n=!0),(n||a)&&(i=se(e,"text/plain")&&o?e["text/plain"]:H(i)),l.isDefaultContent(i)?t||u.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):n?oe(u,i):ie(u,i,r)}u.on("keydown",function(e){function t(e){de(e)&&!e.isDefaultPrevented()&&l.remove()}if(de(e)&&!e.isDefaultPrevented()){if((f=e.shiftKey&&86===e.keyCode)&&w.webkit&&-1!==y.navigator.userAgent.indexOf("Version/"))return;if(e.stopImmediatePropagation(),d.set(e),window.setTimeout(function(){d.clear()},100),w.ie&&f)return e.preventDefault(),n=!0,void u.fire("paste",{ieFake:n});l.remove(),l.create(),u.once("keyup",t),u.once("paste",function(){u.off("keyup",t)})}var n});u.on("paste",function(e){var t,n,r,i=d.isSet(),o=(t=u,n=ae(e.clipboardData||t.getDoc().dataTransfer),L()?T.extend(n,{"text/html":""}):n),a="text"===c.get()||f,s=se(o,D);(f=!1,e.isDefaultPrevented()||(r=e.clipboardData,-1!==y.navigator.userAgent.indexOf("Android")&&r&&r.items&&0===r.items.length))?l.remove():ue(o)||!fe(u,e,l.getLastRng()||u.selection.getRng())?(i||e.preventDefault(),!w.ie||i&&!e.ieFake||se(o,"text/html")||(l.create(),u.dom.bind(l.getEl(),"paste",function(e){e.stopPropagation()}),u.getDoc().execCommand("Paste",!1,null),o["text/html"]=l.getHtml()),se(o,"text/html")?(e.preventDefault(),s=s||S(o["text/html"]),m(o,i,a,s)):P.setEditorTimeout(u,function(){m(o,i,a,s)},0)):l.remove()})},pe=function(a,e,t){var s;me(a,e,t),a.parser.addNodeFilter("img",function(e,t,n){var r,i=function(e){e.attr("data-mce-object")||s===w.transparentSrc||e.remove()};if(!a.settings.paste_data_images&&((r=n).data&&!0===r.data.paste))for(var o=e.length;o--;)(s=e[o].attr("src"))&&(0!==s.indexOf("webkit-fake-url")&&(a.settings.allow_html_data_urls||0!==s.indexOf("data:"))||i(e[o]))})},ge=function(e){return w.ie&&e.inline?y.document.body:e.getBody()},ve=function(t,e,n){var r;ge(r=t)!==r.getBody()&&t.dom.bind(e,"paste keyup",function(e){be(t,n)||t.fire("paste")})},he=function(e){return e.dom.get("mcepastebin")},ye=function(e,t){return t===e},be=function(e,t){var n,r=he(e);return(n=r)&&"mcepastebin"===n.id&&ye(t,r.innerHTML)},xe=function(a){var s=p(null),u="%MCEPASTEBIN%";return{create:function(){return t=s,n=u,i=(e=a).dom,o=e.getBody(),t.set(e.selection.getRng()),r=e.dom.add(ge(e),"div",{id:"mcepastebin","class":"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},n),(w.ie||w.gecko)&&i.setStyle(r,"left","rtl"===i.getStyle(o,"direction",!0)?65535:-65535),i.bind(r,"beforedeactivate focusin focusout",function(e){e.stopPropagation()}),ve(e,r,n),r.focus(),void e.selection.select(r,!0);var e,t,n,r,i,o},remove:function(){return function(e,t){if(he(e)){for(var n=void 0,r=t.get();n=e.dom.get("mcepastebin");)e.dom.remove(n),e.dom.unbind(n);r&&e.selection.setRng(r)}t.set(null)}(a,s)},getEl:function(){return he(a)},getHtml:function(){return function(n){var t,e,r,i,o,a=function(e,t){e.appendChild(t),n.dom.remove(t,!0)};for(e=T.grep(ge(n).childNodes,function(e){return"mcepastebin"===e.id}),t=e.shift(),T.each(e,function(e){a(t,e)}),r=(i=n.dom.select("div[id=mcepastebin]",t)).length-1;0<=r;r--)o=n.dom.create("div"),t.insertBefore(o,i[r]),a(o,i[r]);return t?t.innerHTML:""}(a)},getLastRng:function(){return s.get()},isDefault:function(){return be(a,u)},isDefaultContent:function(e){return e===u}}},we=function(e,t,n){if(r=e,!1!==w.iOS||r===undefined||"function"!=typeof r.setData||!0===L())return!1;try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",n),e.setData(D,t),!0}catch(i){return!1}var r},Pe=function(e,t,n,r){we(e.clipboardData,t.html,t.text)?(e.preventDefault(),r()):n(t.html,r)},_e=function(s){return function(e,t){var n=k+e,r=s.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),i=s.dom.create("div",{contenteditable:"true"},n);s.dom.setStyles(r,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),r.appendChild(i),s.dom.add(s.getBody(),r);var o=s.selection.getRng();i.focus();var a=s.dom.createRng();a.selectNodeContents(i),s.selection.setRng(a),P.setTimeout(function(){s.selection.setRng(o),r.parentNode.removeChild(r),t()},0)}},Te=function(e){return{html:e.selection.getContent({contextual:!0}),text:e.selection.getContent({format:"text"})}},Ce=function(e){return!e.selection.isCollapsed()||!!(t=e).dom.getParent(t.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",t.getBody());var t},De=function(e){var t,n;e.on("cut",(t=e,function(e){Ce(t)&&Pe(e,Te(t),_e(t),function(){if(w.browser.isChrome()){var e=t.selection.getRng();P.setEditorTimeout(t,function(){t.selection.setRng(e),t.execCommand("Delete")},0)}else t.execCommand("Delete")})})),e.on("copy",(n=e,function(e){Ce(n)&&Pe(e,Te(n),_e(n),function(){})}))},ke=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Se=function(e,t){return ke.getCaretRangeFromPoint(t.clientX,t.clientY,e.getDoc())},Oe=function(e,t){e.focus(),e.selection.setRng(t)},Re=function(a,s,u){a.getParam("paste_block_drop",!1)&&a.on("dragend dragover draggesture dragdrop drop drag",function(e){e.preventDefault(),e.stopPropagation()}),M(a)||a.on("drop",function(e){var t=e.dataTransfer;t&&t.files&&0<t.files.length&&e.preventDefault()}),a.on("drop",function(e){var t,n;if(n=Se(a,e),!e.isDefaultPrevented()&&!u.get()){t=s.getDataTransferItems(e.dataTransfer);var r,i=s.hasContentType(t,D);if(s.hasHtmlOrText(t)&&(!(r=t["text/plain"])||0!==r.indexOf("file://"))||!s.pasteImageData(e,n))if(n&&a.getParam("paste_filter_drop",!0)){var o=t["mce-internal"]||t["text/html"]||t["text/plain"];o&&(e.preventDefault(),P.setEditorTimeout(a,function(){a.undoManager.transact(function(){t["mce-internal"]&&a.execCommand("Delete"),Oe(a,n),o=j(o),t["text/html"]?s.pasteHtml(o,i):s.pasteText(o)})}))}}}),a.on("dragstart",function(e){u.set(!0)}),a.on("dragover dragend",function(e){M(a)&&!1===u.get()&&(e.preventDefault(),Oe(a,Se(a,e))),"dragend"===e.type&&u.set(!1)})};function Ae(t,n){t.on("PastePreProcess",function(e){e.content=n(t,e.content,e.internal,e.wordContent)})}function Ie(e,t){if(!z(t))return t;var n=[];return T.each(e.schema.getBlockElements(),function(e,t){n.push(t)}),t=$(t,[[new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g"),"$1"]]),t=$(t,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function Ee(e,t,n,r){if(r||n)return t;var l,i=e.getParam("paste_webkit_styles");if(!1===e.getParam("paste_remove_styles_if_webkit",!0)||"all"===i)return t;if(i&&(l=i.split(/[, ]/)),l){var c=e.dom,f=e.selection.getNode();t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(e,t,n,r){var i=c.parseStyle(c.decode(n)),o={};if("none"===l)return t+r;for(var a=0;a<l.length;a++){var s=i[l[a]],u=c.getStyle(f,l[a],!0);/color/.test(l[a])&&(s=c.toHex(s),u=c.toHex(u)),u!==s&&(o[l[a]]=s)}return(o=c.serializeStyle(o,"span"))?t+' style="'+o+'"'+r:t+r})}else t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return t=t.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(e,t,n,r){return t+' style="'+n+'"'+r})}function Fe(n,e){n.$("a",e).find("font,u").each(function(e,t){n.dom.remove(t,!0)})}var Me=function(e){w.webkit&&Ae(e,Ee),w.ie&&(Ae(e,Ie),function r(t,n){t.on("PastePostProcess",function(e){n(t,e.node)})}(e,Fe))},Ne=function(n,r){return function(t){t.setActive("text"===r.pasteFormat.get());var e=function(e){return t.setActive(e.state)};return n.on("PastePlainTextToggle",e),function(){return n.off("PastePlainTextToggle",e)}}};!function $e(){c.add("paste",function(e){if(!1==!(!/(^|[ ,])powerpaste([, ]|$)/.test(e.settings.plugins)||!c.get("powerpaste")||("undefined"!=typeof y.window.console&&y.window.console.log&&y.window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),0))){var t=p(!1),n=p(e.getParam("paste_as_text",!1)?"text":"html"),r=(u=n,l=xe(s=e),s.on("PreInit",function(){return pe(s,l,u)}),{pasteFormat:u,pasteHtml:function(e,t){return ie(s,e,t)},pasteText:function(e){return oe(s,e)},pasteImageData:function(e,t){return fe(s,e,t)},getDataTransferItems:ae,hasHtmlOrText:ue,hasContentType:se}),i=Me(e);return a=r,(o=e).ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:function(){return o.execCommand("mceTogglePlainTextPaste")},onSetup:Ne(o,a)}),o.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:function(){return o.execCommand("mceTogglePlainTextPaste")},onSetup:Ne(o,a)}),f(e,r),function(e){var t=e.plugins.paste,n=e.getParam("paste_preprocess");n&&e.on("PastePreProcess",function(e){n.call(t,t,e)});var r=e.getParam("paste_postprocess");r&&e.on("PastePostProcess",function(e){r.call(t,t,e)})}(e),De(e),Re(e,r,t),{clipboard:r,quirks:i}}var o,a,s,u,l})}()}(window);
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Tools"),m=tinymce.util.Tools.resolve("tinymce.Env"),i=function(e){var t=function(t){var n="",i=t.dom.encode,e=t.getParam("content_style","");n+='<base href="'+i(t.documentBaseURI.getURI())+'">',e&&(n+='<style type="text/css">'+e+"</style>");var o=t.getParam("content_css_cors",!1,"boolean")?' crossorigin="anonymous"':"";l.each(t.contentCSS,function(e){n+='<link type="text/css" rel="stylesheet" href="'+i(t.documentBaseURI.toAbsolute(e))+'"'+o+">"});var r=t.settings.body_id||"tinymce";-1!==r.indexOf("=")&&(r=(r=t.getParam("body_id","","hash"))[t.id]||r);var a=t.settings.body_class||"";-1!==a.indexOf("=")&&(a=(a=t.getParam("body_class","","hash"))[t.id]||"");var c='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A" && !('+(m.mac?"e.metaKey":"e.ctrlKey && !e.altKey")+")) {e.preventDefault();}}}, false);<\/script> ",s=t.getBody().dir,d=s?' dir="'+i(s)+'"':"";return"<!DOCTYPE html><html><head>"+n+'</head><body id="'+i(r)+'" class="mce-content-body '+i(a)+'"'+d+">"+t.getContent()+c+"</body></html>"}(e);e.windowManager.open({title:"Preview",size:"large",body:{type:"panel",items:[{name:"preview",type:"iframe",sandboxed:!0}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{preview:t}}).focus("close")};!function t(){e.add("preview",function(e){var t,n;(t=e).addCommand("mcePreview",function(){i(t)}),(n=e).ui.registry.addButton("preview",{icon:"preview",tooltip:"Preview",onAction:function(){return n.execCommand("mcePreview")}}),n.ui.registry.addMenuItem("preview",{icon:"preview",text:"Preview",onAction:function(){return n.execCommand("mcePreview")}})})}()}();
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=tinymce.util.Tools.resolve("tinymce.Env");!function t(){n.add("print",function(n){var t,i;(t=n).addCommand("mcePrint",function(){e.browser.isIE()?t.getDoc().execCommand("print",!1,null):t.getWin().print()}),(i=n).ui.registry.addButton("print",{icon:"print",tooltip:"Print",onAction:function(){return i.execCommand("mcePrint")}}),i.ui.registry.addMenuItem("print",{text:"Print...",icon:"print",onAction:function(){return i.execCommand("mcePrint")}}),n.addShortcut("Meta+P","","mcePrint")})}()}();
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(c){"use strict";var e,t,n,r,o=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=0,l=function(e,t,n){var r,o,i,u;o=(r=e.editorUpload.blobCache).create((i="mceu",u=(new Date).getTime(),i+"_"+Math.floor(1e9*Math.random())+ ++a+String(u)),n,t),r.add(o),e.insertContent(e.dom.createHTML("img",{src:o.blobUri()}))},f=tinymce.util.Tools.resolve("tinymce.util.Promise"),s=tinymce.util.Tools.resolve("tinymce.Env"),d=tinymce.util.Tools.resolve("tinymce.util.Delay"),i=function(u){u.ui.registry.addButton("quickimage",{icon:"image",tooltip:"Insert image",onAction:function(){var i;i=u,new f(function(n){var r=c.document.createElement("input");r.type="file",r.accept="image/*",r.style.position="fixed",r.style.left="0",r.style.top="0",r.style.opacity="0.001",c.document.body.appendChild(r),r.addEventListener("change",function(e){n(Array.prototype.slice.call(e.target.files))});var o=function(e){var t=function(){n([]),r.parentNode.removeChild(r)};s.os.isAndroid()&&"remove"!==e.type?d.setEditorTimeout(i,t,0):t(),i.off("focusin remove",o)};i.on("focusin remove",o),r.click()}).then(function(e){if(0<e.length){var t=e[0];n=t,new f(function(e){var t=new c.FileReader;t.onloadend=function(){e(t.result.split(",")[1])},t.readAsDataURL(n)}).then(function(e){l(u,e,t)})}var n})}}),u.ui.registry.addButton("quicktable",{icon:"table",tooltip:"Insert table",onAction:function(){var e,t,n,r,o,i;n=t=2,(e=u).plugins.table?e.plugins.table.insertTable(t,n):(o=t,i=n,(r=e).undoManager.transact(function(){var e,t;r.insertContent(function(e,t){var n,r,o;for(o='<table data-mce-id="mce" style="width: 100%">',o+="<tbody>",r=0;r<t;r++){for(o+="<tr>",n=0;n<e;n++)o+="<td><br></td>";o+="</tr>"}return o+="</tbody>",o+="</table>"}(o,i)),(e=r.dom.select("*[data-mce-id]")[0]).removeAttribute("data-mce-id"),t=r.dom.select("td,th",e),r.selection.setCursorLocation(t[0],0)}))}})},u=function(e){return function(){return e}},m=u(!1),g=u(!0),h=function(){return p},p=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:m,isSome:m,isNone:g,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(undefined),or:n,orThunk:t,map:h,each:function(){},bind:h,exists:m,forall:g,filter:h,equals:e,equals_:e,toArray:function(){return[]},toString:u("none()")}),b=function(n){var e=u(n),t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:g,isNone:m,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return b(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?o:p},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(m,function(e){return t(n,e)})}};return o},v={some:b,none:h,from:function(e){return null===e||e===undefined?p:b(e)}},y=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:u(e)}},w={fromHtml:function(e,t){var n=(t||c.document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw c.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return y(n.childNodes[0])},fromTag:function(e,t){var n=(t||c.document).createElement(e);return y(n)},fromText:function(e,t){var n=(t||c.document).createTextNode(e);return y(n)},fromDom:y,fromPoint:function(e,t,n){var r=e.dom();return v.from(r.elementFromPoint(t,n)).map(y)}},k=("undefined"!=typeof c.window?c.window:Function("return this;")(),function(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}}),T=function(t){return function(e){return typeof e===t}},N=k("string"),q=k("object"),E=k("array"),M=T("boolean"),S=(r=undefined,function(e){return r===e}),C=T("function");function O(e,t,n,r,o){return e(n,r)?v.some(n):C(o)&&o(n)?v.none():t(n,r,o)}var x,A=function(e,t){var n=e.dom();if(1!==n.nodeType)return!1;var r=n;if(r.matches!==undefined)return r.matches(t);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(t);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(t);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},D=function(e,t,n){for(var r=e.dom(),o=C(n)?n:u(!1);r.parentNode;){r=r.parentNode;var i=w.fromDom(r);if(t(i))return v.some(i);if(o(i))break}return v.none()},_=function(e,t,n){return D(e,function(e){return A(e,t)},n)},L=(x=N,function(e,t,n){return function(e,t){if(!t(e))throw new Error("Default value doesn't match requested type.")}(n,x),function(e,t){if(E(e)||q(e))throw new Error("expected a string but found: "+e);return S(e)?t:M(e)?!1===e?"":t:e}(e.getParam(t,n),n)}),P=function(o){var e=L(o,"quickbars_insert_toolbar","quickimage quicktable");0<e.trim().length&&o.ui.registry.addContextToolbar("quickblock",{predicate:function(e){var t=w.fromDom(e),n=o.schema.getTextBlockElements(),r=function(e){return e.dom()===o.getBody()};return O(function(e,t){return A(e,t)},_,t,"table",r).fold(function(){return O(function(e,t){return t(e)},D,t,function(e){return e.dom().nodeName.toLowerCase()in n&&o.dom.isEmpty(e.dom())},r).isSome()},function(){return!1})},items:e,position:"line",scope:"editor"})},U=function(n){var r=function(e){return"IMG"===e.nodeName||"FIGURE"===e.nodeName&&/image/i.test(e.className)},e=L(n,"quickbars_image_toolbar","alignleft aligncenter alignright");0<e.trim().length&&n.ui.registry.addContextToolbar("imageselection",{predicate:r,items:e,position:"node"});var t=L(n,"quickbars_selection_toolbar","bold italic | quicklink h2 h3 blockquote");0<t.trim().length&&n.ui.registry.addContextToolbar("textselection",{predicate:function(e){return!r(e)&&!n.selection.isCollapsed()&&(t=e,"false"!==n.dom.getContentEditableParent(t));var t},items:t,position:"selection",scope:"editor"})};!function B(){o.add("quickbars",function(e){i(e),P(e),U(e)})}()}(window);
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(e){return e.getParam("save_enablewhendirty",!0)},c=function(e,n){e.notificationManager.open({text:n,type:"error"})},t=function(t){t.addCommand("mceSave",function(){!function(e){var n;if(n=o.DOM.getParent(e.id,"form"),!i(e)||e.isDirty()){if(e.save(),e.getParam("save_onsavecallback"))return e.execCallback("save_onsavecallback",e),e.nodeChanged();n?(e.setDirty(!1),n.onsubmit&&!n.onsubmit()||("function"==typeof n.submit?n.submit():c(e,"Error: Form submit field collision.")),e.nodeChanged()):c(e,"Error: No form element found.")}}(t)}),t.addCommand("mceCancel",function(){var e,n;e=t,n=a.trim(e.startContent),e.getParam("save_oncancelcallback")?e.execCallback("save_oncancelcallback",e):e.resetContent(n)})},r=function(t){return function(e){var n=function(){e.setDisabled(i(t)&&!t.isDirty())};return t.on("NodeChange dirty",n),function(){return t.off("NodeChange dirty",n)}}};!function n(){e.add("save",function(e){var n;(n=e).ui.registry.addButton("save",{icon:"save",tooltip:"Save",disabled:!0,onAction:function(){return n.execCommand("mceSave")},onSetup:r(n)}),n.ui.registry.addButton("cancel",{icon:"cancel",tooltip:"Cancel",disabled:!0,onAction:function(){return n.execCommand("mceCancel")},onSetup:r(n)}),n.addShortcut("Meta+S","","mceSave"),t(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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(c){"use strict";var e,t,n,r,d=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},o=tinymce.util.Tools.resolve("tinymce.PluginManager"),h=function(){return(h=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)},i=function(e){return function(){return e}},a=i(!1),m=i(!0),u=i("[!-#%-*,-\\/:;?@\\[-\\]_{}\xa1\xab\xb7\xbb\xbf;\xb7\u055a-\u055f\u0589\u058a\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u0609\u060a\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964\u0965\u0970\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f3a-\u0f3d\u0f85\u0fd0-\u0fd4\u0fd9\u0fda\u104a-\u104f\u10fb\u1361-\u1368\u1400\u166d\u166e\u169b\u169c\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u180a\u1944\u1945\u1a1e\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e\u1c7f\u1cd3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205e\u207d\u207e\u208d\u208e\u3008\u3009\u2768-\u2775\u27c5\u27c6\u27e6-\u27ef\u2983-\u2998\u29d8-\u29db\u29fc\u29fd\u2cf9-\u2cfc\u2cfe\u2cff\u2d70\u2e00-\u2e2e\u2e30\u2e31\u3001-\u3003\u3008-\u3011\u3014-\u301f\u3030\u303d\u30a0\u30fb\ua4fe\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce\ua8cf\ua8f8-\ua8fa\ua92e\ua92f\ua95f\ua9c1-\ua9cd\ua9de\ua9df\uaa5c-\uaa5f\uaade\uaadf\uabeb\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe61\ufe63\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff0a\uff0c-\uff0f\uff1a\uff1b\uff1f\uff20\uff3b-\uff3d\uff3f\uff5b\uff5d\uff5f-\uff65]"),l=function(){return f},f=(e=function(e){return e.isNone()},{fold:function(e,t){return e()},is:a,isSome:a,isNone:m,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(undefined),or:n,orThunk:t,map:l,each:function(){},bind:l,exists:a,forall:m,filter:l,equals:e,equals_:e,toArray:function(){return[]},toString:i("none()")}),s=function(n){var e=i(n),t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:m,isNone:a,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return s(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?o:f},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(a,function(e){return t(n,e)})}};return o},g={some:s,none:l,from:function(e){return null===e||e===undefined?f:s(e)}},p=u,v=tinymce.util.Tools.resolve("tinymce.util.Tools"),y=function(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}},x=function(t){return function(e){return typeof e===t}},w=y("string"),b=y("array"),O=x("boolean"),C=x("number"),T=Array.prototype.slice,N=Array.prototype.push,E=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r},k=function(e,t){for(var n=0,r=e.length;n<r;n++){t(e[n],n)}},S=function(e,t){for(var n=e.length-1;0<=n;n--){t(e[n],n)}},A=function(e,t){return function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!b(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);N.apply(t,e[n])}return t}(E(e,t))},D=Object.hasOwnProperty,M=function(e,t){return D.call(e,t)},B=("undefined"!=typeof c.window?c.window:Function("return this;")(),r=3,function(e){return e.dom().nodeType===r}),I=function(e,t,n){!function(e,t,n){if(!(w(n)||O(n)||C(n)))throw c.console.error("Invalid call to Attr.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")}(e.dom(),t,n)},P=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:i(e)}},F={fromHtml:function(e,t){var n=(t||c.document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw c.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return P(n.childNodes[0])},fromTag:function(e,t){var n=(t||c.document).createElement(e);return P(n)},fromText:function(e,t){var n=(t||c.document).createTextNode(e);return P(n)},fromDom:P,fromPoint:function(e,t,n){var r=e.dom();return g.from(r.elementFromPoint(t,n)).map(P)}},R=function(e,t){return{element:i(e),offset:i(t)}},W=function(e,t){var n=E(e.dom().childNodes,F.fromDom);return 0<n.length&&t<n.length?R(n[t],0):R(e,t)},j=function(t,n){var e;(e=t,g.from(e.dom().parentNode).map(F.fromDom)).each(function(e){e.dom().insertBefore(n.dom(),t.dom())})},q=function(e,t){var n;j(e,t),n=e,t.dom().appendChild(n.dom())};var V=function we(n,r){var t=function(e){return n(e)?g.from(e.dom().nodeValue):g.none()};return{get:function(e){if(!n(e))throw new Error("Can only get "+r+" value of a "+r+" node");return t(e).getOr("")},getOption:t,set:function(e,t){if(!n(e))throw new Error("Can only set raw "+r+" value of a "+r+" node");e.dom().nodeValue=t}}}(B,"text"),_=function(e){return V.get(e)},H=function(e,t){return n=t,i=(r=e)===undefined?c.document:r.dom(),1!==(o=i).nodeType&&9!==o.nodeType||0===o.childElementCount?[]:E(i.querySelectorAll(n),F.fromDom);var n,r,o,i},L=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),U=function(e,t){return e.isBlock(t)||M(e.schema.getShortEndedElements(),t.nodeName)},$=function(e,t){return"false"===e.getContentEditable(t)},z=function(e,t){return!e.isBlock(t)&&M(e.schema.getWhiteSpaceElements(),t.nodeName)},G=function(){return{sOffset:0,fOffset:0,elements:[]}},K=function(e,t){return W(F.fromDom(e),t)},J=function(e,t,n,r,o,i){void 0===i&&(i=!0);for(var a=i?t(!1):n;a;){var c=$(e,a);if(c||z(e,a)){if(c?r.cef(a):r.boundary(a))break;a=t(!0)}else{if(U(e,a)){if(r.boundary(a))break}else 3===a.nodeType&&r.text(a);if(a===o)break;a=t(!1)}}},Q=function(e,t,n,r,o){if(!(U(i=e,a=n)||$(i,a)||z(i,a)||(u=a,"true"===(c=i).getContentEditable(u)&&"false"===c.getContentEditableParent(u.parentNode)))){var i,a,c,u,l=e.getParent(r,e.isBlock),f=new L(n,l),s=o?f.next:f.prev;J(e,s,n,{boundary:m,cef:m,text:function(e){o?t.fOffset+=e.length:t.sOffset+=e.length,t.elements.push(F.fromDom(e))}})}},X=function(e,t,n,r,o,i){void 0===i&&(i=!0);var a=new L(n,t),c=[],u=G();Q(e,u,n,t,!1);var l=function(){return 0<u.elements.length&&(c.push(u),u=G()),!1};return J(e,a.next,n,{boundary:l,cef:function(e){return l(),o&&c.push.apply(c,o.cef(e)),!1},text:function(e){u.elements.push(F.fromDom(e)),o&&o.text(e,u)}},r,i),r&&Q(e,u,r,t,!0),l(),c},Y=function(i,e){var n=K(e.startContainer,e.startOffset),r=n.element().dom(),o=K(e.endContainer,e.endOffset),a=o.element().dom();return X(i,e.commonAncestorContainer,r,a,{text:function(e,t){e===a?t.fOffset+=e.length-o.offset():e===r&&(t.sOffset+=n.offset())},cef:function(e){var t,n,r,o=A(H(F.fromDom(e),"*[contenteditable=true]"),function(e){var t=e.dom();return X(i,t,t)});return t=o,n=function(e,t){return n=e.elements[0].dom(),r=t.elements[0].dom(),o=n,i=r,a=c.Node.DOCUMENT_POSITION_PRECEDING,0!=(o.compareDocumentPosition(i)&a)?1:-1;var n,r,o,i,a},(r=T.call(t,0)).sort(n),r}},!1)},Z=function(e,t){return t.collapsed?[]:Y(e,t)},ee=function(e,t){var n=e.createRng();return n.selectNode(t),Z(e,n)},te=function(e,a){var t,n;return 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 c=e[i],u=t(c);u!==n&&(r.push(o),o=[]),n=u,o.push(c)}return 0!==o.length&&r.push(o),r}((t=function(e,n){var t=_(n),r=e.last,o=r+t.length,i=A(a,function(e,t){return e.start<o&&e.finish>r?[{element:n,start:Math.max(r,e.start)-r,finish:Math.min(o,e.finish)-r,matchId:t}]:[]});return{results:e.results.concat(i),last:o}},n={results:[],last:0},k(e,function(e){n=t(n,e)}),n.results),function(e){return e.matchId})},ne=function(o,e){return A(e,function(e){var t=e.elements,n=E(t,_).join(""),r=function(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=e.length);var o=t.regex;o.lastIndex=n;for(var i,a=[];i=o.exec(e);){var c=i[t.matchIndex],u=i.index+i[0].indexOf(c),l=u+c.length;if(r<l)break;a.push({start:u,finish:l}),o.lastIndex=l}return a}(n,o,e.sOffset,n.length-e.fOffset);return te(t,r)})},re=function(e,i){S(e,function(e,o){S(e,function(e){var t=F.fromDom(i.cloneNode(!1));I(t,"data-mce-index",o);var n=e.element.dom();if(n.length===e.finish&&0===e.start)q(e.element,t);else{n.length!==e.finish&&n.splitText(e.finish);var r=n.splitText(e.start);q(F.fromDom(r),t)}})})},oe=function(e,t,n,r){var o,i=n.getBookmark(),a=e.select("td[data-mce-selected],th[data-mce-selected]"),c=0<a.length?(o=e,A(a,function(e){return ee(o,e)})):Z(e,n.getRng()),u=ne(t,c);return re(u,r),n.moveToBookmark(i),u.length},ie=function(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t},ae=function(e,t,n,r){var o,i,a,c,u,l,f;return(i=e.dom.create("span",{"data-mce-bogus":1})).className="mce-match-marker",o=e.getBody(),pe(e,t,!1),r?oe(e.dom,n,e.selection,i):(a=e.dom,c=n,u=i,l=ee(a,o),f=ne(c,l),re(f,u),f.length)},ce=function(e){var t=e.parentNode;e.firstChild&&t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)},ue=function(e,t){var n,r=[];if((n=v.toArray(e.getBody().getElementsByTagName("span"))).length)for(var o=0;o<n.length;o++){var i=ie(n[o]);null!==i&&i.length&&i===t.toString()&&r.push(n[o])}return r},le=function(e,t,n){var r=t.get(),o=r.index,i=e.dom;(n=!1!==n)?o+1===r.count?o=0:o++:o-1==-1?o=r.count-1:o--,i.removeClass(ue(e,r.index),"mce-match-marker-selected");var a=ue(e,o);return a.length?(i.addClass(ue(e,o),"mce-match-marker-selected"),e.selection.scrollIntoView(a[0]),o):-1},fe=function(e,t){var n=t.parentNode;e.remove(t),e.isEmpty(n)&&e.remove(n)},se=function(e,t,n,r,o,i){var a,c,u=(a=o,c="("+n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&").replace(/\s/g,"[^\\S\\r\\n]")+")",a?"(?:^|\\s|"+p()+")"+c+"(?=$|\\s|"+p()+")":c),l={regex:new RegExp(u,r?"g":"gi"),matchIndex:1},f=ae(e,t,l,i);if(f){var s=le(e,t,!0);t.set({index:s,count:f,text:n,matchCase:r,wholeWord:o,inSelection:i})}return f},de=function(e,t){var n=le(e,t,!0);t.set(h(h({},t.get()),{index:n}))},me=function(e,t){var n=le(e,t,!1);t.set(h(h({},t.get()),{index:n}))},he=function(e){var t=ie(e);return null!==t&&0<t.length},ge=function(e,t,n,r,o){var i,a,c,u,l,f=t.get(),s=f.index,d=s;for(r=!1!==r,c=e.getBody(),a=v.grep(v.toArray(c.getElementsByTagName("span")),he),i=0;i<a.length;i++){var m=ie(a[i]);if(u=l=parseInt(m,10),o||u===f.index){for(n.length?(a[i].firstChild.nodeValue=n,ce(a[i])):fe(e.dom,a[i]);a[++i];){if((u=parseInt(ie(a[i]),10))!==l){i--;break}fe(e.dom,a[i])}r&&d--}else s<l&&a[i].setAttribute("data-mce-index",String(l-1))}return t.set(h(h({},f),{count:o?0:f.count-1,index:d})),(r?de:me)(e,t),!o&&0<t.get().count},pe=function(e,t,n){var r,o,i,a,c=t.get();for(o=v.toArray(e.getBody().getElementsByTagName("span")),r=0;r<o.length;r++){var u=ie(o[r]);null!==u&&u.length&&(u===c.index.toString()&&(i=i||o[r].firstChild,a=o[r].firstChild),ce(o[r]))}if(t.set(h(h({},c),{index:-1,count:0,text:""})),i&&a){var l=e.dom.createRng();return l.setStart(i,0),l.setEnd(a,a.data.length),!1!==n&&e.selection.setRng(l),l}},ve=tinymce.util.Tools.resolve("tinymce.Env"),ye=function(i,a){var t,e=(t=d(g.none()),{clear:function(){t.set(g.none())},set:function(e){t.set(g.some(e))},isSet:function(){return t.get().isSome()},on:function(e){t.get().each(e)}});i.undoManager.add();var n=v.trim(i.selection.getContent({format:"text"}));function c(e){(1<a.get().count?e.enable:e.disable)("next"),(1<a.get().count?e.enable:e.disable)("prev")}var u=function(e,t){var n=t?e.disable:e.enable;k(["replace","replaceall","prev","next"],n)};var l=function(e,t){ve.browser.isSafari()&&ve.deviceType.isTouch()&&("find"===t||"replace"===t||"replaceall"===t)&&e.focus(t)},f=function(e){pe(i,a,!1),u(e,!0),c(e)},s=function(e){var t=e.getData(),n=a.get();if(t.findtext.length){if(n.text===t.findtext&&n.matchCase===t.matchcase&&n.wholeWord===t.wholewords)de(i,a);else{var r=se(i,a,t.findtext,t.matchcase,t.wholewords,t.inselection);r<=0&&!function o(e){i.windowManager.alert("Could not find the specified string.",function(){e.focus("findtext")})}(e),u(e,0===r)}c(e)}else f(e)},r=a.get(),o={title:"Find and Replace",size:"normal",body:{type:"panel",items:[{type:"bar",items:[{type:"input",name:"findtext",placeholder:"Find",maximized:!0,inputMode:"search"},{type:"button",name:"prev",text:"Previous",icon:"action-prev",disabled:!0,borderless:!0},{type:"button",name:"next",text:"Next",icon:"action-next",disabled:!0,borderless:!0}]},{type:"input",name:"replacetext",placeholder:"Replace with",inputMode:"search"}]},buttons:[{type:"menu",name:"options",icon:"preferences",tooltip:"Preferences",align:"start",items:[{type:"togglemenuitem",name:"matchcase",text:"Match case"},{type:"togglemenuitem",name:"wholewords",text:"Find whole words only"},{type:"togglemenuitem",name:"inselection",text:"Find in selection"}]},{type:"custom",name:"find",text:"Find",primary:!0},{type:"custom",name:"replace",text:"Replace",disabled:!0},{type:"custom",name:"replaceall",text:"Replace All",disabled:!0}],initialData:{findtext:n,replacetext:"",wholewords:r.wholeWord,matchcase:r.matchCase,inselection:r.inSelection},onChange:function(e,t){"findtext"===t.name&&0<a.get().count&&f(e)},onAction:function(e,t){var n,r,o=e.getData();switch(t.name){case"find":s(e);break;case"replace":(ge(i,a,o.replacetext)?c:f)(e);break;case"replaceall":ge(i,a,o.replacetext,!0,!0),f(e);break;case"prev":me(i,a),c(e);break;case"next":de(i,a),c(e);break;case"matchcase":case"wholewords":case"inselection":n=e.getData(),r=a.get(),a.set(h(h({},r),{matchCase:n.matchcase,wholeWord:n.wholewords,inSelection:n.inselection})),f(e)}l(e,t.name)},onSubmit:function(e){s(e),l(e,"find")},onClose:function(){i.focus(),pe(i,a),i.undoManager.add()}};e.set(i.windowManager.open(o,{inline:"toolbar"}))},xe=function(e,t){return function(){ye(e,t)}};!function be(){o.add("searchreplace",function(e){var t,n,r,o,i,a,c=d({index:-1,count:0,text:"",matchCase:!1,wholeWord:!1,inSelection:!1});return n=c,(t=e).addCommand("SearchReplace",function(){ye(t,n)}),o=c,(r=e).ui.registry.addMenuItem("searchreplace",{text:"Find and replace...",shortcut:"Meta+F",onAction:xe(r,o),icon:"search"}),r.ui.registry.addButton("searchreplace",{tooltip:"Find and replace",onAction:xe(r,o),icon:"search"}),r.shortcuts.add("Meta+F","",xe(r,o)),i=e,a=c,{done:function(e){return pe(i,a,e)},find:function(e,t,n,r){return void 0===r&&(r=!1),se(i,a,e,t,n,r)},next:function(){return de(i,a)},prev:function(){return me(i,a)},replace:function(e,t,n){return ge(i,a,e,t,n)}}})}()}(window);
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(N){"use strict";var k=function(e){var t=e;return{get:function(){return t},set:function(e){t=e}}},y=tinymce.util.Tools.resolve("tinymce.PluginManager"),h=tinymce.util.Tools.resolve("tinymce.util.Tools"),d=tinymce.util.Tools.resolve("tinymce.util.URI"),f=tinymce.util.Tools.resolve("tinymce.util.XHR"),g=function(e){return e.getParam("spellchecker_rpc_url")},S=function(e){var t=new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+',"g");return e.getParam("spellchecker_wordchar_pattern",t)};function T(e){return e&&1===e.nodeType&&"false"===e.contentEditable}var r=function(a,r){var n,o,g,h,p,i=[],v=r.dom;function c(e,t){if(!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");return{start:e.index,end:e.index+e[0].length,text:e[0],data:t}}function s(e){for(var t=e.parentNode;0<e.childNodes.length;)t.insertBefore(e.childNodes[0],e);t.removeChild(e)}function l(e){var t=a.getElementsByTagName("*"),n=[];e="number"==typeof e?""+e:null;for(var r=0;r<t.length;r++){var o=t[r],i=o.getAttribute("data-mce-index");null!==i&&i.length&&-1!==o.className.indexOf("mce-spellchecker-word")&&(i!==e&&null!==e||n.push(o))}return n}function u(e){for(var t=i.length;t--;)if(i[t]===e)return t;return-1}function e(e){for(var t=0,n=i.length;t<n&&!1!==e(i[t],t);t++);return this}function t(e){var t,n=l(e?u(e):null);for(t=n.length;t--;)s(n[t]);return this}function d(e){var t=l(u(e)),n=r.dom.createRng();return n.setStartBefore(t[0]),n.setEndAfter(t[t.length-1]),n}return g=r.schema.getBlockElements(),h=r.schema.getWhiteSpaceElements(),p=r.schema.getShortEndedElements(),{text:o=function f(e){var t;if(3===e.nodeType)return e.data;if(h[e.nodeName]&&!g[e.nodeName])return"";if(T(e))return"\n";if(t="",(g[e.nodeName]||p[e.nodeName])&&(t+="\n"),e=e.firstChild)for(;t+=f(e),e=e.nextSibling;);return t}(a),matches:i,each:e,filter:function m(n){var r=[];return e(function(e,t){n(e,t)&&r.push(e)}),i=r,this},reset:function x(){return i.splice(0,i.length),t(),this},matchFromElement:function N(e){return i[e.getAttribute("data-mce-index")]},elementFromMatch:function k(e){return l(u(e))[0]},find:function y(e,t){if(o&&e.global)for(;n=e.exec(o);)i.push(c(n,t));return this},add:function S(e,t,n){return i.push({start:e,end:e+t,text:o.substr(e,t),data:n}),this},wrap:function w(e){return i.length&&function f(e,t,n){var r,o,i,a,c,s=[],l=0,u=e,d=0;(t=t.slice(0)).sort(function(e,t){return e.start-t.start}),c=t.shift();e:for(;;){if((g[u.nodeName]||p[u.nodeName]||T(u))&&l++,3===u.nodeType&&(!o&&u.length+l>=c.end?(o=u,a=c.end-l):r&&s.push(u),!r&&u.length+l>c.start&&(r=u,i=c.start-l),l+=u.length),r&&o){if(u=n({startNode:r,startNodeIndex:i,endNode:o,endNodeIndex:a,innerNodes:s,match:c.text,matchIndex:d}),l-=o.length-a,o=r=null,s=[],d++,!(c=t.shift()))break}else if(h[u.nodeName]&&!g[u.nodeName]||!u.firstChild){if(u.nextSibling){u=u.nextSibling;continue}}else if(!T(u)){u=u.firstChild;continue}for(;;){if(u.nextSibling){u=u.nextSibling;break}if(u.parentNode===e)break e;u=u.parentNode}}}(a,i,function t(o){function m(e,t){var n=i[t];n.stencil||(n.stencil=o(n));var r=n.stencil.cloneNode(!1);return r.setAttribute("data-mce-index",t),e&&r.appendChild(v.doc.createTextNode(e)),r}return function(e){var t,n,r,o=e.startNode,i=e.endNode,a=e.matchIndex,c=v.doc;if(o===i){var s=o;r=s.parentNode,0<e.startNodeIndex&&(t=c.createTextNode(s.data.substring(0,e.startNodeIndex)),r.insertBefore(t,s));var l=m(e.match,a);return r.insertBefore(l,s),e.endNodeIndex<s.length&&(n=c.createTextNode(s.data.substring(e.endNodeIndex)),r.insertBefore(n,s)),s.parentNode.removeChild(s),l}t=c.createTextNode(o.data.substring(0,e.startNodeIndex)),n=c.createTextNode(i.data.substring(e.endNodeIndex));for(var u=m(o.data.substring(e.startNodeIndex),a),d=0,f=e.innerNodes.length;d<f;++d){var g=e.innerNodes[d],h=m(g.data,a);g.parentNode.replaceChild(h,g)}var p=m(i.data.substring(0,e.endNodeIndex),a);return(r=o.parentNode).insertBefore(t,o),r.insertBefore(u,o),r.removeChild(o),(r=i.parentNode).insertBefore(p,i),r.insertBefore(n,i),r.removeChild(i),p}}(e)),this},unwrap:t,replace:function b(e,t){var n=d(e);return n.deleteContents(),0<t.length&&n.insertNode(r.dom.doc.createTextNode(t)),n},rangeFromMatch:d,indexOf:u}},l=Object.hasOwnProperty,u=function(e,t){if(!t.get()){var n=r(e.getBody(),e);t.set(n)}return t.get()},p=function(e,t,n,r,o,i,a){var c,s,l,u=e.getParam("spellchecker_callback");(u||(c=e,s=t,l=n,function(e,t,r,o){var n={method:e,lang:l.get()},i="";n["addToDictionary"===e?"word":"text"]=t,h.each(n,function(e,t){i&&(i+="&"),i+=t+"="+encodeURIComponent(e)}),f.send({url:new d(s).toAbsolute(g(c)),type:"post",content_type:"application/x-www-form-urlencoded",data:i,success:function(e){var t=JSON.parse(e);if(t)t.error?o(t.error):r(t);else{var n=c.translate("Server response wasn't proper JSON.");o(n)}},error:function(){var e=c.translate("The spelling service was not found: (")+g(c)+c.translate(")");o(e)}})})).call(e.plugins.spellchecker,r,o,i,a)},w=function(t,e,n,r,o,i){if(!a(t,n,r)){t.setProgressState(!0),p(t,e,i,"spellcheck",u(t,r).text,function(e){b(t,n,r,o,e)},function(e){t.notificationManager.open({text:e,type:"error"}),t.setProgressState(!1),a(t,n,r)}),t.focus()}},m=function(e,t,n){e.dom.select("span.mce-spellchecker-word").length||a(e,t,n)},o=function(t,e,n,r,o,i){t.selection.collapse(),i?h.each(t.dom.select("span.mce-spellchecker-word"),function(e){e.getAttribute("data-mce-word")===r&&t.dom.remove(e,!0)}):t.dom.remove(o,!0),m(t,e,n)},a=function(e,t,n){var r=e.selection.getBookmark();if(u(e,n).reset(),e.selection.moveToBookmark(r),n.set(null),t.get())return t.set(!1),e.fire("SpellcheckEnd"),!0},v=function(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t},b=function(t,e,n,r,o){var i=!!o.dictionary,a=o.words;if(t.setProgressState(!1),function(e){for(var t in e)if(l.call(e,t))return!1;return!0}(a)){var c=t.translate("No misspellings found.");return t.notificationManager.open({text:c,type:"info"}),void e.set(!1)}r.set({suggestions:a,hasDictionarySupport:i});var s=t.selection.getBookmark();u(t,n).find(S(t)).filter(function(e){return!!a[e.text]}).wrap(function(e){return t.dom.create("span",{"class":"mce-spellchecker-word","aria-invalid":"spelling","data-mce-bogus":1,"data-mce-word":e.text})}),t.selection.moveToBookmark(s),e.set(!0),t.fire("SpellcheckStart")},x=function(){return(x=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)},A="SpellcheckStart SpellcheckEnd",B=function(n,e,r,t,o,i){var a,c,s,l=(s=n,a=h.map(s.getParam("spellchecker_languages","English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv").split(","),function(e){return{name:(e=e.split("="))[0],value:e[1]}}),c=[],h.each(a,function(e){c.push({selectable:!0,text:e.name,data:e.value})}),c),u=function(){w(n,e,r,t,i,o)},d={tooltip:"Spellcheck",onAction:u,icon:"spell-check",onSetup:function(e){var t=function(){e.setActive(r.get())};return n.on(A,t),function(){n.off(A,t)}}},f=x(x({},d),{type:"splitbutton",select:function(e){return e===o.get()},fetch:function(e){e(h.map(l,function(e){return{type:"choiceitem",value:e.data,text:e.text}}))},onItemAction:function(e,t){o.set(t)}});1<l.length?n.ui.registry.addSplitButton("spellchecker",f):n.ui.registry.addToggleButton("spellchecker",d),n.ui.registry.addToggleMenuItem("spellchecker",{text:"Spellcheck",icon:"spell-check",onSetup:function(e){e.setActive(r.get());var t=function(){e.setActive(r.get())};return n.on(A,t),function(){n.off(A,t)}},onAction:u})},I=function(c,s,e,l,u,d,f,g){var t=[],n=e.get().suggestions[f];return h.each(n,function(e){t.push({text:e,onAction:function(){c.insertContent(c.dom.encode(e)),c.dom.remove(g),m(c,l,u)}})}),e.get().hasDictionarySupport&&(t.push({type:"separator"}),t.push({text:"Add to dictionary",onAction:function(){var t,e,n,r,o,i,a;e=s,n=l,r=u,o=d,i=f,a=g,(t=c).setProgressState(!0),p(t,e,o,"addToDictionary",i,function(){t.setProgressState(!1),t.dom.remove(a,!0),m(t,n,r)},function(e){t.notificationManager.open({text:e,type:"error"}),t.setProgressState(!1)})}})),t.push.apply(t,[{type:"separator"},{text:"Ignore",onAction:function(){o(c,l,u,f,g)}},{text:"Ignore all",onAction:function(){o(c,l,u,f,g,!0)}}]),t},P=function(o,i,a,c,s,l){o.ui.registry.addContextMenu("spellchecker",{update:function(e){var t=e;if("mce-spellchecker-word"!==t.className)return[];var n=function(e,t){var n,r=[];if((n=h.toArray(e.getBody().getElementsByTagName("span"))).length)for(var o=0;o<n.length;o++){var i=v(n[o]);null!==i&&i.length&&i===t.toString()&&r.push(n[o])}return r}(o,v(t));if(0<n.length){var r=o.dom.createRng();return r.setStartBefore(n[0]),r.setEndAfter(n[n.length-1]),o.selection.setRng(r),I(o,i,a,c,s,l,t.getAttribute("data-mce-word"),n)}}})};!function e(){y.add("spellchecker",function(e,t){if(!1==!(!/(^|[ ,])tinymcespellchecker([, ]|$)/.test(e.settings.plugins)||!y.get("tinymcespellchecker")||("undefined"!=typeof N.window.console&&N.window.console.log&&N.window.console.log("Spell Checker Pro is incompatible with Spell Checker plugin! Remove 'spellchecker' from the 'plugins' option."),0))){var n=k(!1),r=k((x=(v=e).getParam("language","en"),v.getParam("spellchecker_language",x))),o=k(null),i=k(null);return B(e,t,n,o,r,i),P(e,t,i,n,o,r),f=t,g=n,h=o,p=i,m=r,(d=e).addCommand("mceSpellCheck",function(){w(d,f,g,h,p,m)}),a=e,c=n,s=i,l=o,u=r,{getTextMatcher:function(){return l.get()},getWordCharPattern:function(){return S(a)},markErrors:function(e){b(a,c,l,s,e)},getLanguage:function(){return u.get()}}}var a,c,s,l,u,d,f,g,h,p,m,v,x})}()}(window);
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(s){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),a=tinymce.util.Tools.resolve("tinymce.EditorManager"),y=tinymce.util.Tools.resolve("tinymce.Env"),f=tinymce.util.Tools.resolve("tinymce.util.Delay"),d=tinymce.util.Tools.resolve("tinymce.util.Tools"),m=tinymce.util.Tools.resolve("tinymce.util.VK"),v=t.DOM,n=function(e){e.keyCode!==m.TAB||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()},i=function(c){function e(n){var i,o,e,l,t;if(!(n.keyCode!==m.TAB||n.ctrlKey||n.altKey||n.metaKey||n.isDefaultPrevented())&&(1===(e=d.explode((t=c).getParam("tab_focus",t.getParam("tabfocus_elements",":prev,:next")))).length&&(e[1]=e[0],e[0]=":prev"),o=n.shiftKey?":prev"===e[0]?r(-1):v.get(e[0]):":next"===e[1]?r(1):v.get(e[1]))){var u=a.get(o.id||o.name);o.id&&u?u.focus():f.setTimeout(function(){y.webkit||s.window.focus(),o.focus()},10),n.preventDefault()}function r(e){function t(e){return/INPUT|TEXTAREA|BUTTON/.test(e.tagName)&&a.get(n.id)&&-1!==e.tabIndex&&function t(e){return"BODY"===e.nodeName||"hidden"!==e.type&&"none"!==e.style.display&&"hidden"!==e.style.visibility&&t(e.parentNode)}(e)}if(o=v.select(":input:enabled,*[tabindex]:not(iframe)"),d.each(o,function(e,t){if(e.id===c.id)return i=t,!1}),0<e){for(l=i+1;l<o.length;l++)if(t(o[l]))return o[l]}else for(l=i-1;0<=l;l--)if(t(o[l]))return o[l];return null}}c.on("init",function(){c.inline&&v.setAttrib(c.getBody(),"tabIndex",null),c.on("keyup",n),y.gecko?c.on("keypress keydown",e):c.on("keydown",e)})};!function o(){e.add("tabfocus",function(e){i(e)})}()}(window);
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(p){"use strict";var S=function(e){var n=e;return{get:function(){return n},set:function(e){n=e}}},x=function(){},b=function(e){return function(){return e}},o=function(e){return e};function y(r){for(var o=[],e=1;e<arguments.length;e++)o[e-1]=arguments[e];return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=o.concat(e);return r.apply(null,t)}}var e,n,t,r,a=function(n){return function(e){return!n(e)}},f=b(!1),i=b(!0),u=function(){return c},c=(e=function(e){return e.isNone()},{fold:function(e,n){return e()},is:f,isSome:f,isNone:i,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:b(null),getOrUndefined:b(undefined),or:t,orThunk:n,map:u,each:x,bind:u,exists:f,forall:i,filter:u,equals:e,equals_:e,toArray:function(){return[]},toString:b("none()")}),l=function(t){var e=b(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:i,isNone:f,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return l(e(t))},each:function(e){e(t)},bind:r,exists:r,forall:r,filter:function(e){return e(t)?o:c},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(f,function(e){return n(t,e)})}};return o},C={some:l,none:u,from:function(e){return null===e||e===undefined?c:l(e)}},s=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=function(r){return function(e){return t=typeof(n=e),(null===n?"null":"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)===r;var n,t}},m=function(n){return function(e){return typeof e===n}},g=d("string"),h=d("array"),v=m("boolean"),w=m("function"),R=m("number"),T=Array.prototype.slice,O=Array.prototype.indexOf,D=Array.prototype.push,A=function(e,n){return t=e,r=n,-1<O.call(t,r);var t,r},E=function(e,n){for(var t=0,r=e.length;t<r;t++){if(n(e[t],t))return!0}return!1},k=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)}return r},B=function(e,n){for(var t=0,r=e.length;t<r;t++){n(e[t],t)}},N=function(e,n){for(var t=[],r=0,o=e.length;r<o;r++){var i=e[r];n(i,r)&&t.push(i)}return t},I=function(e,n,t){return function(e,n){for(var t=e.length-1;0<=t;t--){n(e[t],t)}}(e,function(e){t=n(t,e)}),t},P=function(e,n,t){return B(e,function(e){t=n(t,e)}),t},M=function(e,n){return function(e,n,t){for(var r=0,o=e.length;r<o;r++){var i=e[r];if(n(i,r))return C.some(i);if(t(i,r))break}return C.none()}(e,n,f)},_=function(e,n){for(var t=0,r=e.length;t<r;t++){if(n(e[t],t))return C.some(t)}return C.none()},W=function(e){for(var n=[],t=0,r=e.length;t<r;++t){if(!h(e[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+e);D.apply(n,e[t])}return n},j=function(e,n){return W(k(e,n))},z=function(e,n){for(var t=0,r=e.length;t<r;++t){if(!0!==n(e[t],t))return!1}return!0},L=function(e,n){for(var t=0;t<e.length;t++){var r=n(e[t],t);if(r.isSome())return r}return C.none()},F=Object.keys,H=Object.hasOwnProperty,q=function(e,n){for(var t=F(e),r=0,o=t.length;r<o;r++){var i=t[r];n(e[i],i)}},U=function(e,t){return V(e,function(e,n){return{k:n,v:t(e,n)}})},V=function(e,r){var o={};return q(e,function(e,n){var t=r(e,n);o[t.k]=t.v}),o},K=function(e,n){return X(e,n)?C.from(e[n]):C.none()},X=function(e,n){return H.call(e,n)},$=("undefined"!=typeof p.window?p.window:Function("return this;")(),function(e){return e.dom().nodeName.toLowerCase()}),G=function(e){return e.dom().nodeType},Y=function(n){return function(e){return G(e)===n}},J=function(e){return 8===G(e)||"#comment"===$(e)},Q=Y(1),Z=Y(3),ee=function(e,n,t){if(!(g(t)||v(t)||R(t)))throw p.console.error("Invalid call to Attr.set. Key ",n,":: Value ",t,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(n,t+"")},ne=function(e,n,t){ee(e.dom(),n,t)},te=function(e,n){var t=e.dom();q(n,function(e,n){ee(t,n,e)})},re=function(e,n){var t=e.dom().getAttribute(n);return null===t?undefined:t},oe=function(e,n){return C.from(re(e,n))},ie=function(e,n){var t=e.dom();return!(!t||!t.hasAttribute)&&t.hasAttribute(n)},ue=function(e,n){e.dom().removeAttribute(n)},ce=function(e){return P(e.dom().attributes,function(e,n){return e[n.name]=n.value,e},{})},ae=function(e,n,t){return""===n||e.length>=n.length&&e.substr(t,t+n.length)===n},le=function(e,n){return-1!==e.indexOf(n)},fe=function(e,n){return ae(e,n,0)},se=(r=/^\s+|\s+$/g,function(e){return e.replace(r,"")}),de=function(e){return e.style!==undefined&&w(e.style.getPropertyValue)},me=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:b(e)}},ge={fromHtml:function(e,n){var t=(n||p.document).createElement("div");if(t.innerHTML=e,!t.hasChildNodes()||1<t.childNodes.length)throw p.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return me(t.childNodes[0])},fromTag:function(e,n){var t=(n||p.document).createElement(e);return me(t)},fromText:function(e,n){var t=(n||p.document).createTextNode(e);return me(t)},fromDom:me,fromPoint:function(e,n,t){var r=e.dom();return C.from(r.elementFromPoint(n,t)).map(me)}},pe=function(e){var n=Z(e)?e.dom().parentNode:e.dom();return n!==undefined&&null!==n&&n.ownerDocument.body.contains(n)},he=function(e){var n=e.dom().body;if(null===n||n===undefined)throw new Error("Body is not available yet");return ge.fromDom(n)},ve=function(e,n,t){if(!g(t))throw p.console.error("Invalid call to CSS.set. Property ",n,":: Value ",t,":: Element ",e),new Error("CSS value must be a string: "+t);de(e)&&e.style.setProperty(n,t)},be=function(e,n,t){var r=e.dom();ve(r,n,t)},we=function(e,n){var t=e.dom();q(n,function(e,n){ve(t,n,e)})},ye=function(e,n){var t=e.dom(),r=p.window.getComputedStyle(t).getPropertyValue(n);return""!==r||pe(e)?r:Se(t,n)},Se=function(e,n){return de(e)?e.style.getPropertyValue(n):""},xe=function(e,n){var t=e.dom(),r=Se(t,n);return C.from(r).filter(function(e){return 0<e.length})},Ce=function(e,n){var t,r,o=e.dom();r=n,de(t=o)&&t.style.removeProperty(r),oe(e,"style").map(se).is("")&&ue(e,"style")},Re=function(){return(Re=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)},Te=function(t){var r,o=!1;return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return o||(o=!0,r=t.apply(null,e)),r}},Oe=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 Ae(r(1),r(2))},De=function(){return Ae(0,0)},Ae=function(e,n){return{major:e,minor:n}},Ee={nu:Ae,detect:function(e,n){var t=String(n).toLowerCase();return 0===e.length?De():Oe(e,t)},unknown:De},ke="Firefox",Be=function(e){var n=e.current,t=e.version,r=function(e){return function(){return n===e}};return{current:n,version:t,isEdge:r("Edge"),isChrome:r("Chrome"),isIE:r("IE"),isOpera:r("Opera"),isFirefox:r(ke),isSafari:r("Safari")}},Ne={unknown:function(){return Be({current:undefined,version:Ee.unknown()})},nu:Be,edge:b("Edge"),chrome:b("Chrome"),ie:b("IE"),opera:b("Opera"),firefox:b(ke),safari:b("Safari")},Ie="Windows",Pe="Android",Me="Solaris",_e="FreeBSD",We="ChromeOS",je=function(e){var n=e.current,t=e.version,r=function(e){return function(){return n===e}};return{current:n,version:t,isWindows:r(Ie),isiOS:r("iOS"),isAndroid:r(Pe),isOSX:r("OSX"),isLinux:r("Linux"),isSolaris:r(Me),isFreeBSD:r(_e),isChromeOS:r(We)}},ze={unknown:function(){return je({current:undefined,version:Ee.unknown()})},nu:je,windows:b(Ie),ios:b("iOS"),android:b(Pe),linux:b("Linux"),osx:b("OSX"),solaris:b(Me),freebsd:b(_e),chromeos:b(We)},Le=function(e,n){var t=String(n).toLowerCase();return M(e,function(e){return e.search(t)})},Fe=function(e,t){return Le(e,t).map(function(e){var n=Ee.detect(e.versionRegexes,t);return{current:e.name,version:n}})},He=function(e,t){return Le(e,t).map(function(e){var n=Ee.detect(e.versionRegexes,t);return{current:e.name,version:n}})},qe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Ue=function(n){return function(e){return le(e,n)}},Ve=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return le(e,"edge/")&&le(e,"chrome")&&le(e,"safari")&&le(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,qe],search:function(e){return le(e,"chrome")&&!le(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return le(e,"msie")||le(e,"trident")}},{name:"Opera",versionRegexes:[qe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Ue("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Ue("firefox")},{name:"Safari",versionRegexes:[qe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(le(e,"safari")||le(e,"mobile/"))&&le(e,"applewebkit")}}],Ke=[{name:"Windows",search:Ue("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return le(e,"iphone")||le(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Ue("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Ue("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Ue("linux"),versionRegexes:[]},{name:"Solaris",search:Ue("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Ue("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Ue("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Xe={browsers:b(Ve),oses:b(Ke)},$e=function(e,n){var t,r,o,i,u,c,a,l,f,s,d,m,g=Xe.browsers(),p=Xe.oses(),h=Fe(g,e).fold(Ne.unknown,Ne.nu),v=He(p,e).fold(ze.unknown,ze.nu);return{browser:h,os:v,deviceType:(r=h,o=e,i=n,u=(t=v).isiOS()&&!0===/ipad/i.test(o),c=t.isiOS()&&!u,a=t.isiOS()||t.isAndroid(),l=a||i("(pointer:coarse)"),f=u||!c&&a&&i("(min-device-width:768px)"),s=c||a&&!f,d=r.isSafari()&&t.isiOS()&&!1===/safari/i.test(o),m=!s&&!f&&!d,{isiPad:b(u),isiPhone:b(c),isTablet:b(f),isPhone:b(s),isTouch:b(l),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:b(d),isDesktop:b(m)})}},Ge=function(e){return p.window.matchMedia(e).matches},Ye=Te(function(){return $e(p.navigator.userAgent,Ge)}),Je=function(){return Ye()},Qe=function(e,n){var t=e.dom();if(1!==t.nodeType)return!1;var r=t;if(r.matches!==undefined)return r.matches(n);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(n);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(n);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")},Ze=function(e){return 1!==e.nodeType&&9!==e.nodeType||0===e.childElementCount},en=function(e,n){return e.dom()===n.dom()},nn=function(e,n){return t=e.dom(),r=n.dom(),o=t,i=r,u=p.Node.DOCUMENT_POSITION_CONTAINED_BY,0!=(o.compareDocumentPosition(i)&u);var t,r,o,i,u},tn=function(e,n){return Je().browser.isIE()?nn(e,n):(t=n,r=e.dom(),o=t.dom(),r!==o&&r.contains(o));var t,r,o},rn=Qe,on=function(e){return ge.fromDom(e.dom().ownerDocument)},un=function(e){return C.from(e.dom().parentNode).map(ge.fromDom)},cn=function(e,n){for(var t=w(n)?n:f,r=e.dom(),o=[];null!==r.parentNode&&r.parentNode!==undefined;){var i=r.parentNode,u=ge.fromDom(i);if(o.push(u),!0===t(u))break;r=i}return o},an=function(e){return C.from(e.dom().previousSibling).map(ge.fromDom)},ln=function(e){return C.from(e.dom().nextSibling).map(ge.fromDom)},fn=function(e){return k(e.dom().childNodes,ge.fromDom)},sn=function(e,n){var t=e.dom().childNodes;return C.from(t[n]).map(ge.fromDom)},dn=function(n,t){un(n).each(function(e){e.dom().insertBefore(t.dom(),n.dom())})},mn=function(e,n){ln(e).fold(function(){un(e).each(function(e){pn(e,n)})},function(e){dn(e,n)})},gn=function(n,t){sn(n,0).fold(function(){pn(n,t)},function(e){n.dom().insertBefore(t.dom(),e.dom())})},pn=function(e,n){e.dom().appendChild(n.dom())},hn=function(e,n){dn(e,n),pn(n,e)},vn=function(r,o){B(o,function(e,n){var t=0===n?r:o[n-1];mn(t,e)})},bn=function(n,e){B(e,function(e){pn(n,e)})},wn=function(e){e.dom().textContent="",B(fn(e),function(e){yn(e)})},yn=function(e){var n=e.dom();null!==n.parentNode&&n.parentNode.removeChild(n)},Sn=function(e){var n,t=fn(e);0<t.length&&(n=e,B(t,function(e){dn(n,e)})),yn(e)},xn=function(e,n,t){return{element:b(e),rowspan:b(n),colspan:b(t)}},Cn=function(e,n,t){return{element:b(e),cells:b(n),section:b(t)}},Rn=function(e,n){return{element:b(e),isNew:b(n)}},Tn=function(e,n){return{cells:b(e),section:b(n)}},On=function(e,n){var t=[];return B(fn(e),function(e){n(e)&&(t=t.concat([e])),t=t.concat(On(e,n))}),t},Dn=function(e,n,t){return r=function(e){return Qe(e,n)},N(cn(e,t),r);var r},An=function(e,n){return t=function(e){return Qe(e,n)},N(fn(e),t);var t},En=function(e,n){return t=n,o=(r=e)===undefined?p.document:r.dom(),Ze(o)?[]:k(o.querySelectorAll(t),ge.fromDom);var t,r,o};function kn(e,n,t,r,o){return e(t,r)?C.some(t):w(o)&&o(t)?C.none():n(t,r,o)}var Bn=function(e,n,t){for(var r=e.dom(),o=w(t)?t:b(!1);r.parentNode;){r=r.parentNode;var i=ge.fromDom(r);if(n(i))return C.some(i);if(o(i))break}return C.none()},Nn=function(e,n,t){return Bn(e,function(e){return Qe(e,n)},t)},In=function(e,n){return t=function(e){return Qe(e,n)},M(e.dom().childNodes,function(e){return t(ge.fromDom(e))}).map(ge.fromDom);var t},Pn=function(e,n){return t=n,o=(r=e)===undefined?p.document:r.dom(),Ze(o)?C.none():C.from(o.querySelector(t)).map(ge.fromDom);var t,r,o},Mn=function(e,n,t){return kn(function(e,n){return Qe(e,n)},Nn,e,n,t)},_n=function(e,n,t){return void 0===t&&(t=0),oe(e,n).map(function(e){return parseInt(e,10)}).getOr(t)},Wn=function(e,n){return _n(e,n,1)},jn=function(e){return 1<Wn(e,"colspan")},zn=function(e){return 1<Wn(e,"rowspan")},Ln=function(e,n){return parseInt(ye(e,n),10)},Fn=b(10),Hn=b(10),qn=function(e,n){return Un(e,n,b(!0))},Un=function(e,n,t){return j(fn(e),function(e){return Qe(e,n)?t(e)?[e]:[]:Un(e,n,t)})},Vn=function(e,n){return function(e,n,t){if(void 0===t&&(t=f),t(n))return C.none();if(A(e,$(n)))return C.some(n);return Nn(n,e.join(","),function(e){return Qe(e,"table")||t(e)})}(["td","th"],e,n)},Kn=function(e){return qn(e,"th,td")},Xn=function(n,e){return un(e).map(function(e){return An(e,n)})},$n=(y(Xn,"th,td"),y(Xn,"tr"),function(e,n){return Mn(e,"table",n)}),Gn=function(e){var n=qn(e,"tr");return k(n,function(e){var n=e,t=un(n).map(function(e){var n=$(e);return"tfoot"===n||"thead"===n||"tbody"===n?n:"tbody"}).getOr("tbody"),r=k(Kn(e),function(e){var n=_n(e,"rowspan",1),t=_n(e,"colspan",1);return xn(e,n,t)});return Cn(n,r,t)})},Yn=function(e,n){return e+","+n},Jn=function(e,n){var t=j(e.all,function(e){return e.cells()});return N(t,n)},Qn={generate:function(e){var d={},n=[],t=e.length,m=0;return B(e,function(e,f){var s=[];B(e.cells(),function(e){for(var n=0;d[Yn(f,n)]!==undefined;)n++;for(var t,r,o,i=(t=e.element(),r=e.rowspan(),o=e.colspan(),{element:b(t),rowspan:b(r),colspan:b(o),row:b(f),column:b(n)}),u=0;u<e.colspan();u++)for(var c=0;c<e.rowspan();c++){var a=n+u,l=Yn(f+c,a);d[l]=i,m=Math.max(m,a+1)}s.push(i)}),n.push(Cn(e.element(),s,e.section()))}),{grid:{rows:b(t),columns:b(m)},access:d,all:n}},getAt:function(e,n,t){var r=e.access[Yn(n,t)];return r!==undefined?C.some(r):C.none()},findItem:function(e,n,t){var r=Jn(e,function(e){return t(n,e.element())});return 0<r.length?C.some(r[0]):C.none()},filterItems:Jn,justCells:function(e){var n=k(e.all,function(e){return e.cells()});return W(n)}},Zn=function(e,n){var t,i,r,u,c,a,l,o,f,s,d=function(e){return Qe(e.element(),n)},m=Gn(e),g=Qn.generate(m),p=(i=d,r=(t=g).grid.columns(),u=t.grid.rows(),c=r,l=a=0,q(t.access,function(e){if(i(e)){var n=e.row(),t=n+e.rowspan()-1,r=e.column(),o=r+e.colspan()-1;n<u?u=n:a<t&&(a=t),r<c?c=r:l<o&&(l=o)}}),{minRow:u,minCol:c,maxRow:a,maxCol:l}),h="th:not("+n+"),td:not("+n+")",v=Un(e,"th,td",function(e){return Qe(e,h)});return B(v,yn),function(e,n,t,r){for(var o,i,u,c=n.grid.columns(),a=n.grid.rows(),l=0;l<a;l++)for(var f=!1,s=0;s<c;s++){if(!(l<t.minRow||l>t.maxRow||s<t.minCol||s>t.maxCol))Qn.getAt(n,l,s).filter(r).isNone()?(o=f,0,i=e[l].element(),u=ge.fromTag("td"),pn(u,ge.fromTag("br")),(o?pn:gn)(i,u)):f=!0}}(m,g,p,d),f=p,s=N(qn(o=e,"tr"),function(e){return 0===e.dom().childElementCount}),B(s,yn),f.minCol!==f.maxCol&&f.minRow!==f.maxRow||B(qn(o,"th,td"),function(e){ue(e,"rowspan"),ue(e,"colspan")}),ue(o,"width"),ue(o,"height"),Ce(o,"width"),Ce(o,"height"),e};var et=function bf(t,r){var n=function(e){return t(e)?C.from(e.dom().nodeValue):C.none()};return{get:function(e){if(!t(e))throw new Error("Can only get "+r+" value of a "+r+" node");return n(e).getOr("")},getOption:n,set:function(e,n){if(!t(e))throw new Error("Can only set raw "+r+" value of a "+r+" node");e.dom().nodeValue=n}}}(Z,"text"),nt=function(e){return et.get(e)},tt=function(e){return et.getOption(e)},rt=function(e,n){return et.set(e,n)},ot=function(e){return"img"===$(e)?1:tt(e).fold(function(){return fn(e).length},function(e){return e.length})},it=["img","br"],ut=function(e){return tt(e).filter(function(e){return 0!==e.trim().length||-1<e.indexOf("\xa0")}).isSome()||A(it,$(e))},ct=function(e){return o=ut,(i=function(e){for(var n=0;n<e.childNodes.length;n++){var t=ge.fromDom(e.childNodes[n]);if(o(t))return C.some(t);var r=i(e.childNodes[n]);if(r.isSome())return r}return C.none()})(e.dom());var o,i},at=function(e){return lt(e,ut)},lt=function(e,i){var u=function(e){for(var n=fn(e),t=n.length-1;0<=t;t--){var r=n[t];if(i(r))return C.some(r);var o=u(r);if(o.isSome())return o}return C.none()};return u(e)},ft=function(e,n){return ge.fromDom(e.dom().cloneNode(n))},st=function(e){return ft(e,!1)},dt=function(e){return ft(e,!0)},mt=function(e,n){var t,r,o,i,u=(t=e,r=n,o=ge.fromTag(r),i=ce(t),te(o,i),o),c=fn(dt(e));return bn(u,c),u},gt=function(){var e=ge.fromTag("td");return pn(e,ge.fromTag("br")),e},pt=function(e,n,t){var r=mt(e,n);return q(t,function(e,n){null===e?ue(r,n):ne(r,n,e)}),r},ht=function(e){return e},vt=function(e){return function(){return ge.fromTag("tr",e.dom())}},bt=function(d,e,m){return{row:vt(e),cell:function(e){var r,o,i,n,t,u,c,a=on(e.element()),l=ge.fromTag($(e.element()),a.dom()),f=m.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),s=0<f.length?(r=e.element(),o=l,i=f,ct(r).map(function(e){var n=i.join(","),t=Dn(e,n,function(e){return en(e,r)});return I(t,function(e,n){var t=st(n);return ue(t,"contenteditable"),pn(e,t),t},o)}).getOr(o)):l;return pn(s,ge.fromTag("br")),n=e.element(),t=l,u=n.dom(),c=t.dom(),de(u)&&de(c)&&(c.style.cssText=u.style.cssText),Ce(l,"height"),1!==e.colspan()&&Ce(e.element(),"width"),d(e.element(),l),l},replace:pt,gap:gt}},wt=function(e){return{row:vt(e),cell:gt,replace:ht,gap:gt}},yt=function(e,n){var t=n.column(),r=n.column()+n.colspan()-1,o=n.row(),i=n.row()+n.rowspan()-1;return t<=e.finishCol()&&r>=e.startCol()&&o<=e.finishRow()&&i>=e.startRow()},St=function(e,n){return n.column()>=e.startCol()&&n.column()+n.colspan()-1<=e.finishCol()&&n.row()>=e.startRow()&&n.row()+n.rowspan()-1<=e.finishRow()},xt=function(e,n){return t=Math.min(e.row(),n.row()),r=Math.min(e.column(),n.column()),o=Math.max(e.row()+e.rowspan()-1,n.row()+n.rowspan()-1),i=Math.max(e.column()+e.colspan()-1,n.column()+n.colspan()-1),{startRow:b(t),startCol:b(r),finishRow:b(o),finishCol:b(i)};var t,r,o,i},Ct=function(e,n,t){var r=Qn.findItem(e,n,en),o=Qn.findItem(e,t,en);return r.bind(function(n){return o.map(function(e){return xt(n,e)})})},Rt=function(n,e,t){return Ct(n,e,t).bind(function(e){return function(e,n){for(var t=!0,r=y(St,n),o=n.startRow();o<=n.finishRow();o++)for(var i=n.startCol();i<=n.finishCol();i++)t=t&&Qn.getAt(e,o,i).exists(r);return t?C.some(n):C.none()}(n,e)})},Tt=function(t,e,n){return Ct(t,e,n).map(function(e){var n=Qn.filterItems(t,y(yt,e));return k(n,function(e){return e.element()})})},Ot=function(e,n){return Qn.findItem(e,n,function(e,n){return tn(n,e)}).map(function(e){return e.element()})},Dt=function(u,c,a){return $n(u).bind(function(e){var r,n,o,i,t=Et(e);return r=t,n=u,o=c,i=a,Qn.findItem(r,n,en).bind(function(e){var n=0<o?e.row()+e.rowspan()-1:e.row(),t=0<i?e.column()+e.colspan()-1:e.column();return Qn.getAt(r,n+o,t+i).map(function(e){return e.element()})})})},At=function(e,n,t,r,o){var i=Et(e),u=en(e,t)?C.some(n):Ot(i,n),c=en(e,o)?C.some(r):Ot(i,r);return u.bind(function(n){return c.bind(function(e){return Tt(i,n,e)})})},Et=function(e){var n=Gn(e);return Qn.generate(n)},kt=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"];function Bt(){return{up:b({selector:Nn,closest:Mn,predicate:Bn,all:cn}),down:b({selector:En,predicate:On}),styles:b({get:ye,getRaw:xe,set:be,remove:Ce}),attrs:b({get:re,set:ne,remove:ue,copyTo:function(e,n){var t=ce(e);te(n,t)}}),insert:b({before:dn,after:mn,afterAll:vn,append:pn,appendAll:bn,prepend:gn,wrap:hn}),remove:b({unwrap:Sn,remove:yn}),create:b({nu:ge.fromTag,clone:function(e){return ge.fromDom(e.dom().cloneNode(!1))},text:ge.fromText}),query:b({comparePosition:function(e,n){return e.dom().compareDocumentPosition(n.dom())},prevSibling:an,nextSibling:ln}),property:b({children:fn,name:$,parent:un,document:function(e){return e.dom().ownerDocument},isText:Z,isComment:J,isElement:Q,getText:nt,setText:rt,isBoundary:function(e){return!!Q(e)&&("body"===$(e)||A(kt,$(e)))},isEmptyTag:function(e){return!!Q(e)&&A(["br","img","hr","input"],$(e))},isNonEditable:function(e){return Q(e)&&"false"===re(e,"contenteditable")}}),eq:en,is:rn}}var Nt=function(r,o,e,n){var t=o(r,e);return I(n,function(e,n){var t=o(r,n);return It(r,e,t)},t)},It=function(n,e,t){return e.bind(function(e){return t.filter(y(n.eq,e))})},Pt=function(e,n,t){return 0<t.length?Nt(e,n,(r=t)[0],r.slice(1)):C.none();var r},Mt=function(t,e,n,r){void 0===r&&(r=f);var o=[e].concat(t.up().all(e)),i=[n].concat(t.up().all(n)),u=function(n){return _(n,r).fold(function(){return n},function(e){return n.slice(0,e+1)})},c=u(o),a=u(i),l=M(c,function(e){return E(a,(n=e,y(t.eq,n)));var n});return{firstpath:b(c),secondpath:b(a),shared:b(l)}},_t=Bt(),Wt=function(t,e){return Pt(_t,function(e,n){return t(n)},e)},jt=function(e){return Nn(e,"table")},zt=function(l,f,s){var d=function(n){return function(e){return s!==undefined&&s(e)||en(e,n)}};return en(l,f)?C.some({boxes:C.some([l]),start:l,finish:f}):jt(l).bind(function(a){return jt(f).bind(function(i){if(en(a,i))return C.some({boxes:(o=l,u=f,c=Et(a),Tt(c,o,u)),start:l,finish:f});if(tn(a,i)){var e=0<(n=Dn(f,"td,th",d(a))).length?n[n.length-1]:f;return C.some({boxes:At(a,l,a,f,i),start:l,finish:e})}if(tn(i,a)){var n,t=0<(n=Dn(l,"td,th",d(i))).length?n[n.length-1]:l;return C.some({boxes:At(i,l,a,f,i),start:l,finish:t})}return Mt(_t,l,f,r).shared().bind(function(e){return Mn(e,"table",s).bind(function(e){var n=Dn(f,"td,th",d(e)),t=0<n.length?n[n.length-1]:f,r=Dn(l,"td,th",d(e)),o=0<r.length?r[r.length-1]:l;return C.some({boxes:At(e,l,a,f,i),start:o,finish:t})})});var r,o,u,c})})},Lt=function(e,n){var t=En(e,n);return 0<t.length?C.some(t):C.none()},Ft=function(e,n,r){return Pn(e,n).bind(function(t){return Pn(e,r).bind(function(n){return Wt(jt,[t,n]).map(function(e){return{first:b(t),last:b(n),table:b(e)}})})})},Ht=function(e,n,t,r,o){return i=o,M(e,function(e){return Qe(e,i)}).bind(function(e){return Dt(e,n,t).bind(function(e){return t=r,Nn(n=e,"table").bind(function(e){return Pn(e,t).bind(function(e){return zt(e,n).bind(function(n){return n.boxes.map(function(e){return{boxes:e,start:n.start,finish:n.finish}})})})});var n,t})});var i},qt=function(r,e,n){return Ft(r,e,n).bind(function(u){var e=function(e){return en(r,e)},n=Nn(u.first(),"thead,tfoot,tbody,table",e),t=Nn(u.last(),"thead,tfoot,tbody,table",e);return n.bind(function(i){return t.bind(function(e){return en(i,e)?(n=u.table(),t=u.first(),r=u.last(),o=Et(n),Rt(o,t,r)):C.none();var n,t,r,o})})})},Ut="data-mce-first-selected",Vt="data-mce-last-selected",Kt="td[data-mce-selected],th[data-mce-selected]",Xt="[data-mce-selected]",$t=Ut,Gt="td[data-mce-first-selected],th[data-mce-first-selected]",Yt=Vt,Jt="td[data-mce-last-selected],th[data-mce-last-selected]",Qt=/* */Object.freeze({__proto__:null,selected:"data-mce-selected",selectedSelector:Kt,attributeSelector:Xt,firstSelected:$t,firstSelectedSelector:Gt,lastSelected:Yt,lastSelectedSelector:Jt}),Zt=function(u){if(!h(u))throw new Error("cases must be an array");if(0===u.length)throw new Error("there must be at least one case");var c=[],t={};return B(u,function(e,r){var n=F(e);if(1!==n.length)throw new Error("one and only one name per case");var o=n[0],i=e[o];if(t[o]!==undefined)throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!h(i))throw new Error("case arguments must be an array");c.push(o),t[o]=function(){var e=arguments.length;if(e!==i.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+i.length+" ("+i+"), got "+e);for(var t=new Array(e),n=0;n<t.length;n++)t[n]=arguments[n];return{fold:function(){if(arguments.length!==u.length)throw new Error("Wrong number of arguments to fold. Expected "+u.length+", got "+arguments.length);return arguments[r].apply(null,t)},match:function(e){var n=F(e);if(c.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+c.join(",")+"\nActual: "+n.join(","));if(!z(c,function(e){return A(n,e)}))throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+c.join(", "));return e[o].apply(null,t)},log:function(e){p.console.log(e,{constructors:c,constructor:o,params:t})}}}}),t},er=Zt([{none:[]},{multiple:["elements"]},{single:["selection"]}]),nr=function(e,n,t,r){return e.fold(n,t,r)},tr=er.none,rr=er.multiple,or=er.single,ir=function(e,n){return nr(n.get(),b([]),o,b([e]))},ur=function(e){return{element:b(e),mergable:C.none,unmergable:C.none,selection:b([e])}},cr=function(e,n,t){return{element:b(t),mergable:b((o=n,nr(e.get(),C.none,function(n,e){return 0===n.length?C.none():qt(o,Gt,Jt).bind(function(e){return 1<n.length?C.some({bounds:b(e),cells:b(n)}):C.none()})},C.none))),unmergable:b(0<(r=ir(t,e)).length&&z(r,function(e){return ie(e,"rowspan")&&1<parseInt(re(e,"rowspan"),10)||ie(e,"colspan")&&1<parseInt(re(e,"colspan"),10)})?C.some(r):C.none()),selection:b(ir(t,e))};var r,o},ar=function(d,e,m,g){d.on("BeforeGetContent",function(t){!0===t.selection&&nr(e.get(),x,function(e){t.preventDefault(),$n(e[0]).map(dt).map(function(e){return[Zn(e,Xt)]}).each(function(e){var n;t.content="text"===t.format?k(e,function(e){return e.dom().innerText}).join(""):(n=d,k(e,function(e){return n.selection.serializer.serialize(e.dom(),{})}).join(""))})},x)}),d.on("BeforeSetContent",function(s){!0===s.selection&&!0===s.paste&&C.from(d.dom.getParent(d.selection.getStart(),"th,td")).each(function(e){var f=ge.fromDom(e);$n(f).each(function(n){var e,t,r,o,i,u=N((e=s.content,(r=(t||p.document).createElement("div")).innerHTML=e,fn(ge.fromDom(r))),function(e){return"meta"!==$(e)});if(1===u.length&&"table"===$(u[0])){s.preventDefault();var c=ge.fromDom(d.getDoc()),a=wt(c),l=(o=f,i=u[0],{element:b(o),clipboard:b(i),generators:b(a)});m.pasteCells(n,l).each(function(e){d.selection.setRng(e),d.focus(),g.clear(n)})}})})})};function lr(r,o){var e=function(e){var n=o(e);if(n<=0||null===n){var t=ye(e,r);return parseFloat(t)||0}return n},i=function(o,e){return P(e,function(e,n){var t=ye(o,n),r=t===undefined?0:parseInt(t,10);return isNaN(r)?e:e+r},0)};return{set:function(e,n){if(!R(n)&&!n.match(/^[0-9]+$/))throw new Error(r+".set accepts only positive integer values. Value was "+n);var t=e.dom();de(t)&&(t.style[r]=n+"px")},get:e,getOuter:e,aggregate:i,max:function(e,n,t){var r=i(e,t);return r<n?n-r:0}}}var fr=lr("height",function(e){var n=e.dom();return pe(e)?n.getBoundingClientRect().height:n.offsetHeight}),sr=function(e){return fr.get(e)},dr=function(e){return fr.getOuter(e)},mr=lr("width",function(e){return e.dom().offsetWidth}),gr=function(e){return mr.get(e)},pr=function(e){return mr.getOuter(e)},hr=function(e,n,t){return r=ye(e,n),o=t,i=parseFloat(r),isNaN(i)?o:i;var r,o,i},vr=function(e){return(c=Je()).browser.isIE()||c.browser.isEdge()?(t=hr(n=e,"padding-top",0),r=hr(n,"padding-bottom",0),o=hr(n,"border-top-width",0),i=hr(n,"border-bottom-width",0),u=n.dom().getBoundingClientRect().height,"border-box"===ye(n,"box-sizing")?u:u-t-r-(o+i)):hr(e,"height",sr(e));var n,t,r,o,i,u,c},br=/(\d+(\.\d+)?)(\w|%)*/,wr=/(\d+(\.\d+)?)%/,yr=/(\d+(\.\d+)?)px|em/,Sr=function(e,n){be(e,"width",n+"px")},xr=function(e,n){be(e,"width",n+"%")},Cr=function(e,n){be(e,"height",n+"px")},Rr=function(e,n,t,r){var o,i,u,c,a,l,f,s=parseInt(e,10);return ae(l=e,f="%",l.length-f.length)&&"table"!==$(n)?(i=s,u=t,c=r,a=$n(o=n).map(function(e){var n=u(e);return Math.floor(i/100*n)}).getOr(i),c(o,a),a):s},Tr=function(e){var n,t=xe(n=e,"height").getOrThunk(function(){return vr(n)+"px"});return t?Rr(t,e,sr,Cr):sr(e)},Or=function(e){return xe(e,"width").fold(function(){return C.from(re(e,"width"))},function(e){return C.some(e)})},Dr=function(e,n){return e/n.pixelWidth()*100},Ar=function(n,t){return Or(n).fold(function(){var e=gr(n);return Dr(e,t)},function(e){return function(e,n,t){var r=wr.exec(n);if(null!==r)return parseFloat(r[1]);var o=gr(e);return Dr(o,t)}(n,e,t)})},Er=function(n,t){return Or(n).fold(function(){return gr(n)},function(e){return function(e,n,t){var r=yr.exec(n);if(null!==r)return parseInt(r[1],10);var o=wr.exec(n);if(null===o)return gr(e);var i=parseFloat(o[1]);return i/100*t.pixelWidth()}(n,e,t)})},kr=function(e){return t="rowspan",Tr(n=e)/Wn(n,t);var n,t},Br=function(e,n,t){be(e,"width",n+t)},Nr=b(wr),Ir=b(yr),Pr=function(t,r){Or(t).bind(function(e){var n=br.exec(e);return null!==n?C.some({width:b(parseFloat(n[1])),unit:b(n[3])}):C.none()}).each(function(e){var n=e.width()/2;Br(t,n,e.unit()),Br(r,n,e.unit())})},Mr=function(t,r){return{left:b(t),top:b(r),translate:function(e,n){return Mr(t+e,r+n)}}},_r=Mr,Wr=function(e,n){return e!==undefined?e:n!==undefined?n:0},jr=function(e){var n=e.dom().ownerDocument,t=n.body,r=n.defaultView,o=n.documentElement;if(t===e.dom())return _r(t.offsetLeft,t.offsetTop);var i=Wr(r.pageYOffset,o.scrollTop),u=Wr(r.pageXOffset,o.scrollLeft),c=Wr(o.clientTop,t.clientTop),a=Wr(o.clientLeft,t.clientLeft);return zr(e).translate(u-a,i-c)},zr=function(e){var n,t=e.dom(),r=t.ownerDocument.body;return r===t?_r(r.offsetLeft,r.offsetTop):pe(e)?(n=t.getBoundingClientRect(),_r(n.left,n.top)):_r(0,0)},Lr=function(e,n){return{row:e,y:n}},Fr=function(e,n){return{col:e,x:n}},Hr=function(e){return jr(e).left()+pr(e)},qr=function(e){return jr(e).left()},Ur=function(e,n){return Fr(e,qr(n))},Vr=function(e,n){return Fr(e,Hr(n))},Kr=function(e){return jr(e).top()},Xr=function(e,n){return Lr(e,Kr(n))},$r=function(e,n){return Lr(e,Kr(n)+dr(n))},Gr=function(t,n,r){if(0===r.length)return[];var e=k(r.slice(1),function(e,n){return e.map(function(e){return t(n,e)})}),o=r[r.length-1].map(function(e){return n(r.length-1,e)});return e.concat([o])},Yr={delta:o,positions:function(e){return Gr(Xr,$r,e)},edge:Kr},Jr={ltr:{delta:o,edge:qr,positions:function(e){return Gr(Ur,Vr,e)}},rtl:{delta:function(e){return-e},edge:Hr,positions:function(e){return Gr(Vr,Ur,e)}}};function Qr(n){var t=function(e){return n(e).isRtl()?Jr.rtl:Jr.ltr};return{delta:function(e,n){return t(n).delta(e,n)},edge:function(e){return t(e).edge(e)},positions:function(e,n){return t(n).positions(e,n)}}}var Zr=function(e){var n=Gn(e);return Qn.generate(n).grid},eo=function(e){for(var n=[],t=function(e){n.push(e)},r=0;r<e.length;r++)e[r].each(t);return n},no=function(e,n,t,r){t===r?ue(e,n):ne(e,n,t)},to=function(o,e){var i=[],u=[],n=function(e,n){0<e.length?function(e,n){var t=In(o,n).getOrThunk(function(){var e=ge.fromTag(n,on(o).dom());return pn(o,e),e});wn(t);var r=k(e,function(e){e.isNew()&&i.push(e.element());var n=e.element();return wn(n),B(e.cells(),function(e){e.isNew()&&u.push(e.element()),no(e.element(),"colspan",e.colspan(),1),no(e.element(),"rowspan",e.rowspan(),1),pn(n,e.element())}),n});bn(t,r)}(e,n):In(o,n).each(yn)},t=[],r=[],c=[];return B(e,function(e){switch(e.section()){case"thead":t.push(e);break;case"tbody":r.push(e);break;case"tfoot":c.push(e)}}),n(t,"thead"),n(r,"tbody"),n(c,"tfoot"),{newRows:i,newCells:u}},ro=function(e,n){var t=re(e,n);return t===undefined||""===t?[]:t.split(" ")},oo=function(e){return e.dom().classList!==undefined},io=function(e,n){return o=n,i=ro(t=e,r="class").concat([o]),ne(t,r,i.join(" ")),!0;var t,r,o,i},uo=function(e,n){return o=n,0<(i=N(ro(t=e,r="class"),function(e){return e!==o})).length?ne(t,r,i.join(" ")):ue(t,r),!1;var t,r,o,i},co=function(e,n){oo(e)?e.dom().classList.add(n):io(e,n)},ao=function(e){0===(oo(e)?e.dom().classList:ro(e,"class")).length&&ue(e,"class")},lo=function(e,n){return oo(e)&&e.dom().classList.contains(n)},fo=function(e,n){for(var t=[],r=e;r<n;r++)t.push(r);return t},so=function(r,o){if(o<0||o>=r.length-1)return C.none();var e=r[o].fold(function(){var e,n,t=(e=r.slice(0,o),(n=T.call(e,0)).reverse(),n);return L(t,function(e,n){return e.map(function(e){return{value:e,delta:n+1}})})},function(e){return C.some({value:e,delta:0})}),n=r[o+1].fold(function(){var e=r.slice(o+1);return L(e,function(e,n){return e.map(function(e){return{value:e,delta:n+1}})})},function(e){return C.some({value:e,delta:1})});return e.bind(function(t){return n.map(function(e){var n=e.delta+t.delta;return Math.abs(e.value-t.value)/n})})},mo=function(t){var e=t.grid,n=fo(0,e.columns()),r=fo(0,e.rows());return k(n,function(n){return go(function(){return j(r,function(e){return Qn.getAt(t,e,n).filter(function(e){return e.column()===n}).fold(b([]),function(e){return[e]})})},function(e){return 1===e.colspan()},function(){return Qn.getAt(t,0,n)})})},go=function(e,n,t){var r=e();return M(r,n).orThunk(function(){return C.from(r[0]).orThunk(t)}).map(function(e){return e.element()})},po=function(t){var e=t.grid,n=fo(0,e.rows()),r=fo(0,e.columns());return k(n,function(n){return go(function(){return j(r,function(e){return Qn.getAt(t,n,e).filter(function(e){return e.row()===n}).fold(b([]),function(e){return[e]})})},function(e){return 1===e.rowspan()},function(){return Qn.getAt(t,n,0)})})},ho=function(e){var n=e.replace(/\./g,"-");return{resolve:function(e){return n+"-"+e}}},vo=ho("ephox-snooker").resolve,bo=vo("resizer-bar"),wo=vo("resizer-rows"),yo=vo("resizer-cols"),So=function(e){var n=En(e.parent(),"."+bo);B(n,yn)},xo=function(t,e,r){var o=t.origin();B(e,function(e){e.each(function(e){var n=r(o,e);co(n,bo),pn(t.parent(),n)})})},Co=function(e,n,l,f){xo(e,n,function(e,n){var t,r,o,i,u,c,a=(t=n.col,r=n.x-e.left(),o=l.top()-e.top(),i=7,u=f,c=ge.fromTag("div"),we(c,{position:"absolute",left:r-i/2+"px",top:o+"px",height:u+"px",width:i+"px"}),te(c,{"data-column":t,role:"presentation"}),c);return co(a,yo),a})},Ro=function(e,n,l,f){xo(e,n,function(e,n){var t,r,o,i,u,c,a=(t=n.row,r=l.left()-e.left(),o=n.y-e.top(),i=f,u=7,c=ge.fromTag("div"),we(c,{position:"absolute",left:r+"px",top:o-u/2+"px",height:u+"px",width:i+"px"}),te(c,{"data-row":t,role:"presentation"}),c);return co(a,wo),a})},To=function(e,n,t,r){So(e);var o=Gn(n),i=Qn.generate(o);!function(e,n,t,r,o,i){var u=jr(n),c=0<t.length?o.positions(t,n):[];Ro(e,c,u,pr(n));var a=0<r.length?i.positions(r,n):[];Co(e,a,u,dr(n))}(e,n,po(i),mo(i),t,r)},Oo=function(e,n){var t=En(e.parent(),"."+bo);B(t,n)},Do=function(e){Oo(e,function(e){be(e,"display","none")})},Ao=function(e){Oo(e,function(e){be(e,"display","block")})},Eo=function(e,n,t){e.cells()[n]=t},ko=function(e,n){return Tn(n,e.section())},Bo=function(e,n){var t=e.cells(),r=k(t,n);return Tn(r,e.section())},No=function(e,n){return e.cells()[n]},Io=function(e,n){return No(e,n).element()},Po=function(e){return e.cells().length},Mo=function(e,n){if(0===e.length)return 0;var t=e[0];return _(e,function(e){return!n(t.element(),e.element())}).fold(function(){return e.length},function(e){return e})},_o=function(e,n,t,r){var o,i=e[n].cells().slice(t),u=Mo(i,r),c=(o=t,k(e,function(e){return No(e,o)}).slice(n));return{colspan:u,rowspan:Mo(c,r)}},Wo=function(a,l){var f=k(a,function(e){return k(e.cells(),function(){return!1})});return k(a,function(e,c){var n,t,r=j(e.cells(),function(e,n){if(!1!==f[c][n])return[];var t,r,o,i,u=_o(a,c,n,l);return function(e,n,t,r){for(var o=e;o<e+t;o++)for(var i=n;i<n+r;i++)f[o][i]=!0}(c,n,u.rowspan,u.colspan),[(t=e.element(),r=u.rowspan,o=u.colspan,i=e.isNew(),{element:b(t),rowspan:b(r),colspan:b(o),isNew:b(i)})]});return n=r,t=e.section(),{details:b(n),section:b(t)}})},jo=function(e,n,t){for(var r=[],o=0;o<e.grid.rows();o++){for(var i=[],u=0;u<e.grid.columns();u++){var c=Qn.getAt(e,o,u).map(function(e){return Rn(e.element(),t)}).getOrThunk(function(){return Rn(n.gap(),!0)});i.push(c)}var a=Tn(i,e.all[o].section());r.push(a)}return r},zo=function(e,c){return k(e,function(e){var n,t,r,o,i,u=(n=e.details(),L(n,function(e){return un(e.element()).map(function(e){var n=un(e).isNone();return Rn(e,n)})}).getOrThunk(function(){return Rn(c.row(),!0)}));return t=u.element(),r=e.details(),o=e.section(),i=u.isNew(),{element:b(t),cells:b(r),section:b(o),isNew:b(i)}})},Lo=function(e,n){var t=Wo(e,en);return zo(t,n)},Fo=function(e,n){return L(e.all,function(e){return M(e.cells(),function(e){return en(n,e.element())})})},Ho=function(c,a,l,f,s){return function(t,r,e,o,i){var n=Gn(r),u=Qn.generate(n);return a(u,e).map(function(e){var n=jo(u,o,!1),t=c(n,e,en,s(o)),r=Lo(t.grid(),o);return{grid:b(r),cursor:t.cursor}}).fold(function(){return C.none()},function(e){var n=to(r,e.grid());return l(r,e.grid(),i),f(r),To(t,r,Yr,i),C.some({cursor:e.cursor,newRows:b(n.newRows),newCells:b(n.newCells)})})}},qo=function(n,e){return Vn(e.element()).bind(function(e){return Fo(n,e)})},Uo=function(n,e){var t=k(e.selection(),function(e){return Vn(e).bind(function(e){return Fo(n,e)})}),r=eo(t);return 0<r.length?C.some({cells:r,generators:e.generators,clipboard:e.clipboard}):C.none()},Vo=function(n,e){var t=k(e.selection(),function(e){return Vn(e).bind(function(e){return Fo(n,e)})}),r=eo(t);return 0<r.length?C.some(r):C.none()},Ko=function(t){return{is:function(e){return t===e},isValue:i,isError:f,getOr:b(t),getOrThunk:b(t),getOrDie:b(t),or:function(e){return Ko(t)},orThunk:function(e){return Ko(t)},fold:function(e,n){return n(t)},map:function(e){return Ko(e(t))},mapError:function(e){return Ko(t)},each:function(e){e(t)},bind:function(e){return e(t)},exists:function(e){return e(t)},forall:function(e){return e(t)},toOption:function(){return C.some(t)}}},Xo=function(t){return{is:f,isValue:f,isError:i,getOr:o,getOrThunk:function(e){return e()},getOrDie:function(){return e=String(t),function(){throw new Error(e)}();var e},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,n){return e(t)},map:function(e){return Xo(t)},mapError:function(e){return Xo(e(t))},each:x,bind:function(e){return Xo(t)},exists:f,forall:i,toOption:C.none}},$o={value:Ko,error:Xo,fromOption:function(e,n){return e.fold(function(){return Xo(n)},Ko)}},Go=function(e,n){return{rowDelta:0,colDelta:Po(e[0])-Po(n[0])}},Yo=function(e,n){return k(e,function(){return Rn(n.cell(),!0)})},Jo=function(n,e,t){return n.concat(function(e,n){for(var t=[],r=0;r<e;r++)t.push(n(r));return t}(e,function(e){return ko(n[n.length-1],Yo(n[n.length-1].cells(),t))}))},Qo=function(e,n,t){return k(e,function(e){return ko(e,e.cells().concat(Yo(fo(0,n),t)))})},Zo=function(e,n,t){var r=n.colDelta<0?Qo:o;return(n.rowDelta<0?Jo:o)(r(e,Math.abs(n.colDelta),t),Math.abs(n.rowDelta),t)},ei=function(e,n,t,r){for(var o=!0,i=0;i<e.length;i++)for(var u=0;u<Po(e[0]);u++){var c=t(Io(e[i],u),n);!0===c&&!1===o?Eo(e[i],u,Rn(r(),!0)):!0===c&&(o=!1)}return e},ni=function(i,t,u,c){if(0<t&&t<i.length){var e=i[t-1].cells(),n=(r=u,P(e,function(e,n){return E(e,function(e){return r(e.element(),n.element())})?e:e.concat([n])},[]));B(n,function(r){for(var o=C.none(),e=function(t){for(var e=function(n){var e=i[t].cells()[n];u(e.element(),r.element())&&(o.isNone()&&(o=C.some(c())),o.each(function(e){Eo(i[t],n,Rn(e,!0))}))},n=0;n<Po(i[0]);n++)e(n)},n=t;n<i.length;n++)e(n)})}var r;return i},ti=function(t,r,o,i,u){return function(e,n,t){if(e.row()>=n.length||e.column()>Po(n[0]))return $o.error("invalid start address out of table bounds, row: "+e.row()+", column: "+e.column());var r=n.slice(e.row()),o=r[0].cells().slice(e.column()),i=Po(t[0]),u=t.length;return $o.value({rowDelta:r.length-u,colDelta:o.length-i})}(t,r,o).map(function(e){var n=Zo(r,e,i);return function(e,n,t,r,o){for(var i,u,c,a,l,f=e.row(),s=e.column(),d=f+t.length,m=s+Po(t[0]),g=f;g<d;g++)for(var p=s;p<m;p++){c=p,l=a=void 0,a=y(o,No((i=n)[u=g],c).element()),l=i[u],1<i.length&&1<Po(l)&&(0<c&&a(Io(l,c-1))||c<l.cells().length-1&&a(Io(l,c+1))||0<u&&a(Io(i[u-1],c))||u<i.length-1&&a(Io(i[u+1],c)))&&ei(n,Io(n[g],p),o,r.cell);var h=Io(t[g-f],p-s),v=r.replace(h);Eo(n[g],p,Rn(v,!0))}return n}(t,n,o,i,u)})},ri=function(e,n,t,r,o){ni(n,e,o,r.cell);var i=Go(t,n),u=Zo(t,i,r),c=Go(n,u),a=Zo(n,c,r);return a.slice(0,e).concat(u).concat(a.slice(e,a.length))},oi=function(t,r,e,o,i){var n=t.slice(0,r),u=t.slice(r),c=Bo(t[e],function(e,n){return 0<r&&r<t.length&&o(Io(t[r-1],n),Io(t[r],n))?No(t[r],n):Rn(i(e.element(),o),!0)});return n.concat([c]).concat(u)},ii=function(e,l,f,s,d){return k(e,function(e){var n,t,r,o,i,u,c,a=0<l&&l<Po(e)&&s(Io(e,l-1),Io(e,l))?No(e,l):Rn(d(Io(e,f),s),!0);return t=l,r=a,o=(n=e).cells(),i=o.slice(0,t),u=o.slice(t),c=i.concat([r]).concat(u),ko(n,c)})},ui=function(e,t,r,o){return k(e,function(e){return Bo(e,function(e){return n=e,E(t,function(e){return r(n.element(),e.element())})?Rn(o(e.element(),r),!0):e;var n})})},ci=function(e,n,t,r){return Io(e[n],t)!==undefined&&0<n&&r(Io(e[n-1],t),Io(e[n],t))},ai=function(e,n,t){return 0<n&&t(Io(e,n-1),Io(e,n))},li=function(t,r,o,e){var n=j(t,function(e,n){return ci(t,n,r,o)||ai(e,r,o)?[]:[No(e,r)]});return ui(t,n,o,e)},fi=function(t,r,o,e){var i=t[r],n=j(i.cells(),function(e,n){return ci(t,r,n,o)||ai(i,n,o)?[]:[e]});return ui(t,n,o,e)},si=Zt([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}]),di=Re({},si),mi=function(e,n,i,u){var t,r,c=e.slice(0),o=(r=n,0===(t=e).length?di.none():1===t.length?di.only(0):0===r?di.left(0,1):r===t.length-1?di.right(r-1,r):0<r&&r<t.length-1?di.middle(r-1,r,r+1):di.none()),a=function(e){return k(e,b(0))},l=b(a(c)),f=function(e,n){if(0<=i){var t=Math.max(u.minCellWidth(),c[n]-i);return a(c.slice(0,e)).concat([i,t-c[n]]).concat(a(c.slice(n+1)))}var r=Math.max(u.minCellWidth(),c[e]+i),o=c[e]-r;return a(c.slice(0,e)).concat([r-c[e],o]).concat(a(c.slice(n+1)))},s=f;return o.fold(l,function(e){return u.singleColumnWidth(c[e],i)},s,function(e,n,t){return f(n,t)},function(e,n){if(0<=i)return a(c.slice(0,n)).concat([i]);var t=Math.max(u.minCellWidth(),c[n]+i);return a(c.slice(0,n)).concat([t-c[n]])})},gi=function(e,n,t,r,o){var i=mo(e),u=k(i,function(e){return e.map(n.edge)});return k(i,function(e,n){return e.filter(a(jn)).fold(function(){var e=so(u,n);return r(e)},function(e){return t(e,o)})})},pi=function(e,n,t){return gi(e,n,Ar,function(e){return e.fold(function(){return t.minCellWidth()},function(e){return e/t.pixelWidth()*100})},t)},hi=function(e,n,t){return gi(e,n,Er,function(e){return e.getOrThunk(t.minCellWidth)},t)},vi=function(e,n){return t=n,r=kr,o=function(e){return e.getOrThunk(Hn)},i=po(e),u=k(i,function(e){return e.map(t.edge)}),k(i,function(e,n){return e.filter(a(zn)).fold(function(){var e=so(u,n);return o(e)},function(e){return r(e)})});var t,r,o,i,u},bi=function(e,n,t){for(var r=0,o=e;o<n;o++)r+=t[o]!==undefined?t[o]:0;return r},wi=function(e,t){var n=Qn.justCells(e);return k(n,function(e){var n=bi(e.column(),e.column()+e.colspan(),t);return{element:e.element(),width:n,colspan:e.colspan()}})},yi=function(e){return{width:b(e),pixelWidth:b(e),getWidths:hi,getCellDelta:o,singleColumnWidth:function(e,n){return[Math.max(Fn(),e+n)-e]},minCellWidth:Fn,setElementWidth:Sr,setTableWidth:function(e,n,t){var r=I(n,function(e,n){return e+n},0);Sr(e,r)}}},Si=function(e,n){var t,r,o,i,u=Nr().exec(n);if(null!==u)return t=u[1],r=e,o=parseFloat(t),i=gr(r),{width:b(o),pixelWidth:b(i),getWidths:pi,getCellDelta:function(e){return e/i*100},singleColumnWidth:function(e,n){return[100-e]},minCellWidth:function(){return Fn()/i*100},setElementWidth:xr,setTableWidth:function(e,n,t){xr(e,o+t/100*o)}};var c=Ir().exec(n);if(null!==c){var a=parseInt(c[1],10);return yi(a)}var l=gr(e);return yi(l)},xi=function(n){return Or(n).fold(function(){var e=gr(n);return yi(e)},function(e){return Si(n,e)})},Ci=function(e){return Qn.generate(e)},Ri=function(e){var n=Gn(e);return Ci(n)},Ti=function(e,t,r,n){var o,i,u,c,a=Ri(e),l=vi(a,n),f=k(l,function(e,n){return r===n?Math.max(t+e,Hn()):e}),s=(o=a,i=f,u=Qn.justCells(o),k(u,function(e){var n=bi(e.row(),e.row()+e.rowspan(),i);return{element:e.element,height:b(n),rowspan:e.rowspan}})),d=(c=f,k(a.all,function(e,n){return{element:e.element,height:b(c[n])}}));B(d,function(e){Cr(e.element(),e.height())}),B(s,function(e){Cr(e.element(),e.height())});var m=I(f,function(e,n){return e+n},0);Cr(e,m)},Oi=function(e){return e.slice(0).sort()},Di=function(r,o,i){if(0===o.length)throw new Error("You must specify at least one required field.");var t;return function(n,e){if(!h(e))throw new Error("The "+n+" fields must be an array. Was: "+e+".");B(e,function(e){if(!g(e))throw new Error("The value "+e+" in the "+n+" fields was not a string.")})}("required",o),t=Oi(o),M(t,function(e,n){return n<t.length-1&&e===t[n+1]}).each(function(e){throw new Error("The field: "+e+" occurs more than once in the combined fields: ["+t.join(", ")+"].")}),function(n){var t=F(n);z(o,function(e){return A(t,e)})||function(e,n){throw new Error("All required keys ("+Oi(e).join(", ")+") were not specified. Specified keys were: "+Oi(n).join(", ")+".")}(o,t),r(o,t);var e=N(o,function(e){return!i.validate(n[e],e)});return 0<e.length&&function(e,n){throw new Error("All values need to be of type: "+n+". Keys ("+Oi(e).join(", ")+") were not.")}(e,i.label),n}},Ai=function(n,e){var t=N(e,function(e){return!A(n,e)});0<t.length&&function(e){throw new Error("Unsupported keys for object: "+Oi(e).join(", "))}(t)},Ei=function(e){return Di(Ai,e,{validate:w,label:"function"})},ki=Ei(["cell","row","replace","gap"]),Bi=function(e){var n=_n(e,"colspan",1),t=_n(e,"rowspan",1);return{element:b(e),colspan:b(n),rowspan:b(t)}},Ni=function(r,o){void 0===o&&(o=Bi),ki(r);var t=S(C.none()),i=function(e){var n,t=o(e);return n=t,r.cell(n)},u=function(e){var n=i(e);return t.get().isNone()&&t.set(C.some(n)),c=C.some({item:e,replacement:n}),n},c=C.none();return{getOrInit:function(n,t){return c.fold(function(){return u(n)},function(e){return t(n,e.item)?e.replacement:u(n)})},cursor:t.get}},Ii=function(c,a){return function(r){var o=S(C.none());ki(r);var i=[],u=function(e){var n={scope:c},t=r.replace(e,a,n);return i.push({item:e,sub:t}),o.get().isNone()&&o.set(C.some(t)),t};return{replaceOrInit:function(n,t){return r=n,o=t,M(i,function(e){return o(e.item,r)}).fold(function(){return u(n)},function(e){return t(n,e.item)?e.sub:u(n)});var r,o},cursor:o.get}}},Pi=function(t){ki(t);var e=S(C.none());return{combine:function(n){return e.get().isNone()&&e.set(C.some(n)),function(){var e=t.cell({element:b(n),colspan:b(1),rowspan:b(1)});return Ce(e,"width"),Ce(n,"width"),e}},cursor:e.get}},Mi=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","table","thead","tfoot","tbody","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"],_i=Bt(),Wi=function(e){return n=e,t=_i.property().name(n),A(Mi,t);var n,t},ji=function(e){return n=e,t=_i.property().name(n),A(["ol","ul"],t);var n,t},zi=function(e){return n=e,A(["br","img","hr","input"],_i.property().name(n));var n},Li=function(e){var n,i=function(e){return"br"===$(e)},t=function(o){return at(o).bind(function(t){var r=ln(t).map(function(e){return!!Wi(e)||!!zi(e)&&"img"!==$(e)}).getOr(!1);return un(t).map(function(e){return!0===r||("li"===$(n=e)||Bn(n,ji).isSome())||i(t)||Wi(e)&&!en(o,e)?[]:[ge.fromTag("br")];var n})}).getOr([])},r=0===(n=j(e,function(e){var n=fn(e);return z(n,function(e){return i(e)||Z(e)&&0===nt(e).trim().length})?[]:n.concat(t(e))})).length?[ge.fromTag("br")]:n;wn(e[0]),bn(e[0],r)},Fi=function(e){0===Kn(e).length&&yn(e)},Hi=function(e,n){return{grid:b(e),cursor:b(n)}},qi=function(e,n,t){return Ui(e,n,t).orThunk(function(){return Ui(e,0,0)})},Ui=function(e,n,t){return C.from(e[n]).bind(function(e){return C.from(e.cells()[t]).bind(function(e){return C.from(e.element())})})},Vi=function(e,n,t){return Hi(e,Ui(e,n,t))},Ki=function(e){return P(e,function(e,n){return E(e,function(e){return e.row()===n.row()})?e:e.concat([n])},[]).sort(function(e,n){return e.row()-n.row()})},Xi=function(e){return P(e,function(e,n){return E(e,function(e){return e.column()===n.column()})?e:e.concat([n])},[]).sort(function(e,n){return e.column()-n.column()})},$i=function(e,n,t){var r,o=(r=t,k(e,function(e){var n=k(Kn(e),function(e){var n=_n(e,"rowspan",1),t=_n(e,"colspan",1);return xn(e,n,t)});return Cn(e,n,r.section())})),i=Qn.generate(o);return jo(i,n,!0)},Gi=function(e,n,t){var r=xi(e),o=Ci(n),i=r.getWidths(o,t,r),u=wi(o,i);B(u,function(e){r.setElementWidth(e.element,e.width)}),0<u.length&&r.setTableWidth(e,i,r.getCellDelta(0))},Yi=Ho(function(e,n,t,r){var o=n[0].row(),i=n[0].row(),u=Ki(n),c=P(u,function(e,n){return oi(e,i,o,t,r.getOrInit)},e);return Vi(c,i,n[0].column())},Vo,x,x,Ni),Ji=Ho(function(e,n,t,r){var o=Ki(n),i=o[o.length-1].row(),u=o[o.length-1].row()+o[o.length-1].rowspan(),c=P(o,function(e,n){return oi(e,u,i,t,r.getOrInit)},e);return Vi(c,u,n[0].column())},Vo,x,x,Ni),Qi=Ho(function(e,n,t,r){var o=Xi(n),i=o[0].column(),u=o[0].column(),c=P(o,function(e,n){return ii(e,u,i,t,r.getOrInit)},e);return Vi(c,n[0].row(),u)},Vo,Gi,x,Ni),Zi=Ho(function(e,n,t,r){var o=n[n.length-1].column(),i=n[n.length-1].column()+n[n.length-1].colspan(),u=Xi(n),c=P(u,function(e,n){return ii(e,i,o,t,r.getOrInit)},e);return Vi(c,n[0].row(),i)},Vo,Gi,x,Ni),eu=Ho(function(e,n,t,r){var o,i,u,c,a=Xi(n),l=(o=e,i=a[0].column(),u=a[a.length-1].column(),c=k(o,function(e){var n=e.cells().slice(0,i).concat(e.cells().slice(u+1));return Tn(n,e.section())}),N(c,function(e){return 0<e.cells().length})),f=qi(l,n[0].row(),n[0].column());return Hi(l,f)},Vo,Gi,Fi,Ni),nu=Ho(function(e,n,t,r){var o,i,u,c=Ki(n),a=(o=e,i=c[0].row(),u=c[c.length-1].row(),o.slice(0,i).concat(o.slice(u+1))),l=qi(a,n[0].row(),n[0].column());return Hi(a,l)},Vo,x,Fi,Ni),tu=(Ho(function(e,n,t,r){var o=li(e,n.column(),t,r.replaceOrInit);return Vi(o,n.row(),n.column())},qo,x,x,Ii("row","th")),Ho(function(e,n,t,r){var o=li(e,n.column(),t,r.replaceOrInit);return Vi(o,n.row(),n.column())},qo,x,x,Ii(null,"td")),Ho(function(e,n,t,r){var o=fi(e,n.row(),t,r.replaceOrInit);return Vi(o,n.row(),n.column())},qo,x,x,Ii("col","th")),Ho(function(e,n,t,r){var o=fi(e,n.row(),t,r.replaceOrInit);return Vi(o,n.row(),n.column())},qo,x,x,Ii(null,"td")),Ho(function(e,n,t,r){var o=n.cells();Li(o);var i=function(e,n,t){if(0===e.length)return e;for(var r=n.startRow();r<=n.finishRow();r++)for(var o=n.startCol();o<=n.finishCol();o++)Eo(e[r],o,Rn(t(),!1));return e}(e,n.bounds(),b(o[0]));return Hi(i,C.from(o[0]))},function(e,n){return n.mergable()},x,x,Pi)),ru=Ho(function(e,n,t,r){var o=I(n,function(e,n){return ei(e,n,t,r.combine(n))},e);return Hi(o,C.from(n[0]))},function(e,n){return n.unmergable()},Gi,x,Pi),ou=Ho(function(e,t,n,r){var o,i,u,c,a,l,f=(o=t.clipboard(),i=t.generators(),u=Gn(o),c=Qn.generate(u),jo(c,i,!0)),s=(a=t.row(),l=t.column(),{row:b(a),column:b(l)});return ti(s,e,f,t.generators(),n).fold(function(){return Hi(e,C.some(t.element()))},function(e){var n=qi(e,t.row(),t.column());return Hi(e,n)})},function(n,t){return Vn(t.element()).bind(function(e){return Fo(n,e).map(function(e){return Re(Re({},e),{generators:t.generators,clipboard:t.clipboard})})})},Gi,x,Ni),iu=Ho(function(e,n,t,r){var o=e[n.cells[0].row()],i=n.cells[0].row(),u=$i(n.clipboard(),n.generators(),o),c=ri(i,e,u,n.generators(),t),a=qi(c,n.cells[0].row(),n.cells[0].column());return Hi(c,a)},Uo,x,x,Ni),uu=Ho(function(e,n,t,r){var o=e[n.cells[0].row()],i=n.cells[n.cells.length-1].row()+n.cells[n.cells.length-1].rowspan(),u=$i(n.clipboard(),n.generators(),o),c=ri(i,e,u,n.generators(),t),a=qi(c,n.cells[0].row(),n.cells[0].column());return Hi(c,a)},Uo,x,x,Ni),cu=function(e){return ge.fromDom(e.getBody())},au=function(e){return e.getBoundingClientRect().width},lu=function(e){return e.getBoundingClientRect().height},fu=function(n){return function(e){return en(e,cu(n))}},su=function(e){return/^[0-9]+$/.test(e)&&(e+="px"),e},du=function(e){var n=En(e,"td[data-mce-style],th[data-mce-style]");ue(e,"data-mce-style"),B(n,function(e){ue(e,"data-mce-style")})},mu={isRtl:b(!1)},gu={isRtl:b(!0)},pu=function(e){return"rtl"==("rtl"===ye(e,"direction")?"rtl":"ltr")?gu:mu},hu={"border-collapse":"collapse",width:"100%"},vu={border:"1"},bu=function(e){return e.getParam("table_default_attributes",vu,"object")},wu=function(e){return e.getParam("table_default_styles",hu,"object")},yu=function(e){return e.getParam("table_tab_navigation",!0,"boolean")},Su=function(e){return e.getParam("table_cell_advtab",!0,"boolean")},xu=function(e){return e.getParam("table_row_advtab",!0,"boolean")},Cu=function(e){return e.getParam("table_advtab",!0,"boolean")},Ru=function(e){return e.getParam("table_style_by_css",!1,"boolean")},Tu=function(e){return e.getParam("table_class_list",[],"array")},Ou=function(e){return!1===e.getParam("table_responsive_width")},Du=function(e){var n=e.getParam("table_clone_elements");return g(n)?C.some(n.split(/[ ,]/)):Array.isArray(n)?C.some(n):C.none()},Au=function(e,n){return e.fire("newrow",{node:n})},Eu=function(e,n){return e.fire("newcell",{node:n})},ku=function(e,n,t,r,o){e.fire("TableSelectionChange",{cells:n,start:t,finish:r,otherCells:o})},Bu=function(e){e.fire("TableSelectionClear")},Nu=function(e,n){return{element:b(e),offset:b(n)}},Iu=function(n,e,t){return n.property().isText(e)&&0===n.property().getText(e).trim().length||n.property().isComment(e)?t(e).bind(function(e){return Iu(n,e,t).orThunk(function(){return C.some(e)})}):C.none()},Pu=function(e,n){return e.property().isText(n)?e.property().getText(n).length:e.property().children(n).length},Mu=function(e,n){var t=Iu(e,n,e.query().prevSibling).getOr(n);if(e.property().isText(t))return Nu(t,Pu(e,t));var r=e.property().children(t);return 0<r.length?Mu(e,r[r.length-1]):Nu(t,Pu(e,t))},_u=Mu,Wu=Bt(),ju=function(f,e){var t=function(e){return"table"===$(cu(e))},s=Du(f),n=function(u,c,a,l){return function(e,n){du(e);var t=l(),r=ge.fromDom(f.getDoc()),o=Qr(pu),i=bt(a,r,s);return c(e)?u(t,e,n,i,o).bind(function(e){return B(e.newRows(),function(e){Au(f,e.dom())}),B(e.newCells(),function(e){Eu(f,e.dom())}),e.cursor().map(function(e){var n=_u(Wu,e),t=f.dom.createRng();return t.setStart(n.element().dom(),n.offset()),t.setEnd(n.element().dom(),n.offset()),t})}):C.none()}};return{deleteRow:n(nu,function(e){var n=Zr(e);return!1===t(f)||1<n.rows()},x,e),deleteColumn:n(eu,function(e){var n=Zr(e);return!1===t(f)||1<n.columns()},x,e),insertRowsBefore:n(Yi,i,x,e),insertRowsAfter:n(Ji,i,x,e),insertColumnsBefore:n(Qi,i,Pr,e),insertColumnsAfter:n(Zi,i,Pr,e),mergeCells:n(tu,i,x,e),unmergeCells:n(ru,i,x,e),pasteRowsBefore:n(iu,i,x,e),pasteRowsAfter:n(uu,i,x,e),pasteCells:n(ou,i,x,e)}},zu=function(e,n,r){var t=Gn(e),o=Qn.generate(t);return Vo(o,n).map(function(e){var n=jo(o,r,!1).slice(e[0].row(),e[e.length-1].row()+e[e.length-1].rowspan()),t=Lo(n,r);return k(t,function(e){var t=st(e.element());return B(e.cells(),function(e){var n=dt(e.element());no(n,"colspan",e.colspan(),1),no(n,"rowspan",e.rowspan(),1),pn(t,n)}),t})})},Lu=tinymce.util.Tools.resolve("tinymce.util.Tools"),Fu=function(n){return function(e){return C.from(e.dom.getParent(e.selection.getStart(),n)).map(ge.fromDom)}},Hu=Fu("th,td"),qu=Fu("th,td,caption"),Uu=function(o,e,i){var n;return n=function(e,n){for(var t=0;t<n.length;t++){var r=o.getStyle(n[t],i);if(void 0===e&&(e=r),e!==r)return""}return e}(n,o.select("td,th",e))},Vu=function(e,n,t){t&&e.formatter.apply("align"+t,{},n)},Ku=function(e,n,t){t&&e.formatter.apply("valign"+t,{},n)},Xu=function(n,t){Lu.each("left center right".split(" "),function(e){n.formatter.remove("align"+e,{},t)})},$u=function(e,r,n){var o=function(e,t){return t=t||[],Lu.each(e,function(e){var n={text:e.text||e.title};e.menu?n.menu=o(e.menu):(n.value=e.value,r&&r(n)),t.push(n)}),t};return o(e,n||[])},Gu=function(n,e){var t=function(e){return fe(e,"rgb")?n.toHex(e):e};return{borderwidth:xe(ge.fromDom(e),"border-width").getOr(""),borderstyle:xe(ge.fromDom(e),"border-style").getOr(""),bordercolor:xe(ge.fromDom(e),"border-color").map(t).getOr(""),backgroundcolor:xe(ge.fromDom(e),"background-color").map(t).getOr("")}},Yu=function(e){var o=e[0],n=e.slice(1),t=F(o);return B(n,function(e){B(t,function(r){q(e,function(e,n){var t=o[r];""!==t&&r===n&&t!==e&&(o[r]="")})})}),o},Ju=function(e){var n=[{name:"borderstyle",type:"selectbox",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]},{name:"bordercolor",type:"colorinput",label:"Border color"},{name:"backgroundcolor",type:"colorinput",label:"Background color"}];return{title:"Advanced",name:"advanced",items:"cell"===e?[{name:"borderwidth",type:"input",label:"Border width"}].concat(n):n}},Qu=function(e,n,t,r,o){var i={};return Lu.each(e.split(" "),function(e){r.formatter.matchNode(o,n+e)&&(i[t]=e)}),i[t]||(i[t]=""),i},Zu=y(Qu,"left center right"),ec=y(Qu,"top middle bottom"),nc=function(e,n){var t,r,o,i,u,c,a,l,f=wu(e),s=bu(e),d=e.dom,m=n?(t=d,r=function(e){return fe(e,"rgb")?t.toHex(e):e},o=K(f,"border-style").getOr(""),i=K(f,"border-color").getOr(""),u=K(f,"background-color").getOr(""),{borderstyle:o,bordercolor:r(i),backgroundcolor:r(u)}):{};return Re(Re(Re(Re(Re(Re({},{height:"",width:"100%",cellspacing:"",cellpadding:"",caption:!1,"class":"",align:"",border:""}),f),s),m),(l=f["border-width"],Ru(e)&&l?{border:l}:K(s,"border").fold(function(){return{}},function(e){return{border:e}}))),(c=K(f,"border-spacing").or(K(s,"cellspacing")).fold(function(){return{}},function(e){return{cellspacing:e}}),a=K(f,"border-padding").or(K(s,"cellpadding")).fold(function(){return{}},function(e){return{cellpadding:e}}),Re(Re({},c),a)))},tc=[{name:"width",type:"input",label:"Width"},{name:"height",type:"input",label:"Height"},{name:"celltype",type:"selectbox",label:"Cell type",items:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{name:"scope",type:"selectbox",label:"Scope",items:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{name:"halign",type:"selectbox",label:"H Align",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{name:"valign",type:"selectbox",label:"V Align",items:[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}]}],rc=function(e){return t=(n=e).getParam("table_cell_class_list",[],"array"),r=$u(t,function(e){e.value&&(e.textStyle=function(){return n.formatter.getCssText({block:"tr",classes:[e.value]})})}),(0<t.length?C.some({name:"class",type:"selectbox",label:"Class",items:r}):C.none()).fold(function(){return tc},function(e){return tc.concat(e)});var n,t,r},oc={normal:function(t,r){return{setAttrib:function(e,n){t.setAttrib(r,e,n)},setStyle:function(e,n){t.setStyle(r,e,n)}}},ifTruthy:function(t,r){return{setAttrib:function(e,n){n&&t.setAttrib(r,e,n)},setStyle:function(e,n){n&&t.setStyle(r,e,n)}}}},ic=function(e,n){e.setAttrib("scope",n.scope),e.setAttrib("class",n["class"]),e.setStyle("width",su(n.width)),e.setStyle("height",su(n.height))},uc=function(e,n){e.setStyle("background-color",n.backgroundcolor),e.setStyle("border-color",n.bordercolor),e.setStyle("border-style",n.borderstyle),e.setStyle("border-width",su(n.borderwidth))},cc=function(e,n,t){var r,o,i=e.dom,u=t.celltype&&n[0].nodeName.toLowerCase()!==t.celltype?i.rename(n[0],t.celltype):n[0],c=oc.normal(i,u);ic(c,t),Su(e)&&uc(c,t),Xu(e,u),r=e,o=u,Lu.each("top middle bottom".split(" "),function(e){r.formatter.remove("valign"+e,{},o)}),t.halign&&Vu(e,u,t.halign),t.valign&&Ku(e,u,t.valign)},ac=function(t,e,r){var o=t.dom;Lu.each(e,function(e){r.celltype&&e.nodeName.toLowerCase()!==r.celltype&&(e=o.rename(e,r.celltype));var n=oc.ifTruthy(o,e);ic(n,r),Su(t)&&uc(n,r),r.halign&&Vu(t,e,r.halign),r.valign&&Ku(t,e,r.valign)})},lc=function(e,n,t){var r=t.getData();t.close(),e.undoManager.transact(function(){(1===n.length?cc:ac)(e,n,r),e.focus()})},fc=function(i){var e,n=[];if(n=i.dom.select("td[data-mce-selected],th[data-mce-selected]"),e=i.dom.getParent(i.selection.getStart(),"td,th"),!n.length&&e&&n.push(e),e=e||n[0]){var t=Lu.map(n,function(e){return t=e,r=Su(n=i),o=n.dom,Re(Re(Re({width:o.getStyle(t,"width")||o.getAttrib(t,"width"),height:o.getStyle(t,"height")||o.getAttrib(t,"height"),scope:o.getAttrib(t,"scope"),celltype:t.nodeName.toLowerCase(),"class":o.getAttrib(t,"class","")},Zu("align","halign",n,t)),ec("valign","valign",n,t)),r?Gu(o,t):{});var n,t,r,o}),r=Yu(t),o={type:"tabpanel",tabs:[{title:"General",name:"general",items:rc(i)},Ju("cell")]},u={type:"panel",items:[{type:"grid",columns:2,items:rc(i)}]};i.windowManager.open({title:"Cell Properties",size:"normal",body:Su(i)?o:u,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:r,onSubmit:y(lc,i,n)})}},sc=[{type:"selectbox",name:"type",label:"Row type",items:[{text:"Header",value:"thead"},{text:"Body",value:"tbody"},{text:"Footer",value:"tfoot"}]},{type:"selectbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height",type:"input"}],dc=function(e){return t=(n=e).getParam("table_row_class_list",[],"array"),r=$u(t,function(e){e.value&&(e.textStyle=function(){return n.formatter.getCssText({block:"tr",classes:[e.value]})})}),(0<t.length?C.some({name:"class",type:"selectbox",label:"Class",items:r}):C.none()).fold(function(){return sc},function(e){return sc.concat(e)});var n,t,r},mc=function(f,e,s,n){var d=f.dom,m=n.getData();n.close();var g=1===e.length?oc.normal:oc.ifTruthy;f.undoManager.transact(function(){Lu.each(e,function(e){var n,t,r,o,i,u;m.type!==e.parentNode.nodeName.toLowerCase()&&(n=f.dom,t=e,r=m.type,o=n.getParent(t,"table"),i=t.parentNode,(u=n.select(r,o)[0])||(u=n.create(r),o.firstChild?"CAPTION"===o.firstChild.nodeName?n.insertAfter(u,o.firstChild):o.insertBefore(u,o.firstChild):o.appendChild(u)),"tbody"===r&&"THEAD"===i.nodeName&&u.firstChild?u.insertBefore(t,u.firstChild):u.appendChild(t),i.hasChildNodes()||n.remove(i));var c,a,l=g(d,e);l.setAttrib("scope",m.scope),l.setAttrib("class",m["class"]),l.setStyle("height",su(m.height)),xu(f)&&(a=m,(c=l).setStyle("background-color",a.backgroundcolor),c.setStyle("border-color",a.bordercolor),c.setStyle("border-style",a.borderstyle)),m.align!==s.align&&(Xu(f,e),Vu(f,e,m.align))}),f.focus()})},gc=function(i){var e,t,r=i.dom,o=[];if((e=r.getParent(i.selection.getStart(),"table"))&&(t=r.getParent(i.selection.getStart(),"td,th"),Lu.each(e.rows,function(n){Lu.each(n.cells,function(e){if((r.getAttrib(e,"data-mce-selected")||e===t)&&o.indexOf(n)<0)return o.push(n),!1})}),o[0])){var n=Lu.map(o,function(e){return t=e,r=xu(n=i),o=n.dom,Re(Re({height:o.getStyle(t,"height")||o.getAttrib(t,"height"),scope:o.getAttrib(t,"scope"),"class":o.getAttrib(t,"class",""),align:"",type:t.parentNode.nodeName.toLowerCase()},Zu("align","align",n,t)),r?Gu(o,t):{});var n,t,r,o}),u=Yu(n),c={type:"tabpanel",tabs:[{title:"General",name:"general",items:dc(i)},Ju("row")]},a={type:"panel",items:[{type:"grid",columns:2,items:dc(i)}]};i.windowManager.open({title:"Row Properties",size:"normal",body:xu(i)?c:a,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:u,onSubmit:y(mc,i,o,u)})}},pc=tinymce.util.Tools.resolve("tinymce.Env"),hc={styles:{"border-collapse":"collapse",width:"100%"},attributes:{border:"1"},percentages:!0},vc=function(e,n,t,r,o){void 0===o&&(o=hc);var i=ge.fromTag("table");we(i,o.styles),te(i,o.attributes);var u=ge.fromTag("tbody");pn(i,u);for(var c=[],a=0;a<e;a++){for(var l=ge.fromTag("tr"),f=0;f<n;f++){var s=a<t||f<r?ge.fromTag("th"):ge.fromTag("td");f<r&&ne(s,"scope","row"),a<t&&ne(s,"scope","col"),pn(s,ge.fromTag("br")),o.percentages&&be(s,"width",100/n+"%"),pn(l,s)}c.push(l)}return bn(u,c),i},bc=function(e,n){e.selection.select(n.dom(),!0),e.selection.collapse(!0)},wc=function(r,e,n){var t,o=wu(r),i={styles:o,attributes:bu(r),percentages:(t=o.width,g(t)&&-1!==t.indexOf("%")&&!Ou(r))},u=vc(n,e,0,0,i);ne(u,"data-mce-id","__mce");var c,a,l,f=(c=u,a=ge.fromTag("div"),l=ge.fromDom(c.dom().cloneNode(!0)),pn(a,l),a.dom().innerHTML);return r.insertContent(f),Pn(cu(r),'table[data-mce-id="__mce"]').map(function(e){var n,t;return Ou(r)&&be(e,"width",ye(e,"width")),ue(e,"data-mce-id"),n=r,B(En(e,"tr"),function(e){Au(n,e.dom()),B(En(e,"th,td"),function(e){Eu(n,e.dom())})}),t=r,Pn(e,"td,th").each(y(bc,t)),e.dom()}).getOr(null)},yc=function(e,n,t,r){if("TD"===n.tagName||"TH"===n.tagName)g(t)?e.setStyle(n,t,r):e.setStyle(n,t);else if(n.children)for(var o=0;o<n.children.length;o++)yc(e,n.children[o],t,r)},Sc=function(t,r,e){var o,i=t.dom,u=e.getData();e.close(),""===u["class"]&&delete u["class"],t.undoManager.transact(function(){if(!r){var e=parseInt(u.cols,10)||1,n=parseInt(u.rows,10)||1;r=wc(t,e,n)}!function(e,n,t){var r,o=e.dom,i={},u={};if(i["class"]=t["class"],u.height=su(t.height),o.getAttrib(n,"width")&&!Ru(e)?i.width=(r=t.width)?r.replace(/px$/,""):"":u.width=su(t.width),Ru(e)?(u["border-width"]=su(t.border),u["border-spacing"]=su(t.cellspacing)):(i.border=t.border,i.cellpadding=t.cellpadding,i.cellspacing=t.cellspacing),Ru(e)&&n.children)for(var c=0;c<n.children.length;c++)yc(o,n.children[c],{"border-width":su(t.border),padding:su(t.cellpadding)}),Cu(e)&&yc(o,n.children[c],{"border-color":t.bordercolor});Cu(e)&&(u["background-color"]=t.backgroundcolor,u["border-color"]=t.bordercolor,u["border-style"]=t.borderstyle),i.style=o.serializeStyle(Re(Re({},wu(e)),u)),o.setAttribs(n,Re(Re({},bu(e)),i))}(t,r,u),(o=i.select("caption",r)[0])&&!u.caption&&i.remove(o),!o&&u.caption&&((o=i.create("caption")).innerHTML=pc.ie?"\xa0":'<br data-mce-bogus="1"/>',r.insertBefore(o,r.firstChild)),""===u.align?Xu(t,r):Vu(t,r,u.align),t.focus(),t.addVisual()})},xc=function(e,n){var t,r,o,i,u,c,a,l,f=e.dom,s=nc(e,Cu(e));!1===n?(t=f.getParent(e.selection.getStart(),"table"))?(o=t,i=Cu(r=e),l=r.dom,s=Re(Re({width:l.getStyle(o,"width")||l.getAttrib(o,"width"),height:l.getStyle(o,"height")||l.getAttrib(o,"height"),cellspacing:l.getStyle(o,"border-spacing")||l.getAttrib(o,"cellspacing"),cellpadding:l.getAttrib(o,"cellpadding")||Uu(r.dom,o,"padding"),border:(u=l,c=o,a=xe(ge.fromDom(c),"border-width"),Ru(r)&&a.isSome()?a.getOr(""):u.getAttrib(c,"border")||Uu(r.dom,c,"border-width")||Uu(r.dom,c,"border")),caption:!!l.select("caption",o)[0],"class":l.getAttrib(o,"class","")},Zu("align","align",r,o)),i?Gu(l,o):{})):Cu(e)&&(s.borderstyle="",s.bordercolor="",s.backgroundcolor=""):(s.cols="1",s.rows="1",Cu(e)&&(s.borderstyle="",s.bordercolor="",s.backgroundcolor=""));var d=0<Tu(e).length;d&&s["class"]&&(s["class"]=s["class"].replace(/\s*mce\-item\-table\s*/g,""));var m,g,p,h,v,b={type:"grid",columns:2,items:(g=d,p=n?[{type:"input",name:"cols",label:"Cols",inputMode:"numeric"},{type:"input",name:"rows",label:"Rows",inputMode:"numeric"}]:[],h=(m=e).getParam("table_appearance_options",!0,"boolean")?[{type:"input",name:"cellspacing",label:"Cell spacing",inputMode:"numeric"},{type:"input",name:"cellpadding",label:"Cell padding",inputMode:"numeric"},{type:"input",name:"border",label:"Border width"},{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[],v=g?[{type:"selectbox",name:"class",label:"Class",items:$u(Tu(m),function(e){e.value&&(e.textStyle=function(){return m.formatter.getCssText({block:"table",classes:[e.value]})})})}]:[],p.concat([{type:"input",name:"width",label:"Width"},{type:"input",name:"height",label:"Height"}]).concat(h).concat([{type:"selectbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]}]).concat(v))},w=Cu(e)?{type:"tabpanel",tabs:[{title:"General",name:"general",items:[b]},Ju("table")]}:{type:"panel",items:[b]};e.windowManager.open({title:"Table Properties",size:"normal",body:w,onSubmit:y(Sc,e,t),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:s})},Cc=Lu.each,Rc=function(s,n,d,m,t){var r=fu(s),i=function(e){return $n(e,r)},o=function(r){Hu(s).each(function(t){i(t).each(function(n){var e=cr(m,n,t);r(n,e).each(function(e){s.selection.setRng(e),s.focus(),d.clear(n),du(n)})})})},u=function(e){return Hu(s).map(function(o){return i(o).bind(function(e){var n=ge.fromDom(s.getDoc()),t=cr(m,e,o),r=bt(x,n,C.none());return zu(e,t,r)})})},c=function(f){t.get().each(function(e){var l=k(e,function(e){return dt(e)});Hu(s).each(function(a){i(a).each(function(n){var e,t,r,o,i=ge.fromDom(s.getDoc()),u=wt(i),c=(e=m,r=l,o=u,{element:b(t=a),mergable:C.none,unmergable:C.none,selection:b(ir(t,e)),clipboard:b(r),generators:b(o)});f(n,c).each(function(e){s.selection.setRng(e),s.focus(),d.clear(n)})})})})};Cc({mceTableSplitCells:function(){o(n.unmergeCells)},mceTableMergeCells:function(){o(n.mergeCells)},mceTableInsertRowBefore:function(){o(n.insertRowsBefore)},mceTableInsertRowAfter:function(){o(n.insertRowsAfter)},mceTableInsertColBefore:function(){o(n.insertColumnsBefore)},mceTableInsertColAfter:function(){o(n.insertColumnsAfter)},mceTableDeleteCol:function(){o(n.deleteColumn)},mceTableDeleteRow:function(){o(n.deleteRow)},mceTableCutRow:function(e){u().each(function(e){t.set(e),o(n.deleteRow)})},mceTableCopyRow:function(e){u().each(function(e){t.set(e)})},mceTablePasteRowBefore:function(e){c(n.pasteRowsBefore)},mceTablePasteRowAfter:function(e){c(n.pasteRowsAfter)},mceTableDelete:function(){qu(s).each(function(e){$n(e,r).filter(a(r)).each(function(e){var n=ge.fromText("");if(mn(e,n),yn(e),s.dom.isEmpty(s.getBody()))s.setContent(""),s.selection.setCursorLocation();else{var t=s.dom.createRng();t.setStart(n.dom(),0),t.setEnd(n.dom(),0),s.selection.setRng(t),s.nodeChanged()}})})}},function(e,n){s.addCommand(n,e)}),Cc({mceInsertTable:y(xc,s,!0),mceTableProps:y(xc,s,!1),mceTableRowProps:y(gc,s),mceTableCellProps:y(fc,s)},function(e,n){s.addCommand(n,function(){e()})})},Tc=function(e){var n=C.from(e.dom().documentElement).map(ge.fromDom).getOr(e);return{parent:b(n),view:b(e),origin:b(_r(0,0))}},Oc=function(e,n){return{parent:b(n),view:b(e),origin:b(_r(0,0))}},Dc=function(e){var r=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(n.length!==t.length)throw new Error('Wrong number of arguments to struct. Expected "['+n.length+']", got '+t.length+" arguments");var r={};return B(n,function(e,n){r[e]=b(t[n])}),r}}.apply(null,e),o=[];return{bind:function(e){if(e===undefined)throw new Error("Event bind error: undefined handler");o.push(e)},unbind:function(n){o=N(o,function(e){return e!==n})},trigger:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=r.apply(null,e);B(o,function(e){e(t)})}}},Ac=function(e){return{registry:U(e,function(e){return{bind:e.bind,unbind:e.unbind}}),trigger:U(e,function(e){return e.trigger})}},Ec=function(e){var t,r,n,o,i,u=ge.fromDom(e.target),c=function(){return e.stopPropagation()},a=function(){return e.preventDefault()},l=(t=a,r=c,function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t(r.apply(null,e))});return n=u,o=e.clientX,i=e.clientY,{target:b(n),x:b(o),y:b(i),stop:c,prevent:a,kill:l,raw:b(e)}},kc=function(e,n,t,r,o){var i,u,c=(i=t,u=r,function(e){i(e)&&u(Ec(e))});return e.dom().addEventListener(n,c,o),{unbind:y(Bc,e,n,c,o)}},Bc=function(e,n,t,r){e.dom().removeEventListener(n,t,r)},Nc=b(!0),Ic=function(e,n,t){return kc(e,n,Nc,t,!1)},Pc=Ec,Mc=ho("ephox-dragster").resolve,_c=Ei(["compare","extract","mutate","sink"]),Wc=Ei(["element","start","stop","destroy"]),jc=Ei(["forceDrop","drop","move","delayDrop"]),zc=_c({compare:function(e,n){return _r(n.left()-e.left(),n.top()-e.top())},extract:function(e){return C.some(_r(e.x(),e.y()))},sink:function(e,n){var t=function(e){var n=Re({layerClass:Mc("blocker")},e),t=ge.fromTag("div");ne(t,"role","presentation"),we(t,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),co(t,Mc("blocker")),co(t,n.layerClass);return{element:function(){return t},destroy:function(){yn(t)}}}(n),r=Ic(t.element(),"mousedown",e.forceDrop),o=Ic(t.element(),"mouseup",e.drop),i=Ic(t.element(),"mousemove",e.move),u=Ic(t.element(),"mouseout",e.delayDrop);return Wc({element:t.element,start:function(e){pn(e,t.element())},stop:function(){yn(t.element())},destroy:function(){t.destroy(),o.unbind(),i.unbind(),u.unbind(),r.unbind()}})},mutate:function(e,n){e.mutate(n.left(),n.top())}});function Lc(){var i=C.none(),u=Ac({move:Dc(["info"])});return{onEvent:function(e,o){o.extract(e).each(function(e){var n,t,r;(n=o,t=e,r=i.map(function(e){return n.compare(e,t)}),i=C.some(t),r).each(function(e){u.trigger.move(e)})})},reset:function(){i=C.none()},events:u.registry}}function Fc(){var e=function r(){return{onEvent:x,reset:x}}(),n=Lc(),t=e;return{on:function(){t.reset(),t=n},off:function(){t.reset(),t=e},isOn:function(){return t===n},onEvent:function(e,n){t.onEvent(e,n)},events:n.events}}var Hc=function(n,t,e){var r,o,i,u=!1,c=Ac({start:Dc([]),stop:Dc([])}),a=Fc(),l=function(){d.stop(),a.isOn()&&(a.off(),c.trigger.stop())},f=(r=l,o=200,i=null,{cancel:function(){null!==i&&(p.clearTimeout(i),i=null)},throttle:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];null!==i&&p.clearTimeout(i),i=p.setTimeout(function(){r.apply(null,e),i=null},o)}});a.events.move.bind(function(e){t.mutate(n,e.info())});var s=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];u&&t.apply(null,e)}},d=t.sink(jc({forceDrop:l,drop:s(l),move:s(function(e){f.cancel(),a.onEvent(e,t)}),delayDrop:s(f.throttle)}),e);return{element:d.element,go:function(e){d.start(e),a.on(),c.trigger.start()},on:function(){u=!0},off:function(){u=!1},destroy:function(){d.destroy()},events:c.registry}},qc=function(e){return"true"===re(e,"contenteditable")},Uc=function(){var t,r=Ac({drag:Dc(["xDelta","yDelta","target"])}),o=C.none(),e={mutate:function(e,n){t.trigger.drag(e,n)},events:(t=Ac({drag:Dc(["xDelta","yDelta"])})).registry};e.events.drag.bind(function(n){o.each(function(e){r.trigger.drag(n.xDelta(),n.yDelta(),e)})});return{assign:function(e){o=C.some(e)},get:function(){return o},mutate:e.mutate,events:r.registry}},Vc=vo("resizer-bar-dragging"),Kc=function(o,n,i){var t=Uc(),r=function(e,n){void 0===n&&(n={});var t=n.mode!==undefined?n.mode:zc;return Hc(e,t,n)}(t,{}),u=C.none(),e=function(e,n){return C.from(re(e,n))};t.events.drag.bind(function(t){e(t.target(),"data-row").each(function(e){var n=Ln(t.target(),"top");be(t.target(),"top",n+t.yDelta()+"px")}),e(t.target(),"data-column").each(function(e){var n=Ln(t.target(),"left");be(t.target(),"left",n+t.xDelta()+"px")})});var c=function(e,n){return Ln(e,n)-_n(e,"data-initial-"+n,0)};r.events.stop.bind(function(){t.get().each(function(r){u.each(function(t){e(r,"data-row").each(function(e){var n=c(r,"top");ue(r,"data-initial-top"),m.trigger.adjustHeight(t,n,parseInt(e,10))}),e(r,"data-column").each(function(e){var n=c(r,"left");ue(r,"data-initial-left"),m.trigger.adjustWidth(t,n,parseInt(e,10))}),To(o,t,i,n)})})});var a=function(e,n){m.trigger.startAdjust(),t.assign(e),ne(e,"data-initial-"+n,Ln(e,n)),co(e,Vc),be(e,"opacity","0.2"),r.go(o.parent())},l=Ic(o.parent(),"mousedown",function(e){var n,t;n=e.target(),lo(n,wo)&&a(e.target(),"top"),t=e.target(),lo(t,yo)&&a(e.target(),"left")}),f=function(e){return en(e,o.view())},s=function(e){return Mn(e,"table",f).filter(function(e){return Mn(e,"[contenteditable]",f).exists(qc)})},d=Ic(o.view(),"mouseover",function(e){s(e.target()).fold(function(){pe(e.target())&&So(o)},function(e){u=C.some(e),To(o,e,i,n)})}),m=Ac({adjustHeight:Dc(["table","delta","row"]),adjustWidth:Dc(["table","delta","column"]),startAdjust:Dc([])});return{destroy:function(){l.unbind(),d.unbind(),r.destroy(),So(o)},refresh:function(e){To(o,e,i,n)},on:r.on,off:r.off,hideBars:y(Do,o),showBars:y(Ao,o),events:m.registry}},Xc=function(e,m){var t=Yr,n=Kc(e,m,t),g=Ac({beforeResize:Dc(["table"]),afterResize:Dc(["table"]),startDrag:Dc([])});return n.events.adjustHeight.bind(function(e){g.trigger.beforeResize(e.table());var n=t.delta(e.delta(),e.table());Ti(e.table(),n,e.row(),t),g.trigger.afterResize(e.table())}),n.events.startAdjust.bind(function(e){g.trigger.startDrag()}),n.events.adjustWidth.bind(function(e){g.trigger.beforeResize(e.table());var n,t,r,o,i,u,c,a,l,f,s,d=m.delta(e.delta(),e.table());n=e.table(),t=d,r=e.column(),o=m,i=xi(n),u=i.getCellDelta(t),c=Ri(n),a=i.getWidths(c,o,i),l=mi(a,r,u,i),f=k(l,function(e,n){return e+a[n]}),s=wi(c,f),B(s,function(e){i.setElementWidth(e.element,e.width)}),r===c.grid.columns()-1&&i.setTableWidth(n,f,u),g.trigger.afterResize(e.table())}),{on:n.on,off:n.off,hideBars:n.hideBars,showBars:n.showBars,destroy:n.destroy,events:g.registry}},$c=function(){var e=ge.fromTag("div");return we(e,{position:"static",height:"0",width:"0",padding:"0",margin:"0",border:"0"}),pn(he(ge.fromDom(p.document)),e),e},Gc=function(e,n){return au(e.dom())/au(n.dom())*100+"%"},Yc=function(c){var u,a,l=C.none(),i=C.none(),f=C.none(),s=/(\d+(\.\d+)?)%/,d=function(e){return"TABLE"===e.nodeName},m=function(e){var n=c.dom.getStyle(e,"width")||c.dom.getAttrib(e,"width");return C.from(n).filter(function(e){return 0<e.length})},e=function(){return i};return c.on("init",function(){var e,n,t=Qr(pu),r=(e=c).inline?Oc(cu(e),$c()):Tc(ge.fromDom(e.getDoc()));if(f=C.some(r),n=c.getParam("object_resizing",!0),(g(n)?"table"===n:n)&&c.getParam("table_resize_bars",!0,"boolean")){var o=Xc(r,t);o.on(),o.events.startDrag.bind(function(e){l=C.some(c.selection.getRng())}),o.events.beforeResize.bind(function(e){var n,t,r,o,i=e.table().dom();n=c,r=au(t=i),o=lu(i),n.fire("ObjectResizeStart",{target:t,width:r,height:o})}),o.events.afterResize.bind(function(e){var n,t,r,o,i=e.table(),u=i.dom();du(i),l.each(function(e){c.selection.setRng(e),c.focus()}),n=c,r=au(t=u),o=lu(u),n.fire("ObjectResized",{target:t,width:r,height:o}),c.undoManager.add()}),i=C.some(o)}}),c.on("ObjectResizeStart",function(e){var n,t,r,o=e.target;if(d(o)){var i=m(o).map(function(e){return s.test(e)}).getOr(!1);i&&Ou(c)?(r=o,be(ge.fromDom(r),"width",au(r).toString()+"px")):i||!0!==c.getParam("table_responsive_width")||(n=o,t=ge.fromDom(n),un(t).map(function(e){return Gc(t,e)}).each(function(e){be(t,"width",e),B(En(t,"tr"),function(n){B(fn(n),function(e){be(e,"width",Gc(e,n))})})})),u=e.width,a=m(o).getOr("")}}),c.on("ObjectResized",function(e){var n=e.target;if(d(n)){var t=n;if(s.test(a)){var r=parseFloat(s.exec(a)[1]),o=e.width*r/u;c.dom.setStyle(t,"width",o+"%")}else{var i=[];Lu.each(t.rows,function(e){Lu.each(e.cells,function(e){var n=c.dom.getStyle(e,"width",!0);i.push({cell:e,width:n})})}),Lu.each(i,function(e){c.dom.setStyle(e.cell,"width",e.width),c.dom.setAttrib(e.cell,"width",null)})}}}),c.on("SwitchMode",function(){i.each(function(e){c.mode.isReadOnly()?e.hideBars():e.showBars()})}),{lazyResize:e,lazyWire:function(){return f.getOr(Tc(ge.fromDom(c.getBody())))},destroy:function(){i.each(function(e){e.destroy()}),f.each(function(e){var n;n=e,c.inline&&yn(n.parent())})}}},Jc=Zt([{none:["current"]},{first:["current"]},{middle:["current","target"]},{last:["current"]}]),Qc=Re(Re({},Jc),{none:function(e){return void 0===e&&(e=undefined),Jc.none(e)}}),Zc=function(t,e){return $n(t,e).bind(function(e){var n=Kn(e);return _(n,function(e){return en(t,e)}).map(function(e){return{index:e,all:n}})})},ea=function(e,n,t,r){return{start:b(e),soffset:b(n),finish:b(t),foffset:b(r)}},na=Zt([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),ta={before:na.before,on:na.on,after:na.after,cata:function(e,n,t,r){return e.fold(n,t,r)},getStart:function(e){return e.fold(o,o,o)}},ra=Zt([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),oa={domRange:ra.domRange,relative:ra.relative,exact:ra.exact,exactFromRange:function(e){return ra.exact(e.start(),e.soffset(),e.finish(),e.foffset())},getWin:function(e){var n,t=e.match({domRange:function(e){return ge.fromDom(e.startContainer)},relative:function(e,n){return ta.getStart(e)},exact:function(e,n,t,r){return e}});return n=t,ge.fromDom(n.dom().ownerDocument.defaultView)},range:ea},ia=function(e,n){return e.selectNodeContents(n.dom())},ua=function(e,n,t){var r,o,i=e.document.createRange();return r=i,n.fold(function(e){r.setStartBefore(e.dom())},function(e,n){r.setStart(e.dom(),n)},function(e){r.setStartAfter(e.dom())}),o=i,t.fold(function(e){o.setEndBefore(e.dom())},function(e,n){o.setEnd(e.dom(),n)},function(e){o.setEndAfter(e.dom())}),i},ca=function(e,n,t,r,o){var i=e.document.createRange();return i.setStart(n.dom(),t),i.setEnd(r.dom(),o),i},aa=function(e){return{left:b(e.left),top:b(e.top),right:b(e.right),bottom:b(e.bottom),width:b(e.width),height:b(e.height)}},la=Zt([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),fa=function(e,n,t){return n(ge.fromDom(t.startContainer),t.startOffset,ge.fromDom(t.endContainer),t.endOffset)},sa=function(e,n){var o,t,r,i=(o=e,n.match({domRange:function(e){return{ltr:b(e),rtl:C.none}},relative:function(e,n){return{ltr:Te(function(){return ua(o,e,n)}),rtl:Te(function(){return C.some(ua(o,n,e))})}},exact:function(e,n,t,r){return{ltr:Te(function(){return ca(o,e,n,t,r)}),rtl:Te(function(){return C.some(ca(o,t,r,e,n))})}}}));return(r=(t=i).ltr()).collapsed?t.rtl().filter(function(e){return!1===e.collapsed}).map(function(e){return la.rtl(ge.fromDom(e.endContainer),e.endOffset,ge.fromDom(e.startContainer),e.startOffset)}).getOrThunk(function(){return fa(0,la.ltr,r)}):fa(0,la.ltr,r)},da=function(i,e){return sa(i,e).match({ltr:function(e,n,t,r){var o=i.document.createRange();return o.setStart(e.dom(),n),o.setEnd(t.dom(),r),o},rtl:function(e,n,t,r){var o=i.document.createRange();return o.setStart(t.dom(),r),o.setEnd(e.dom(),n),o}})},ma=(la.ltr,la.rtl,function(e,n,t){return n>=e.left&&n<=e.right&&t>=e.top&&t<=e.bottom}),ga=function(t,r,e,n,o){var i=function(e){var n=t.dom().createRange();return n.setStart(r.dom(),e),n.collapse(!0),n},u=nt(r).length,c=function(e,n,t,r,o){if(0===o)return 0;if(n===r)return o-1;for(var i=r,u=1;u<o;u++){var c=e(u),a=Math.abs(n-c.left);if(t<=c.bottom){if(t<c.top||i<a)return u-1;i=a}}return 0}(function(e){return i(e).getBoundingClientRect()},e,n,o.right,u);return i(c)},pa=function(e,n,t,r){return Z(n)?function(n,t,r,o){var e=n.dom().createRange();e.selectNode(t.dom());var i=e.getClientRects();return L(i,function(e){return ma(e,r,o)?C.some(e):C.none()}).map(function(e){return ga(n,t,r,o,e)})}(e,n,t,r):(i=n,u=t,c=r,a=(o=e).dom().createRange(),l=fn(i),L(l,function(e){return a.selectNode(e.dom()),ma(a.getBoundingClientRect(),u,c)?pa(o,e,u,c):C.none()}));var o,i,u,c,a,l},ha=function(e,n){return n-e.left<e.right-n},va=function(e,n,t){var r=e.dom().createRange();return r.selectNode(n.dom()),r.collapse(t),r},ba=function(n,e,t){var r=n.dom().createRange();r.selectNode(e.dom());var o=r.getBoundingClientRect(),i=ha(o,t);return(!0===i?ct:at)(e).map(function(e){return va(n,e,i)})},wa=function(e,n,t){var r=n.dom().getBoundingClientRect(),o=ha(r,t);return C.some(va(e,n,o))},ya=function(e,n,t,r){var o=e.dom().createRange();o.selectNode(n.dom());var i=o.getBoundingClientRect();return function(e,n,t,r){var o=e.dom().createRange();o.selectNode(n.dom());var i=o.getBoundingClientRect(),u=Math.max(i.left,Math.min(i.right,t)),c=Math.max(i.top,Math.min(i.bottom,r));return pa(e,n,u,c)}(e,n,Math.max(i.left,Math.min(i.right,t)),Math.max(i.top,Math.min(i.bottom,r)))},Sa=document.caretPositionFromPoint?function(t,e,n){return C.from(t.dom().caretPositionFromPoint(e,n)).bind(function(e){if(null===e.offsetNode)return C.none();var n=t.dom().createRange();return n.setStart(e.offsetNode,e.offset),n.collapse(),C.some(n)})}:document.caretRangeFromPoint?function(e,n,t){return C.from(e.dom().caretRangeFromPoint(n,t))}:function(o,i,n){return ge.fromPoint(o,i,n).bind(function(r){var e=function(){return e=o,t=i,(0===fn(n=r).length?wa:ba)(e,n,t);var e,n,t};return 0===fn(r).length?e():ya(o,r,i,n).orThunk(e)})},xa=function(e,n){var t=$(e);return"input"===t?ta.after(e):A(["br","img"],t)?0===n?ta.before(e):ta.after(e):ta.on(e,n)},Ca=function(e,n){var t=e.fold(ta.before,xa,ta.after),r=n.fold(ta.before,xa,ta.after);return oa.relative(t,r)},Ra=function(e,n,t,r){var o=xa(e,n),i=xa(t,r);return oa.relative(o,i)},Ta=function(e,n,t,r){var o,i,u,c,a,l=(i=n,u=t,c=r,(a=on(o=e).dom().createRange()).setStart(o.dom(),i),a.setEnd(u.dom(),c),a),f=en(e,t)&&n===r;return l.collapsed&&!f},Oa=function(e,n){C.from(e.getSelection()).each(function(e){e.removeAllRanges(),e.addRange(n)})},Da=function(e,n,t,r,o){var i=ca(e,n,t,r,o);Oa(e,i)},Aa=function(s,e){return sa(s,e).match({ltr:function(e,n,t,r){Da(s,e,n,t,r)},rtl:function(e,n,t,r){var o,i,u,c,a,l=s.getSelection();if(l.setBaseAndExtent)l.setBaseAndExtent(e.dom(),n,t.dom(),r);else if(l.extend)try{i=e,u=n,c=t,a=r,(o=l).collapse(i.dom(),u),o.extend(c.dom(),a)}catch(f){Da(s,t,r,e,n)}else Da(s,t,r,e,n)}})},Ea=function(e,n,t,r,o){var i=Ra(n,t,r,o);Aa(e,i)},ka=function(e,n,t){var r=Ca(n,t);Aa(e,r)},Ba=function(e){var o=oa.getWin(e).dom(),n=function(e,n,t,r){return ca(o,e,n,t,r)},t=e.match({domRange:function(e){var n=ge.fromDom(e.startContainer),t=ge.fromDom(e.endContainer);return Ra(n,e.startOffset,t,e.endOffset)},relative:Ca,exact:Ra});return sa(o,t).match({ltr:n,rtl:n})},Na=function(e){var n=ge.fromDom(e.anchorNode),t=ge.fromDom(e.focusNode);return Ta(n,e.anchorOffset,t,e.focusOffset)?C.some(ea(n,e.anchorOffset,t,e.focusOffset)):function(e){if(0<e.rangeCount){var n=e.getRangeAt(0),t=e.getRangeAt(e.rangeCount-1);return C.some(ea(ge.fromDom(n.startContainer),n.startOffset,ge.fromDom(t.endContainer),t.endOffset))}return C.none()}(e)},Ia=function(e,n){var t,r,o=(t=n,r=e.document.createRange(),ia(r,t),r);Oa(e,o)},Pa=function(e){return n=e,C.from(n.getSelection()).filter(function(e){return 0<e.rangeCount}).bind(Na).map(function(e){return oa.exact(e.start(),e.soffset(),e.finish(),e.foffset())});var n},Ma=function(e,n){var t,r,o,i=da(e,n);return r=(t=i).getClientRects(),0<(o=0<r.length?r[0]:t.getBoundingClientRect()).width||0<o.height?C.some(o).map(aa):C.none()},_a=function(e,n,t){return r=e,o=n,i=t,u=ge.fromDom(r.document),Sa(u,o,i).map(function(e){return ea(ge.fromDom(e.startContainer),e.startOffset,ge.fromDom(e.endContainer),e.endOffset)});var r,o,i,u},Wa=tinymce.util.Tools.resolve("tinymce.util.VK"),ja=function(e,n,t,r){return Ha(e,n,Zc(o=t,i).fold(function(){return Qc.none(o)},function(e){return e.index+1<e.all.length?Qc.middle(o,e.all[e.index+1]):Qc.last(o)}),r);var o,i},za=function(e,n,t,r){return Ha(e,n,Zc(o=t,i).fold(function(){return Qc.none()},function(e){return 0<=e.index-1?Qc.middle(o,e.all[e.index-1]):Qc.first(o)}),r);var o,i},La=function(e,n){var t=oa.exact(n,0,n,0);return Ba(t)},Fa=function(e,n){var t,r=En(n,"tr");return(0===(t=r).length?C.none():C.some(t[t.length-1])).bind(function(e){return Pn(e,"td,th").map(function(e){return La(0,e)})})},Ha=function(r,e,n,o,t){return n.fold(C.none,C.none,function(e,n){return ct(n).map(function(e){return La(0,e)})},function(t){return $n(t,e).bind(function(e){var n=ur(t);return r.undoManager.transact(function(){o.insertRowsAfter(e,n)}),Fa(0,e)})})},qa=["table","li","dl"],Ua=function(n,t,r,o){if(n.keyCode===Wa.TAB){var i=cu(t),u=function(e){var n=$(e);return en(e,i)||A(qa,n)},e=t.selection.getRng();if(e.collapsed){var c=ge.fromDom(e.startContainer);Vn(c,u).each(function(e){n.preventDefault(),(n.shiftKey?za:ja)(t,u,e,r,o).each(function(e){t.selection.setRng(e)})})}}},Va=function(e,n){return{selection:b(e),kill:b(n)}},Ka=function(e,n,t,r){return{start:b(ta.on(e,n)),finish:b(ta.on(t,r))}},Xa=function(e,n){var t=da(e,n);return ea(ge.fromDom(t.startContainer),t.startOffset,ge.fromDom(t.endContainer),t.endOffset)},$a=Ka,Ga=function(t,e,r,n,o){return en(r,n)?C.none():zt(r,n,e).bind(function(e){var n=e.boxes.getOr([]);return 0<n.length?(o(t,n,e.start,e.finish),C.some(Va(C.some($a(r,0,r,ot(r))),!0))):C.none()})},Ya=function(e,n){return{item:b(e),mode:b(n)}},Ja=function(e,n,t,r){return void 0===r&&(r=Qa),e.property().parent(n).map(function(e){return Ya(e,r)})},Qa=function(e,n,t,r){return void 0===r&&(r=Za),t.sibling(e,n).map(function(e){return Ya(e,r)})},Za=function(e,n,t,r){void 0===r&&(r=Za);var o=e.property().children(n);return t.first(o).map(function(e){return Ya(e,r)})},el=[{current:Ja,next:Qa,fallback:C.none()},{current:Qa,next:Za,fallback:C.some(Ja)},{current:Za,next:Za,fallback:C.some(Qa)}],nl=function(n,t,r,o,e){return void 0===e&&(e=el),M(e,function(e){return e.current===r}).bind(function(e){return e.current(n,t,o,e.next).orThunk(function(){return e.fallback.bind(function(e){return nl(n,t,e,o)})})})},tl=function(){return{sibling:function(e,n){return e.query().prevSibling(n)},first:function(e){return 0<e.length?C.some(e[e.length-1]):C.none()}}},rl=function(){return{sibling:function(e,n){return e.query().nextSibling(n)},first:function(e){return 0<e.length?C.some(e[0]):C.none()}}},ol=function(n,e,t,r,o,i){return nl(n,e,r,o).bind(function(e){return i(e.item())?C.none():t(e.item())?C.some(e.item()):ol(n,e.item(),t,e.mode(),o,i)})},il=function(n){return function(e){return 0===n.property().children(e).length}},ul=function(e,n,t,r){return ol(e,n,t,Qa,tl(),r)},cl=function(e,n,t,r){return ol(e,n,t,Qa,rl(),r)},al=Bt(),ll=function(e,n){return ul(t=al,e,il(t),n);var t},fl=function(e,n){return cl(t=al,e,il(t),n);var t},sl=Zt([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),dl=function(e){return Mn(e,"tr")},ml=Re(Re({},sl),{verify:function(c,e,n,t,r,a,o){return Mn(t,"td,th",o).bind(function(u){return Mn(e,"td,th",o).map(function(i){return en(u,i)?en(t,u)&&ot(u)===r?a(i):sl.none("in same cell"):Wt(dl,[u,i]).fold(function(){return n=i,t=u,r=(e=c).getRect(n),(o=e.getRect(t)).right>r.left&&o.left<r.right?sl.success():a(i);var e,n,t,r,o},function(e){return a(i)})})}).getOr(sl.none("default"))},cata:function(e,n,t,r,o){return e.fold(n,t,r,o)}}),gl=function(r){return un(r).bind(function(n){var t=fn(n);return pl(t,r).map(function(e){return{parent:b(n),children:b(t),element:b(r),index:b(e)}})})},pl=function(e,n){return _(e,y(en,n))},hl=function(e){return"br"===$(e)},vl=function(e,n,t){return n(e,t).bind(function(e){return Z(e)&&0===nt(e).trim().length?vl(e,n,t):C.some(e)})},bl=function(n,e,t,r){return sn(o=e,i=t).filter(hl).orThunk(function(){return sn(o,i-1).filter(hl)}).bind(function(e){return r.traverse(e).fold(function(){return vl(e,r.gather,n).map(r.relative)},function(e){return gl(e).map(function(e){return ta.on(e.parent(),e.index())})})});var o,i},wl=function(e,n,t,r){var o,i,u;return(hl(n)?(o=e,i=n,(u=r).traverse(i).orThunk(function(){return vl(i,u.gather,o)}).map(u.relative)):bl(e,n,t,r)).map(function(e){return{start:b(e),finish:b(e)}})},yl=function(e,n){return{left:e.left,top:e.top+n,right:e.right,bottom:e.bottom+n}},Sl=function(e,n){return{left:e.left,top:e.top-n,right:e.right,bottom:e.bottom-n}},xl=function(e,n,t){return{left:e.left+n,top:e.top+t,right:e.right+n,bottom:e.bottom+t}},Cl=function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}},Rl=function(e,n){return C.some(e.getRect(n))},Tl=function(e,n,t){return Q(n)?Rl(e,n).map(Cl):Z(n)?(r=e,o=n,(0<=(i=t)&&i<ot(o)?r.getRangedRect(o,i,o,i+1):0<i?r.getRangedRect(o,i-1,o,i):C.none()).map(Cl)):C.none();var r,o,i},Ol=function(e,n){return Q(n)?Rl(e,n).map(Cl):Z(n)?e.getRangedRect(n,0,n,ot(n)).map(Cl):C.none()},Dl=Zt([{none:[]},{retry:["caret"]}]),Al=function(n,e,r){return kn(function(e,n){return n(e)},Bn,e,Wi,t).fold(b(!1),function(e){return Ol(n,e).exists(function(e){return t=e,(n=r).left<t.left||Math.abs(t.right-n.left)<1||n.left>t.right;var n,t})});var t},El={point:function(e){return e.bottom},adjuster:function(e,n,t,r,o){var i=yl(o,5);return Math.abs(t.bottom-r.bottom)<1||t.top>o.bottom?Dl.retry(i):t.top===o.bottom?Dl.retry(yl(o,1)):Al(e,n,o)?Dl.retry(xl(i,5,0)):Dl.none()},move:yl,gather:fl},kl=function(t,r,o,i,u){return 0===u?C.some(i):(a=t,l=i.left,f=r.point(i),a.elementFromPoint(l,f).filter(function(e){return"table"===$(e)}).isSome()?(n=i,c=u-1,kl(t,e=r,o,e.move(n,5),c)):t.situsFromPoint(i.left,r.point(i)).bind(function(e){return e.start().fold(C.none,function(n){return Ol(t,n).bind(function(e){return r.adjuster(t,n,e,o,i).fold(C.none,function(e){return kl(t,r,o,e,u-1)})}).orThunk(function(){return C.some(i)})},C.none)}));var e,n,c,a,l,f},Bl=function(n,t,e){var r,o,i,u=n.move(e,5),c=kl(t,n,e,u,100).getOr(u);return o=c,i=t,((r=n).point(o)>i.getInnerHeight()?C.some(r.point(o)-i.getInnerHeight()):r.point(o)<0?C.some(-r.point(o)):C.none()).fold(function(){return t.situsFromPoint(c.left,n.point(c))},function(e){return t.scrollBy(0,e),t.situsFromPoint(c.left,n.point(c)-e)})},Nl={tryUp:y(Bl,{point:function(e){return e.top},adjuster:function(e,n,t,r,o){var i=Sl(o,5);return Math.abs(t.top-r.top)<1||t.bottom<o.top?Dl.retry(i):t.bottom===o.top?Dl.retry(Sl(o,1)):Al(e,n,o)?Dl.retry(xl(i,5,0)):Dl.none()},move:Sl,gather:ll}),tryDown:y(Bl,El),ieTryUp:function(e,n){return e.situsFromPoint(n.left,n.top-5)},ieTryDown:function(e,n){return e.situsFromPoint(n.left,n.bottom+5)},getJumpSize:b(5)},Il=function(i,u,c){return i.getSelection().bind(function(o){return wl(u,o.finish(),o.foffset(),c).fold(function(){return C.some(Nu(o.finish(),o.foffset()))},function(e){var n,t=i.fromSitus(e),r=ml.verify(i,o.finish(),o.foffset(),t.finish(),t.foffset(),c.failure,u);return n=r,ml.cata(n,function(e){return C.none()},function(){return C.none()},function(e){return C.some(Nu(e,0))},function(e){return C.some(Nu(e,ot(e)))})})})},Pl=function(r,o,i,u,c,a){return 0===a?C.none():Wl(r,o,i,u,c).bind(function(e){var n=r.fromSitus(e),t=ml.verify(r,i,u,n.finish(),n.foffset(),c.failure,o);return ml.cata(t,function(){return C.none()},function(){return C.some(e)},function(e){return en(i,e)&&0===u?Ml(r,i,u,Sl,c):Pl(r,o,e,0,c,a-1)},function(e){return en(i,e)&&u===ot(e)?Ml(r,i,u,yl,c):Pl(r,o,e,ot(e),c,a-1)})})},Ml=function(n,e,t,r,o){return Tl(n,e,t).bind(function(e){return _l(n,o,r(e,Nl.getJumpSize()))})},_l=function(e,n,t){var r=Je().browser;return r.isChrome()||r.isSafari()||r.isFirefox()||r.isEdge()?n.otherRetry(e,t):r.isIE()?n.ieRetry(e,t):C.none()},Wl=function(n,e,t,r,o){return Tl(n,t,r).bind(function(e){return _l(n,o,e)})},jl=function(e,n){return Bn(e,function(e){return un(e).exists(function(e){return en(e,n)})},t).isSome();var t},zl=function(i,u,c,e,a){return Mn(e,"td,th",u).bind(function(o){return Mn(o,"table",u).bind(function(e){return jl(a,e)?Il(n=i,t=u,r=c).bind(function(e){return Pl(n,t,e.element(),e.offset(),r,20).map(n.fromSitus)}).bind(function(n){return Mn(n.finish(),"td,th",u).map(function(e){return{start:b(o),finish:b(e),range:b(n)}})}):C.none();var n,t,r})})},Ll=function(e,n,t,r,o,i){return Je().browser.isIE()?C.none():i(r,n).orThunk(function(){return zl(e,n,t,r,o).map(function(e){var n=e.range();return Va(C.some($a(n.start(),n.soffset(),n.finish(),n.foffset())),!0)})})},Fl=function(e,r){return Mn(e,"tr",r).bind(function(t){return Mn(t,"table",r).bind(function(e){var n=En(e,"tr");return en(t,n[0])?ul(al,e,function(e){return at(e).isSome()},r).map(function(e){var n=ot(e);return Va(C.some($a(e,n,e,n)),!0)}):C.none()})})},Hl=function(e,r){return Mn(e,"tr",r).bind(function(t){return Mn(t,"table",r).bind(function(e){var n=En(e,"tr");return en(t,n[n.length-1])?cl(al,e,function(e){return ct(e).isSome()},r).map(function(e){return Va(C.some($a(e,0,e,0)),!0)}):C.none()})})},ql=function(e,n,t,r,o,i,u){return zl(e,t,r,o,i).bind(function(e){return Ga(n,t,e.start(),e.finish(),u)})},Ul=function(e,n){return Mn(e,"td,th",n)};var Vl={traverse:ln,gather:fl,relative:ta.before,otherRetry:Nl.tryDown,ieRetry:Nl.ieTryDown,failure:ml.failedDown},Kl={traverse:an,gather:ll,relative:ta.before,otherRetry:Nl.tryUp,ieRetry:Nl.ieTryUp,failure:ml.failedUp},Xl=function(n){return function(e){return e===n}},$l=Xl(38),Gl=Xl(40),Yl=function(e){return 37<=e&&e<=40},Jl={isBackward:Xl(37),isForward:Xl(39)},Ql={isBackward:Xl(39),isForward:Xl(37)},Zl=function(e){return{left:e.left(),top:e.top(),right:e.right(),bottom:e.bottom(),width:e.width(),height:e.height()}},ef=function(c){return{elementFromPoint:function(e,n){return ge.fromPoint(ge.fromDom(c.document),e,n)},getRect:function(e){return e.dom().getBoundingClientRect()},getRangedRect:function(e,n,t,r){var o=oa.exact(e,n,t,r);return Ma(c,o).map(Zl)},getSelection:function(){return Pa(c).map(function(e){return Xa(c,e)})},fromSitus:function(e){var n=oa.relative(e.start(),e.finish());return Xa(c,n)},situsFromPoint:function(e,n){return _a(c,e,n).map(function(e){return Ka(e.start(),e.soffset(),e.finish(),e.foffset())})},clearSelection:function(){c.getSelection().removeAllRanges()},collapseSelection:function(u){void 0===u&&(u=!1),Pa(c).each(function(e){return e.fold(function(e){return e.collapse(u)},function(e,n){var t=u?e:n;ka(c,t,t)},function(e,n,t,r){var o=u?e:t,i=u?n:r;Ea(c,o,i,o,i)})})},setSelection:function(e){Ea(c,e.start(),e.soffset(),e.finish(),e.foffset())},setRelativeSelection:function(e,n){ka(c,e,n)},selectContents:function(e){Ia(c,e)},getInnerHeight:function(){return c.innerHeight},getScrollY:function(){var e,n,t,r;return(e=ge.fromDom(c.document),n=e!==undefined?e.dom():p.document,t=n.body.scrollLeft||n.documentElement.scrollLeft,r=n.body.scrollTop||n.documentElement.scrollTop,_r(t,r)).top()},scrollBy:function(e,n){var t,r,o;t=e,r=n,((o=ge.fromDom(c.document))!==undefined?o.dom():p.document).defaultView.scrollBy(t,r)}}},nf=function(e,n){return{rows:e,cols:n}},tf=function(e,n,t,r){var o=function c(o,i,n,u){var t=C.none(),r=function(){t=C.none()};return{mousedown:function(e){u.clear(i),t=Ul(e.target(),n)},mouseover:function(e){t.each(function(r){u.clearBeforeUpdate(i),Ul(e.target(),n).each(function(t){zt(r,t,n).each(function(e){var n=e.boxes.getOr([]);(1<n.length||1===n.length&&!en(r,t))&&(u.selectRange(i,n,e.start,e.finish),o.selectContents(t))})})})},mouseup:function(e){t.each(r)}}}(ef(e),n,t,r);return{mousedown:o.mousedown,mouseover:o.mouseover,mouseup:o.mouseup}},rf=function(e,g,p,h){var l=ef(e),f=function(){return h.clear(g),C.none()};return{keydown:function(e,n,t,r,o,u){var i=e.raw(),c=i.which,a=!0===i.shiftKey;return Lt(g,h.selectedSelector).fold(function(){return Gl(c)&&a?y(ql,l,g,p,Vl,r,n,h.selectRange):$l(c)&&a?y(ql,l,g,p,Kl,r,n,h.selectRange):Gl(c)?y(Ll,l,p,Vl,r,n,Hl):$l(c)?y(Ll,l,p,Kl,r,n,Fl):C.none},function(i){var e=function(e){return function(){return L(e,function(e){return n=e.rows,t=e.cols,r=g,Ht(i,n,t,(o=h).firstSelectedSelector,o.lastSelectedSelector).map(function(e){return o.clearBeforeUpdate(r),o.selectRange(r,e.boxes,e.start,e.finish),e.boxes});var n,t,r,o}).fold(function(){return Ft(g,h.firstSelectedSelector,h.lastSelectedSelector).map(function(e){var n=Gl(c)||u.isForward(c)?ta.after:ta.before;return l.setRelativeSelection(ta.on(e.first(),0),n(e.table())),h.clear(g),Va(C.none(),!0)})},function(e){return C.some(Va(C.none(),!0))})}};return Gl(c)&&a?e([nf(1,0)]):$l(c)&&a?e([nf(-1,0)]):u.isBackward(c)&&a?e([nf(0,-1),nf(-1,0)]):u.isForward(c)&&a?e([nf(0,1),nf(1,0)]):Yl(c)&&!1==a?f:C.none})()},keyup:function(l,f,s,d,m){return Lt(g,h.selectedSelector).fold(function(){var t,r,e,n,o,i,u,c=l.raw(),a=c.which;return!1!=(!0===c.shiftKey)&&Yl(a)?(t=g,r=p,e=f,n=s,o=d,i=m,u=h.selectRange,en(e,o)&&n===i?C.none():Mn(e,"td,th",r).bind(function(n){return Mn(o,"td,th",r).bind(function(e){return Ga(t,r,n,e,u)})})):C.none()},C.none)}}},of=function(e,r,n,o){var i=ef(e);return function(e,t){o.clearBeforeUpdate(r),zt(e,t,n).each(function(e){var n=e.boxes.getOr([]);o.selectRange(r,n,e.start,e.finish),i.selectContents(t),i.collapseSelection()})}},uf=function(n,e){B(e,function(e){!function(e,n){oo(e)?e.dom().classList.remove(n):uo(e,n);ao(e)}(n,e)})},cf={byClass:function(o){var n,t,i=(n=o.selected,function(e){co(e,n)}),r=(t=[o.selected,o.lastSelected,o.firstSelected],function(e){uf(e,t)}),u=function(e){var n=En(e,o.selectedSelector);B(n,r)};return{clearBeforeUpdate:u,clear:u,selectRange:function(e,n,t,r){u(e),B(n,i),co(t,o.firstSelected),co(r,o.lastSelected)},selectedSelector:o.selectedSelector,firstSelectedSelector:o.firstSelectedSelector,lastSelectedSelector:o.lastSelectedSelector}},byAttr:function(o,i,n){var t=function(e){ue(e,o.selected),ue(e,o.firstSelected),ue(e,o.lastSelected)},u=function(e){ne(e,o.selected,"1")},c=function(e){r(e),n()},r=function(e){var n=En(e,o.selectedSelector);B(n,t)};return{clearBeforeUpdate:r,clear:c,selectRange:function(e,n,t,r){c(e),B(n,u),ne(t,o.firstSelected,"1"),ne(r,o.lastSelected,"1"),i(n,t,r)},selectedSelector:o.selectedSelector,firstSelectedSelector:o.firstSelectedSelector,lastSelectedSelector:o.lastSelectedSelector}}},af=function(e,n,s){var t=Gn(e),d=Qn.generate(t);return Vo(d,n).map(function(e){var t,n,r,o,i,u,c,a,l,f=jo(d,s,!1);return{upOrLeftCells:(t=e,n=s,r=f.slice(0,t[t.length-1].row()+1),o=Lo(r,n),j(o,function(e){var n=e.cells().slice(0,t[t.length-1].column()+1);return k(n,function(e){return e.element()})})),downOrRightCells:(u=e,c=s,a=(i=f).slice(u[0].row()+u[0].rowspan()-1,i.length),l=Lo(a,c),j(l,function(e){var n=e.cells().slice(u[0].column()+u[0].colspan()-1,+e.cells().length);return k(n,function(e){return e.element()})}))}})},lf=function(e){return!1===lo(ge.fromDom(e.target),"ephox-snooker-resizer-bar")};function ff(v,b,e){var w=C.none(),a=Du(v),y=cf.byAttr(Qt,function(i,u,c){e.targets().each(function(o){$n(u).each(function(e){var n=ge.fromDom(v.getDoc()),t=bt(x,n,a),r=af(e,o,t);ku(v,i,u,c,r)})})},function(){Bu(v)});v.on("init",function(e){var r=v.getWin(),o=cu(v),n=fu(v),t=tf(r,o,n,y),c=rf(r,o,n,y),i=of(r,o,n,y);v.on("TableSelectorChange",function(e){i(e.start,e.finish)});var u,a,l=function(e,n){!0===e.raw().shiftKey&&(n.kill()&&e.kill(),n.selection().each(function(e){var n=oa.relative(e.start(),e.finish()),t=da(r,n);v.selection.setRng(t)}))},f=function(e){var n=Pc(e);if(n.raw().shiftKey&&Yl(n.raw().which)){var t=v.selection.getRng(),r=ge.fromDom(t.startContainer),o=ge.fromDom(t.endContainer);c.keyup(n,r,t.startOffset,o,t.endOffset).each(function(e){l(n,e)})}},s=function(e){var n=Pc(e);b().each(function(e){e.hideBars()});var t=v.selection.getRng(),r=ge.fromDom(v.selection.getStart()),o=ge.fromDom(t.startContainer),i=ge.fromDom(t.endContainer),u=pu(r).isRtl()?Ql:Jl;c.keydown(n,o,t.startOffset,i,t.endOffset,u).each(function(e){l(n,e)}),b().each(function(e){e.showBars()})},d=function(e){return 0===e.button},m=function(e){d(e)&&lf(e)&&t.mousedown(Pc(e))},g=function(e){var n;((n=e).buttons===undefined||pc.browser.isEdge()&&0===n.buttons||0!=(1&n.buttons))&&lf(e)&&t.mouseover(Pc(e))},p=function(e){d(e)&&lf(e)&&t.mouseup(Pc(e))},h=(u=S(ge.fromDom(o)),a=S(0),{touchEnd:function(e){var n=ge.fromDom(e.target);if("td"===$(n)||"th"===$(n)){var t=u.get(),r=a.get();en(t,n)&&e.timeStamp-r<300&&(e.preventDefault(),i(n,n))}u.set(n),a.set(e.timeStamp)}});v.on("mousedown",m),v.on("mouseover",g),v.on("mouseup",p),v.on("touchend",h.touchEnd),v.on("keyup",f),v.on("keydown",s),v.on("NodeChange",function(){var e=v.selection,n=ge.fromDom(e.getStart()),t=ge.fromDom(e.getEnd());Wt($n,[n,t]).fold(function(){y.clear(o)},x)}),w=C.some({mousedown:m,mouseover:g,mouseup:p,keyup:f,keydown:s})});return{clear:y.clear,destroy:function(){w.each(function(e){})}}}var sf=function(n){return{get:function(){var e=cu(n);return Lt(e,Kt).fold(function(){return n.selection.getStart()===undefined?tr():or(n.selection)},function(e){return rr(e)})}}},df=function(e,t){var o=S(C.none()),i=S([]),n=function(){return qu(e).bind(function(n){return $n(n).map(function(e){return"caption"===$(n)?ur(n):cr(t,e,n)})})},r=function(){o.set(Te(n)()),B(i.get(),function(e){return e()})},u=function(n,t){var r=function(){return o.get().fold(function(){n.setDisabled(!0)},function(e){n.setDisabled(t(e))})};return r(),i.set(i.get().concat([r])),function(){i.set(N(i.get(),function(e){return e!==r}))}};return e.on("NodeChange TableSelectorChange",r),{onSetupTable:function(e){return u(e,function(e){return!1})},onSetupCellOrRow:function(e){return u(e,function(e){return"caption"===$(e.element())})},onSetupMergeable:function(e){return u(e,function(e){return e.mergable().isNone()})},onSetupUnmergeable:function(e){return u(e,function(e){return e.unmergable().isNone()})},resetTargets:r,targets:function(){return o.get()}}},mf=function(n,e){n.ui.registry.addMenuButton("table",{tooltip:"Table",icon:"table",fetch:function(e){return e("inserttable | cell row column | advtablesort | tableprops deletetable")}});var t=function(e){return function(){return n.execCommand(e)}};n.ui.registry.addButton("tableprops",{tooltip:"Table properties",onAction:t("mceTableProps"),icon:"table",onSetup:e.onSetupTable}),n.ui.registry.addButton("tabledelete",{tooltip:"Delete table",onAction:t("mceTableDelete"),icon:"table-delete-table",onSetup:e.onSetupTable}),n.ui.registry.addButton("tablecellprops",{tooltip:"Cell properties",onAction:t("mceTableCellProps"),icon:"table-cell-properties",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tablemergecells",{tooltip:"Merge cells",onAction:t("mceTableMergeCells"),icon:"table-merge-cells",onSetup:e.onSetupMergeable}),n.ui.registry.addButton("tablesplitcells",{tooltip:"Split cell",onAction:t("mceTableSplitCells"),icon:"table-split-cells",onSetup:e.onSetupUnmergeable}),n.ui.registry.addButton("tableinsertrowbefore",{tooltip:"Insert row before",onAction:t("mceTableInsertRowBefore"),icon:"table-insert-row-above",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tableinsertrowafter",{tooltip:"Insert row after",onAction:t("mceTableInsertRowAfter"),icon:"table-insert-row-after",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tabledeleterow",{tooltip:"Delete row",onAction:t("mceTableDeleteRow"),icon:"table-delete-row",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tablerowprops",{tooltip:"Row properties",onAction:t("mceTableRowProps"),icon:"table-row-properties",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tableinsertcolbefore",{tooltip:"Insert column before",onAction:t("mceTableInsertColBefore"),icon:"table-insert-column-before",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tableinsertcolafter",{tooltip:"Insert column after",onAction:t("mceTableInsertColAfter"),icon:"table-insert-column-after",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tabledeletecol",{tooltip:"Delete column",onAction:t("mceTableDeleteCol"),icon:"table-delete-column",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tablecutrow",{tooltip:"Cut row",onAction:t("mceTableCutRow"),icon:"temporary-placeholder",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tablecopyrow",{tooltip:"Copy row",onAction:t("mceTableCopyRow"),icon:"temporary-placeholder",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tablepasterowbefore",{tooltip:"Paste row before",onAction:t("mceTablePasteRowBefore"),icon:"temporary-placeholder",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tablepasterowafter",{tooltip:"Paste row after",onAction:t("mceTablePasteRowAfter"),icon:"temporary-placeholder",onSetup:e.onSetupCellOrRow}),n.ui.registry.addButton("tableinsertdialog",{tooltip:"Insert table",onAction:t("mceInsertTable"),icon:"table"})},gf=function(n){var e=n.getParam("table_toolbar","tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol");0<e.length&&n.ui.registry.addContextToolbar("table",{predicate:function(e){return n.dom.is(e,"table")&&n.getBody().contains(e)},items:e,scope:"node",position:"node"})},pf=function(r,e){var n=function(e){return function(){return r.execCommand(e)}},t=function(e){var n=e.numRows,t=e.numColumns;r.undoManager.transact(function(){wc(r,t,n)}),r.addVisual()},o={text:"Table properties",onSetup:e.onSetupTable,onAction:n("mceTableProps")},i={text:"Delete table",icon:"table-delete-table",onSetup:e.onSetupTable,onAction:n("mceTableDelete")},u=[{type:"menuitem",text:"Insert row before",icon:"table-insert-row-above",onAction:n("mceTableInsertRowBefore"),onSetup:e.onSetupCellOrRow},{type:"menuitem",text:"Insert row after",icon:"table-insert-row-after",onAction:n("mceTableInsertRowAfter"),onSetup:e.onSetupCellOrRow},{type:"menuitem",text:"Delete row",icon:"table-delete-row",onAction:n("mceTableDeleteRow"),onSetup:e.onSetupCellOrRow},{type:"menuitem",text:"Row properties",icon:"table-row-properties",onAction:n("mceTableRowProps"),onSetup:e.onSetupCellOrRow},{type:"separator"},{type:"menuitem",text:"Cut row",onAction:n("mceTableCutRow"),onSetup:e.onSetupCellOrRow},{type:"menuitem",text:"Copy row",onAction:n("mceTableCopyRow"),onSetup:e.onSetupCellOrRow},{type:"menuitem",text:"Paste row before",onAction:n("mceTablePasteRowBefore"),onSetup:e.onSetupCellOrRow},{type:"menuitem",text:"Paste row after",onAction:n("mceTablePasteRowAfter"),onSetup:e.onSetupCellOrRow}],c={type:"nestedmenuitem",text:"Row",getSubmenuItems:function(){return u}},a=[{type:"menuitem",text:"Insert column before",icon:"table-insert-column-before",onAction:n("mceTableInsertColBefore"),onSetup:e.onSetupCellOrRow},{type:"menuitem",text:"Insert column after",icon:"table-insert-column-after",onAction:n("mceTableInsertColAfter"),onSetup:e.onSetupCellOrRow},{type:"menuitem",text:"Delete column",icon:"table-delete-column",onAction:n("mceTableDeleteCol"),onSetup:e.onSetupCellOrRow}],l={type:"nestedmenuitem",text:"Column",getSubmenuItems:function(){return a}},f=[{type:"menuitem",text:"Cell properties",icon:"table-cell-properties",onAction:n("mceTableCellProps"),onSetup:e.onSetupCellOrRow},{type:"menuitem",text:"Merge cells",icon:"table-merge-cells",onAction:n("mceTableMergeCells"),onSetup:e.onSetupMergeable},{type:"menuitem",text:"Split cell",icon:"table-split-cells",onAction:n("mceTableSplitCells"),onSetup:e.onSetupUnmergeable}],s={type:"nestedmenuitem",text:"Cell",getSubmenuItems:function(){return f}};!1===r.getParam("table_grid",!0,"boolean")?r.ui.registry.addMenuItem("inserttable",{text:"Table",icon:"table",onAction:n("mceInsertTable")}):r.ui.registry.addNestedMenuItem("inserttable",{text:"Table",icon:"table",getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"inserttable",onAction:t}]}}),r.ui.registry.addMenuItem("inserttabledialog",{text:"Insert table",icon:"table",onAction:n("mceInsertTable")}),r.ui.registry.addMenuItem("tableprops",o),r.ui.registry.addMenuItem("deletetable",i),r.ui.registry.addNestedMenuItem("row",c),r.ui.registry.addNestedMenuItem("column",l),r.ui.registry.addNestedMenuItem("cell",s),r.ui.registry.addContextMenu("table",{update:function(){return e.resetTargets(),e.targets().fold(function(){return""},function(e){return"caption"===$(e.element())?"tableprops deletetable":"cell row column | advtablesort | tableprops deletetable"})}})},hf=function(t,r,e,n){return{insertTable:function(e,n){return wc(t,e,n)},setClipboardRows:function(e){return n=r,t=k(e,ge.fromDom),void n.set(C.from(t));var n,t},getClipboardRows:function(){return r.get().fold(function(){},function(e){return k(e,function(e){return e.dom()})})},resizeHandler:e,selectionTargets:n}};function vf(n){var e=sf(n),t=df(n,e),r=Yc(n),o=ff(n,r.lazyResize,t),i=ju(n,r.lazyWire),u=S(C.none());return Rc(n,i,o,e,u),ar(n,e,i,o),pf(n,t),mf(n,t),gf(n),n.on("PreInit",function(){n.serializer.addTempAttr($t),n.serializer.addTempAttr(Yt)}),yu(n)&&n.on("keydown",function(e){Ua(e,n,i,r.lazyWire)}),n.on("remove",function(){r.destroy(),o.destroy()}),hf(n,u,r,t)}!function wf(){s.add("table",vf)}()}(window);
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(){},o=function(e){return function(){return e}};var n,r,a,u=o(!1),i=o(!0),p=tinymce.util.Tools.resolve("tinymce.util.Tools"),c=tinymce.util.Tools.resolve("tinymce.util.XHR"),l=function(e){return e.getParam("template_replace_values")},s=function(e){return e.getParam("template_mdate_format",e.translate("%Y-%m-%d"))},f=function(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},m=function(e,t,n){var r="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),a="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(" ");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",f(n.getMonth()+1,2))).replace("%d",f(n.getDate(),2))).replace("%H",""+f(n.getHours(),2))).replace("%M",""+f(n.getMinutes(),2))).replace("%S",""+f(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(a[n.getDay()]))).replace("%a",""+e.translate(r[n.getDay()]))).replace("%%","%")},d=function(t,n){return function(){var e=t.templates;"function"!=typeof e?"string"==typeof e?c.send({url:e,success:function(e){n(JSON.parse(e))}}):n(e):e(n)}},g=function(n,e){return p.each(e,function(e,t){"function"==typeof e&&(e=e(t)),n=n.replace(new RegExp("\\{\\$"+t+"\\}","g"),e)}),n},v=function(e,t){var r=e.dom,a=l(e);p.each(r.select("*",t),function(n){p.each(a,function(e,t){r.hasClass(n,t)&&"function"==typeof a[t]&&a[t](n)})})},h=function(e,t){return new RegExp("\\b"+t+"\\b","g").test(e.className)},y=function(n,e,t){var r,a,o=n.dom,u=n.selection.getContent();t=g(t,l(n)),r=o.create("div",null,t),(a=o.select(".mceTmpl",r))&&0<a.length&&(r=o.create("div",null)).appendChild(a[0].cloneNode(!0)),p.each(o.select("*",r),function(e){var t;h(e,n.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))&&(e.innerHTML=m(n,(t=n).getParam("template_cdate_format",t.translate("%Y-%m-%d")))),h(e,n.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(e.innerHTML=m(n,s(n))),h(e,n.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))&&(e.innerHTML=u)}),v(n,r),n.execCommand("mceInsertContent",!1,r.innerHTML),n.addVisual()},b=function(e){e.addCommand("mceInsertTemplate",function t(r){for(var a=[],e=1;e<arguments.length;e++)a[e-1]=arguments[e];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=a.concat(e);return r.apply(null,n)}}(y,e))},M=function(){return T},T=(n=function(e){return e.isNone()},{fold:function(e,t){return e()},is:u,isSome:u,isNone:i,getOr:a=function(e){return e},getOrThunk:r=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(undefined),or:a,orThunk:r,map:M,each:t,bind:M,exists:u,forall:i,filter:M,equals:n,equals_:n,toArray:function(){return[]},toString:o("none()")}),_=function(n){var e=o(n),t=function(){return a},r=function(e){return e(n)},a={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:i,isNone:u,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return _(e(n))},each:function(e){e(n)},bind:r,exists:r,forall:r,filter:function(e){return e(n)?a:T},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(u,function(e){return t(n,e)})}};return a},O={some:_,none:M,from:function(e){return null===e||e===undefined?T:_(e)}},x=function(e,t){return function(e,t,n){for(var r=0,a=e.length;r<a;r++){var o=e[r];if(t(o,r))return O.some(o);if(n(o,r))break}return O.none()}(e,t,u)},S=tinymce.util.Tools.resolve("tinymce.util.Promise"),w=Object.hasOwnProperty,P=function(e,t){return w.call(e,t)},D={'"':"&quot;","<":"&lt;",">":"&gt;","&":"&amp;","'":"&#039;"},C=function(e){return e.replace(/["'<>&]/g,function(e){return(P(t=D,n=e)?O.from(t[n]):O.none()).getOr(e);var t,n})},A=function(l,t){var e=function(e){return function(e,t){for(var n=e.length,r=new Array(n),a=0;a<n;a++){var o=e[a];r[a]=t(o,a)}return r}(e,function(e){return{text:e.text,value:e.text}})},s=function(e,t){return x(e,function(e){return e.text===t})},f=function(e){l.windowManager.alert("Could not load the specified template.",function(){return e.focus("template")})},m=function(e){return new S(function(t,n){e.value.url.fold(function(){return t(e.value.content.getOr(""))},function(e){return c.send({url:e,success:function(e){t(e)},error:function(e){n(e)}})})})};(function(){if(t&&0!==t.length)return O.from(p.map(t,function(e,t){var n=function(e){return e.url!==undefined};return{selected:0===t,text:e.title,value:{url:n(e)?O.from(e.url):O.none(),content:n(e)?O.none():O.from(e.content),description:e.description}}}));var e=l.translate("No templates defined.");return l.notificationManager.open({text:e,type:"info"}),O.none()})().each(function(o){var u=e(o),i=function(e,t){return{title:"Insert Template",size:"large",body:{type:"panel",items:e},initialData:t,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(t){var e=t.getData();s(n,e.template).each(function(e){m(e).then(function(e){y(l,0,e),t.close()})["catch"](function(){t.disable("save"),f(t)})})},onChange:(r=n=o,a=c,function(n,e){if("template"===e.name){var t=n.getData().template;s(r,t).each(function(t){n.block("Loading..."),m(t).then(function(e){a(n,t,e)})["catch"](function(){a(n,t,""),n.disable("save"),f(n)})})}})};var r,a,n},c=function(e,t,n){var r=function(t,e){if(-1===e.indexOf("<html>")){var n="";p.each(t.contentCSS,function(e){n+='<link type="text/css" rel="stylesheet" href="'+t.documentBaseURI.toAbsolute(e)+'">'});var r=t.settings.body_class||"";-1!==r.indexOf("=")&&(r=(r=t.getParam("body_class","","hash"))[t.id]||"");var a=t.dom.encode,o=t.getBody().dir,u=o?' dir="'+a(o)+'"':"";e="<!DOCTYPE html><html><head>"+n+'</head><body class="'+a(r)+'"'+u+">"+e+"</body></html>"}return g(e,t.getParam("template_preview_replace_values"))}(l,n),a=[{type:"selectbox",name:"template",label:"Templates",items:u},{type:"htmlpanel",html:'<p aria-live="polite">'+C(t.value.description)+"</p>"},{label:"Preview",type:"iframe",name:"preview",sandboxed:!1}],o={template:t.text,preview:r};e.unblock(),e.redial(i(a,o)),e.focus("template")},t=l.windowManager.open(i([],{template:"",preview:""}));t.block("Loading..."),m(o[0]).then(function(e){c(t,o[0],e)})["catch"](function(){c(t,o[0],""),t.disable("save"),f(t)})})},N=function(t){return function(e){A(t,e)}};!function H(){e.add("template",function(e){var t,r;(t=e).ui.registry.addButton("template",{icon:"template",tooltip:"Insert template",onAction:d(t.settings,N(t))}),t.ui.registry.addMenuItem("template",{icon:"template",text:"Insert template...",onAction:d(t.settings,N(t))}),b(e),(r=e).on("PreProcess",function(e){var t=r.dom,n=s(r);p.each(t.select("div",e.node),function(e){t.hasClass(e,"mceTmpl")&&(p.each(t.select("*",e),function(e){t.hasClass(e,r.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(e.innerHTML=m(r,n))}),v(r,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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(o){"use strict";var i=tinymce.util.Tools.resolve("tinymce.PluginManager");!function n(){i.add("textcolor",function(){o.console.warn("Text color plugin is now built in to the core editor, please remove it from your editor configuration")})}()}(window);
@@ -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.3.0 (2020-05-21)
7
+ * Version: 5.3.2 (2020-06-10)
8
8
  */
9
9
  !function(f){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(){return(u=Object.assign||function(t){for(var n,r=1,e=arguments.length;r<e;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)};var n,r,e,o=function(){},a=function(t){return function(){return t}},i=function(t){return t},c=a(!1),s=a(!0),l=function(){return d},d=(n=function(t){return t.isNone()},{fold:function(t,n){return t()},is:c,isSome:c,isNone:s,getOr:e=function(t){return t},getOrThunk:r=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:a(null),getOrUndefined:a(undefined),or:e,orThunk:r,map:l,each:o,bind:l,exists:c,forall:s,filter:l,equals:n,equals_:n,toArray:function(){return[]},toString:a("none()")}),m=function(r){var t=a(r),n=function(){return o},e=function(t){return t(r)},o={fold:function(t,n){return n(r)},is:function(t){return r===t},isSome:s,isNone:c,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return m(t(r))},each:function(t){t(r)},bind:e,exists:e,forall:e,filter:function(t){return t(r)?o:d},toArray:function(){return[r]},toString:function(){return"some("+r+")"},equals:function(t){return t.is(r)},equals_:function(t,n){return t.fold(c,function(t){return n(r,t)})}};return o},y={some:m,none:l,from:function(t){return null===t||t===undefined?d:m(t)}},g=function(e){return function(t){return r=typeof(n=t),(null===n?"null":"object"==r&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":r)===e;var n,r}},p=g("string"),h=g("object"),v=g("array"),b=Array.prototype.slice,k=Array.prototype.indexOf,O=function(t,n){return r=t,e=n,-1<k.call(r,e);var r,e},w=function(t,n){for(var r=t.length,e=new Array(r),o=0;o<r;o++){var a=t[o];e[o]=n(a,o)}return e},C=function(t,n){for(var r=0,e=t.length;r<e;r++){n(t[r],r)}},E=function(t,n){for(var r=[],e=0,o=t.length;e<o;e++){var a=t[e];n(a,e)&&r.push(a)}return r},x=function(t,n,r){return function(t,n){for(var r=t.length-1;0<=r;r--){n(t[r],r)}}(t,function(t){r=n(r,t)}),r},R=function(t,n){return function(t,n,r){for(var e=0,o=t.length;e<o;e++){var a=t[e];if(n(a,e))return y.some(a);if(r(a,e))break}return y.none()}(t,n,c)},T=function(t,n){for(var r=0,e=t.length;r<e;++r){if(!0!==n(t[r],r))return!1}return!0},N=Object.keys,P=Object.hasOwnProperty,S=function(t,n){return P.call(t,n)},M=(function(i){if(!v(i))throw new Error("cases must be an array");if(0===i.length)throw new Error("there must be at least one case");var u=[],r={};C(i,function(t,e){var n=N(t);if(1!==n.length)throw new Error("one and only one name per case");var o=n[0],a=t[o];if(r[o]!==undefined)throw new Error("duplicate key detected:"+o);if("cata"===o)throw new Error("cannot have a case named cata (sorry)");if(!v(a))throw new Error("case arguments must be an array");u.push(o),r[o]=function(){var t=arguments.length;if(t!==a.length)throw new Error("Wrong number of arguments to case "+o+". Expected "+a.length+" ("+a+"), got "+t);for(var r=new Array(t),n=0;n<r.length;n++)r[n]=arguments[n];return{fold:function(){if(arguments.length!==i.length)throw new Error("Wrong number of arguments to fold. Expected "+i.length+", got "+arguments.length);return arguments[e].apply(null,r)},match:function(t){var n=N(t);if(u.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+u.join(",")+"\nActual: "+n.join(","));if(!T(u,function(t){return O(n,t)}))throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+u.join(", "));return t[o].apply(null,r)},log:function(t){f.console.log(t,{constructors:u,constructor:o,params:r})}}}})}([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]),function(t){var n=[],r=[];return C(t,function(t){t.fold(function(t){n.push(t)},function(t){r.push(t)})}),{errors:n,values:r}}),A=function(r){return{is:function(t){return r===t},isValue:s,isError:c,getOr:a(r),getOrThunk:a(r),getOrDie:a(r),or:function(t){return A(r)},orThunk:function(t){return A(r)},fold:function(t,n){return n(r)},map:function(t){return A(t(r))},mapError:function(t){return A(r)},each:function(t){t(r)},bind:function(t){return t(r)},exists:function(t){return t(r)},forall:function(t){return t(r)},toOption:function(){return y.some(r)}}},B=function(r){return{is:c,isValue:c,isError:s,getOr:i,getOrThunk:function(t){return t()},getOrDie:function(){return t=String(r),function(){throw new Error(t)}();var t},or:function(t){return t},orThunk:function(t){return t()},fold:function(t,n){return t(r)},map:function(t){return B(r)},mapError:function(t){return B(t(r))},each:o,bind:function(t){return B(r)},exists:c,forall:s,toOption:y.none}},D={value:A,error:B,fromOption:function(t,n){return t.fold(function(){return B(n)},A)}},I=function(t){return"inline-command"===t.type||"inline-format"===t.type},j=function(t){return"block-command"===t.type||"block-format"===t.type},_=function(t){return n=t,r=function(t,n){return t.start.length===n.start.length?0:t.start.length>n.start.length?-1:1},(e=b.call(n,0)).sort(r),e;var n,r,e},U=function(o){var a=function(t){return D.error({message:t,pattern:o})},t=function(t,n,r){if(o.format===undefined)return o.cmd!==undefined?p(o.cmd)?D.value(r(o.cmd,o.value)):a(t+" pattern has non-string `cmd` parameter"):a(t+" pattern is missing both `format` and `cmd` parameters");var e=void 0;if(v(o.format)){if(!T(o.format,p))return a(t+" pattern has non-string items in the `format` array");e=o.format}else{if(!p(o.format))return a(t+" pattern has non-string `format` parameter");e=[o.format]}return D.value(n(e))};if(!h(o))return a("Raw pattern is not an object");if(!p(o.start))return a("Raw pattern is missing `start` parameter");if(o.end===undefined)return o.replacement!==undefined?p(o.replacement)?0===o.start.length?a("Replacement pattern has empty `start` parameter"):D.value({type:"inline-command",start:"",end:o.start,cmd:"mceInsertContent",value:o.replacement}):a("Replacement pattern has non-string `replacement` parameter"):0===o.start.length?a("Block pattern has empty `start` parameter"):t("Block",function(t){return{type:"block-format",start:o.start,format:t[0]}},function(t,n){return{type:"block-command",start:o.start,cmd:t,value:n}});if(!p(o.end))return a("Inline pattern has non-string `end` parameter");if(0===o.start.length&&0===o.end.length)return a("Inline pattern has empty `start` and `end` parameters");var r=o.start,e=o.end;return 0===e.length&&(e=r,r=""),t("Inline",function(t){return{type:"inline-format",start:r,end:e,format:t}},function(t,n){return{type:"inline-command",start:r,end:e,cmd:t,value:n}})},q=function(t){return"block-command"===t.type?{start:t.start,cmd:t.cmd,value:t.value}:"block-format"===t.type?{start:t.start,format:t.format}:"inline-command"===t.type?"mceInsertContent"===t.cmd&&""===t.start?{start:t.end,replacement:t.value}:{start:t.start,end:t.end,cmd:t.cmd,value:t.value}:"inline-format"===t.type?{start:t.start,end:t.end,format:1===t.format.length?t.format[0]:t.format}:void 0},L=function(t){return{inlinePatterns:E(t,I),blockPatterns:_(E(t,j))}},V=function(e){return{setPatterns:function(t){var n=M(w(t,U));if(0<n.errors.length){var r=n.errors[0];throw new Error(r.message+":\n"+JSON.stringify(r.pattern,null,2))}e.set(L(n.values))},getPatterns:function(){return function f(){for(var t=0,n=0,r=arguments.length;n<r;n++)t+=arguments[n].length;var e=Array(t),o=0;for(n=0;n<r;n++)for(var a=arguments[n],i=0,u=a.length;i<u;i++,o++)e[o]=a[i];return e}(w(e.get().inlinePatterns,q),w(e.get().blockPatterns,q))}}},W="undefined"!=typeof f.window?f.window:Function("return this;")(),F=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=W.console;r&&(r.error?r.error.apply(r,t):r.log.apply(r,t))},G=[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"#",format:"h1"},{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:"1. ",cmd:"InsertOrderedList"},{start:"* ",cmd:"InsertUnorderedList"},{start:"- ",cmd:"InsertUnorderedList"}],H=function(t){var n,r,e=(S(n=t,r="textpattern_patterns")?y.from(n[r]):y.none()).getOr(G);if(!v(e))return F("The setting textpattern_patterns should be an array"),{inlinePatterns:[],blockPatterns:[]};var o=M(w(e,U));return C(o.errors,function(t){return F(t.message,t.pattern)}),L(o.values)},J=function(t){var n=t.getParam("forced_root_block","p");return!1===n?"":!0===n?"p":n},K=tinymce.util.Tools.resolve("tinymce.util.Delay"),X=tinymce.util.Tools.resolve("tinymce.util.VK"),z=tinymce.util.Tools.resolve("tinymce.util.Tools"),Q=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Y=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker"),Z=function(t,n){return{container:t,offset:n}},$=function(t){return t.nodeType===f.Node.TEXT_NODE},tt=function(t,n,r){if(n&&t.isEmpty(n)&&!r(n)){var e=n.parentNode;t.remove(n),tt(t,e,r)}},nt=function(t,n,r,e){void 0===e&&(e=!0);var o=n.startContainer.parentNode,a=n.endContainer.parentNode;n.deleteContents(),e&&!r(n.startContainer)&&($(n.startContainer)&&0===n.startContainer.data.length&&t.remove(n.startContainer),$(n.endContainer)&&0===n.endContainer.data.length&&t.remove(n.endContainer),tt(t,o,r),o!==a&&tt(t,a,r))},rt=function(t,n){var r,e=n.get(t);return v(e)&&(0===(r=e).length?y.none():y.some(r[0])).exists(function(t){return S(t,"block")})},et=function(t){return 0===t.start.length},ot=function(t,n){var r=y.from(t.dom.getParent(n.startContainer,t.dom.isBlock));return""===J(t)?r.orThunk(function(){return y.some(t.getBody())}):r},at=Q.DOM,it=function(n){return function(t){return n===t?-1:0}},ut=function(t,n,r){if($(t)&&0<=n)return y.some(Z(t,n));var e=Y(at);return y.from(e.backwards(t,n,it(t),r)).map(function(t){return Z(t.container,t.container.data.length)})},ft=function(t,r,e){if(!$(t))return y.none();var n=t.textContent;if(0<=r&&r<=n.length)return y.some(Z(t,r));var o=Y(at);return y.from(o.backwards(t,r,it(t),e)).bind(function(t){var n=t.container.data;return ft(t.container,r+n.length,e)})},ct=function(t,n,r){if(!$(t))return y.none();var e=t.textContent;if(n<=e.length)return y.some(Z(t,n));var o=Y(at);return y.from(o.forwards(t,n,it(t),r)).bind(function(t){return ct(t.container,n-e.length,r)})},st=function(t,n,r,e,o){var a,i=Y(t,(a=t,function(t){return a.isBlock(t)||O(["BR","IMG","HR","INPUT"],t.nodeName)||"false"===a.getContentEditable(t)}));return y.from(i.backwards(n,r,e,o))},lt=function(t,n,r){if($(n)&&(r<0||r>n.data.length))return[];for(var e=[r],o=n;o!==t&&o.parentNode;){for(var a=o.parentNode,i=0;i<a.childNodes.length;i++)if(a.childNodes[i]===o){e.push(i);break}o=a}return o===t?e.reverse():[]},dt=function(t,n,r,e,o){return{start:lt(t,n,r),end:lt(t,e,o)}},mt=function(t,n){var r,e,o,a=n.slice(),i=a.pop();return r=a,e=function(t,n){return t.bind(function(t){return y.from(t.childNodes[n])})},o=y.some(t),C(r,function(t){o=e(o,t)}),o.bind(function(t){return $(t)&&0<=i&&t.data.length,y.some({node:t,offset:i})})},gt=function(n,r){return mt(n,r.start).bind(function(t){var o=t.node,a=t.offset;return mt(n,r.end).map(function(t){var n=t.node,r=t.offset,e=f.document.createRange();return e.setStart(o,a),e.setEnd(n,r),e})})},pt=function(e,o,n){(function(t,n,r){if($(t)&&n>=t.length)return y.some(Z(t,n));var e=Y(at);return y.from(e.forwards(t,n,it(t),r)).map(function(t){return Z(t.container,0)})})(o,0,o).each(function(t){var r=t.container;ct(r,n.start.length,o).each(function(t){var n=e.createRng();n.setStart(r,0),n.setEnd(t.container,t.offset),nt(e,n,function(t){return t===o})})})},ht=function(e,a){var i=e.dom,t=e.selection.getRng();return ot(e,t).filter(function(t){var n=J(e),r=""===n&&i.is(t,"body")||i.is(t,n);return null!==t&&r}).bind(function(n){var t,r,e,o=n.textContent;return(t=a,e=(r=o).replace("\xa0"," "),R(t,function(t){return 0===r.indexOf(t.start)||0===e.indexOf(t.start)})).map(function(t){return z.trim(o).length===t.start.length?[]:[{pattern:t,range:dt(i.getRoot(),n,0,n,0)}]})}).getOr([])},vt=function(i,t){if(0!==t.length){var n=i.selection.getBookmark();C(t,function(t){return r=t,e=(n=i).dom,o=r.pattern,a=gt(e.getRoot(),r.range).getOrDie("Unable to resolve path range"),ot(n,a).each(function(t){"block-format"===o.type?rt(o.format,n.formatter)&&n.undoManager.transact(function(){pt(n.dom,t,o),n.formatter.apply(o.format)}):"block-command"===o.type&&n.undoManager.transact(function(){pt(n.dom,t,o),n.execCommand(o.cmd,!1,o.value)})}),1;var n,r,e,o,a}),i.selection.moveToBookmark(n)}},yt=0,bt=function(t,n){return t.create("span",{"data-mce-type":"bookmark",id:n})},kt=function(t,n){var r=t.createRng();return r.setStartAfter(n.start),r.setEndBefore(n.end),r},Ot=function(t,n,r){var e=gt(t.getRoot(),r).getOrDie("Unable to resolve path range"),o=e.startContainer,a=e.endContainer,i=0===e.endOffset?a:a.splitText(e.endOffset),u=0===e.startOffset?o:o.splitText(e.startOffset);return{prefix:n,end:i.parentNode.insertBefore(bt(t,n+"-end"),i),start:u.parentNode.insertBefore(bt(t,n+"-start"),u)}},wt=function(t,n,r){tt(t,t.get(n.prefix+"-end"),r),tt(t,t.get(n.prefix+"-start"),r)},Ct=function(e,o,a,t){var i,u=o.start;return st(e,t.container,t.offset,(i=u,function(t,n){var r=t.data.substring(0,n),e=r.lastIndexOf(i.charAt(i.length-1)),o=r.lastIndexOf(i);return-1!==o?o+i.length:-1!==e?e+1:-1}),a).bind(function(r){if(r.offset>=u.length){var t=e.createRng();return t.setStart(r.container,r.offset-u.length),t.setEnd(r.container,r.offset),y.some(t)}var n=r.offset-u.length;return ft(r.container,n,a).map(function(t){var n=e.createRng();return n.setStart(t.container,t.offset),n.setEnd(r.container,r.offset),n}).filter(function(t){return t.toString()===u}).orThunk(function(){return Ct(e,o,a,Z(r.container,0))})})},Et=function(a,i,u){var f=a.dom,c=f.getRoot(),s=u.pattern,l=u.position.container,d=u.position.offset;return ft(l,d-u.pattern.end.length,i).bind(function(t){var e=dt(c,t.container,t.offset,l,d);if(et(s))return y.some({matches:[{pattern:s,startRng:e,endRng:e}],position:t});var n=xt(a,u.remainingPatterns,t.container,t.offset,i),o=n.getOr({matches:[],position:t}),r=o.position;return function(t,r,n,e,o,a){if(void 0===a&&(a=!1),0!==r.start.length||a)return ut(n,e,o).bind(function(n){return Ct(t,r,o,n).bind(function(t){if(a){if(t.endContainer===n.container&&t.endOffset===n.offset)return y.none();if(0===n.offset&&t.endContainer.textContent.length===t.endOffset)return y.none()}return y.some(t)})});var i=t.createRng();return i.setStart(n,e),i.setEnd(n,e),y.some(i)}(f,s,r.container,r.offset,i,n.isNone()).map(function(t){var n,r=dt(c,(n=t).startContainer,n.startOffset,n.endContainer,n.endOffset);return{matches:o.matches.concat([{pattern:s,startRng:r,endRng:e}]),position:Z(t.startContainer,t.startOffset)}})})},xt=function(d,m,g,p,h){var v=d.dom;return ut(g,p,v.getRoot()).bind(function(t){var n=v.createRng();n.setStart(h,0),n.setEnd(g,p);for(var r,e,o,a,i,u=n.toString(),f=0;f<m.length;f++){var c=m[f];if(r=u,e=c.end,i=a=o=void 0,a=e,i=(o=r).length-e.length,""===a||o.length>=a.length&&o.substr(i,i+a.length)===a){var s=m.slice();s.splice(f,1);var l=Et(d,h,{pattern:c,remainingPatterns:s,position:t});if(l.isSome())return l}}return y.none()})},Rt=function(n,t,r){n.selection.setRng(r),"inline-format"===t.type?C(t.format,function(t){n.formatter.apply(t)}):n.execCommand(t.cmd,!1,t.value)},Tt=function(o,t){var n,r,a=(n="mce_textpattern",r=(new Date).getTime(),n+"_"+Math.floor(1e9*Math.random())+ ++yt+String(r)),i=x(t,function(t,n){var r=Ot(o,a+"_end"+t.length,n.endRng);return t.concat([u(u({},n),{endMarker:r})])},[]);return x(i,function(t,n){var r=i.length-t.length-1,e=et(n.pattern)?n.endMarker:Ot(o,a+"_start"+r,n.startRng);return t.concat([u(u({},n),{startMarker:e})])},[])},Nt=function(r,e,o){var a=r.selection.getRng();return!1===a.collapsed?[]:ot(r,a).bind(function(t){var n=a.startOffset-(o?1:0);return xt(r,e,a.startContainer,n,t)}).fold(function(){return[]},function(t){return t.matches})},Pt=function(f,t){if(0!==t.length){var c=f.dom,n=f.selection.getBookmark(),r=Tt(c,t);C(r,function(t){var n,r,e,o,a,i=c.getParent(t.startMarker.start,c.isBlock),u=function(t){return t===i};et(t.pattern)?(n=f,r=t.pattern,e=t.endMarker,o=u,a=kt(n.dom,e),nt(n.dom,a,o),Rt(n,r,a)):function(t,n,r,e,o){var a=t.dom,i=kt(a,e),u=kt(a,r);nt(a,u,o),nt(a,i,o);var f={prefix:r.prefix,start:r.end,end:e.start},c=kt(a,f);Rt(t,n,c)}(f,t.pattern,t.startMarker,t.endMarker,u),wt(c,t.endMarker,u),wt(c,t.startMarker,u)}),f.selection.moveToBookmark(n)}},St=function(t,n){var r=Nt(t,n.inlinePatterns,!0);0<r.length&&t.undoManager.transact(function(){Pt(t,r)})},Mt=function(t,n,r){for(var e=0;e<t.length;e++)if(r(t[e],n))return!0},At=function(n,r){var e=[",",".",";",":","!","?"],o=[32];n.on("keydown",function(t){13!==t.keyCode||X.modifierPressed(t)||!function(r,t){if(!r.selection.isCollapsed())return!1;var e=Nt(r,t.inlinePatterns,!1),o=ht(r,t.blockPatterns);return(0<o.length||0<e.length)&&(r.undoManager.add(),r.undoManager.extra(function(){r.execCommand("mceInsertNewLine")},function(){r.insertContent("\ufeff"),Pt(r,e),vt(r,o);var t=r.selection.getRng(),n=ut(t.startContainer,t.startOffset,r.dom.getRoot());r.execCommand("mceInsertNewLine"),n.each(function(t){var n=t.container;"\ufeff"===n.data.charAt(t.offset-1)&&(n.deleteData(t.offset-1,1),tt(r.dom,n.parentNode,function(t){return t===r.dom.getRoot()}))})}),!0)}(n,r.get())||t.preventDefault()},!0),n.on("keyup",function(t){Mt(o,t,function(t,n){return t===n.keyCode&&!1===X.modifierPressed(n)})&&St(n,r.get())}),n.on("keypress",function(t){Mt(e,t,function(t,n){return t.charCodeAt(0)===n.charCode})&&K.setEditorTimeout(n,function(){St(n,r.get())})})};!function Bt(){t.add("textpattern",function(t){var n,r,e=(n=H(t.settings),r=n,{get:function(){return r},set:function(t){r=t}});return At(t,e),V(e)})}()}(window);