globalThis.__nitro_main__ = import.meta.url;
import { i as serve, r as NodeResponse } from "./_libs/h3-v2+rou3+srvx.mjs";
import { a as toEventHandler, i as defineLazyEventHandler, n as HTTPError, r as defineHandler, t as H3Core } from "./_libs/h3+rou3+srvx.mjs";
import { i as withoutTrailingSlash, n as joinURL, r as withLeadingSlash, t as decodePath } from "./_libs/ufo.mjs";
import { promises } from "node:fs";
import { fileURLToPath } from "node:url";
import { dirname, resolve } from "node:path";
//#region #nitro-vite-setup
function lazyService(loader) {
	let promise, mod;
	return { fetch(req) {
		if (mod) return mod.fetch(req);
		if (!promise) promise = loader().then((_mod) => mod = _mod.default || _mod);
		return promise.then((mod) => mod.fetch(req));
	} };
}
var services = { ["ssr"]: lazyService(() => import("./_ssr/ssr.mjs")) };
globalThis.__nitro_vite_envs__ = services;
//#endregion
//#region node_modules/nitro/dist/runtime/internal/route-rules.mjs
var headers = ((m) => function headersRouteRule(event) {
	for (const [key, value] of Object.entries(m.options || {})) event.res.headers.set(key, value);
});
//#endregion
//#region #nitro/virtual/public-assets-data
var public_assets_data_default = {
	"/favicon.png": {
		"type": "image/png",
		"etag": "\"fd8-CwnrPNzfXYlnrSU3bf37Zxh2+vE\"",
		"mtime": "2026-08-25T16:07:48.360Z",
		"size": 4056,
		"path": "../public/favicon.png"
	},
	"/robots.txt": {
		"type": "text/plain; charset=utf-8",
		"etag": "\"a0-CKGXSIe7TSsqDTmGm/nY1t/o5d0\"",
		"mtime": "2026-08-25T16:07:48.360Z",
		"size": 160,
		"path": "../public/robots.txt"
	},
	"/assets/Layout-uiA8q21U.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"365b-Zu1ylz+6+gpau9zP9FpJCQYZIOQ\"",
		"mtime": "2026-08-25T16:07:46.888Z",
		"size": 13915,
		"path": "../public/assets/Layout-uiA8q21U.js"
	},
	"/assets/Collection-BGyZxlEk.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"10a7-uRrg6zaz32kqt88PTR70vEFS2DY\"",
		"mtime": "2026-08-25T16:07:46.888Z",
		"size": 4263,
		"path": "../public/assets/Collection-BGyZxlEk.js"
	},
	"/schema-for-your-supabase.sql": {
		"type": "application/sql",
		"etag": "\"3a06-55A/Z1uF+JVvHSf+qWsgU3Kw92c\"",
		"mtime": "2026-08-25T16:07:48.360Z",
		"size": 14854,
		"path": "../public/schema-for-your-supabase.sql"
	},
	"/assets/about-us--45VJiQh.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"6a1-TbptVwGyhujgLAxUjuAvve/SN70\"",
		"mtime": "2026-08-25T16:07:46.888Z",
		"size": 1697,
		"path": "../public/assets/about-us--45VJiQh.js"
	},
	"/assets/browse-all-2XaRH5Dt.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"312-O4jTJTMFDY0YAj0y7dMg0ml/HhI\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 786,
		"path": "../public/assets/browse-all-2XaRH5Dt.js"
	},
	"/assets/careers._slug-v7ibAEQC.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"f459-lLxwc/eUysmBvEfhMC+NVRX0StE\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 62553,
		"path": "../public/assets/careers._slug-v7ibAEQC.js"
	},
	"/assets/careers.index-hM2FcWLb.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"97f-sGcEqCNOK6zBxrHiOgS9rfK6IHo\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 2431,
		"path": "../public/assets/careers.index-hM2FcWLb.js"
	},
	"/assets/ancient-maps-sale-ChGU6vYh.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"30f-hFPdZQhKsUSSilR6jRjSSBPlfxs\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 783,
		"path": "../public/assets/ancient-maps-sale-ChGU6vYh.js"
	},
	"/assets/asi-logo-CuaOtCCa.png": {
		"type": "image/png",
		"etag": "\"7a1fd-HCXeorHqvGk2nuJkZ8wTvoR4cW8\"",
		"mtime": "2026-08-25T16:07:46.893Z",
		"size": 500221,
		"path": "../public/assets/asi-logo-CuaOtCCa.png"
	},
	"/assets/categories-of-our-catalog-DHjNQozl.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"4ee-iRBpIC0mpx8FkyWBzHyoqNvQBY8\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 1262,
		"path": "../public/assets/categories-of-our-catalog-DHjNQozl.js"
	},
	"/assets/checkout-CRBPIzhP.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"2e2-DA3XnEnsiRL32hV9AB96yxduwjQ\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 738,
		"path": "../public/assets/checkout-CRBPIzhP.js"
	},
	"/assets/collectors-guide-BTsL9NCh.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"98f-jblFHyURaCl5c+7SvZLqYabnvxU\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 2447,
		"path": "../public/assets/collectors-guide-BTsL9NCh.js"
	},
	"/assets/collecting-posters-CDif5Ulj.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"34d-tds3+ICJbz7iH57t35J7MWVpLp4\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 845,
		"path": "../public/assets/collecting-posters-CDif5Ulj.js"
	},
	"/assets/colorado-art-BQOr4QwW.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"2e1-Ccmx/8OWCyjhzf3djRtRpPLl2/4\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 737,
		"path": "../public/assets/colorado-art-BQOr4QwW.js"
	},
	"/assets/custom-framing-CUBd2n5L.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"587-twjMhawnLKwZZpwmIsQ8cQuuiU0\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 1415,
		"path": "../public/assets/custom-framing-CUBd2n5L.js"
	},
	"/assets/featured-products-BuMPjrni.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"2b8-JnEzyzaFwdZffGkzAGpM8JOCvQ4\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 696,
		"path": "../public/assets/featured-products-BuMPjrni.js"
	},
	"/assets/contact-us-DgHwQYk8.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"924-rlfUzgLFbOsZ3vacCVgBDlkshZQ\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 2340,
		"path": "../public/assets/contact-us-DgHwQYk8.js"
	},
	"/assets/globes-for-sale-91jvL349.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"352-0IT9Iz60cai5EpR75zCUeO/+faM\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 850,
		"path": "../public/assets/globes-for-sale-91jvL349.js"
	},
	"/assets/historic-colorado-photos-CKUW23Wu.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"2f0-FFyH+uOTyjdvyeuWbMqgmFpH47U\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 752,
		"path": "../public/assets/historic-colorado-photos-CKUW23Wu.js"
	},
	"/assets/admin-Doud-wgw.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"25fd-c4b7TIqjeDpugLV4nW9xh3xrzac\"",
		"mtime": "2026-08-25T16:07:46.888Z",
		"size": 9725,
		"path": "../public/assets/admin-Doud-wgw.js"
	},
	"/assets/auth-glWTzFxA.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"904-37LvEtTH904rSYaLj7JxX3IScLQ\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 2308,
		"path": "../public/assets/auth-glWTzFxA.js"
	},
	"/assets/books-B0ZFGR_N.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"2bc-sHHKts23Vf8imdQPk1RApqRNBXA\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 700,
		"path": "../public/assets/books-B0ZFGR_N.js"
	},
	"/assets/index-VYIssuI_.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"9c177-1KONNNHknckaG1PsxXMUXbObQpY\"",
		"mtime": "2026-08-25T16:07:46.888Z",
		"size": 639351,
		"path": "../public/assets/index-VYIssuI_.js"
	},
	"/assets/link-CSxX31-N.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"1e68-MSNLjLS4WLs9aK11vVq7oK6HG/w\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 7784,
		"path": "../public/assets/link-CSxX31-N.js"
	},
	"/assets/matchContext-C63xOE_W.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"299-/lgmXbTkd9lXRRgrTPouue5l4YQ\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 665,
		"path": "../public/assets/matchContext-C63xOE_W.js"
	},
	"/assets/original-antique-maps-by-location-B4iv7Nxd.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"30b-CnV1UV1D/iyXZulnUn0ofQbRMlA\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 779,
		"path": "../public/assets/original-antique-maps-by-location-B4iv7Nxd.js"
	},
	"/assets/parchment-bg-CC_6hLWH.jpg": {
		"type": "image/jpeg",
		"etag": "\"7ce3-/pPk4eHdBTR8OTGZ/C63w+r+2mM\"",
		"mtime": "2026-08-25T16:07:46.893Z",
		"size": 31971,
		"path": "../public/assets/parchment-bg-CC_6hLWH.jpg"
	},
	"/assets/product-category._category._subcategory-DLSQosD5.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"83a-ERJLsNtYKKTZEFCLH8S3fhoFlJw\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 2106,
		"path": "../public/assets/product-category._category._subcategory-DLSQosD5.js"
	},
	"/assets/puzzles-CugRI1aq.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"2da-5RxAP3SOuuUvHQILwJ/R3rPFBsU\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 730,
		"path": "../public/assets/puzzles-CugRI1aq.js"
	},
	"/assets/request-an-item-1rIAdJ6x.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"6fb-nXSSsyG1iuvc88fRaCLytA5VgzI\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 1787,
		"path": "../public/assets/request-an-item-1rIAdJ6x.js"
	},
	"/assets/route-Djf7fdpU.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"8a-H17+8XYw1BrCcslg88sAAJWychA\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 138,
		"path": "../public/assets/route-Djf7fdpU.js"
	},
	"/assets/routes-D0-5Burf.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"1250-wwvEc66BXo4qWTPRkUmATJ/2Sww\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 4688,
		"path": "../public/assets/routes-D0-5Burf.js"
	},
	"/assets/not-found-i5RsCZif.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"76-Trmr7GZIBZuvfg4uM18tBiRtOXg\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 118,
		"path": "../public/assets/not-found-i5RsCZif.js"
	},
	"/assets/old-map-reproductions-DUSDQCgl.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"331-/XiCzVkC0Prqi6MeD8+BpHjMNxA\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 817,
		"path": "../public/assets/old-map-reproductions-DUSDQCgl.js"
	},
	"/assets/shop._slug-b_XUR__r.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"a49-Ccv5Hg1qxRSRCeAwcMJqTrZkxuE\"",
		"mtime": "2026-08-25T16:07:46.890Z",
		"size": 2633,
		"path": "../public/assets/shop._slug-b_XUR__r.js"
	},
	"/assets/jobs-Ca2gmfn5.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"2593-0P3NHMji8b5TEzQAZSZc2iNeMgw\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 9619,
		"path": "../public/assets/jobs-Ca2gmfn5.js"
	},
	"/assets/original-antique-maps-DjNuMnQd.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"349-gL/S0G6+VB31gRRV96alF4IPWac\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 841,
		"path": "../public/assets/original-antique-maps-DjNuMnQd.js"
	},
	"/assets/useStore-B9WcefOa.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"6ba9-DyLG3MsOxLBofb+Ep/+VkQIRI0g\"",
		"mtime": "2026-08-25T16:07:46.890Z",
		"size": 27561,
		"path": "../public/assets/useStore-B9WcefOa.js"
	},
	"/assets/styles-C2859h3I.css": {
		"type": "text/css; charset=utf-8",
		"etag": "\"13a53-xxsgdiVGhVJWK128nB8BoGbVgoE\"",
		"mtime": "2026-08-25T16:07:46.894Z",
		"size": 80467,
		"path": "../public/assets/styles-C2859h3I.css"
	},
	"/assets/vintage-prints-sale-Clrjf_TW.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"3d2-ymnYcmjSxfz1N1REGsa2nUEIfvo\"",
		"mtime": "2026-08-25T16:07:46.890Z",
		"size": 978,
		"path": "../public/assets/vintage-prints-sale-Clrjf_TW.js"
	},
	"/assets/vintage-posters-for-sale-BTrYFIfe.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"307-3yI7c1mNgQSw21rQa3EJ594oJLY\"",
		"mtime": "2026-08-25T16:07:46.890Z",
		"size": 775,
		"path": "../public/assets/vintage-posters-for-sale-BTrYFIfe.js"
	},
	"/assets/shop._slug-shixF-CI.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"270-5MpuLrEfXpRkbjyIyQscetdmQxw\"",
		"mtime": "2026-08-25T16:07:46.890Z",
		"size": 624,
		"path": "../public/assets/shop._slug-shixF-CI.js"
	},
	"/assets/old-world-maps-BJtueKSd.js": {
		"type": "text/javascript; charset=utf-8",
		"etag": "\"2e9-ziRbYt6+cqe0nJNcELnnnXTlvfM\"",
		"mtime": "2026-08-25T16:07:46.889Z",
		"size": 745,
		"path": "../public/assets/old-world-maps-BJtueKSd.js"
	}
};
//#endregion
//#region #nitro/virtual/public-assets-node
function readAsset(id) {
	const serverDir = dirname(fileURLToPath(globalThis.__nitro_main__));
	return promises.readFile(resolve(serverDir, public_assets_data_default[id].path));
}
//#endregion
//#region #nitro/virtual/public-assets
var publicAssetBases = {};
function isPublicAssetURL(id = "") {
	if (public_assets_data_default[id]) return true;
	for (const base in publicAssetBases) if (id.startsWith(base)) return true;
	return false;
}
function getAsset(id) {
	return public_assets_data_default[id];
}
//#endregion
//#region node_modules/nitro/dist/runtime/internal/static.mjs
var METHODS = /* @__PURE__ */ new Set(["HEAD", "GET"]);
var EncodingMap = {
	gzip: ".gz",
	br: ".br",
	zstd: ".zst"
};
var static_default = defineHandler((event) => {
	if (event.req.method && !METHODS.has(event.req.method)) return;
	let id = decodePath(withLeadingSlash(withoutTrailingSlash(event.url.pathname)));
	let asset;
	const encodings = [...(event.req.headers.get("accept-encoding") || "").split(",").map((e) => EncodingMap[e.trim()]).filter(Boolean).sort(), ""];
	for (const encoding of encodings) for (const _id of [id + encoding, joinURL(id, "index.html" + encoding)]) {
		const _asset = getAsset(_id);
		if (_asset) {
			asset = _asset;
			id = _id;
			break;
		}
	}
	if (!asset) {
		if (isPublicAssetURL(id)) {
			event.res.headers.delete("Cache-Control");
			throw new HTTPError({ status: 404 });
		}
		return;
	}
	if (encodings.length > 1) event.res.headers.append("Vary", "Accept-Encoding");
	if (event.req.headers.get("if-none-match") === asset.etag) {
		event.res.status = 304;
		event.res.statusText = "Not Modified";
		return "";
	}
	const ifModifiedSinceH = event.req.headers.get("if-modified-since");
	const mtimeDate = new Date(asset.mtime);
	if (ifModifiedSinceH && asset.mtime && new Date(ifModifiedSinceH) >= mtimeDate) {
		event.res.status = 304;
		event.res.statusText = "Not Modified";
		return "";
	}
	if (asset.type) event.res.headers.set("Content-Type", asset.type);
	if (asset.etag && !event.res.headers.has("ETag")) event.res.headers.set("ETag", asset.etag);
	if (asset.mtime && !event.res.headers.has("Last-Modified")) event.res.headers.set("Last-Modified", mtimeDate.toUTCString());
	if (asset.encoding && !event.res.headers.has("Content-Encoding")) event.res.headers.set("Content-Encoding", asset.encoding);
	if (asset.size > 0 && !event.res.headers.has("Content-Length")) event.res.headers.set("Content-Length", asset.size.toString());
	return readAsset(id);
});
//#endregion
//#region #nitro/virtual/routing
var findRouteRules = /* @__PURE__ */ (() => {
	const $0 = [{
		name: "headers",
		route: "/assets/**",
		handler: headers,
		options: { "cache-control": "public, max-age=31536000, immutable" }
	}];
	return (m, p) => {
		let r = [];
		if (p.charCodeAt(p.length - 1) === 47) p = p.slice(0, -1) || "/";
		let s = p.split("/");
		if (s.length > 1) {
			if (s[1] === "assets") r.unshift({
				data: $0,
				params: { "_": s.slice(2).join("/") }
			});
		}
		return r;
	};
})();
var _lazy_j21Qvj = defineLazyEventHandler(() => import("./_chunks/ssr-renderer.mjs"));
var findRoute = /* @__PURE__ */ (() => {
	const data = {
		route: "/**",
		handler: _lazy_j21Qvj
	};
	return ((_m, p) => {
		return {
			data,
			params: { "_": p.slice(1) }
		};
	});
})();
var globalMiddleware = [toEventHandler(static_default)].filter(Boolean);
//#endregion
//#region node_modules/nitro/dist/runtime/internal/error/prod.mjs
var errorHandler = (error, event) => {
	const res = defaultHandler(error, event);
	return new NodeResponse(typeof res.body === "string" ? res.body : JSON.stringify(res.body, null, 2), res);
};
function defaultHandler(error, event) {
	const unhandled = error.unhandled ?? !HTTPError.isError(error);
	const { status = 500, statusText = "" } = unhandled ? {} : error;
	if (status === 404) {
		const url = event.url || new URL(event.req.url);
		const baseURL = "/";
		if (/^\/[^/]/.test(baseURL) && !url.pathname.startsWith(baseURL)) return {
			status: 302,
			headers: new Headers({ location: `${baseURL}${url.pathname.slice(1)}${url.search}` })
		};
	}
	const headers = new Headers(unhandled ? {} : error.headers);
	headers.set("content-type", "application/json; charset=utf-8");
	return {
		status,
		statusText,
		headers,
		body: {
			error: true,
			...unhandled ? {
				status,
				unhandled: true
			} : typeof error.toJSON === "function" ? error.toJSON() : {
				status,
				statusText,
				message: error.message
			}
		}
	};
}
//#endregion
//#region #nitro/virtual/error-handler
var errorHandlers = [errorHandler];
async function error_handler_default(error, event) {
	for (const handler of errorHandlers) try {
		const response = await handler(error, event, { defaultHandler });
		if (response) return response;
	} catch (error) {
		console.error(error);
	}
}
//#endregion
//#region #nitro/virtual/app
function createNitroApp() {
	const captureError = (error, errorCtx) => {
		if (errorCtx?.event) {
			const errors = errorCtx.event.req.context?.nitro?.errors;
			if (errors) errors.push({
				error,
				context: errorCtx
			});
		}
	};
	const h3App = createH3App({ onError(error, event) {
		return error_handler_default(error, event);
	} });
	let appHandler = (req) => {
		req.context ||= {};
		req.context.nitro = req.context.nitro || { errors: [] };
		return h3App.fetch(req);
	};
	return {
		fetch: appHandler,
		h3: h3App,
		hooks: void 0,
		captureError
	};
}
function createH3App(config) {
	const h3App = new H3Core(config);
	h3App["~findRoute"] = (event) => findRoute(event.req.method, event.url.pathname);
	h3App["~middleware"].push(...globalMiddleware);
	h3App["~getMiddleware"] = (event, route) => {
		const pathname = event.url.pathname;
		const method = event.req.method;
		const middleware = [];
		const routeRules = getRouteRules(method, pathname);
		event.context.routeRules = routeRules?.routeRules;
		if (routeRules?.routeRuleMiddleware.length) middleware.push(...routeRules.routeRuleMiddleware);
		middleware.push(...h3App["~middleware"]);
		if (route?.data?.middleware?.length) middleware.push(...route.data.middleware);
		return middleware;
	};
	return h3App;
}
//#endregion
//#region node_modules/nitro/dist/runtime/internal/app.mjs
var APP_ID = "default";
function useNitroApp() {
	let instance = useNitroApp._instance;
	if (instance) return instance;
	instance = useNitroApp._instance = createNitroApp();
	globalThis.__nitro__ = globalThis.__nitro__ || {};
	globalThis.__nitro__[APP_ID] = instance;
	return instance;
}
function getRouteRules(method, pathname) {
	const m = findRouteRules(method, pathname);
	if (!m?.length) return { routeRuleMiddleware: [] };
	const routeRules = {};
	for (const layer of m) for (const rule of layer.data) {
		const currentRule = routeRules[rule.name];
		if (currentRule) {
			if (rule.options === false) {
				delete routeRules[rule.name];
				continue;
			}
			if (typeof currentRule.options === "object" && typeof rule.options === "object") currentRule.options = {
				...currentRule.options,
				...rule.options
			};
			else currentRule.options = rule.options;
			currentRule.route = rule.route;
			currentRule.params = {
				...currentRule.params,
				...layer.params
			};
		} else if (rule.options !== false) routeRules[rule.name] = {
			...rule,
			params: layer.params
		};
	}
	const middleware = [];
	const orderedRules = Object.values(routeRules).sort((a, b) => (a.handler?.order || 0) - (b.handler?.order || 0));
	for (const rule of orderedRules) {
		if (rule.options === false || !rule.handler) continue;
		middleware.push(rule.handler(rule));
	}
	return {
		routeRules,
		routeRuleMiddleware: middleware
	};
}
//#endregion
//#region node_modules/nitro/dist/runtime/internal/error/hooks.mjs
function _captureError(error, type) {
	console.error(`[${type}]`, error);
	useNitroApp().captureError?.(error, { tags: [type] });
}
function trapUnhandledErrors() {
	process.on("unhandledRejection", (error) => _captureError(error, "unhandledRejection"));
	process.on("uncaughtException", (error) => _captureError(error, "uncaughtException"));
}
//#endregion
//#region #nitro/virtual/tracing
var tracingSrvxPlugins = [];
//#endregion
//#region node_modules/nitro/dist/presets/node/runtime/node-server.mjs
var _parsedPort = Number.parseInt(process.env.NITRO_PORT ?? process.env.PORT ?? "");
var port = Number.isNaN(_parsedPort) ? 3e3 : _parsedPort;
var host = process.env.NITRO_HOST || process.env.HOST;
var cert = process.env.NITRO_SSL_CERT;
var key = process.env.NITRO_SSL_KEY;
var nitroApp = useNitroApp();
serve({
	port,
	hostname: host,
	tls: cert && key ? {
		cert,
		key
	} : void 0,
	fetch: nitroApp.fetch,
	plugins: [...tracingSrvxPlugins]
});
trapUnhandledErrors();
var node_server_default = {};
//#endregion
export { node_server_default as default };
