// Compiled with JSCompilerTask
// Turner XMP, Release Build, © 2008 Turner Broadcasting System, Inc. A Time Warner Company.  Version: 0.1.696.2070
// xmp_playlistapi, xmp_playlistapi_0_1_696_2070.js

xmp.i_$OH("xmp.playlistapi");xmp.$.$3H=function(aa,id,ba){xmp.i_$OU(arguments,[xmp.i_$QJ,xmp.i_$QK,xmp.i_$QK],"PlayableNodeType.ctor");if(!xmp.i_$OP(id)||!xmp.i_$OP(ba)){throw new xmp.util.internals.InvalidArgsError("PlayableNodeType requires non-empty 'id' and 'typeName'.");}
this.p_$DQ=ba;this.p_$5T=null;this.p_$1G=id;this.p_$DR=null;this.p_$DS=aa;this.p_$DT=null;};xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0050\u006C\u0061\u0079\u0061\u0062\u006C\u0065\u004E\u006F\u0064\u0065\u0054\u0079\u0070\u0065',xmp.$.$3H);xmp.$.$3H.i_$14S=function(ca){if(!xmp.$.$3H.p_$DU){var da=xmp.$.$1B.i_$P4().getGlobalContextNode();xmp.$.$3H.p_$DU=da.getNodeForPath('nodeTypeMap');}
var ea=xmp.$.$3H.p_$DU.getNodeForPath(ca);var fa=ea.getString('baseType','DEFAULT');return fa;};xmp.$.$3H.prototype.i_$TZ=function(){return this.p_$DQ;};xmp.$.$3H.prototype.i_$R7=function(){return this.p_$1G;};xmp.$.$3H.prototype.i_$14T=function(){return this.p_$DS;};xmp.$.$3H.prototype.i_$V8=function(ga,ha){return null;};xmp.$.$3H.prototype.i_$14U=function(){return 0;};xmp.$.$3H.prototype.i_$14V=function(){return this.p_$5T;};xmp.$.$3H.prototype.i_$14W=function(){return false;};xmp.$.$3H.prototype.i_$14X=function(){return false;};xmp.$.$3H.prototype.i_$U0=function(){var ia=xmp.$.$3H.i_$14S(this.i_$TZ());return ia==='Content';};xmp.$.$3H.prototype.i_$U1=function(){var ja=xmp.$.$3H.i_$14S(this.i_$TZ());return ja==='Ad';};xmp.$.$3H.prototype.i_$U2=function(){var ka=xmp.$.$3H.i_$14S(this.i_$TZ());return ka==='Promo';};xmp.$.$3H.prototype.i_$14Y=function(la){this.p_$5T=la;};xmp.$.$3H.prototype.i_$14Z=function(){};xmp.$.$3H.prototype.i_$150=function(ma){this.p_$DR=ma;};xmp.$.$3H.prototype.i_$151=function(){return this.p_$DR;};xmp.$.$3H.prototype.i_$152=function(na){this.p_$DT=na;};xmp.$.$3H.prototype.i_$153=function(){return this.p_$DT;};xmp.i_$OH("xmp.playlistapi.internals");xmp.$.$3I=function(oa,pa,qa){xmp.i_$OU(arguments,[xmp.i_$QK,xmp.i_$QJ,xmp.i_$QJ],"PatternDirective.ctor");if(!xmp.i_$OP(oa)){throw new xmp.util.internals.InvalidArgsError("Argument 'type' must be a non-empty string.");}
this.p_$72=oa;this.p_$3O=new xmp.$.$V(true);this.p_$3O.i_$UJ(pa);this.p_$DV=qa;};xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0069\u006E\u0074\u0065\u0072\u006E\u0061\u006C\u0073\u002E\u0050\u0061\u0074\u0074\u0065\u0072\u006E\u0044\u0069\u0072\u0065\u0063\u0074\u0069\u0076\u0065',xmp.$.$3I);xmp.$.$3I.prototype.i_$X4=function(){return this.p_$72;};xmp.$.$3I.prototype.i_$154=function(){return this.p_$DV;};xmp.$.$3I.prototype.i_$V8=function(ra,sa){return this.p_$3O.i_$U3(ra,sa);};xmp.$.$3I.prototype.i_$155=function(ta,ua,va){var wa=this.p_$DW(ta.i_$156(),ua,va);if(wa===null){xmp.$.$16.i_$S2('PatternDirective').info('Did not find named content node: '+va+', trying historical data.');wa=this.p_$DW(ta.i_$157(),ua,va);}
return wa;};xmp.$.$3I.prototype.p_$DW=function(xa,ya,za){xa.i_$Q6();var Aa=(za==='@Content');while(xa.i_$Q9()){var Ba=xa.i_$QB();if(!Ba.isValid()){continue;}
if(Ba.isContentType()&&Ba.i_$TY().i_$14V().i_$14X()){if(Aa){if(Ba.i_$UO().i_$158(ya.i_$UO(),true)){return Ba;}}
else{if(Ba.i_$TY().i_$14V().i_$R7()===za){var Ca=Ba.i_$UO().i_$14V();if(Ca.i_$158(ya.i_$UO(),true)){return Ba;}}}}}
return null;};xmp.i_$OH("xmp.playlistapi");xmp.$.$3J=function(Da,Ea,Fa,Ga){xmp.i_$OU(arguments,[xmp.i_$QJ,xmp.i_$QJ,xmp.i_$QJ,xmp.i_$QJ],"AdPatternPlayList.ctor");if(!Da||!Ea||!Fa){throw new xmp.util.internals.InvalidArgsError("One or more constructor arguments is null.");}
this.p_$DX=7;this.p_$DY=100;this.p_$DZ=50;this.p_$X=xmp.$.$16.i_$S2('AdPatternPlayList');this.p_$E0=false;this.p_$3O=new xmp.$.$V(true);this.p_$7M=Da;this.p_$E1=null;this.p_$E2=null;this.p_$E3={};this.p_$E4={};this.p_$E5=new xmp.$.$46();this.p_$E6=this.p_$E7();this.p_$E8=[];this.p_$E9=[];this.p_$EA=null;this.p_$EB=[];this.p_$EC=[];this.p_$ED=new xmp.$.$42(this);this.p_$EE=null;xmp.$.$K.i_$TW();this.p_$EE=xmp.$.$3R.i_$159(Ea,Ga);var Ha=new xmp.$.$3L(this.p_$EE);this.p_$3O.i_$UJ(Ha.i_$15A(Ea));this.p_$E1=Ha.i_$15B(Ea);this.p_$E2=Ha.i_$15C(Fa,null);this.p_$X.info('Constructed AdPatternPlayList');};xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0041\u0064\u0050\u0061\u0074\u0074\u0065\u0072\u006E\u0050\u006C\u0061\u0079\u004C\u0069\u0073\u0074',xmp.$.$3J);xmp.$.$3J.prototype.i_$V8=function(Ia,Ja){return this.p_$3O.i_$U3(Ia,Ja);};xmp.$.$3J.prototype.i_$15D=function(Ka){try{for(var i=0;i<Ka.length;i++){if(typeof Ka[i]!=='string'){throw new xmp.util.internals.InvalidArgsError("Argument 'contentMetaResourceIdArray' must be an array of strings.");}}
this.i_$15E();this.i_$15F();var La=new xmp.$.$3V(this,this.p_$EA,this.p_$E1,Ka,this.p_$7M);this.p_$E8=La.i_$15G();}
finally{this.i_$15H();}};xmp.$.$3J.prototype.i_$157=function(){var Ma=[];Ma=Ma.concat(this.p_$E9);Ma=Ma.concat(this.p_$E8);return(new xmp.$.$41(Ma));};xmp.$.$3J.prototype.i_$15I=function(){return this.p_$ED;};xmp.$.$3J.prototype.i_$15J=function(){var Na=[];var Oa={};for(var i=0;i<this.p_$E2.length;i++){var Pa=this.p_$E2[i].getId();if(!Oa[Pa]){Oa[Pa]=Pa;Na.push(Pa);}}
this.p_$EF(this.p_$E1,Na,Oa);return Na;};xmp.$.$3J.prototype.i_$15K=function(Qa){xmp.i_$OU(arguments,[xmp.i_$QJ],"AdPatternPlayList.i_loadRuleFactoryArray");if(!Qa){throw new xmp.util.internals.InvalidArgsError("Argument 'ruleFactoryArray' cannot be null.");}
this.p_$EG(Qa);if(this.p_$X.isDebugEnabled()){this.p_$X.debug('Loaded rule factories.');}};xmp.$.$3J.prototype.i_$15L=function(){return this.p_$EH();};xmp.$.$3J.prototype.i_$15M=function(){return this.p_$EI();};xmp.$.$3J.prototype.i_$15N=function(){return this.p_$EE;};xmp.$.$3J.prototype.p_$EJ=function(Ra){var Sa=this.p_$E4[Ra];if(typeof Sa==="undefined"){var Ta=this.p_$EK(Ra);try{Sa=Ta.i_$15O(Ra);}
catch(e){throw this.p_$EL(e,'RuleFactory.i_createRule');}
this.p_$E4[Ra]=Sa;}
return Sa;};xmp.$.$3J.prototype.p_$EG=function(Ua){for(var i=0;i<Ua.length;i++){var Va=Ua[i];var Wa=null;try{Wa=Va.i_$15P();}
catch(e){throw this.p_$EL(e,'RuleFactory.i_getCreatableRuleIds');}
for(var j=0;j<Wa.length;j++){var Xa=Wa[j];if(!Xa||Xa.length===0){throw new xmp.$.$3X("RuleFactory retured a rule ID that is null, undefined, or empty.");}
if(typeof this.p_$E3[Xa]!=="undefined"){throw new xmp.$.$3X("Rule "+Xa+" found in more than one factory.");}
this.p_$E3[Xa]=Va;}}
this.p_$EM();};xmp.$.$3J.prototype.i_$15Q=function(Ya,Za){this.p_$E3[Ya]=Za;};xmp.$.$3J.prototype.p_$EL=function(e,$a){var ab='Error occurred while invoking extension method: '+$a;this.p_$X.warn(ab,e);ab+=', Error data: ';ab+=xmp.i_$ON(e);return new xmp.$.$3X(ab);};xmp.$.$3J.prototype.p_$E7=function(){var bb=xmp.$.$1B.i_$P4().getContextNode();var cb=bb.getNodeForPath('BasePlayer');var db=cb.getInt('look ahead and behind count',this.p_$DX);if(db<this.p_$DX){db=this.p_$DX;}
else if(db>this.p_$DY){db=this.p_$DY;}
return db;};xmp.$.$3J.prototype.p_$EM=function(){this.p_$EN();this.p_$EO(this.p_$E1);};xmp.$.$3J.prototype.p_$EN=function(){for(var i=0;i<this.p_$E2.length;i++){var eb=this.p_$E2[i].getId();this.p_$EK(eb);}};xmp.$.$3J.prototype.p_$EO=function(fb){if(fb.i_$14W()){var gb=fb.i_$14U();for(var i=0;i<gb;i++){this.p_$EO(fb.i_$15R(i));}}
else{var hb=fb.i_$UI();for(var j=0;j<hb.length;j++){var ib=hb[j].getId();this.p_$EK(ib);}}};xmp.$.$3J.prototype.p_$EK=function(jb){var kb=this.p_$E3[jb];if(!kb){throw new xmp.$.$3X("No factory defined for rule: "+jb);}
return kb;};xmp.$.$3J.prototype.i_$15S=function(){var lb=null;while(this.p_$E8.length>0){var mb=this.p_$E8.shift();this.p_$E9.push(mb);if(this.p_$EP(mb)){this.p_$EQ(mb);lb=mb;break;}
else{this.p_$ER(mb);}}
if(lb!==null){this.p_$EA=lb;}
return lb;};xmp.$.$3J.prototype.p_$EP=function(nb){try{return this.p_$ES(nb);}
catch(e){var ob='Error occured running rules for node: '+xmp.$.$K.i_$UE(nb);ob+='\nNode will be treated AS IF A RULE FAILED, skipped.';this.p_$X.warn(ob,e);return false;}};xmp.$.$3J.prototype.p_$ES=function(pb){if(pb.i_$UQ()){if(this.p_$X.isDebugEnabled()){this.p_$X.debug('Node: '+pb.getBestId()+' IS AN EMPTY SLOT, FAILURE.');}
return false;}
var qb=this.p_$ET(pb);if(qb.length===0){if(this.p_$X.isDebugEnabled()){this.p_$X.debug('Node: '+pb.getBestId()+' HAS NO RULES, SUCCESS.');}
return true;}
this.p_$E5.i_$15T(pb);for(var i=0;i<qb.length;i++){var rb=qb[i];this.p_$E5.i_$15U(rb);var sb=this.p_$EJ(rb.getId());var tb=false;try{tb=sb.isPlayable(this.p_$E5);}
catch(e){throw this.p_$EL(e,'Rule.isPlayable for rule: '+this.p_$E5.getCurrentRuleContext().getId());}
if(!tb){if(this.p_$X.isDebugEnabled()){this.p_$X.debug('Node: '+pb.getBestId()+', Rule ID: '+rb.getId()+' FAILED.');}
return false;}
else{if(this.p_$X.isDebugEnabled()){this.p_$X.debug('Node: '+pb.getBestId()+', Rule ID: '+rb.getId()+' SUCCEEDED.');}}}
if(this.p_$X.isDebugEnabled()){this.p_$X.debug('Node: '+pb.getBestId()+' ALL RULES SUCCEEDED.');}
return true;};xmp.$.$3J.prototype.p_$EH=function(){var ub=[];for(var i=0;i<this.p_$E6;i++){if(i>=(this.p_$E8.length)){break;}
ub.push(this.p_$E8[i]);}
return ub;};xmp.$.$3J.prototype.p_$EI=function(){var vb=[];vb=vb.concat(this.p_$EB).reverse();return vb;};xmp.$.$3J.prototype.p_$ET=function(wb){var xb=this.p_$EU(wb.getNodeTypeName());xb=xb.concat(wb.i_$UH());return xb;};xmp.$.$3J.prototype.p_$EU=function(yb){var zb=[];for(var i=0;i<this.p_$E2.length;i++){var Ab=this.p_$E2[i];if(Ab.i_$15V(yb)){zb.push(Ab);}}
return zb;};xmp.$.$3J.prototype.p_$EQ=function(Bb){this.p_$EB.push(Bb);while(this.p_$EB.length>this.p_$E6){this.p_$ER(this.p_$EB.shift());}};xmp.$.$3J.prototype.p_$EV=function(){var Cb=new xmp.$.$K();Cb.i_$S5();return Cb;};xmp.$.$3J.prototype.p_$ER=function(Db){this.p_$EC.push(Db);while(this.p_$EC.length>this.p_$DZ){var Eb=this.p_$EC.shift();if(Eb){Eb.i_$TX();}}};xmp.$.$3J.prototype.i_$15W=function(){return this.p_$EV();};xmp.$.$3J.prototype.i_$15X=function(Fb){try{this.p_$7M.i_$15Y(Fb);}
catch(e){throw this.p_$EL(e,'PlayListListener.i_handleInitializePlayableNode');}};xmp.$.$3J.prototype.i_$15F=function(){this.p_$E0=true;};xmp.$.$3J.prototype.i_$15H=function(){this.p_$E0=false;};xmp.$.$3J.prototype.i_$15E=function(){if(this.p_$E0){throw new xmp.$.$3X("Cannot modify playlist while it is locked.");}};xmp.$.$3J.prototype.p_$EF=function(Gb,Hb,Ib){if(Gb.i_$14W()){var Jb=Gb.i_$14U();for(var i=0;i<Jb;i++){var Kb=Gb.i_$15R(i);this.p_$EF(Kb,Hb,Ib);}}
else{var Lb=Gb.i_$UI();for(var j=0;j<Lb.length;j++){var Mb=Lb[j].getId();if(!Ib[Mb]){Ib[Mb]=Mb;Hb.push(Mb);}}}};xmp.i_$OH("xmp.playlistapi");xmp.$.$3K=function(Nb,Ob){this.p_$7N=Nb;this.p_$EE=Ob;};xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0041\u0064\u0052\u0065\u0073\u006F\u0075\u0072\u0063\u0065\u004F\u0076\u0065\u0072\u0072\u0069\u0064\u0065\u0043\u006F\u006E\u0074\u0065\u0078\u0074',xmp.$.$3K);xmp.$.$3K.prototype.getNode=function(){return this.p_$7N;};xmp.$.$3K.prototype.addResource=function(Pb){this.p_$7N.i_$U9(Pb);};xmp.$.$3K.prototype.addNewResource=function(id,Qb,Rb,Sb){var Tb=new xmp.$.$44(id,Qb,Rb,Sb);this.p_$7N.i_$U9(Tb);};xmp.$.$3K.prototype.getResource=function(Ub){return this.p_$7N.getMetaResource(Ub);};xmp.$.$3K.prototype.copyMetaResourceBundleRefFrom=function(Vb){this.p_$7N.i_$UC(Vb.i_$UB());};xmp.$.$3K.prototype.copyMetaResourceBundleRefTo=function(Wb,Xb){Wb.i_$UC(this.p_$7N.i_$UB());if(Xb){Wb.i_$UA(Xb);}};xmp.$.$3K.prototype.expandString=function(Yb){return this.p_$EE.i_$15Z(Yb);};xmp.$.$3K.prototype.setNodeAssociatedResourceBundleTypes=function(Zb){this.p_$7N.i_$UA(Zb);};xmp.i_$OH("xmp.playlistapi.internals");xmp.$.$3L=function($b){xmp.i_$OU(arguments,[xmp.i_$QJ],"AdPatternBuilder.ctor");this.p_$X=xmp.$.$16.i_$S2('AdPatternBuilder');this.p_$EW=['Composite','ContentComposite'];this.p_$EX=null;this.p_$EE=$b;};xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0069\u006E\u0074\u0065\u0072\u006E\u0061\u006C\u0073\u002E\u0041\u0064\u0050\u0061\u0074\u0074\u0065\u0072\u006E\u0042\u0075\u0069\u006C\u0064\u0065\u0072',xmp.$.$3L);xmp.$.$3L.prototype.i_$15B=function(ac){try{this.p_$EX=ac.patternMap;if(!this.p_$EY(ac.root)){throw new xmp.$.$3X("Root of ad pattern must have type of one of the following: "+this.p_$EW.join(', '));}
var bc=this.p_$EZ(ac.root,true);ac=null;return bc;}
catch(e){e.stack=null;var cc=new xmp.$.$4Q(e,'badAdPattern','AdPatternPlayList',[{label:'details',text:xmp.i_$ON(e)}]);this.p_$X.warn(cc.message,cc);var dc="Error building Ad Pattern with memento data";throw new xmp.$.$3X(dc);}};xmp.$.$3L.prototype.p_$EY=function(ec){for(var i=0;i<this.p_$EW.length;i++){if(ec.type===this.p_$EW[i]){return true;}}
return false;};xmp.$.$3L.prototype.p_$EZ=function(fc,gc){var hc=null;if(this.p_$EY(fc)){var ic=(typeof fc.repeat==="number")?fc.repeat:1;var jc=xmp.$.$3.i_$PW('xmp.playlistapi.internals.'+fc.type+'PlayableNodeType');hc=jc.i_$Q3([fc,(gc?'/':this.p_$F0(fc)),fc.type,fc.pattern,ic]);if(hc.i_$160()){hc.i_$161(false);}
else{var kc=this.p_$EX[hc.i_$162()];this.p_$F1(hc,kc);}}
else{hc=new xmp.$.$3Z(fc,this.p_$F0(fc),fc.type,this.i_$15C(fc.rules,fc.type),this.i_$15A(fc));this.p_$F2(fc,hc);this.p_$F3(fc,hc);this.p_$F4(fc,hc);}
hc.i_$14Z();return hc;};xmp.$.$3L.prototype.p_$F0=function(lc){return(typeof(lc.id)==='string')?lc.id:lc.type;};xmp.$.$3L.prototype.p_$F3=function(mc,nc){var oc=xmp.$.$3S.i_$Q7(mc);nc.i_$150(oc);};xmp.$.$3L.prototype.p_$F4=function(pc,qc){var rc=xmp.$.$3Y.i_$Q7(pc);qc.i_$152(rc);};xmp.$.$3L.prototype.p_$F2=function(sc,tc){if(typeof sc.resources==='object'){for(var i=0;i<sc.resources.length;i++){var uc=sc.resources[i];tc.i_$U9(this.i_$163(uc));}}};xmp.$.$3L.prototype.p_$F1=function(vc,wc){for(var i=0;i<wc.length;i++){var xc=this.p_$EZ(wc[i],false);vc.i_$164(xc);}};xmp.$.$3L.prototype.i_$165=function(yc,zc){this.p_$F1(yc,zc);yc.i_$161(true);yc.i_$14Z();};xmp.$.$3L.prototype.i_$15C=function(Ac,Bc){var Cc=[];if(typeof Ac==="object"){for(var i=0;i<Ac.length;i++){Cc.push(this.p_$F5(Ac[i],Bc));}}
return Cc;};xmp.$.$3L.prototype.i_$163=function(Dc){return new xmp.$.$44(this.p_$EE.i_$166(Dc.id),Dc.type,this.i_$15A(Dc),'default');};xmp.$.$3L.prototype.p_$F5=function(Ec,Fc){var Gc=[];if(Fc!==null){Gc.push(Fc);}
else{if(typeof Ec.nodeTypes==="object"){Gc=Gc.concat(Ec.nodeTypes);}}
return new xmp.$.$45(this.p_$EE.i_$15Z(Ec.id),this.i_$15A(Ec),Gc,true);};xmp.$.$3L.prototype.i_$15A=function(Hc){var Ic={};if(typeof Hc.meta==="object"){for(var Jc=xmp.$.$4.i_$Q7(Hc.meta);Jc.i_$Q9();Jc.i_$QB()){var Kc=Jc.i_$QC();var Lc=this.p_$EE.i_$15Z(Jc.i_$QD());Ic[Kc]=Lc;}}
return Ic;};xmp.i_$OH("xmp.playlistapi.internals");xmp.$.$3M=function(Mc,id,Nc,Oc,Pc){xmp.i_$OU(arguments,[xmp.i_$QJ,xmp.i_$QK,xmp.i_$QK,xmp.i_$QK,xmp.i_$P2],"CompositePlayableNodeType.ctor");if(Oc===null||Oc.length===0){throw new xmp.util.internals.InvalidArgsError("CompositePlayableNodeType requires non-empty patternName.");}
if(Pc<1){throw new xmp.util.internals.InvalidArgsError("CompositePlayableNodeType must have a repeat count of 1 or greater.");}
this.p_$F6=Oc;this.p_$6N=Pc;this.p_$3R=[];xmp.$.$3M.ctor.call(this,Mc,id,Nc);};xmp.DERIVE_CLASS(xmp.$.$3H,xmp.$.$3M);xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0069\u006E\u0074\u0065\u0072\u006E\u0061\u006C\u0073\u002E\u0043\u006F\u006D\u0070\u006F\u0073\u0069\u0074\u0065\u0050\u006C\u0061\u0079\u0061\u0062\u006C\u0065\u004E\u006F\u0064\u0065\u0054\u0079\u0070\u0065',xmp.$.$3M);xmp.$.$3M.prototype.i_$167=function(){return this.p_$6N;};xmp.$.$3M.prototype.i_$160=function(){return(this.p_$F6.toLowerCase()==='deferred');};xmp.$.$3M.prototype.i_$162=function(){return this.p_$F6;};xmp.$.$3M.prototype.i_$14U=function(){return this.p_$3R.length;};xmp.$.$3M.prototype.i_$15R=function(Qc){xmp.i_$OU(arguments,[xmp.i_$P2],"CompositePlayableNodeType.i_getChild");return this.p_$3R[Qc];};xmp.$.$3M.prototype.i_$164=function(Rc){var Sc=this.p_$3R.push(Rc);Rc.i_$14Y(this);return Sc;};xmp.$.$3M.prototype.i_$14W=function(){return true;};xmp.$.$3M.prototype.i_$168=function(){this.p_$3R=[];};xmp.i_$OH("xmp.playlistapi.internals");xmp.$.$3N=function(Tc,id,Uc,Vc,Wc){xmp.$.$3N.ctor.call(this,Tc,id,Uc,Vc,Wc);this.p_$F7=true;};xmp.DERIVE_CLASS(xmp.$.$3M,xmp.$.$3N);xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0069\u006E\u0074\u0065\u0072\u006E\u0061\u006C\u0073\u002E\u0043\u006F\u006E\u0074\u0065\u006E\u0074\u0043\u006F\u006D\u0070\u006F\u0073\u0069\u0074\u0065\u0050\u006C\u0061\u0079\u0061\u0062\u006C\u0065\u004E\u006F\u0064\u0065\u0054\u0079\u0070\u0065',xmp.$.$3N);xmp.$.$3N.prototype.i_$161=function(Xc){this.p_$F7=Xc;};xmp.$.$3N.prototype.i_$14Z=function(){if(!this.p_$F7){return;}
function throwContentChildException(){throw new xmp.$.$3X("ContentCompositePlayableNodeType must have one and only one node of type 'Content' (can have other leaf node types as well); cannot contain composite node types.");}
var Yc=-1;var Zc=this.i_$14U();for(var i=0;i<Zc;i++){var $c=this.i_$15R(i);if($c.i_$14W()){throwContentChildException();}
if($c.i_$U0()){if(Yc===-1){Yc=i;}
else{throwContentChildException();}}}
if(Yc===-1){throwContentChildException();}};xmp.$.$3N.prototype.i_$14X=function(){return true;};xmp.i_$OH("xmp.playlistapi.internals");xmp.$.$3O=function(ad,bd,cd){xmp.$.$3O.ctor.call(this,ad,bd,cd);};xmp.DERIVE_CLASS(xmp.$.$3I,xmp.$.$3O);xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0069\u006E\u0074\u0065\u0072\u006E\u0061\u006C\u0073\u002E\u0044\u0065\u0066\u0061\u0075\u006C\u0074\u0041\u0064\u0044\u0061\u0074\u0061\u0050\u0061\u0074\u0074\u0065\u0072\u006E\u0044\u0069\u0072\u0065\u0063\u0074\u0069\u0076\u0065',xmp.$.$3O);xmp.$.$3O.prototype.i_$169=function(dd,ed){var fd=this.i_$V8('refId','');var gd=this.i_$V8('defaultDataId','');if(fd.length===0||gd.length===0){throw new xmp.$.$3X("Directive '"+this.i_$X4()+"' requires metadata 'refId' and 'defaultDataId'.");}
var hd=this.i_$155(dd,ed,fd);var jd=hd.getPlayableData().getDataObject().adDataMap;if(typeof jd!=='object'){throw new xmp.$.$3X("Did not find 'adDataMap' for content node: "+hd.getBestId());}
var kd=jd[gd];if(typeof kd!=='object'){throw new xmp.$.$3X("Did not find '"+gd+"' in 'adDataMap' for content node: "+hd.getBestId());}
var ld=dd.i_$15N().i_$UN();ld.i_$16A(this.i_$154());ld.i_$16B('video',hd.getPlayableData().getDataObject());ld.i_$16B('node',ed.i_$TY().i_$14T());var md=new xmp.$.$3L(ld);if(typeof kd.resources==='object'){for(var i=0;i<kd.resources.length;i++){var nd=kd.resources[i];ed.i_$U9(md.i_$163(nd));}}
var od=md.i_$15A(kd);for(var pd=xmp.$.$4.i_$Q7(od);pd.i_$Q9();pd.i_$QB()){var qd=pd.i_$QC();var rd=pd.i_$QD();ed.setMetadata(qd,rd);}
ed.setMetadata('__DIRECTIVE_PARAMETER_MAP__',ld);};xmp.i_$OH("xmp.playlistapi.internals");xmp.$.$3P=function(){};xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0069\u006E\u0074\u0065\u0072\u006E\u0061\u006C\u0073\u002E\u004E\u0075\u006C\u006C\u0050\u0061\u0074\u0074\u0065\u0072\u006E\u0044\u0069\u0072\u0065\u0063\u0074\u0069\u0076\u0065',xmp.$.$3P);xmp.$.$3P.p_$F8=new xmp.$.$3P();xmp.$.$3P.i_$16C=function(){return xmp.$.$3P.p_$F8;};xmp.$.$3P.prototype.i_$X4=function(){return'Null';};xmp.$.$3P.prototype.i_$169=function(sd,td){};xmp.i_$OH("xmp.playlistapi.internals");xmp.$.$3Q=function(){};xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0069\u006E\u0074\u0065\u0072\u006E\u0061\u006C\u0073\u002E\u004E\u0075\u006C\u006C\u0052\u0065\u0073\u006F\u0075\u0072\u0063\u0065\u0044\u0069\u0072\u0065\u0063\u0074\u0069\u0076\u0065',xmp.$.$3Q);xmp.$.$3Q.p_$F8=new xmp.$.$3Q();xmp.$.$3Q.i_$16C=function(){return xmp.$.$3Q.p_$F8;};xmp.$.$3Q.prototype.i_$X4=function(){return'Null';};xmp.$.$3Q.prototype.i_$169=function(ud,vd){};xmp.i_$OH("xmp.playlistapi.internals");xmp.$.$3R=function(){this.p_$X=xmp.$.$16.i_$S2('ParameterMap');this.p_$8={};this.p_$F9={};};xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0069\u006E\u0074\u0065\u0072\u006E\u0061\u006C\u0073\u002E\u0050\u0061\u0072\u0061\u006D\u0065\u0074\u0065\u0072\u004D\u0061\u0070',xmp.$.$3R);xmp.$.$3R.i_$159=function(wd,xd){xmp.i_$OU(arguments,[xmp.i_$QJ,xmp.i_$QJ],"ParameterMap.i_calcInitial");var yd=new xmp.$.$3R();yd.i_$S5(wd);yd.i_$16A(xd);return yd;};xmp.$.$3R.prototype.i_$UN=function(){var zd=new xmp.$.$3R();zd.p_$FA(this.p_$8);return zd;};xmp.$.$3R.prototype.i_$S5=function(Ad){this.p_$8=this.p_$FB((typeof Ad.parameters==='object')?Ad.parameters:[]);};xmp.$.$3R.prototype.i_$16A=function(Bd){this.p_$FC(Bd);for(var i=0;i<Bd.length;i++){var p=Bd[i];if(typeof this.p_$8[p.name]==='undefined'){this.p_$X.warn('Pattern input parameter dropped, no default value in pattern: '+p.name);continue;}
this.p_$8[p.name]=p.value;}};xmp.$.$3R.prototype.i_$166=function(Cd){var Dd='://';var Ed=this.i_$15Z(Cd);var Fd='';var Gd=Ed;if(Ed.indexOf(Dd)>-1){var Hd=Ed.split(Dd);Fd=Hd[0]+Dd;Gd=Hd[1];}
while(Gd.indexOf('//')>-1){Gd=Gd.replace(/\/\//g,'/');}
return Fd+Gd;};xmp.$.$3R.prototype.i_$15Z=function(Id){if(typeof Id!=='string'){return Id;}
if(Id.indexOf('${')!==-1){var Jd=false;if(Id.indexOf('$${')!==-1){Id=Id.replace(/\$\$\{/g,'__PROTECT_DOLLAR_ESCAPE__');Jd=true;}
Id=Id.replace(/\$\{player./g,'${');for(var Kd=xmp.$.$4.i_$Q7(this.p_$8);Kd.i_$Q9();Kd.i_$QB()){var Ld=Kd.i_$QC();var Md=Kd.i_$QD();var Nd='${'+Ld+'}';if(Id.indexOf(Nd)!==-1){var Od=Id.split(Nd);Id=Od.join(Md);}}
Id=this.p_$FD(Id);if(Jd){Id=Id.replace(/__PROTECT_DOLLAR_ESCAPE__/g,'${');}}
return Id;};xmp.$.$3R.prototype.p_$FD=function(Pd){var Qd=0;var Rd=true;while(Rd){var Sd=Pd.indexOf('${',Qd);if(Sd===-1){Rd=false;break;}
var Td=Pd.indexOf('}',Sd+1);if(Td===-1){Rd=false;break;}
Qd=Td+1;var Ud=Pd.substr(0,Sd);var Vd=Pd.substr(Td+1);var Wd=Pd.substr(Sd+2,Td-Sd-2);var Xd=Wd.indexOf('.');if(Xd===-1){continue;}
var Yd=Wd.substr(0,Xd);var Zd=Wd.substr(Xd+1);var $d=this.p_$F9[Yd];if(!$d){continue;}
var ae=null;try{ae=xmp.$.$X.i_$VV($d,Zd);}
catch(e){ae=null;this.p_$X.warn('Error evaluating JSON Path: '+Zd,e);}
if(ae!==null){var be=Pd.length;Pd=Ud+ae+Vd;Qd+=(Pd.length-be);}}
return Pd;};xmp.$.$3R.prototype.i_$16B=function(ce,de){this.p_$F9[ce]=de;};xmp.$.$3R.prototype.p_$FC=function(ee){for(var i=0;i<ee.length;i++){var p=ee[i];if(!((typeof p.name==='string')&&(p.name.length>0)&&(typeof p.value==='string'))){throw new xmp.$.$3X("Parameters must have string 'name and 'value' properties.");}}};xmp.$.$3R.prototype.p_$FB=function(fe){this.p_$FC(fe);var ge={};for(var i=0;i<fe.length;i++){var p=fe[i];ge[p.name]=p.value;}
return ge;};xmp.$.$3R.prototype.p_$FA=function(he){for(var ie=xmp.$.$4.i_$Q7(he);ie.i_$Q9();ie.i_$QB()){var je=ie.i_$QC();var ke=ie.i_$QD();this.p_$8[je]=ke;}};xmp.i_$OH("xmp.playlistapi.internals");xmp.$.$3S=function(){};xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0069\u006E\u0074\u0065\u0072\u006E\u0061\u006C\u0073\u002E\u0050\u0061\u0074\u0074\u0065\u0072\u006E\u0044\u0069\u0072\u0065\u0063\u0074\u0069\u0076\u0065\u0046\u0061\u0063\u0074\u006F\u0072\u0079',xmp.$.$3S);xmp.$.$3S.p_$FE=null;xmp.$.$3S.i_$Q7=function(le){if(xmp.$.$3S.p_$FE===null){xmp.$.$3S.p_$FE={};var me=xmp.$.$3S.p_$FE;me.defaultAdData=xmp.$.$3O;}
if(typeof le.patternDirective==='object'){var ne=xmp.$.$3S.p_$FE[le.patternDirective.type];if(ne){var oe=le.patternDirective.parameters;oe=(!oe)?[]:oe;var pe=le.patternDirective.meta;pe=(!pe)?{}:pe;return new ne(le.patternDirective.type,pe,oe);}
else{throw new xmp.util.internals.InvalidArgsError('Unknown directive type: '+le.patternDirective.type);}}
else{return xmp.$.$3P.i_$16C();}};xmp.i_$OH("xmp.playlistapi.internals");xmp.$.$3T=function(){this.p_$5R=[];};xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0069\u006E\u0074\u0065\u0072\u006E\u0061\u006C\u0073\u002E\u0050\u006C\u0061\u0079\u004C\u0069\u0073\u0074\u0041\u0064\u0064\u0072\u0065\u0073\u0073',xmp.$.$3T);xmp.$.$3T.prototype.i_$16D=function(){return this.p_$5R.length;};xmp.$.$3T.prototype.i_$UN=function(){var qe=new xmp.$.$3T();qe.p_$FA(this.p_$5R);return qe;};xmp.$.$3T.prototype.p_$FA=function(re){this.p_$5R=this.p_$5R.concat(re);};xmp.$.$3T.prototype.i_$16E=function(se){return this.p_$5R[se];};xmp.$.$3T.prototype.i_$16F=function(){return this.p_$5R.shift();};xmp.$.$3T.prototype.i_$16G=function(te){return this.p_$5R.push(te);};xmp.$.$3T.prototype.i_$16H=function(){return this.p_$5R.pop();};xmp.$.$3T.prototype.i_$14V=function(){var ue=this.i_$UN();ue.i_$16H();return ue;};xmp.$.$3T.prototype.i_$158=function(ve,we){var xe=this.i_$16D();if(xe!==ve.i_$16D()){return false;}
for(var i=0;i<xe;i++){var ye=this.i_$16E(i);var ze=ve.i_$16E(i);if(i<(xe-1)){if(!ye.i_$16I(ze)){return false;}}
else{if(we){if(ye.i_$16J()!==ze.i_$16J()){return false;}}}}
return true;};xmp.$.$3T.prototype.i_$16K=function(){var s='';var Ae=this.i_$16D();for(var i=0;i<Ae;i++){var Be=this.i_$16E(i);s+=Be.i_$16K();if(i!==(Ae-1)){s+=',';}}
return s;};xmp.i_$OH("xmp.playlistapi.internals");xmp.$.$3U=function(Ce,De){this.p_$FF=Ce;this.p_$FG=De;};xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0069\u006E\u0074\u0065\u0072\u006E\u0061\u006C\u0073\u002E\u0050\u006C\u0061\u0079\u004C\u0069\u0073\u0074\u0041\u0064\u0064\u0072\u0065\u0073\u0073\u0050\u0061\u0072\u0074',xmp.$.$3U);xmp.$.$3U.prototype.i_$16J=function(){return this.p_$FF;};xmp.$.$3U.prototype.i_$16L=function(){return this.p_$FG;};xmp.$.$3U.prototype.i_$16I=function(Ee){return(Ee.i_$16J()===this.i_$16J()&&Ee.i_$16L()===this.i_$16L());};xmp.$.$3U.prototype.i_$16K=function(){return('['+this.p_$FF+','+this.p_$FG+']');};xmp.i_$OH("xmp.playlistapi.internals");xmp.$.$3V=function(Fe,Ge,He,Ie,Je){try{this.p_$FH=0;this.p_$FI=1;this.p_$FJ=2;this.p_$X=xmp.$.$16.i_$S2('PlayListBuilder');this.p_$FK=Fe;this.p_$FL=Je;this.p_$FM=[];this.p_$FN=[];this.p_$FO=new xmp.$.$3T();this.p_$FP=this.p_$FH;this.p_$FQ=new xmp.$.$3T();this.p_$FR={};this.p_$FS=0;this.p_$FM=this.p_$FM.concat(Ie);if(Ge!==null){this.p_$FO=Ge.i_$UO().i_$UN();}
if(this.p_$FO.i_$16D()===0){this.p_$FP=this.p_$FJ;}
this.p_$EZ(He,0);this.p_$FT();}
catch(e){var Ke="Error building playlist with meta resource IDs";this.p_$X.warn(Ke,e);Ke+=", error = ";Ke+=xmp.i_$ON(e);throw new xmp.$.$3X(Ke);}};xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0069\u006E\u0074\u0065\u0072\u006E\u0061\u006C\u0073\u002E\u0050\u006C\u0061\u0079\u004C\u0069\u0073\u0074\u0042\u0075\u0069\u006C\u0064\u0065\u0072',xmp.$.$3V);xmp.$.$3V.prototype.i_$15G=function(){var Le=[];for(var i=0;i<this.p_$FN.length;i++){var Me=this.p_$FN[i];var Ne=Me[0];Le.push(Ne);}
if(this.p_$X.isDebugEnabled()){var Oe='Node output: ';for(var j=0;j<Le.length;j++){Oe+=('('+j.toString()+') ');Oe+=Le[j].getBestId();Oe+=('('+Le[j].i_$UO().i_$16K()+')');if(j!==(Le.length-1)){Oe+=', ';}}
this.p_$X.debug(Oe);}
return Le;};xmp.$.$3V.prototype.p_$EZ=function(Pe,Qe){if(Pe.i_$14W()){var Re=0;var Se=0;if(this.p_$FP===this.p_$FH){var Te=this.p_$FO.i_$16F();Re=Te.i_$16J();Se=Te.i_$16L();if(this.p_$FO.i_$16D()===0){this.p_$FP=this.p_$FI;}}
if(this.p_$FP!==this.p_$FH&&Pe.i_$160()){Pe=this.p_$FU(Pe);}
var Ue=Pe.i_$167();var Ve=Pe.i_$14U();for(var We=Re;We<Ue;We++){if(this.p_$FM.length===0){break;}
this.p_$FS++;if(this.p_$FP===this.p_$FJ){Se=0;}
for(var Xe=Se;Xe<Ve;Xe++){var Ye=Pe.i_$15R(Xe);this.p_$FQ.i_$16G(new xmp.$.$3U(We,Xe));this.p_$EZ(Ye,this.p_$FS);this.p_$FQ.i_$16H();}}}
else{if(this.p_$FP===this.p_$FJ){this.p_$FV(Pe,Qe);}
else if(this.p_$FP===this.p_$FI){this.p_$FP=this.p_$FJ;}}};xmp.$.$3V.prototype.p_$FV=function(Ze,$e){var af=this.p_$FK.i_$15W();if(Ze.i_$U0()){if(this.p_$FM.length===0){af.i_$UR(true);af.i_$UU(new xmp.$.$17('EMPTY_SLOT'));}
else{var bf=this.p_$FM.shift();af.i_$US(this.p_$FL,bf);}}
af.i_$UL(Ze);af.i_$UP(this.p_$FQ.i_$UN());if(af.isContentType()&&af.i_$TY().i_$14V().i_$14X()){af.getPlayableData().i_$WB(af.getPlayableData().getMetaResourceId());this.p_$FR[$e.toString()]=af;}
this.p_$FN.push([af,$e]);};xmp.$.$3V.prototype.p_$FT=function(){this.p_$FW();this.p_$FX();this.p_$FY();};xmp.$.$3V.prototype.p_$FW=function(){for(var i=0;i<this.p_$FN.length;i++){var cf=this.p_$FN[i];var df=cf[0];try{df.i_$TY().i_$151().i_$169(this,df);}
catch(e){var ef=new xmp.$.$4Q(e,'badAdPattern',null,[{label:'cause',text:e.message}]);this.p_$X.warn(ef.message,ef);}}};xmp.$.$3V.prototype.p_$FX=function(){for(var i=0;i<this.p_$FN.length;i++){var ff=this.p_$FN[i];var gf=ff[0];try{gf.i_$TY().i_$153().i_$169(this,gf);}
catch(e){var hf=new xmp.$.$4Q(e,'badAdPattern',null,[{label:'cause',text:e.message}]);this.p_$X.warn(hf.message,hf);}}};xmp.$.$3V.prototype.p_$FY=function(){for(var i=0;i<this.p_$FN.length;i++){var jf=this.p_$FN[i];var kf=jf[0];var lf=jf[1];if(kf.getPlayableData()===null){var mf=kf.i_$U5(false);kf.i_$UU(new xmp.$.$17((mf)?mf.getId():''));}
if(!kf.isContentType()&&kf.i_$TY().i_$14V().i_$14X()){this.p_$FZ(kf,lf);}
if(!kf.i_$UQ()&&!kf.getPlayableData().isError()){this.p_$FK.i_$15X(kf);}}};xmp.$.$3V.prototype.p_$FZ=function(nf,of){var pf=this.p_$FR[of.toString()];if(pf.i_$UQ()){nf.i_$UR(true);}
nf.getPlayableData().i_$WB(pf.getPlayableData().i_$UD());};xmp.$.$3V.prototype.p_$FU=function(qf){qf.i_$168();if(this.p_$FM.length>0){var rf=this.p_$FM[0];var sf=this.p_$FL.i_$UT(rf);var tf=null;if(sf.isError()){tf=[{type:'Content'}];}
else{tf=sf.getDataObject().pattern;}
var uf=new xmp.$.$3L(this.p_$FK.i_$15N());uf.i_$165(qf,tf);}
return qf;};xmp.$.$3V.prototype.i_$15N=function(){return this.p_$FK.i_$15N();};xmp.$.$3V.prototype.i_$16M=function(){return this.p_$FN.length;};xmp.$.$3V.prototype.i_$16N=function(vf){var wf=this.p_$FN[vf];return wf[0];};xmp.$.$3V.prototype.i_$156=function(){return(new xmp.$.$3W(this));};xmp.$.$3V.prototype.i_$157=function(){return this.p_$FK.i_$157();};xmp.$.$3W=function(xf){this.p_$G0=xf;this.p_$G1=0;};xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0069\u006E\u0074\u0065\u0072\u006E\u0061\u006C\u0073\u002E\u0050\u006C\u0061\u0079\u004C\u0069\u0073\u0074\u0042\u0075\u0069\u006C\u0064\u0065\u0072\u005F\u0049\u0074\u0065\u0072\u0061\u0074\u006F\u0072',xmp.$.$3W);xmp.$.$3W.prototype.i_$16D=function(){return this.p_$G0.i_$16M();};xmp.$.$3W.prototype.i_$Q6=function(){this.p_$G1=0;};xmp.$.$3W.prototype.i_$QB=function(){var yf=this.p_$G0.i_$16N(this.p_$G1);this.p_$G1++;return yf;};xmp.$.$3W.prototype.i_$Q9=function(){return(this.p_$G1<this.i_$16D());};xmp.i_$OH("xmp.playlistapi.internals");xmp.$.$3X=function(zf){this.name="xmp.playlistapi.internals.PlayListError";this.message=zf;};xmp.DERIVE_CLASS(Error,xmp.$.$3X);xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0069\u006E\u0074\u0065\u0072\u006E\u0061\u006C\u0073\u002E\u0050\u006C\u0061\u0079\u004C\u0069\u0073\u0074\u0045\u0072\u0072\u006F\u0072',xmp.$.$3X);xmp.i_$OH("xmp.playlistapi.internals");xmp.$.$3Y=function(){};xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0069\u006E\u0074\u0065\u0072\u006E\u0061\u006C\u0073\u002E\u0052\u0065\u0073\u006F\u0075\u0072\u0063\u0065\u0044\u0069\u0072\u0065\u0063\u0074\u0069\u0076\u0065\u0046\u0061\u0063\u0074\u006F\u0072\u0079',xmp.$.$3Y);xmp.$.$3Y.p_$FE=null;xmp.$.$3Y.i_$Q7=function(Af){if(xmp.$.$3Y.p_$FE===null){xmp.$.$3Y.p_$FE={};var Bf=xmp.$.$3Y.p_$FE;Bf.shareResources=xmp.$.$40;}
if(typeof Af.resourceDirective==='object'){var Cf=xmp.$.$3Y.p_$FE[Af.resourceDirective.type];if(Cf){var Df=Af.resourceDirective.meta;Df=(!Df)?{}:Df;return new Cf(Af.resourceDirective.type,Df);}
else{throw new xmp.util.internals.InvalidArgsError('Unknown resource directive type: '+Af.resourceDirective.type);}}
else{return xmp.$.$3Q.i_$16C();}};xmp.i_$OH("xmp.playlistapi.internals");xmp.$.$3Z=function(Ef,id,Ff,Gf,Hf){xmp.i_$OU(arguments,[xmp.i_$QJ,xmp.i_$QK,xmp.i_$QK,xmp.i_$QJ,xmp.i_$QJ],"RuleSetPlayableNodeType.ctor");this.p_$3O=new xmp.$.$V(true);this.p_$3O.i_$UJ(Hf);this.p_$G2=Gf;this.p_$3Q=new xmp.$.$43();xmp.$.$3Z.ctor.call(this,Ef,id,Ff);};xmp.DERIVE_CLASS(xmp.$.$3H,xmp.$.$3Z);xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0069\u006E\u0074\u0065\u0072\u006E\u0061\u006C\u0073\u002E\u0052\u0075\u006C\u0065\u0053\u0065\u0074\u0050\u006C\u0061\u0079\u0061\u0062\u006C\u0065\u004E\u006F\u0064\u0065\u0054\u0079\u0070\u0065',xmp.$.$3Z);xmp.$.$3Z.prototype.i_$U9=function(If){this.p_$3Q.i_$U9(If);};xmp.$.$3Z.prototype.i_$U8=function(Jf){return this.p_$3Q.i_$U8(Jf);};xmp.$.$3Z.prototype.i_$UB=function(){return this.p_$3Q;};xmp.$.$3Z.prototype.i_$V8=function(Kf,Lf){return this.p_$3O.i_$U3(Kf,Lf);};xmp.$.$3Z.prototype.i_$UI=function(){return this.p_$G2;};xmp.$.$3Z.prototype.i_$UM=function(){return this.p_$3O;};xmp.i_$OH("xmp.playlistapi.internals");xmp.$.$40=function(Mf,Nf){xmp.i_$OU(arguments,[xmp.i_$QK,xmp.i_$QJ],"ShareResourcesResourceDirective.ctor");if(!xmp.i_$OP(Mf)){throw new xmp.util.internals.InvalidArgsError("Argument 'type' must be a non-empty string.");}
this.p_$72=Mf;this.p_$3O=new xmp.$.$V(true);this.p_$3O.i_$UJ(Nf);};xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0069\u006E\u0074\u0065\u0072\u006E\u0061\u006C\u0073\u002E\u0053\u0068\u0061\u0072\u0065\u0052\u0065\u0073\u006F\u0075\u0072\u0063\u0065\u0073\u0052\u0065\u0073\u006F\u0075\u0072\u0063\u0065\u0044\u0069\u0072\u0065\u0063\u0074\u0069\u0076\u0065',xmp.$.$40);xmp.$.$40.prototype.i_$X4=function(){return this.p_$72;};xmp.$.$40.prototype.p_$G3=function(Of,Pf){return this.p_$3O.i_$U3(Of,Pf);};xmp.$.$40.prototype.i_$169=function(Qf,Rf){if(this.p_$G4(Rf)){return;}
var Sf=this.p_$G5(Qf,Rf);if(Sf.length===0){return;}
this.p_$G6(Sf);var Tf=this.p_$G7(Sf);this.p_$G8(Sf,Tf);this.p_$G9(Sf);};xmp.$.$40.prototype.p_$G6=function(Uf){var Vf=Uf[0];var Wf=Vf.i_$UB();for(var i=1;i<Uf.length;i++){var Xf=Uf[i];var Yf=Xf.i_$UB().i_$UN();Xf.i_$UC(Wf);this.p_$GA(Wf,Yf);}};xmp.$.$40.prototype.p_$GA=function(Zf,$f){var ag=$f.i_$16O();for(var i=0;i<ag.length;i++){Zf.i_$U9($f.i_$U8(ag[i]));}};xmp.$.$40.prototype.p_$G7=function(bg){var cg=[];for(var i=0;i<bg.length;i++){var dg=bg[i];var eg=dg.i_$TY().i_$153().p_$GB();if(eg!==null){cg.push(eg);}}
return this.p_$GC(cg);};xmp.$.$40.prototype.p_$GC=function(fg){if(fg.length===0){return{};}
var gg=fg[0];for(var i=1;i<fg.length;i++){var hg=fg[i];for(var ig=xmp.$.$4.i_$Q7(hg);ig.i_$Q9();ig.i_$QB()){var jg=ig.i_$QC();var kg=ig.i_$QD();gg[jg]=kg;}}
return gg;};xmp.$.$40.prototype.p_$G8=function(lg,mg){var ng="Resource Directive '"+this.i_$X4()+"' requires that if metadata 'nodeTypeToResTypesMap' is specified, it ia map of strings (node types) to arrays of strings (resource types).";for(var i=0;i<lg.length;i++){var og=lg[i];var pg=mg[og.getNodeTypeName()];if(pg){if(!(pg instanceof Array)){throw new xmp.$.$3X(ng);}
for(var j=0;j<pg.length;j++){if(!xmp.i_$OP(pg[j])){throw new xmp.$.$3X(ng);}}
og.i_$UA(pg);}}};xmp.$.$40.prototype.p_$G9=function(qg){for(var i=0;i<qg.length;i++){this.p_$GD(qg[i]);}};xmp.$.$40.prototype.p_$GD=function(rg){rg.setMetadata('__RESOURCE_DIRECTIVE_COMPLETE__','true');};xmp.$.$40.prototype.p_$G4=function(sg){return(sg.getMetadata('__RESOURCE_DIRECTIVE_COMPLETE__','false')==='true');};xmp.$.$40.prototype.p_$G5=function(tg,ug){var vg=this.p_$GE(tg.i_$157(),ug);var wg=this.p_$GE(tg.i_$156(),ug);var xg=vg.concat(wg);var yg=[];var zg={};for(var i=0;i<xg.length;i++){var Ag=xg[i];if(typeof(zg[Ag.i_$UF()])==='undefined'){yg.push(Ag);zg[Ag.i_$UF()]=Ag;}}
return yg;};xmp.$.$40.prototype.p_$GE=function(Bg,Cg){var Dg=[];Bg.i_$Q6();while(Bg.i_$Q9()){var Eg=Bg.i_$QB();if(!Eg.isValid()){continue;}
var Fg=Eg.i_$TY().i_$153();if(Fg.i_$X4()!==this.i_$X4()){continue;}
if(!Eg.i_$UO().i_$158(Cg.i_$UO(),true)){continue;}
if(this.p_$GF()===Fg.p_$GF()){Dg.push(Eg);}}
return Dg;};xmp.$.$40.prototype.p_$GF=function(){var Gg=this.p_$G3('shareId','');if(Gg.length===0){throw new xmp.$.$3X("Resource Directive '"+this.i_$X4()+"' requires metadata 'shareId'.");}
return Gg;};xmp.$.$40.prototype.p_$GB=function(){var Hg=this.p_$G3('nodeTypeToResTypesMap',this);if(Hg===this){return null;}
return Hg;};xmp.i_$OH("xmp.playlistapi.internals");xmp.$.$41=function(Ig){this.p_$GG=Ig;this.p_$G1=-1;};xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0069\u006E\u0074\u0065\u0072\u006E\u0061\u006C\u0073\u002E\u0053\u0069\u006D\u0070\u006C\u0065\u0050\u006C\u0061\u0079\u004C\u0069\u0073\u0074\u0049\u0074\u0065\u0072\u0061\u0074\u006F\u0072',xmp.$.$41);xmp.$.$41.prototype.i_$16D=function(){return this.p_$GG.length;};xmp.$.$41.prototype.i_$Q6=function(){this.p_$G1=0;};xmp.$.$41.prototype.i_$QB=function(){var Jg=this.p_$GG[this.p_$G1];this.p_$G1++;return Jg;};xmp.$.$41.prototype.i_$Q9=function(){return(this.p_$G1<this.i_$16D());};xmp.i_$OH("xmp.playlistapi");xmp.$.$42=function(Kg){this.p_$FK=Kg;this.p_$GH=null;this.p_$9F=false;this.p_$GI=true;};xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0050\u006C\u0061\u0079\u004C\u0069\u0073\u0074\u0049\u0074\u0065\u0072\u0061\u0074\u006F\u0072',xmp.$.$42);xmp.$.$42.prototype.i_$Q6=function(){this.p_$9F=true;this.p_$GI=true;};xmp.$.$42.prototype.i_$QB=function(){if(!this.i_$Q9()){throw new xmp.$.$3X("Cannot call next if there are no more items to be returned, call 'i_hasNext' method to check.");}
this.p_$GI=true;return this.p_$GH;};xmp.$.$42.prototype.i_$Q9=function(){this.p_$GJ();if(this.p_$GI){this.p_$GH=this.p_$GK();this.p_$GI=false;}
return(this.p_$GH!==null);};xmp.$.$42.prototype.p_$GK=function(){try{this.p_$FK.i_$15E();this.p_$FK.i_$15F();return this.p_$FK.i_$15S();}
finally{this.p_$FK.i_$15H();}};xmp.$.$42.prototype.p_$GJ=function(){if(!this.p_$9F){throw new xmp.$.$3X("Iterator not initialized, call 'i_first' method.");}};xmp.i_$OH("xmp.playlistapi");xmp.$.$43=function(){xmp.$.$43.ctor.call(this);this.p_$8={};this.p_$5R=[];};xmp.DERIVE_CLASS(xmp.$.$Z,xmp.$.$43);xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0052\u0065\u0073\u006F\u0075\u0063\u0065\u0042\u0075\u006E\u0064\u006C\u0065',xmp.$.$43);xmp.$.$43.prototype.i_$U9=function(Lg){if(this.i_$U8(Lg.getType())!==null){throw new xmp.util.internals.InvalidArgsError('Node type already has a resource of type: '+Lg.getType());}
this.p_$8[Lg.getType()]=Lg;this.p_$5R.push(Lg);};xmp.$.$43.prototype.i_$U8=function(Mg){var Ng=this.p_$8[Mg];return(Ng)?Ng:null;};xmp.$.$43.prototype.i_$16O=function(){return xmp.$.$4.i_$Q5(this.p_$8);};xmp.$.$43.prototype.i_$16P=function(){return(this.i_$16O().length);};xmp.$.$43.prototype.i_$UN=function(){var Og=new xmp.$.$43();for(var Pg=xmp.$.$4.i_$Q7(this.p_$8);Pg.i_$Q9();Pg.i_$QB()){var Qg=Pg.i_$QC();var Rg=this.i_$U8(Qg);Og.i_$U9(Rg.i_$UN());}
return Og;};xmp.$.$43.prototype.i_$W0=function(){return'ResouceBundle';};xmp.$.$43.prototype.i_$16Q=function(){var Sg=this.i_$16O();var Tg=0;for(var i=0;i<Sg.length;i++){var Ug=Sg[i];var Vg=this.i_$U8(Ug);if(Vg.isError()){Tg++;}}
return Tg;};xmp.$.$43.i_$16R=function(Wg){var Xg=xmp.$.$1B.i_$P4().getContextNode().getNodeForPath('ad resource metadata/'+Wg);return Xg.getString('data type','default');};xmp.$.$43.i_$16S=function(Yg){var Zg=xmp.$.$1B.i_$P4().getContextNode().getNodeForPath('ad resource metadata/'+Yg);return Zg.getString('renderer','dummy');};xmp.$.$43.i_$U6=function($g,ah){var bh=[];for(var i=0;i<$g.length;i++){var ch=$g[i];if(ah===xmp.$.$43.i_$16S(ch)){bh.push(ch);}}
return bh;};xmp.$.$43.prototype.i_$U7=function(dh){var eh=[];for(var i=0;i<this.p_$5R.length;i++){var fh=this.p_$5R[i];if(dh===fh.i_$16T()){eh.push(fh.getType());}}
return eh;};xmp.$.$43.prototype.i_$UA=function(gh,hh){if(!(hh instanceof Array)){throw new xmp.util.internals.InvalidArgsError("Invalid associated resource bundle types - must be an array of non-empty strings.");}
for(var i=0;i<hh.length;i++){var ih=this.i_$U8(hh[i]);if(ih!==null){ih.i_$16U(gh);}}};xmp.i_$OH("xmp.playlistapi");xmp.$.$44=function(id,jh,kh,lh){xmp.$.$44.ctor.call(this);if(!kh){kh={};}
if(!lh){lh='default';}
xmp.i_$OU([id,jh,kh,lh],[xmp.i_$QK,xmp.i_$QK,xmp.i_$QJ,xmp.i_$QK],"Resource.ctor");if(!(xmp.i_$OP(id)&&xmp.i_$OP(jh)&&xmp.i_$OP(lh))){throw new xmp.util.internals.InvalidArgsError("Parameters 'id' and 'type' and 'dataType' must be non-empty strings.");}
this.p_$1G=id;this.p_$72=jh;this.p_$GL=lh;this.p_$3O=new xmp.$.$V(false);this.p_$3O.i_$UJ(kh);this.p_$GM=-1;this.p_$GN=-1;};xmp.DERIVE_CLASS(xmp.$.$Z,xmp.$.$44);xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0052\u0065\u0073\u006F\u0075\u0072\u0063\u0065',xmp.$.$44);xmp.$.$44.prototype.getId=function(){return this.p_$1G;};xmp.$.$44.prototype.setId=function(id){this.p_$1G=id;};xmp.$.$44.prototype.getType=function(){return this.p_$72;};xmp.$.$44.prototype.getDataType=function(){return this.p_$GL;};xmp.$.$44.prototype.i_$16V=function(mh){this.p_$GL=mh;};xmp.$.$44.prototype.getMetadata=function(nh,oh){return this.p_$3O.i_$U3(nh,oh);};xmp.$.$44.prototype.setMetadata=function(ph,qh){this.p_$3O.i_$U4(ph,qh);};xmp.$.$44.prototype.removeMetadata=function(rh){this.p_$3O.i_$VU(rh);};xmp.$.$44.prototype.i_$UN=function(){return new xmp.$.$44(this.p_$1G,this.p_$72,this.p_$3O.i_$UK(),this.p_$GL);};xmp.$.$44.prototype.i_$W0=function(){return this.getId();};xmp.$.$44.prototype.getCompanionAdId=function(){return this.p_$GM;};xmp.$.$44.prototype.i_$16W=function(sh){this.p_$GM=sh;};xmp.$.$44.prototype.i_$16T=function(){return this.p_$GN;};xmp.$.$44.prototype.i_$16U=function(th){this.p_$GN=th;};xmp.i_$OH("xmp.playlistapi");xmp.$.$45=function(id,uh,vh,wh){xmp.i_$OU(arguments,[xmp.i_$QK,xmp.i_$QJ,xmp.i_$QJ,xmp.i_$QL],"RuleContext.ctor");if(id===null||id.length===0){throw new xmp.util.internals.InvalidArgsError("RuleContext requires non-empty ID.");}
if(vh.length<1){throw new xmp.util.internals.InvalidArgsError("RuleContext at least one applicable type.");}
this.p_$1G=id;this.p_$3O=new xmp.$.$V(wh);this.p_$3O.i_$UJ(uh);this.p_$GO=vh;};xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0052\u0075\u006C\u0065\u0043\u006F\u006E\u0074\u0065\u0078\u0074',xmp.$.$45);xmp.$.$45.i_$UG=function(id,xh){return new xmp.$.$45(id,xh,['dynamic'],true);};xmp.$.$45.prototype.getId=function(){return this.p_$1G;};xmp.$.$45.prototype.getMetadata=function(yh,zh){return this.p_$3O.i_$U3(yh,zh);};xmp.$.$45.prototype.i_$15V=function(Ah){if(Ah.toLowerCase()==='all'){return true;}
for(var i=0;i<this.p_$GO.length;i++){if(this.p_$GO[i]===Ah){return true;}}
return false;};xmp.i_$OH("xmp.playlistapi");xmp.$.$46=function(){this.p_$GP=null;this.p_$GQ=null;};xmp.$.$3.i_$PZ('\u0078\u006D\u0070\u002E\u0070\u006C\u0061\u0079\u006C\u0069\u0073\u0074\u0061\u0070\u0069\u002E\u0052\u0075\u006C\u0065\u0053\u0065\u0074\u0052\u0075\u006E\u0043\u006F\u006E\u0074\u0065\u0078\u0074',xmp.$.$46);xmp.$.$46.prototype.getPlayableNode=function(){return this.p_$GP;};xmp.$.$46.prototype.getCurrentRuleContext=function(){return this.p_$GQ;};xmp.$.$46.prototype.i_$15T=function(Bh){this.p_$GP=Bh;this.p_$GQ=null;};xmp.$.$46.prototype.i_$15U=function(Ch){this.p_$GQ=Ch;};

