@angular/ssr 19.0.0-next.4 → 19.0.0-next.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/fesm2022/ssr.mjs CHANGED
@@ -575,7 +575,8 @@ async function getRoutesFromAngularRouterConfig(bootstrap, document, url) {
575
575
  async function extractRoutesAndCreateRouteTree(url, manifest = getAngularAppManifest()) {
576
576
  const routeTree = new RouteTree();
577
577
  const document = await new ServerAssets(manifest).getIndexServerHtml();
578
- const { baseHref, routes } = await getRoutesFromAngularRouterConfig(await manifest.bootstrap(), document, url);
578
+ const bootstrap = await manifest.bootstrap();
579
+ const { baseHref, routes } = await getRoutesFromAngularRouterConfig(bootstrap, document, url);
579
580
  for (let { route, redirectTo } of routes) {
580
581
  route = joinUrlParts(baseHref, route);
581
582
  redirectTo = redirectTo === undefined ? undefined : joinUrlParts(baseHref, redirectTo);
@@ -1 +1 @@
1
- {"version":3,"file":"ssr.mjs","sources":["../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/assets.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/console.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/manifest.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/utils/url.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/utils/ng.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/routes/route-tree.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/routes/ng-routes.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/hooks.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/routes/router.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/tokens.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/utils/inline-critical-css.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/app.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/private_export.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/i18n.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/app-engine.mjs"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Manages server-side assets.\n */\nexport class ServerAssets {\n /**\n * Creates an instance of ServerAsset.\n *\n * @param manifest - The manifest containing the server assets.\n */\n constructor(manifest) {\n this.manifest = manifest;\n }\n /**\n * Retrieves the content of a server-side asset using its path.\n *\n * @param path - The path to the server asset.\n * @returns A promise that resolves to the asset content as a string.\n * @throws Error If the asset path is not found in the manifest, an error is thrown.\n */\n async getServerAsset(path) {\n const asset = this.manifest.assets.get(path);\n if (!asset) {\n throw new Error(`Server asset '${path}' does not exist.`);\n }\n return asset();\n }\n /**\n * Retrieves and caches the content of 'index.server.html'.\n *\n * @returns A promise that resolves to the content of 'index.server.html'.\n * @throws Error If there is an issue retrieving the asset.\n */\n getIndexServerHtml() {\n return this.getServerAsset('index.server.html');\n }\n}\n//# sourceMappingURL=assets.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { ɵConsole } from '@angular/core';\n/**\n * Custom implementation of the Angular Console service that filters out specific log messages.\n *\n * This class extends the internal Angular `ɵConsole` class to provide customized logging behavior.\n * It overrides the `log` method to suppress logs that match certain predefined messages.\n */\nexport class Console extends ɵConsole {\n constructor() {\n super(...arguments);\n /**\n * A set of log messages that should be ignored and not printed to the console.\n */\n this.ignoredLogs = new Set(['Angular is running in development mode.']);\n }\n /**\n * Logs a message to the console if it is not in the set of ignored messages.\n *\n * @param message - The message to log to the console.\n *\n * This method overrides the `log` method of the `ɵConsole` class. It checks if the\n * message is in the `ignoredLogs` set. If it is not, it delegates the logging to\n * the parent class's `log` method. Otherwise, the message is suppressed.\n */\n log(message) {\n if (!this.ignoredLogs.has(message)) {\n super.log(message);\n }\n }\n}\n//# sourceMappingURL=console.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * The Angular app manifest object.\n * This is used internally to store the current Angular app manifest.\n */\nlet angularAppManifest;\n/**\n * Sets the Angular app manifest.\n *\n * @param manifest - The manifest object to set for the Angular application.\n */\nexport function setAngularAppManifest(manifest) {\n angularAppManifest = manifest;\n}\n/**\n * Gets the Angular app manifest.\n *\n * @returns The Angular app manifest.\n * @throws Will throw an error if the Angular app manifest is not set.\n */\nexport function getAngularAppManifest() {\n if (!angularAppManifest) {\n throw new Error('Angular app manifest is not set. ' +\n `Please ensure you are using the '@angular/build:application' builder to build your server application.`);\n }\n return angularAppManifest;\n}\n/**\n * The Angular app engine manifest object.\n * This is used internally to store the current Angular app engine manifest.\n */\nlet angularAppEngineManifest;\n/**\n * Sets the Angular app engine manifest.\n *\n * @param manifest - The engine manifest object to set.\n */\nexport function setAngularAppEngineManifest(manifest) {\n angularAppEngineManifest = manifest;\n}\n/**\n * Gets the Angular app engine manifest.\n *\n * @returns The Angular app engine manifest.\n * @throws Will throw an error if the Angular app engine manifest is not set.\n */\nexport function getAngularAppEngineManifest() {\n if (!angularAppEngineManifest) {\n throw new Error('Angular app engine manifest is not set. ' +\n `Please ensure you are using the '@angular/build:application' builder to build your server application.`);\n }\n return angularAppEngineManifest;\n}\n//# sourceMappingURL=manifest.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Removes the trailing slash from a URL if it exists.\n *\n * @param url - The URL string from which to remove the trailing slash.\n * @returns The URL string without a trailing slash.\n *\n * @example\n * ```js\n * stripTrailingSlash('path/'); // 'path'\n * stripTrailingSlash('/path'); // '/path'\n * ```\n */\nexport function stripTrailingSlash(url) {\n // Check if the last character of the URL is a slash\n return url[url.length - 1] === '/' ? url.slice(0, -1) : url;\n}\n/**\n * Joins URL parts into a single URL string.\n *\n * This function takes multiple URL segments, normalizes them by removing leading\n * and trailing slashes where appropriate, and then joins them into a single URL.\n *\n * @param parts - The parts of the URL to join. Each part can be a string with or without slashes.\n * @returns The joined URL string, with normalized slashes.\n *\n * @example\n * ```js\n * joinUrlParts('path/', '/to/resource'); // '/path/to/resource'\n * joinUrlParts('/path/', 'to/resource'); // '/path/to/resource'\n * ```\n */\nexport function joinUrlParts(...parts) {\n // Initialize an array with an empty string to always add a leading slash\n const normalizeParts = [''];\n for (const part of parts) {\n if (part === '') {\n // Skip any empty parts\n continue;\n }\n let normalizedPart = part;\n if (part[0] === '/') {\n normalizedPart = normalizedPart.slice(1);\n }\n if (part[part.length - 1] === '/') {\n normalizedPart = normalizedPart.slice(0, -1);\n }\n if (normalizedPart !== '') {\n normalizeParts.push(normalizedPart);\n }\n }\n return normalizeParts.join('/');\n}\n/**\n * Strips `/index.html` from the end of a URL's path, if present.\n *\n * This function is used to convert URLs pointing to an `index.html` file into their directory\n * equivalents. For example, it transforms a URL like `http://www.example.com/page/index.html`\n * into `http://www.example.com/page`.\n *\n * @param url - The URL object to process.\n * @returns A new URL object with `/index.html` removed from the path, if it was present.\n *\n * @example\n * ```typescript\n * const originalUrl = new URL('http://www.example.com/page/index.html');\n * const cleanedUrl = stripIndexHtmlFromURL(originalUrl);\n * console.log(cleanedUrl.href); // Output: 'http://www.example.com/page'\n * ```\n */\nexport function stripIndexHtmlFromURL(url) {\n if (url.pathname.endsWith('/index.html')) {\n const modifiedURL = new URL(url);\n // Remove '/index.html' from the pathname\n modifiedURL.pathname = modifiedURL.pathname.slice(0, /** '/index.html'.length */ -11);\n return modifiedURL;\n }\n return url;\n}\n//# sourceMappingURL=url.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { renderApplication, renderModule } from '@angular/platform-server';\nimport { stripIndexHtmlFromURL } from './url';\n/**\n * Renders an Angular application or module to an HTML string.\n *\n * This function determines whether the provided `bootstrap` value is an Angular module\n * or a bootstrap function and calls the appropriate rendering method (`renderModule` or\n * `renderApplication`) based on that determination.\n *\n * @param html - The HTML string to be used as the initial document content.\n * @param bootstrap - Either an Angular module type or a function that returns a promise\n * resolving to an `ApplicationRef`.\n * @param url - The URL of the application. This is used for server-side rendering to\n * correctly handle route-based rendering.\n * @param platformProviders - An array of platform providers to be used during the\n * rendering process.\n * @returns A promise that resolves to a string containing the rendered HTML.\n */\nexport function renderAngular(html, bootstrap, url, platformProviders) {\n // A request to `http://www.example.com/page/index.html` will render the Angular route corresponding to `http://www.example.com/page`.\n const urlToRender = stripIndexHtmlFromURL(url).toString();\n return isNgModule(bootstrap)\n ? renderModule(bootstrap, {\n url: urlToRender,\n document: html,\n extraProviders: platformProviders,\n })\n : renderApplication(bootstrap, {\n url: urlToRender,\n document: html,\n platformProviders,\n });\n}\n/**\n * Type guard to determine if a given value is an Angular module.\n * Angular modules are identified by the presence of the `ɵmod` static property.\n * This function helps distinguish between Angular modules and bootstrap functions.\n *\n * @param value - The value to be checked.\n * @returns True if the value is an Angular module (i.e., it has the `ɵmod` property), false otherwise.\n */\nexport function isNgModule(value) {\n return 'ɵmod' in value;\n}\n//# sourceMappingURL=ng.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { stripTrailingSlash } from '../utils/url';\n/**\n * A route tree implementation that supports efficient route matching, including support for wildcard routes.\n * This structure is useful for organizing and retrieving routes in a hierarchical manner,\n * enabling complex routing scenarios with nested paths.\n */\nexport class RouteTree {\n constructor() {\n /**\n * The root node of the route tree.\n * All routes are stored and accessed relative to this root node.\n */\n this.root = this.createEmptyRouteTreeNode('');\n /**\n * A counter that tracks the order of route insertion.\n * This ensures that routes are matched in the order they were defined,\n * with earlier routes taking precedence.\n */\n this.insertionIndexCounter = 0;\n }\n /**\n * Inserts a new route into the route tree.\n * The route is broken down into segments, and each segment is added to the tree.\n * Parameterized segments (e.g., :id) are normalized to wildcards (*) for matching purposes.\n *\n * @param route - The route path to insert into the tree.\n * @param metadata - Metadata associated with the route, excluding the route path itself.\n */\n insert(route, metadata) {\n let node = this.root;\n const normalizedRoute = stripTrailingSlash(route);\n const segments = normalizedRoute.split('/');\n for (const segment of segments) {\n // Replace parameterized segments (e.g., :id) with a wildcard (*) for matching\n const normalizedSegment = segment[0] === ':' ? '*' : segment;\n let childNode = node.children.get(normalizedSegment);\n if (!childNode) {\n childNode = this.createEmptyRouteTreeNode(normalizedSegment);\n node.children.set(normalizedSegment, childNode);\n }\n node = childNode;\n }\n // At the leaf node, store the full route and its associated metadata\n node.metadata = {\n ...metadata,\n route: normalizedRoute,\n };\n node.insertionIndex = this.insertionIndexCounter++;\n }\n /**\n * Matches a given route against the route tree and returns the best matching route's metadata.\n * The best match is determined by the lowest insertion index, meaning the earliest defined route\n * takes precedence.\n *\n * @param route - The route path to match against the route tree.\n * @returns The metadata of the best matching route or `undefined` if no match is found.\n */\n match(route) {\n const segments = stripTrailingSlash(route).split('/');\n return this.traverseBySegments(segments)?.metadata;\n }\n /**\n * Converts the route tree into a serialized format representation.\n * This method converts the route tree into an array of metadata objects that describe the structure of the tree.\n * The array represents the routes in a nested manner where each entry includes the route and its associated metadata.\n *\n * @returns An array of `RouteTreeNodeMetadata` objects representing the route tree structure.\n * Each object includes the `route` and associated metadata of a route.\n */\n toObject() {\n return Array.from(this.traverse());\n }\n /**\n * Constructs a `RouteTree` from an object representation.\n * This method is used to recreate a `RouteTree` instance from an array of metadata objects.\n * The array should be in the format produced by `toObject`, allowing for the reconstruction of the route tree\n * with the same routes and metadata.\n *\n * @param value - An array of `RouteTreeNodeMetadata` objects that represent the serialized format of the route tree.\n * Each object should include a `route` and its associated metadata.\n * @returns A new `RouteTree` instance constructed from the provided metadata objects.\n */\n static fromObject(value) {\n const tree = new RouteTree();\n for (const { route, ...metadata } of value) {\n tree.insert(route, metadata);\n }\n return tree;\n }\n /**\n * A generator function that recursively traverses the route tree and yields the metadata of each node.\n * This allows for easy and efficient iteration over all nodes in the tree.\n *\n * @param node - The current node to start the traversal from. Defaults to the root node of the tree.\n */\n *traverse(node = this.root) {\n if (node.metadata) {\n yield node.metadata;\n }\n for (const childNode of node.children.values()) {\n yield* this.traverse(childNode);\n }\n }\n /**\n * Recursively traverses the route tree from a given node, attempting to match the remaining route segments.\n * If the node is a leaf node (no more segments to match) and contains metadata, the node is yielded.\n *\n * This function prioritizes exact segment matches first, followed by wildcard matches (`*`),\n * and finally deep wildcard matches (`**`) that consume all segments.\n *\n * @param remainingSegments - The remaining segments of the route path to match.\n * @param node - The current node in the route tree to start traversal from.\n *\n * @returns The node that best matches the remaining segments or `undefined` if no match is found.\n */\n traverseBySegments(remainingSegments, node = this.root) {\n const { metadata, children } = node;\n // If there are no remaining segments and the node has metadata, return this node\n if (!remainingSegments?.length) {\n if (metadata) {\n return node;\n }\n return;\n }\n // If the node has no children, end the traversal\n if (!children.size) {\n return;\n }\n const [segment, ...restSegments] = remainingSegments;\n let currentBestMatchNode;\n // 1. Exact segment match\n const exactMatchNode = node.children.get(segment);\n currentBestMatchNode = this.getHigherPriorityNode(currentBestMatchNode, this.traverseBySegments(restSegments, exactMatchNode));\n // 2. Wildcard segment match (`*`)\n const wildcardNode = node.children.get('*');\n currentBestMatchNode = this.getHigherPriorityNode(currentBestMatchNode, this.traverseBySegments(restSegments, wildcardNode));\n // 3. Deep wildcard segment match (`**`)\n const deepWildcardNode = node.children.get('**');\n currentBestMatchNode = this.getHigherPriorityNode(currentBestMatchNode, deepWildcardNode);\n return currentBestMatchNode;\n }\n /**\n * Compares two nodes and returns the node with higher priority based on insertion index.\n * A node with a lower insertion index is prioritized as it was defined earlier.\n *\n * @param currentBestMatchNode - The current best match node.\n * @param candidateNode - The node being evaluated for higher priority based on insertion index.\n * @returns The node with higher priority (i.e., lower insertion index). If one of the nodes is `undefined`, the other node is returned.\n */\n getHigherPriorityNode(currentBestMatchNode, candidateNode) {\n if (!candidateNode) {\n return currentBestMatchNode;\n }\n if (!currentBestMatchNode) {\n return candidateNode;\n }\n return candidateNode.insertionIndex < currentBestMatchNode.insertionIndex\n ? candidateNode\n : currentBestMatchNode;\n }\n /**\n * Creates an empty route tree node with the specified segment.\n * This helper function is used during the tree construction.\n *\n * @param segment - The route segment that this node represents.\n * @returns A new, empty route tree node.\n */\n createEmptyRouteTreeNode(segment) {\n return {\n segment,\n insertionIndex: -1,\n children: new Map(),\n };\n }\n}\n//# sourceMappingURL=route-tree.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { APP_BASE_HREF, PlatformLocation } from '@angular/common';\nimport { ApplicationRef, Compiler, createPlatformFactory, platformCore, ɵwhenStable as whenStable, ɵConsole, } from '@angular/core';\nimport { INITIAL_CONFIG, ɵINTERNAL_SERVER_PLATFORM_PROVIDERS as INTERNAL_SERVER_PLATFORM_PROVIDERS, } from '@angular/platform-server';\nimport { Router, ɵloadChildren as loadChildrenHelper } from '@angular/router';\nimport { ServerAssets } from '../assets';\nimport { Console } from '../console';\nimport { getAngularAppManifest } from '../manifest';\nimport { isNgModule } from '../utils/ng';\nimport { joinUrlParts } from '../utils/url';\nimport { RouteTree } from './route-tree';\n/**\n * Recursively traverses the Angular router configuration to retrieve routes.\n *\n * Iterates through the router configuration, yielding each route along with its potential\n * redirection or error status. Handles nested routes and lazy-loaded child routes.\n *\n * @param options - An object containing the parameters for traversing routes.\n * @returns An async iterator yielding `RouteResult` objects.\n */\nasync function* traverseRoutesConfig(options) {\n const { routes, compiler, parentInjector, parentRoute } = options;\n for (const route of routes) {\n const { path = '', redirectTo, loadChildren, children } = route;\n const currentRoutePath = joinUrlParts(parentRoute, path);\n yield {\n route: currentRoutePath,\n redirectTo: typeof redirectTo === 'string'\n ? resolveRedirectTo(currentRoutePath, redirectTo)\n : undefined,\n };\n if (children?.length) {\n // Recursively process child routes.\n yield* traverseRoutesConfig({\n routes: children,\n compiler,\n parentInjector,\n parentRoute: currentRoutePath,\n });\n }\n if (loadChildren) {\n // Load and process lazy-loaded child routes.\n const loadedChildRoutes = await loadChildrenHelper(route, compiler, parentInjector).toPromise();\n if (loadedChildRoutes) {\n const { routes: childRoutes, injector = parentInjector } = loadedChildRoutes;\n yield* traverseRoutesConfig({\n routes: childRoutes,\n compiler,\n parentInjector: injector,\n parentRoute: currentRoutePath,\n });\n }\n }\n }\n}\n/**\n * Resolves the `redirectTo` property for a given route.\n *\n * This function processes the `redirectTo` property to ensure that it correctly\n * resolves relative to the current route path. If `redirectTo` is an absolute path,\n * it is returned as is. If it is a relative path, it is resolved based on the current route path.\n *\n * @param routePath - The current route path.\n * @param redirectTo - The target path for redirection.\n * @returns The resolved redirect path as a string.\n */\nfunction resolveRedirectTo(routePath, redirectTo) {\n if (redirectTo[0] === '/') {\n // If the redirectTo path is absolute, return it as is.\n return redirectTo;\n }\n // Resolve relative redirectTo based on the current route path.\n const segments = routePath.split('/');\n segments.pop(); // Remove the last segment to make it relative.\n return joinUrlParts(...segments, redirectTo);\n}\n/**\n * Retrieves routes from the given Angular application.\n *\n * This function initializes an Angular platform, bootstraps the application or module,\n * and retrieves routes from the Angular router configuration. It handles both module-based\n * and function-based bootstrapping. It yields the resulting routes as `RouteResult` objects.\n *\n * @param bootstrap - A function that returns a promise resolving to an `ApplicationRef` or an Angular module to bootstrap.\n * @param document - The initial HTML document used for server-side rendering.\n * This document is necessary to render the application on the server.\n * @param url - The URL for server-side rendering. The URL is used to configure `ServerPlatformLocation`. This configuration is crucial\n * for ensuring that API requests for relative paths succeed, which is essential for accurate route extraction.\n * See:\n * - https://github.com/angular/angular/blob/d608b857c689d17a7ffa33bbb510301014d24a17/packages/platform-server/src/location.ts#L51\n * - https://github.com/angular/angular/blob/6882cc7d9eed26d3caeedca027452367ba25f2b9/packages/platform-server/src/http.ts#L44\n * @returns A promise that resolves to an object of type `AngularRouterConfigResult`.\n */\nexport async function getRoutesFromAngularRouterConfig(bootstrap, document, url) {\n const { protocol, host } = url;\n // Create and initialize the Angular platform for server-side rendering.\n const platformRef = createPlatformFactory(platformCore, 'server', [\n {\n provide: INITIAL_CONFIG,\n useValue: { document, url: `${protocol}//${host}/` },\n },\n {\n provide: ɵConsole,\n useFactory: () => new Console(),\n },\n ...INTERNAL_SERVER_PLATFORM_PROVIDERS,\n ])();\n try {\n let applicationRef;\n if (isNgModule(bootstrap)) {\n const moduleRef = await platformRef.bootstrapModule(bootstrap);\n applicationRef = moduleRef.injector.get(ApplicationRef);\n }\n else {\n applicationRef = await bootstrap();\n }\n // Wait until the application is stable.\n await whenStable(applicationRef);\n const injector = applicationRef.injector;\n const router = injector.get(Router);\n const routesResults = [];\n if (router.config.length) {\n const compiler = injector.get(Compiler);\n // Retrieve all routes from the Angular router configuration.\n const traverseRoutes = traverseRoutesConfig({\n routes: router.config,\n compiler,\n parentInjector: injector,\n parentRoute: '',\n });\n for await (const result of traverseRoutes) {\n routesResults.push(result);\n }\n }\n else {\n routesResults.push({ route: '' });\n }\n const baseHref = injector.get(APP_BASE_HREF, null, { optional: true }) ??\n injector.get(PlatformLocation).getBaseHrefFromDOM();\n return {\n baseHref,\n routes: routesResults,\n };\n }\n finally {\n platformRef.destroy();\n }\n}\n/**\n * Asynchronously extracts routes from the Angular application configuration\n * and creates a `RouteTree` to manage server-side routing.\n *\n * @param url - The URL for server-side rendering. The URL is used to configure `ServerPlatformLocation`. This configuration is crucial\n * for ensuring that API requests for relative paths succeed, which is essential for accurate route extraction.\n * See:\n * - https://github.com/angular/angular/blob/d608b857c689d17a7ffa33bbb510301014d24a17/packages/platform-server/src/location.ts#L51\n * - https://github.com/angular/angular/blob/6882cc7d9eed26d3caeedca027452367ba25f2b9/packages/platform-server/src/http.ts#L44\n * @param manifest - An optional `AngularAppManifest` that contains the application's routing and configuration details.\n * If not provided, the default manifest is retrieved using `getAngularAppManifest()`.\n *\n * @returns A promise that resolves to a populated `RouteTree` containing all extracted routes from the Angular application.\n */\nexport async function extractRoutesAndCreateRouteTree(url, manifest = getAngularAppManifest()) {\n const routeTree = new RouteTree();\n const document = await new ServerAssets(manifest).getIndexServerHtml();\n const { baseHref, routes } = await getRoutesFromAngularRouterConfig(await manifest.bootstrap(), document, url);\n for (let { route, redirectTo } of routes) {\n route = joinUrlParts(baseHref, route);\n redirectTo = redirectTo === undefined ? undefined : joinUrlParts(baseHref, redirectTo);\n routeTree.insert(route, { redirectTo });\n }\n return routeTree;\n}\n//# sourceMappingURL=ng-routes.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Manages a collection of hooks and provides methods to register and execute them.\n * Hooks are functions that can be invoked with specific arguments to allow modifications or enhancements.\n */\nexport class Hooks {\n constructor() {\n /**\n * A map of hook names to arrays of hook functions.\n * Each hook name can have multiple associated functions, which are executed in sequence.\n */\n this.store = new Map();\n }\n /**\n * Executes all hooks associated with the specified name, passing the given argument to each hook function.\n * The hooks are invoked sequentially, and the argument may be modified by each hook.\n *\n * @template Hook - The type of the hook name. It should be one of the keys of `HooksMapping`.\n * @param name - The name of the hook whose functions will be executed.\n * @param context - The input value to be passed to each hook function. The value is mutated by each hook function.\n * @returns A promise that resolves once all hook functions have been executed.\n *\n * @example\n * ```typescript\n * const hooks = new Hooks();\n * hooks.on('html:transform:pre', async (ctx) => {\n * ctx.html = ctx.html.replace(/foo/g, 'bar');\n * return ctx.html;\n * });\n * const result = await hooks.run('html:transform:pre', { html: '<div>foo</div>' });\n * console.log(result); // '<div>bar</div>'\n * ```\n * @internal\n */\n async run(name, context) {\n const hooks = this.store.get(name);\n switch (name) {\n case 'html:transform:pre': {\n if (!hooks) {\n return context.html;\n }\n const ctx = { ...context };\n for (const hook of hooks) {\n ctx.html = await hook(ctx);\n }\n return ctx.html;\n }\n default:\n throw new Error(`Running hook \"${name}\" is not supported.`);\n }\n }\n /**\n * Registers a new hook function under the specified hook name.\n * This function should be a function that takes an argument of type `T` and returns a `string` or `Promise<string>`.\n *\n * @template Hook - The type of the hook name. It should be one of the keys of `HooksMapping`.\n * @param name - The name of the hook under which the function will be registered.\n * @param handler - A function to be executed when the hook is triggered. The handler will be called with an argument\n * that may be modified by the hook functions.\n *\n * @remarks\n * - If there are existing handlers registered under the given hook name, the new handler will be added to the list.\n * - If no handlers are registered under the given hook name, a new list will be created with the handler as its first element.\n *\n * @example\n * ```typescript\n * hooks.on('html:transform:pre', async (ctx) => {\n * return ctx.html.replace(/foo/g, 'bar');\n * });\n * ```\n */\n on(name, handler) {\n const hooks = this.store.get(name);\n if (hooks) {\n hooks.push(handler);\n }\n else {\n this.store.set(name, [handler]);\n }\n }\n /**\n * Checks if there are any hooks registered under the specified name.\n *\n * @param name - The name of the hook to check.\n * @returns `true` if there are hooks registered under the specified name, otherwise `false`.\n */\n has(name) {\n return !!this.store.get(name)?.length;\n }\n}\n//# sourceMappingURL=hooks.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { stripIndexHtmlFromURL } from '../utils/url';\nimport { extractRoutesAndCreateRouteTree } from './ng-routes';\nimport { RouteTree } from './route-tree';\n/**\n * Manages the application's server routing logic by building and maintaining a route tree.\n *\n * This class is responsible for constructing the route tree from the Angular application\n * configuration and using it to match incoming requests to the appropriate routes.\n */\nexport class ServerRouter {\n /**\n * Creates an instance of the `ServerRouter`.\n *\n * @param routeTree - An instance of `RouteTree` that holds the routing information.\n * The `RouteTree` is used to match request URLs to the appropriate route metadata.\n */\n constructor(routeTree) {\n this.routeTree = routeTree;\n }\n /**\n * Static property to track the ongoing build promise.\n */\n static #extractionPromise;\n /**\n * Creates or retrieves a `ServerRouter` instance based on the provided manifest and URL.\n *\n * If the manifest contains pre-built routes, a new `ServerRouter` is immediately created.\n * Otherwise, it builds the router by extracting routes from the Angular configuration\n * asynchronously. This method ensures that concurrent builds are prevented by re-using\n * the same promise.\n *\n * @param manifest - An instance of `AngularAppManifest` that contains the route information.\n * @param url - The URL for server-side rendering. The URL is needed to configure `ServerPlatformLocation`.\n * This is necessary to ensure that API requests for relative paths succeed, which is crucial for correct route extraction.\n * [Reference](https://github.com/angular/angular/blob/d608b857c689d17a7ffa33bbb510301014d24a17/packages/platform-server/src/location.ts#L51)\n * @returns A promise resolving to a `ServerRouter` instance.\n */\n static from(manifest, url) {\n if (manifest.routes) {\n const routeTree = RouteTree.fromObject(manifest.routes);\n return Promise.resolve(new ServerRouter(routeTree));\n }\n // Create and store a new promise for the build process.\n // This prevents concurrent builds by re-using the same promise.\n ServerRouter.#extractionPromise ??= extractRoutesAndCreateRouteTree(url, manifest)\n .then((routeTree) => new ServerRouter(routeTree))\n .finally(() => {\n ServerRouter.#extractionPromise = undefined;\n });\n return ServerRouter.#extractionPromise;\n }\n /**\n * Matches a request URL against the route tree to retrieve route metadata.\n *\n * This method strips 'index.html' from the URL if it is present and then attempts\n * to find a match in the route tree. If a match is found, it returns the associated\n * route metadata; otherwise, it returns `undefined`.\n *\n * @param url - The URL to be matched against the route tree.\n * @returns The metadata for the matched route or `undefined` if no match is found.\n */\n match(url) {\n // Strip 'index.html' from URL if present.\n // A request to `http://www.example.com/page/index.html` will render the Angular route corresponding to `http://www.example.com/page`.\n const { pathname } = stripIndexHtmlFromURL(url);\n return this.routeTree.match(decodeURIComponent(pathname));\n }\n}\n//# sourceMappingURL=router.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { InjectionToken } from '@angular/core';\n/**\n * Injection token for the current request.\n */\nexport const REQUEST = new InjectionToken('REQUEST');\n/**\n * Injection token for the response initialization options.\n */\nexport const RESPONSE_INIT = new InjectionToken('RESPONSE_INIT');\n/**\n * Injection token for additional request context.\n */\nexport const REQUEST_CONTEXT = new InjectionToken('REQUEST_CONTEXT');\n//# sourceMappingURL=tokens.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport Critters from '../../third_party/critters';\n/**\n * Pattern used to extract the media query set by Critters in an `onload` handler.\n */\nconst MEDIA_SET_HANDLER_PATTERN = /^this\\.media=[\"'](.*)[\"'];?$/;\n/**\n * Name of the attribute used to save the Critters media query so it can be re-assigned on load.\n */\nconst CSP_MEDIA_ATTR = 'ngCspMedia';\n/**\n * Script that dynamically updates the `media` attribute of `<link>` tags based on a custom attribute (`CSP_MEDIA_ATTR`).\n *\n * NOTE:\n * We do not use `document.querySelectorAll('link').forEach((s) => s.addEventListener('load', ...)`\n * because load events are not always triggered reliably on Chrome.\n * See: https://github.com/angular/angular-cli/issues/26932 and https://crbug.com/1521256\n *\n * The script:\n * - Ensures the event target is a `<link>` tag with the `CSP_MEDIA_ATTR` attribute.\n * - Updates the `media` attribute with the value of `CSP_MEDIA_ATTR` and then removes the attribute.\n * - Removes the event listener when all relevant `<link>` tags have been processed.\n * - Uses event capturing (the `true` parameter) since load events do not bubble up the DOM.\n */\nconst LINK_LOAD_SCRIPT_CONTENT = `\n(() => {\n const CSP_MEDIA_ATTR = '${CSP_MEDIA_ATTR}';\n const documentElement = document.documentElement;\n\n // Listener for load events on link tags.\n const listener = (e) => {\n const target = e.target;\n if (\n !target ||\n target.tagName !== 'LINK' ||\n !target.hasAttribute(CSP_MEDIA_ATTR)\n ) {\n return;\n }\n\n target.media = target.getAttribute(CSP_MEDIA_ATTR);\n target.removeAttribute(CSP_MEDIA_ATTR);\n\n if (!document.head.querySelector(\\`link[\\${CSP_MEDIA_ATTR}]\\`)) {\n documentElement.removeEventListener('load', listener);\n }\n };\n\n documentElement.addEventListener('load', listener, true);\n})();\n`.trim();\nclass CrittersBase extends Critters {\n}\n/* eslint-enable @typescript-eslint/no-unsafe-declaration-merging */\nexport class InlineCriticalCssProcessor extends CrittersBase {\n constructor(readFile, outputPath) {\n super({\n logger: {\n // eslint-disable-next-line no-console\n warn: (s) => console.warn(s),\n // eslint-disable-next-line no-console\n error: (s) => console.error(s),\n info: () => { },\n },\n logLevel: 'warn',\n path: outputPath,\n publicPath: undefined,\n compress: false,\n pruneSource: false,\n reduceInlineStyles: false,\n mergeStylesheets: false,\n // Note: if `preload` changes to anything other than `media`, the logic in\n // `embedLinkedStylesheet` will have to be updated.\n preload: 'media',\n noscriptFallback: true,\n inlineFonts: true,\n });\n this.readFile = readFile;\n this.outputPath = outputPath;\n this.addedCspScriptsDocuments = new WeakSet();\n this.documentNonces = new WeakMap();\n }\n /**\n * Override of the Critters `embedLinkedStylesheet` method\n * that makes it work with Angular's CSP APIs.\n */\n async embedLinkedStylesheet(link, document) {\n if (link.getAttribute('media') === 'print' && link.next?.name === 'noscript') {\n // Workaround for https://github.com/GoogleChromeLabs/critters/issues/64\n // NB: this is only needed for the webpack based builders.\n const media = link.getAttribute('onload')?.match(MEDIA_SET_HANDLER_PATTERN);\n if (media) {\n link.removeAttribute('onload');\n link.setAttribute('media', media[1]);\n link?.next?.remove();\n }\n }\n const returnValue = await super.embedLinkedStylesheet(link, document);\n const cspNonce = this.findCspNonce(document);\n if (cspNonce) {\n const crittersMedia = link.getAttribute('onload')?.match(MEDIA_SET_HANDLER_PATTERN);\n if (crittersMedia) {\n // If there's a Critters-generated `onload` handler and the file has an Angular CSP nonce,\n // we have to remove the handler, because it's incompatible with CSP. We save the value\n // in a different attribute and we generate a script tag with the nonce that uses\n // `addEventListener` to apply the media query instead.\n link.removeAttribute('onload');\n link.setAttribute(CSP_MEDIA_ATTR, crittersMedia[1]);\n this.conditionallyInsertCspLoadingScript(document, cspNonce, link);\n }\n // Ideally we would hook in at the time Critters inserts the `style` tags, but there isn't\n // a way of doing that at the moment so we fall back to doing it any time a `link` tag is\n // inserted. We mitigate it by only iterating the direct children of the `<head>` which\n // should be pretty shallow.\n document.head.children.forEach((child) => {\n if (child.tagName === 'style' && !child.hasAttribute('nonce')) {\n child.setAttribute('nonce', cspNonce);\n }\n });\n }\n return returnValue;\n }\n /**\n * Finds the CSP nonce for a specific document.\n */\n findCspNonce(document) {\n if (this.documentNonces.has(document)) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return this.documentNonces.get(document);\n }\n // HTML attribute are case-insensitive, but the parser used by Critters is case-sensitive.\n const nonceElement = document.querySelector('[ngCspNonce], [ngcspnonce]');\n const cspNonce = nonceElement?.getAttribute('ngCspNonce') || nonceElement?.getAttribute('ngcspnonce') || null;\n this.documentNonces.set(document, cspNonce);\n return cspNonce;\n }\n /**\n * Inserts the `script` tag that swaps the critical CSS at runtime,\n * if one hasn't been inserted into the document already.\n */\n conditionallyInsertCspLoadingScript(document, nonce, link) {\n if (this.addedCspScriptsDocuments.has(document)) {\n return;\n }\n if (document.head.textContent.includes(LINK_LOAD_SCRIPT_CONTENT)) {\n // Script was already added during the build.\n this.addedCspScriptsDocuments.add(document);\n return;\n }\n const script = document.createElement('script');\n script.setAttribute('nonce', nonce);\n script.textContent = LINK_LOAD_SCRIPT_CONTENT;\n // Prepend the script to the head since it needs to\n // run as early as possible, before the `link` tags.\n document.head.insertBefore(script, link);\n this.addedCspScriptsDocuments.add(document);\n }\n}\n//# sourceMappingURL=inline-critical-css.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { ɵConsole, ɵresetCompiledComponents } from '@angular/core';\nimport { ɵSERVER_CONTEXT as SERVER_CONTEXT } from '@angular/platform-server';\nimport { ServerAssets } from './assets';\nimport { Console } from './console';\nimport { Hooks } from './hooks';\nimport { getAngularAppManifest } from './manifest';\nimport { ServerRouter } from './routes/router';\nimport { REQUEST, REQUEST_CONTEXT, RESPONSE_INIT } from './tokens';\nimport { InlineCriticalCssProcessor } from './utils/inline-critical-css';\nimport { renderAngular } from './utils/ng';\n/**\n * Enum representing the different contexts in which server rendering can occur.\n */\nexport var ServerRenderContext;\n(function (ServerRenderContext) {\n ServerRenderContext[\"SSR\"] = \"ssr\";\n ServerRenderContext[\"SSG\"] = \"ssg\";\n ServerRenderContext[\"AppShell\"] = \"app-shell\";\n})(ServerRenderContext || (ServerRenderContext = {}));\n/**\n * Represents a locale-specific Angular server application managed by the server application engine.\n *\n * The `AngularServerApp` class handles server-side rendering and asset management for a specific locale.\n */\nexport class AngularServerApp {\n constructor() {\n /**\n * Hooks for extending or modifying the behavior of the server application.\n * This instance can be used to attach custom functionality to various events in the server application lifecycle.\n */\n this.hooks = new Hooks();\n /**\n * The manifest associated with this server application.\n */\n this.manifest = getAngularAppManifest();\n /**\n * An instance of ServerAsset that handles server-side asset.\n */\n this.assets = new ServerAssets(this.manifest);\n }\n /**\n * Renders a response for the given HTTP request using the server application.\n *\n * This method processes the request and returns a response based on the specified rendering context.\n *\n * @param request - The incoming HTTP request to be rendered.\n * @param requestContext - Optional additional context for rendering, such as request metadata.\n * @param serverContext - The rendering context.\n *\n * @returns A promise that resolves to the HTTP response object resulting from the rendering, or null if no match is found.\n */\n render(request, requestContext, serverContext = ServerRenderContext.SSR) {\n return Promise.race([\n this.createAbortPromise(request),\n this.handleRendering(request, requestContext, serverContext),\n ]);\n }\n /**\n * Creates a promise that rejects when the request is aborted.\n *\n * @param request - The HTTP request to monitor for abortion.\n * @returns A promise that never resolves but rejects with an `AbortError` if the request is aborted.\n */\n createAbortPromise(request) {\n return new Promise((_, reject) => {\n request.signal.addEventListener('abort', () => {\n const abortError = new Error(`Request for: ${request.url} was aborted.\\n${request.signal.reason}`);\n abortError.name = 'AbortError';\n reject(abortError);\n }, { once: true });\n });\n }\n /**\n * Handles the server-side rendering process for the given HTTP request.\n * This method matches the request URL to a route and performs rendering if a matching route is found.\n *\n * @param request - The incoming HTTP request to be processed.\n * @param requestContext - Optional additional context for rendering, such as request metadata.\n * @param serverContext - The rendering context. Defaults to server-side rendering (SSR).\n *\n * @returns A promise that resolves to the rendered response, or null if no matching route is found.\n */\n async handleRendering(request, requestContext, serverContext = ServerRenderContext.SSR) {\n const url = new URL(request.url);\n this.router ??= await ServerRouter.from(this.manifest, url);\n const matchedRoute = this.router.match(url);\n if (!matchedRoute) {\n // Not a known Angular route.\n return null;\n }\n const { redirectTo } = matchedRoute;\n if (redirectTo !== undefined) {\n // 302 Found is used by default for redirections\n // See: https://developer.mozilla.org/en-US/docs/Web/API/Response/redirect_static#status\n return Response.redirect(new URL(redirectTo, url), 302);\n }\n const platformProviders = [\n {\n provide: SERVER_CONTEXT,\n useValue: serverContext,\n },\n {\n // An Angular Console Provider that does not print a set of predefined logs.\n provide: ɵConsole,\n // Using `useClass` would necessitate decorating `Console` with `@Injectable`,\n // which would require switching from `ts_library` to `ng_module`. This change\n // would also necessitate various patches of `@angular/bazel` to support ESM.\n useFactory: () => new Console(),\n },\n ];\n const isSsrMode = serverContext === ServerRenderContext.SSR;\n const responseInit = {};\n if (isSsrMode) {\n platformProviders.push({\n provide: REQUEST,\n useValue: request,\n }, {\n provide: REQUEST_CONTEXT,\n useValue: requestContext,\n }, {\n provide: RESPONSE_INIT,\n useValue: responseInit,\n });\n }\n const { manifest, hooks, assets } = this;\n let html = await assets.getIndexServerHtml();\n // Skip extra microtask if there are no pre hooks.\n if (hooks.has('html:transform:pre')) {\n html = await hooks.run('html:transform:pre', { html });\n }\n this.boostrap ??= await manifest.bootstrap();\n html = await renderAngular(html, this.boostrap, new URL(request.url), platformProviders);\n if (manifest.inlineCriticalCss) {\n // Optionally inline critical CSS.\n this.inlineCriticalCssProcessor ??= new InlineCriticalCssProcessor((path) => {\n const fileName = path.split('/').pop() ?? path;\n return this.assets.getServerAsset(fileName);\n });\n html = await this.inlineCriticalCssProcessor.process(html);\n }\n return new Response(html, responseInit);\n }\n}\nlet angularServerApp;\n/**\n * Retrieves or creates an instance of `AngularServerApp`.\n * - If an instance of `AngularServerApp` already exists, it will return the existing one.\n * - If no instance exists, it will create a new one with the provided options.\n * @returns The existing or newly created instance of `AngularServerApp`.\n */\nexport function getOrCreateAngularServerApp() {\n return (angularServerApp ??= new AngularServerApp());\n}\n/**\n * Destroys the existing `AngularServerApp` instance, releasing associated resources and resetting the\n * reference to `undefined`.\n *\n * This function is primarily used to enable the recreation of the `AngularServerApp` instance,\n * typically when server configuration or application state needs to be refreshed.\n */\nexport function destroyAngularServerApp() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Need to clean up GENERATED_COMP_IDS map in `@angular/core`.\n // Otherwise an incorrect component ID generation collision detected warning will be displayed in development.\n // See: https://github.com/angular/angular-cli/issues/25924\n ɵresetCompiledComponents();\n }\n angularServerApp = undefined;\n}\n//# sourceMappingURL=app.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n// ɵgetRoutesFromAngularRouterConfig is only used by the Webpack based server builder.\nexport { getRoutesFromAngularRouterConfig as ɵgetRoutesFromAngularRouterConfig, extractRoutesAndCreateRouteTree as ɵextractRoutesAndCreateRouteTree, } from './src/routes/ng-routes';\nexport { ServerRenderContext as ɵServerRenderContext, getOrCreateAngularServerApp as ɵgetOrCreateAngularServerApp, destroyAngularServerApp as ɵdestroyAngularServerApp, } from './src/app';\nexport { setAngularAppManifest as ɵsetAngularAppManifest, setAngularAppEngineManifest as ɵsetAngularAppEngineManifest, } from './src/manifest';\nexport { InlineCriticalCssProcessor as ɵInlineCriticalCssProcessor } from './src/utils/inline-critical-css';\n//# sourceMappingURL=private_export.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Extracts a potential locale ID from a given URL based on the specified base path.\n *\n * This function parses the URL to locate a potential locale identifier that immediately\n * follows the base path segment in the URL's pathname. If the URL does not contain a valid\n * locale ID, an empty string is returned.\n *\n * @param url - The full URL from which to extract the locale ID.\n * @param basePath - The base path used as the reference point for extracting the locale ID.\n * @returns The extracted locale ID if present, or an empty string if no valid locale ID is found.\n *\n * @example\n * ```js\n * const url = new URL('https://example.com/base/en/page');\n * const basePath = '/base';\n * const localeId = getPotentialLocaleIdFromUrl(url, basePath);\n * console.log(localeId); // Output: 'en'\n * ```\n */\nexport function getPotentialLocaleIdFromUrl(url, basePath) {\n const { pathname } = url;\n // Move forward of the base path section.\n let start = basePath.length;\n if (pathname[start] === '/') {\n start++;\n }\n // Find the next forward slash.\n let end = pathname.indexOf('/', start);\n if (end === -1) {\n end = pathname.length;\n }\n // Extract the potential locale id.\n return pathname.slice(start, end);\n}\n//# sourceMappingURL=i18n.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { Hooks } from './hooks';\nimport { getPotentialLocaleIdFromUrl } from './i18n';\nimport { getAngularAppEngineManifest } from './manifest';\nimport { stripIndexHtmlFromURL } from './utils/url';\n/**\n * Angular server application engine.\n * Manages Angular server applications (including localized ones), handles rendering requests,\n * and optionally transforms index HTML before rendering.\n *\n * @note This class should be instantiated once and used as a singleton across the server-side\n * application to ensure consistent handling of rendering requests and resource management.\n *\n * @developerPreview\n */\nexport class AngularAppEngine {\n constructor() {\n /**\n * The manifest for the server application.\n */\n this.manifest = getAngularAppEngineManifest();\n }\n /**\n * Hooks for extending or modifying the behavior of the server application.\n * These hooks are used by the Angular CLI when running the development server and\n * provide extensibility points for the application lifecycle.\n *\n * @private\n */\n static { this.ɵhooks = new Hooks(); }\n /**\n * Provides access to the hooks for extending or modifying the server application's behavior.\n * This allows attaching custom functionality to various server application lifecycle events.\n *\n * @internal\n */\n get hooks() {\n return AngularAppEngine.ɵhooks;\n }\n /**\n * Renders a response for the given HTTP request using the server application.\n *\n * This method processes the request, determines the appropriate route and rendering context,\n * and returns an HTTP response.\n *\n * If the request URL appears to be for a file (excluding `/index.html`), the method returns `null`.\n * A request to `https://www.example.com/page/index.html` will render the Angular route\n * corresponding to `https://www.example.com/page`.\n *\n * @param request - The incoming HTTP request object to be rendered.\n * @param requestContext - Optional additional context for the request, such as metadata.\n * @returns A promise that resolves to a Response object, or `null` if the request URL represents a file (e.g., `./logo.png`)\n * rather than an application route.\n */\n async render(request, requestContext) {\n // Skip if the request looks like a file but not `/index.html`.\n const url = new URL(request.url);\n const entryPoint = this.getEntryPointFromUrl(url);\n if (!entryPoint) {\n return null;\n }\n const { ɵgetOrCreateAngularServerApp: getOrCreateAngularServerApp } = await entryPoint();\n // Note: Using `instanceof` is not feasible here because `AngularServerApp` will\n // be located in separate bundles, making `instanceof` checks unreliable.\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n const serverApp = getOrCreateAngularServerApp();\n serverApp.hooks = this.hooks;\n return serverApp.render(request, requestContext);\n }\n /**\n * Retrieves the entry point path and locale for the Angular server application based on the provided URL.\n *\n * This method determines the appropriate entry point and locale for rendering the application by examining the URL.\n * If there is only one entry point available, it is returned regardless of the URL.\n * Otherwise, the method extracts a potential locale identifier from the URL and looks up the corresponding entry point.\n *\n * @param url - The URL used to derive the locale and determine the appropriate entry point.\n * @returns A function that returns a promise resolving to an object with the `EntryPointExports` type,\n * or `undefined` if no matching entry point is found for the extracted locale.\n */\n getEntryPointFromUrl(url) {\n const { entryPoints, basePath } = this.manifest;\n if (entryPoints.size === 1) {\n return entryPoints.values().next().value;\n }\n const potentialLocale = getPotentialLocaleIdFromUrl(url, basePath);\n return entryPoints.get(potentialLocale);\n }\n /**\n * Retrieves HTTP headers for a request associated with statically generated (SSG) pages,\n * based on the URL pathname.\n *\n * @param request - The incoming request object.\n * @returns A `Map` containing the HTTP headers as key-value pairs.\n * @note This function should be used exclusively for retrieving headers of SSG pages.\n */\n getHeaders(request) {\n if (this.manifest.staticPathsHeaders.size === 0) {\n return new Map();\n }\n const { pathname } = stripIndexHtmlFromURL(new URL(request.url));\n const headers = this.manifest.staticPathsHeaders.get(pathname);\n return new Map(headers);\n }\n}\n//# sourceMappingURL=app-engine.js.map"],"names":["ɵConsole","loadChildrenHelper","INTERNAL_SERVER_PLATFORM_PROVIDERS","whenStable","SERVER_CONTEXT","ɵresetCompiledComponents"],"mappings":";;;;;;AAOA;AACA;AACA;AACO,MAAM,YAAY,CAAC;AAC1B;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,QAAQ,EAAE;AAC1B,QAAQ,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACjC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,cAAc,CAAC,IAAI,EAAE;AAC/B,QAAQ,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACrD,QAAQ,IAAI,CAAC,KAAK,EAAE;AACpB,YAAY,MAAM,IAAI,KAAK,CAAC,CAAC,cAAc,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;AACtE,SAAS;AACT,QAAQ,OAAO,KAAK,EAAE,CAAC;AACvB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,kBAAkB,GAAG;AACzB,QAAQ,OAAO,IAAI,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC;AACxD,KAAK;AACL;;AClCA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,OAAO,SAASA,QAAQ,CAAC;AACtC,IAAI,WAAW,GAAG;AA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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,oBAAoB,CAAC,GAAG,EAAE;AAC9B,QAAQ,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC;AACxD,QAAQ,IAAI,WAAW,CAAC,IAAI,KAAK,CAAC,EAAE;AACpC,YAAY,OAAO,WAAW,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC;AACrD,SAAS;AACT,QAAQ,MAAM,eAAe,GAAG,2BAA2B,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;AAC3E,QAAQ,OAAO,WAAW,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AAChD,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,UAAU,CAAC,OAAO,EAAE;AACxB,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,IAAI,KAAK,CAAC,EAAE;AACzD,YAAY,OAAO,IAAI,GAAG,EAAE,CAAC;AAC7B,SAAS;AACT,QAAQ,MAAM,EAAE,QAAQ,EAAE,GAAG,qBAAqB,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;AACzE,QAAQ,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACvE,QAAQ,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;AAChC,KAAK;AACL;;;;"}
1
+ {"version":3,"file":"ssr.mjs","sources":["../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/assets.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/console.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/manifest.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/utils/url.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/utils/ng.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/routes/route-tree.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/routes/ng-routes.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/hooks.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/routes/router.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/tokens.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/utils/inline-critical-css.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/app.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/private_export.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/i18n.mjs","../../../../../../k8-fastbuild-ST-70f2edae98f4/bin/packages/angular/ssr/src/app-engine.mjs"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Manages server-side assets.\n */\nexport class ServerAssets {\n /**\n * Creates an instance of ServerAsset.\n *\n * @param manifest - The manifest containing the server assets.\n */\n constructor(manifest) {\n this.manifest = manifest;\n }\n /**\n * Retrieves the content of a server-side asset using its path.\n *\n * @param path - The path to the server asset.\n * @returns A promise that resolves to the asset content as a string.\n * @throws Error If the asset path is not found in the manifest, an error is thrown.\n */\n async getServerAsset(path) {\n const asset = this.manifest.assets.get(path);\n if (!asset) {\n throw new Error(`Server asset '${path}' does not exist.`);\n }\n return asset();\n }\n /**\n * Retrieves and caches the content of 'index.server.html'.\n *\n * @returns A promise that resolves to the content of 'index.server.html'.\n * @throws Error If there is an issue retrieving the asset.\n */\n getIndexServerHtml() {\n return this.getServerAsset('index.server.html');\n }\n}\n//# sourceMappingURL=assets.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { ɵConsole } from '@angular/core';\n/**\n * Custom implementation of the Angular Console service that filters out specific log messages.\n *\n * This class extends the internal Angular `ɵConsole` class to provide customized logging behavior.\n * It overrides the `log` method to suppress logs that match certain predefined messages.\n */\nexport class Console extends ɵConsole {\n constructor() {\n super(...arguments);\n /**\n * A set of log messages that should be ignored and not printed to the console.\n */\n this.ignoredLogs = new Set(['Angular is running in development mode.']);\n }\n /**\n * Logs a message to the console if it is not in the set of ignored messages.\n *\n * @param message - The message to log to the console.\n *\n * This method overrides the `log` method of the `ɵConsole` class. It checks if the\n * message is in the `ignoredLogs` set. If it is not, it delegates the logging to\n * the parent class's `log` method. Otherwise, the message is suppressed.\n */\n log(message) {\n if (!this.ignoredLogs.has(message)) {\n super.log(message);\n }\n }\n}\n//# sourceMappingURL=console.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * The Angular app manifest object.\n * This is used internally to store the current Angular app manifest.\n */\nlet angularAppManifest;\n/**\n * Sets the Angular app manifest.\n *\n * @param manifest - The manifest object to set for the Angular application.\n */\nexport function setAngularAppManifest(manifest) {\n angularAppManifest = manifest;\n}\n/**\n * Gets the Angular app manifest.\n *\n * @returns The Angular app manifest.\n * @throws Will throw an error if the Angular app manifest is not set.\n */\nexport function getAngularAppManifest() {\n if (!angularAppManifest) {\n throw new Error('Angular app manifest is not set. ' +\n `Please ensure you are using the '@angular/build:application' builder to build your server application.`);\n }\n return angularAppManifest;\n}\n/**\n * The Angular app engine manifest object.\n * This is used internally to store the current Angular app engine manifest.\n */\nlet angularAppEngineManifest;\n/**\n * Sets the Angular app engine manifest.\n *\n * @param manifest - The engine manifest object to set.\n */\nexport function setAngularAppEngineManifest(manifest) {\n angularAppEngineManifest = manifest;\n}\n/**\n * Gets the Angular app engine manifest.\n *\n * @returns The Angular app engine manifest.\n * @throws Will throw an error if the Angular app engine manifest is not set.\n */\nexport function getAngularAppEngineManifest() {\n if (!angularAppEngineManifest) {\n throw new Error('Angular app engine manifest is not set. ' +\n `Please ensure you are using the '@angular/build:application' builder to build your server application.`);\n }\n return angularAppEngineManifest;\n}\n//# sourceMappingURL=manifest.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Removes the trailing slash from a URL if it exists.\n *\n * @param url - The URL string from which to remove the trailing slash.\n * @returns The URL string without a trailing slash.\n *\n * @example\n * ```js\n * stripTrailingSlash('path/'); // 'path'\n * stripTrailingSlash('/path'); // '/path'\n * ```\n */\nexport function stripTrailingSlash(url) {\n // Check if the last character of the URL is a slash\n return url[url.length - 1] === '/' ? url.slice(0, -1) : url;\n}\n/**\n * Joins URL parts into a single URL string.\n *\n * This function takes multiple URL segments, normalizes them by removing leading\n * and trailing slashes where appropriate, and then joins them into a single URL.\n *\n * @param parts - The parts of the URL to join. Each part can be a string with or without slashes.\n * @returns The joined URL string, with normalized slashes.\n *\n * @example\n * ```js\n * joinUrlParts('path/', '/to/resource'); // '/path/to/resource'\n * joinUrlParts('/path/', 'to/resource'); // '/path/to/resource'\n * ```\n */\nexport function joinUrlParts(...parts) {\n // Initialize an array with an empty string to always add a leading slash\n const normalizeParts = [''];\n for (const part of parts) {\n if (part === '') {\n // Skip any empty parts\n continue;\n }\n let normalizedPart = part;\n if (part[0] === '/') {\n normalizedPart = normalizedPart.slice(1);\n }\n if (part[part.length - 1] === '/') {\n normalizedPart = normalizedPart.slice(0, -1);\n }\n if (normalizedPart !== '') {\n normalizeParts.push(normalizedPart);\n }\n }\n return normalizeParts.join('/');\n}\n/**\n * Strips `/index.html` from the end of a URL's path, if present.\n *\n * This function is used to convert URLs pointing to an `index.html` file into their directory\n * equivalents. For example, it transforms a URL like `http://www.example.com/page/index.html`\n * into `http://www.example.com/page`.\n *\n * @param url - The URL object to process.\n * @returns A new URL object with `/index.html` removed from the path, if it was present.\n *\n * @example\n * ```typescript\n * const originalUrl = new URL('http://www.example.com/page/index.html');\n * const cleanedUrl = stripIndexHtmlFromURL(originalUrl);\n * console.log(cleanedUrl.href); // Output: 'http://www.example.com/page'\n * ```\n */\nexport function stripIndexHtmlFromURL(url) {\n if (url.pathname.endsWith('/index.html')) {\n const modifiedURL = new URL(url);\n // Remove '/index.html' from the pathname\n modifiedURL.pathname = modifiedURL.pathname.slice(0, /** '/index.html'.length */ -11);\n return modifiedURL;\n }\n return url;\n}\n//# sourceMappingURL=url.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { renderApplication, renderModule } from '@angular/platform-server';\nimport { stripIndexHtmlFromURL } from './url';\n/**\n * Renders an Angular application or module to an HTML string.\n *\n * This function determines whether the provided `bootstrap` value is an Angular module\n * or a bootstrap function and calls the appropriate rendering method (`renderModule` or\n * `renderApplication`) based on that determination.\n *\n * @param html - The HTML string to be used as the initial document content.\n * @param bootstrap - Either an Angular module type or a function that returns a promise\n * resolving to an `ApplicationRef`.\n * @param url - The URL of the application. This is used for server-side rendering to\n * correctly handle route-based rendering.\n * @param platformProviders - An array of platform providers to be used during the\n * rendering process.\n * @returns A promise that resolves to a string containing the rendered HTML.\n */\nexport function renderAngular(html, bootstrap, url, platformProviders) {\n // A request to `http://www.example.com/page/index.html` will render the Angular route corresponding to `http://www.example.com/page`.\n const urlToRender = stripIndexHtmlFromURL(url).toString();\n return isNgModule(bootstrap)\n ? renderModule(bootstrap, {\n url: urlToRender,\n document: html,\n extraProviders: platformProviders,\n })\n : renderApplication(bootstrap, {\n url: urlToRender,\n document: html,\n platformProviders,\n });\n}\n/**\n * Type guard to determine if a given value is an Angular module.\n * Angular modules are identified by the presence of the `ɵmod` static property.\n * This function helps distinguish between Angular modules and bootstrap functions.\n *\n * @param value - The value to be checked.\n * @returns True if the value is an Angular module (i.e., it has the `ɵmod` property), false otherwise.\n */\nexport function isNgModule(value) {\n return 'ɵmod' in value;\n}\n//# sourceMappingURL=ng.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { stripTrailingSlash } from '../utils/url';\n/**\n * A route tree implementation that supports efficient route matching, including support for wildcard routes.\n * This structure is useful for organizing and retrieving routes in a hierarchical manner,\n * enabling complex routing scenarios with nested paths.\n */\nexport class RouteTree {\n constructor() {\n /**\n * The root node of the route tree.\n * All routes are stored and accessed relative to this root node.\n */\n this.root = this.createEmptyRouteTreeNode('');\n /**\n * A counter that tracks the order of route insertion.\n * This ensures that routes are matched in the order they were defined,\n * with earlier routes taking precedence.\n */\n this.insertionIndexCounter = 0;\n }\n /**\n * Inserts a new route into the route tree.\n * The route is broken down into segments, and each segment is added to the tree.\n * Parameterized segments (e.g., :id) are normalized to wildcards (*) for matching purposes.\n *\n * @param route - The route path to insert into the tree.\n * @param metadata - Metadata associated with the route, excluding the route path itself.\n */\n insert(route, metadata) {\n let node = this.root;\n const normalizedRoute = stripTrailingSlash(route);\n const segments = normalizedRoute.split('/');\n for (const segment of segments) {\n // Replace parameterized segments (e.g., :id) with a wildcard (*) for matching\n const normalizedSegment = segment[0] === ':' ? '*' : segment;\n let childNode = node.children.get(normalizedSegment);\n if (!childNode) {\n childNode = this.createEmptyRouteTreeNode(normalizedSegment);\n node.children.set(normalizedSegment, childNode);\n }\n node = childNode;\n }\n // At the leaf node, store the full route and its associated metadata\n node.metadata = {\n ...metadata,\n route: normalizedRoute,\n };\n node.insertionIndex = this.insertionIndexCounter++;\n }\n /**\n * Matches a given route against the route tree and returns the best matching route's metadata.\n * The best match is determined by the lowest insertion index, meaning the earliest defined route\n * takes precedence.\n *\n * @param route - The route path to match against the route tree.\n * @returns The metadata of the best matching route or `undefined` if no match is found.\n */\n match(route) {\n const segments = stripTrailingSlash(route).split('/');\n return this.traverseBySegments(segments)?.metadata;\n }\n /**\n * Converts the route tree into a serialized format representation.\n * This method converts the route tree into an array of metadata objects that describe the structure of the tree.\n * The array represents the routes in a nested manner where each entry includes the route and its associated metadata.\n *\n * @returns An array of `RouteTreeNodeMetadata` objects representing the route tree structure.\n * Each object includes the `route` and associated metadata of a route.\n */\n toObject() {\n return Array.from(this.traverse());\n }\n /**\n * Constructs a `RouteTree` from an object representation.\n * This method is used to recreate a `RouteTree` instance from an array of metadata objects.\n * The array should be in the format produced by `toObject`, allowing for the reconstruction of the route tree\n * with the same routes and metadata.\n *\n * @param value - An array of `RouteTreeNodeMetadata` objects that represent the serialized format of the route tree.\n * Each object should include a `route` and its associated metadata.\n * @returns A new `RouteTree` instance constructed from the provided metadata objects.\n */\n static fromObject(value) {\n const tree = new RouteTree();\n for (const { route, ...metadata } of value) {\n tree.insert(route, metadata);\n }\n return tree;\n }\n /**\n * A generator function that recursively traverses the route tree and yields the metadata of each node.\n * This allows for easy and efficient iteration over all nodes in the tree.\n *\n * @param node - The current node to start the traversal from. Defaults to the root node of the tree.\n */\n *traverse(node = this.root) {\n if (node.metadata) {\n yield node.metadata;\n }\n for (const childNode of node.children.values()) {\n yield* this.traverse(childNode);\n }\n }\n /**\n * Recursively traverses the route tree from a given node, attempting to match the remaining route segments.\n * If the node is a leaf node (no more segments to match) and contains metadata, the node is yielded.\n *\n * This function prioritizes exact segment matches first, followed by wildcard matches (`*`),\n * and finally deep wildcard matches (`**`) that consume all segments.\n *\n * @param remainingSegments - The remaining segments of the route path to match.\n * @param node - The current node in the route tree to start traversal from.\n *\n * @returns The node that best matches the remaining segments or `undefined` if no match is found.\n */\n traverseBySegments(remainingSegments, node = this.root) {\n const { metadata, children } = node;\n // If there are no remaining segments and the node has metadata, return this node\n if (!remainingSegments?.length) {\n if (metadata) {\n return node;\n }\n return;\n }\n // If the node has no children, end the traversal\n if (!children.size) {\n return;\n }\n const [segment, ...restSegments] = remainingSegments;\n let currentBestMatchNode;\n // 1. Exact segment match\n const exactMatchNode = node.children.get(segment);\n currentBestMatchNode = this.getHigherPriorityNode(currentBestMatchNode, this.traverseBySegments(restSegments, exactMatchNode));\n // 2. Wildcard segment match (`*`)\n const wildcardNode = node.children.get('*');\n currentBestMatchNode = this.getHigherPriorityNode(currentBestMatchNode, this.traverseBySegments(restSegments, wildcardNode));\n // 3. Deep wildcard segment match (`**`)\n const deepWildcardNode = node.children.get('**');\n currentBestMatchNode = this.getHigherPriorityNode(currentBestMatchNode, deepWildcardNode);\n return currentBestMatchNode;\n }\n /**\n * Compares two nodes and returns the node with higher priority based on insertion index.\n * A node with a lower insertion index is prioritized as it was defined earlier.\n *\n * @param currentBestMatchNode - The current best match node.\n * @param candidateNode - The node being evaluated for higher priority based on insertion index.\n * @returns The node with higher priority (i.e., lower insertion index). If one of the nodes is `undefined`, the other node is returned.\n */\n getHigherPriorityNode(currentBestMatchNode, candidateNode) {\n if (!candidateNode) {\n return currentBestMatchNode;\n }\n if (!currentBestMatchNode) {\n return candidateNode;\n }\n return candidateNode.insertionIndex < currentBestMatchNode.insertionIndex\n ? candidateNode\n : currentBestMatchNode;\n }\n /**\n * Creates an empty route tree node with the specified segment.\n * This helper function is used during the tree construction.\n *\n * @param segment - The route segment that this node represents.\n * @returns A new, empty route tree node.\n */\n createEmptyRouteTreeNode(segment) {\n return {\n segment,\n insertionIndex: -1,\n children: new Map(),\n };\n }\n}\n//# sourceMappingURL=route-tree.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { APP_BASE_HREF, PlatformLocation } from '@angular/common';\nimport { ApplicationRef, Compiler, createPlatformFactory, platformCore, ɵwhenStable as whenStable, ɵConsole, } from '@angular/core';\nimport { INITIAL_CONFIG, ɵINTERNAL_SERVER_PLATFORM_PROVIDERS as INTERNAL_SERVER_PLATFORM_PROVIDERS, } from '@angular/platform-server';\nimport { Router, ɵloadChildren as loadChildrenHelper } from '@angular/router';\nimport { ServerAssets } from '../assets';\nimport { Console } from '../console';\nimport { getAngularAppManifest } from '../manifest';\nimport { isNgModule } from '../utils/ng';\nimport { joinUrlParts } from '../utils/url';\nimport { RouteTree } from './route-tree';\n/**\n * Recursively traverses the Angular router configuration to retrieve routes.\n *\n * Iterates through the router configuration, yielding each route along with its potential\n * redirection or error status. Handles nested routes and lazy-loaded child routes.\n *\n * @param options - An object containing the parameters for traversing routes.\n * @returns An async iterator yielding `RouteResult` objects.\n */\nasync function* traverseRoutesConfig(options) {\n const { routes, compiler, parentInjector, parentRoute } = options;\n for (const route of routes) {\n const { path = '', redirectTo, loadChildren, children } = route;\n const currentRoutePath = joinUrlParts(parentRoute, path);\n yield {\n route: currentRoutePath,\n redirectTo: typeof redirectTo === 'string'\n ? resolveRedirectTo(currentRoutePath, redirectTo)\n : undefined,\n };\n if (children?.length) {\n // Recursively process child routes.\n yield* traverseRoutesConfig({\n routes: children,\n compiler,\n parentInjector,\n parentRoute: currentRoutePath,\n });\n }\n if (loadChildren) {\n // Load and process lazy-loaded child routes.\n const loadedChildRoutes = await loadChildrenHelper(route, compiler, parentInjector).toPromise();\n if (loadedChildRoutes) {\n const { routes: childRoutes, injector = parentInjector } = loadedChildRoutes;\n yield* traverseRoutesConfig({\n routes: childRoutes,\n compiler,\n parentInjector: injector,\n parentRoute: currentRoutePath,\n });\n }\n }\n }\n}\n/**\n * Resolves the `redirectTo` property for a given route.\n *\n * This function processes the `redirectTo` property to ensure that it correctly\n * resolves relative to the current route path. If `redirectTo` is an absolute path,\n * it is returned as is. If it is a relative path, it is resolved based on the current route path.\n *\n * @param routePath - The current route path.\n * @param redirectTo - The target path for redirection.\n * @returns The resolved redirect path as a string.\n */\nfunction resolveRedirectTo(routePath, redirectTo) {\n if (redirectTo[0] === '/') {\n // If the redirectTo path is absolute, return it as is.\n return redirectTo;\n }\n // Resolve relative redirectTo based on the current route path.\n const segments = routePath.split('/');\n segments.pop(); // Remove the last segment to make it relative.\n return joinUrlParts(...segments, redirectTo);\n}\n/**\n * Retrieves routes from the given Angular application.\n *\n * This function initializes an Angular platform, bootstraps the application or module,\n * and retrieves routes from the Angular router configuration. It handles both module-based\n * and function-based bootstrapping. It yields the resulting routes as `RouteResult` objects.\n *\n * @param bootstrap - A function that returns a promise resolving to an `ApplicationRef` or an Angular module to bootstrap.\n * @param document - The initial HTML document used for server-side rendering.\n * This document is necessary to render the application on the server.\n * @param url - The URL for server-side rendering. The URL is used to configure `ServerPlatformLocation`. This configuration is crucial\n * for ensuring that API requests for relative paths succeed, which is essential for accurate route extraction.\n * See:\n * - https://github.com/angular/angular/blob/d608b857c689d17a7ffa33bbb510301014d24a17/packages/platform-server/src/location.ts#L51\n * - https://github.com/angular/angular/blob/6882cc7d9eed26d3caeedca027452367ba25f2b9/packages/platform-server/src/http.ts#L44\n * @returns A promise that resolves to an object of type `AngularRouterConfigResult`.\n */\nexport async function getRoutesFromAngularRouterConfig(bootstrap, document, url) {\n const { protocol, host } = url;\n // Create and initialize the Angular platform for server-side rendering.\n const platformRef = createPlatformFactory(platformCore, 'server', [\n {\n provide: INITIAL_CONFIG,\n useValue: { document, url: `${protocol}//${host}/` },\n },\n {\n provide: ɵConsole,\n useFactory: () => new Console(),\n },\n ...INTERNAL_SERVER_PLATFORM_PROVIDERS,\n ])();\n try {\n let applicationRef;\n if (isNgModule(bootstrap)) {\n const moduleRef = await platformRef.bootstrapModule(bootstrap);\n applicationRef = moduleRef.injector.get(ApplicationRef);\n }\n else {\n applicationRef = await bootstrap();\n }\n // Wait until the application is stable.\n await whenStable(applicationRef);\n const injector = applicationRef.injector;\n const router = injector.get(Router);\n const routesResults = [];\n if (router.config.length) {\n const compiler = injector.get(Compiler);\n // Retrieve all routes from the Angular router configuration.\n const traverseRoutes = traverseRoutesConfig({\n routes: router.config,\n compiler,\n parentInjector: injector,\n parentRoute: '',\n });\n for await (const result of traverseRoutes) {\n routesResults.push(result);\n }\n }\n else {\n routesResults.push({ route: '' });\n }\n const baseHref = injector.get(APP_BASE_HREF, null, { optional: true }) ??\n injector.get(PlatformLocation).getBaseHrefFromDOM();\n return {\n baseHref,\n routes: routesResults,\n };\n }\n finally {\n platformRef.destroy();\n }\n}\n/**\n * Asynchronously extracts routes from the Angular application configuration\n * and creates a `RouteTree` to manage server-side routing.\n *\n * @param url - The URL for server-side rendering. The URL is used to configure `ServerPlatformLocation`. This configuration is crucial\n * for ensuring that API requests for relative paths succeed, which is essential for accurate route extraction.\n * See:\n * - https://github.com/angular/angular/blob/d608b857c689d17a7ffa33bbb510301014d24a17/packages/platform-server/src/location.ts#L51\n * - https://github.com/angular/angular/blob/6882cc7d9eed26d3caeedca027452367ba25f2b9/packages/platform-server/src/http.ts#L44\n * @param manifest - An optional `AngularAppManifest` that contains the application's routing and configuration details.\n * If not provided, the default manifest is retrieved using `getAngularAppManifest()`.\n *\n * @returns A promise that resolves to a populated `RouteTree` containing all extracted routes from the Angular application.\n */\nexport async function extractRoutesAndCreateRouteTree(url, manifest = getAngularAppManifest()) {\n const routeTree = new RouteTree();\n const document = await new ServerAssets(manifest).getIndexServerHtml();\n const bootstrap = await manifest.bootstrap();\n const { baseHref, routes } = await getRoutesFromAngularRouterConfig(bootstrap, document, url);\n for (let { route, redirectTo } of routes) {\n route = joinUrlParts(baseHref, route);\n redirectTo = redirectTo === undefined ? undefined : joinUrlParts(baseHref, redirectTo);\n routeTree.insert(route, { redirectTo });\n }\n return routeTree;\n}\n//# sourceMappingURL=ng-routes.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Manages a collection of hooks and provides methods to register and execute them.\n * Hooks are functions that can be invoked with specific arguments to allow modifications or enhancements.\n */\nexport class Hooks {\n constructor() {\n /**\n * A map of hook names to arrays of hook functions.\n * Each hook name can have multiple associated functions, which are executed in sequence.\n */\n this.store = new Map();\n }\n /**\n * Executes all hooks associated with the specified name, passing the given argument to each hook function.\n * The hooks are invoked sequentially, and the argument may be modified by each hook.\n *\n * @template Hook - The type of the hook name. It should be one of the keys of `HooksMapping`.\n * @param name - The name of the hook whose functions will be executed.\n * @param context - The input value to be passed to each hook function. The value is mutated by each hook function.\n * @returns A promise that resolves once all hook functions have been executed.\n *\n * @example\n * ```typescript\n * const hooks = new Hooks();\n * hooks.on('html:transform:pre', async (ctx) => {\n * ctx.html = ctx.html.replace(/foo/g, 'bar');\n * return ctx.html;\n * });\n * const result = await hooks.run('html:transform:pre', { html: '<div>foo</div>' });\n * console.log(result); // '<div>bar</div>'\n * ```\n * @internal\n */\n async run(name, context) {\n const hooks = this.store.get(name);\n switch (name) {\n case 'html:transform:pre': {\n if (!hooks) {\n return context.html;\n }\n const ctx = { ...context };\n for (const hook of hooks) {\n ctx.html = await hook(ctx);\n }\n return ctx.html;\n }\n default:\n throw new Error(`Running hook \"${name}\" is not supported.`);\n }\n }\n /**\n * Registers a new hook function under the specified hook name.\n * This function should be a function that takes an argument of type `T` and returns a `string` or `Promise<string>`.\n *\n * @template Hook - The type of the hook name. It should be one of the keys of `HooksMapping`.\n * @param name - The name of the hook under which the function will be registered.\n * @param handler - A function to be executed when the hook is triggered. The handler will be called with an argument\n * that may be modified by the hook functions.\n *\n * @remarks\n * - If there are existing handlers registered under the given hook name, the new handler will be added to the list.\n * - If no handlers are registered under the given hook name, a new list will be created with the handler as its first element.\n *\n * @example\n * ```typescript\n * hooks.on('html:transform:pre', async (ctx) => {\n * return ctx.html.replace(/foo/g, 'bar');\n * });\n * ```\n */\n on(name, handler) {\n const hooks = this.store.get(name);\n if (hooks) {\n hooks.push(handler);\n }\n else {\n this.store.set(name, [handler]);\n }\n }\n /**\n * Checks if there are any hooks registered under the specified name.\n *\n * @param name - The name of the hook to check.\n * @returns `true` if there are hooks registered under the specified name, otherwise `false`.\n */\n has(name) {\n return !!this.store.get(name)?.length;\n }\n}\n//# sourceMappingURL=hooks.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { stripIndexHtmlFromURL } from '../utils/url';\nimport { extractRoutesAndCreateRouteTree } from './ng-routes';\nimport { RouteTree } from './route-tree';\n/**\n * Manages the application's server routing logic by building and maintaining a route tree.\n *\n * This class is responsible for constructing the route tree from the Angular application\n * configuration and using it to match incoming requests to the appropriate routes.\n */\nexport class ServerRouter {\n /**\n * Creates an instance of the `ServerRouter`.\n *\n * @param routeTree - An instance of `RouteTree` that holds the routing information.\n * The `RouteTree` is used to match request URLs to the appropriate route metadata.\n */\n constructor(routeTree) {\n this.routeTree = routeTree;\n }\n /**\n * Static property to track the ongoing build promise.\n */\n static #extractionPromise;\n /**\n * Creates or retrieves a `ServerRouter` instance based on the provided manifest and URL.\n *\n * If the manifest contains pre-built routes, a new `ServerRouter` is immediately created.\n * Otherwise, it builds the router by extracting routes from the Angular configuration\n * asynchronously. This method ensures that concurrent builds are prevented by re-using\n * the same promise.\n *\n * @param manifest - An instance of `AngularAppManifest` that contains the route information.\n * @param url - The URL for server-side rendering. The URL is needed to configure `ServerPlatformLocation`.\n * This is necessary to ensure that API requests for relative paths succeed, which is crucial for correct route extraction.\n * [Reference](https://github.com/angular/angular/blob/d608b857c689d17a7ffa33bbb510301014d24a17/packages/platform-server/src/location.ts#L51)\n * @returns A promise resolving to a `ServerRouter` instance.\n */\n static from(manifest, url) {\n if (manifest.routes) {\n const routeTree = RouteTree.fromObject(manifest.routes);\n return Promise.resolve(new ServerRouter(routeTree));\n }\n // Create and store a new promise for the build process.\n // This prevents concurrent builds by re-using the same promise.\n ServerRouter.#extractionPromise ??= extractRoutesAndCreateRouteTree(url, manifest)\n .then((routeTree) => new ServerRouter(routeTree))\n .finally(() => {\n ServerRouter.#extractionPromise = undefined;\n });\n return ServerRouter.#extractionPromise;\n }\n /**\n * Matches a request URL against the route tree to retrieve route metadata.\n *\n * This method strips 'index.html' from the URL if it is present and then attempts\n * to find a match in the route tree. If a match is found, it returns the associated\n * route metadata; otherwise, it returns `undefined`.\n *\n * @param url - The URL to be matched against the route tree.\n * @returns The metadata for the matched route or `undefined` if no match is found.\n */\n match(url) {\n // Strip 'index.html' from URL if present.\n // A request to `http://www.example.com/page/index.html` will render the Angular route corresponding to `http://www.example.com/page`.\n const { pathname } = stripIndexHtmlFromURL(url);\n return this.routeTree.match(decodeURIComponent(pathname));\n }\n}\n//# sourceMappingURL=router.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { InjectionToken } from '@angular/core';\n/**\n * Injection token for the current request.\n */\nexport const REQUEST = new InjectionToken('REQUEST');\n/**\n * Injection token for the response initialization options.\n */\nexport const RESPONSE_INIT = new InjectionToken('RESPONSE_INIT');\n/**\n * Injection token for additional request context.\n */\nexport const REQUEST_CONTEXT = new InjectionToken('REQUEST_CONTEXT');\n//# sourceMappingURL=tokens.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport Critters from '../../third_party/critters';\n/**\n * Pattern used to extract the media query set by Critters in an `onload` handler.\n */\nconst MEDIA_SET_HANDLER_PATTERN = /^this\\.media=[\"'](.*)[\"'];?$/;\n/**\n * Name of the attribute used to save the Critters media query so it can be re-assigned on load.\n */\nconst CSP_MEDIA_ATTR = 'ngCspMedia';\n/**\n * Script that dynamically updates the `media` attribute of `<link>` tags based on a custom attribute (`CSP_MEDIA_ATTR`).\n *\n * NOTE:\n * We do not use `document.querySelectorAll('link').forEach((s) => s.addEventListener('load', ...)`\n * because load events are not always triggered reliably on Chrome.\n * See: https://github.com/angular/angular-cli/issues/26932 and https://crbug.com/1521256\n *\n * The script:\n * - Ensures the event target is a `<link>` tag with the `CSP_MEDIA_ATTR` attribute.\n * - Updates the `media` attribute with the value of `CSP_MEDIA_ATTR` and then removes the attribute.\n * - Removes the event listener when all relevant `<link>` tags have been processed.\n * - Uses event capturing (the `true` parameter) since load events do not bubble up the DOM.\n */\nconst LINK_LOAD_SCRIPT_CONTENT = `\n(() => {\n const CSP_MEDIA_ATTR = '${CSP_MEDIA_ATTR}';\n const documentElement = document.documentElement;\n\n // Listener for load events on link tags.\n const listener = (e) => {\n const target = e.target;\n if (\n !target ||\n target.tagName !== 'LINK' ||\n !target.hasAttribute(CSP_MEDIA_ATTR)\n ) {\n return;\n }\n\n target.media = target.getAttribute(CSP_MEDIA_ATTR);\n target.removeAttribute(CSP_MEDIA_ATTR);\n\n if (!document.head.querySelector(\\`link[\\${CSP_MEDIA_ATTR}]\\`)) {\n documentElement.removeEventListener('load', listener);\n }\n };\n\n documentElement.addEventListener('load', listener, true);\n})();\n`.trim();\nclass CrittersBase extends Critters {\n}\n/* eslint-enable @typescript-eslint/no-unsafe-declaration-merging */\nexport class InlineCriticalCssProcessor extends CrittersBase {\n constructor(readFile, outputPath) {\n super({\n logger: {\n // eslint-disable-next-line no-console\n warn: (s) => console.warn(s),\n // eslint-disable-next-line no-console\n error: (s) => console.error(s),\n info: () => { },\n },\n logLevel: 'warn',\n path: outputPath,\n publicPath: undefined,\n compress: false,\n pruneSource: false,\n reduceInlineStyles: false,\n mergeStylesheets: false,\n // Note: if `preload` changes to anything other than `media`, the logic in\n // `embedLinkedStylesheet` will have to be updated.\n preload: 'media',\n noscriptFallback: true,\n inlineFonts: true,\n });\n this.readFile = readFile;\n this.outputPath = outputPath;\n this.addedCspScriptsDocuments = new WeakSet();\n this.documentNonces = new WeakMap();\n }\n /**\n * Override of the Critters `embedLinkedStylesheet` method\n * that makes it work with Angular's CSP APIs.\n */\n async embedLinkedStylesheet(link, document) {\n if (link.getAttribute('media') === 'print' && link.next?.name === 'noscript') {\n // Workaround for https://github.com/GoogleChromeLabs/critters/issues/64\n // NB: this is only needed for the webpack based builders.\n const media = link.getAttribute('onload')?.match(MEDIA_SET_HANDLER_PATTERN);\n if (media) {\n link.removeAttribute('onload');\n link.setAttribute('media', media[1]);\n link?.next?.remove();\n }\n }\n const returnValue = await super.embedLinkedStylesheet(link, document);\n const cspNonce = this.findCspNonce(document);\n if (cspNonce) {\n const crittersMedia = link.getAttribute('onload')?.match(MEDIA_SET_HANDLER_PATTERN);\n if (crittersMedia) {\n // If there's a Critters-generated `onload` handler and the file has an Angular CSP nonce,\n // we have to remove the handler, because it's incompatible with CSP. We save the value\n // in a different attribute and we generate a script tag with the nonce that uses\n // `addEventListener` to apply the media query instead.\n link.removeAttribute('onload');\n link.setAttribute(CSP_MEDIA_ATTR, crittersMedia[1]);\n this.conditionallyInsertCspLoadingScript(document, cspNonce, link);\n }\n // Ideally we would hook in at the time Critters inserts the `style` tags, but there isn't\n // a way of doing that at the moment so we fall back to doing it any time a `link` tag is\n // inserted. We mitigate it by only iterating the direct children of the `<head>` which\n // should be pretty shallow.\n document.head.children.forEach((child) => {\n if (child.tagName === 'style' && !child.hasAttribute('nonce')) {\n child.setAttribute('nonce', cspNonce);\n }\n });\n }\n return returnValue;\n }\n /**\n * Finds the CSP nonce for a specific document.\n */\n findCspNonce(document) {\n if (this.documentNonces.has(document)) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return this.documentNonces.get(document);\n }\n // HTML attribute are case-insensitive, but the parser used by Critters is case-sensitive.\n const nonceElement = document.querySelector('[ngCspNonce], [ngcspnonce]');\n const cspNonce = nonceElement?.getAttribute('ngCspNonce') || nonceElement?.getAttribute('ngcspnonce') || null;\n this.documentNonces.set(document, cspNonce);\n return cspNonce;\n }\n /**\n * Inserts the `script` tag that swaps the critical CSS at runtime,\n * if one hasn't been inserted into the document already.\n */\n conditionallyInsertCspLoadingScript(document, nonce, link) {\n if (this.addedCspScriptsDocuments.has(document)) {\n return;\n }\n if (document.head.textContent.includes(LINK_LOAD_SCRIPT_CONTENT)) {\n // Script was already added during the build.\n this.addedCspScriptsDocuments.add(document);\n return;\n }\n const script = document.createElement('script');\n script.setAttribute('nonce', nonce);\n script.textContent = LINK_LOAD_SCRIPT_CONTENT;\n // Prepend the script to the head since it needs to\n // run as early as possible, before the `link` tags.\n document.head.insertBefore(script, link);\n this.addedCspScriptsDocuments.add(document);\n }\n}\n//# sourceMappingURL=inline-critical-css.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { ɵConsole, ɵresetCompiledComponents } from '@angular/core';\nimport { ɵSERVER_CONTEXT as SERVER_CONTEXT } from '@angular/platform-server';\nimport { ServerAssets } from './assets';\nimport { Console } from './console';\nimport { Hooks } from './hooks';\nimport { getAngularAppManifest } from './manifest';\nimport { ServerRouter } from './routes/router';\nimport { REQUEST, REQUEST_CONTEXT, RESPONSE_INIT } from './tokens';\nimport { InlineCriticalCssProcessor } from './utils/inline-critical-css';\nimport { renderAngular } from './utils/ng';\n/**\n * Enum representing the different contexts in which server rendering can occur.\n */\nexport var ServerRenderContext;\n(function (ServerRenderContext) {\n ServerRenderContext[\"SSR\"] = \"ssr\";\n ServerRenderContext[\"SSG\"] = \"ssg\";\n ServerRenderContext[\"AppShell\"] = \"app-shell\";\n})(ServerRenderContext || (ServerRenderContext = {}));\n/**\n * Represents a locale-specific Angular server application managed by the server application engine.\n *\n * The `AngularServerApp` class handles server-side rendering and asset management for a specific locale.\n */\nexport class AngularServerApp {\n constructor() {\n /**\n * Hooks for extending or modifying the behavior of the server application.\n * This instance can be used to attach custom functionality to various events in the server application lifecycle.\n */\n this.hooks = new Hooks();\n /**\n * The manifest associated with this server application.\n */\n this.manifest = getAngularAppManifest();\n /**\n * An instance of ServerAsset that handles server-side asset.\n */\n this.assets = new ServerAssets(this.manifest);\n }\n /**\n * Renders a response for the given HTTP request using the server application.\n *\n * This method processes the request and returns a response based on the specified rendering context.\n *\n * @param request - The incoming HTTP request to be rendered.\n * @param requestContext - Optional additional context for rendering, such as request metadata.\n * @param serverContext - The rendering context.\n *\n * @returns A promise that resolves to the HTTP response object resulting from the rendering, or null if no match is found.\n */\n render(request, requestContext, serverContext = ServerRenderContext.SSR) {\n return Promise.race([\n this.createAbortPromise(request),\n this.handleRendering(request, requestContext, serverContext),\n ]);\n }\n /**\n * Creates a promise that rejects when the request is aborted.\n *\n * @param request - The HTTP request to monitor for abortion.\n * @returns A promise that never resolves but rejects with an `AbortError` if the request is aborted.\n */\n createAbortPromise(request) {\n return new Promise((_, reject) => {\n request.signal.addEventListener('abort', () => {\n const abortError = new Error(`Request for: ${request.url} was aborted.\\n${request.signal.reason}`);\n abortError.name = 'AbortError';\n reject(abortError);\n }, { once: true });\n });\n }\n /**\n * Handles the server-side rendering process for the given HTTP request.\n * This method matches the request URL to a route and performs rendering if a matching route is found.\n *\n * @param request - The incoming HTTP request to be processed.\n * @param requestContext - Optional additional context for rendering, such as request metadata.\n * @param serverContext - The rendering context. Defaults to server-side rendering (SSR).\n *\n * @returns A promise that resolves to the rendered response, or null if no matching route is found.\n */\n async handleRendering(request, requestContext, serverContext = ServerRenderContext.SSR) {\n const url = new URL(request.url);\n this.router ??= await ServerRouter.from(this.manifest, url);\n const matchedRoute = this.router.match(url);\n if (!matchedRoute) {\n // Not a known Angular route.\n return null;\n }\n const { redirectTo } = matchedRoute;\n if (redirectTo !== undefined) {\n // 302 Found is used by default for redirections\n // See: https://developer.mozilla.org/en-US/docs/Web/API/Response/redirect_static#status\n return Response.redirect(new URL(redirectTo, url), 302);\n }\n const platformProviders = [\n {\n provide: SERVER_CONTEXT,\n useValue: serverContext,\n },\n {\n // An Angular Console Provider that does not print a set of predefined logs.\n provide: ɵConsole,\n // Using `useClass` would necessitate decorating `Console` with `@Injectable`,\n // which would require switching from `ts_library` to `ng_module`. This change\n // would also necessitate various patches of `@angular/bazel` to support ESM.\n useFactory: () => new Console(),\n },\n ];\n const isSsrMode = serverContext === ServerRenderContext.SSR;\n const responseInit = {};\n if (isSsrMode) {\n platformProviders.push({\n provide: REQUEST,\n useValue: request,\n }, {\n provide: REQUEST_CONTEXT,\n useValue: requestContext,\n }, {\n provide: RESPONSE_INIT,\n useValue: responseInit,\n });\n }\n const { manifest, hooks, assets } = this;\n let html = await assets.getIndexServerHtml();\n // Skip extra microtask if there are no pre hooks.\n if (hooks.has('html:transform:pre')) {\n html = await hooks.run('html:transform:pre', { html });\n }\n this.boostrap ??= await manifest.bootstrap();\n html = await renderAngular(html, this.boostrap, new URL(request.url), platformProviders);\n if (manifest.inlineCriticalCss) {\n // Optionally inline critical CSS.\n this.inlineCriticalCssProcessor ??= new InlineCriticalCssProcessor((path) => {\n const fileName = path.split('/').pop() ?? path;\n return this.assets.getServerAsset(fileName);\n });\n html = await this.inlineCriticalCssProcessor.process(html);\n }\n return new Response(html, responseInit);\n }\n}\nlet angularServerApp;\n/**\n * Retrieves or creates an instance of `AngularServerApp`.\n * - If an instance of `AngularServerApp` already exists, it will return the existing one.\n * - If no instance exists, it will create a new one with the provided options.\n * @returns The existing or newly created instance of `AngularServerApp`.\n */\nexport function getOrCreateAngularServerApp() {\n return (angularServerApp ??= new AngularServerApp());\n}\n/**\n * Destroys the existing `AngularServerApp` instance, releasing associated resources and resetting the\n * reference to `undefined`.\n *\n * This function is primarily used to enable the recreation of the `AngularServerApp` instance,\n * typically when server configuration or application state needs to be refreshed.\n */\nexport function destroyAngularServerApp() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Need to clean up GENERATED_COMP_IDS map in `@angular/core`.\n // Otherwise an incorrect component ID generation collision detected warning will be displayed in development.\n // See: https://github.com/angular/angular-cli/issues/25924\n ɵresetCompiledComponents();\n }\n angularServerApp = undefined;\n}\n//# sourceMappingURL=app.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n// ɵgetRoutesFromAngularRouterConfig is only used by the Webpack based server builder.\nexport { getRoutesFromAngularRouterConfig as ɵgetRoutesFromAngularRouterConfig, extractRoutesAndCreateRouteTree as ɵextractRoutesAndCreateRouteTree, } from './src/routes/ng-routes';\nexport { ServerRenderContext as ɵServerRenderContext, getOrCreateAngularServerApp as ɵgetOrCreateAngularServerApp, destroyAngularServerApp as ɵdestroyAngularServerApp, } from './src/app';\nexport { setAngularAppManifest as ɵsetAngularAppManifest, setAngularAppEngineManifest as ɵsetAngularAppEngineManifest, } from './src/manifest';\nexport { InlineCriticalCssProcessor as ɵInlineCriticalCssProcessor } from './src/utils/inline-critical-css';\n//# sourceMappingURL=private_export.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Extracts a potential locale ID from a given URL based on the specified base path.\n *\n * This function parses the URL to locate a potential locale identifier that immediately\n * follows the base path segment in the URL's pathname. If the URL does not contain a valid\n * locale ID, an empty string is returned.\n *\n * @param url - The full URL from which to extract the locale ID.\n * @param basePath - The base path used as the reference point for extracting the locale ID.\n * @returns The extracted locale ID if present, or an empty string if no valid locale ID is found.\n *\n * @example\n * ```js\n * const url = new URL('https://example.com/base/en/page');\n * const basePath = '/base';\n * const localeId = getPotentialLocaleIdFromUrl(url, basePath);\n * console.log(localeId); // Output: 'en'\n * ```\n */\nexport function getPotentialLocaleIdFromUrl(url, basePath) {\n const { pathname } = url;\n // Move forward of the base path section.\n let start = basePath.length;\n if (pathname[start] === '/') {\n start++;\n }\n // Find the next forward slash.\n let end = pathname.indexOf('/', start);\n if (end === -1) {\n end = pathname.length;\n }\n // Extract the potential locale id.\n return pathname.slice(start, end);\n}\n//# sourceMappingURL=i18n.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\nimport { Hooks } from './hooks';\nimport { getPotentialLocaleIdFromUrl } from './i18n';\nimport { getAngularAppEngineManifest } from './manifest';\nimport { stripIndexHtmlFromURL } from './utils/url';\n/**\n * Angular server application engine.\n * Manages Angular server applications (including localized ones), handles rendering requests,\n * and optionally transforms index HTML before rendering.\n *\n * @note This class should be instantiated once and used as a singleton across the server-side\n * application to ensure consistent handling of rendering requests and resource management.\n *\n * @developerPreview\n */\nexport class AngularAppEngine {\n constructor() {\n /**\n * The manifest for the server application.\n */\n this.manifest = getAngularAppEngineManifest();\n }\n /**\n * Hooks for extending or modifying the behavior of the server application.\n * These hooks are used by the Angular CLI when running the development server and\n * provide extensibility points for the application lifecycle.\n *\n * @private\n */\n static { this.ɵhooks = new Hooks(); }\n /**\n * Provides access to the hooks for extending or modifying the server application's behavior.\n * This allows attaching custom functionality to various server application lifecycle events.\n *\n * @internal\n */\n get hooks() {\n return AngularAppEngine.ɵhooks;\n }\n /**\n * Renders a response for the given HTTP request using the server application.\n *\n * This method processes the request, determines the appropriate route and rendering context,\n * and returns an HTTP response.\n *\n * If the request URL appears to be for a file (excluding `/index.html`), the method returns `null`.\n * A request to `https://www.example.com/page/index.html` will render the Angular route\n * corresponding to `https://www.example.com/page`.\n *\n * @param request - The incoming HTTP request object to be rendered.\n * @param requestContext - Optional additional context for the request, such as metadata.\n * @returns A promise that resolves to a Response object, or `null` if the request URL represents a file (e.g., `./logo.png`)\n * rather than an application route.\n */\n async render(request, requestContext) {\n // Skip if the request looks like a file but not `/index.html`.\n const url = new URL(request.url);\n const entryPoint = this.getEntryPointFromUrl(url);\n if (!entryPoint) {\n return null;\n }\n const { ɵgetOrCreateAngularServerApp: getOrCreateAngularServerApp } = await entryPoint();\n // Note: Using `instanceof` is not feasible here because `AngularServerApp` will\n // be located in separate bundles, making `instanceof` checks unreliable.\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n const serverApp = getOrCreateAngularServerApp();\n serverApp.hooks = this.hooks;\n return serverApp.render(request, requestContext);\n }\n /**\n * Retrieves the entry point path and locale for the Angular server application based on the provided URL.\n *\n * This method determines the appropriate entry point and locale for rendering the application by examining the URL.\n * If there is only one entry point available, it is returned regardless of the URL.\n * Otherwise, the method extracts a potential locale identifier from the URL and looks up the corresponding entry point.\n *\n * @param url - The URL used to derive the locale and determine the appropriate entry point.\n * @returns A function that returns a promise resolving to an object with the `EntryPointExports` type,\n * or `undefined` if no matching entry point is found for the extracted locale.\n */\n getEntryPointFromUrl(url) {\n const { entryPoints, basePath } = this.manifest;\n if (entryPoints.size === 1) {\n return entryPoints.values().next().value;\n }\n const potentialLocale = getPotentialLocaleIdFromUrl(url, basePath);\n return entryPoints.get(potentialLocale);\n }\n /**\n * Retrieves HTTP headers for a request associated with statically generated (SSG) pages,\n * based on the URL pathname.\n *\n * @param request - The incoming request object.\n * @returns A `Map` containing the HTTP headers as key-value pairs.\n * @note This function should be used exclusively for retrieving headers of SSG pages.\n */\n getHeaders(request) {\n if (this.manifest.staticPathsHeaders.size === 0) {\n return new Map();\n }\n const { pathname } = stripIndexHtmlFromURL(new URL(request.url));\n const headers = this.manifest.staticPathsHeaders.get(pathname);\n return new Map(headers);\n }\n}\n//# sourceMappingURL=app-engine.js.map"],"names":["ɵConsole","loadChildrenHelper","INTERNAL_SERVER_PLATFORM_PROVIDERS","whenStable","SERVER_CONTEXT","ɵresetCompiledComponents"],"mappings":";;;;;;AAOA;AACA;AACA;AACO,MAAM,YAAY,CAAC;AAC1B;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,QAAQ,EAAE;AAC1B,QAAQ,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACjC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,cAAc,CAAC,IAAI,EAAE;AAC/B,QAAQ,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACrD,QAAQ,IAAI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Q,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACvE,QAAQ,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;AAChC,KAAK;AACL;;;;"}
package/index.d.ts CHANGED
@@ -61,7 +61,7 @@ export declare class AngularAppEngine {
61
61
  * @returns A `Map` containing the HTTP headers as key-value pairs.
62
62
  * @note This function should be used exclusively for retrieving headers of SSG pages.
63
63
  */
64
- getHeaders(request: Request): Readonly<Map<string, string>>;
64
+ getHeaders(request: Request): ReadonlyMap<string, string>;
65
65
  }
66
66
 
67
67
  /**
@@ -74,7 +74,7 @@ declare interface AngularAppEngineManifest {
74
74
  * - `key`: The base href for the entry point.
75
75
  * - `value`: A function that returns a promise resolving to an object of type `EntryPointExports`.
76
76
  */
77
- readonly entryPoints: Readonly<Map<string, () => Promise<EntryPointExports>>>;
77
+ readonly entryPoints: ReadonlyMap<string, () => Promise<EntryPointExports>>;
78
78
  /**
79
79
  * The base path for the server application.
80
80
  * This is used to determine the root path of the application.
@@ -88,7 +88,7 @@ declare interface AngularAppEngineManifest {
88
88
  * - `headerName`: The name of the HTTP header.
89
89
  * - `headerValue`: The value of the HTTP header.
90
90
  */
91
- readonly staticPathsHeaders: Readonly<Map<string, readonly [headerName: string, headerValue: string][]>>;
91
+ readonly staticPathsHeaders: ReadonlyMap<string, readonly [headerName: string, headerValue: string][]>;
92
92
  }
93
93
 
94
94
  /**
@@ -101,7 +101,7 @@ declare interface AngularAppManifest {
101
101
  * - `key`: The path of the asset.
102
102
  * - `value`: A function returning a promise that resolves to the file contents of the asset.
103
103
  */
104
- readonly assets: Readonly<Map<string, () => Promise<string>>>;
104
+ readonly assets: ReadonlyMap<string, () => Promise<string>>;
105
105
  /**
106
106
  * The bootstrap mechanism for the server application.
107
107
  * A function that returns a promise that resolves to an `NgModule` or a function
package/node/index.d.ts CHANGED
@@ -56,7 +56,7 @@ export declare class AngularNodeAppEngine {
56
56
  }));
57
57
  * ```
58
58
  */
59
- getHeaders(request: IncomingMessage): Readonly<Map<string, string>>;
59
+ getHeaders(request: IncomingMessage): ReadonlyMap<string, string>;
60
60
  }
61
61
 
62
62
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/ssr",
3
- "version": "19.0.0-next.4",
3
+ "version": "19.0.0-next.5",
4
4
  "description": "Angular server side rendering utilities",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/angular/angular-cli",
@@ -22,12 +22,12 @@
22
22
  "@angular/router": "^19.0.0-next.0"
23
23
  },
24
24
  "devDependencies": {
25
- "@angular/common": "19.0.0-next.3",
26
- "@angular/compiler": "19.0.0-next.3",
27
- "@angular/core": "19.0.0-next.3",
28
- "@angular/platform-browser": "19.0.0-next.3",
29
- "@angular/platform-server": "19.0.0-next.3",
30
- "@angular/router": "19.0.0-next.3",
25
+ "@angular/common": "19.0.0-next.5",
26
+ "@angular/compiler": "19.0.0-next.5",
27
+ "@angular/core": "19.0.0-next.5",
28
+ "@angular/platform-browser": "19.0.0-next.5",
29
+ "@angular/platform-server": "19.0.0-next.5",
30
+ "@angular/router": "19.0.0-next.5",
31
31
  "@bazel/runfiles": "^5.8.1"
32
32
  },
33
33
  "schematics": "./schematics/collection.json",