diff --git a/bl-plugins/tinymce/tinymce/plugins/autoheight/plugin.min.js b/bl-plugins/tinymce/tinymce/plugins/autoheight/plugin.min.js index 8c263a6d..405fe9b9 100644 --- a/bl-plugins/tinymce/tinymce/plugins/autoheight/plugin.min.js +++ b/bl-plugins/tinymce/tinymce/plugins/autoheight/plugin.min.js @@ -38,4 +38,4 @@ tinymce.PluginManager.add('autoheight', function(editor) { resizeEditor(); }, 10); }); -}); +}); \ No newline at end of file diff --git a/bl-plugins/tinymce/tinymce/plugins/image/plugin.min.js b/bl-plugins/tinymce/tinymce/plugins/image/plugin.min.js index a28a8132..0b14a4bb 100755 --- a/bl-plugins/tinymce/tinymce/plugins/image/plugin.min.js +++ b/bl-plugins/tinymce/tinymce/plugins/image/plugin.min.js @@ -1 +1 @@ -!function(){"use strict";var i,e=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=function(e){return!1!==e.settings.image_dimensions},l=function(e){return!0===e.settings.image_advtab},g=function(e){return e.getParam("image_prepend_url","")},n=function(e){return e.getParam("image_class_list")},r=function(e){return!1!==e.settings.image_description},a=function(e){return!0===e.settings.image_title},o=function(e){return!0===e.settings.image_caption},u=function(e){return e.getParam("image_list",!1)},c=function(e){return e.getParam("images_upload_url",!1)},s=function(e){return e.getParam("images_upload_handler",!1)},m=function(e){return e.getParam("images_upload_url")},f=function(e){return e.getParam("images_upload_handler")},p=function(e){return e.getParam("images_upload_base_path")},h=function(e){return e.getParam("images_upload_credentials")},v="undefined"!=typeof window?window:Function("return this;")(),b=function(e,t){return function(e,t){for(var n=t!==undefined&&null!==t?t:v,r=0;r=s[1]?(a=l,o=s[1]-c):r&&d.push(l),!r&&l.length+c>s[0]&&(r=l,i=s[0]-c),c+=l.length),r&&a){if(l=n({startNode:r,startNodeIndex:i,endNode:a,endNodeIndex:o,innerNodes:d,match:s[2],matchIndex:u}),c-=a.length-o,a=r=null,d=[],u++,!(s=t.shift()))break}else if(p[l.nodeName]&&!f[l.nodeName]||!l.firstChild){if(l.nextSibling){l=l.nextSibling;continue}}else if(!h(l)){l=l.firstChild;continue}for(;;){if(l.nextSibling){l=l.nextSibling;break}if(l.parentNode===e)break e;l=l.parentNode}}}(n,c,function(e){var m;if("function"!=typeof e){var r=e.nodeType?e:v.createElement(e);m=function(e,t){var n=r.cloneNode(!1);return n.setAttribute("data-mce-index",t),e&&n.appendChild(v.createTextNode(e)),n}}else m=e;return function(e){var t,n,r,a=e.startNode,i=e.endNode,o=e.matchIndex;if(a===i){var d=a;r=d.parentNode,0t.get()&&o[i].setAttribute("data-mce-index",l-1)}return t.set(u),r?(s=k(e,t),x(e,t)):(s=C(e,t),b(e,t)),!a&&s},hasNext:k,hasPrev:C},n=function(r,a){return{done:function(e){return T.done(r,a,e)},find:function(e,t,n){return T.find(r,a,e,t,n)},next:function(){return T.next(r,a)},prev:function(){return T.prev(r,a)},replace:function(e,t,n){return T.replace(r,a,e,t,n)}}},a=function(i,o){var e,d={};function c(){s.statusbar.find("#next").disabled(!1===T.hasNext(i,o)),s.statusbar.find("#prev").disabled(!1===T.hasPrev(i,o))}function l(){i.windowManager.alert("Could not find the specified string.",function(){s.find("#find")[0].focus()})}i.undoManager.add(),e=p.trim(i.selection.getContent({format:"text"}));var s=i.windowManager.open({layout:"flex",pack:"center",align:"center",onClose:function(){i.focus(),T.done(i,o),i.undoManager.add()},onSubmit:function(e){var t,n,r,a;return e.preventDefault(),n=s.find("#case").checked(),a=s.find("#words").checked(),(r=s.find("#find").value()).length?d.text===r&&d.caseState===n&&d.wholeWord===a?T.hasNext(i,o)?(T.next(i,o),void c()):void l():((t=T.find(i,o,r,n,a))||l(),s.statusbar.items().slice(1).disabled(0===t),c(),void(d={text:r,caseState:n,wholeWord:a})):(T.done(i,o,!1),void s.statusbar.items().slice(1).disabled(!0))},buttons:[{text:"Find",subtype:"primary",onclick:function(){s.submit()}},{text:"Replace",disabled:!0,onclick:function(){T.replace(i,o,s.find("#replace").value())||(s.statusbar.items().slice(1).disabled(!0),o.set(-1),d={})}},{text:"Replace all",disabled:!0,onclick:function(){T.replace(i,o,s.find("#replace").value(),!0,!0),s.statusbar.items().slice(1).disabled(!0),d={}}},{type:"spacer",flex:1},{text:"Prev",name:"prev",disabled:!0,onclick:function(){T.prev(i,o),c()}},{text:"Next",name:"next",disabled:!0,onclick:function(){T.next(i,o),c()}}],title:"Find and replace",items:{type:"form",padding:20,labelGap:30,spacing:10,items:[{type:"textbox",name:"find",size:40,label:"Find",value:e},{type:"textbox",name:"replace",size:40,label:"Replace with"},{type:"checkbox",name:"case",text:"Match case",label:" "},{type:"checkbox",name:"words",text:"Whole words",label:" "}]}})},i=function(e,t){e.addCommand("SearchReplace",function(){a(e,t)})},d=function(e,t){return function(){a(e,t)}},c=function(e,t){e.addMenuItem("searchreplace",{text:"Find and replace",shortcut:"Meta+F",onclick:d(e,t),separator:"before",context:"edit"}),e.addButton("searchreplace",{tooltip:"Find and replace",onclick:d(e,t)}),e.shortcuts.add("Meta+F","",d(e,t))};e.add("searchreplace",function(e){var t=r(-1);return i(e,t),c(e,t),n(e,t)})}(); \ No newline at end of file +!function(){"use strict";var r=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return r(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),p=tinymce.util.Tools.resolve("tinymce.util.Tools");function h(e){return e&&1===e.nodeType&&"false"===e.contentEditable}var u={findAndReplaceDOMText:function(t,n,r,a,i){var o,d,m,f,p,g,c=[],l=0;function s(e,t){if(t=t||0,!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");var n=e.index;if(0=s[1]?(a=l,o=s[1]-c):r&&d.push(l),!r&&l.length+c>s[0]&&(r=l,i=s[0]-c),c+=l.length),r&&a){if(l=n({startNode:r,startNodeIndex:i,endNode:a,endNodeIndex:o,innerNodes:d,match:s[2],matchIndex:u}),c-=a.length-o,a=r=null,d=[],u++,!(s=t.shift()))break}else if(p[l.nodeName]&&!f[l.nodeName]||!l.firstChild){if(l.nextSibling){l=l.nextSibling;continue}}else if(!h(l)){l=l.firstChild;continue}for(;;){if(l.nextSibling){l=l.nextSibling;break}if(l.parentNode===e)break e;l=l.parentNode}}}(n,c,function(e){var h;if("function"!=typeof e){var r=e.nodeType?e:m.createElement(e);h=function(e,t){var n=r.cloneNode(!1);return n.setAttribute("data-mce-index",t),e&&n.appendChild(m.createTextNode(e)),n}}else h=e;return function(e){var t,n,r,a=e.startNode,i=e.endNode,o=e.matchIndex;if(a===i){var d=a;r=d.parentNode,0t.get()&&o[i].setAttribute("data-mce-index",l-1)}return t.set(u),r?(s=k(e,t),x(e,t)):(s=C(e,t),b(e,t)),!a&&s},hasNext:k,hasPrev:C},n=function(r,a){return{done:function(e){return T.done(r,a,e)},find:function(e,t,n){return T.find(r,a,e,t,n)},next:function(){return T.next(r,a)},prev:function(){return T.prev(r,a)},replace:function(e,t,n){return T.replace(r,a,e,t,n)}}},a=function(i,o){var e,d={};function c(){s.statusbar.find("#next").disabled(!1===T.hasNext(i,o)),s.statusbar.find("#prev").disabled(!1===T.hasPrev(i,o))}function l(){i.windowManager.alert("Could not find the specified string.",function(){s.find("#find")[0].focus()})}i.undoManager.add(),e=p.trim(i.selection.getContent({format:"text"}));var s=i.windowManager.open({layout:"flex",pack:"center",align:"center",onClose:function(){i.focus(),T.done(i,o),i.undoManager.add()},onSubmit:function(e){var t,n,r,a;return e.preventDefault(),n=s.find("#case").checked(),a=s.find("#words").checked(),(r=s.find("#find").value()).length?d.text===r&&d.caseState===n&&d.wholeWord===a?T.hasNext(i,o)?(T.next(i,o),void c()):void l():((t=T.find(i,o,r,n,a))||l(),s.statusbar.items().slice(1).disabled(0===t),c(),void(d={text:r,caseState:n,wholeWord:a})):(T.done(i,o,!1),void s.statusbar.items().slice(1).disabled(!0))},buttons:[{text:"Find",subtype:"primary",onclick:function(){s.submit()}},{text:"Replace",disabled:!0,onclick:function(){T.replace(i,o,s.find("#replace").value())||(s.statusbar.items().slice(1).disabled(!0),o.set(-1),d={})}},{text:"Replace all",disabled:!0,onclick:function(){T.replace(i,o,s.find("#replace").value(),!0,!0),s.statusbar.items().slice(1).disabled(!0),d={}}},{type:"spacer",flex:1},{text:"Prev",name:"prev",disabled:!0,onclick:function(){T.prev(i,o),c()}},{text:"Next",name:"next",disabled:!0,onclick:function(){T.next(i,o),c()}}],title:"Find and replace",items:{type:"form",padding:20,labelGap:30,spacing:10,items:[{type:"textbox",name:"find",size:40,label:"Find",value:e},{type:"textbox",name:"replace",size:40,label:"Replace with"},{type:"checkbox",name:"case",text:"Match case",label:" "},{type:"checkbox",name:"words",text:"Whole words",label:" "}]}})},i=function(e,t){e.addCommand("SearchReplace",function(){a(e,t)})},d=function(e,t){return function(){a(e,t)}},c=function(e,t){e.addMenuItem("searchreplace",{text:"Find and replace",shortcut:"Meta+F",onclick:d(e,t),separator:"before",context:"edit"}),e.addButton("searchreplace",{tooltip:"Find and replace",onclick:d(e,t)}),e.shortcuts.add("Meta+F","",d(e,t))};e.add("searchreplace",function(e){var t=r(-1);return i(e,t),c(e,t),n(e,t)})}(); \ No newline at end of file diff --git a/bl-plugins/tinymce/tinymce/plugins/spellchecker/plugin.min.js b/bl-plugins/tinymce/tinymce/plugins/spellchecker/plugin.min.js index 6acf808c..8478fb05 100755 --- a/bl-plugins/tinymce/tinymce/plugins/spellchecker/plugin.min.js +++ b/bl-plugins/tinymce/tinymce/plugins/spellchecker/plugin.min.js @@ -1 +1 @@ -!function(){"use strict";var c=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return c(n())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(e){return!(!/(^|[ ,])tinymcespellchecker([, ]|$)/.test(e.settings.plugins)||!t.get("tinymcespellchecker")||("undefined"!=typeof window.console&&window.console.log&&window.console.log("Spell Checker Pro is incompatible with Spell Checker plugin! Remove 'spellchecker' from the 'plugins' option."),0))},h=function(e){return e.getParam("spellchecker_languages","English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv")},l=function(e){var t=e.getParam("language","en");return e.getParam("spellchecker_language",t)},d=function(e){return e.getParam("spellchecker_rpc_url")},f=function(e){return e.getParam("spellchecker_callback")},s=function(e){var t=new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+',"g");return e.getParam("spellchecker_wordchar_pattern",t)},g=tinymce.util.Tools.resolve("tinymce.util.Tools"),m=tinymce.util.Tools.resolve("tinymce.util.URI"),p=tinymce.util.Tools.resolve("tinymce.util.XHR"),u=function(e){return e.fire("SpellcheckStart")},r=function(e){return e.fire("SpellcheckEnd")};function v(e){return e&&1===e.nodeType&&"false"===e.contentEditable}var x,o=function(c,r){var n,o,f,h,g,i=[],x=r.dom;function a(e,t){if(!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");return{start:e.index,end:e.index+e[0].length,text:e[0],data:t}}function l(e){var t=c.getElementsByTagName("*"),n=[];e="number"==typeof e?""+e:null;for(var r=0;r=a.end?(o=u,c=a.end-s):r&&l.push(u),!r&&u.length+s>a.start&&(r=u,i=a.start-s),s+=u.length),r&&o){if(u=n({startNode:r,startNodeIndex:i,endNode:o,endNodeIndex:c,innerNodes:l,match:a.text,matchIndex:d}),s-=o.length-c,o=r=null,l=[],d++,!(a=t.shift()))break}else if(h[u.nodeName]&&!f[u.nodeName]||!u.firstChild){if(u.nextSibling){u=u.nextSibling;continue}}else if(!v(u)){u=u.firstChild;continue}for(;;){if(u.nextSibling){u=u.nextSibling;break}if(u.parentNode===e)break e;u=u.parentNode}}}(c,i,function(o){function v(e,t){var n=i[t];n.stencil||(n.stencil=o(n));var r=n.stencil.cloneNode(!1);return r.setAttribute("data-mce-index",t),e&&r.appendChild(x.doc.createTextNode(e)),r}return function(e){var t,n,r,o=e.startNode,i=e.endNode,c=e.matchIndex,a=x.doc;if(o===i){var l=o;r=l.parentNode,0?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+',"g");return e.getParam("spellchecker_wordchar_pattern",t)},g=tinymce.util.Tools.resolve("tinymce.util.Tools"),m=tinymce.util.Tools.resolve("tinymce.util.URI"),p=tinymce.util.Tools.resolve("tinymce.util.XHR"),u=function(e){return e.fire("SpellcheckStart")},r=function(e){return e.fire("SpellcheckEnd")};function x(e){return e&&1===e.nodeType&&"false"===e.contentEditable}var v,o=function(c,r){var n,o,f,h,g,i=[],v=r.dom;function a(e,t){if(!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");return{start:e.index,end:e.index+e[0].length,text:e[0],data:t}}function l(e){var t=c.getElementsByTagName("*"),n=[];e="number"==typeof e?""+e:null;for(var r=0;r=a.end?(o=u,c=a.end-s):r&&l.push(u),!r&&u.length+s>a.start&&(r=u,i=a.start-s),s+=u.length),r&&o){if(u=n({startNode:r,startNodeIndex:i,endNode:o,endNodeIndex:c,innerNodes:l,match:a.text,matchIndex:d}),s-=o.length-c,o=r=null,l=[],d++,!(a=t.shift()))break}else if(h[u.nodeName]&&!f[u.nodeName]||!u.firstChild){if(u.nextSibling){u=u.nextSibling;continue}}else if(!x(u)){u=u.firstChild;continue}for(;;){if(u.nextSibling){u=u.nextSibling;break}if(u.parentNode===e)break e;u=u.parentNode}}}(c,i,function(o){function p(e,t){var n=i[t];n.stencil||(n.stencil=o(n));var r=n.stencil.cloneNode(!1);return r.setAttribute("data-mce-index",t),e&&r.appendChild(v.doc.createTextNode(e)),r}return function(e){var t,n,r,o=e.startNode,i=e.endNode,c=e.matchIndex,a=v.doc;if(o===i){var l=o;r=l.parentNode,0n.maxRow()||sn.maxCol()||(Yt.getAt(t,l,s).filter(r).isNone()?(o=f,i=e[l].element(),u=le.fromTag("td"),rn.append(u,le.fromTag("br")),(o?rn.append:rn.prepend)(i,u)):f=!0)}(m,g,h,d),o=e,f=h,s=P(ut.firstLayer(o,"tr"),function(e){return 0===e.dom().childElementCount}),k(s,an.remove),f.minCol()!==f.maxCol()&&f.minRow()!==f.maxRow()||k(ut.firstLayer(o,"th,td"),function(e){bt.remove(e,"rowspan"),bt.remove(e,"colspan")}),bt.remove(o,"width"),bt.remove(o,"height"),en.remove(o,"width"),en.remove(o,"height"),e},fn=function(e,t){return le.fromDom(e.dom().cloneNode(t))},sn=function(e){return fn(e,!0)},dn=function(e,t){var n=le.fromTag(t),r=bt.clone(e);return bt.setAll(n,r),n},mn=function(e){return fn(e,!1)},gn=sn,hn=function(e,t){var n=dn(e,t),r=ot.children(sn(e));return on.append(n,r),n},pn=(Nt=mt.isText,Dt="text",Et=function(e){return Nt(e)?S.from(e.dom().nodeValue):S.none()},Ot=Xe.detect().browser,{get:function(e){if(!Nt(e))throw new Error("Can only get "+Dt+" value of a "+Dt+" node");return At(e).getOr("")},getOption:At=Ot.isIE()&&10===Ot.version.major?function(e){try{return Et(e)}catch(t){return S.none()}}:Et,set:function(e,t){if(!Nt(e))throw new Error("Can only set raw "+Dt+" value of a "+Dt+" node");e.dom().nodeValue=t}}),vn={get:function(e){return pn.get(e)},getOption:function(e){return pn.getOption(e)},set:function(e,t){pn.set(e,t)}},bn=function(e){return"img"===mt.name(e)?1:vn.getOption(e).fold(function(){return ot.children(e).length},function(e){return e.length})},wn=["img","br"],yn=bn,xn=function(e){return vn.getOption(e).filter(function(e){return 0!==e.trim().length||-1=e.startCol()&&t.column()+t.colspan()-1<=e.finishCol()&&t.row()>=e.startRow()&&t.row()+t.rowspan()-1<=e.finishRow()},er=function(e,t){var n=t.column(),r=t.column()+t.colspan()-1,o=t.row(),i=t.row()+t.rowspan()-1;return n<=e.finishCol()&&r>=e.startCol()&&o<=e.finishRow()&&i>=e.startRow()},tr=function(e,t){for(var n=!0,r=R(Zn,t),o=t.startRow();o<=t.finishRow();o++)for(var i=t.startCol();i<=t.finishCol();i++)n=n&&Yt.getAt(e,o,i).exists(r);return n?S.some(t):S.none()},nr=function(e,t,n){var r=Yt.findItem(e,t,$e.eq),o=Yt.findItem(e,n,$e.eq);return r.bind(function(r){return o.map(function(e){return t=r,n=e,ae.bounds(Math.min(t.row(),n.row()),Math.min(t.column(),n.column()),Math.max(t.row()+t.rowspan()-1,n.row()+n.rowspan()-1),Math.max(t.column()+t.colspan()-1,n.column()+n.colspan()-1));var t,n})})},rr=nr,or=function(t,e,n){return nr(t,e,n).bind(function(e){return tr(t,e)})},ir=function(r,e,o,i){return Yt.findItem(r,e,$e.eq).bind(function(e){var t=0=t.length-1)return S.none();var e=t[n].fold(function(){var e=H(t.slice(0,n));return Jo(e,function(e,t){return e.map(function(e){return{value:e,delta:t+1}})})},function(e){return S.some({value:e,delta:0})}),r=t[n+1].fold(function(){var e=t.slice(n+1);return Jo(e,function(e,t){return e.map(function(e){return{value:e,delta:t+1}})})},function(e){return S.some({value:e,delta:1})});return e.bind(function(n){return r.map(function(e){var t=e.delta+n.delta;return Math.abs(e.value-n.value)/t})})},fi=function(e,t,n){var r=e();return M(r,t).orThunk(function(){return S.from(r[0]).orThunk(n)}).map(function(e){return e.element()})},si=function(n){var e=n.grid(),t=ci(0,e.columns()),r=ci(0,e.rows());return A(t,function(t){return fi(function(){return F(r,function(e){return Yt.getAt(n,e,t).filter(function(e){return e.column()===t}).fold(C([]),function(e){return[e]})})},function(e){return 1===e.colspan()},function(){return Yt.getAt(n,0,t)})})},di=function(n){var e=n.grid(),t=ci(0,e.rows()),r=ci(0,e.columns());return A(t,function(t){return fi(function(){return F(r,function(e){return Yt.getAt(n,t,e).filter(function(e){return e.row()===t}).fold(C([]),function(e){return[e]})})},function(e){return 1===e.rowspan()},function(){return Yt.getAt(n,t,0)})})},mi=function(e,t,n,r,o){var i=le.fromTag("div");return en.setAll(i,{position:"absolute",left:t-r/2+"px",top:n+"px",height:o+"px",width:r+"px"}),bt.setAll(i,{"data-column":e,role:"presentation"}),i},gi=function(e,t,n,r,o){var i=le.fromTag("div");return en.setAll(i,{position:"absolute",left:t+"px",top:n-o/2+"px",height:o+"px",width:r+"px"}),bt.setAll(i,{"data-row":e,role:"presentation"}),i},hi=function(e){var t=e.replace(/\./g,"-");return{resolve:function(e){return t+"-"+e}}},pi={resolve:hi("ephox-snooker").resolve},vi=function(e,t){var n=bt.get(e,t);return n===undefined||""===n?[]:n.split(" ")},bi=vi,wi=function(e,t,n){var r=vi(e,t).concat([n]);return bt.set(e,t,r.join(" ")),!0},yi=function(e,t,n){var r=P(vi(e,t),function(e){return e!==n});return 0=t.length||e.column()>Zo.cellLength(t[0]))return Qi.error("invalid start address out of table bounds, row: "+e.row()+", column: "+e.column());var r=t.slice(e.row()),o=r[0].cells().slice(e.column()),i=Zo.cellLength(n[0]),u=n.length;return Qi.value({rowDelta:C(r.length-u),colDelta:C(o.length-i)})},ru=function(e,t){var n=Zo.cellLength(e[0]),r=Zo.cellLength(t[0]);return{rowDelta:C(0),colDelta:C(n-r)}},ou=function(e,t,n){var r=t.colDelta()<0?tu:u;return(t.rowDelta()<0?eu:u)(r(e,Math.abs(t.colDelta()),n),Math.abs(t.rowDelta()),n)},iu=function(e,t,n,r){if(0===e.length)return e;for(var o=t.startRow();o<=t.finishRow();o++)for(var i=t.startCol();i<=t.finishCol();i++)Zo.mutateCell(e[o],i,ae.elementnew(r(),!1));return e},uu=function(e,t,n,r){for(var o=!0,i=0;i',t.insertBefore(r,t.firstChild)),Wa(e,t),o.align&&Ba(e,t,o.align),e.focus(),e.addVisual()})},tc=function(t,e){var n,r,o,i,u,a,c,l,f,s,d=t.dom,m={};!0===e?(n=d.getParent(t.selection.getStart(),"table"))&&(c=n,l=(a=t).dom,f={width:l.getStyle(c,"width")||l.getAttrib(c,"width"),height:l.getStyle(c,"height")||l.getAttrib(c,"height"),cellspacing:l.getStyle(c,"border-spacing")||l.getAttrib(c,"cellspacing"),cellpadding:l.getAttrib(c,"data-mce-cell-padding")||l.getAttrib(c,"cellpadding")||La(a.dom,c,"padding"),border:l.getAttrib(c,"data-mce-border")||l.getAttrib(c,"border")||La(a.dom,c,"border"),borderColor:l.getAttrib(c,"data-mce-border-color"),caption:!!l.select("caption",c)[0],"class":l.getAttrib(c,"class")},Ia.each("left center right".split(" "),function(e){a.formatter.matchNode(c,"align"+e)&&(f.align=e)}),xa(a)&&Ia.extend(f,ja.extractAdvancedStyles(l,c)),m=f):(r={label:"Cols",name:"cols"},o={label:"Rows",name:"rows"}),0=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom},Zc=function(e,t,n,r,o){if(0===o)return 0;if(t===r)return o-1;for(var i=r,u=1;u ("+e.right()+", "+e.bottom()+")"}},Zl=function(e){return Ql.nu({left:e.left,top:e.top,right:e.right,bottom:e.bottom})},ef=function(e,t){return S.some(e.getRect(t))},tf=function(e,t,n){return mt.isElement(t)?ef(e,t).map(Zl):mt.isText(t)?(r=e,o=t,i=n,0<=i&&in.right();var t,n})})},Rf={point:Ql.getTop,adjuster:function(e,t,n,r,o){var i=Ql.moveUp(o,5);return Math.abs(n.top()-r.top())<1?xf.retry(i):n.bottom()o.bottom()?xf.retry(i):n.top()===o.bottom()?xf.retry(Ql.moveDown(o,1)):Cf(e,t,o)?xf.retry(Ql.translate(i,5,0)):xf.none()},move:Ql.moveDown,gather:yf.after},Tf=function(n,r,o,i,u){return 0===u?S.some(i):(c=n,l=i.left(),f=r.point(i),c.elementFromPoint(l,f).filter(function(e){return"table"===mt.name(e)}).isSome()?(t=i,a=u-1,Tf(n,e=r,o,e.move(t,5),a)):n.situsFromPoint(i.left(),r.point(i)).bind(function(e){return e.start().fold(S.none,function(t,e){return nf(n,t,e).bind(function(e){return r.adjuster(n,t,e,o,i).fold(S.none,function(e){return Tf(n,r,o,e,u-1)})}).orThunk(function(){return S.some(i)})},S.none)}));var e,t,a,c,l,f},Nf=function(t,n,e){var r,o,i,u=t.move(e,5),a=Tf(n,t,e,u,100).getOr(u);return(r=t,o=a,i=n,r.point(o)>i.getInnerHeight()?S.some(r.point(o)-i.getInnerHeight()):r.point(o)<0?S.some(-r.point(o)):S.none()).fold(function(){return n.situsFromPoint(a.left(),t.point(a))},function(e){return n.scrollBy(0,e),n.situsFromPoint(a.left(),t.point(a)-e)})},Df={tryUp:R(Nf,Rf),tryDown:R(Nf,Sf),ieTryUp:function(e,t){return e.situsFromPoint(t.left(),t.top()-5)},ieTryDown:function(e,t){return e.situsFromPoint(t.left(),t.bottom()+5)},getJumpSize:C(5)},Ef=Nr([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),Of=function(e){return Wt.closest(e,"tr")},Af={verify:function(a,e,t,n,r,c,o){return Wt.closest(n,"td,th",o).bind(function(u){return Wt.closest(e,"td,th",o).map(function(i){return $e.eq(u,i)?$e.eq(n,u)&&yn(u)===r?c(i):Ef.none("in same cell"):Qn.sharedOne(Of,[u,i]).fold(function(){return t=i,n=u,r=(e=a).getRect(t),(o=e.getRect(n)).right>r.left&&o.left";for(var n=0;n<10;n++)e+='';e+=""}return e+="",e+=''}(),onPostRender:function(){this.lastX=this.lastY=0},onmousemove:function(e){var t,n,r=e.target;"A"===r.tagName.toUpperCase()&&(t=parseInt(r.getAttribute("data-mce-x"),10),n=parseInt(r.getAttribute("data-mce-y"),10),(this.isRtl()||"tl-tr"===this.parent().rel)&&(t=9-t),t===this.lastX&&n===this.lastY||(s(o,t,n,e.control),this.lastX=t,this.lastY=n))},onclick:function(e){var t=this;"A"===e.target.tagName.toUpperCase()&&(e.preventDefault(),e.stopPropagation(),t.parent().cancel(),o.undoManager.transact(function(){Qa(o,t.lastX+1,t.lastY+1)}),o.addVisual())}}]};function m(e){return function(){o.execCommand(e)}}var g={text:"Table properties",context:"table",onPostRender:e,onclick:m("mceTableProps")},h={text:"Delete table",context:"table",onPostRender:e,cmd:"mceTableDelete"},p={text:"Row",context:"table",menu:[{text:"Insert row before",onclick:m("mceTableInsertRowBefore"),onPostRender:t},{text:"Insert row after",onclick:m("mceTableInsertRowAfter"),onPostRender:t},{text:"Delete row",onclick:m("mceTableDeleteRow"),onPostRender:t},{text:"Row properties",onclick:m("mceTableRowProps"),onPostRender:t},{text:"-"},{text:"Cut row",onclick:m("mceTableCutRow"),onPostRender:t},{text:"Copy row",onclick:m("mceTableCopyRow"),onPostRender:t},{text:"Paste row before",onclick:m("mceTablePasteRowBefore"),onPostRender:t},{text:"Paste row after",onclick:m("mceTablePasteRowAfter"),onPostRender:t}]},v={text:"Column",context:"table",menu:[{text:"Insert column before",onclick:m("mceTableInsertColBefore"),onPostRender:t},{text:"Insert column after",onclick:m("mceTableInsertColAfter"),onPostRender:t},{text:"Delete column",onclick:m("mceTableDeleteCol"),onPostRender:t}]},b={separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:m("mceTableCellProps"),onPostRender:t},{text:"Merge cells",onclick:m("mceTableMergeCells"),onPostRender:function(){var t=this;a.push(t),r.fold(function(){l(t)},function(e){t.disabled(e.mergable().isNone())})}},{text:"Split cell",onclick:m("mceTableSplitCells"),onPostRender:function(){var t=this;c.push(t),r.fold(function(){l(t)},function(e){t.disabled(e.unmergable().isNone())})}}]};o.addMenuItem("inserttable",d),o.addMenuItem("tableprops",g),o.addMenuItem("deletetable",h),o.addMenuItem("row",p),o.addMenuItem("column",v),o.addMenuItem("cell",b)},ms=function(n,r){return{insertTable:function(e,t){return Qa(n,e,t)},setClipboardRows:function(e){return t=r,n=A(e,le.fromDom),void t.set(S.from(n));var t,n},getClipboardRows:function(){return r.get().fold(function(){},function(e){return A(e,function(e){return e.dom()})})}}};i.add("table",function(t){var n,r=Ec(t),e=cs(t,r.lazyResize),o=ka(t,r.lazyWire),i=(n=t,{get:function(){var e=ia(n);return yr(e,Tr.selectedSelector()).fold(function(){return n.selection.getStart()===undefined?Er.none():Er.single(n.selection)},function(e){return Er.multiple(e)})}}),u=Do(S.none());return rc(t,o,e,i,u),Wr(t,i,o,e),ds(t,i),fs(t),ss(t),t.on("PreInit",function(){t.serializer.addTempAttr(Tr.firstSelected()),t.serializer.addTempAttr(Tr.lastSelected())}),t.getParam("table_tab_navigation",!0,"boolean")&&t.on("keydown",function(e){_l(e,t,o,r.lazyWire)}),t.on("remove",function(){r.destroy(),e.destroy()}),ms(t,u)})}(); \ No newline at end of file +!function(){"use strict";var e,t,n,r,o,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),y=function(){for(var e=[],t=0;tn.maxRow()||sn.maxCol()||($t.getAt(t,l,s).filter(r).isNone()?(o=f,i=e[l].element(),u=le.fromTag("td"),fn(u,le.fromTag("br")),(o?fn:ln)(i,u)):f=!0)}(m,g,h,d),o=e,f=h,s=P(ct.firstLayer(o,"tr"),function(e){return 0===e.dom().childElementCount}),A(s,hn),f.minCol()!==f.maxCol()&&f.minRow()!==f.maxRow()||A(ct.firstLayer(o,"th,td"),function(e){xt(e,"rowspan"),xt(e,"colspan")}),xt(o,"width"),xt(o,"height"),un(o,"width"),un(o,"height"),e},wn=function(e,t){return le.fromDom(e.dom().cloneNode(t))},yn=function(e){return wn(e,!1)},xn=function(e){return wn(e,!0)},Cn=function(e,t){var n,r,o,i,u=(n=e,r=t,o=le.fromTag(r),i=Ct(n),bt(o,i),o),a=it(xn(e));return mn(u,a),u},Rn=(At=gt,Pt="text",It=function(e){return At(e)?S.from(e.dom().nodeValue):S.none()},Bt=Je.detect().browser,{get:function(e){if(!At(e))throw new Error("Can only get "+Pt+" value of a "+Pt+" node");return Wt(e).getOr("")},getOption:Wt=Bt.isIE()&&10===Bt.version.major?function(e){try{return It(e)}catch(t){return S.none()}}:It,set:function(e,t){if(!At(e))throw new Error("Can only set raw "+Pt+" value of a "+Pt+" node");e.dom().nodeValue=t}}),Sn=function(e){return Rn.get(e)},Tn=function(e){return Rn.getOption(e)},Dn=function(e,t){Rn.set(e,t)},On=function(e){return"img"===lt(e)?1:Tn(e).fold(function(){return it(e).length},function(e){return e.length})},kn=["img","br"],Nn=function(e){return Tn(e).filter(function(e){return 0!==e.trim().length||-1=e.startCol()&&t.column()+t.colspan()-1<=e.finishCol()&&t.row()>=e.startRow()&&t.row()+t.rowspan()-1<=e.finishRow()},cr=function(e,t){var n=t.column(),r=t.column()+t.colspan()-1,o=t.row(),i=t.row()+t.rowspan()-1;return n<=e.finishCol()&&r>=e.startCol()&&o<=e.finishRow()&&i>=e.startRow()},lr=function(e,t){for(var n=!0,r=R(ar,t),o=t.startRow();o<=t.finishRow();o++)for(var i=t.startCol();i<=t.finishCol();i++)n=n&&$t.getAt(e,o,i).exists(r);return n?S.some(t):S.none()},fr=function(e,t,n){var r=$t.findItem(e,t,$e),o=$t.findItem(e,n,$e);return r.bind(function(r){return o.map(function(e){return t=r,n=e,ae.bounds(Math.min(t.row(),n.row()),Math.min(t.column(),n.column()),Math.max(t.row()+t.rowspan()-1,n.row()+n.rowspan()-1),Math.max(t.column()+t.colspan()-1,n.column()+n.colspan()-1));var t,n})})},sr=fr,dr=function(t,e,n){return fr(t,e,n).bind(function(e){return lr(t,e)})},mr=function(r,e,o,i){return $t.findItem(r,e,$e).bind(function(e){var t=0=t.length-1)return S.none();var e=t[n].fold(function(){var e=U(t.slice(0,n));return ni(e,function(e,t){return e.map(function(e){return{value:e,delta:t+1}})})},function(e){return S.some({value:e,delta:0})}),r=t[n+1].fold(function(){var e=t.slice(n+1);return ni(e,function(e,t){return e.map(function(e){return{value:e,delta:t+1}})})},function(e){return S.some({value:e,delta:1})});return e.bind(function(n){return r.map(function(e){var t=e.delta+n.delta;return Math.abs(e.value-n.value)/t})})},pi=function(e,t,n){var r=e();return W(r,t).orThunk(function(){return S.from(r[0]).orThunk(n)}).map(function(e){return e.element()})},vi=function(n){var e=n.grid(),t=gi(0,e.columns()),r=gi(0,e.rows());return E(t,function(t){return pi(function(){return j(r,function(e){return $t.getAt(n,e,t).filter(function(e){return e.column()===t}).fold(C([]),function(e){return[e]})})},function(e){return 1===e.colspan()},function(){return $t.getAt(n,0,t)})})},bi=function(n){var e=n.grid(),t=gi(0,e.rows()),r=gi(0,e.columns());return E(t,function(t){return pi(function(){return j(r,function(e){return $t.getAt(n,t,e).filter(function(e){return e.row()===t}).fold(C([]),function(e){return[e]})})},function(e){return 1===e.rowspan()},function(){return $t.getAt(n,t,0)})})},wi=function(e,t,n,r,o){var i=le.fromTag("div");return tn(i,{position:"absolute",left:t-r/2+"px",top:n+"px",height:o+"px",width:r+"px"}),bt(i,{"data-column":e,role:"presentation"}),i},yi=function(e,t,n,r,o){var i=le.fromTag("div");return tn(i,{position:"absolute",left:t+"px",top:n-o/2+"px",height:o+"px",width:r+"px"}),bt(i,{"data-row":e,role:"presentation"}),i},xi=function(e){var t=e.replace(/\./g,"-");return{resolve:function(e){return t+"-"+e}}},Ci={resolve:xi("ephox-snooker").resolve},Ri=function(e,t){var n=wt(e,t);return n===undefined||""===n?[]:n.split(" ")},Si=function(e){return e.dom().classList!==undefined},Ti=function(e,t){return o=t,i=Ri(n=e,r="class").concat([o]),vt(n,r,i.join(" ")),!0;var n,r,o,i},Di=function(e,t){return o=t,0<(i=P(Ri(n=e,r="class"),function(e){return e!==o})).length?vt(n,r,i.join(" ")):xt(n,r),!1;var n,r,o,i},Oi=function(e,t){Si(e)?e.dom().classList.add(t):Ti(e,t)},ki=function(e){0===(Si(e)?e.dom().classList:Ri(e,"class")).length&&xt(e,"class")},Ni=function(e,t){return Si(e)&&e.dom().classList.contains(t)},Ei=Ci.resolve("resizer-bar"),Ai=Ci.resolve("resizer-rows"),Pi=Ci.resolve("resizer-cols"),Ii=function(e){var t=Nt(e.parent(),"."+Ei);A(t,hn)},Bi=function(n,e,r){var o=n.origin();A(e,function(e,t){e.each(function(e){var t=r(o,e);Oi(t,Ei),fn(n.parent(),t)})})},Wi=function(e,t,n,r,o,i){var u,a,c,l,f=po(t),s=0=t.length||e.column()>ii.cellLength(t[0]))return $i.error("invalid start address out of table bounds, row: "+e.row()+", column: "+e.column());var r=t.slice(e.row()),o=r[0].cells().slice(e.column()),i=ii.cellLength(n[0]),u=n.length;return $i.value({rowDelta:C(r.length-u),colDelta:C(o.length-i)})},nu=function(e,t){var n=ii.cellLength(e[0]),r=ii.cellLength(t[0]);return{rowDelta:C(0),colDelta:C(n-r)}},ru=function(e,t,n){var r=t.colDelta()<0?eu:u;return(t.rowDelta()<0?Zi:u)(r(e,Math.abs(t.colDelta()),n),Math.abs(t.rowDelta()),n)},ou=function(e,t,n,r){if(0===e.length)return e;for(var o=t.startRow();o<=t.finishRow();o++)for(var i=t.startCol();i<=t.finishCol();i++)ii.mutateCell(e[o],i,ae.elementnew(r(),!1));return e},iu=function(e,t,n,r){for(var o=!0,i=0;i',t.insertBefore(r,t.firstChild)),Ia(e,t),o.align&&Aa(e,t,o.align),e.focus(),e.addVisual()})},Ja=function(t,e){var n,r,o,i,u,a,c,l,f,s,d=t.dom,m={};!0===e?(n=d.getParent(t.selection.getStart(),"table"))&&(c=n,l=(a=t).dom,f={width:l.getStyle(c,"width")||l.getAttrib(c,"width"),height:l.getStyle(c,"height")||l.getAttrib(c,"height"),cellspacing:l.getStyle(c,"border-spacing")||l.getAttrib(c,"cellspacing"),cellpadding:l.getAttrib(c,"data-mce-cell-padding")||l.getAttrib(c,"cellpadding")||Wa(a.dom,c,"padding"),border:l.getAttrib(c,"data-mce-border")||l.getAttrib(c,"border")||Wa(a.dom,c,"border"),borderColor:l.getAttrib(c,"data-mce-border-color"),caption:!!l.select("caption",c)[0],"class":l.getAttrib(c,"class")},Ea.each("left center right".split(" "),function(e){a.formatter.matchNode(c,"align"+e)&&(f.align=e)}),ba(a)&&Ea.extend(f,La.extractAdvancedStyles(l,c)),m=f):(r={label:"Cols",name:"cols"},o={label:"Rows",name:"rows"}),0=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom},Yc=function(n,r,e,t,o){var i=function(e){var t=n.dom().createRange();return t.setStart(r.dom(),e),t.collapse(!0),t},u=Sn(r).length,a=function(e,t,n,r,o){if(0===o)return 0;if(t===r)return o-1;for(var i=r,u=1;u ("+e.right()+", "+e.bottom()+")"}},Wl=function(e){return Bl.nu({left:e.left,top:e.top,right:e.right,bottom:e.bottom})},Ml=function(e,t){return S.some(e.getRect(t))},_l=function(e,t,n){return mt(t)?Ml(e,t).map(Wl):gt(t)?(r=e,o=t,i=n,0<=i&&in.right();var t,n})});var n,o,i},of={point:Bl.getTop,adjuster:function(e,t,n,r,o){var i=Bl.moveUp(o,5);return Math.abs(n.top()-r.top())<1?nf.retry(i):n.bottom()o.bottom()?nf.retry(i):n.top()===o.bottom()?nf.retry(Bl.moveDown(o,1)):rf(e,t,o)?nf.retry(Bl.translate(i,5,0)):nf.none()},move:Bl.moveDown,gather:tf.after},af=function(n,r,o,i,u){return 0===u?S.some(i):(c=n,l=i.left(),f=r.point(i),c.elementFromPoint(l,f).filter(function(e){return"table"===lt(e)}).isSome()?(t=i,a=u-1,af(n,e=r,o,e.move(t,5),a)):n.situsFromPoint(i.left(),r.point(i)).bind(function(e){return e.start().fold(S.none,function(t,e){return Ll(n,t,e).bind(function(e){return r.adjuster(n,t,e,o,i).fold(S.none,function(e){return af(n,r,o,e,u-1)})}).orThunk(function(){return S.some(i)})},S.none)}));var e,t,a,c,l,f},cf=function(t,n,e){var r,o,i,u=t.move(e,5),a=af(n,t,e,u,100).getOr(u);return(r=t,o=a,i=n,r.point(o)>i.getInnerHeight()?S.some(r.point(o)-i.getInnerHeight()):r.point(o)<0?S.some(-r.point(o)):S.none()).fold(function(){return n.situsFromPoint(a.left(),t.point(a))},function(e){return n.scrollBy(0,e),n.situsFromPoint(a.left(),t.point(a)-e)})},lf={tryUp:R(cf,of),tryDown:R(cf,uf),ieTryUp:function(e,t){return e.situsFromPoint(t.left(),t.top()-5)},ieTryDown:function(e,t){return e.situsFromPoint(t.left(),t.bottom()+5)},getJumpSize:C(5)},ff=Br([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),sf=function(e){return jt(e,"tr")},df={verify:function(a,e,t,n,r,c,o){return jt(n,"td,th",o).bind(function(u){return jt(e,"td,th",o).map(function(i){return $e(u,i)?$e(n,u)&&On(u)===r?c(i):ff.none("in same cell"):ur.sharedOne(sf,[u,i]).fold(function(){return t=i,n=u,r=(e=a).getRect(t),(o=e.getRect(n)).right>r.left&&o.left";for(var n=0;n<10;n++)e+='';e+=""}return e+="",e+=''}(),onPostRender:function(){this.lastX=this.lastY=0},onmousemove:function(e){var t,n,r=e.target;"A"===r.tagName.toUpperCase()&&(t=parseInt(r.getAttribute("data-mce-x"),10),n=parseInt(r.getAttribute("data-mce-y"),10),(this.isRtl()||"tl-tr"===this.parent().rel)&&(t=9-t),t===this.lastX&&n===this.lastY||(s(o,t,n,e.control),this.lastX=t,this.lastY=n))},onclick:function(e){var t=this;"A"===e.target.tagName.toUpperCase()&&(e.preventDefault(),e.stopPropagation(),t.parent().cancel(),o.undoManager.transact(function(){Ya(o,t.lastX+1,t.lastY+1)}),o.addVisual())}}]};function m(e){return function(){o.execCommand(e)}}var g={text:"Table properties",context:"table",onPostRender:e,onclick:m("mceTableProps")},h={text:"Delete table",context:"table",onPostRender:e,cmd:"mceTableDelete"},p={text:"Row",context:"table",menu:[{text:"Insert row before",onclick:m("mceTableInsertRowBefore"),onPostRender:t},{text:"Insert row after",onclick:m("mceTableInsertRowAfter"),onPostRender:t},{text:"Delete row",onclick:m("mceTableDeleteRow"),onPostRender:t},{text:"Row properties",onclick:m("mceTableRowProps"),onPostRender:t},{text:"-"},{text:"Cut row",onclick:m("mceTableCutRow"),onPostRender:t},{text:"Copy row",onclick:m("mceTableCopyRow"),onPostRender:t},{text:"Paste row before",onclick:m("mceTablePasteRowBefore"),onPostRender:t},{text:"Paste row after",onclick:m("mceTablePasteRowAfter"),onPostRender:t}]},v={text:"Column",context:"table",menu:[{text:"Insert column before",onclick:m("mceTableInsertColBefore"),onPostRender:t},{text:"Insert column after",onclick:m("mceTableInsertColAfter"),onPostRender:t},{text:"Delete column",onclick:m("mceTableDeleteCol"),onPostRender:t}]},b={separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:m("mceTableCellProps"),onPostRender:t},{text:"Merge cells",onclick:m("mceTableMergeCells"),onPostRender:function(){var t=this;a.push(t),r.fold(function(){l(t)},function(e){t.disabled(e.mergable().isNone())})}},{text:"Split cell",onclick:m("mceTableSplitCells"),onPostRender:function(){var t=this;c.push(t),r.fold(function(){l(t)},function(e){t.disabled(e.unmergable().isNone())})}}]};o.addMenuItem("inserttable",d),o.addMenuItem("tableprops",g),o.addMenuItem("deletetable",h),o.addMenuItem("row",p),o.addMenuItem("column",v),o.addMenuItem("cell",b)},Gf=function(n,r){return{insertTable:function(e,t){return Ya(n,e,t)},setClipboardRows:function(e){return t=r,n=E(e,le.fromDom),void t.set(S.from(n));var t,n},getClipboardRows:function(){return r.get().fold(function(){},function(e){return E(e,function(e){return e.dom()})})}}};i.add("table",function(t){var n,r=xc(t),e=zf(t,r.lazyResize),o=ka(t,r.lazyWire),i=(n=t,{get:function(){var e=oa(n);return kr(e,Ir.selectedSelector()).fold(function(){return n.selection.getStart()===undefined?Mr.none():Mr.single(n.selection)},function(e){return Mr.multiple(e)})}}),u=Io(S.none());return Qa(t,o,e,i,u),qr(t,i,o,e),Vf(t,i),Uf(t),qf(t),t.on("PreInit",function(){t.serializer.addTempAttr(Ir.firstSelected()),t.serializer.addTempAttr(Ir.lastSelected())}),t.getParam("table_tab_navigation",!0,"boolean")&&t.on("keydown",function(e){Cl(e,t,o,r.lazyWire)}),t.on("remove",function(){r.destroy(),e.destroy()}),Gf(t,u)})}(); \ No newline at end of file diff --git a/bl-plugins/tinymce/tinymce/plugins/visualchars/plugin.min.js b/bl-plugins/tinymce/tinymce/plugins/visualchars/plugin.min.js index ef60ceaf..a9bd26aa 100755 --- a/bl-plugins/tinymce/tinymce/plugins/visualchars/plugin.min.js +++ b/bl-plugins/tinymce/tinymce/plugins/visualchars/plugin.min.js @@ -1 +1 @@ -!function(){"use strict";var n,e,t,r,o,u=function(n){var e=n,t=function(){return e};return{get:t,set:function(n){e=n},clone:function(){return u(t())}}},i=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=function(n){return{isEnabled:function(){return n.get()}}},a=function(n,e){return n.fire("VisualChars",{state:e})},f={"\xa0":"nbsp","\xad":"shy"},l=function(n,e){var t,r="";for(t in n)r+=t;return new RegExp("["+r+"]",e?"g":"")},d=function(n){var e,t="";for(e in n)t&&(t+=","),t+="span.mce-"+n[e];return t},s={charMap:f,regExp:l(f),regExpGlobal:l(f,!0),selector:d(f),charMapToRegExp:l,charMapToSelector:d},m=function(n){return function(){return n}},N=m(!1),E=m(!0),T=N,O=E,v=function(){return g},g=(r={fold:function(n,e){return n()},is:T,isSome:T,isNone:O,getOr:t=function(n){return n},getOrThunk:e=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:t,orThunk:e,map:v,ap:v,each:function(){},bind:v,flatten:v,exists:T,forall:O,filter:v,equals:n=function(n){return n.isNone()},equals_:n,toArray:function(){return[]},toString:m("none()")},Object.freeze&&Object.freeze(r),r),h=function(t){var n=function(){return t},e=function(){return o},r=function(n){return n(t)},o={fold:function(n,e){return e(t)},is:function(n){return t===n},isSome:O,isNone:T,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:e,orThunk:e,map:function(n){return h(n(t))},ap:function(n){return n.fold(v,function(n){return h(n(t))})},each:function(n){n(t)},bind:r,flatten:n,exists:r,forall:r,filter:function(n){return n(t)?o:g},equals:function(n){return n.is(t)},equals_:function(n,e){return n.fold(T,function(n){return e(t,n)})},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},p=function(n){return null===n||n===undefined?g:h(n)},C=(o="function",function(n){return function(n){if(null===n)return"null";var e=typeof n;return"object"===e&&Array.prototype.isPrototypeOf(n)?"array":"object"===e&&String.prototype.isPrototypeOf(n)?"string":e}(n)===o}),D=function(n,e){for(var t=0,r=n.length;t'+n+""},U=function(n,e){var t=[],r=function(n,e){for(var t=n.length,r=new Array(t),o=0;o'+n+""},A=function(n,e){var t=[],r=function(n,e){for(var t=n.length,r=new Array(t),o=0;otinymce']),u=t.getParam("branding",!0,"boolean")?{type:"label",classes:"branding",html:" "+l}:null;i.add({type:"panel",name:"statusbar",classes:"statusbar",layout:"flow",border:"1 0 0 0",ariaRoot:!0,items:[{type:"elementpath",editor:t},r,u]})}return _(t),t.on("SwitchMode",(a=i,function(e){a.find("*").disabled("readonly"===e.mode)})),i.renderBefore(n.targetNode).reflow(),t.getParam("readonly",!1,"boolean")&&t.setMode("readonly"),n.width&&be.setStyle(i.getEl(),"width",n.width),t.on("remove",function(){i.remove(),i=null}),C(t,i),V(t),{iframeContainer:i.find("#iframe")[0].getEl(),editorContainer:i.getEl()}},we=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),_e=0,Ce={id:function(){return"mceu_"+_e++},create:function(e,t,n){var i=document.createElement(e);return v.DOM.setAttribs(i,t),"string"==typeof n?i.innerHTML=n:w.each(n,function(e){e.nodeType&&i.appendChild(e)}),i},createFragment:function(e){return v.DOM.createFragment(e)},getWindowSize:function(){return v.DOM.getViewPort()},getSize:function(e){var t,n;if(e.getBoundingClientRect){var i=e.getBoundingClientRect();t=Math.max(i.width||i.right-i.left,e.offsetWidth),n=Math.max(i.height||i.bottom-i.bottom,e.offsetHeight)}else t=e.offsetWidth,n=e.offsetHeight;return{width:t,height:n}},getPos:function(e,t){return v.DOM.getPos(e,t||Ce.getContainer())},getContainer:function(){return fe.container?fe.container:document.body},getViewPort:function(e){return v.DOM.getViewPort(e)},get:function(e){return document.getElementById(e)},addClass:function(e,t){return v.DOM.addClass(e,t)},removeClass:function(e,t){return v.DOM.removeClass(e,t)},hasClass:function(e,t){return v.DOM.hasClass(e,t)},toggleClass:function(e,t,n){return v.DOM.toggleClass(e,t,n)},css:function(e,t,n){return v.DOM.setStyle(e,t,n)},getRuntimeStyle:function(e,t){return v.DOM.getStyle(e,t,!0)},on:function(e,t,n,i){return v.DOM.bind(e,t,n,i)},off:function(e,t,n){return v.DOM.unbind(e,t,n)},fire:function(e,t,n){return v.DOM.fire(e,t,n)},innerHtml:function(e,t){v.DOM.setHTML(e,t)}},Re=function(e){return"static"===Ce.getRuntimeStyle(e,"position")},Ee=function(e){return e.state.get("fixed")};function ke(e,t,n){var i,r,o,s,a,l,u,c,d,f;return d=Te(),o=(r=Ce.getPos(t,O.getUiContainer(e))).x,s=r.y,Ee(e)&&Re(document.body)&&(o-=d.x,s-=d.y),i=e.getEl(),a=(f=Ce.getSize(i)).width,l=f.height,u=(f=Ce.getSize(t)).width,c=f.height,"b"===(n=(n||"").split(""))[0]&&(s+=c),"r"===n[1]&&(o+=u),"c"===n[0]&&(s+=Math.round(c/2)),"c"===n[1]&&(o+=Math.round(u/2)),"b"===n[3]&&(s-=l),"r"===n[4]&&(o-=a),"c"===n[3]&&(s-=Math.round(l/2)),"c"===n[4]&&(o-=Math.round(a/2)),{x:o,y:s,w:a,h:l}}var Te=function(){var e=window,t=Math.max(e.pageXOffset,document.body.scrollLeft,document.documentElement.scrollLeft),n=Math.max(e.pageYOffset,document.body.scrollTop,document.documentElement.scrollTop);return{x:t,y:n,w:t+(e.innerWidth||document.documentElement.clientWidth),h:n+(e.innerHeight||document.documentElement.clientHeight)}},He=function(e){var t,n=O.getUiContainer(e);return n&&!Ee(e)?{x:0,y:0,w:(t=n).scrollWidth-1,h:t.scrollHeight-1}:Te()},Se={testMoveRel:function(e,t){for(var n=He(this),i=0;in.x&&r.x+r.wn.y&&r.y+r.h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,Fe=/^\s*|\s*$/g,Ue=Me.extend({init:function(e){var o=this.match;function s(e,t,n){var i;function r(e){e&&t.push(e)}return r(function(t){if(t)return t=t.toLowerCase(),function(e){return"*"===t||e.type===t}}((i=Ie.exec(e.replace(Fe,"")))[1])),r(function(t){if(t)return function(e){return e._name===t}}(i[2])),r(function(n){if(n)return n=n.split("."),function(e){for(var t=n.length;t--;)if(!e.classes.contains(n[t]))return!1;return!0}}(i[3])),r(function(n,i,r){if(n)return function(e){var t=e[n]?e[n]():"";return i?"="===i?t===r:"*="===i?0<=t.indexOf(r):"~="===i?0<=(" "+t+" ").indexOf(" "+r+" "):"!="===i?t!==r:"^="===i?0===t.indexOf(r):"$="===i&&t.substr(t.length-r.length)===r:!!r}}(i[4],i[5],i[6])),r(function(i){var t;if(i)return(i=/(?:not\((.+)\))|(.+)/i.exec(i))[1]?(t=a(i[1],[]),function(e){return!o(e,t)}):(i=i[2],function(e,t,n){return"first"===i?0===t:"last"===i?t===n-1:"even"===i?t%2==0:"odd"===i?t%2==1:!!e[i]&&e[i]()})}(i[7])),t.pseudo=!!i[7],t.direct=n,t}function a(e,t){var n,i,r,o=[];do{if(ze.exec(""),(i=ze.exec(e))&&(e=i[3],o.push(i[1]),i[2])){n=i[3];break}}while(i);for(n&&a(n,t),e=[],r=0;r"!==o[r]&&e.push(s(o[r],[],">"===o[r-1]));return t.push(e),t}this._selectors=a(e,[])},match:function(e,t){var n,i,r,o,s,a,l,u,c,d,f,h,m;for(n=0,i=(t=t||this._selectors).length;na.maxW?a.maxW:n,a.w=n,a.innerW=n-i),(n=e.h)!==undefined&&(n=(n=na.maxH?a.maxH:n,a.h=n,a.innerH=n-r),(n=e.innerW)!==undefined&&(n=(n=na.maxW-i?a.maxW-i:n,a.innerW=n,a.w=n+i),(n=e.innerH)!==undefined&&(n=(n=na.maxH-r?a.maxH-r:n,a.innerH=n,a.h=n+r),e.contentW!==undefined&&(a.contentW=e.contentW),e.contentH!==undefined&&(a.contentH=e.contentH),(t=s._lastLayoutRect).x===a.x&&t.y===a.y&&t.w===a.w&&t.h===a.h||((o=Ge.repaintControls)&&o.map&&!o.map[s._id]&&(o.push(s),o.map[s._id]=!0),t.x=a.x,t.y=a.y,t.w=a.w,t.h=a.h),s):a},repaint:function(){var e,t,n,i,r,o,s,a,l,u,c=this;l=document.createRange?function(e){return e}:Math.round,e=c.getEl().style,i=c._layoutRect,a=c._lastRepaintRect||{},o=(r=c.borderBox).left+r.right,s=r.top+r.bottom,i.x!==a.x&&(e.left=l(i.x)+"px",a.x=i.x),i.y!==a.y&&(e.top=l(i.y)+"px",a.y=i.y),i.w!==a.w&&(u=l(i.w-o),e.width=(0<=u?u:0)+"px",a.w=i.w),i.h!==a.h&&(u=l(i.h-s),e.height=(0<=u?u:0)+"px",a.h=i.h),c._hasBody&&i.innerW!==a.innerW&&(u=l(i.innerW),(n=c.getEl("body"))&&((t=n.style).width=(0<=u?u:0)+"px"),a.innerW=i.innerW),c._hasBody&&i.innerH!==a.innerH&&(u=l(i.innerH),(n=n||c.getEl("body"))&&((t=t||n.style).height=(0<=u?u:0)+"px"),a.innerH=i.innerH),c._lastRepaintRect=a,c.fire("repaint",{},!1)},updateLayoutRect:function(){var e=this;e.parent()._lastRect=null,Ce.css(e.getEl(),{width:"",height:""}),e._layoutRect=e._lastRepaintRect=e._lastLayoutRect=null,e.initLayoutRect()},on:function(e,t){var n,i,r,o=this;return rt(o).on(e,"string"!=typeof(n=t)?n:function(e){return i||o.parentsAndSelf().each(function(e){var t=e.settings.callbacks;if(t&&(i=t[n]))return r=e,!1}),i?i.call(r,e):(e.action=n,void this.fire("execute",e))}),o},off:function(e,t){return rt(this).off(e,t),this},fire:function(e,t,n){if((t=t||{}).control||(t.control=this),t=rt(this).fire(e,t),!1!==n&&this.parent)for(var i=this.parent();i&&!t.isPropagationStopped();)i.fire(e,t,!1),i=i.parent();return t},hasEventListeners:function(e){return rt(this).has(e)},parents:function(e){var t,n=new $e;for(t=this.parent();t;t=t.parent())n.add(t);return e&&(n=n.filter(e)),n},parentsAndSelf:function(e){return new $e(this).add(this.parents(e))},next:function(){var e=this.parent().items();return e[e.indexOf(this)+1]},prev:function(){var e=this.parent().items();return e[e.indexOf(this)-1]},innerHtml:function(e){return this.$el.html(e),this},getEl:function(e){var t=e?this._id+"-"+e:this._id;return this._elmCache[t]||(this._elmCache[t]=we("#"+t)[0]),this._elmCache[t]},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(e){}return this},blur:function(){return this.getEl().blur(),this},aria:function(e,t){var n=this,i=n.getEl(n.ariaTarget);return void 0===t?n._aria[e]:(n._aria[e]=t,n.state.get("rendered")&&i.setAttribute("role"===e?e:"aria-"+e,t),n)},encode:function(e,t){return!1!==t&&(e=this.translate(e)),(e||"").replace(/[&<>"]/g,function(e){return"&#"+e.charCodeAt(0)+";"})},translate:function(e){return Ge.translate?Ge.translate(e):e},before:function(e){var t=this.parent();return t&&t.insert(e,t.items().indexOf(this),!0),this},after:function(e){var t=this.parent();return t&&t.insert(e,t.items().indexOf(this)),this},remove:function(){var t,e,n=this,i=n.getEl(),r=n.parent();if(n.items){var o=n.items().toArray();for(e=o.length;e--;)o[e].remove()}r&&r.items&&(t=[],r.items().each(function(e){e!==n&&t.push(e)}),r.items().set(t),r._lastRect=null),n._eventsRoot&&n._eventsRoot===n&&we(i).off();var s=n.getRoot().controlIdLookup;return s&&delete s[n._id],i&&i.parentNode&&i.parentNode.removeChild(i),n.state.set("rendered",!1),n.state.destroy(),n.fire("remove"),n},renderBefore:function(e){return we(e).before(this.renderHtml()),this.postRender(),this},renderTo:function(e){return we(e||this.getContainerElm()).append(this.renderHtml()),this.postRender(),this},preRender:function(){},render:function(){},renderHtml:function(){return'
'},postRender:function(){var e,t,n,i,r,o=this,s=o.settings;for(i in o.$el=we(o.getEl()),o.state.set("rendered",!0),s)0===i.indexOf("on")&&o.on(i.substr(2),s[i]);if(o._eventsRoot){for(n=o.parent();!r&&n;n=n.parent())r=n._eventsRoot;if(r)for(i in r._nativeEvents)o._nativeEvents[i]=!0}ot(o),s.style&&(e=o.getEl())&&(e.setAttribute("style",s.style),e.style.cssText=s.style),o.settings.border&&(t=o.borderBox,o.$el.css({"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left}));var a=o.getRoot();for(var l in a.controlIdLookup||(a.controlIdLookup={}),(a.controlIdLookup[o._id]=o)._aria)o.aria(l,o._aria[l]);!1===o.state.get("visible")&&(o.getEl().style.display="none"),o.bindStates(),o.state.on("change:visible",function(e){var t,n=e.value;o.state.get("rendered")&&(o.getEl().style.display=!1===n?"none":"",o.getEl().getBoundingClientRect()),(t=o.parent())&&(t._lastRect=null),o.fire(n?"show":"hide"),Qe.add(o)}),o.fire("postrender",{},!1)},bindStates:function(){},scrollIntoView:function(e){var t,n,i,r,o,s,a=this.getEl(),l=a.parentNode,u=function(e,t){var n,i,r=e;for(n=i=0;r&&r!==t&&r.nodeType;)n+=r.offsetLeft||0,i+=r.offsetTop||0,r=r.offsetParent;return{x:n,y:i}}(a,l);return t=u.x,n=u.y,i=a.offsetWidth,r=a.offsetHeight,o=l.clientWidth,s=l.clientHeight,"end"===e?(t-=o-i,n-=s-r):"center"===e&&(t-=o/2-i/2,n-=s/2-r/2),l.scrollLeft=t,l.scrollTop=n,this},getRoot:function(){for(var e,t=this,n=[];t;){if(t.rootControl){e=t.rootControl;break}n.push(t),t=(e=t).parent()}e||(e=this);for(var i=n.length;i--;)n[i].rootControl=e;return e},reflow:function(){Qe.remove(this);var e=this.parent();return e&&e._layout&&!e._layout.isNative()&&e.reflow(),this}};function rt(n){return n._eventDispatcher||(n._eventDispatcher=new Ne({scope:n,toggleEvent:function(e,t){t&&Ne.isNative(e)&&(n._nativeEvents||(n._nativeEvents={}),n._nativeEvents[e]=!0,n.state.get("rendered")&&ot(n))}})),n._eventDispatcher}function ot(a){var e,t,n,l,i,r;function o(e){var t=a.getParentCtrl(e.target);t&&t.fire(e.type,e)}function s(){var e=l._lastHoverCtrl;e&&(e.fire("mouseleave",{target:e.getEl()}),e.parents().each(function(e){e.fire("mouseleave",{target:e.getEl()})}),l._lastHoverCtrl=null)}function u(e){var t,n,i,r=a.getParentCtrl(e.target),o=l._lastHoverCtrl,s=0;if(r!==o){if((n=(l._lastHoverCtrl=r).parents().toArray().reverse()).push(r),o){for((i=o.parents().toArray().reverse()).push(o),s=0;s=t.length&&(e=0),t[e]&&t[e].focus(),e}function h(e,t){var n=-1,i=d();t=t||c(i.getEl());for(var r=0;r
'+(e.settings.html||"")+t.renderHtml(e)+"
"},postRender:function(){var e,t=this;return t.items().exec("postRender"),t._super(),t._layout.postRender(t),t.state.set("rendered",!0),t.settings.style&&t.$el.css(t.settings.style),t.settings.border&&(e=t.borderBox,t.$el.css({"border-top-width":e.top,"border-right-width":e.right,"border-bottom-width":e.bottom,"border-left-width":e.left})),t.parent()||(t.keyboardNav=lt({root:t})),t},initLayoutRect:function(){var e=this._super();return this._layout.recalc(this),e},recalc:function(){var e=this,t=e._layoutRect,n=e._lastRect;if(!n||n.w!==t.w||n.h!==t.h)return e._layout.recalc(e),t=e.layoutRect(),e._lastRect={x:t.x,y:t.y,w:t.w,h:t.h},!0},reflow:function(){var e;if(Qe.remove(this),this.visible()){for(st.repaintControls=[],st.repaintControls.map={},this.recalc(),e=st.repaintControls.length;e--;)st.repaintControls[e].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),st.repaintControls=[]}return this}});function dt(e){var t,n;if(e.changedTouches)for(t="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n").css({position:"absolute",top:0,left:0,width:f.width,height:f.height,zIndex:2147483647,opacity:1e-4,cursor:d}).appendTo(x.body),we(x).on("mousemove touchmove",v).on("mouseup touchend",p),h.start(e)},v=function(e){if(dt(e),e.button!==g)return p(e);e.deltaX=e.screenX-b,e.deltaY=e.screenY-y,e.preventDefault(),h.drag(e)},p=function(e){dt(e),we(x).off("mousemove touchmove",v).off("mouseup touchend",p),m.remove(),h.stop&&h.stop(e)},this.destroy=function(){we(w).off()},we(w).on("mousedown touchstart",t)}var ht,mt,gt,pt,vt={init:function(){this.on("repaint",this.renderScroll)},renderScroll:function(){var p=this,v=2;function n(){var m,g,e;function t(e,t,n,i,r,o){var s,a,l,u,c,d,f,h;if(a=p.getEl("scroll"+e)){if(f=t.toLowerCase(),h=n.toLowerCase(),we(p.getEl("absend")).css(f,p.layoutRect()[i]-1),!r)return void we(a).css("display","none");we(a).css("display","block"),s=p.getEl("body"),l=p.getEl("scroll"+e+"t"),u=s["client"+n]-2*v,c=(u-=m&&g?a["client"+o]:0)/s["scroll"+n],(d={})[f]=s["offset"+t]+v,d[h]=u,we(a).css(d),(d={})[f]=s["scroll"+t]*c,d[h]=u*c,we(l).css(d)}}e=p.getEl("body"),m=e.scrollWidth>e.clientWidth,g=e.scrollHeight>e.clientHeight,t("h","Left","Width","contentW",m,"Height"),t("v","Top","Height","contentH",g,"Width")}p.settings.autoScroll&&(p._hasScroll||(p._hasScroll=!0,function(){function e(s,a,l,u,c){var d,e=p._id+"-scroll"+s,t=p.classPrefix;we(p.getEl()).append('
'),p.draghelper=new ft(e+"t",{start:function(){d=p.getEl("body")["scroll"+a],we("#"+e).addClass(t+"active")},drag:function(e){var t,n,i,r,o=p.layoutRect();n=o.contentW>o.innerW,i=o.contentH>o.innerH,r=p.getEl("body")["client"+l]-2*v,t=(r-=n&&i?p.getEl("scroll"+s)["client"+c]:0)/p.getEl("body")["scroll"+l],p.getEl("body")["scroll"+a]=d+e["delta"+u]/t},stop:function(){we("#"+e).removeClass(t+"active")}})}p.classes.add("scroll"),e("v","Top","Height","Y","Width"),e("h","Left","Width","X","Height")}(),p.on("wheel",function(e){var t=p.getEl("body");t.scrollLeft+=10*(e.deltaX||0),t.scrollTop+=10*e.deltaY,n()}),we(p.getEl("body")).on("scroll",n)),n())}},bt=ct.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[vt],renderHtml:function(){var e=this,t=e._layout,n=e.settings.html;return e.preRender(),t.preRender(e),void 0===n?n='
'+t.renderHtml(e)+"
":("function"==typeof n&&(n=n.call(e)),e._hasBody=!1),'
'+(e._preBodyHtml||"")+n+"
"}}),yt={resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(e,t){if(e<=1||t<=1){var n=Ce.getWindowSize();e=e<=1?e*n.w:e,t=t<=1?t*n.h:t}return this._layoutRect.autoResize=!1,this.layoutRect({minW:e,minH:t,w:e,h:t}).reflow()},resizeBy:function(e,t){var n=this.layoutRect();return this.resizeTo(n.w+e,n.h+t)}},xt=[],wt=[];function _t(e,t){for(;e;){if(e===t)return!0;e=e.parent()}}function Ct(){ht||(ht=function(e){2!==e.button&&function(e){for(var t=xt.length;t--;){var n=xt[t],i=n.getParentCtrl(e.target);if(n.settings.autohide){if(i&&(_t(i,n)||n.parent()===i))continue;(e=n.fire("autohide",{target:e.target})).isDefaultPrevented()||n.hide()}}}(e)},we(document).on("click touchstart",ht))}function Rt(r){var e=Ce.getViewPort().y;function t(e,t){for(var n,i=0;ie&&(r.fixed(!1).layoutRect({y:r._autoFixY}).repaint(),t(!1,r._autoFixY-e)):(r._autoFixY=r.layoutRect().y,r._autoFixY').appendTo(i.getContainerElm())),u.setTimeout(function(){t.addClass(n+"in"),we(i.getEl()).addClass(n+"in")}),pt=!0),Et(!0,i)}}),i.on("show",function(){i.parents().each(function(e){if(e.state.get("fixed"))return i.fixed(!0),!1})}),e.popover&&(i._preBodyHtml='
',i.classes.add("popover").add("bottom").add(i.isRtl()?"end":"start")),i.aria("label",e.ariaLabel),i.aria("labelledby",i._id),i.aria("describedby",i.describedBy||i._id+"-none")},fixed:function(e){var t=this;if(t.state.get("fixed")!==e){if(t.state.get("rendered")){var n=Ce.getViewPort();e?t.layoutRect().y-=n.y:t.layoutRect().y+=n.y}t.classes.toggle("fixed",e),t.state.set("fixed",e)}return t},show:function(){var e,t=this._super();for(e=xt.length;e--&&xt[e]!==this;);return-1===e&&xt.push(this),t},hide:function(){return Tt(this),Et(!1,this),this._super()},hideAll:function(){kt.hideAll()},close:function(){return this.fire("close").isDefaultPrevented()||(this.remove(),Et(!1,this)),this},remove:function(){Tt(this),this._super()},postRender:function(){return this.settings.bodyRole&&this.getEl("body").setAttribute("role",this.settings.bodyRole),this._super()}});function Tt(e){var t;for(t=xt.length;t--;)xt[t]===e&&xt.splice(t,1);for(t=wt.length;t--;)wt[t]===e&&wt.splice(t,1)}kt.hideAll=function(){for(var e=xt.length;e--;){var t=xt[e];t&&t.settings.autohide&&(t.hide(),xt.splice(e,1))}};var Ht=function(s,n,e){var a,i,l=v.DOM,t=s.getParam("fixed_toolbar_container");t&&(i=l.select(t)[0]);var r=function(){if(a&&a.moveRel&&a.visible()&&!a._fixed){var e=s.selection.getScrollContainer(),t=s.getBody(),n=0,i=0;if(e){var r=l.getPos(t),o=l.getPos(e);n=Math.max(0,o.x-r.x),i=Math.max(0,o.y-r.y)}a.fixed(!1).moveRel(t,s.rtl?["tr-br","br-tr"]:["tl-bl","bl-tl","tr-br"]).moveBy(n,i)}},o=function(){a&&(a.show(),r(),l.addClass(s.getBody(),"mce-edit-focus"))},u=function(){a&&(a.hide(),kt.hideAll(),l.removeClass(s.getBody(),"mce-edit-focus"))},c=function(){var e,t;a?a.visible()||o():(a=n.panel=b.create({type:i?"panel":"floatpanel",role:"application",classes:"tinymce tinymce-inline",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:(e=i,t=s,!(!e||t.settings.ui_container)),border:1,items:[!1===d(s)?null:{type:"menubar",border:"0 0 1 0",items:se(s)},L(s,f(s))]}),O.setUiContainer(s,a),_(s),i?a.renderTo(i).reflow():a.renderTo().reflow(),C(s,a),o(),V(s),s.on("nodeChange",r),s.on("ResizeWindow",r),s.on("activate",o),s.on("deactivate",u),s.nodeChanged())};return s.settings.content_editable=!0,s.on("focus",function(){!1===g(s)&&e.skinUiCss?l.styleSheetLoader.load(e.skinUiCss,c,c):c()}),s.on("blur hide",u),s.on("remove",function(){a&&(a.remove(),a=null)}),!1===g(s)&&e.skinUiCss?l.styleSheetLoader.load(e.skinUiCss,ve(s)):ve(s)(),{}};function St(i,r){var o,s,a=this,l=st.classPrefix;a.show=function(e,t){function n(){o&&(we(i).append('
'),t&&t())}return a.hide(),o=!0,e?s=u.setTimeout(n,e):n(),a},a.hide=function(){var e=i.lastChild;return u.clearTimeout(s),e&&-1!==e.className.indexOf("throbber")&&e.parentNode.removeChild(e),o=!1,a}}var Mt=function(e,t){var n;e.on("ProgressState",function(e){n=n||new St(t.panel.getEl("body")),e.state?n.show(e.time):n.hide()})},Nt=function(e,t,n){var i=function(e){var t=e.settings,n=t.skin,i=t.skin_url;if(!1!==n){var r=n||"lightgray";i=i?e.documentBaseURI.toAbsolute(i):h.baseURL+"/skins/"+r}return i}(e);return i&&(n.skinUiCss=i+"/skin.min.css",e.contentCSS.push(i+"/content"+(e.inline?".inline":"")+".min.css")),Mt(e,t),e.getParam("inline",!1,"boolean")?Ht(e,t,n):xe(e,t,n)},Pt=st.extend({Mixins:[Se],Defaults:{classes:"widget tooltip tooltip-n"},renderHtml:function(){var e=this,t=e.classPrefix;return'"},bindStates:function(){var t=this;return t.state.on("change:text",function(e){t.getEl().lastChild.innerHTML=t.encode(e.value)}),t._super()},repaint:function(){var e,t;e=this.getEl().style,t=this._layoutRect,e.left=t.x+"px",e.top=t.y+"px",e.zIndex=131070}}),Dt=st.extend({init:function(i){var r=this;r._super(i),i=r.settings,r.canFocus=!0,i.tooltip&&!1!==Dt.tooltips&&(r.on("mouseenter",function(e){var t=r.tooltip().moveTo(-65535);if(e.control===r){var n=t.text(i.tooltip).show().testMoveRel(r.getEl(),["bc-tc","bc-tl","bc-tr"]);t.classes.toggle("tooltip-n","bc-tc"===n),t.classes.toggle("tooltip-nw","bc-tl"===n),t.classes.toggle("tooltip-ne","bc-tr"===n),t.moveRel(r.getEl(),n)}else t.hide()}),r.on("mouseleave mousedown click",function(){r.tooltip().remove(),r._tooltip=null})),r.aria("label",i.ariaLabel||i.tooltip)},tooltip:function(){return this._tooltip||(this._tooltip=new Pt({type:"tooltip"}),O.inheritUiContainer(this,this._tooltip),this._tooltip.renderTo()),this._tooltip},postRender:function(){var e=this,t=e.settings;e._super(),e.parent()||!t.width&&!t.height||(e.initLayoutRect(),e.repaint()),t.autofocus&&e.focus()},bindStates:function(){var t=this;function n(e){t.aria("disabled",e),t.classes.toggle("disabled",e)}function i(e){t.aria("pressed",e),t.classes.toggle("active",e)}return t.state.on("change:disabled",function(e){n(e.value)}),t.state.on("change:active",function(e){i(e.value)}),t.state.get("disabled")&&n(!0),t.state.get("active")&&i(!0),t._super()},remove:function(){this._super(),this._tooltip&&(this._tooltip.remove(),this._tooltip=null)}}),Wt=Dt.extend({Defaults:{value:0},init:function(e){this._super(e),this.classes.add("progress"),this.settings.filter||(this.settings.filter=function(e){return Math.round(e)})},renderHtml:function(){var e=this._id,t=this.classPrefix;return'
0%
'},postRender:function(){return this._super(),this.value(this.settings.value),this},bindStates:function(){var t=this;function n(e){e=t.settings.filter(e),t.getEl().lastChild.innerHTML=e+"%",t.getEl().firstChild.firstChild.style.width=e+"%"}return t.state.on("change:value",function(e){n(e.value)}),n(t.state.get("value")),t._super()}}),Ot=function(e,t){e.getEl().lastChild.textContent=t+(e.progressBar?" "+e.progressBar.value()+"%":"")},At=st.extend({Mixins:[Se],Defaults:{classes:"widget notification"},init:function(e){var t=this;t._super(e),t.maxWidth=e.maxWidth,e.text&&t.text(e.text),e.icon&&(t.icon=e.icon),e.color&&(t.color=e.color),e.type&&t.classes.add("notification-"+e.type),e.timeout&&(e.timeout<0||0'),e=' style="max-width: '+t.maxWidth+"px;"+(t.color?"background-color: "+t.color+';"':'"'),t.closeButton&&(r=''),t.progressBar&&(o=t.progressBar.renderHtml()),''},postRender:function(){var e=this;return u.setTimeout(function(){e.$el.addClass(e.classPrefix+"in"),Ot(e,e.state.get("text"))},100),e._super()},bindStates:function(){var t=this;return t.state.on("change:text",function(e){t.getEl().firstChild.innerHTML=e.value,Ot(t,e.value)}),t.progressBar&&(t.progressBar.bindStates(),t.progressBar.state.on("change:value",function(e){Ot(t,t.state.get("text"))})),t._super()},close:function(){return this.fire("close").isDefaultPrevented()||this.remove(),this},repaint:function(){var e,t;e=this.getEl().style,t=this._layoutRect,e.left=t.x+"px",e.top=t.y+"px",e.zIndex=65534}});function Bt(o){var s=function(e){return e.inline?e.getElement():e.getContentAreaContainer()};return{open:function(e,t){var n,i=w.extend(e,{maxWidth:(n=s(o),Ce.getSize(n).width)}),r=new At(i);return 0<(r.args=i).timeout&&(r.timer=setTimeout(function(){r.close(),t()},i.timeout)),r.on("close",function(){t()}),r.renderTo(),r},close:function(e){e.close()},reposition:function(e){G(e,function(e){e.moveTo(0,0)}),function(n){if(0e.w&&(n=e.x-Math.max(0,t/2),r.layoutRect({w:t,x:n}),i=!0),o&&(o.layoutRect({w:r.layoutRect().innerW}).recalc(),(t=o.layoutRect().minW+e.deltaW)>e.w&&(n=e.x-Math.max(0,t-e.w),r.layoutRect({w:t,x:n}),i=!0)),i&&r.recalc()},initLayoutRect:function(){var e,t=this,n=t._super(),i=0;if(t.settings.title&&!t._fullscreen){e=t.getEl("head");var r=Ce.getSize(e);n.headerW=r.width,n.headerH=r.height,i+=n.headerH}t.statusbar&&(i+=t.statusbar.layoutRect().h),n.deltaH+=i,n.minH+=i,n.h+=i;var o=Ce.getWindowSize();return n.x=t.settings.x||Math.max(0,o.w/2-n.w/2),n.y=t.settings.y||Math.max(0,o.h/2-n.h/2),n},renderHtml:function(){var e=this,t=e._layout,n=e._id,i=e.classPrefix,r=e.settings,o="",s="",a=r.html;return e.preRender(),t.preRender(e),r.title&&(o='
'+e.encode(r.title)+'
'),r.url&&(a=''),void 0===a&&(a=t.renderHtml(e)),e.statusbar&&(s=e.statusbar.renderHtml()),'
'+o+'
'+a+"
"+s+"
"},fullscreen:function(e){var n,t,i=this,r=document.documentElement,o=i.classPrefix;if(e!==i._fullscreen)if(we(window).on("resize",function(){var e;if(i._fullscreen)if(n)i._timer||(i._timer=u.setTimeout(function(){var e=Ce.getWindowSize();i.moveTo(0,0).resizeTo(e.w,e.h),i._timer=0},50));else{e=(new Date).getTime();var t=Ce.getWindowSize();i.moveTo(0,0).resizeTo(t.w,t.h),50<(new Date).getTime()-e&&(n=!0)}}),t=i.layoutRect(),i._fullscreen=e){i._initial={x:t.x,y:t.y,w:t.w,h:t.h},i.borderBox=Pe("0"),i.getEl("head").style.display="none",t.deltaH-=t.headerH+2,we([r,document.body]).addClass(o+"fullscreen"),i.classes.add("fullscreen");var s=Ce.getWindowSize();i.moveTo(0,0).resizeTo(s.w,s.h)}else i.borderBox=Pe(i.settings.border),i.getEl("head").style.display="",t.deltaH+=t.headerH,we([r,document.body]).removeClass(o+"fullscreen"),i.classes.remove("fullscreen"),i.moveTo(i._initial.x,i._initial.y).resizeTo(i._initial.w,i._initial.h);return i.reflow()},postRender:function(){var t,n=this;setTimeout(function(){n.classes.add("in"),n.fire("open")},0),n._super(),n.statusbar&&n.statusbar.postRender(),n.focus(),this.dragHelper=new ft(n._id+"-dragh",{start:function(){t={x:n.layoutRect().x,y:n.layoutRect().y}},drag:function(e){n.moveTo(t.x+e.deltaX,t.y+e.deltaY)}}),n.on("submit",function(e){e.isDefaultPrevented()||n.close()}),Lt.push(n),zt(!0)},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var e,t=this;for(t.dragHelper.destroy(),t._super(),t.statusbar&&this.statusbar.remove(),Ft(t.classPrefix,!1),e=Lt.length;e--;)Lt[e]===t&&Lt.splice(e,1);zt(0'+this._super(e)}}),qt=Dt.extend({Defaults:{classes:"widget btn",role:"button"},init:function(e){var t,n=this;n._super(e),e=n.settings,t=n.settings.size,n.on("click mousedown",function(e){e.preventDefault()}),n.on("touchstart",function(e){n.fire("click",e),e.preventDefault()}),e.subtype&&n.classes.add(e.subtype),t&&n.classes.add("btn-"+t),e.icon&&n.icon(e.icon)},icon:function(e){return arguments.length?(this.state.set("icon",e),this):this.state.get("icon")},repaint:function(){var e,t=this.getEl().firstChild;t&&((e=t.style).width=e.height="100%"),this._super()},renderHtml:function(){var e,t,n=this,i=n._id,r=n.classPrefix,o=n.state.get("icon"),s=n.state.get("text"),a="",l=n.settings;return(e=l.image)?(o="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1]),e=" style=\"background-image: url('"+e+"')\""):e="",s&&(n.classes.add("btn-has-text"),a=''+n.encode(s)+""),o=o?r+"ico "+r+"i-"+o:"",t="boolean"==typeof l.active?' aria-pressed="'+l.active+'"':"",'
"},bindStates:function(){var o=this,n=o.$,i=o.classPrefix+"txt";function s(e){var t=n("span."+i,o.getEl());e?(t[0]||(n("button:first",o.getEl()).append(''),t=n("span."+i,o.getEl())),t.html(o.encode(e))):t.remove(),o.classes.toggle("btn-has-text",!!e)}return o.state.on("change:text",function(e){s(e.value)}),o.state.on("change:icon",function(e){var t=e.value,n=o.classPrefix;t=(o.settings.icon=t)?n+"ico "+n+"i-"+o.settings.icon:"";var i=o.getEl().firstChild,r=i.getElementsByTagName("i")[0];t?(r&&r===i.firstChild||(r=document.createElement("i"),i.insertBefore(r,i.firstChild)),r.className=t):r&&i.removeChild(r),s(o.state.get("text"))}),o._super()}}),jt=qt.extend({init:function(e){e=w.extend({text:"Browse...",multiple:!1,accept:null},e),this._super(e),this.classes.add("browsebutton"),e.multiple&&this.classes.add("multiple")},postRender:function(){var n=this,t=Ce.create("input",{type:"file",id:n._id+"-browse",accept:n.settings.accept});n._super(),we(t).on("change",function(e){var t=e.target.files;n.value=function(){return t.length?n.settings.multiple?t:t[0]:null},e.preventDefault(),t.length&&n.fire("change",e)}),we(t).on("click",function(e){e.stopPropagation()}),we(n.getEl("button")).on("click",function(e){e.stopPropagation(),t.click()}),n.getEl().appendChild(t)},remove:function(){we(this.getEl("button")).off(),we(this.getEl("input")).off(),this._super()}}),Jt=ct.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var e=this,t=e._layout;return e.classes.add("btn-group"),e.preRender(),t.preRender(e),'
'+(e.settings.html||"")+t.renderHtml(e)+"
"}}),Gt=Dt.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(e){var t=this;t._super(e),t.on("click mousedown",function(e){e.preventDefault()}),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(e){return arguments.length?(this.state.set("checked",e),this):this.state.get("checked")},value:function(e){return arguments.length?this.checked(e):this.checked()},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'
'+e.encode(e.state.get("text"))+"
"},bindStates:function(){var o=this;function t(e){o.classes.toggle("checked",e),o.aria("checked",e)}return o.state.on("change:text",function(e){o.getEl("al").firstChild.data=o.translate(e.value)}),o.state.on("change:checked change:value",function(e){o.fire("change"),t(e.value)}),o.state.on("change:icon",function(e){var t=e.value,n=o.classPrefix;if(void 0===t)return o.settings.icon;t=(o.settings.icon=t)?n+"ico "+n+"i-"+o.settings.icon:"";var i=o.getEl().firstChild,r=i.getElementsByTagName("i")[0];t?(r&&r===i.firstChild||(r=document.createElement("i"),i.insertBefore(r,i.firstChild)),r.className=t):r&&i.removeChild(r)}),o.state.get("checked")&&t(!0),o._super()}}),Kt=tinymce.util.Tools.resolve("tinymce.util.VK"),Zt=Dt.extend({init:function(i){var r=this;r._super(i),i=r.settings,r.classes.add("combobox"),r.subinput=!0,r.ariaTarget="inp",i.menu=i.menu||i.values,i.menu&&(i.icon="caret"),r.on("click",function(e){var t=e.target,n=r.getEl();if(we.contains(n,t)||t===n)for(;t&&t!==n;)t.id&&-1!==t.id.indexOf("-open")&&(r.fire("action"),i.menu&&(r.showMenu(),e.aria&&r.menu.items()[0].focus())),t=t.parentNode}),r.on("keydown",function(e){var t;13===e.keyCode&&"INPUT"===e.target.nodeName&&(e.preventDefault(),r.parents().reverse().each(function(e){if(e.toJSON)return t=e,!1}),r.fire("submit",{data:t.toJSON()}))}),r.on("keyup",function(e){if("INPUT"===e.target.nodeName){var t=r.state.get("value"),n=e.target.value;n!==t&&(r.state.set("value",n),r.fire("autocomplete",e))}}),r.on("mouseover",function(e){var t=r.tooltip().moveTo(-65535);if(r.statusLevel()&&-1!==e.target.className.indexOf(r.classPrefix+"status")){var n=r.statusMessage()||"Ok",i=t.text(n).show().testMoveRel(e.target,["bc-tc","bc-tl","bc-tr"]);t.classes.toggle("tooltip-n","bc-tc"===i),t.classes.toggle("tooltip-nw","bc-tl"===i),t.classes.toggle("tooltip-ne","bc-tr"===i),t.moveRel(e.target,i)}})},statusLevel:function(e){return 0