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.12 (2019-07-18)
|
||
|
*/
|
||
|
|
||
|
!function(){"use strict";var e,t,r,n,a,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=function(e){return function(){return e}},u=o(!1),s=o(!0),l=u,m=s,d=function(){return f},f=(n={fold:function(e,t){return e()},is:l,isSome:l,isNone:m,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:d,ap:d,each:function(){},bind:d,flatten:d,exists:l,forall:m,filter:d,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:o("none()")},Object.freeze&&Object.freeze(n),n),h=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:m,isNone:l,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return h(e(r))},ap:function(e){return e.fold(d,function(e){return h(e(r))})},each:function(e){e(r)},bind:n,flatten:e,exists:n,forall:n,filter:function(e){return e(r)?i:f},equals:function(e){return e.is(r)},equals_:function(e,t){return e.fold(l,function(e){return t(r,e)})},toArray:function(){return[r]},toString:function(){return"some("+r+")"}};return i},p=d,g=function(e){return null===e||e===undefined?f:h(e)},v=function(t){return function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t}(e)===t}},w=v("string"),b=v("array"),y=v("function"),x=Array.prototype.slice,j=function(e,t){for(var r=0,n=e.length;r<n;r++){t(e[r],r,e)}},O=Array.prototype.push,A=(y(Array.from)&&Array.from,function(e){var t=e,r=function(){return t};return{get:r,set:function(e){t=e},clone:function(){return A(r())}}}),S=Object.prototype.hasOwnProperty,_=(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)S.call(i,o)&&(r[o]=a(r[o],i[o]))}return r}),C=Object.hasOwnProperty,M=function(e,t){return F(e,t)?g(e[t]):p()},F=function(e,t){return C.call(e,t)},P=function(e){return e.getParam("media_scripts")},k=function(e){return e.getParam("audio_template_callback")},T=function(e){return e.getParam("video_template_callback")},$=function(e){return e.getParam("media_live_embeds",!0)},z=function(e){return e.getParam("media_filter_html",!0)},D=function(e){return e.getParam("media_url_resolver")},E=function(e){return e.getParam("media_alt_source",!0)},N=function(e){return e.getParam("media_poster",!0)},U=function(e){return e.getParam("media_dimensions",!0)},R=tinymce.util.Tools.resolve("tinymce.util.Tools"),L=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),W=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),H=function(t){return function(e){return e?e.style[t].replace(/px$/,""):""}},I=function(n){return function(e,t){var r;e&&(e.style[n]=/^[0-9.]+$/.test(r=t)?r+"px":r)}},q={getMaxWidth:H("maxWidth"),getMaxHeight:H("maxHeight"),setMaxWidth:I("maxWidth"),setMaxHeight:I("maxHeight")},B=function(e,t){if(e)for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r].filter))return e[r]},G=W.DOM,J=function(e){return G.getAttrib(e,"data-ephox-embed-iri")},K=function(e,t){return c=t,u=G.createFragment(c),""!==J(u.firstChild)?(o=t,a=G.createFragment(o).firstChild,{type:"ephox-embed-iri",source1:J(a),source2:"",poster:"",width:q.getMaxWidth(a),height:q.getMaxHeight(a)}):(n=e,r=t,L({validate:!(i={}),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
|