You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
128 KiB

2 years ago
!function(_){"use strict";var e,t,n,i,r=tinymce.util.Tools.resolve("tinymce.ThemeManager"),l=tinymce.util.Tools.resolve("tinymce.EditorManager"),w=tinymce.util.Tools.resolve("tinymce.util.Tools"),d=function(e){return!1!==c(e)},c=function(e){return e.getParam("menubar")},f=function(e){return e.getParam("toolbar_items_size")},h=function(e){return e.getParam("menu")},m=function(e){return!1===e.settings.skin},g=function(e){var t=e.getParam("resize","vertical");return!1===t?"none":"both"===t?"both":"vertical"},p=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),v=tinymce.util.Tools.resolve("tinymce.ui.Factory"),b=tinymce.util.Tools.resolve("tinymce.util.I18n"),o=function(e){return e.fire("SkinLoaded")},y=function(e){return e.fire("ResizeEditor")},x=function(e){return e.fire("BeforeRenderUI")},s=function(t,n){return function(){var e=t.find(n)[0];e&&e.focus(!0)}},R=function(e,t){e.shortcuts.add("Alt+F9","",s(t,"menubar")),e.shortcuts.add("Alt+F10,F10","",s(t,"toolbar")),e.shortcuts.add("Alt+F11","",s(t,"elementpath")),t.on("cancel",function(){e.focus()})},C=tinymce.util.Tools.resolve("tinymce.geom.Rect"),u=tinymce.util.Tools.resolve("tinymce.util.Delay"),E=function(){},k=function(e){return function(){return e}},a=k(!1),H=k(!0),S=function(){return T},T=(e=function(e){return e.isNone()},i={fold:function(e,t){return e()},is:a,isSome:a,isNone:H,getOr:n=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:k(null),getOrUndefined:k(undefined),or:n,orThunk:t,map:S,each:E,bind:S,exists:a,forall:H,filter:S,equals:e,equals_:e,toArray:function(){return[]},toString:k("none()")},Object.freeze&&Object.freeze(i),i),M=function(n){var e=k(n),t=function(){return r},i=function(e){return e(n)},r={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:H,isNone:a,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return M(e(n))},each:function(e){e(n)},bind:i,exists:i,forall:i,filter:function(e){return e(n)?r:T},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(a,function(e){return t(n,e)})}};return r},N={some:M,none:S,from:function(e){return null===e||e===undefined?T:M(e)}},P=function(e){return e?e.getRoot().uiContainer:null},W={getUiContainerDelta:function(e){var t=P(e);if(t&&"static"!==p.DOM.getStyle(t,"position",!0)){var n=p.DOM.getPos(t),i=t.scrollLeft-n.x,r=t.scrollTop-n.y;return N.some({x:i,y:r})}return N.none()},setUiContainer:function(e,t){var n=p.DOM.select(e.settings.ui_container)[0];t.getRoot().uiContainer=n},getUiContainer:P,inheritUiContainer:function(e,t){return t.uiContainer=P(e)}},D=function(i,e,r){var o,s=[];if(e)return w.each(e.split(/[ ,]/),function(t){var e,n=function(){var e=i.selection;t.settings.stateSelector&&e.selectorChanged(t.settings.stateSelector,function(e){t.active(e)},!0),t.settings.disabledStateSelector&&e.selectorChanged(t.settings.disabledStateSelector,function(e){t.disabled(e)})};"|"===t?o=null:(o||(o={type:"buttongroup",items:[]},s.push(o)),i.buttons[t]&&(e=t,"function"==typeof(t=i.buttons[e])&&(t=t()),t.type=t.type||"button",t.size=r,t=v.create(t),o.items.push(t),i.initialized?n():i.on("init",n)))}),{type:"toolbar",layout:"flow",items:s}},O=D,A=function(n,i){var e,t,r=[];if(w.each(!1===(t=(e=n).getParam("toolbar"))?[]:w.isArray(t)?w.grep(t,function(e){return 0<e.length}):function(e,t){for(var n=[],i=1;i<10;i++){var r=e["toolbar"+i];if(!r)break;n.push(r)}var o=e.toolbar?[e.toolbar]:[t];return 0<n.length?n:o}(e.settings,"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"),function(e){var t;(t=e)&&r.push(D(n,t,i))}),r.length)return{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:r}},B=p.DOM,L=function(e){return{left:e.x,top:e.y,width:e.w,height:e.h,right:e.x+e.w,bottom:e.y+e.h}},z=function(e,t){e.moveTo(t.left,t.top)},I=function(e,t,n,i,r,o){return o=L({x:t,y:n,w:o