mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-04 22:01:05 +01:00
1 line
6.7 KiB
JavaScript
1 line
6.7 KiB
JavaScript
|
!function(){"use strict";var n,t,e,r,o,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t]},c=function(n){return function(){return n}},a=function(n){return n},l=c(!1),f=c(!0),s=l,d=f,m=function(){return g},g=(r={fold:function(n,t){return n()},is:s,isSome:s,isNone:d,getOr:e=function(n){return n},getOrThunk:t=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:e,orThunk:t,map:m,ap:m,each:function(){},bind:m,flatten:m,exists:s,forall:d,filter:m,equals:n=function(n){return n.isNone()},equals_:n,toArray:function(){return[]},toString:c("none()")},Object.freeze&&Object.freeze(r),r),y=function(e){var n=function(){return e},t=function(){return o},r=function(n){return n(e)},o={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:d,isNone:s,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return y(n(e))},ap:function(n){return n.fold(m,function(n){return y(n(e))})},each:function(n){n(e)},bind:r,flatten:n,exists:r,forall:r,filter:function(n){return n(e)?o:g},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(s,function(n){return t(e,n)})},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return o},p={some:y,none:m,from:function(n){return null===n||n===undefined?g:y(n)}},h=(o="function",function(n){return function(n){if(null===n)return"null";var t=typeof n;return"object"===t&&Array.prototype.isPrototypeOf(n)?"array":"object"===t&&String.prototype.isPrototypeOf(n)?"string":t}(n)===o}),v=function(n,t){for(var e=0,r=n.length;e<r;e++)if(t(n[e],e,n))return p.some(e);return p.none()},O=(Array.prototype.slice,h(Array.from)&&Array.from,function(n,t,e){for(var r,o=[],i=e.fold(function(){return l},function(t){return function(n){return t<=n}}),u=0;u<n.length&&(!(0===t.length||-1<n[u].title.indexOf(t)||(r=n[u].keywords,v(r,function(n){return-1<n.indexOf(t)}).isSome()))||(o.push({value:n[u]["char"],text:n[u].title,icon:n[u]["char"]}),!i(o.length)));u++);return o}),b=function(n){var t=n,e=function(){return t};return{get:e,set:function(n){t=n},clone:function(){return b(e())}}},w="undefined"!=typeof window?window:Function("return this;")(),A=Object.keys,k=Object.hasOwnProperty,T=function(e){return{is:function(n){return e===n},isValue:f,isError:l,getOr:c(e),getOrThunk:c(e),getOrDie:c(e),or:function(n){return T(e)},orThunk:function(n){return T(e)},fold:function(n,t){return t(e)},map:function(n){return T(n(e))},each:function(n){n(e)},bind:function(n){return n(e)},exists:function(n){return n(e)},forall:function(n){return n(e)},toOption:function(){return p.some(e)}}},j=function(e){return{is:l,isValue:l,isError:f,getOr:a,getOrThunk:function(n){return n()},getOrDie:function(){return n=String(e),function(){throw new Error(n)}();var n},or:function(n){return n},orThunk:function(n){return n()},fold:function(n,t){return n(e)},map:function(n){return j(e)},each:u,bind:function(n){return j(e)},exists:l,forall:f,toOption:p.none}},C={value:T,error:j},S=tinymce.util.Tools.resolve("tinymce.dom.ScriptLoader"),_=tinymce.util.Tools.resolve("tinymce.util.Promise"),x="All",D=b(p.none()),L=b(p.none()),E={symbols:"Symbols",people:"People",animals_and_nature:"Animals and Nature",food_and_drink:"Food and Drink",activity:"Activity",travel_and_places:"Travel and Places",objects:"Objects",flags:"Flags"},P="mce_emoticons_plugin_database",F=function(n){return t=E,e=n,k.call(t,e)?E[n]:n;var t,e},N=function(n,u){n.on("init",function(){S.ScriptLoader.loadScript(u,function(){var o={},i=[];(function(n){if(w[P]){var t=C.value(w[P]);return delete w[P],t}return C.error("Url "+n+" did not contain the expected format for emoticons")})(u).fold(function(n){console.log(n),D.set(p.some({})),L.set(p.some([]))},function(n){!function(n,t){for(var e=A(n),r=0,o=e.length;r<o;r++){var i=e[r];t(n[i],i,n)}}(n,function(n,t){var e={title:t,keywords:n.keywords,"char":n["char"],category:F(n.category)},r=o[e.cate
|