"use strict";(()=>{vare={};e.id=6799,e.ids=[6799],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},33873:e=>{e.exports=require("path")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){returnfunctione(r,t){returntinr?r[t]:"then"inr&&"function"==typeofr.then?r.then(r=>e(r,t)):"function"==typeofr&&"default"===t?r:void0}}})},89496:(e,r,t)=>{t.r(r),t.d(r,{config:()=>m,default:()=>S,routeModule:()=>f});vars={};t.r(s),t.d(s,{default:()=>_});varn=t(89947),o=t(2706),a=t(96762),c=t(57638),l=t.n(c),i=t(48225),u=t.n(i),p=t(19131),d=t.n(p);asyncfunction_(e,r){if("POST"!==e.method)returnr.json({success:!1,msg:"Wrong Method"});lett=awaitd()(e);if(!t?.logged_in_status)returnr.json({success:!1,log:"No Logs"});let{database:s,query:n}=e.body;e.body.user;try{if(!n?.match(/^select .* from .*|^show tables$|^show indexes from .*|show columns from .*|^update |^delete from /i)||n?.match(/^create user|INFORMATION_SCHEMA/i))returnr.json({success:!1,msg:"Disallowed query"});lete=awaitl()({database:s,queryString:n});if(!e)returnr.json({success:!1,msg:"Query Failed!"});r.json({success:!0,result:e})}catch(e){console.log(e.message),u()({component:"/api/runUserDbQuery/main-catch-error",message:e.message}),r.json({success:!1})}}t(29021);letS=(0,a.M)(s,"default"),m=(0,a.M)(s,"config"),f=newn.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/admin/runUserDbQuery",pathname:"/api/admin/runUserDbQuery",bundlePath:"",filename:""},userland:s})},19131:(e,r,t)=>{let{IncomingMessage:s}=t(81630),n=t(72835),o=t(31341);e.exports=asyncfunction(e){let{keyCookieName:r,csrfCookieName:t}=o(),s=`${r}_su`;if(!e.cookies?.[s])returnconsole.log("No auth key cookie found"),null;leta=n({encryptedString:e.cookies[s]});if(!a)returnconsole.log("No user payload found"),null;letc=JSON.parse(a);returnc.password!==process.env.DSQL_USER_KEY?(console.log("Invalid password"),null):c.authKey!==process.env.DSQL_SPECIAL_KEY?(console.log("Invalid auth key"),null):c}},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")}}},30003:e=>{e.exports=/^id$|^uuid$|^date_created$|^date_created_code$|^date_created_timestamp$|^date_updated$|^date_updated_code$|^date_updated_timestamp$/},6061:(e,r,t)=>{lets=t(72835),n=t(30003);e.exports=asyncfunction({unparsedResults:e,tableSchema:r}){lett=[];try{for(leto=0;o<e.length;o++){leta=e[o],c=Object.keys(a);for(lete=0;e<c.length;e++){lett=c[e],o=r?.fields[e];if(t?.match(n))continue;letl=a[t];("number"==typeofl||l)&&o?.encrypted&&l?.match(/./)&&(a[t]=s({encryptedString:l}))}t.push(a)}returnt}catch(r){returnconsole.log("ERROR in parseDbResults Function =>",r.message),e}}},48225:(e,r,t)=>{lets=t(29021),{IncomingMessage:n}=t(81630);e.exports=asyncfunction({user:e,message:r,component:t,noMail:n,req:o}){leta=newDate,c=(()=>{if(!o)returnnull;try{lete=o.headers["x-forwarded-for"],r=o.headers["x-real-ip"],t=o.headers["cf-connecting-ip"],s=Array.isArray(e)?e[0]:e?.split(",")[0],n=t||s||r||o.socket.remoteAddress;if(!n)returnnull;returnString(n)}catch(e){returnnull}})();try{letn=`🚀 SERVER ERROR ===========================