!function(){"use strict";functionn(t){returnfunction(n){returntypeofn===t}}functionu(n){returnfunction(){returnn}}functiont(n){returnn}functionr(){returnd}varo,e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(n){returnr=typeof(t=n),(null===t?"null":"object"==r&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":r)===o;vart,r},c=n("boolean"),f=n("function"),l=n("number"),a=u(!(o="string")),m=u(!0),d={fold:function(n,t){returnn()},isSome:a,isNone:m,getOr:t,getOrThunk:s,getOrDie:function(n){thrownewError(n||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(void0),or:t,orThunk:s,map:r,each:function(){},bind:r,exists:a,forall:m,filter:function(){returnd},toArray:function(){return[]},toString:u("none()")};functions(n){returnn()}functiong(n,t){for(varr=0,o=n.length;r<o;r++)t(n[r],r)}functionh(n,t){varr=n.dom;if(1!==r.nodeType)return!1;varo=r;if(void0!==o.matches)returno.matches(t);if(void0!==o.msMatchesSelector)returno.msMatchesSelector(t);if(void0!==o.webkitMatchesSelector)returno.webkitMatchesSelector(t);if(void0!==o.mozMatchesSelector)returno.mozMatchesSelector(t);thrownewError("Browser lacks native selectors")}functionv(n){if(null==n)thrownewError("Node cannot be null or undefined");return{dom:n}}varp=function(r){functionn(){returne}functiont(n){returnn(r)}varo=u(r),e={fold:function(n,t){returnt(r)},isSome:m,isNone:a,getOr:o,getOrThunk:o,getOrDie:o,getOrNull:o,getOrUndefined:o,or:n,orThunk:n,map:function(n){returnp(n(r))},each:function(n){n(r)},bind:t,exists:t,forall:t,filter:function(n){returnn(r)?e:d},toArray:function(){return[r]},toString:function(){return"some("+r+")"}};returne},y={some:p,none:r,from:function(n){returnnull==n?d:p(n)}},w={fromHtml:function(n,t){varr=(t||document).createElement("div");if(r.innerHTML=n,!r.hasChildNodes()||1<r.childNodes.length)throwconsole.error("HTML does not have a single root node",n),newError("HTML must have a single root node");returnv(r.childNodes[0])},fromTag:function(n,t){varr=(t||document).createElement(n);returnv(r)},fromText:function(n,t){varr=(t||document).createTextNode(n);returnv(r)},fromDom:v,fromPoint:function(n,t,r){returny.from(n.dom.elementFromPoint(t,r)).map(v)}};functionD(t){returnfunction(n){returnn.dom.nodeType===t}}functionN(n,t,r){!function(n,t,r){if(!(i(r)||c(r)||l(r)))throwconsole.error("Invalid call to Attribute.set. Key ",t,":: Value ",r,":: Element ",n),newError("Attribute value was not simple");n.setAttribute(t,r+"")}(n.dom,t,r)}functionT(n,t){n.dom.removeAttribute(t)}functionS(n){returnw.fromDom(n.dom.host)}functionb(e,u,n){returnfunction(n){for(vart=e.dom,r=f(n)?n:a;t.parentNode;){vart=t.parentNode,o=w.fromDom(t);if(h(o,u))returny.some(o);if(r(o))break}returny.none()}(n)}functionO(n){return"rtl"===(r="direction",o=(t=n).dom,""!==(e=window.getComputedStyle(o).getPropertyValue(r))||B(t)?e:H(o,r))?"rtl":"ltr";vart,r,o,e}functionA(n,t){returnr=function(n){returnh(n,t)},function(n,t){for(varr=[],o=0,e=n.length;o<e;o++){varu=n[o];t(u,o)&&r.push(u)}returnr}(function(n,t){for(varr=n.length,o=newArray(r),e=0;e<r;e++){varu=n[e];o[e]=t(u,e)}returno}(n.dom.childNodes,w.fromDom),r);varr}functionC(n,u){vart=n.selection.getSelectedBlocks();0<t.length&&(g(t,function(n){vart,r=w.fromDom(n),o=k(r),e=(t=r,(o?b(t,"ol,ul"):y.some(t)).getOr(t));y.from(e.dom.parentNode).map(w.fromDom).filter(E).each(function(n){O(n)!==u?N(e,"dir",u):O(e)!==u&&T(e,"dir"),o&&g(A(e,"li[dir]"),function(n){returnT(n,"dir"),0})})}),n.nodeChanged())}functionM(t,o){returnfunction(r){functionn(n){vart=w.fromDom(n.element);r.setActive(O(t)===o)}returnt.on("NodeChange",n),function(){returnt.off("NodeChange",n)}}}"undefined"!=typeofwindow||Function("return this;")();functionk(n){returnE(n)&&"li"===n.dom.nodeName.toLowerCase()}varE=D(1),L=D(3),P=D(9),R=D(11),x=f(Element.prototype.attachShadow)&&f(Node.prototype.getRootNode)?function(n