!function(){"use strict";functione(n){returnfunction(e){returnr=typeof(t=e),(null===t?"null":"object"==r&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":r)===n;vart,r}}functions(e){returnnull!=e}functiona(e){returnfunction(){returne}}functiont(e){returne}functionr(){returnd}varn=tinymce.util.Tools.resolve("tinymce.PluginManager"),p=function(){return(p=Object.assign||function(e){for(vart,r=1,n=arguments.length;r<n;r++)for(varoint=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);returne}).apply(this,arguments)},i=e("string"),u=e("object"),l=e("array"),c=a(!1),m=a(!0),d={fold:function(e,t){returne()},isSome:c,isNone:m,getOr:t,getOrThunk:o,getOrDie:function(e){thrownewError(e||"error: getOrDie called on none.")},getOrNull:a(null),getOrUndefined:a(void0),or:t,orThunk:o,map:r,each:function(){},bind:r,exists:c,forall:m,filter:function(){returnd},toArray:function(){return[]},toString:a("none()")};functiono(e){returne()}functionh(e,t){for(varr=0,n=e.length;r<n;r++)t(e[r],r)}functionf(e){vart=e;return{get:function(){returnt},set:function(e){t=e}}}functiong(e,t){returnH(e,t)?B.from(e[t]):B.none()}functionv(e){returne.getParam("media_scripts")}functionb(e,t){if(e)for(varr=0;r<e.length;r++)if(-1!==t.indexOf(e[r].filter))returne[r]}functionw(e){returne.replace(/px$/,"")}functiony(i,e){varc=f(!1),s={};returnQ({validate:!1,allow_conditional_comments:!0,start:function(e,t){if(!c.get())if(H(t.map,"data-ephox-embed-iri"))c.set(!0),a=(o=(n=t).map.style)?V.parseStyle(o):{},s={type:"ephox-embed-iri",source:n.map["data-ephox-embed-iri"],altsource:"",poster:"",width:g(a,"max-width").map(w).getOr(""),height:g(a,"max-height").map(w).getOr("")};else{if(s.source||"param"!==e||(s.source=t.map.movie),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(s.type||(s.type=e),s=J.extend(t.map,s)),"script"===e){varr=b(i,t.map.src);if(!r)return;s={type:"script",source:t.map.src,width:String(r.width),height:String(r.height)}}"source"===e&&(s.source?s.altsource||(s.altsource=t.map.src):s.source=t.map.src),"img"!==e||s.poster||(s.poster=t.map.src)}varn,o,a}}).parse(e),s.source=s.source||s.src||s.data,s.altsource=s.altsource||"",s.poster=s.poster||"",s}functionx(e){return{mp3:"audio/mpeg",m4a:"audio/x-m4a",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"}[e.toLowerCase().split(".").pop()]||""}functionj(e){return/^[0-9.]+$/.test(e)?e+"px":e}functionO(a,e){!function(e){for(vart=G(e),r=0,n=t.length;r<n;r++){varo=t[r];!function(e,t){varr=""+e;if(a.map[t])for(varn=a.length;n--;){varo=a[n];o.name===t&&(r?(a.map[t]=r,o.value=r):(deletea.map[t],a.splice(n,1)))}elser&&(a.push({name:t,value:r}),a.map[t]=r)}(e[o],o)}}(e)}functionS(e,c,s){varu,l=Y(),m=f(!1),d=0;returnQ({validate:!1,allow_conditional_comments:!0,comment:function(e){l.comment(e)},cdata:function(e){l.cdata(e)},text:function(e,t){l.text(e,t)},start:function(e,t,r){if(!m.get())if(H(t.map,"data-ephox-embed-iri"))m.set(!0),n=c,(i=(a=(o=t).map.style)?Z.parseStyle(a):{})["max-width"]=j(n.width),i["max-height"]=j(n.height),O(o,{style:Z.serializeStyle(i)});else{switch(e){case"video":case"object":case"embed":case"img":case"iframe":void0!==c.height&&void0!==c.width&&O(t,{width:c.width,height:c.height})}if(s)switch(e){case"video":O(t,{poster:c.poster,src:""}),c.altsource&&O(t,{src:""});break;case"iframe":O(t,{src:c.source});break;case"source":if(d<2&&(O(t,{src:c[ee[d]],type:c[ee[d]+"mime"]}),!c[ee[d]]))return;d++;break;case"img":if(!c.poster)return;u=!0}}varn,o,a,i;l.start(e,t,r)},end:function(e){if(!m.get()){if("video"===e&&s)for(vart,r=0;r<2;r++)c[ee[r]]&&((t=[]).map={},d<=r&&(O(t,{src:c[ee[r]],type:c[ee[r]+"mime"]}),l.start("source",t,!0)));varn;c.poster&&"object"===e&&s&&!u&&((n=[]).map={},O(n,{src:c.poster,width:c.width,height:c.height}),l.start("img",n,!0))}l.end(e)}},X({})).parse(e),l.getContent()}function_(e,t){for(varr