2 lines
15 KiB
JavaScript
2 lines
15 KiB
JavaScript
|
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e[f]=d(a[f]);b.apply(null,e)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("5",tinymce.util.Tools.resolve),g("1",["5"],function(a){return a("tinymce.PluginManager")}),h("8",Math),h("9",RegExp),g("7",["5"],function(a){return a("tinymce.util.Tools")}),g("a",[],function(){var a=function(a){return a.settings.image_dimensions!==!1},b=function(a){return a.settings.image_advtab===!0},c=function(a){return a.getParam("image_prepend_url","")},d=function(a){return a.getParam("image_class_list")},e=function(a){return a.settings.image_description!==!1},f=function(a){return a.settings.image_title===!0},g=function(a){return a.settings.image_caption===!0},h=function(a){return a.getParam("image_list",!1)},i=function(a){return a.getParam("images_upload_url",!1)},j=function(a){return a.getParam("images_upload_handler",!1)},k=function(a){return a.getParam("images_upload_url")},l=function(a){return a.getParam("images_upload_handler")},m=function(a){return a.getParam("images_upload_base_path")},n=function(a){return a.getParam("images_upload_credentials")};return{hasDimensions:a,hasAdvTab:b,getPrependUrl:c,getClassList:d,hasDescription:e,hasImageTitle:f,hasImageCaption:g,getImageList:h,hasUploadUrl:i,hasUploadHandler:j,getUploadUrl:k,getUploadHandler:l,getUploadBasePath:m,getUploadCredentials:n}}),h("g",document),g("r",[],function(){var a="undefined"!=typeof window?window:Function("return this;")();return a}),g("q",["r"],function(a){var b=function(b,c){for(var d=void 0!==c?c:a,e=0;e<b.length&&void 0!==d&&null!==d;++e)d=d[b[e]];return d},c=function(a,c){var d=a.split(".");return b(d,c)},d=function(a,b){return void 0!==a[b]&&null!==a[b]||(a[b]={}),a[b]},e=function(b,c){for(var e=void 0!==c?c:a,f=0;f<b.length;++f)e=d(e,b[f]);return e},f=function(a,b){var c=a.split(".");return e(c,b)};return{path:b,resolve:c,forge:e,namespace:f}}),g("n",["q"],function(a){var b=function(b,c){return a.resolve(b,c)},c=function(a,c){var d=b(a,c);if(void 0===d)throw a+" not available on this browser";return d};return{getOrDie:c}}),g("h",["n"],function(a){return function(){var b=a.getOrDie("FileReader");return new b}}),g("i",["5"],function(a){return a("tinymce.util.Promise")}),g("j",["5"],function(a){return a("tinymce.util.XHR")}),g("b",["8","g","h","i","7","j","a"],function(a,b,c,d,e,f,g){var h=function(b,c){return a.max(parseInt(b,10),parseInt(c,10))},i=function(a,c){function d(a,b){e.parentNode&&e.parentNode.removeChild(e),c({width:a,height:b})}var e=b.createElement("img");e.onload=function(){var a=h(e.width,e.clientWidth),b=h(e.height,e.clientHeight);d(a,b)},e.onerror=function(){d()};var f=e.style;f.visibility="hidden",f.position="fixed",f.bottom=f.left=0,f.width=f.height="auto",b.body.appendChild(e),e.src=a},j=function(a,b,c){function d(a,c){return c=c||[],e.each(a,function(a){var e={text:a.text||a.title};a.menu?e.menu=d(a.menu):(e.value=a.value,b(e)),c.push(e)}),c}return d(a,c||[])},k=function(a){return a&&(a=a.replace(/px$/,"")),a},l=function(a){return a.length>0&&/^[0-9]+$/.test(a)&&(a+="px"),a},m=function(a){if(a.margin){var b=a.margin.split(" ");switch(b.length){case 1: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;case 2: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];b
|