Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix reporting when performance.measure doesn't exist (Edge) (#64669)
- Loading branch information
5221435
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stats from current release
Default Build (Increase detected⚠️ )
General Overall increase⚠️
Client Bundles (main, webpack) Overall increase⚠️
Legacy Client Bundles (polyfills)
Client Pages
Client Build Manifests
Rendered Page Sizes
Edge SSR bundle Size
Middleware size
Next Runtimes Overall increase⚠️
build cache Overall increase⚠️
Diff details
Diff for page.js
Diff too large to display
Diff for middleware.js
Diff too large to display
Diff for edge-ssr.js
Diff too large to display
Diff for _app-HASH.js
Diff for _error-HASH.js
Diff for amp-HASH.js
Diff for css-HASH.js
Diff for dynamic-HASH.js
Diff for edge-ssr-HASH.js
Diff for head-HASH.js
Diff for hooks-HASH.js
Diff for image-HASH.js
Diff for index-HASH.js
Diff for link-HASH.js
Diff for routerDirect-HASH.js
Diff for script-HASH.js
Diff for withRouter-HASH.js
Diff for 2453-HASH.js
Diff too large to display
Diff for 3304.HASH.js
Diff for 3f784ff6-HASH.js
Diff for 8299-HASH.js
Diff for framework-HASH.js
Diff for main-HASH.js
Diff too large to display
Diff for main-app-HASH.js
Diff for webpack-HASH.js
Diff for app-page-exp..ntime.dev.js
Diff for app-page-exp..time.prod.js
Diff too large to display
Diff for app-page-tur..time.prod.js
Diff too large to display
Diff for app-page-tur..time.prod.js
Diff too large to display
Diff for app-page.runtime.dev.js
Diff for app-page.runtime.prod.js
Diff too large to display
Diff for app-route-ex..ntime.dev.js
Diff too large to display
Diff for app-route-ex..time.prod.js
Diff too large to display
Diff for app-route-tu..time.prod.js
Diff too large to display
Diff for app-route-tu..time.prod.js
Diff too large to display
Diff for app-route.runtime.dev.js
Diff too large to display
Diff for app-route.ru..time.prod.js
Diff too large to display
Diff for pages-api-tu..time.prod.js
@@ -17,5 +17,5 @@ * Copyright(c) 2012 TJ Holowaychuk * Copyright(c) 2016-2017 Douglas Christopher Wilson * MIT Licensed - */var t=/(?:^|,)\s*?no-cache\s*?(?:,|$)/;function r(e){var t=e&&Date.parse(e);return"number"==typeof t?t:NaN}e.exports=function(e,n){var o=e["if-modified-since"],i=e["if-none-match"];if(!o&&!i)return!1;var a=e["cache-control"];if(a&&t.test(a))return!1;if(i&&"*"!==i){var s=n.etag;if(!s)return!1;for(var d=!0,p=function(e){for(var t=0,r=[],n=0,o=0,i=e.length;o<i;o++)switch(e.charCodeAt(o)){case 32:n===t&&(n=t=o+1);break;case 44:r.push(e.substring(n,t)),n=t=o+1;break;default:t=o+1}return r.push(e.substring(n,t)),r}(i),u=0;u<p.length;u++){var l=p[u];if(l===s||l==="W/"+s||"W/"+l===s){d=!1;break}}if(d)return!1}if(o){var c=n["last-modified"];if(!c||!(r(c)<=r(o)))return!1}return!0}}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}},a=!0;try{t[e](i,i.exports,n),a=!1}finally{a&&delete r[e]}return i.exports}n.ab=__dirname+"/";var o=n(695);e.exports=o})()},"./dist/esm/server/crypto-utils.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{decryptWithSecret:()=>s,encryptWithSecret:()=>a});let n=require("crypto");var o=r.n(n);let i="aes-256-gcm";function a(e,t){let r=o().randomBytes(16),n=o().randomBytes(64),a=o().pbkdf2Sync(e,n,1e5,32,"sha512"),s=o().createCipheriv(i,a,r),d=Buffer.concat([s.update(t,"utf8"),s.final()]),p=s.getAuthTag();return Buffer.concat([n,r,p,d]).toString("hex")}function s(e,t){let r=Buffer.from(t,"hex"),n=r.slice(0,64),a=r.slice(64,80),s=r.slice(80,96),d=r.slice(96),p=o().pbkdf2Sync(e,n,1e5,32,"sha512"),u=o().createDecipheriv(i,p,a);return u.setAuthTag(s),u.update(d)+u.final("utf8")}},"next/dist/compiled/jsonwebtoken":e=>{"use strict";e.exports=require("next/dist/compiled/jsonwebtoken")},"next/dist/compiled/node-html-parser":e=>{"use strict";e.exports=require("next/dist/compiled/node-html-parser")},"next/dist/compiled/raw-body":e=>{"use strict";e.exports=require("next/dist/compiled/raw-body")},querystring:e=>{"use strict";e.exports=require("querystring")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{PagesAPIRouteModule:()=>U,default:()=>F});class e{static get(e,t,r){let n=Reflect.get(e,t,r);return"function"==typeof n?n.bind(e):n}static set(e,t,r,n){return Reflect.set(e,t,r,n)}static has(e,t){return Reflect.has(e,t)}static deleteProperty(e,t){return Reflect.deleteProperty(e,t)}}class t extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new t}}class o extends Headers{constructor(t){super(),this.headers=new Proxy(t,{get(r,n,o){if("symbol"==typeof n)return e.get(r,n,o);let i=n.toLowerCase(),a=Object.keys(t).find(e=>e.toLowerCase()===i);if(void 0!==a)return e.get(r,a,o)},set(r,n,o,i){if("symbol"==typeof n)return e.set(r,n,o,i);let a=n.toLowerCase(),s=Object.keys(t).find(e=>e.toLowerCase()===a);return e.set(r,s??n,o,i)},has(r,n){if("symbol"==typeof n)return e.has(r,n);let o=n.toLowerCase(),i=Object.keys(t).find(e=>e.toLowerCase()===o);return void 0!==i&&e.has(r,i)},deleteProperty(r,n){if("symbol"==typeof n)return e.deleteProperty(r,n);let o=n.toLowerCase(),i=Object.keys(t).find(e=>e.toLowerCase()===o);return void 0===i||e.deleteProperty(r,i)}})}static seal(r){return new Proxy(r,{get(r,n,o){switch(n){case"append":case"delete":case"set":return t.callable;default:return e.get(r,n,o)}}})}merge(e){return Array.isArray(e)?e.join(", "):e}static from(e){return e instanceof Headers?e:new o(e)}append(e,t){let r=this.headers[e];"string"==typeof r?this.headers[e]=[r,t]:Array.isArray(r)?r.push(t):this.headers[e]=t}delete(e){delete this.headers[e]}get(e){let t=this.headers[e];return void 0!==t?this.merge(t):null}has(e){return void 0!==this.headers[e]}set(e,t){this.headers[e]=t}forEach(e,t){for(let[r,n]of this.entries())e.call(t,n,r,this)}*entries(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase(),r=this.get(t);yield[t,r]}}*keys(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase();yield t}}*values(){for(let e of Object.keys(this.headers)){let t=this.get(e);yield t}}[Symbol.iterator](){return this.entries()}}let i="x-prerender-revalidate",a="x-prerender-revalidate-if-generated",s={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",api:"api",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",appMetadataRoute:"app-metadata-route",appRouteHandler:"app-route-handler"};({...s,GROUP:{serverOnly:[s.reactServerComponents,s.actionBrowser,s.appMetadataRoute,s.appRouteHandler,s.instrument],clientOnly:[s.serverSideRendering,s.appPagesBrowser,s.shared],nonClientServerTarget:[s.middleware,s.api],app:[s.reactServerComponents,s.actionBrowser,s.appMetadataRoute,s.appRouteHandler,s.serverSideRendering,s.appPagesBrowser,s.shared,s.instrument]}});let d=require("next/dist/server/lib/trace/tracer");(function(e){e.handleRequest="BaseServer.handleRequest",e.run="BaseServer.run",e.pipe="BaseServer.pipe",e.getStaticHTML="BaseServer.getStaticHTML",e.render="BaseServer.render",e.renderToResponseWithComponents="BaseServer.renderToResponseWithComponents",e.renderToResponse="BaseServer.renderToResponse",e.renderToHTML="BaseServer.renderToHTML",e.renderError="BaseServer.renderError",e.renderErrorToResponse="BaseServer.renderErrorToResponse",e.renderErrorToHTML="BaseServer.renderErrorToHTML",e.render404="BaseServer.render404"})(y||(y={})),function(e){e.loadDefaultErrorComponents="LoadComponents.loadDefaultErrorComponents",e.loadComponents="LoadComponents.loadComponents"}(x||(x={})),function(e){e.getRequestHandler="NextServer.getRequestHandler",e.getServer="NextServer.getServer",e.getServerRequestHandler="NextServer.getServerRequestHandler",e.createServer="createServer.createServer"}(b||(b={})),function(e){e.compression="NextNodeServer.compression",e.getBuildId="NextNodeServer.getBuildId",e.createComponentTree="NextNodeServer.createComponentTree",e.clientComponentLoading="NextNodeServer.clientComponentLoading",e.getLayoutOrPageModule="NextNodeServer.getLayoutOrPageModule",e.generateStaticRoutes="NextNodeServer.generateStaticRoutes",e.generateFsStaticRoutes="NextNodeServer.generateFsStaticRoutes",e.generatePublicRoutes="NextNodeServer.generatePublicRoutes",e.generateImageRoutes="NextNodeServer.generateImageRoutes.route",e.sendRenderResult="NextNodeServer.sendRenderResult",e.proxyRequest="NextNodeServer.proxyRequest",e.runApi="NextNodeServer.runApi",e.render="NextNodeServer.render",e.renderHTML="NextNodeServer.renderHTML",e.imageOptimizer="NextNodeServer.imageOptimizer",e.getPagePath="NextNodeServer.getPagePath",e.getRoutesManifest="NextNodeServer.getRoutesManifest",e.findPageComponents="NextNodeServer.findPageComponents",e.getFontManifest="NextNodeServer.getFontManifest",e.getServerComponentManifest="NextNodeServer.getServerComponentManifest",e.getRequestHandler="NextNodeServer.getRequestHandler",e.renderToHTML="NextNodeServer.renderToHTML",e.renderError="NextNodeServer.renderError",e.renderErrorToHTML="NextNodeServer.renderErrorToHTML",e.render404="NextNodeServer.render404",e.startResponse="NextNodeServer.startResponse",e.route="route",e.onProxyReq="onProxyReq",e.apiResolver="apiResolver",e.internalFetch="internalFetch"}(w||(w={})),(S||(S={})).startServer="startServer.startServer",function(e){e.getServerSideProps="Render.getServerSideProps",e.getStaticProps="Render.getStaticProps",e.renderToString="Render.renderToString",e.renderDocument="Render.renderDocument",e.createBodyResult="Render.createBodyResult"}(R||(R={})),function(e){e.renderToString="AppRender.renderToString",e.renderToReadableStream="AppRender.renderToReadableStream",e.getBodyResult="AppRender.getBodyResult",e.fetch="AppRender.fetch"}(C||(C={})),(N||(N={})).executeRoute="Router.executeRoute",(j||(j={})).runHandler="Node.runHandler",(T||(T={})).runHandler="AppRouteRouteHandlers.runHandler",function(e){e.generateMetadata="ResolveMetadata.generateMetadata",e.generateViewport="ResolveMetadata.generateViewport"}(_||(_={})),(A||(A={})).execute="Middleware.execute";let p="__prerender_bypass",u="__next_preview_data",l=Symbol(u),c=Symbol(p);function f(e,t={}){if(c in e)return e;let{serialize:n}=r("./dist/compiled/cookie/index.js"),o=e.getHeader("Set-Cookie");return e.setHeader("Set-Cookie",[..."string"==typeof o?[o]:Array.isArray(o)?o:[],n(p,"",{expires:new Date(0),httpOnly:!0,sameSite:"none",secure:!0,path:"/",...void 0!==t.path?{path:t.path}:void 0}),n(u,"",{expires:new Date(0),httpOnly:!0,sameSite:"none",secure:!0,path:"/",...void 0!==t.path?{path:t.path}:void 0})]),Object.defineProperty(e,c,{value:!0,enumerable:!1}),e}class h extends Error{constructor(e,t){super(t),this.statusCode=e}}function m(e,t,r){e.statusCode=t,e.statusMessage=r,e.end(r)}function v({req:e},t,r){let n={configurable:!0,enumerable:!0},o={...n,writable:!0};Object.defineProperty(e,t,{...n,get:()=>{let n=r();return Object.defineProperty(e,t,{...o,value:n}),n},set:r=>{Object.defineProperty(e,t,{...o,value:r})}})}class g{constructor({userland:e,definition:t}){this.userland=e,this.definition=t}}var y,x,b,w,S,R,C,N,j,T,_,A,H=r("./dist/compiled/bytes/index.js"),O=r.n(H);let M=e=>{let t=e.length,r=0,n=0,o=8997,i=0,a=33826,s=0,d=40164,p=0,u=52210;for(;r<t;)o^=e.charCodeAt(r++),n=435*o,i=435*a,s=435*d,p=435*u,s+=o<<8,p+=a<<8,i+=n>>>16,o=65535&n,s+=i>>>16,a=65535&i,u=p+(s>>>16)&65535,d=65535&s;return(15&u)*281474976710656+4294967296*d+65536*a+(o^u>>4)},P=(e,t=!1)=>(t?'W/"':'"')+M(e).toString(36)+e.length.toString(36)+'"';"undefined"!=typeof performance&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);var k=r("./dist/compiled/fresh/index.js"),E=r.n(k);let L=require("stream");function B(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}var q=r("./dist/compiled/@edge-runtime/cookies/index.js"),$=r("./dist/compiled/content-type/index.js");async function I(e,t){let n,o;try{n=(0,$.parse)(e.headers["content-type"]||"text/plain")}catch{n=(0,$.parse)("text/plain")}let{type:i,parameters:a}=n,s=a.charset||"utf-8";try{let n=r("next/dist/compiled/raw-body");o=await n(e,{encoding:s,limit:t})}catch(e){if(B(e)&&"entity.too.large"===e.type)throw new h(413,`Body exceeded ${t} limit`);throw new h(400,"Invalid body")}let d=o.toString();return"application/json"===i||"application/ld+json"===i?function(e){if(0===e.length)return{};try{return JSON.parse(e)}catch(e){throw new h(400,"Invalid JSON")}}(d):"application/x-www-form-urlencoded"===i?r("querystring").decode(d):d}function D(e){return"string"==typeof e&&e.length>=16}async function z(e,t,r,n){if("string"!=typeof e||!e.startsWith("/"))throw Error(`Invalid urlPath provided to revalidate(), must be a path e.g. /blog/post-1, received ${e}`);let o={[i]:n.previewModeId,...t.unstable_onlyGenerated?{[a]:"1"}:{}},s=[...n.allowedRevalidateHeaderKeys||[],...n.trustHostHeader?["cookie","x-vercel-protection-bypass"]:[]];for(let e of Object.keys(r.headers))s.includes(e)&&(o[e]=r.headers[e]);try{if(n.trustHostHeader){let n=await fetch(`https://${r.headers.host}${e}`,{method:"HEAD",headers:o}),i=n.headers.get("x-vercel-cache")||n.headers.get("x-nextjs-cache");if((null==i?void 0:i.toUpperCase())!=="REVALIDATED"&&!(404===n.status&&t.unstable_onlyGenerated))throw Error(`Invalid response ${n.status}`)}else if(n.revalidate)await n.revalidate({urlPath:e,revalidateHeaders:o,opts:t});else throw Error("Invariant: required internal revalidate method not passed to api-utils")}catch(t){throw Error(`Failed to revalidate ${e}: ${B(t)?t.message:t}`)}}async function K(e,t,n,s,d,c,g,y){try{var x,b,w,S;if(!s){t.statusCode=404,t.end("Not Found");return}let c=s.config||{},h=(null==(x=c.api)?void 0:x.bodyParser)!==!1,m=(null==(b=c.api)?void 0:b.responseLimit)??!0;null==(w=c.api)||w.externalResolver,v({req:e},"cookies",(S=e.headers,function(){let{cookie:e}=S;if(!e)return{};let{parse:t}=r("./dist/compiled/cookie/index.js");return t(Array.isArray(e)?e.join("; "):e)})),e.query=n,v({req:e},"previewData",()=>(function(e,t,n){var s,d;let c;if(n&&function(e,t){let r=o.from(e.headers);return{isOnDemandRevalidate:r.get(i)===t.previewModeId,revalidateOnlyGenerated:r.has(a)}}(e,n).isOnDemandRevalidate)return!1;if(l in e)return e[l];let h=o.from(e.headers),m=new q.RequestCookies(h),v=null==(s=m.get(p))?void 0:s.value,g=null==(d=m.get(u))?void 0:d.value;if(v&&!g&&v===n.previewModeId){let t={};return Object.defineProperty(e,l,{value:t,enumerable:!1}),t}if(!v&&!g)return!1;if(!v||!g||v!==n.previewModeId)return f(t),!1;try{c=r("next/dist/compiled/jsonwebtoken").verify(g,n.previewModeSigningKey)}catch{return f(t),!1}let{decryptWithSecret:y}=r("./dist/esm/server/crypto-utils.js"),x=y(Buffer.from(n.previewModeEncryptionKey),c.data);try{let t=JSON.parse(x);return Object.defineProperty(e,l,{value:t,enumerable:!1}),t}catch{return!1}})(e,t,d)),v({req:e},"preview",()=>!1!==e.previewData||void 0),v({req:e},"draftMode",()=>e.preview),h&&!e.body&&(e.body=await I(e,c.api&&c.api.bodyParser&&c.api.bodyParser.sizeLimit?c.api.bodyParser.sizeLimit:"1mb"));let g=0,y=m&&"boolean"!=typeof m?O().parse(m):4194304,R=t.write,C=t.end;t.write=(...e)=>(g+=Buffer.byteLength(e[0]||""),R.apply(t,e)),t.end=(...r)=>(r.length&&"function"!=typeof r[0]&&(g+=Buffer.byteLength(r[0]||"")),m&&g>=y&&console.warn(`API response for ${e.url} exceeds ${O().format(y)}. API Routes are meant to respond quickly. https://nextjs.org/docs/messages/api-routes-response-size-limit`),C.apply(t,r)),t.status=e=>(t.statusCode=e,t),t.send=r=>(function(e,t,r){var n;if(null==r){t.end();return}if(204===t.statusCode||304===t.statusCode){t.removeHeader("Content-Type"),t.removeHeader("Content-Length"),t.removeHeader("Transfer-Encoding"),t.end();return}let o=t.getHeader("Content-Type");if(r instanceof L.Stream){o||t.setHeader("Content-Type","application/octet-stream"),r.pipe(t);return}let i=["object","number","boolean"].includes(typeof r),a=i?JSON.stringify(r):r;if((n=P(a))&&t.setHeader("ETag",n),!E()(e.headers,{etag:n})||(t.statusCode=304,t.end(),0)){if(Buffer.isBuffer(r)){o||t.setHeader("Content-Type","application/octet-stream"),t.setHeader("Content-Length",r.length),t.end(r);return}i&&t.setHeader("Content-Type","application/json; charset=utf-8"),t.setHeader("Content-Length",Buffer.byteLength(a)),t.end(a)}})(e,t,r),t.json=e=>{t.setHeader("Content-Type","application/json; charset=utf-8"),t.send(JSON.stringify(e))},t.redirect=(e,r)=>(function(e,t,r){if("string"==typeof t&&(r=t,t=307),"number"!=typeof t||"string"!=typeof r)throw Error("Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').");return e.writeHead(t,{Location:r}),e.write(r),e.end(),e})(t,e,r),t.setDraftMode=(e={enable:!0})=>(function(e,t){if(!D(t.previewModeId))throw Error("invariant: invalid previewModeId");let n=t.enable?void 0:new Date(0),{serialize:o}=r("./dist/compiled/cookie/index.js"),i=e.getHeader("Set-Cookie");return e.setHeader("Set-Cookie",[..."string"==typeof i?[i]:Array.isArray(i)?i:[],o(p,t.previewModeId,{httpOnly:!0,sameSite:"none",secure:!0,path:"/",expires:n})]),e})(t,Object.assign({},d,e)),t.setPreviewData=(e,n={})=>(function(e,t,n){if(!D(n.previewModeId))throw Error("invariant: invalid previewModeId");if(!D(n.previewModeEncryptionKey))throw Error("invariant: invalid previewModeEncryptionKey");if(!D(n.previewModeSigningKey))throw Error("invariant: invalid previewModeSigningKey");let o=r("next/dist/compiled/jsonwebtoken"),{encryptWithSecret:i}=r("./dist/esm/server/crypto-utils.js"),a=o.sign({data:i(Buffer.from(n.previewModeEncryptionKey),JSON.stringify(t))},n.previewModeSigningKey,{algorithm:"HS256",...void 0!==n.maxAge?{expiresIn:n.maxAge}:void 0});if(a.length>2048)throw Error("Preview data is limited to 2KB currently, reduce how much data you are storing as preview data to continue");let{serialize:s}=r("./dist/compiled/cookie/index.js"),d=e.getHeader("Set-Cookie");return e.setHeader("Set-Cookie",[..."string"==typeof d?[d]:Array.isArray(d)?d:[],s(p,n.previewModeId,{httpOnly:!0,sameSite:"none",secure:!0,path:"/",...void 0!==n.maxAge?{maxAge:n.maxAge}:void 0,...void 0!==n.path?{path:n.path}:void 0}),s(u,a,{httpOnly:!0,sameSite:"none",secure:!0,path:"/",...void 0!==n.maxAge?{maxAge:n.maxAge}:void 0,...void 0!==n.path?{path:n.path}:void 0})]),e})(t,e,Object.assign({},d,n)),t.clearPreviewData=(e={})=>f(t,e),t.revalidate=(t,r)=>z(t,r||{},e,d);let N=s.default||s;await N(e,t)}catch(e){if(e instanceof h)m(t,e.statusCode,e.message);else{if(g)throw B(e)&&(e.page=y),e;if(console.error(e),c)throw e;m(t,500,"Internal Server Error")}}}class U extends g{constructor(e){if(super(e),"function"!=typeof e.userland.default)throw Error(`Page ${e.definition.page} does not export a default function.`);this.apiResolverWrapped=function(e,t){return(...r)=>{var n;return null==(n=(0,d.getTracer)().getRootSpanAttributes())||n.set("next.route",e),(0,d.getTracer)().trace(j.runHandler,{spanName:`executing api route (pages) ${e}`},()=>t(...r))}}(e.definition.page,K)}async render(e,t,r){let{apiResolverWrapped:n}=this;await n(e,t,r.query,this.userland,{...r.previewProps,revalidate:r.revalidate,trustHostHeader:r.trustHostHeader,allowedRevalidateHeaderKeys:r.allowedRevalidateHeaderKeys,hostname:r.hostname},r.minimalMode,r.dev,r.page)}}let F=U})(),module.exports=n})(); + */var t=/(?:^|,)\s*?no-cache\s*?(?:,|$)/;function r(e){var t=e&&Date.parse(e);return"number"==typeof t?t:NaN}e.exports=function(e,n){var o=e["if-modified-since"],i=e["if-none-match"];if(!o&&!i)return!1;var a=e["cache-control"];if(a&&t.test(a))return!1;if(i&&"*"!==i){var s=n.etag;if(!s)return!1;for(var d=!0,p=function(e){for(var t=0,r=[],n=0,o=0,i=e.length;o<i;o++)switch(e.charCodeAt(o)){case 32:n===t&&(n=t=o+1);break;case 44:r.push(e.substring(n,t)),n=t=o+1;break;default:t=o+1}return r.push(e.substring(n,t)),r}(i),u=0;u<p.length;u++){var l=p[u];if(l===s||l==="W/"+s||"W/"+l===s){d=!1;break}}if(d)return!1}if(o){var c=n["last-modified"];if(!c||!(r(c)<=r(o)))return!1}return!0}}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}},a=!0;try{t[e](i,i.exports,n),a=!1}finally{a&&delete r[e]}return i.exports}n.ab=__dirname+"/";var o=n(695);e.exports=o})()},"./dist/esm/server/crypto-utils.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{decryptWithSecret:()=>s,encryptWithSecret:()=>a});let n=require("crypto");var o=r.n(n);let i="aes-256-gcm";function a(e,t){let r=o().randomBytes(16),n=o().randomBytes(64),a=o().pbkdf2Sync(e,n,1e5,32,"sha512"),s=o().createCipheriv(i,a,r),d=Buffer.concat([s.update(t,"utf8"),s.final()]),p=s.getAuthTag();return Buffer.concat([n,r,p,d]).toString("hex")}function s(e,t){let r=Buffer.from(t,"hex"),n=r.slice(0,64),a=r.slice(64,80),s=r.slice(80,96),d=r.slice(96),p=o().pbkdf2Sync(e,n,1e5,32,"sha512"),u=o().createDecipheriv(i,p,a);return u.setAuthTag(s),u.update(d)+u.final("utf8")}},"next/dist/compiled/jsonwebtoken":e=>{"use strict";e.exports=require("next/dist/compiled/jsonwebtoken")},"next/dist/compiled/node-html-parser":e=>{"use strict";e.exports=require("next/dist/compiled/node-html-parser")},"next/dist/compiled/raw-body":e=>{"use strict";e.exports=require("next/dist/compiled/raw-body")},querystring:e=>{"use strict";e.exports=require("querystring")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{PagesAPIRouteModule:()=>U,default:()=>F});class e{static get(e,t,r){let n=Reflect.get(e,t,r);return"function"==typeof n?n.bind(e):n}static set(e,t,r,n){return Reflect.set(e,t,r,n)}static has(e,t){return Reflect.has(e,t)}static deleteProperty(e,t){return Reflect.deleteProperty(e,t)}}class t extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new t}}class o extends Headers{constructor(t){super(),this.headers=new Proxy(t,{get(r,n,o){if("symbol"==typeof n)return e.get(r,n,o);let i=n.toLowerCase(),a=Object.keys(t).find(e=>e.toLowerCase()===i);if(void 0!==a)return e.get(r,a,o)},set(r,n,o,i){if("symbol"==typeof n)return e.set(r,n,o,i);let a=n.toLowerCase(),s=Object.keys(t).find(e=>e.toLowerCase()===a);return e.set(r,s??n,o,i)},has(r,n){if("symbol"==typeof n)return e.has(r,n);let o=n.toLowerCase(),i=Object.keys(t).find(e=>e.toLowerCase()===o);return void 0!==i&&e.has(r,i)},deleteProperty(r,n){if("symbol"==typeof n)return e.deleteProperty(r,n);let o=n.toLowerCase(),i=Object.keys(t).find(e=>e.toLowerCase()===o);return void 0===i||e.deleteProperty(r,i)}})}static seal(r){return new Proxy(r,{get(r,n,o){switch(n){case"append":case"delete":case"set":return t.callable;default:return e.get(r,n,o)}}})}merge(e){return Array.isArray(e)?e.join(", "):e}static from(e){return e instanceof Headers?e:new o(e)}append(e,t){let r=this.headers[e];"string"==typeof r?this.headers[e]=[r,t]:Array.isArray(r)?r.push(t):this.headers[e]=t}delete(e){delete this.headers[e]}get(e){let t=this.headers[e];return void 0!==t?this.merge(t):null}has(e){return void 0!==this.headers[e]}set(e,t){this.headers[e]=t}forEach(e,t){for(let[r,n]of this.entries())e.call(t,n,r,this)}*entries(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase(),r=this.get(t);yield[t,r]}}*keys(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase();yield t}}*values(){for(let e of Object.keys(this.headers)){let t=this.get(e);yield t}}[Symbol.iterator](){return this.entries()}}let i="x-prerender-revalidate",a="x-prerender-revalidate-if-generated",s={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",api:"api",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",appMetadataRoute:"app-metadata-route",appRouteHandler:"app-route-handler"};({...s,GROUP:{serverOnly:[s.reactServerComponents,s.actionBrowser,s.appMetadataRoute,s.appRouteHandler,s.instrument],clientOnly:[s.serverSideRendering,s.appPagesBrowser],nonClientServerTarget:[s.middleware,s.api],app:[s.reactServerComponents,s.actionBrowser,s.appMetadataRoute,s.appRouteHandler,s.serverSideRendering,s.appPagesBrowser,s.shared,s.instrument]}});let d=require("next/dist/server/lib/trace/tracer");(function(e){e.handleRequest="BaseServer.handleRequest",e.run="BaseServer.run",e.pipe="BaseServer.pipe",e.getStaticHTML="BaseServer.getStaticHTML",e.render="BaseServer.render",e.renderToResponseWithComponents="BaseServer.renderToResponseWithComponents",e.renderToResponse="BaseServer.renderToResponse",e.renderToHTML="BaseServer.renderToHTML",e.renderError="BaseServer.renderError",e.renderErrorToResponse="BaseServer.renderErrorToResponse",e.renderErrorToHTML="BaseServer.renderErrorToHTML",e.render404="BaseServer.render404"})(y||(y={})),function(e){e.loadDefaultErrorComponents="LoadComponents.loadDefaultErrorComponents",e.loadComponents="LoadComponents.loadComponents"}(x||(x={})),function(e){e.getRequestHandler="NextServer.getRequestHandler",e.getServer="NextServer.getServer",e.getServerRequestHandler="NextServer.getServerRequestHandler",e.createServer="createServer.createServer"}(b||(b={})),function(e){e.compression="NextNodeServer.compression",e.getBuildId="NextNodeServer.getBuildId",e.createComponentTree="NextNodeServer.createComponentTree",e.clientComponentLoading="NextNodeServer.clientComponentLoading",e.getLayoutOrPageModule="NextNodeServer.getLayoutOrPageModule",e.generateStaticRoutes="NextNodeServer.generateStaticRoutes",e.generateFsStaticRoutes="NextNodeServer.generateFsStaticRoutes",e.generatePublicRoutes="NextNodeServer.generatePublicRoutes",e.generateImageRoutes="NextNodeServer.generateImageRoutes.route",e.sendRenderResult="NextNodeServer.sendRenderResult",e.proxyRequest="NextNodeServer.proxyRequest",e.runApi="NextNodeServer.runApi",e.render="NextNodeServer.render",e.renderHTML="NextNodeServer.renderHTML",e.imageOptimizer="NextNodeServer.imageOptimizer",e.getPagePath="NextNodeServer.getPagePath",e.getRoutesManifest="NextNodeServer.getRoutesManifest",e.findPageComponents="NextNodeServer.findPageComponents",e.getFontManifest="NextNodeServer.getFontManifest",e.getServerComponentManifest="NextNodeServer.getServerComponentManifest",e.getRequestHandler="NextNodeServer.getRequestHandler",e.renderToHTML="NextNodeServer.renderToHTML",e.renderError="NextNodeServer.renderError",e.renderErrorToHTML="NextNodeServer.renderErrorToHTML",e.render404="NextNodeServer.render404",e.startResponse="NextNodeServer.startResponse",e.route="route",e.onProxyReq="onProxyReq",e.apiResolver="apiResolver",e.internalFetch="internalFetch"}(w||(w={})),(S||(S={})).startServer="startServer.startServer",function(e){e.getServerSideProps="Render.getServerSideProps",e.getStaticProps="Render.getStaticProps",e.renderToString="Render.renderToString",e.renderDocument="Render.renderDocument",e.createBodyResult="Render.createBodyResult"}(R||(R={})),function(e){e.renderToString="AppRender.renderToString",e.renderToReadableStream="AppRender.renderToReadableStream",e.getBodyResult="AppRender.getBodyResult",e.fetch="AppRender.fetch"}(C||(C={})),(N||(N={})).executeRoute="Router.executeRoute",(j||(j={})).runHandler="Node.runHandler",(T||(T={})).runHandler="AppRouteRouteHandlers.runHandler",function(e){e.generateMetadata="ResolveMetadata.generateMetadata",e.generateViewport="ResolveMetadata.generateViewport"}(_||(_={})),(A||(A={})).execute="Middleware.execute";let p="__prerender_bypass",u="__next_preview_data",l=Symbol(u),c=Symbol(p);function f(e,t={}){if(c in e)return e;let{serialize:n}=r("./dist/compiled/cookie/index.js"),o=e.getHeader("Set-Cookie");return e.setHeader("Set-Cookie",[..."string"==typeof o?[o]:Array.isArray(o)?o:[],n(p,"",{expires:new Date(0),httpOnly:!0,sameSite:"none",secure:!0,path:"/",...void 0!==t.path?{path:t.path}:void 0}),n(u,"",{expires:new Date(0),httpOnly:!0,sameSite:"none",secure:!0,path:"/",...void 0!==t.path?{path:t.path}:void 0})]),Object.defineProperty(e,c,{value:!0,enumerable:!1}),e}class h extends Error{constructor(e,t){super(t),this.statusCode=e}}function m(e,t,r){e.statusCode=t,e.statusMessage=r,e.end(r)}function v({req:e},t,r){let n={configurable:!0,enumerable:!0},o={...n,writable:!0};Object.defineProperty(e,t,{...n,get:()=>{let n=r();return Object.defineProperty(e,t,{...o,value:n}),n},set:r=>{Object.defineProperty(e,t,{...o,value:r})}})}class g{constructor({userland:e,definition:t}){this.userland=e,this.definition=t}}var y,x,b,w,S,R,C,N,j,T,_,A,H=r("./dist/compiled/bytes/index.js"),O=r.n(H);let M=e=>{let t=e.length,r=0,n=0,o=8997,i=0,a=33826,s=0,d=40164,p=0,u=52210;for(;r<t;)o^=e.charCodeAt(r++),n=435*o,i=435*a,s=435*d,p=435*u,s+=o<<8,p+=a<<8,i+=n>>>16,o=65535&n,s+=i>>>16,a=65535&i,u=p+(s>>>16)&65535,d=65535&s;return(15&u)*281474976710656+4294967296*d+65536*a+(o^u>>4)},P=(e,t=!1)=>(t?'W/"':'"')+M(e).toString(36)+e.length.toString(36)+'"';"undefined"!=typeof performance&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);var k=r("./dist/compiled/fresh/index.js"),E=r.n(k);let L=require("stream");function B(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}var q=r("./dist/compiled/@edge-runtime/cookies/index.js"),$=r("./dist/compiled/content-type/index.js");async function I(e,t){let n,o;try{n=(0,$.parse)(e.headers["content-type"]||"text/plain")}catch{n=(0,$.parse)("text/plain")}let{type:i,parameters:a}=n,s=a.charset||"utf-8";try{let n=r("next/dist/compiled/raw-body");o=await n(e,{encoding:s,limit:t})}catch(e){if(B(e)&&"entity.too.large"===e.type)throw new h(413,`Body exceeded ${t} limit`);throw new h(400,"Invalid body")}let d=o.toString();return"application/json"===i||"application/ld+json"===i?function(e){if(0===e.length)return{};try{return JSON.parse(e)}catch(e){throw new h(400,"Invalid JSON")}}(d):"application/x-www-form-urlencoded"===i?r("querystring").decode(d):d}function D(e){return"string"==typeof e&&e.length>=16}async function z(e,t,r,n){if("string"!=typeof e||!e.startsWith("/"))throw Error(`Invalid urlPath provided to revalidate(), must be a path e.g. /blog/post-1, received ${e}`);let o={[i]:n.previewModeId,...t.unstable_onlyGenerated?{[a]:"1"}:{}},s=[...n.allowedRevalidateHeaderKeys||[],...n.trustHostHeader?["cookie","x-vercel-protection-bypass"]:[]];for(let e of Object.keys(r.headers))s.includes(e)&&(o[e]=r.headers[e]);try{if(n.trustHostHeader){let n=await fetch(`https://${r.headers.host}${e}`,{method:"HEAD",headers:o}),i=n.headers.get("x-vercel-cache")||n.headers.get("x-nextjs-cache");if((null==i?void 0:i.toUpperCase())!=="REVALIDATED"&&!(404===n.status&&t.unstable_onlyGenerated))throw Error(`Invalid response ${n.status}`)}else if(n.revalidate)await n.revalidate({urlPath:e,revalidateHeaders:o,opts:t});else throw Error("Invariant: required internal revalidate method not passed to api-utils")}catch(t){throw Error(`Failed to revalidate ${e}: ${B(t)?t.message:t}`)}}async function K(e,t,n,s,d,c,g,y){try{var x,b,w,S;if(!s){t.statusCode=404,t.end("Not Found");return}let c=s.config||{},h=(null==(x=c.api)?void 0:x.bodyParser)!==!1,m=(null==(b=c.api)?void 0:b.responseLimit)??!0;null==(w=c.api)||w.externalResolver,v({req:e},"cookies",(S=e.headers,function(){let{cookie:e}=S;if(!e)return{};let{parse:t}=r("./dist/compiled/cookie/index.js");return t(Array.isArray(e)?e.join("; "):e)})),e.query=n,v({req:e},"previewData",()=>(function(e,t,n){var s,d;let c;if(n&&function(e,t){let r=o.from(e.headers);return{isOnDemandRevalidate:r.get(i)===t.previewModeId,revalidateOnlyGenerated:r.has(a)}}(e,n).isOnDemandRevalidate)return!1;if(l in e)return e[l];let h=o.from(e.headers),m=new q.RequestCookies(h),v=null==(s=m.get(p))?void 0:s.value,g=null==(d=m.get(u))?void 0:d.value;if(v&&!g&&v===n.previewModeId){let t={};return Object.defineProperty(e,l,{value:t,enumerable:!1}),t}if(!v&&!g)return!1;if(!v||!g||v!==n.previewModeId)return f(t),!1;try{c=r("next/dist/compiled/jsonwebtoken").verify(g,n.previewModeSigningKey)}catch{return f(t),!1}let{decryptWithSecret:y}=r("./dist/esm/server/crypto-utils.js"),x=y(Buffer.from(n.previewModeEncryptionKey),c.data);try{let t=JSON.parse(x);return Object.defineProperty(e,l,{value:t,enumerable:!1}),t}catch{return!1}})(e,t,d)),v({req:e},"preview",()=>!1!==e.previewData||void 0),v({req:e},"draftMode",()=>e.preview),h&&!e.body&&(e.body=await I(e,c.api&&c.api.bodyParser&&c.api.bodyParser.sizeLimit?c.api.bodyParser.sizeLimit:"1mb"));let g=0,y=m&&"boolean"!=typeof m?O().parse(m):4194304,R=t.write,C=t.end;t.write=(...e)=>(g+=Buffer.byteLength(e[0]||""),R.apply(t,e)),t.end=(...r)=>(r.length&&"function"!=typeof r[0]&&(g+=Buffer.byteLength(r[0]||"")),m&&g>=y&&console.warn(`API response for ${e.url} exceeds ${O().format(y)}. API Routes are meant to respond quickly. https://nextjs.org/docs/messages/api-routes-response-size-limit`),C.apply(t,r)),t.status=e=>(t.statusCode=e,t),t.send=r=>(function(e,t,r){var n;if(null==r){t.end();return}if(204===t.statusCode||304===t.statusCode){t.removeHeader("Content-Type"),t.removeHeader("Content-Length"),t.removeHeader("Transfer-Encoding"),t.end();return}let o=t.getHeader("Content-Type");if(r instanceof L.Stream){o||t.setHeader("Content-Type","application/octet-stream"),r.pipe(t);return}let i=["object","number","boolean"].includes(typeof r),a=i?JSON.stringify(r):r;if((n=P(a))&&t.setHeader("ETag",n),!E()(e.headers,{etag:n})||(t.statusCode=304,t.end(),0)){if(Buffer.isBuffer(r)){o||t.setHeader("Content-Type","application/octet-stream"),t.setHeader("Content-Length",r.length),t.end(r);return}i&&t.setHeader("Content-Type","application/json; charset=utf-8"),t.setHeader("Content-Length",Buffer.byteLength(a)),t.end(a)}})(e,t,r),t.json=e=>{t.setHeader("Content-Type","application/json; charset=utf-8"),t.send(JSON.stringify(e))},t.redirect=(e,r)=>(function(e,t,r){if("string"==typeof t&&(r=t,t=307),"number"!=typeof t||"string"!=typeof r)throw Error("Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').");return e.writeHead(t,{Location:r}),e.write(r),e.end(),e})(t,e,r),t.setDraftMode=(e={enable:!0})=>(function(e,t){if(!D(t.previewModeId))throw Error("invariant: invalid previewModeId");let n=t.enable?void 0:new Date(0),{serialize:o}=r("./dist/compiled/cookie/index.js"),i=e.getHeader("Set-Cookie");return e.setHeader("Set-Cookie",[..."string"==typeof i?[i]:Array.isArray(i)?i:[],o(p,t.previewModeId,{httpOnly:!0,sameSite:"none",secure:!0,path:"/",expires:n})]),e})(t,Object.assign({},d,e)),t.setPreviewData=(e,n={})=>(function(e,t,n){if(!D(n.previewModeId))throw Error("invariant: invalid previewModeId");if(!D(n.previewModeEncryptionKey))throw Error("invariant: invalid previewModeEncryptionKey");if(!D(n.previewModeSigningKey))throw Error("invariant: invalid previewModeSigningKey");let o=r("next/dist/compiled/jsonwebtoken"),{encryptWithSecret:i}=r("./dist/esm/server/crypto-utils.js"),a=o.sign({data:i(Buffer.from(n.previewModeEncryptionKey),JSON.stringify(t))},n.previewModeSigningKey,{algorithm:"HS256",...void 0!==n.maxAge?{expiresIn:n.maxAge}:void 0});if(a.length>2048)throw Error("Preview data is limited to 2KB currently, reduce how much data you are storing as preview data to continue");let{serialize:s}=r("./dist/compiled/cookie/index.js"),d=e.getHeader("Set-Cookie");return e.setHeader("Set-Cookie",[..."string"==typeof d?[d]:Array.isArray(d)?d:[],s(p,n.previewModeId,{httpOnly:!0,sameSite:"none",secure:!0,path:"/",...void 0!==n.maxAge?{maxAge:n.maxAge}:void 0,...void 0!==n.path?{path:n.path}:void 0}),s(u,a,{httpOnly:!0,sameSite:"none",secure:!0,path:"/",...void 0!==n.maxAge?{maxAge:n.maxAge}:void 0,...void 0!==n.path?{path:n.path}:void 0})]),e})(t,e,Object.assign({},d,n)),t.clearPreviewData=(e={})=>f(t,e),t.revalidate=(t,r)=>z(t,r||{},e,d);let N=s.default||s;await N(e,t)}catch(e){if(e instanceof h)m(t,e.statusCode,e.message);else{if(g)throw B(e)&&(e.page=y),e;if(console.error(e),c)throw e;m(t,500,"Internal Server Error")}}}class U extends g{constructor(e){if(super(e),"function"!=typeof e.userland.default)throw Error(`Page ${e.definition.page} does not export a default function.`);this.apiResolverWrapped=function(e,t){return(...r)=>{var n;return null==(n=(0,d.getTracer)().getRootSpanAttributes())||n.set("next.route",e),(0,d.getTracer)().trace(j.runHandler,{spanName:`executing api route (pages) ${e}`},()=>t(...r))}}(e.definition.page,K)}async render(e,t,r){let{apiResolverWrapped:n}=this;await n(e,t,r.query,this.userland,{...r.previewProps,revalidate:r.revalidate,trustHostHeader:r.trustHostHeader,allowedRevalidateHeaderKeys:r.allowedRevalidateHeaderKeys,hostname:r.hostname},r.minimalMode,r.dev,r.page)}}let F=U})(),module.exports=n})(); //# sourceMappingURL=pages-api-turbo.runtime.prod.js.map \ No newline at end of file
Diff for pages-api.runtime.dev.js
@@ -17,6 +17,6 @@ * Copyright(c) 2012 TJ Holowaychuk * Copyright(c) 2016-2017 Douglas Christopher Wilson * MIT Licensed - */var t=/(?:^|,)\s*?no-cache\s*?(?:,|$)/;function r(e){var t=e&&Date.parse(e);return"number"==typeof t?t:NaN}e.exports=function(e,n){var o=e["if-modified-since"],i=e["if-none-match"];if(!o&&!i)return!1;var a=e["cache-control"];if(a&&t.test(a))return!1;if(i&&"*"!==i){var s=n.etag;if(!s)return!1;for(var d=!0,p=function(e){for(var t=0,r=[],n=0,o=0,i=e.length;o<i;o++)switch(e.charCodeAt(o)){case 32:n===t&&(n=t=o+1);break;case 44:r.push(e.substring(n,t)),n=t=o+1;break;default:t=o+1}return r.push(e.substring(n,t)),r}(i),u=0;u<p.length;u++){var l=p[u];if(l===s||l==="W/"+s||"W/"+l===s){d=!1;break}}if(d)return!1}if(o){var c=n["last-modified"];if(!c||!(r(c)<=r(o)))return!1}return!0}}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}},a=!0;try{t[e](i,i.exports,n),a=!1}finally{a&&delete r[e]}return i.exports}n.ab=__dirname+"/";var o=n(695);e.exports=o})()},"./dist/esm/server/crypto-utils.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{decryptWithSecret:()=>s,encryptWithSecret:()=>a});let n=require("crypto");var o=r.n(n);let i="aes-256-gcm";function a(e,t){let r=o().randomBytes(16),n=o().randomBytes(64),a=o().pbkdf2Sync(e,n,1e5,32,"sha512"),s=o().createCipheriv(i,a,r),d=Buffer.concat([s.update(t,"utf8"),s.final()]),p=s.getAuthTag();return Buffer.concat([n,r,p,d]).toString("hex")}function s(e,t){let r=Buffer.from(t,"hex"),n=r.slice(0,64),a=r.slice(64,80),s=r.slice(80,96),d=r.slice(96),p=o().pbkdf2Sync(e,n,1e5,32,"sha512"),u=o().createDecipheriv(i,p,a);return u.setAuthTag(s),u.update(d)+u.final("utf8")}},"next/dist/compiled/jsonwebtoken":e=>{"use strict";e.exports=require("next/dist/compiled/jsonwebtoken")},"next/dist/compiled/node-html-parser":e=>{"use strict";e.exports=require("next/dist/compiled/node-html-parser")},"next/dist/compiled/raw-body":e=>{"use strict";e.exports=require("next/dist/compiled/raw-body")},querystring:e=>{"use strict";e.exports=require("querystring")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{PagesAPIRouteModule:()=>U,default:()=>F});class e{static get(e,t,r){let n=Reflect.get(e,t,r);return"function"==typeof n?n.bind(e):n}static set(e,t,r,n){return Reflect.set(e,t,r,n)}static has(e,t){return Reflect.has(e,t)}static deleteProperty(e,t){return Reflect.deleteProperty(e,t)}}class t extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new t}}class o extends Headers{constructor(t){super(),this.headers=new Proxy(t,{get(r,n,o){if("symbol"==typeof n)return e.get(r,n,o);let i=n.toLowerCase(),a=Object.keys(t).find(e=>e.toLowerCase()===i);if(void 0!==a)return e.get(r,a,o)},set(r,n,o,i){if("symbol"==typeof n)return e.set(r,n,o,i);let a=n.toLowerCase(),s=Object.keys(t).find(e=>e.toLowerCase()===a);return e.set(r,s??n,o,i)},has(r,n){if("symbol"==typeof n)return e.has(r,n);let o=n.toLowerCase(),i=Object.keys(t).find(e=>e.toLowerCase()===o);return void 0!==i&&e.has(r,i)},deleteProperty(r,n){if("symbol"==typeof n)return e.deleteProperty(r,n);let o=n.toLowerCase(),i=Object.keys(t).find(e=>e.toLowerCase()===o);return void 0===i||e.deleteProperty(r,i)}})}static seal(r){return new Proxy(r,{get(r,n,o){switch(n){case"append":case"delete":case"set":return t.callable;default:return e.get(r,n,o)}}})}merge(e){return Array.isArray(e)?e.join(", "):e}static from(e){return e instanceof Headers?e:new o(e)}append(e,t){let r=this.headers[e];"string"==typeof r?this.headers[e]=[r,t]:Array.isArray(r)?r.push(t):this.headers[e]=t}delete(e){delete this.headers[e]}get(e){let t=this.headers[e];return void 0!==t?this.merge(t):null}has(e){return void 0!==this.headers[e]}set(e,t){this.headers[e]=t}forEach(e,t){for(let[r,n]of this.entries())e.call(t,n,r,this)}*entries(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase(),r=this.get(t);yield[t,r]}}*keys(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase();yield t}}*values(){for(let e of Object.keys(this.headers)){let t=this.get(e);yield t}}[Symbol.iterator](){return this.entries()}}let i="x-prerender-revalidate",a="x-prerender-revalidate-if-generated",s={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",api:"api",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",appMetadataRoute:"app-metadata-route",appRouteHandler:"app-route-handler"};({...s,GROUP:{serverOnly:[s.reactServerComponents,s.actionBrowser,s.appMetadataRoute,s.appRouteHandler,s.instrument],clientOnly:[s.serverSideRendering,s.appPagesBrowser,s.shared],nonClientServerTarget:[s.middleware,s.api],app:[s.reactServerComponents,s.actionBrowser,s.appMetadataRoute,s.appRouteHandler,s.serverSideRendering,s.appPagesBrowser,s.shared,s.instrument]}});let d=require("next/dist/server/lib/trace/tracer");(function(e){e.handleRequest="BaseServer.handleRequest",e.run="BaseServer.run",e.pipe="BaseServer.pipe",e.getStaticHTML="BaseServer.getStaticHTML",e.render="BaseServer.render",e.renderToResponseWithComponents="BaseServer.renderToResponseWithComponents",e.renderToResponse="BaseServer.renderToResponse",e.renderToHTML="BaseServer.renderToHTML",e.renderError="BaseServer.renderError",e.renderErrorToResponse="BaseServer.renderErrorToResponse",e.renderErrorToHTML="BaseServer.renderErrorToHTML",e.render404="BaseServer.render404"})(y||(y={})),function(e){e.loadDefaultErrorComponents="LoadComponents.loadDefaultErrorComponents",e.loadComponents="LoadComponents.loadComponents"}(x||(x={})),function(e){e.getRequestHandler="NextServer.getRequestHandler",e.getServer="NextServer.getServer",e.getServerRequestHandler="NextServer.getServerRequestHandler",e.createServer="createServer.createServer"}(b||(b={})),function(e){e.compression="NextNodeServer.compression",e.getBuildId="NextNodeServer.getBuildId",e.createComponentTree="NextNodeServer.createComponentTree",e.clientComponentLoading="NextNodeServer.clientComponentLoading",e.getLayoutOrPageModule="NextNodeServer.getLayoutOrPageModule",e.generateStaticRoutes="NextNodeServer.generateStaticRoutes",e.generateFsStaticRoutes="NextNodeServer.generateFsStaticRoutes",e.generatePublicRoutes="NextNodeServer.generatePublicRoutes",e.generateImageRoutes="NextNodeServer.generateImageRoutes.route",e.sendRenderResult="NextNodeServer.sendRenderResult",e.proxyRequest="NextNodeServer.proxyRequest",e.runApi="NextNodeServer.runApi",e.render="NextNodeServer.render",e.renderHTML="NextNodeServer.renderHTML",e.imageOptimizer="NextNodeServer.imageOptimizer",e.getPagePath="NextNodeServer.getPagePath",e.getRoutesManifest="NextNodeServer.getRoutesManifest",e.findPageComponents="NextNodeServer.findPageComponents",e.getFontManifest="NextNodeServer.getFontManifest",e.getServerComponentManifest="NextNodeServer.getServerComponentManifest",e.getRequestHandler="NextNodeServer.getRequestHandler",e.renderToHTML="NextNodeServer.renderToHTML",e.renderError="NextNodeServer.renderError",e.renderErrorToHTML="NextNodeServer.renderErrorToHTML",e.render404="NextNodeServer.render404",e.startResponse="NextNodeServer.startResponse",e.route="route",e.onProxyReq="onProxyReq",e.apiResolver="apiResolver",e.internalFetch="internalFetch"}(w||(w={})),(S||(S={})).startServer="startServer.startServer",function(e){e.getServerSideProps="Render.getServerSideProps",e.getStaticProps="Render.getStaticProps",e.renderToString="Render.renderToString",e.renderDocument="Render.renderDocument",e.createBodyResult="Render.createBodyResult"}(R||(R={})),function(e){e.renderToString="AppRender.renderToString",e.renderToReadableStream="AppRender.renderToReadableStream",e.getBodyResult="AppRender.getBodyResult",e.fetch="AppRender.fetch"}(C||(C={})),(j||(j={})).executeRoute="Router.executeRoute",(N||(N={})).runHandler="Node.runHandler",(A||(A={})).runHandler="AppRouteRouteHandlers.runHandler",function(e){e.generateMetadata="ResolveMetadata.generateMetadata",e.generateViewport="ResolveMetadata.generateViewport"}(T||(T={})),(_||(_={})).execute="Middleware.execute";let p="__prerender_bypass",u="__next_preview_data",l=Symbol(u),c=Symbol(p);function f(e,t={}){if(c in e)return e;let{serialize:n}=r("./dist/compiled/cookie/index.js"),o=e.getHeader("Set-Cookie");return e.setHeader("Set-Cookie",[..."string"==typeof o?[o]:Array.isArray(o)?o:[],n(p,"",{expires:new Date(0),httpOnly:!0,sameSite:"lax",secure:!1,path:"/",...void 0!==t.path?{path:t.path}:void 0}),n(u,"",{expires:new Date(0),httpOnly:!0,sameSite:"lax",secure:!1,path:"/",...void 0!==t.path?{path:t.path}:void 0})]),Object.defineProperty(e,c,{value:!0,enumerable:!1}),e}class h extends Error{constructor(e,t){super(t),this.statusCode=e}}function m(e,t,r){e.statusCode=t,e.statusMessage=r,e.end(r)}function v({req:e},t,r){let n={configurable:!0,enumerable:!0},o={...n,writable:!0};Object.defineProperty(e,t,{...n,get:()=>{let n=r();return Object.defineProperty(e,t,{...o,value:n}),n},set:r=>{Object.defineProperty(e,t,{...o,value:r})}})}class g{constructor({userland:e,definition:t}){this.userland=e,this.definition=t}}var y,x,b,w,S,R,C,j,N,A,T,_,P=r("./dist/compiled/bytes/index.js"),H=r.n(P);let O=e=>{let t=e.length,r=0,n=0,o=8997,i=0,a=33826,s=0,d=40164,p=0,u=52210;for(;r<t;)o^=e.charCodeAt(r++),n=435*o,i=435*a,s=435*d,p=435*u,s+=o<<8,p+=a<<8,i+=n>>>16,o=65535&n,s+=i>>>16,a=65535&i,u=p+(s>>>16)&65535,d=65535&s;return(15&u)*281474976710656+4294967296*d+65536*a+(o^u>>4)},M=(e,t=!1)=>(t?'W/"':'"')+O(e).toString(36)+e.length.toString(36)+'"';"undefined"!=typeof performance&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);var k=r("./dist/compiled/fresh/index.js"),E=r.n(k);let L=require("stream");function B(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}var $=r("./dist/compiled/@edge-runtime/cookies/index.js"),q=r("./dist/compiled/content-type/index.js");async function I(e,t){let n,o;try{n=(0,q.parse)(e.headers["content-type"]||"text/plain")}catch{n=(0,q.parse)("text/plain")}let{type:i,parameters:a}=n,s=a.charset||"utf-8";try{let n=r("next/dist/compiled/raw-body");o=await n(e,{encoding:s,limit:t})}catch(e){if(B(e)&&"entity.too.large"===e.type)throw new h(413,`Body exceeded ${t} limit`);throw new h(400,"Invalid body")}let d=o.toString();return"application/json"===i||"application/ld+json"===i?function(e){if(0===e.length)return{};try{return JSON.parse(e)}catch(e){throw new h(400,"Invalid JSON")}}(d):"application/x-www-form-urlencoded"===i?r("querystring").decode(d):d}function D(e){return"string"==typeof e&&e.length>=16}async function z(e,t,r,n){if("string"!=typeof e||!e.startsWith("/"))throw Error(`Invalid urlPath provided to revalidate(), must be a path e.g. /blog/post-1, received ${e}`);let o={[i]:n.previewModeId,...t.unstable_onlyGenerated?{[a]:"1"}:{}},s=[...n.allowedRevalidateHeaderKeys||[],...n.trustHostHeader?["cookie","x-vercel-protection-bypass"]:[]];for(let e of Object.keys(r.headers))s.includes(e)&&(o[e]=r.headers[e]);try{if(n.trustHostHeader){let n=await fetch(`https://${r.headers.host}${e}`,{method:"HEAD",headers:o}),i=n.headers.get("x-vercel-cache")||n.headers.get("x-nextjs-cache");if((null==i?void 0:i.toUpperCase())!=="REVALIDATED"&&!(404===n.status&&t.unstable_onlyGenerated))throw Error(`Invalid response ${n.status}`)}else if(n.revalidate)await n.revalidate({urlPath:e,revalidateHeaders:o,opts:t});else throw Error("Invariant: required internal revalidate method not passed to api-utils")}catch(t){throw Error(`Failed to revalidate ${e}: ${B(t)?t.message:t}`)}}async function K(e,t,n,s,d,c,g,y){try{var x,b,w,S;if(!s){t.statusCode=404,t.end("Not Found");return}let c=s.config||{},h=(null==(x=c.api)?void 0:x.bodyParser)!==!1,m=(null==(b=c.api)?void 0:b.responseLimit)??!0,g=(null==(w=c.api)?void 0:w.externalResolver)||!1;v({req:e},"cookies",(S=e.headers,function(){let{cookie:e}=S;if(!e)return{};let{parse:t}=r("./dist/compiled/cookie/index.js");return t(Array.isArray(e)?e.join("; "):e)})),e.query=n,v({req:e},"previewData",()=>(function(e,t,n){var s,d;let c;if(n&&function(e,t){let r=o.from(e.headers);return{isOnDemandRevalidate:r.get(i)===t.previewModeId,revalidateOnlyGenerated:r.has(a)}}(e,n).isOnDemandRevalidate)return!1;if(l in e)return e[l];let h=o.from(e.headers),m=new $.RequestCookies(h),v=null==(s=m.get(p))?void 0:s.value,g=null==(d=m.get(u))?void 0:d.value;if(v&&!g&&v===n.previewModeId){let t={};return Object.defineProperty(e,l,{value:t,enumerable:!1}),t}if(!v&&!g)return!1;if(!v||!g||v!==n.previewModeId)return f(t),!1;try{c=r("next/dist/compiled/jsonwebtoken").verify(g,n.previewModeSigningKey)}catch{return f(t),!1}let{decryptWithSecret:y}=r("./dist/esm/server/crypto-utils.js"),x=y(Buffer.from(n.previewModeEncryptionKey),c.data);try{let t=JSON.parse(x);return Object.defineProperty(e,l,{value:t,enumerable:!1}),t}catch{return!1}})(e,t,d)),v({req:e},"preview",()=>!1!==e.previewData||void 0),v({req:e},"draftMode",()=>e.preview),h&&!e.body&&(e.body=await I(e,c.api&&c.api.bodyParser&&c.api.bodyParser.sizeLimit?c.api.bodyParser.sizeLimit:"1mb"));let y=0,R=m&&"boolean"!=typeof m?H().parse(m):4194304,C=t.write,j=t.end;t.write=(...e)=>(y+=Buffer.byteLength(e[0]||""),C.apply(t,e)),t.end=(...r)=>(r.length&&"function"!=typeof r[0]&&(y+=Buffer.byteLength(r[0]||"")),m&&y>=R&&console.warn(`API response for ${e.url} exceeds ${H().format(R)}. API Routes are meant to respond quickly. https://nextjs.org/docs/messages/api-routes-response-size-limit`),j.apply(t,r)),t.status=e=>(t.statusCode=e,t),t.send=r=>(function(e,t,r){var n;if(null==r){t.end();return}if(204===t.statusCode||304===t.statusCode){t.removeHeader("Content-Type"),t.removeHeader("Content-Length"),t.removeHeader("Transfer-Encoding"),r&&console.warn(`A body was attempted to be set with a 204 statusCode for ${e.url}, this is invalid and the body was ignored. + */var t=/(?:^|,)\s*?no-cache\s*?(?:,|$)/;function r(e){var t=e&&Date.parse(e);return"number"==typeof t?t:NaN}e.exports=function(e,n){var o=e["if-modified-since"],i=e["if-none-match"];if(!o&&!i)return!1;var a=e["cache-control"];if(a&&t.test(a))return!1;if(i&&"*"!==i){var s=n.etag;if(!s)return!1;for(var d=!0,p=function(e){for(var t=0,r=[],n=0,o=0,i=e.length;o<i;o++)switch(e.charCodeAt(o)){case 32:n===t&&(n=t=o+1);break;case 44:r.push(e.substring(n,t)),n=t=o+1;break;default:t=o+1}return r.push(e.substring(n,t)),r}(i),u=0;u<p.length;u++){var l=p[u];if(l===s||l==="W/"+s||"W/"+l===s){d=!1;break}}if(d)return!1}if(o){var c=n["last-modified"];if(!c||!(r(c)<=r(o)))return!1}return!0}}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}},a=!0;try{t[e](i,i.exports,n),a=!1}finally{a&&delete r[e]}return i.exports}n.ab=__dirname+"/";var o=n(695);e.exports=o})()},"./dist/esm/server/crypto-utils.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{decryptWithSecret:()=>s,encryptWithSecret:()=>a});let n=require("crypto");var o=r.n(n);let i="aes-256-gcm";function a(e,t){let r=o().randomBytes(16),n=o().randomBytes(64),a=o().pbkdf2Sync(e,n,1e5,32,"sha512"),s=o().createCipheriv(i,a,r),d=Buffer.concat([s.update(t,"utf8"),s.final()]),p=s.getAuthTag();return Buffer.concat([n,r,p,d]).toString("hex")}function s(e,t){let r=Buffer.from(t,"hex"),n=r.slice(0,64),a=r.slice(64,80),s=r.slice(80,96),d=r.slice(96),p=o().pbkdf2Sync(e,n,1e5,32,"sha512"),u=o().createDecipheriv(i,p,a);return u.setAuthTag(s),u.update(d)+u.final("utf8")}},"next/dist/compiled/jsonwebtoken":e=>{"use strict";e.exports=require("next/dist/compiled/jsonwebtoken")},"next/dist/compiled/node-html-parser":e=>{"use strict";e.exports=require("next/dist/compiled/node-html-parser")},"next/dist/compiled/raw-body":e=>{"use strict";e.exports=require("next/dist/compiled/raw-body")},querystring:e=>{"use strict";e.exports=require("querystring")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{PagesAPIRouteModule:()=>U,default:()=>F});class e{static get(e,t,r){let n=Reflect.get(e,t,r);return"function"==typeof n?n.bind(e):n}static set(e,t,r,n){return Reflect.set(e,t,r,n)}static has(e,t){return Reflect.has(e,t)}static deleteProperty(e,t){return Reflect.deleteProperty(e,t)}}class t extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new t}}class o extends Headers{constructor(t){super(),this.headers=new Proxy(t,{get(r,n,o){if("symbol"==typeof n)return e.get(r,n,o);let i=n.toLowerCase(),a=Object.keys(t).find(e=>e.toLowerCase()===i);if(void 0!==a)return e.get(r,a,o)},set(r,n,o,i){if("symbol"==typeof n)return e.set(r,n,o,i);let a=n.toLowerCase(),s=Object.keys(t).find(e=>e.toLowerCase()===a);return e.set(r,s??n,o,i)},has(r,n){if("symbol"==typeof n)return e.has(r,n);let o=n.toLowerCase(),i=Object.keys(t).find(e=>e.toLowerCase()===o);return void 0!==i&&e.has(r,i)},deleteProperty(r,n){if("symbol"==typeof n)return e.deleteProperty(r,n);let o=n.toLowerCase(),i=Object.keys(t).find(e=>e.toLowerCase()===o);return void 0===i||e.deleteProperty(r,i)}})}static seal(r){return new Proxy(r,{get(r,n,o){switch(n){case"append":case"delete":case"set":return t.callable;default:return e.get(r,n,o)}}})}merge(e){return Array.isArray(e)?e.join(", "):e}static from(e){return e instanceof Headers?e:new o(e)}append(e,t){let r=this.headers[e];"string"==typeof r?this.headers[e]=[r,t]:Array.isArray(r)?r.push(t):this.headers[e]=t}delete(e){delete this.headers[e]}get(e){let t=this.headers[e];return void 0!==t?this.merge(t):null}has(e){return void 0!==this.headers[e]}set(e,t){this.headers[e]=t}forEach(e,t){for(let[r,n]of this.entries())e.call(t,n,r,this)}*entries(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase(),r=this.get(t);yield[t,r]}}*keys(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase();yield t}}*values(){for(let e of Object.keys(this.headers)){let t=this.get(e);yield t}}[Symbol.iterator](){return this.entries()}}let i="x-prerender-revalidate",a="x-prerender-revalidate-if-generated",s={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",api:"api",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",appMetadataRoute:"app-metadata-route",appRouteHandler:"app-route-handler"};({...s,GROUP:{serverOnly:[s.reactServerComponents,s.actionBrowser,s.appMetadataRoute,s.appRouteHandler,s.instrument],clientOnly:[s.serverSideRendering,s.appPagesBrowser],nonClientServerTarget:[s.middleware,s.api],app:[s.reactServerComponents,s.actionBrowser,s.appMetadataRoute,s.appRouteHandler,s.serverSideRendering,s.appPagesBrowser,s.shared,s.instrument]}});let d=require("next/dist/server/lib/trace/tracer");(function(e){e.handleRequest="BaseServer.handleRequest",e.run="BaseServer.run",e.pipe="BaseServer.pipe",e.getStaticHTML="BaseServer.getStaticHTML",e.render="BaseServer.render",e.renderToResponseWithComponents="BaseServer.renderToResponseWithComponents",e.renderToResponse="BaseServer.renderToResponse",e.renderToHTML="BaseServer.renderToHTML",e.renderError="BaseServer.renderError",e.renderErrorToResponse="BaseServer.renderErrorToResponse",e.renderErrorToHTML="BaseServer.renderErrorToHTML",e.render404="BaseServer.render404"})(y||(y={})),function(e){e.loadDefaultErrorComponents="LoadComponents.loadDefaultErrorComponents",e.loadComponents="LoadComponents.loadComponents"}(x||(x={})),function(e){e.getRequestHandler="NextServer.getRequestHandler",e.getServer="NextServer.getServer",e.getServerRequestHandler="NextServer.getServerRequestHandler",e.createServer="createServer.createServer"}(b||(b={})),function(e){e.compression="NextNodeServer.compression",e.getBuildId="NextNodeServer.getBuildId",e.createComponentTree="NextNodeServer.createComponentTree",e.clientComponentLoading="NextNodeServer.clientComponentLoading",e.getLayoutOrPageModule="NextNodeServer.getLayoutOrPageModule",e.generateStaticRoutes="NextNodeServer.generateStaticRoutes",e.generateFsStaticRoutes="NextNodeServer.generateFsStaticRoutes",e.generatePublicRoutes="NextNodeServer.generatePublicRoutes",e.generateImageRoutes="NextNodeServer.generateImageRoutes.route",e.sendRenderResult="NextNodeServer.sendRenderResult",e.proxyRequest="NextNodeServer.proxyRequest",e.runApi="NextNodeServer.runApi",e.render="NextNodeServer.render",e.renderHTML="NextNodeServer.renderHTML",e.imageOptimizer="NextNodeServer.imageOptimizer",e.getPagePath="NextNodeServer.getPagePath",e.getRoutesManifest="NextNodeServer.getRoutesManifest",e.findPageComponents="NextNodeServer.findPageComponents",e.getFontManifest="NextNodeServer.getFontManifest",e.getServerComponentManifest="NextNodeServer.getServerComponentManifest",e.getRequestHandler="NextNodeServer.getRequestHandler",e.renderToHTML="NextNodeServer.renderToHTML",e.renderError="NextNodeServer.renderError",e.renderErrorToHTML="NextNodeServer.renderErrorToHTML",e.render404="NextNodeServer.render404",e.startResponse="NextNodeServer.startResponse",e.route="route",e.onProxyReq="onProxyReq",e.apiResolver="apiResolver",e.internalFetch="internalFetch"}(w||(w={})),(S||(S={})).startServer="startServer.startServer",function(e){e.getServerSideProps="Render.getServerSideProps",e.getStaticProps="Render.getStaticProps",e.renderToString="Render.renderToString",e.renderDocument="Render.renderDocument",e.createBodyResult="Render.createBodyResult"}(R||(R={})),function(e){e.renderToString="AppRender.renderToString",e.renderToReadableStream="AppRender.renderToReadableStream",e.getBodyResult="AppRender.getBodyResult",e.fetch="AppRender.fetch"}(C||(C={})),(j||(j={})).executeRoute="Router.executeRoute",(N||(N={})).runHandler="Node.runHandler",(A||(A={})).runHandler="AppRouteRouteHandlers.runHandler",function(e){e.generateMetadata="ResolveMetadata.generateMetadata",e.generateViewport="ResolveMetadata.generateViewport"}(T||(T={})),(_||(_={})).execute="Middleware.execute";let p="__prerender_bypass",u="__next_preview_data",l=Symbol(u),c=Symbol(p);function f(e,t={}){if(c in e)return e;let{serialize:n}=r("./dist/compiled/cookie/index.js"),o=e.getHeader("Set-Cookie");return e.setHeader("Set-Cookie",[..."string"==typeof o?[o]:Array.isArray(o)?o:[],n(p,"",{expires:new Date(0),httpOnly:!0,sameSite:"lax",secure:!1,path:"/",...void 0!==t.path?{path:t.path}:void 0}),n(u,"",{expires:new Date(0),httpOnly:!0,sameSite:"lax",secure:!1,path:"/",...void 0!==t.path?{path:t.path}:void 0})]),Object.defineProperty(e,c,{value:!0,enumerable:!1}),e}class h extends Error{constructor(e,t){super(t),this.statusCode=e}}function m(e,t,r){e.statusCode=t,e.statusMessage=r,e.end(r)}function v({req:e},t,r){let n={configurable:!0,enumerable:!0},o={...n,writable:!0};Object.defineProperty(e,t,{...n,get:()=>{let n=r();return Object.defineProperty(e,t,{...o,value:n}),n},set:r=>{Object.defineProperty(e,t,{...o,value:r})}})}class g{constructor({userland:e,definition:t}){this.userland=e,this.definition=t}}var y,x,b,w,S,R,C,j,N,A,T,_,P=r("./dist/compiled/bytes/index.js"),H=r.n(P);let O=e=>{let t=e.length,r=0,n=0,o=8997,i=0,a=33826,s=0,d=40164,p=0,u=52210;for(;r<t;)o^=e.charCodeAt(r++),n=435*o,i=435*a,s=435*d,p=435*u,s+=o<<8,p+=a<<8,i+=n>>>16,o=65535&n,s+=i>>>16,a=65535&i,u=p+(s>>>16)&65535,d=65535&s;return(15&u)*281474976710656+4294967296*d+65536*a+(o^u>>4)},M=(e,t=!1)=>(t?'W/"':'"')+O(e).toString(36)+e.length.toString(36)+'"';"undefined"!=typeof performance&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);var k=r("./dist/compiled/fresh/index.js"),E=r.n(k);let L=require("stream");function B(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}var $=r("./dist/compiled/@edge-runtime/cookies/index.js"),q=r("./dist/compiled/content-type/index.js");async function I(e,t){let n,o;try{n=(0,q.parse)(e.headers["content-type"]||"text/plain")}catch{n=(0,q.parse)("text/plain")}let{type:i,parameters:a}=n,s=a.charset||"utf-8";try{let n=r("next/dist/compiled/raw-body");o=await n(e,{encoding:s,limit:t})}catch(e){if(B(e)&&"entity.too.large"===e.type)throw new h(413,`Body exceeded ${t} limit`);throw new h(400,"Invalid body")}let d=o.toString();return"application/json"===i||"application/ld+json"===i?function(e){if(0===e.length)return{};try{return JSON.parse(e)}catch(e){throw new h(400,"Invalid JSON")}}(d):"application/x-www-form-urlencoded"===i?r("querystring").decode(d):d}function D(e){return"string"==typeof e&&e.length>=16}async function z(e,t,r,n){if("string"!=typeof e||!e.startsWith("/"))throw Error(`Invalid urlPath provided to revalidate(), must be a path e.g. /blog/post-1, received ${e}`);let o={[i]:n.previewModeId,...t.unstable_onlyGenerated?{[a]:"1"}:{}},s=[...n.allowedRevalidateHeaderKeys||[],...n.trustHostHeader?["cookie","x-vercel-protection-bypass"]:[]];for(let e of Object.keys(r.headers))s.includes(e)&&(o[e]=r.headers[e]);try{if(n.trustHostHeader){let n=await fetch(`https://${r.headers.host}${e}`,{method:"HEAD",headers:o}),i=n.headers.get("x-vercel-cache")||n.headers.get("x-nextjs-cache");if((null==i?void 0:i.toUpperCase())!=="REVALIDATED"&&!(404===n.status&&t.unstable_onlyGenerated))throw Error(`Invalid response ${n.status}`)}else if(n.revalidate)await n.revalidate({urlPath:e,revalidateHeaders:o,opts:t});else throw Error("Invariant: required internal revalidate method not passed to api-utils")}catch(t){throw Error(`Failed to revalidate ${e}: ${B(t)?t.message:t}`)}}async function K(e,t,n,s,d,c,g,y){try{var x,b,w,S;if(!s){t.statusCode=404,t.end("Not Found");return}let c=s.config||{},h=(null==(x=c.api)?void 0:x.bodyParser)!==!1,m=(null==(b=c.api)?void 0:b.responseLimit)??!0,g=(null==(w=c.api)?void 0:w.externalResolver)||!1;v({req:e},"cookies",(S=e.headers,function(){let{cookie:e}=S;if(!e)return{};let{parse:t}=r("./dist/compiled/cookie/index.js");return t(Array.isArray(e)?e.join("; "):e)})),e.query=n,v({req:e},"previewData",()=>(function(e,t,n){var s,d;let c;if(n&&function(e,t){let r=o.from(e.headers);return{isOnDemandRevalidate:r.get(i)===t.previewModeId,revalidateOnlyGenerated:r.has(a)}}(e,n).isOnDemandRevalidate)return!1;if(l in e)return e[l];let h=o.from(e.headers),m=new $.RequestCookies(h),v=null==(s=m.get(p))?void 0:s.value,g=null==(d=m.get(u))?void 0:d.value;if(v&&!g&&v===n.previewModeId){let t={};return Object.defineProperty(e,l,{value:t,enumerable:!1}),t}if(!v&&!g)return!1;if(!v||!g||v!==n.previewModeId)return f(t),!1;try{c=r("next/dist/compiled/jsonwebtoken").verify(g,n.previewModeSigningKey)}catch{return f(t),!1}let{decryptWithSecret:y}=r("./dist/esm/server/crypto-utils.js"),x=y(Buffer.from(n.previewModeEncryptionKey),c.data);try{let t=JSON.parse(x);return Object.defineProperty(e,l,{value:t,enumerable:!1}),t}catch{return!1}})(e,t,d)),v({req:e},"preview",()=>!1!==e.previewData||void 0),v({req:e},"draftMode",()=>e.preview),h&&!e.body&&(e.body=await I(e,c.api&&c.api.bodyParser&&c.api.bodyParser.sizeLimit?c.api.bodyParser.sizeLimit:"1mb"));let y=0,R=m&&"boolean"!=typeof m?H().parse(m):4194304,C=t.write,j=t.end;t.write=(...e)=>(y+=Buffer.byteLength(e[0]||""),C.apply(t,e)),t.end=(...r)=>(r.length&&"function"!=typeof r[0]&&(y+=Buffer.byteLength(r[0]||"")),m&&y>=R&&console.warn(`API response for ${e.url} exceeds ${H().format(R)}. API Routes are meant to respond quickly. https://nextjs.org/docs/messages/api-routes-response-size-limit`),j.apply(t,r)),t.status=e=>(t.statusCode=e,t),t.send=r=>(function(e,t,r){var n;if(null==r){t.end();return}if(204===t.statusCode||304===t.statusCode){t.removeHeader("Content-Type"),t.removeHeader("Content-Length"),t.removeHeader("Transfer-Encoding"),r&&console.warn(`A body was attempted to be set with a 204 statusCode for ${e.url}, this is invalid and the body was ignored. See more info here https://nextjs.org/docs/messages/invalid-api-status-body`),t.end();return}let o=t.getHeader("Content-Type");if(r instanceof L.Stream){o||t.setHeader("Content-Type","application/octet-stream"),r.pipe(t);return}let i=["object","number","boolean"].includes(typeof r),a=i?JSON.stringify(r):r;if((n=M(a))&&t.setHeader("ETag",n),!E()(e.headers,{etag:n})||(t.statusCode=304,t.end(),0)){if(Buffer.isBuffer(r)){o||t.setHeader("Content-Type","application/octet-stream"),t.setHeader("Content-Length",r.length),t.end(r);return}i&&t.setHeader("Content-Type","application/json; charset=utf-8"),t.setHeader("Content-Length",Buffer.byteLength(a)),t.end(a)}})(e,t,r),t.json=e=>{t.setHeader("Content-Type","application/json; charset=utf-8"),t.send(JSON.stringify(e))},t.redirect=(e,r)=>(function(e,t,r){if("string"==typeof t&&(r=t,t=307),"number"!=typeof t||"string"!=typeof r)throw Error("Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').");return e.writeHead(t,{Location:r}),e.write(r),e.end(),e})(t,e,r),t.setDraftMode=(e={enable:!0})=>(function(e,t){if(!D(t.previewModeId))throw Error("invariant: invalid previewModeId");let n=t.enable?void 0:new Date(0),{serialize:o}=r("./dist/compiled/cookie/index.js"),i=e.getHeader("Set-Cookie");return e.setHeader("Set-Cookie",[..."string"==typeof i?[i]:Array.isArray(i)?i:[],o(p,t.previewModeId,{httpOnly:!0,sameSite:"lax",secure:!1,path:"/",expires:n})]),e})(t,Object.assign({},d,e)),t.setPreviewData=(e,n={})=>(function(e,t,n){if(!D(n.previewModeId))throw Error("invariant: invalid previewModeId");if(!D(n.previewModeEncryptionKey))throw Error("invariant: invalid previewModeEncryptionKey");if(!D(n.previewModeSigningKey))throw Error("invariant: invalid previewModeSigningKey");let o=r("next/dist/compiled/jsonwebtoken"),{encryptWithSecret:i}=r("./dist/esm/server/crypto-utils.js"),a=o.sign({data:i(Buffer.from(n.previewModeEncryptionKey),JSON.stringify(t))},n.previewModeSigningKey,{algorithm:"HS256",...void 0!==n.maxAge?{expiresIn:n.maxAge}:void 0});if(a.length>2048)throw Error("Preview data is limited to 2KB currently, reduce how much data you are storing as preview data to continue");let{serialize:s}=r("./dist/compiled/cookie/index.js"),d=e.getHeader("Set-Cookie");return e.setHeader("Set-Cookie",[..."string"==typeof d?[d]:Array.isArray(d)?d:[],s(p,n.previewModeId,{httpOnly:!0,sameSite:"lax",secure:!1,path:"/",...void 0!==n.maxAge?{maxAge:n.maxAge}:void 0,...void 0!==n.path?{path:n.path}:void 0}),s(u,a,{httpOnly:!0,sameSite:"lax",secure:!1,path:"/",...void 0!==n.maxAge?{maxAge:n.maxAge}:void 0,...void 0!==n.path?{path:n.path}:void 0})]),e})(t,e,Object.assign({},d,n)),t.clearPreviewData=(e={})=>f(t,e),t.revalidate=(t,r)=>z(t,r||{},e,d);let N=s.default||s,A=!1;t.once("pipe",()=>A=!0);let T=await N(e,t);if(void 0!==T){if(T instanceof Response)throw Error('API route returned a Response object in the Node.js runtime, this is not supported. Please use `runtime: "edge"` instead: https://nextjs.org/docs/api-routes/edge-api-routes');console.warn(`API handler should not return a value, received ${typeof T}.`)}g||t.finished||t.headersSent||A||console.warn(`API resolved without sending a response for ${e.url}, this may result in stalled requests.`)}catch(e){if(e instanceof h)m(t,e.statusCode,e.message);else{if(g)throw B(e)&&(e.page=y),e;if(console.error(e),c)throw e;m(t,500,"Internal Server Error")}}}class U extends g{constructor(e){if(super(e),"function"!=typeof e.userland.default)throw Error(`Page ${e.definition.page} does not export a default function.`);this.apiResolverWrapped=function(e,t){return(...r)=>{var n;return null==(n=(0,d.getTracer)().getRootSpanAttributes())||n.set("next.route",e),(0,d.getTracer)().trace(N.runHandler,{spanName:`executing api route (pages) ${e}`},()=>t(...r))}}(e.definition.page,K)}async render(e,t,r){let{apiResolverWrapped:n}=this;await n(e,t,r.query,this.userland,{...r.previewProps,revalidate:r.revalidate,trustHostHeader:r.trustHostHeader,allowedRevalidateHeaderKeys:r.allowedRevalidateHeaderKeys,hostname:r.hostname},r.minimalMode,r.dev,r.page)}}let F=U})(),module.exports=n})(); //# sourceMappingURL=pages-api.runtime.dev.js.map \ No newline at end of file
Diff for pages-api.ru..time.prod.js
@@ -17,5 +17,5 @@ * Copyright(c) 2012 TJ Holowaychuk * Copyright(c) 2016-2017 Douglas Christopher Wilson * MIT Licensed - */var t=/(?:^|,)\s*?no-cache\s*?(?:,|$)/;function r(e){var t=e&&Date.parse(e);return"number"==typeof t?t:NaN}e.exports=function(e,n){var o=e["if-modified-since"],i=e["if-none-match"];if(!o&&!i)return!1;var a=e["cache-control"];if(a&&t.test(a))return!1;if(i&&"*"!==i){var s=n.etag;if(!s)return!1;for(var d=!0,p=function(e){for(var t=0,r=[],n=0,o=0,i=e.length;o<i;o++)switch(e.charCodeAt(o)){case 32:n===t&&(n=t=o+1);break;case 44:r.push(e.substring(n,t)),n=t=o+1;break;default:t=o+1}return r.push(e.substring(n,t)),r}(i),u=0;u<p.length;u++){var l=p[u];if(l===s||l==="W/"+s||"W/"+l===s){d=!1;break}}if(d)return!1}if(o){var c=n["last-modified"];if(!c||!(r(c)<=r(o)))return!1}return!0}}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}},a=!0;try{t[e](i,i.exports,n),a=!1}finally{a&&delete r[e]}return i.exports}n.ab=__dirname+"/";var o=n(695);e.exports=o})()},"./dist/esm/server/crypto-utils.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{decryptWithSecret:()=>s,encryptWithSecret:()=>a});let n=require("crypto");var o=r.n(n);let i="aes-256-gcm";function a(e,t){let r=o().randomBytes(16),n=o().randomBytes(64),a=o().pbkdf2Sync(e,n,1e5,32,"sha512"),s=o().createCipheriv(i,a,r),d=Buffer.concat([s.update(t,"utf8"),s.final()]),p=s.getAuthTag();return Buffer.concat([n,r,p,d]).toString("hex")}function s(e,t){let r=Buffer.from(t,"hex"),n=r.slice(0,64),a=r.slice(64,80),s=r.slice(80,96),d=r.slice(96),p=o().pbkdf2Sync(e,n,1e5,32,"sha512"),u=o().createDecipheriv(i,p,a);return u.setAuthTag(s),u.update(d)+u.final("utf8")}},"next/dist/compiled/jsonwebtoken":e=>{"use strict";e.exports=require("next/dist/compiled/jsonwebtoken")},"next/dist/compiled/node-html-parser":e=>{"use strict";e.exports=require("next/dist/compiled/node-html-parser")},"next/dist/compiled/raw-body":e=>{"use strict";e.exports=require("next/dist/compiled/raw-body")},querystring:e=>{"use strict";e.exports=require("querystring")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{PagesAPIRouteModule:()=>U,default:()=>F});class e{static get(e,t,r){let n=Reflect.get(e,t,r);return"function"==typeof n?n.bind(e):n}static set(e,t,r,n){return Reflect.set(e,t,r,n)}static has(e,t){return Reflect.has(e,t)}static deleteProperty(e,t){return Reflect.deleteProperty(e,t)}}class t extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new t}}class o extends Headers{constructor(t){super(),this.headers=new Proxy(t,{get(r,n,o){if("symbol"==typeof n)return e.get(r,n,o);let i=n.toLowerCase(),a=Object.keys(t).find(e=>e.toLowerCase()===i);if(void 0!==a)return e.get(r,a,o)},set(r,n,o,i){if("symbol"==typeof n)return e.set(r,n,o,i);let a=n.toLowerCase(),s=Object.keys(t).find(e=>e.toLowerCase()===a);return e.set(r,s??n,o,i)},has(r,n){if("symbol"==typeof n)return e.has(r,n);let o=n.toLowerCase(),i=Object.keys(t).find(e=>e.toLowerCase()===o);return void 0!==i&&e.has(r,i)},deleteProperty(r,n){if("symbol"==typeof n)return e.deleteProperty(r,n);let o=n.toLowerCase(),i=Object.keys(t).find(e=>e.toLowerCase()===o);return void 0===i||e.deleteProperty(r,i)}})}static seal(r){return new Proxy(r,{get(r,n,o){switch(n){case"append":case"delete":case"set":return t.callable;default:return e.get(r,n,o)}}})}merge(e){return Array.isArray(e)?e.join(", "):e}static from(e){return e instanceof Headers?e:new o(e)}append(e,t){let r=this.headers[e];"string"==typeof r?this.headers[e]=[r,t]:Array.isArray(r)?r.push(t):this.headers[e]=t}delete(e){delete this.headers[e]}get(e){let t=this.headers[e];return void 0!==t?this.merge(t):null}has(e){return void 0!==this.headers[e]}set(e,t){this.headers[e]=t}forEach(e,t){for(let[r,n]of this.entries())e.call(t,n,r,this)}*entries(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase(),r=this.get(t);yield[t,r]}}*keys(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase();yield t}}*values(){for(let e of Object.keys(this.headers)){let t=this.get(e);yield t}}[Symbol.iterator](){return this.entries()}}let i="x-prerender-revalidate",a="x-prerender-revalidate-if-generated",s={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",api:"api",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",appMetadataRoute:"app-metadata-route",appRouteHandler:"app-route-handler"};({...s,GROUP:{serverOnly:[s.reactServerComponents,s.actionBrowser,s.appMetadataRoute,s.appRouteHandler,s.instrument],clientOnly:[s.serverSideRendering,s.appPagesBrowser,s.shared],nonClientServerTarget:[s.middleware,s.api],app:[s.reactServerComponents,s.actionBrowser,s.appMetadataRoute,s.appRouteHandler,s.serverSideRendering,s.appPagesBrowser,s.shared,s.instrument]}});let d=require("next/dist/server/lib/trace/tracer");(function(e){e.handleRequest="BaseServer.handleRequest",e.run="BaseServer.run",e.pipe="BaseServer.pipe",e.getStaticHTML="BaseServer.getStaticHTML",e.render="BaseServer.render",e.renderToResponseWithComponents="BaseServer.renderToResponseWithComponents",e.renderToResponse="BaseServer.renderToResponse",e.renderToHTML="BaseServer.renderToHTML",e.renderError="BaseServer.renderError",e.renderErrorToResponse="BaseServer.renderErrorToResponse",e.renderErrorToHTML="BaseServer.renderErrorToHTML",e.render404="BaseServer.render404"})(y||(y={})),function(e){e.loadDefaultErrorComponents="LoadComponents.loadDefaultErrorComponents",e.loadComponents="LoadComponents.loadComponents"}(x||(x={})),function(e){e.getRequestHandler="NextServer.getRequestHandler",e.getServer="NextServer.getServer",e.getServerRequestHandler="NextServer.getServerRequestHandler",e.createServer="createServer.createServer"}(b||(b={})),function(e){e.compression="NextNodeServer.compression",e.getBuildId="NextNodeServer.getBuildId",e.createComponentTree="NextNodeServer.createComponentTree",e.clientComponentLoading="NextNodeServer.clientComponentLoading",e.getLayoutOrPageModule="NextNodeServer.getLayoutOrPageModule",e.generateStaticRoutes="NextNodeServer.generateStaticRoutes",e.generateFsStaticRoutes="NextNodeServer.generateFsStaticRoutes",e.generatePublicRoutes="NextNodeServer.generatePublicRoutes",e.generateImageRoutes="NextNodeServer.generateImageRoutes.route",e.sendRenderResult="NextNodeServer.sendRenderResult",e.proxyRequest="NextNodeServer.proxyRequest",e.runApi="NextNodeServer.runApi",e.render="NextNodeServer.render",e.renderHTML="NextNodeServer.renderHTML",e.imageOptimizer="NextNodeServer.imageOptimizer",e.getPagePath="NextNodeServer.getPagePath",e.getRoutesManifest="NextNodeServer.getRoutesManifest",e.findPageComponents="NextNodeServer.findPageComponents",e.getFontManifest="NextNodeServer.getFontManifest",e.getServerComponentManifest="NextNodeServer.getServerComponentManifest",e.getRequestHandler="NextNodeServer.getRequestHandler",e.renderToHTML="NextNodeServer.renderToHTML",e.renderError="NextNodeServer.renderError",e.renderErrorToHTML="NextNodeServer.renderErrorToHTML",e.render404="NextNodeServer.render404",e.startResponse="NextNodeServer.startResponse",e.route="route",e.onProxyReq="onProxyReq",e.apiResolver="apiResolver",e.internalFetch="internalFetch"}(w||(w={})),(S||(S={})).startServer="startServer.startServer",function(e){e.getServerSideProps="Render.getServerSideProps",e.getStaticProps="Render.getStaticProps",e.renderToString="Render.renderToString",e.renderDocument="Render.renderDocument",e.createBodyResult="Render.createBodyResult"}(R||(R={})),function(e){e.renderToString="AppRender.renderToString",e.renderToReadableStream="AppRender.renderToReadableStream",e.getBodyResult="AppRender.getBodyResult",e.fetch="AppRender.fetch"}(C||(C={})),(N||(N={})).executeRoute="Router.executeRoute",(j||(j={})).runHandler="Node.runHandler",(T||(T={})).runHandler="AppRouteRouteHandlers.runHandler",function(e){e.generateMetadata="ResolveMetadata.generateMetadata",e.generateViewport="ResolveMetadata.generateViewport"}(_||(_={})),(A||(A={})).execute="Middleware.execute";let p="__prerender_bypass",u="__next_preview_data",l=Symbol(u),c=Symbol(p);function f(e,t={}){if(c in e)return e;let{serialize:n}=r("./dist/compiled/cookie/index.js"),o=e.getHeader("Set-Cookie");return e.setHeader("Set-Cookie",[..."string"==typeof o?[o]:Array.isArray(o)?o:[],n(p,"",{expires:new Date(0),httpOnly:!0,sameSite:"none",secure:!0,path:"/",...void 0!==t.path?{path:t.path}:void 0}),n(u,"",{expires:new Date(0),httpOnly:!0,sameSite:"none",secure:!0,path:"/",...void 0!==t.path?{path:t.path}:void 0})]),Object.defineProperty(e,c,{value:!0,enumerable:!1}),e}class h extends Error{constructor(e,t){super(t),this.statusCode=e}}function m(e,t,r){e.statusCode=t,e.statusMessage=r,e.end(r)}function v({req:e},t,r){let n={configurable:!0,enumerable:!0},o={...n,writable:!0};Object.defineProperty(e,t,{...n,get:()=>{let n=r();return Object.defineProperty(e,t,{...o,value:n}),n},set:r=>{Object.defineProperty(e,t,{...o,value:r})}})}class g{constructor({userland:e,definition:t}){this.userland=e,this.definition=t}}var y,x,b,w,S,R,C,N,j,T,_,A,H=r("./dist/compiled/bytes/index.js"),O=r.n(H);let M=e=>{let t=e.length,r=0,n=0,o=8997,i=0,a=33826,s=0,d=40164,p=0,u=52210;for(;r<t;)o^=e.charCodeAt(r++),n=435*o,i=435*a,s=435*d,p=435*u,s+=o<<8,p+=a<<8,i+=n>>>16,o=65535&n,s+=i>>>16,a=65535&i,u=p+(s>>>16)&65535,d=65535&s;return(15&u)*281474976710656+4294967296*d+65536*a+(o^u>>4)},P=(e,t=!1)=>(t?'W/"':'"')+M(e).toString(36)+e.length.toString(36)+'"';"undefined"!=typeof performance&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);var k=r("./dist/compiled/fresh/index.js"),E=r.n(k);let L=require("stream");function B(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}var q=r("./dist/compiled/@edge-runtime/cookies/index.js"),$=r("./dist/compiled/content-type/index.js");async function I(e,t){let n,o;try{n=(0,$.parse)(e.headers["content-type"]||"text/plain")}catch{n=(0,$.parse)("text/plain")}let{type:i,parameters:a}=n,s=a.charset||"utf-8";try{let n=r("next/dist/compiled/raw-body");o=await n(e,{encoding:s,limit:t})}catch(e){if(B(e)&&"entity.too.large"===e.type)throw new h(413,`Body exceeded ${t} limit`);throw new h(400,"Invalid body")}let d=o.toString();return"application/json"===i||"application/ld+json"===i?function(e){if(0===e.length)return{};try{return JSON.parse(e)}catch(e){throw new h(400,"Invalid JSON")}}(d):"application/x-www-form-urlencoded"===i?r("querystring").decode(d):d}function D(e){return"string"==typeof e&&e.length>=16}async function z(e,t,r,n){if("string"!=typeof e||!e.startsWith("/"))throw Error(`Invalid urlPath provided to revalidate(), must be a path e.g. /blog/post-1, received ${e}`);let o={[i]:n.previewModeId,...t.unstable_onlyGenerated?{[a]:"1"}:{}},s=[...n.allowedRevalidateHeaderKeys||[],...n.trustHostHeader?["cookie","x-vercel-protection-bypass"]:[]];for(let e of Object.keys(r.headers))s.includes(e)&&(o[e]=r.headers[e]);try{if(n.trustHostHeader){let n=await fetch(`https://${r.headers.host}${e}`,{method:"HEAD",headers:o}),i=n.headers.get("x-vercel-cache")||n.headers.get("x-nextjs-cache");if((null==i?void 0:i.toUpperCase())!=="REVALIDATED"&&!(404===n.status&&t.unstable_onlyGenerated))throw Error(`Invalid response ${n.status}`)}else if(n.revalidate)await n.revalidate({urlPath:e,revalidateHeaders:o,opts:t});else throw Error("Invariant: required internal revalidate method not passed to api-utils")}catch(t){throw Error(`Failed to revalidate ${e}: ${B(t)?t.message:t}`)}}async function K(e,t,n,s,d,c,g,y){try{var x,b,w,S;if(!s){t.statusCode=404,t.end("Not Found");return}let c=s.config||{},h=(null==(x=c.api)?void 0:x.bodyParser)!==!1,m=(null==(b=c.api)?void 0:b.responseLimit)??!0;null==(w=c.api)||w.externalResolver,v({req:e},"cookies",(S=e.headers,function(){let{cookie:e}=S;if(!e)return{};let{parse:t}=r("./dist/compiled/cookie/index.js");return t(Array.isArray(e)?e.join("; "):e)})),e.query=n,v({req:e},"previewData",()=>(function(e,t,n){var s,d;let c;if(n&&function(e,t){let r=o.from(e.headers);return{isOnDemandRevalidate:r.get(i)===t.previewModeId,revalidateOnlyGenerated:r.has(a)}}(e,n).isOnDemandRevalidate)return!1;if(l in e)return e[l];let h=o.from(e.headers),m=new q.RequestCookies(h),v=null==(s=m.get(p))?void 0:s.value,g=null==(d=m.get(u))?void 0:d.value;if(v&&!g&&v===n.previewModeId){let t={};return Object.defineProperty(e,l,{value:t,enumerable:!1}),t}if(!v&&!g)return!1;if(!v||!g||v!==n.previewModeId)return f(t),!1;try{c=r("next/dist/compiled/jsonwebtoken").verify(g,n.previewModeSigningKey)}catch{return f(t),!1}let{decryptWithSecret:y}=r("./dist/esm/server/crypto-utils.js"),x=y(Buffer.from(n.previewModeEncryptionKey),c.data);try{let t=JSON.parse(x);return Object.defineProperty(e,l,{value:t,enumerable:!1}),t}catch{return!1}})(e,t,d)),v({req:e},"preview",()=>!1!==e.previewData||void 0),v({req:e},"draftMode",()=>e.preview),h&&!e.body&&(e.body=await I(e,c.api&&c.api.bodyParser&&c.api.bodyParser.sizeLimit?c.api.bodyParser.sizeLimit:"1mb"));let g=0,y=m&&"boolean"!=typeof m?O().parse(m):4194304,R=t.write,C=t.end;t.write=(...e)=>(g+=Buffer.byteLength(e[0]||""),R.apply(t,e)),t.end=(...r)=>(r.length&&"function"!=typeof r[0]&&(g+=Buffer.byteLength(r[0]||"")),m&&g>=y&&console.warn(`API response for ${e.url} exceeds ${O().format(y)}. API Routes are meant to respond quickly. https://nextjs.org/docs/messages/api-routes-response-size-limit`),C.apply(t,r)),t.status=e=>(t.statusCode=e,t),t.send=r=>(function(e,t,r){var n;if(null==r){t.end();return}if(204===t.statusCode||304===t.statusCode){t.removeHeader("Content-Type"),t.removeHeader("Content-Length"),t.removeHeader("Transfer-Encoding"),t.end();return}let o=t.getHeader("Content-Type");if(r instanceof L.Stream){o||t.setHeader("Content-Type","application/octet-stream"),r.pipe(t);return}let i=["object","number","boolean"].includes(typeof r),a=i?JSON.stringify(r):r;if((n=P(a))&&t.setHeader("ETag",n),!E()(e.headers,{etag:n})||(t.statusCode=304,t.end(),0)){if(Buffer.isBuffer(r)){o||t.setHeader("Content-Type","application/octet-stream"),t.setHeader("Content-Length",r.length),t.end(r);return}i&&t.setHeader("Content-Type","application/json; charset=utf-8"),t.setHeader("Content-Length",Buffer.byteLength(a)),t.end(a)}})(e,t,r),t.json=e=>{t.setHeader("Content-Type","application/json; charset=utf-8"),t.send(JSON.stringify(e))},t.redirect=(e,r)=>(function(e,t,r){if("string"==typeof t&&(r=t,t=307),"number"!=typeof t||"string"!=typeof r)throw Error("Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').");return e.writeHead(t,{Location:r}),e.write(r),e.end(),e})(t,e,r),t.setDraftMode=(e={enable:!0})=>(function(e,t){if(!D(t.previewModeId))throw Error("invariant: invalid previewModeId");let n=t.enable?void 0:new Date(0),{serialize:o}=r("./dist/compiled/cookie/index.js"),i=e.getHeader("Set-Cookie");return e.setHeader("Set-Cookie",[..."string"==typeof i?[i]:Array.isArray(i)?i:[],o(p,t.previewModeId,{httpOnly:!0,sameSite:"none",secure:!0,path:"/",expires:n})]),e})(t,Object.assign({},d,e)),t.setPreviewData=(e,n={})=>(function(e,t,n){if(!D(n.previewModeId))throw Error("invariant: invalid previewModeId");if(!D(n.previewModeEncryptionKey))throw Error("invariant: invalid previewModeEncryptionKey");if(!D(n.previewModeSigningKey))throw Error("invariant: invalid previewModeSigningKey");let o=r("next/dist/compiled/jsonwebtoken"),{encryptWithSecret:i}=r("./dist/esm/server/crypto-utils.js"),a=o.sign({data:i(Buffer.from(n.previewModeEncryptionKey),JSON.stringify(t))},n.previewModeSigningKey,{algorithm:"HS256",...void 0!==n.maxAge?{expiresIn:n.maxAge}:void 0});if(a.length>2048)throw Error("Preview data is limited to 2KB currently, reduce how much data you are storing as preview data to continue");let{serialize:s}=r("./dist/compiled/cookie/index.js"),d=e.getHeader("Set-Cookie");return e.setHeader("Set-Cookie",[..."string"==typeof d?[d]:Array.isArray(d)?d:[],s(p,n.previewModeId,{httpOnly:!0,sameSite:"none",secure:!0,path:"/",...void 0!==n.maxAge?{maxAge:n.maxAge}:void 0,...void 0!==n.path?{path:n.path}:void 0}),s(u,a,{httpOnly:!0,sameSite:"none",secure:!0,path:"/",...void 0!==n.maxAge?{maxAge:n.maxAge}:void 0,...void 0!==n.path?{path:n.path}:void 0})]),e})(t,e,Object.assign({},d,n)),t.clearPreviewData=(e={})=>f(t,e),t.revalidate=(t,r)=>z(t,r||{},e,d);let N=s.default||s;await N(e,t)}catch(e){if(e instanceof h)m(t,e.statusCode,e.message);else{if(g)throw B(e)&&(e.page=y),e;if(console.error(e),c)throw e;m(t,500,"Internal Server Error")}}}class U extends g{constructor(e){if(super(e),"function"!=typeof e.userland.default)throw Error(`Page ${e.definition.page} does not export a default function.`);this.apiResolverWrapped=function(e,t){return(...r)=>{var n;return null==(n=(0,d.getTracer)().getRootSpanAttributes())||n.set("next.route",e),(0,d.getTracer)().trace(j.runHandler,{spanName:`executing api route (pages) ${e}`},()=>t(...r))}}(e.definition.page,K)}async render(e,t,r){let{apiResolverWrapped:n}=this;await n(e,t,r.query,this.userland,{...r.previewProps,revalidate:r.revalidate,trustHostHeader:r.trustHostHeader,allowedRevalidateHeaderKeys:r.allowedRevalidateHeaderKeys,hostname:r.hostname},r.minimalMode,r.dev,r.page)}}let F=U})(),module.exports=n})(); + */var t=/(?:^|,)\s*?no-cache\s*?(?:,|$)/;function r(e){var t=e&&Date.parse(e);return"number"==typeof t?t:NaN}e.exports=function(e,n){var o=e["if-modified-since"],i=e["if-none-match"];if(!o&&!i)return!1;var a=e["cache-control"];if(a&&t.test(a))return!1;if(i&&"*"!==i){var s=n.etag;if(!s)return!1;for(var d=!0,p=function(e){for(var t=0,r=[],n=0,o=0,i=e.length;o<i;o++)switch(e.charCodeAt(o)){case 32:n===t&&(n=t=o+1);break;case 44:r.push(e.substring(n,t)),n=t=o+1;break;default:t=o+1}return r.push(e.substring(n,t)),r}(i),u=0;u<p.length;u++){var l=p[u];if(l===s||l==="W/"+s||"W/"+l===s){d=!1;break}}if(d)return!1}if(o){var c=n["last-modified"];if(!c||!(r(c)<=r(o)))return!1}return!0}}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}},a=!0;try{t[e](i,i.exports,n),a=!1}finally{a&&delete r[e]}return i.exports}n.ab=__dirname+"/";var o=n(695);e.exports=o})()},"./dist/esm/server/crypto-utils.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{decryptWithSecret:()=>s,encryptWithSecret:()=>a});let n=require("crypto");var o=r.n(n);let i="aes-256-gcm";function a(e,t){let r=o().randomBytes(16),n=o().randomBytes(64),a=o().pbkdf2Sync(e,n,1e5,32,"sha512"),s=o().createCipheriv(i,a,r),d=Buffer.concat([s.update(t,"utf8"),s.final()]),p=s.getAuthTag();return Buffer.concat([n,r,p,d]).toString("hex")}function s(e,t){let r=Buffer.from(t,"hex"),n=r.slice(0,64),a=r.slice(64,80),s=r.slice(80,96),d=r.slice(96),p=o().pbkdf2Sync(e,n,1e5,32,"sha512"),u=o().createDecipheriv(i,p,a);return u.setAuthTag(s),u.update(d)+u.final("utf8")}},"next/dist/compiled/jsonwebtoken":e=>{"use strict";e.exports=require("next/dist/compiled/jsonwebtoken")},"next/dist/compiled/node-html-parser":e=>{"use strict";e.exports=require("next/dist/compiled/node-html-parser")},"next/dist/compiled/raw-body":e=>{"use strict";e.exports=require("next/dist/compiled/raw-body")},querystring:e=>{"use strict";e.exports=require("querystring")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{PagesAPIRouteModule:()=>U,default:()=>F});class e{static get(e,t,r){let n=Reflect.get(e,t,r);return"function"==typeof n?n.bind(e):n}static set(e,t,r,n){return Reflect.set(e,t,r,n)}static has(e,t){return Reflect.has(e,t)}static deleteProperty(e,t){return Reflect.deleteProperty(e,t)}}class t extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new t}}class o extends Headers{constructor(t){super(),this.headers=new Proxy(t,{get(r,n,o){if("symbol"==typeof n)return e.get(r,n,o);let i=n.toLowerCase(),a=Object.keys(t).find(e=>e.toLowerCase()===i);if(void 0!==a)return e.get(r,a,o)},set(r,n,o,i){if("symbol"==typeof n)return e.set(r,n,o,i);let a=n.toLowerCase(),s=Object.keys(t).find(e=>e.toLowerCase()===a);return e.set(r,s??n,o,i)},has(r,n){if("symbol"==typeof n)return e.has(r,n);let o=n.toLowerCase(),i=Object.keys(t).find(e=>e.toLowerCase()===o);return void 0!==i&&e.has(r,i)},deleteProperty(r,n){if("symbol"==typeof n)return e.deleteProperty(r,n);let o=n.toLowerCase(),i=Object.keys(t).find(e=>e.toLowerCase()===o);return void 0===i||e.deleteProperty(r,i)}})}static seal(r){return new Proxy(r,{get(r,n,o){switch(n){case"append":case"delete":case"set":return t.callable;default:return e.get(r,n,o)}}})}merge(e){return Array.isArray(e)?e.join(", "):e}static from(e){return e instanceof Headers?e:new o(e)}append(e,t){let r=this.headers[e];"string"==typeof r?this.headers[e]=[r,t]:Array.isArray(r)?r.push(t):this.headers[e]=t}delete(e){delete this.headers[e]}get(e){let t=this.headers[e];return void 0!==t?this.merge(t):null}has(e){return void 0!==this.headers[e]}set(e,t){this.headers[e]=t}forEach(e,t){for(let[r,n]of this.entries())e.call(t,n,r,this)}*entries(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase(),r=this.get(t);yield[t,r]}}*keys(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase();yield t}}*values(){for(let e of Object.keys(this.headers)){let t=this.get(e);yield t}}[Symbol.iterator](){return this.entries()}}let i="x-prerender-revalidate",a="x-prerender-revalidate-if-generated",s={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",api:"api",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",appMetadataRoute:"app-metadata-route",appRouteHandler:"app-route-handler"};({...s,GROUP:{serverOnly:[s.reactServerComponents,s.actionBrowser,s.appMetadataRoute,s.appRouteHandler,s.instrument],clientOnly:[s.serverSideRendering,s.appPagesBrowser],nonClientServerTarget:[s.middleware,s.api],app:[s.reactServerComponents,s.actionBrowser,s.appMetadataRoute,s.appRouteHandler,s.serverSideRendering,s.appPagesBrowser,s.shared,s.instrument]}});let d=require("next/dist/server/lib/trace/tracer");(function(e){e.handleRequest="BaseServer.handleRequest",e.run="BaseServer.run",e.pipe="BaseServer.pipe",e.getStaticHTML="BaseServer.getStaticHTML",e.render="BaseServer.render",e.renderToResponseWithComponents="BaseServer.renderToResponseWithComponents",e.renderToResponse="BaseServer.renderToResponse",e.renderToHTML="BaseServer.renderToHTML",e.renderError="BaseServer.renderError",e.renderErrorToResponse="BaseServer.renderErrorToResponse",e.renderErrorToHTML="BaseServer.renderErrorToHTML",e.render404="BaseServer.render404"})(y||(y={})),function(e){e.loadDefaultErrorComponents="LoadComponents.loadDefaultErrorComponents",e.loadComponents="LoadComponents.loadComponents"}(x||(x={})),function(e){e.getRequestHandler="NextServer.getRequestHandler",e.getServer="NextServer.getServer",e.getServerRequestHandler="NextServer.getServerRequestHandler",e.createServer="createServer.createServer"}(b||(b={})),function(e){e.compression="NextNodeServer.compression",e.getBuildId="NextNodeServer.getBuildId",e.createComponentTree="NextNodeServer.createComponentTree",e.clientComponentLoading="NextNodeServer.clientComponentLoading",e.getLayoutOrPageModule="NextNodeServer.getLayoutOrPageModule",e.generateStaticRoutes="NextNodeServer.generateStaticRoutes",e.generateFsStaticRoutes="NextNodeServer.generateFsStaticRoutes",e.generatePublicRoutes="NextNodeServer.generatePublicRoutes",e.generateImageRoutes="NextNodeServer.generateImageRoutes.route",e.sendRenderResult="NextNodeServer.sendRenderResult",e.proxyRequest="NextNodeServer.proxyRequest",e.runApi="NextNodeServer.runApi",e.render="NextNodeServer.render",e.renderHTML="NextNodeServer.renderHTML",e.imageOptimizer="NextNodeServer.imageOptimizer",e.getPagePath="NextNodeServer.getPagePath",e.getRoutesManifest="NextNodeServer.getRoutesManifest",e.findPageComponents="NextNodeServer.findPageComponents",e.getFontManifest="NextNodeServer.getFontManifest",e.getServerComponentManifest="NextNodeServer.getServerComponentManifest",e.getRequestHandler="NextNodeServer.getRequestHandler",e.renderToHTML="NextNodeServer.renderToHTML",e.renderError="NextNodeServer.renderError",e.renderErrorToHTML="NextNodeServer.renderErrorToHTML",e.render404="NextNodeServer.render404",e.startResponse="NextNodeServer.startResponse",e.route="route",e.onProxyReq="onProxyReq",e.apiResolver="apiResolver",e.internalFetch="internalFetch"}(w||(w={})),(S||(S={})).startServer="startServer.startServer",function(e){e.getServerSideProps="Render.getServerSideProps",e.getStaticProps="Render.getStaticProps",e.renderToString="Render.renderToString",e.renderDocument="Render.renderDocument",e.createBodyResult="Render.createBodyResult"}(R||(R={})),function(e){e.renderToString="AppRender.renderToString",e.renderToReadableStream="AppRender.renderToReadableStream",e.getBodyResult="AppRender.getBodyResult",e.fetch="AppRender.fetch"}(C||(C={})),(N||(N={})).executeRoute="Router.executeRoute",(j||(j={})).runHandler="Node.runHandler",(T||(T={})).runHandler="AppRouteRouteHandlers.runHandler",function(e){e.generateMetadata="ResolveMetadata.generateMetadata",e.generateViewport="ResolveMetadata.generateViewport"}(_||(_={})),(A||(A={})).execute="Middleware.execute";let p="__prerender_bypass",u="__next_preview_data",l=Symbol(u),c=Symbol(p);function f(e,t={}){if(c in e)return e;let{serialize:n}=r("./dist/compiled/cookie/index.js"),o=e.getHeader("Set-Cookie");return e.setHeader("Set-Cookie",[..."string"==typeof o?[o]:Array.isArray(o)?o:[],n(p,"",{expires:new Date(0),httpOnly:!0,sameSite:"none",secure:!0,path:"/",...void 0!==t.path?{path:t.path}:void 0}),n(u,"",{expires:new Date(0),httpOnly:!0,sameSite:"none",secure:!0,path:"/",...void 0!==t.path?{path:t.path}:void 0})]),Object.defineProperty(e,c,{value:!0,enumerable:!1}),e}class h extends Error{constructor(e,t){super(t),this.statusCode=e}}function m(e,t,r){e.statusCode=t,e.statusMessage=r,e.end(r)}function v({req:e},t,r){let n={configurable:!0,enumerable:!0},o={...n,writable:!0};Object.defineProperty(e,t,{...n,get:()=>{let n=r();return Object.defineProperty(e,t,{...o,value:n}),n},set:r=>{Object.defineProperty(e,t,{...o,value:r})}})}class g{constructor({userland:e,definition:t}){this.userland=e,this.definition=t}}var y,x,b,w,S,R,C,N,j,T,_,A,H=r("./dist/compiled/bytes/index.js"),O=r.n(H);let M=e=>{let t=e.length,r=0,n=0,o=8997,i=0,a=33826,s=0,d=40164,p=0,u=52210;for(;r<t;)o^=e.charCodeAt(r++),n=435*o,i=435*a,s=435*d,p=435*u,s+=o<<8,p+=a<<8,i+=n>>>16,o=65535&n,s+=i>>>16,a=65535&i,u=p+(s>>>16)&65535,d=65535&s;return(15&u)*281474976710656+4294967296*d+65536*a+(o^u>>4)},P=(e,t=!1)=>(t?'W/"':'"')+M(e).toString(36)+e.length.toString(36)+'"';"undefined"!=typeof performance&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);var k=r("./dist/compiled/fresh/index.js"),E=r.n(k);let L=require("stream");function B(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}var q=r("./dist/compiled/@edge-runtime/cookies/index.js"),$=r("./dist/compiled/content-type/index.js");async function I(e,t){let n,o;try{n=(0,$.parse)(e.headers["content-type"]||"text/plain")}catch{n=(0,$.parse)("text/plain")}let{type:i,parameters:a}=n,s=a.charset||"utf-8";try{let n=r("next/dist/compiled/raw-body");o=await n(e,{encoding:s,limit:t})}catch(e){if(B(e)&&"entity.too.large"===e.type)throw new h(413,`Body exceeded ${t} limit`);throw new h(400,"Invalid body")}let d=o.toString();return"application/json"===i||"application/ld+json"===i?function(e){if(0===e.length)return{};try{return JSON.parse(e)}catch(e){throw new h(400,"Invalid JSON")}}(d):"application/x-www-form-urlencoded"===i?r("querystring").decode(d):d}function D(e){return"string"==typeof e&&e.length>=16}async function z(e,t,r,n){if("string"!=typeof e||!e.startsWith("/"))throw Error(`Invalid urlPath provided to revalidate(), must be a path e.g. /blog/post-1, received ${e}`);let o={[i]:n.previewModeId,...t.unstable_onlyGenerated?{[a]:"1"}:{}},s=[...n.allowedRevalidateHeaderKeys||[],...n.trustHostHeader?["cookie","x-vercel-protection-bypass"]:[]];for(let e of Object.keys(r.headers))s.includes(e)&&(o[e]=r.headers[e]);try{if(n.trustHostHeader){let n=await fetch(`https://${r.headers.host}${e}`,{method:"HEAD",headers:o}),i=n.headers.get("x-vercel-cache")||n.headers.get("x-nextjs-cache");if((null==i?void 0:i.toUpperCase())!=="REVALIDATED"&&!(404===n.status&&t.unstable_onlyGenerated))throw Error(`Invalid response ${n.status}`)}else if(n.revalidate)await n.revalidate({urlPath:e,revalidateHeaders:o,opts:t});else throw Error("Invariant: required internal revalidate method not passed to api-utils")}catch(t){throw Error(`Failed to revalidate ${e}: ${B(t)?t.message:t}`)}}async function K(e,t,n,s,d,c,g,y){try{var x,b,w,S;if(!s){t.statusCode=404,t.end("Not Found");return}let c=s.config||{},h=(null==(x=c.api)?void 0:x.bodyParser)!==!1,m=(null==(b=c.api)?void 0:b.responseLimit)??!0;null==(w=c.api)||w.externalResolver,v({req:e},"cookies",(S=e.headers,function(){let{cookie:e}=S;if(!e)return{};let{parse:t}=r("./dist/compiled/cookie/index.js");return t(Array.isArray(e)?e.join("; "):e)})),e.query=n,v({req:e},"previewData",()=>(function(e,t,n){var s,d;let c;if(n&&function(e,t){let r=o.from(e.headers);return{isOnDemandRevalidate:r.get(i)===t.previewModeId,revalidateOnlyGenerated:r.has(a)}}(e,n).isOnDemandRevalidate)return!1;if(l in e)return e[l];let h=o.from(e.headers),m=new q.RequestCookies(h),v=null==(s=m.get(p))?void 0:s.value,g=null==(d=m.get(u))?void 0:d.value;if(v&&!g&&v===n.previewModeId){let t={};return Object.defineProperty(e,l,{value:t,enumerable:!1}),t}if(!v&&!g)return!1;if(!v||!g||v!==n.previewModeId)return f(t),!1;try{c=r("next/dist/compiled/jsonwebtoken").verify(g,n.previewModeSigningKey)}catch{return f(t),!1}let{decryptWithSecret:y}=r("./dist/esm/server/crypto-utils.js"),x=y(Buffer.from(n.previewModeEncryptionKey),c.data);try{let t=JSON.parse(x);return Object.defineProperty(e,l,{value:t,enumerable:!1}),t}catch{return!1}})(e,t,d)),v({req:e},"preview",()=>!1!==e.previewData||void 0),v({req:e},"draftMode",()=>e.preview),h&&!e.body&&(e.body=await I(e,c.api&&c.api.bodyParser&&c.api.bodyParser.sizeLimit?c.api.bodyParser.sizeLimit:"1mb"));let g=0,y=m&&"boolean"!=typeof m?O().parse(m):4194304,R=t.write,C=t.end;t.write=(...e)=>(g+=Buffer.byteLength(e[0]||""),R.apply(t,e)),t.end=(...r)=>(r.length&&"function"!=typeof r[0]&&(g+=Buffer.byteLength(r[0]||"")),m&&g>=y&&console.warn(`API response for ${e.url} exceeds ${O().format(y)}. API Routes are meant to respond quickly. https://nextjs.org/docs/messages/api-routes-response-size-limit`),C.apply(t,r)),t.status=e=>(t.statusCode=e,t),t.send=r=>(function(e,t,r){var n;if(null==r){t.end();return}if(204===t.statusCode||304===t.statusCode){t.removeHeader("Content-Type"),t.removeHeader("Content-Length"),t.removeHeader("Transfer-Encoding"),t.end();return}let o=t.getHeader("Content-Type");if(r instanceof L.Stream){o||t.setHeader("Content-Type","application/octet-stream"),r.pipe(t);return}let i=["object","number","boolean"].includes(typeof r),a=i?JSON.stringify(r):r;if((n=P(a))&&t.setHeader("ETag",n),!E()(e.headers,{etag:n})||(t.statusCode=304,t.end(),0)){if(Buffer.isBuffer(r)){o||t.setHeader("Content-Type","application/octet-stream"),t.setHeader("Content-Length",r.length),t.end(r);return}i&&t.setHeader("Content-Type","application/json; charset=utf-8"),t.setHeader("Content-Length",Buffer.byteLength(a)),t.end(a)}})(e,t,r),t.json=e=>{t.setHeader("Content-Type","application/json; charset=utf-8"),t.send(JSON.stringify(e))},t.redirect=(e,r)=>(function(e,t,r){if("string"==typeof t&&(r=t,t=307),"number"!=typeof t||"string"!=typeof r)throw Error("Invalid redirect arguments. Please use a single argument URL, e.g. res.redirect('/destination') or use a status code and URL, e.g. res.redirect(307, '/destination').");return e.writeHead(t,{Location:r}),e.write(r),e.end(),e})(t,e,r),t.setDraftMode=(e={enable:!0})=>(function(e,t){if(!D(t.previewModeId))throw Error("invariant: invalid previewModeId");let n=t.enable?void 0:new Date(0),{serialize:o}=r("./dist/compiled/cookie/index.js"),i=e.getHeader("Set-Cookie");return e.setHeader("Set-Cookie",[..."string"==typeof i?[i]:Array.isArray(i)?i:[],o(p,t.previewModeId,{httpOnly:!0,sameSite:"none",secure:!0,path:"/",expires:n})]),e})(t,Object.assign({},d,e)),t.setPreviewData=(e,n={})=>(function(e,t,n){if(!D(n.previewModeId))throw Error("invariant: invalid previewModeId");if(!D(n.previewModeEncryptionKey))throw Error("invariant: invalid previewModeEncryptionKey");if(!D(n.previewModeSigningKey))throw Error("invariant: invalid previewModeSigningKey");let o=r("next/dist/compiled/jsonwebtoken"),{encryptWithSecret:i}=r("./dist/esm/server/crypto-utils.js"),a=o.sign({data:i(Buffer.from(n.previewModeEncryptionKey),JSON.stringify(t))},n.previewModeSigningKey,{algorithm:"HS256",...void 0!==n.maxAge?{expiresIn:n.maxAge}:void 0});if(a.length>2048)throw Error("Preview data is limited to 2KB currently, reduce how much data you are storing as preview data to continue");let{serialize:s}=r("./dist/compiled/cookie/index.js"),d=e.getHeader("Set-Cookie");return e.setHeader("Set-Cookie",[..."string"==typeof d?[d]:Array.isArray(d)?d:[],s(p,n.previewModeId,{httpOnly:!0,sameSite:"none",secure:!0,path:"/",...void 0!==n.maxAge?{maxAge:n.maxAge}:void 0,...void 0!==n.path?{path:n.path}:void 0}),s(u,a,{httpOnly:!0,sameSite:"none",secure:!0,path:"/",...void 0!==n.maxAge?{maxAge:n.maxAge}:void 0,...void 0!==n.path?{path:n.path}:void 0})]),e})(t,e,Object.assign({},d,n)),t.clearPreviewData=(e={})=>f(t,e),t.revalidate=(t,r)=>z(t,r||{},e,d);let N=s.default||s;await N(e,t)}catch(e){if(e instanceof h)m(t,e.statusCode,e.message);else{if(g)throw B(e)&&(e.page=y),e;if(console.error(e),c)throw e;m(t,500,"Internal Server Error")}}}class U extends g{constructor(e){if(super(e),"function"!=typeof e.userland.default)throw Error(`Page ${e.definition.page} does not export a default function.`);this.apiResolverWrapped=function(e,t){return(...r)=>{var n;return null==(n=(0,d.getTracer)().getRootSpanAttributes())||n.set("next.route",e),(0,d.getTracer)().trace(j.runHandler,{spanName:`executing api route (pages) ${e}`},()=>t(...r))}}(e.definition.page,K)}async render(e,t,r){let{apiResolverWrapped:n}=this;await n(e,t,r.query,this.userland,{...r.previewProps,revalidate:r.revalidate,trustHostHeader:r.trustHostHeader,allowedRevalidateHeaderKeys:r.allowedRevalidateHeaderKeys,hostname:r.hostname},r.minimalMode,r.dev,r.page)}}let F=U})(),module.exports=n})(); //# sourceMappingURL=pages-api.runtime.prod.js.map \ No newline at end of file
Diff for pages-turbo...time.prod.js
Diff too large to display
Diff for pages.runtime.dev.js
Diff too large to display
Diff for pages.runtime.prod.js
Diff too large to display
Diff for server.runtime.prod.js
Diff too large to display