!function(){vare={},t=function(t){for(varn=e[t],i=n.deps,o=n.defn,a=i.length,s=newArray(a),l=0;l<a;++l)s[l]=r(i[l]);varu=o.apply(null,s);if(void0===u)throw"module ["+t+"] returned undefined";n.instance=u},n=function(t,n,r){if("string"!=typeoft)throw"module id must be a string";if(void0===n)throw"no dependencies for "+t;if(void0===r)throw"no definition function for "+t;e[t]={deps:n,defn:r,instance:void0}},r=function(n){varr=e[n];if(void0===r)throw"module ["+n+"] was undefined";returnvoid0===r.instance&&t(n),r.instance},i=function(e,t){for(varn=e.length,i=newArray(n),o=0;o<n;++o)i.push(r(e[o]));t.apply(null,t)},o={};o.bolt={module:{api:{define:n,require:i,demand:r}}};vara=n,s=function(e,t){a(e,[],function(){returnt})};s("1",tinymce.PluginManager),s("6",tinymce.util.Delay),s("e",tinymce.util.Tools),s("9",tinymce.html.SaxParser),s("a",tinymce.html.Schema),s("b",tinymce.dom.DOMUtils.DOM),a("h",[],function(){vare=function(e,t){if(e)for(varn=0;n<e.length;n++)if(t.indexOf(e[n].filter)!==-1)returne[n]};return{getVideoScriptMatch:e}}),a("c",[],function(){vare=function(e){returne.replace(/px$/,"")},t=function(e){return/^[0-9.]+$/.test(e)?e+"px":e},n=function(t){returnfunction(n){returnn?e(n.style[t]):""}},r=function(e){returnfunction(n,r){n&&(n.style[e]=t(r))}};return{getMaxWidth:n("maxWidth"),getMaxHeight:n("maxHeight"),setMaxWidth:r("maxWidth"),setMaxHeight:r("maxHeight")}}),a("7",["e","9","a","b","h","c"],function(e,t,n,r,i,o){vara=function(e){returnr.getAttrib(e,"data-ephox-embed-iri")},s=function(e){vart=r.createFragment(e);return""!==a(t.firstChild)},l=function(n,r){varo={};returnnewt({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(t,r){if(o.source1||"param"!==t||(o.source1=r.map.movie),"iframe"!==t&&"object"!==t&&"embed"!==t&&"video"!==t&&"audio"!==t||(o.type||(o.type=t),o=e.extend(r.map,o)),"script"===t){vara=i.getVideoScriptMatch(n,r.map.src);if(!a)return;o={type:"script",source1:r.map.src,width:a.width,height:a.height}}"source"===t&&(o.source1?o.source2||(o.source2=r.map.src):o.source1=r.map.src),"img"!==t||o.poster||(o.poster=r.map.src)}}).parse(r),o.source1=o.source1||o.src||o.data,o.source2=o.source2||"",o.poster=o.poster||"",o},u=function(e){vart=r.createFragment(e),n=t.firstChild;return{type:"ephox-embed-iri",source1:a(n),source2:"",poster:"",width:o.getMaxWidth(n),height:o.getMaxHeight(n)}},c=function(e,t){returns(t)?u(t):l(e,t)};return{htmlToData:c}}),s("8",tinymce.html.Writer),a("4",["8","9","a","b","c"],function(e,t,n,r,i){varo=function(e,t){varn,r,i,o;for(nint)if(i=""+t[n],e.map[n])for(r=e.length;r--;)o=e[r],o.name===n&&(i?(e.map[n]=i,o.value=i):(deletee.map[n],e.splice(r,1)));elsei&&(e.push({name:n,value:i}),e.map[n]=i)},a=function(n){varr=newe,i=newt(r);returni.parse(n),r.getContent()},s=function(r,i,a){vars,l=newe,u=0;returnnewt({validate:!1,allow_conditional_comments:!0,special:"script,noscript",comment:function(e){l.comment(e)},cdata:function(e){l.cdata(e)},text:function(e,t){l.text(e,t)},start:function(e,t,n){switch(e){case"video":case"object":case"embed":case"img":case"iframe":o(t,{width:i.width,height:i.height})}if(a)switch(e){case"video":o(t,{poster:i.poster,src:""}),i.source2&&o(t,{src:""});break;case"iframe":o(t,{src:i.source1});break;case"source":if(u++,u<=2&&(o(t,{src:i["source"+u],type:i["source"+u+"mime"]}),!i["source"+u]))return;break;case"img":if(!i.poster)return;s=!0}l.start(e,t,n)},end:function(e){if("video"===e&&a)for(vart=1;t<=2;t++)if(i["source"+t]){varn=[];n.map={},u<t&&(o(n,{src:i["source"+t],type:i["source"+t+"mime"]}),l.start("source",n,!0))}if(i.poster&&"object"===e&&a&&!s){varr=[];r.map={},o(r,{src:i.poster,width:i.width,height:i.height}),l.start("img",r,!0)}l.end(e)}},newn({})).parse(r),l.getContent()},l=function(e){vart=r.createFragment(e);return""!==r.getAttrib(t.firstChild,"data-ephox-embed-iri")},u=function(e,t){varn=r.createFragment(e),o=n.firstChild;returni.setMaxWidth(o,t.width),i.setMaxHeight(o,t.height),a(o.outerHTML)},c=function(e,t,n){returnl(e)?u(e,t):s(e,t,n)};return{updateHtml:c