"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__name=(target,value)=>__defProp(target,"name",{value:value,configurable:!0}),__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&"object"==typeof from||"function"==typeof from)for(let key of __getOwnPropNames(from))__hasOwnProp.call(to,key)||key===except||__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),__async=(__this,__arguments,generator)=>new Promise((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}),episodes_exports={};function getEpisodeLinks(_0){return __async(this,arguments,function*({url:url,providerContext:providerContext}){try{const res=yield providerContext.axios.get(url),$=providerContext.cheerio.load(res.data||""),episodes=[];return $("h4.fittexted_for_content_h4").each((_,h4El)=>{const epTitle=$(h4El).text().trim();epTitle&&$(h4El).nextUntil("h4, hr").find("a[href]").each((_2,linkEl)=>{let href=($(linkEl).attr("href")||"").trim();if(!href)return;href.startsWith("http")||(href=new URL(href,url).href);const btnText=$(linkEl).text().trim()||"Watch Episode",lowerHref=href.toLowerCase();(lowerHref.includes("skydro")||lowerHref.includes("flexplayer.buzz"))&&episodes.push({title:`${epTitle} - ${btnText}`,link:href})})}),episodes.sort((a,b)=>{var _a,_b;return parseInt((null==(_a=a.title.match(/\d+/))?void 0:_a[0])||"0")-parseInt((null==(_b=b.title.match(/\d+/))?void 0:_b[0])||"0")}),episodes}catch(err){return console.error("getEpisodeLinks error:",err),[]}})}function getEpisodes(_0){return __async(this,arguments,function*({url:url,providerContext:providerContext}){return yield getEpisodeLinks({url:url,providerContext:providerContext})})}__export(episodes_exports,{getEpisodeLinks:()=>getEpisodeLinks,getEpisodes:()=>getEpisodes}),__name(getEpisodeLinks,"getEpisodeLinks"),__name(getEpisodes,"getEpisodes"),exports.getEpisodeLinks=getEpisodeLinks,exports.getEpisodes=getEpisodes;