"use strict";(()=>{var e={};e.id=7375,e.ids=[7375],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,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},15570:(e,t,r)=>{r.r(t),r.d(t,{config:()=>p,default:()=>d,routeModule:()=>f});var n={};r.r(n),r.d(n,{default:()=>c});var o=r(89947),s=r(2706),u=r(96762),a=r(19131),i=r.n(a);let l=r(29021);async function c(e,t){if("POST"!==e.method)return t.json({success:!1,msg:"Wrong Method"});let r=await i()(e);if(!r?.logged_in_status)return t.json({success:!1,log:"No Logs"});let{type:n,path:o}=e.body;if(e.body.user,!o?.match(/^\.\/jsonData\/dbSchemas\/users/))return t.json({success:!1,msg:"Invalid Path"});let s=o.replace(/\//g,"\\\\"),u=l.readFileSync(s,"utf-8");t.json({success:!0,data:u})}let d=(0,u.M)(n,"default"),p=(0,u.M)(n,"config"),f=new o.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/admin/grabFile",pathname:"/api/admin/grabFile",bundlePath:"",filename:""},userland:n})},19131:(e,t,r)=>{let{IncomingMessage:n}=r(81630),o=r(72907);e.exports=async function(e){if(!e.cookies?.datasquirelSuAdminUserAuthKey)return console.log("No auth key cookie found"),null;let t=o(e.cookies.datasquirelSuAdminUserAuthKey);if(!t)return console.log("No user payload found"),null;let r=JSON.parse(t);return r.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):r.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):r}},72907:(e,t,r)=>{let{scryptSync:n,createDecipheriv:o}=r(55511),{Buffer:s}=r(79428);e.exports=e=>{let t=o("aes-192-cbc",n(process.env.DSQL_ENCRYPTION_PASSWORD||"",process.env.DSQL_ENCRYPTION_SALT||"",24),s.alloc(16,0));try{let r=t.update(e,"hex","utf8");return r+=t.final("utf8")}catch(e){return null}}},2706:(e,t)=>{var r;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(r||(r={}))},89947:(e,t,r)=>{e.exports=r(75600)}};var t=require("../../../webpack-api-runtime.js");t.C(e);var r=t(t.s=15570);module.exports=r})();