class PndrDisplayFile{constructor(t,e,i,r,n,a,s,h){this._type=t,this._src=e,this._style=r,this._width=n,this._height=a,this._html=s||"",this._url=i,this._linkParam=h.linkParam||"link1",this._closeLinkParam=h.closeLinkParam||"closelink",this._playerSrc=h.playerSrc||"",this._layerAttr=h.layerAttr||"t"+Math.floor(100*Math.random()),this._flashVars=[],this._flashVars.push({key:this._linkParam,value:this._url}),this._flashVars.push({key:this._closeLinkParam,value:"javascript:(window.$_v_closeAction && window.$_v_closeAction())"}),this._id="$_v_bannerImage",this._allowScripts=h.allowScriptAccess||!1,this._cid=h.cid,this._closeBanner=h.closeClb||function(){},this._trusted=!!h.trusted,this._isStopper=!!h.isStopper,this._vnsturl=h.vnsturl}_get(){switch(this._type){case"img":return this._getImg();case"video":return this._getVideo();case"video_native":return this._getVideoNative();case"html":return this._isStopper?this._getHTMLDiv():this._getHTML();case"vinstant":return this._getVinstant();default:return console.error("No banner file type:",this._type),this._getHTML()}}_getImg(){var t=document.createElement("a"),e=document.createElement("img");return t.target="_blank",t.href=this._url,e.src=this._src,e.style.cssText="max-width: 100%;max-height:100%;"+this._style,e.width=this._width-1,e.height=this._height-1,e.id=this._id,t.appendChild(e),e.setAttribute(this._layerAttr,"1"),t.setAttribute(this._layerAttr,"1"),{file:e,main:t}}_getHTML(){var t=this,e=document.createElement("iframe");return e.scrolling="no",e.style.cssText="width:"+this._width+"px;height:"+this._height+"px;border:none;",e.setAttribute(this._layerAttr,"1"),{file:e,main:e,afterLoad:function(){var i=e.contentWindow||e.contentDocument&&e.contentDocument.parentWindow||e.document&&e.document.parentWindow;if(i)try{i.parent=i.top=i}catch(t){}e.contentDocument?e.contentDocument.write(t._html):e.contentWindow&&e.contentWindow.document.write(t._html)}}}_getVinstant(){var t=this,e=document.createElement("iframe");return e.scrolling="no",e.style.cssText="width:"+this._width+"px;height:"+this._height+"px;border:none;",e.setAttribute(this._layerAttr,"1"),{file:e,main:e,afterLoad:function(){var i=e.contentWindow||e.contentDocument&&e.contentDocument.parentWindow||e.document&&e.document.parentWindow;if(i)try{i.parent=i.top=i}catch(t){}var r=document.createElement("script");r.setAttribute("src",t._vnsturl),e.contentDocument?e.contentDocument.body.appendChild(r):e.contentWindow&&e.contentWindow.document.body.appendChild(r)}}}_getHTMLDiv(){var t=document.createElement("div");t.innerHTML=this._html;var e,i,r=t.getElementsByTagName("script"),n=[];for(e=0,i=r.length;e ';var e=t.childNodes[0];return e.setAttribute(this._layerAttr,"1"),{file:e,main:e}}_getVideoNative(){var t=document.createElement("a"),e=document.createElement("video"),i=document.createElement("source");return t.target="_blank",t.href=this._url,e.autoplay=!0,e.style.cssText=this._style+";width: "+this._width+";height: "+this._height+";",i.src=this._src,e.appendChild(i),t.appendChild(e),e.setAttribute(this._layerAttr,"1"),{file:e,main:t}}static get(t,e){return e.layerAttr=t.bannerLayerAttr,e.isStopper=t.isStopper,e.vnsturl=t.vnsturl||"",new PndrDisplayFile(t.bannerInfo.type,t.bannerInfo.src,t.url,e.style,t.width,t.height,t.text,e)._get()}}