11 lines
17 KiB
JavaScript
11 lines
17 KiB
JavaScript
|
/**
|
||
|
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
|
||
|
* Licensed under the LGPL or a commercial license.
|
||
|
* For LGPL see License.txt in the project root for license information.
|
||
|
* For commercial licenses see https://www.tiny.cloud/
|
||
|
*
|
||
|
* Version: 5.0.4 (2019-04-23)
|
||
|
*/
|
||
|
|
||
|
!function(){"use strict";var a,e,t,r,n,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(t){return function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&Array.prototype.isPrototypeOf(e)?"array":"object"===t&&String.prototype.isPrototypeOf(e)?"string":t}(e)===t}},v=o("string"),c=o("function"),u=Object.prototype.hasOwnProperty,b=(a=function(e,t){return t},function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var r={},n=0;n<e.length;n++){var i=e[n];for(var o in i)u.call(i,o)&&(r[o]=a(r[o],i[o]))}return r}),s=function(e){return function(){return e}},l=s(!1),m=s(!0),d=l,h=m,f=function(){return p},p=(n={fold:function(e,t){return e()},is:d,isSome:d,isNone:h,getOr:r=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:r,orThunk:t,map:f,ap:f,each:function(){},bind:f,flatten:f,exists:d,forall:h,filter:f,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:s("none()")},Object.freeze&&Object.freeze(n),n),g=function(r){var e=function(){return r},t=function(){return i},n=function(e){return e(r)},i={fold:function(e,t){return t(r)},is:function(e){return r===e},isSome:h,isNone:d,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return g(e(r))},ap:function(e){return e.fold(f,function(e){return g(e(r))})},each:function(e){e(r)},bind:n,flatten:e,exists:n,forall:n,filter:function(e){return e(r)?i:p},equals:function(e){return e.is(r)},equals_:function(e,t){return e.fold(d,function(e){return t(r,e)})},toArray:function(){return[r]},toString:function(){return"some("+r+")"}};return i},w=f,y=function(e){return null===e||e===undefined?p:g(e)},x=Object.hasOwnProperty,j=function(e,t){return O(e,t)?y(e[t]):w()},O=function(e,t){return x.call(e,t)},A=Array.prototype.push,_=(Array.prototype.slice,c(Array.from)&&Array.from,tinymce.util.Tools.resolve("tinymce.util.Tools")),C=function(e){return e.getParam("media_scripts")},M=function(e){return e.getParam("audio_template_callback")},F=function(e){return e.getParam("video_template_callback")},P=function(e){return e.getParam("media_live_embeds",!0)},S=function(e){return e.getParam("media_filter_html",!0)},k=function(e){return e.getParam("media_url_resolver")},T=function(e){return e.getParam("media_alt_source",!0)},$=function(e){return e.getParam("media_poster",!0)},z=function(e){return e.getParam("media_dimensions",!0)},D=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),N=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),E=function(e,t){if(e)for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r].filter))return e[r]},U=function(t){return function(e){return e?e.style[t].replace(/px$/,""):""}},R=function(n){return function(e,t){var r;e&&(e.style[n]=/^[0-9.]+$/.test(r=t)?r+"px":r)}},W={getMaxWidth:U("maxWidth"),getMaxHeight:U("maxHeight"),setMaxWidth:R("maxWidth"),setMaxHeight:R("maxHeight")},H=N.DOM,L=function(e){return H.getAttrib(e,"data-ephox-embed-iri")},I=function(e,t){return c=t,u=H.createFragment(c),""!==L(u.firstChild)?(o=t,a=H.createFragment(o).firstChild,{type:"ephox-embed-iri",source1:L(a),source2:"",poster:"",width:W.getMaxWidth(a),height:W.getMaxHeight(a)}):(n=e,r=t,D({validate:(i={},!1),allow_conditional_comments:!0,start:function(e,t){if(i.source1||"param"!==e||(i.source1=t.map.movie),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(i.type||(i.type=e),i=_.extend(t.map,i)),"script"===e){var r=E(n,t.map.src);if(!r)return;i={type:"script",source1:t.map.src,width:r.width,height:r.height}}"source"===e&&(i.source1?i.source2||(i.source2=t.map.src):i.source1=t.map.src),"img"!==e||i.poster||(i.poster=t.map.src)}}).parse(r),i.source1=i.source1||i.src||i.data,i.source2=i.source2||"",i.poster=i.poster||"",i);var n,r,i,o,a,c,u},q=tinymce.util.Tools.resolve("tinymce.util.Promise"),B=function(e){var t={mp3:"audio
|