!function(){"use strict";vart=function(e){varn=e,o=function(){returnn};return{get:o,set:function(t){n=t},clone:function(){returnt(o())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.util.Tools");functiono(t,e){returni(document.createElement("canvas"),t,e)}functionr(t){returnt.getContext("2d")}functioni(t,e,n){returnt.width=e,t.height=n,t}vara,u,c,l,s={create:o,clone:function(t){vare;returnr(e=o(t.width,t.height)).drawImage(t,0,0),e},resize:i,get2dContext:r,get3dContext:function(t){vare=null;try{e=t.getContext("webgl")||t.getContext("experimental-webgl")}catch(n){}returne||(e=null),e}},f={getWidth:function(t){returnt.naturalWidth||t.width},getHeight:function(t){returnt.naturalHeight||t.height}},d=window.Promise?window.Promise:function(){vart=function(t){if("object"!=typeofthis)thrownewTypeError("Promises must be constructed via new");if("function"!=typeoft)thrownewTypeError("not a function");this._state=null,this._value=null,this._deferreds=[],c(t,n(i,this),n(a,this))},e=t.immediateFn||"function"==typeofsetImmediate&&setImmediate||function(t){setTimeout(t,1)};functionn(t,e){returnfunction(){t.apply(e,arguments)}}varo=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};functionr(t){varn=this;null!==this._state?e(function(){vare=n._state?t.onFulfilled:t.onRejected;if(null!==e){varo;try{o=e(n._value)}catch(r){returnvoidt.reject(r)}t.resolve(o)}else(n._state?t.resolve:t.reject)(n._value)}):this._deferreds.push(t)}functioni(t){try{if(t===this)thrownewTypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeoft||"function"==typeoft)){vare=t.then;if("function"==typeofe)returnvoidc(n(e,t),n(i,this),n(a,this))}this._state=!0,this._value=t,u.call(this)}catch(o){a.call(this,o)}}functiona(t){this._state=!1,this._value=t,u.call(this)}functionu(){for(vart=0,e=this._deferreds.length;t<e;t++)r.call(this,this._deferreds[t]);this._deferreds=null}functionc(t,e,n){varo=!1;try{t(function(t){o||(o=!0,e(t))},function(t){o||(o=!0,n(t))})}catch(r){if(o)return;o=!0,n(r)}}returnt.prototype["catch"]=function(t){returnthis.then(null,t)},t.prototype.then=function(e,n){varo=this;returnnewt(function(t,i){r.call(o,newfunction(t,e,n,o){this.onFulfilled="function"==typeoft?t:null,this.onRejected="function"==typeofe?e:null,this.resolve=n,this.reject=o}(e,n,t,i))})},t.all=function(){vare=Array.prototype.slice.call(1===arguments.length&&o(arguments[0])?arguments[0]:arguments);returnnewt(function(t,n){if(0===e.length)returnt([]);varo=e.length;functionr(i,a){try{if(a&&("object"==typeofa||"function"==typeofa)){varu=a.then;if("function"==typeofu)returnvoidu.call(a,function(t){r(i,t)},n)}e[i]=a,0==--o&&t(e)}catch(c){n(c)}}for(vari=0;i<e.length;i++)r(i,e[i])})},t.resolve=function(e){returne&&"object"==typeofe&&e.constructor===t?e:newt(function(t){t(e)})},t.reject=function(e){returnnewt(function(t,n){n(e)})},t.race=function(e){returnnewt(function(t,n){for(varo=0,r=e.length;o<r;o++)e[o].then(t,n)})},t}(),h=function(t){returnfunction(){returnt}},p={noop:function(){},noarg:function(t){returnfunction(){returnt()}},compose:function(t,e){returnfunction(){returnt(e.apply(null,arguments))}},constant:h,identity:function(t){returnt},tripleEquals:function(t,e){returnt===e},curry:function(t){for(vare=newArray(arguments.length-1),n=1;n<arguments.length;n++)e[n-1]=arguments[n];returnfunction(){for(varn=newArray(arguments.length),o=0;o<n.length;o++)n[o]=arguments[o];varr=e.concat(n);returnt.apply(null,r)}},not:function(t){returnfunction(){return!t.apply(null,arguments)}},die:function(t){returnfunction(){thrownewError(t)}},apply:function(t){returnt()},call:function(t){t()},never:h(!1),always:h(!0)},m=p.never,g=p.always,v=function(){returny},y=(l={fold:function(t,e){returnt()},is:m,isSome:m,isNone:g,getOr:c=function(t){returnt},getOrThunk:u=function(t){returnt()},getOrDie:function(t){thrownewError(t||"error: getOrDie called on none.")},or:c,orThunk:u,map:v,ap:v,each:function(){},b