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