/** * 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.7.0 (2021-02-10) */ !function(){"use strict";var t,e,n,r,i,o,u,a,f,c,l=function(t){var e=t;return{get:function(){return e},set:function(t){e=t}}},s=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=tinymce.util.Tools.resolve("tinymce.util.Tools"),m=function(){},h=function(t){return function(){return t}},g=h(!1),v=h(!0),p=function(){return y},y=(t=function(t){return t.isNone()},{fold:function(t,e){return t()},is:g,isSome:g,isNone:v,getOr:n=function(t){return t},getOrThunk:e=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:h(null),getOrUndefined:h(undefined),or:n,orThunk:e,map:p,each:m,bind:p,exists:g,forall:v,filter:p,equals:t,equals_:t,toArray:function(){return[]},toString:h("none()")}),w=function(n){var t=h(n),e=function(){return o},r=function(t){return t(n)},o={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:v,isNone:g,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return w(t(n))},each:function(t){t(n)},bind:r,exists:r,forall:r,filter:function(t){return t(n)?o:y},toArray:function(){return[n]},toString:function(){return"some("+n+")"},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(g,function(t){return e(n,t)})}};return o},b={some:w,none:p,from:function(t){return null===t||t===undefined?y:w(t)}},I=function(t){return!(null===(e=t)||e===undefined);var e},T=(r="function",function(t){return typeof t===r}),_=function(t,e){return A(document.createElement("canvas"),t,e)},R=function(t){var e=_(t.width,t.height);return U(e).drawImage(t,0,0),e},U=function(t){return t.getContext("2d")},A=function(t,e,n){return t.width=e,t.height=n,t},x=window.Promise?window.Promise:(i=function(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],c(t,a(L,this),a(j,this))},o=window,u=i.immediateFn||"function"==typeof o.setImmediate&&o.setImmediate||function(t){return setTimeout(t,1)},a=function(n,r){return function(){for(var t=[],e=0;e