import '@astrojs/internal-helpers/path';
import 'cookie';
import 'kleur/colors';
import { N as NOOP_MIDDLEWARE_FN } from './chunks/astro-designed-error-pages_DsfhG0WT.mjs';
import 'es-module-lexer';
import { g as decodeKey } from './chunks/astro/server_DrnzQWw3.mjs';
import 'clsx';

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/drfelfel/ruseemrooz/","adapterName":"@astrojs/node","routes":[{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"type":"endpoint","isIndex":false,"route":"/_image","pattern":"^\\/_image$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"node_modules/astro/dist/assets/endpoint/node.js","pathname":"/_image","prerender":false,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[{"type":"external","src":"/_astro/_page_.RC7LoXVl.css"}],"routeData":{"route":"/admin/login","isIndex":false,"type":"page","pattern":"^\\/admin\\/login\\/?$","segments":[[{"content":"admin","dynamic":false,"spread":false}],[{"content":"login","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/admin/login.astro","pathname":"/admin/login","prerender":false,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.ClNlXW51.js"}],"styles":[{"type":"external","src":"/_astro/_page_.RC7LoXVl.css"}],"routeData":{"route":"/admin","isIndex":true,"type":"page","pattern":"^\\/admin\\/?$","segments":[[{"content":"admin","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/admin/index.astro","pathname":"/admin","prerender":false,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/api/admin/login","isIndex":false,"type":"endpoint","pattern":"^\\/api\\/admin\\/login\\/?$","segments":[[{"content":"api","dynamic":false,"spread":false}],[{"content":"admin","dynamic":false,"spread":false}],[{"content":"login","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/api/admin/login.ts","pathname":"/api/admin/login","prerender":false,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/api/admin/logout","isIndex":false,"type":"endpoint","pattern":"^\\/api\\/admin\\/logout\\/?$","segments":[[{"content":"api","dynamic":false,"spread":false}],[{"content":"admin","dynamic":false,"spread":false}],[{"content":"logout","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/api/admin/logout.ts","pathname":"/api/admin/logout","prerender":false,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/api/admin/save","isIndex":false,"type":"endpoint","pattern":"^\\/api\\/admin\\/save\\/?$","segments":[[{"content":"api","dynamic":false,"spread":false}],[{"content":"admin","dynamic":false,"spread":false}],[{"content":"save","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/api/admin/save.ts","pathname":"/api/admin/save","prerender":false,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/api/admin/upload","isIndex":false,"type":"endpoint","pattern":"^\\/api\\/admin\\/upload\\/?$","segments":[[{"content":"api","dynamic":false,"spread":false}],[{"content":"admin","dynamic":false,"spread":false}],[{"content":"upload","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/api/admin/upload.ts","pathname":"/api/admin/upload","prerender":false,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/api/agents/tass","isIndex":false,"type":"endpoint","pattern":"^\\/api\\/agents\\/tass\\/?$","segments":[[{"content":"api","dynamic":false,"spread":false}],[{"content":"agents","dynamic":false,"spread":false}],[{"content":"tass","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/api/agents/tass.ts","pathname":"/api/agents/tass","prerender":false,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/api/posts/publish","isIndex":false,"type":"endpoint","pattern":"^\\/api\\/posts\\/publish\\/?$","segments":[[{"content":"api","dynamic":false,"spread":false}],[{"content":"posts","dynamic":false,"spread":false}],[{"content":"publish","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/api/posts/publish.ts","pathname":"/api/posts/publish","prerender":false,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[{"type":"external","src":"/_astro/_page_.RC7LoXVl.css"}],"routeData":{"route":"/categories/[category]","isIndex":false,"type":"page","pattern":"^\\/categories\\/([^/]+?)\\/?$","segments":[[{"content":"categories","dynamic":false,"spread":false}],[{"content":"category","dynamic":true,"spread":false}]],"params":["category"],"component":"src/pages/categories/[category].astro","prerender":false,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[{"type":"external","src":"/_astro/_page_.RC7LoXVl.css"}],"routeData":{"route":"/posts/[slug]","isIndex":false,"type":"page","pattern":"^\\/posts\\/([^/]+?)\\/?$","segments":[[{"content":"posts","dynamic":false,"spread":false}],[{"content":"slug","dynamic":true,"spread":false}]],"params":["slug"],"component":"src/pages/posts/[slug].astro","prerender":false,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[{"type":"external","src":"/_astro/_page_.RC7LoXVl.css"}],"routeData":{"route":"/posts","isIndex":true,"type":"page","pattern":"^\\/posts\\/?$","segments":[[{"content":"posts","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/posts/index.astro","pathname":"/posts","prerender":false,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[{"type":"external","src":"/_astro/_page_.RC7LoXVl.css"}],"routeData":{"route":"/search","isIndex":true,"type":"page","pattern":"^\\/search\\/?$","segments":[[{"content":"search","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/search/index.astro","pathname":"/search","prerender":false,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[{"type":"external","src":"/_astro/_page_.RC7LoXVl.css"}],"routeData":{"route":"/[page]","isIndex":false,"type":"page","pattern":"^\\/([^/]+?)\\/?$","segments":[[{"content":"page","dynamic":true,"spread":false}]],"params":["page"],"component":"src/pages/[page].astro","prerender":false,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[{"type":"external","src":"/_astro/_page_.RC7LoXVl.css"}],"routeData":{"route":"/","isIndex":true,"type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","prerender":false,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}}],"base":"/","trailingSlash":"ignore","compressHTML":true,"componentMetadata":[["/Users/drfelfel/ruseemrooz/src/pages/admin/login.astro",{"propagation":"none","containsHead":true}],["/Users/drfelfel/ruseemrooz/src/pages/[page].astro",{"propagation":"none","containsHead":true}],["/Users/drfelfel/ruseemrooz/src/pages/admin/index.astro",{"propagation":"none","containsHead":true}],["/Users/drfelfel/ruseemrooz/src/pages/categories/[category].astro",{"propagation":"none","containsHead":true}],["/Users/drfelfel/ruseemrooz/src/pages/index.astro",{"propagation":"none","containsHead":true}],["/Users/drfelfel/ruseemrooz/src/pages/posts/[slug].astro",{"propagation":"none","containsHead":true}],["/Users/drfelfel/ruseemrooz/src/pages/posts/index.astro",{"propagation":"none","containsHead":true}],["/Users/drfelfel/ruseemrooz/src/pages/search/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":{"\u0000@astro-page:node_modules/astro/dist/assets/endpoint/node@_@js":"pages/_image.astro.mjs","\u0000@astro-page:src/pages/[page]@_@astro":"pages/_page_.astro.mjs","\u0000@astro-page:src/pages/admin/index@_@astro":"pages/admin.astro.mjs","\u0000@astro-page:src/pages/admin/login@_@astro":"pages/admin/login.astro.mjs","\u0000@astro-page:src/pages/api/admin/login@_@ts":"pages/api/admin/login.astro.mjs","\u0000@astro-page:src/pages/api/admin/logout@_@ts":"pages/api/admin/logout.astro.mjs","\u0000@astro-page:src/pages/api/admin/save@_@ts":"pages/api/admin/save.astro.mjs","\u0000@astro-page:src/pages/api/admin/upload@_@ts":"pages/api/admin/upload.astro.mjs","\u0000@astro-page:src/pages/api/agents/tass@_@ts":"pages/api/agents/tass.astro.mjs","\u0000@astro-page:src/pages/api/posts/publish@_@ts":"pages/api/posts/publish.astro.mjs","\u0000@astro-page:src/pages/categories/[category]@_@astro":"pages/categories/_category_.astro.mjs","\u0000@astro-page:src/pages/index@_@astro":"pages/index.astro.mjs","\u0000@astro-page:src/pages/posts/[slug]@_@astro":"pages/posts/_slug_.astro.mjs","\u0000@astro-page:src/pages/posts/index@_@astro":"pages/posts.astro.mjs","\u0000@astro-page:src/pages/search/index@_@astro":"pages/search.astro.mjs","\u0000@astrojs-ssr-virtual-entry":"entry.mjs","\u0000@astro-renderers":"renderers.mjs","\u0000noop-middleware":"_noop-middleware.mjs","\u0000@astrojs-ssr-adapter":"_@astrojs-ssr-adapter.mjs","/Users/drfelfel/ruseemrooz/node_modules/astro/dist/env/setup.js":"chunks/astro/env-setup_Cr6XTFvb.mjs","\u0000@astrojs-manifest":"manifest_Bsmp4TY0.mjs","/astro/hoisted.js?q=0":"_astro/hoisted.ClNlXW51.js","astro:scripts/before-hydration.js":""},"inlinedScripts":[],"assets":["/_astro/_page_.RC7LoXVl.css","/_astro/hoisted.ClNlXW51.js","/assets/logo.png","/uploads/0dfaf688-a3f5-4914-b0a5-14a720c212bf.webp","/uploads/10d5c9bf-849e-4ddd-a7d8-dd5dc6a2e666.webp","/uploads/15a3a254-12db-4851-a434-cae6e631838d.webp","/uploads/23ed9cea-411b-4169-a905-a40bd503d8c6.webp","/uploads/2d77aee7-e390-4ca2-8100-d0e6528c145a.webp","/uploads/3b043c9d-57bf-46f2-9fb2-9c8be53bbcf5.webp","/uploads/553d2a2a-b924-401e-988d-1db34a907355.webp","/uploads/70cc796b-ee3c-49c8-8939-d0fe0dde1554.webp","/uploads/7c59fcfa-93cc-4d1d-b2be-d491eb482302.webp","/uploads/9de7af87-a5f2-4299-bc4e-6c3a17ee9f4d.webp","/uploads/ad228b50-fe89-40a6-b17d-87440c24d6a5.webp","/uploads/af246b9a-cf64-43c2-934d-edb5d8f0b8ee.webp","/uploads/d0858db4-fcc3-43b4-b120-53cc41a4473c.webp","/uploads/d3a18a75-4a6f-48c6-b3a5-c10f6fe798d7.webp","/uploads/eaebf85a-c702-4eb6-ae0d-02a752761ea5.webp","/uploads/eb8a9dae-70da-4887-8a36-75f660ccd42a.webp","/uploads/f1b83771-f192-46f1-8629-6982d42c3b48.webp","/uploads/fcdcd26a-1029-46ec-adae-8013cbe48022.webp","/uploads/thumbs/0dfaf688-a3f5-4914-b0a5-14a720c212bf-thumb.webp","/uploads/thumbs/10d5c9bf-849e-4ddd-a7d8-dd5dc6a2e666-thumb.webp","/uploads/thumbs/15a3a254-12db-4851-a434-cae6e631838d-thumb.webp","/uploads/thumbs/23ed9cea-411b-4169-a905-a40bd503d8c6-thumb.webp","/uploads/thumbs/2d77aee7-e390-4ca2-8100-d0e6528c145a-thumb.webp","/uploads/thumbs/3b043c9d-57bf-46f2-9fb2-9c8be53bbcf5-thumb.webp","/uploads/thumbs/553d2a2a-b924-401e-988d-1db34a907355-thumb.webp","/uploads/thumbs/70cc796b-ee3c-49c8-8939-d0fe0dde1554-thumb.webp","/uploads/thumbs/7c59fcfa-93cc-4d1d-b2be-d491eb482302-thumb.webp","/uploads/thumbs/9de7af87-a5f2-4299-bc4e-6c3a17ee9f4d-thumb.webp","/uploads/thumbs/ad228b50-fe89-40a6-b17d-87440c24d6a5-thumb.webp","/uploads/thumbs/af246b9a-cf64-43c2-934d-edb5d8f0b8ee-thumb.webp","/uploads/thumbs/d0858db4-fcc3-43b4-b120-53cc41a4473c-thumb.webp","/uploads/thumbs/d3a18a75-4a6f-48c6-b3a5-c10f6fe798d7-thumb.webp","/uploads/thumbs/eaebf85a-c702-4eb6-ae0d-02a752761ea5-thumb.webp","/uploads/thumbs/eb8a9dae-70da-4887-8a36-75f660ccd42a-thumb.webp","/uploads/thumbs/f1b83771-f192-46f1-8629-6982d42c3b48-thumb.webp","/uploads/thumbs/fcdcd26a-1029-46ec-adae-8013cbe48022-thumb.webp"],"buildFormat":"directory","checkOrigin":false,"serverIslandNameMap":[],"key":"OhI/yogBBHSD6O6vam4wRfoY752RA0hpsC3pYM9PZfk=","experimentalEnvGetSecretEnabled":false});

export { manifest };
