"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__name=(e,t)=>__defProp(e,"name",{value:t,configurable:!0}),__export=(e,t)=>{for(var r in t)__defProp(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,r,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of __getOwnPropNames(t))__hasOwnProp.call(e,n)||n===r||__defProp(e,n,{get:()=>t[n],enumerable:!(o=__getOwnPropDesc(t,n))||o.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__async=(e,t,r)=>new Promise((o,n)=>{var a=e=>{try{s(r.next(e))}catch(e){n(e)}},l=e=>{try{s(r.throw(e))}catch(e){n(e)}},s=e=>e.done?o(e.value):Promise.resolve(e.value).then(a,l);s((r=r.apply(e,t)).next())}),stream_exports={};__export(stream_exports,{getStream:()=>getStream});var getStream=__name(function(e){return __async(this,arguments,function*({link:e,providerContext:t}){try{const{getBaseUrl:r,axios:o}=t,n=yield r("consumet"),a=["vidcloud","vidstreaming"],l=`${n}/anime/zoro/watch?episodeId=${e}&server=`,s=[];return yield Promise.all(a.map(e=>__async(null,null,function*(){var t,r;try{const n=yield o.get(l+e);if(n.data){const o=[];null==(t=n.data)||t.subtitles.forEach(e=>{var t,r;"Thumbnails"!==(null==e?void 0:e.lang)&&o.push({language:(null==(t=null==e?void 0:e.lang)?void 0:t.slice(0,2))||"Und",uri:null==e?void 0:e.url,title:(null==e?void 0:e.lang)||"Undefined",type:(null==(r=null==e?void 0:e.url)?void 0:r.endsWith(".vtt"))?"text/vtt":"application/x-subrip"})}),null==(r=n.data)||r.sources.forEach(t=>{s.push({server:e,link:null==t?void 0:t.url,type:(null==t?void 0:t.isM3U8)?"m3u8":"mp4",headers:{Referer:"https://megacloud.club/",Origin:"https://megacloud.club"},subtitles:o})})}}catch(e){}}))),s}catch(e){return[]}})},"getStream");exports.getStream=getStream;