"use strict";var __awaiter=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(i,r){function s(t){try{c(o.next(t))}catch(t){r(t)}}function a(t){try{c(o.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(s,a)}c((o=o.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getEpisodes=void 0;const getEpisodes=function(t){return __awaiter(this,arguments,void 0,function*({url:t,providerContext:e}){const{axios:n,cheerio:o}=e;try{const e=(yield n.get(t)).data;let i=o.load(e);const r=[];return i('strong:contains("Episode"),strong:contains("1080"),strong:contains("720"),strong:contains("480")').map((t,e)=>{const n=i(e).text(),o=i(e).parent().parent().next("h4").find("a").attr("href");o&&!n.includes("zip")&&r.push({title:n,link:o})}),r}catch(e){return[{title:"Server 1",link:t}]}})};exports.getEpisodes=getEpisodes;