!function(e,t){"use strict";functionn(e,t){for(varn,r=[],o=0;o<e.length;++o){if(n=a[e[o]]||i(e[o]),!n)throw"module definition dependecy not found: "+e[o];r.push(n)}t.apply(null,r)}functionr(e,r,i){if("string"!=typeofe)throw"invalid module definition, module id must be defined and be a string";if(r===t)throw"invalid module definition, dependencies must be specified";if(i===t)throw"invalid module definition, definition function must be specified";n(r,function(){a[e]=i.apply(null,arguments)})}functioni(t){for(varn=e,r=t.split(/[.\/]/),i=0;i<r.length;++i){if(!n[r[i]])return;n=n[r[i]]}returnn}functiono(n){varr,i,o,s,l;for(r=0;r<n.length;r++){i=e,o=n[r],s=o.split(/[.\/]/);for(varc=0;c<s.length-1;++c)i[s[c]]===t&&(i[s[c]]={}),i=i[s[c]];i[s[s.length-1]]=a[o]}if(e.AMDLC_TESTS){l=e.privateModules||{};for(oina)l[o]=a[o];for(r=0;r<n.length;r++)deletel[n[r]];e.privateModules=l}}vara={};r("tinymce/imagetoolsplugin/Canvas",[],function(){functione(e,t){returnn(document.createElement("canvas"),e,t)}functiont(e){returne.getContext("2d")}functionn(e,t,n){returne.width=t,e.height=n,e}return{create:e,resize:n,get2dContext:t}}),r("tinymce/imagetoolsplugin/Mime",[],function(){functione(e){vart=document.createElement("a");returnt.href=e,t.pathname}functiont(t){varn=e(t).split("."),r=n[n.length-1],i={jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png"};returnr&&(r=r.toLowerCase()),i[r]}return{guessMimeType:t}}),r("tinymce/imagetoolsplugin/ImageSize",[],function(){functione(e){returne.naturalWidth||e.width}functiont(e){returne.naturalHeight||e.height}return{getWidth:e,getHeight:t}}),r("tinymce/imagetoolsplugin/Conversions",["tinymce/util/Promise","tinymce/imagetoolsplugin/Canvas","tinymce/imagetoolsplugin/Mime","tinymce/imagetoolsplugin/ImageSize"],function(e,t,n,r){functioni(t){returnnewe(function(e){functionn(){t.removeEventListener("load",n),e(t)}t.complete?e(t):t.addEventListener("load",n)})}functiono(e){returni(e).then(function(e){varn,i;returni=t.create(r.getWidth(e),r.getHeight(e)),n=t.get2dContext(i),n.drawImage(e,0,0),i})}functiona(e){returni(e).then(function(e){vart=e.src;return0===t.indexOf("blob:")?l(t):0===t.indexOf("data:")?c(t):o(e).then(function(e){returnc(e.toDataURL(n.guessMimeType(t)))})})}functions(t){returnnewe(function(e){functionn(){r.removeEventListener("load",n),e(r)}varr=newImage;r.addEventListener("load",n),r.src=URL.createObjectURL(t),r.complete&&n()})}functionl(t){returnnewe(function(e){varn=newXMLHttpRequest;n.open("GET",t,!0),n.responseType="blob",n.onload=function(){200==this.status&&e(this.response)},n.send()})}functionc(t){returnnewe(function(e){varn,r,i,o,a,s;if(t=t.split(","),o=/data:([^;]+)/.exec(t[0]),o&&(a=o[1]),n=atob(t[1]),window.WebKitBlobBuilder){for(s=newWebKitBlobBuilder,r=newArrayBuffer(n.length),i=0;i<r.length;i++)r[i]=n.charCodeAt(i);returns.append(r),voide(s.getBlob(a))}for(r=newUint8Array(n.length),i=0;i<r.length;i++)r[i]=n.charCodeAt(i);e(newBlob([r],{type:a}))})}functionu(e){return0===e.indexOf("blob:")?l(e):0===e.indexOf("data:")?c(e):null}functiond(e,t){returnc(e.toDataURL(t))}functionf(t){returnnewe(function(e){varn=newFileReader;n.onloadend=function(){e(n.result)},n.readAsDataURL(t)})}functionp(e){returnf(e).then(function(e){returne.split(",")[1]})}functionm(e){URL.revokeObjectURL(e.src)}return{blobToImage:s,imageToBlob:a,uriToBlob:u,blobToDataUri:f,blobToBase64:p,imageToCanvas:o,canvasToBlob:d,revokeImageUrl:m}}),r("tinymce/imagetoolsplugin/ImageTools",["tinymce/imagetoolsplugin/Conversions","tinymce/imagetoolsplugin/Canvas","tinymce/imagetoolsplugin/ImageSize"],function(e,t,n){functionr(r,i){returne.blobToImage(r).then(function(o){vara=t.create(n.getWidth(o),n.getHeight(o)),l=t.get2dContext(a),c=0,u=0;returni=0>i?360+i:i,(90==i||270==i)&&t.resize(a,a.height,a.width),(90==i||180==i)&&(c=a.width),(270==i||180==i)&&(u=a.height),l.translate(c,u),l.rotate(i*Math.PI/180),l.drawImage(o,0,0),s(o),e.canvasToBlob(a,r.type)})}functioni(r,i){returne.blobToImage(r).then(function(r){varo=t.create(n.getWidth(r),n.getHeigh