"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())}),meta_exports={};__export(meta_exports,{getMeta:()=>getMeta});var getMeta=__name(function(_0){return __async(this,arguments,function*({link:link,providerContext:providerContext}){try{const{axios:axios,cheerio:cheerio,getBaseUrl:getBaseUrl}=providerContext,url=`${yield getBaseUrl("4khdhub")}${link}`,data=(yield axios.get(url)).data,$=cheerio.load(data),type=$(".season-content").length>0?"series":"movie",imdbId="",title=$(".page-title").text()||"",image=$(".poster-image").find("img").attr("src")||"",synopsis=$(".content-section").find("p").first().text().trim()||"",links=[];return"series"===type?$(".season-item").map((i,element)=>{const title2=$(element).find(".episode-title").text();let directLinks=[];$(element).find(".episode-download-item").map((i2,element2)=>{const title3=$(element2).find(".episode-file-info").text().trim().replace("\n"," "),link2=$(element2).find(".episode-links").find("a:contains('HubCloud')").attr("href");title3&&link2&&directLinks.push({title:title3,link:link2})}),title2&&directLinks.length>0&&links.push({title:title2,directLinks:directLinks})}):$(".download-item").map((i,element)=>{const title2=$(element).find(".flex-1.text-left.font-semibold").text().trim(),link2=$(element).find(".grid.grid-cols-2.gap-2").find("a:contains('HubCloud')").attr("href");title2&&link2&&links.push({title:title2,directLinks:[{title:title2,link:link2}]})}),{title:title,synopsis:synopsis,image:image,imdbId:imdbId,type:type,linkList:links}}catch(err){return console.error(err),{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})},"getMeta");exports.getMeta=getMeta;