1! function(s, t) { 2 PenciPCPlaylist = function(t, e, i) { 3 var l = this; 4 this.current = 0, this.loop = !1, this.shuffled = !1, this.removing = !1, this.cssSelector = s.extend({}, this._cssSelector, t), this.options = s.extend(!0, { 5 keyBindings: { 6 next: { 7 key: 221, 8 fn: function() { 9 l.next() 10 } 11 }, 12 previous: { 13 key: 219, 14 fn: function() { 15 l.previous() 16 } 17 }, 18 shuffle: { 19 key: 83, 20 fn: function() { 21 l.shuffle() 22 } 23 } 24 }, 25 stateClass: { 26 shuffled: "jp-state-shuffled" 27 } 28 }, this._options, i), this.playlist = [], this.original = [], this._initPlaylist(e), l.current = this.options.playlistOptions.itemSelect, this.cssSelector.playlist = s(this.cssSelector.cssSelectorAncestor + " " + this.cssSelector.playlist), this.cssSelector.details = this.cssSelector.cssSelectorAncestor + " " + this.cssSelector.details, this.cssSelector.next = this.cssSelector.cssSelectorAncestor + " " + this.cssSelector.next, this.cssSelector.previous = this.cssSelector.cssSelectorAncestor + " " + this.cssSelector.previous, this.cssSelector.shuffle = this.cssSelector.cssSelectorAncestor + " " + this.cssSelector.shuffle, this.cssSelector.shuffleOff = this.cssSelector.cssSelectorAncestor + " " + this.cssSelector.shuffleOff, this.options.cssSelectorAncestor = this.cssSelector.cssSelectorAncestor, this.options.cssSelector = s.extend({}, this.cssSelector), delete this.options.cssSelector.cssSelectorAncestor, delete this.options.cssSelector.jPlayer, this.options.repeat = function(s) { 29 l.loop = s.jPlayer.options.loop 30 }, s(this.cssSelector.jPlayer).on(s.jPlayer.event.ready, (function() { 31 l._init() 32 })), s(this.cssSelector.jPlayer).on(s.jPlayer.event.ended, (function() { 33 l.next() 34 })), s(this.cssSelector.jPlayer).on(s.jPlayer.event.play, (function() { 35 s(this).jPlayer("pauseOthers") 36 })), s(this.cssSelector.jPlayer).on(s.jPlayer.event.resize, (function(t) { 37 t.jPlayer.options.fullScreen ? s(l.cssSelector.details).show() : s(l.cssSelector.details).hide() 38 })), s(this.cssSelector.previous).on("click", (function(s) { 39 s.preventDefault(), l.previous(), l.blur(this) 40 })), s(this.cssSelector.next).on("click", (function(s) { 41 s.preventDefault(), l.next(), l.blur(this) 42 })), s(this.cssSelector.shuffle).on("click", (function(t) { 43 t.preventDefault(), l.shuffled && s(l.cssSelector.jPlayer).jPlayer("option", "useStateClassSkin") ? l.shuffle(!1) : l.shuffle(!0), l.blur(this) 44 })), s(this.cssSelector.shuffleOff).on("click", (function(s) { 45 s.preventDefault(), l.shuffle(!1), l.blur(this) 46 })).hide(), this.options.fullScreen || s(this.cssSelector.details).hide(), this.cssSelector.playlist.find("ul").empty(), this._createItemHandlers(), s(this.cssSelector.jPlayer).jPlayer(this.options) 47 }, PenciPCPlaylist.prototype = { 48 _cssSelector: { 49 jPlayer: "#jquery_jplayer_1", 50 cssSelectorAncestor: "#jp_container_1" 51 }, 52 _options: { 53 playlistOptions: { 54 autoPlay: !1, 55 loopOnPrevious: !1, 56 shuffleOnLoop: !0, 57 enableRemoveControls: !1, 58 displayTime: "slow", 59 addTime: "fast", 60 removeTime: "fast", 61 shuffleTime: "slow", 62 itemClass: "pencipdc_playlist_item", 63 freeGroupClass: "jp-free-media", 64 freeItemClass: "pencipdc_playlist_item_free", 65 removeItemClass: "pencipdc_playlist_item_remove" 66 } 67 }, 68 option: function(s, e) { 69 if (e === t) return this.options.playlistOptions[s]; 70 switch (this.options.playlistOptions[s] = e, s) { 71 case "enableRemoveControls": 72 this._updateControls(); 73 break; 74 case "itemClass": 75 case "freeGroupClass": 76 case "freeItemClass": 77 case "removeItemClass": 78 this._refresh(!0), this._createItemHandlers() 79 } 80 return this 81 }, 82 _init: function() { 83 var t = this; 84 s(this.cssSelector.jPlayer).data("PenciPCPlaylist", this), this._refresh((function() { 85 t.options.playlistOptions.autoPlay ? t.play(t.current) : t.select(t.current) 86 })) 87 }, 88 _initPlaylist: function(t) { 89 this.shuffled = !1, this.removing = !1, this.original = s.extend(!0, [], t), this._originalPlaylist(), 0 == this.original.length && s(this.cssSelector.jPlayer).jPlayer("clearMedia"), s(this.cssSelector.jPlayer).trigger("PenciP
89CPlaylist_playlist") 90 }, 91 _originalPlaylist: function() { 92 var t = this; 93 this.playlist = [], s.each(this.original, (function(s) { 94 t.playlist[s] = t.original[s] 95 })) 96 }, 97 _refresh: function(t) { 98 var e = this; 99 if (t && !s.isFunction(t)) this.cssSelector.playlist.find("ul").empty(), s.each(this.playlist, (function(s) { 100 e.cssSelector.playlist.find("ul").append(e._createListItem(e.playlist[s])) 101 })), this._updateControls(), s(this.cssSelector.jPlayer).trigger("PenciPCPlaylist_playlist"); 102 else { 103 this.cssSelector.playlist.find("ul").children().length && this.options.playlistOptions.displayTime; 104 this.cssSelector.playlist.find("ul").each((function() { 105 var i = s(this); 106 s(this).empty(), s.each(e.playlist, (function(s) { 107 i.append(e._createListItem(e.playlist[s])) 108 })), e._updateControls(), s.isFunction(t) && t(), e.playlist.length, s(this).show() 109 })), s(this.cssSelector.jPlayer).trigger("PenciPCPlaylist_playlist"), s(this.cssSelector.jPlayer).trigger("PenciPCPlaylist_init") 110 } 111 }, 112 _createListItem: function(t) { 113 var e = this, 114 i = "<li><div>"; 115 if (i += "<a href='#' class='" + this.options.playlistOptions.removeItemClass + '\'><i title="" class="penciicon-close-button"></i></a>', t.free) { 116 var l = !0; 117 i += "<span class='" + this.options.playlistOptions.freeGroupClass + "'>(", s.each(t, (function(t, r) { 118 s.jPlayer.prototype.format[t] && (l ? l = !1 : i += " | ", i += "<a class='" + e.options.playlistOptions.freeItemClass + "' href='" + r + "' tabindex='-1'>" + t + "</a>") 119 })), i += ")</span>" 120 } 121 return i += "<span class='" + this.options.playlistOptions.itemClass + "' tabindex='0'>" + t.title + (t.artist ? " <span class='jp-artist'>by " + t.artist + "</span>" : "") + "</span>", i += "</div></li>" 122 }, 123 _createItemHandlers: function() { 124 var t = this; 125 this.cssSelector.playlist.off("click", "span." + this.options.playlistOptions.itemClass).on("click", "span." + this.options.playlistOptions.itemClass, (function(e) { 126 e.preventDefault(); 127 var i = s(this).parent().parent().index(); 128 t.current !== i ? t.play(i) : s(t.cssSelector.jPlayer).jPlayer("play"), s(t.cssSelector.jPlayer).trigger("PenciPCPlaylist_play"), t.blur(this) 129 })), this.cssSelector.playlist.off("click", "a." + this.options.playlistOptions.freeItemClass).on("click", "a." + this.options.playlistOptions.freeItemClass, (function(e) { 130 e.preventDefault(), s(this).parent().parent().find("." + t.options.playlistOptions.itemClass).trigger("click"), t.blur(this) 131 })), this.cssSelector.playlist.off("click", "a." + this.options.playlistOptions.removeItemClass).on("click", "a." + this.options.playlistOptions.removeItemClass, (function(e) { 132 e.preventDefault(); 133 var i = s(this).parent().parent(), 134 l = i.index(); 135 i.hasClass("pencipdc_playlist_current") || (t.remove(l), t.blur(this), s(t.cssSelector.jPlayer).trigger("PenciPCPlaylist_playlist")) 136 })) 137 }, 138 _updateControls: function() { 139 this.options.playlistOptions.enableRemoveControls ? this.cssSelector.playlist.find("." + this.options.playlistOptions.removeItemClass).show() : this.cssSelector.playlist.find("." + this.options.playlistOptions.removeItemClass).hide(), this.shuffled ? s(this.cssSelector.jPlayer).jPlayer("addStateClass", "shuffled") : s(this.cssSelector.jPlayer).jPlayer("removeStateClass", "shuffled"), s(this.cssSelector.shuffle).length && s(this.cssSelector.shuffleOff).length && (this.shuffled ? (s(this.cssSelector.shuffleOff).show(), s(this.cssSelector.shuffle).hide()) : (s(this.cssSelector.shuffleOff).hide(), s(this.cssSelector.shuffle).show())) 140 }, 141 _highlight: function(s) { 142 this.playlist.length && s !== t && (this.cssSelector.playlist.find(".pencipdc_playlist_current").removeClass("pe
142ncipdc_playlist_current"), this.cssSelector.playlist.find("li:nth-child(" + (s + 1) + ")").addClass("pencipdc_playlist_current").find(".pencipdc_playlist_item").addClass("pencipdc_playlist_current")) 143 }, 144 setPlaylist: function(s) { 145 s.forEach((function(s) { 146 if (s.mp3.length < 1) { 147 var t = s.title.replace('<div class="item-song pencipdc_post_title">', '<div class="item-song pencipdc_post_title">,').split(","); 148 t.splice(1, 0, '<span><i class="fa fa-lock"></i></span>'), s.title = t.join("") 149 } 150 })), this._initPlaylist(s), this._init() 151 }, 152 add: function(t, e) { 153 if (t.mp3.length < 1) { 154 var i = t.title.replace('<div class="item-song pencipdc_post_title">', '<div class="item-song pencipdc_post_title">,').split(","); 155 i.splice(1, 0, '<span><i class="fa fa-lock"></i></span>'), t.title = i.join("") 156 } 157 this.cssSelector.playlist.find("ul").append(this._createListItem(t)).find("li:last-child"), this._updateControls(), this.original.push(t), this.playlist.push(t), s(this.cssSelector.jPlayer).trigger("PenciPCPlaylist_playlist"), e ? this.play(this.playlist.length - 1) : 1 === this.original.length && this.select(0) 158 }, 159 remove: function(e) { 160 var i = this; 161 return e === t ? (this._initPlaylist([]), this._refresh((function() { 162 s(i.cssSelector.jPlayer).jPlayer("clearMedia") 163 })), !0) : !this.removing && (0 <= (e = e < 0 ? i.original.length + e : e) && e < this.playlist.length && (this.removing = !0, s(this.cssSelector.playlist[0]).find("li:nth-child(" + (e + 1) + ")").each((function() { 164 if (i.shuffled) { 165 var t = i.playlist[e]; 166 s.each(i.original, (function(s) { 167 if (i.original[s] === t) return i.original.splice(s, 1), !1 168 })), i.playlist.splice(e, 1) 169 } else i.original.splice(e, 1), i.playlist.splice(e, 1); 170 i.original.length ? e === i.current ? (i.current = e < i.original.length ? i.current : i.original.length - 1, i.select(i.current)) : e < i.current && i.current-- : (s(i.cssSelector.jPlayer).jPlayer("clearMedia"), i.current = 0, i.shuffled = !1, i._updateControls()), i.removing = !1 171 })), this.cssSelector.playlist.find("li:nth-child(" + (e + 1) + ")").each((function() { 172 s(this).remove() 173 }))), !0) 174 }, 175 select: function(t) { 176 0 <= (t = t < 0 ? this.original.length + t : t) && t < this.playlist.length ? (this.current = t, this._highlight(t), s(this.cssSelector.jPlayer).jPlayer("setMedia", this.playlist[this.current])) : this.current = 0, s(this.cssSelector.jPlayer).trigger("PenciPCPlaylist_select") 177 }, 178 play: function(e) { 179 0 <= (e = e < 0 ? this.original.length + e : e) && e < this.playlist.length ? this.playlist.length && (this.select(e), s(this.cssSelector.jPlayer).jPlayer("play")) : e === t && s(this.cssSelector.jPlayer).jPlayer("play"), s(this.cssSelector.jPlayer).trigger("PenciPCPlaylist_play") 180 }, 181 pause: function() { 182 s(this.cssSelector.jPlayer).jPlayer("pause") 183 }, 184 next: function() { 185 var s = this.current + 1 < this.playlist.length ? this.current + 1 : 0; 186 this.loop ? 0 === s && this.shuffled && this.options.playlistOptions.shuffleOnLoop && this.playlist.length > 1 ? this.shuffle(!0, !0) : this.play(s) : s > 0 && this.play(s) 187 }, 188 previous: function() { 189 var s = this.current - 1 >= 0 ? this.current - 1 : this.playlist.length - 1; 190 (this.loop && this.options.playlistOptions.loopOnPrevious || s < this.playlist.length - 1) && this.play(s) 191 }, 192 shuffle: function(e, i) { 193 var l = this; 194 e === t && (e = !this.shuffled), (e || e !== this.shuffled) && this.cssSelector.playlist.find("ul").each((function() { 195 l.shuffled = e, e ? l.playlist.sort((function() { 196 return .5 - Math.random() 197 })) : l._originalPlaylist(), l._refresh(!0), i || !s(l.cssSelector.jPlayer).data("jPlayer").status.paused ? l.play(0) : l.select(0), s(this).show() 198 })) 199 }, 200 blur: function(t) { 201 s(this.cssSelector.jPlayer).jPlayer("option", "autoBlur") && s(t).trigger("blur") 202 } 203 } 204}(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.