1(function(d){function f(a){this._loopingOn=a.loopingOn;this._randomPlay=a.randomPlay;this._playlistItems;this._lastInOrder=!1;this._counter=-1;this._lastPlayedFromPlaylistClick;this._lastRandomCounter;this._traceCounter=this._randomPaused=!1;this._randomArr=[];this._playlistSelect=!1}d.playlistManager=function(a){return new f(a)};f.prototype={setCounter:function(a,b){"undefined"===typeof b&&(b=!0);this._counter=b?this._counter+parseInt(a,10):parseInt(a,10);this._checkCounter()},getCounter:function(){return this._randomPlay? this._playlistSelect?this._counter:this._randomArr[this._counter]:this._counter},advanceHandler:function(a){this._playlistSelect=!1;this._randomPaused?this._handleRandomPaused(a):this.setCounter(a)},processPlaylistRequest:function(a){this._playlistSelect=!1;this._randomPlay&&(this._playlistSelect=!0,this._lastPlayedFromPlaylistClick=a,this._randomPaused||(this._lastRandomCounter=this._counter,this._randomPaused=!0));this.setCounter(a,!1)},getLastInOrder:function(){return this._lastInOrder},getRandomPaused:function(){return this._randomPaused}, setPlaylistItems:function(a,b){"undefined"===typeof b&&(b=!0);b&&(this._counter=-1);this._playlistItems=a;this._randomPlay&&this._makeRandomList()},reSetCounter:function(a){"undefined"===typeof a?this._counter=-1:this._playlistItems?(a>this._playlistItems-1?a=this._playlistItems-1:0>a&&(a=0),this._counter=a):this._counter=-1},setRandom:function(a){(this._randomPlay=a)&&this._makeRandomList();this._randomChange()},setLooping:function(a){this._loopingOn=a},setTraceCounter:function(a){this._traceCounter= a},_handleRandomPaused:function(a){var b=d(this);this._randomPaused=!1;this._lastRandomCounter+a>this._playlistItems-1?(this._counter=this._playlistItems-1,b.trigger("ap_PlaylistManager.COUNTER_READY")):0>this._lastRandomCounter+a?(this._counter=0,b.trigger("ap_PlaylistManager.COUNTER_READY")):this.setCounter(this._lastRandomCounter+a,!1)},_randomChange:function(){this._randomPlay?(this._activeIndexFirst(),this._counter=0):this._randomPaused?(this._counter=this._lastPlayedFromPlaylistClick,this._randomPaused= !1):this._counter=this._randomArr[this._counter]},_checkCounter:function(){if(isNaN(this._counter))alert("ap_PlaylistManager message: No active media, counter = "+this._counter);else{var a=d(this);this._lastInOrder=!1;this._loopingOn?(this._randomPlay?this._counter>this._playlistItems-1?(this._counter=this._randomArr[this._playlistItems-1],this._makeRandomList(),this._firstIndexCheck(),this._counter=0,a.trigger("ap_PlaylistManager.PLAYLIST_END_ALERT")):0>this._counter&&(this._counter=this._randomArr[0], this._makeRandomList(),this._lastIndexCheck(),this._counter=this._playlistItems-1):this._counter>this._playlistItems-1?(this._counter=0,a.trigger("ap_PlaylistManager.PLAYLIST_END_ALERT")):0>this._counter&&(this._counter=this._playlistItems-1),a.trigger("ap_PlaylistManager.COUNTER_READY")):(this._counter>this._playlistItems-1?(this._counter=this._playlistItems-1,this._lastInOrder=!0):0>this._counter&&(this._counter=0),this._lastInOrder?a.trigger("ap_PlaylistManager.PLAYLIST_END"):a.trigger("ap_PlaylistManager.COUNTER_READY")); this._traceCounter&&console.log("counter = "+this.getCounter())}},_makeRandomList:function(){3>this._playlistItems||(this._randomArr=this._randomiseIndex(this._playlistItems))},_firstIndexCheck:function(){if(this._randomArr[0]==this._counter){var a=this._randomArr.splice(0,1);this._randomArr.push(a)}},_lastIndexCheck:function(){if(this._randomArr[this._playlistItems-1]==this._counter){var a=this._randomArr.splice(this._playlistItems-1,1);this._randomArr.unshift(a)}},_activeIndexFirst:function(){var a= 0,b=this._randomArr.length;for(a;a<b;a++)if(this._randomArr[a]==this._counter){if(0==a)break;a=this._randomArr.splice(a,1);this._randomArr.unshift(parseInt(a,10));break}},_randomiseIndex:function(a){var b=[],d=[],c=0;for(c;c<a;c++)b[c]=c;var c=0,e;for(c;c<a;c++)e=Math.round(Math.random()*(b.length-1)),d[c]=b[e],b.splice(e,1);return d}}})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.