!function(u){"use strict";vare,n,t,r,o,i,a,s,c=tinymce.util.Tools.resolve("tinymce.PluginManager"),f=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),d=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),l=tinymce.util.Tools.resolve("tinymce.util.VK"),p=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),m=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),g=function(e){returne&&"BR"===e.nodeName},h=function(e){returne&&3===e.nodeType},y=function(e){returne&&/^(OL|UL|DL)$/.test(e.nodeName)},N=function(e){returne&&/^(OL|UL)$/.test(e.nodeName)},S=function(e){returne&&/^(DT|DD)$/.test(e.nodeName)},C=function(e){returne&&/^(LI|DT|DD)$/.test(e.nodeName)},O=function(e){returne&&/^(TH|TD)$/.test(e.nodeName)},b=g,T=function(e,n){returnn&&!!e.schema.getTextBlockElements()[n.nodeName]},D=function(e,n){returne&&e.nodeNameinn},L=function(e,n){return!!g(n)&&!(!e.isBlock(n.nextSibling)||g(n.previousSibling))},E=function(e,n,t){varr=e.isEmpty(n);return!(t&&0<e.select("span[data-mce-type=bookmark]",n).length)&&r},w=function(e,n){returne.isChildOf(n,e.getRoot())},k=function(e,n){if(h(e))return{container:e,offset:n};vart=f.getNode(e,n);returnh(t)?{container:t,offset:n>=e.childNodes.length?t.data.length:0}:t.previousSibling&&h(t.previousSibling)?{container:t.previousSibling,offset:t.previousSibling.data.length}:t.nextSibling&&h(t.nextSibling)?{container:t.nextSibling,offset:0}:{container:e,offset:n}},A=function(e){varn=e.cloneRange(),t=k(e.startContainer,e.startOffset);n.setStart(t.container,t.offset);varr=k(e.endContainer,e.endOffset);returnn.setEnd(r.container,r.offset),n},x=m.DOM,R=function(o){vari={},e=function(e){varn,t,r;t=o[e?"startContainer":"endContainer"],r=o[e?"startOffset":"endOffset"],1===t.nodeType&&(n=x.create("span",{"data-mce-type":"bookmark"}),t.hasChildNodes()?(r=Math.min(r,t.childNodes.length-1),e?t.insertBefore(n,t.childNodes[r]):x.insertAfter(n,t.childNodes[r])):t.appendChild(n),t=n,r=0),i[e?"startContainer":"endContainer"]=t,i[e?"startOffset":"endOffset"]=r};returne(!0),o.collapsed||e(),i},I=function(o){functione(e){varn,t,r;n=r=o[e?"startContainer":"endContainer"],t=o[e?"startOffset":"endOffset"],n&&(1===n.nodeType&&(t=function(e){for(varn=e.parentNode.firstChild,t=0;n;){if(n===e)returnt;1===n.nodeType&&"bookmark"===n.getAttribute("data-mce-type")||t++,n=n.nextSibling}return-1}(n),n=n.parentNode,x.remove(r),!n.hasChildNodes()&&x.isBlock(n)&&n.appendChild(x.create("br"))),o[e?"startContainer":"endContainer"]=n,o[e?"startOffset":"endOffset"]=t)}e(!0),e();varn=x.createRng();returnn.setStart(o.startContainer,o.startOffset),o.endContainer&&n.setEnd(o.endContainer,o.endOffset),A(n)},_=function(e){returnfunction(){returne}},B=function(t){returnfunction(){for(vare=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return!t.apply(null,e)}},P=_(!1),M=_(!0),U=P,F=M,j=function(){returnH},H=(r={fold:function(e,n){returne()},is:U,isSome:U,isNone:F,getOr:t=function(e){returne},getOrThunk:n=function(e){returne()},getOrDie:function(e){thrownewError(e||"error: getOrDie called on none.")},getOrNull:function(){returnnull},getOrUndefined:function(){returnundefined},or:t,orThunk:n,map:j,ap:j,each:function(){},bind:j,flatten:j,exists:U,forall:F,filter:j,equals:e=function(e){returne.isNone()},equals_:e,toArray:function(){return[]},toString:_("none()")},Object.freeze&&Object.freeze(r),r),$=function(t){vare=function(){returnt},n=function(){returno},r=function(e){returne(t)},o={fold:function(e,n){returnn(t)},is:function(e){returnt===e},isSome:F,isNone:U,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return$(e(t))},ap:function(e){returne.fold(j,function(e){return$(e(t))})},each:function(e){e(t)},bind:r,flatten:e,exists:r,forall:r,filter:function(e){returne(t)?o:H},equals:function(e){returne.is(t)},equals_:function(e,n){returne.fold(U,function(e){returnn(t,e)})},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};returno},q={some:$,none:j,from:function(e){returnnull=