/** * Copyright (c) Tiny Technologies, Inc. All rights reserved. * Licensed under the LGPL or a commercial license. * For LGPL see License.txt in the project root for license information. * For commercial licenses see https://www.tiny.cloud/ * * Version: 5.2.1 (2020-03-25) */ !function(v){"use strict";function e(){}function n(){return c}var t,r=function(e){function n(){return t}var t=e;return{get:n,set:function(e){t=e},clone:function(){return r(n())}}},o=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),d=function(e){return function(){return e}},u=d(!1),a=d(!0),c=(t={fold:function(e,n){return e()},is:u,isSome:u,isNone:a,getOr:l,getOrThunk:f,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:d(null),getOrUndefined:d(undefined),or:l,orThunk:f,map:n,each:e,bind:n,exists:u,forall:a,filter:n,equals:s,equals_:s,toArray:function(){return[]},toString:d("none()")},Object.freeze&&Object.freeze(t),t);function s(e){return e.isNone()}function f(e){return e()}function l(e){return e}var m=function(t){function e(){return o}function n(e){return e(t)}var r=d(t),o={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:a,isNone:u,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:e,orThunk:e,map:function(e){return m(e(t))},each:function(e){e(t)},bind:n,exists:n,forall:n,filter:function(e){return e(t)?o:c},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(u,function(e){return n(t,e)})}};return o},p={some:m,none:n,from:function(e){return null===e||e===undefined?c:m(e)}};function h(e,n){return y(v.document.createElement("canvas"),e,n)}function g(e){var n=h(e.width,e.height);return w(n).drawImage(e,0,0),n}function w(e){return e.getContext("2d")}function y(e,n,t){return e.width=n,e.height=t,e}var b,O,E=window.Promise?window.Promise:(b=T.immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(e){v.setTimeout(e,1)},O=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},T.prototype["catch"]=function(e){return this.then(null,e)},T.prototype.then=function(t,r){var o=this;return new T(function(e,n){N.call(o,new R(t,r,e,n))})},T.all=function(){for(var e=[],n=0;n