"use strict";(()=>{var e={};e.id=1863,e.ids=[1863],e.modules={145:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},6705:e=>{e.exports=import("formidable")},3292:e=>{e.exports=require("fs/promises")},1017:e=>{e.exports=require("path")},2333:(e,r,i)=>{i.a(e,async(e,a)=>{try{i.r(r),i.d(r,{config:()=>c,default:()=>p,routeModule:()=>l});var t=i(1802),s=i(7153),n=i(8781),o=i(548),d=e([o]);o=(d.then?(await d)():d)[0];let p=(0,n.l)(o,"default"),c=(0,n.l)(o,"config"),l=new t.PagesAPIRouteModule({definition:{kind:s.x.PAGES_API,page:"/api/signituresprocessor",pathname:"/api/signituresprocessor",bundlePath:"",filename:""},userland:o});a()}catch(e){a(e)}})},548:(e,r,i)=>{i.a(e,async(e,a)=>{try{i.r(r),i.d(r,{config:()=>c,default:()=>u});var t=i(6705),s=i(1017),n=i.n(s),o=i(3292),d=i.n(o),p=e([t]);t=(p.then?(await p)():p)[0];let c={api:{bodyParser:!1}},l="",readFile=(e,r)=>{let i={};r&&(i.uploadDir=n().join(process.cwd(),"/public/signitures"),i.filename=(e,r,i,a)=>l=Date.now().toString()+"_"+i.originalFilename);let a=(0,t.default)(i);return new Promise((r,i)=>{a.parse(e,(e,a,t)=>{e&&i(e),r({fields:a,files:t})})})},handler=async(e,r)=>{try{await d().readdir(n().join(process.cwd()+"/public","/signitures"))}catch(e){await d().mkdir(n().join(process.cwd()+"/public","/signitures"))}await readFile(e,!0),r.json({done:l})},u=handler;a()}catch(e){a(e)}})}};var r=require("../../webpack-api-runtime.js");r.C(e);var __webpack_exec__=e=>r(r.s=e),i=r.X(0,[4222],()=>__webpack_exec__(2333));module.exports=i})();