CSS was not being imported! Fixed: ✅ Added 'import ../styles/global.css' to BaseLayout.astro ✅ Rewrote CSS with plain CSS (not @apply which wasn't working) ✅ Cookie banner has inline styles as backup ✅ Font size: 16px base ✅ Solid colors: green-600 (#16a34a), gray-900 (#111827) ✅ Footer has policy links Build: 12 pages ✅
131 lines
12 KiB
JavaScript
131 lines
12 KiB
JavaScript
import '@astrojs/internal-helpers/path';
|
|
import 'cookie';
|
|
import 'kleur/colors';
|
|
import 'es-module-lexer';
|
|
import 'html-escaper';
|
|
import 'clsx';
|
|
import { N as NOOP_MIDDLEWARE_HEADER, g as decodeKey } from './chunks/astro/server_BKaehDWP.mjs';
|
|
|
|
const NOOP_MIDDLEWARE_FN = async (_ctx, next) => {
|
|
const response = await next();
|
|
response.headers.set(NOOP_MIDDLEWARE_HEADER, "true");
|
|
return response;
|
|
};
|
|
|
|
const codeToStatusMap = {
|
|
// Implemented from tRPC error code table
|
|
// https://trpc.io/docs/server/error-handling#error-codes
|
|
BAD_REQUEST: 400,
|
|
UNAUTHORIZED: 401,
|
|
FORBIDDEN: 403,
|
|
NOT_FOUND: 404,
|
|
TIMEOUT: 405,
|
|
CONFLICT: 409,
|
|
PRECONDITION_FAILED: 412,
|
|
PAYLOAD_TOO_LARGE: 413,
|
|
UNSUPPORTED_MEDIA_TYPE: 415,
|
|
UNPROCESSABLE_CONTENT: 422,
|
|
TOO_MANY_REQUESTS: 429,
|
|
CLIENT_CLOSED_REQUEST: 499,
|
|
INTERNAL_SERVER_ERROR: 500
|
|
};
|
|
Object.entries(codeToStatusMap).reduce(
|
|
// reverse the key-value pairs
|
|
(acc, [key, value]) => ({ ...acc, [value]: key }),
|
|
{}
|
|
);
|
|
|
|
function sanitizeParams(params) {
|
|
return Object.fromEntries(
|
|
Object.entries(params).map(([key, value]) => {
|
|
if (typeof value === "string") {
|
|
return [key, value.normalize().replace(/#/g, "%23").replace(/\?/g, "%3F")];
|
|
}
|
|
return [key, value];
|
|
})
|
|
);
|
|
}
|
|
function getParameter(part, params) {
|
|
if (part.spread) {
|
|
return params[part.content.slice(3)] || "";
|
|
}
|
|
if (part.dynamic) {
|
|
if (!params[part.content]) {
|
|
throw new TypeError(`Missing parameter: ${part.content}`);
|
|
}
|
|
return params[part.content];
|
|
}
|
|
return part.content.normalize().replace(/\?/g, "%3F").replace(/#/g, "%23").replace(/%5B/g, "[").replace(/%5D/g, "]");
|
|
}
|
|
function getSegment(segment, params) {
|
|
const segmentPath = segment.map((part) => getParameter(part, params)).join("");
|
|
return segmentPath ? "/" + segmentPath : "";
|
|
}
|
|
function getRouteGenerator(segments, addTrailingSlash) {
|
|
return (params) => {
|
|
const sanitizedParams = sanitizeParams(params);
|
|
let trailing = "";
|
|
if (addTrailingSlash === "always" && segments.length) {
|
|
trailing = "/";
|
|
}
|
|
const path = segments.map((segment) => getSegment(segment, sanitizedParams)).join("") + trailing;
|
|
return path || "/";
|
|
};
|
|
}
|
|
|
|
function deserializeRouteData(rawRouteData) {
|
|
return {
|
|
route: rawRouteData.route,
|
|
type: rawRouteData.type,
|
|
pattern: new RegExp(rawRouteData.pattern),
|
|
params: rawRouteData.params,
|
|
component: rawRouteData.component,
|
|
generate: getRouteGenerator(rawRouteData.segments, rawRouteData._meta.trailingSlash),
|
|
pathname: rawRouteData.pathname || void 0,
|
|
segments: rawRouteData.segments,
|
|
prerender: rawRouteData.prerender,
|
|
redirect: rawRouteData.redirect,
|
|
redirectRoute: rawRouteData.redirectRoute ? deserializeRouteData(rawRouteData.redirectRoute) : void 0,
|
|
fallbackRoutes: rawRouteData.fallbackRoutes.map((fallback) => {
|
|
return deserializeRouteData(fallback);
|
|
}),
|
|
isIndex: rawRouteData.isIndex
|
|
};
|
|
}
|
|
|
|
function deserializeManifest(serializedManifest) {
|
|
const routes = [];
|
|
for (const serializedRoute of serializedManifest.routes) {
|
|
routes.push({
|
|
...serializedRoute,
|
|
routeData: deserializeRouteData(serializedRoute.routeData)
|
|
});
|
|
const route = serializedRoute;
|
|
route.routeData = deserializeRouteData(serializedRoute.routeData);
|
|
}
|
|
const assets = new Set(serializedManifest.assets);
|
|
const componentMetadata = new Map(serializedManifest.componentMetadata);
|
|
const inlinedScripts = new Map(serializedManifest.inlinedScripts);
|
|
const clientDirectives = new Map(serializedManifest.clientDirectives);
|
|
const serverIslandNameMap = new Map(serializedManifest.serverIslandNameMap);
|
|
const key = decodeKey(serializedManifest.key);
|
|
return {
|
|
// in case user middleware exists, this no-op middleware will be reassigned (see plugin-ssr.ts)
|
|
middleware() {
|
|
return { onRequest: NOOP_MIDDLEWARE_FN };
|
|
},
|
|
...serializedManifest,
|
|
assets,
|
|
componentMetadata,
|
|
inlinedScripts,
|
|
clientDirectives,
|
|
routes,
|
|
serverIslandNameMap,
|
|
key
|
|
};
|
|
}
|
|
|
|
const manifest = deserializeManifest({"hrefRoot":"file:///Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/","adapterName":"","routes":[{"file":"file:///Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/dist/404.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/404","isIndex":false,"type":"page","pattern":"^\\/404\\/?$","segments":[[{"content":"404","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/404.astro","pathname":"/404","prerender":true,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"file:///Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/dist/about-us.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/about-us","isIndex":true,"type":"page","pattern":"^\\/about-us\\/?$","segments":[[{"content":"about-us","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/about-us/index.astro","pathname":"/about-us","prerender":true,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"file:///Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/dist/contact-us.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/contact-us","isIndex":true,"type":"page","pattern":"^\\/contact-us\\/?$","segments":[[{"content":"contact-us","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/contact-us/index.astro","pathname":"/contact-us","prerender":true,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"file:///Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/dist/join-us.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/join-us","isIndex":true,"type":"page","pattern":"^\\/join-us\\/?$","segments":[[{"content":"join-us","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/join-us/index.astro","pathname":"/join-us","prerender":true,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"file:///Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/dist/portfolio.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/portfolio","isIndex":true,"type":"page","pattern":"^\\/portfolio\\/?$","segments":[[{"content":"portfolio","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/portfolio/index.astro","pathname":"/portfolio","prerender":true,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"file:///Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/dist/product.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/product","isIndex":true,"type":"page","pattern":"^\\/product\\/?$","segments":[[{"content":"product","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/product/index.astro","pathname":"/product","prerender":true,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"file:///Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/dist/sales-engineer.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/sales-engineer","isIndex":true,"type":"page","pattern":"^\\/sales-engineer\\/?$","segments":[[{"content":"sales-engineer","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/sales-engineer/index.astro","pathname":"/sales-engineer","prerender":true,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"file:///Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/dist/services.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/services","isIndex":true,"type":"page","pattern":"^\\/services\\/?$","segments":[[{"content":"services","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/services/index.astro","pathname":"/services","prerender":true,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"file:///Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/dist/index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/","isIndex":true,"type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","prerender":true,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}}],"base":"/","trailingSlash":"ignore","compressHTML":true,"componentMetadata":[["/Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/src/pages/404.astro",{"propagation":"none","containsHead":true}],["/Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/src/pages/about-us/index.astro",{"propagation":"none","containsHead":true}],["/Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/src/pages/contact-us/index.astro",{"propagation":"none","containsHead":true}],["/Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/src/pages/index.astro",{"propagation":"none","containsHead":true}],["/Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/src/pages/join-us/index.astro",{"propagation":"none","containsHead":true}],["/Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/src/pages/portfolio/index.astro",{"propagation":"none","containsHead":true}],["/Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/src/pages/product/index.astro",{"propagation":"none","containsHead":true}],["/Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/src/pages/sales-engineer/index.astro",{"propagation":"none","containsHead":true}],["/Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/src/pages/services/index.astro",{"propagation":"none","containsHead":true}]],"renderers":[],"clientDirectives":[["idle","(()=>{var l=(o,t)=>{let i=async()=>{await(await o())()},e=typeof t.value==\"object\"?t.value:void 0,s={timeout:e==null?void 0:e.timeout};\"requestIdleCallback\"in window?window.requestIdleCallback(i,s):setTimeout(i,s.timeout||200)};(self.Astro||(self.Astro={})).idle=l;window.dispatchEvent(new Event(\"astro:idle\"));})();"],["load","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).load=e;window.dispatchEvent(new Event(\"astro:load\"));})();"],["media","(()=>{var s=(i,t)=>{let a=async()=>{await(await i())()};if(t.value){let e=matchMedia(t.value);e.matches?a():e.addEventListener(\"change\",a,{once:!0})}};(self.Astro||(self.Astro={})).media=s;window.dispatchEvent(new Event(\"astro:media\"));})();"],["only","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).only=e;window.dispatchEvent(new Event(\"astro:only\"));})();"],["visible","(()=>{var l=(s,i,o)=>{let r=async()=>{await(await s())()},t=typeof i.value==\"object\"?i.value:void 0,c={rootMargin:t==null?void 0:t.rootMargin},n=new IntersectionObserver(e=>{for(let a of e)if(a.isIntersecting){n.disconnect(),r();break}},c);for(let e of o.children)n.observe(e)};(self.Astro||(self.Astro={})).visible=l;window.dispatchEvent(new Event(\"astro:visible\"));})();"]],"entryModules":{"\u0000noop-middleware":"_noop-middleware.mjs","\u0000@astro-page:src/pages/404@_@astro":"pages/404.astro.mjs","\u0000@astro-page:src/pages/about-us/index@_@astro":"pages/about-us.astro.mjs","\u0000@astro-page:src/pages/contact-us/index@_@astro":"pages/contact-us.astro.mjs","\u0000@astro-page:src/pages/join-us/index@_@astro":"pages/join-us.astro.mjs","\u0000@astro-page:src/pages/portfolio/index@_@astro":"pages/portfolio.astro.mjs","\u0000@astro-page:src/pages/product/index@_@astro":"pages/product.astro.mjs","\u0000@astro-page:src/pages/sales-engineer/index@_@astro":"pages/sales-engineer.astro.mjs","\u0000@astro-page:src/pages/services/index@_@astro":"pages/services.astro.mjs","\u0000@astro-page:src/pages/index@_@astro":"pages/index.astro.mjs","\u0000@astro-renderers":"renderers.mjs","\u0000@astrojs-manifest":"manifest_C7P9KV_x.mjs","/astro/hoisted.js?q=0":"_astro/hoisted.BkoFJ0Lt.js","astro:scripts/before-hydration.js":""},"inlinedScripts":[],"assets":["/file:///Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/dist/404.html","/file:///Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/dist/about-us.html","/file:///Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/dist/contact-us.html","/file:///Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/dist/join-us.html","/file:///Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/dist/portfolio.html","/file:///Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/dist/product.html","/file:///Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/dist/sales-engineer.html","/file:///Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/dist/services.html","/file:///Users/kunthawatgreethong/Gitea/dealplustech/dealplustech-astro/dist/index.html"],"buildFormat":"file","checkOrigin":false,"serverIslandNameMap":[],"key":"wthnbtLxqJZn6DdiMr4p/BcG5c7tkDB0Gpgo4LGMk3k=","experimentalEnvGetSecretEnabled":false});
|
|
|
|
export { manifest };
|