"use strict";(()=>{vare={};e.id=5120,e.ids=[5120],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){returnfunctione(r,o){returnoinr?r[o]:"then"inr&&"function"==typeofr.then?r.then(r=>e(r,o)):"function"==typeofr&&"default"===o?r:void0}}})},22955:(e,r,o)=>{o.r(r),o.d(r,{config:()=>d,default:()=>p,routeModule:()=>f});varn={};o.r(n),o.d(n,{default:()=>a});vart=o(89947),s=o(2706),i=o(96762),l=o(19131),u=o.n(l);letc=o(29021);asyncfunctiona(e,r){if("GET"!==e.method)returnr.json({success:!1,msg:"Failed"});leto=awaitu()(e);if(!o?.logged_in_status)returnr.json({success:!1,log:"No Logs"});if(!c.existsSync("./.tmp/error.log"))returnr.json({success:!0,log:"No Logs Yet."});letn=c.readFileSync("./.tmp/error.log","utf-8");r.json({success:!0,log:n})}letp=(0,i.M)(n,"default"),d=(0,i.M)(n,"config"),f=newt.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/admin/grabErrorLogs",pathname:"/api/admin/grabErrorLogs",bundlePath:"",filename:""},userland:n})},19131:(e,r,o)=>{let{IncomingMessage:n}=o(81630),t=o(72835),s=o(31341);e.exports=asyncfunction(e){let{keyCookieName:r,csrfCookieName:o}=s(),n=`${r}_su`;if(!e.cookies?.[n])returnconsole.log("No auth key cookie found"),null;leti=t({encryptedString:e.cookies[n]});if(!i)returnconsole.log("No user payload found"),null;letl=JSON.parse(i);returnl.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):l.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):l}},31341:e=>{e.exports=function(){lete=process.env.DSQL_COOKIES_PREFIX||"dsql_";return{keyCookieName:e+(process.env.DSQL_COOKIES_KEY_NAME||"key"),csrfCookieName:e+(process.env.DSQL_COOKIES_CSRF_NAME||"csrf")}}},72835:(e,r,o)=>{let{scryptSync:n,createDecipheriv:t}=o(55511),{Buffer:s}=o(79428);e.exports=({encryptedString:e,encryptionKey:r,encryptionSalt:o})=>{if(!e?.match(/./))returnconsole.log("Encrypted string is invalid"),e;leti=r||process.env.DSQL_ENCRYPTION_PASSWORD,l=o||process.env.DSQL_ENCRYPTION_SALT,u=process.env.DSQL_ENCRYPTION_KEY_LENGTH?Number(process.env.DSQL_ENCRYPTION_KEY_LENGTH):24;if(!i?.match(/.{8,}/))returnconsole.log("Decrption key is invalid"),e;if(!l?.match(/.{8,}/))returnconsole.log("Decrption salt is invalid"),e;letc=t("aes-192-cbc",n(i,l,u),s.alloc(16,0));try{letr=c.update(e,"hex","utf8");returnr+=c.final("utf8")}catch(r){returnconsole.log("Error in decrypting =>",r.message),e}}},2706:(e,r)=>{varo;Object.defineProperty(r,"A",{enumerable:!0,get:function(){returno}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(o||(o={}))},89947:(e,r,o)=>{e.exports=o(75600)}};varr=require("../../../webpack-api-runtime.js");r.C(e);varo=r(r.s=22955);module.exports=o})();