xmp.createNamespace("xmp.playlistapi.internals");xmp.playlistapi.internals.PatternDirective=function(aa,ba,ca){xmp.validateArguments(arguments,[xmp.STRING_TYPE,xmp.OBJECT_TYPE,xmp.OBJECT_TYPE],"PatternDirective.ctor");if(!xmp.isNonEmptyString(aa)){throw new xmp.util.internals.InvalidArgsError("Argument 'type' must be a non-empty string.");}
this._type=aa;this._metadataMap=new xmp.util.internals.MetadataMap(true);this._metadataMap._reInitialize(ba);this._parameters=ca;};xmp.playlistapi.internals.PatternDirective.prototype.getType=function(){return this._type;};xmp.playlistapi.internals.PatternDirective.prototype.getParameterArray=function(){return this._parameters;};xmp.playlistapi.internals.PatternDirective.prototype.getMetadata=function(da,ea){return this._metadataMap._get(da,ea);};xmp.playlistapi.internals.PatternDirective.prototype._findNamedContentNode=function(fa,ga,ha){var ia=fa._getPlayListDataArrayLength();var ja=(ha==='@Content');for(var i=0;i<ia;i++){var ka=fa._getPlayListDataArrayItemAtIndex(i);if(ka.isContentType()&&ka.getNodeType()._getParent()._isContentCompositeType()){if(ja){if(ka._getPatternAddress().isSibling(ga._getPatternAddress(),true)){return ka;}}
else{if(ka.getNodeType()._getParent().getId()===ha){var la=ka._getPatternAddress().getParent();if(la.isSibling(ga._getPatternAddress(),true)){return ka;}}}}}
return null;};xmp.createNamespace("xmp.playlistapi");xmp.playlistapi.AdPatternPlayList=function(ma,na,oa,pa){xmp.validateArguments(arguments,[xmp.OBJECT_TYPE,xmp.OBJECT_TYPE,xmp.OBJECT_TYPE,xmp.OBJECT_TYPE],"AdPatternPlayList.ctor");if(!ma||!na||!oa){throw new xmp.util.internals.InvalidArgsError("One or more constructor arguments is null.");}
this._LOOK_AHEAD_AND_BEHIND_MIN=7;this._LOOK_AHEAD_AND_BEHIND_MAX=100;this._logger=new xmp.util.internals.CategoryLogger('AdPatternPlayList');this._lockedForModification=false;this._metadataMap=new xmp.util.internals.MetadataMap(true);this._listener=ma;this._adPatternRootNodeType=null;this._invariantRuleContextArray=null;this._ruleIdToFactoryMap={};this._ruleIdToRuleMap={};this._ruleSetRunContext=new xmp.playlistapi.RuleSetRunContext();this._lookAheadAndBehindCount=this._calculateLookAheadAndBehind();this._internalPlayListArray=[];this._lastNode=null;this._outStandingPlayableNodeArray=[];this._iteratator=new xmp.playlistapi.PlayListIterator(this);this._parameterMap=null;xmp.util.PlayableNode._staticInit();this._parameterMap=xmp.playlistapi.internals.ParameterMap.calcInitial(na,pa);var qa=new xmp.playlistapi.internals.AdPatternBuilder(this._parameterMap);this._metadataMap._reInitialize(qa._extractOptionalMetaData(na));this._adPatternRootNodeType=qa._build(na);this._invariantRuleContextArray=qa._buildRuleContextArray(oa,null);this._logger.info('Constructed AdPatternPlayList');};xmp.playlistapi.AdPatternPlayList.prototype.getMetadata=function(ra,sa){return this._metadataMap._get(ra,sa);};xmp.playlistapi.AdPatternPlayList.prototype.setContentMetaResourceIds=function(ta){try{for(var i=0;i<ta.length;i++){if(typeof ta[i]!=='string'){throw new xmp.util.internals.InvalidArgsError("Argument 'contentMetaResourceIdArray' must be an array of strings.");}}
this._checkLockedForModification();this._lockForModification();var ua=new xmp.playlistapi.internals.PlayListBuilder(this,this._lastNode,this._adPatternRootNodeType,ta,this._listener);this._internalPlayListArray=ua._getOutput();}
finally{this._unlockForModification();}};xmp.playlistapi.AdPatternPlayList.prototype.getIterator=function(){return this._iteratator;};xmp.playlistapi.AdPatternPlayList.prototype.getRuleIdArray=function(){var va=[];var wa={};for(var i=0;i<this._invariantRuleContextArray.length;i++){var xa=this._invariantRuleContextArray[i].getId();if(!wa[xa]){wa[xa]=xa;va.push(xa);}}
this._getPatternRuleIdsHelper(this._adPatternRootNodeType,va,wa);return va;};xmp.playlistapi.AdPatternPlayList.prototype.loadRuleFactoryArray=function(ya){xmp.validateArguments(arguments,[xmp.OBJECT_TYPE],"AdPatternPlayList.loadRuleFactoryArray");if(!ya){throw new xmp.util.internals.InvalidArgsError("Argument 'ruleFactoryArray' cannot be null.");}
this._buildRuleIdToFactoryMap(ya);if(this._logger.isDebugEnabled()){this._logger.debug('Loaded rule factories.');}};xmp.playlistapi.AdPatternPlayList.prototype.getLookAheadNodeArray=function(){return this._buildLookAheadArray();};xmp.playlistapi.AdPatternPlayList.prototype.getLookBehindNodeArray=function(){return this._buildLookBehindArray();};xmp.playlistapi.AdPatternPlayList.prototype._getParameterMapInternal=function(){return this._parameterMap;};xmp.playlistapi.AdPatternPlayList.prototype._findRule=function(za){var Aa=this._ruleIdToRuleMap[za];if(typeof Aa==="undefined"){var Ba=this._getFactory(za);try{Aa=Ba.createRule(za);}
catch(e){throw this._createExtensionGuardException(e,'RuleFactory.createRule');}
this._ruleIdToRuleMap[za]=Aa;}
return Aa;};xmp.playlistapi.AdPatternPlayList.prototype._buildRuleIdToFactoryMap=function(Ca){for(var i=0;i<Ca.length;i++){var Da=Ca[i];var Ea=null;try{Ea=Da.getCreatableRuleIds();}
catch(e){throw this._createExtensionGuardException(e,'RuleFactory.getCreatableRuleIds');}
for(var j=0;j<Ea.length;j++){var Fa=Ea[j];if(!Fa||Fa.length===0){throw new xmp.playlistapi.internals.PlayListError("RuleFactory retured a rule ID that is null, undefined, or empty.");}
if(typeof this._ruleIdToFactoryMap[Fa]!=="undefined"){throw new xmp.playlistapi.internals.PlayListError("Rule "+Fa+" found in more than one factory.");}
this._ruleIdToFactoryMap[Fa]=Da;}}
this._verifyRuleFactories();};xmp.playlistapi.AdPatternPlayList.prototype.addRuleFactory=function(Ga,Ha){this._ruleIdToFactoryMap[Ga]=Ha;};xmp.playlistapi.AdPatternPlayList.prototype._createExtensionGuardException=function(e,Ia){var Ja='Error occurred while invoking extension method: '+Ia;this._logger.warn(Ja,e);Ja+=', Error data: ';Ja+=xmp.extractErrorMessage(e);return new xmp.playlistapi.internals.PlayListError(Ja);};xmp.playlistapi.AdPatternPlayList.prototype._calculateLookAheadAndBehind=function(){var Ka=xmp.util.SettingsManager.getInstance().getContextNode();var La=Ka.getNodeForPath('BasePlayer');var Ma=La.getInt('look ahead and behind count',this._LOOK_AHEAD_AND_BEHIND_MIN);if(Ma<this._LOOK_AHEAD_AND_BEHIND_MIN){Ma=this._LOOK_AHEAD_AND_BEHIND_MIN;}
else if(Ma>this._LOOK_AHEAD_AND_BEHIND_MAX){Ma=this._LOOK_AHEAD_AND_BEHIND_MAX;}
return Ma;};xmp.playlistapi.AdPatternPlayList.prototype._verifyRuleFactories=function(){this._verifyInvariantRuleFactories();this._verifyPlayableNodeTypeRuleFactoriesHelper(this._adPatternRootNodeType);};xmp.playlistapi.AdPatternPlayList.prototype._verifyInvariantRuleFactories=function(){for(var i=0;i<this._invariantRuleContextArray.length;i++){var Na=this._invariantRuleContextArray[i].getId();this._getFactory(Na);}};xmp.playlistapi.AdPatternPlayList.prototype._verifyPlayableNodeTypeRuleFactoriesHelper=function(Oa){if(Oa._isCompositeType()){var Pa=Oa._getChildCount();for(var i=0;i<Pa;i++){this._verifyPlayableNodeTypeRuleFactoriesHelper(Oa._getChild(i));}}
else{var Qa=Oa._getRuleContextArray();for(var j=0;j<Qa.length;j++){var Ra=Qa[j].getId();this._getFactory(Ra);}}};xmp.playlistapi.AdPatternPlayList.prototype._getFactory=function(Sa){var Ta=this._ruleIdToFactoryMap[Sa];if(!Ta){throw new xmp.playlistapi.internals.PlayListError("No factory defined for rule: "+Sa);}
return Ta;};xmp.playlistapi.AdPatternPlayList.prototype._getNextRuleFilteredPlayableNode=function(){var Ua=null;while(this._internalPlayListArray.length>0){var Va=this._internalPlayListArray.shift();if(this._safeRunRulesForNode(Va)){this._addToOutstandingArray(Va);Ua=Va;break;}
else{this._returnNodeToPool(Va);}}
if(Ua!==null){this._lastNode=Ua;}
return Ua;};xmp.playlistapi.AdPatternPlayList.prototype._safeRunRulesForNode=function(Wa){try{return this._runRulesForNode(Wa);}
catch(e){var Xa='Error occured running rules for node: '+xmp.util.PlayableNode.safeGetBestId(Wa);Xa+='\nNode will be treated AS IF A RULE FAILED, skipped.';this._logger.warn(Xa,e);return false;}};xmp.playlistapi.AdPatternPlayList.prototype._runRulesForNode=function(Ya){if(Ya._isEmptySlot()){if(this._logger.isDebugEnabled()){this._logger.debug('Node: '+Ya.getBestId()+' IS AN EMPTY SLOT, FAILURE.');}
return false;}
var Za=this._buildRuleContextsForNode(Ya);if(Za.length===0){if(this._logger.isDebugEnabled()){this._logger.debug('Node: '+Ya.getBestId()+' HAS NO RULES, SUCCESS.');}
return true;}
this._ruleSetRunContext._initialize(Ya);for(var i=0;i<Za.length;i++){var $a=Za[i];this._ruleSetRunContext._setCurrentRuleContext($a);var ab=this._findRule($a.getId());var bb=false;try{bb=ab.isPlayable(this._ruleSetRunContext);}
catch(e){throw this._createExtensionGuardException(e,'Rule.isPlayable for rule: '+this._ruleSetRunContext.getCurrentRuleContext().getId());}
if(!bb){if(this._logger.isDebugEnabled()){this._logger.debug('Node: '+Ya.getBestId()+', Rule ID: '+$a.getId()+' FAILED.');}
return false;}
else{if(this._logger.isDebugEnabled()){this._logger.debug('Node: '+Ya.getBestId()+', Rule ID: '+$a.getId()+' SUCCEEDED.');}}}
if(this._logger.isDebugEnabled()){this._logger.debug('Node: '+Ya.getBestId()+' ALL RULES SUCCEEDED.');}
return true;};xmp.playlistapi.AdPatternPlayList.prototype._buildLookAheadArray=function(){var cb=[];for(var i=0;i<this._lookAheadAndBehindCount;i++){if(i>=(this._internalPlayListArray.length)){break;}
cb.push(this._internalPlayListArray[i]);}
return cb;};xmp.playlistapi.AdPatternPlayList.prototype._buildLookBehindArray=function(){var db=[];db=db.concat(this._outStandingPlayableNodeArray).reverse();return db;};xmp.playlistapi.AdPatternPlayList.prototype._buildRuleContextsForNode=function(eb){var fb=this._getApplicableInvariantRuleContexts(eb.getNodeTypeName());fb=fb.concat(eb._getRuleArrayReference());return fb;};xmp.playlistapi.AdPatternPlayList.prototype._getApplicableInvariantRuleContexts=function(gb){var hb=[];for(var i=0;i<this._invariantRuleContextArray.length;i++){var ib=this._invariantRuleContextArray[i];if(ib.isApplicable(gb)){hb.push(ib);}}
return hb;};xmp.playlistapi.AdPatternPlayList.prototype._addToOutstandingArray=function(jb){this._outStandingPlayableNodeArray.push(jb);while(this._outStandingPlayableNodeArray.length>this._lookAheadAndBehindCount){this._returnNodeToPool(this._outStandingPlayableNodeArray.shift());}};xmp.playlistapi.AdPatternPlayList.prototype._getNodeFromPool=function(){var kb=new xmp.util.PlayableNode();kb._init();return kb;};xmp.playlistapi.AdPatternPlayList.prototype._returnNodeToPool=function(lb){lb._clear();lb=null;};xmp.playlistapi.AdPatternPlayList.prototype._createNode=function(){return this._getNodeFromPool();};xmp.playlistapi.AdPatternPlayList.prototype._initializeNode=function(mb){try{this._listener.handleInitializePlayableNode(mb);}
catch(e){throw this._createExtensionGuardException(e,'PlayListListener.handleInitializePlayableNode');}};xmp.playlistapi.AdPatternPlayList.prototype._lockForModification=function(){this._lockedForModification=true;};xmp.playlistapi.AdPatternPlayList.prototype._unlockForModification=function(){this._lockedForModification=false;};xmp.playlistapi.AdPatternPlayList.prototype._checkLockedForModification=function(){if(this._lockedForModification){throw new xmp.playlistapi.internals.PlayListError("Cannot modify playlist while it is locked.");}};xmp.playlistapi.AdPatternPlayList.prototype._getPatternRuleIdsHelper=function(nb,ob,pb){if(nb._isCompositeType()){var qb=nb._getChildCount();for(var i=0;i<qb;i++){var rb=nb._getChild(i);this._getPatternRuleIdsHelper(rb,ob,pb);}}
else{var sb=nb._getRuleContextArray();for(var j=0;j<sb.length;j++){var tb=sb[j].getId();if(!pb[tb]){pb[tb]=tb;ob.push(tb);}}}};xmp.createNamespace("xmp.playlistapi");xmp.playlistapi.AdResourceOverrideContext=function(ub,vb){this._node=ub;this._parameterMap=vb;};xmp.playlistapi.AdResourceOverrideContext.prototype.getNode=function(){return this._node;};xmp.playlistapi.AdResourceOverrideContext.prototype.addResource=function(wb){this._node.setMetaResource(wb);};xmp.playlistapi.AdResourceOverrideContext.prototype.getResource=function(xb){return this._node.getMetaResource(xb);};xmp.playlistapi.AdResourceOverrideContext.prototype.copyMetaResourceBundleRefFrom=function(yb){this._node.reSetMetaResourceBundle(yb.getMetaResourceBundle());};xmp.playlistapi.AdResourceOverrideContext.prototype.expandString=function(zb){return this._parameterMap.expandString(zb);};xmp.createNamespace("xmp.playlistapi");xmp.playlistapi.PlayListIterator=function(Ab){this._playList=Ab;this._currentNode=null;this._initialized=false;this._canAdvance=true;};xmp.playlistapi.PlayListIterator.prototype.first=function(){this._initialized=true;this._canAdvance=true;};xmp.playlistapi.PlayListIterator.prototype.next=function(){if(!this.hasNext()){throw new xmp.playlistapi.internals.PlayListError("Cannot call next if there are no more items to be returned, call 'hasNext' method to check.");}
this._canAdvance=true;return this._currentNode;};xmp.playlistapi.PlayListIterator.prototype.hasNext=function(){this._checkInitialized();if(this._canAdvance){this._currentNode=this._getNextCore();this._canAdvance=false;}
return(this._currentNode!==null);};xmp.playlistapi.PlayListIterator.prototype._getNextCore=function(){try{this._playList._checkLockedForModification();this._playList._lockForModification();return this._playList._getNextRuleFilteredPlayableNode();}
finally{this._playList._unlockForModification();}};xmp.playlistapi.PlayListIterator.prototype._checkInitialized=function(){if(!this._initialized){throw new xmp.playlistapi.internals.PlayListError("Iterator not initialized, call 'first' method.");}};xmp.createNamespace("xmp.playlistapi");xmp.playlistapi.PlayableNodeType=function(Bb,id,Cb){xmp.validateArguments(arguments,[xmp.OBJECT_TYPE,xmp.STRING_TYPE,xmp.STRING_TYPE],"PlayableNodeType.ctor");if(!xmp.isNonEmptyString(id)||!xmp.isNonEmptyString(Cb)){throw new xmp.util.internals.InvalidArgsError("PlayableNodeType requires non-empty 'id' and 'typeName'.");}
this._typeName=Cb;this._parent=null;this._id=id;this._directive=null;this._dataObject=Bb;};xmp.playlistapi.PlayableNodeType.prototype.getTypeName=function(){return this._typeName;};xmp.playlistapi.PlayableNodeType.prototype.getId=function(){return this._id;};xmp.playlistapi.PlayableNodeType.prototype.getDataObject=function(){return this._dataObject;};xmp.playlistapi.PlayableNodeType.prototype.getMetadata=function(Db,Eb){return null;};xmp.playlistapi.PlayableNodeType.prototype._getChildCount=function(){return 0;};xmp.playlistapi.PlayableNodeType.prototype._getParent=function(){return this._parent;};xmp.playlistapi.PlayableNodeType.prototype._isCompositeType=function(){return false;};xmp.playlistapi.PlayableNodeType.prototype._isContentCompositeType=function(){return false;};xmp.playlistapi.PlayableNodeType.prototype.isContentType=function(){return(this._typeName==='Content');};xmp.playlistapi.PlayableNodeType.prototype._setParent=function(Fb){this._parent=Fb;};xmp.playlistapi.PlayableNodeType.prototype._handlePostBuild=function(){};xmp.playlistapi.PlayableNodeType.prototype._setDirective=function(Gb){this._directive=Gb;};xmp.playlistapi.PlayableNodeType.prototype._getDirective=function(){return this._directive;};xmp.createNamespace("xmp.playlistapi");xmp.playlistapi.ResouceBundle=function(){xmp.playlistapi.ResouceBundle.ctor.call(this);this._map={};};xmp.DERIVE_CLASS(xmp.util.Loadable,xmp.playlistapi.ResouceBundle);xmp.playlistapi.ResouceBundle.prototype.setMetaResource=function(Hb){if(this.getMetaResource(Hb.getType())!==null){throw new xmp.util.internals.InvalidArgsError('Node type already has a resource of type: '+Hb.getType());}
this._map[Hb.getType()]=Hb;};xmp.playlistapi.ResouceBundle.prototype.getMetaResource=function(Ib){var Jb=this._map[Ib];return(Jb)?Jb:null;};xmp.playlistapi.ResouceBundle.prototype.getResourceTypes=function(){var Kb=[];for(var t in this._map){Kb.push(t);}
return Kb;};xmp.playlistapi.ResouceBundle.prototype.getCount=function(){return(this.getResourceTypes().length);};xmp.playlistapi.ResouceBundle.prototype.clone=function(){var Lb=new xmp.playlistapi.ResouceBundle();var Mb='';for(Mb in this._map){var Nb=this.getMetaResource(Mb);Lb.setMetaResource(Nb._clone());}
return Lb;};xmp.playlistapi.ResouceBundle.prototype.getLoadableId=function(){return'ResouceBundle';};xmp.createNamespace("xmp.playlistapi");xmp.playlistapi.Resource=function(id,Ob,Pb){xmp.playlistapi.Resource.ctor.call(this);xmp.validateArguments(arguments,[xmp.STRING_TYPE,xmp.STRING_TYPE,xmp.OBJECT_TYPE],"Resource.ctor");if(!(xmp.isNonEmptyString(id)&&xmp.isNonEmptyString(Ob))){throw new xmp.util.internals.InvalidArgsError("Parameters 'id' and 'type' must both be non-empty strings.");}
this._id=id;this._type=Ob;this._metadataMap=new xmp.util.internals.MetadataMap(false);this._metadataMap._reInitialize(Pb);this._companionAdId=-1;};xmp.DERIVE_CLASS(xmp.util.Loadable,xmp.playlistapi.Resource);xmp.playlistapi.Resource.prototype.getId=function(){return this._id;};xmp.playlistapi.Resource.prototype.setId=function(id){this._id=id;};xmp.playlistapi.Resource.prototype.getType=function(){return this._type;};xmp.playlistapi.Resource.prototype.getMetadata=function(Qb,Rb){return this._metadataMap._get(Qb,Rb);};xmp.playlistapi.Resource.prototype.setMetadata=function(Sb,Tb){this._metadataMap._set(Sb,Tb);};xmp.playlistapi.Resource.prototype.removeMetadata=function(Ub){this._metadataMap._remove(Ub);};xmp.playlistapi.Resource.prototype._clone=function(){return new xmp.playlistapi.Resource(this._id,this._type,this._metadataMap._getClonedWrappedMetadata());};xmp.playlistapi.Resource.prototype.getLoadableId=function(){return this.getId();};xmp.playlistapi.Resource.prototype.getCompanionAdId=function(){return this._companionAdId;};xmp.playlistapi.Resource.prototype.setCompanionAdId=function(Vb){this._companionAdId=Vb;};xmp.createNamespace("xmp.playlistapi");xmp.playlistapi.RuleContext=function(id,Wb,Xb,Yb){xmp.validateArguments(arguments,[xmp.STRING_TYPE,xmp.OBJECT_TYPE,xmp.OBJECT_TYPE,xmp.BOOLEAN_TYPE],"RuleContext.ctor");if(id===null||id.length===0){throw new xmp.util.internals.InvalidArgsError("RuleContext requires non-empty ID.");}
if(Xb.length<1){throw new xmp.util.internals.InvalidArgsError("RuleContext at least one applicable type.");}
this._id=id;this._metadataMap=new xmp.util.internals.MetadataMap(Yb);this._metadataMap._reInitialize(Wb);this._applicableTypeArray=Xb;};xmp.playlistapi.RuleContext.createDynamic=function(id,Zb){return new xmp.playlistapi.RuleContext(id,Zb,['dynamic'],true);};xmp.playlistapi.RuleContext.prototype.getId=function(){return this._id;};xmp.playlistapi.RuleContext.prototype.getMetadata=function($b,ac){return this._metadataMap._get($b,ac);};xmp.playlistapi.RuleContext.prototype.isApplicable=function(bc){if(bc.toLowerCase()==='all'){return true;}
for(var i=0;i<this._applicableTypeArray.length;i++){if(this._applicableTypeArray[i]===bc){return true;}}
return false;};xmp.createNamespace("xmp.playlistapi");xmp.playlistapi.RuleSetRunContext=function(){this._playableNode=null;this._currentRuleContext=null;};xmp.playlistapi.RuleSetRunContext.prototype.getPlayableNode=function(){return this._playableNode;};xmp.playlistapi.RuleSetRunContext.prototype.getCurrentRuleContext=function(){return this._currentRuleContext;};xmp.playlistapi.RuleSetRunContext.prototype._initialize=function(cc){this._playableNode=cc;this._currentRuleContext=null;};xmp.playlistapi.RuleSetRunContext.prototype._setCurrentRuleContext=function(dc){this._currentRuleContext=dc;};xmp.createNamespace("xmp.playlistapi.internals");xmp.playlistapi.internals.AdPatternBuilder=function(ec){xmp.validateArguments(arguments,[xmp.OBJECT_TYPE],"AdPatternBuilder.ctor");this._logger=new xmp.util.internals.CategoryLogger('AdPatternBuilder');this._COMPOSITE_TYPE_ARRAY=['Composite','ContentComposite'];this._patternMap=null;this._parameterMap=ec;};xmp.playlistapi.internals.AdPatternBuilder.prototype._build=function(fc){try{this._patternMap=fc.patternMap;if(!this._isComposite(fc.root)){throw new xmp.playlistapi.internals.PlayListError("Root of ad pattern must have type of one of the following: "+this._COMPOSITE_TYPE_ARRAY.join(', '));}
var gc=this._buildHelper(fc.root,true);fc=null;return gc;}
catch(e){var hc="Error building Ad Pattern with memento data";this._logger.warn(hc,e);hc+=", error = ";hc+=xmp.extractErrorMessage(e);throw new xmp.playlistapi.internals.PlayListError(hc);}};xmp.playlistapi.internals.AdPatternBuilder.prototype._isComposite=function(ic){for(var i=0;i<this._COMPOSITE_TYPE_ARRAY.length;i++){if(ic.type===this._COMPOSITE_TYPE_ARRAY[i]){return true;}}
return false;};xmp.playlistapi.internals.AdPatternBuilder.prototype._buildHelper=function(jc,kc){var lc=null;if(this._isComposite(jc)){var mc=(typeof jc.repeat==="number")?jc.repeat:1;lc=new xmp.playlistapi.internals[jc.type+'PlayableNodeType'](jc,(kc?'/':this._calcId(jc)),jc.type,jc.pattern,mc);if(lc._isDeferred()){lc._setReadyToValidate(false);}
else{var nc=this._patternMap[lc._getPatternName()];this._buildChildren(lc,nc);}}
else{lc=new xmp.playlistapi.internals.RuleSetPlayableNodeType(jc,this._calcId(jc),jc.type,this._buildRuleContextArray(jc.rules,jc.type),this._extractOptionalMetaData(jc));this._extractOptionalResources(jc,lc);this._extractOptionalDirective(jc,lc);}
lc._handlePostBuild();return lc;};xmp.playlistapi.internals.AdPatternBuilder.prototype._calcId=function(oc){return(typeof(oc.id)==='string')?oc.id:oc.type;};xmp.playlistapi.internals.AdPatternBuilder.prototype._extractOptionalDirective=function(pc,qc){var rc=xmp.playlistapi.internals.PatternDirectiveFactory.create(pc);qc._setDirective(rc);};xmp.playlistapi.internals.AdPatternBuilder.prototype._extractOptionalResources=function(sc,tc){if(typeof sc.resources==='object'){for(var i=0;i<sc.resources.length;i++){var uc=sc.resources[i];tc.setMetaResource(this._buildMetaResource(uc));}}};xmp.playlistapi.internals.AdPatternBuilder.prototype._buildChildren=function(vc,wc){for(var i=0;i<wc.length;i++){var xc=this._buildHelper(wc[i],false);vc._addChild(xc);}};xmp.playlistapi.internals.AdPatternBuilder.prototype._buildDeferredContentComposite=function(yc,zc){this._buildChildren(yc,zc);yc._setReadyToValidate(true);yc._handlePostBuild();};xmp.playlistapi.internals.AdPatternBuilder.prototype._buildRuleContextArray=function(Ac,Bc){var Cc=[];if(typeof Ac==="object"){for(var i=0;i<Ac.length;i++){Cc.push(this._buildRuleContext(Ac[i],Bc));}}
return Cc;};xmp.playlistapi.internals.AdPatternBuilder.prototype._buildMetaResource=function(Dc){return new xmp.playlistapi.Resource(this._parameterMap.expandStringAndFixSlashes(Dc.id),Dc.type,this._extractOptionalMetaData(Dc));};xmp.playlistapi.internals.AdPatternBuilder.prototype._buildRuleContext=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.playlistapi.RuleContext(this._parameterMap.expandString(Ec.id),this._extractOptionalMetaData(Ec),Gc,true);};xmp.playlistapi.internals.AdPatternBuilder.prototype._extractOptionalMetaData=function(Hc){var Ic={};if(typeof Hc.meta==="object"){var Jc='';for(Jc in Hc.meta){var Kc=this._parameterMap.expandString(Hc.meta[Jc]);Ic[Jc]=Kc;}}
return Ic;};xmp.createNamespace("xmp.playlistapi.internals");xmp.playlistapi.internals.CompositePlayableNodeType=function(Lc,id,Mc,Nc,Oc){xmp.validateArguments(arguments,[xmp.OBJECT_TYPE,xmp.STRING_TYPE,xmp.STRING_TYPE,xmp.STRING_TYPE,xmp.NUMBER_TYPE],"CompositePlayableNodeType.ctor");if(Nc===null||Nc.length===0){throw new xmp.util.internals.InvalidArgsError("CompositePlayableNodeType requires non-empty patternName.");}
if(Oc<1){throw new xmp.util.internals.InvalidArgsError("CompositePlayableNodeType must have a repeat count of 1 or greater.");}
this._patternName=Nc;this._repeatCount=Oc;this._children=[];xmp.playlistapi.internals.CompositePlayableNodeType.ctor.call(this,Lc,id,Mc);};xmp.DERIVE_CLASS(xmp.playlistapi.PlayableNodeType,xmp.playlistapi.internals.CompositePlayableNodeType);xmp.playlistapi.internals.CompositePlayableNodeType.prototype._getRepeatCount=function(){return this._repeatCount;};xmp.playlistapi.internals.CompositePlayableNodeType.prototype._isDeferred=function(){return(this._patternName.toLowerCase()==='deferred');};xmp.playlistapi.internals.CompositePlayableNodeType.prototype._getPatternName=function(){return this._patternName;};xmp.playlistapi.internals.CompositePlayableNodeType.prototype._getChildCount=function(){return this._children.length;};xmp.playlistapi.internals.CompositePlayableNodeType.prototype._getChild=function(Pc){xmp.validateArguments(arguments,[xmp.NUMBER_TYPE],"CompositePlayableNodeType._getChild");return this._children[Pc];};xmp.playlistapi.internals.CompositePlayableNodeType.prototype._addChild=function(Qc){var Rc=this._children.push(Qc);Qc._setParent(this);return Rc;};xmp.playlistapi.internals.CompositePlayableNodeType.prototype._isCompositeType=function(){return true;};xmp.playlistapi.internals.CompositePlayableNodeType.prototype._removeAllChildren=function(){this._children=[];};xmp.createNamespace("xmp.playlistapi.internals");xmp.playlistapi.internals.ContentCompositePlayableNodeType=function(Sc,id,Tc,Uc,Vc){xmp.playlistapi.internals.ContentCompositePlayableNodeType.ctor.call(this,Sc,id,Tc,Uc,Vc);this._readyToValidate=true;};xmp.DERIVE_CLASS(xmp.playlistapi.internals.CompositePlayableNodeType,xmp.playlistapi.internals.ContentCompositePlayableNodeType);xmp.playlistapi.internals.ContentCompositePlayableNodeType.prototype._setReadyToValidate=function(Wc){this._readyToValidate=Wc;};xmp.playlistapi.internals.ContentCompositePlayableNodeType.prototype._handlePostBuild=function(){if(!this._readyToValidate){return;}
function throwContentChildException(){throw new xmp.playlistapi.internals.PlayListError("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 Xc=-1;var Yc=this._getChildCount();for(var i=0;i<Yc;i++){var Zc=this._getChild(i);if(Zc._isCompositeType()){throwContentChildException();}
if(Zc.isContentType()){if(Xc===-1){Xc=i;}
else{throwContentChildException();}}}
if(Xc===-1){throwContentChildException();}};xmp.playlistapi.internals.ContentCompositePlayableNodeType.prototype._isContentCompositeType=function(){return true;};xmp.createNamespace("xmp.playlistapi.internals");xmp.playlistapi.internals.DefaultAdDataPatternDirective=function($c,ad,bd){xmp.playlistapi.internals.DefaultAdDataPatternDirective.ctor.call(this,$c,ad,bd);};xmp.DERIVE_CLASS(xmp.playlistapi.internals.PatternDirective,xmp.playlistapi.internals.DefaultAdDataPatternDirective);xmp.playlistapi.internals.DefaultAdDataPatternDirective.prototype.doDirective=function(cd,dd){var ed=this.getMetadata('refId','');var fd=this.getMetadata('defaultDataId','');if(ed.length===0||fd.length===0){throw new xmp.playlistapi.internals.PlayListError("Directive '"+this.getType()+"' requires metadata 'refId' and 'defaultDataId'.");}
var gd=this._findNamedContentNode(cd,dd,ed);var hd=gd.getPlayableData().getDataObject().adDataMap;if(typeof hd!=='object'){throw new xmp.playlistapi.internals.PlayListError("Did not find 'adDataMap' for content node: "+gd.getBestId());}
var jd=hd[fd];if(typeof jd!=='object'){throw new xmp.playlistapi.internals.PlayListError("Did not find '"+fd+"' in 'adDataMap' for content node: "+gd.getBestId());}
var kd=cd._getParameterMapInternal().clone();kd.setOverrides(this.getParameterArray());kd.addContextObject('video',gd.getPlayableData().getDataObject());kd.addContextObject('node',dd.getNodeType().getDataObject());var ld=new xmp.playlistapi.internals.AdPatternBuilder(kd);if(typeof jd.resources==='object'){for(var i=0;i<jd.resources.length;i++){var md=jd.resources[i];dd.setMetaResource(ld._buildMetaResource(md));}}
var nd=ld._extractOptionalMetaData(jd);var od='';for(od in nd){var pd=nd[od];dd.setMetadata(od,pd);}
dd.setMetadata('__DIRECTIVE_PARAMETER_MAP__',kd);};xmp.createNamespace("xmp.playlistapi.internals");xmp.playlistapi.internals.NullPatternDirective=function(){};xmp.playlistapi.internals.NullPatternDirective._flyWeight=new xmp.playlistapi.internals.NullPatternDirective();xmp.playlistapi.internals.NullPatternDirective.getNull=function(){return xmp.playlistapi.internals.NullPatternDirective._flyWeight;};xmp.playlistapi.internals.NullPatternDirective.prototype.getType=function(){return'Null';};xmp.playlistapi.internals.NullPatternDirective.prototype.doDirective=function(qd,rd){};xmp.createNamespace("xmp.playlistapi.internals");xmp.playlistapi.internals.ParameterMap=function(){this._logger=new xmp.util.internals.CategoryLogger('ParameterMap');this._map={};this._contextObjectMap={};};xmp.playlistapi.internals.ParameterMap.calcInitial=function(sd,td){xmp.validateArguments(arguments,[xmp.OBJECT_TYPE,xmp.OBJECT_TYPE],"ParameterMap.calcInitial");var ud=new xmp.playlistapi.internals.ParameterMap();ud.init(sd);ud.setOverrides(td);return ud;};xmp.playlistapi.internals.ParameterMap.prototype.clone=function(){var vd=new xmp.playlistapi.internals.ParameterMap();vd._cloneInternal(this._map);return vd;};xmp.playlistapi.internals.ParameterMap.prototype.init=function(wd){this._map=this._mapParameters((typeof wd.parameters==='object')?wd.parameters:[]);};xmp.playlistapi.internals.ParameterMap.prototype.setOverrides=function(xd){this._validateParameters(xd);for(var i=0;i<xd.length;i++){var p=xd[i];if(typeof this._map[p.name]==='undefined'){this._logger.warn('Pattern input parameter dropped, no default value in pattern: '+p.name);continue;}
this._map[p.name]=p.value;}};xmp.playlistapi.internals.ParameterMap.prototype.expandStringAndFixSlashes=function(yd){var zd='://';var Ad=this.expandString(yd);var Bd='';var Cd=Ad;if(Ad.indexOf(zd)>-1){var Dd=Ad.split(zd);Bd=Dd[0]+zd;Cd=Dd[1];}
while(Cd.indexOf('//')>-1){Cd=Cd.replace(/\/\//g,'/');}
return Bd+Cd;};xmp.playlistapi.internals.ParameterMap.prototype.expandString=function(Ed){if(typeof Ed!=='string'){return Ed;}
if(Ed.indexOf('${')!==-1){var Fd=false;if(Ed.indexOf('$${')!==-1){Ed=Ed.replace(/\$\$\{/g,'__PROTECT_DOLLAR_ESCAPE__');Fd=true;}
Ed=Ed.replace(/\$\{player./g,'${');var Gd='';for(Gd in this._map){var Hd=this._map[Gd];var Id='${'+Gd+'}';if(Ed.indexOf(Id)!==-1){var Jd=Ed.split(Id);Ed=Jd.join(Hd);}}
Ed=this._makeContextObjectSubs(Ed);if(Fd){Ed=Ed.replace(/__PROTECT_DOLLAR_ESCAPE__/g,'${');}}
return Ed;};xmp.playlistapi.internals.ParameterMap.prototype._makeContextObjectSubs=function(Kd){var Ld=0;var Md=true;while(Md){var Nd=Kd.indexOf('${',Ld);if(Nd===-1){Md=false;break;}
var Od=Kd.indexOf('}',Nd+1);if(Od===-1){Md=false;break;}
Ld=Od+1;var Pd=Kd.substr(0,Nd);var Qd=Kd.substr(Od+1);var Rd=Kd.substr(Nd+2,Od-Nd-2);var Sd=Rd.indexOf('.');if(Sd===-1){continue;}
var Td=Rd.substr(0,Sd);var Ud=Rd.substr(Sd+1);var Vd=this._contextObjectMap[Td];if(!Vd){continue;}
var Wd=null;try{Wd=xmp.util.JsonPath.evaluate(Vd,Ud);}
catch(e){Wd=null;this._logger.warn('Error evaluating JSON Path: '+Ud,e);}
if(Wd!==null){var Xd=Kd.length;Kd=Pd+Wd+Qd;Ld+=(Kd.length-Xd);}}
return Kd;};xmp.playlistapi.internals.ParameterMap.prototype.addContextObject=function(Yd,Zd){this._contextObjectMap[Yd]=Zd;};xmp.playlistapi.internals.ParameterMap.prototype._validateParameters=function($d){for(var i=0;i<$d.length;i++){var p=$d[i];if(!((typeof p.name==='string')&&(p.name.length>0)&&(typeof p.value==='string'))){throw new xmp.playlistapi.internals.PlayListError("Parameters must have string 'name and 'value' properties.");}}};xmp.playlistapi.internals.ParameterMap.prototype._mapParameters=function(ae){this._validateParameters(ae);var be={};for(var i=0;i<ae.length;i++){var p=ae[i];be[p.name]=p.value;}
return be;};xmp.playlistapi.internals.ParameterMap.prototype._cloneInternal=function(ce){var de='';for(de in ce){var ee=ce[de];this._map[de]=ee;}};xmp.createNamespace("xmp.playlistapi.internals");xmp.playlistapi.internals.PatternDirectiveFactory=function(){};xmp.playlistapi.internals.PatternDirectiveFactory._ctors=null;xmp.playlistapi.internals.PatternDirectiveFactory.create=function(fe){if(xmp.playlistapi.internals.PatternDirectiveFactory._ctors===null){xmp.playlistapi.internals.PatternDirectiveFactory._ctors={};var ge=xmp.playlistapi.internals.PatternDirectiveFactory._ctors;ge['defaultAdData']=xmp.playlistapi.internals.DefaultAdDataPatternDirective;}
if(typeof fe.patternDirective==='object'){var he=xmp.playlistapi.internals.PatternDirectiveFactory._ctors[fe.patternDirective.type];if(he){var ie=fe.patternDirective.parameters;ie=(!ie)?[]:ie;var je=fe.patternDirective.meta;je=(!je)?{}:je;return new he(fe.patternDirective.type,je,ie);}
else{throw new xmp.util.internals.InvalidArgsError('Unknown directive type: '+fe.patternDirective.type);}}
else{return xmp.playlistapi.internals.NullPatternDirective.getNull();}};xmp.createNamespace("xmp.playlistapi.internals");xmp.playlistapi.internals.PlayListAddress=function(){this._array=[];};xmp.playlistapi.internals.PlayListAddress.prototype.getLength=function(){return this._array.length;};xmp.playlistapi.internals.PlayListAddress.prototype.clone=function(){var ke=new xmp.playlistapi.internals.PlayListAddress();ke._cloneInternal(this._array);return ke;};xmp.playlistapi.internals.PlayListAddress.prototype._cloneInternal=function(le){this._array=this._array.concat(le);};xmp.playlistapi.internals.PlayListAddress.prototype.getAtIndex=function(me){return this._array[me];};xmp.playlistapi.internals.PlayListAddress.prototype.shift=function(){return this._array.shift();};xmp.playlistapi.internals.PlayListAddress.prototype.push=function(ne){return this._array.push(ne);};xmp.playlistapi.internals.PlayListAddress.prototype.pop=function(){return this._array.pop();};xmp.playlistapi.internals.PlayListAddress.prototype.getParent=function(){var oe=this.clone();oe.pop();return oe;};xmp.playlistapi.internals.PlayListAddress.prototype.isSibling=function(pe,qe){var re=this.getLength();if(re!==pe.getLength()){return false;}
for(var i=0;i<re;i++){var se=this.getAtIndex(i);var te=pe.getAtIndex(i);if(i<(re-1)){if(!se.isEqual(te)){return false;}}
else{if(qe){if(se.getRepeatIndex()!==te.getRepeatIndex()){return false;}}}}
return true;};xmp.playlistapi.internals.PlayListAddress.prototype.asString=function(){var s='';var ue=this.getLength();for(var i=0;i<ue;i++){var ve=this.getAtIndex(i);s+=ve.asString();if(i!==(ue-1)){s+=',';}}
return s;};xmp.createNamespace("xmp.playlistapi.internals");xmp.playlistapi.internals.PlayListAddressPart=function(we,xe){this._repeatIndex=we;this._childIndex=xe;};xmp.playlistapi.internals.PlayListAddressPart.prototype.getRepeatIndex=function(){return this._repeatIndex;};xmp.playlistapi.internals.PlayListAddressPart.prototype.getChildIndex=function(){return this._childIndex;};xmp.playlistapi.internals.PlayListAddressPart.prototype.isEqual=function(ye){return(ye.getRepeatIndex()===this.getRepeatIndex()&&ye.getChildIndex()==this.getChildIndex());};xmp.playlistapi.internals.PlayListAddressPart.prototype.asString=function(){return('['+this._repeatIndex+','+this._childIndex+']');};xmp.createNamespace("xmp.playlistapi.internals");xmp.playlistapi.internals.PlayListBuilder=function(ze,Ae,Be,Ce,De){try{this._STATE_TRAVERSE_TO_ADDRESS=0;this._STATE_TRAVERSE_TO_NEXT=1;this._STATE_BUILD=2;this._logger=new xmp.util.internals.CategoryLogger('PlayListBuilder');this._playList=ze;this._playableDataProvider=De;this._contentMetaResourceIdArray=[];this._playListDataArray=[];this._traverseToPatternAddress=new xmp.playlistapi.internals.PlayListAddress();this._build_state=this._STATE_TRAVERSE_TO_ADDRESS;this._assignPatternAddress=new xmp.playlistapi.internals.PlayListAddress();this._contentCompositeIdToContentNodeMap={};this._parentIdCounter=0;this._contentMetaResourceIdArray=this._contentMetaResourceIdArray.concat(Ce);if(Ae!==null){this._traverseToPatternAddress=Ae._getPatternAddress().clone();}
if(this._traverseToPatternAddress.getLength()===0){this._build_state=this._STATE_BUILD;}
this._buildHelper(Be,0);this._initializeNodes();}
catch(e){var Ee="Error building playlist with meta resource IDs";this._logger.warn(Ee,e);Ee+=", error = ";Ee+=xmp.extractErrorMessage(e);throw new xmp.playlistapi.internals.PlayListError(Ee);}};xmp.playlistapi.internals.PlayListBuilder.prototype._getOutput=function(){var Fe=[];for(var i=0;i<this._playListDataArray.length;i++){var Ge=this._playListDataArray[i];var He=Ge[0];Fe.push(He);}
if(this._logger.isDebugEnabled()){var Ie='Node output: ';for(var j=0;j<Fe.length;j++){Ie+=('('+j.toString()+') ');Ie+=Fe[j].getBestId();Ie+=('('+Fe[j]._getPatternAddress().asString()+')');if(j!==(Fe.length-1)){Ie+=', ';}}
this._logger.debug(Ie);}
return Fe;};xmp.playlistapi.internals.PlayListBuilder.prototype._buildHelper=function(Je,Ke){if(Je._isCompositeType()){var Le=0;var Me=0;if(this._build_state===this._STATE_TRAVERSE_TO_ADDRESS){var Ne=this._traverseToPatternAddress.shift();Le=Ne.getRepeatIndex();Me=Ne.getChildIndex();if(this._traverseToPatternAddress.getLength()===0){this._build_state=this._STATE_TRAVERSE_TO_NEXT;}}
if(this._build_state!==this._STATE_TRAVERSE_TO_ADDRESS&&Je._isDeferred()){Je=this._buildDeferredContentComposite(Je);}
var Oe=Je._getRepeatCount();var Pe=Je._getChildCount();for(var Qe=Le;Qe<Oe;Qe++){if(this._contentMetaResourceIdArray.length===0){break;}
this._parentIdCounter++;if(this._build_state===this._STATE_BUILD){Me=0;}
for(var Re=Me;Re<Pe;Re++){var Se=Je._getChild(Re);this._assignPatternAddress.push(new xmp.playlistapi.internals.PlayListAddressPart(Qe,Re));this._buildHelper(Se,this._parentIdCounter);this._assignPatternAddress.pop();}}}
else{if(this._build_state===this._STATE_BUILD){this._buildLeaf(Je,Ke);}
else if(this._build_state===this._STATE_TRAVERSE_TO_NEXT){this._build_state=this._STATE_BUILD;}}};xmp.playlistapi.internals.PlayListBuilder.prototype._buildLeaf=function(Te,Ue){var Ve=this._playList._createNode();if(Te.isContentType()){if(this._contentMetaResourceIdArray.length===0){Ve._mutateEmptySlot(true);Ve._setData(new xmp.util.PlayableData('EMPTY_SLOT'));}
else{var We=this._contentMetaResourceIdArray.shift();Ve._linkData(this._playableDataProvider,We);}}
Ve._setNodeType(Te);Ve._setPatternAddress(this._assignPatternAddress.clone());if(Ve.isContentType()&&Ve.getNodeType()._getParent()._isContentCompositeType()){Ve.getPlayableData()._setCompositeMetaResourceId(Ve.getPlayableData().getMetaResourceId());this._contentCompositeIdToContentNodeMap[Ue.toString()]=Ve;}
this._playListDataArray.push([Ve,Ue]);};xmp.playlistapi.internals.PlayListBuilder.prototype._initializeNodes=function(){for(var i=0;i<this._playListDataArray.length;i++){var Xe=this._playListDataArray[i];var Ye=Xe[0];var Ze=Xe[1];try{Ye.getNodeType()._getDirective().doDirective(this,Ye);}
catch(e){this._logger.warn('Error processing directive',e);}
if(Ye.getPlayableData()===null){var $e=Ye.getMetaResource('primary');Ye._setData(new xmp.util.PlayableData(($e)?$e.getId():''));}
if(!Ye.isContentType()&&Ye.getNodeType()._getParent()._isContentCompositeType()){this._fixContentCompositeSibling(Ye,Ze);}
if(!Ye._isEmptySlot()&&!Ye.getPlayableData().isError()){this._playList._initializeNode(Ye);}}};xmp.playlistapi.internals.PlayListBuilder.prototype._fixContentCompositeSibling=function(af,bf){var cf=this._contentCompositeIdToContentNodeMap[bf.toString()];if(cf._isEmptySlot()){af._mutateEmptySlot(true);}
af.getPlayableData()._setCompositeMetaResourceId(cf.getPlayableData().getCompositeMetaResourceId());};xmp.playlistapi.internals.PlayListBuilder.prototype._buildDeferredContentComposite=function(df){df._removeAllChildren();if(this._contentMetaResourceIdArray.length>0){var ef=this._contentMetaResourceIdArray[0];var ff=this._playableDataProvider._getPlayableData(ef);var gf=null;if(ff.isError()){gf=[{type:'Content'}];}
else{gf=ff.getDataObject().pattern;}
var hf=new xmp.playlistapi.internals.AdPatternBuilder(this._playList._getParameterMapInternal());hf._buildDeferredContentComposite(df,gf);}
return df;};xmp.playlistapi.internals.PlayListBuilder.prototype._getParameterMapInternal=function(){return this._playList._getParameterMapInternal();};xmp.playlistapi.internals.PlayListBuilder.prototype._getPlayListDataArrayLength=function(){return this._playListDataArray.length;};xmp.playlistapi.internals.PlayListBuilder.prototype._getPlayListDataArrayItemAtIndex=function(jf){var kf=this._playListDataArray[jf];return kf[0];};xmp.createNamespace("xmp.playlistapi.internals");xmp.playlistapi.internals.PlayListError=function(lf){this.name="xmp.playlistapi.internals.PlayListError";this.message=lf;};xmp.DERIVE_CLASS(Error,xmp.playlistapi.internals.PlayListError);xmp.createNamespace("xmp.playlistapi.internals");xmp.playlistapi.internals.RuleSetPlayableNodeType=function(mf,id,nf,of,pf){xmp.validateArguments(arguments,[xmp.OBJECT_TYPE,xmp.STRING_TYPE,xmp.STRING_TYPE,xmp.OBJECT_TYPE,xmp.OBJECT_TYPE],"RuleSetPlayableNodeType.ctor");this._metadataMap=new xmp.util.internals.MetadataMap(true);this._metadataMap._reInitialize(pf);this._ruleContextArray=of;this._metaResourceBundle=new xmp.playlistapi.ResouceBundle();xmp.playlistapi.internals.RuleSetPlayableNodeType.ctor.call(this,mf,id,nf);};xmp.DERIVE_CLASS(xmp.playlistapi.PlayableNodeType,xmp.playlistapi.internals.RuleSetPlayableNodeType);xmp.playlistapi.internals.RuleSetPlayableNodeType.prototype.setMetaResource=function(qf){this._metaResourceBundle.setMetaResource(qf);};xmp.playlistapi.internals.RuleSetPlayableNodeType.prototype.getMetaResource=function(rf){return this._metaResourceBundle.getMetaResource(rf);};xmp.playlistapi.internals.RuleSetPlayableNodeType.prototype.getMetaResourceBundle=function(){return this._metaResourceBundle;};xmp.playlistapi.internals.RuleSetPlayableNodeType.prototype.getMetadata=function(sf,tf){return this._metadataMap._get(sf,tf);};xmp.playlistapi.internals.RuleSetPlayableNodeType.prototype._getRuleContextArray=function(){return this._ruleContextArray;};xmp.playlistapi.internals.RuleSetPlayableNodeType.prototype._getMetadataMapRef=function(){return this._metadataMap;};