"use strict";(()=>{vare={};e.id=5141,e.ids=[5141],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},96762:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){returnfunctione(t,n){returnnint?t[n]:"then"int&&"function"==typeoft.then?t.then(t=>e(t,n)):"function"==typeoft&&"default"===n?t:void0}}})},99865:(e,t,n)=>{n.r(t),n.d(t,{config:()=>c,default:()=>P,routeModule:()=>l});varr={};n.r(r),n.d(r,{default:()=>f});vari=n(89947),a=n(2706),o=n(96762),u=n(29021),s=n.n(u),d=n(33873),p=n.n(d);asyncfunctionf(e,t){if("GET"!==e.method)returnt.json({msg:"Invalid Request"});letn=p().resolve(process.cwd(),"./public/videos"),r=e.query.name;if(!r||"string"!=typeofr){t.status(400).end("No video name provided");return}leti=p().join(n,r);if(!s().existsSync(i)){t.status(400).end("Video not found");return}s().statSync(i).size,e.headers.range,s().createReadStream(i).pipe(t)}letP=(0,o.M)(r,"default"),c=(0,o.M)(r,"config"),l=newi.PagesAPIRouteModule({definition:{kind:a.A.PAGES_API,page:"/api/stream/[path]",pathname:"/api/stream/[path]",bundlePath:"",filename:""},userland:r})},2706:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){returnn}});varn=function(e){returne.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,t,n)=>{e.exports=n(75600)}};vart=require("../../../webpack-api-runtime.js");t.C(e);varn=t(t.s=99865);module.exports=n})();