tinymce-rails 5.2.1 → 5.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/source/tinymce/tinymce.js +43 -36
  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 +2 -2
  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 +1 -1
  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 +2 -2
  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/themes/mobile/theme.js +1 -1
  49. data/vendor/assets/javascripts/tinymce/themes/silver/theme.js +2 -2
  50. data/vendor/assets/javascripts/tinymce/tinymce.js +2 -2
  51. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 44f770d68ccfffd2356459af0cbc6f4abb5ec3b51f8dbb117795eadc1a256864
4
- data.tar.gz: 7491cb6dd5e36610a5637844da5af4998cfac0ce881f43245be76645e5128f6f
3
+ metadata.gz: ce164625ac3ff41cce62b3cd87e807a78ba9dc9bdddfe608c154afce5a6f93ed
4
+ data.tar.gz: 62d872aee3f7952a97d16bd37367d238d6463ac13ce78ec55799df1037a3601c
5
5
  SHA512:
6
- metadata.gz: 19ef1550ef5fbc2c5a44a8c01a5bb31f2b7cca1272d57e44439b48f555d02ce19275385bd6afe7b6f61573534787c447f9c94f0ddf68f025bedab87d64dc2e8f
7
- data.tar.gz: 14b50e7b7341609cef3ab8ca7825bbfc783501e71d7b34a20521ec3a8f172e1c0e3d34fccc9ba8c90e68ae149acf235e7a9bc95e17fca2a9784d5fe1aa183684
6
+ metadata.gz: aa54294fb4600fa701a3ef5e42b9058a79c45137ed7cf21ffdf28d7fb27412e8c37ac68fec4d9c0071f01c4ddd901872c4a2f6583ab0caab2e3d443162cd11a4
7
+ data.tar.gz: 81bf0c23ccd3f29cf032d84912b61949ce97ff173edd76e52cdd5b6420b7b82ba4688a798645735682ef228ee914326d5cae9f658356c3b3d5642935d1710cfb
@@ -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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  (function (domGlobals) {
10
10
  'use strict';
@@ -6831,12 +6831,14 @@
6831
6831
  var node;
6832
6832
  var container = doc.createElement('div');
6833
6833
  var frag = doc.createDocumentFragment();
6834
+ frag.appendChild(container);
6834
6835
  if (html) {
6835
6836
  container.innerHTML = html;
6836
6837
  }
6837
6838
  while (node = container.firstChild) {
6838
6839
  frag.appendChild(node);
6839
6840
  }
6841
+ frag.removeChild(container);
6840
6842
  return frag;
6841
6843
  };
6842
6844
  var remove = function (node, keepChildren) {
@@ -7025,8 +7027,20 @@
7025
7027
  var toHex = function (rgbVal) {
7026
7028
  return styles.toHex(Tools.trim(rgbVal));
7027
7029
  };
7030
+ var isNonEmptyElement = function (node) {
7031
+ if (NodeType.isElement(node)) {
7032
+ var isNamedAnchor = node.nodeName.toLowerCase() === 'a' && !getAttrib(node, 'href') && getAttrib(node, 'id');
7033
+ if (getAttrib(node, 'name') || getAttrib(node, 'data-mce-bookmark') || isNamedAnchor) {
7034
+ return true;
7035
+ }
7036
+ }
7037
+ return false;
7038
+ };
7028
7039
  var isEmpty = function (node, elements) {
7029
- var i, attributes, type, name, brCount = 0;
7040
+ var type, name, brCount = 0;
7041
+ if (isNonEmptyElement(node)) {
7042
+ return false;
7043
+ }
7030
7044
  node = node.firstChild;
7031
7045
  if (node) {
7032
7046
  var walker = new TreeWalker(node, node.parentNode);
@@ -7049,13 +7063,8 @@
7049
7063
  }
7050
7064
  return false;
7051
7065
  }
7052
- attributes = getAttribs(node);
7053
- i = attributes.length;
7054
- while (i--) {
7055
- name = attributes[i].nodeName;
7056
- if (name === 'name' || name === 'data-mce-bookmark') {
7057
- return false;
7058
- }
7066
+ if (isNonEmptyElement(node)) {
7067
+ return false;
7059
7068
  }
7060
7069
  }
7061
7070
  if (type === 8) {
@@ -10818,6 +10827,10 @@
10818
10827
  }
10819
10828
  return true;
10820
10829
  };
10830
+ var isNonEmptyElement = function (node) {
10831
+ var isNamedAnchor = node.name === 'a' && !node.attr('href') && node.attr('id');
10832
+ return node.attr('name') || node.attr('id') && !node.firstChild || node.attr('data-mce-bookmark') || isNamedAnchor;
10833
+ };
10821
10834
  var Node$1 = function () {
10822
10835
  function Node(name, type) {
10823
10836
  this.name = name;
@@ -11025,6 +11038,9 @@
11025
11038
  }
11026
11039
  var self = this;
11027
11040
  var node = self.firstChild;
11041
+ if (isNonEmptyElement(self)) {
11042
+ return false;
11043
+ }
11028
11044
  if (node) {
11029
11045
  do {
11030
11046
  if (node.type === 1) {
@@ -11034,12 +11050,8 @@
11034
11050
  if (elements[node.name]) {
11035
11051
  return false;
11036
11052
  }
11037
- var i = node.attributes.length;
11038
- while (i--) {
11039
- var name_1 = node.attributes[i].name;
11040
- if (name_1 === 'name' || name_1.indexOf('data-mce-bookmark') === 0) {
11041
- return false;
11042
- }
11053
+ if (isNonEmptyElement(node)) {
11054
+ return false;
11043
11055
  }
11044
11056
  }
11045
11057
  if (node.type === 8) {
@@ -15680,16 +15692,14 @@
15680
15692
  isInWhiteSpacePreservedElement = false;
15681
15693
  }
15682
15694
  if (elementRule.removeEmpty && isEmpty$1(schema, nonEmptyElements, whiteSpaceElements, node)) {
15683
- if (!node.attr('name') && !node.attr('id')) {
15684
- tempNode = node.parent;
15685
- if (blockElements[node.name]) {
15686
- node.empty().remove();
15687
- } else {
15688
- node.unwrap();
15689
- }
15690
- node = tempNode;
15691
- return;
15695
+ tempNode = node.parent;
15696
+ if (blockElements[node.name]) {
15697
+ node.empty().remove();
15698
+ } else {
15699
+ node.unwrap();
15692
15700
  }
15701
+ node = tempNode;
15702
+ return;
15693
15703
  }
15694
15704
  if (elementRule.paddEmpty && (isPaddedWithNbsp(node) || isEmpty$1(schema, nonEmptyElements, whiteSpaceElements, node))) {
15695
15705
  paddEmptyNode(settings, args, blockElements, node);
@@ -17938,10 +17948,9 @@
17938
17948
  dom.remove(node, true);
17939
17949
  }
17940
17950
  };
17941
- var processUnderlineAndColor = function (dom, node) {
17942
- var textDecoration;
17951
+ var processTextDecorationsAndColor = function (dom, node) {
17943
17952
  if (node.nodeType === 1 && node.parentNode && node.parentNode.nodeType === 1) {
17944
- textDecoration = getTextDecoration(dom, node.parentNode);
17953
+ var textDecoration = getTextDecoration(dom, node.parentNode);
17945
17954
  if (dom.getStyle(node, 'color') && textDecoration) {
17946
17955
  dom.setStyle(node, 'text-decoration', textDecoration);
17947
17956
  } else if (dom.getStyle(node, 'text-decoration') === textDecoration) {
@@ -17949,10 +17958,10 @@
17949
17958
  }
17950
17959
  }
17951
17960
  };
17952
- var mergeUnderlineAndColor = function (dom, format, vars, node) {
17953
- if (format.styles.color || format.styles.textDecoration) {
17954
- Tools.walk(node, curry(processUnderlineAndColor, dom), 'childNodes');
17955
- processUnderlineAndColor(dom, node);
17961
+ var mergeTextDecorationsAndColor = function (dom, format, vars, node) {
17962
+ if (format.styles && (format.styles.color || format.styles.textDecoration)) {
17963
+ Tools.walk(node, curry(processTextDecorationsAndColor, dom), 'childNodes');
17964
+ processTextDecorationsAndColor(dom, node);
17956
17965
  }
17957
17966
  };
17958
17967
  var mergeBackgroundColorAndFontSize = function (dom, format, vars, node) {
@@ -18203,6 +18212,7 @@
18203
18212
  mergeWithChildren(ed, formatList, vars, node);
18204
18213
  mergeWithParents(ed, format, name, vars, node);
18205
18214
  mergeBackgroundColorAndFontSize(dom, format, vars, node);
18215
+ mergeTextDecorationsAndColor(dom, format, vars, node);
18206
18216
  mergeSubSup(dom, format, vars, node);
18207
18217
  mergeSiblings(dom, format, vars, node);
18208
18218
  }
@@ -18239,9 +18249,6 @@
18239
18249
  ed.selection.setRng(RangeNormalizer.normalize(ed.selection.getRng()));
18240
18250
  bookmark = GetBookmark.getPersistentBookmark(ed.selection, true);
18241
18251
  applyRngStyle(dom, expandRng(ed, selection.getRng(), formatList));
18242
- if (format.styles) {
18243
- mergeUnderlineAndColor(dom, format, vars, curSelNode);
18244
- }
18245
18252
  selection.moveToBookmark(bookmark);
18246
18253
  moveStart(dom, selection, selection.getRng());
18247
18254
  ed.nodeChanged();
@@ -27579,8 +27586,8 @@
27579
27586
  suffix: null,
27580
27587
  $: DomQuery,
27581
27588
  majorVersion: '5',
27582
- minorVersion: '2.1',
27583
- releaseDate: '2020-03-25',
27589
+ minorVersion: '2.2',
27590
+ releaseDate: '2020-04-23',
27584
27591
  editors: legacyEditors,
27585
27592
  i18n: I18n,
27586
27593
  activeEditor: null,
@@ -1,6 +1,6 @@
1
1
  module TinyMCE
2
2
  module Rails
3
- VERSION = "5.2.1"
4
- TINYMCE_VERSION = "5.2.1"
3
+ VERSION = "5.2.2"
4
+ TINYMCE_VERSION = "5.2.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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(){"use strict";function n(){}function o(n){return function(){return n}}function t(){return d}var e,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=function(n,t,e){var r="UL"===t?"InsertUnorderedList":"InsertOrderedList";n.execCommand(r,!1,!1===e?null:{"list-style-type":e})},i=function(e){e.addCommand("ApplyUnorderedListStyle",function(n,t){l(e,"UL",t["list-style-type"])}),e.addCommand("ApplyOrderedListStyle",function(n,t){l(e,"OL",t["list-style-type"])})},c=function(n){var t=n.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");return t?t.split(/[ ,]/):[]},s=function(n){var t=n.getParam("advlist_bullet_styles","default,circle,square");return t?t.split(/[ ,]/):[]},f=o(!1),a=o(!0),d=(e={fold:function(n,t){return n()},is:f,isSome:f,isNone:a,getOr:m,getOrThunk:p,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(undefined),or:m,orThunk:p,map:t,each:n,bind:t,exists:f,forall:a,filter:t,equals:g,equals_:g,toArray:function(){return[]},toString:o("none()")},Object.freeze&&Object.freeze(e),e);function g(n){return n.isNone()}function p(n){return n()}function m(n){return n}function y(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,L),i=-1!==r?t.parents.slice(0,r):t.parents,o=u.grep(i,N(n));return 0<o.length&&o[0].nodeName===e}function O(n,t,e,r,i,o){0<o.length?function(e,n,t,r,i,o){e.ui.registry.addSplitButton(n,{tooltip:t,icon:"OL"===i?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:function(n){n(u.map(o,function(n){return{type:"choiceitem",value:"default"===n?"":n,icon:"list-"+("OL"===i?"num":"bull")+"-"+("disc"===n||"decimal"===n?"default":n),text:function(n){return n.replace(/\-/g," ").replace(/\b\w/g,function(n){return n.toUpperCase()})}(n)}}))},onAction:function(){return e.execCommand(r)},onItemAction:function(n,t){l(e,i,t)},select:function(t){return S(e).map(function(n){return t===n}).getOr(!1)},onSetup:function(t){function n(n){t.setActive(y(e,n,i))}return e.on("NodeChange",n),function(){return e.off("NodeChange",n)}}})}(n,t,e,r,i,o):function(e,n,t,r,i){e.ui.registry.addToggleButton(n,{active:!1,tooltip:t,icon:"OL"===i?"ordered-list":"unordered-list",onSetup:function(t){function n(n){t.setActive(y(e,n,i))}return e.on("NodeChange",n),function(){return e.off("NodeChange",n)}},onAction:function(){return e.execCommand(r)}})}(n,t,e,r,i)}var v=function(e){function n(){return i}function t(n){return n(e)}var r=o(e),i={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:a,isNone:f,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:n,orThunk:n,map:function(n){return v(n(e))},each:function(n){n(e)},bind:t,exists:t,forall:t,filter:function(n){return n(e)?i:d},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 i},h=function(n){return null===n||n===undefined?d:v(n)},L=function(n){return n&&/^(TH|TD)$/.test(n.nodeName)},N=function(t){return function(n){return n&&/^(OL|UL|DL)$/.test(n.nodeName)&&function(n,t){return n.$.contains(n.getBody(),t)}(t,n)}},S=function(n){var t=n.dom.getParent(n.selection.getNode(),"ol,ul"),e=n.dom.getStyle(t,"listStyleType");return h(e)},T=function(n){O(n,"numlist","Numbered list","InsertOrderedList","OL",c(n)),O(n,"bullist","Bullet list","InsertUnorderedList","UL",s(n))};!function b(){r.add("advlist",function(n){var t,e,r;e="lists",r=(t=n).settings.plugins?t.settings.plugins:"",-1!==u.inArray(r.split(/[ ,]/),e)&&(T(n),i(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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
- !function(){"use strict";function e(o){return function(t){for(var e=0;e<t.length;e++)(n=t[e]).attr("href")||!n.attr("id")&&!n.attr("name")||n.firstChild||t[e].attr("contenteditable",o);var n}}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(t){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)},o=function(t){var e=t.selection.getNode();return"A"===e.tagName&&""===t.dom.getAttrib(e,"href")?e.getAttribute("id")||e.getAttribute("name"):""},r=function(t,e){var n=t.selection.getNode();"A"===n.tagName&&""===t.dom.getAttrib(n,"href")?(n.removeAttribute("name"),n.id=e,t.undoManager.add()):(t.focus(),t.selection.collapse(!0),t.execCommand("mceInsertContent",!1,t.dom.createHTML("a",{id:e})))},a=function(e){var t=o(e);e.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:t},onSubmit:function(t){!function(t,e){return n(e)?(r(t,e),!1):(t.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),!0)}(e,t.getData().id)&&t.close()}})},i=function(t){t.addCommand("mceAnchor",function(){a(t)})},c=function(t){t.on("PreInit",function(){t.parser.addNodeFilter("a",e("false")),t.serializer.addNodeFilter("a",e(null))})},d=function(e){e.ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:function(){return e.execCommand("mceAnchor")},onSetup:function(t){return e.selection.selectorChangedWithUnbind("a:not([href])",t.setActive).unbind}}),e.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:function(){return e.execCommand("mceAnchor")}})};!function u(){t.add("anchor",function(t){c(t),i(t),d(t)})}()}();
9
+ !function(){"use strict";function o(t,e){return"A"===e.tagName&&""===t.dom.getAttrib(e,"href")}function e(o){return function(t){for(var e=0;e<t.length;e++)(n=t[e]).attr("href")||!n.attr("id")&&!n.attr("name")||n.firstChild||t[e].attr("contenteditable",o);var n}}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(t){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)},r=function(t){var e=t.selection.getNode();return o(t,e)?e.getAttribute("id")||e.getAttribute("name"):""},i=function(t,e){var n=t.selection.getNode();o(t,n)?(n.removeAttribute("name"),n.id=e,t.undoManager.add()):(t.focus(),t.selection.collapse(!0),t.insertContent(t.dom.createHTML("a",{id:e})))},a=function(e){var t=r(e);e.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:t},onSubmit:function(t){!function(t,e){return n(e)?(i(t,e),!0):(t.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),!1)}(e,t.getData().id)||t.close()}})},c=function(t){t.addCommand("mceAnchor",function(){a(t)})},u=function(t){t.on("PreInit",function(){t.parser.addNodeFilter("a",e("false")),t.serializer.addNodeFilter("a",e(null))})},d=function(e){e.ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:function(){return e.execCommand("mceAnchor")},onSetup:function(t){return e.selection.selectorChangedWithUnbind("a:not([href])",t.setActive).unbind}}),e.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:function(){return e.execCommand("mceAnchor")}})};!function l(){t.add("anchor",function(t){u(t),c(t),d(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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(){"use strict";function i(t,e){if(e<0&&(e=0),3===t.nodeType){var n=t.data.length;n<e&&(e=n)}return e}function C(t,e,n){1!==e.nodeType||e.hasChildNodes()?t.setStart(e,i(e,n)):t.setStartBefore(e)}function y(t,e,n){1!==e.nodeType||e.hasChildNodes()?t.setEnd(e,i(e,n)):t.setEndAfter(e)}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.Env"),k=function(t){return t.getParam("autolink_pattern",/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i)},p=function(t){return t.getParam("default_link_target",!1)},w=function(t){return t.getParam("link_default_protocol","http","string")},r=function(t,e,n){var i,o,r,f,a,s,d,l,c,u,g=k(t),h=p(t);if("A"!==t.selection.getNode().tagName){if((i=t.selection.getRng(!0).cloneRange()).startOffset<5){if(!(l=i.endContainer.previousSibling)){if(!i.endContainer.firstChild||!i.endContainer.firstChild.nextSibling)return;l=i.endContainer.firstChild.nextSibling}if(c=l.length,C(i,l,c),y(i,l,c),i.endOffset<5)return;o=i.endOffset,f=l}else{if(3!==(f=i.endContainer).nodeType&&f.firstChild){for(;3!==f.nodeType&&f.firstChild;)f=f.firstChild;3===f.nodeType&&(C(i,f,0),y(i,f,f.nodeValue.length))}o=1===i.endOffset?2:i.endOffset-1-e}for(r=o;C(i,f,2<=o?o-2:0),y(i,f,1<=o?o-1:0),o-=1," "!==(u=i.toString())&&""!==u&&160!==u.charCodeAt(0)&&0<=o-2&&u!==n;);!function(t,e){return t===e||" "===t||160===t.charCodeAt(0)}(i.toString(),n)?(0===i.startOffset?C(i,f,0):C(i,f,o),y(i,f,r)):(C(i,f,o),y(i,f,r),o+=1),"."===(s=i.toString()).charAt(s.length-1)&&y(i,f,r-1),d=(s=i.toString().trim()).match(g);var m=w(t);d&&("www."===d[1]?d[1]=m+"://www.":/@$/.test(d[1])&&!/^mailto:/.test(d[1])&&(d[1]="mailto:"+d[1]),a=t.selection.getBookmark(),t.selection.setRng(i),t.execCommand("createlink",!1,d[1]+d[2]),!1!==h&&t.dom.setAttrib(t.selection.getNode(),"target",h),t.selection.moveToBookmark(a),t.nodeChanged())}},e=function(e){var n;e.on("keydown",function(t){if(13===t.keyCode)return function(t){r(t,-1,"")}(e)}),o.browser.isIE()?e.on("focus",function(){if(!n){n=!0;try{e.execCommand("AutoUrlDetect",!1,!0)}catch(t){}}}):(e.on("keypress",function(t){if(41===t.keyCode)return function(t){r(t,-1,"(")}(e)}),e.on("keyup",function(t){if(32===t.keyCode)return function(t){r(t,0,"")}(e)}))};!function n(){t.add("autolink",function(t){e(t)})}()}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(){"use strict";function d(e,t){var n=e.getBody();n&&(n.style.overflowY=t?"":"hidden",t||(n.scrollTop=0))}function h(e,t,n,i){var o=parseInt(e.getStyle(t,n,i),10);return isNaN(o)?0:o}var i=function(e){function t(){return n}var n=e;return{get:t,set:function(e){n=e},clone:function(){return i(t())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),v=tinymce.util.Tools.resolve("tinymce.Env"),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),p=function(e){return e.fire("ResizeEditor")},y=function(e){return e.getParam("min_height",e.getElement().offsetHeight,"number")},z=function(e){return e.getParam("max_height",0,"number")},n=function(e){return e.getParam("autoresize_overflow_padding",1,"number")},b=function(e){return e.getParam("autoresize_bottom_margin",50,"number")},o=function(e){return e.getParam("autoresize_on_init",!0,"boolean")},u=function(e,t,n,i,o){r.setEditorTimeout(e,function(){C(e,t),n--?u(e,t,n,i,o):o&&o()},i)},C=function(e,t){var n,i,o,r=e.dom,u=e.getDoc();if(u)if(function(e){return e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen()}(e))d(e,!0);else{var s=u.documentElement,a=b(e);i=y(e);var f=h(r,s,"margin-top",!0),c=h(r,s,"margin-bottom",!0);(o=s.offsetHeight+f+c+a)<0&&(o=0);var g=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight;o+g>y(e)&&(i=o+g);var l=z(e);if(l&&l<i?(i=l,d(e,!0)):d(e,!1),i!==t.get()){if(n=i-t.get(),r.setStyle(e.getContainer(),"height",i+"px"),t.set(i),p(e),v.browser.isSafari()&&v.mac){var m=e.getWin();m.scrollTo(m.pageXOffset,m.pageYOffset)}e.hasFocus()&&e.selection.scrollIntoView(e.selection.getNode()),v.webkit&&n<0&&C(e,t)}}},s={setup:function(t,e){t.on("init",function(){var e=n(t);t.dom.setStyles(t.getBody(),{paddingLeft:e,paddingRight:e,"min-height":0})}),t.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",function(){C(t,e)}),o(t)&&t.on("init",function(){u(t,e,20,100,function(){u(t,e,5,1e3)})})},resize:C},a=function(e,t){e.addCommand("mceAutoResize",function(){s.resize(e,t)})};!function t(){e.add("autoresize",function(e){if(e.settings.hasOwnProperty("resize")||(e.settings.resize=!1),!e.inline){var t=i(0);a(e,t),s.setup(e,t)}})}()}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(n){"use strict";function r(t,e){var n=t||e,r=/^(\d+)([ms]?)$/.exec(""+n);return(r[2]?{s:1e3,m:6e4}[r[2]]:1)*parseInt(n,10)}function o(t){var e=t.getParam("autosave_prefix","tinymce-autosave-{path}{query}{hash}-{id}-");return e=(e=(e=(e=e.replace(/\{path\}/g,n.document.location.pathname)).replace(/\{query\}/g,n.document.location.search)).replace(/\{hash\}/g,n.document.location.hash)).replace(/\{id\}/g,t.id)}function a(t,e){var n=t.settings.forced_root_block;return""===(e=d.trim(void 0===e?t.getBody().innerHTML:e))||new RegExp("^<"+n+"[^>]*>((\xa0|&nbsp;|[ \t]|<br[^>]*>)+?|)</"+n+">|<br>$","i").test(e)}function i(t){var e=parseInt(v.getItem(o(t)+"time"),10)||0;return!((new Date).getTime()-e>function(t){return r(t.settings.autosave_retention,"20m")}(t))||(g(t,!1),!1)}function u(t){var e=o(t);!a(t)&&t.isDirty()&&(v.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),v.setItem(e+"time",(new Date).getTime().toString()),function(t){t.fire("StoreDraft")}(t))}function s(t){var e=o(t);i(t)&&(t.setContent(v.getItem(e+"draft"),{format:"raw"}),function(t){t.fire("RestoreDraft")}(t))}function c(t,e){var n=function(t){return r(t.settings.autosave_interval,"30s")}(t);e.get()||(m.setInterval(function(){t.removed||u(t)},n),e.set(!0))}function f(t){t.undoManager.transact(function(){s(t),g(t)}),t.focus()}var l=function(t){function e(){return n}var n=t;return{get:e,set:function(t){n=t},clone:function(){return l(e())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),m=tinymce.util.Tools.resolve("tinymce.util.Delay"),v=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),d=tinymce.util.Tools.resolve("tinymce.util.Tools"),g=function(t,e){var n=o(t);v.removeItem(n+"draft"),v.removeItem(n+"time"),!1!==e&&function(t){t.fire("RemoveDraft")}(t)};function y(r){for(var o=[],t=1;t<arguments.length;t++)o[t-1]=arguments[t];return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=o.concat(t);return r.apply(null,n)}}function p(n,t){return function(t){t.setDisabled(!i(n));function e(){return t.setDisabled(!i(n))}return n.on("StoreDraft RestoreDraft RemoveDraft",e),function(){return n.off("StoreDraft RestoreDraft RemoveDraft",e)}}}var D=tinymce.util.Tools.resolve("tinymce.EditorManager");!function e(){t.add("autosave",function(t){var e=l(!1);return function(t){t.editorManager.on("BeforeUnload",function(t){var e;d.each(D.get(),function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&function(t){return t.getParam("autosave_ask_before_unload",!0)}(t)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e&&(t.preventDefault(),t.returnValue=e)})}(t),function(t,e){c(t,e),t.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:function(){f(t)},onSetup:p(t)}),t.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:function(){f(t)},onSetup:p(t)})}(t,e),t.on("init",function(){(function(t){return t.getParam("autosave_restore_when_empty",!1)})(t)&&t.dom.isEmpty(t.getBody())&&s(t)}),function(t){return{hasDraft:y(i,t),storeDraft:y(u,t),restoreDraft:y(s,t),removeDraft:y(g,t),isEmpty:y(a,t)}}(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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
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);function o(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},i=function(t){t=e.trim(t);function o(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 n(){o.add("bbcode",function(o){o.on("BeforeSetContent",function(o){o.content=i(o.content)}),o.on("PostProcess",function(o){o.set&&(o.content=i(o.content)),o.get&&(o.content=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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(c){"use strict";function n(){}function i(n){return function(){return n}}function e(){return m}var r,t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(n,e){return n.fire("insertCustomChar",{chr:e})},u=function(n,e){var r=a(n,e).chr;n.execCommand("mceInsertContent",!1,r)},o=tinymce.util.Tools.resolve("tinymce.util.Tools"),s=function(n){return n.settings.charmap},l=function(n){return n.settings.charmap_append},f=i(!1),g=i(!0),m=(r={fold:function(n,e){return n()},is:f,isSome:f,isNone:g,getOr:p,getOrThunk:d,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(undefined),or:p,orThunk:d,map:e,each:n,bind:e,exists:f,forall:g,filter:e,equals:h,equals_:h,toArray:function(){return[]},toString:i("none()")},Object.freeze&&Object.freeze(r),r);function h(n){return n.isNone()}function d(n){return n()}function p(n){return n}function y(e){return function(n){return function(n){if(null===n)return"null";var e=typeof n;return"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}(n)===e}}function w(n,e){for(var r=n.length,t=new Array(r),a=0;a<r;a++){var i=n[a];t[a]=e(i,a)}return t}function b(n,e){return function(n){for(var e=[],r=0,t=n.length;r<t;++r){if(!O(n[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+n);S.apply(e,n[r])}return e}(w(n,e))}function v(n){return T(n)?[].concat(function(n){return o.grep(n,function(n){return T(n)&&2===n.length})}(n)):"function"==typeof n?n():[]}function k(n,e){return-1!==n.indexOf(e)}var C=function(r){function n(){return a}function e(n){return n(r)}var t=i(r),a={fold:function(n,e){return e(r)},is:function(n){return r===n},isSome:g,isNone:f,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(n){return C(n(r))},each:function(n){n(r)},bind:e,exists:e,forall:e,filter:function(n){return n(r)?a:m},toArray:function(){return[r]},toString:function(){return"some("+r+")"},equals:function(n){return n.is(r)},equals_:function(n,e){return n.fold(f,function(n){return e(r,n)})}};return a},A={some:C,none:e,from:function(n){return null===n||n===undefined?m:C(n)}},O=y("array"),x=y("function"),q=Array.prototype.slice,S=Array.prototype.push,T=(x(Array.from)&&Array.from,o.isArray),E="User Defined",z=function(n){var e=function(n,e){var r=s(n);r&&(e=[{name:E,characters:v(r)}]);var t=l(n);if(t){var a=o.grep(e,function(n){return n.name===E});return a.length?(a[0].characters=[].concat(a[0].characters).concat(v(t)),e):[].concat(e).concat({name:E,characters:v(t)})}return e}(n,[{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<e.length?[{name:"All",characters:b(e,function(n){return n.characters})}].concat(e):e},N=function(e){return{getCharMap:function(){return z(e)},insertChar:function(n){u(e,n)}}},U=function(n){function e(){return r}var r=n;return{get:e,set:function(n){r=n},clone:function(){return U(e())}}},D=function(n,e){var r=[],t=e.toLowerCase();return function(n,e){for(var r=0,t=n.length;r<t;r++){e(n[r],r)}}(n.characters,function(n){!function(n,e,r){return!!k(String.fromCharCode(n).toLowerCase(),r)||(k(e.toLowerCase(),r)||k(e.toLowerCase().replace(/\s+/g,""),r))}(n[0],n[1],t)||r.push(n)}),w(r,function(n){return{text:n[1],value:String.fromCharCode(n[0]),icon:String.fromCharCode(n[0])}})},I="pattern",P=function(r,n){function e(){return[{label:"Search",type:"input",name:I},{type:"collection",name:"results"}]}function t(r,t){(function(n,e){for(var r=0,t=n.length;r<t;r++){var a=n[r];if(e(a,r))return A.some(a)}return A.none()})(n,function(n){return n.name===a.get()}).each(function(n){var e=D(n,t);r.setData({results:e})})}var a=1===n.length?U(E):U("All"),i=function(r,t){var a=null;return{cancel:function(){null!==a&&(c.clearTimeout(a),a=null)},throttle:function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];null!==a&&c.clearTimeout(a),a=c.setTimeout(function(){r.apply(null,n),a=null},t)}}}(function(n){var e=n.getData().pattern;t(n,e)},40),o={title:"Special Character",size:"normal",body:1===n.length?{type:"panel",items:e()}:{type:"tabpanel",tabs:w(n,function(n){return{title:n.name,name:n.name,items:e()}})},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{pattern:"",results:D(n[0],"")},onAction:function(n,e){"results"===e.name&&(u(r,e.value),n.close())},onTabChange:function(n,e){a.set(e.newTabName),i.throttle(n)},onChange:function(n,e){e.name===I&&i.throttle(n)}};r.windowManager.open(o).focus(I)},j=function(n,e){n.addCommand("mceShowCharmap",function(){P(n,e)})},L=tinymce.util.Tools.resolve("tinymce.util.Promise"),M=function(n){n.ui.registry.addButton("charmap",{icon:"insert-character",tooltip:"Special character",onAction:function(){return n.execCommand("mceShowCharmap")}}),n.ui.registry.addMenuItem("charmap",{icon:"insert-character",text:"Special character...",onAction:function(){return n.execCommand("mceShowCharmap")}})};!function R(){t.add("charmap",function(n){var e=z(n);return j(n,e),M(n),function(t,a){t.ui.registry.addAutocompleter("charmap",{ch:":",columns:"auto",minChars:2,fetch:function(r,n){return new L(function(n,e){n(D(a,r))})},onAction:function(n,e,r){t.selection.setRng(e),t.insertContent(r),n.hide()}})}(n,e[0]),N(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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e,n){e.focus(),e.undoManager.transact(function(){e.setContent(n)}),e.selection.setCursorLocation(),e.nodeChanged()},o=function(e){return e.getContent({source_view:!0})},n=function(n){var e=o(n);n.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){t(n,e.getData().code),e.close()}})},c=function(e){e.addCommand("mceCodeEditor",function(){n(e)})},i=function(e){e.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:function(){return n(e)}}),e.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:function(){return n(e)}})};!function u(){e.add("code",function(e){return c(e),i(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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(e){"use strict";function n(){}function i(e){return function(){return e}}function t(){return l}var r,a=tinymce.util.Tools.resolve("tinymce.PluginManager"),s=i(!1),o=i(!0),l=(r={fold:function(e,n){return e()},is:s,isSome:s,isNone:o,getOr:p,getOrThunk:c,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(undefined),or:p,orThunk:c,map:t,each:n,bind:t,exists:s,forall:o,filter:t,equals:u,equals_:u,toArray:function(){return[]},toString:i("none()")},Object.freeze&&Object.freeze(r),r);function u(e){return e.isNone()}function c(e){return e()}function p(e){return e}var d=function(t){function e(){return a}function n(e){return e(t)}var r=i(t),a={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:o,isNone:s,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:e,orThunk:e,map:function(e){return d(e(t))},each:function(e){e(t)},bind:n,exists:n,forall:n,filter:function(e){return e(t)?a:l},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 a},g={some:d,none:t,from:function(e){return null===e||e===undefined?l:d(e)}},m=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils");var f={isCodeSample:function q(e){return e&&"PRE"===e.nodeName&&-1!==e.className.indexOf("language-")},trimArg:function I(t){return function(e,n){return t(n)}}},h="undefined"!=typeof e.window?e.window:Function("return this;")(),b={},y={exports:b},w={};!function(n,t,r,p){var e=window.Prism;window.Prism={manual:!0},function(e){if("object"==typeof t&&void 0!==r)r.exports=e();else if("function"==typeof n&&n.amd)n([],e);else{("undefined"!=typeof window?window:void 0!==w?w:"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 p&&p;if(!e&&t)return t(n,!0);if(u)return u(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var a=s[n]={exports:{}};i[n][0].call(a.exports,function(e){return l(i[n][1][e]||e)},a,a.exports,c,i,s,o)}return s[n].exports}for(var u="function"==typeof p&&p,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,E={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof O?new O(e.type,E.util.encode(e.content),e.alias):Array.isArray(e)?e.map(E.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 r,n,a=E.util.type(e);switch(t=t||{},a){case"Object":if(n=E.util.objId(e),t[n])return t[n];for(var i in r={},t[n]=r,e)e.hasOwnProperty(i)&&(r[i]=s(e[i],t));return r;case"Array":return n=E.util.objId(e),t[n]?t[n]:(r=[],t[n]=r,e.forEach(function(e,n){r[n]=s(e,t)}),r);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(r){var e=(/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(r.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=E.util.clone(E.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(t,e,n,r){var a=(r=r||E.languages)[t],i={};for(var s in a)if(a.hasOwnProperty(s)){if(s==e)for(var o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);n.hasOwnProperty(s)||(i[s]=a[s])}var l=r[t];return r[t]=i,E.languages.DFS(E.languages,function(e,n){n===l&&e!=t&&(this[e]=i)}),i},DFS:function l(e,n,t,r){r=r||{};var a=E.util.objId;for(var i in e)if(e.hasOwnProperty(i)){n.call(e,i,e[i],t||i);var s=e[i],o=E.util.type(s);"Object"!==o||r[a(s)]?"Array"!==o||r[a(s)]||(r[a(s)]=!0,l(s,n,i,r)):(r[a(s)]=!0,l(s,n,null,r))}}},plugins:{},highlightAll:function(e,n){E.highlightAllUnder(document,e,n)},highlightAllUnder:function(e,n,t){var r={callback:t,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};E.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),E.hooks.run("before-all-elements-highlight",r);for(var a,i=0;a=r.elements[i++];)E.highlightElement(a,!0===n,r.callback)},highlightElement:function(e,n,t){var r=E.util.getLanguage(e),a=E.languages[r];e.className=e.className.replace(c,"").replace(/\s+/g," ")+" language-"+r;var i=e.parentNode;i&&"pre"===i.nodeName.toLowerCase()&&(i.className=i.className.replace(c,"").replace(/\s+/g," ")+" language-"+r);var s={element:e,language:r,grammar:a,code:e.textContent};function o(e){s.highlightedCode=e,E.hooks.run("before-insert",s),s.element.innerHTML=s.highlightedCode,E.hooks.run("after-highlight",s),E.hooks.run("complete",s),t&&t.call(s.element)}if(E.hooks.run("before-sanity-check",s),!s.code)return E.hooks.run("complete",s),void(t&&t.call(s.element));if(E.hooks.run("before-highlight",s),s.grammar)if(n&&u.Worker){var l=new Worker(E.filename);l.onmessage=function(e){o(e.data)},l.postMessage(JSON.stringify({language:s.language,code:s.code,immediateClose:!0}))}else o(E.highlight(s.code,s.grammar,s.language));else o(E.util.encode(s.code))},highlight:function(e,n,t){var r={code:e,grammar:n,language:t};return E.hooks.run("before-tokenize",r),r.tokens=E.tokenize(r.code,r.grammar),E.hooks.run("after-tokenize",r),O.stringify(E.util.encode(r.tokens),r.language)},matchGrammar:function(e,n,t,r,a,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],p=c.inside,d=!!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=r,y=a;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,!(F=c.exec(e)))break;for(var v=F.index+(d&&F[1]?F[1].length:0),k=F.index+F[0].length,x=b,_=y,A=n.length;x<A&&(_<k||!n[x].type&&!n[x-1].greedy);++x)(_+=n[x].length)<=v&&(++b,y=_);if(n[b]instanceof O)continue;P=x-b,w=e.slice(y,_),F.index-=y}else{c.lastIndex=0;var F=c.exec(w),P=1}if(F){d&&(m=F[1]?F[1].length:0);k=(v=F.index+m)+(F=F[0].slice(m)).length;var S=w.slice(0,v),j=w.slice(k),$=[b,P];S&&(++b,y+=S.length,$.push(S));var C=new O(o,p?E.tokenize(F,p):F,f,F,g);if($.push(C),j&&$.push(j),Array.prototype.splice.apply(n,$),1!=P&&E.matchGrammar(e,n,t,b,y,!0,o+","+u),i)break}else if(i)break}}}}},tokenize:function(e,n){var t=[e],r=n.rest;if(r){for(var a in r)n[a]=r[a];delete n.rest}return E.matchGrammar(e,t,n,0,0,!1),t},hooks:{all:{},add:function(e,n){var t=E.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=E.hooks.all[e];if(t&&t.length)for(var r,a=0;r=t[a++];)r(n)}},Token:O};function O(e,n,t,r,a){this.type=e,this.content=n,this.alias=t,this.length=0|(r||"").length,this.greedy=!!a}if(u.Prism=E,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 r=Array.isArray(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(t.classes,r)}E.hooks.run("wrap",t);var a=Object.keys(t.attributes).map(function(e){return e+'="'+(t.attributes[e]||"").replace(/"/g,"&quot;")+'"'}).join(" ");return"<"+t.tag+' class="'+t.classes.join(" ")+'"'+(a?" "+a:"")+">"+t.content+"</"+t.tag+">"},!u.document)return u.addEventListener&&(E.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(E.highlight(r,E.languages[t],t)),a&&u.close()},!1)),E;var e=E.util.currentScript();if(e&&(E.filename=e.src,e.hasAttribute("data-manual")&&(E.manual=!0)),!E.manual){var t=function(){E.manual||E.highlightAll()},r=document.readyState;"loading"===r||"interactive"===r&&e&&e.defer?document.addEventListener("DOMContentLoaded",t):window.requestAnimationFrame?window.requestAnimationFrame(t):window.setTimeout(t,16)}return E}("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!==w?w:"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 r,a,i;r=Prism,a=/\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/,r.languages.java=r.languages.extend("clike",{"class-name":[i,/\b[A-Z]\w*(?=\s+\w+\s*[;,=())])/],keyword:a,"function":[r.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}}),r.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"}}),r.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:a,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(r,a,e,i){if(r.language===a){var s=r.tokenStack=[];r.code=r.code.replace(e,function(e){if("function"==typeof i&&!i(e))return e;for(var n,t=s.length;-1!==r.code.indexOf(n=b(a,t));)++t;return s[t]=e,n}),r.grammar=y.languages.markup}}},tokenizePlaceholders:{value:function(d,g){if(d.language===g&&d.tokenStack){d.grammar=y.languages[g];var m=0,f=Object.keys(d.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 r=f[m],a=d.tokenStack[r],i="string"==typeof t?t:t.content,s=b(g,r),o=i.indexOf(s);if(-1<o){++m;var l=i.substring(0,o),u=new y.Token(g,y.tokenize(a,d.grammar),"language-"+g,a),c=i.substring(o+s.length),p=[];l&&p.push.apply(p,h([l])),p.push(u),c&&p.push.apply(p,h([c])),"string"==typeof t?e.splice.apply(e,[n,1].concat(p)):t.content=p}}else t.content&&h(t.content)}return e}(d.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 r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:t}};r["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var a={};a[e]={pattern:RegExp(/(<__[\s\S]*?>)(?:<!\[CDATA\[[\s\S]*?\]\]>\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g,e),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",a)}}),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 r=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:r}},{"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 a=window.Prism;window.Prism=e}(undefined,b,y,undefined);function v(e){var n=e.selection?e.selection.getNode():null;return f.isCodeSample(n)?g.some(n):g.none()}var k,x=y.exports.boltExport,_=function(e){return e.getParam("codesample_languages")},A=function(e){return e.getParam("codesample_global_prismjs",!1,"boolean")},F=function(e){return h.Prism&&A(e)?h.Prism:x},P=v,S=function(n,t,r){n.undoManager.transact(function(){var e=v(n);return r=m.DOM.encode(r),e.fold(function(){n.insertContent('<pre id="__new" class="language-'+t+'">'+r+"</pre>"),n.selection.select(n.$("#__new").removeAttr("id")[0])},function(e){n.dom.setAttrib(e,"class","language-"+t),e.innerHTML=r,F(n).highlightElement(e),n.selection.select(e)})})},j=function(e){return v(e).fold(function(){return""},function(e){return e.textContent})},$=function(e){var n=_(e);return n||[{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"}]},C=function(e,t){return P(e).fold(function(){return t},function(e){var n=e.className.match(/language-(\w+)/);return n?n[1]:t})},E=(k="function",function(e){return function(e){if(null===e)return"null";var n=typeof e;return"object"==n&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":n}(e)===k}),O=Array.prototype.slice,z=(E(Array.from)&&Array.from,function(t){var e=$(t),n=function(e){return 0===e.length?g.none():g.some(e[0])}(e).fold(function(){return""},function(e){return e.value}),r=C(t,n),a=j(t);t.windowManager.open({title:"Insert/Edit Code Sample",size:"large",body:{type:"panel",items:[{type:"selectbox",name:"language",label:"Language",items:e},{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:a},onSubmit:function(e){var n=e.getData();S(t,n.language,n.code),e.close()}})}),N=function(n){n.addCommand("codesample",function(){var e=n.selection.getNode();n.selection.isCollapsed()||f.isCodeSample(e)?z(n):n.formatter.toggle("code")})},T=function(t){var a=t.$;t.on("PreProcess",function(e){a("pre[contenteditable=false]",e.node).filter(f.trimArg(f.isCodeSample)).each(function(e,n){var t=a(n),r=n.textContent;t.attr("class",a.trim(t.attr("class"))),t.removeAttr("contentEditable"),t.empty().append(a("<code></code>").each(function(){this.textContent=r}))})}),t.on("SetContent",function(){var e=a("pre").filter(f.trimArg(f.isCodeSample)).filter(function(e,n){return"false"!==n.contentEditable});e.length&&t.undoManager.transact(function(){e.each(function(e,n){a(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),F(t).highlightElement(n),n.className=a.trim(n.className)})})})},B=function(t){t.ui.registry.addToggleButton("codesample",{icon:"code-sample",tooltip:"Insert/edit code sample",onAction:function(){return z(t)},onSetup:function(e){function n(){e.setActive(function(e){var n=e.selection.getStart();return e.dom.is(n,'pre[class*="language-"]')}(t))}return t.on("NodeChange",n),function(){return t.off("NodeChange",n)}}}),t.ui.registry.addMenuItem("codesample",{text:"Code sample...",icon:"code-sample",onAction:function(){return z(t)}})};!function M(){a.add("codesample",function(n){T(n),B(n),N(n),n.on("dblclick",function(e){f.isCodeSample(e.target)&&z(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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(i){"use strict";function n(){}function u(n){return function(){return n}}function t(){return a}var e,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=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){n.addCommand("mceDirectionLTR",function(){o(n,"ltr")}),n.addCommand("mceDirectionRTL",function(){o(n,"rtl")})},f=u(!1),l=u(!0),a=(e={fold:function(n,t){return n()},is:f,isSome:f,isNone:l,getOr:s,getOrThunk:N,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(undefined),or:s,orThunk:N,map:t,each:n,bind:t,exists:f,forall:l,filter:t,equals:m,equals_:m,toArray:function(){return[]},toString:u("none()")},Object.freeze&&Object.freeze(e),e);function m(n){return n.isNone()}function N(n){return n()}function s(n){return n}function g(n,t){var e=n.dom(),r=i.window.getComputedStyle(e).getPropertyValue(t),o=""!==r||function(n){var t=A(n)?n.dom().parentNode:n.dom();return t!==undefined&&null!==t&&t.ownerDocument.body.contains(t)}(n)?r:w(e,t);return null===o?undefined:o}function T(t,r){return function(e){function n(n){var t=p.fromDom(n.element);e.setActive(function(n){return"rtl"===g(n,"direction")?"rtl":"ltr"}(t)===r)}return t.on("NodeChange",n),function(){return t.off("NodeChange",n)}}}var E,O,y=function(e){function n(){return o}function t(n){return n(e)}var r=u(e),o={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:l,isNone:f,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:n,orThunk:n,map:function(n){return y(n(e))},each:function(n){n(e)},bind:t,exists:t,forall:t,filter:function(n){return n(e)?o:a},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},D=function(n){return null===n||n===undefined?a:y(n)},h=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:u(n)}},p={fromHtml:function(n,t){var e=(t||i.document).createElement("div");if(e.innerHTML=n,!e.hasChildNodes()||1<e.childNodes.length)throw i.console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return h(e.childNodes[0])},fromTag:function(n,t){var e=(t||i.document).createElement(n);return h(e)},fromText:function(n,t){var e=(t||i.document).createTextNode(n);return h(e)},fromDom:h,fromPoint:function(n,t,e){var r=n.dom();return D(r.elementFromPoint(t,e)).map(h)}},_=(E="function",function(n){return function(n){if(null===n)return"null";var t=typeof n;return"object"==t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t}(n)===E}),v=Array.prototype.slice,C=(_(Array.from)&&Array.from,i.Node.ATTRIBUTE_NODE,i.Node.CDATA_SECTION_NODE,i.Node.COMMENT_NODE,i.Node.DOCUMENT_NODE,i.Node.DOCUMENT_TYPE_NODE,i.Node.DOCUMENT_FRAGMENT_NODE,i.Node.ELEMENT_NODE,i.Node.TEXT_NODE),A=(i.Node.PROCESSING_INSTRUCTION_NODE,i.Node.ENTITY_REFERENCE_NODE,i.Node.ENTITY_NODE,i.Node.NOTATION_NODE,"undefined"!=typeof i.window?i.window:Function("return this;")(),O=C,function(n){return function(n){return n.dom().nodeType}(n)===O}),w=function(n,t){return function(n){return n.style!==undefined&&_(n.style.getPropertyValue)}(n)?n.style.getPropertyValue(t):""},S=function(n){n.ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr",onAction:function(){return n.execCommand("mceDirectionLTR")},onSetup:T(n,"ltr")}),n.ui.registry.addToggleButton("rtl",{tooltip:"Right to left",icon:"rtl",onAction:function(){return n.execCommand("mceDirectionRTL")},onSetup:T(n,"rtl")})};!function R(){r.add("directionality",function(n){d(n),S(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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(l){"use strict";function n(){}function i(n){return function(){return n}}function t(){return a}var e,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=i(!1),u=i(!0),a=(e={fold:function(n,t){return n()},is:c,isSome:c,isNone:u,getOr:f,getOrThunk:s,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(undefined),or:f,orThunk:s,map:t,each:n,bind:t,exists:c,forall:u,filter:t,equals:o,equals_:o,toArray:function(){return[]},toString:i("none()")},Object.freeze&&Object.freeze(e),e);function o(n){return n.isNone()}function s(n){return n()}function f(n){return n}function m(n,t){return-1!==n.indexOf(t)}function g(n,t){return m(n.title.toLowerCase(),t)||function(n,t){for(var e=0,r=n.length;e<r;e++){if(t(n[e],e))return!0}return!1}(n.keywords,function(n){return m(n.toLowerCase(),t)})}function d(n,t,e){for(var r=[],o=t.toLowerCase(),i=e.fold(function(){return c},function(t){return function(n){return t<=n}}),u=0;u<n.length&&(0!==t.length&&!g(n[u],o)||(r.push({value:n[u]["char"],text:n[u].title,icon:n[u]["char"]}),!i(r.length)));u++);return r}function y(n,t){for(var e=D(n),r=0,o=e.length;r<o;r++){var i=e[r];t(n[i],i)}}function p(n,t){return function(n,t){return S.call(n,t)}(n,t)?n[t]:t}function v(n){return function(n,e){return x(n,function(n,t){return{k:t,v:e(n,t)}})}(z(n),function(n){return T({keywords:[],category:"user"},n)})}function h(e,o,n){var r=k(A.none()),u=k(A.none());e.on("init",function(){L.load(n,o).then(function(n){var t=v(e);!function(n){var o={},i=[];y(n,function(n,t){var e={title:t,keywords:n.keywords,"char":n["char"],category:p(M,n.category)},r=o[e.category]!==undefined?o[e.category]:[];o[e.category]=r.concat([e]),i.push(e)}),r.set(A.some(o)),u.set(A.some(i))}(P(n,t))},function(n){l.console.log("Failed to load emoticons: "+n),r.set(A.some({})),u.set(A.some([]))})});var i=function(){return u.get().getOr([])},c=function(){return r.get().isSome()&&u.get().isSome()};return{listCategories:function(){return[I].concat(D(r.get().getOr({})))},hasLoaded:c,waitForLoad:function(){return c()?E.resolve(!0):new E(function(n,t){var e=15,r=N.setInterval(function(){c()?(N.clearInterval(r),n(!0)):--e<0&&(l.console.log("Could not load emojis from url: "+o),N.clearInterval(r),t(!1))},100)})},listAll:i,listCategory:function(t){return t===I?i():r.get().bind(function(n){return A.from(n[t])}).getOr([])}}}var b,O,w=function(e){function n(){return o}function t(n){return n(e)}var r=i(e),o={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:u,isNone:c,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:n,orThunk:n,map:function(n){return w(n(e))},each:function(n){n(e)},bind:t,exists:t,forall:t,filter:function(n){return n(e)?o:a},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(c,function(n){return t(e,n)})}};return o},A={some:w,none:t,from:function(n){return null===n||n===undefined?a:w(n)}},j=(b="function",function(n){return function(n){if(null===n)return"null";var t=typeof n;return"object"==t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t}(n)===b}),C=Array.prototype.slice,k=(j(Array.from)&&Array.from,function(n){function t(){return e}var e=n;return{get:t,set:function(n){e=n},clone:function(){return k(t())}}}),T=function(){return(T=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}).apply(this,arguments)},_=Object.prototype.hasOwnProperty,P=(O=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={},r=0;r<n.length;r++){var o=n[r];for(var i in o)_.call(o,i)&&(e[i]=O(e[i],o[i]))}return e}),D=Object.keys,S=Object.hasOwnProperty,x=function(n,r){var o={};return y(n,function(n,t){var e=r(n,t);o[e.k]=e.v}),o},L=tinymce.util.Tools.resolve("tinymce.Resource"),N=tinymce.util.Tools.resolve("tinymce.util.Delay"),E=tinymce.util.Tools.resolve("tinymce.util.Promise"),F=function(n,t){return n.getParam("emoticons_database_url",t+"/js/emojis"+n.suffix+".js")},q=function(n){return n.getParam("emoticons_database_id","tinymce.plugins.emoticons","string")},z=function(n){return n.getParam("emoticons_append",{},"object")},I="All",M={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"},U="pattern",R=function(e,i){function n(){return{title:"Emoticons",size:"normal",body:{type:"tabpanel",tabs: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}(i.listCategories(),function(n){return{title:n,name:n,items:[o,c]}})},initialData:t,onTabChange:function(n,t){u.set(t.newTabName),r.throttle(n)},onChange:r.throttle,onAction:function(n,t){"results"===t.name&&(function(n,t){n.insertContent(t)}(e,t.value),n.close())},buttons:[{type:"cancel",text:"Close",primary:!0}]}}var t={pattern:"",results:d(i.listAll(),"",A.some(300))},u=k(I),r=function(e,r){var o=null;return{cancel:function(){null!==o&&(l.clearTimeout(o),o=null)},throttle:function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];null!==o&&l.clearTimeout(o),o=l.setTimeout(function(){e.apply(null,n),o=null},r)}}}(function(n){!function(n){var t=n.getData(),e=u.get(),r=i.listCategory(e),o=d(r,t[U],e===I?A.some(300):A.none());n.setData({results:o})}(n)},200),o={label:"Search",type:"input",name:U},c={type:"collection",name:"results"},a=e.windowManager.open(n());a.focus(U),i.hasLoaded()||(a.block("Loading emoticons..."),i.waitForLoad().then(function(){a.redial(n()),r.throttle(a),a.focus(U),a.unblock()})["catch"](function(n){a.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:[]}}),a.focus(U),a.unblock()}))},B=function(n,t){function e(){return R(n,t)}n.ui.registry.addButton("emoticons",{tooltip:"Emoticons",icon:"emoji",onAction:e}),n.ui.registry.addMenuItem("emoticons",{text:"Emoticons...",icon:"emoji",onAction:e})};!function G(){r.add("emoticons",function(n,t){var e=F(n,t),r=q(n),o=h(n,e,r);B(n,o),function(r,o){r.ui.registry.addAutocompleter("emoticons",{ch:":",columns:"auto",minChars:2,fetch:function(t,e){return o.waitForLoad().then(function(){var n=o.listAll();return d(n,t,A.some(e))})},onAction:function(n,t,e){r.selection.setRng(t),r.insertContent(e),n.hide()}})}(n,o)})}()}(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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(m){"use strict";function f(t){return n({validate:!1,root_name:"#document"}).parse(t,{format:"xhtml"})}function g(t){return t.replace(/<\/?[A-Z]+/g,function(t){return t.toLowerCase()})}var i=function(t){function e(){return n}var n=t;return{get:e,set:function(t){n=t},clone:function(){return i(e())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),e=function(){return(e=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var l in e=arguments[n])Object.prototype.hasOwnProperty.call(e,l)&&(t[l]=e[l]);return t}).apply(this,arguments)},p=tinymce.util.Tools.resolve("tinymce.util.Tools"),n=tinymce.util.Tools.resolve("tinymce.html.DomParser"),y=tinymce.util.Tools.resolve("tinymce.html.Node"),h=tinymce.util.Tools.resolve("tinymce.html.Serializer"),v=function(t){return t.getParam("fullpage_hide_in_source_view")},r=function(t){return t.getParam("fullpage_default_xml_pi")},o=function(t){return t.getParam("fullpage_default_encoding")},a=function(t){return t.getParam("fullpage_default_font_family")},c=function(t){return t.getParam("fullpage_default_font_size")},s=function(t){return t.getParam("fullpage_default_text_color")},u=function(t){return t.getParam("fullpage_default_title")},d=function(t){return t.getParam("fullpage_default_doctype","<!DOCTYPE html>")},_=f,b=function(t,e){var n,i,l=f(e),r={};function o(t,e){return t.attr(e)||""}return r.fontface=a(t),r.fontsize=c(t),7===(n=l.firstChild).type&&(r.xml_pi=!0,(i=/encoding="([^"]+)"/.exec(n.value))&&(r.docencoding=i[1])),(n=l.getAll("#doctype")[0])&&(r.doctype="<!DOCTYPE"+n.value+">"),(n=l.getAll("title")[0])&&n.firstChild&&(r.title=n.firstChild.value),p.each(l.getAll("meta"),function(t){var e,n=t.attr("name"),i=t.attr("http-equiv");n?r[n.toLowerCase()]=t.attr("content"):"Content-Type"===i&&(e=/charset\s*=\s*(.*)\s*/gi.exec(t.attr("content")))&&(r.docencoding=e[1])}),(n=l.getAll("html")[0])&&(r.langcode=o(n,"lang")||o(n,"xml:lang")),r.stylesheets=[],p.each(l.getAll("link"),function(t){"stylesheet"===t.attr("rel")&&r.stylesheets.push(t.attr("href"))}),(n=l.getAll("body")[0])&&(r.langdir=o(n,"dir"),r.style=o(n,"style"),r.visited_color=o(n,"vlink"),r.link_color=o(n,"link"),r.active_color=o(n,"alink")),r},x=function(t,r,e){var o,n,i,a,l,c=t.dom;function s(t,e,n){t.attr(e,n||undefined)}function u(t){n.firstChild?n.insert(t,n.firstChild):n.append(t)}o=f(e),(n=o.getAll("head")[0])||(a=o.getAll("html")[0],n=new y("head",1),a.firstChild?a.insert(n,a.firstChild,!0):a.append(n)),a=o.firstChild,r.xml_pi?(l='version="1.0"',r.docencoding&&(l+=' encoding="'+r.docencoding+'"'),7!==a.type&&(a=new y("xml",7),o.insert(a,o.firstChild,!0)),a.value=l):a&&7===a.type&&a.remove(),a=o.getAll("#doctype")[0],r.doctype?(a||(a=new y("#doctype",10),r.xml_pi?o.insert(a,o.firstChild):u(a)),a.value=r.doctype.substring(9,r.doctype.length-1)):a&&a.remove(),a=null,p.each(o.getAll("meta"),function(t){"Content-Type"===t.attr("http-equiv")&&(a=t)}),r.docencoding?(a||((a=new y("meta",1)).attr("http-equiv","Content-Type"),a.shortEnded=!0,u(a)),a.attr("content","text/html; charset="+r.docencoding)):a&&a.remove(),a=o.getAll("title")[0],r.title?(a?a.empty():u(a=new y("title",1)),a.append(new y("#text",3)).value=r.title):a&&a.remove(),p.each("keywords,description,author,copyright,robots".split(","),function(t){var e,n,i=o.getAll("meta"),l=r[t];for(e=0;e<i.length;e++)if((n=i[e]).attr("name")===t)return void(l?n.attr("content",l):n.remove());l&&((a=new y("meta",1)).attr("name",t),a.attr("content",l),a.shortEnded=!0,u(a))});var d={};return p.each(o.getAll("link"),function(t){"stylesheet"===t.attr("rel")&&(d[t.attr("href")]=t)}),p.each(r.stylesheets,function(t){d[t]||((a=new y("link",1)).attr({rel:"stylesheet",text:"text/css",href:t}),a.shortEnded=!0,u(a)),delete d[t]}),p.each(d,function(t){t.remove()}),(a=o.getAll("body")[0])&&(s(a,"dir",r.langdir),s(a,"style",r.style),s(a,"vlink",r.visited_color),s(a,"link",r.link_color),s(a,"alink",r.active_color),c.setAttribs(t.getBody(),{style:r.style,dir:r.dir,vLink:r.visited_color,link:r.link_color,aLink:r.active_color})),(a=o.getAll("html")[0])&&(s(a,"lang",r.langcode),s(a,"xml:lang",r.langcode)),n.firstChild||n.remove(),(i=h({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(o)).substring(0,i.indexOf("</body>"))},l=function(i,l){var r=b(i,l.get()),t=e(e({},{title:"",keywords:"",description:"",robots:"",author:"",docencoding:""}),r);i.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:t,onSubmit:function(t){var e=t.getData(),n=x(i,p.extend(r,e),l.get());l.set(n),t.close()}})},k=function(t,e){t.addCommand("mceFullPageProperties",function(){l(t,e)})},C=function(t,e){return p.each(t,function(t){e=e.replace(t,function(t){return"\x3c!--mce:protected "+escape(t)+"--\x3e"})}),e},A=function(t){return t.replace(/<!--mce:protected ([\s\S]*?)-->/g,function(t,e){return unescape(e)})},w=p.each,P=function(t){var e,n="",i="";if(r(t)){var l=o(t);n+='<?xml version="1.0" encoding="'+(l||"ISO-8859-1")+'" ?>\n'}return n+=d(t),n+="\n<html>\n<head>\n",(e=u(t))&&(n+="<title>"+e+"</title>\n"),(e=o(t))&&(n+='<meta http-equiv="Content-Type" content="text/html; charset='+e+'" />\n'),(e=a(t))&&(i+="font-family: "+e+";"),(e=c(t))&&(i+="font-size: "+e+";"),(e=s(t))&&(i+="color: "+e+";"),n+="</head>\n<body"+(i?' style="'+i+'"':"")+">\n"},T=function(e,n,i){e.on("BeforeSetContent",function(t){!function(t,e,n,i){var l,r,o,a,c="",s=t.dom;if(!(i.selection||(o=C(t.settings.protect,i.content),"raw"===i.format&&e.get()||i.source_view&&v(t)))){0!==o.length||i.source_view||(o=p.trim(e.get())+"\n"+p.trim(o)+"\n"+p.trim(n.get())),-1!==(l=(o=o.replace(/<(\/?)BODY/gi,"<$1body")).indexOf("<body"))?(l=o.indexOf(">",l),e.set(g(o.substring(0,l+1))),-1===(r=o.indexOf("</body",l))&&(r=o.length),i.content=p.trim(o.substring(l+1,r)),n.set(g(o.substring(r)))):(e.set(P(t)),n.set("\n</body>\n</html>")),a=_(e.get()),w(a.getAll("style"),function(t){t.firstChild&&(c+=t.firstChild.value)});var u=a.getAll("body")[0];u&&s.setAttribs(t.getBody(),{style:u.attr("style")||"",dir:u.attr("dir")||"",vLink:u.attr("vlink")||"",link:u.attr("link")||"",aLink:u.attr("alink")||""}),s.remove("fullpage_styles");var d=t.getDoc().getElementsByTagName("head")[0];if(c)s.add(d,"style",{id:"fullpage_styles"}).appendChild(m.document.createTextNode(c));var f={};p.each(d.getElementsByTagName("link"),function(t){"stylesheet"===t.rel&&t.getAttribute("data-mce-fullpage")&&(f[t.href]=t)}),p.each(a.getAll("link"),function(t){var e=t.attr("href");if(!e)return!0;f[e]||"stylesheet"!==t.attr("rel")||s.add(d,"link",{rel:"stylesheet",text:"text/css",href:e,"data-mce-fullpage":"1"}),delete f[e]}),p.each(f,function(t){t.parentNode.removeChild(t)})}}(e,n,i,t)}),e.on("GetContent",function(t){!function(t,e,n,i){i.selection||i.source_view&&v(t)||(i.content=A(p.trim(e)+"\n"+p.trim(i.content)+"\n"+p.trim(n)))}(e,n.get(),i.get(),t)})},O=function(t){t.ui.registry.addButton("fullpage",{tooltip:"Metadata and document properties",icon:"document-properties",onAction:function(){t.execCommand("mceFullPageProperties")}}),t.ui.registry.addMenuItem("fullpage",{text:"Metadata and document properties",icon:"document-properties",onAction:function(){t.execCommand("mceFullPageProperties")}})};!function D(){t.add("fullpage",function(t){var e=i(""),n=i("");k(t,e),O(t),T(t,e,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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(d){"use strict";function t(){}function m(n){return function(){return n}}function n(){return f}var e,u=function(n){function e(){return r}var r=n;return{get:e,set:function(n){r=n},clone:function(){return u(e())}}},r=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(n){return{isFullscreen:function(){return null!==n.get()}}},c=m(!1),i=m(!0),f=(e={fold:function(n,e){return n()},is:c,isSome:c,isNone:i,getOr:l,getOrThunk:a,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:m(null),getOrUndefined:m(undefined),or:l,orThunk:a,map:n,each:t,bind:n,exists:c,forall:i,filter:n,equals:s,equals_:s,toArray:function(){return[]},toString:m("none()")},Object.freeze&&Object.freeze(e),e);function s(n){return n.isNone()}function a(n){return n()}function l(n){return n}function h(){return function(n){function e(){r.get().each(n)}var r=u(Y.none());return{clear:function(){e(),r.set(Y.none())},isSet:function(){return r.get().isSome()},set:function(n){e(),r.set(Y.some(n))}}}(function(n){n.unbind()})}function v(e){return function(n){return function(n){if(null===n)return"null";var e=typeof n;return"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}(n)===e}}function g(n,e){for(var r=n.length,t=new Array(r),o=0;o<r;o++){var i=n[o];t[o]=e(i,o)}return t}function p(n,e){for(var r=0,t=n.length;r<t;r++){e(n[r],r)}}function w(n,e){for(var r=[],t=0,o=n.length;t<o;t++){var i=n[t];e(i,t)&&r.push(i)}return r}function y(n,e){return function(n){for(var e=[],r=0,t=n.length;r<t;++r){if(!$(n[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+n);nn.apply(e,n[r])}return e}(g(n,e))}function S(n,e){return-1!==n.indexOf(e)}function O(n){return n.style!==undefined&&J(n.style.getPropertyValue)}function E(n,e,r){!function(n,e,r){if(!(G(r)||K(r)||Q(r)))throw d.console.error("Invalid call to Attr.set. Key ",e,":: Value ",r,":: Element ",n),new Error("Attribute value was not simple");n.setAttribute(e,r+"")}(n.dom(),e,r)}function N(n,e){var r=n.dom().getAttribute(e);return null===r?undefined:r}function T(n,e){n.dom().removeAttribute(e)}function x(n,e){var r=n.dom();!function(n,e){for(var r=en(n),t=0,o=r.length;t<o;t++){var i=r[t];e(n[i],i)}}(e,function(n,e){!function(n,e,r){if(!G(r))throw d.console.error("Invalid call to CSS.set. Property ",e,":: Value ",r,":: Element ",n),new Error("CSS value must be a string: "+r);O(n)&&n.style.setProperty(e,r)}(r,e,n)})}function b(n,e){var r=n.dom(),t=d.window.getComputedStyle(r).getPropertyValue(e),o=""!==t||function(n){var e=fn(n)?n.dom().parentNode:n.dom();return e!==undefined&&null!==e&&e.ownerDocument.body.contains(e)}(n)?t:sn(r,e);return null===o?undefined:o}function C(n){function e(){n.stopPropagation()}function r(){n.preventDefault()}var t=tn.fromDom(n.target),o=function(r,t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return r(t.apply(null,n))}}(r,e);return function(n,e,r,t,o,i,u){return{target:m(n),x:m(e),y:m(r),stop:t,prevent:o,kill:i,raw:m(u)}}(t,n.clientX,n.clientY,e,r,o,n)}function D(n,e){var r=function(n,e){for(var r=0;r<n.length;r++){var t=n[r];if(t.test(e))return t}return undefined}(n,e);if(!r)return{major:0,minor:0};function t(n){return Number(e.replace(r,"$"+n))}return ln(t(1),t(2))}function A(n,e){return function(){return e===n}}function M(n,e){return function(){return e===n}}function _(n,e){var r=String(e).toLowerCase();return function(n,e){for(var r=0,t=n.length;r<t;r++){var o=n[r];if(e(o,r))return Y.some(o)}return Y.none()}(n,function(n){return n.search(r)})}function k(e){return function(n){return S(n,e)}}function F(){return An.get()}function R(n,e,r){return 0!=(n.compareDocumentPosition(e)&r)}function P(n,e){var r=n.dom();if(r.nodeType!==_n)return!1;var t=r;if(t.matches!==undefined)return t.matches(e);if(t.msMatchesSelector!==undefined)return t.msMatchesSelector(e);if(t.webkitMatchesSelector!==undefined)return t.webkitMatchesSelector(e);if(t.mozMatchesSelector!==undefined)return t.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")}function I(n,e){var r=e===undefined?d.document:e.dom();return function(n){return n.nodeType!==_n&&n.nodeType!==kn||0===n.childElementCount}(r)?[]:g(r.querySelectorAll(n),tn.fromDom)}function L(e){return function(n){return Y.from(n.dom().parentNode).map(tn.fromDom)}(e).map(Fn).map(function(n){return w(n,function(n){return!function(n,e){return n.dom()===e.dom()}(e,n)})}).getOr([])}function H(n){var e=n===undefined?d.window:n;return Y.from(e.visualViewport)}function U(n,e,r,t){return{x:m(n),y:m(e),width:m(r),height:m(t),right:m(n+r),bottom:m(e+t)}}function W(n){var t=n===undefined?d.window:n,e=t.document,o=function(n){var e=n!==undefined?n.dom():d.document,r=e.body.scrollLeft||e.documentElement.scrollLeft,t=e.body.scrollTop||e.documentElement.scrollTop;return Pn(r,t)}(tn.fromDom(e));return H(t).fold(function(){var n=t.document.documentElement,e=n.clientWidth,r=n.clientHeight;return U(o.left(),o.top(),e,r)},function(n){return U(Math.max(n.pageLeft,o.left()),Math.max(n.pageTop,o.top()),n.width,n.height)})}function B(r,n,e){return H(e).map(function(n){function e(n){return C(n)}return n.addEventListener(r,e),{unbind:function(){return n.removeEventListener(r,e)}}}).getOrThunk(function(){return{unbind:t}})}function j(n,e,r){return w(function(n,e){for(var r=J(e)?e:c,t=n.dom(),o=[];null!==t.parentNode&&t.parentNode!==undefined;){var i=t.parentNode,u=tn.fromDom(i);if(o.push(u),!0===r(u))break;t=i}return o}(n,r),e)}function V(n,e){return function(n,e){return w(L(n),e)}(n,function(n){return P(n,e)})}function q(r,t){return function(e){e.setActive(null!==t.get());function n(n){return e.setActive(n.state)}return r.on("FullscreenStateChanged",n),function(){return r.off("FullscreenStateChanged",n)}}}var X,z=function(r){function n(){return o}function e(n){return n(r)}var t=m(r),o={fold:function(n,e){return e(r)},is:function(n){return r===n},isSome:i,isNone:c,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(n){return z(n(r))},each:function(n){n(r)},bind:e,exists:e,forall:e,filter:function(n){return n(r)?o:f},toArray:function(){return[r]},toString:function(){return"some("+r+")"},equals:function(n){return n.is(r)},equals_:function(n,e){return n.fold(c,function(n){return e(r,n)})}};return o},Y={some:z,none:n,from:function(n){return null===n||n===undefined?f:z(n)}},G=v("string"),$=v("array"),K=v("boolean"),J=v("function"),Q=v("number"),Z=Array.prototype.slice,nn=Array.prototype.push,en=(J(Array.from)&&Array.from,Object.keys),rn=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:m(n)}},tn={fromHtml:function(n,e){var r=(e||d.document).createElement("div");if(r.innerHTML=n,!r.hasChildNodes()||1<r.childNodes.length)throw d.console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return rn(r.childNodes[0])},fromTag:function(n,e){var r=(e||d.document).createElement(n);return rn(r)},fromText:function(n,e){var r=(e||d.document).createTextNode(n);return rn(r)},fromDom:rn,fromPoint:function(n,e,r){var t=n.dom();return Y.from(t.elementFromPoint(e,r)).map(rn)}},on=(d.Node.ATTRIBUTE_NODE,d.Node.CDATA_SECTION_NODE,d.Node.COMMENT_NODE,d.Node.DOCUMENT_NODE),un=(d.Node.DOCUMENT_TYPE_NODE,d.Node.DOCUMENT_FRAGMENT_NODE,d.Node.ELEMENT_NODE),cn=d.Node.TEXT_NODE,fn=(d.Node.PROCESSING_INSTRUCTION_NODE,d.Node.ENTITY_REFERENCE_NODE,d.Node.ENTITY_NODE,d.Node.NOTATION_NODE,"undefined"!=typeof d.window?d.window:Function("return this;")(),X=cn,function(n){return function(n){return n.dom().nodeType}(n)===X}),sn=function(n,e){return O(n)?n.style.getPropertyValue(e):""},an=function(){return ln(0,0)},ln=function(n,e){return{major:n,minor:e}},dn={nu:ln,detect:function(n,e){var r=String(e).toLowerCase();return 0===n.length?an():D(n,r)},unknown:an},mn="Firefox",hn=function(n){var e=n.current;return{current:e,version:n.version,isEdge:A("Edge",e),isChrome:A("Chrome",e),isIE:A("IE",e),isOpera:A("Opera",e),isFirefox:A(mn,e),isSafari:A("Safari",e)}},vn={unknown:function(){return hn({current:undefined,version:dn.unknown()})},nu:hn,edge:m("Edge"),chrome:m("Chrome"),ie:m("IE"),opera:m("Opera"),firefox:m(mn),safari:m("Safari")},gn="Windows",pn="Android",wn="Solaris",yn="FreeBSD",Sn="ChromeOS",On=function(n){var e=n.current;return{current:e,version:n.version,isWindows:M(gn,e),isiOS:M("iOS",e),isAndroid:M(pn,e),isOSX:M("OSX",e),isLinux:M("Linux",e),isSolaris:M(wn,e),isFreeBSD:M(yn,e),isChromeOS:M(Sn,e)}},En={unknown:function(){return On({current:undefined,version:dn.unknown()})},nu:On,windows:m(gn),ios:m("iOS"),android:m(pn),linux:m("Linux"),osx:m("OSX"),solaris:m(wn),freebsd:m(yn),chromeos:m(Sn)},Nn=function(n,r){return _(n,r).map(function(n){var e=dn.detect(n.versionRegexes,r);return{current:n.name,version:e}})},Tn=function(n,r){return _(n,r).map(function(n){var e=dn.detect(n.versionRegexes,r);return{current:n.name,version:e}})},xn=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,bn=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(n){return S(n,"edge/")&&S(n,"chrome")&&S(n,"safari")&&S(n,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,xn],search:function(n){return S(n,"chrome")&&!S(n,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(n){return S(n,"msie")||S(n,"trident")}},{name:"Opera",versionRegexes:[xn,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:k("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:k("firefox")},{name:"Safari",versionRegexes:[xn,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(n){return(S(n,"safari")||S(n,"mobile/"))&&S(n,"applewebkit")}}],Cn=[{name:"Windows",search:k("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(n){return S(n,"iphone")||S(n,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:k("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:k("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:k("linux"),versionRegexes:[]},{name:"Solaris",search:k("sunos"),versionRegexes:[]},{name:"FreeBSD",search:k("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:k("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Dn={browsers:m(bn),oses:m(Cn)},An=u(function(n,e){var r=Dn.browsers(),t=Dn.oses(),o=Nn(r,n).fold(vn.unknown,vn.nu),i=Tn(t,n).fold(En.unknown,En.nu);return{browser:o,os:i,deviceType:function(n,e,r,t){var o=n.isiOS()&&!0===/ipad/i.test(r),i=n.isiOS()&&!o,u=n.isiOS()||n.isAndroid(),c=u||t("(pointer:coarse)"),f=o||!i&&u&&t("(min-device-width:768px)"),s=i||u&&!f,a=e.isSafari()&&n.isiOS()&&!1===/safari/i.test(r),l=!s&&!f&&!a;return{isiPad:m(o),isiPhone:m(i),isTablet:m(f),isPhone:m(s),isTouch:m(c),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:m(a),isDesktop:m(l)}}(i,o,n,e)}}(d.navigator.userAgent,function(n){return d.window.matchMedia(n).matches})),Mn=function(n,e){return R(n,e,d.Node.DOCUMENT_POSITION_CONTAINED_BY)},_n=un,kn=on,Fn=(F().browser.isIE(),function(n){return g(n.dom().childNodes,tn.fromDom)}),Rn=(function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e]}("element","offset"),function(r,t){return{left:m(r),top:m(t),translate:function(n,e){return Rn(r+n,t+e)}}}),Pn=Rn,In=(F().browser.isSafari(),tinymce.util.Tools.resolve("tinymce.dom.DOMUtils")),Ln=tinymce.util.Tools.resolve("tinymce.Env"),Hn=tinymce.util.Tools.resolve("tinymce.util.Delay"),Un=function(n,e){n.fire("FullscreenStateChanged",{state:e})},Wn="data-ephox-mobile-fullscreen-style",Bn="position:absolute!important;",jn="top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;",Vn=Ln.os.isAndroid(),qn=function(o,n,e){function r(t){return function(n){var e=N(n,"style"),r=e===undefined?"no-styles":e.trim();r!==t&&(E(n,Wn,r),x(n,o.parseStyle(t)))}}var t=function(n,e,r){return j(n,function(n){return P(n,e)},r)}(n,"*"),i=y(t,function(n){return V(n,"*:not(.tox-silver-sink)")}),u=function(n){var e=b(n,"background-color");return e!==undefined&&""!==e?"background-color:"+e+"!important":"background-color:rgb(255,255,255)!important;"}(e);p(i,r("display:none!important;")),p(t,r(Bn+jn+u)),r((!0===Vn?"":Bn)+jn+u)(n)},Xn=function(r){var n=function(n){return I(n)}("["+Wn+"]");p(n,function(n){var e=N(n,Wn);"no-styles"!==e?x(n,r.parseStyle(e)):T(n,"style"),T(n,Wn)})},zn=In.DOM,Yn=H().fold(function(){return{bind:t,unbind:t}},function(e){var r=function(){var e=u(Y.none());return{clear:function(){e.set(Y.none())},set:function(n){e.set(Y.some(n))},isSet:function(){return e.get().isSome()},on:function(n){e.get().each(n)}}}(),t=h(),o=h(),i=Hn.throttle(function(){d.document.body.scrollTop=0,d.document.documentElement.scrollTop=0,d.window.requestAnimationFrame(function(){r.on(function(n){return x(n,{top:e.offsetTop+"px",left:e.offsetLeft+"px",height:e.height+"px",width:e.width+"px"})})})},50);return{bind:function(n){r.set(n),i(),t.set(B("resize")),o.set(B("scroll"))},unbind:function(){r.on(function(){t.clear(),o.clear()}),r.clear()}}}),Gn=function(n,e){var r,t,o,i=d.document.body,u=d.document.documentElement;t=n.getContainer();var c=tn.fromDom(t),f=e.get(),s=tn.fromDom(n.getBody()),a=Ln.deviceType.isTouch();if(r=t.style,o=n.getContentAreaContainer().firstChild.style,f)o.width=f.iframeWidth,o.height=f.iframeHeight,r.width=f.containerWidth,r.height=f.containerHeight,r.top=f.containerTop,r.left=f.containerLeft,a&&Xn(n.dom),zn.removeClass(i,"tox-fullscreen"),zn.removeClass(u,"tox-fullscreen"),zn.removeClass(t,"tox-fullscreen"),function(n){d.window.scrollTo(n.x,n.y)}(f.scrollPos),e.set(null),Un(n,!1),Yn.unbind(),n.off("remove",Yn.unbind);else{var l={scrollPos:function(){var n=W(d.window);return{x:n.x(),y:n.y()}}(),containerWidth:r.width,containerHeight:r.height,containerTop:r.top,containerLeft:r.left,iframeWidth:o.width,iframeHeight:o.height};a&&qn(n.dom,c,s),o.width=o.height="100%",r.width=r.height="",zn.addClass(i,"tox-fullscreen"),zn.addClass(u,"tox-fullscreen"),zn.addClass(t,"tox-fullscreen"),Yn.bind(c),n.on("remove",Yn.unbind),e.set(l),Un(n,!0)}},$n=function(n,e){n.addCommand("mceFullScreen",function(){Gn(n,e)})},Kn=function(n,e){n.ui.registry.addToggleMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Meta+Shift+F",onAction:function(){return n.execCommand("mceFullScreen")},onSetup:q(n,e)}),n.ui.registry.addToggleButton("fullscreen",{tooltip:"Fullscreen",icon:"fullscreen",onAction:function(){return n.execCommand("mceFullScreen")},onSetup:q(n,e)})};!function Jn(){r.add("fullscreen",function(n){var e=u(null);return n.settings.inline||($n(n,e),Kn(n,e),n.addShortcut("Meta+Shift+F","","mceFullScreen")),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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(){"use strict";function e(){}function r(e){return function(){return e}}var a=function(e){function t(){return n}var n=e;return{get:t,set:function(e){n=e},clone:function(){return a(t())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(e,t){e.addCommand("mceHelp",t)},s=function(e,t){e.ui.registry.addButton("help",{icon:"help",tooltip:"Help",onAction:t}),e.ui.registry.addMenuItem("help",{text:"Help",icon:"help",shortcut:"Alt+0",onAction:t})},c=function(){return(c=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function l(o){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 o.apply(null,n)}}function n(){return m}var o,u=r(!1),h=r(!0),m=(o={fold:function(e,t){return e()},is:u,isSome:u,isNone:h,getOr:f,getOrThunk:d,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:r(null),getOrUndefined:r(undefined),or:f,orThunk:d,map:n,each:e,bind:n,exists:u,forall:h,filter:n,equals:p,equals_:p,toArray:function(){return[]},toString:r("none()")},Object.freeze&&Object.freeze(o),o);function p(e){return e.isNone()}function d(e){return e()}function f(e){return e}function g(e,t){return O.call(e,t)}function b(e,t){return-1<g(e,t)}function y(e,t){for(var n=e.length,o=new Array(n),a=0;a<n;a++){var r=e[a];o[a]=t(r,a)}return o}function k(e,o){return e.replace(/\$\{([^{}]*)\}/g,function(e,t){var n=o[t];return function(e){var t=typeof e;return"string"==t||"number"==t}(n)?n.toString():e})}function v(e){var t=F(e);return function(e,t){var n=g(e,t);return-1===n?x.none():x.some(n)}(t,"versions").each(function(e){t.splice(e,1),t.push("versions")}),{tabs:e,names:t}}function w(e,t){var n,o=H(),a=B(),r=D(e),i=L(),s=c(((n={})[o.name]=o,n[a.name]=a,n[r.name]=r,n[i.name]=i,n),t.get());return function(e){return x.from(e.getParam("help_tabs"))}(e).fold(function(){return v(s)},function(e){return function(e,t){var n={},o=y(e,function(e){return"string"==typeof e?(_(t,e)&&(n[e]=t[e]),e):(n[e.name]=e).name});return{tabs:n,names:o}}(e,s)})}function A(a,r){return function(){var e=w(a,r),t=e.tabs,n=e.names,o={type:"tabpanel",tabs:function(e){for(var t=[],n=function(e){t.push(e)},o=0;o<e.length;o++)e[o].each(n);return t}(y(n,function(e){return function(e,t){return _(e,t)?x.from(e[t]):x.none()}(t,e)}))};a.windowManager.open({title:"Help",size:"medium",body:o,buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{}})}}var C,T=function(n){function e(){return a}function t(e){return e(n)}var o=r(n),a={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:h,isNone:u,getOr:o,getOrThunk:o,getOrDie:o,getOrNull:o,getOrUndefined:o,or:e,orThunk:e,map:function(e){return T(e(n))},each:function(e){e(n)},bind:t,exists:t,forall:t,filter:function(e){return e(n)?a:m},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},x={some:T,none:n,from:function(e){return null===e||e===undefined?m:T(e)}},P=(C="function",function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"==t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t}(e)===C}),M=Array.prototype.slice,O=Array.prototype.indexOf,F=(P(Array.from)&&Array.from,Object.keys),S=Object.hasOwnProperty,_=function(e,t){return S.call(e,t)},E=[{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"}],I=tinymce.util.Tools.resolve("tinymce.Env"),j=function(e){var n=I.mac?{alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"}:{meta:"Ctrl ",access:"Shift + Alt "},t=e.split("+"),o=y(t,function(e){var t=e.toLowerCase().trim();return _(n,t)?n[t]:e});return I.mac?o.join("").replace(/\s/,""):o.join("+")},H=function(){return{name:"shortcuts",title:"Handy Shortcuts",items:[{type:"table",header:["Action","Shortcut"],cells:y(E,function(e){var t=y(e.shortcuts,j).join(" or ");return[e.action,t]})}]}},U=tinymce.util.Tools.resolve("tinymce.util.I18n"),W=[{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*"}],D=function(e){function r(t,n){return function(e,t){for(var n=0,o=e.length;n<o;n++){var a=e[n];if(t(a,n))return x.some(a)}return x.none()}(W,function(e){return e.key===n}).fold(function(){var e=t.plugins[n].getMetadata;return"function"==typeof e?o(e()):n},function(e){return o({name:e.name,url:"https://www.tiny.cloud/docs/plugins/"+e.key})})}var t,n,o=l(k,'<a href="${url}" target="_blank" rel="noopener">${name}</a>');return{name:"plugins",title:"Plugins",items:[{type:"htmlpanel",presets:"document",html:[(n=e,null==n?"":'<div data-mce-tabstop="1" tabindex="-1">'+function(t){var e=function(e){var t=F(e.plugins);return e.settings.forced_plugins===undefined?t:function(e,t){for(var n=[],o=0,a=e.length;o<a;o++){var r=e[o];t(r,o)&&n.push(r)}return n}(t,function(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return!n.apply(null,e)}}(l(b,e.settings.forced_plugins)))}(t),n=y(e,function(e){return"<li>"+r(t,e)+"</li>"}),o=n.length,a=n.join("");return"<p><b>"+U.translate(["Plugins installed ({0}):",o])+"</b></p><ul>"+a+"</ul>"}(n)+"</div>"),(t=y(["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>"+U.translate(e)+"</li>"}).join(""),'<div data-mce-tabstop="1" tabindex="-1"><p><b>'+U.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">'+U.translate("Learn more...")+"</a></li></ul></div>")].join("")}]}},N=tinymce.util.Tools.resolve("tinymce.EditorManager"),L=function(){var e,t,n='<a href="https://www.tinymce.com/docs/changelog/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">TinyMCE '+(e=N.majorVersion,t=N.minorVersion,0===e.indexOf("@")?"X.X.X":e+"."+t)+"</a>";return{name:"versions",title:"Version",items:[{type:"htmlpanel",html:"<p>"+U.translate(["You are using {0}",n])+"</p>",presets:"document"}]}},B=function(){return{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>"}]}};!function z(){t.add("help",function(e){var t=a({}),n=function(n){return{addTab:function(e){var t=n.get();t[e.name]=e,n.set(t)}}}(t),o=A(e,t);return s(e,o),i(e,o),e.shortcuts.add("Alt+0","Open help dialog","mceHelp"),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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(n){n.addCommand("InsertHorizontalRule",function(){n.execCommand("mceInsertContent",!1,"<hr />")})},t=function(n){n.ui.registry.addButton("hr",{icon:"horizontal-rule",tooltip:"Horizontal line",onAction:function(){return n.execCommand("InsertHorizontalRule")}}),n.ui.registry.addMenuItem("hr",{icon:"horizontal-rule",text:"Horizontal line",onAction:function(){return n.execCommand("InsertHorizontalRule")}})};!function e(){n.add("hr",function(n){o(n),t(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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(s){"use strict";function o(){}function a(t){return function(){return t}}function t(t){return t}function e(){return l}var n,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=a(!1),c=a(!0),l=(n={fold:function(t,e){return t()},is:u,isSome:u,isNone:c,getOr:d,getOrThunk:f,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:a(null),getOrUndefined:a(undefined),or:d,orThunk:f,map:e,each:o,bind:e,exists:u,forall:c,filter:e,equals:i,equals_:i,toArray:function(){return[]},toString:a("none()")},Object.freeze&&Object.freeze(n),n);function i(t){return t.isNone()}function f(t){return t()}function d(t){return t}function m(e){return function(t){return function(t){if(null===t)return"null";var e=typeof t;return"object"==e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e}(t)===e}}function T(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!D(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);U.apply(e,t[n])}return e}var p,g,h,v,b=function(n){function t(){return i}function e(t){return t(n)}var r=a(n),i={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:c,isNone:u,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:t,orThunk:t,map:function(t){return b(t(n))},each:function(t){t(n)},bind:e,exists:e,forall:e,filter:function(t){return t(n)?i:l},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(u,function(t){return e(n,t)})}};return i},w={some:b,none:e,from:function(t){return null===t||t===undefined?l:b(t)}},_=m("string"),y=m("object"),D=m("array"),A=m("boolean"),E=m("function"),N=m("number"),O=Array.prototype.slice,U=Array.prototype.push,I=(E(Array.from)&&Array.from,function(){return(I=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)}),x={},C={exports:x};p=undefined,g=x,h=C,v=undefined,function(t){"object"==typeof g&&void 0!==h?h.exports=t():"function"==typeof p&&p.amd?p([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=t()}(function(){return function s(o,a,u){function c(e,t){if(!a[e]){if(!o[e]){var n="function"==typeof v&&v;if(!t&&n)return n(e,!0);if(l)return l(e,!0);var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}var i=a[e]={exports:{}};o[e][0].call(i.exports,function(t){return c(o[e][1][t]||t)},i,i.exports,s,o,a,u)}return a[e].exports}for(var l="function"==typeof v&&v,t=0;t<u.length;t++)c(u[t]);return c}({1:[function(t,e,n){var r,i,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(t){r=a}try{i="function"==typeof clearTimeout?clearTimeout:u}catch(t){i=u}}();var l,s=[],f=!1,d=-1;function m(){f&&l&&(f=!1,l.length?s=l.concat(s):d=-1,s.length&&p())}function p(){if(!f){var t=c(m);f=!0;for(var e=s.length;e;){for(l=s,s=[];++d<e;)l&&l[d].run();d=-1,e=s.length}l=null,f=!1,function n(t){if(i===clearTimeout)return clearTimeout(t);if((i===u||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{return i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function g(t,e){this.fun=t,this.array=e}function h(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new g(t,e)),1!==s.length||f||c(p)},g.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],2:[function(t,f,e){(function(e){function r(){}function o(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=0,this._handled=!1,this._value=undefined,this._deferreds=[],s(t,this)}function i(r,i){for(;3===r._state;)r=r._value;0!==r._state?(r._handled=!0,o._immediateFn(function(){var t=1===r._state?i.onFulfilled:i.onRejected;if(null!==t){var e;try{e=t(r._value)}catch(n){return void u(i.promise,n)}a(i.promise,e)}else(1===r._state?a:u)(i.promise,r._value)})):r._deferreds.push(i)}function a(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof o)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void s(function r(t,e){return function(){t.apply(e,arguments)}}(n,e),t)}t._state=1,t._value=e,c(t)}catch(i){u(t,i)}}function u(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&o._immediateFn(function(){t._handled||o._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e<n;e++)i(t,t._deferreds[e]);t._deferreds=null}function l(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function s(t,e){var n=!1;try{t(function(t){n||(n=!0,a(e,t))},function(t){n||(n=!0,u(e,t))})}catch(r){if(n)return;n=!0,u(e,r)}}var t,n;t=this,n=setTimeout,o.prototype["catch"]=function(t){return this.then(null,t)},o.prototype.then=function(t,e){var n=new this.constructor(r);return i(this,new l(t,e,n)),n},o.all=function(t){var c=Array.prototype.slice.call(t);return new o(function(i,o){if(0===c.length)return i([]);var a=c.length;function u(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){u(e,t)},o)}c[e]=t,0==--a&&i(c)}catch(r){o(r)}}for(var t=0;t<c.length;t++)u(t,c[t])})},o.resolve=function(e){return e&&"object"==typeof e&&e.constructor===o?e:new o(function(t){t(e)})},o.reject=function(n){return new o(function(t,e){e(n)})},o.race=function(i){return new o(function(t,e){for(var n=0,r=i.length;n<r;n++)i[n].then(t,e)})},o._immediateFn="function"==typeof e?function(t){e(t)}:function(t){n(t,0)},o._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},o._setImmediateFn=function(t){o._immediateFn=t},o._setUnhandledRejectionFn=function(t){o._unhandledRejectionFn=t},void 0!==f&&f.exports?f.exports=o:t.Promise||(t.Promise=o)}).call(this,t("timers").setImmediate)},{timers:3}],3:[function(c,t,l){(function(t,e){var r=c("process/browser.js").nextTick,n=Function.prototype.apply,i=Array.prototype.slice,o={},a=0;function u(t,e){this._id=t,this._clearFn=e}l.setTimeout=function(){return new u(n.call(setTimeout,window,arguments),clearTimeout)},l.setInterval=function(){return new u(n.call(setInterval,window,arguments),clearInterval)},l.clearTimeout=l.clearInterval=function(t){t.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},l.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},l.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},l._unrefActive=l.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;0<=e&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},l.setImmediate="function"==typeof t?t:function(t){var e=a++,n=!(arguments.length<2)&&i.call(arguments,1);return o[e]=!0,r(function(){o[e]&&(n?t.apply(null,n):t.call(null),l.clearImmediate(e))}),e},l.clearImmediate="function"==typeof e?e:function(t){delete o[t]}}).call(this,c("timers").setImmediate,c("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(t,e,n){var r=t("promise-polyfill"),i="undefined"!=typeof window?window:Function("return this;")();e.exports={boltExport:i.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)});function S(t){s.setTimeout(function(){throw t},0)}function P(t){return Tt(gt(t))}function L(t,e,n){!function(t,e,n){if(!(_(n)||A(n)||N(n)))throw s.console.error("Invalid call to Attr.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")}(t.dom(),e,n)}function R(t,e){return Math.max(parseInt(t,10),parseInt(e,10))}function j(t){return t.style.marginLeft&&t.style.marginRight&&t.style.marginLeft===t.style.marginRight?Pt(t.style.marginLeft):""}function F(t){return t.style.marginTop&&t.style.marginBottom&&t.style.marginTop===t.style.marginBottom?Pt(t.style.marginTop):""}function M(t){return t.style.borderWidth?Pt(t.style.borderWidth):""}function k(t,e){return t.hasAttribute(e)?t.getAttribute(e):""}function H(t,e){return t.style[e]?t.style[e]:""}function z(t){return null!==t.parentNode&&"FIGURE"===t.parentNode.nodeName}function B(t,e,n){t.setAttribute(e,n)}function G(t){z(t)?function(t){var e=t.parentNode;Ht.insertAfter(t,e),Ht.remove(e)}(t):function(t){var e=Ht.create("figure",{"class":"image"});Ht.insertAfter(e,t),e.appendChild(t),e.appendChild(Ht.create("figcaption",{contentEditable:"true"},"Caption")),e.contentEditable="false"}(t)}function W(t,e){var n=t.getAttribute("style"),r=e(null!==n?n:"");0<r.length?(t.setAttribute("style",r),t.setAttribute("data-mce-style",r)):t.removeAttribute("style")}function q(t,r){return function(t,e,n){t.style[e]?(t.style[e]=Lt(n),W(t,r)):B(t,e,n)}}function V(t,e){return t.style[e]?Pt(t.style[e]):k(t,e)}function X(t,e){var n=Lt(e);t.style.marginLeft=n,t.style.marginRight=n}function $(t,e){var n=Lt(e);t.style.marginTop=n,t.style.marginBottom=n}function J(t,e){var n=Lt(e);t.style.borderWidth=n}function Y(t,e){t.style.borderStyle=e}function K(t){return"FIGURE"===t.nodeName}function Z(t){return 0===Ht.getAttrib(t,"alt").length&&"presentation"===Ht.getAttrib(t,"role")}function Q(t,e){var n=s.document.createElement("img");return B(n,"style",e.style),!j(n)&&""===e.hspace||X(n,e.hspace),!F(n)&&""===e.vspace||$(n,e.vspace),!M(n)&&""===e.border||J(n,e.border),!function(t){return H(t,"borderStyle")}(n)&&""===e.borderStyle||Y(n,e.borderStyle),t(n.getAttribute("style"))}function tt(t,e){return{src:k(e,"src"),alt:function(t){return Z(t)?"":k(t,"alt")}(e),title:k(e,"title"),width:V(e,"width"),height:V(e,"height"),"class":k(e,"class"),style:t(k(e,"style")),caption:z(e),hspace:j(e),vspace:F(e),border:M(e),borderStyle:H(e,"borderStyle"),isDecorative:Z(e)}}function et(t,e,n,r,i){n[r]!==e[r]&&i(t,r,n[r])}function nt(r,i){return function(t,e,n){r(t,n),W(t,i)}}function rt(t,e){var n=t.dom.styles.parse(e),r=Rt(n),i=t.dom.styles.parse(t.dom.styles.serialize(r));return t.dom.styles.serialize(i)}function it(t){var e=t.selection.getNode(),n=t.dom.getParent(e,"figure.image");return n?t.dom.select("img",n)[0]:e&&("IMG"!==e.nodeName||kt(e))?null:e}function ot(e,t){var n=e.dom,r=n.getParent(t.parentNode,function(t){return!!e.schema.getTextBlockElements()[t.nodeName]},e.getBody());return r?n.split(r,t):t}function at(e,t,n){var r=function(t,e,n){var r=s.document.createElement("img");if(Bt(t,I(I({},e),{caption:!1}),r,n),zt(r,e.alt,e.isDecorative,n),e.caption){var i=Ht.create("figure",{"class":"image"});return i.appendChild(r),i.appendChild(Ht.create("figcaption",{contentEditable:"true"},"Caption")),i.contentEditable="false",i}return r}(function(t){return rt(e,t)},t,n);e.dom.setAttrib(r,"data-mce-id","__mcenew"),e.focus(),e.selection.setContent(r.outerHTML);var i=e.dom.select('*[data-mce-id="__mcenew"]')[0];if(e.dom.setAttrib(i,"data-mce-id",null),K(i)){var o=ot(e,i);e.selection.select(o)}else e.selection.select(i)}function ut(t,e,n){var r=it(t);r?e.src?function(e,t,n){var r=it(e);if(Bt(function(t){return rt(e,t)},t,r,n),function(t,e){t.dom.setAttrib(e,"src",e.getAttribute("src"))}(e,r),K(r.parentNode)){var i=r.parentNode;ot(e,i),e.selection.select(r.parentNode)}else e.selection.select(r),Ft(e,t,r)}(t,e,n):function(t,e){if(e){var n=t.dom.is(e.parentNode,"figure.image")?e.parentNode:e;t.dom.remove(n),t.focus(),t.nodeChanged(),t.dom.isEmpty(t.getBody())&&(t.setContent(""),t.selection.setCursorLocation())}}(t,r):e.src&&at(t,e,n)}function ct(t){return _(t.value)?t.value:""}function lt(e){return void 0===e&&(e=ct),function(t){return t?w.from(t).map(function(t){return Wt(t,e)}):w.none()}}var st,ft=C.exports.boltExport,dt=function(t){var n=w.none(),e=[],r=function(t){i()?a(t):e.push(t)},i=function(){return n.isSome()},o=function(t){!function(t,e){for(var n=0,r=t.length;n<r;n++){e(t[n],n)}}(t,a)},a=function(e){n.each(function(t){s.setTimeout(function(){e(t)},0)})};return t(function(t){n=w.some(t),o(e),e=[]}),{get:r,map:function(n){return dt(function(e){r(function(t){e(n(t))})})},isReady:i}},mt={nu:dt,pure:function(e){return dt(function(t){t(e)})}},pt=function(n){function t(t){n().then(t,S)}return{map:function(t){return pt(function(){return n().then(t)})},bind:function(e){return pt(function(){return n().then(function(t){return e(t).toPromise()})})},anonBind:function(t){return pt(function(){return n().then(function(){return t.toPromise()})})},toLazy:function(){return mt.nu(t)},toCached:function(){var t=null;return pt(function(){return null===t&&(t=n()),t})},toPromise:n,get:t}},gt=function(t){return pt(function(){return new ft(t)})},ht=function(t){return pt(function(){return ft.resolve(t)})},vt=function(n){return{is:function(t){return n===t},isValue:c,isError:u,getOr:a(n),getOrThunk:a(n),getOrDie:a(n),or:function(t){return vt(n)},orThunk:function(t){return vt(n)},fold:function(t,e){return e(n)},map:function(t){return vt(t(n))},mapError:function(t){return vt(n)},each:function(t){t(n)},bind:function(t){return t(n)},exists:function(t){return t(n)},forall:function(t){return t(n)},toOption:function(){return w.some(n)}}},bt=function(n){return{is:u,isValue:u,isError:c,getOr:t,getOrThunk:function(t){return t()},getOrDie:function(){return function(t){return function(){throw new Error(t)}}(String(n))()},or:function(t){return t},orThunk:function(t){return t()},fold:function(t,e){return t(n)},map:function(t){return bt(n)},mapError:function(t){return bt(t(n))},each:o,bind:function(t){return bt(n)},exists:u,forall:c,toOption:w.none}},yt={value:vt,error:bt,fromOption:function(t,e){return t.fold(function(){return bt(e)},vt)}},Tt=function(o){return I(I({},o),{toCached:function(){return Tt(o.toCached())},bindFuture:function(e){return Tt(o.bind(function(t){return t.fold(function(t){return ht(yt.error(t))},function(t){return e(t)})}))},bindResult:function(e){return Tt(o.map(function(t){return t.bind(e)}))},mapResult:function(e){return Tt(o.map(function(t){return t.map(e)}))},mapError:function(e){return Tt(o.map(function(t){return t.mapError(e)}))},foldResult:function(e,n){return o.map(function(t){return t.fold(e,n)})},withTimeout:function(t,i){return Tt(gt(function(e){var n=!1,r=s.setTimeout(function(){n=!0,e(yt.error(i()))},t);o.get(function(t){n||(s.clearTimeout(r),e(t))})}))}})},wt=P,_t=Object.prototype.hasOwnProperty,Dt=(st=function(t,e){return y(t)&&y(e)?Dt(t,e):e},function(){for(var t=new Array(arguments.length),e=0;e<t.length;e++)t[e]=arguments[e];if(0===t.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<t.length;r++){var i=t[r];for(var o in i)_t.call(i,o)&&(n[o]=st(n[o],i[o]))}return n}),At=(s.Node.ATTRIBUTE_NODE,s.Node.CDATA_SECTION_NODE,s.Node.COMMENT_NODE,s.Node.DOCUMENT_NODE,s.Node.DOCUMENT_TYPE_NODE,s.Node.DOCUMENT_FRAGMENT_NODE,s.Node.ELEMENT_NODE,s.Node.TEXT_NODE,s.Node.PROCESSING_INSTRUCTION_NODE,s.Node.ENTITY_REFERENCE_NODE,s.Node.ENTITY_NODE,s.Node.NOTATION_NODE,"undefined"!=typeof s.window?s.window:Function("return this;")(),function(t){if(null===t||t===undefined)throw new Error("Node cannot be null or undefined");return{dom:a(t)}}),Et={fromHtml:function(t,e){var n=(e||s.document).createElement("div");if(n.innerHTML=t,!n.hasChildNodes()||1<n.childNodes.length)throw s.console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return At(n.childNodes[0])},fromTag:function(t,e){var n=(e||s.document).createElement(t);return At(n)},fromText:function(t,e){var n=(e||s.document).createTextNode(t);return At(n)},fromDom:At,fromPoint:function(t,e,n){var r=t.dom();return w.from(r.elementFromPoint(e,n)).map(At)}},Nt=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Ot=tinymce.util.Tools.resolve("tinymce.util.Promise"),Ut=tinymce.util.Tools.resolve("tinymce.util.XHR"),It=function(t){return t.getParam("images_upload_url","","string")},xt=function(t){return t.getParam("images_upload_handler",undefined,"function")},Ct={hasDimensions:function(t){return t.getParam("image_dimensions",!0,"boolean")},hasUploadTab:function(t){return t.getParam("image_uploadtab",!0,"boolean")},hasAdvTab:function(t){return t.getParam("image_advtab",!1,"boolean")},getPrependUrl:function(t){return t.getParam("image_prepend_url","","string")},getClassList:function(t){return t.getParam("image_class_list")},hasDescription:function(t){return t.getParam("image_description",!0,"boolean")},hasImageTitle:function(t){return t.getParam("image_title",!1,"boolean")},hasImageCaption:function(t){return t.getParam("image_caption",!1,"boolean")},getImageList:function(t){return t.getParam("image_list",!1)},hasUploadUrl:function(t){return!!It(t)},hasUploadHandler:function(t){return!!xt(t)},getUploadUrl:It,getUploadHandler:xt,getUploadBasePath:function(t){return t.getParam("images_upload_base_path",undefined,"string")},getUploadCredentials:function(t){return t.getParam("images_upload_credentials",!1,"boolean")},showAccessibilityOptions:function(t){return t.getParam("a11y_advanced_options",!1,"boolean")},isAutomaticUploadsEnabled:function(t){return t.getParam("automatic_uploads",!0,"boolean")}},St=function(t,e){function n(t){r.parentNode&&r.parentNode.removeChild(r),e(t)}var r=s.document.createElement("img");r.onload=function(){var t={width:R(r.width,r.clientWidth),height:R(r.height,r.clientHeight)};n(yt.value(t))},r.onerror=function(){n(yt.error("Failed to get image dimensions for: "+t))};var i=r.style;i.visibility="hidden",i.position="fixed",i.bottom=i.left="0px",i.width=i.height="auto",s.document.body.appendChild(r),r.src=t},Pt=function(t){return t=t&&t.replace(/px$/,"")},Lt=function(t){return 0<t.length&&/^[0-9]+$/.test(t)&&(t+="px"),t},Rt=function(t){if(t.margin){var e=String(t.margin).split(" ");switch(e.length){case 1:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[0],t["margin-bottom"]=t["margin-bottom"]||e[0],t["margin-left"]=t["margin-left"]||e[0];break;case 2:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[1],t["margin-bottom"]=t["margin-bottom"]||e[0],t["margin-left"]=t["margin-left"]||e[1];break;case 3:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[1],t["margin-bottom"]=t["margin-bottom"]||e[2],t["margin-left"]=t["margin-left"]||e[1];break;case 4:t["margin-top"]=t["margin-top"]||e[0],t["margin-right"]=t["margin-right"]||e[1],t["margin-bottom"]=t["margin-bottom"]||e[2],t["margin-left"]=t["margin-left"]||e[3]}delete t.margin}return t},jt=function(t,e){var n=Ct.getImageList(t);"string"==typeof n?Ut.send({url:n,success:function(t){e(JSON.parse(t))}}):"function"==typeof n?n(e):e(n)},Ft=function(t,e,n){function r(){n.onload=n.onerror=null,t.selection&&(t.selection.select(n),t.nodeChanged())}n.onload=function(){e.width||e.height||!Ct.hasDimensions(t)||t.dom.setAttribs(n,{width:String(n.clientWidth),height:String(n.clientHeight)}),r()},n.onerror=r},Mt=function(r){return new Ot(function(t,e){var n=new s.FileReader;n.onload=function(){t(n.result)},n.onerror=function(){e(n.error.message)},n.readAsDataURL(r)})},kt=function(t){return"IMG"===t.nodeName&&(t.hasAttribute("data-mce-object")||t.hasAttribute("data-mce-placeholder"))},Ht=Nt.DOM,zt=function(t,e,n,r){if(n){Ht.setAttrib(t,"role","presentation");var i=Et.fromDom(t);L(i,"alt","")}else{if(r.hasAccessibilityOptions)Ht.setAttrib(t,"alt",e);else{i=Et.fromDom(t);L(i,"alt",e)}"presentation"===Ht.getAttrib(t,"role")&&Ht.setAttrib(t,"role","")}},Bt=function(t,e,n,r){var i=tt(t,n);et(n,i,e,"caption",function(t,e,n){return G(t)}),et(n,i,e,"src",B),et(n,i,e,"title",B),et(n,i,e,"width",q(0,t)),et(n,i,e,"height",q(0,t)),et(n,i,e,"class",B),et(n,i,e,"style",nt(function(t,e){return B(t,"style",e)},t)),et(n,i,e,"hspace",nt(X,t)),et(n,i,e,"vspace",nt($,t)),et(n,i,e,"border",nt(J,t)),et(n,i,e,"borderStyle",nt(Y,t)),function(t,e,n,r){n.alt===e.alt&&n.isDecorative===e.isDecorative||zt(t,n.alt,n.isDecorative,r)}(n,i,e,r)},Gt=tinymce.util.Tools.resolve("tinymce.util.Tools"),Wt=function(t,i){var o=[];return Gt.each(t,function(t){var e=_(t.text)?t.text:_(t.title)?t.title:"";if(t.menu!==undefined){var n=Wt(t.menu,i);o.push({text:e,items:n})}else{var r=i(t);o.push({text:e,value:r})}}),o},qt=function(t,e){return function(t,e){for(var n=0;n<t.length;n++){var r=e(t[n],n);if(r.isSome())return r}return w.none()}(t,function(t){return function(t){return Object.prototype.hasOwnProperty.call(t,"items")}(t)?qt(t.items,e):t.value===e?w.some(t):w.none()})},Vt=lt,Xt=function(t){return lt(ct)(t)},$t=function(t,e){return t.bind(function(t){return qt(t,e)})};function Jt(a){function e(t,e,n,r){var i,o;(i=new s.XMLHttpRequest).open("POST",a.url),i.withCredentials=a.credentials,i.upload.onprogress=function(t){r(t.loaded/t.total*100)},i.onerror=function(){n("Image upload failed due to a XHR Transport error. Code: "+i.status)},i.onload=function(){var t;i.status<200||300<=i.status?n("HTTP Error: "+i.status):(t=JSON.parse(i.responseText))&&"string"==typeof t.location?e(function(t,e){return t?t.replace(/\/$/,"")+"/"+e.replace(/^\//,""):e}(a.basePath,t.location)):n("Invalid JSON: "+i.responseText)},(o=new s.FormData).append("file",t.blob(),t.filename()),i.send(o)}return a=Gt.extend({credentials:!1,handler:e},a),{upload:function(t){return!a.url&&function(t){return t===e}(a.handler)?Ot.reject("Upload url missing from the settings."):function(r,i){return new Ot(function(t,e){try{i(r,t,e,o)}catch(n){e(n.message)}})}(t,a.handler)}}}function Yt(n){var r=Vt(function(t){return n.convertURL(t.value||t.url,"src")}),t=gt(function(e){jt(n,function(t){e(r(t).map(function(t){return T([[{text:"None",value:""}],t])}))})}),e=Xt(Ct.getClassList(n)),i=Ct.hasAdvTab(n),o=Ct.hasUploadTab(n),a=Ct.hasUploadUrl(n),u=Ct.hasUploadHandler(n),c=function(e){var t=it(e);return t?tt(function(t){return rt(e,t)},t):{src:"",alt:"",title:"",width:"",height:"","class":"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}}(n),l=Ct.hasDescription(n),s=Ct.hasImageTitle(n),f=Ct.hasDimensions(n),d=Ct.hasImageCaption(n),m=Ct.showAccessibilityOptions(n),p=Ct.getUploadUrl(n),g=Ct.getUploadBasePath(n),h=Ct.getUploadCredentials(n),v=Ct.getUploadHandler(n),b=Ct.isAutomaticUploadsEnabled(n),y=w.some(Ct.getPrependUrl(n)).filter(function(t){return _(t)&&0<t.length});return t.map(function(t){return{image:c,imageList:t,classList:e,hasAdvTab:i,hasUploadTab:o,hasUploadUrl:a,hasUploadHandler:u,hasDescription:l,hasImageTitle:s,hasDimensions:f,hasImageCaption:d,url:p,basePath:g,credentials:h,handler:v,prependURL:y,hasAccessibilityOptions:m,automaticUploads:b}})}function Kt(t){var e=t.imageList.map(function(t){return{name:"images",type:"selectbox",label:"Image list",items:t}}),n={name:"alt",type:"input",label:"Alternative description",disabled:t.hasAccessibilityOptions&&t.image.isDecorative},r=t.classList.map(function(t){return{name:"classes",type:"selectbox",label:"Class",items:t}});return T([[{name:"src",type:"urlinput",filetype:"image",label:"Source"}],e.toArray(),t.hasAccessibilityOptions&&t.hasDescription?[{type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]}]:[],t.hasDescription?[n]:[],t.hasImageTitle?[{name:"title",type:"input",label:"Image title"}]:[],t.hasDimensions?[{name:"dimensions",type:"sizeinput"}]:[],[{type:"grid",columns:2,items:T([r.toArray(),t.hasImageCaption?[{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[]])}]])}function Zt(t){return{src:{value:t.src,meta:{}},images:t.src,alt:t.alt,title:t.title,dimensions:{width:t.width,height:t.height},classes:t["class"],caption:t.caption,style:t.style,vspace:t.vspace,border:t.border,hspace:t.hspace,borderstyle:t.borderStyle,fileinput:[],isDecorative:t.isDecorative}}function Qt(t){return{src:t.src.value,alt:t.alt,title:t.title,width:t.dimensions.width,height:t.dimensions.height,"class":t.classes,style:t.style,caption:t.caption,hspace:t.hspace,vspace:t.vspace,border:t.border,borderStyle:t.borderstyle,isDecorative:t.isDecorative}}function te(t,e){var n=e.getData();(function(t,e){return/^(?:[a-zA-Z]+:)?\/\//.test(e)?w.none():t.prependURL.bind(function(t){return e.substring(0,t.length)!==t?w.some(t+e):w.none()})})(t,n.src.value).each(function(t){e.setData({src:{value:t,meta:n.src.meta}})})}function ee(t,e){var n=e.getData(),r=n.src.meta;if(r!==undefined){var i=Dt({},n);!function(t,e,n){t.hasDescription&&_(n.alt)&&(e.alt=n.alt),t.hasAccessibilityOptions&&(e.isDecorative=n.isDecorative||e.isDecorative||!1),t.hasImageTitle&&_(n.title)&&(e.title=n.title),t.hasDimensions&&(_(n.width)&&(e.dimensions.width=n.width),_(n.height)&&(e.dimensions.height=n.height)),_(n["class"])&&$t(t.classList,n["class"]).each(function(t){e.classes=t.value}),t.hasImageCaption&&A(n.caption)&&(e.caption=n.caption),t.hasAdvTab&&(_(n.style)&&(e.style=n.style),_(n.vspace)&&(e.vspace=n.vspace),_(n.border)&&(e.border=n.border),_(n.hspace)&&(e.hspace=n.hspace),_(n.borderstyle)&&(e.borderstyle=n.borderstyle))}(t,i,r),e.setData(i)}}function ne(t,e,n,r){te(e,r),ee(e,r),function(t,e,n,r){var i=r.getData(),o=i.src.value,a=i.src.meta||{};a.width||a.height||!e.hasDimensions||t.imageSize(o).get(function(t){t.each(function(t){n.open&&r.setData({dimensions:t})})})}(t,e,n,r),function(t,e,n){var r=n.getData(),i=$t(t.imageList,r.src.value);e.prevImage=i,n.setData({images:i.map(function(t){return t.value}).getOr("")})}(e,n,r)}function re(t,e,n){var r=Rt(t(n.style)),i=Dt({},n);return i.vspace=function(t){return t["margin-top"]&&t["margin-bottom"]&&t["margin-top"]===t["margin-bottom"]?Pt(String(t["margin-top"])):""}(r),i.hspace=function(t){return t["margin-right"]&&t["margin-left"]&&t["margin-right"]===t["margin-left"]?Pt(String(t["margin-right"])):""}(r),i.border=function(t){return t["border-width"]?Pt(String(t["border-width"])):""}(r),i.borderstyle=function(t){return t["border-style"]?String(t["border-style"]):""}(r),i.style=function(t,e,n){return e(t(e(n)))}(t,e,r),i}function ie(u,c,e,l){var t=l.getData();l.block("Uploading image"),function(t){return 0===t.length?w.none():w.some(t[0])}(t.fileinput).fold(function(){l.unblock()},function(n){function r(){l.unblock(),s.URL.revokeObjectURL(o)}function i(t){l.setData({src:{value:t,meta:{}}}),l.showTab("general"),ne(u,c,e,l)}var o=s.URL.createObjectURL(n),a=Jt({url:c.url,basePath:c.basePath,credentials:c.credentials,handler:c.handler});Mt(n).then(function(t){var e=u.createBlobCache(n,o,t);c.automaticUploads?a.upload(e).then(function(t){i(t),r()})["catch"](function(t){r(),u.alertErr(l,t)}):(u.addToBlobCache(e),i(e.blobUri()),l.unblock())})})}function oe(n,r,i){return function(t,e){"src"===e.name?ne(n,r,i,t):"images"===e.name?function(t,e,n,r){var i=r.getData(),o=$t(e.imageList,i.images);o.each(function(t){""===i.alt||n.prevImage.map(function(t){return t.text===i.alt}).getOr(!1)?""===t.value?r.setData({src:t,alt:n.prevAlt}):r.setData({src:t,alt:t.text}):r.setData({src:t})}),n.prevImage=o,ne(t,e,n,r)}(n,r,i,t):"alt"===e.name?i.prevAlt=t.getData().alt:"style"===e.name?function(t,e){var n=e.getData(),r=re(t.parseStyle,t.serializeStyle,n);e.setData(r)}(n,t):"vspace"===e.name||"hspace"===e.name||"border"===e.name||"borderstyle"===e.name?function(t,e,n){var r=Dt(Zt(e.image),n.getData()),i=Q(t.normalizeCss,Qt(r));n.setData({style:i})}(n,r,t):"fileinput"===e.name?ie(n,r,i,t):"isDecorative"===e.name&&(t.getData().isDecorative?t.disable("alt"):t.enable("alt"))}}function ae(n){return function(t){var e=function(t){return{prevImage:$t(t.imageList,t.image.src),prevAlt:t.image.alt,open:!0}}(t);return{title:"Insert/Edit Image",size:"normal",body:function(t){return t.hasAdvTab||t.hasUploadUrl||t.hasUploadHandler?{type:"tabpanel",tabs:T([[se(t)],t.hasAdvTab?[le(t)]:[],t.hasUploadTab&&(t.hasUploadUrl||t.hasUploadHandler)?[de(t)]:[]])}:{type:"panel",items:fe(t)}}(t),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Zt(t.image),onSubmit:n.onSubmit(t),onChange:oe(n,t,e),onClose:function(t){return function(){t.open=!1}}(e)}}}function ue(e){var t={onSubmit:function(r){return function(n){return function(t){var e=Dt(Zt(n.image),t.getData());r.undoManager.transact(function(){ut(r,Qt(e),n)}),r.editorUpload.uploadImagesAuto(),t.close()}}}(e),imageSize:function(e){return function(t){return wt(function(n){St(e.documentBaseURI.toAbsolute(t),function(t){var e=t.map(function(t){return{width:String(t.width),height:String(t.height)}});n(e)})})}}(e),addToBlobCache:function(e){return function(t){e.editorUpload.blobCache.add(t)}}(e),createBlobCache:function(r){return function(t,e,n){return r.editorUpload.blobCache.create({blob:t,blobUri:e,name:t.name?t.name.replace(/\.[^\.]+$/,""):null,base64:n.split(",")[1]})}}(e),alertErr:function(n){return function(t,e){n.windowManager.alert(e,t.close)}}(e),normalizeCss:function(e){return function(t){return rt(e,t)}}(e),parseStyle:function(e){return function(t){return e.dom.parseStyle(t)}}(e),serializeStyle:function(n){return function(t,e){return n.dom.serializeStyle(t,e)}}(e)};return{open:function(){return Yt(e).map(ae(t)).get(function(t){e.windowManager.open(t)})}}}function ce(o){return function(t){for(var e,n=t.length,r=function(t){t.attr("contenteditable",o?"true":null)};n--;){var i=t[n];void 0,(e=i.attr("class"))&&/\bimage\b/.test(e)&&(i.attr("contenteditable",o?"false":null),Gt.each(i.getAll("figcaption"),r))}}}var le=function(t){return{title:"Advanced",name:"advanced",items:[{type:"input",label:"Style",name:"style"},{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace",inputMode:"numeric"},{type:"input",label:"Horizontal space",name:"hspace",inputMode:"numeric"},{type:"input",label:"Border width",name:"border",inputMode:"numeric"},{type:"selectbox",name:"borderstyle",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"}]}]}]}},se=function(t){return{title:"General",name:"general",items:Kt(t)}},fe=Kt,de=function(t){return{title:"Upload",name:"upload",items:[{type:"dropzone",name:"fileinput"}]}},me=function(t){t.addCommand("mceImage",ue(t).open)},pe=function(t){t.on("PreInit",function(){t.parser.addNodeFilter("figure",ce(!0)),t.serializer.addNodeFilter("figure",ce(!1))})},ge=function(e){e.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:ue(e).open,onSetup:function(t){return e.selection.selectorChangedWithUnbind("img:not([data-mce-object],[data-mce-placeholder]),figure.image",t.setActive).unbind}}),e.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:ue(e).open}),e.ui.registry.addContextMenu("image",{update:function(t){return K(t)||function(t){return"IMG"===t.nodeName}(t)&&!kt(t)?["image"]:[]}})};!function he(){r.add("image",function(t){pe(t),ge(t),me(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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(v){"use strict";function e(){}function n(){return c}var t,r=function(e){function n(){return t}var t=e;return{get:n,set:function(e){t=e},clone:function(){return r(n())}}},o=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),d=function(e){return function(){return e}},u=d(!1),a=d(!0),c=(t={fold:function(e,n){return e()},is:u,isSome:u,isNone:a,getOr:l,getOrThunk:f,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:d(null),getOrUndefined:d(undefined),or:l,orThunk:f,map:n,each:e,bind:n,exists:u,forall:a,filter:n,equals:s,equals_:s,toArray:function(){return[]},toString:d("none()")},Object.freeze&&Object.freeze(t),t);function s(e){return e.isNone()}function f(e){return e()}function l(e){return e}var m=function(t){function e(){return o}function n(e){return e(t)}var r=d(t),o={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:a,isNone:u,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:e,orThunk:e,map:function(e){return m(e(t))},each:function(e){e(t)},bind:n,exists:n,forall:n,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(u,function(e){return n(t,e)})}};return o},p={some:m,none:n,from:function(e){return null===e||e===undefined?c:m(e)}};function h(e,n){return y(v.document.createElement("canvas"),e,n)}function g(e){var n=h(e.width,e.height);return w(n).drawImage(e,0,0),n}function w(e){return e.getContext("2d")}function y(e,n,t){return e.width=n,e.height=t,e}var b,O,E=window.Promise?window.Promise:(b=T.immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(e){v.setTimeout(e,1)},O=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},T.prototype["catch"]=function(e){return this.then(null,e)},T.prototype.then=function(t,r){var o=this;return new T(function(e,n){N.call(o,new R(t,r,e,n))})},T.all=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var c=Array.prototype.slice.call(1===e.length&&O(e[0])?e[0]:e);return new T(function(o,i){if(0===c.length)return o([]);var u=c.length;function a(n,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void t.call(e,function(e){a(n,e)},i)}c[n]=e,0==--u&&o(c)}catch(r){i(r)}}for(var e=0;e<c.length;e++)a(e,c[e])})},T.resolve=function(n){return n&&"object"==typeof n&&n.constructor===T?n:new T(function(e){e(n)})},T.reject=function(t){return new T(function(e,n){n(t)})},T.race=function(o){return new T(function(e,n){for(var t=0,r=o;t<r.length;t++)r[t].then(e,n)})},T);function T(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],A(e,I(S,this),I(_,this))}function I(e,n){return function(){return e.apply(n,arguments)}}function N(r){var o=this;null!==this._state?b(function(){var e=o._state?r.onFulfilled:r.onRejected;if(null!==e){var n;try{n=e(o._value)}catch(t){return void r.reject(t)}r.resolve(n)}else(o._state?r.resolve:r.reject)(o._value)}):this._deferreds.push(r)}function S(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void A(I(n,e),I(S,this),I(_,this))}this._state=!0,this._value=e,x.call(this)}catch(t){_.call(this,t)}}function _(e){this._state=!1,this._value=e,x.call(this)}function x(){for(var e=0,n=this._deferreds;e<n.length;e++){var t=n[e];N.call(this,t)}this._deferreds=[]}function R(e,n,t,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof n?n:null,this.resolve=t,this.reject=r}function A(e,n,t){var r=!1;try{e(function(e){r||(r=!0,n(e))},function(e){r||(r=!0,t(e))})}catch(o){if(r)return;r=!0,t(o)}}function C(e){var n=e.src;return 0===n.indexOf("data:")?U(n):function t(r){return new E(function(e,t){var n=new v.XMLHttpRequest;n.open("GET",r,!0),n.responseType="blob",n.onload=function(){200===this.status&&e(this.response)},n.onerror=function(){var e,n=this;t(0===this.status?((e=new Error("No access to download image")).code=18,e.name="SecurityError",e):new Error("Error "+n.status+" downloading image"))},n.send()})}(n)}function D(a){return new E(function(e,n){var t=v.URL.createObjectURL(a),r=new v.Image,o=function(){r.removeEventListener("load",i),r.removeEventListener("error",u)};function i(){o(),e(r)}function u(){o(),n("Unable to load data of type "+a.type+": "+t)}r.addEventListener("load",i),r.addEventListener("error",u),r.src=t,r.complete&&i()})}function U(t){return new E(function(e,n){(function g(e){var n=e.split(","),t=/data:([^;]+)/.exec(n[0]);if(!t)return p.none();for(var r=t[1],o=n[1],i=v.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 p.some(new v.Blob(c,{type:r}))})(t).fold(function(){n("uri is not base64: "+t)},e)})}function L(e,r,o){return r=r||"image/png",v.HTMLCanvasElement.prototype.toBlob?new E(function(n,t){e.toBlob(function(e){e?n(e):t()},r,o)}):U(e.toDataURL(r,o))}function k(e){return D(e).then(function(e){!function t(e){v.URL.revokeObjectURL(e.src)}(e);var n=h(function r(e){return e.naturalWidth||e.width}(e),function o(e){return e.naturalHeight||e.height}(e));return w(n).drawImage(e,0,0),n})}function j(e,n,t){var r=n.type;function o(n,t){return e.then(function(e){return function r(e,n,t){return n=n||"image/png",e.toDataURL(n,t)}(e,n,t)})}return{getType:d(r),toBlob:function i(){return E.resolve(n)},toDataURL:function u(){return t},toBase64:function a(){return t.split(",")[1]},toAdjustedBlob:function c(n,t){return e.then(function(e){return L(e,n,t)})},toAdjustedDataURL:o,toAdjustedBase64:function s(e,n){return o(e,n).then(function(e){return e.split(",")[1]})},toCanvas:function f(){return e.then(g)}}}function P(n){return function e(t){return new E(function(e){var n=new v.FileReader;n.onloadend=function(){e(n.result)},n.readAsDataURL(t)})}(n).then(function(e){return j(k(n),n,e)})}function M(n,e){return L(n,e).then(function(e){return j(E.resolve(n),e,n.toDataURL())})}function B(n,t){return n.toCanvas().then(function(e){return function a(e,n,t){var r=h(e.width,e.height),o=w(r),i=0,u=0;90!==(t=t<0?360+t:t)&&270!==t||y(r,r.height,r.width);90!==t&&180!==t||(i=r.width);270!==t&&180!==t||(u=r.height);return o.translate(i,u),o.rotate(t*Math.PI/180),o.drawImage(e,0,0),M(r,n)}(e,n.getType(),t)})}function F(n,t){return n.toCanvas().then(function(e){return function i(e,n,t){var r=h(e.width,e.height),o=w(r);"v"===t?(o.scale(1,-1),o.drawImage(e,0,-r.height)):(o.scale(-1,1),o.drawImage(e,-r.width,0));return M(r,n)}(e,n.getType(),t)})}function z(e){return P(e)}var H=tinymce.util.Tools.resolve("tinymce.util.Delay"),q=tinymce.util.Tools.resolve("tinymce.util.Promise"),$=tinymce.util.Tools.resolve("tinymce.util.URI");function X(e,n){for(var t=0,r=e.length;t<r;t++){var o=e[t];if(n(o,t))return p.some(o)}return p.none()}function W(e){return null!==e&&e!==undefined}function G(n){return"ImageProxy HTTP error: "+X(ue,function(e){return n===e.code}).fold(d("Unknown ImageProxy error"),function(e){return e.message})}function Y(e){var n=G(e);return q.reject(n)}function V(n){return X(ae,function(e){return e.type===n}).fold(d("Unknown service error"),function(e){return e.message})}function J(e,n){return re(n).then(function(e){var n=function(e){var n=ie(e),t=te(n,["error","type"]);return"ImageProxy Service error: "+(t?V(t):"Invalid JSON in service error message")}(e);return q.reject(n)})}function K(e,n){var t={"Content-Type":"application/json;charset=UTF-8","tiny-api-key":n};return oe(function(e,n){var t=-1===e.indexOf("?")?"?":"&";return/[?&]apiKey=/.test(e)||!n?e:e+t+"apiKey="+encodeURIComponent(n)}(e,n),t,!1).then(function(e){return e.status<200||300<=e.status?ce(e.status,e.blob):q.resolve(e.blob)})}var Q,Z={getImageSize:function yn(e){var n,t;function r(e){return/^[0-9\.]+px$/.test(e)}return n=e.style.width,t=e.style.height,n||t?r(n)&&r(t)?{w:parseInt(n,10),h:parseInt(t,10)}:null:(n=e.width,t=e.height,n&&t?{w:parseInt(n,10),h:parseInt(t,10)}:null)},setImageSize:function bn(e,n){var t,r;n&&(t=e.style.width,r=e.style.height,(t||r)&&(e.style.width=n.w+"px",e.style.height=n.h+"px",e.removeAttribute("data-mce-style")),t=e.width,r=e.height,(t||r)&&(e.setAttribute("width",n.w),e.setAttribute("height",n.h)))},getNaturalImageSize:function On(e){return{w:e.naturalWidth,h:e.naturalHeight}}},ee=(Q="function",function(e){return function(e){if(null===e)return"null";var n=typeof e;return"object"==n&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":n}(e)===Q}),ne=Array.prototype.slice,te=(ee(Array.from)&&Array.from,function(e,n){var t;return t=n.reduce(function(e,n){return W(e)?e[n]:undefined},e),W(t)?t:null}),re=function(n){return new q(function(t){var e=new v.FileReader;e.onload=function(e){var n=e.target;t(n.result)},e.readAsText(n)})},oe=function(n,r,o){return new q(function(e){var t;(t=new v.XMLHttpRequest).onreadystatechange=function(){4===t.readyState&&e({status:t.status,blob:this.response})},t.open("GET",n,!0),t.withCredentials=o,i.each(r,function(e,n){t.setRequestHeader(n,e)}),t.responseType="blob",t.send()})},ie=function(e){var n;try{n=JSON.parse(e)}catch(t){}return n},ue=[{code:404,message:"Could not find Image Proxy"},{code:403,message:"Rejected request"},{code:0,message:"Incorrect Image Proxy URL"}],ae=[{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."}],ce=function(e,n){return function(e){return 400===e||403===e||500===e}(e)?J(0,n):Y(e)},se=Y;function fe(e,n,t){return n?K(e,n):function r(e,n){return oe(e,{},n).then(function(e){return e.status<200||300<=e.status?se(e.status):q.resolve(e.blob)})}(e,t)}function le(e,n,t){return 0!=(e.compareDocumentPosition(n)&t)}function de(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};function r(e){return Number(n.replace(t,"$"+e))}return Ce(r(1),r(2))}function me(e,n){return function(){return n===e}}function he(e,n){return function(){return n===e}}function ge(e,n){var t=String(n).toLowerCase();return X(e,function(e){return e.search(t)})}function ve(e,n){return-1!==e.indexOf(n)}function pe(n){return function(e){return ve(e,n)}}function we(e,n){return function(e,n){return X(e.dom().childNodes,function(e){return n(Ke.fromDom(e))}).map(Ke.fromDom)}(e,function(e){return function(e,n){var t=e.dom();if(t.nodeType!==Ze)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")}(e,n)})}function ye(e){return we(Ke.fromDom(e),"img")}function be(e,n){return e.dom.is(n,"figure")}function Oe(e,n){e.notificationManager.open({text:n,type:"error"})}function Ee(e){var n=e.selection.getNode();return be(e,n)?ye(n):p.some(Ke.fromDom(n))}function Te(e,n){var t,r=n.src;return tn(e,n)?fe(n.src,null,function(e,n){return-1!==i.inArray(function(e){return e.getParam("imagetools_credentials_hosts",[],"string[]")}(e),new $(n.src).host)}(e,n)):nn(e,n)?function(e){return C(e)}(n):(r=function(e){return e.getParam("imagetools_proxy")}(e),r+=(-1===r.indexOf("?")?"?":"&")+"url="+encodeURIComponent(n.src),t=function(e){return e.getParam("api_key",e.getParam("imagetools_api_key","","string"),"string")}(e),fe(r,t,!1))}function Ie(e,n){return function(e){return p.from(e.getParam("imagetools_fetch_image",null,"function"))}(e).fold(function(){return Te(e,n)},function(e){return e(n)})}function Ne(e,n){var t;return(t=e.editorUpload.blobCache.getByUri(n.src))?q.resolve(t.blob()):Ie(e,n)}function Se(e){H.clearTimeout(e.get())}function _e(i,u,a,c,s,f){return u.toBlob().then(function(e){var n,t,r,o;return r=i.editorUpload.blobCache,n=s.src,function(e){return e.getParam("images_reuse_filename",!1,"boolean")}(i)&&(t=(o=r.getByUri(n))?(n=o.uri(),o.name()):function(e,n){var t=n.match(/\/([^\/\?]+)?\.(?:jpeg|jpg|png|gif)(?:\?|$)/i);return t?e.dom.encode(t[1]):null}(i,n)),o=r.create({id:"imagetools"+en++,blob:e,base64:u.toBase64(),uri:n,name:t}),r.add(o),i.undoManager.transact(function(){i.$(s).on("load",function e(){i.$(s).off("load",e),i.nodeChanged(),a?i.editorUpload.uploadImagesAuto():(Se(c),function(e,n){var t=H.setEditorTimeout(e,function(){e.editorUpload.uploadImagesAuto()},function(e){return e.getParam("images_upload_timeout",3e4,"number")}(e));n.set(t)}(i,c))}),f&&i.$(s).attr({width:f.w,height:f.h}),i.$(s).attr({src:o.blobUri()}).removeAttr("data-mce-src")}),o})}function xe(t,r,e,o){return function(){return Ee(t).fold(function(){Oe(t,"Could not find selected image")},function(n){return t._scanForImages().then(function(){return Ne(t,n.dom())}).then(z).then(e).then(function(e){return _e(t,e,!1,r,n.dom(),o)},function(e){Oe(t,e)})})}}var Re=function(e,n){return le(e,n,v.Node.DOCUMENT_POSITION_CONTAINED_BY)},Ae=function(){return Ce(0,0)},Ce=function(e,n){return{major:e,minor:n}},De={nu:Ce,detect:function(e,n){var t=String(n).toLowerCase();return 0===e.length?Ae():de(e,t)},unknown:Ae},Ue="Firefox",Le=function(e){var n=e.current;return{current:n,version:e.version,isEdge:me("Edge",n),isChrome:me("Chrome",n),isIE:me("IE",n),isOpera:me("Opera",n),isFirefox:me(Ue,n),isSafari:me("Safari",n)}},ke={unknown:function(){return Le({current:undefined,version:De.unknown()})},nu:Le,edge:d("Edge"),chrome:d("Chrome"),ie:d("IE"),opera:d("Opera"),firefox:d(Ue),safari:d("Safari")},je="Windows",Pe="Android",Me="Solaris",Be="FreeBSD",Fe="ChromeOS",ze=function(e){var n=e.current;return{current:n,version:e.version,isWindows:he(je,n),isiOS:he("iOS",n),isAndroid:he(Pe,n),isOSX:he("OSX",n),isLinux:he("Linux",n),isSolaris:he(Me,n),isFreeBSD:he(Be,n),isChromeOS:he(Fe,n)}},He={unknown:function(){return ze({current:undefined,version:De.unknown()})},nu:ze,windows:d(je),ios:d("iOS"),android:d(Pe),linux:d("Linux"),osx:d("OSX"),solaris:d(Me),freebsd:d(Be),chromeos:d(Fe)},qe=function(e,t){return ge(e,t).map(function(e){var n=De.detect(e.versionRegexes,t);return{current:e.name,version:n}})},$e=function(e,t){return ge(e,t).map(function(e){var n=De.detect(e.versionRegexes,t);return{current:e.name,version:n}})},Xe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,We=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return ve(e,"edge/")&&ve(e,"chrome")&&ve(e,"safari")&&ve(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Xe],search:function(e){return ve(e,"chrome")&&!ve(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return ve(e,"msie")||ve(e,"trident")}},{name:"Opera",versionRegexes:[Xe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:pe("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:pe("firefox")},{name:"Safari",versionRegexes:[Xe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(ve(e,"safari")||ve(e,"mobile/"))&&ve(e,"applewebkit")}}],Ge=[{name:"Windows",search:pe("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return ve(e,"iphone")||ve(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:pe("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:pe("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:pe("linux"),versionRegexes:[]},{name:"Solaris",search:pe("sunos"),versionRegexes:[]},{name:"FreeBSD",search:pe("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:pe("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Ye={browsers:d(We),oses:d(Ge)},Ve=r(function(e,n){var t=Ye.browsers(),r=Ye.oses(),o=qe(t,e).fold(ke.unknown,ke.nu),i=$e(r,e).fold(He.unknown,He.nu);return{browser:o,os:i,deviceType:function(e,n,t,r){var o=e.isiOS()&&!0===/ipad/i.test(t),i=e.isiOS()&&!o,u=e.isiOS()||e.isAndroid(),a=u||r("(pointer:coarse)"),c=o||!i&&u&&r("(min-device-width:768px)"),s=i||u&&!c,f=n.isSafari()&&e.isiOS()&&!1===/safari/i.test(t),l=!s&&!c&&!f;return{isiPad:d(o),isiPhone:d(i),isTablet:d(c),isPhone:d(s),isTouch:d(a),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:d(f),isDesktop:d(l)}}(i,o,e,n)}}(v.navigator.userAgent,function(e){return v.window.matchMedia(e).matches})),Je=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:d(e)}},Ke={fromHtml:function(e,n){var t=(n||v.document).createElement("div");if(t.innerHTML=e,!t.hasChildNodes()||1<t.childNodes.length)throw v.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return Je(t.childNodes[0])},fromTag:function(e,n){var t=(n||v.document).createElement(e);return Je(t)},fromText:function(e,n){var t=(n||v.document).createTextNode(e);return Je(t)},fromDom:Je,fromPoint:function(e,n,t){var r=e.dom();return p.from(r.elementFromPoint(n,t)).map(Je)}},Qe=(v.Node.ATTRIBUTE_NODE,v.Node.CDATA_SECTION_NODE,v.Node.COMMENT_NODE,v.Node.DOCUMENT_NODE,v.Node.DOCUMENT_TYPE_NODE,v.Node.DOCUMENT_FRAGMENT_NODE,v.Node.ELEMENT_NODE),Ze=(v.Node.TEXT_NODE,v.Node.PROCESSING_INSTRUCTION_NODE,v.Node.ENTITY_REFERENCE_NODE,v.Node.ENTITY_NODE,v.Node.NOTATION_NODE,Qe),en=(Ve.get().browser.isIE(),"undefined"!=typeof v.window?v.window:Function("return this;")(),0),nn=function(e,n){var t=n.src;return 0===t.indexOf("data:")||0===t.indexOf("blob:")||new $(t).host===e.documentBaseURI.host},tn=function(e,n){return-1!==i.inArray(function(e){return e.getParam("imagetools_cors_hosts",[],"string[]")}(e),new $(n.src).host)},rn=function(n,t,r){return function(){var e=Ee(n).fold(function(){return null},function(e){var n=Z.getImageSize(e.dom());return n?{w:n.h,h:n.w}:null});return xe(n,t,function(e){return function(e,n){return B(e,n)}(e,r)},e)()}},on=function(e,n,t){return function(){return xe(e,n,function(e){return function(e,n){return F(e,n)}(e,t)})()}},un=function(n,e){function t(e){return function(e){return n.dom.is(e,"img:not([data-mce-object],[data-mce-placeholder])")}(e)&&(nn(n,e)||tn(n,e)||n.settings.imagetools_proxy)}return be(n,e)?ye(e).map(function(e){return t(e.dom())?p.some(e.dom()):p.none()}):t(e)?p.some(e):p.none()},an=Se,cn=Ne,sn=Ee,fn=function(n,t,r,o,i){return new q(function(e){(function(e){return D(e)})(i).then(function(e){var n=Z.getNaturalImageSize(e);return o.w===n.w&&o.h===n.h||Z.getImageSize(r)&&Z.setImageSize(r,n),v.URL.revokeObjectURL(e.src),i}).then(z).then(function(e){return _e(n,e,!0,t,r)},function(){})})},ln=d("save-state"),dn=d("disable"),mn=d("enable"),hn=function(i,u){return function(){var r=sn(i),o=r.map(function(e){return Z.getNaturalImageSize(e.dom())});sn(i).each(function(n){un(i,n.dom()).each(function(e){cn(i,n.dom()).then(function(e){var n=function(e){return{blob:e,url:v.URL.createObjectURL(e)}}(e);i.windowManager.open(function(e){return{title:"Edit Image",size:"large",body:{type:"panel",items:[{type:"imagetools",name:"imagetools",label:"Edit Image",currentState:e}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0,disabled:!0}],onSubmit:function(e){var t=e.getData().imagetools.blob;r.each(function(n){o.each(function(e){fn(i,u,n.dom(),e,t)})}),e.close()},onCancel:function(){},onAction:function(e,n){switch(n.name){case ln():n.value?e.enable("save"):e.disable("save");break;case dn():e.disable("save"),e.disable("cancel");break;case mn():e.enable("cancel")}}}}(n))})})})}},gn=function(t,e){i.each({mceImageRotateLeft:rn(t,e,-90),mceImageRotateRight:rn(t,e,90),mceImageFlipVertical:on(t,e,"v"),mceImageFlipHorizontal:on(t,e,"h"),mceEditImage:hn(t,e)},function(e,n){t.addCommand(n,e)})},vn=function(t,r,o){t.on("NodeChange",function(e){var n=o.get();n&&n.src!==e.element.src&&(an(r),t.editorUpload.uploadImagesAuto(),o.set(null)),un(t,e.element).each(o.set)})},pn=function(r){function n(e){return function(){return r.execCommand(e)}}r.ui.registry.addButton("rotateleft",{tooltip:"Rotate counterclockwise",icon:"rotate-left",onAction:n("mceImageRotateLeft")}),r.ui.registry.addButton("rotateright",{tooltip:"Rotate clockwise",icon:"rotate-right",onAction:n("mceImageRotateRight")}),r.ui.registry.addButton("flipv",{tooltip:"Flip vertically",icon:"flip-vertically",onAction:n("mceImageFlipVertical")}),r.ui.registry.addButton("fliph",{tooltip:"Flip horizontally",icon:"flip-horizontally",onAction:n("mceImageFlipHorizontal")}),r.ui.registry.addButton("editimage",{tooltip:"Edit image",icon:"edit-image",onAction:n("mceEditImage"),onSetup:function(t){function e(){sn(r).each(function(e){var n=un(r,e.dom()).isNone();t.setDisabled(n)})}return r.on("NodeChange",e),function(){r.off("NodeChange",e)}}}),r.ui.registry.addButton("imageoptions",{tooltip:"Image options",icon:"image-options",onAction:n("mceImage")}),r.ui.registry.addContextMenu("imagetools",{update:function(e){return un(r,e).fold(function(){return[]},function(e){return[{text:"Edit image",icon:"edit-image",onAction:n("mceEditImage")}]})}})},wn=function(n){n.ui.registry.addContextToolbar("imagetools",{items:function(e){return e.getParam("imagetools_toolbar","rotateleft rotateright flipv fliph editimage imageoptions")}(n),predicate:function(e){return un(n,e).isSome()},position:"node",scope:"node"})};!function En(){o.add("imagetools",function(e){var n=r(0),t=r(null);gn(e,n),pn(e),wn(e),vn(e,n,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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(){"use strict";function t(){}function n(t){return function(){return t}}function e(){return h}var r,o=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),f=tinymce.util.Tools.resolve("tinymce.EditorManager"),l=tinymce.util.Tools.resolve("tinymce.Env"),m=tinymce.util.Tools.resolve("tinymce.util.Tools"),c=function(t){return t.getParam("importcss_merge_classes")},i=function(t){return t.getParam("importcss_exclusive")},p=function(t){return t.getParam("importcss_selector_converter")},g=function(t){return t.getParam("importcss_selector_filter")},y=function(t){return t.getParam("importcss_groups")},v=function(t){return t.getParam("importcss_append")},d=function(t){return t.getParam("importcss_file_filter")},u=n(!1),s=n(!0),h=(r={fold:function(t,n){return t()},is:u,isSome:u,isNone:s,getOr:O,getOrThunk:x,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:n(null),getOrUndefined:n(undefined),or:O,orThunk:x,map:e,each:t,bind:e,exists:u,forall:s,filter:e,equals:_,equals_:_,toArray:function(){return[]},toString:n("none()")},Object.freeze&&Object.freeze(r),r);function _(t){return t.isNone()}function x(t){return t()}function O(t){return t}function T(n){return function(t){return function(t){if(null===t)return"null";var n=typeof t;return"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}(t)===n}}function b(t,n){return function(t){for(var n=[],e=0,r=t.length;e<r;++e){if(!w(t[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+t);M.apply(n,t[e])}return n}(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))}function k(n){return"string"==typeof n?function(t){return-1!==t.indexOf(n)}:n instanceof RegExp?function(t){return n.test(t)}:n}function S(i,t,u){var c=[],e={};function s(t,n){var e,r=t.href;if((r=function(t){var n=l.cacheSuffix;return"string"==typeof t&&(t=t.replace("?"+n,"").replace("&"+n,"")),t}(r))&&u(r,n)&&!function(t,n){var e=t.settings,r=!1!==e.skin&&(e.skin||"oxide");if(r){var o=e.skin_url?t.documentBaseURI.toAbsolute(e.skin_url):f.baseURL+"/skins/ui/"+r,i=f.baseURL+"/skins/content/";return n===o+"/content"+(t.inline?".inline":"")+".min.css"||-1!==n.indexOf(i)}return!1}(i,r)){m.each(t.imports,function(t){s(t,!0)});try{e=t.cssRules||t.rules}catch(o){}m.each(e,function(t){t.styleSheet?s(t.styleSheet,!0):t.selectorText&&m.each(t.selectorText.split(","),function(t){c.push(m.trim(t))})})}}m.each(i.contentCSS,function(t){e[t]=!0}),u=u||function(t,n){return n||e[t]};try{m.each(t.styleSheets,function(t){s(t)})}catch(n){}return c}function A(t,n){var e,r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(n);if(r){var o=r[1],i=r[2].substr(1).split(".").join(" "),u=m.makeMap("a,img");return r[1]?(e={title:n},t.schema.getTextBlockElements()[o]?e.block=o:t.schema.getBlockElements()[o]||u[o.toLowerCase()]?e.selector=o:e.inline=o):r[2]&&(e={inline:"span",title:n.substr(1),classes:i}),!1!==c(t)?e.classes=i:e.attributes={"class":i},e}}function P(t,n){return null===n||!1!==i(t)}var w=T("array"),E=T("function"),I=Array.prototype.slice,M=Array.prototype.push,j=(E(Array.from)&&Array.from,A),D=function(s){s.on("init",function(t){function r(t,n){if(function(t,n,e,r){return!(P(t,e)?n in r:n in e.selectors)}(s,t,n,i)){!function(t,n,e,r){P(t,e)?r[n]=!0:e.selectors[n]=!0}(s,t,n,i);var e=function(t,n,e,r){return(r&&r.selector_converter?r.selector_converter:p(t)?p(t):function(){return A(t,e)}).call(n,e,r)}(s,s.plugins.importcss,t,n);if(e){var r=e.name||a.DOM.uniqueId();return s.formatter.register(r,e),m.extend({},{title:e.title,format:r})}}return null}var o=function(){var n=[],e=[],r={};return{addItemToGroup:function(t,n){r[t]?r[t].push(n):(e.push(t),r[t]=[n])},addItem:function(t){n.push(t)},toFormats:function(){return b(e,function(t){var n=r[t];return 0===n.length?[]:[{title:t,items:n}]}).concat(n)}}}(),i={},u=k(g(s)),c=function(t){return m.map(t,function(t){return m.extend({},t,{original:t,selectors:{},filter:k(t.filter),item:{text:t.title,menu:[]}})})}(y(s));m.each(S(s,s.getDoc(),k(d(s))),function(e){if(-1===e.indexOf(".mce-")&&(!u||u(e))){var t=function(t,n){return m.grep(t,function(t){return!t.filter||t.filter(n)})}(c,e);if(0<t.length)m.each(t,function(t){var n=r(e,t);n&&o.addItemToGroup(t.title,n)});else{var n=r(e,null);n&&o.addItem(n)}}});var n=o.toFormats();s.fire("addStyleModifications",{items:n,replace:!v(s)})})},R=function(n){return{convertSelectorToFormat:function(t){return j(n,t)}}};!function U(){o.add("importcss",function(t){return D(t),R(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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(){"use strict";function n(e){return e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S"))}function r(e){return e.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])}function a(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e}function i(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",a(n.getMonth()+1,2))).replace("%d",a(n.getDate(),2))).replace("%H",""+a(n.getHours(),2))).replace("%M",""+a(n.getMinutes(),2))).replace("%S",""+a(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(f[n.getMonth()]))).replace("%b",""+e.translate(d[n.getMonth()]))).replace("%A",""+e.translate(s[n.getDay()]))).replace("%a",""+e.translate(l[n.getDay()]))).replace("%%","%")}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e){return e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d"))},o=n,u=r,c=function(e){var t=r(e);return 0<t.length?t[0]:n(e)},m=function(e){return e.getParam("insertdatetime_element",!1)},l="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),s="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),d="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),f="January February March April May June July August September October November December".split(" "),p=function(e,t){if(m(e)){var n=i(e,t),r=void 0;r=/%[HMSIp]/.test(t)?i(e,"%Y-%m-%dT%H:%M"):i(e,"%Y-%m-%d");var a=e.dom.getParent(e.selection.getStart(),"time");a?function(e,t,n,r){var a=e.dom.create("time",{datetime:n},r);t.parentNode.insertBefore(a,t),e.dom.remove(t),e.selection.select(a,!0),e.selection.collapse(!1)}(e,a,r,n):e.insertContent('<time datetime="'+r+'">'+n+"</time>")}else e.insertContent(i(e,t))},g=i,y=function(e){e.addCommand("mceInsertDate",function(){p(e,t(e))}),e.addCommand("mceInsertTime",function(){p(e,o(e))})},M=tinymce.util.Tools.resolve("tinymce.util.Tools"),S=function(e){function t(){return n}var n=e;return{get:t,set:function(e){n=e},clone:function(){return S(t())}}},v=function(n){var t=u(n),r=S(c(n));n.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:function(e){return e===r.get()},fetch:function(e){e(M.map(t,function(e){return{type:"choiceitem",text:g(n,e),value:e}}))},onAction:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];p(n,r.get())},onItemAction:function(e,t){r.set(t),p(n,t)}});n.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:function(){return M.map(t,function(e){return{type:"menuitem",text:g(n,e),onAction:function(e){return function(){r.set(e),p(n,e)}}(e)}})}})};!function h(){e.add("insertdatetime",function(e){y(e),v(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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=function(e){return e.getParam("font_formats")},i=function(e){return e.getParam("fontsize_formats")},n=function(e,t){e.settings.fontsize_formats=t},l=function(e,t){e.settings.font_formats=t},s=function(e){return e.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large")},r=function(e,t){e.settings.inline_styles=t},o=function(e){!function(e){r(e,!1),i(e)||n(e,"8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7"),t(e)||l(e,"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats")}(e),e.on("PreInit",function(){return function(e){var t="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table",i=a.explode(s(e)),n=e.schema;e.formatter.register({alignleft:{selector:t,attributes:{align:"left"}},aligncenter:{selector:t,attributes:{align:"center"}},alignright:{selector:t,attributes:{align:"right"}},alignjustify:{selector:t,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",toggle:!1,attributes:{face:"%value"}},fontsize:{inline:"font",toggle:!1,attributes:{size:function(e){return String(a.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}}),a.each("b,i,u,strike".split(","),function(e){n.addValidElements(e+"[*]")}),n.getElementRule("font")||n.addValidElements("font[face|size|color|style]"),a.each(t.split(","),function(e){var t=n.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))})}(e)})};!function c(){e.add("legacyoutput",function(e){o(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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(c){"use strict";function n(t){return function(n){return function(n){if(null===n)return"null";var t=typeof n;return"object"==t&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":t}(n)===t}}function u(){}function i(n){return function(){return n}}function t(){return C}var e,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.util.VK"),a=n("string"),f=n("array"),l=n("boolean"),s=n("function"),d=function(n){var t=n.getParam("link_assume_external_targets",!1);return l(t)&&t?1:!a(t)||"http"!==t&&"https"!==t?0:t},m=function(n){return n.getParam("link_context_toolbar",!1,"boolean")},h=function(n){return n.getParam("link_list")},p=function(n){return n.getParam("default_link_target")},g=function(n){return n.getParam("target_list",!0)},v=function(n){return n.getParam("rel_list",[],"array")},y=function(n){return n.getParam("link_class_list",[],"array")},w=function(n){return n.getParam("link_title",!0,"boolean")},k=function(n){return n.getParam("allow_unsafe_link_target",!1,"boolean")},x=function(n){return n.getParam("link_quicklink",!1,"boolean")},b=function(n){return n.getParam("link_default_protocol","http","string")},_=function(n){var t=c.document.createElement("a");t.target="_blank",t.href=n,t.rel="noreferrer noopener";var e=c.document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,c.window,0,0,0,0,0,!1,!1,!1,!1,0,null),function(n,t){c.document.body.appendChild(n),n.dispatchEvent(t),c.document.body.removeChild(n)}(t,e)},T=function(){return(T=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}).apply(this,arguments)},O=i(!1),A=i(!0),C=(e={fold:function(n,t){return n()},is:O,isSome:O,isNone:A,getOr:E,getOrThunk:N,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(undefined),or:E,orThunk:N,map:t,each:u,bind:t,exists:O,forall:A,filter:t,equals:P,equals_:P,toArray:function(){return[]},toString:i("none()")},Object.freeze&&Object.freeze(e),e);function P(n){return n.isNone()}function N(n){return n()}function E(n){return n}function I(n,t){return-1<function(n,t){return Z.call(n,t)}(n,t)}function S(n,t){for(var e=0,r=n.length;e<r;e++){t(n[e],e)}}function j(n){for(var t=[],e=0,r=n.length;e<r;++e){if(!f(n[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+n);nn.apply(t,n[e])}return t}function F(n,t){return j(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}(n,t))}function L(n,t){for(var e=0;e<n.length;e++){var r=t(n[e],e);if(r.isSome())return r}return Q.none()}function R(n){return/^\w+:/i.test(n)}function D(n){var t=n.getAttribute("data-mce-href");return t||n.getAttribute("href")}function U(n,t){var e,r,o=["noopener"],i=n?n.split(/\s+/):[],u=function(n){return n.filter(function(n){return-1===tn.inArray(o,n)})},c=t?0<(e=u(e=i)).length?e.concat(o):o:u(i);return 0<c.length?(r=c,tn.trim(r.sort().join(" "))):""}function M(n,t){return t=t||n.selection.getNode(),en(t)?n.dom.select("a[href]",t)[0]:n.dom.getParent(t,"a[href]")}function z(n){return n&&"A"===n.nodeName&&!!D(n)}function q(n){return function(n,t,e){return S(n,function(n){e=t(e,n)}),e}(["title","rel","class","target"],function(t,e){return n[e].each(function(n){t[e]=0<n.length?n:null}),t},{href:n.href})}function K(n,t){var e=T({},t);if(!(0<v(n).length)&&!1===k(n)){var r=U(e.rel,"_blank"===e.target);e.rel=r||null}return Q.from(e.target).isNone()&&!1===g(n)&&(e.target=p(n)),e.href=function(n,t){return"http"!==t&&"https"!==t||R(n)?n:t+"://"+n}(e.href,d(n)),e}function B(n){return a(n.value)?n.value:""}function V(t){return void 0===t&&(t=B),function(n){return Q.from(n).map(function(n){return function(n,r){var o=[];return tn.each(n,function(n){var t=a(n.text)?n.text:a(n.title)?n.title:"";if(n.menu!==undefined);else{var e=r(n);o.push({text:t,value:e})}}),o}(n,t)})}}function W(t,n,e,r){var o=r[n],i=0<t.length;return o!==undefined?function(t,n){return L(n,function(n){return Q.some(n).filter(function(n){return n.value===t})})}(o,e).map(function(n){return{url:{value:n.value,meta:{text:i?t:n.text,attach:u}},text:i?t:n.text}}):Q.none()}var H,$,G,J,X=function(e){function n(){return o}function t(n){return n(e)}var r=i(e),o={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:A,isNone:O,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:n,orThunk:n,map:function(n){return X(n(e))},each:function(n){n(e)},bind:t,exists:t,forall:t,filter:function(n){return n(e)?o:C},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(O,function(n){return t(e,n)})}};return o},Q={some:X,none:t,from:function(n){return null===n||n===undefined?C:X(n)}},Y=Array.prototype.slice,Z=Array.prototype.indexOf,nn=Array.prototype.push,tn=(s(Array.from)&&Array.from,tinymce.util.Tools.resolve("tinymce.util.Tools")),en=function(n){return n&&"FIGURE"===n.nodeName&&/\bimage\b/i.test(n.className)},rn=function(n,t){var e=n.dom.select("img",t)[0];if(e){var r=n.dom.getParents(e,"a[href]",t)[0];r&&(r.parentNode.insertBefore(e,r),n.dom.remove(r))}},on=function(n,t,e){var r=n.dom.select("img",t)[0];if(r){var o=n.dom.create("a",e);r.parentNode.insertBefore(o,r),o.appendChild(r)}},un=function(n,t,e){var r=n.selection.getNode(),o=M(n,r),i=K(n,q(e));n.undoManager.transact(function(){e.href===t.href&&t.attach(),o?(n.focus(),function(n,t,e,r){e.each(function(n){t.hasOwnProperty("innerText")?t.innerText=n:t.textContent=n}),n.dom.setAttribs(t,r),n.selection.select(t)}(n,o,e.text,i)):function(t,n,e,r){en(n)?on(t,n,r):e.fold(function(){t.execCommand("mceInsertLink",!1,r)},function(n){t.insertContent(t.dom.createHTML("a",r,t.dom.encode(n)))})}(n,r,e.text,i)})},cn=function(e){e.undoManager.transact(function(){var n=e.selection.getNode();if(en(n))rn(e,n);else{var t=e.dom.getParent(n,"a[href]",e.getBody());t&&e.dom.remove(t,!0)}e.focus()})},an=function(n){return 0<tn.grep(n,z).length},fn=D,ln=function(n){return!(/</.test(n)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(n)||-1===n.indexOf("href=")))},sn=M,dn=function(n,t){return function(n){return n.replace(/\uFEFF/g,"")}(t?t.innerText||t.textContent:n.getContent({format:"text"}))},mn=U,hn=R,pn={sanitize:function(n){return V(B)(n)},sanitizeWith:V,createUi:function(t,e){return function(n){return{name:t,type:"selectbox",label:e,items:n}}},getValue:B},gn=function(n){function t(){return e}var e=n;return{get:t,set:function(n){e=n},clone:function(){return gn(t())}}},vn=function(n,r){function e(n,t){var e=function(n,t){return"link"===t?n.catalogs.link:"anchor"===t?n.catalogs.anchor:Q.none()}(r,t.name).getOr([]);return W(o.get(),t.name,e,n)}var o=gn(n.text);return{onChange:function(n,t){return"url"===t.name?function(n){if(o.get().length<=0){var t=n.url.meta.text!==undefined?n.url.meta.text:n.url.value,e=n.url.meta.title!==undefined?n.url.meta.title:"";return Q.some({text:t,title:e})}return Q.none()}(n()):I(["anchor","link"],t.name)?e(n(),t):("text"===t.name&&o.set(n().text),Q.none())}}},yn={},wn={exports:yn};H=undefined,$=yn,G=wn,J=undefined,function(n){"object"==typeof $&&void 0!==G?G.exports=n():"function"==typeof H&&H.amd?H([],n):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=n()}(function(){return function l(i,u,c){function a(t,n){if(!u[t]){if(!i[t]){var e="function"==typeof J&&J;if(!n&&e)return e(t,!0);if(f)return f(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var o=u[t]={exports:{}};i[t][0].call(o.exports,function(n){return a(i[t][1][n]||n)},o,o.exports,l,i,u,c)}return u[t].exports}for(var f="function"==typeof J&&J,n=0;n<c.length;n++)a(c[n]);return a}({1:[function(n,t,e){var r,o,i=t.exports={};function u(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function a(n){if(r===setTimeout)return setTimeout(n,0);if((r===u||!r)&&setTimeout)return r=setTimeout,setTimeout(n,0);try{return r(n,0)}catch(t){try{return r.call(null,n,0)}catch(t){return r.call(this,n,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:u}catch(n){r=u}try{o="function"==typeof clearTimeout?clearTimeout:c}catch(n){o=c}}();var f,l=[],s=!1,d=-1;function m(){s&&f&&(s=!1,f.length?l=f.concat(l):d=-1,l.length&&h())}function h(){if(!s){var n=a(m);s=!0;for(var t=l.length;t;){for(f=l,l=[];++d<t;)f&&f[d].run();d=-1,t=l.length}f=null,s=!1,function e(n){if(o===clearTimeout)return clearTimeout(n);if((o===c||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(n);try{return o(n)}catch(t){try{return o.call(null,n)}catch(t){return o.call(this,n)}}}(n)}}function p(n,t){this.fun=n,this.array=t}function g(){}i.nextTick=function(n){var t=new Array(arguments.length-1);if(1<arguments.length)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];l.push(new p(n,t)),1!==l.length||s||a(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(n){return[]},i.binding=function(n){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(n){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(n,s,t){(function(t){function r(){}function i(n){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof n)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],l(n,this)}function o(r,o){for(;3===r._state;)r=r._value;0!==r._state?(r._handled=!0,i._immediateFn(function(){var n=1===r._state?o.onFulfilled:o.onRejected;if(null!==n){var t;try{t=n(r._value)}catch(e){return void c(o.promise,e)}u(o.promise,t)}else(1===r._state?u:c)(o.promise,r._value)})):r._deferreds.push(o)}function u(n,t){try{if(t===n)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var e=t.then;if(t instanceof i)return n._state=3,n._value=t,void a(n);if("function"==typeof e)return void l(function r(n,t){return function(){n.apply(t,arguments)}}(e,t),n)}n._state=1,n._value=t,a(n)}catch(o){c(n,o)}}function c(n,t){n._state=2,n._value=t,a(n)}function a(n){2===n._state&&0===n._deferreds.length&&i._immediateFn(function(){n._handled||i._unhandledRejectionFn(n._value)});for(var t=0,e=n._deferreds.length;t<e;t++)o(n,n._deferreds[t]);n._deferreds=null}function f(n,t,e){this.onFulfilled="function"==typeof n?n:null,this.onRejected="function"==typeof t?t:null,this.promise=e}function l(n,t){var e=!1;try{n(function(n){e||(e=!0,u(t,n))},function(n){e||(e=!0,c(t,n))})}catch(r){if(e)return;e=!0,c(t,r)}}var n,e;n=this,e=setTimeout,i.prototype["catch"]=function(n){return this.then(null,n)},i.prototype.then=function(n,t){var e=new this.constructor(r);return o(this,new f(n,t,e)),e},i.all=function(n){var a=Array.prototype.slice.call(n);return new i(function(o,i){if(0===a.length)return o([]);var u=a.length;function c(t,n){try{if(n&&("object"==typeof n||"function"==typeof n)){var e=n.then;if("function"==typeof e)return void e.call(n,function(n){c(t,n)},i)}a[t]=n,0==--u&&o(a)}catch(r){i(r)}}for(var n=0;n<a.length;n++)c(n,a[n])})},i.resolve=function(t){return t&&"object"==typeof t&&t.constructor===i?t:new i(function(n){n(t)})},i.reject=function(e){return new i(function(n,t){t(e)})},i.race=function(o){return new i(function(n,t){for(var e=0,r=o.length;e<r;e++)o[e].then(n,t)})},i._immediateFn="function"==typeof t?function(n){t(n)}:function(n){e(n,0)},i._unhandledRejectionFn=function(n){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",n)},i._setImmediateFn=function(n){i._immediateFn=n},i._setUnhandledRejectionFn=function(n){i._unhandledRejectionFn=n},void 0!==s&&s.exports?s.exports=i:n.Promise||(n.Promise=i)}).call(this,n("timers").setImmediate)},{timers:3}],3:[function(a,n,f){(function(n,t){var r=a("process/browser.js").nextTick,e=Function.prototype.apply,o=Array.prototype.slice,i={},u=0;function c(n,t){this._id=n,this._clearFn=t}f.setTimeout=function(){return new c(e.call(setTimeout,window,arguments),clearTimeout)},f.setInterval=function(){return new c(e.call(setInterval,window,arguments),clearInterval)},f.clearTimeout=f.clearInterval=function(n){n.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},f.enroll=function(n,t){clearTimeout(n._idleTimeoutId),n._idleTimeout=t},f.unenroll=function(n){clearTimeout(n._idleTimeoutId),n._idleTimeout=-1},f._unrefActive=f.active=function(n){clearTimeout(n._idleTimeoutId);var t=n._idleTimeout;0<=t&&(n._idleTimeoutId=setTimeout(function(){n._onTimeout&&n._onTimeout()},t))},f.setImmediate="function"==typeof n?n:function(n){var t=u++,e=!(arguments.length<2)&&o.call(arguments,1);return i[t]=!0,r(function(){i[t]&&(e?n.apply(null,e):n.call(null),f.clearImmediate(t))}),t},f.clearImmediate="function"==typeof t?t:function(n){delete i[n]}}).call(this,a("timers").setImmediate,a("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(n,t,e){var r=n("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();t.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)});function kn(n){c.setTimeout(function(){throw n},0)}function xn(n){var t=n.href;return 0<t.indexOf("@")&&-1===t.indexOf("//")&&-1===t.indexOf("mailto:")?Q.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:function(n){return T(T({},n),{href:"mailto:"+t})}}):Q.none()}function bn(n,t,e){var r=n.getAttrib(t,e);return null!==r&&0<r.length?Q.some(r):Q.none()}function _n(n,t){return n.dom.getParent(t,"a[href]")}function Tn(n){return _n(n,n.selection.getStart())}function On(n,t){if(t){var e=fn(t);if(/^#/.test(e)){var r=n.$(e);r.length&&n.selection.scrollIntoView(r[0],!0)}else _(t.href)}}var An=wn.exports.boltExport,Cn=function(n){var e=Q.none(),t=[],r=function(n){o()?u(n):t.push(n)},o=function(){return e.isSome()},i=function(n){S(n,u)},u=function(t){e.each(function(n){c.setTimeout(function(){t(n)},0)})};return n(function(n){e=Q.some(n),i(t),t=[]}),{get:r,map:function(e){return Cn(function(t){r(function(n){t(e(n))})})},isReady:o}},Pn={nu:Cn,pure:function(t){return Cn(function(n){n(t)})}},Nn=function(e){function n(n){e().then(n,kn)}return{map:function(n){return Nn(function(){return e().then(n)})},bind:function(t){return Nn(function(){return e().then(function(n){return t(n).toPromise()})})},anonBind:function(n){return Nn(function(){return e().then(function(){return n.toPromise()})})},toLazy:function(){return Pn.nu(n)},toCached:function(){var n=null;return Nn(function(){return null===n&&(n=e()),n})},toPromise:e,get:n}},En=function(n){return Nn(function(){return new An(n)})},In=function(n){return Nn(function(){return An.resolve(n)})},Sn=tinymce.util.Tools.resolve("tinymce.util.Delay"),jn=function(n,r){return L([xn,function(e,r){return function(n){var t=n.href;return 1===e&&!hn(t)||0===e&&/^\s*www[\.|\d\.]/i.test(t)?Q.some({message:"The URL you entered seems to be an external link. Do you want to add the required "+r+":// prefix?",preprocess:function(n){return T(T({},n),{href:r+"://"+t})}}):Q.none()}}(d(n),b(n))],function(n){return n(r)}).fold(function(){return In(r)},function(e){return En(function(t){!function(t,n,e){var r=t.selection.getRng();Sn.setEditorTimeout(t,function(){t.windowManager.confirm(n,function(n){t.selection.setRng(r),e(n)})})}(n,e.message,function(n){t(n?e.preprocess(r):r)})})})},Fn=function(n){var t=n.dom.select("a:not([href])"),e=F(t,function(n){var t=n.name||n.id;return t?[{text:t,value:"#"+t}]:[]});return 0<e.length?Q.some([{text:"None",value:""}].concat(e)):Q.none()},Ln=function(n){var t=y(n);return 0<t.length?pn.sanitize(t):Q.none()},Rn=tinymce.util.Tools.resolve("tinymce.util.XHR"),Dn=function(t){function e(n){return t.convertURL(n.value||n.url,"href")}var n=h(t);return En(function(t){a(n)?Rn.send({url:n,success:function(n){return t(function(n){try{return Q.some(JSON.parse(n))}catch(t){return Q.none()}}(n))},error:function(n){return t(Q.none())}}):s(n)?n(function(n){return t(Q.some(n))}):t(Q.from(n))}).map(function(n){return n.bind(pn.sanitizeWith(e)).map(function(n){return 0<n.length?[{text:"None",value:""}].concat(n):n})})},Un=function(n,t){var e=v(n);if(0<e.length){var r=t.is("_blank");return(!1===k(n)?pn.sanitizeWith(function(n){return mn(pn.getValue(n),r)}):pn.sanitize)(e)}return Q.none()},Mn=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],zn=function(n){var t=g(n);return f(t)?pn.sanitize(t).orThunk(function(){return Q.some(Mn)}):!1===t?Q.none():Q.some(Mn)},qn=function(e,r){return Dn(e).map(function(n){var t=function(n,t){var e=n.dom,r=ln(n.selection.getContent())?Q.some(dn(n.selection,t)):Q.none(),o=t?Q.some(e.getAttrib(t,"href")):Q.none(),i=t?Q.from(e.getAttrib(t,"target")):Q.none(),u=bn(e,t,"rel"),c=bn(e,t,"class");return{url:o,text:r,title:bn(e,t,"title"),target:i,rel:u,linkClass:c}}(e,r);return{anchor:t,catalogs:{targets:zn(e),rels:Un(e,t.target),classes:Ln(e),anchor:Fn(e),link:n},optNode:Q.from(r),flags:{titleEnabled:w(e)}}})},Kn=function(t){(function(n){var t=sn(n);return qn(n,t)})(t).map(function(n){return function(n,t,e){var r=n.anchor.text.map(function(){return{name:"text",type:"input",label:"Text to display"}}).toArray(),o=n.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],i=function(n,t){return{url:{value:n.anchor.url.getOr(""),meta:{attach:function(){},text:n.anchor.url.fold(function(){return""},function(){return n.anchor.text.getOr("")}),original:{value:n.anchor.url.getOr("")}}},text:n.anchor.text.getOr(""),title:n.anchor.title.getOr(""),anchor:n.anchor.url.getOr(""),link:n.anchor.url.getOr(""),rel:n.anchor.rel.getOr(""),target:n.anchor.target.or(t).getOr(""),linkClass:n.anchor.linkClass.getOr("")}}(n,Q.from(p(e))),u=vn(i,n),c=n.catalogs;return{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:j([[{name:"url",type:"urlinput",filetype:"file",label:"URL"}],r,o,function(n){for(var t=[],e=function(n){t.push(n)},r=0;r<n.length;r++)n[r].each(e);return t}([c.anchor.map(pn.createUi("anchor","Anchors")),c.rels.map(pn.createUi("rel","Rel")),c.targets.map(pn.createUi("target","Open link in...")),c.link.map(pn.createUi("link","Link list")),c.classes.map(pn.createUi("linkClass","Class"))])])},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:i,onChange:function(t,n){var e=n.name;u.onChange(t.getData,{name:e}).each(function(n){t.setData(n)})},onSubmit:t}}(n,function(i,u){return function(n){var e=n.getData();if(!e.url.value)return cn(i),void n.close();function t(t){return Q.from(e[t]).filter(function(n){return!u.anchor[t].is(n)})}var r={href:e.url.value,text:t("text"),target:t("target"),rel:t("rel"),"class":t("linkClass"),title:t("title")},o={href:e.url.value,attach:e.url.meta!==undefined&&e.url.meta.attach?e.url.meta.attach:function(){}};jn(i,r).get(function(n){un(i,o,n)}),n.close()}}(t,n),t)}).get(function(n){t.windowManager.open(n)})},Bn=function(n){return function(){Kn(n)}},Vn=function(n){return function(){On(n,Tn(n))}},Wn=function(e){e.on("click",function(n){var t=_n(e,n.target);t&&o.metaKeyPressed(n)&&(n.preventDefault(),On(e,t))}),e.on("keydown",function(n){var t=Tn(e);t&&13===n.keyCode&&function(n){return!0===n.altKey&&!1===n.shiftKey&&!1===n.ctrlKey&&!1===n.metaKey}(n)&&(n.preventDefault(),On(e,t))})},Hn=function(e){return function(t){function n(n){return t.setActive(!e.mode.isReadOnly()&&!!sn(e,n.element))}return e.on("NodeChange",n),function(){return e.off("NodeChange",n)}}},$n=function(r){return function(t){var n=r.dom.getParents(r.selection.getStart());t.setDisabled(!an(n));function e(n){return t.setDisabled(!an(n.parents))}return r.on("NodeChange",e),function(){return r.off("NodeChange",e)}}},Gn=function(n){n.addCommand("mceLink",function(){x(n)?n.fire("contexttoolbar-show",{toolbarKey:"quicklink"}):Bn(n)()})},Jn=function(n){n.addShortcut("Meta+K","",function(){n.execCommand("mceLink")})},Xn=function(n){n.ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",onAction:Bn(n),onSetup:Hn(n)}),n.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:Vn(n),onSetup:$n(n)}),n.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:function(){return cn(n)},onSetup:$n(n)})},Qn=function(n){n.ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:Vn(n),onSetup:$n(n)}),n.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:Bn(n)}),n.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:function(){return cn(n)},onSetup:$n(n)})},Yn=function(t){t.ui.registry.addContextMenu("link",{update:function(n){return an(t.dom.getParents(n,"a"))?"link unlink openlink":"link"}})},Zn=function(i){function n(n){var t=i.selection.getNode();return n.setDisabled(!sn(i,t)),function(){}}i.ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:Hn(i)},label:"Link",predicate:function(n){return!!sn(i,n)&&m(i)},initValue:function(){var n=sn(i);return n?fn(n):""},commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:function(n){var t=i.selection.getNode();return n.setActive(!!sn(i,t)),Hn(i)(n)},onAction:function(n){var t=sn(i),e=n.getValue();if(t)i.dom.setAttrib(t,"href",e),function(n){n.selection.collapse(!1)}(i),n.hide();else{var r={href:e,attach:function(){}},o=ln(i.selection.getContent())?Q.some(dn(i.selection,t)).filter(function(n){return 0<n.length}).or(Q.from(e)):Q.none();un(i,r,{href:e,text:o,title:Q.none(),rel:Q.none(),target:Q.none(),"class":Q.none()}),n.hide()}}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:n,onAction:function(n){cn(i),n.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:n,onAction:function(n){Vn(i)(),n.hide()}}]})};!function nt(){r.add("link",function(n){Xn(n),Qn(n),Yn(n),Zn(n),Wn(n),Gn(n),Jn(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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(r){"use strict";function e(){}function l(e){return function(){return e}}function t(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return!t.apply(null,e)}}function n(){return s}var o,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=l(!1),a=l(!0),s=(o={fold:function(e,n){return e()},is:u,isSome:u,isNone:a,getOr:d,getOrThunk:f,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:l(null),getOrUndefined:l(undefined),or:d,orThunk:f,map:n,each:e,bind:n,exists:u,forall:a,filter:n,equals:c,equals_:c,toArray:function(){return[]},toString:l("none()")},Object.freeze&&Object.freeze(o),o);function c(e){return e.isNone()}function f(e){return e()}function d(e){return e}function m(n){return function(e){return function(e){if(null===e)return"null";var n=typeof e;return"object"==n&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":n}(e)===n}}function g(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}function p(e,n){for(var t=0,r=e.length;t<r;t++){n(e[t],t)}}function v(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}function h(e,n,t){return p(e,function(e){t=n(t,e)}),t}function N(e,n){for(var t=0,r=e.length;t<r;t++){var o=e[t];if(n(o,t))return He.some(o)}return He.none()}function y(e,n){return function(e){for(var n=[],t=0,r=e.length;t<r;++t){if(!qe(e[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+e);ze.apply(n,e[t])}return n}(g(e,n))}function S(e){return 0===e.length?He.none():He.some(e[0])}function O(e){return 0===e.length?He.none():He.some(e[e.length-1])}function C(e,n,t){return 0!=(e.compareDocumentPosition(n)&t)}function b(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};function r(e){return Number(n.replace(t,"$"+e))}return Ze(r(1),r(2))}function L(e,n){return function(){return n===e}}function T(e,n){return function(){return n===e}}function D(e,n){var t=String(n).toLowerCase();return N(e,function(e){return e.search(t)})}function E(e,n){return-1!==e.indexOf(n)}function w(n){return function(e){return E(e,n)}}function k(e,n){return e.dom()===n.dom()}function A(e,n,t){return e.isSome()&&n.isSome()?He.some(t(e.getOrDie(),n.getOrDie())):He.none()}function x(e){return He.from(e.dom().parentNode).map(Ln.fromDom)}function R(e){return g(e.dom().childNodes,Ln.fromDom)}function I(e,n){var t=e.dom().childNodes;return He.from(t[n]).map(Ln.fromDom)}function B(e){return I(e,0)}function P(e){return I(e,e.dom().childNodes.length-1)}function _(n,t){x(n).each(function(e){e.dom().insertBefore(t.dom(),n.dom())})}function M(e,n){e.dom().appendChild(n.dom())}function U(n,e){p(e,function(e){M(n,e)})}function F(e){var n=e.dom();null!==n.parentNode&&n.parentNode.removeChild(n)}function j(e,n,t){return e.fire("ListMutation",{action:n,element:t})}function H(e,n){return function(e,n){for(var t=n!==undefined&&null!==n?n:In,r=0;r<e.length&&t!==undefined&&null!==t;++r)t=t[e[r]];return t}(e.split("."),n)}function $(e){return e&&"BR"===e.nodeName}function q(e){var n=e.selection.getStart(!0);return e.dom.getParent(n,"OL,UL,DL",Gn(e,n))}function W(e){var n=e.selection.getSelectedBlocks();return Mn.grep(function(t,e){var n=Mn.map(e,function(e){var n=t.dom.getParent(e,"li,dd,dt",Gn(t,e));return n||e});return _n.unique(n)}(e,n),function(e){return $n(e)})}function V(e,n){var t=e.dom.getParents(n,"ol,ul",Gn(e,n));return O(t)}function K(e,n){var t,r,o,i=e.dom,u=e.schema.getBlockElements(),a=i.createFragment(),s=nt(e);if(s&&((r=i.create(s)).tagName===s.toUpperCase()&&i.setAttribs(r,tt(e)),Xn(n.firstChild,u)||a.appendChild(r)),n)for(;t=n.firstChild;){var c=t.nodeName;o||"SPAN"===c&&"bookmark"===t.getAttribute("data-mce-type")||(o=!0),Xn(t,u)?(a.appendChild(t),r=null):s?(r||(r=i.create(s),a.appendChild(r)),r.appendChild(t)):a.appendChild(t)}return s?o||r.appendChild(i.create("br",{"data-mce-bogus":"1"})):a.appendChild(i.create("br")),a}function X(e){return e.dom().nodeName.toLowerCase()}function z(e,n){var t=e.dom();!function(e,n){for(var t=Rn(e),r=0,o=t.length;r<o;r++){var i=t[r];n(e[i],i)}}(n,function(e,n){!function(e,n,t){if(!($e(t)||We(t)||Ke(t)))throw r.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)})}function Q(e){return h(e.dom().attributes,function(e,n){return e[n.name]=n.value,e},{})}function Y(e,n,t){if(!$e(t))throw r.console.error("Invalid call to CSS.set. Property ",n,":: Value ",t,":: Element ",e),new Error("CSS value must be a string: "+t);!function(e){return e.style!==undefined&&Ve(e.style.getPropertyValue)}(e)||e.style.setProperty(n,t)}function G(e){return function(e,n){return Ln.fromDom(e.dom().cloneNode(n))}(e,!0)}function J(e,n){var t=function(e,n){var t=Ln.fromTag(n),r=Q(e);return z(t,r),t}(e,n);_(e,t);var r=R(e);return U(t,r),F(e),t}function Z(e,n){M(e.item,n.list)}function ee(n,e,t){var r=e.slice(0,t.depth);return O(r).each(function(e){!function(e,n){M(e.list,n),e.item=n}(e,function(e,n,t){var r=Ln.fromTag("li",e);return z(r,n),U(r,t),r}(n,t.itemAttributes,t.content)),function(e,n){X(e.list)!==n.listType&&(e.list=J(e.list,n.listType)),z(e.list,n.listAttributes)}(e,t)}),r}function ne(e,n,t){var r=function(e,n,t){for(var r,o,i,u=[],a=0;a<t;a++)u.push((r=e,o=n.listType,void 0,i={list:Ln.fromTag(o,r),item:Ln.fromTag("li",r)},M(i.list,i.item),i));return u}(e,t,t.depth-n.length);return function(e){for(var n=1;n<e.length;n++)Z(e[n-1],e[n])}(r),function(e,n){for(var t=0;t<e.length-1;t++)r=e[t].item,o="list-style-type",i="none",void 0,u=r.dom(),Y(u,o,i);var r,o,i,u;O(e).each(function(e){z(e.list,n.listAttributes),z(e.item,n.itemAttributes),U(e.item,n.content)})}(r,t),function(e,n){A(O(e),S(n),Z)}(n,r),n.concat(r)}function te(e){return wn(e,"OL,UL")}function re(e){return B(e).map(te).getOr(!1)}function oe(e){return 0<e.depth}function ie(e){return e.isSelected}function ue(e){var n=R(e),t=function(e){return P(e).map(te).getOr(!1)}(e)?n.slice(0,-1):n;return g(t,G)}function ae(t){p(t,function(n,e){(function(e,n){for(var t=e[n].depth,r=n-1;0<=r;r--){if(e[r].depth===t)return He.some(e[r]);if(e[r].depth<t)break}return He.none()})(t,e).each(function(e){!function(e,n){e.listType=n.listType,e.listAttributes=Ye({},n.listAttributes)}(n,e)})})}function se(t,r,o,i){return B(i).filter(te).fold(function(){r.each(function(e){k(e.start,i)&&o.set(!0)});var e=function(n,t,r){return x(n).filter(rt).map(function(e){return{depth:t,isSelected:r,content:ue(n),itemAttributes:Q(n),listAttributes:Q(e),listType:X(e)}})}(i,t,o.get());r.each(function(e){k(e.end,i)&&o.set(!1)});var n=P(i).filter(te).map(function(e){return ot(t,r,o,e)}).getOr([]);return e.toArray().concat(n)},function(e){return ot(t,r,o,e)})}function ce(t,e){return g(e,function(e){var n=function(e,n){var t=(n||r.document).createDocumentFragment();return p(e,function(e){t.appendChild(e.dom())}),Ln.fromDom(t)}(e.content);return Ln.fromDom(K(t,n.dom()))})}function fe(e,n){return ae(n),function(t,e){var n=h(e,function(e,n){return n.depth>e.length?ne(t,e,n):ee(t,e,n)},[]);return S(n).map(function(e){return e.list})}(e.contentDocument,n).toArray()}function de(e){var n=g(Zn.getSelectedListItems(e),Ln.fromDom);return A(N(n,t(re)),N(function(e){var n=Xe.call(e,0);return n.reverse(),n}(n),t(re)),function(e,n){return{start:e,end:n}})}function le(t,e,r){var n=function(e,n){var t=Ge(!1);return g(e,function(e){return{sourceList:e,entries:ot(0,n,t,e)}})}(e,de(t));p(n,function(e){!function(e,n){p(v(e,ie),function(e){return function(e,n){switch(e){case"Indent":n.depth++;break;case"Outdent":n.depth--;break;case"Flatten":n.depth=0}}(n,e)})}(e.entries,r);var n=function(n,e){return y(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}(e,oe),function(e){return S(e).map(oe).getOr(!1)?fe(n,e):ce(n,e)})}(t,e.entries);p(n,function(e){j(t,"Indent"===r?"IndentList":"OutdentList",e.dom())}),function(n,e){p(e,function(e){_(n,e)})}(e.sourceList,n),F(e.sourceList)})}function me(e){wn(e,"dt")&&J(e,"dd")}function ge(n,e,t){p(t,"Indent"===e?me:function(e){return function(n,t){wn(t,"dd")?J(t,"dt"):wn(t,"dt")&&x(t).each(function(e){return at(n,e.dom(),t.dom())})}(n,e)})}function pe(e,n){if(Un(e))return{container:e,offset:n};var t=kn.getNode(e,n);return Un(t)?{container:t,offset:n>=e.childNodes.length?t.data.length:0}:t.previousSibling&&Un(t.previousSibling)?{container:t.previousSibling,offset:t.previousSibling.data.length}:t.nextSibling&&Un(t.nextSibling)?{container:t.nextSibling,offset:0}:{container:e,offset:n}}function ve(e,n){var t=g(Zn.getSelectedListRoots(e),Ln.fromDom),r=g(Zn.getSelectedDlItems(e),Ln.fromDom),o=!1;if(t.length||r.length){var i=e.selection.getBookmark();le(e,t,n),ge(e,n,r),e.selection.moveToBookmark(i),e.selection.setRng(st(e.selection.getRng())),e.nodeChanged(),o=!0}return o}function he(e){return ve(e,"Indent")}function Ne(e){return ve(e,"Outdent")}function ye(e){return ve(e,"Flatten")}function Se(e){return/\btox\-/.test(e.className)}function Oe(e){switch(e){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}}function Ce(t,e){Mn.each(e,function(e,n){t.setAttribute(n,e)})}function be(e,n,t){!function(e,n,t){var r=t["list-style-type"]?t["list-style-type"]:null;e.setStyle(n,"list-style-type",r)}(e,n,t),function(e,n,t){Ce(n,t["list-attributes"]),Mn.each(e.select("li",n),function(e){Ce(e,t["list-item-attributes"])})}(e,n,t)}function Le(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&&Wn(o.nextSibling)&&(o=o.nextSibling);o.parentNode!==r;){if(Kn(e,o))return o;if(/^(TD|TH)$/.test(o.parentNode.nodeName))return o;o=o.parentNode}return o}function Te(r,o,i){void 0===i&&(i={});var e,n=r.selection.getRng(!0),u="LI",t=Zn.getClosestListRootElm(r,r.selection.getStart(!0)),a=r.dom;"false"!==a.getContentEditable(r.selection.getNode())&&("DL"===(o=o.toUpperCase())&&(u="DT"),e=dt(n),Mn.each(function(t,e,r){for(var o,i=[],u=t.dom,n=Le(t,e,!0,r),a=Le(t,e,!1,r),s=[],c=n;c&&(s.push(c),c!==a);c=c.nextSibling);return Mn.each(s,function(e){if(Kn(t,e))return i.push(e),void(o=null);if(u.isBlock(e)||Wn(e))return Wn(e)&&u.remove(e),void(o=null);var n=e.nextSibling;ct.isBookmarkNode(e)&&(Kn(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}(r,n,t),function(e){var n,t;(t=e.previousSibling)&&Fn(t)&&t.nodeName===o&&function(e,n,t){var r=e.getStyle(n,"list-style-type"),o=t?t["list-style-type"]:"";return r===(o=null===o?"":o)}(a,t,i)?(n=t,e=a.rename(e,u),t.appendChild(e)):(n=a.create(o),e.parentNode.insertBefore(n,e),n.appendChild(e),e=a.rename(e,u)),function(t,r,e){Mn.each(e,function(e){var n;return t.setStyle(r,((n={})[e]="",n))})}(a,e,["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"]),be(a,n,i),mt(r.dom,n)}),r.selection.setRng(lt(e)))}function De(e,n,t){return function(e,n){return e&&n&&Fn(e)&&e.nodeName===n.nodeName}(n,t)&&function(e,n,t){return e.getStyle(n,"list-style-type",!0)===e.getStyle(t,"list-style-type",!0)}(e,n,t)&&function(e,n){return e.className===n.className}(n,t)}function Ee(n,e,t,r,o){if(e.nodeName!==r||gt(o)){var i=dt(n.selection.getRng(!0));Mn.each([e].concat(t),function(e){!function(e,n,t,r){if(n.nodeName!==t){var o=e.dom.rename(n,t);be(e.dom,o,r),j(e,Oe(t),o)}else be(e.dom,n,r),j(e,Oe(t),n)}(n,e,r,o)}),n.selection.setRng(lt(i))}else ye(n)}function we(e,n){var t,r=n.parentNode;"LI"===r.nodeName&&r.firstChild===n&&((t=r.previousSibling)&&"LI"===t.nodeName?(t.appendChild(n),Qn(e,r)&&vt.remove(r)):vt.setStyle(r,"listStyleType","none")),Fn(r)&&(t=r.previousSibling)&&"LI"===t.nodeName&&t.appendChild(n)}function ke(e,n,t,r){var o=n.startContainer,i=n.startOffset;if(Un(o)&&(t?i<o.data.length:0<i))return o;var u=e.schema.getNonEmptyElements();1===o.nodeType&&(o=kn.getNode(o,i));var a=new An(o,r);for(t&&zn(e.dom,o)&&a.next();o=a[t?"next":"prev2"]();){if("LI"===o.nodeName&&!o.hasChildNodes())return o;if(u[o.nodeName])return o;if(Un(o)&&0<o.data.length)return o}}function Ae(e,n){var t=n.childNodes;return 1===t.length&&!Fn(t[0])&&e.isBlock(t[0])}function xe(e,n,t){var r,o;if(o=Ae(e,t)?t.firstChild:t,function(e,n){Ae(e,n)&&e.remove(n.firstChild,!0)}(e,n),!Qn(e,n,!0))for(;r=n.firstChild;)o.appendChild(r)}function Re(n,e,t){var r,o,i=e.parentNode;if(Yn(n,e)&&Yn(n,t)){Fn(t.lastChild)&&(o=t.lastChild),i===t.lastChild&&Wn(i.previousSibling)&&n.remove(i.previousSibling),(r=t.lastChild)&&Wn(r)&&e.hasChildNodes()&&n.remove(r),Qn(n,t,!0)&&n.$(t).empty(),xe(n,e,t),o&&t.appendChild(o);var u=En(Ln.fromDom(t),Ln.fromDom(e))?n.getParents(e,Fn,t):[];n.remove(e),p(u,function(e){Qn(n,e)&&e!==n.getRoot()&&n.remove(e)})}}function Ie(e,n,t,r){var o=e.dom;if(o.isEmpty(r))!function(e,n,t){e.dom.$(t).empty(),Re(e.dom,n,t),e.selection.setCursorLocation(t)}(e,t,r);else{var i=dt(n);Re(o,t,r),e.selection.setRng(lt(i))}}function Be(e,n){var t=e.dom,r=e.selection,o=r.getStart(),i=Zn.getClosestListRootElm(e,o),u=t.getParent(r.getStart(),"LI",i);if(u){var a=u.parentNode;if(a===e.getBody()&&Qn(t,a))return!0;var s=st(r.getRng()),c=t.getParent(ke(e,s,n,i),"LI",i);if(c&&c!==u)return e.undoManager.transact(function(){n?Ie(e,s,c,u):Vn(u)?Ne(e):function(e,n,t,r){var o=dt(n);Re(e.dom,t,r);var i=lt(o);e.selection.setRng(i)}(e,s,u,c)}),!0;if(!c&&!n&&0===s.startOffset&&0===s.endOffset)return e.undoManager.transact(function(){ye(e)}),!0}return!1}function Pe(e,n){return Be(e,n)||function(e,n){var t=e.dom,r=e.selection.getStart(),o=Zn.getClosestListRootElm(e,r),i=t.getParent(r,t.isBlock,o);if(i&&t.isEmpty(i)){var u=st(e.selection.getRng()),a=t.getParent(ke(e,u,n,o),"LI",o);if(a)return e.undoManager.transact(function(){!function(e,n,t){var r=e.getParent(n.parentNode,e.isBlock,t);e.remove(n),r&&e.isEmpty(r)&&e.remove(r)}(t,i,o),pt.mergeWithAdjacentLists(t,a.parentNode),e.selection.select(a,!0),e.selection.collapse(n)}),!0}return!1}(e,n)}function _e(e,n){return e.selection.isCollapsed()?Pe(e,n):function(e){var n=e.selection.getStart(),t=Zn.getClosestListRootElm(e,n);return!!(e.dom.getParent(n,"LI,DT,DD",t)||0<Zn.getSelectedListItems(e).length)&&(e.undoManager.transact(function(){e.execCommand("Delete"),ht(e.dom,e.getBody())}),!0)}(e)}function Me(n,t){return function(){var e=n.dom.getParent(n.selection.getStart(),"UL,OL,DL");return e&&e.nodeName===t}}function Ue(n,i){return function(o){function e(e){var n=function(e,n){for(var t=0;t<e.length;t++){if(n(e[t]))return t}return-1}(e.parents,qn),t=-1!==n?e.parents.slice(0,n):e.parents,r=Mn.grep(t,Fn);o.setActive(0<r.length&&r[0].nodeName===i&&!Se(r[0]))}return n.on("NodeChange",e),function(){return n.off("NodeChange",e)}}}var Fe,je=function(t){function e(){return o}function n(e){return e(t)}var r=l(t),o={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:a,isNone:u,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:e,orThunk:e,map:function(e){return je(e(t))},each:function(e){e(t)},bind:n,exists:n,forall:n,filter:function(e){return e(t)?o:s},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(u,function(e){return n(t,e)})}};return o},He={some:je,none:n,from:function(e){return null===e||e===undefined?s:je(e)}},$e=m("string"),qe=m("array"),We=m("boolean"),Ve=m("function"),Ke=m("number"),Xe=Array.prototype.slice,ze=Array.prototype.push,Qe=(Ve(Array.from)&&Array.from,function(e,n){return C(e,n,r.Node.DOCUMENT_POSITION_CONTAINED_BY)}),Ye=function(){return(Ye=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)},Ge=function(e){function n(){return t}var t=e;return{get:n,set:function(e){t=e},clone:function(){return Ge(n())}}},Je=function(){return Ze(0,0)},Ze=function(e,n){return{major:e,minor:n}},en={nu:Ze,detect:function(e,n){var t=String(n).toLowerCase();return 0===e.length?Je():b(e,t)},unknown:Je},nn="Edge",tn="Chrome",rn="Opera",on="Firefox",un="Safari",an=function(e){var n=e.current;return{current:n,version:e.version,isEdge:L(nn,n),isChrome:L(tn,n),isIE:L("IE",n),isOpera:L(rn,n),isFirefox:L(on,n),isSafari:L(un,n)}},sn={unknown:function(){return an({current:undefined,version:en.unknown()})},nu:an,edge:l(nn),chrome:l(tn),ie:l("IE"),opera:l(rn),firefox:l(on),safari:l(un)},cn="Windows",fn="Android",dn="Solaris",ln="FreeBSD",mn="ChromeOS",gn=function(e){var n=e.current;return{current:n,version:e.version,isWindows:T(cn,n),isiOS:T("iOS",n),isAndroid:T(fn,n),isOSX:T("OSX",n),isLinux:T("Linux",n),isSolaris:T(dn,n),isFreeBSD:T(ln,n),isChromeOS:T(mn,n)}},pn={unknown:function(){return gn({current:undefined,version:en.unknown()})},nu:gn,windows:l(cn),ios:l("iOS"),android:l(fn),linux:l("Linux"),osx:l("OSX"),solaris:l(dn),freebsd:l(ln),chromeos:l(mn)},vn=function(e,t){return D(e,t).map(function(e){var n=en.detect(e.versionRegexes,t);return{current:e.name,version:n}})},hn=function(e,t){return D(e,t).map(function(e){var n=en.detect(e.versionRegexes,t);return{current:e.name,version:n}})},Nn=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,yn=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return E(e,"edge/")&&E(e,"chrome")&&E(e,"safari")&&E(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Nn],search:function(e){return E(e,"chrome")&&!E(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return E(e,"msie")||E(e,"trident")}},{name:"Opera",versionRegexes:[Nn,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:w("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:w("firefox")},{name:"Safari",versionRegexes:[Nn,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(E(e,"safari")||E(e,"mobile/"))&&E(e,"applewebkit")}}],Sn=[{name:"Windows",search:w("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return E(e,"iphone")||E(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:w("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:w("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:w("linux"),versionRegexes:[]},{name:"Solaris",search:w("sunos"),versionRegexes:[]},{name:"FreeBSD",search:w("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:w("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],On={browsers:l(yn),oses:l(Sn)},Cn=Ge(function(e,n){var t=On.browsers(),r=On.oses(),o=vn(t,e).fold(sn.unknown,sn.nu),i=hn(r,e).fold(pn.unknown,pn.nu);return{browser:o,os:i,deviceType:function(e,n,t,r){var o=e.isiOS()&&!0===/ipad/i.test(t),i=e.isiOS()&&!o,u=e.isiOS()||e.isAndroid(),a=u||r("(pointer:coarse)"),s=o||!i&&u&&r("(min-device-width:768px)"),c=i||u&&!s,f=n.isSafari()&&e.isiOS()&&!1===/safari/i.test(t),d=!c&&!s&&!f;return{isiPad:l(o),isiPhone:l(i),isTablet:l(s),isPhone:l(c),isTouch:l(a),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:l(f),isDesktop:l(d)}}(i,o,e,n)}}(r.navigator.userAgent,function(e){return r.window.matchMedia(e).matches})),bn=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:l(e)}},Ln={fromHtml:function(e,n){var t=(n||r.document).createElement("div");if(t.innerHTML=e,!t.hasChildNodes()||1<t.childNodes.length)throw r.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return bn(t.childNodes[0])},fromTag:function(e,n){var t=(n||r.document).createElement(e);return bn(t)},fromText:function(e,n){var t=(n||r.document).createTextNode(e);return bn(t)},fromDom:bn,fromPoint:function(e,n,t){var r=e.dom();return He.from(r.elementFromPoint(n,t)).map(bn)}},Tn=(r.Node.ATTRIBUTE_NODE,r.Node.CDATA_SECTION_NODE,r.Node.COMMENT_NODE,r.Node.DOCUMENT_NODE,r.Node.DOCUMENT_TYPE_NODE,r.Node.DOCUMENT_FRAGMENT_NODE,r.Node.ELEMENT_NODE),Dn=(r.Node.TEXT_NODE,r.Node.PROCESSING_INSTRUCTION_NODE,r.Node.ENTITY_REFERENCE_NODE,r.Node.ENTITY_NODE,r.Node.NOTATION_NODE,Tn),En=Cn.get().browser.isIE()?function(e,n){return Qe(e.dom(),n.dom())}:function(e,n){var t=e.dom(),r=n.dom();return t!==r&&t.contains(r)},wn=function(e,n){var t=e.dom();if(t.nodeType!==Dn)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")},kn=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),An=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),xn=tinymce.util.Tools.resolve("tinymce.util.VK"),Rn=Object.keys,In=(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n]}("element","offset"),"undefined"!=typeof r.window?r.window:Function("return this;")()),Bn=function(e,n){var t=function(e,n){return H(e,n)}(e,n);if(t===undefined||null===t)throw new Error(e+" not available on this browser");return t},Pn=function(e){return function(e){return Bn("HTMLElement",e)}(H("ownerDocument.defaultView",e)).prototype.isPrototypeOf(e)},_n=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),Mn=tinymce.util.Tools.resolve("tinymce.util.Tools"),Un=function(e){return e&&3===e.nodeType},Fn=function(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)},jn=function(e){return e&&/^(OL|UL)$/.test(e.nodeName)},Hn=function(e){return e&&/^(DT|DD)$/.test(e.nodeName)},$n=function(e){return e&&/^(LI|DT|DD)$/.test(e.nodeName)},qn=function(e){return e&&/^(TH|TD)$/.test(e.nodeName)},Wn=$,Vn=function(e){return e.parentNode.firstChild===e},Kn=function(e,n){return n&&!!e.schema.getTextBlockElements()[n.nodeName]},Xn=function(e,n){return e&&e.nodeName in n},zn=function(e,n){return!!$(n)&&!(!e.isBlock(n.nextSibling)||$(n.previousSibling))},Qn=function(e,n,t){var r=e.isEmpty(n);return!(t&&0<e.select("span[data-mce-type=bookmark]",n).length)&&r},Yn=function(e,n){return e.isChildOf(n,e.getRoot())},Gn=function(e,n){var t=e.dom.getParents(n,"TD,TH");return 0<t.length?t[0]:e.getBody()},Jn=function(n,e){var t=g(e,function(e){return V(n,e).getOr(e)});return _n.unique(t)},Zn={isList:function(e){var n=q(e);return Pn(n)},getParentList:q,getSelectedSubLists:function(e){var n=q(e),t=e.selection.getSelectedBlocks();return function(e,n){return e&&1===n.length&&n[0]===e}(n,t)?function(e){return Mn.grep(e.querySelectorAll("ol,ul,dl"),function(e){return Fn(e)})}(n):Mn.grep(t,function(e){return Fn(e)&&n!==e})},getSelectedListItems:W,getClosestListRootElm:Gn,getSelectedDlItems:function(e){return v(W(e),Hn)},getSelectedListRoots:function(e){var n=function(e){var n=V(e,e.selection.getStart()),t=v(e.selection.getSelectedBlocks(),jn);return n.toArray().concat(t)}(e);return Jn(e,n)}},et=function(e){return e.getParam("lists_indent_on_tab",!0)},nt=function(e){var n=e.getParam("forced_root_block","p");return!1===n?"":!0===n?"p":n},tt=function(e){return e.getParam("forced_root_block_attrs",{})},rt=(Fe=Tn,function(e){return function(e){return e.dom().nodeType}(e)===Fe}),ot=function(n,t,r,e){return y(R(e),function(e){return(te(e)?ot:se)(n+1,t,r,e)})},it=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),ut=it.DOM,at=function(e,n,t){var r,o,i,u,a,s;for(i=ut.select('span[data-mce-type="bookmark"]',n),a=K(e,t),(r=ut.createRng()).setStartAfter(t),r.setEndAfter(n),u=(o=r.extractContents()).firstChild;u;u=u.firstChild)if("LI"===u.nodeName&&e.dom.isEmpty(u)){ut.remove(u);break}e.dom.isEmpty(o)||ut.insertAfter(o,n),ut.insertAfter(a,n),Qn(e.dom,t.parentNode)&&(s=t.parentNode,Mn.each(i,function(e){s.parentNode.insertBefore(e,t.parentNode)}),ut.remove(s)),ut.remove(t),Qn(e.dom,n)&&ut.remove(n)},st=function(e){var n=e.cloneRange(),t=pe(e.startContainer,e.startOffset);n.setStart(t.container,t.offset);var r=pe(e.endContainer,e.endOffset);return n.setEnd(r.container,r.offset),n},ct=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),ft=it.DOM,dt=function(o){function e(e){var n,t,r;t=o[e?"startContainer":"endContainer"],r=o[e?"startOffset":"endOffset"],1===t.nodeType&&(n=ft.create("span",{"data-mce-type":"bookmark"}),t.hasChildNodes()?(r=Math.min(r,t.childNodes.length-1),e?t.insertBefore(n,t.childNodes[r]):ft.insertAfter(n,t.childNodes[r])):t.appendChild(n),t=n,r=0),i[e?"startContainer":"endContainer"]=t,i[e?"startOffset":"endOffset"]=r}var i={};return e(!0),o.collapsed||e(),i},lt=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,ft.remove(r),!n.hasChildNodes()&&ft.isBlock(n)&&n.appendChild(ft.create("br"))),o[e?"startContainer":"endContainer"]=n,o[e?"startOffset":"endOffset"]=t)}e(!0),e();var n=ft.createRng();return n.setStart(o.startContainer,o.startOffset),o.endContainer&&n.setEnd(o.endContainer,o.endOffset),st(n)},mt=function(e,n){var t,r;if(t=n.nextSibling,De(e,n,t)){for(;r=t.firstChild;)n.appendChild(r);e.remove(t)}if(t=n.previousSibling,De(e,n,t)){for(;r=t.lastChild;)n.insertBefore(r,n.firstChild);e.remove(t)}},gt=function(e){return"list-style-type"in e},pt={toggleList:function(e,n,t){var r=Zn.getParentList(e),o=Zn.getSelectedSubLists(e);t=t||{},r&&0<o.length?Ee(e,r,o,n,t):function(e,n,t,r){if(n!==e.getBody())if(n)if(n.nodeName!==t||gt(r)||Se(n)){var o=dt(e.selection.getRng(!0));be(e.dom,n,r);var i=e.dom.rename(n,t);mt(e.dom,i),e.selection.setRng(lt(o)),j(e,Oe(t),i)}else ye(e);else Te(e,t,r),j(e,Oe(t),n)}(e,r,n,t)},mergeWithAdjacentLists:mt},vt=it.DOM,ht=function(n,e){Mn.each(Mn.grep(n.select("ol,ul",e)),function(e){we(n,e)})},Nt=function(n){n.on("keydown",function(e){e.keyCode===xn.BACKSPACE?_e(n,!1)&&e.preventDefault():e.keyCode===xn.DELETE&&_e(n,!0)&&e.preventDefault()})},yt=_e,St=function(n){return{backspaceDelete:function(e){yt(n,e)}}},Ot=function(t){t.on("BeforeExecCommand",function(e){var n=e.command.toLowerCase();"indent"===n?he(t):"outdent"===n&&Ne(t)}),t.addCommand("InsertUnorderedList",function(e,n){pt.toggleList(t,"UL",n)}),t.addCommand("InsertOrderedList",function(e,n){pt.toggleList(t,"OL",n)}),t.addCommand("InsertDefinitionList",function(e,n){pt.toggleList(t,"DL",n)}),t.addCommand("RemoveList",function(){ye(t)}),t.addQueryStateHandler("InsertUnorderedList",Me(t,"UL")),t.addQueryStateHandler("InsertOrderedList",Me(t,"OL")),t.addQueryStateHandler("InsertDefinitionList",Me(t,"DL"))},Ct=function(e){et(e)&&function(n){n.on("keydown",function(e){e.keyCode!==xn.TAB||xn.metaKeyPressed(e)||n.undoManager.transact(function(){(e.shiftKey?Ne(n):he(n))&&e.preventDefault()})})}(e),Nt(e)},bt=function(n){function e(e){return function(){return n.execCommand(e)}}var t,r,o;r="advlist",o=(t=n).settings.plugins?t.settings.plugins:"",-1===Mn.inArray(o.split(/[ ,]/),r)&&(n.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:e("InsertOrderedList"),onSetup:Ue(n,"OL")}),n.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:e("InsertUnorderedList"),onSetup:Ue(n,"UL")}))};!function Lt(){i.add("lists",function(e){return Ct(e),bt(e),Ot(e),St(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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
- !function(){"use strict";function e(){}function o(e){return function(){return e}}function t(){return u}var r,n=tinymce.util.Tools.resolve("tinymce.PluginManager"),m=function(){return(m=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=o(!1),c=o(!0),u=(r={fold:function(e,t){return e()},is:a,isSome:a,isNone:c,getOr:l,getOrThunk:s,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(undefined),or:l,orThunk:s,map:t,each:e,bind:t,exists:a,forall:c,filter:t,equals:i,equals_:i,toArray:function(){return[]},toString:o("none()")},Object.freeze&&Object.freeze(r),r);function i(e){return e.isNone()}function s(e){return e()}function l(e){return e}function d(t){return function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"==t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t}(e)===t}}function f(e,t){for(var r=0,n=e.length;r<n;r++){t(e[r],r)}}function h(e,t){return I(e,t)?$.from(e[t]):$.none()}function p(t){return function(e){return e?function(e){return e.replace(/px$/,"")}(e.style[t]):""}}function g(r){return function(e,t){e&&(e.style[r]=function(e){return/^[0-9.]+$/.test(e)?e+"px":e}(t))}}function v(e,t){if(e)for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r].filter))return e[r]}function b(e){return ne.getAttrib(e,"data-ephox-embed-iri")}function w(e,t){return function(e){var t=ne.createFragment(e);return""!==b(t.firstChild)}(t)?function(e){var t=ne.createFragment(e).firstChild;return{type:"ephox-embed-iri",source:b(t),altsource:"",poster:"",width:re.getMaxWidth(t),height:re.getMaxHeight(t)}}(t):function(n,e){var i={};return ee({validate:!1,allow_conditional_comments:!0,start:function(e,t){if(i.source||"param"!==e||(i.source=t.map.movie),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(i.type||(i.type=e),i=Z.extend(t.map,i)),"script"===e){var r=v(n,t.map.src);if(!r)return;i={type:"script",source:t.map.src,width:String(r.width),height:String(r.height)}}"source"===e&&(i.source?i.altsource||(i.altsource=t.map.src):i.source=t.map.src),"img"!==e||i.poster||(i.poster=t.map.src)}}).parse(e),i.source=i.source||i.src||i.data,i.altsource=i.altsource||"",i.poster=i.poster||"",i}(e,t)}function y(e,t){var r,n,i,o;for(r in t)if(i=""+t[r],e.map[r])for(n=e.length;n--;)(o=e[n]).name===r&&(i?(e.map[r]=i,o.value=i):(delete e.map[r],e.splice(n,1)));else i&&(e.push({name:r,value:i}),e.map[r]=i)}function x(e,t){var r=ce.createFragment(e).firstChild;return re.setMaxWidth(r,t.width),re.setMaxHeight(r,t.height),function(e){var t=oe();return ee(t).parse(e),t.getContent()}(r.outerHTML)}function j(r,e){var n=Z.extend({},e);if(!n.source&&(Z.extend(n,w(q(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=ie(n.source),n.altsourcemime=ie(n.altsource),n.poster=r.convertURL(n.poster,"poster");var t=function(t){var e=le.filter(function(e){return e.regex.test(t)});return 0<e.length?Z.extend({},e[0],{url:function(e,t){for(var r=function(e){var t=e.match(/^(https?:\/\/|www\.)(.+)$/i);return t&&1<t.length?"www."===t[1]?"https://":t[1]:"https://"}(t),n=e.regex.exec(t),i=r+e.url,o=function(e){i=i.replace("$"+e,function(){return n[e]?n[e]:""})},a=0;a<n.length;a++)o(a);return i.replace(/\?$/,"")}(e[0],t)}):null}(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 se(n.embed,n,!0);var i=v(q(r),n.source);i&&(n.type="script",n.width=String(i.width),n.height=String(i.height));var o=B(r),a=G(r);return n.width=n.width||"300",n.height=n.height||"150",Z.each(n,function(e,t){n[t]=r.dom.encode(""+e)}),"iframe"===n.type?function(e){var t=e.allowFullscreen?' allowFullscreen="1"':"";return'<iframe src="'+e.source+'" width="'+e.width+'" height="'+e.height+'"'+t+"></iframe>"}(n):"application/x-shockwave-flash"===n.sourcemime?function(e){var t='<object data="'+e.source+'" width="'+e.width+'" height="'+e.height+'" type="application/x-shockwave-flash">';return e.poster&&(t+='<img src="'+e.poster+'" width="'+e.width+'" height="'+e.height+'" />'),t+="</object>"}(n):-1!==n.sourcemime.indexOf("audio")?function(e,t){return t?t(e):'<audio controls="controls" src="'+e.source+'">'+(e.altsource?'\n<source src="'+e.altsource+'"'+(e.altsourcemime?' type="'+e.altsourcemime+'"':"")+" />\n":"")+"</audio>"}(n,o):"script"===n.type?function(e){return'<script src="'+e.source+'"><\/script>'}(n):function(e,t){return t?t(e):'<video width="'+e.width+'" height="'+e.height+'"'+(e.poster?' poster="'+e.poster+'"':"")+' controls="controls">\n<source src="'+e.source+'"'+(e.sourcemime?' type="'+e.sourcemime+'"':"")+" />\n"+(e.altsource?'<source src="'+e.altsource+'"'+(e.altsourcemime?' type="'+e.altsourcemime+'"':"")+" />\n":"")+"</video>"}(n,a)}function O(t){return function(e){return j(t,e)}}function S(e,t){var r=t?function(e,t){return h(t,e).bind(function(e){return h(e,"meta")})}(t,e).getOr({}):{},n=function(o,a,c){return function(e){function t(){return h(o,e)}function r(){return h(a,e)}function n(e){return h(e,"value").bind(function(e){return 0<e.length?$.some(e):$.none()})}var i;return(i={})[e]=(e===c?t().bind(function(e){return N(e)?n(e).orThunk(r):r().orThunk(function(){return $.from(e)})}):r().orThunk(function(){return t().bind(function(e){return N(e)?n(e):$.from(e)})})).getOr(""),i}}(e,r,t);return m(m(m(m(m({},n("source")),n("altsource")),n("poster")),n("embed")),function(e,r){var n={};return h(e,"dimensions").each(function(e){f(["width","height"],function(t){h(r,t).orThunk(function(){return h(e,t)}).each(function(e){return n[t]=e})})}),n}(e,r))}function _(e){var n=m(m({},e),{source:{value:h(e,"source").getOr("")},altsource:{value:h(e,"altsource").getOr("")},poster:{value:h(e,"poster").getOr("")}});return f(["width","height"],function(r){h(e,r).each(function(e){var t=n.dimensions||{};t[r]=e,n.dimensions=t})}),n}function A(r){return function(e){var t=e&&e.msg?"Media embed handler error: "+e.msg:"Media embed handler threw unknown error.";r.notificationManager.open({type:"error",text:t})}}function C(e,t){return w(q(e),t)}function M(i,o){return function(e){if(z(e.url)&&0<e.url.trim().length){var t=e.html,r=C(o,t),n=m(m({},r),{source:e.url,embed:t});i.setData(_(n))}}}function k(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()}function T(e,t){var r,n=t.name;return(r=new be("img",1)).shortEnded=!0,xe(e,t,r),r.attr({width:t.attr("width")||"300",height:t.attr("height")||("audio"===n?"30":"150"),style:t.attr("style"),src:we.transparentSrc,"data-mce-object":n,"class":"mce-object mce-object-"+n}),r}function F(e,t){var r,n,i,o=t.name;return(r=new be("span",1)).attr({contentEditable:"false",style:t.attr("style"),"data-mce-object":o,"class":"mce-preview-object mce-object-"+o}),xe(e,t,r),(n=new be(o,1)).attr({src:t.attr("src"),allowfullscreen:t.attr("allowfullscreen"),style:t.attr("style"),"class":t.attr("class"),width:t.attr("width"),height:t.attr("height"),frameborder:"0"}),(i=new be("span",1)).attr("class","mce-shim"),r.append(n),r.append(i),r}function P(e){for(;e=e.parent;)if(e.attr("data-ephox-embed-iri")||(void 0,(t=e.attr("class"))&&/\btiny-pageembed\b/.test(t)))return!0;var t;return!1}var D=function(r){function e(){return i}function t(e){return e(r)}var n=o(r),i={fold:function(e,t){return t(r)},is:function(e){return r===e},isSome:c,isNone:a,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:e,orThunk:e,map:function(e){return D(e(r))},each:function(e){e(r)},bind:t,exists:t,forall:t,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(a,function(e){return t(r,e)})}};return i},$={some:D,none:t,from:function(e){return null===e||e===undefined?u:D(e)}},z=d("string"),N=d("object"),U=d("array"),E=d("function"),R=Array.prototype.slice,L=Array.prototype.push,W=(E(Array.from)&&Array.from,function(e){function t(){return r}var r=e;return{get:t,set:function(e){r=e},clone:function(){return W(t())}}}),H=Object.hasOwnProperty,I=function(e,t){return H.call(e,t)},q=function(e){return e.getParam("media_scripts")},B=function(e){return e.getParam("audio_template_callback")},G=function(e){return e.getParam("video_template_callback")},J=function(e){return e.getParam("media_live_embeds",!0)},K=function(e){return e.getParam("media_filter_html",!0)},Q=function(e){return e.getParam("media_url_resolver")},V=function(e){return e.getParam("media_alt_source",!0)},X=function(e){return e.getParam("media_poster",!0)},Y=function(e){return e.getParam("media_dimensions",!0)},Z=tinymce.util.Tools.resolve("tinymce.util.Tools"),ee=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),te=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),re={getMaxWidth:p("maxWidth"),getMaxHeight:p("maxHeight"),setMaxWidth:g("maxWidth"),setMaxHeight:g("maxHeight")},ne=te.DOM,ie=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||""},oe=tinymce.util.Tools.resolve("tinymce.html.Writer"),ae=tinymce.util.Tools.resolve("tinymce.html.Schema"),ce=te.DOM,ue=["source","altsource"],se=function(e,t,r){return function(e){var t=ce.createFragment(e);return""!==ce.getAttrib(t.firstChild,"data-ephox-embed-iri")}(e)?x(e,t):function(e,i,o){var a,c=oe(),u=0;return ee({validate:!1,allow_conditional_comments:!0,comment:function(e){c.comment(e)},cdata:function(e){c.cdata(e)},text:function(e,t){c.text(e,t)},start:function(e,t,r){switch(e){case"video":case"object":case"embed":case"img":case"iframe":i.height!==undefined&&i.width!==undefined&&y(t,{width:i.width,height:i.height})}if(o)switch(e){case"video":y(t,{poster:i.poster,src:""}),i.altsource&&y(t,{src:""});break;case"iframe":y(t,{src:i.source});break;case"source":if(u<2&&(y(t,{src:i[ue[u]],type:i[ue[u]+"mime"]}),!i[ue[u]]))return;u++;break;case"img":if(!i.poster)return;a=!0}c.start(e,t,r)},end:function(e){if("video"===e&&o)for(var t=0;t<2;t++)if(i[ue[t]]){var r=[];r.map={},u<t&&(y(r,{src:i[ue[t]],type:i[ue[t]+"mime"]}),c.start("source",r,!0))}if(i.poster&&"object"===e&&o&&!a){var n=[];n.map={},y(n,{src:i.poster,width:i.width,height:i.height}),c.start("img",n,!0)}c.end(e)}},ae({})).parse(e),c.getContent()}(e,t,r)},le=[{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}],me=tinymce.util.Tools.resolve("tinymce.util.Promise"),de={},fe=function(e,t){var r=Q(e);return r?function(n,i,o){return new me(function(t,e){function r(e){return e.html&&(de[n.source]=e),t({url:n.source,html:e.html?e.html:i(n)})}de[n.source]?r(de[n.source]):o({url:n.source},r,e)})}(t,O(e),r):function(t,r){return new me(function(e){e({html:r(t),url:t.source})})}(t,O(e))},he=function(e){return de.hasOwnProperty(e)},pe=function(i){var e=function(e){var t=e.selection.getNode(),r=function(e){return e.getAttribute("data-mce-object")||e.getAttribute("data-ephox-embed-iri")}(t)?e.serializer.serialize(t,{selection:!0}):"";return m({embed:r},w(q(e),r))}(i),r=W(e),t=_(e),n={title:"General",name:"general",items:function(e){for(var t=[],r=0,n=e.length;r<n;++r){if(!U(e[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+e);L.apply(t,e[r])}return t}([[{name:"source",type:"urlinput",filetype:"media",label:"Source"}],Y(i)?[{type:"sizeinput",name:"dimensions",label:"Constrain proportions",constrain:!0}]:[]])},o={title:"Embed",items:[{type:"textarea",name:"embed",label:"Paste your embed code below:"}]},a=[];V(i)&&a.push({name:"altsource",type:"urlinput",filetype:"media",label:"Alternative source URL"}),X(i)&&a.push({name:"poster",type:"urlinput",filetype:"image",label:"Media poster (Image URL)"});var c={title:"Advanced",name:"advanced",items:a},u=[n,o];0<a.length&&u.push(c);var s={type:"tabpanel",tabs:u},l=i.windowManager.open({title:"Insert/Edit Media",size:"normal",body:s,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(e){var t=S(e.getData());!function(e,t,r){t.embed=se(t.embed,t),t.embed&&(e.source===t.source||he(t.source))?k(r,t.embed):fe(r,t).then(function(e){k(r,e.html)})["catch"](A(r))}(r.get(),t,i),e.close()},onChange:function(e,t){switch(t.name){case"source":!function(e,t){var r=S(t.getData(),"source");e.source!==r.source&&(M(l,i)({url:r.source,html:""}),fe(i,r).then(M(l,i))["catch"](A(i)))}(r.get(),e);break;case"embed":!function(e){var t=S(e.getData()),r=C(i,t.embed);e.setData(_(r))}(e);break;case"dimensions":case"altsource":case"poster":!function(e,t){var r=S(e.getData(),t),n=j(i,r);e.setData(_(m(m({},r),{embed:n})))}(e,t.name)}r.set(S(e.getData()))},initialData:t})},ge=function(e){return{showDialog:function(){pe(e)}}},ve=function(e){e.addCommand("mceMedia",function(){pe(e)})},be=tinymce.util.Tools.resolve("tinymce.html.Node"),we=tinymce.util.Tools.resolve("tinymce.Env"),ye=function(i,e){if(!1===K(i))return e;var o,a=oe();return ee({validate:!1,allow_conditional_comments:!1,comment:function(e){a.comment(e)},cdata:function(e){a.cdata(e)},text:function(e,t){a.text(e,t)},start:function(e,t,r){if(o=!0,"script"!==e&&"noscript"!==e){for(var n=0;n<t.length;n++){if(0===t[n].name.indexOf("on"))return;"style"===t[n].name&&(t[n].value=i.dom.serializeStyle(i.dom.parseStyle(t[n].value),e))}a.start(e,t,r),o=!1}},end:function(e){o||a.end(e)}},ae({})).parse(e),a.getContent()},xe=function(e,t,r){var n,i,o,a,c;for(a=(o=t.attributes).length;a--;)n=o[a].name,i=o[a].value,"width"!==n&&"height"!==n&&"style"!==n&&("data"!==n&&"src"!==n||(i=e.convertURL(i,n)),r.attr("data-mce-p-"+n,i));(c=t.firstChild&&t.firstChild.value)&&(r.attr("data-mce-html",escape(ye(e,c))),r.firstChild=null)},je=function(i){return function(e){for(var t,r,n=e.length;n--;)(t=e[n]).parent&&(t.parent.attr("data-mce-object")||"script"===t.name&&!(r=v(q(i),t.attr("src")))||(r&&(r.width&&t.attr("width",r.width.toString()),r.height&&t.attr("height",r.height.toString())),"iframe"===t.name&&J(i)&&we.ceFalse?P(t)||t.replace(F(i,t)):P(t)||t.replace(T(i,t))))}},Oe=function(d){d.on("preInit",function(){var t=d.schema.getSpecialElements();Z.each("video audio iframe object".split(" "),function(e){t[e]=new RegExp("</"+e+"[^>]*>","gi")});var r=d.schema.getBoolAttrs();Z.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(e){r[e]={}}),d.parser.addNodeFilter("iframe,video,audio,object,embed,script",je(d)),d.serializer.addAttributeFilter("data-mce-object",function(e,t){for(var r,n,i,o,a,c,u,s,l=e.length;l--;)if((r=e[l]).parent){for(u=r.attr(t),n=new be(u,1),"audio"!==u&&"script"!==u&&((s=r.attr("class"))&&-1!==s.indexOf("mce-preview-object")?n.attr({width:r.firstChild.attr("width"),height:r.firstChild.attr("height")}):n.attr({width:r.attr("width"),height:r.attr("height")})),n.attr({style:r.attr("style")}),i=(o=r.attributes).length;i--;){var m=o[i].name;0===m.indexOf("data-mce-p-")&&n.attr(m.substr(11),o[i].value)}"script"===u&&n.attr("type","text/javascript"),(a=r.attr("data-mce-html"))&&((c=new be("#text",3)).raw=!0,c.value=ye(d,unescape(a)),n.append(c)),r.replace(n)}})}),d.on("SetContent",function(){d.$("span.mce-preview-object").each(function(e,t){var r=d.$(t);0===r.find("span.mce-shim").length&&r.append('<span class="mce-shim"></span>')})})},Se=function(e){e.on("ResolveName",function(e){var t;1===e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)})},_e=function(t){t.on("click keyup touchend",function(){var e=t.selection.getNode();e&&t.dom.hasClass(e,"mce-preview-object")&&t.dom.getAttrib(e,"data-mce-selected")&&e.setAttribute("data-mce-selected","2")}),t.on("ObjectSelected",function(e){var t=e.target.getAttribute("data-mce-object");"audio"!==t&&"script"!==t||e.preventDefault()}),t.on("ObjectResized",function(e){var t,r=e.target;r.getAttribute("data-mce-object")&&(t=r.getAttribute("data-mce-html"))&&(t=unescape(t),r.setAttribute("data-mce-html",escape(se(t,{width:String(e.width),height:String(e.height)}))))})},Ae=function(e){e.ui.registry.addToggleButton("media",{tooltip:"Insert/edit media",icon:"embed",onAction:function(){e.execCommand("mceMedia")},onSetup:function(t,r){return function(e){return t.selection.selectorChangedWithUnbind(r.join(","),e.setActive).unbind}}(e,["img[data-mce-object]","span[data-mce-object]","div[data-ephox-embed-iri]"])}),e.ui.registry.addMenuItem("media",{icon:"embed",text:"Media...",onAction:function(){e.execCommand("mceMedia")}})};!function Ce(){n.add("media",function(e){return ve(e),Ae(e),Se(e),Oe(e),_e(e),ge(e)})}()}();
9
+ !function(){"use strict";function e(){}function o(e){return function(){return e}}function t(){return u}var r,n=tinymce.util.Tools.resolve("tinymce.PluginManager"),m=function(){return(m=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=o(!1),c=o(!0),u=(r={fold:function(e,t){return e()},is:a,isSome:a,isNone:c,getOr:l,getOrThunk:s,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(undefined),or:l,orThunk:s,map:t,each:e,bind:t,exists:a,forall:c,filter:t,equals:i,equals_:i,toArray:function(){return[]},toString:o("none()")},Object.freeze&&Object.freeze(r),r);function i(e){return e.isNone()}function s(e){return e()}function l(e){return e}function d(t){return function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"==t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t}(e)===t}}function f(e,t){for(var r=0,n=e.length;r<n;r++){t(e[r],r)}}function h(e,t){return I(e,t)?$.from(e[t]):$.none()}function p(e,t){if(e)for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r].filter))return e[r]}function g(e){return e.replace(/px$/,"")}function v(n,e){var i=R(!1),o={};return Z({validate:!1,allow_conditional_comments:!0,start:function(e,t){if(i.get());else if(I(t.map,"data-ephox-embed-iri"))i.set(!0),o=function(e){var t=e.map.style,r=t?ee.parseStyle(t):{};return{type:"ephox-embed-iri",source:e.map["data-ephox-embed-iri"],altsource:"",poster:"",width:h(r,"max-width").map(g).getOr(""),height:h(r,"max-height").map(g).getOr("")}}(t);else{if(o.source||"param"!==e||(o.source=t.map.movie),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(o.type||(o.type=e),o=X.extend(t.map,o)),"script"===e){var r=p(n,t.map.src);if(!r)return;o={type:"script",source:t.map.src,width:String(r.width),height:String(r.height)}}"source"===e&&(o.source?o.altsource||(o.altsource=t.map.src):o.source=t.map.src),"img"!==e||o.poster||(o.poster=t.map.src)}}}).parse(e),o.source=o.source||o.src||o.data,o.altsource=o.altsource||"",o.poster=o.poster||"",o}function w(e){return/^[0-9.]+$/.test(e)?e+"px":e}function b(e,t){for(var r in t){var n=""+t[r];if(e.map[r])for(var i=e.length;i--;){var o=e[i];o.name===r&&(n?(e.map[r]=n,o.value=n):(delete e.map[r],e.splice(i,1)))}else n&&(e.push({name:r,value:n}),e.map[r]=n)}}function y(r,e){var n=X.extend({},e);if(!n.source&&(X.extend(n,v(q(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=te(n.source),n.altsourcemime=te(n.altsource),n.poster=r.convertURL(n.poster,"poster");var t=function(t){var e=ce.filter(function(e){return e.regex.test(t)});return 0<e.length?X.extend({},e[0],{url:function(e,t){for(var r=function(e){var t=e.match(/^(https?:\/\/|www\.)(.+)$/i);return t&&1<t.length?"www."===t[1]?"https://":t[1]:"https://"}(t),n=e.regex.exec(t),i=r+e.url,o=function(e){i=i.replace("$"+e,function(){return n[e]?n[e]:""})},a=0;a<n.length;a++)o(a);return i.replace(/\?$/,"")}(e[0],t)}):null}(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 ae(n.embed,n,!0);var i=p(q(r),n.source);i&&(n.type="script",n.width=String(i.width),n.height=String(i.height));var o=B(r),a=W(r);return n.width=n.width||"300",n.height=n.height||"150",X.each(n,function(e,t){n[t]=r.dom.encode(""+e)}),"iframe"===n.type?function(e){var t=e.allowFullscreen?' allowFullscreen="1"':"";return'<iframe src="'+e.source+'" width="'+e.width+'" height="'+e.height+'"'+t+"></iframe>"}(n):"application/x-shockwave-flash"===n.sourcemime?function(e){var t='<object data="'+e.source+'" width="'+e.width+'" height="'+e.height+'" type="application/x-shockwave-flash">';return e.poster&&(t+='<img src="'+e.poster+'" width="'+e.width+'" height="'+e.height+'" />'),t+="</object>"}(n):-1!==n.sourcemime.indexOf("audio")?function(e,t){return t?t(e):'<audio controls="controls" src="'+e.source+'">'+(e.altsource?'\n<source src="'+e.altsource+'"'+(e.altsourcemime?' type="'+e.altsourcemime+'"':"")+" />\n":"")+"</audio>"}(n,o):"script"===n.type?function(e){return'<script src="'+e.source+'"><\/script>'}(n):function(e,t){return t?t(e):'<video width="'+e.width+'" height="'+e.height+'"'+(e.poster?' poster="'+e.poster+'"':"")+' controls="controls">\n<source src="'+e.source+'"'+(e.sourcemime?' type="'+e.sourcemime+'"':"")+" />\n"+(e.altsource?'<source src="'+e.altsource+'"'+(e.altsourcemime?' type="'+e.altsourcemime+'"':"")+" />\n":"")+"</video>"}(n,a)}function x(t){return function(e){return y(t,e)}}function j(e,t){var r=t?function(e,t){return h(t,e).bind(function(e){return h(e,"meta")})}(t,e).getOr({}):{},n=function(o,a,c){return function(e){function t(){return h(o,e)}function r(){return h(a,e)}function n(e){return h(e,"value").bind(function(e){return 0<e.length?$.some(e):$.none()})}var i;return(i={})[e]=(e===c?t().bind(function(e){return M(e)?n(e).orThunk(r):r().orThunk(function(){return $.from(e)})}):r().orThunk(function(){return t().bind(function(e){return M(e)?n(e):$.from(e)})})).getOr(""),i}}(e,r,t);return m(m(m(m(m({},n("source")),n("altsource")),n("poster")),n("embed")),function(e,r){var n={};return h(e,"dimensions").each(function(e){f(["width","height"],function(t){h(r,t).orThunk(function(){return h(e,t)}).each(function(e){return n[t]=e})})}),n}(e,r))}function O(e){var n=m(m({},e),{source:{value:h(e,"source").getOr("")},altsource:{value:h(e,"altsource").getOr("")},poster:{value:h(e,"poster").getOr("")}});return f(["width","height"],function(r){h(e,r).each(function(e){var t=n.dimensions||{};t[r]=e,n.dimensions=t})}),n}function S(r){return function(e){var t=e&&e.msg?"Media embed handler error: "+e.msg:"Media embed handler threw unknown error.";r.notificationManager.open({type:"error",text:t})}}function _(e,t){return v(q(e),t)}function A(i,o){return function(e){if(F(e.url)&&0<e.url.trim().length){var t=e.html,r=_(o,t),n=m(m({},r),{source:e.url,embed:t});i.setData(O(n))}}}function k(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()}function T(e,t){var r,n=t.name;return(r=new pe("img",1)).shortEnded=!0,we(e,t,r),r.attr({width:t.attr("width")||"300",height:t.attr("height")||("audio"===n?"30":"150"),style:t.attr("style"),src:ge.transparentSrc,"data-mce-object":n,"class":"mce-object mce-object-"+n}),r}function C(e,t){var r,n,i,o=t.name;return(r=new pe("span",1)).attr({contentEditable:"false",style:t.attr("style"),"data-mce-object":o,"class":"mce-preview-object mce-object-"+o}),we(e,t,r),(n=new pe(o,1)).attr({src:t.attr("src"),allowfullscreen:t.attr("allowfullscreen"),style:t.attr("style"),"class":t.attr("class"),width:t.attr("width"),height:t.attr("height"),frameborder:"0"}),(i=new pe("span",1)).attr("class","mce-shim"),r.append(n),r.append(i),r}function P(e){for(;e=e.parent;)if(e.attr("data-ephox-embed-iri")||(void 0,(t=e.attr("class"))&&/\btiny-pageembed\b/.test(t)))return!0;var t;return!1}var D=function(r){function e(){return i}function t(e){return e(r)}var n=o(r),i={fold:function(e,t){return t(r)},is:function(e){return r===e},isSome:c,isNone:a,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:e,orThunk:e,map:function(e){return D(e(r))},each:function(e){e(r)},bind:t,exists:t,forall:t,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(a,function(e){return t(r,e)})}};return i},$={some:D,none:t,from:function(e){return null===e||e===undefined?u:D(e)}},F=d("string"),M=d("object"),z=d("array"),N=d("function"),U=Array.prototype.slice,E=Array.prototype.push,R=(N(Array.from)&&Array.from,function(e){function t(){return r}var r=e;return{get:t,set:function(e){r=e},clone:function(){return R(t())}}}),L=Object.hasOwnProperty,I=function(e,t){return L.call(e,t)},q=function(e){return e.getParam("media_scripts")},B=function(e){return e.getParam("audio_template_callback")},W=function(e){return e.getParam("video_template_callback")},G=function(e){return e.getParam("media_live_embeds",!0)},H=function(e){return e.getParam("media_filter_html",!0)},J=function(e){return e.getParam("media_url_resolver")},K=function(e){return e.getParam("media_alt_source",!0)},Q=function(e){return e.getParam("media_poster",!0)},V=function(e){return e.getParam("media_dimensions",!0)},X=tinymce.util.Tools.resolve("tinymce.util.Tools"),Y=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Z=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),ee=Y.DOM,te=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||""},re=tinymce.util.Tools.resolve("tinymce.html.Schema"),ne=tinymce.util.Tools.resolve("tinymce.html.Writer"),ie=Y.DOM,oe=["source","altsource"],ae=function(e,i,o){var a,c=ne(),u=R(!1),s=0;return Z({validate:!1,allow_conditional_comments:!0,comment:function(e){c.comment(e)},cdata:function(e){c.cdata(e)},text:function(e,t){c.text(e,t)},start:function(e,t,r){if(u.get());else if(I(t.map,"data-ephox-embed-iri"))u.set(!0),function(e,t){var r=t.map.style,n=r?ie.parseStyle(r):{};n["max-width"]=w(e.width),n["max-height"]=w(e.height),b(t,{style:ie.serializeStyle(n)})}(i,t);else{switch(e){case"video":case"object":case"embed":case"img":case"iframe":i.height!==undefined&&i.width!==undefined&&b(t,{width:i.width,height:i.height})}if(o)switch(e){case"video":b(t,{poster:i.poster,src:""}),i.altsource&&b(t,{src:""});break;case"iframe":b(t,{src:i.source});break;case"source":if(s<2&&(b(t,{src:i[oe[s]],type:i[oe[s]+"mime"]}),!i[oe[s]]))return;s++;break;case"img":if(!i.poster)return;a=!0}}c.start(e,t,r)},end:function(e){if(!u.get()){if("video"===e&&o)for(var t=0;t<2;t++)if(i[oe[t]]){var r=[];r.map={},s<t&&(b(r,{src:i[oe[t]],type:i[oe[t]+"mime"]}),c.start("source",r,!0))}if(i.poster&&"object"===e&&o&&!a){var n=[];n.map={},b(n,{src:i.poster,width:i.width,height:i.height}),c.start("img",n,!0)}}c.end(e)}},re({})).parse(e),c.getContent()},ce=[{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}],ue=tinymce.util.Tools.resolve("tinymce.util.Promise"),se={},le=function(e,t){var r=J(e);return r?function(n,i,o){return new ue(function(t,e){function r(e){return e.html&&(se[n.source]=e),t({url:n.source,html:e.html?e.html:i(n)})}se[n.source]?r(se[n.source]):o({url:n.source},r,e)})}(t,x(e),r):function(t,r){return new ue(function(e){e({html:r(t),url:t.source})})}(t,x(e))},me=function(e){return se.hasOwnProperty(e)},de=function(i){var e=function(e){var t=e.selection.getNode(),r=function(e){return e.getAttribute("data-mce-object")||e.getAttribute("data-ephox-embed-iri")}(t)?e.serializer.serialize(t,{selection:!0}):"";return m({embed:r},v(q(e),r))}(i),r=R(e),t=O(e),n={title:"General",name:"general",items:function(e){for(var t=[],r=0,n=e.length;r<n;++r){if(!z(e[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+e);E.apply(t,e[r])}return t}([[{name:"source",type:"urlinput",filetype:"media",label:"Source"}],V(i)?[{type:"sizeinput",name:"dimensions",label:"Constrain proportions",constrain:!0}]:[]])},o={title:"Embed",items:[{type:"textarea",name:"embed",label:"Paste your embed code below:"}]},a=[];K(i)&&a.push({name:"altsource",type:"urlinput",filetype:"media",label:"Alternative source URL"}),Q(i)&&a.push({name:"poster",type:"urlinput",filetype:"image",label:"Media poster (Image URL)"});var c={title:"Advanced",name:"advanced",items:a},u=[n,o];0<a.length&&u.push(c);var s={type:"tabpanel",tabs:u},l=i.windowManager.open({title:"Insert/Edit Media",size:"normal",body:s,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(e){var t=j(e.getData());!function(e,t,r){t.embed=ae(t.embed,t),t.embed&&(e.source===t.source||me(t.source))?k(r,t.embed):le(r,t).then(function(e){k(r,e.html)})["catch"](S(r))}(r.get(),t,i),e.close()},onChange:function(e,t){switch(t.name){case"source":!function(e,t){var r=j(t.getData(),"source");e.source!==r.source&&(A(l,i)({url:r.source,html:""}),le(i,r).then(A(l,i))["catch"](S(i)))}(r.get(),e);break;case"embed":!function(e){var t=j(e.getData()),r=_(i,t.embed);e.setData(O(r))}(e);break;case"dimensions":case"altsource":case"poster":!function(e,t){var r=j(e.getData(),t),n=y(i,r);e.setData(O(m(m({},r),{embed:n})))}(e,t.name)}r.set(j(e.getData()))},initialData:t})},fe=function(e){return{showDialog:function(){de(e)}}},he=function(e){e.addCommand("mceMedia",function(){de(e)})},pe=tinymce.util.Tools.resolve("tinymce.html.Node"),ge=tinymce.util.Tools.resolve("tinymce.Env"),ve=function(o,e){if(!1===H(o))return e;var a,c=ne();return Z({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(a=!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=o.dom.serializeStyle(o.dom.parseStyle(t[n].value),e))}c.start(e,t,r),a=!1}},end:function(e){a||c.end(e)}},re({})).parse(e),c.getContent()},we=function(e,t,r){var n,i,o,a,c;for(a=(o=t.attributes).length;a--;)n=o[a].name,i=o[a].value,"width"!==n&&"height"!==n&&"style"!==n&&("data"!==n&&"src"!==n||(i=e.convertURL(i,n)),r.attr("data-mce-p-"+n,i));(c=t.firstChild&&t.firstChild.value)&&(r.attr("data-mce-html",escape(ve(e,c))),r.firstChild=null)},be=function(i){return function(e){for(var t,r,n=e.length;n--;)(t=e[n]).parent&&(t.parent.attr("data-mce-object")||"script"===t.name&&!(r=p(q(i),t.attr("src")))||(r&&(r.width&&t.attr("width",r.width.toString()),r.height&&t.attr("height",r.height.toString())),"iframe"===t.name&&G(i)&&ge.ceFalse?P(t)||t.replace(C(i,t)):P(t)||t.replace(T(i,t))))}},ye=function(d){d.on("preInit",function(){var t=d.schema.getSpecialElements();X.each("video audio iframe object".split(" "),function(e){t[e]=new RegExp("</"+e+"[^>]*>","gi")});var r=d.schema.getBoolAttrs();X.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(e){r[e]={}}),d.parser.addNodeFilter("iframe,video,audio,object,embed,script",be(d)),d.serializer.addAttributeFilter("data-mce-object",function(e,t){for(var r,n,i,o,a,c,u,s,l=e.length;l--;)if((r=e[l]).parent){for(u=r.attr(t),n=new pe(u,1),"audio"!==u&&"script"!==u&&((s=r.attr("class"))&&-1!==s.indexOf("mce-preview-object")?n.attr({width:r.firstChild.attr("width"),height:r.firstChild.attr("height")}):n.attr({width:r.attr("width"),height:r.attr("height")})),n.attr({style:r.attr("style")}),i=(o=r.attributes).length;i--;){var m=o[i].name;0===m.indexOf("data-mce-p-")&&n.attr(m.substr(11),o[i].value)}"script"===u&&n.attr("type","text/javascript"),(a=r.attr("data-mce-html"))&&((c=new pe("#text",3)).raw=!0,c.value=ve(d,unescape(a)),n.append(c)),r.replace(n)}})}),d.on("SetContent",function(){d.$("span.mce-preview-object").each(function(e,t){var r=d.$(t);0===r.find("span.mce-shim").length&&r.append('<span class="mce-shim"></span>')})})},xe=function(e){e.on("ResolveName",function(e){var t;1===e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)})},je=function(t){t.on("click keyup touchend",function(){var e=t.selection.getNode();e&&t.dom.hasClass(e,"mce-preview-object")&&t.dom.getAttrib(e,"data-mce-selected")&&e.setAttribute("data-mce-selected","2")}),t.on("ObjectSelected",function(e){var t=e.target.getAttribute("data-mce-object");"audio"!==t&&"script"!==t||e.preventDefault()}),t.on("ObjectResized",function(e){var t,r=e.target;r.getAttribute("data-mce-object")&&(t=r.getAttribute("data-mce-html"))&&(t=unescape(t),r.setAttribute("data-mce-html",escape(ae(t,{width:String(e.width),height:String(e.height)}))))})},Oe=function(e){e.ui.registry.addToggleButton("media",{tooltip:"Insert/edit media",icon:"embed",onAction:function(){e.execCommand("mceMedia")},onSetup:function(t,r){return function(e){return t.selection.selectorChangedWithUnbind(r.join(","),e.setActive).unbind}}(e,["img[data-mce-object]","span[data-mce-object]","div[data-ephox-embed-iri]"])}),e.ui.registry.addMenuItem("media",{icon:"embed",text:"Media...",onAction:function(){e.execCommand("mceMedia")}})};!function Se(){n.add("media",function(e){return he(e),Oe(e),xe(e),ye(e),je(e),fe(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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(){"use strict";function o(n,e){for(var t="",o=0;o<e;o++)t+=n;return t}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(n){var e=n.getParam("nonbreaking_force_tab",0);return"boolean"==typeof e?!0===e?3:0:e},a=function(n){return n.getParam("nonbreaking_wrap",!0,"boolean")},r=function(n,e){var t=a(n)||n.plugins.visualchars?'<span class="'+(function(n){return!!n.plugins.visualchars&&n.plugins.visualchars.isEnabled()}(n)?"mce-nbsp-wrap mce-nbsp":"mce-nbsp-wrap")+'" contenteditable="false">'+o("&nbsp;",e)+"</span>":o("&nbsp;",e);n.undoManager.transact(function(){return n.insertContent(t)})},e=function(n){n.addCommand("mceNonBreaking",function(){r(n,1)})},c=tinymce.util.Tools.resolve("tinymce.util.VK"),t=function(e){var t=i(e);0<t&&e.on("keydown",function(n){if(n.keyCode===c.TAB&&!n.isDefaultPrevented()){if(n.shiftKey)return;n.preventDefault(),n.stopImmediatePropagation(),r(e,t)}})},u=function(n){n.ui.registry.addButton("nonbreaking",{icon:"non-breaking",tooltip:"Nonbreaking space",onAction:function(){return n.execCommand("mceNonBreaking")}}),n.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:function(){return n.execCommand("mceNonBreaking")}})};!function s(){n.add("nonbreaking",function(n){e(n),u(n),t(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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(){"use strict";function c(n){return function(t){return-1!==(" "+t.attr("class")+" ").indexOf(n)}}function l(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>"}}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.util.Tools"),f=function(t){return t.getParam("noneditable_noneditable_class","mceNonEditable")},s=function(t){return t.getParam("noneditable_editable_class","mceEditable")},d=function(t){var n=t.getParam("noneditable_regexp",[]);return n&&n.constructor===RegExp?[n]:n},n=function(n){var t,e,r="contenteditable";t=" "+u.trim(s(n))+" ",e=" "+u.trim(f(n))+" ";var a=c(t),i=c(e),o=d(n);n.on("PreInit",function(){0<o.length&&n.on("BeforeSetContent",function(t){!function(t,n,e){var r=n.length,a=e.content;if("raw"!==e.format){for(;r--;)a=a.replace(n[r],l(t,a,f(t)));e.content=a}}(n,o,t)}),n.parser.addAttributeFilter("class",function(t){for(var n,e=t.length;e--;)n=t[e],a(n)?n.attr(r,"true"):i(n)&&n.attr(r,"false")}),n.serializer.addAttributeFilter(r,function(t){for(var n,e=t.length;e--;)n=t[e],(a(n)||i(n))&&(0<o.length&&n.attr("data-mce-content")?(n.name="#text",n.type=3,n.raw=!0,n.value=n.attr("data-mce-content")):n.attr(r,null))})})};!function e(){t.add("noneditable",function(t){n(t)})}()}();
@@ -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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(){"use strict";function e(){return"mce-pagebreak"}function a(){return'<img src="'+t.transparentSrc+'" class="mce-pagebreak" data-mce-resize="false" data-mce-placeholder />'}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env"),r=function(e){return e.getParam("pagebreak_separator","\x3c!-- pagebreak --\x3e")},i=function(e){return e.getParam("pagebreak_split_block",!1)},o=function(o){var c=r(o),n=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi");o.on("BeforeSetContent",function(e){e.content=e.content.replace(n,a())}),o.on("PreInit",function(){o.serializer.addNodeFilter("img",function(e){for(var n,a,t=e.length;t--;)if((a=(n=e[t]).attr("class"))&&-1!==a.indexOf("mce-pagebreak")){var r=n.parent;if(o.schema.getBlockElements()[r.name]&&i(o)){r.type=3,r.value=c,r.raw=!0,n.remove();continue}n.type=3,n.value=c,n.raw=!0}})})},c=a,u=e,g=function(e){e.addCommand("mcePageBreak",function(){e.settings.pagebreak_split_block?e.insertContent("<p>"+c()+"</p>"):e.insertContent(c())})},m=function(n){n.on("ResolveName",function(e){"IMG"===e.target.nodeName&&n.dom.hasClass(e.target,u())&&(e.name="pagebreak")})},s=function(e){e.ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:function(){return e.execCommand("mcePageBreak")}}),e.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:function(){return e.execCommand("mcePageBreak")}})};!function l(){n.add("pagebreak",function(e){g(e),s(e),o(e),m(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.2.1 (2020-03-25)
7
+ * Version: 5.2.2 (2020-04-23)
8
8
  */
9
9
  !function(f){"use strict";function t(){}function i(t){return function(){return t}}function e(){return v}var n,d=function(t){function e(){return n}var n=t;return{get:e,set:function(t){n=t},clone:function(){return d(e())}}},r=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(t){return!(!/(^|[ ,])powerpaste([, ]|$)/.test(t.settings.plugins)||!r.get("powerpaste"))&&("undefined"!=typeof f.window.console&&f.window.console.log&&f.window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),!0)},a=function(t,e){return{clipboard:t,quirks:e}},s=function(t,e,n,r){return t.fire("PastePreProcess",{content:e,internal:n,wordContent:r})},c=function(t,e,n,r){return t.fire("PastePostProcess",{node:e,internal:n,wordContent:r})},o=function(t,e){return t.fire("PastePlainTextToggle",{state:e})},m=function(t,e){return t.fire("paste",{ieFake:e})},l=function(t,e){"text"===e.pasteFormat.get()?(e.pasteFormat.set("html"),o(t,!1)):(e.pasteFormat.set("text"),o(t,!0)),t.focus()},p=function(t,n){t.addCommand("mceTogglePlainTextPaste",function(){l(t,n)}),t.addCommand("mceInsertClipboardContent",function(t,e){e.content&&n.pasteHtml(e.content,e.internal),e.text&&n.pasteText(e.text)})},g=i(!1),h=i(!0),v=(n={fold:function(t,e){return t()},is:g,isSome:g,isNone:h,getOr:w,getOrThunk:b,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(undefined),or:w,orThunk:b,map:e,each:t,bind:e,exists:g,forall:h,filter:e,equals:y,equals_:y,toArray:function(){return[]},toString:i("none()")},Object.freeze&&Object.freeze(n),n);function y(t){return t.isNone()}function b(t){return t()}function w(t){return t}function x(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o)}return r}function _(t,e){for(var n=0,r=t.length;n<r;n++){e(t[n],n)}}var P,T,D,C,k,F=function(n){function t(){return o}function e(t){return t(n)}var r=i(n),o={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:h,isNone:g,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:t,orThunk:t,map:function(t){return F(t(n))},each:function(t){t(n)},bind:e,exists:e,forall:e,filter:function(t){return t(n)?o:v},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(g,function(t){return e(n,t)})}};return o},S={some:F,none:e,from:function(t){return null===t||t===undefined?v:F(t)}},E=(P="function",function(t){return function(t){if(null===t)return"null";var e=typeof t;return"object"==e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e}(t)===P}),I=Array.prototype.slice,R=E(Array.from)?Array.from:function(t){return I.call(t)},O={},A={exports:O};T=undefined,D=O,C=A,k=undefined,function(t){"object"==typeof D&&void 0!==C?C.exports=t():"function"==typeof T&&T.amd?T([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EphoxContactWrapper=t()}(function(){return function l(i,u,a){function s(e,t){if(!u[e]){if(!i[e]){var n="function"==typeof k&&k;if(!t&&n)return n(e,!0);if(c)return c(e,!0);var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}var o=u[e]={exports:{}};i[e][0].call(o.exports,function(t){return s(i[e][1][t]||t)},o,o.exports,l,i,u,a)}return u[e].exports}for(var c="function"==typeof k&&k,t=0;t<a.length;t++)s(a[t]);return s}({1:[function(t,e,n){var r,o,i=e.exports={};function u(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===u||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:u}catch(t){r=u}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(t){o=a}}();var c,l=[],f=!1,d=-1;function m(){f&&c&&(f=!1,c.length?l=c.concat(l):d=-1,l.length&&p())}function p(){if(!f){var t=s(m);f=!0;for(var e=l.length;e;){for(c=l,l=[];++d<e;)c&&c[d].run();d=-1,e=l.length}c=null,f=!1,function n(t){if(o===clearTimeout)return clearTimeout(t);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{return o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function g(t,e){this.fun=t,this.array=e}function h(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new g(t,e)),1!==l.length||f||s(p)},g.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],2:[function(t,f,e){(function(e){function r(){}function i(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=0,this._handled=!1,this._value=undefined,this._deferreds=[],l(t,this)}function o(r,o){for(;3===r._state;)r=r._value;0!==r._state?(r._handled=!0,i._immediateFn(function(){var t=1===r._state?o.onFulfilled:o.onRejected;if(null!==t){var e;try{e=t(r._value)}catch(n){return void a(o.promise,n)}u(o.promise,e)}else(1===r._state?u:a)(o.promise,r._value)})):r._deferreds.push(o)}function u(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof i)return t._state=3,t._value=e,void s(t);if("function"==typeof n)return void l(function r(t,e){return function(){t.apply(e,arguments)}}(n,e),t)}t._state=1,t._value=e,s(t)}catch(o){a(t,o)}}function a(t,e){t._state=2,t._value=e,s(t)}function s(t){2===t._state&&0===t._deferreds.length&&i._immediateFn(function(){t._handled||i._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e<n;e++)o(t,t._deferreds[e]);t._deferreds=null}function c(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function l(t,e){var n=!1;try{t(function(t){n||(n=!0,u(e,t))},function(t){n||(n=!0,a(e,t))})}catch(r){if(n)return;n=!0,a(e,r)}}var t,n;t=this,n=setTimeout,i.prototype["catch"]=function(t){return this.then(null,t)},i.prototype.then=function(t,e){var n=new this.constructor(r);return o(this,new c(t,e,n)),n},i.all=function(t){var s=Array.prototype.slice.call(t);return new i(function(o,i){if(0===s.length)return o([]);var u=s.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)}s[e]=t,0==--u&&o(s)}catch(r){i(r)}}for(var t=0;t<s.length;t++)a(t,s[t])})},i.resolve=function(e){return e&&"object"==typeof e&&e.constructor===i?e:new i(function(t){t(e)})},i.reject=function(n){return new i(function(t,e){e(n)})},i.race=function(o){return new i(function(t,e){for(var n=0,r=o.length;n<r;n++)o[n].then(t,e)})},i._immediateFn="function"==typeof e?function(t){e(t)}:function(t){n(t,0)},i._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},i._setImmediateFn=function(t){i._immediateFn=t},i._setUnhandledRejectionFn=function(t){i._unhandledRejectionFn=t},void 0!==f&&f.exports?f.exports=i:t.Promise||(t.Promise=i)}).call(this,t("timers").setImmediate)},{timers:3}],3:[function(s,t,c){(function(t,e){var r=s("process/browser.js").nextTick,n=Function.prototype.apply,o=Array.prototype.slice,i={},u=0;function a(t,e){this._id=t,this._clearFn=e}c.setTimeout=function(){return new a(n.call(setTimeout,window,arguments),clearTimeout)},c.setInterval=function(){return new a(n.call(setInterval,window,arguments),clearInterval)},c.clearTimeout=c.clearInterval=function(t){t.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(window,this._id)},c.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},c.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},c._unrefActive=c.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;0<=e&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},c.setImmediate="function"==typeof t?t:function(t){var e=u++,n=!(arguments.length<2)&&o.call(arguments,1);return i[e]=!0,r(function(){i[e]&&(n?t.apply(null,n):t.call(null),c.clearImmediate(e))}),e},c.clearImmediate="function"==typeof e?e:function(t){delete i[t]}}).call(this,s("timers").setImmediate,s("timers").clearImmediate)},{"process/browser.js":1,timers:3}],4:[function(t,e,n){var r=t("promise-polyfill"),o="undefined"!=typeof window?window:Function("return this;")();e.exports={boltExport:o.Promise||r}},{"promise-polyfill":2}]},{},[4])(4)});function j(t){f.setTimeout(function(){throw t},0)}function M(i,t){return t(function(n){var r=[],o=0;0===i.length?n([]):_(i,function(t,e){t.get(function(e){return function(t){r[e]=t,++o>=i.length&&n(r)}}(e))})})}function L(t,e){return function(t){return M(t,z)}(x(t,e))}function N(t){return t.replace(/\r?\n/g,"<br>")}function B(t,e,n){var r=t.split(/\n\n/),o=function(t,e){var n,r=[],o="<"+t;if("object"==typeof e){for(n in e)e.hasOwnProperty(n)&&r.push(n+'="'+et.encodeAllRaw(e[n])+'"');r.length&&(o+=" "+r.join(" "))}return o+">"}(e,n),i="</"+e+">",u=q.map(r,function(t){return t.split(/\n/).join("<br />")});return 1===u.length?u[0]:q.map(u,function(t){return o+t+i}).join("")}var H=A.exports.boltExport,$=function(t){var n=S.none(),e=[],r=function(t){o()?u(t):e.push(t)},o=function(){return n.isSome()},i=function(t){_(t,u)},u=function(e){n.each(function(t){f.setTimeout(function(){e(t)},0)})};return t(function(t){n=S.some(t),i(e),e=[]}),{get:r,map:function(n){return $(function(e){r(function(t){e(n(t))})})},isReady:o}},W={nu:$,pure:function(e){return $(function(t){t(e)})}},U=function(n){function t(t){n().then(t,j)}return{map:function(t){return U(function(){return n().then(t)})},bind:function(e){return U(function(){return n().then(function(t){return e(t).toPromise()})})},anonBind:function(t){return U(function(){return n().then(function(){return t.toPromise()})})},toLazy:function(){return W.nu(t)},toCached:function(){var t=null;return U(function(){return null===t&&(t=n()),t})},toPromise:n,get:t}},z=function(t){return U(function(){return new H(t)})},V=tinymce.util.Tools.resolve("tinymce.Env"),K=tinymce.util.Tools.resolve("tinymce.util.Delay"),q=tinymce.util.Tools.resolve("tinymce.util.Tools"),G=tinymce.util.Tools.resolve("tinymce.util.VK"),X="x-tinymce/html",Y="\x3c!-- "+X+" --\x3e",Z=function(t){return Y+t},J=function(t){return t.replace(Y,"")},Q=function(t){return-1!==t.indexOf(Y)},tt=function(){return X},et=tinymce.util.Tools.resolve("tinymce.html.Entities"),nt=function(t){return!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(t)},rt=function(t,e,n){return e?B(t,!0===e?"p":e,n):N(t)},ot=tinymce.util.Tools.resolve("tinymce.html.DomParser"),it=tinymce.util.Tools.resolve("tinymce.html.Serializer"),ut=tinymce.util.Tools.resolve("tinymce.html.Node"),at=tinymce.util.Tools.resolve("tinymce.html.Schema"),st={shouldBlockDrop:function(t){return t.getParam("paste_block_drop",!1)},shouldPasteDataImages:function(t){return t.getParam("paste_data_images",!1)},shouldFilterDrop:function(t){return t.getParam("paste_filter_drop",!0)},getPreProcess:function(t){return t.getParam("paste_preprocess")},getPostProcess:function(t){return t.getParam("paste_postprocess")},getWebkitStyles:function(t){return t.getParam("paste_webkit_styles")},shouldRemoveWebKitStyles:function(t){return t.getParam("paste_remove_styles_if_webkit",!0)},shouldMergeFormats:function(t){return t.getParam("paste_merge_formats",!0)},isSmartPasteEnabled:function(t){return t.getParam("smart_paste",!0)},isPasteAsTextEnabled:function(t){return t.getParam("paste_as_text",!1)},getRetainStyleProps:function(t){return t.getParam("paste_retain_style_properties")},getWordValidElements:function(t){return t.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")},shouldConvertWordFakeLists:function(t){return t.getParam("paste_convert_word_fake_lists",!0)},shouldUseDefaultFilters:function(t){return t.getParam("paste_enable_default_filters",!0)}};function ct(e,t){return q.each(t,function(t){e=t.constructor===RegExp?e.replace(t,""):e.replace(t[0],t[1])}),e}var lt={filter:ct,innerText:function se(t){var e=at(),n=ot({},e),r="",o=e.getShortEndedElements(),i=q.makeMap("script noscript style textarea video audio iframe object"," "),u=e.getBlockElements();return t=ct(t,[/<!\[[^\]]+\]>/g]),function a(t){var e=t.name,n=t;if("br"!==e){if("wbr"!==e)if(o[e]&&(r+=" "),i[e])r+=" ";else{if(3===t.type&&(r+=t.value),!t.shortEnded&&(t=t.firstChild))for(;a(t),t=t.next;);u[e]&&n.next&&(r+="\n","p"===e&&(r+="\n"))}}else r+="\n"}(n.parse(t)),r},trimHtml:function ce(t){return t=ct(t,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function r(t,e,n){return e||n?"\xa0":" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])},createIdGenerator:function le(t){var e=0;return function(){return t+e++}},isMsEdge:function(){return-1!==f.navigator.userAgent.indexOf(" Edge/")}};function ft(e){var n,t;return t=[/^[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]/],e=e.replace(/^[\u00a0 ]+/,""),q.each(t,function(t){if(t.test(e))return!(n=!0)}),n}function dt(t){var i,u,a=1;function n(t){var e="";if(3===t.type)return t.value;if(t=t.firstChild)for(;e+=n(t),t=t.next;);return e}function s(t,e){if(3===t.type&&e.test(t.value))return t.value=t.value.replace(e,""),!1;if(t=t.firstChild)do{if(!s(t,e))return!1}while(t=t.next);return!0}function e(t,e,n){var r=t._listLevel||a;r!==a&&(i=r<a?i&&i.parent.parent:(u=i,null)),i&&i.name===e?i.append(t):(u=u||i,i=new ut(e,1),1<n&&i.attr("start",""+n),t.wrap(i)),t.name="li",a<r&&u&&u.lastChild.append(i),a=r,function o(t){if(t._listIgnore)t.remove();else if(t=t.firstChild)for(;o(t),t=t.next;);}(t),s(t,/^\u00a0+/),s(t,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),s(t,/^\u00a0+/)}for(var r=[],o=t.firstChild;null!=o;)if(r.push(o),null!==(o=o.walk()))for(;void 0!==o&&o.parent!==t;)o=o.walk();for(var c=0;c<r.length;c++)if("p"===(t=r[c]).name&&t.firstChild){var l=n(t);if(/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(l)){e(t,"ul");continue}if(ft(l)){var f=/([0-9]+)\./.exec(l),d=1;f&&(d=parseInt(f[1],10)),e(t,"ol",d);continue}if(t._listLevel){e(t,"ul",1);continue}i=null}else u=i,i=null}function mt(n,r,o,i){var u,a={},t=n.dom.parseStyle(i);return q.each(t,function(t,e){switch(e){case"mso-list":(u=/\w+ \w+([0-9]+)/i.exec(i))&&(o._listLevel=parseInt(u[1],10)),/Ignore/i.test(t)&&o.firstChild&&(o._listIgnore=!0,o.firstChild._listIgnore=!0);break;case"horiz-align":e="text-align";break;case"vert-align":e="vertical-align";break;case"font-color":case"mso-foreground":e="color";break;case"mso-background":case"mso-highlight":e="background";break;case"font-weight":case"font-style":return void("normal"!==t&&(a[e]=t));case"mso-element":if(/^(comment|comment-list)$/i.test(t))return void o.remove()}0!==e.indexOf("mso-comment")?0!==e.indexOf("mso-")&&("all"===st.getRetainStyleProps(n)||r&&r[e])&&(a[e]=t):o.remove()}),/(bold)/i.test(a["font-weight"])&&(delete a["font-weight"],o.wrap(new ut("b",1))),/(italic)/i.test(a["font-style"])&&(delete a["font-style"],o.wrap(new ut("i",1))),(a=n.dom.serializeStyle(a,o.name))||null}function pt(t,e){return{content:t,cancelled:e}}function gt(t,e,n,r){var o=s(t,e,n,r),i=function(t,e){var n=ot({},t.schema);n.addNodeFilter("meta",function(t){q.each(t,function(t){return t.remove()})});var r=n.parse(e,{forced_root_block:!1,isRootContent:!0});return it({validate:t.settings.validate},t.schema).serialize(r)}(t,o.content);return t.hasEventListeners("PastePostProcess")&&!o.isDefaultPrevented()?function(t,e,n,r){var o=t.dom.create("div",{style:"display:none"},e),i=c(t,o,n,r);return pt(i.node.innerHTML,i.isDefaultPrevented())}(t,i,n,r):pt(i,o.isDefaultPrevented())}function ht(t,e){return t.insertContent(e,{merge:st.shouldMergeFormats(t),paste:!0}),!0}function vt(t){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(t)}function yt(t){return vt(t)&&/.(gif|jpe?g|png)$/.test(t)}function bt(t,e,n){return!(!1!==t.selection.isCollapsed()||!vt(e))&&function(t,e,n){return t.undoManager.extra(function(){n(t,e)},function(){t.execCommand("mceInsertLink",!1,e)}),!0}(t,e,n)}function wt(t,e,n){return!!yt(e)&&function(t,e,n){return t.undoManager.extra(function(){n(t,e)},function(){t.insertContent('<img src="'+e+'">')}),!0}(t,e,n)}function xt(t){return"\n"===t||"\r"===t}function _t(n){return function(t,e,n){return _(t,function(t){n=e(n,t)}),n}(n,function(t,e){return function(t){return-1!==" \f\t\x0B".indexOf(t)}(e)||"\xa0"===e?t.pcIsSpace||""===t.str||t.str.length===n.length-1||function(t,e){return e<t.length&&0<=e&&xt(t[e])}(n,t.str.length+1)?{pcIsSpace:!1,str:t.str+"\xa0"}:{pcIsSpace:!0,str:t.str+" "}:{pcIsSpace:xt(e),str:t.str+e}},{pcIsSpace:!1,str:""}).str}function Pt(t,e,n,r){var o=Vt(t,e,n);!1===o.cancelled&&qt(t,o.content,r)}function Tt(t,e,n){var r=n||Q(e);Pt(t,J(e),r,!1)}function Dt(t,e){var n=t.dom.encode(e).replace(/\r\n/g,"\n"),r=_t(n),o=rt(r,t.settings.forced_root_block,t.settings.forced_root_block_attrs);Pt(t,o,!1,!0)}function Ct(t){var e={};if(t){if(t.getData){var n=t.getData("Text");n&&0<n.length&&-1===n.indexOf("data:text/mce-internal,")&&(e["text/plain"]=n)}if(t.types)for(var r=0;r<t.types.length;r++){var o=t.types[r];try{e[o]=t.getData(o)}catch(i){e[o]=""}}}return e}function kt(t,e){return e in t&&0<t[e].length}function Ft(t){return kt(t,"text/html")||kt(t,"text/plain")}function St(e,t,n){var r=function(t){return"paste"===t.type}(t)?t.clipboardData:t.dataTransfer;if(e.settings.paste_data_images&&r){var o=function(t){var e=t.items?x(R(t.items),function(t){return t.getAsFile()}):[],n=t.files?R(t.files):[];return function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r)&&n.push(i)}return n}(0<e.length?e:n,function(t){return/^image\/(jpeg|png|gif|bmp)$/.test(t.type)})}(r);if(0<o.length)return t.preventDefault(),function(t){return L(t,function(r){return z(function(t){var e=r.getAsFile?r.getAsFile():r,n=new window.FileReader;n.onload=function(){t({blob:e,uri:n.result})},n.readAsDataURL(e)})})}(o).get(function(t){n&&e.selection.setRng(n),_(t,function(t){!function(t,e){var n=function(t){var e;return-1!==(e=t.indexOf(","))?t.substr(e+1):null}(e.uri),r=Gt(),o=t.settings.images_reuse_filename&&e.blob.name?function(t,e){var n=e.match(/([\s\S]+?)\.(?:jpeg|jpg|png|gif)$/i);return n?t.dom.encode(n[1]):null}(t,e.blob.name):r,i=new f.Image;if(i.src=e.uri,function(t,e){return!t.images_dataimg_filter||t.images_dataimg_filter(e)}(t.settings,i)){var u,a=t.editorUpload.blobCache,s=void 0;(u=a.findFirst(function(t){return t.base64()===n}))?s=u:(s=a.create(r,e.blob,n,o),a.add(s)),Tt(t,'<img src="'+s.blobUri()+'">',!1)}else Tt(t,'<img src="'+e.uri+'">',!1)}(e,t)})}),!0}return!1}function Et(t){return G.metaKeyPressed(t)&&86===t.keyCode||t.shiftKey&&45===t.keyCode}function It(a,s,i){var u,c=function(){var e=d(S.none());return{clear:function(){e.set(S.none())},set:function(t){e.set(S.some(t))},isSet:function(){return e.get().isSome()},on:function(t){e.get().each(t)}}}();function l(t,e,n,r){var o,i,u;kt(t,"text/html")?o=t["text/html"]:(o=s.getHtml(),r=r||Q(o),s.isDefaultContent(o)&&(n=!0)),o=lt.trimHtml(o),s.remove(),i=!1===r&&nt(o),u=Kt(o),o.length&&(!i||u)||(n=!0),(n||u)&&(o=kt(t,"text/plain")&&i?t["text/plain"]:lt.innerText(o)),s.isDefaultContent(o)?e||a.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):n?Dt(a,o):Tt(a,o,r)}a.on("keydown",function(t){function e(t){Et(t)&&!t.isDefaultPrevented()&&s.remove()}if(Et(t)&&!t.isDefaultPrevented()){if((u=t.shiftKey&&86===t.keyCode)&&V.webkit&&-1!==f.navigator.userAgent.indexOf("Version/"))return;if(t.stopImmediatePropagation(),c.set(t),window.setTimeout(function(){c.clear()},100),V.ie&&u)return t.preventDefault(),void m(a,!0);s.remove(),s.create(),a.once("keyup",e),a.once("paste",function(){a.off("keyup",e)})}}),a.on("paste",function(t){var e=c.isSet(),n=function(t,e){var n=Ct(e.clipboardData||t.getDoc().dataTransfer);return lt.isMsEdge()?q.extend(n,{"text/html":""}):n}(a,t),r="text"===i.get()||u,o=kt(n,tt());u=!1,t.isDefaultPrevented()||function(t){var e=t.clipboardData;return-1!==f.navigator.userAgent.indexOf("Android")&&e&&e.items&&0===e.items.length}(t)?s.remove():Ft(n)||!St(a,t,s.getLastRng()||a.selection.getRng())?(e||t.preventDefault(),!V.ie||e&&!t.ieFake||kt(n,"text/html")||(s.create(),a.dom.bind(s.getEl(),"paste",function(t){t.stopPropagation()}),a.getDoc().execCommand("Paste",!1,null),n["text/html"]=s.getHtml()),kt(n,"text/html")?(t.preventDefault(),o=o||Q(n["text/html"]),l(n,e,r,o)):K.setEditorTimeout(a,function(){l(n,e,r,o)},0)):s.remove()})}function Rt(t){return V.ie&&t.inline?f.document.body:t.getBody()}function Ot(e,t,n){!function(t){return Rt(t)!==t.getBody()}(e)||e.dom.bind(t,"paste keyup",function(t){Yt(e,n)||e.fire("paste")})}function At(t,e){return e===t}function jt(t){var e=d(null),n="%MCEPASTEBIN%";return{create:function(){return function(t,e,n){var r,o=t.dom,i=t.getBody();e.set(t.selection.getRng()),r=t.dom.add(Rt(t),"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),(V.ie||V.gecko)&&o.setStyle(r,"left","rtl"===o.getStyle(i,"direction",!0)?65535:-65535),o.bind(r,"beforedeactivate focusin focusout",function(t){t.stopPropagation()}),Ot(t,r,n),r.focus(),t.selection.select(r,!0)}(t,e,n)},remove:function(){return function(t,e){if(Xt(t)){for(var n=void 0,r=e.get();n=t.dom.get("mcepastebin");)t.dom.remove(n),t.dom.unbind(n);r&&t.selection.setRng(r)}e.set(null)}(t,e)},getEl:function(){return Xt(t)},getHtml:function(){return function(n){function e(t,e){t.appendChild(e),n.dom.remove(e,!0)}var r,t,o,i,u;for(t=q.grep(Rt(n).childNodes,function(t){return"mcepastebin"===t.id}),r=t.shift(),q.each(t,function(t){e(r,t)}),o=(i=n.dom.select("div[id=mcepastebin]",r)).length-1;0<=o;o--)u=n.dom.create("div"),r.insertBefore(u,i[o]),e(u,i[o]);return r?r.innerHTML:""}(t)},getLastRng:function(){return function(t){return t.get()}(e)},isDefault:function(){return Yt(t,n)},isDefaultContent:function(t){return At(n,t)}}}function Mt(n,t){var e=jt(n);return n.on("PreInit",function(){return function(u,t,e){var a;It(u,t,e),u.parser.addNodeFilter("img",function(t,e,n){function r(t){t.attr("data-mce-object")||a===V.transparentSrc||t.remove()}var o;if(!u.settings.paste_data_images&&((o=n).data&&!0===o.data.paste))for(var i=t.length;i--;)(a=t[i].attr("src"))&&(0===a.indexOf("webkit-fake-url")?r(t[i]):u.settings.allow_html_data_urls||0!==a.indexOf("data:")||r(t[i]))})}(n,e,t)}),{pasteFormat:t,pasteHtml:function(t,e){return Tt(n,t,e)},pasteText:function(t){return Dt(n,t)},pasteImageData:function(t,e){return St(n,t,e)},getDataTransferItems:Ct,hasHtmlOrText:Ft,hasContentType:kt}}function Lt(t,e,n){if(!function(t){return!1===V.iOS&&t!==undefined&&"function"==typeof t.setData&&!0!==lt.isMsEdge()}(t))return!1;try{return t.clearData(),t.setData("text/html",e),t.setData("text/plain",n),t.setData(tt(),e),!0}catch(r){return!1}}function Nt(t,e,n,r){Lt(t.clipboardData,e.html,e.text)?(t.preventDefault(),r()):n(e.html,r)}function Bt(a){return function(t,e){var n=Z(t),r=a.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),o=a.dom.create("div",{contenteditable:"true"},n);a.dom.setStyles(r,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),r.appendChild(o),a.dom.add(a.getBody(),r);var i=a.selection.getRng();o.focus();var u=a.dom.createRng();u.selectNodeContents(o),a.selection.setRng(u),K.setTimeout(function(){a.selection.setRng(i),r.parentNode.removeChild(r),e()},0)}}function Ht(t){return{html:t.selection.getContent({contextual:!0}),text:t.selection.getContent({format:"text"})}}function $t(t){return!t.selection.isCollapsed()||function(t){return!!t.dom.getParent(t.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",t.getBody())}(t)}function Wt(t,e){return Jt.getCaretRangeFromPoint(e.clientX,e.clientY,t.getDoc())}function Ut(t,e){t.focus(),t.selection.setRng(e)}var zt={preProcess:function(t,e){return st.shouldUseDefaultFilters(t)?function(r,t){var e,o;(e=st.getRetainStyleProps(r))&&(o=q.makeMap(e.split(/[, ]/))),t=lt.filter(t,[/<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,"\xa0"],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(t,e){return 0<e.length?e.replace(/./," ").slice(Math.floor(e.length/2)).split("").join("\xa0"):""}]]);var n=st.getWordValidElements(r),i=at({valid_elements:n,valid_children:"-li[p]"});q.each(i.elements,function(t){t.attributes["class"]||(t.attributes["class"]={},t.attributesOrder.push("class")),t.attributes.style||(t.attributes.style={},t.attributesOrder.push("style"))});var u=ot({},i);u.addAttributeFilter("style",function(t){for(var e,n=t.length;n--;)(e=t[n]).attr("style",mt(r,o,e,e.attr("style"))),"span"===e.name&&e.parent&&!e.attributes.length&&e.unwrap()}),u.addAttributeFilter("class",function(t){for(var e,n,r=t.length;r--;)n=(e=t[r]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&e.remove(),e.attr("class",null)}),u.addNodeFilter("del",function(t){for(var e=t.length;e--;)t[e].remove()}),u.addNodeFilter("a",function(t){for(var e,n,r,o=t.length;o--;)if(n=(e=t[o]).attr("href"),r=e.attr("name"),n&&-1!==n.indexOf("#_msocom_"))e.remove();else if(n&&0===n.indexOf("file://")&&(n=(n=n.split("#")[1])&&"#"+n),n||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){e.unwrap();continue}e.attr({href:n,name:r})}else e.unwrap()});var a=u.parse(t);return st.shouldConvertWordFakeLists(r)&&dt(a),t=it({validate:r.settings.validate},i).serialize(a)}(t,e):e},isWordContent:function fe(t){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(t)||/class="OutlineElement/.test(t)||/id="?docs\-internal\-guid\-/.test(t)}},Vt=function(t,e,n){var r=zt.isWordContent(e),o=r?zt.preProcess(t,e):e;return gt(t,o,n,r)},Kt=yt,qt=function(t,e,n){n||!1===st.isSmartPasteEnabled(t)?ht(t,e):function(e,n){q.each([bt,wt,ht],function(t){return!0!==t(e,n,ht)})}(t,e)},Gt=lt.createIdGenerator("mceclip"),Xt=function(t){return t.dom.get("mcepastebin")},Yt=function(t,e){var n=Xt(t);return function(t){return t&&"mcepastebin"===t.id}(n)&&At(e,n.innerHTML)},Zt=function(t){t.on("cut",function(e){return function(t){$t(e)&&Nt(t,Ht(e),Bt(e),function(){if(V.browser.isChrome()){var t=e.selection.getRng();K.setEditorTimeout(e,function(){e.selection.setRng(t),e.execCommand("Delete")},0)}else e.execCommand("Delete")})}}(t)),t.on("copy",function(e){return function(t){$t(e)&&Nt(t,Ht(e),Bt(e),function(){})}}(t))},Jt=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),Qt=function(i,u,a){st.shouldBlockDrop(i)&&i.on("dragend dragover draggesture dragdrop drop drag",function(t){t.preventDefault(),t.stopPropagation()}),st.shouldPasteDataImages(i)||i.on("drop",function(t){var e=t.dataTransfer;e&&e.files&&0<e.files.length&&t.preventDefault()}),i.on("drop",function(t){var e,n;if(n=Wt(i,t),!t.isDefaultPrevented()&&!a.get()){e=u.getDataTransferItems(t.dataTransfer);var r=u.hasContentType(e,tt());if((u.hasHtmlOrText(e)&&!function(t){var e=t["text/plain"];return!!e&&0===e.indexOf("file://")}(e)||!u.pasteImageData(t,n))&&n&&st.shouldFilterDrop(i)){var o=e["mce-internal"]||e["text/html"]||e["text/plain"];o&&(t.preventDefault(),K.setEditorTimeout(i,function(){i.undoManager.transact(function(){e["mce-internal"]&&i.execCommand("Delete"),Ut(i,n),o=lt.trimHtml(o),e["text/html"]?u.pasteHtml(o,r):u.pasteText(o)})}))}}}),i.on("dragstart",function(t){a.set(!0)}),i.on("dragover dragend",function(t){st.shouldPasteDataImages(i)&&!1===a.get()&&(t.preventDefault(),Ut(i,Wt(i,t))),"dragend"===t.type&&a.set(!1)})},te=function(t){var e=t.plugins.paste,n=st.getPreProcess(t);n&&t.on("PastePreProcess",function(t){n.call(e,e,t)});var r=st.getPostProcess(t);r&&t.on("PastePostProcess",function(t){r.call(e,e,t)})};function ee(e,n){e.on("PastePreProcess",function(t){t.content=n(e,t.content,t.internal,t.wordContent)})}function ne(t,e){if(!zt.isWordContent(e))return e;var n=[];q.each(t.schema.getBlockElements(),function(t,e){n.push(e)});var r=new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g");return e=lt.filter(e,[[r,"$1"]]),e=lt.filter(e,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function re(t,e,n,r){if(r||n)return e;var c,o=st.getWebkitStyles(t);if(!1===st.shouldRemoveWebKitStyles(t)||"all"===o)return e;if(o&&(c=o.split(/[, ]/)),c){var l=t.dom,f=t.selection.getNode();e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(t,e,n,r){var o=l.parseStyle(l.decode(n)),i={};if("none"===c)return e+r;for(var u=0;u<c.length;u++){var a=o[c[u]],s=l.getStyle(f,c[u],!0);/color/.test(c[u])&&(a=l.toHex(a),s=l.toHex(s)),s!==a&&(i[c[u]]=a)}return(i=l.serializeStyle(i,"span"))?e+' style="'+i+'"'+r:e+r})}else e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return e=e.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(t,e,n,r){return e+' style="'+n+'"'+r})}function oe(n,t){n.$("a",t).find("font,u").each(function(t,e){n.dom.remove(e,!0)})}function ie(n,r){return function(e){e.setActive("text"===r.pasteFormat.get());function t(t){return e.setActive(t.state)}return n.on("PastePlainTextToggle",t),function(){return n.off("PastePlainTextToggle",t)}}}var ue=function(t){V.webkit&&ee(t,re),V.ie&&(ee(t,ne),function r(e,n){e.on("PastePostProcess",function(t){n(e,t.node)})}(t,oe))},ae=function(t,e){t.ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:function(){return t.execCommand("mceTogglePlainTextPaste")},onSetup:ie(t,e)}),t.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",onAction:function(){return t.execCommand("mceTogglePlainTextPaste")},onSetup:ie(t,e)})};!function de(){r.add("paste",function(t){if(!1===u(t)){var e=d(!1),n=d(st.isPasteAsTextEnabled(t)?"text":"html"),r=Mt(t,n),o=ue(t);return ae(t,r),p(t,r),te(t),Zt(t),Qt(t,r,e),a(r,o)}})}()}(window);