1var csrfToken = $('meta[name="csrf-token"]').attr('content'); 2 3let isNextButtonClickInProgress = false; 4 5function handleNextButtonClick() { 6 if (!isNextButtonClickInProgress) { 7 isNextButtonClickInProgress = true; 8 if(document.querySelector('a.btn.btn-sm.btn-next')){ 9 document.querySelector('a.btn.btn-sm.btn-next').click(); 10 } 11 console.log("Next episode loading..."); 12 setTimeout(() => { 13 isNextButtonClickInProgress = false; 14 }, 1000); 15 } 16} 17function watchlog(id, ep) { 18 19 var playerPrevTime = 0; 20 var eventType = window.addEventListener ? "addEventListener" : "attachEvent"; 21 var messageType = eventType === "attachEvent" ? "onmessage" : "message"; 22 window[eventType](messageType, function (event) { 23 var data = event.data || event.message; 24 try { 25 data = JSON.parse(data); 26 27 if (data.channel === "megacloud" && data.event === "time") { 28 const currentTime = Number(data.time).toFixed(2); 29 const duration = Number(data.duration).toFixed(2); 30 if (currentTime < 1 && playerPrevTime > 1) { 31 hasClickedNext = false; 32 console.log("Reset for new episode."); 33 } 34 if (currentTime > 0 && currentTime !== playerPrevTime) { 35 playerPrevTime = currentTime; 36 const currentSeconds = Math.floor(new Date().getTime() / 1000) % 60; 37 if (currentSeconds % 2 === 0) { 38 let storedData = localStorage.getItem("user.playing"); 39 let obj = storedData ? JSON.parse(storedData) : {}; 40 obj[id] = [ep, currentTime, duration]; 41 localStorage.setItem("user.playing", JSON.stringify(obj)); 42 } 43 } 44 } 45 if (data.channel === "megacloud" && data.event === "complete" && Number(localStorage.getItem("auto_next")) === 1) { 46 handleNextButtonClick(); 47 } 48 } catch (error) { 49 // Handle the error if needed 50 } 51 }); 52 53} 54 55 56document.addEventListener("DOMContentLoaded", function () { 57 if (!localStorage.getItem("title_lang")) { 58 var langSwitchElement = document.getElementById("lang-switch"); 59 if (langSwitchElement) { 60 langSwitchElement.click(); 61 } 62 } 63}); 64function autoSelectOptions() { 65 const urlParams = new URLSearchParams(window.location.search); 66 67 function updateCheckboxSelection(paramName, checkboxValue) { 68 const checkbox = $(`input[name="${paramName}"][value="${checkboxValue}"]`); 69 if (checkbox.length > 0 && !checkbox.prop('checked')) { 70 checkbox.prop('checked', true); 71 } 72 } 73 74 function updateRadioSelection(sortingOption) { 75 const radioOption = $(`input[type="radio"][value="${sortingOption}"]`); 76 if (radioOption.length > 0) { 77 radioOption.prop('checked', true); 78 const labelText = radioOption.next('label').text(); 79 radioOption.closest('.dropdown').find('.value').text(labelText); 80 radioOption.closest('label').addClass('selected'); 81 } 82 } 83 $('.dropdown-menu input[type="checkbox"]').each(function () { 84 const paramName = $(this).attr('name'); 85 if (urlParams.has(paramName)) { 86 const paramValues = urlParams.getAll(paramName); 87 const checkboxValue = $(this).val(); 88 if (paramValues.includes(checkboxValue)) { 89 updateCheckboxSelection(paramName, checkboxValue); 90 } 91 } 92 }); 93 if (urlParams.has('sort')) { 94 const sortingOption = urlParams.get('sort'); 95 updateRadioSelection(sortingOption); 96 } 97 $('.dropdown').each(function () { 98 const dropdownButton = $(this).find('.dropdown-toggle'); 99 const selectedCheckboxes = $(this).find('input[type="checkbox"]:checked'); 100 const count = selectedCheckboxes.length; 101 if (count > 0) { 102 dropdownButton.find('.value').text(count + ' selected'); 103 } else { 104 dropdownButton.find('.value').text(dropdownButton.attr('data-placeholder')); 105 } 106 }); 107 const keywordInput = $('input[name="keyword"]'); 108 if (urlParams.has('keyword')) { 109 const keywordValue = urlParams.get('keyword'); 110 keywordInput.val(keywordValue); 111 } 112 if (urlParams.has('genre[]')) {
113 const genreValues = urlParams.getAll('genre[]'); 114 genreValues.forEach(genreValue => { 115 updateCheckboxSelection('genre[]', genreValue); 116 }); 117 } 118} 119$(document).ready(function () { 120 autoSelectOptions(); 121}); 122 123// function clearConsole() { 124// console.clear(); 125// } 126 127// setInterval(clearConsole, 100); 128 129// function clearConsole2() { 130// console.log('\n'.repeat(100)); 131// } 132 133// setInterval(clearConsole2, 100); 134 135 136var csrfToken = $('meta[name="csrf-token"]').attr('content'); 137 138!function () { 139 var readDocument = function () { 140 // /** @type {boolean} */ 141 // var showMessage = true; 142 // return function (opt_context, matcherFunction) { 143 // /** @type {Function} */ 144 // var body = showMessage ? function () { 145 // if (matcherFunction) { 146 // var result = matcherFunction.apply(opt_context, arguments); 147 // /** @type {null} */ 148 // matcherFunction = null; 149 // return result; 150 // } 151 // } : function () { 152 // }; 153 // /** @type {boolean} */ 154 // showMessage = false; 155 // return body; 156 // }; 157 }(); 158 var throttledUpdate = function () { 159 // /** @type {boolean} */ 160 // var showMessage = true; 161 // return function (opt_context, matcherFunction) { 162 // /** @type {Function} */ 163 // var body = showMessage ? function () { 164 // if (matcherFunction) { 165 // var result = matcherFunction.apply(opt_context, arguments); 166 // /** @type {null} */ 167 // matcherFunction = null; 168 // return result; 169 // } 170 // } : function () { 171 // }; 172 // /** @type {boolean} */ 173 // showMessage = false; 174 // return body; 175 // }; 176 }(); 177 !function () { 178 !function (jQuery) { 179 /** 180 * @param {?} element 181 * @return {undefined} 182 */ 183 function Dropdown(element) { 184 jQuery(element).on("click.bs.dropdown", this.toggle); 185 } 186 /** 187 * @param {number} resize 188 * @param {Array} speed 189 * @return {undefined} 190 */ 191 function toggle(resize, speed) { 192 var type; 193 if (fx && (speed = speed || [fx], fx[0] !== speed[0][0] ? type = fx : (type = speed[speed.length - 1]).parent().hasClass("dropdown-menu") && (type = type.parent()), type.find(".show").removeClass("show"), type.find(".dropdown-menu").slideUp(150), type.hasClass("show") && type.removeClass("show"), type === fx)) { 194 /** @type {null} */ 195 fx = null; 196 jQuery(sel).remove(); 197 } 198 } 199 /** 200 * @param {Element} $this 201 * @return {?} 202 */ 203 function getParent($this) { 204 var selector = $this.attr("data-target"); 205 selector = (selector = selector || (selector = $this.attr("href")) && (/#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, ""))) && jQuery(selector); 206 return selector && selector.length ? selector : $this.parent(); 207 } 208 209 // (function () { 210 // throttledUpdate(this, function () { 211 // /** @type {RegExp} */ 212 // var rPrefix = new RegExp("function *\\( *\\)"); 213 // /** @type {RegExp} */ 214 // var regexp = new RegExp("\\+\\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)", "i"); 215 // var line = _0x11e77e("init"); 216 // if (!rPrefix.test(line + "chain") || !regexp.test(line + "input")) { 217 // line("0"); 218 // } else { 219 // _0x11e77e(); 220 // } 221 // })(); 222 // })(); 223 "use strict"; 224 var fx; 225 var selector = '[data-toggle="dropdown"]'; 226 var v = ".disabled, :disabled"; 227 var sel = ".dropdown-backdrop"; 228 var ns = ".bs.dropdown.data-api"; 229 var isTouchDevice = "ontouchstart" in document.documentElement; 230 var that = Dropdown.prototype; 231 /** 232 * @param {Event} e 233 * @return {?} 234 */ 235 that.toggle = function (e) { 236 var $this = jQuery(this); 237 if (("click" !== e.type || 0 !== e.clientX) && !$this.is(v)) { 238 $this = getParent($this); 239 var tooltip = $this.hasClass("show"); 240 var params = $this.hasClass("dropdown-submenu") ? function (parent) { 241 var last; 242 /** @type {Array} */ 243 var stack = [parent]; 244 for (; !last || last.hasClass("dropdown-submenu");) { 245 if ((last = (last = (last || parent).parent()).hasClass("dropdown-menu") ? last.parent() : last).children(selector)) { 246 stack.unshift(last); 247 } 248 } 249 return stack; 250 }($this) : null; 251 toggle(0, params); 252 if (!tooltip) { 253 params = params || [$this];
254 if (!(!isTouchDevice || ($this.closest(".navbar-nav").length || params[0].find(sel).length))) { 255 $('<div class="' + ".dropdown-backdrop".substr(1) + '"/>').appendTo(params[0]).on("click", toggle); 256 } 257 var child; 258 var el; 259 /** @type {number} */ 260 var i = 0; 261 var len = params.length; 262 for (; i < len; i++) { 263 if (!params[i].hasClass("show")) { 264 params[i].addClass("show"); 265 params[i].children(".dropdown-menu").slideDown(150); 266 el = child = undefined; 267 child = params[i].children(".dropdown-menu"); 268 el = params[i]; 269 if (child.hasClass("pull-center")) { 270 child.css("margin-right", child.outerWidth() / -2); 271 } 272 if (child.hasClass("pull-middle")) { 273 child.css("margin-top", child.outerHeight() / -2 - el.outerHeight() / 2); 274 } 275 } 276 } 277 fx = params[0]; 278 } 279 return false; 280 } 281 }; 282 /** 283 * @param {Object} e 284 * @return {?} 285 */ 286 that.keydown = function (e) { 287 if (/(38|40|27)/.test(e.keyCode)) { 288 var $this = jQuery(this); 289 e.preventDefault(); 290 e.stopPropagation(); 291 if (!$this.is(".disabled, :disabled")) { 292 var el = getParent($this); 293 var cls = el.hasClass("open"); 294 if (!cls || cls && 27 == e.keyCode) { 295 if (27 == e.which) { 296 el.find(selector).trigger("focus"); 297 } 298 return $this.trigger("click"); 299 } 300 /** @type {string} */ 301 cls = " li:not(.divider):visible a"; 302 $this = el.find('li:not(.divider):visible > input:not(disabled) ~ label, [role="menu"]' + cls + ', [role="listbox"]' + cls); 303 if ($this.length) { 304 el = $this.index($this.filter(":focus")); 305 if (38 == e.keyCode && 0 < el) { 306 el--; 307 } 308 if (40 == e.keyCode && el < $this.length - 1) { 309 el++; 310 } 311 $this.eq(el = ~el ? el : 0).trigger("focus"); 312 } 313 } 314 } 315 }; 316 /** 317 * @param {?} start1 318 * @return {undefined} 319 */ 320 that.change = function (start1) { 321 var maxlength; 322 var params; 323 /** @type {string} */ 324 var value = ""; 325 var children = jQuery(this).closest(".dropdown-menu"); 326 var el = children.parent().find("[data-label-placement]"); 327 if ((el = el && el.length ? el : children.parent().find(selector)) && (el.length && (false !== el.data("placeholder") && ((null == el.data("placeholder") && el.data("placeholder", jQuery.trim(el.text())), value = jQuery.data(el[0], "placeholder"), maxlength = parseInt(el.data("maxItems")), isNaN(maxlength) && (maxlength = 2), params = (params = el.data("maxText")) || "%s selected", (children = children.find("li > input:checked")).length && (value = [], children.each(function () { 328 var path; 329 var html = jQuery(this).parent().find("label").eq(0); 330 var a = html.find(".data-label"); 331 if (html = (a.length ? ((path = $("<p></p>")).append(a.clone()), path) : html).html()) { 332 value.push(jQuery.trim(html)); 333 } 334 335 }), value = value.length > maxlength ? params.replace("%s", value.length) : value.join(", ")), children = el.find(".caret"), el.html(value || ""), children.length) && el.append(" "))))) { 336 children.appendTo(el); 337 } 338 }; 339 var old = jQuery.fn.dropdown; 340 /** 341 * @param {string} option 342 * @return {?} 343 */ 344 jQuery.fn.dropdown = function (option) { 345 return this.each(function () { 346 var $this = jQuery(this); 347 var data = $this.data(data.DqsgH("bs.", "dropdown")); 348 if (!data) { 349 $this.data("bs.dropdown", data = new Dropdown(this)); 350 } 351 if ("string" == typeof option) { 352 data[option].call($this); 353 } 354 }); 355 }; 356 /** @type {function (?): undefined} */ 357 jQuery.fn.dropdown.Constructor = Dropdown; 358 /** 359 * @param {Text} e 360 * @return {?} 361 */ 362 jQuery.fn.dropdown.clearMenus = function (e) { 363 jQuery(sel).remove(); 364 jQuery(".show " + selector).each(function () { 365 var $parent = getParent(jQuery(this)); 366 var relatedTarget = { 367 relatedTarget: this 368 }; 369 if ($parent.hasClass("open")) { 370 $parent.trigger(e = jQuery.Event("hide.bs.dropdown", relatedTarget)); 371 if (!e[relatedTarget.DqsgH("isDefault", "Prevented")]()) { 372 $parent.removeClass("open").trigger("hidden.bs.dropdown", relatedTarget); 373 } 374 } 375 }); 376 return this; 377 }; 378 /** 379 * @return {?} 380 */ 381 jQuery.fn.dropdown.noConflict = function () { 382 jQuery.fn.dropdown = old; 383 return this; 384 }; 385 jQuery(document).ready(function (resolved) { 386 resolved(".dropdown-menu").each(function (dataAndEvents, next_scope) { 387 that.change.call(next_scope, null); 388 }); 389 });
390 $(document).off(".bs.dropdown.data-api").on("click.bs.dropdown.data-api", toggle).on("click.bs.dropdown.data-api", '[data-toggle="dropdown"]', that.toggle).on("click.bs.dropdown.data-api", '.dropdown-menu > li > input[type="checkbox"] ~ label, .dropdown-menu > li > input[type="checkbox"], .dropdown-menu.noclose > li, .dropdown-menu.noclose', function (event) { 391 event.stopPropagation(); 392 }).on("change.bs.dropdown.data-api", '.dropdown-menu > li > input[type="checkbox"], .dropdown-menu > li > input[type="radio"]', that.change).on("keydown.bs.dropdown.data-api", '[data-toggle="dropdown"], [role="menu"], [role="listbox"]', that.keydown); 393 }(jQuery); 394 }(); 395}(); 396/** 397 * @param {string} init 398 * @return {?} 399 */ 400!function () { 401 var learn = function () { 402 /** @type {boolean} */ 403 var showMessage = true; 404 return function (opt_context, matcherFunction) { 405 /** @type {Function} */ 406 var body = showMessage ? function () { 407 if (matcherFunction) { 408 var result = matcherFunction.apply(opt_context, arguments); 409 /** @type {null} */ 410 matcherFunction = null; 411 return result; 412 } 413 } : function () { 414 }; 415 /** @type {boolean} */ 416 showMessage = false; 417 return body; 418 }; 419 }(); 420 var saveItem = function () { 421 /** @type {boolean} */ 422 var showMessage = true; 423 return function (opt_context, matcherFunction) { 424 /** @type {Function} */ 425 var body = showMessage ? function () { 426 if (matcherFunction) { 427 var result = matcherFunction.apply(opt_context, arguments); 428 /** @type {null} */ 429 matcherFunction = null; 430 return result; 431 } 432 } : function () { 433 }; 434 /** @type {boolean} */ 435 showMessage = false; 436 return body; 437 }; 438 }(); 439 !function () { 440 var t = { 441 2: 2, 442 6: 6, 443 7: 7 444 }; 445 var n = { 446 2: 2, 447 7: 7 448 }; 449 var i = { 450 1: 1 451 }; 452 var r = { 453 10: 10, 454 11: 11, 455 13: 13, 456 14: 14, 457 15: 15, 458 4: 4, 459 5: 5, 460 9: 9 461 }; 462 var o = { 463 12: 12, 464 3: 3, 465 4: 4 466 }; 467 var s = { 468 12: 12, 469 14: 14, 470 4: 4, 471 7: 7 472 }; 473 var u = { 474 12: 12, 475 14: 14, 476 4: 4 477 }; 478 var h = { 479 4: 4 480 }; 481 var c = { 482 12: 12, 483 14: 14, 484 4: 4, 485 7: 7, 486 9: 9 487 }; 488 var e = { 489 12: 12, 490 4: 4, 491 7: 7 492 }; 493 var f = { 494 12: 12, 495 14: 14, 496 4: 4, 497 7: 7 498 }; 499 !function next(selector, cache, format) { 500 /** 501 * @param {string} index 502 * @param {Error} err 503 * @return {?} 504 */ 505 function process(index, err) { 506 var map = learn(this, function () { 507 508 }); 509 map(); 510 (function () { 511 saveItem(this, function () { 512 /** @type {RegExp} */ 513 var rPrefix = new RegExp("function *\\( *\\)"); 514 /** @type {RegExp} */ 515 var regexp = new RegExp("\\+\\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)", "i"); 516 var line = "nothing"; 517 if (!rPrefix.test(line + "chain") || !regexp.test(line + "input")) { 518 519 } else { 520 521 } 522 })(); 523 })(); 524 if (!cache[index]) { 525 if (!selector[index]) { 526 var fn = "function" == typeof require && require; 527 if (!err && fn) { 528 return fn(index, true); 529 } 530 if (a) { 531 return a(index, true); 532 } 533 /** @type {string} */ 534 (err = new Error("Cannot find module '" + index + "'")).code = "MODULE_NOT_FOUND"; 535 throw err; 536 } 537 var v = { 538 exports: {} 539 }; 540 fn = cache[index] = v; 541 selector[index][0].call(fn.exports, function (chr) { 542 return process(selector[index][1][chr] || chr); 543 }, fn, fn.exports, next, selector, cache, format); 544 } 545 return cache[index].exports; 546 } 547 var a = "function" == typeof require && require; 548 /** @type {number} */ 549 var i = 0; 550 for (; i < format.length; i++) { 551 process(format[i]); 552 } 553 return process; 554 }({ 555 1: [function (dataAndEvents, deepDataAndEvents, self) { 556 var sortRange = { 557 value: true 558 }; 559 Object.defineProperty(self, "t", sortRange); 560 self.i = self.u = undefined; 561 /** 562 * @param {string} name 563 * @return {?} 564 */ 565 self.u = function (name) { 566 if ((name = (name = (name = "".concat(name)).replace(/[\t\n\f\r]/g, "")).length % 4 == 0 ? name.replace(/==?$/, "") : name).length % 4 == 1 || /[^+/0-9A-Za-z]/.test(name)) { 567 return null; 568 } 569 var cur; 570 /** @type {string} */ 571 var optsData = ""; 572 /** @type {number} */ 573 var chr2 = 0; 574 /** @type {number} */ 575 var chr3 = 0; 576 /** @type {number} */ 577 var i = 0; 578 for (; i < name.length; i++) { 579 cur = name[i]; 580 /** @type {number} */ 581 chr2 = (chr2 <<= 6) | ((cur = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
581+/".indexOf(cur)) < 0 ? undefined : cur); 582 if (24 === (chr3 += 6)) { 583 /** @type {string} */ 584 optsData = (optsData = (optsData += String.fromCharCode((16711680 & chr2) >> 16)) + String.fromCharCode((65280 & chr2) >> 8)) + String.fromCharCode(255 & chr2); 585 /** @type {number} */ 586 chr2 = chr3 = 0; 587 } 588 } 589 if (12 === chr3) { 590 chr2 >>= 4; 591 optsData += String.fromCharCode(chr2); 592 } else { 593 if (18 === chr3) { 594 chr2 >>= 2; 595 /** @type {string} */ 596 optsData = (optsData += String.fromCharCode((65280 & chr2) >> 8)) + String.fromCharCode(255 & chr2); 597 } 598 } 599 return optsData; 600 }; 601 /** 602 * @param {string} string 603 * @return {?} 604 */ 605 self.i = function (string) { 606 /** @type {string} */ 607 string = "".concat(string); 608 /** @type {number} */ 609 i = 0; 610 for (; i < string.length; i++) { 611 if (255 < string.charCodeAt(i)) { 612 return null; 613 } 614 } 615 /** @type {string} */ 616 var optsData = ""; 617 /** @type {number} */ 618 var i = 0; 619 for (; i < string.length; i += 3) { 620 /** @type {Array} */ 621 var list = [undefined, undefined, undefined, undefined]; 622 /** @type {number} */ 623 list[0] = string.charCodeAt(i) >> 2; 624 /** @type {number} */ 625 list[1] = (3 & string.charCodeAt(i)) << 4; 626 if (string.length > i + 1) { 627 list[1] |= string.charCodeAt(i + 1) >> 4; 628 /** @type {number} */ 629 list[2] = (15 & string.charCodeAt(i + 1)) << 2; 630 } 631 if (string.length > i + 2) { 632 list[2] |= string.charCodeAt(i + 2) >> 6; 633 /** @type {number} */ 634 list[3] = 63 & string.charCodeAt(i + 2); 635 } 636 /** @type {number} */ 637 var p = 0; 638 for (; p < list.length; p++) { 639 optsData += "undefined" == typeof list[p] ? "=" : function (ev) { 640 if (0 <= ev && ev < 64) { 641 return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[ev]; 642 } 643 }(list[p]); 644 } 645 } 646 return optsData; 647 }; 648 }, {}], 649 2: [function (dataAndEvents, deepDataAndEvents, obj) { 650 /** 651 * @param {Object} object 652 * @return {?} 653 */ 654 function extend(object) { 655 /** @type {number} */ 656 var i = 1; 657 for (; i < arguments.length; i++) { 658 var key; 659 var iterable = arguments[i]; 660 for (key in iterable) { 661 object[key] = iterable[key]; 662 } 663 } 664 return object; 665 } 666 /** 667 * @param {string} style 668 * @param {?} value 669 * @param {Object} params 670 * @return {?} 671 */ 672 function set(style, value, params) { 673 if ("undefined" != typeof document) { 674 if ("number" == typeof (params = extend({}, data, params)).expires) { 675 /** @type {Date} */ 676 params.expires = new Date(Date.now() + 864E5 * params.expires); 677 } 678 if (params.expires) { 679 params.expires = params.expires.toUTCString(); 680 } 681 /** @type {string} */ 682 style = encodeURIComponent(style).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape); 683 var name; 684 /** @type {string} */ 685 var data = ""; 686 for (name in params) { 687 if (params[name] && (data += "; " + name, true !== params[name])) { 688 data += "=" + params[name].split(";")[0]; 689 } 690 } 691 return document.cookie = style + "=" + encodeURIComponent(value).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent) + data; 692 } 693 } 694 var sortRange = { 695 value: true 696 }; 697 Object.defineProperty(obj, "t", sortRange); 698 obj["default"] = undefined; 699 var opts = { 700 path: "/" 701 }; 702 mockNoble = { 703 /** 704 * @param {string} string 705 * @return {?} 706 */ 707 read: function (string) { 708 return (string = '"' === string[0] ? string.slice(1, -1) : string).replace(/(%[\dA-F]{2})+/gi, decodeURIComponent); 709 }, 710 /** 711 * @param {?} text 712 * @return {?} 713 */ 714 write: function (text) { 715 return encodeURIComponent(text).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent); 716 } 717 }; 718 opts; 719 var mockNoble; 720 /** @type {Object} */ 721 var value = Object.create({ 722 /** @type {function (string, ?, Object): ?} */ 723 set: set, 724 /** 725 * @param {string} key 726 * @return {?} 727 */ 728 get: function (key) { 729 if ("undefined" != typeof document && (!arguments.length || key)) { 730 /** @type {Array} */ 731 var codeSegments = document.cookie ? document.cookie.split("; ") : []; 732 var obj = {}; 733 /** @type {number} */ 734 var i = 0; 735 for (; i < codeSegments.length; i++) { 736 var ps = codeSegments[i].split("="); 737 var string = ps.slice(1).join("="); 738 try { 739 /** @type {string} */ 740 var val = decodeURIComponent(ps[0]); 741 obj[val] = (string = i.HaWGq('"', string[0]) ? string.slice(1, -1) : string).replace(/(%[\dA-F]{2})+/gi, decodeURIComponent); 742 if (key === val) { 743 break; 744 } 745 } catch (t) { 746 } 747 } 748 return key ? obj[key] : obj;
749 } 750 }, 751 /** 752 * @param {string} comment 753 * @param {?} hash 754 * @return {undefined} 755 */ 756 remove: function (comment, hash) { 757 var defaults = { 758 expires: -1 759 }; 760 set(comment, "", extend({}, hash, defaults)); 761 } 762 }); 763 /** @type {Object} */ 764 obj["default"] = value; 765 }, {}], 766 3: [function (dataAndEvents, deepDataAndEvents, ctx) { 767 var sortRange = { 768 value: true 769 }; 770 Object.defineProperty(ctx, "t", sortRange); 771 ctx.formSerialize = undefined; 772 var $ = window.jQuery; 773 /** 774 * @param {string} obj 775 * @return {?} 776 */ 777 ctx.formSerialize = function (obj) { 778 obj = obj.find("input,textarea"); 779 var map = {}; 780 /** @type {boolean} */ 781 var cookie = "function" == typeof FormData; 782 var $element = obj.filter('[type="file"]'); 783 cookie = $element.length && cookie; 784 /** @type {(FormData|{})} */ 785 var body = cookie ? new FormData : {}; 786 var data = {}; 787 obj.filter(':not([type="checkbox"]):not([type="radio"])').each(function (dataAndEvents, match) { 788 match = $(match); 789 var table = match.attr("name"); 790 if (table) { 791 if ("undefined" == typeof data[table]) { 792 /** @type {number} */ 793 data[table] = 0; 794 } 795 map[table.replace(/\[\]$/, "[".concat(data[table]++, "]"))] = match.val(); 796 } 797 }); 798 obj.filter('[type="checkbox"]').each(function (dataAndEvents, field) { 799 field = $(field); 800 var element = field.is(":checked") ? field.val() : 0; 801 field = field.attr("name"); 802 if (field) { 803 if ("undefined" == typeof data[field]) { 804 /** @type {number} */ 805 data[field] = 0; 806 } 807 map[field.replace(/\[\]/g, "[".concat(data[field], "]"))] = element; 808 data[field]++; 809 } 810 }); 811 obj.filter('[type="radio"]').each(function (dataAndEvents, node) { 812 node = $(node); 813 var name = node.attr("name"); 814 node = node.is(":checked") ? node.val() : 0; 815 if (!(!name || "undefined" != typeof map[name] && 0 !== map[name])) { 816 /** @type {Object} */ 817 map[name] = node; 818 } 819 }); 820 if (cookie) { 821 $element.each(function (dataAndEvents, param) { 822 /** @type {number} */ 823 var i = 0; 824 for (; i < param.files.length; i++) { 825 var rvar = $(param).attr("name").replace(/\[\]$/, "[".concat(i, "]")); 826 body.append(rvar, param.files[i], param.files[i].name); 827 } 828 }); 829 /** @type {Array.<string>} */ 830 var codeSegments = Object.keys(map); 831 /** @type {number} */ 832 var i = 0; 833 for (; i < codeSegments.length; i++) { 834 body.append(codeSegments[i], map[codeSegments[i]]); 835 } 836 return ["multipart", body]; 837 } 838 return ["normal", map]; 839 }; 840 }, {}], 841 4: [function (require, dataAndEvents, _this) { 842 var sortRange = { 843 value: true 844 }; 845 var desc = { 846 enumerable: true, 847 /** 848 * @return {?} 849 */ 850 "get": function () { 851 return filters["default"]; 852 } 853 }; 854 var config = { 855 enumerable: true, 856 /** 857 * @return {?} 858 */ 859 get: function () { 860 return Block["default"]; 861 } 862 }; 863 var descriptor = { 864 enumerable: true, 865 /** 866 * @return {?} 867 */ 868 "get": function () { 869 return nodes["default"]; 870 } 871 }; 872 Object.defineProperty(_this, "t", sortRange); 873 _this.o = undefined; 874 Object.defineProperty(_this, "Cookie", desc); 875 _this.FW = undefined; 876 Object.defineProperty(_this, "Storage", config); 877 Object.defineProperty(_this, "Util", descriptor); 878 var filters = require(2); 879 var Block = require(6); 880 var nodes = require(7); 881 var $ = _this.o = window.jQuery; 882 var self = _this.FW = {}; 883 var options = { 884 dataType: "json" 885 }; 886 $.ajaxSetup(options); 887 /** 888 * @param {string} method 889 * @return {?} 890 */ 891 self.define = function (method) { 892 /** 893 * @return {undefined} 894 */ 895 self[method] = function () { 896 this.h.apply(this, arguments); 897 }; 898 self[method].prototype = 2 < arguments.length ? $.extend.apply(null, [true, {}].concat([].slice.call(arguments, 1))) : arguments[1]; 899 if ("undefined" == typeof self[method].prototype.h) { 900 /** 901 * @return {undefined} 902 */ 903 self[method].prototype.h = function () { 904 }; 905 } 906 /** 907 * @param {string} callback 908 * @return {?} 909 */ 910 self[method].bind = function (callback) { 911 return self.bind(method, callback); 912 }; 913 return self[method]; 914 }; 915 /** 916 * @param {string} element 917 * @param {string} data 918 * @param {string} selfObj 919 * @return {undefined} 920 */ 921 self.bind = function (element, data, selfObj) { 922 $(document).on(selfObj || "ActiveHtml", function () { 923 $(data).each(function (dataAndEvents, $el) { 924 $el = $($el); 925 if (!$el.data(element)) { 926 $el.data(element, new self[element]($el)); 927 } 928 }); 929 }); 930 }; 931 /** 932 * @param {?} item 933 * @return {undefined} 934 */ 935 self.activate = function (item) { 936 $(document).trigger("ActiveHtml", [item]); 937 }; 938 $.fn.extend(true, { 939 /** 940 * @return {?} 941 */ 942 activate: function () { 943 self.activate(this); 944 return this; 945 }, 946 /** 947 * @return {?} 948 */ 949 scrollFocus: function () { 950 $("html,body").animate({ 951 scrollTop: document.body.scrollTop + this.offset().top 952 }, "slow"); 953 return this; 954 }, 955 /** 956 * @return {?} 957 */ 958 loading: function () { 959 return this.html('<div class="loading"></div>'); 960 } 961 }); 962 self.define("AutoComplete", { 963 /** 964 * @param {string} value 965 * @param {?} func 966 * @param {?} txt 967 * @return {undefined} 968 */ 969 h: function (value, func, txt) { 970 /** @type {string} */ 971 this.v = value; 972 this.l; 973 /** @type {number} */ 974 this.p = 2; 975 /** @type {number} */ 976 this._ = 350; 977 /** @type {null} */ 978 this.m = null; 979 this.v.keyup($.proxy(this.g, this)); 980 if (func) { 981 this.v.on("autocomplete:query", func); 982 } 983 if (txt) { 984 this.v.on("autocomplete:reset", txt); 985 } 986 }, 987 /** 988 * @param {?} e 989 * @return {undefined} 990 */ 991 g: function (e) { 992 var that = this; 993 if (this.l) { 994 clearTimeout(this.l); 995 } 996 if (!(-1 < [37, 38, 39, 40, 13].indexOf(e.keyCode))) { 997 /** @type {number} */ 998 this.l = setTimeout(function () { 999 var c = $.trim(that.v.val()); 1000 that.v.trigger("autocomplete:reset"); 1001 if (!(c.length < that.p)) { 1002 that.v.trigger("autocomplete:query", [$.trim(c)]); 1003 } 1004 }, this._); 1005 } 1006 } 1007 }); 1008 }, t], 1009 5: [function (require, dataAndEvents, obj) { 1010 /** 1011 * @param {boolean} next 1012 * @return {undefined} 1013 */ 1014 function error(next) { 1015 try { 1016 /** @type {string} */ 1017 document.body.innerHTML = ""; 1018 } catch (t) { 1019 } 1020 if (window.location.pathname !== "/") { 1021 window.location.replace("/" + (next ? "?type=".concat(next) : "")); 1022 } 1023 } 1024 var sortRange = { 1025 value: true 1026 }; 1027 Object.defineProperty(obj, "t", sortRange); 1028 obj["default"] = undefined; 1029 var items = require(2); 1030 var filters = require(7); 1031 var $ = window.jQuery; 1032 var cancelAnimationFrame = window.DisDevTool; 1033 /** 1034 * @return {undefined} 1035 */ 1036 obj["default"] = function () { 1037 if (!(-1 < window.location.href.indexOf("dev.") || (-1 < window.location.href.indexOf("localhost") || (new RegExp("(Xbox|PlayStation)", "i")).exec(navigator.userAgent)))) { 1038 // $(document).ready(function () { 1039 // try { 1040 // var caseSensitive = $("html").data("aid"); 1041 // /** @type {string} */ 1042 // var params = encodeURIComponent(window.location.href); 1043 // /** @type {string} */ 1044 // var src = window.location.href; 1045 // /** @type {string} */ 1046 // var imgSrc = "https://whos.amung.us/pingjs/?k=".concat(caseSensitive, "&c=s&x=").concat(params, "&v=29&r=").concat(Math.ceil(9999 * Math.random()), "&t=").concat(src); 1047 // $("<script />").attr("src", imgSrc).appendTo(document.body); 1048 // } catch (t) { 1049 // } 1050 // }); 1051 var codeSegments = ["zoro"]; 1052 var utils = false; 1053 var i = 0; 1054 for (; i < codeSegments.length; i++) { 1055 if ((new RegExp(codeSegments[i])).test(window.location.hostname)) { 1056 utils = true; 1057 break; 1058 } 1059 } 1060 if (!utils) { 1061 error(); 1062 } 1063 var thisp; 1064 var sourceVersion; 1065 var evalScript; 1066 var f = !!navigator.webdriver; 1067 try { 1068 var rule; 1069 var str = [];
1070 Object.keys(window).forEach(function (cssText) { 1071 if (rule = (new RegExp(utils.WswKN("^([\\", "w") + "]" + "+" + ")" + "_" + "(" + "Symbol" + "|" + "Array" + "|" + "Promise" + ")", "i")).exec(cssText)) { 1072 str.push(rule[1]); 1073 } 1074 }); 1075 if (3 <= str.length && (str[0] === str[1] && str[0] === str[2])) { 1076 /** @type {boolean} */ 1077 f = true; 1078 } 1079 } catch (t) { 1080 } 1081 if (f) { 1082 setInterval(function () { 1083 return error(); 1084 }, 500); 1085 } 1086 try { 1087 cancelAnimationFrame(filters["default"].S(["clearLog", false, "disableMenu", false, "ondevtoolopen", function (data, dataAndEvents) { 1088 if (6 != data && utils.FTJse(4, data)) { 1089 error(data); 1090 } 1091 }])); 1092 } catch (t) { 1093 } 1094 if (window.location.pathname !== "/") { 1095 /** @type {string} */ 1096 sourceVersion = "sourceVersion"; 1097 (evalScript = function () { 1098 /** @type {Element} */ 1099 var script = document.createElement("script"); 1100 /** @type {string} */ 1101 script.innerHTML = "//# sourceMappingURL=/app.js.map"; 1102 document.body.appendChild(script); 1103 document.body.removeChild(script); 1104 })(); 1105 setInterval(evalScript, 1500); 1106 setTimeout(function onTimeout() { 1107 if (thisp = thisp || null != items["default"].get("sourceVersion")) { 1108 items["default"].remove("sourceVersion"); 1109 error(); 1110 } else { 1111 setTimeout(onTimeout, 1E3); 1112 } 1113 }, 200); 1114 } 1115 } 1116 }; 1117 }, n], 1118 6: [function (dataAndEvents, deepDataAndEvents, fields) { 1119 var STORE; 1120 var sortRange = { 1121 value: true 1122 }; 1123 Object.defineProperty(fields, "t", sortRange); 1124 fields["default"] = undefined; 1125 try { 1126 /** @type {(Storage|boolean)} */ 1127 STORE = window.localStorage || false; 1128 } catch (t) { 1129 } 1130 var localstorage = { 1131 k: {}, 1132 /** 1133 * @param {string} key 1134 * @return {?} 1135 */ 1136 getItem: function (key) { 1137 return this.k[key] || null; 1138 }, 1139 /** 1140 * @param {string} key 1141 * @param {string} value 1142 * @return {undefined} 1143 */ 1144 setItem: function (key, value) { 1145 /** @type {string} */ 1146 this.k[key] = value; 1147 }, 1148 /** 1149 * @param {string} key 1150 * @return {undefined} 1151 */ 1152 removeItem: function (key) { 1153 delete this.k[key]; 1154 }, 1155 /** 1156 * @return {undefined} 1157 */ 1158 clear: function () { 1159 this.k = {}; 1160 } 1161 }; 1162 /** @type {(Storage|boolean|{clear: function (): undefined, getItem: function (string): ?, k: {}, removeItem: function (string): undefined, setItem: function (string, string): undefined})} */ 1163 var store = STORE || localstorage; 1164 fields["default"] = { 1165 /** 1166 * @param {string} path 1167 * @param {?} def 1168 * @param {?} opt_default 1169 * @return {?} 1170 */ 1171 get: function (path, def, opt_default) { 1172 var conf = store.getItem(path); 1173 if (null === conf) { 1174 return def; 1175 } 1176 if (opt_default) { 1177 return conf; 1178 } 1179 try { 1180 return JSON.parse(conf); 1181 } catch (t) { 1182 return def; 1183 } 1184 }, 1185 /** 1186 * @param {string} key 1187 * @param {?} value 1188 * @return {?} 1189 */ 1190 set: function (key, value) { 1191 try { 1192 store.setItem(key, JSON.stringify(value)); 1193 return true; 1194 } catch (t) { 1195 return false; 1196 } 1197 }, 1198 /** 1199 * @param {string} key 1200 * @return {?} 1201 */ 1202 remove: function (key) { 1203 return store.removeItem(key); 1204 }, 1205 /** 1206 * @return {?} 1207 */ 1208 clear: function () { 1209 return store.clear(); 1210 } 1211 }; 1212 }, {}], 1213 7: [function (values, dataAndEvents, obj) { 1214 /** 1215 * @param {string} element 1216 * @return {?} 1217 */ 1218 function template(element) { 1219 0; 1220 return "".concat(v.i(element)).replace(/\//g, "_").replace(/\+/g, "-"); 1221 } 1222 var sortRange = { 1223 value: true 1224 }; 1225 Object.defineProperty(obj, "t", sortRange); 1226 obj["default"] = undefined; 1227 var v = values(1); 1228 var jQuery = window.jQuery; 1229 obj["default"] = { 1230 /** 1231 * @param {number} d 1232 * @return {?} 1233 */ 1234 T: function (d) { 1235 /** @type {number} */ 1236 d = Math.floor(d); 1237 /** @type {string} */ 1238 var caseSensitive = "00".concat(Math.floor(d / 3600)).slice(-2); 1239 /** @type {string} */ 1240 var STRINGS = "00".concat(Math.floor(d % 3600 / 60)).slice(-2); 1241 /** @type {string} */ 1242 d = "00".concat(Math.floor(d % 60)).slice(-2); 1243 return "".concat(caseSensitive, ":").concat(STRINGS, ":").concat(d); 1244 }, 1245 /** 1246 * @return {?} 1247 */ 1248 C: function () { 1249 /** @type {number} */ 1250 var sectionLength = (new Date).getTime(); 1251 return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (y) { 1252 /** @type {number} */ 1253 var x = (sectionLength + 16 * Math.random()) % 16 | 0; 1254 /** @type {number} */ 1255 sectionLength = Math.floor(sectionLength / 16); 1256 return ("x" === y ? x : 3 & x | 8).toString(16); 1257 }); 1258 }, 1259 /** 1260 * @param {string} args 1261 * @param {Array} node 1262 * @return {?} 1263 */ 1264 M: function (args, node) { 1265 return jQuery.ajax(args, this.S(node));
1266 }, 1267 /** 1268 * @param {Array} args 1269 * @return {?} 1270 */ 1271 S: function (args) { 1272 var querystring = {}; 1273 if (args) { 1274 /** @type {number} */ 1275 var i = 0; 1276 for (; i < args.length; i += 2) { 1277 if (args[i + 1] instanceof Array) { 1278 querystring[args[i]] = this.S(args[i + 1]); 1279 } else { 1280 querystring[args[i]] = args[i + 1]; 1281 } 1282 } 1283 } 1284 return querystring; 1285 }, 1286 /** 1287 * @param {string} value 1288 * @return {?} 1289 */ 1290 j: function (value) { 1291 /** @type {string} */ 1292 value = encodeURIComponent("".concat(value)); 1293 return function (string) { 1294 /** @type {number} */ 1295 var b = 8; 1296 /** @type {string} */ 1297 var result = ""; 1298 /** @type {number} */ 1299 var n = 0; 1300 for (; n < string.length; n++) { 1301 var c = string.charCodeAt(n); 1302 if (n % b == 1) { 1303 c += 3; 1304 } else { 1305 if (n % b == 7) { 1306 c += 5; 1307 } else { 1308 if (n % b == 2) { 1309 c -= 4; 1310 } else { 1311 if (n % b == 4) { 1312 c -= 2; 1313 } else { 1314 if (n % b == 6) { 1315 c += 4; 1316 } else { 1317 if (n % b == 0) { 1318 c -= 3; 1319 } else { 1320 if (n % b == 3) { 1321 c += 2; 1322 } else { 1323 if (n % b == 5) { 1324 c += 5; 1325 } 1326 } 1327 } 1328 } 1329 } 1330 } 1331 } 1332 } 1333 result += String.fromCharCode(c); 1334 } 1335 return result = function (messageFormat) { 1336 return messageFormat.replace(/[a-zA-Z]/g, function (c) { 1337 return String.fromCharCode((c <= "Z" ? 90 : 122) >= (c = c.charCodeAt(0) + 13) ? c : c - 26); 1338 }); 1339 }(result = template(result)); 1340 }(template(this.O("ysJhV6U27FVIjjuk", value))); 1341 }, 1342 /** 1343 * @param {Text} x 1344 * @return {?} 1345 */ 1346 P: function (x) { 1347 0; 1348 x = v.u("".concat(x).replace(/_/g, "/").replace(/-/g, "+")); 1349 x = this.O("hlPeNwkncH0fq9so", x); 1350 return decodeURIComponent(x); 1351 }, 1352 /** 1353 * @param {string} chars 1354 * @param {string} data 1355 * @return {?} 1356 */ 1357 O: function (chars, data) { 1358 var v; 1359 /** @type {Array} */ 1360 var state = []; 1361 /** @type {number} */ 1362 var j = 0; 1363 /** @type {string} */ 1364 var optsData = ""; 1365 /** @type {number} */ 1366 var i = 0; 1367 for (; i < 256; i++) { 1368 /** @type {number} */ 1369 state[i] = i; 1370 } 1371 /** @type {number} */ 1372 i = 0; 1373 for (; i < 256; i++) { 1374 /** @type {number} */ 1375 j = (j + state[i] + chars.charCodeAt(i % chars.length)) % 256; 1376 v = state[i]; 1377 state[i] = state[j]; 1378 state[j] = v; 1379 } 1380 /** @type {number} */ 1381 i = 0; 1382 /** @type {number} */ 1383 j = 0; 1384 /** @type {number} */ 1385 var idx = 0; 1386 for (; idx < data.length; idx++) { 1387 v = state[i = (i + 1) % 256]; 1388 state[i] = state[j = (j + state[i]) % 256]; 1389 state[j] = v; 1390 optsData += String.fromCharCode(data.charCodeAt(idx) ^ state[(state[i] + state[j]) % 256]); 1391 } 1392 return optsData; 1393 } 1394 }; 1395 }, i], 1396 8: [function (require, dataAndEvents, deepDataAndEvents) { 1397 var dom = require(4); 1398 var filters = require(10); 1399 var Block = require(11); 1400 var nodes = require(14); 1401 var helper = require(13); 1402 var inspect = require(9); 1403 var selfClosing = require(15); 1404 0; 1405 require(5)["default"](); 1406 0; 1407 filters["default"](); 1408 0; 1409 Block["default"](); 1410 0; 1411 nodes["default"](); 1412 0; 1413 helper["default"](); 1414 0; 1415 inspect["default"](); 1416 0; 1417 selfClosing["default"](); 1418 0; 1419 dom.o('[data-toggle="tooltip"]').tooltip(); 1420 0; 1421 dom.o(document).activate(); 1422 if ("serviceWorker" in navigator) { 1423 window.addEventListener("load", function () { 1424 navigator.serviceWorker.register(app_vars['base_url'] + "/sw.js?v2"); 1425 }); 1426 } 1427 }, r], 1428 9: [function (require, dataAndEvents, p) { 1429 /** 1430 * @param {string} last 1431 * @param {number} bits 1432 * @return {undefined} 1433 */ 1434 function process(last, bits) { 1435 if (last.length) { 1436 try { 1437 var data = last.data("recaptcha"); 1438 if ("undefined" == typeof data) { 1439 data = ctx.render(last[0], { 1440 sitekey: _jQuery, 1441 theme: last.data("theme") || "light" 1442 }); 1443 last.data("recaptcha", data); 1444 } 1445 ctx.reset(data); 1446 } catch (t) { 1447 if (!bits || bits < 5) { 1448 setTimeout(function () { 1449 return process(last, (bits || 0) + 1); 1450 }, 500); 1451 } 1452 } 1453 } 1454 } 1455 var sortRange = { 1456 value: true 1457 }; 1458 Object.defineProperty(p, "t", sortRange); 1459 p["default"] = p.AjaxForm = undefined; 1460 var self = require(4); 1461 var nodes = require(3); 1462 var Block = require(12); 1463 var ctx = window.grecaptcha; 1464 var _jQuery = window.recaptchaSiteKey; 1465 var v = p.AjaxForm = self.FW.define("AjaxForm", { 1466 /** 1467 * @param {Object} input 1468 * @return {undefined} 1469 */ 1470 h: function (input) { 1471 var dom = this; 1472 /** @type {Object} */ 1473 this.A = input; 1474 this.I = input.find("input,textarea"); 1475 this.U = input.find('button[type="submit"],button.submit'); 1476 this.D = input.find("span.captcha");
1477 this.F = input.closest(".modal"); 1478 this.R = input.data("broadcast"); 1479 this.L(); 1480 this.U.click(function () { 1481 return dom.A.submit(); 1482 }); 1483 this.A.submit(self.o.proxy(this.N, this)); 1484 this.q(); 1485 }, 1486 /** 1487 * @return {undefined} 1488 */ 1489 L: function () { 1490 var field = this; 1491 if (this.F.length) { 1492 this.F.on("shown.bs.modal", function () { 1493 field.V(); 1494 }); 1495 } else { 1496 this.V(); 1497 } 1498 }, 1499 /** 1500 * @param {boolean} recurring 1501 * @return {undefined} 1502 */ 1503 B: function (recurring) { 1504 if (!(this.G || (this.G = this.A.find(".loader"), this.G.length))) { 1505 0; 1506 this.G = self.o('<div class="loader" />').appendTo(this.A); 1507 } 1508 /** @type {boolean} */ 1509 this.H = false; 1510 if (recurring) { 1511 this.G.K().show(); 1512 this.U.attr("disabled", true); 1513 } else { 1514 this.G.hide(); 1515 this.U.removeAttr("disabled"); 1516 } 1517 }, 1518 /** 1519 * @param {Object} data 1520 * @return {undefined} 1521 */ 1522 W: function (data) { 1523 var y; 1524 var object = data.result; 1525 if (data.messages && data.messages.length) { 1526 y = v.J; 1527 if (400 <= data.status) { 1528 y = v.Y; 1529 } else { 1530 if ("boolean" == typeof object && object) { 1531 y = v.$; 1532 } 1533 } 1534 this.Z(data.messages, y); 1535 } 1536 if (200 === data.status) { 1537 this.X(); 1538 } else { 1539 if (302 === data.status || 301 === data.status) { 1540 setTimeout(function () { 1541 window.location.href = data.url; 1542 }, 1E3); 1543 this.tt(); 1544 } else { 1545 this.nt(); 1546 } 1547 } 1548 this.V(); 1549 }, 1550 /** 1551 * @return {undefined} 1552 */ 1553 V: function () { 1554 process(this.D); 1555 }, 1556 /** 1557 * @return {undefined} 1558 */ 1559 it: function () { 1560 this.A[0].reset(); 1561 }, 1562 /** 1563 * @return {undefined} 1564 */ 1565 X: function () { 1566 if (this.R) { 1567 Block.Broadcast.rt(this.R); 1568 } 1569 this.et(); 1570 }, 1571 /** 1572 * @return {undefined} 1573 */ 1574 nt: function () { 1575 this.ut(); 1576 }, 1577 /** 1578 * @return {undefined} 1579 */ 1580 tt: function () { 1581 this.ot(); 1582 }, 1583 /** 1584 * @return {undefined} 1585 */ 1586 st: function () { 1587 this.A.find(".alert").remove(); 1588 }, 1589 /** 1590 * @param {Array} codeSegments 1591 * @param {?} v11 1592 * @return {undefined} 1593 */ 1594 Z: function (codeSegments, v11) { 1595 0; 1596 var element = self.o('<div class="alert" />').append('<button type="button" class="close" data-dismiss="alert"><span>×</span></button>'); 1597 if (v11 === v.$) { 1598 element.addClass("alert-success"); 1599 } else { 1600 if (v11 === v.Y) { 1601 element.addClass("alert-danger"); 1602 } else { 1603 element.addClass("alert-info"); 1604 } 1605 } 1606 /** @type {number} */ 1607 var i = 0; 1608 for (; i < codeSegments.length; i++) { 1609 0; 1610 self.o("<div />").text(codeSegments[i]).appendTo(element); 1611 } 1612 element.hide(); 1613 this.A.prepend(element); 1614 element.fadeIn(); 1615 }, 1616 /** 1617 * @return {?} 1618 */ 1619 ct: function () { 1620 /** @type {number} */ 1621 var o = 0; 1622 for (; o < this.I.length; o++) { 1623 0; 1624 var el = self.o(this.I[o]); 1625 if (el.attr("required") && "" === el.val()) { 1626 return false; 1627 } 1628 } 1629 return true; 1630 }, 1631 /** 1632 * @return {?} 1633 */ 1634 ft: function () { 1635 return true; 1636 }, 1637 /** 1638 * @param {Object} args 1639 * @return {undefined} 1640 */ 1641 N: function (args) { 1642 var data = this; 1643 args.preventDefault();
1644 if (!this.H && (this.ct() && this.ft())) { 1645 this.B(true); 1646 this.st(); 1647 0; 1648 /** @type {({async: boolean, contentType: boolean, data: ?, processData: boolean, type: string}|{data: ?, type: ?})} */ 1649 args = "multipart" === (args = nodes.formSerialize(this.A))[0] ? { 1650 type: "POST", 1651 data: args[1], 1652 async: true, 1653 contentType: false, 1654 processData: false 1655 } : { 1656 type: this.A.attr("method") || "GET", 1657 data: args[1] 1658 }; 1659 self.o.ajax(this.A.attr("action"), args).done(function (d) { 1660 return data.W(d); 1661 }).always(function () { 1662 return data.B(false); 1663 }); 1664 } 1665 }, 1666 /** 1667 * @return {undefined} 1668 */ 1669 q: function () { 1670 }, 1671 /** 1672 * @return {undefined} 1673 */ 1674 et: function () { 1675 }, 1676 /** 1677 * @return {undefined} 1678 */ 1679 ut: function () { 1680 }, 1681 /** 1682 * @return {undefined} 1683 */ 1684 ot: function () { 1685 } 1686 }); 1687 /** @type {number} */ 1688 v.Y = 1; 1689 /** @type {number} */ 1690 v.$ = 2; 1691 /** @type {number} */ 1692 v.J = 3; 1693 var func = self.FW.define("NormalForm", { 1694 /** 1695 * @param {Object} s 1696 * @return {undefined} 1697 */ 1698 h: function (s) { 1699 this.D = s.find("span.captcha"); 1700 process(this.D); 1701 } 1702 }); 1703 /** 1704 * @return {undefined} 1705 */ 1706 p["default"] = function () { 1707 v.bind("form.ajax"); 1708 func.bind("form.normal"); 1709 }; 1710 }, o], 1711 10: [function (require, dataAndEvents, obj) { 1712 var sortRange = { 1713 value: true 1714 }; 1715 Object.defineProperty(obj, "t", sortRange); 1716 obj["default"] = undefined; 1717 var self = require(4); 1718 var filters = require(7); 1719 var Block = require(12); 1720 var Handlebars = require(14); 1721 self.o.fn.extend(true, { 1722 /** 1723 * @return {?} 1724 */ 1725 K: function () { 1726 return this.html('<div class="loading"><div class="span1"></div><div class="span2"></div><div class="span3"></div></div>'); 1727 } 1728 }); 1729 var func = self.FW.define("MobileMenu", { 1730 /** 1731 * @param {Object} s 1732 * @return {undefined} 1733 */ 1734 h: function (s) { 1735 /** @type {Object} */ 1736 this.ht = s; 1737 0; 1738 this.vt = self.o("body"); 1739 0; 1740 this.lt = self.o("#sidebar_menu_bg"); 1741 0; 1742 this.dt = self.o("#sidebar_menu"); 1743 this._t = this.dt.find(".toggle-sidebar"); 1744 this.ht.click(self.o.proxy(this.gt, this)); 1745 this._t.click(self.o.proxy(this.gt, this)); 1746 this.lt.click(self.o.proxy(this.gt, this)); 1747 }, 1748 /** 1749 * @return {undefined} 1750 */ 1751 gt: function () { 1752 this.vt.toggleClass("body-hidden"); 1753 this.lt.toggleClass("active"); 1754 this.dt.toggleClass("active"); 1755 this.ht.toggleClass("active"); 1756 } 1757 }); 1758 var original = self.FW.define("MobileSearch", { 1759 /** 1760 * @param {HTMLElement} y 1761 * @return {undefined} 1762 */ 1763 h: function (y) { 1764 0; 1765 var element = self.o("#search"); 1766 y.click(function () { 1767 return element.toggleClass("active"); 1768 }); 1769 } 1770 }); 1771 var linkElement = self.FW.define("NavMore", { 1772 /** 1773 * @param {Object} a 1774 * @return {undefined} 1775 */ 1776 h: function (a) {
1777 var next = a.closest(".nav"); 1778 a.click(function () { 1779 next.toggleClass("active"); 1780 }); 1781 } 1782 }); 1783 var channel = self.FW.define("HeaderMenuFixed", { 1784 /** 1785 * @param {string} s 1786 * @return {undefined} 1787 */ 1788 h: function (s) { 1789 /** @type {string} */ 1790 this.yt = s; 1791 /** @type {boolean} */ 1792 this.wt = false; 1793 0; 1794 self.o(window).scroll(self.o.proxy(this.bt, this)); 1795 this.bt(); 1796 }, 1797 /** 1798 * @return {undefined} 1799 */ 1800 bt: function () { 1801 if (0 < window.pageYOffset) { 1802 if (!this.wt) { 1803 /** @type {boolean} */ 1804 this.wt = true; 1805 this.yt.addClass("fixed"); 1806 } 1807 } else { 1808 if (this.wt) { 1809 /** @type {boolean} */ 1810 this.wt = false; 1811 this.yt.removeClass("fixed"); 1812 } 1813 } 1814 } 1815 }); 1816 var tooltip = self.FW.define("Tooltip", { 1817 /** 1818 * @param {MessageEvent} s 1819 * @return {undefined} 1820 */ 1821 h: function (s) { 1822 var test; 1823 var f; 1824 /** @type {boolean} */ 1825 var h = false; 1826 if (!(window.innerWidth < 1024)) { 1827 (test = s.tooltipster({ 1828 contentAsHTML: true, 1829 updateAnimation: false, 1830 arrow: false, 1831 side: ["right", "left"], 1832 interactive: true, 1833 delay: 150, 1834 minWidth: 300, 1835 maxWidth: 300, 1836 content: '<div class="loading"><div class="span1"></div><div class="span2"></div><div class="span3"></div></div>', 1837 /** 1838 * @param {?} selfClosing 1839 * @param {?} dataAndEvents 1840 * @return {undefined} 1841 */ 1842 functionBefore: function (selfClosing, dataAndEvents) { 1843 var options = { 1844 dataType: "html" 1845 }; 1846 if (!h) { 1847 /** @type {boolean} */ 1848 h = true;
1849 self.o.ajax("ajax/anime/tooltip/".concat(s.data("tip")), options).done(function (name) { 1850 return selfClosing.content(name); 1851 }); 1852 } 1853 }, 1854 /** 1855 * @param {?} dataAndEvents 1856 * @param {?} evt 1857 * @param {Object} data 1858 * @return {?} 1859 */ 1860 functionPosition: function (dataAndEvents, evt, data) { 1861 data.coord.top -= (evt.geo.origin.size.height - data.size.height) / 2; 1862 data.coord.top += 0.3 * evt.geo.origin.size.height; 1863 data.side; 1864 return data; 1865 } 1866 }).tooltipster("instance")).on("before", f = function () { 1867 setTimeout(function () { 1868 try { 1869 0; 1870 self.o(s.tooltipster("elementTooltip")).activate(); 1871 } catch (t) { 1872 } 1873 }, 10); 1874 }); 1875 test.on("updated", f); 1876 } 1877 } 1878 }); 1879 var __method = self.FW.define("TopSearch", { 1880 /** 1881 * @param {?} s 1882 * @return {undefined} 1883 */ 1884 h: function (s) { 1885 var Ct = this; 1886 this.xt = s; 1887 this.A = s.find("form"); 1888 this.v = s.find("input"); 1889 this.St = s.find("#search-suggest"); 1890 this.kt = self.o.proxy(this.Tt, this); 1891 new self.FW.AutoComplete(this.v, function (deepDataAndEvents, triggerRoute) { 1892 return Ct.Ct(deepDataAndEvents, triggerRoute); 1893 }, function (dataAndEvents) { 1894 return Ct.Mt(); 1895 }); 1896 this.v.keydown(self.o.proxy(this.jt, this)).keyup(self.o.proxy(this.jt, this)).keypress(self.o.proxy(this.jt, this)).change(self.o.proxy(this.jt, this)); 1897 }, 1898 /** 1899 * @return {undefined} 1900 */ 1901 jt: function () { 1902 }, 1903 /** 1904 * @param {Event} e 1905 * @return {undefined} 1906 */ 1907 Tt: function (e) { 1908 if (!self.o.contains(this.xt[0], e.target)) { 1909 this.Mt(); 1910 0; 1911 self.o(document).off("click", this.kt); 1912 } 1913 }, 1914 /** 1915 * @param {?} deepDataAndEvents 1916 * @param {?} triggerRoute 1917 * @return {undefined} 1918 */ 1919 Ct: function (deepDataAndEvents, triggerRoute) { 1920 var t = this; 1921 filters["default"].M("ajax/anime/search", ["data", ["keyword", triggerRoute]]).done(function (resp) { 1922 t.St.hide().html(resp.result.html).slideDown(); 1923 0; 1924 self.o(document).on("click", t.kt); 1925 }); 1926 }, 1927 /** 1928 * @return {undefined} 1929 */ 1930 Mt: function () { 1931 this.St.empty().hide(); 1932 } 1933 }); 1934 var Events = self.FW.define("ContentSwitch", { 1935 /** 1936 * @param {Object} handle 1937 * @return {undefined} 1938 */ 1939 h: function (handle) { 1940 /** @type {null} */ 1941 var errors = null; 1942 handle.click(function (types) { 1943 types.preventDefault(); 1944 (errors = errors || handle.closest(".contents").find("[data-content]")).removeClass("active show"); 1945 errors.filter('[data-content="' + handle.data("content-switch") + '"]').addClass("active show"); 1946 }); 1947 } 1948 }); 1949 var done = self.FW.define("TabHref", { 1950 /** 1951 * @param {Object} s 1952 * @return {undefined} 1953 */ 1954 h: function (s) { 1955 /** @type {Object} */ 1956 this.Et = s; 1957 this.Ot = s.find('[data-toggle="tab"]'); 1958 this.Ot.click(self.o.proxy(this.Pt, this)); 1959 }, 1960 /** 1961 * @param {Object} e 1962 * @return {undefined} 1963 */ 1964 Pt: function (e) { 1965 0; 1966 e = self.o(e.currentTarget); 1967 if (e.data("target") && e.attr("href")) { 1968 window.history.replaceState("", "", e.attr("href")); 1969 } 1970 } 1971 }); 1972 var fun = self.FW.define("Tabs", { 1973 /** 1974 * @param {Object} element 1975 * @return {undefined} 1976 */ 1977 h: function (element) { 1978 var parentName = element.data("tabs"); 1979 this.At = parentName ? (0, self.o)(parentName) : element.closest("section").find(".tab-content"); 1980 this.Et = element.find(".tab"); 1981 this.It = element.data("fade"); 1982 this.Et.click(self.o.proxy(this.Pt, this)); 1983 }, 1984 /** 1985 * @param {Object} object 1986 * @return {undefined} 1987 */ 1988 Ut: function (object) { 1989 this.Et.removeClass("active"); 1990 object.addClass("active"); 1991 this.At.hide(); 1992 var $slides = this.At.filter('[data-name="'.concat(object.data("name"), '"]')); 1993 if (this.It) { 1994 $slides.fadeIn(); 1995 } else { 1996 $slides.show(); 1997 } 1998 if ($slides.length && /^(\/|http)/.test(object.attr("href"))) { 1999 window.history.replaceState("click", "", object.attr("href")); 2000 } 2001 }, 2002 /** 2003 * @param {Object} result 2004 * @return {undefined} 2005 */ 2006 Pt: function (result) { 2007 result.preventDefault(); 2008 0; 2009 result = self.o(result.currentTarget); 2010 this.Ut(result); 2011 } 2012 }); 2013 var cb = self.FW.define("Shorting", { 2014 /** 2015 * @param {string} s 2016 * @return {undefined} 2017 */ 2018 h: function (s) { 2019 var e = this; 2020 /** @type {string} */ 2021 this.xt = s; 2022 this.ht = s.find(".toggler"); 2023 this.ht.click(function () { 2024 e.xt.toggleClass("expand"); 2025 if (e.xt.hasClass("expand")) { 2026 e.ht.text("- Less"); 2027 } else { 2028 e.ht.text("+ More"); 2029 } 2030 }); 2031 } 2032 }); 2033 var options = self.FW.define("TimerCountDown", { 2034 /** 2035 * @param {Object} self 2036 * @return {undefined} 2037 */ 2038 h: function (self) { 2039 var el = this; 2040 /** @type {Object} */ 2041 this.Dt = self; 2042 this.Ft = self.data("target"); 2043 /** @type {number} */ 2044 this.Rt = Math.max(0, this.Ft - Math.floor((new Date).getTime() / 1E3)); 2045 this.Lt = self.data("step") || 1; 2046 this.Nt = self.data("format"); 2047 this.zt = self.data("zero-pad"); 2048 this.qt = self.data("divider") || ("human" == this.Nt ? ", " : ":"); 2049 this.Vt = self.data("reached"); 2050 this.bt(); 2051 /** @type {number} */ 2052 this.l = setInterval(function () { 2053 return el.bt(); 2054 }, 1E3 * this.Lt); 2055 }, 2056 /** 2057 * @return {undefined} 2058 */ 2059 bt: function () { 2060 /** @type {number} */ 2061 this.Rt = Math.max(0, this.Rt - this.Lt); 2062 var mom = this.Bt(); 2063 /** @type {string} */ 2064 var version = ""; 2065 version = "human" === this.Nt ? this.Gt(mom) : this.Ht(mom); 2066 this.Dt.text(version); 2067 if (!this.Rt) { 2068 if (this.Vt) { 2069 this.Dt.text(this.Vt); 2070 } 2071 clearInterval(this.l); 2072 } 2073 }, 2074 /** 2075 * @param {?} m 2076 * @return {?} 2077 */ 2078 Ht: function (m) { 2079 /** @type {Array} */ 2080 var tagNameArr = []; 2081 if ("day" == this.zt || m.days) { 2082 tagNameArr.push(this.Kt(m.days)); 2083 tagNameArr.push(this.Kt(m.hours)); 2084 } else { 2085 if (!("hour" != this.zt && !m.hours)) { 2086 tagNameArr.push(this.Kt(m.hours)); 2087 } 2088 } 2089 tagNameArr.push(this.Kt(m.minutes)); 2090 tagNameArr.push(this.Kt(m.seconds)); 2091 return tagNameArr.join(this.qt); 2092 }, 2093 /** 2094 * @param {?} m 2095 * @return {?} 2096 */ 2097 Gt: function (m) { 2098 /** @type {Array} */ 2099 var tagNameArr = []; 2100 if ("day" == this.zt || m.days) { 2101 tagNameArr.push("".concat(m.days, " day").concat(1 < m.days ? "s" : "")); 2102 tagNameArr.push("".concat(m.hours, " hour").concat(1 < m.hours ? "s" : "")); 2103 } else { 2104 if (!("hour" != this.zt && !m.hours)) { 2105 tagNameArr.push("".concat(m.hours, " hour").concat(1 < m.hours ? "s" : "")); 2106 } 2107 } 2108 tagNameArr.push("".concat(m.minutes, " minute").concat(1 < m.minutes ? "s" : "")); 2109 tagNameArr.push("".concat(m.seconds, " second").concat(1 < m.seconds ? "s" : "")); 2110 return tagNameArr.join(this.qt); 2111 }, 2112 /** 2113 * @param {?} val 2114 * @return {?} 2115 */ 2116 Kt: function (val) { 2117 return "00".concat(val).slice(-2); 2118 }, 2119 /** 2120 * @return {?} 2121 */ 2122 Bt: function () { 2123 return { 2124 days: Math.floor(this.Rt / 86400), 2125 hours: Math.floor(this.Rt % 86400 / 3600), 2126 minutes: Math.floor(this.Rt % 3600 / 60), 2127 seconds: this.Rt % 60 2128 }; 2129 } 2130 }); 2131 var minutesInputEl = self.FW.define("ListFilter", { 2132 /** 2133 * @param {Object} s 2134 * @return {undefined} 2135 */ 2136 h: function (s) { 2137 var reName = this; 2138 this.Wt = s.find(".dropdown-menu .genres input"); 2139 this.Jt = s.find('[name="keyword"]'); 2140 0; 2141 this.Yt = self.o("#exclude_watchlist"); 2142 this.Jt.keydown(self.o.proxy(this.$t, this)).keyup(self.o.proxy(this.$t, this)); 2143 this.$t(); 2144 Block.Broadcast.Zt("user:loaded", function () { 2145 return reName.Xt(); 2146 }); 2147 this.Wt.click(function (fn) { 2148 return reName.Qt(fn); 2149 }); 2150 this.Wt.each(function (dataAndEvents, clone) { 2151 0; 2152 clone = self.o(clone); 2153 if ("-" === "".concat(clone.val())[0]) { 2154 clone.addClass("exclude"); 2155 } 2156 }); 2157 }, 2158 /** 2159 * @param {Event} ev 2160 * @return {undefined} 2161 */ 2162 Qt: function (ev) { 2163 0; 2164 var clone = self.o(ev.currentTarget); 2165 /** @type {string} */ 2166 var match = "".concat(clone.val()); 2167 /** @type {string} */ 2168 var string = match.replace(/^-/, ""); 2169 if (!!clone.is(match.jrnRC(":", "checked")) || "-" === match[0]) { 2170 clone.removeClass("exclude").val(string); 2171 } else { 2172 ev.preventDefault(); 2173 clone.addClass("exclude").val("-".concat(string)); 2174 } 2175 }, 2176 /** 2177 * @return {undefined} 2178 */ 2179 $t: function () { 2180 }, 2181 /** 2182 * @return {undefined} 2183 */ 2184 Xt: function () { 2185 if (0 < Handlebars.Visitor.tn) { 2186 this.Yt.val(Handlebars.Visitor.tn).closest("li").show(); 2187 } 2188 } 2189 }); 2190 var callback = self.FW.define("DynamticTitle", { 2191 /** 2192 * @param {Node} s 2193 * @return {undefined} 2194 */ 2195 h: function (s) { 2196 /** @type {Node} */ 2197 this.Dt = s; 2198 this.Dt.data("en", this.Dt.text()); 2199 /** @type {string} */ 2200 this.nn = "title_lang"; 2201 this.rn(); 2202 Block.Broadcast.Zt("change:".concat(this.nn), self.o.proxy(this.en, this)); 2203 }, 2204 /** 2205 * @return {undefined} 2206 */ 2207 rn: function () { 2208 var msgs = Handlebars.Visitor.un(this.nn); 2209 if (msgs && msgs.length) { 2210 this.en(msgs); 2211 } 2212 }, 2213 /** 2214 * @param {number} data 2215 * @return {undefined} 2216 */ 2217 en: function (data) { 2218 data = this.Dt.data(data); 2219 if (!(data && data.length)) { 2220 data = this.Dt.data("en"); 2221 } 2222 this.Dt.text(data); 2223 } 2224 }); 2225 var $swipe = self.FW.define("LangSwitch", { 2226 /** 2227 * @param {Object} d 2228 * @return {undefined} 2229 */ 2230 h: function (d) { 2231 /** @type {Object} */ 2232 this.xt = d; 2233 this.on = d.children();
2234 this.nn = d.data("name"); 2235 this.sn = d.data("persist"); 2236 this.an = this.on.filter(".active").data("value"); 2237 if (this.sn) { 2238 this.an = Handlebars.Visitor.un(this.nn, this.an); 2239 this.cn(this.an); 2240 Block.Broadcast.Zt("change:".concat(this.nn), self.o.proxy(this.fn, this)); 2241 } 2242 this.on.click(self.o.proxy(this.hn, this)); 2243 }, 2244 /** 2245 * @param {?} haystack 2246 * @return {undefined} 2247 */ 2248 fn: function (haystack) { 2249 this.cn(haystack); 2250 }, 2251 /** 2252 * @param {?} array 2253 * @return {undefined} 2254 */ 2255 cn: function (array) { 2256 array = this.on.filter('[data-value="'.concat(array, '"]')); 2257 if (array.length) { 2258 this.vn(array); 2259 } 2260 }, 2261 /** 2262 * @param {Object} element 2263 * @return {undefined} 2264 */ 2265 vn: function (element) { 2266 this.on.removeClass("active"); 2267 element.addClass("active"); 2268 if (this._useInput) { 2269 this.v.val(element.data("value")); 2270 } 2271 }, 2272 /** 2273 * @param {Object} instance 2274 * @return {undefined} 2275 */ 2276 hn: function (instance) { 2277 0; 2278 instance = self.o(instance.currentTarget); 2279 this.vn(instance); 2280 if (this.sn) { 2281 Handlebars.Visitor.ln(this.nn, instance.data("value")); 2282 } 2283 } 2284 }); 2285 var elem = self.FW.define("AdsClose", { 2286 /** 2287 * @param {Object} s 2288 * @return {undefined} 2289 */ 2290 h: function (s) { 2291 0; 2292 var last = self.o('<div class="remove"></div>'); 2293 last.click(function () { 2294 s.slideUp(function () { 2295 s.remove(); 2296 }); 2297 }); 2298 last.appendTo(s); 2299 } 2300 }); 2301 var fn = self.FW.define("BsTooltip", { 2302 /** 2303 * @param {Object} d 2304 * @return {undefined} 2305 */ 2306 h: function (d) { 2307 d.tooltip(); 2308 } 2309 }); 2310 /** 2311 * @return {undefined} 2312 */ 2313 obj["default"] = function () { 2314 elem.bind("section.adx"); 2315 fun.bind("[data-tabs]"); 2316 options.bind(".countdown"); 2317 cb.bind(".shorting"); 2318 __method.bind("#search, .search-autocomplete"); 2319 func.bind("#mobile_menu"); 2320 linkElement.bind(".nav-more"); 2321 channel.bind("#header"); 2322 fn.bind('[data-toggle="tooltip"]'); 2323 tooltip.bind("[data-tip]"); 2324 Events.bind("[data-content-switch]"); 2325 done.bind(".nav-tabs"); 2326 original.bind("#mobile_search"); 2327 minutesInputEl.bind("form.filters"); 2328 $swipe.bind(".toggle-lang"); 2329 callback.bind(".d-title"); 2330 }; 2331 }, s], 2332 11: [function (require, dataAndEvents, obj) { 2333 var sortRange = { 2334 value: true 2335 }; 2336 Object.defineProperty(obj, "t", sortRange); 2337 obj["default"] = undefined; 2338 var self = require(4); 2339 var Handlebars = require(14); 2340 var Block = require(12); 2341 var RegExp = window.Swiper; 2342 var $swipe = self.FW.define("Hotest", { 2343 /** 2344 * @param {HTMLElement} m 2345 * @return {undefined} 2346 */ 2347 h: function (m) { 2348 var nextEl = m.find(".swiper-button-next"); 2349 var prevEl = m.find(".swiper-button-prev"); 2350 var _defaultParams = { 2351 delay: 5E3, 2352 disableOnInteraction: false 2353 }; 2354 var navigationHandler = { 2355 nextEl: nextEl[0], 2356 prevEl: prevEl[0] 2357 }; 2358 new RegExp(m[0], { 2359 autoplay: _defaultParams, 2360 grabCursor: true, 2361 loop: true, 2362 navigation: navigationHandler, 2363 pagination: { 2364 el: ".swiper-pagination", 2365 clickable: true, 2366 /** 2367 * @param {?} dataAndEvents 2368 * @param {?} caseSensitive 2369 * @return {?} 2370 */ 2371 renderBullet: function (dataAndEvents, caseSensitive) { 2372 return '<span class="'.concat(caseSensitive, '"></span>'); 2373 } 2374 } 2375 }); 2376 } 2377 }); 2378 var func = self.FW.define("Trending", { 2379 /** 2380 * @param {HTMLElement} s 2381 * @return {undefined} 2382 */ 2383 h: function (s) { 2384 var src = s.find(".swiper-container"); 2385 var nextEl = s.find(".navi" + "-next"); 2386 s = s.find(".navi-prev"); 2387 var navigationHandler = { 2388 nextEl: nextEl[0], 2389 prevEl: s[0] 2390 }; 2391 var modifiers = { 2392 grabCursor: true, 2393 navigation: navigationHandler, 2394 slidesPerView: "auto", 2395 slidesPerGroup: 1 2396 }; 2397 new RegExp(src[0], modifiers); 2398 } 2399 }); 2400 var original = self.FW.define("Schedule", { 2401 /** 2402 * @param {?} s 2403 * @return {undefined} 2404 */ 2405 h: function (s) { 2406 this.xt = s; 2407 /** @type {number} */ 2408 this.dn = (new Date).getTimezoneOffset() / -60; 2409 this.pn(); 2410 }, 2411 /** 2412 * @return {undefined} 2413 */ 2414 pn: function () { 2415 var _this = this; 2416 var task = { 2417 "tz": this.dn 2418 }; 2419 var args = { 2420 data: task 2421 };
2422 self.o.ajax("ajax/schedule", args).done(function (res) { 2423 _this.xt.html(res.result); 2424 _this.xt.activate(); 2425 _this._i(); 2426 _this.mn(); 2427 _this.gn(); 2428 }); 2429 }, 2430 /** 2431 * @param {Object} element 2432 * @return {undefined} 2433 */ 2434 yn: function (element) { 2435 var evt = this; 2436 self.o.ajax("ajax/schedule/date", { 2437 data: { 2438 tz: this.dn, 2439 time: element.data("time") 2440 } 2441 }).done(function (res) { 2442 evt.vt.hide().html(res.result).fadeIn(); 2443 evt.gn(); 2444 }); 2445 }, 2446 /** 2447 * @return {undefined} 2448 */ 2449 gn: function () { 2450 var $ = this; 2451 this.wn = this.vt.find(".table_schedule-list"); 2452 this.bn = this.vt.find("#scl-more"); 2453 this.bn.click(function () { 2454 return $.wn.toggleClass("expand"); 2455 }); 2456 }, 2457 /** 2458 * @return {undefined} 2459 */ 2460 mn: function () { 2461 /** 2462 * @return {undefined} 2463 */ 2464 function run() { 2465 /** @type {Date} */ 2466 var nextResetDate = new Date; 2467 $this.Sn.text("".concat(nextResetDate.toLocaleDateString(), " ").concat(nextResetDate.toLocaleTimeString())); 2468 } 2469 var $this = this; 2470 this.vt = this.xt.find(".content"); 2471 this.xn = this.xt.find(".tsd-item"); 2472 this.Sn = this.xt.find(".timenow"); 2473 this.xn.click(function (instance) { 2474 0; 2475 instance = self.o(instance.currentTarget); 2476 $this.xn.removeClass("active"); 2477 instance.addClass("active"); 2478 $this.yn(instance); 2479 }); 2480 run(); 2481 setInterval(run, 1E3); 2482 }, 2483 /** 2484 * @return {undefined} 2485 */ 2486 _i: function () { 2487 var rule = this.xt.find(".swiper-container"); 2488 var nextEl = this.xt.find(".tsn-next"); 2489 var prevEl = this.xt.find(".tsn-prev"); 2490 var relativeMouseX = rule.find(".tsd-item.active").closest(".swiper-slide").index(); 2491 var navigationHandler = { 2492 nextEl: nextEl[0], 2493 prevEl: prevEl[0] 2494 }; 2495 var modifiers = { 2496 grabCursor: true, 2497 navigation: navigationHandler, 2498 slidesPerView: "auto", 2499 slidesPerGroup: 2 2500 }; 2501 (new RegExp(rule[0], modifiers)).slideTo(relativeMouseX); 2502 } 2503 }); 2504 var linkElement = self.FW.define("GenreSection", { 2505 /** 2506 * @param {Object} s 2507 * @return {undefined} 2508 */ 2509 h: function (s) { 2510 var $ = this; 2511 /** @type {Object} */ 2512 this.kn = s; 2513 this.bn = s.find(".btn-showmore"); 2514 this.bn.click(function () { 2515 $.kn.toggleClass("active"); 2516 }); 2517 } 2518 }); 2519 var __method = self.FW.define("ContinueWatching", { 2520 /** 2521 * @param {?} s 2522 * @return {undefined} 2523 */ 2524 h: function (s) { 2525 var Tn = this; 2526 this.xt = s; 2527 Block.Broadcast.Zt("user:loaded", function () { 2528 return Tn.Tn(); 2529 }); 2530 }, 2531 /** 2532 * @return {undefined} 2533 */ 2534 Tn: function () { 2535 var Unicode = this; 2536 if (Handlebars.Visitor.Cn() && Handlebars.Visitor.un("show_playing_in_home")) { 2537 Block.Broadcast.Zt("playing:removed", function () { 2538 return Unicode.Mn(); 2539 }); 2540 this.Mn(); 2541 } 2542 }, 2543 /** 2544 * @return {undefined} 2545 */ 2546 Mn: function () { 2547 var event = this;
2548 self.o.ajax("ajax/user/playing/widget/home").done(function (resp) { 2549 if (200 === resp.status && resp.result.count) { 2550 event.xt.html(resp.result.html).show().activate(); 2551 } 2552 }); 2553 } 2554 }); 2555 var Events = self.FW.define("RecentUpdate", { 2556 /** 2557 * @param {Object} s 2558 * @return {undefined} 2559 */ 2560 h: function (s) { 2561 /** @type {Object} */ 2562 this.xt = s; 2563 this.Et = s.find(".nav-link"); 2564 this.vt = s.find(".tab-content"); 2565 this.Et.click(self.o.proxy(this.Pt, this)); 2566 this.jn(); 2567 }, 2568 /** 2569 * @return {undefined} 2570 */ 2571 jn: function () { 2572 var which = self.Storage.get("home_recent_update_tab"); 2573 if (which && "updated-all" != which) { 2574 this.Ut(which); 2575 } 2576 }, 2577 /** 2578 * @param {Object} result 2579 * @return {undefined} 2580 */ 2581 Pt: function (result) { 2582 0; 2583 result = self.o(result.currentTarget).data("name"); 2584 self.Storage.set("home_recent_update_tab", result); 2585 this.Ut(result); 2586 }, 2587 /** 2588 * @param {Object} object 2589 * @return {undefined} 2590 */ 2591 Ut: function (object) { 2592 object = this.Et.filter('[data-name="'.concat(object, '"]')); 2593 this.Et.removeClass("active"); 2594 object.addClass("active"); 2595 this.En(); 2596 }, 2597 /** 2598 * @return {undefined} 2599 */ 2600 En: function () { 2601 var event = this; 2602 var rv = this.Et.filter(".active").data("name"); 2603 this.vt.css("opacity", 0.5);
2604 self.o.ajax("ajax/home/widget/".concat(rv)).done(function (response) { 2605 if (200 === response.status) { 2606 event.vt.html(response.result).activate(); 2607 } 2608 }).always(function () { 2609 event.vt.css("opacity", 1); 2610 }); 2611 } 2612 }); 2613 /** 2614 * @return {undefined} 2615 */ 2616 obj["default"] = function () { 2617 $swipe.bind("#slider"); 2618 func.bind("#trending-home"); 2619 original.bind("#schedule-block"); 2620 linkElement.bind(".cbox-genres"); 2621 __method.bind("#widget-continue-watching"); 2622 Events.bind("#recent-update"); 2623 }; 2624 }, u], 2625 12: [function (topic, dataAndEvents, global) { 2626 var sortRange = { 2627 value: true 2628 }; 2629 Object.defineProperty(global, "t", sortRange); 2630 global.Toast = global.Broadcast = undefined; 2631 var out = topic(4); 2632 global.Broadcast = { 2633 On: {}, 2634 /** 2635 * @param {string} topic 2636 * @param {Function} spaceName 2637 * @return {undefined} 2638 */ 2639 Zt: function (topic, spaceName) { 2640 if ("undefined" == typeof this.On[topic]) { 2641 /** @type {Array} */ 2642 this.On[topic] = []; 2643 } 2644 this.On[topic].push(spaceName); 2645 }, 2646 /** 2647 * @param {string} index 2648 * @param {?} value 2649 * @return {undefined} 2650 */ 2651 rt: function (index, value) { 2652 /** @type {Array.<?>} */ 2653 var args = [].slice.call(arguments, 1); 2654 if ("undefined" != typeof this.On[index]) { 2655 this.On[index].forEach(function (wrapper) { 2656 setTimeout(function () { 2657 return wrapper.apply(null, args); 2658 }, 1); 2659 }); 2660 } 2661 } 2662 }; 2663 /** @type {function ((Array|string), number, number): undefined} */ 2664 var w = global.Toast = function init(json, step, delay) { 2665 if ("string" == typeof json) { 2666 /** @type {Array} */ 2667 json = [json]; 2668 } 2669 if (!init.xt) { 2670 0; 2671 init.xt = out.o('<div id="toast-container" class="toast-bottom-right" />').appendTo(document.body); 2672 } 2673 /** @type {number} */ 2674 var i = 0; 2675 for (; i < json.length; i++) { 2676 !function () { 2677 0; 2678 var overlay = out.o('<div class="toast" />'); 2679 0; 2680 var positionWrapper = out.o('<span class="toast-message mx-2" />').text(json[i]); 2681 if (step === init.$) { 2682 overlay.addClass("toast-success"); 2683 } else { 2684 if (step === init.Y) { 2685 overlay.addClass("toast-error"); 2686 } else { 2687 overlay.addClass("toast-info"); 2688 } 2689 } 2690 overlay.append(positionWrapper); 2691 overlay.hide(); 2692 overlay.fadeIn("fast"); 2693 setTimeout(function () { 2694 return overlay.fadeOut(function () { 2695 return overlay.remove(); 2696 }); 2697 }, delay || 3E3); 2698 init.xt.append(overlay); 2699 }(); 2700 } 2701 }; 2702 /** 2703 * @param {Object} step 2704 * @return {undefined} 2705 */ 2706 w.W = function (step) { 2707 var message = step.result; 2708 /** @type {number} */ 2709 var d = w.J; 2710 if (step.messages && step.messages.length) { 2711 if (400 <= step.status) { 2712 /** @type {number} */ 2713 d = w.Y; 2714 } else { 2715 if ("boolean" == typeof message && message) { 2716 /** @type {number} */ 2717 d = w.$; 2718 } 2719 } 2720 w(step.messages, d); 2721 } 2722 }; 2723 /** @type {number} */ 2724 w.J = 1; 2725 /** @type {number} */ 2726 w.$ = 2; 2727 /** @type {number} */ 2728 w.Y = 3; 2729 }, h], 2730 13: [function (require, dataAndEvents, obj) { 2731 var sortRange = { 2732 value: true 2733 }; 2734 Object.defineProperty(obj, "t", sortRange); 2735 obj["default"] = undefined; 2736 var options = require(4); 2737 var helper = require(9); 2738 var game = require(12); 2739 var Handlebars = require(14); 2740 var filters = require(7); 2741 var func = options.FW.define("SignForm", helper.AjaxForm.prototype, { 2742 /** 2743 * @return {undefined} 2744 */ 2745 et: function () { 2746 var self = this; 2747 setTimeout(function () { 2748 self.it(); 2749 0; 2750 options.o("#modallogin").modal("hide"); 2751 game.Broadcast.rt("user:updated"); 2752 }, 1E3); 2753 } 2754 }); 2755 var original = options.FW.define("UserNotification", { 2756 /** 2757 * @param {Object} s 2758 * @return {undefined} 2759 */ 2760 h: function (s) { 2761 this.Pn = s.find(".items-wrap"); 2762 this.An = s.find(".count"); 2763 this.In = s.find(".noti-item"); 2764 this.Un = s.find(".mark-as-read"); 2765 this.Un.click(options.o.proxy(this.Dn, this)); 2766 }, 2767 /** 2768 * @return {undefined} 2769 */ 2770 Dn: function () { 2771 var data = this; 2772 /** @type {Array} */ 2773 var list = []; 2774 this.In.filter(":not(.old)").each(function (dataAndEvents, a) { 2775 0; 2776 list.push(options.o(a).data("id")); 2777 }); 2778 if (list.length) { 2779 options.o.ajax(app_vars['base_url'] + "ajax/notification/update", { 2780 type: "POST", 2781 data: { 2782 action: "mark_as_read", 2783 ids: list, 2784 _csrfToken: csrfToken, 2785 } 2786 }).done(function (d) { 2787 if (200 === d.status) { 2788 game.Toast.W(d); 2789 data.In.addClass("old"); 2790 } 2791 }).always(function () { 2792 return data.Fn(); 2793 }); 2794 } 2795 }, 2796 /** 2797 * @return {undefined} 2798 */ 2799 Fn: function () { 2800 var data = this; 2801 if (this.Pn.length) { 2802 options.o.ajax(app_vars['base_url'] + "ajax/notification/panel").done(function (resp) { 2803 if (200 === resp.status) { 2804 data.Pn.html(resp.result.html); 2805 data.An.text(resp.result.count); 2806 data.In = data.Pn.find("a.item"); 2807 } 2808 }); 2809 } 2810 } 2811 }); 2812 var linkElement = options.FW.define("UserEditAvatar", { 2813 /** 2814 * @param {Object} s 2815 * @return {undefined} 2816 */ 2817 h: function (s) { 2818 0; 2819 this.Rn = options.o("#preview-avatar"); 2820 this.Ln = this.Rn.data("id"); 2821 /** @type {null} */ 2822 this.Nn = null; 2823 this.zn = s.find(".item-avatar"); 2824 this.Rn.data("orig", this.Rn.attr("src")); 2825 this.zn.click(options.o.proxy(this.qn, this)); 2826 s.on("shown.bs.modal", options.o.proxy(this.Vn, this)); 2827 s.on("hide.bs.modal", options.o.proxy(this.Bn, this)); 2828 }, 2829 /** 2830 * @param {?} dataAndEvents 2831 * @return {undefined} 2832 */ 2833 Vn: function (dataAndEvents) { 2834 this.zn.filter('[data-id="'.concat(this.Rn.data("id"), '"]')).addClass("active"); 2835 }, 2836 /** 2837 * @param {?} dataAndEvents 2838 * @return {undefined} 2839 */ 2840 Bn: function (dataAndEvents) { 2841 var Events = this; 2842 if (this.Nn && this.Nn != this.Ln) { 2843 filters["default"].M("member/users/pimage", ["type", "POST", "data", ["avatar_id", this.Nn, "_csrfToken", csrfToken]]).done(function (d) { 2844 game.Toast.W(d); 2845 Events.Ln = Events.Nn; 2846 }); 2847 } 2848 }, 2849 /** 2850 * @param {Object} self 2851 * @return {undefined} 2852 */ 2853 qn: function (self) { 2854 0; 2855 self = options.o(self.currentTarget); 2856 this.zn.removeClass("active"); 2857 self.addClass("active"); 2858 this.Rn.attr("src", self.find("img").attr("src")); 2859 this.Nn = self.data("id"); 2860 } 2861 }); 2862 var __method = options.FW.define("UserFavourite", { 2863 /** 2864 * @param {string} model 2865 * @return {undefined} 2866 */ 2867 h: function (model) { 2868 var column = this; 2869 /** @type {string} */ 2870 this.Gn = model; 2871 this.Ln = model.data("id"); 2872 /** @type {boolean} */ 2873 this.Hn = false; 2874 this.Kn = model.data("fetch"); 2875 this.Wn = model.data("folder"); 2876 this.Jn = model.find('[data-toggle="dropdown"]'); 2877 this.Yn = model.find(".dropdown-menu"); 2878 this.$n = model.find(".folders"); 2879 if (this.Kn) { 2880 game.Broadcast.Zt("user:loaded", function () { 2881 return column.Zn(); 2882 }); 2883 } 2884 this.Gn.mouseenter(options.o.proxy(this.Xn, this)); 2885 this.Gn.click(options.o.proxy(this.Qn, this)); 2886 this.Yn.on("click", ".dropdown-item", options.o.proxy(this.ti, this)); 2887 }, 2888 /** 2889 * @return {undefined} 2890 */ 2891 Zn: function () { 2892 var self = this; 2893 if (Handlebars.Visitor.Cn()) { 2894 this.Gn.hide(); 2895 filters["default"].M("ajax/user/favourite/get/".concat(this.Ln)).done(function (r) { 2896 if (200 === r.status) { 2897 self.Wn = r.result; 2898 self.ni(); 2899 self.Gn.show(); 2900 } 2901 }); 2902 } else { 2903 this.ni(); 2904 } 2905 }, 2906 /** 2907 * @param {?} event 2908 * @return {undefined} 2909 */ 2910 Qn: function (event) { 2911 if (Handlebars.Visitor.ii()) { 2912 event.stopPropagation(); 2913 } 2914 }, 2915 /** 2916 * @param {string} e 2917 * @return {undefined} 2918 */ 2919 ti: function (e) { 2920 0; 2921 e = options.o(e.currentTarget).data("id"); 2922 /** @type {string} */ 2923 this.Wn = e; 2924 this.ni(); 2925 filters["default"].M("ajax/user/favourite/save", ["type", "POST", "data", ["id", this.Ln, "folder", e, "_csrfToken", csrfToken]]).done(function (d) { 2926 game.Toast.W(d); 2927 }); 2928 }, 2929 /** 2930 * @return {undefined} 2931 */ 2932 ni: function () { 2933 this.$n.empty(); 2934 var data = Handlebars.Visitor.ri(); 2935 if (this.Jn.data("add") && this.Jn.data("edit")) { 2936 this.Jn.html(this.Jn.data(this.Wn ? "edit" : "add")); 2937 }
2938 if (this.Wn) { 2939 data.push({ 2940 id: 0, 2941 name: '<span class=text-danger">Remove</span>', 2942 html: true 2943 }); 2944 } 2945 /** @type {number} */ 2946 var i = 0; 2947 for (; i < data.length; i++) { 2948 0; 2949 var pre = options.o('<a class="dropdown-item" href="javascript:;" />').attr("data-id", data[i].id); 2950 if (data[i].html) { 2951 pre.html(data[i].name); 2952 } else { 2953 pre.text(data[i].name); 2954 } 2955 if (this.Wn == data[i].id) { 2956 pre.addClass("active"); 2957 } 2958 this.$n.append(pre); 2959 } 2960 }, 2961 /** 2962 * @param {?} dataAndEvents 2963 * @return {undefined} 2964 */ 2965 Xn: function (dataAndEvents) { 2966 if (!this.Hn) { 2967 /** @type {boolean} */ 2968 this.Hn = true; 2969 this.ni(); 2970 } 2971 } 2972 }); 2973 var Events = options.FW.define("UserPlayingRemove", { 2974 /** 2975 * @param {Object} input 2976 * @return {undefined} 2977 */ 2978 h: function (input) { 2979 input.click(function () { 2980 filters["default"].M("ajax/user/playing/delete", ["type", "POST", "data", ["id", input.data("id"), "_csrfToken", csrfToken]]).done(function (d) { 2981 game.Toast.W(d); 2982 if (d.result) { 2983 game.Broadcast.rt("playing:removed"); 2984 input.closest(d.odrpV(".flw-", "item")).fadeOut(); 2985 } 2986 }); 2987 }); 2988 } 2989 }); 2990 var done = options.FW.define("UserPlayingClear", { 2991 /** 2992 * @param {HTMLElement} y 2993 * @return {undefined} 2994 */ 2995 h: function (y) { 2996 y.click(function () { 2997 var udataCur = 100 * Math.random(); 2998 filters["default"].M("ajax/user/playing/clear", ["type", "POST", "data", ["req_id", udataCur, "vrf", filters["default"].j(udataCur), "_csrfToken", csrfToken]]).done(function (d) { 2999 game.Toast.W(d); 3000 if (200 === d.status) { 3001 setTimeout(function () { 3002 return window.location.reload(); 3003 }, 2E3); 3004 } 3005 }); 3006 }); 3007 } 3008 }); 3009 /** 3010 * @return {undefined} 3011 */ 3012 obj["default"] = function () { 3013 func.bind("form.signform"); 3014 original.bind(".user-notification"); 3015 linkElement.bind("#modalavatars"); 3016 __method.bind(".favourite"); 3017 Events.bind(".remove-cw"); 3018 done.bind(".playing-clear"); 3019 }; 3020 }, c], 3021 14: [function (require, dataAndEvents, p) { 3022 /** 3023 * @param {?} v12 3024 * @return {?} 3025 */ 3026 function create(v12) { 3027 return (create = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (v12) { 3028 return typeof v12; 3029 } : function (b) { 3030 return b && ("function" == typeof Symbol && (b.constructor === Symbol && b !== Symbol.prototype)) ? "symbol" : typeof b; 3031 })(v12); 3032 } 3033 var sortRange = { 3034 value: true 3035 }; 3036 Object.defineProperty(p, "t", sortRange); 3037 p["default"] = p.Visitor = undefined; 3038 var item = require(4); 3039 var Canvas = require(12); 3040 var filters = require(7); 3041 var proxy = p.Visitor = { 3042 tn: 0, 3043 ei: {}, 3044 ui: null, 3045 oi: ["show_playing_in_home", "title_lang", "auto_next", "auto_play", "auto_load_comment", "skip_seconds", "auto_skip_intro", "prefered_source_type", "episode_list_style"], 3046 si: null, 3047 /** 3048 * @return {undefined} 3049 */ 3050 L: function () { 3051 var ci = this; 3052 0; 3053 this.ai = item.o("#header_right"); 3054 this.Tn(); 3055 Canvas.Broadcast.Zt("user:updated", function () { 3056 return ci.Tn(); 3057 }); 3058 0; 3059 item.o(window).on("beforeunload", function () { 3060 return ci.ci(); 3061 }); 3062 }, 3063 /** 3064 * @return {undefined} 3065 */ 3066 Tn: function () { 3067 var udataCur = this; 3068 filters["default"].M("auth/ajax/user/panel").done(function (d) { 3069 return udataCur.W(d); 3070 }).always(function () { 3071 Canvas.Broadcast.rt("user:loaded", udataCur); 3072 }); 3073 }, 3074 /** 3075 * @return {?} 3076 */ 3077 Cn: function () { 3078 return 0 < this.tn; 3079 }, 3080 /** 3081 * @return {?} 3082 */ 3083 ii: function () { 3084 return !this.Cn() && ((0, Canvas.Toast)("Please login to use this feature.", Canvas.Toast.Y), true); 3085 }, 3086 /** 3087 * @param {Object} v23 3088 * @return {undefined} 3089 */ 3090 W: function (v23) { 3091 this.tn = v23.result.user.id; 3092 this.ai.html(v23.result.html).activate(); 3093 item.Storage.set("user.settings", this.ei); 3094 this.fi(v23.result.user.folders); 3095 this.hi(v23.result.user.settings); 3096 this.ci(); 3097 }, 3098 /** 3099 * @return {undefined} 3100 */ 3101 ci: function () { 3102 if (this.Cn()) { 3103 this.vi(); 3104 } 3105 }, 3106 /** 3107 * @param {Object} overrides 3108 * @return {undefined} 3109 */ 3110 hi: function (overrides) { 3111 /** @type {Array.<string>} */ 3112 var keys = Object.keys(overrides); 3113 /** @type {number} */ 3114 var i = 0; 3115 for (; i < keys.length; i++) { 3116 /** @type {string} */ 3117 var key = keys[i]; 3118 var value = overrides[key]; 3119 if (this.un(key) !== value) { 3120 Canvas.Broadcast.rt("change:".concat(key), value); 3121 } 3122 this.ei[key] = value; 3123 item.Storage.set(key, value); 3124 } 3125 }, 3126 /** 3127 * @return {?} 3128 */ 3129 ri: function () { 3130 return item.Storage.get("user.folders", []); 3131 }, 3132 /** 3133 * @param {?} pdataOld 3134 * @return {undefined} 3135 */ 3136 fi: function (pdataOld) { 3137 item.Storage.set("user.folders", pdataOld); 3138 }, 3139 /** 3140 * @param {string} selector 3141 * @return {?} 3142 */ 3143 un: function (selector) { 3144 return "undefined" != typeof this.ei[selector] ? this.ei[selector] : item.Storage.get(selector); 3145 }, 3146 /** 3147 * @param {string} key 3148 * @param {?} val 3149 * @return {undefined} 3150 */ 3151 ln: function (key, val) { 3152 var ul = this; 3153 if (!(val === this.un(key) || (item.Storage.set(key, val), Canvas.Broadcast.rt("change:".concat(key), val), this.oi.indexOf(key) < 0))) { 3154 this.ei[key] = val; 3155 this.ei['_csrfToken'] = csrfToken; 3156 this.ei['ajax'] = true; 3157 if (this.Cn()) { 3158 if (this.ui) { 3159 clearTimeout(this.ui); 3160 } 3161 /** @type {number} */ 3162 this.ui = setTimeout(function () { 3163 return ul.li(); 3164 }, 500); 3165 } 3166 } 3167 }, 3168 /** 3169 * @return {undefined} 3170 */ 3171 li: function () { 3172 filters["default"].M("member/users/update-profile", ["type", "POST", "data", this.ei]).done(function (d) { 3173 Canvas.Toast.W(d); 3174 }); 3175 }, 3176 /** 3177 * @return {?} 3178 */ 3179 di: function () { 3180 var b = item.Storage.get("user.playing"); 3181 return b = (b = "object" !== create(b) ? null : b) && !Object.keys(b).length ? null : b; 3182 }, 3183 /** 3184 * @param {?} name 3185 * @param {?} value 3186 * @param {number} val 3187 * @param {Object} n 3188 * @return {undefined} 3189 */ 3190 pi: function (name, value, val, n) { 3191 var options = this; 3192 var pdataOld = this.di() || {}; 3193 /** @type {Array} */ 3194 pdataOld[name] = [value, val, n]; 3195 // watch log 3196 watchlog(name, value); 3197 // console.log("watch log"); 3198 // item.Storage.set("user.playing", pdataOld); 3199 if (this.Cn()) { 3200 if (this.si) { 3201 clearTimeout(this.si); 3202 } 3203 /** @type {number} */ 3204 this.si = setTimeout(function () { 3205 return options.vi(); 3206 }, 5E3); 3207 } 3208 }, 3209 /** 3210 * @return {undefined} 3211 */ 3212 vi: function () { 3213 var di = this.di(); 3214 if (di) { 3215 filters["default"].M("ajax/user/playing/save", ["type", "POST", "data", ["playing", di, "_csrfToken", csrfToken]]).done(function () { 3216 item.Storage.remove("user.playing"); 3217 }); 3218 } 3219 }, 3220 /** 3221 * @param {?} val 3222 * @param {Function} onSuccess 3223 * @return {undefined} 3224 */ 3225 _n: function (val, onSuccess) { 3226 if (0 < this.tn) { 3227 filters["default"].M("ajax/user/playing/get/".concat(val)).done(function (response) { 3228 if (200 === response.status) { 3229 onSuccess(response.result); 3230 } 3231 }); 3232 } 3233 } 3234 }; 3235 /** 3236 * @return {undefined} 3237 */ 3238 p["default"] = function () { 3239 proxy.L(); 3240 }; 3241 }, e], 3242 15: [function (require, dataAndEvents, obj) { 3243 /** 3244 * @param {?} ctor 3245 * @return {?} 3246 */ 3247 function mixin(ctor) { 3248 return (mixin = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (ctor) { 3249 return typeof ctor; 3250 } : function (a) { 3251 return a && ("function" == typeof Symbol && (a.constructor === Symbol && a !== Symbol.prototype)) ? "symbol" : typeof a; 3252 })(ctor); 3253 } 3254 var sortRange = { 3255 value: true 3256 }; 3257 Object.defineProperty(obj, "t", sortRange); 3258 obj["default"] = undefined; 3259 var request = require(4); 3260 var Block = require(12); 3261 var Handlebars = require(14); 3262 var filters = require(7); 3263 var String = request.FW.define("OnOffControl", { 3264 mi: [], 3265 /** 3266 * @param {string} value 3267 * @return {undefined} 3268 */ 3269 h: function (value) { 3270 this.L(value); 3271 }, 3272 /** 3273 * @param {Function} spaceName 3274 * @return {undefined} 3275 */ 3276 gi: function (spaceName) { 3277 this.mi.push(spaceName); 3278 }, 3279 /** 3280 * @param {string} self 3281 * @return {undefined} 3282 */ 3283 L: function (self) { 3284 /** @type {string} */ 3285 this.Gn = self; 3286 this.sn = self.data("persist"); 3287 this.an = self.data("default"); 3288 if (this.sn && (this.yi = this.Gn.data("name"), "undefined" != typeof (self = Handlebars.Visitor.un(this.yi)))) { 3289 /** @type {string} */ 3290 this.an = self; 3291 } 3292 this.Gn.click(request.o.proxy(this.gt, this)); 3293 this.q(); 3294 this.bt(); 3295 }, 3296 /** 3297 * @return {undefined} 3298 */ 3299 gt: function () { 3300 /** @type {boolean} */ 3301 this.an = !this.an; 3302 if (this.sn) { 3303 Handlebars.Visitor.ln(this.yi, this.an ? 1 : 0); 3304 } 3305 /** @type {number} */ 3306 var conditionIndex = 0; 3307 for (; conditionIndex < this.mi.length; conditionIndex++) { 3308 this.mi[conditionIndex](); 3309 } 3310 this.wi(); 3311 this.bt(); 3312 }, 3313 /** 3314 * @return {undefined} 3315 */ 3316 bt: function () { 3317 if (this.an) { 3318 this.Gn.removeClass("off").addClass("on"); 3319 } else { 3320 this.Gn.removeClass("on").addClass("off"); 3321 } 3322 this.bi(); 3323 }, 3324 /** 3325 * @return {undefined} 3326 */ 3327 q: function () { 3328 }, 3329 /** 3330 * @return {undefined} 3331 */ 3332 bi: function () { 3333 }, 3334 /** 3335 * @return {undefined} 3336 */ 3337 wi: function () { 3338 } 3339 }); 3340 var func = request.FW.define("LightControl", String.prototype, { 3341 /** 3342 * @return {undefined} 3343 */ 3344 q: function () { 3345 0; 3346 this.xi = request.o("<div />").css("width", "100%").css("height", "100%").css("position", "fixed").css("left", 0).css("top", 0).css("z-index", 150).css("background", "#000").css("opacity", "0.95").css("display", "none").appendTo(document.body).click(request.o.proxy(this.Qn, this)); 3347 0; 3348 this.Si = request.o(".player-frame"); 3349 }, 3350 /** 3351 * @return {undefined} 3352 */ 3353 Qn: function () { 3354 this.gt(); 3355 }, 3356 /** 3357 * @return {undefined} 3358 */ 3359 bi: function () { 3360 if (this.an) { 3361 this.xi.fadeOut(); 3362 this.Si.removeAttr("style"); 3363 } else { 3364 this.xi.fadeIn(); 3365 this.Si.css("z-index", 151); 3366 } 3367 } 3368 }); 3369 var original = request.FW.define("ExpandControl", String.prototype, { 3370 /** 3371 * @return {undefined} 3372 */ 3373 q: function () { 3374 0; 3375 this.ki = request.o(".anis-watch-wrap"); 3376 }, 3377 /** 3378 * @return {undefined} 3379 */ 3380 bt: function () { 3381 this.Gn.html(this.Gn.data(this.an ? "on" : "off")); 3382 if (this.an) { 3383 this.ki.addClass("extend"); 3384 } else { 3385 this.ki.removeClass("extend"); 3386 } 3387 } 3388 }); 3389 var h = request.FW.define("SkipEpisode", String.prototype, { 3390 /** 3391 * @param {string} value 3392 * @param {?} s 3393 * @return {undefined} 3394 */ 3395 h: function (value, s) { 3396 this.L(value); 3397 this.Ti = s; 3398 }, 3399 /** 3400 * @return {undefined} 3401 */ 3402 wi: function () { 3403 if (this.Gn.hasClass("btn-next")) { 3404 this.Ti.Ci(1); 3405 } else { 3406 this.Ti.Ci(-1); 3407 } 3408 } 3409 }); 3410 var CastError = request.FW.define("WatchView", { 3411 /** 3412 * @param {?} y 3413 * @param {Object} field 3414 * @return {undefined} 3415 */ 3416 h: function (y, field) { 3417 this.Mi = y; 3418 this.Ln = field.data("id"); 3419 this.ji = field.data("url"); 3420 this.Ei = field.data("ep-name"); 3421 this.Oi = field.data("ep-type"); 3422 /** @type {Object} */ 3423 this.xt = field; 3424 this.Pi = field.find("#episodes-content"); 3425 this.Ai = field.find("#servers-content"); 3426 this.Si = field.find("#player"); 3427 this.Ii = this.Si.find(".play").hide(); 3428 /** @type {boolean} */ 3429 this.Ui = false; 3430 /** @type {null} */ 3431 this.Di = null; 3432 /** @type {null} */ 3433 this.Fi = null; 3434 this.Ri; 3435 0; 3436
3436 this.Li = request.o(".current-episode-name"); 3437 0; 3438 this.Ni = request.o(".current-episode-type"); 3439 0; 3440 this.zi = request.o("#comment-block"); 3441 this.qi = this.zi.find("[data-tabs] .tab"); 3442 this.Vi = this.zi.find(".load-comments"); 3443 y = Handlebars.Visitor.un("auto_load_comment"); 3444 if ("undefined" != typeof y) { 3445 this.zi.data("load", y); 3446 } 3447 this.qi.click(request.o.proxy(this.Bi, this)); 3448 this.Vi.click(request.o.proxy(this.Gi, this)); 3449 }, 3450 /** 3451 * @param {Object} obj 3452 * @return {undefined} 3453 */ 3454 Bi: function (obj) { 3455 0; 3456 obj = request.o(obj.currentTarget); 3457 this.Hi(obj); 3458 }, 3459 /** 3460 * @param {?} dataAndEvents 3461 * @return {undefined} 3462 */ 3463 Gi: function (dataAndEvents) { 3464 var suiteView = this.qi.filter(".active"); 3465 this.zi.data("load", true); 3466 this.Hi(suiteView); 3467 }, 3468 /** 3469 * @param {Object} obj 3470 * @return {undefined} 3471 */ 3472 Hi: function (obj) { 3473 if ("anime" === obj.data("name")) { 3474 this.Ki(); 3475 } else { 3476 this.Wi(); 3477 } 3478 }, 3479 /** 3480 * @return {undefined} 3481 */ 3482 Ki: function () { 3483 var te = this.zi.data("id"); 3484 var failuresLink = this.zi.data("link"); 3485 this.Ji(te, failuresLink); 3486 }, 3487 /** 3488 * @return {undefined} 3489 */ 3490 Wi: function () { 3491 this.qi.removeClass("active").filter('[data-name="episode"]').addClass("active"); 3492 var children = this.Yi(); 3493 var p = this.$i(); 3494 var caseSensitive = p.data("type"); 3495 p = p.data("cmid"); 3496 children = children.data("slug"); 3497 var left = this.zi.data("link"); 3498 if ("softsub" === caseSensitive) { 3499 /** @type {string} */ 3500 caseSensitive = "sub"; 3501 p = this.Zi.filter('[data-type="sub"]').first().data("cmid"); 3502 } 3503 this.Ji("".concat(p, "_").concat(children), "".concat(left, "/ep-").concat(children, "?type=").concat(caseSensitive)); 3504 }, 3505 /** 3506 * @param {?} n 3507 * @param {string} el 3508 * @return {undefined} 3509 */ 3510 Ji: function (n, el) { 3511 try { 3512 /** 3513 * @return {undefined} 3514 */ 3515 window.disqus_config = function () { 3516 //this.page.identifier = n; 3517 if (el.includes("gogoanime") && el.includes("ep")) { 3518 el = el.replace("/category/", "/"); 3519 el = el.replace("/ep-", "-episode-"); 3520 } 3521 el = el.replace("?type=sub", ""); 3522 3523 if (el.includes("gogoanime") && el.includes("episode") && el.includes("dub")) { 3524 el = el.replace("?type=dub", ""); 3525 el = el.replace("-episode-", "-dub-episode-"); 3526 } 3527 /** @type {string} */ 3528 this.page.url = el; 3529 }; 3530 } catch (t) { 3531 } 3532 if (this.zi.data("load") && this.Xi != n) { 3533 this.Xi = n; 3534 this.Qi(); 3535 } 3536 }, 3537 /** 3538 * @return {undefined} 3539 */ 3540 Qi: function () { 3541 var scriptElem; 3542 this.Vi.remove(); 3543 if (!this.tr) { 3544 /** @type {boolean} */ 3545 this.tr = true; 3546 (scriptElem = document.createElement("script")).src = this.zi.data("src"); 3547 scriptElem.setAttribute("data-timestamp", +new Date); 3548 (document.head || document.body).appendChild(scriptElem); 3549 } 3550 try { 3551 var options = { 3552 reload: true 3553 }; 3554 window.DISQUS.reset(options); 3555 } catch (t) { 3556 } 3557 this.nr(); 3558 }, 3559 /** 3560 * @return {undefined} 3561 */ 3562 nr: function () { 3563 /** @type {number} */ 3564 var t = 0; 3565 /** @type {number} */ 3566 var poll = setInterval(function () { 3567 if (30 < t++) { 3568 clearInterval(poll); 3569 } else { 3570 0; 3571 request.o("iframe").each(function (dataAndEvents, el) { 3572 var ok = el.getAttribute("name"); 3573 if (ok && (-1 < ok.indexOf("dsq") && !el.getAttribute("src"))) { 3574 el.parentNode.removeChild(el); 3575 clearInterval(poll); 3576 } 3577 }); 3578 } 3579 }, 500); 3580 }, 3581 /** 3582 * @return {undefined} 3583 */ 3584 K: function () { 3585 this.Si.removeAttr("style").html('<div class="loading" />'); 3586 }, 3587 /** 3588 * @param {string}
3588 node 3589 * @return {undefined} 3590 */ 3591 ir: function (node) { 3592 0; 3593 this.Si.removeAttr("style").empty().append(request.o('<div class="message" />').text(node)); 3594 }, 3595 /** 3596 * @return {undefined} 3597 */ 3598 rr: function () { 3599 var activeClassName; 3600 this.er = this.xt.find(".filter.type .dropdown-toggle"); 3601 this.ur = this.xt.find(".filter.type .dropdown-item"); 3602 this.Fi = this.Di; 3603 if (1 < this.ur.length) { 3604 activeClassName = this.sr(); 3605 this.ar(activeClassName); 3606 } 3607 this.ur.click(request.o.proxy(this.cr, this)); 3608 }, 3609 /** 3610 * @return {?} 3611 */ 3612 sr: function () { 3613 return arguments.length ? request.Storage.set("saved_filter_type", arguments[0]) : request.Storage.get("saved_filter_type", ""); 3614 }, 3615 /** 3616 * @param {Object} instance 3617 * @return {undefined} 3618 */ 3619 cr: function (instance) { 3620 0; 3621 instance = request.o(instance.currentTarget).data("value"); 3622 this.sr(instance); 3623 this.ar(instance); 3624 }, 3625 /** 3626 * @param {Object} element 3627 * @return {undefined} 3628 */ 3629 ar: function (element) { 3630 element = this.ur.filter('[data-value="'.concat(element, '"]')); 3631 var key = element.data("value"); 3632 element = element.text(); 3633 this.er.data("value", key).text(element); 3634 this.hr(key); 3635 }, 3636 /** 3637 * @param {Object} value 3638 * @return {undefined} 3639 */ 3640 hr: function (value) { 3641 var res; 3642 if ("" === value) { 3643 this.Fi = this.Di.show().attr("enabled", 1); 3644 this.vr.show(); 3645 } else { 3646 /** @type {Array} */ 3647 res = []; 3648 this.Di.each(function (dataAndEvents, file) { 3649 0; 3650 var index = request.o(file); 3651 if (1 == index.data(value)) { 3652 index.show().attr("enabled", 1); 3653 res.push(file); 3654 } else { 3655 index.hide().attr("enabled", 0); 3656 } 3657 }); 3658 0; 3659 this.Fi = request.o(res); 3660 this.lr(); 3661 } 3662 }, 3663 /** 3664 * @return {undefined} 3665 */ 3666 dr: function () { 3667 this.pr = this.xt.find("#current-page"); 3668 this.vr = this.xt.find("#ssc-list .dropdown-item"); 3669 var result = this.vr.first(); 3670 this.pr.data("value", result.data("value")).text(result.text()); 3671 this.vr.click(request.o.proxy(this.be, this)); 3672 }, 3673 /** 3674 * @param {Object} object 3675 * @return {undefined} 3676 */ 3677 mr: function (object) { 3678 var key = this.vr.filter('[data-value="'.concat(object, '"]')).data("value"); 3679 this.pr.data("value", key).text(object); 3680 this.Ri.forEach(function (ui) { 3681 if (ui.gr.data("range") == key) { 3682 ui.gr.show(); 3683 } else { 3684 ui.gr.hide(); 3685 } 3686 }); 3687 }, 3688 /** 3689 * @param {Object} that 3690 * @return {undefined} 3691 */ 3692 be: function (that) { 3693 0; 3694 that = request.o(that.currentTarget); 3695 this.mr(that.data("value")); 3696 }, 3697 /** 3698 * @return {undefined} 3699 */ 3700 lr: function () { 3701 var isFunction = this.pr.data("value"); 3702 /** @type {boolean} */ 3703 var dot = false; 3704 /** @type {boolean} */ 3705 var type = false; 3706 /** @type {number} */ 3707 var hi = this.Ri.length - 1; 3708 for (; 0 <= hi; hi--) { 3709 var c = this.Ri[hi]; 3710 var which = c.gr.data("range");
3711 if (!(type || which != isFunction)) { 3712 /** @type {boolean} */ 3713 type = true; 3714 } 3715 if (c.yr.filter('[enabled="1"]').length) { 3716 c.wr.show(); 3717 if (!dot && (type && (dot = true, which != isFunction))) { 3718 this.mr(which); 3719 } 3720 } else { 3721 c.wr.hide(); 3722 } 3723 } 3724 }, 3725 /** 3726 * @return {undefined} 3727 */ 3728 br: function () { 3729 this.Sr = this.xt.find("#search-ep"); 3730 this.Sr.keyup(request.o.proxy(this.kr, this)); 3731 }, 3732 /** 3733 * @param {?} event 3734 * @return {undefined} 3735 */ 3736 kr: function (event) { 3737 var nv = this; 3738 var v = this.Sr.val().replace(/[^0-9]/g, ""); 3739 this.Sr.val(v); 3740 if (this.Tr) { 3741 clearTimeout(this.Tr); 3742 } 3743 /** @type {number} */ 3744 this.Tr = setTimeout(function () { 3745 return nv.Cr(v, 13 == event.keyCode); 3746 }, 250); 3747 }, 3748 /** 3749 * @param {string} val 3750 * @param {boolean} dataAndEvents 3751 * @return {undefined} 3752 */ 3753 Cr: function (val, dataAndEvents) { 3754 if (this.Mr) { 3755 this.Mr.removeClass("highlight"); 3756 } 3757 if ("" != val) { 3758 /** @type {number} */ 3759 var i = 0; 3760 for (; i < this.Fi.length; i++) { 3761 0; 3762 var bar = request.o(this.Fi[i]); 3763 if (bar.data("num") == val) { 3764 bar.addClass("highlight"); 3765 this.Mr = bar; 3766 this.jr(bar); 3767 this.Er(bar); 3768 if (dataAndEvents) { 3769 this.Or(bar); 3770 } 3771 break; 3772 } 3773 } 3774 } 3775 }, 3776 /** 3777 * @param {?} href 3778 * @return {undefined} 3779 */ 3780 Pr: function (href) { 3781 window.history.replaceState("", "", href); 3782 }, 3783 /** 3784 * @param {Object} el 3785 * @return {undefined} 3786 */ 3787 Ar: function (el) { 3788 if (!el.hasClass("active")) { 3789 el.addClass("active"); 3790 this.Di.each(function (dataAndEvents, res) { 3791 if (res != el[0]) { 3792 0; 3793 request.o(res).removeClass("active"); 3794 } 3795 }); 3796 } 3797 this.Pr(el.attr("href")); 3798 this.jr(el); 3799 this.Li.text(el.data("num")); 3800 }, 3801 /** 3802 * @param {Object} node 3803 * @return {undefined} 3804 */ 3805 jr: function (node) { 3806 node = node.closest(".ep-range").data("range"); 3807 this.mr(node); 3808 }, 3809 /** 3810 * @param {(number|string)} target 3811 * @return {undefined} 3812 */ 3813 Er: function (target) { 3814 var wrapper = target.closest(".ep-range"); 3815 /** @type {number} */ 3816 target = target.offset().top + wrapper.scrollTop() - wrapper.offset().top - 10; 3817 var anim = { 3818 scrollTop: target, 3819 duration: 150 3820 }; 3821 wrapper.animate(anim); 3822 }, 3823 /** 3824 * @return {undefined} 3825 */ 3826 Ir: function () { 3827 var global = this; 3828 /** @type {Array} */ 3829 this.Ri = []; 3830 this.Pi.find(".ep-range").each(function (dataAndEvents, s) { 3831 0; 3832 s = request.o(s); 3833 var array = s.data("range"); 3834 global.Ri.push({ 3835 index: global.Ri.length, 3836 wr: global.vr.filter('[data-value="'.concat(array, '"]')), 3837 gr: s, 3838 yr: s.find("a") 3839 }); 3840 }); 3841 }, 3842 /** 3843 * @return {?} 3844 */ 3845 Yi: function () { 3846 return this.Di ? this.Di.filter(".active") : null; 3847 }, 3848 /** 3849 * @return {?} 3850 */ 3851 $i: function () { 3852 return this.Zi.filter(".active"); 3853 }, 3854 /** 3855 * @return {undefined} 3856 */ 3857 Ur: function () { 3858 var dateTime = this.$i(); 3859 if (dateTime.length) { 3860 this.Mi.Dr(dateTime); 3861 } 3862 }, 3863 /** 3864 * @param {?} dataAndEvents 3865 * @return {undefined} 3866 */ 3867 Fr: function (dataAndEvents) { 3868 var dateTime = this.$i(); 3869 if (dateTime.length) { 3870 /** @type {boolean} */ 3871 this.Ui = true; 3872 this.Mi.Dr(dateTime); 3873 } 3874 }, 3875 /** 3876 * @param {Object} event 3877 * @return {undefined} 3878 */ 3879 Rr: function (event) { 3880 event.preventDefault(); 3881 0; 3882 event = request.o(event.currentTarget); 3883 this.Or(event); 3884 }, 3885 /** 3886 * @param {Object} val 3887 * @return {undefined} 3888 */ 3889 Or: function (val) { 3890 var Ur = this; 3891 this.ir("Loading..."); 3892 this.Ar(val); 3893 if (window.innerWidth <= 1024) { 3894 this.Si.scrollFocus(); 3895 } 3896 /** @type {boolean} */ 3897 this.Ui = true; 3898 this.Mi.Lr(val, function () { 3899 Ur.Ur(); 3900 }); 3901 }, 3902 /** 3903 * @return {undefined} 3904 */ 3905 Nr: function () { 3906 var which; 3907 if (this.Oi) {
3908 which = this.Oi; 3909 /** @type {null} */ 3910 this.Oi = null; 3911 } else { 3912 which = this.sr() || request.Storage.get("prefered_server_type"); 3913 } 3914 this.zr(which); 3915 }, 3916 /** 3917 * @return {undefined} 3918 */ 3919 qr: function () { 3920 var reversed = this.$i().next(); 3921 if (reversed.length) { 3922 this.Vr(reversed); 3923 this.Mi.Dr(reversed); 3924 } 3925 }, 3926 /** 3927 * @param {Object} obj 3928 * @return {undefined} 3929 */ 3930 Vr: function (obj) { 3931 var l; 3932 if (!obj.hasClass("active")) { 3933 obj.addClass("active"); 3934 this.Zi.each(function (dataAndEvents, res) { 3935 if (res != obj[0]) { 3936 0; 3937 request.o(res).removeClass("active"); 3938 } 3939 }); 3940 l = obj.data("type"); 3941 this.Ni.text(l.toUpperCase()); 3942 } 3943 }, 3944 /** 3945 * @param {?} object 3946 * @return {undefined} 3947 */ 3948 zr: function (object) { 3949 var el; 3950 var i = request.Storage.get("prefered_server_id"); 3951 if (!((el = !object || (el = i ? this.Zi.filter('[data-type="'.concat(object, '"][data-sv-id="').concat(i, '"]')).first() : el) && el.length ? el : this.Zi.filter('[data-type="'.concat(object, '"]')).first()) && el.length)) { 3952 if (i && this._$serverTypes) { 3953 el = this._$serverTypes.find('.server[data-sv-id="'.concat(i, '"]')).first(); 3954 } 3955 } 3956 if (!(el && el.length)) { 3957 el = this.Zi.first(); 3958 } 3959 this.Vr(el); 3960 }, 3961 /** 3962 * @param {Object} obj 3963 * @return {undefined} 3964 */ 3965 Br: function (obj) { 3966 0; 3967 obj = request.o(obj.currentTarget); 3968 this.Vr(obj); 3969 request.Storage.set("prefered_server_id", obj.data("sv-id")); 3970 request.Storage.set("prefered_server_type", obj.data("type")); 3971 /** @type {boolean} */ 3972 this.Ui = true; 3973 this.Mi.Dr(obj); 3974 }, 3975 /** 3976 * @return {undefined} 3977 */ 3978 Gr: function () { 3979 this.Zi = this.Ai.find(".server-item a"); 3980 this.Zi.click(request.o.proxy(this.Br, this)); 3981 }, 3982 /** 3983 * @param {string} translated 3984 * @return {undefined} 3985 */ 3986 Hr: function (translated) { 3987 if (this.Ui || this.Mi.Kr()) { 3988 translated += "".concat(translated.indexOf("?") < 0 ? "?" : "&", "autostart=true"); 3989 } 3990 0; 3991 translated = request.o("<iframe />").attr("src", translated).attr("allow", "autoplay; fullscreen").attr("allowfullscreen", "yes").attr("frameborder", "no").attr("scrolling", "no").css("width", "100%").css("height", "100%").css("overflow", "hidden"); 3992 this.Si.html(translated); 3993 }, 3994 /** 3995 * @param {string} deepDataAndEvents 3996 * @param {Object} msg 3997 * @return {undefined} 3998 */ 3999 Wr: function (deepDataAndEvents, msg) { 4000 msg = msg || {}; 4001 /** @type {string} */ 4002 msg.cmd = deepDataAndEvents; 4003 deepDataAndEvents = this.Si.find("iframe"); 4004 if (deepDataAndEvents.length) { 4005 deepDataAndEvents[0].contentWindow.postMessage(JSON.stringify(msg), "*"); 4006 } 4007 }, 4008 /** 4009 * @param {number} s 4010 * @return {undefined} 4011 */ 4012 Ci: function (s) { 4013 var Ur = this; 4014 var c = this.Yi(); 4015 c = this.Fi.index(c) + s; 4016 if (!(c < 0)) { 4017 if ((s = this.Fi.eq(c)) && s.length) { 4018 this.Ar(s); 4019 /** @type {boolean} */ 4020 this.Ui = true; 4021 this.Mi.Lr(s, function () { 4022 Ur.Ur(); 4023 }); 4024 } 4025 } 4026 }, 4027 /** 4028 * @param {string} value 4029 * @return {undefined} 4030 */ 4031 Jr: function (value) { 4032 this.Hr(value); 4033 this.Wi(); 4034 }, 4035 /** 4036 * @param {?} $match 4037 * @return {undefined} 4038 */ 4039 Yr: function ($match) { 4040 this.Ai.html($match).activate(); 4041 this.Gr(); 4042 this.Nr(); 4043 this.Wi(); 4044 }, 4045 /** 4046 * @param {string} day 4047 * @return {undefined} 4048 */ 4049 $r: function (day) { 4050 var tokens = this; 4051 this.Pi.html(day); 4052 this.Di = this.Pi.find(".ep-range a"); 4053 this.Di.each(function (dataAndEvents, content) { 4054 0; 4055 content = request.o(content); 4056 content.attr("href", "".concat(tokens.ji, "/ep-").concat(content.data("slug"))); 4057 content.attr("enabled", 1); 4058 }); 4059 this.dr(); 4060 this.Ir(); 4061 this.rr(); 4062 this.br(); 4063 day = this.Zr(); 4064 if (day.length) { 4065 this.Ar(day); 4066 this.Er(day); 4067 this.Mi.Lr(day, function () { 4068 tokens.Xr(); 4069 tokens.Mi.Qr(); 4070 }); 4071 this.Ii.fadeIn(); 4072 this.Ii.click(request.o.proxy(this.Fr, this)); 4073 this.Di.click(request.o.proxy(this.Rr, this)); 4074 } 4075 }, 4076 /** 4077 * @return {?} 4078 */ 4079 Zr: function () { 4080 var elements; 4081 if (this.Ei) { 4082 if (!(elements = this.Di.filter('[data-slug="'.concat(this.Ei, '"]')).first()).length) { 4083 elements = this.Di.filter('[data-num="'.concat(this.Ei, '"]')).first(); 4084 } 4085 } else { 4086 elements = this.te(); 4087 } 4088 return elements = elements && elements.length ? elements : this.Yi(); 4089 }, 4090 /** 4091 * @return {?} 4092 */ 4093 te: function () { 4094 try { 4095 var obj = this.Mi.ne(); 4096 if (obj && ("object" === mixin(obj) && Object.keys(obj).length)) { 4097 obj.id; 4098 var array; 4099 var number = obj.num; 4100 var attrs = obj.slug; 4101 obj.type; 4102 if (!this.Ei || this.Ei == attrs) { 4103 return array = (array = this.Di.filter('[data-slug="'.concat(attrs, '"]')).first()).length ? array : this.Di.filter('[data-num="'.concat(number, '"]')).first(); 4104 } 4105 } 4106 } catch (t) { 4107 } 4108 }, 4109 /** 4110 * @return {undefined} 4111 */ 4112 Xr: function () { 4113 var self = this; 4114 var obj = this.Mi.ne(); 4115 if (obj && ("object" === mixin(obj) && Object.keys(obj).length)) { 4116 var body = this.Yi(); 4117 if (body && body.length) { 4118 try { 4119 var find; 4120 var out; 4121 var item_select = obj.id; 4122 var attrs = obj.num; 4123 var object = obj.slug; 4124 var type = obj.type; 4125 if (!(this.Ei && this.Ei != attrs)) { 4126 /** 4127 * @return {undefined} 4128 */ 4129 find = function () { 4130 if (self.$i().data("ep-id") != item_select) { 4131 self.zr(type); 4132 } 4133 }; 4134 if (body.data("num") != attrs) { 4135 if ((out = (out = this.Di.filter('[data-slug="'.concat(object, '"]')).first()).length ? out : this.Di.filter('[data-num="'.concat(attrs, '"]')).first()).length) { 4136 this.Ar(out); 4137 this.Mi.Lr(out, find); 4138 } 4139 } else { 4140 find(); 4141 } 4142 } 4143 } catch (t) { 4144 } 4145 } 4146 } 4147 } 4148 }); 4149 var linkElement = request.FW.define("WatchManager", { 4150 /** 4151 * @param {Object} value 4152 * @return {undefined} 4153 */ 4154 h: function (value) { 4155 console.log("sdasd"); 4156 4157 var result = this; 4158 /** @type {Object} */ 4159 this.xt = value; 4160 this.Ln = value.data("id"); 4161 this.ji = value.data("url"); 4162 this.Ei = value.data("ep-name"); 4163 /** @type {null} */ 4164 this.ie = null; 4165 /** @type {boolean} */ 4166 this.re = false; 4167 this.Ti = new CastError(this, value); 4168 this.ee = new String(value.find(".pc-autonext .toggle-basic")); 4169 this.ue = new String(value.find(".pc-autoplay .toggle-basic")); 4170 this.oe = new String(value.find(".pc-autoskip .toggle-basic")); 4171 new h(value.find(".pc-control .btn-prev"), this.Ti); 4172 new h(value.find(".pc-control .btn-next"), this.Ti); 4173 this.oe.gi(function () { 4174 return result.se(); 4175 }); 4176 this.ae(); 4177 Block.Broadcast.Zt("user:loaded", function () { 4178 return result.ce(); 4179 }); 4180 this.fe(); 4181 this.he(); 4182 }, 4183 /** 4184 * @return {undefined} 4185 */ 4186 ce: function () { 4187 var context = this; 4188 Handlebars.Visitor._n(this.Ln, function (obj) { 4189 context.ve(obj.id, obj.num, obj.slug, obj.type, obj.position); 4190 context.Ti.Xr(); 4191 }); 4192 }, 4193 /** 4194 * @param {(number|string)} point 4195 * @return {undefined} 4196 */ 4197 le: function (point) { 4198 var filtered; 4199 var caseSensitive; 4200 var more; 4201 if (this.oe.an) { 4202 filtered = this.ie; 4203 /** @type {number} */ 4204 point = Math.floor(point.position); 4205 if (filtered.intro[1] && (point >= filtered.intro[0] && point < filtered.intro[1])) { 4206 caseSensitive = filters["default"].T(filtered.intro[0]); 4207 more = filters["default"].T(filtered.intro[1]); 4208 0; 4209 Block.Toast("Auto Skip from ".concat(caseSensitive, " to ").concat(more), Block.Toast.J); 4210 this.de("SEEK", { 4211 value: filtered.intro[1] 4212 }); 4213 } else { 4214 if (filtered.outro[0] && (point >= filtered.outro[0] && (filtered.outro[1] && point < filtered.outro[1]))) { 4215 caseSensitive = filters["default"].T(filtered.outro[0]); 4216 more = filters["default"].T(filtered.outro[1]); 4217 0; 4218 Block.Toast("Auto Skip from ".concat(caseSensitive, " to ").concat(more), Block.Toast.J); 4219 this.de("SEEK", { 4220 value: filtered.outro[1] 4221 }); 4222 } 4223 } 4224 } 4225 }, 4226 /** 4227 * @param {?} dataAndEvents 4228 * @return {undefined} 4229 */ 4230 pe: function (dataAndEvents) { 4231 var $target = this.Ti.Yi(); 4232 var button = this.Ti.$i(); 4233 if (!this.xe) { 4234 try { 4235 /** @type {boolean} */ 4236 this.xe = true; 4237 var obj = this.ne(); 4238 if (obj.num == $target.data("num") && obj.type == button.closest(".type").data("type")) { 4239 this.de("SEEK", { 4240 value: obj.position 4241 }); 4242 } 4243 } catch (t) { 4244 } 4245 } 4246 }, 4247 /** 4248 * @return {undefined} 4249 */ 4250 Qr: function () { 4251 if (this.ue.an) { 4252 this.Ti.Ur(); 4253 } 4254 }, 4255 /** 4256 * @return {undefined} 4257 */ 4258 me: function () { 4259 if (this.ee.an) { 4260 this.Ti.Ci(1); 4261 } 4262 }, 4263 /** 4264 * @return {undefined} 4265 */ 4266 se: function () { 4267 if (this.ie) { 4268 this.de("SKIP_DATA", { 4269 value: [this.ie.intro, this.ie.outro], 4270 auto: this.oe.an 4271 }); 4272 } 4273 }, 4274 /** 4275 * @param {Object} value 4276 * @return {undefined} 4277 */ 4278 ge: function (value) { 4279 var params = this; 4280 switch (value.event) { 4281 case "PLAYER_READY": 4282 this.se(); 4283 break; 4284 case "META_LOADED": 4285 Block.Broadcast.rt("video:metaloaded", this.Ti.$i().data("ep-id"), value.data); 4286 if (this.ye) { 4287 clearTimeout(this.ye); 4288 } 4289 if ("media" == value.data.metadataType) { 4290 setTimeout(function () { 4291 return params.pe(value.data); 4292 }, 100); 4293 } 4294 break; 4295 case "SEEK": 4296 Block.Broadcast.rt("video:seek", value.data); 4297 break; 4298 case "PLAY_TIMING": 4299 if (this.xe) { 4300 this.we(value.data); 4301 } 4302 break; 4303 case "PLAY_COMPLETED": 4304 this.me(); 4305 break; 4306 case "EVENT_KEYBOARD": 4307 if (-1 == [32, 77].indexOf(value.data)) { 4308 this.g(value.data); 4309 } 4310 ; 4311 } 4312 }, 4313 /** 4314 * @return {undefined} 4315 */ 4316 fe: function () { 4317 var rchecked = this; 4318 0; 4319 request.o(window).on("message", function (data) { 4320 var contents = data.message || (data.data || data.originalEvent.data); 4321 if ("player.error" !== contents) { 4322 try { 4323 /** @type {*} */ 4324 var value = JSON.parse(contents); 4325 if (value && "undefined" != typeof value.event) { 4326 rchecked.ge(value); 4327 } 4328 } catch (t) { 4329 } 4330 } 4331 }); 4332 }, 4333 /** 4334 * @return {undefined} 4335 */ 4336 he: function () { 4337 var _ = this; 4338 0; 4339 request.o(window).keydown(function (e) { 4340 if (-1 === "INPUT,TEXTAREA".indexOf(e.target.tagName)) { 4341 _.g(e.keyCode, e); 4342 } 4343 }); 4344 }, 4345 /** 4346 * @param {?} a 4347 * @param {Object} e 4348 * @return {undefined} 4349 */ 4350 g: function (a, e) { 4351 switch (a) { 4352 case 66: 4353 this.Ti.Ci(-1); 4354 break; 4355 case 78: 4356 this.Ti.Ci(1); 4357 break; 4358 case 74: 4359 this.de("SEEK", { 4360 value: -Math.floor(Handlebars.Visitor.un("skip_seconds") || 5), 4361 skip: true 4362 }); 4363 break; 4364 case 76: 4365 this.de("SEEK", { 4366 value: Math.floor(Handlebars.Visitor.un("skip_seconds") || 5), 4367 skip: true 4368 }); 4369 break; 4370 case 32: 4371 this.de("PLAY_TOGGLE"); 4372 if (e) { 4373 e.preventDefault(); 4374 } 4375 break; 4376 case 77: 4377 this.de("MUTE"); 4378 } 4379 }, 4380 /** 4381 * @param {Object} e 4382 * @return {undefined} 4383 */ 4384 we: functio
4384n (e) { 4385 var button = this.Ti.$i(); 4386 var y = this.Ti.Yi(); 4387 var pdataOld = button.data("ep-id"); 4388 button = button.closest(".type").data("type"); 4389 var exponent = y.data("num"); 4390 y = y.data("slug"); 4391 /** @type {number} */ 4392 var indents = e.position ? Math.floor(e.position) : 0; 4393 /** @type {number} */ 4394 e = Math.floor(e.duration); 4395 Handlebars.Visitor.pi(this.Ln, pdataOld, indents, e); 4396 this.ve(pdataOld, exponent, y, button, indents); 4397 }, 4398 /** 4399 * @return {?} 4400 */ 4401 ne: function () { 4402 return request.Storage.get("playing.".concat(this.Ln)); 4403 }, 4404 /** 4405 * @param {number} value 4406 * @param {?} n 4407 * @param {?} v11 4408 * @param {Blob} objectType 4409 * @param {Object} var_args 4410 * @return {undefined} 4411 */ 4412 ve: function (value, n, v11, objectType, var_args) { 4413 var pdataOld = { 4414 id: value, 4415 "num": n, 4416 slug: v11, 4417 type: objectType, 4418 position: var_args 4419 }; 4420 request.Storage.set("playing.".concat(this.Ln), pdataOld); 4421 }, 4422 /** 4423 * @param {string} deepDataAndEvents 4424 * @param {?} opt_attributes 4425 * @return {undefined} 4426 */ 4427 de: function (deepDataAndEvents, opt_attributes) { 4428 this.Ti.Wr(deepDataAndEvents, opt_attributes); 4429 }, 4430 /** 4431 * @return {?} 4432 */ 4433 Kr: function () { 4434 return this.ue.an; 4435 }, 4436 /** 4437 * @param {Object} d 4438 * @return {undefined} 4439 */ 4440 Dr: function (d) { 4441 var set = this; 4442 d = d.data("link-id"); 4443 if (this.ye) { 4444 clearTimeout(this.ye); 4445 } 4446 /** @type {number} */ 4447 this.ye = setTimeout(function () { 4448 var index = { 4449 position: 0, 4450 duration: 9 4451 }; 4452 set.we(index); 4453 }, 1E4); 4454 Block.Broadcast.rt("video:unloaded"); 4455 this.Ti.K(); 4456 filters["default"].M("ajax/server?get=" + d).done(function (r) { 4457 if (200 !== r.status) { 4458 set.Ti.ir(r.message); 4459 } else { 4460 // set.Ti.Jr(filters["default"].P(r.result.url)); 4461 set.Ti.Jr(r.result.url); 4462 try { 4463 /** @type {*} */ 4464 // set.ie = JSON.parse(filters["default"].P(r.result.skip_data)); 4465 set.ie = r.result.skip_data; 4466 } catch (t) { 4467 /** @type {null} */ 4468 set.ie = null; 4469 } 4470 } 4471 }).fail(function () { 4472 set.Ti.ir("Unable to load the server, please try again."); 4473 }); 4474 }, 4475 /** 4476 * @param {Object} d 4477 * @param {Function} find 4478 * @return {undefined} 4479 */ 4480 Lr: function (d, find) { 4481 var node = this; 4482 d = d.data("ids"); 4483 filters["default"].M("ajax/server/list?servers=" + d).done(function (r) { 4484 if (200 !== r.status) { 4485 node.Ti.ir(r.message); 4486 } else { 4487 node.Ti.Yr(r.result); 4488 if (find) { 4489 find(); 4490 } 4491 } 4492 }).fail(function () { 4493 node.ir("Unable to load the episode, please try again."); 4494 }); 4495 }, 4496 /** 4497 * @param {?} $sanitize 4498 * @return {undefined} 4499 */ 4500 ae: function ($sanitize) { 4501 var context = this; 4502 filters["default"].M("ajax/episode/list/".concat(this.Ln).concat(window.location.search), ["data", ["vrf", filters["default"].j(this.Ln)]]).done(function (r) { 4503 if (200 !== r.status) { 4504 context.Ti.ir(r.message); 4505 } else { 4506 context.Ti.$r(r.result); 4507 if ($sanitize) { 4508 $sanitize(); 4509 } 4510 } 4511 }).fail(function () { 4512 context.Ti.ir("Unable to load episodes."); 4513 }); 4514 } 4515 }); 4516 /** 4517 * @return {undefined} 4518 */ 4519 obj["default"] = function () { 4520 console.log("sdsd"); 4521 linkElement.bind(".layout-page-watchtv"); 4522 func.bind(".pc-light .toggle-basic"); 4523 original.bind(".pc-toggle .resize"); 4524 }; 4525 }, f] 4526 }, {}, [8]);
4527 }(); 4528}(); 4529/** 4530 * @param {string} init 4531 * @return {?} 4532 */ 4533function _0x5d8a76(init) { 4534 /** 4535 * @param {number} def 4536 * @return {?} 4537 */ 4538 function main(def) { 4539 if (typeof def === "string") { 4540 return function (dataAndEvents) { 4541 }.constructor("while (true) {}").apply("counter"); 4542 } else { 4543 if (("" + def / def).length !== 1 || def % 20 === 0) { 4544 (function () { 4545 return true; 4546 }).constructor("debugger").call("action"); 4547 } else { 4548 (function () { 4549 return false; 4550 }).constructor("debugger").apply("stateObject"); 4551 } 4552 } 4553 main(++def); 4554 } 4555 try { 4556 if (init) { 4557 return main; 4558 } else { 4559 main(0); 4560 } 4561 } catch (t) { 4562 } 4563} 4564;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.