!function(){"use strict";functionc(n){vare=n;return{get:function(){returne},set:function(n){e=n}}}functionn(r){returnfunction(n){returnt=typeof(e=n),(null===e?"null":"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)===r;vare,t}}functione(e){returnfunction(n){returntypeofn===e}}functionl(n){return!(null==n)}functionf(){}functionu(n){returnfunction(){returnn}}functiont(n){returnn}varr=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=n("string"),d=n("array"),o=e("boolean"),h=e("function"),i=e("number");functions(){returnp}varg=u(!1),m=u(!0),p={fold:function(n,e){returnn()},isSome:g,isNone:m,getOr:t,getOrThunk:v,getOrDie:function(n){thrownewError(n||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(void0),or:t,orThunk:v,map:s,each:f,bind:s,exists:g,forall:m,filter:function(){returnp},toArray:function(){return[]},toString:u("none()")};functionv(n){returnn()}functiony(n){functione(){returnt.get().each(n)}vart=c(C.none());return{clear:function(){e(),t.set(C.none())},isSet:function(){returnt.get().isSome()},get:function(){returnt.get()},set:function(n){e(),t.set(C.some(n))}}}functionw(){returny(function(n){returnn.unbind()})}functionO(n,e){for(vart=n.length,r=newArray(t),o=0;o<t;o++){varu=n[o];r[o]=e(u,o)}returnr}functionA(n,e){for(vart=0,r=n.length;t<r;t++)e(n[t],t)}functionb(n,e){for(vart=[],r=0,o=n.length;r<o;r++){varu=n[r];e(u,r)&&t.push(u)}returnt}functionS(n){returnvoid0!==n.style&&h(n.style.getPropertyValue)}functionE(n){if(null==n)thrownewError("Node cannot be null or undefined");return{dom:n}}varT=function(t){functionn(){returno}functione(n){returnn(t)}varr=u(t),o={fold:function(n,e){returne(t)},isSome:m,isNone:g,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:n,orThunk:n,map:function(n){returnT(n(t))},each:function(n){n(t)},bind:e,exists:e,forall:e,filter:function(n){returnn(t)?o:p},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};returno},C={some:T,none:s,from:function(n){returnnull==n?p:T(n)}},F=function(){return(F=Object.assign||function(n){for(vare,t=1,r=arguments.length;t<r;t++)for(varoine=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);returnn}).apply(this,arguments)},x=Array.prototype.push,D=Object.keys,M={fromHtml:function(n,e){vart=(e||document).createElement("div");if(t.innerHTML=n,!t.hasChildNodes()||1<t.childNodes.length)throwconsole.error("HTML does not have a single root node",n),newError("HTML must have a single root node");returnE(t.childNodes[0])},fromTag:function(n,e){vart=(e||document).createElement(n);returnE(t)},fromText:function(n,e){vart=(e||document).createTextNode(n);returnE(t)},fromDom:E,fromPoint:function(n,e,t){returnC.from(n.dom.elementFromPoint(e,t)).map(E)}};functionk(e){returnfunction(n){returnn.dom.nodeType===e}}functionN(n,e){vart=n.dom;if(1!==t.nodeType)return!1;varr=t;if(void0!==r.matches)returnr.matches(e);if(void0!==r.msMatchesSelector)returnr.msMatchesSelector(e);if(void0!==r.webkitMatchesSelector)returnr.webkitMatchesSelector(e);if(void0!==r.mozMatchesSelector)returnr.mozMatchesSelector(e);thrownewError("Browser lacks native selectors")}functionP(n){returnM.fromDom(n.dom.ownerDocument)}functionL(n){vare,t=on(n);returnnn(e=t)&&l(e.dom.host)?C.some(t):C.none()}functionH(n){returnM.fromDom(n.dom.host)}functionq(n,e,t){!function(n,e,t){if(!(a(t)||o(t)||i(t)))throwconsole.error("Invalid call to Attribute.set. Key ",e,":: Value ",t,":: Element ",n),newError("Attribute value was not simple");n.setAttribute(e,t+"")}(n.dom,e,t)}functionR(n,e){vart=n.dom.getAttribute(e);returnnull===t?void0:t}functionV(n,e){n.dom.removeAttribute(e)}functionj(n,e){vari=n.dom;!function(n){for(vare,t=D(n),r=0,o=t.length;r<o;r++){varu=t[r];e=n[u],function(n,e,t){if(!a(t))throwconsole.error("Invalid call to CSS.set. Property ",e,":: Value ",t,":: Element ",n