"use strict";(()=>{var a={};a.id=52,a.ids=[52],a.modules={21820:a=>{a.exports=require("os")},26220:function(a,b,c){var d=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(b,"__esModule",{value:!0}),b.OUTPUT_DIRECTORY=void 0;let e=d(c(21820));b.OUTPUT_DIRECTORY=d(c(33873)).default.resolve(e.default.homedir(),".scrabble-solver","logs")},33873:a=>{a.exports=require("path")},37271:(a,b,c)=>{c.r(b),c.d(b,{config:()=>p,default:()=>o,handler:()=>r});var d={};c.r(d),c.d(d,{default:()=>k});var e=c(61223),f=c(74600),g=c(4409),h=c(46440),i=c(57519),j=c(75494);let k=(a,b)=>{let c=(0,j.T)(a);try{i.logger.info("visit - request",{meta:c}),b.status(200).send(!0)}catch(d){let a=d instanceof Error?d.message:"Unknown error";i.logger.error("visit - error",{error:d,meta:c}),b.status(500).send({error:"Server error",message:a})}};var l=c(49275),m=c(30879),n=c(53373);let o=(0,h.M)(d,"default"),p=(0,h.M)(d,"config"),q=new g.PagesAPIRouteModule({definition:{kind:f.A.PAGES_API,page:"/api/visit",pathname:"/api/visit",bundlePath:"",filename:""},userland:d,distDir:".next",relativeProjectDir:""});async function r(a,b,c){c.requestMeta&&(0,n.setRequestMeta)(a,c.requestMeta),q.isDev&&(0,n.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/visit",f=await q.prepare(a,b,{srcPage:d});if(!f){b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve());return}let{query:g,params:h,prerenderManifest:i,routerServerContext:j}=f;try{let c,e=a.method||"GET",f=(0,l.getTracer)(),k=f.getActiveScopeSpan(),n=!!(null==j?void 0:j.isWrappedByNextServer),o=q.instrumentationOnRequestError.bind(q),p=async k=>q.render(a,b,{query:{...g,...h},params:h,allowedRevalidateHeaderKeys:[],multiZoneDraftMode:!1,trustHostHeader:!1,previewProps:i.preview,propagateError:!1,dev:q.isDev,page:"/api/visit",internalRevalidate:null==j?void 0:j.revalidate,onError:(...b)=>o(a,...b)}).finally(()=>{if(!k)return;k.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=f.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==m.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let g=a.get("next.route");if(g){let a=`${e} ${g}`;k.setAttributes({"next.route":g,"http.route":g,"next.span_name":a}),k.updateName(a),c&&c!==k&&(c.setAttribute("http.route",g),c.updateName(a))}else k.updateName(`${e} ${d}`)});n&&k?await p(k):(c=f.getActiveScopeSpan(),await f.withPropagatedContext(a.headers,()=>f.trace(m.BaseServerSpan.handleRequest,{spanName:`${e} ${d}`,kind:l.SpanKind.SERVER,attributes:{"http.method":e,"http.target":a.url}},p),void 0,!n))}catch(a){if(q.isDev)throw a;(0,e.sendError)(b,500,"Internal Server Error")}finally{null==c.waitUntil||c.waitUntil.call(c,Promise.resolve())}}},51513:function(a,b,c){var d=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(b,"__esModule",{value:!0}),b.logger=void 0;let e=d(c(33873)),f=c(55124),g=c(26220);b.logger=(0,f.createLogger)({level:"info",format:f.format.combine(f.format.timestamp({format:"YYYY-MM-DD HH:mm:ss"}),f.format.errors({stack:!0}),f.format.splat(),f.format.json(),f.format.prettyPrint()),transports:[new f.transports.File({filename:e.default.resolve(g.OUTPUT_DIRECTORY,"error.log"),level:"error"}),new f.transports.File({filename:e.default.resolve(g.OUTPUT_DIRECTORY,"all.log")}),new f.transports.Console({format:f.format.combine(f.format.colorize(),f.format.simple()),level:"error"})]})},55124:a=>{a.exports=require("winston")},57519:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),b.logger=void 0;var d=c(51513);Object.defineProperty(b,"logger",{enumerable:!0,get:function(){return d.logger}})},75494:(a,b,c)=>{c.d(b,{T:()=>d});let d=a=>({origin:a.headers.origin,referer:a.headers.referer,userAgent:a.headers["user-agent"],xForwardedFor:a.headers["x-forwarded-for"],xRealIp:a.headers["x-real-ip"]})},75600:a=>{a.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")}};var b=require("../../webpack-api-runtime.js");b.C(a);var c=b.X(0,[671],()=>b(b.s=37271));module.exports=c})();