function Rp(a,b,d){this.Init(a,b,d)}v("AdfScriptLoadingService",Rp);z.l(Rp);
Rp.da=function(){this.i4="sameOrigin";v("AdfScriptLoadingService.POLICY_SAME_ORIGIN",Rp.i4);this.h4="crossOrigin";v("AdfScriptLoadingService.POLICY_CROSS_ORIGIN",Rp.h4);this.Pla="auto";v("AdfScriptLoadingService.POLICY_AUTO",Rp.Pla);this.FE=0;v("AdfScriptLoadingService.METHOD_ANY",Rp.FE);this.it=1;v("AdfScriptLoadingService.METHOD_SYNCHRONOUS",Rp.it);this.zla=2;v("AdfScriptLoadingService.METHOD_ASYNCHRONOUS",Rp.zla);this.Pz=3;v("AdfScriptLoadingService.METHOD_BACKGROUND",Rp.Pz);this.t4=0;v("AdfScriptLoadingService.STATUS_LOADING",
Rp.t4);this.lma=1;v("AdfScriptLoadingService.STATUS_LOADED",Rp.lma)};v("AdfScriptLoadingService.InitClass",Rp.da);
Rp.prototype.Init=function(a,b,d){Rp.f.Init.call(this);B.assert(d==n||d==Rp.i4||d==Rp.h4||d==Rp.Pla);this.RN=a;this.ON=b;this.tya=d;this.$G=[];this.Cba=n;this.kY=p;this.zba=[];this.n1a=this.o(this.hAa);this.bSa=this.o(this.cSa);B.assert(this.ON!=n);a=this.ON.location.hostname;B.assert(a!=n);this.q0a=RegExp("^(http|https):([\\w-]+\\.)?"+a+"[:/]","i");if(!this.Bba){a={};b=b.getElementsByTagName("script");for(d=0;d<b.length;d++){var e=Rp.Mda(b[d].getAttribute("src"));e&&(a[e]=l)}this.Bba=a}};
z.a("AdfScriptLoadingService.prototype.Init",{Init:Rp.prototype.Init});Rp.prototype.wu=function(a,b){var d=Rp.Mda(a);this.Bba[d]||(d=Rp.Mda(a),this.Bba[d]=l,d=this.Y2(a,b),XA(this,d))};z.a("AdfScriptLoadingService.prototype.addLibraryScript",{wu:Rp.prototype.wu});Rp.prototype.Bea=function(a){a=new WA(this.RN,a);XA(this,a)};z.a("AdfScriptLoadingService.prototype.addInlineScript",{Bea:Rp.prototype.Bea});Rp.prototype.vea=function(a,b,d){a=new TA(a,b,d);XA(this,a)};
z.a("AdfScriptLoadingService.prototype.addCallbackScript",{vea:Rp.prototype.vea});Rp.prototype.Cea=function(a){B.Da(a);this.zba.push(a)};z.a("AdfScriptLoadingService.prototype.addLoadListener",{Cea:Rp.prototype.Cea});Rp.prototype.JDa=function(a){var b=this.zba;a=b.indexOf(a);-1<a&&b.splice(a,1)};z.a("AdfScriptLoadingService.prototype.removeLoadListener",{JDa:Rp.prototype.JDa});
Rp.prototype.Y2=function(a,b){var d=n;return d=this.tya==Rp.i4||(this.tya==Rp.h4?0:"/"==a.charAt(0)||this.q0a.test(a))||b==Rp.it?new YA(this.Nc(),a,b):new VA(this.Nc(),this.Us(),a,b)};z.a("AdfScriptLoadingService.prototype.CreateLibraryLoadableScript",{Y2:Rp.prototype.Y2});Rp.prototype.Nc=r("RN");z.a("AdfScriptLoadingService.prototype.GetDomWindow",{Nc:Rp.prototype.Nc});Rp.prototype.Us=r("ON");z.a("AdfScriptLoadingService.prototype.GetDomDocument",{Us:Rp.prototype.Us});
function XA(a,b){var d=a.$G.length;if(0<d&&b.xi()!==Rp.Pz){for(var e=p,f=0;f<d;++f)if(a.$G[f].xi()===Rp.Pz){a.$G.splice(f,0,b);e=l;break}e||a.$G.push(b)}else a.$G.push(b);ZA(a)}function ZA(a){if(!a.Cba){for(var b=a.$G;0<b.length;){var d=a.Cba=b.shift(),e=d.xi();if(e===Rp.it)d.load(a.n1a);else{e===Rp.Pz?nB(a):(b=a,b.kY||(oB(b,Rp.t4),b.kY=l));d.load(a.bSa);return}}nB(a)}}function nB(a){a.kY&&(a.kY=p,oB(a,Rp.lma))}function oB(a,b){for(var d=a.zba,e=0;e<d.length;e++)d[e](b)}
Rp.prototype.hAa=function(){this.Cba=n};Rp.prototype.cSa=function(){this.hAa();ZA(this)};Rp.Mda=function(a){return!a?n:a.replace(/;[^\?]*/,"")};