!function(){"use strict";vare=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.util.Tools"),n={hasDimensions:function(e){return!1!==e.settings.image_dimensions},hasAdvTab:function(e){return!0===e.settings.image_advtab},getPrependUrl:function(e){returne.getParam("image_prepend_url","")},getClassList:function(e){returne.getParam("image_class_list")},hasDescription:function(e){return!1!==e.settings.image_description},hasImageTitle:function(e){return!0===e.settings.image_title},hasImageCaption:function(e){return!0===e.settings.image_caption},getImageList:function(e){returne.getParam("image_list",!1)},hasUploadUrl:function(e){returne.getParam("images_upload_url",!1)},hasUploadHandler:function(e){returne.getParam("images_upload_handler",!1)},getUploadUrl:function(e){returne.getParam("images_upload_url")},getUploadHandler:function(e){returne.getParam("images_upload_handler")},getUploadBasePath:function(e){returne.getParam("images_upload_base_path")},getUploadCredentials:function(e){returne.getParam("images_upload_credentials")}},a="undefined"!=typeofwindow?window:Function("return this;")(),i=function(e,t){for(varn=t!==undefined&&null!==t?t:a,i=0;i<e.length&&n!==undefined&&null!==n;++i)n=n[e[i]];returnn},r=function(e,t){varn=e.split(".");returni(n,t)},o=function(e,t){varn=function(e,t){returnr(e,t)}(e,t);if(n===undefined||null===n)throwe+" not available on this browser";returnn},l=function(){returnnew(o("FileReader"))},s=tinymce.util.Tools.resolve("tinymce.util.Promise"),u=tinymce.util.Tools.resolve("tinymce.util.XHR"),c=function(e,t){returnMath.max(parseInt(e,10),parseInt(t,10))},g={getImageSize:function(e,t){functionn(e,n){a.parentNode&&a.parentNode.removeChild(a),t({width:e,height:n})}vara=document.createElement("img");a.onload=function(){n(c(a.width,a.clientWidth),c(a.height,a.clientHeight))},a.onerror=function(){n(0,0)};vari=a.style;i.visibility="hidden",i.position="fixed",i.bottom=i.left="0px",i.width=i.height="auto",document.body.appendChild(a),a.src=e},buildListItems:function(e,n,a){functioni(e,a){returna=a||[],t.each(e,function(e){vart={text:e.text||e.title};e.menu?t.menu=i(e.menu):(t.value=e.value,n(t)),a.push(t)}),a}returni(e,a||[])},removePixelSuffix:function(e){returne&&(e=e.replace(/px$/,"")),e},addPixelSuffix:function(e){returne.length>0&&/^[0-9]+$/.test(e)&&(e+="px"),e},mergeMargins:function(e){if(e.margin){vart=e.margin.split(" ");switch(t.length){case1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}deletee.margin}returne},createImageList:function(e,t){vara=n.getImageList(e);"string"==typeofa?u.send({url:a,success:function(e){t(JSON.parse(e))}}):"function"==typeofa?a(t):t(a)},waitLoadImage:function(e,t,a){functioni(){a.onload=a.onerror=null,e.selection&&(e.selection.select(a),e.nodeChanged())}a.onload=function(){t.width||t.height||!n.hasDimensions(e)||e.dom.setAttribs(a,{width:a.clientWidth,height:a.clientHeight}),i()},a.onerror=i},blobToDataUri:function(e){returnnews(function(t,n){vara=newl;a.onload=function(){t(a.result)},a.onerror=function(){n(l.error.message)},a.readAsDataURL(e)})}},d={makeTab:function(e,t){return{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox",onchange:function(e){returnfunction(t){vara=e.dom,i=t.control.rootControl;if(n.hasAdvTab(e)){varr=i.toJSON(),o=a.parseStyle(r.style);i.find("#vspace").value(""),i.find("#hspace").value("