!function(){"use strict";vart=tinymce.util.Tools.resolve("tinymce.PluginManager");conste=t=>e=>typeofe===t,o=t=>"string"===(t=>{conste=typeoft;returnnull===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(o=r=t,(n=String).prototype.isPrototypeOf(o)||(null===(i=r.constructor)||void0===i?void0:i.name)===n.name)?"string":e;varo,r,n,i})(t),r=e("boolean"),n=t=>!(t=>null==t)(t),i=e("function"),s=e("number"),l=(!1,()=>false);classa{constructor(t,e){this.tag=t,this.value=e}staticsome(t){returnnewa(!0,t)}staticnone(){returna.singletonNone}fold(t,e){returnthis.tag?e(this.value):t()}isSome(){returnthis.tag}isNone(){return!this.tag}map(t){returnthis.tag?a.some(t(this.value)):a.none()}bind(t){returnthis.tag?t(this.value):a.none()}exists(t){returnthis.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:a.none()}getOr(t){returnthis.tag?this.value:t}or(t){returnthis.tag?this:t}getOrThunk(t){returnthis.tag?this.value:t()}orThunk(t){returnthis.tag?this:t()}getOrDie(t){if(this.tag)returnthis.value;thrownewError(null!=t?t:"Called getOrDie on None")}staticfrom(t){returnn(t)?a.some(t):a.none()}getOrNull(){returnthis.tag?this.value:null}getOrUndefined(){returnthis.value}each(t){this.tag&&t(this.value)}toArray(){returnthis.tag?[this.value]:[]}toString(){returnthis.tag?`some(${this.value})`:"none()"}}a.singletonNone=newa(!1);constu=(t,e)=>{for(leto=0,r=t.length;o<r;o++)e(t[o],o)},c=t=>{if(null==t)thrownewError("Node cannot be null or undefined");return{dom:t}},d=c,h=(t,e)=>{consto=t.dom;if(1!==o.nodeType)return!1;{constt=o;if(void0!==t.matches)returnt.matches(e);if(void0!==t.msMatchesSelector)returnt.msMatchesSelector(e);if(void0!==t.webkitMatchesSelector)returnt.webkitMatchesSelector(e);if(void0!==t.mozMatchesSelector)returnt.mozMatchesSelector(e);thrownewError("Browser lacks native selectors")}};"undefined"!=typeofwindow?window:Function("return this;")();constm=t=>e=>(t=>t.dom.nodeType)(e)===t,g=m(1),f=m(3),v=m(9),p=m(11),y=(t,e)=>{t.dom.removeAttribute(e)},w=i(Element.prototype.attachShadow)&&i(Node.prototype.getRootNode)?t=>d(t.dom.getRootNode()):t=>v(t)?t:d(t.dom.ownerDocument),N=t=>d(t.dom.host),b=t=>{conste=f(t)?t.dom.parentNode:t.dom;if(null==e||null===e.ownerDocument)return!1;consto=e.ownerDocument;return(t=>{conste=w(t);returnp(o=e)&&n(o.dom.host)?a.some(e):a.none();varo})(d(e)).fold((()=>o.body.contains(e)),(r=b,i=N,t=>r(i(t))));varr,i},S=t=>"rtl"===((t,e)=>{consto=t.dom,r=window.getComputedStyle(o).getPropertyValue(e);return""!==r||b(t)?r:((t,e)=>(t=>void0!==t.style&&i(t.style.getPropertyValue))(t)?t.style.getPropertyValue(e):"")(o,e)})(t,"direction")?"rtl":"ltr",A=(t,e)=>((t,o)=>((t,e)=>{consto=[];for(letr=0,n=t.length;r<n;r++){constn=t[r];e(n,r)&&o.push(n)}returno})(((t,e)=>{consto=t.length,r=newArray(o);for(letn=0;n<o;n++){consto=t[n];r[n]=e(o,n)}returnr})(t.dom.childNodes,d),(t=>h(t,e))))(t),T=("li",t=>g(t)&&"li"===t.dom.nodeName.toLowerCase());constC=(t,e)=>{constn=t.selection.getSelectedBlocks();n.length>0&&(u(n,(t=>{constn=d(t),c=T(n),m=((t,e)=>{return(e?(o=t,r="ol,ul",((t,e,o)=>{letn=t.dom;consts=i(o)?o:l;for(;n.parentNode;){n=n.parentNode;constt=d(n);if(h(t,r))returna.some(t);if(s(t))break}returna.none()})(o,0,n)):a.some(t)).getOr(t);varo,r,n})(n,c);varf;(f=m,(t=>a.from(t.dom.parentNode).map(d))(f).filter(g)).each((t=>{if(S(t)!==e?((t,e,n)=>{((t,e,n)=>{if(!(o(n)||r(n)||s(n)))throwconsole.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),newError("Attribute value was not simple");t.setAttribute(e,n+"")})(t.dom,e,n)})(m,"dir",e):S(m)!==e&&y(m,"dir"),c){constt=A(m,"li[dir]");u(t,(t=>y(t,"dir")))}}))})),t.nodeChanged())},D=(t,e)=>o=>{constr=t=>{constr=d(t.element);o.setActive(S(r)===e)};returnt.on("NodeChange",r),()=>t.off("NodeChange",r)};t.add("directionality",(t=>{(t=>{t.addCommand("mceDirectionLTR",(()=>{C(t,"ltr")})),t.addCommand("mceDirectionRTL",(()=>{C(t,"rtl")}))})(t),(t=>{t.ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr