!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={getOrDie:function(e,t){varn=r(e,t);if(n===undefined||null===n)throwe+" not available on this browser";returnn}};functionl(){returnnew(o.getOrDie("FileReader"))}vars=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))},d={getImageSize:function(e,t){varn=document.createElement("img");functiona(e,a){n.parentNode&&n.parentNode.removeChild(n),t({width:e,height:a})}n.onload=function(){a(c(n.width,n.clientWidth),c(n.height,n.clientHeight))},n.onerror=function(){a(0,0)};vari=n.style;i.visibility="hidden",i.position="fixed",i.bottom=i.left="0px",i.width=i.height="auto",document.body.appendChild(n),n.src=e},buildListItems:function(e,n,a){returnfunctioni(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}(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)})}},g={makeTab:function(e,t){return{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox",onchange:(a=e,function(e){vart=a.dom,i=e.control.rootControl;if(n.hasAdvTab(a)){varr=i.toJSON(),o=t.parseStyle(r.style);i.find("#vspace").value(""),i.find("#hspace").value(""),((o=d.mergeMargi