!function(r){"use strict";varn,e,t,o,u,i,c=function(n){vare=n,t=function(){returne};return{get:t,set:function(n){e=n},clone:function(){returnc(t())}}},a=tinymce.util.Tools.resolve("tinymce.PluginManager"),f=function(n){return{isEnabled:function(){returnn.get()}}},l=function(n,e){returnn.fire("VisualChars",{state:e})},d={"\xa0":"nbsp","\xad":"shy"},s=function(n,e){vart,r="";for(tinn)r+=t;returnnewRegExp("["+r+"]",e?"g":"")},m=function(n){vare,t="";for(einn)t&&(t+=","),t+="span.mce-"+n[e];returnt},N={charMap:d,regExp:s(d),regExpGlobal:s(d,!0),selector:m(d),charMapToRegExp:s,charMapToSelector:m},E=function(n){returnfunction(){returnn}},g=E(!1),h=E(!0),v=g,T=h,p=function(){returnO},O=(o={fold:function(n,e){returnn()},is:v,isSome:v,isNone:T,getOr:t=function(n){returnn},getOrThunk:e=function(n){returnn()},getOrDie:function(n){thrownewError(n||"error: getOrDie called on none.")},getOrNull:function(){returnnull},getOrUndefined:function(){returnundefined},or:t,orThunk:e,map:p,ap:p,each:function(){},bind:p,flatten:p,exists:v,forall:T,filter:p,equals:n=function(n){returnn.isNone()},equals_:n,toArray:function(){return[]},toString:E("none()")},Object.freeze&&Object.freeze(o),o),y=function(t){varn=function(){returnt},e=function(){returno},r=function(n){returnn(t)},o={fold:function(n,e){returne(t)},is:function(n){returnt===n},isSome:T,isNone:v,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:e,orThunk:e,map:function(n){returny(n(t))},ap:function(n){returnn.fold(p,function(n){returny(n(t))})},each:function(n){n(t)},bind:r,flatten:n,exists:r,forall:r,filter:function(n){returnn(t)?o:O},equals:function(n){returnn.is(t)},equals_:function(n,e){returnn.fold(v,function(n){returne(t,n)})},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};returno},D=function(n){returnnull===n||n===undefined?O:y(n)},_=(u="function",function(n){returnfunction(n){if(null===n)return"null";vare=typeofn;return"object"===e&&Array.prototype.isPrototypeOf(n)?"array":"object"===e&&String.prototype.isPrototypeOf(n)?"string":e}(n)===u}),C=function(n,e){for(vart=0,r=n.length;t<r;t++)e(n[t],t,n)},M=(Array.prototype.slice,_(Array.from)&&Array.from,function(n){if(null===n||n===undefined)thrownewError("Node cannot be null or undefined");return{dom:E(n)}}),b={fromHtml:function(n,e){vart=(e||r.document).createElement("div");if(t.innerHTML=n,!t.hasChildNodes()||1<t.childNodes.length)throwr.console.error("HTML does not have a single root node",n),newError("HTML must have a single root node");returnM(t.childNodes[0])},fromTag:function(n,e){vart=(e||r.document).createElement(n);returnM(t)},fromText:function(n,e){vart=(e||r.document).createTextNode(n);returnM(t)},fromDom:M,fromPoint:function(n,e,t){varr=n.dom();returnD(r.elementFromPoint(e,t)).map(M)}},k=(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,r.Node.TEXT_NODE),w=(r.Node.PROCESSING_INSTRUCTION_NODE,r.Node.ENTITY_REFERENCE_NODE,r.Node.ENTITY_NODE,r.Node.NOTATION_NODE,function(n){returnn.dom().nodeValue}),S=(i=k,function(n){returnn.dom().nodeType===i}),x=function(n){return'<span data-mce-bogus="1" class="mce-'+N.charMap[n]+'">'+n+"</span>"},A=function(n,e){vart=[],r=function(n,e){for(vart=n.length,r=newArray(t),o=0;o<t;o++){varu=n[o];r[o]=e(u,o,n)}returnr}(n.dom().childNodes,b.fromDom);returnC(r,function(n){e(n)&&(t=t.concat([n])),t=t.concat(A(n,e))}),t},P={isMatch:function(n){returnS(n)&&w(n)!==undefined&&N.regExp.test(w(n))},filterDescendants:A,findParentElm:function(n,e){for(;n.parentNode;){if(n.parentNode===e)returnn;n=n.parentNode}},replaceWithSpans:function(n){returnn.replace(N.regExpGlobal,x)}},R=function(t,n){varr,o,e=P.filterDescendants(b.fromDom(n),P.isMatch);C(e,function(n){vare=P.replaceWithSpans(w(n));for(o=t.dom.create("div",null,e);r=o.lastChild;)t.dom.insertAfter(r,n.dom());t.dom.remove(n.dom())})},I=function(e,n){vart=e.dom.select(N.selector,n);C(t,function(n){e.dom.remove(n,1)})},B=R,U=I,V