{"version":3,"sources":["Alert.js","App.js","Auth.js","CacheProvider.js","Loader.js","PostRender.js","Renderer.js","Router.js","StoredPlayerDataManager.js","Sync.js","conf.js","functions.js","initers.js","playerPatch.js"],"names":["Alert","constructor","type","content","isSingleton","isClosable","this","id","Date","getTime","Math","random","alertsList","referenceComponent","document","querySelector","console","error","template","cloneNode","getInstance","initComponent","classList","add","setAttribute","innerHTML","addEventListener","e","preventDefault","close","showIn","container","append","setTimeout","remove","changeContent","newContent","closeAlertComponent","alertId","createAlertComponent","createGlobalAlertComponent","alert","querySelectorAll","forEach","item","currentTarget","getAttribute","App","router","Router","auth","Auth","renderer","Renderer","postRender","PostRender","loader","Loader","cacheProvider","CacheProvider","storedPlayerDataManager","StoredPlayerDataManager","sync","Sync","init","initers","urlMonitor","initDisplayingAuthBtns","initPreloadSpinner","initBaseEvents","initGenres","initGoToTopBtn","initNightMode","hours","getHours","renderPreloadSpinner","logout","contains","hideMobNav","showMobNav","squery","keyCode","value","trim","location","hash","blur","lmap","home","homePageUpToLoad","search","searchPageUpToLoad","genres","genresPageUpToLoad","let","p","page","renderContainer","pageNum","ceil","childNodes","length","_CONF","perPage","resp","list","insertListToRenderContainer","genresList","items","appendChild","renderGenresList","node","getSessionId","goTopBtn","goTopBtnVisibilityHandler","window","pageYOffset","step","round","animationInterval","setInterval","newPageYOffset","max","scrollTo","top","clearInterval","app","formSelector","form","submitBtn","initForm","email","passwd","xhr","XMLHttpRequest","open","onload","status","JSON","parse","response","err","localStorage","setItem","sessionId","mes","fdata","FormData","send","removeItem","unsetCache","cache","lifetime","createAt","manager","storage","getItem","setCache","key","data","saveCache","stringify","cacheable","code","callback","currentTimestamp","anilibriaRequest","items_per_page","filter","getItemCardFields","decodeURI","split","selectedGenres","getSelectedGenres","join","favouritesList","sessId","cacheableCallback","session","limit","sorting_type","scheduleList","itemCard","html","nodeFromHTML","parentNode","single","post","i","tabs","renderTabs","name","player-container","btn","torrents-container","renderTorrents","active","playerData","default_quality","preroll_deny","file","player","files","host","hls","sd","hd","fhd","push","skip","skips","opening","title","poster","preview","domen","download","Playerjs","playerPatch","renderFavoriteBtn","favoriteBtn","postId","addToFavourites","removeFromFavourites","genreBtn","genre","inx","map","indexOf","splice","tabName","renderThumbnail","string","inSchedule","isToday","charAt","toUpperCase","slice","watched","localPlayerData","currentEpisode","episodes","last","posters","medium","url","renderItemCard","thumb","names","ru","season","year","full_string","torrents","torrent","size","total_size","toString","substr","torrent_id","quality","seeders","leechers","props","nav","renderSingle","voices","team","voice","schedule","en","description","renderGenreBtn","createElement","pagesContainerSelector","defaultPageId","notFoundPageId","containerSelector","findedPages","pages","currentPage","currentPath","zindex","goToPage","pageId","style","zIndex","route","initPage","pageName","localStorageItemName","restorePlayerDataFromBackup","cleanupBackupedPlayerData","backupPlayerData","plData","getStorablePlayerData","bPlayerData","getBackupedPlayerData","timing","len","backupedPlayerData","path","pathname","timestamp","episode","Object","keys","ID","watchedAt","Number","MAX_VALUE","errFlag","uemail","log","stdXHR","result","stored","$uemail","onerror","preparedData","api","ver","numbOfRelevant","method","onloadCallback","setRequestHeader","makeSelectedGenresActivated","api2Flag","setPageTitle","pageTitle","title_id","params","query","URLSearchParams","val","parseInt","replaceAll","hostname","transformScheduleList","resultList","currentDayNum","getDay","dayNames","j","day","num","moreBtn","pagination","current_page","include","after","ids","resp2","series","favs","plId","pl","skipBox","stopImmediatePropagation","borderRadius","border","element","next","click","back","playPause","muteUnmute","isMute","visibility","mute","unmute","isPlaying","play","pause","skipOpening","display"],"mappings":"MAAAA,MACAC,YAAAC,EAAAC,EAAAC,EAAAC,GACAC,KAAAC,GAAA,aAAA,IAAAC,MAAAC,QAAA,EAAAC,KAAAC,OAAA,GACAC,WAAAN,KAAAC,IAAAD,MACAJ,KAAAA,EACAI,KAAAH,QAAAA,GAAA,GACAG,KAAAF,YAAAA,GAAA,CAAA,EACAE,KAAAD,WAAAA,GAAA,CAAA,EAEAQ,EAAAC,SAAAC,cAAA,gDAAA,EACA,GAAA,CAA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,QAAA/U,iBAAA,QAAAC,IACA8K,OAAAuH,IAAA0C,KAAA,CACA,CAAA,EAEAjK,OAAAgK,QAAA/U,iBAAA,QAAAC,IACA8K,OAAAgK,QAAA5E,MAAArH,OAAA,gBACA,CAAA,EAEAiC,OAAAgK,QAAA/U,iBAAA,OAAAC,IACA8K,OAAAgK,QAAA5E,MAAArH,OAAA,eACA,CAAA,EAEA1J,SAAAY,iBAAA,QAAAC,IACA,IAAAA,EAAAsD,SACAwH,OAAAuH,IAAA0C,KAAA,EAGA,IAAA/U,EAAAsD,SACAwH,OAAAuH,IAAA4C,KAAA,EAGA,IAAAjV,EAAAsD,SACAwH,OAAAuH,IAAAsD,YAAA,CAEA,CAAA,CACA","file":"all.min.js","sourcesContent":["class Alert {\r\n\tconstructor(type, content, isSingleton, isClosable) {\r\n\t\tthis.id = \"alert-id-\" + (new Date()).getTime() + Math.random();\r\n\t\talertsList[this.id] = this;\r\n\t\tthis.type = type;\r\n\t\tthis.content = content || \"\";\r\n\t\tthis.isSingleton = isSingleton || false;\r\n\t\tthis.isClosable = isClosable || false;\r\n\r\n\t\tconst referenceComponent = document.querySelector(`.component.alert[data-id=\"alert-id-reference\"]`);\r\n\t\tif(!referenceComponent){\r\n\t\t\treturn console.error(\"Reference of alert component not found\");\r\n\t\t}\r\n\r\n\t\tthis.template = referenceComponent.cloneNode(true);\r\n\t\tthis.template.getInstance = () => this;\r\n\t\tthis.initComponent();\r\n\t}\r\n\r\n\tinitComponent() {\r\n\t\tthis.template.classList.add(`alert-${this.type}`);\r\n\t\tthis.template.setAttribute(\"data-id\", this.id);\r\n\t\tthis.template.querySelector(\".content\").innerHTML = this.content;\r\n\r\n\t\tthis.template.querySelector(\".close-alert\").addEventListener(\"click\", e => {\r\n\t\t\te.preventDefault();\r\n\t\t\tthis.close();\r\n\t\t});\r\n\t}\r\n\r\n\tshowIn(container) {\r\n\t\tif(!this.template){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif(this.isSingleton){\r\n\t\t\tcontainer.innerHTML = \"\";\r\n\t\t}\r\n\t\tcontainer.append(this.template);\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.template.classList.add(\"show\");\r\n\t\t}, 10);\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\tclose() {\r\n\t\tthis.template.classList.remove(\"show\");\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.template.remove();\r\n\t\t\tdelete alertsList[this.id];\r\n\t\t}, 150);\r\n\t}\r\n\r\n\tchangeContent(newContent) {\r\n\t\tthis.template.querySelector(\".content\").innerHTML = newContent;\r\n\t}\r\n}\r\n\r\nconst closeAlertComponent = alertId => {\r\n\treturn alertsList[alertId]?.close();\r\n}\r\n\r\nconst createAlertComponent = (type, content, isSingleton, isClosable) => {\r\n\treturn new Alert(type, content, isSingleton, isClosable);\r\n}\r\n\r\nconst createGlobalAlertComponent = (type, content, isSingleton, isClosable) => {\r\n\tconst alert = createAlertComponent(type, content, isSingleton, isClosable);\r\n\talert.showIn(document.querySelector(\".global-alerts-container\"));\r\n\treturn alert;\r\n}\r\n\r\ndocument.addEventListener(\"DOMContentLoaded\", e => {\r\n\tdocument.querySelectorAll(`.component.alert .close-alert`).forEach(item => {\r\n\t\titem.addEventListener(\"click\", e => {\r\n\t\t\te.preventDefault();\r\n\t\t\tconst alertId = e.currentTarget.getAttribute(\"data-close-alert-id\");\r\n\t\t\tcloseAlertComponent(alertId);\r\n\t\t});\r\n\t});\r\n});\r\n\r\nconst alertsList = {};","class App {\r\n\tconstructor() {\r\n\t\tthis.router = new Router(\".page-container\", \"home\", \"not-found\");\r\n\t\tthis.auth = new Auth(\"#login .login-form form\");\r\n\t\tthis.renderer = new Renderer();\r\n\t\tthis.postRender = new PostRender();\r\n\t\tthis.loader = new Loader();\r\n\t\tthis.cacheProvider = new CacheProvider();\r\n\t\tthis.storedPlayerDataManager = new StoredPlayerDataManager();\r\n\t\tthis.sync = new Sync();\r\n\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.init();\r\n\t\t}, 10);\r\n\t}\r\n\r\n\tinit() {\r\n\t\tiniters(this);\r\n\t\tthis.router.urlMonitor();\r\n\r\n\t\tthis.initDisplayingAuthBtns();\r\n\t\tthis.initPreloadSpinner();\r\n\t\tthis.initBaseEvents();\r\n\t\tthis.initGenres();\r\n\t\tthis.initGoToTopBtn();\r\n\t\tthis.initNightMode();\r\n\t}\r\n\r\n\tinitNightMode() {\r\n\t\tconst hours = (new Date()).getHours();\r\n\t\tif(hours <= 8 || hours >= 20) {\r\n\t\t\tdocument.querySelector(\"body\").classList.add(\"night-mode\");\r\n\t\t} else {\r\n\t\t\tdocument.querySelector(\"body\").classList.remove(\"night-mode\");\r\n\t\t}\r\n\r\n\t\tsetTimeout(() => this.initNightMode(), 60 * 1000);\r\n\t}\r\n\r\n\tinitPreloadSpinner() {\r\n\t\tdocument.querySelectorAll(\".preload-spinner\").forEach(item => {\r\n\t\t\titem.innerHTML = this.renderer.renderPreloadSpinner();\r\n\t\t});\r\n\t}\r\n\r\n\tinitBaseEvents() {\r\n\t\tdocument.querySelector(\".logout-btn\").addEventListener(\"click\", e => {\r\n\t\t\tthis.auth.logout();\r\n\t\t});\r\n\r\n\t\tdocument.querySelector(\".btn-nav-on-mob-show\").addEventListener(\"click\", e => {\r\n\t\t\tif(e.currentTarget.classList.contains(\"active\")) {\r\n\t\t\t\thideMobNav();\r\n\t\t\t}else{\r\n\t\t\t\tshowMobNav();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tdocument.querySelector(`[name=\"search\"]`).addEventListener(\"keyup\", e => {\r\n\t\t\te.preventDefault();\r\n\t\t\tif(e.keyCode == 13) {\r\n\t\t\t\tlet squery = e.currentTarget.value.trim();\r\n\t\t\t\tdocument.location.hash = `page:search;sq:${squery}`;\r\n\t\t\t\te.currentTarget.blur();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tconst lmap = { \r\n\t\t\thome: this.loader.homePageUpToLoad, \r\n\t\t\tsearch: this.loader.searchPageUpToLoad, \r\n\t\t\tgenres: this.loader.genresPageUpToLoad \r\n\t\t};\r\n\t\tfor(let p in lmap) {\r\n\t\t\tconst page = document.querySelector(`#${p}`);\r\n\t\t\tpage.querySelector(`.more-btn`).addEventListener(\"click\", e => {\r\n\t\t\t\tconst renderContainer = page.querySelector(\".render-container\");\r\n\t\t\t\tconst pageNum = Math.ceil(renderContainer.childNodes.length / _CONF.perPage[p]) + 1;\r\n\t\t\t\tpage.querySelector(`.more-btn-wrap .preload-spinner`).classList.remove(\"dnone\");\r\n\t\t\t\tpage.querySelector(`.more-btn`).classList.add(\"dnone\");\r\n\r\n\t\t\t\tlmap[p](pageNum, resp => {\r\n\t\t\t\t\tpage.querySelector(`.more-btn-wrap .preload-spinner`).classList.add(\"dnone\");\r\n\t\t\t\t\tif(resp.list.length) {\r\n\t\t\t\t\t\tpage.querySelector(`.more-btn`).classList.remove(\"dnone\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tinsertListToRenderContainer(renderContainer, resp.list);\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tinitGenres() {\r\n\t\tthis.loader.genresList(items => {\r\n\t\t\tdocument.querySelector(\"#genres .render-genres\").appendChild(this.renderer.renderGenresList(items).node);\r\n\t\t});\r\n\t}\r\n\r\n\tinitDisplayingAuthBtns() {\r\n\t\tif(getSessionId()) {\r\n\t\t\tdocument.querySelector(\".logout-btn\").classList.remove(\"dnone\");\r\n\t\t\tdocument.querySelector(\".go-login-page-btn\").classList.add(\"dnone\");\r\n\t\t} else {\r\n\t\t\tdocument.querySelector(\".logout-btn\").classList.add(\"dnone\");\r\n\t\t\tdocument.querySelector(\".go-login-page-btn\").classList.remove(\"dnone\");\r\n\t\t}\r\n\t}\r\n\r\n\tinitGoToTopBtn() {\r\n\t\tconst goTopBtn = document.querySelector(\".go-to-top\");\r\n\r\n\t\tconst goTopBtnVisibilityHandler = () => {\r\n\t\t\tif(window.pageYOffset > 500) {\r\n\t\t\t\tif(!goTopBtn.classList.contains(\"show\")) {\r\n\t\t\t\t\tgoTopBtn.classList.add(\"show\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif(goTopBtn.classList.contains(\"show\")) {\r\n\t\t\t\t\tgoTopBtn.classList.remove(\"show\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tgoTopBtnVisibilityHandler();\r\n\r\n\t\twindow.addEventListener(\"scroll\", e => {\r\n\t\t\tgoTopBtnVisibilityHandler();\r\n\t\t});\r\n\r\n\t\tgoTopBtn.addEventListener(\"click\", e => {\r\n\t\t\tconst duration = 50;\r\n\t\t\tconst step = Math.round(window.pageYOffset / duration);\r\n\r\n\t\t\tconst animationInterval = setInterval(() => {\r\n\t\t\t\tconst newPageYOffset = Math.max(0, window.pageYOffset - step);\r\n\r\n\t\t\t\twindow.scrollTo({\r\n\t\t\t\t\ttop: newPageYOffset \r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(!newPageYOffset) {\r\n\t\t\t\t\treturn clearInterval(animationInterval);\r\n\t\t\t\t}\r\n\t\t\t}, 1);\r\n\t\t});\r\n\t}\r\n}\r\n\r\ndocument.addEventListener(\"DOMContentLoaded\", e => {\r\n\tconst app = new App();\r\n\twindow.app = () => app;\r\n});","class Auth {\r\n\tconstructor(formSelector) {\r\n\t\tthis.formSelector = formSelector;\r\n\t\tthis.form = document.querySelector(this.formSelector);\r\n\t\tthis.submitBtn = this.form.querySelector(\".submit-btn\");\r\n\t\tthis.initForm();\r\n\t}\r\n\r\n\tinitForm() {\r\n\t\tthis.form.addEventListener(\"submit\", e => {\r\n\t\t\te.preventDefault();\r\n\t\t\tif(this.submitBtn.classList.contains(\"disable\")) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tthis.submitBtn.classList.add(\"disable\");\r\n\r\n\t\t\tconst email = this.form.querySelector(\"#email\").value;\r\n\t\t\tconst passwd = this.form.querySelector(\"#passwd\").value;\r\n\r\n\t\t\tconst xhr = new XMLHttpRequest();\r\n\t\t\txhr.open(\"POST\", \"https://www.anilibria.tv/public/login.php\");\r\n\t\t\txhr.onload = () => {\r\n\t\t\t\tthis.submitBtn.classList.remove(\"disable\");\r\n\r\n\t\t\t\tif(xhr.status == 200) {\r\n\t\t\t\t\tconst resp = JSON.parse(xhr.response);\r\n\t\t\t\t\tif(resp.err == \"ok\") {\r\n\t\t\t\t\t\tlocalStorage.setItem(\"sessionId\", resp.sessionId);\r\n\t\t\t\t\t\tlocalStorage.setItem(\"uemail\", email);\r\n\t\t\t\t\t\tconst alert = createGlobalAlertComponent(\"success\", \"Успешно!\");\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\talert.close();\r\n\t\t\t\t\t\t}, 2000);\r\n\t\t\t\t\t\tdocument.location.hash = \"#\";\r\n\t\t\t\t\t\tdocument.querySelector(\".logout-btn\").classList.remove(\"dnone\");\r\n\t\t\t\t\t\tdocument.querySelector(\".go-login-page-btn\").classList.add(\"dnone\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconst alert = createGlobalAlertComponent(\"danger\", resp.mes);\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\talert.close();\r\n\t\t\t\t\t\t}, 4500);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconst alert = createGlobalAlertComponent(\"danger\", \"Сервер не доступен\");\r\n\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\talert.close();\r\n\t\t\t\t\t}, 4500);\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\tconst fdata = new FormData();\r\n\t\t\tfdata.append(\"mail\", email);\r\n\t\t\tfdata.append(\"passwd\", passwd);\r\n\t\t\tfdata.append(\"fa2code\", \"\");\r\n\t\t\tfdata.append(\"csrf\", \"1\");\r\n\t\t\txhr.send(fdata);\r\n\t\t});\r\n\t}\r\n\r\n\tlogout() {\r\n\t\tlocalStorage.removeItem(\"sessionId\");\r\n\t\tdocument.location.hash = \"#page:login\";\r\n\t\tdocument.querySelector(\".logout-btn\").classList.add(\"dnone\");\r\n\t\tdocument.querySelector(\".go-login-page-btn\").classList.remove(\"dnone\");\r\n\t\tapp().cacheProvider.unsetCache(\"favouritesList\");\r\n\t}\r\n}","class CacheProvider {\r\n\tconstructor() {\r\n\t\tthis.cache = {};\r\n\t\tthis.lifetime = {};\r\n\t\tthis.createAt = {};\r\n\r\n\t\tthis.init();\r\n\t\tsetInterval(() => {\r\n\t\t\tthis.manager();\r\n\t\t}, 1000);\r\n\t}\r\n\r\n\tinit() {\r\n\t\tlet storage = localStorage.getItem(\"cache\");\r\n\t\tif(storage) {\r\n\t\t\tstorage = JSON.parse(storage);\r\n\t\t\tthis.cache = storage.cache;\r\n\t\t\tthis.lifetime = storage.lifetime;\r\n\t\t\tthis.createAt = storage.createAt;\r\n\t\t}\r\n\t}\r\n\r\n\tsetCache(key, data, lifetime) {\r\n\t\tthis.cache[key] = data;\r\n\t\tthis.lifetime[key] = lifetime;\r\n\t\tthis.createAt[key] = Math.round((new Date()).getTime() / 1000);\r\n\r\n\t\tthis.saveCache();\r\n\t}\r\n\r\n\tsaveCache() {\r\n\t\tlocalStorage.setItem(\"cache\", JSON.stringify({\r\n\t\t\tcache: this.cache,\r\n\t\t\tlifetime: this.lifetime,\r\n\t\t\tcreateAt: this.createAt\r\n\t\t}));\r\n\t}\r\n\r\n\tcacheable(key, code, callback, lifetime) {\r\n\t\tif(this.cache[key]) {\r\n\t\t\treturn callback(this.cache[key]);\r\n\t\t}\r\n\r\n\t\tcode(data => {\r\n\t\t\tthis.setCache(key, data, lifetime);\r\n\t\t\tcallback(data);\r\n\t\t});\r\n\t}\r\n\r\n\tunsetCache(key) {\r\n\t\tif(this.cache[key]) {\r\n\t\t\tdelete this.cache[key] \r\n\t\t\tdelete this.lifetime[key] \r\n\t\t\tdelete this.createAt[key]\r\n\t\t\tthis.saveCache();\r\n\t\t}\r\n\t}\r\n\r\n\tmanager() {\r\n\t\tconst currentTimestamp = Math.round((new Date()).getTime() / 1000);\r\n\r\n\t\tfor(let key in this.cache) {\r\n\t\t\tif(!this.lifetime[key]) \r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tif(currentTimestamp - this.createAt[key] > this.lifetime[key]) {\r\n\t\t\t\tthis.unsetCache(key);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}","class Loader {\n\tconstructor() {}\n\n\thomePageUpToLoad(pageNum, callback) {\n\t\tanilibriaRequest(\n\t\t\t\"title/updates\", \n\t\t\t{\n\t\t\t\tpage: pageNum,\n\t\t\t\titems_per_page: _CONF.perPage.home,\n\t\t\t\tfilter: getItemCardFields()\n\t\t\t}, \n\t\t\tresp => callback(resp)\n\t\t);\n\t}\n\n\tsearchPageUpToLoad(pageNum, callback) {\n\t\tlet squery = decodeURI(document.location.hash.split(\"sq:\")[1]);\n\n\t\tanilibriaRequest(\n\t\t\t\"title/search\", \n\t\t\t{\n\t\t\t\tpage: pageNum,\n\t\t\t\titems_per_page: _CONF.perPage.search,\n\t\t\t\tfilter: getItemCardFields(),\n\t\t\t\tsearch: squery\n\t\t\t}, \n\t\t\tresp => callback(resp)\n\t\t);\n\t}\n\n\tgenresPageUpToLoad(pageNum, callback) {\n\t\tconst selectedGenres = getSelectedGenres();\n\n\t\tanilibriaRequest(\n\t\t\t\"title/search\", \n\t\t\t{\n\t\t\t\tsearch: \"\",\n\t\t\t\tfilter: getItemCardFields(),\n\t\t\t\tgenres: selectedGenres.join(\",\"),\n\t\t\t\tpage: pageNum,\n\t\t\t\titems_per_page: _CONF.perPage.search,\n\t\t\t}, \n\t\t\tresp => callback(resp)\n\t\t);\n\t}\n\n\tfavouritesList(callback) {\n\t\tconst sessId = getSessionId();\n\t\tif(!sessId) {\n\t\t\treturn setTimeout(() => document.location.hash = \"#page:login\", 20);\n\t\t}\n\n\t\tapp().cacheProvider.cacheable(\n\t\t\t\"favouritesList\", \n\t\t\tcacheableCallback => {\n\t\t\t\tanilibriaRequest(\n\t\t\t\t\t\"v2.13:getFavorites\", \n\t\t\t\t\t{\n\t\t\t\t\t\tsession: sessId,\n\t\t\t\t\t\tlimit: 1000,\n\t\t\t\t\t\tfilter: getItemCardFields(true),\n\t\t\t\t\t}, \n\t\t\t\t\tresp => cacheableCallback(resp)\n\t\t\t\t);\n\t\t\t}, \n\t\t\tcallback,\n\t\t\t60 * 5\n\t\t);\n\t}\n\n\tgenresList(callback) {\n\t\tapp().cacheProvider.cacheable(\n\t\t\t\"genresList\",\n\t\t\tcacheableCallback => {\n\t\t\t\tanilibriaRequest(\n\t\t\t\t\t\"genres\", \n\t\t\t\t\t{\n\t\t\t\t\t\tsorting_type: 1\n\t\t\t\t\t}, \n\t\t\t\t\tresp => cacheableCallback(resp)\n\t\t\t\t);\n\t\t\t},\n\t\t\tcallback,\n\t\t\t60 * 60 * 3\n\t\t);\n\t}\n\n\tscheduleList(callback) {\n\t\tapp().cacheProvider.cacheable(\n\t\t\t\"scheduleList\",\n\t\t\tcacheableCallback => {\n\t\t\t\tanilibriaRequest(\n\t\t\t\t\t\"title/schedule\", \n\t\t\t\t\t{\n\t\t\t\t\t\tfilter: getItemCardFields()\n\t\t\t\t\t}, \n\t\t\t\t\tcacheableCallback\n\t\t\t\t);\n\t\t\t},\n\t\t\tcallback,\n\t\t\t60 * 60 * 3\n\t\t);\n\t}\n}\n","class PostRender {\r\n\tconstructor() {}\r\n\r\n\titemCard(html) {\r\n\t\tconst item = nodeFromHTML(html);\r\n\r\n\t\titem.querySelector(\".thumbnail-img\").addEventListener(\"load\", e => {\r\n\t\t\te.currentTarget.parentNode.parentNode.classList.add(\"load-ready\");\r\n\t\t});\r\n\r\n\t\treturn item;\r\n\t}\r\n\r\n\tsingle(html, post) {\r\n\t\tconst item = nodeFromHTML(html);\r\n\t\tconst tabs = this.tabs(app().renderer.renderTabs({\r\n\t\t\tname: \"video\",\r\n\t\t\ttabs: {\r\n\t\t\t\t\"player-container\": {\r\n\t\t\t\t\tbtn: `<span class=\"mdi mdi-television-play\"></span> Смотреть`,\r\n\t\t\t\t\tcontent: `<div class=\"player\" id=\"main-player-${post.id}\"></div>`\r\n\t\t\t\t},\r\n\t\t\t\t\"torrents-container\": {\r\n\t\t\t\t\tbtn: `<span class=\"mdi mdi-download\"></span> Скачать`,\r\n\t\t\t\t\tcontent: app().renderer.renderTorrents(post)\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tactive: \"player-container\"\r\n\t\t}));\r\n\r\n\t\titem.querySelector(\".video-container\").appendChild(tabs);\r\n\r\n\t\tconst playerData = {\r\n\t\t\tid: \"main-player-\" + post.id,\r\n\t\t\tdefault_quality: \"720p\",\r\n\t\t\tpreroll_deny: \"\",\r\n\t\t\tfile: []\r\n\t\t};\r\n\r\n\t\tfor(let i in post.player.list) {\r\n\t\t\tlet files = `[480p]https://${post.player.host}${post.player.list[i].hls.sd}`;\r\n\r\n\t\t\tif(post.player.list[i].hls.hd) {\r\n\t\t\t\tfiles += `,[720p]https://${post.player.host}${post.player.list[i].hls.hd}`;\r\n\t\t\t}\r\n\r\n\t\t\tif(post.player.list[i].hls.fhd) {\r\n\t\t\t\tfiles += `,[1080p]https://${post.player.host}${post.player.list[i].hls.fhd}`;\r\n\t\t\t}\r\n\r\n\t\t\tplayerData.file.push({\r\n\t\t\t\tid: \"s\" + i,\r\n\t\t\t\tskip: post.player.list[i].skips.opening.length ? post.player.list[i].skips.opening.join(\"-\") : null,\r\n\t\t\t\ttitle: `Серия ${i}`,\r\n\t\t\t\tposter: post.player.list[i].preview ? `//${_CONF.domen}${post.player.list[i].preview}` : null,\r\n\t\t\t\tdownload: null,\r\n\t\t\t\tfile: files\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tsetTimeout(() => {\r\n\t\t\tlet player = new Playerjs(playerData);\r\n\t\t\tplayerPatch(playerData.id);\r\n\t\t}, 30);\r\n\r\n\t\titem.querySelector(\".fav-btn-wrap\").appendChild(app().renderer.renderFavoriteBtn(post).node);\r\n\r\n\t\titem.querySelector(\".thumbnail-img\").addEventListener(\"load\", e => {\r\n\t\t\te.currentTarget.parentNode.classList.add(\"load-ready\");\r\n\t\t});\r\n\r\n\t\treturn item;\r\n\t}\r\n\r\n\tfavoriteBtn(html, postId) {\r\n\t\tconst item = nodeFromHTML(html);\r\n\r\n\t\tconst sessId = getSessionId();\r\n\t\tif(sessId) {\r\n\t\t\titem.querySelector(\".state.unset-from\").classList.add(\"dnone\");\r\n\t\t\titem.querySelector(\".state.set-to\").classList.remove(\"dnone\");\r\n\r\n\t\t\tapp().loader.favouritesList(resp => {\r\n\t\t\t\tfor(let i=0; i<resp.length; i++) {\r\n\t\t\t\t\tif(postId == resp[i].id) {\r\n\t\t\t\t\t\titem.querySelector(\".state.unset-from\").classList.remove(\"dnone\");\r\n\t\t\t\t\t\titem.querySelector(\".state.set-to\").classList.add(\"dnone\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\titem.classList.remove(\"dnone\");\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\titem.addEventListener(\"click\", e => {\r\n\t\t\t\tif(e.currentTarget.querySelector(\".unset-from\").classList.contains(\"dnone\")) {\r\n\t\t\t\t\taddToFavourites(postId, resp => {\r\n\t\t\t\t\t\titem.querySelector(\".state.unset-from\").classList.remove(\"dnone\");\r\n\t\t\t\t\t\titem.querySelector(\".state.set-to\").classList.add(\"dnone\");\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tremoveFromFavourites(postId, resp => {\r\n\t\t\t\t\t\titem.querySelector(\".state.unset-from\").classList.add(\"dnone\");\r\n\t\t\t\t\t\titem.querySelector(\".state.set-to\").classList.remove(\"dnone\");\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn item;\r\n\t}\r\n\r\n\tgenreBtn(html) {\r\n\t\tconst item = nodeFromHTML(html);\r\n\r\n\t\titem.addEventListener(\"click\", e => {\r\n\t\t\te.preventDefault();\r\n\t\t\tconst genre = e.currentTarget.getAttribute(\"data-genre-name\");\r\n\t\t\tlet selectedGenres = document.location.hash.split(\"sg:\")[1];\r\n\t\t\tselectedGenres = selectedGenres \r\n\t\t\t\t? selectedGenres.split(\",\").map(item => { return decodeURI(item); }) \r\n\t\t\t\t: [];\r\n\r\n\t\t\tconst inx = selectedGenres.indexOf(genre);\r\n\t\t\tif(inx === -1) {\r\n\t\t\t\tselectedGenres.push(genre);\r\n\t\t\t\te.currentTarget.classList.add(\"active\");\r\n\t\t\t} else {\r\n\t\t\t\tselectedGenres.splice(inx, 1);\r\n\t\t\t\te.currentTarget.classList.remove(\"active\");\r\n\t\t\t}\r\n\r\n\t\t\tdocument.location.hash = \"page:genres;sg:\" + selectedGenres.join(\",\");\r\n\t\t});\r\n\r\n\t\treturn item;\r\n\t}\r\n\r\n\ttabs(html) {\r\n\t\tconst item = nodeFromHTML(html);\r\n\r\n\t\titem.querySelectorAll(\".tabs-nav .tab\").forEach(i => {\r\n\t\t\ti.addEventListener(\"click\", e => {\r\n\t\t\t\titem.querySelector(\".tabs-nav .tab.active\").classList.remove(\"active\");\r\n\t\t\t\titem.querySelector(\".tabs-content .tab-content.active\").classList.remove(\"active\");\r\n\r\n\t\t\t\tconst tabName = e.currentTarget.getAttribute(\"data-tab\");\r\n\t\t\t\te.currentTarget.classList.add(\"active\");\r\n\t\t\t\titem.querySelector(`.tab-content[data-tab=\"${tabName}\"]`).classList.add(\"active\");\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\treturn item;\r\n\t}\r\n}","class Renderer {\r\n\tconstructor() {}\r\n\r\n\trenderThumbnail(post) {\r\n\t\tlet status = post.status.string ? post.status.string : \"Завершен\";\r\n\t\tif(post.inSchedule) {\r\n\t\t\tif(post.inSchedule.isToday) {\r\n\t\t\t\tstatus = `<span class=\"mdi mdi-flag-checkered\"></span> Сегодня`;\r\n\t\t\t} else {\r\n\t\t\t\tstatus = `<span class=\"mdi mdi-flag-checkered\"></span> ${(post.inSchedule.string.charAt(0).toUpperCase() + post.inSchedule.string.slice(1))}`;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst watched = (post.localPlayerData && post.localPlayerData.currentEpisode == post.player.episodes.last)\r\n\t\t\t? `<div class=\"thumb-label watched\">Просмотрено</div>`\r\n\t\t\t: \"\"\r\n\r\n\t\treturn `\r\n\t\t\t<div class=\"component thumbnail\">\r\n\t\t\t\t<img src=\"http://anilibria.tv${post.posters.medium.url}\" class=\"thumbnail-img\">\r\n\t\t\t\t<img \r\n\t\t\t\t\tsrc=\"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAH0AV4DASIAAhEBAxEB/8QAHAABAQACAwEBAAAAAAAAAAAAAAcDBgECBQgE/8QANhABAAIBAwIDBgQFAwUAAAAAAAECAwQFEQYhEjFBB1FhgZGhExQVcSJCUnKxIzLBJGKCwuH/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAD/9k=\" \r\n\t\t\t\t\tclass=\"poster-placeholder\"\r\n\t\t\t\t>\r\n\t\t\t\t<div class=\"hover-effect\">\r\n\t\t\t\t\t<span class=\"mdi mdi-arrow-right\"></span>\r\n\t\t\t\t</div>\r\n\t\t\t\t${watched}\r\n\t\t\t\t<div class=\"thumb-label status\">${status}</div>\r\n\t\t\t\t<div class=\"thumb-label series\">Серий ${post.player.episodes.last}</div>\r\n\t\t\t</div>\r\n\t\t`;\r\n\t}\r\n\r\n\trenderItemCard(post) {\r\n\t\tlet genres = post.genres.join(\", \");\r\n\t\tconst thumb = this.renderThumbnail(post);\r\n\r\n\t\tlet html = `<a href=\"#page:single;id${post.id}\" class=\"no-decoration item-link\">\r\n\t\t\t<div class=\"component card item-card\" data-id=\"${post.id}\">\r\n\t\t\t\t${thumb}\r\n\t\t\t\t<div class=\"info\">\r\n\t\t\t\t\t<div class=\"title\">${post.names.ru} (<span class=\"year\">${post.season.year}</span>)</div>\r\n\t\t\t\t\t<div class=\"meta\">\r\n\t\t\t\t\t\t<div class=\"genres\">${genres}</div>\r\n\t\t\t\t\t\t<div class=\"type\">${post.type.full_string}</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</a>`;\r\n\r\n\t\treturn {\r\n\t\t\tstring: html,\r\n\t\t\tnode: app().postRender.itemCard(html)\r\n\t\t};\r\n\t}\r\n\r\n\trenderTorrents(post) {\r\n\t\tlet html = `<div class=\"component torrents\">`;\r\n\r\n\t\tfor(let i=0; i<post.torrents.list.length; i++) {\r\n\t\t\tconst torrent = post.torrents.list[i];\r\n\t\t\tlet size = torrent.total_size / 1024 / 1024;\r\n\t\t\tsize = (size > 1024) \r\n\t\t\t\t? (size / 1024).toString().split(\".\")[0] + \".\" + (size / 1024).toString().split(\".\")[1].substr(0,2) + \" ГБ\" \r\n\t\t\t\t: size.toString().split(\".\")[0] + \".\" + size.toString().split(\".\")[1].substr(0,2) + \" МБ\";\r\n\t\t\thtml += `\r\n\t\t\t\t<div class=\"torrent\" data-torrent-id=\"${torrent.torrent_id}\">\r\n\t\t\t\t\t<div class=\"series\">Серии ${torrent.episodes.string}</div>\r\n\t\t\t\t\t<div class=\"quality\">${torrent.quality.string}</div>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<div class=\"seed-leech\">\r\n\t\t\t\t\t\t<span class=\"seed\">\r\n\t\t\t\t\t\t\t<span class=\"mdi mdi-arrow-up\"></span>\r\n\t\t\t\t\t\t\t${torrent.seeders}\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t<span class=\"leech\">\r\n\t\t\t\t\t\t\t<span class=\"mdi mdi-arrow-down\"></span>\r\n\t\t\t\t\t\t\t${torrent.leechers}\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"download\">\r\n\t\t\t\t\t\t<a href=\"http://anilibria.tv${torrent.url}\" class=\"std-btn btn-success\" target=\"_blank\">\r\n\t\t\t\t\t\t\t<span class=\"mdi mdi-download\"></span>\r\n\t\t\t\t\t\t\t<span class=\"btn-label\">Скачать</span>\r\n\t\t\t\t\t\t\t<span class=\"btn-tsize\">${size}</span>\r\n\t\t\t\t\t\t</a>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t`;\r\n\t\t}\r\n\r\n\t\thtml += \"</div>\";\r\n\t\treturn html;\r\n\t}\r\n\r\n\trenderFavoriteBtn(post) {\r\n\t\tconst html = `<button class=\"std-btn btn-warning fav-btn dnone\" data-id=\"${post.id}\">\r\n\t\t\t<span class=\"state unset-from\">\r\n\t\t\t\t<span class=\"mdi mdi-star\"></span>\r\n\t\t\t\tВ избранном\r\n\t\t\t</span>\r\n\t\t\t<span class=\"state set-to\">\r\n\t\t\t\t<span class=\"mdi mdi-star-outline\"></span>\r\n\t\t\t\tДобавить в избранное\r\n\t\t\t</span>\r\n\t\t</button>`;\r\n\r\n\t\treturn {\r\n\t\t\thtml: html,\r\n\t\t\tnode: app().postRender.favoriteBtn(html, post.id)\r\n\t\t};\r\n\t}\r\n\r\n\trenderTabs(props) {\r\n\t\tlet nav = `<div class=\"tabs-nav\">`;\r\n\t\tlet content = `<div class=\"tabs-content\">`;\r\n\t\tfor(let tabName in props.tabs) {\r\n\t\t\tconst active = (props.active == tabName) ? \"active\" : \"\";\r\n\t\t\tnav += `<div class=\"tab ${active}\" data-tab=\"${tabName}\">${props.tabs[tabName].btn}</div>`;\r\n\t\t\tcontent += `<div class=\"tab-content ${tabName} ${active}\" data-tab=\"${tabName}\">${props.tabs[tabName].content}</div>`;\r\n\t\t}\r\n\t\tnav += `</div>`;\r\n\t\tcontent += `</div>`;\r\n\r\n\t\tlet html = `<div class=\"component tabs ${props.name}\" id=\"${props.name}\">\r\n\t\t\t${nav}\r\n\t\t\t${content}\r\n\t\t</div>`;\r\n\t\t\r\n\t\treturn html;\r\n\t}\r\n\r\n\trenderSingle(post) {\r\n\t\tlet genres = this.renderGenresList(post.genres).html;\r\n\t\tconst thumb = this.renderThumbnail(post);\r\n\t\tconst voices = post.team.voice.join(\", \");\r\n\t\tconst schedule = post.inSchedule \r\n\t\t\t? `<div class=\"\"><span class=\"mdi mdi-flag-checkered\"></span> Новая серия: ${(post.inSchedule.isToday ? \"сегодня\" : post.inSchedule.string)}</div>` \r\n\t\t\t: \"\";\r\n\r\n\t\tlet html = `<div class=\"component single-item\">\r\n\t\t\t<div class=\"std-row\">\r\n\t\t\t\t${thumb}\r\n\t\t\t\t<div class=\"item-info\">\r\n\t\t\t\t\t<h2 class=\"title\"><strong>${post.names.ru}</strong> / ${post.names.en}</h2>\r\n\t\t\t\t\t<div class=\"time-period\">${post.season.string || \"\"} ${post.season.year}</div>\r\n\t\t\t\t\t<div class=\"genres\">${genres}</div>\r\n\t\t\t\t\t<div class=\"type\">${post.type.full_string}</div>\r\n\t\t\t\t\t${schedule}\r\n\t\t\t\t\t<div class=\"team\">\r\n\t\t\t\t\t\t<div class=\"voice\">\r\n\t\t\t\t\t\t\t<strong>Голоса:</strong>\r\n\t\t\t\t\t\t\t${voices}\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"description\">${post.description}</div>\r\n\t\t\t\t\t<div class=\"control-panel\">\r\n\t\t\t\t\t\t<div class=\"fav-btn-wrap\"></div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"video-container\"></div>\r\n\t\t</div>`;\r\n\r\n\t\treturn {\r\n\t\t\tstring: html,\r\n\t\t\tnode: app().postRender.single(html, post)\r\n\t\t};\r\n\t}\r\n\r\n\trenderPreloadSpinner() {\r\n\t\treturn `<div class=\"loadingio-spinner-dual-ball-9pyhqeozhs\"><div class=\"ldio-jyt13pqa73\">\r\n\t\t\t<div></div><div></div><div></div>\r\n\t\t\t</div></div>`;\r\n\t}\r\n \r\n\trenderGenreBtn(genre) {\r\n\t\tlet html = `<a \r\n\t\t\thref=\"#page:genres;sg:${genre}\" \r\n\t\t\tclass=\"std-btn genre-btn\" \r\n\t\t\tdata-genre-name=\"${genre}\"\r\n\t\t>\r\n\t\t\t${genre}\r\n\t\t</a>`;\r\n\r\n\t\treturn {\r\n\t\t\thtml: html,\r\n\t\t\tnode: app().postRender.genreBtn(html)\r\n\t\t};\r\n\t}\r\n\r\n\trenderGenresList(genres) {\r\n\t\tlet container = document.createElement(\"DIV\");\r\n\t\tcontainer.classList.add(\"genres-wrap\");\r\n\t\tlet html = `<div class=\"genres-wrap\">`;\r\n\t\tfor(let i=0; i<genres.length; i++) {\r\n\t\t\tconst btn = this.renderGenreBtn(genres[i]);\r\n\t\t\tcontainer.appendChild(btn.node);\r\n\t\t\thtml += btn.html;\r\n\t\t}\r\n\r\n\t\thtml += \"</div>\";\r\n\r\n\t\treturn {\r\n\t\t\thtml: html,\r\n\t\t\tnode: container\r\n\t\t};\r\n\t}\r\n}","class Router {\r\n\tconstructor(pagesContainerSelector, defaultPageId, notFoundPageId) {\r\n\t\tthis.containerSelector = pagesContainerSelector;\r\n\t\tthis.container = document.querySelector(this.containerSelector);\r\n\t\tthis.defaultPageId = defaultPageId;\r\n\t\tthis.notFoundPageId = notFoundPageId;\r\n\t\tthis.initers = {};\r\n\t\tconst findedPages = this.container.querySelectorAll(\".page[id]\");\r\n\r\n\t\tthis.pages = {};\r\n\t\tfor(let i=0; i<findedPages.length; i++) {\r\n\t\t\tthis.pages[findedPages[i].getAttribute(\"id\")] = findedPages[i];\r\n\t\t}\r\n\r\n\t\tthis.currentPage = \"default-val\";\r\n\t\tthis.currentPath = \"default-val\";\r\n\t\tthis.zindex = 1;\r\n\t}\r\n\r\n\tgoToPage(pageId) {\r\n\t\tif(typeof pageId == \"undefined\") {\r\n\t\t\treturn document.location.hash = `page:${this.defaultPageId}`;\r\n\t\t}\r\n\r\n\t\tif(typeof this.pages[pageId] == \"undefined\") {\r\n\t\t\treturn this.goToPage(this.notFoundPageId);\r\n\t\t}\r\n\r\n\t\tthis.container.querySelectorAll(\".page.show\").forEach( p => {\r\n\t\t\treturn p.classList.remove(\"show\");\r\n\t\t} );\r\n\r\n\t\tif(typeof this.pages[pageId] != \"undefined\") {\r\n\t\t\tthis.initers[\"_page\"] && this.initers[\"_page\"](this, pageId);\r\n\t\t\tthis.initers[pageId] && this.initers[pageId](this);\r\n\t\t\tthis.pages[pageId].style.zIndex = this.zindex;\r\n\t\t\tthis.zindex++;\r\n\t\t}\r\n\r\n\t\tthis.pages[pageId]?.classList.add(\"show\");\r\n\t\twindow.scrollTo({ top: 0 });\r\n\t\tthis.currentPage = pageId;\r\n\t\tthis.currentPath = document.location.hash;\r\n\t}\r\n\r\n\turlMonitor() {\r\n\t\tsetInterval(() => {\r\n\t\t\tconst route = document.location.hash.split(\"page:\")[1];\r\n\t\t\tif(document.location.hash != this.currentPath) {\r\n\t\t\t\tthis.goToPage(route?.split(\";\")[0]);\r\n\t\t\t}\r\n\t\t}, 10);\r\n\t}\r\n\r\n\tinitPage(pageName, callback) {\r\n\t\tthis.initers[pageName] = callback;\r\n\t}\r\n}","class StoredPlayerDataManager {\r\n\tconstructor() {\r\n\t\tthis.localStorageItemName = \"player_data_backup\";\r\n\t\t\r\n\t\tthis.restorePlayerDataFromBackup();\r\n\t\tthis.cleanupBackupedPlayerData();\r\n\r\n\t\tsetInterval(() => {\r\n\t\t\tthis.backupPlayerData();\r\n\t\t}, 3000);\r\n\t\t\r\n\t\tsetInterval(() => {\r\n\t\t\tthis.cleanupBackupedPlayerData();\r\n\t\t}, 5 * 60 * 1000);\r\n\t}\r\n\r\n\tbackupPlayerData(plData) {\r\n\t\tconst playerData = plData || getStorablePlayerData();\r\n\t\tconst bPlayerData = this.getBackupedPlayerData();\r\n\t\tfor(let id in playerData) {\r\n\t\t\tif(bPlayerData[id]) {\r\n\t\t\t\tbPlayerData[id].currentEpisode = playerData[id].currentEpisode;\r\n\t\t\t\tbPlayerData[id].timing.watched = playerData[id].timing.watched;\r\n\t\t\t\tbPlayerData[id].timing.len = playerData[id].timing.len;\r\n\t\t\t} else {\r\n\t\t\t\tbPlayerData[id] = playerData[id];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlocalStorage.setItem(this.localStorageItemName, JSON.stringify(bPlayerData));\r\n\t}\r\n\r\n\tgetBackupedPlayerData() {\r\n\t\tconst backupedPlayerData = localStorage.getItem(this.localStorageItemName);\r\n\t\tif(!backupedPlayerData) {\r\n\t\t\treturn {};\r\n\t\t}\r\n\r\n\t\treturn JSON.parse(backupedPlayerData);\r\n\t}\r\n\r\n\trestorePlayerDataFromBackup() {\r\n\t\tconst playerData = this.getBackupedPlayerData();\r\n\t\tconst path = document.location.host + document.location.pathname;\r\n\t\tconst timestamp = (new Date()).getTime();\r\n\r\n\t\tfor(let id in playerData) {\r\n\t\t\tconst episode = playerData[id].currentEpisode;\r\n\t\t\tconst watched = playerData[id].timing.watched;\r\n\t\t\tconst len = playerData[id].timing.len || 0;\r\n\t\t\tconst data = `{x-${(episode-1)}-s${episode}}${watched}.0--${len}.0--${timestamp}`;\r\n\t\t\tlocalStorage.setItem(`pljsplayfrom_main-player-${id}${path}`, data);\r\n\t\t}\r\n\t}\r\n\r\n\tcleanupBackupedPlayerData() {\r\n\t\tconst playerData = this.getBackupedPlayerData();\r\n\t\tlet length = Object.keys(playerData).length;\r\n\t\tif(length <= 300) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tlet ID = -1;\r\n\t\tlet watchedAt = Number.MAX_VALUE;\r\n\t\tfor(let id in playerData) {\r\n\t\t\tif(playerData[id].timing.watchedAt < watchedAt) {\r\n\t\t\t\tID = id;\r\n\t\t\t\twatchedAt = playerData[id].timing.watchedAt;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tplayerData[ID] && delete playerData[ID];\r\n\t\tlocalStorage.setItem(this.localStorageItemName, JSON.stringify(playerData));\r\n\t}\r\n}","class Sync {\r\n\tconstructor() {\r\n\t\tthis.errFlag = false;\r\n\r\n\t\tthis.sync();\r\n\t\tsetInterval(() => this.sync(), 30 * 1000);\r\n\t}\r\n\r\n\tsync() {\r\n\t\tconst uemail = localStorage.getItem(\"uemail\");\r\n\t\tif(this.errFlag || !getSessionId() || !uemail) {\r\n\t\t\tthis.errFlag = true;\r\n\t\t\treturn ;\r\n\t\t}\r\n\r\n\t\tconsole.log(\"sync start\");\r\n\t\t\r\n\t\tconst xhr = stdXHR(\"GET\", _CONF.sync.url + `?uemail=${uemail}`, resp => {\r\n\t\t\tconst result = JSON.parse(resp.response).result;\r\n\r\n\t\t\tif(result.uemail != uemail) {\r\n\t\t\t\tconsole.error(`User like a \"${$uemail}\" not found`);\r\n\t\t\t}\r\n\r\n\t\t\tconst stored = app().storedPlayerDataManager.getBackupedPlayerData();\r\n\t\t\tfor(let id in result.data) {\r\n\t\t\t\tif(!stored[id]) {\r\n\t\t\t\t\tstored[id] = result.data[id];\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(result.data[id].timing.watchedAt > stored[id].timing.watchedAt) {\r\n\t\t\t\t\tstored[id] = result.data[id];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tapp().storedPlayerDataManager.backupPlayerData(stored);\r\n\t\t\tapp().storedPlayerDataManager.restorePlayerDataFromBackup();\r\n\t\t\tthis.push();\r\n\t\t});\r\n\r\n\t\txhr.onerror = () => {};\r\n\t\txhr.send();\r\n\t}\r\n\r\n\tpush() {\r\n\t\tconst uemail = localStorage.getItem(\"uemail\");\r\n\t\tif(!getSessionId() || !uemail) {\r\n\t\t\tthis.errFlag = true;\r\n\t\t\treturn ;\r\n\t\t}\r\n\r\n\t\tconst preparedData = new FormData();\r\n\t\tpreparedData.append(\"uemail\", uemail);\r\n\t\tpreparedData.append(\"data\", JSON.stringify(app().storedPlayerDataManager.getBackupedPlayerData()));\r\n\t\t\r\n\t\tconst xhr = stdXHR(\"POST\", _CONF.sync.url, resp => {\r\n\t\t\tconsole.log(\"finished\");\r\n\t\t});\r\n\r\n\t\txhr.onerror = () => {};\r\n\t\txhr.send(preparedData);\r\n\t}\r\n}","const _CONF = {\r\n\tdomen: \"anilibria.tv\",\r\n\tapi: {\r\n\t\tdomen: \"api.anilibria.tv\",\r\n\t\tver: \"v3\"\r\n\t},\r\n\r\n\tperPage: {\r\n\t\thome: 20,\r\n\t\tsearch: 80,\r\n\t\tgenres: 80\r\n\t},\r\n\t\r\n\tnumbOfRelevant: 12,\r\n\r\n\tsync: {\r\n\t\turl: \"//192.168.0.100/anilibria-cusi/sync/sync.php\"\r\n\t}\r\n};","const getSessionId = () => {\r\n\tconst sessId = localStorage.getItem(\"sessionId\");\r\n\tif(sessId) {\r\n\t\treturn sessId;\r\n\t}\r\n\r\n\treturn false;\r\n};\r\n\r\nconst stdXHR = (method, url, onloadCallback) => {\r\n\tconst xhr = new XMLHttpRequest();\r\n\txhr.open(method, url);\r\n\txhr.setRequestHeader(\"Cache-Control\", \"no-cache, no-store, max-age=0\");\r\n\r\n\txhr.onload = () => {\r\n\t\tif(xhr.status == 200) {\r\n\t\t\tonloadCallback(xhr);\r\n\t\t} else {\r\n\t\t\tif(xhr.status == 404) {\r\n\t\t\t\tapp().router.goToPage(\"not-found\");\r\n\t\t\t}\r\n\t\t\tconst alert = createGlobalAlertComponent(\"danger\", \"Ошибка загрузки данных\");\r\n\t\t\tsetTimeout(() => alert.close(), 3000);\r\n\t\t}\r\n\t}\r\n\r\n\txhr.onerror = () => {\r\n\t\tconst alert = createGlobalAlertComponent(\"danger\", \"Сервер не доступен\");\r\n\t\tsetTimeout(() => alert.close(), 3000);\r\n\t}\r\n\r\n\treturn xhr;\r\n}\r\n\r\nconst showMobNav = () => {\r\n\tdocument.querySelector(\".btn-nav-on-mob-show\").classList.add(\"active\");\r\n\tdocument.querySelectorAll(\".navigation-main-wrapper, .userbar-wrapper\").forEach(item => {\r\n\t\titem.classList.add(\"show\");\r\n\t});\r\n}\r\n\r\nconst hideMobNav = () => {\r\n\tdocument.querySelector(\".btn-nav-on-mob-show\").classList.remove(\"active\");\r\n\tdocument.querySelectorAll(\".navigation-main-wrapper, .userbar-wrapper\").forEach(item => {\r\n\t\titem.classList.remove(\"show\");\r\n\t});\r\n}\r\n\r\nconst makeSelectedGenresActivated = () => {\r\n\tlet selectedGenres = document.location.hash.split(\"sg:\")[1];\r\n\tselectedGenres = selectedGenres \r\n\t\t? selectedGenres.split(\",\").map(item => { return decodeURI(item); }) \r\n\t\t: [];\r\n\tdocument.querySelectorAll(\"#genres .render-genres .genre-btn.active\").forEach(\r\n\t\ti => i.classList.remove(\"active\")\r\n\t);\r\n\tfor(let i=0; i<selectedGenres.length; i++) {\r\n\t\tdocument.querySelector(`#genres .render-genres .genre-btn[data-genre-name=\"${selectedGenres[i]}\"]`)?.classList.add(\"active\");\r\n\t}\r\n}\r\n\r\nconst getItemCardFields = (api2Flag) => {\r\n\treturn (api2Flag === true) \r\n\t? [ \r\n\t\t\t\"id\", \r\n\t\t\t\"code\", \r\n\t\t\t\"names\", \r\n\t\t\t\"genres\", \r\n\t\t\t\"posters\", \r\n\t\t\t\"status\", \r\n\t\t\t\"player\", \r\n\t\t\t\"season\", \r\n\t\t\t\"type\" \r\n\t\t]\r\n\t: [ \r\n\t\t\t\"id\", \r\n\t\t\t\"code\", \r\n\t\t\t\"names\", \r\n\t\t\t\"genres\", \r\n\t\t\t\"posters.medium.url\", \r\n\t\t\t\"status\", \r\n\t\t\t\"player.episodes\", \r\n\t\t\t\"season\", \r\n\t\t\t\"type\" \r\n\t\t]\r\n}\r\n\r\nconst setPageTitle = pageTitle => {\r\n\tdocument.querySelector(\"head title\").innerHTML = pageTitle;\r\n}\r\n\r\nconst nodeFromHTML = html => {\r\n\tconst container = document.createElement(\"DIV\");\r\n\tcontainer.innerHTML = html;\r\n\treturn item = container.childNodes[0];\r\n}\r\n\r\nconst addToFavourites = (postId, callback) => {\r\n\tconst sessId = getSessionId();\r\n\tif(sessId) {\r\n\t\tanilibriaRequest(\r\n\t\t\t\"user/favorites\",\r\n\t\t\t{\r\n\t\t\t\tsession: sessId,\r\n\t\t\t\ttitle_id: postId\r\n\t\t\t},\r\n\t\t\tresp => { \r\n\t\t\t\tapp().cacheProvider.unsetCache(\"favouritesList\");\r\n\t\t\t\tcallback(resp);\r\n\t\t\t},\r\n\t\t\t\"PUT\"\r\n\t\t);\r\n\t}\r\n}\r\n\r\nconst removeFromFavourites = (postId, callback) => {\r\n\tconst sessId = getSessionId();\r\n\tif(sessId) {\r\n\t\tanilibriaRequest(\r\n\t\t\t\"user/favorites\",\r\n\t\t\t{\r\n\t\t\t\tsession: sessId,\r\n\t\t\t\ttitle_id: postId\r\n\t\t\t},\r\n\t\t\tresp => {\r\n\t\t\t\tapp().cacheProvider.unsetCache(\"favouritesList\");\r\n\t\t\t\tcallback(resp);\r\n\t\t\t},\r\n\t\t\t\"DELETE\"\r\n\t\t);\r\n\t}\r\n}\r\n\r\nconst insertListToRenderContainer = (renderContainer, list) => {\r\n\tfor(let i = 0; i < list.length; i++) {\r\n\t\trenderContainer.appendChild(app().renderer.renderItemCard(list[i]).node);\r\n\t}\r\n}\r\n\r\nconst anilibriaRequest = (name, params, callback, method) => {\r\n\tparams = params || {};\r\n\r\n\tmethod = method || \"GET\";\r\n\tlet ver = _CONF.api.ver;\r\n\tif(name.indexOf(\":\") != -1) {\r\n\t\t[ver, name] = name.split(\":\");\r\n\t}\r\n\r\n\tlet url = `https://${_CONF.api.domen}/api/${ver}/${name}`;\r\n\t\r\n\tif(params[\"filter\"]) {\t\r\n\t\tparams.filter = params.filter.join(\",\");\r\n\t}\r\n\r\n\tif(params[\"after\"] === 0) {\r\n\t\tdelete params[\"after\"];\r\n\t}\r\n\r\n\tconst query = (new URLSearchParams(params)).toString();\r\n\tif(query) {\r\n\t\turl += `?${query}`;\r\n\t}\r\n\r\n\tstdXHR(method, url,\r\n\t\txhr => {\r\n\t\t\tconst resp = JSON.parse(xhr.response);\r\n\t\t\tcallback(resp);\r\n\t\t}\r\n\t).send();\r\n}\r\n\r\nconst getSelectedGenres = () => {\r\n\tlet genres = document.location.hash.split(\"sg:\")[1];\r\n\tgenres = decodeURI(genres);\r\n\treturn genres.length ? genres.split(\",\") : [];\r\n}\r\n\r\nconst getStorablePlayerData = () => {\r\n\tconst data = {};\r\n\tconst keys = Object.keys(localStorage);\r\n\r\n\tfor(let key of keys) {\r\n\t\tif(key.indexOf(\"pljsplayfrom_main-player-\") == -1) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tconst id = parseInt(key.split(\"pljsplayfrom_main-player-\")[1].replaceAll(document.location.hostname, \"\"));\r\n\t\tlet val = localStorage.getItem(key);\r\n\t\t[watched, len, watchedAt] = val.split(\"}\")[1].split(\"--\");\r\n\t\tdata[id] = {\r\n\t\t\tcurrentEpisode: val.split(\"}\")[0].split(\"s\")[1],\r\n\t\t\ttiming: {\r\n\t\t\t\twatched: parseInt(watched),\r\n\t\t\t\tlen: parseInt(len),\r\n\t\t\t\twatchedAt: watchedAt\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\treturn data;\r\n}\r\n\r\nconst transformScheduleList = schedule => {\r\n\tconst resultList = {};\r\n\tconst currentDayNum = (new Date()).getDay();\r\n\tconst dayNames = [\"понедельник\", \"вторник\", \"среда\", \"четверг\", \"пятница\", \"суббота\", \"воскресенье\"];\r\n\r\n\tfor(let i in schedule) {\r\n\t\tfor(let j in schedule[i].list) {\r\n\t\t\tif(resultList[schedule[i].list[j].id]) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tresultList[schedule[i].list[j].id] = {\r\n\t\t\t\tday: {\r\n\t\t\t\t\tnum: schedule[i].day,\r\n\t\t\t\t\tstring: dayNames[schedule[i].day],\r\n\t\t\t\t\tisToday: schedule[i].day == (currentDayNum - 1)\r\n\t\t\t\t},\r\n\t\t\t\titem: schedule[i].list[j]\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn resultList;\r\n}","const initers = app => {\r\n\tapp.router.initPage(\"_page\", (router, pageId) => {\r\n\t\tdocument.querySelectorAll(\"#single .render-container\").forEach(i => { i.innerHTML = \"\"; });\r\n\t\tdocument.querySelector(`#${pageId} .preload-spinner`)?.classList.remove(\"dnone\");\r\n\t\tdocument.querySelector(`[name=\"search\"]`).value = \"\";\r\n\t\tdocument.querySelectorAll(\".page .more-btn\").forEach(i => i.classList.add(\"dnone\"));\r\n\t\thideMobNav();\r\n\r\n\t\tconst pageTitle = document.querySelector(`#${pageId}`)?.getAttribute(\"data-title\");\r\n\t\tsetPageTitle(pageTitle);\r\n\t});\r\n\r\n\tapp.router.initPage(\"login\", router => {\r\n\t\tif(getSessionId()) {\r\n\t\t\tdocument.location.hash = \"page:\" + router.notFoundPageId;\r\n\t\t}\r\n\t});\r\n\r\n\tapp.router.initPage(\"home\", router => {\r\n\t\tapp.loader.homePageUpToLoad(1, resp => {\r\n\t\t\tconst renderContainer = document.querySelector(\"#home .render-container\");\r\n\t\t\tconst moreBtn = document.querySelector(\"#home .preload-spinner\");\r\n\t\t\trenderContainer.innerHTML = \"\";\r\n\t\t\tmoreBtn.classList.add(\"dnone\");\r\n\t\t\tresp.list.length && document.querySelector(\".more-btn\").classList.remove(\"dnone\");\r\n\t\t\t(resp.pagination.current_page == resp.pagination.pages) && moreBtn.classList.add(\"dnone\");\r\n\t\t\tinsertListToRenderContainer(renderContainer, resp.list);\r\n\t\t});\r\n\t});\r\n\r\n\tapp.router.initPage(\"single\", router => {\t\t\t\r\n\t\tconst id = document.location.hash.split(\"id\")[1];\r\n\r\n\t\tanilibriaRequest(\r\n\t\t\t\"title\", \r\n\t\t\t{\r\n\t\t\t\tid: id,\r\n\t\t\t\tinclude: \"raw_poster\"\r\n\t\t\t}, \r\n\t\t\tresp => {\r\n\t\t\t\tsetPageTitle(resp.names.ru);\r\n\t\t\t\tconst genres = resp.genres;\r\n\t\t\t\tconst renderContainer = document.querySelector(\"#single .render-container.main-render\");\r\n\r\n\t\t\t\tapp.loader.scheduleList(scheduleList => {\r\n\t\t\t\t\tscheduleList = transformScheduleList(scheduleList);\r\n\t\t\t\t\tresp.inSchedule = scheduleList[resp.id] ? scheduleList[resp.id].day : false;\r\n\t\t\t\t\trenderContainer.innerHTML = \"\";\r\n\t\t\t\t\tdocument.querySelector(\"#single .preload-spinner\").classList.add(\"dnone\");\r\n\t\t\t\t\trenderContainer.appendChild(app.renderer.renderSingle(resp).node);\r\n\t\t\t\t});\r\n\r\n\t\t\t\tlet squery = resp.names.ru;\r\n\t\t\t\tconst filters = getItemCardFields().join(\",\");\r\n\r\n\t\t\t\tapp.cacheProvider.cacheable(\r\n\t\t\t\t\t`relatedTitles_id${resp.id}`,\r\n\t\t\t\t\tcacheableCallback => {\r\n\t\t\t\t\t\tanilibriaRequest(\r\n\t\t\t\t\t\t\t\"title/search\", \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tsearch: resp.names.ru,\r\n\t\t\t\t\t\t\t\tafter: 0,\r\n\t\t\t\t\t\t\t\tlimit: _CONF.numbOfRelevant,\r\n\t\t\t\t\t\t\t\tfilter: getItemCardFields(),\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tcacheableCallback\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tresp => {\r\n\t\t\t\t\t\tresp.list.splice(_CONF.numbOfRelevant, resp.list.length);\r\n\t\t\t\t\t\tconst ids = resp.list.map(i => i.id);\r\n\t\t\t\t\t\tconst renderContainer = document.querySelector(\"#single .render-container.relevant-items-render\");\r\n\t\t\t\t\t\trenderContainer.innerHTML = \"\";\r\n\t\t\t\t\t\tinsertListToRenderContainer(renderContainer, resp.list.filter(i => i.id != id));\r\n\r\n\t\t\t\t\t\tif(_CONF.numbOfRelevant - renderContainer.childNodes.length > 0) {\r\n\t\t\t\t\t\t\tapp.cacheProvider.cacheable(\r\n\t\t\t\t\t\t\t\t`additionRelatedTitles_id${id}`,\r\n\t\t\t\t\t\t\t\tcacheableCallback => {\r\n\t\t\t\t\t\t\t\t\tanilibriaRequest(\r\n\t\t\t\t\t\t\t\t\t\t\"title/search\", \r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tsearch: \"\",\r\n\t\t\t\t\t\t\t\t\t\t\tgenres: genres.splice(0, 4).join(\",\"),\r\n\t\t\t\t\t\t\t\t\t\t\tafter: 0,\r\n\t\t\t\t\t\t\t\t\t\t\tlimit: _CONF.numbOfRelevant + 1,\r\n\t\t\t\t\t\t\t\t\t\t\tfilter: getItemCardFields(),\r\n\t\t\t\t\t\t\t\t\t\t}, \r\n\t\t\t\t\t\t\t\t\t\tcacheableCallback\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\tresp2 => {\r\n\t\t\t\t\t\t\t\t\tresp2.list = resp2.list.filter(i => i.id != id);\r\n\t\t\t\t\t\t\t\t\tfor(let i = 0; i < resp2.list.length; i++) {\r\n\t\t\t\t\t\t\t\t\t\tif(renderContainer.childNodes.length >= _CONF.numbOfRelevant) {\r\n\t\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t\tif(ids.indexOf(resp2.list[i].id) > -1) {\r\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\trenderContainer.appendChild(app.renderer.renderItemCard(resp2.list[i]).node);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t60 * 60 * 3\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\t60 * 60 * 3\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t);\r\n\t});\r\n\r\n\tapp.router.initPage(\"favourites\", router => {\r\n\t\tapp.loader.favouritesList(resp => {\r\n\t\t\tconst renderContainer = document.querySelector(\"#favourites .render-container\");\r\n\t\t\tdocument.querySelector(\"#favourites .preload-spinner\").classList.add(\"dnone\");\r\n\t\t\trenderContainer.innerHTML = \"\";\r\n\t\t\tapp.loader.scheduleList(scheduleList => {\r\n\t\t\t\tscheduleList = transformScheduleList(scheduleList);\r\n\t\t\t\tfor(let i = resp.length-1; i >= 0; i--) {\r\n\t\t\t\t\tresp[i].player.episodes = resp[i].player.series;\r\n\t\t\t\t\tresp[i].inSchedule = scheduleList[resp[i].id] ? scheduleList[resp[i].id].day : false;\r\n\t\t\t\t\trenderContainer.appendChild(app.renderer.renderItemCard(resp[i]).node);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t});\r\n\r\n\tapp.router.initPage(\"search\", router => {\r\n\t\tlet squery = decodeURI(document.location.hash.split(\"sq:\")[1]);\r\n\t\tdocument.querySelector(`[name=\"search\"]`).value = squery;\r\n\r\n\t\tapp.loader.searchPageUpToLoad(1, resp => {\r\n\t\t\tconst renderContainer = document.querySelector(\"#search .render-container\");\r\n\t\t\tconst moreBtn = document.querySelector(\"#search .more-btn\");\r\n\t\t\trenderContainer.innerHTML = \"\";\r\n\t\t\tdocument.querySelector(\"#search .preload-spinner\").classList.add(\"dnone\");\r\n\t\t\tresp.list.length && moreBtn.classList.remove(\"dnone\");\r\n\t\t\t(resp.pagination.current_page == resp.pagination.pages) && moreBtn.classList.add(\"dnone\");\r\n\t\t\tinsertListToRenderContainer(renderContainer, resp.list);\r\n\t\t});\r\n\t});\r\n\r\n\tapp.router.initPage(\"new-series\", router => {\r\n\t\tapp.cacheProvider.cacheable(\r\n\t\t\t\"new-series\",\r\n\t\t\tcacheableCallback => {\r\n\t\t\t\tanilibriaRequest(\r\n\t\t\t\t\t\"title/updates\", \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tafter: 0,\r\n\t\t\t\t\t\tlimit: 60,\r\n\t\t\t\t\t\tfilter: getItemCardFields(),\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcacheableCallback\r\n\t\t\t\t);\r\n\t\t\t},\r\n\t\t\tresp => {\r\n\t\t\t\tconst renderContainer = document.querySelector(\"#new-series .render-container\");\r\n\t\t\t\trenderContainer.innerHTML = \"\";\r\n\t\t\t\tdocument.querySelector(\"#new-series .preload-spinner\").classList.add(\"dnone\");\r\n\r\n\t\t\t\tapp.loader.favouritesList(favs => {\r\n\t\t\t\t\tconst playerData = getStorablePlayerData();\r\n\r\n\t\t\t\t\tfor(let i = 0; i < resp.list.length; i++) {\r\n\t\t\t\t\t\tfor(let j = 0; j < favs.length; j++) {\r\n\t\t\t\t\t\t\tif(favs[j].id == resp.list[i].id) {\r\n\t\t\t\t\t\t\t\tif(playerData[resp.list[i].id]) {\r\n\t\t\t\t\t\t\t\t\tresp.list[i].localPlayerData = playerData[resp.list[i].id];\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\trenderContainer.appendChild(app.renderer.renderItemCard(resp.list[i]).node);\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\t60 * 5\r\n\t\t);\r\n\t\t\r\n\t});\r\n\r\n\tapp.router.initPage(\"genres\", router => {\r\n\t\tlet selectedGenres = document.location.hash.split(\"sg:\")[1];\r\n\t\tsetTimeout(() => {\r\n\t\t\tmakeSelectedGenresActivated();\r\n\t\t}, 30);\r\n\r\n\t\tconst renderContainer = document.querySelector(\"#genres .render-container\");\r\n\t\tif(selectedGenres) {\r\n\t\t\tapp.loader.genresPageUpToLoad(1, resp => {\r\n\t\t\t\tconst renderContainer = document.querySelector(\"#genres .render-container\");\r\n\t\t\t\tconst moreBtn = document.querySelector(\"#genres .more-btn\");\r\n\t\t\t\trenderContainer.innerHTML = \"\";\r\n\t\t\t\tdocument.querySelector(\"#genres .preload-spinner\").classList.add(\"dnone\");\r\n\t\t\t\tresp.list.length && moreBtn.classList.remove(\"dnone\");\r\n\t\t\t\t(resp.pagination.current_page == resp.pagination.pages) && moreBtn.classList.add(\"dnone\");\r\n\t\t\t\tinsertListToRenderContainer(renderContainer, resp.list);\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\trenderContainer.innerHTML = \"\";\r\n\t\t\tdocument.querySelector(\"#genres .preload-spinner\").classList.add(\"dnone\");\r\n\t\t}\r\n\t});\r\n}","const playerPatch = plId => {\r\n\tconst pl = document.querySelector(`#${plId}`);\r\n\tconst skipBox = pl.childNodes[0].childNodes[21].childNodes[0].childNodes[0];\r\n\r\n\tpl.childNodes[0].addEventListener(\"contextmenu\", e => {\r\n\t\te.stopImmediatePropagation();\r\n\t}, true);\r\n\r\n\tconst fixSkin = () => {\r\n\t\tskipBox.style.borderRadius = \"6px\";\r\n\t\tskipBox.style.border = \"0\";\r\n\r\n\t\tconst episodesListBtn = pl.childNodes[0].childNodes[16].childNodes[0].childNodes[0];\r\n\t\tepisodesListBtn.style.borderRadius = \"0 4px 4px 0\";\r\n\t}\r\n\r\n\tfixSkin();\r\n\r\n\twindow.player = {\r\n\t\tcontainer: pl,\r\n\t\telement: pl.querySelector(\"video\"),\r\n\t\tapi: {\r\n\t\t\tnext: () => {\r\n\t\t\t\tpl.childNodes[0].childNodes[8].childNodes[2].click();\r\n\t\t\t},\r\n\r\n\t\t\tback: () => {\r\n\t\t\t\tpl.childNodes[0].childNodes[6].childNodes[2].click();\r\n\t\t\t},\r\n\r\n\t\t\tplayPause: () => {\r\n\t\t\t\tpl.childNodes[0].childNodes[7].childNodes[2].click();\r\n\t\t\t},\r\n\r\n\t\t\tmuteUnmute: () => {\r\n\t\t\t\tpl.childNodes[0].childNodes[11].childNodes[2].click();\r\n\t\t\t},\r\n\r\n\t\t\tisMute: () => {\r\n\t\t\t\treturn pl.childNodes[0].childNodes[11].childNodes[1].childNodes[0].style.visibility == \"hidden\";\r\n\t\t\t},\r\n\r\n\t\t\tmute: () => {\r\n\t\t\t\tif(!window.player.api.isMute()) {\r\n\t\t\t\t\twindow.player.api.muteUnmute();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\tunmute: () => {\r\n\t\t\t\tif(window.player.api.isMute()) {\r\n\t\t\t\t\twindow.player.api.muteUnmute();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\tisPlaying: () => {\r\n\t\t\t\treturn pl.childNodes[0].childNodes[7].childNodes[1].childNodes[0].style.visibility == \"hidden\";\r\n\t\t\t},\r\n\r\n\t\t\tplay: () => {\r\n\t\t\t\tif(!window.player.api.isPlaying()) {\r\n\t\t\t\t\twindow.player.api.playPause();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\tpause: () => {\r\n\t\t\t\tif(window.player.api.isPlaying()) {\r\n\t\t\t\t\twindow.player.api.playPause();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\tskipOpening: () => {\r\n\t\t\t\tif(pl.childNodes[0].childNodes[21].style.display != \"none\"){\r\n\t\t\t\t\tskipBox.click();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t}\r\n\t}\r\n\r\n\tplayer.element.addEventListener(\"ended\", e => {\r\n\t\tplayer.api.next();\r\n\t});\r\n\r\n\tplayer.element.addEventListener(\"pause\", e => {\r\n\t\tplayer.element.style.filter = \"brightness(.6)\";\r\n\t});\r\n\r\n\tplayer.element.addEventListener(\"play\", e => {\r\n\t\tplayer.element.style.filter = \"brightness(1)\";\r\n\t});\r\n\r\n\tdocument.addEventListener(\"keyup\", e => {\r\n\t\tif(e.keyCode == 78) { // n\r\n\t\t\tplayer.api.next();\r\n\t\t}\r\n\r\n\t\tif(e.keyCode == 66) { // b\r\n\t\t\tplayer.api.back();\r\n\t\t}\r\n\r\n\t\tif(e.keyCode == 83) { // s\r\n\t\t\tplayer.api.skipOpening();\r\n\t\t}\r\n\t});\r\n}"]}