!function(){vara={},b=function(b){for(varc=a[b],e=c.deps,f=c.defn,g=e.length,h=newArray(g),i=0;i<g;++i)h[i]=d(e[i]);varj=f.apply(null,h);if(void0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeofb)throw"module id must be a string";if(void0===c)throw"no dependencies for "+b;if(void0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void0}},d=function(c){vard=a[c];if(void0===d)throw"module ["+c+"] was undefined";returnvoid0===d.instance&&b(c),d.instance},e=function(a,b){for(varc=a.length,e=newArray(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};varg=c,h=function(a,b){g(a,[],function(){returnb})};h("4",tinymce.util.Tools.resolve),g("1",["4"],function(a){returna("tinymce.PluginManager")}),g("2",["4"],function(a){returna("tinymce.util.Tools")}),h("5",document),h("6",Math),h("7",RegExp),g("8",["4"],function(a){returna("tinymce.Env")}),g("9",["4"],function(a){returna("tinymce.ui.Factory")}),g("a",["4"],function(a){returna("tinymce.util.JSON")}),g("b",["4"],function(a){returna("tinymce.util.XHR")}),g("e",["4"],function(a){returna("tinymce.util.Promise")}),g("c",["e","2","5"],function(a,b,c){returnfunction(c){functiond(a,b){returna?a.replace(/\/$/,"")+"/"+b.replace(/^\//,""):b}functione(a,b,e,f){varg,h;g=newXMLHttpRequest,g.open("POST",c.url),g.withCredentials=c.credentials,g.upload.onprogress=function(a){f(a.loaded/a.total*100)},g.onerror=function(){e("Image upload failed due to a XHR Transport error. Code: "+g.status)},g.onload=function(){vara;returng.status<200||g.status>=300?voide("HTTP Error: "+g.status):(a=JSON.parse(g.responseText),a&&"string"==typeofa.location?voidb(d(c.basePath,a.location)):voide("Invalid JSON: "+g.responseText))},h=newFormData,h.append("file",a.blob(),a.filename()),g.send(h)}functionf(b,c){returnnewa(function(a,d){try{c(b,a,d,i)}catch(a){d(a.message)}})}functiong(a){returna===e}functionh(b){return!c.url&&g(c.handler)?a.reject("Upload url missng from the settings."):f(b,c.handler)}vari=function(){};returnc=b.extend({credentials:!1,handler:e},c),{upload:h}}}),g("d",["2","6","5"],function(a,b,c){vard=function(a,d){functione(a,b){f.parentNode&&f.parentNode.removeChild(f),d({width:a,height:b})}varf=c.createElement("img");f.onload=function(){e(b.max(f.width,f.clientWidth),b.max(f.height,f.clientHeight))},f.onerror=function(){e()};varg=f.style;g.visibility="hidden",g.position="fixed",g.bottom=g.left=0,g.width=g.height="auto",c.body.appendChild(f),f.src=a},e=function(b,c,d){functione(b,d){returnd=d||[],a.each(b,function(a){varb={text:a.text||a.title};a.menu?b.menu=e(a.menu):(b.value=a.value,c(b)),d.push(b)}),d}returne(b,d||[])},f=function(a){returna&&(a=a.replace(/px$/,"")),a},g=function(a){returna.length>0&&/^[0-9]+$/.test(a)&&(a+="px"),a},h=function(a){if(a.margin){varb=a.margin.split(" ");switch(b.length){case1:a["margin-top"]=a["margin-top"]||b[0],a["margin-right"]=a["margin-right"]||b[0],a["margin-bottom"]=a["margin-bottom"]||b[0],a["margin-left"]=a["margin-left"]||b[0];break;case2:a["margin-top"]=a["margin-top"]||b[0],a["margin-right"]=a["margin-right"]||b[1],a["margin-bottom"]=a["margin-bottom"]||b[0],a["margin-left"]=a["margin-left"]||b[1];break;case3:a["margin-top"]=a["margin-top"]||b[0],a["margin-right"]=a["margin-right"]||b[1],a["margin-bottom"]=a["margin-bottom"]||b[2],a["margin-left"]=a["margin-left"]||b[1];break;case4:a["margin-top"]=a["margin-top"]||b[0],a["margin-right"]=a["margin-right"]||b[1],a["margin-bottom"]=a["margin-bottom"]||b[2],a["margin-left"]=a["margin-left"]||b[3]}deletea.margin}returna};return{getImageSize:d,buildListItems:e,removePixelSuffix:f,addPixelSuffix:g,mergeMargins:h}}),g("3",["5","6","7","8","9","a","2","b","c","d"],function(a,b,c,d,e,f,g,h,i,j){returnfunction(a){functionk(b){varc=a.settings.image_list;"string"==typeofc?h.send({url:c,success:function(a){b(f.parse(a))}}):"function"==typeofc?c(b):b(c)}functionl(f){functionh(){varb=e.get("Throbber"),c=newb(s.getEl()),d=this.value()