var Zm=M.U(M,"AdfDhtmlInlineFramePeer");v("AdfDhtmlInlineFramePeer",Zm);Zm.m=function(){var a=[];a.Uua=p;a.Id=k;this.EX=a;M.hb(this,AdfRichInlineFrame.SOURCE);this.bLa="inlineFrameLoad"};v("AdfDhtmlInlineFramePeer.InitSubclass",Zm.m);
Zm.prototype.q=function(a,b){Zm.f.q.call(this,a,b);F.c.jD(a);var d=this.Tq(b),e=d.getAttribute("_src");if(e!=n){F.c.hd(p,p,l,"GET request sent for iFrame. Source is: ",e);var f=w.b,g=f.G()==w.Fc;!g||g&&535.19<=f.nb()?(d.setAttribute("src",e),d.removeAttribute("_src")):Zm.Z_a(d)}};z.a("AdfDhtmlInlineFramePeer.prototype.InitDomElement",{q:Zm.prototype.q});
Zm.prototype.at=function(){var a=this.Tq();if(a){D.i.fine("AdfDhtmlInlineFramePeer.GetReadyState: Frame dom is present");try{var b=a.contentWindow;if("complete"===b.document.readyState){D.i.fine("AdfDhtmlInlineFramePeer.GetReadyState: ","Determine inner document is ADF or not");var d=b.ge;if(d){var e=d.c;if(e&&e.Gy&&e.Gy())return D.i.fine("AdfDhtmlInlineFramePeer.GetReadyState: inner ADF page ready"),J.mt;D.i.fine("AdfDhtmlInlineFramePeer.GetReadyState: inner ADF page not ready");return J.Wz}D.i.fine("AdfDhtmlInlineFramePeer.GetReadyState: Non ADF page ready");
return J.mt}D.i.fine("AdfDhtmlInlineFramePeer.GetReadyState: inner document not yet ready");return J.Wz}catch(f){return D.i.fine("AdfDhtmlInlineFramePeer.GetReadyState: Security exception."," Document from different domain, nothing more to do"),J.mt}}D.i.fine("AdfDhtmlInlineFramePeer.GetReadyState: inlineFrame's dom is not ready");return J.Wz};z.a("AdfDhtmlInlineFramePeer.prototype.GetReadyState",{at:Zm.prototype.at});
Zm.Z_a=function(a){var b=w.b,d=a.getAttribute("_src"),e=H.hc(a);H.setVisible(a,p);a.removeAttribute("_src");a.removeAttribute("src");var f=b.cloneNode(a);a.onload="void(0);";b.gc(a);a.parentNode.replaceChild(f,a);f.setAttribute("src",d);b.wa(f);H.setVisible(f,e)};Zm.prototype.yK=function(a,b,d){a=b;"IFRAME"!=a.tagName&&(a=H.ca(b));if(!a||"IFRAME"!=a.tagName)return p;a.src=d;return l};z.a("AdfDhtmlInlineFramePeer.prototype.ComponentSourceChanged",{yK:Zm.prototype.yK});
Zm.prototype.Za=function(a,b){Zm.f.Za.call(this,a,b);var d=b;"IFRAME"!=d.tagName&&(d=H.ca(b));"preferred"===a.getSizing()&&"1"===d.getAttribute("_adfLoaded")&&Zm.Tya(d)};z.a("AdfDhtmlInlineFramePeer.prototype.BindToComponent",{Za:Zm.prototype.Za});
Zm.prototype.Z=function(a){var b=a.getSizing(),d=F.c;d.Zy(a);"preferred"===b&&(b=Zm.EX,ya.Of(b,a.e()),0==b.length&&(d.R().clearInterval(b.Id),b.Id=k));w.b.G()==w.aa&&(this.bind(a),d=this.Tq(),H.setVisible(d,p),d.setAttribute("onload","void(0)"),d.setAttribute("src","about:blank"));Zm.f.Z.call(this,a)};z.a("AdfDhtmlInlineFramePeer.prototype.ComponentRemoved",{Z:Zm.prototype.Z});
Zm.prototype.ym=function(a,b,d){a=this.h();"IFRAME"!=a.tagName&&(a=H.ca(a));a.scrollIntoView();var e=a.contentWindow.document,f=n;d!=n&&(f=e.getElementById(d))&&f.scrollIntoView();b&&(f?O.ra(f):O.ra(a))};z.a("AdfDhtmlInlineFramePeer.prototype.ScrollIntoView",{ym:Zm.prototype.ym});
Zm.JYa=function(a){F.c.hd(p,p,p,"iFrame load handler called.");var b=w.b,d=F.c;b.G()==w.aa?(a||(a=d.R().event),a=b.ne(a)):b.G()==w.Fc&&(a=b.ne(a));b=b.T(a);b==n&&(b=a.currentTarget);"1"===b.getAttribute("_adfLoaded")&&F.c.hd(p,p,l,"GET response received for iFrame. Source is: ",b.getAttribute("src"));var e=b.getAttribute("id"),f=e.indexOf("::f");-1!=f&&f==e.length-3&&(e=b.parentNode.getAttribute("id"));B.s(e);(d=d.j(e))?(Zm.R_a(b,e),(new ja(d,Zm.bLa,a)).v(l),"preferred"===d.getSizing()?Zm.Yaa(b)?
"1"===b.getAttribute("_adfLoaded")?(b.style.minWidth="0px",b.style.minHeight="0px",F.c.hd(p,p,p,"Immediately resizing iFrame."),Zm.Yca(b),F.c.hd(l,p,l,"Response processig done for iFrame. Source is: ",b.getAttribute("src"))):(F.c.hd(p,p,p,"Registering iFrame for resizing."),Zm.Tya(b)):F.c.hd(l,p,l,"Response processig done for iFrame. Source is: ",b.getAttribute("src")):F.c.hd(l,p,l,"Response processig done for iFrame. Source is: ",b.getAttribute("src"))):b.setAttribute("_adfLoaded","1")};
Zm.xQa=function(a){a.target.contentWindow.postMessage("_adfShowBody","*");try{Zm.JYa(a)}catch(b){D.i.zf(b,"inlineFrame load handler")}};v("AdfDhtmlInlineFramePeer.__iframeLoadHandler",Zm.xQa);Zm.R_a=function(a,b){a.getAttribute("_src")==n&&(H.ta(a,"p_AFFlow")?(H.F(a,"p_AFBusy"),D.i.fine("Removed busy from iframe: ",b)):(H.F(a.parentNode,"p_AFBusy"),D.i.fine("Removed busy from iframe's parentNode: ",b)))};
Zm.Tya=function(a){B.p(a);if(Zm.Yaa(a)){var b=Zm.EX,d=a.id;-1<ya.indexOf(b,d)&&b.push(d);Zm.Yca(a);F.c.hd(l,p,l,"Response processig done for iFrame. Source is: ",a.getAttribute("src"));1==b.length&&(b.Id=F.c.R().setInterval(Zm.Cxa,1E3))}};
Zm.Yaa=function(a){try{return w.b.aj(a.contentWindow),l}catch(b){return D.i.ee(b,"Error sizing iframe. This could occur if the iframe's sizing is set to preferred and the iframe's source is not from the same domain as the page. iframe id: "+a.id+", iframe source: "+a.src+", page location: "+window.location+"."),p}};
Zm.Yca=function(a){if(!Zm.Yaa(a))return p;var b=p,d=F.c.u();if(H.ta(a,d.getStyleClass("AFStretchWidth"))||H.ta(a,d.getStyleClass("AFAuxiliaryStretchWidth")))b=l;var e=w.b,f=a.contentWindow,d=0;b||(d=e.aj(f)-e.fs(f));f=e.Tk(f)-e.es(f);b=p;e=a.style;0<d&&(e.minWidth=a.offsetWidth+d+"px",b=l);var d=Zm.EX,g=a.id;0<f?(e.minHeight=a.offsetHeight+f+1+"px",b=l,d[g]=a.clientWidth):(d=d[g],d!==k&&a.clientWidth>d&&(e.minHeight="0px",b=l));return b};
Zm.Cxa=function(){var a=Zm.EX;if(0!=a.length){for(var b=p,d=document,e=a.length,f=Zm.Yca,g=0;g<e;g++)var h=d.getElementById(a[g]),b=b|f(h);b^a.Uua&&(d=F.c.R(),a.Id!==k&&d.clearInterval(a.Id),a.Id=d.setInterval(Zm.Cxa,b?100:1E3),a.Uua=b)}};Zm.prototype.Tq=function(a){a=a?a:this.h();"IFRAME"!=a.tagName&&(a=H.ca(a));B.p(a,"IFRAME");return a};z.a("AdfDhtmlInlineFramePeer.prototype.__getIframe",{Tq:Zm.prototype.Tq});