@angular/common 21.2.0-rc.0 → 21.2.1
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/_common_module-chunk.mjs +94 -87
- package/fesm2022/_common_module-chunk.mjs.map +1 -1
- package/fesm2022/_location-chunk.mjs +16 -16
- package/fesm2022/_location-chunk.mjs.map +1 -1
- package/fesm2022/_module-chunk.mjs +46 -46
- package/fesm2022/_module-chunk.mjs.map +1 -1
- package/fesm2022/_platform_location-chunk.mjs +7 -7
- package/fesm2022/_platform_location-chunk.mjs.map +1 -1
- package/fesm2022/_platform_navigation-chunk.mjs +4 -4
- package/fesm2022/_platform_navigation-chunk.mjs.map +1 -1
- package/fesm2022/_xhr-chunk.mjs +1 -1
- package/fesm2022/_xhr-chunk.mjs.map +1 -1
- package/fesm2022/common.mjs +62 -29
- package/fesm2022/common.mjs.map +1 -1
- package/fesm2022/http-testing.mjs +8 -8
- package/fesm2022/http-testing.mjs.map +1 -1
- package/fesm2022/http.mjs +226 -165
- package/fesm2022/http.mjs.map +1 -1
- package/fesm2022/testing.mjs +13 -13
- package/fesm2022/testing.mjs.map +1 -1
- package/fesm2022/upgrade.mjs +5 -5
- package/fesm2022/upgrade.mjs.map +1 -1
- package/package.json +2 -2
- package/types/_common_module-chunk.d.ts +1 -1
- package/types/_module-chunk.d.ts +1 -1
- package/types/_platform_location-chunk.d.ts +1 -1
- package/types/_xhr-chunk.d.ts +1 -1
- package/types/common.d.ts +1 -1
- package/types/http-testing.d.ts +1 -1
- package/types/http.d.ts +1 -1
- package/types/testing.d.ts +1 -1
- package/types/upgrade.d.ts +1 -1
package/fesm2022/http.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/common/http/src/resource.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/common/http/src/transfer_cache.ts"],"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\nimport {\n Injector,\n Signal,\n ɵResourceImpl as ResourceImpl,\n inject,\n linkedSignal,\n assertInInjectionContext,\n signal,\n computed,\n ResourceStreamItem,\n type ValueEqualityFn,\n ɵRuntimeError,\n ɵRuntimeErrorCode,\n ɵencapsulateResourceError as encapsulateResourceError,\n} from '@angular/core';\nimport type {Subscription} from 'rxjs';\n\nimport {HttpRequest} from './request';\nimport {HttpClient} from './client';\nimport {HttpErrorResponse, HttpEventType, HttpProgressEvent} from './response';\nimport {HttpHeaders} from './headers';\nimport {HttpParams} from './params';\nimport {HttpResourceRef, HttpResourceOptions, HttpResourceRequest} from './resource_api';\n\n/**\n * Type for the `httpRequest` top-level function, which includes the call signatures for the JSON-\n * based `httpRequest` as well as sub-functions for `ArrayBuffer`, `Blob`, and `string` type\n * requests.\n *\n * @experimental 19.2\n */\nexport interface HttpResourceFn {\n /**\n * Create a `Resource` that fetches data with an HTTP GET request to the given URL.\n *\n * The resource will update when the URL changes via signals.\n *\n * Uses `HttpClient` to make requests and supports interceptors, testing, and the other features\n * of the `HttpClient` API. Data is parsed as JSON by default - use a sub-function of\n * `httpResource`, such as `httpResource.text()`, to parse the response differently.\n *\n * @experimental 19.2\n */\n <TResult = unknown>(\n url: () => string | undefined,\n options: HttpResourceOptions<TResult, unknown> & {defaultValue: NoInfer<TResult>},\n ): HttpResourceRef<TResult>;\n\n /**\n * Create a `Resource` that fetches data with an HTTP GET request to the given URL.\n *\n * The resource will update when the URL changes via signals.\n *\n * Uses `HttpClient` to make requests and supports interceptors, testing, and the other features\n * of the `HttpClient` API. Data is parsed as JSON by default - use a sub-function of\n * `httpResource`, such as `httpResource.text()`, to parse the response differently.\n *\n * @experimental 19.2\n */\n <TResult = unknown>(\n url: () => string | undefined,\n options?: HttpResourceOptions<TResult, unknown>,\n ): HttpResourceRef<TResult | undefined>;\n\n /**\n * Create a `Resource` that fetches data with the configured HTTP request.\n *\n * The resource will update when the request changes via signals.\n *\n * Uses `HttpClient` to make requests and supports interceptors, testing, and the other features\n * of the `HttpClient` API. Data is parsed as JSON by default - use a sub-function of\n * `httpResource`, such as `httpResource.text()`, to parse the response differently.\n *\n * @experimental 19.2\n */\n <TResult = unknown>(\n request: () => HttpResourceRequest | undefined,\n options: HttpResourceOptions<TResult, unknown> & {defaultValue: NoInfer<TResult>},\n ): HttpResourceRef<TResult>;\n\n /**\n * Create a `Resource` that fetches data with the configured HTTP request.\n *\n * The resource will update when the request changes via signals.\n *\n * Uses `HttpClient` to make requests and supports interceptors, testing, and the other features\n * of the `HttpClient` API. Data is parsed as JSON by default - use a sub-function of\n * `httpResource`, such as `httpResource.text()`, to parse the response differently.\n *\n * @experimental 19.2\n */\n <TResult = unknown>(\n request: () => HttpResourceRequest | undefined,\n options?: HttpResourceOptions<TResult, unknown>,\n ): HttpResourceRef<TResult | undefined>;\n\n /**\n * Create a `Resource` that fetches data with the configured HTTP request.\n *\n * The resource will update when the URL or request changes via signals.\n *\n * Uses `HttpClient` to make requests and supports interceptors, testing, and the other features\n * of the `HttpClient` API. Data is parsed into an `ArrayBuffer`.\n *\n * @experimental 19.2\n */\n arrayBuffer: {\n <TResult = ArrayBuffer>(\n url: () => string | undefined,\n options: HttpResourceOptions<TResult, ArrayBuffer> & {defaultValue: NoInfer<TResult>},\n ): HttpResourceRef<TResult>;\n\n <TResult = ArrayBuffer>(\n url: () => string | undefined,\n options?: HttpResourceOptions<TResult, ArrayBuffer>,\n ): HttpResourceRef<TResult | undefined>;\n\n <TResult = ArrayBuffer>(\n request: () => HttpResourceRequest | undefined,\n options: HttpResourceOptions<TResult, ArrayBuffer> & {defaultValue: NoInfer<TResult>},\n ): HttpResourceRef<TResult>;\n\n <TResult = ArrayBuffer>(\n request: () => HttpResourceRequest | undefined,\n options?: HttpResourceOptions<TResult, ArrayBuffer>,\n ): HttpResourceRef<TResult | undefined>;\n };\n\n /**\n * Create a `Resource` that fetches data with the configured HTTP request.\n *\n * The resource will update when the URL or request changes via signals.\n *\n * Uses `HttpClient` to make requests and supports interceptors, testing, and the other features\n * of the `HttpClient` API. Data is parsed into a `Blob`.\n *\n * @experimental 19.2\n */\n blob: {\n <TResult = Blob>(\n url: () => string | undefined,\n options: HttpResourceOptions<TResult, Blob> & {defaultValue: NoInfer<TResult>},\n ): HttpResourceRef<TResult>;\n\n <TResult = Blob>(\n url: () => string | undefined,\n options?: HttpResourceOptions<TResult, Blob>,\n ): HttpResourceRef<TResult | undefined>;\n\n <TResult = Blob>(\n request: () => HttpResourceRequest | undefined,\n options: HttpResourceOptions<TResult, Blob> & {defaultValue: NoInfer<TResult>},\n ): HttpResourceRef<TResult>;\n\n <TResult = Blob>(\n request: () => HttpResourceRequest | undefined,\n options?: HttpResourceOptions<TResult, Blob>,\n ): HttpResourceRef<TResult | undefined>;\n };\n\n /**\n * Create a `Resource` that fetches data with the configured HTTP request.\n *\n * The resource will update when the URL or request changes via signals.\n *\n * Uses `HttpClient` to make requests and supports interceptors, testing, and the other features\n * of the `HttpClient` API. Data is parsed as a `string`.\n *\n * @experimental 19.2\n */\n text: {\n <TResult = string>(\n url: () => string | undefined,\n options: HttpResourceOptions<TResult, string> & {defaultValue: NoInfer<TResult>},\n ): HttpResourceRef<TResult>;\n\n <TResult = string>(\n url: () => string | undefined,\n options?: HttpResourceOptions<TResult, string>,\n ): HttpResourceRef<TResult | undefined>;\n\n <TResult = string>(\n request: () => HttpResourceRequest | undefined,\n options: HttpResourceOptions<TResult, string> & {defaultValue: NoInfer<TResult>},\n ): HttpResourceRef<TResult>;\n\n <TResult = string>(\n request: () => HttpResourceRequest | undefined,\n options?: HttpResourceOptions<TResult, string>,\n ): HttpResourceRef<TResult | undefined>;\n };\n}\n\n/**\n * `httpResource` makes a reactive HTTP request and exposes the request status and response value as\n * a `WritableResource`. By default, it assumes that the backend will return JSON data. To make a\n * request that expects a different kind of data, you can use a sub-constructor of `httpResource`,\n * such as `httpResource.text`.\n *\n * @experimental 19.2\n * @initializerApiFunction\n */\nexport const httpResource: HttpResourceFn = (() => {\n const jsonFn = makeHttpResourceFn<unknown>('json') as HttpResourceFn;\n jsonFn.arrayBuffer = makeHttpResourceFn<ArrayBuffer>('arraybuffer');\n jsonFn.blob = makeHttpResourceFn('blob');\n jsonFn.text = makeHttpResourceFn('text');\n return jsonFn;\n})();\n\n/**\n * The expected response type of the server.\n *\n * This is used to parse the response appropriately before returning it to\n * the requestee.\n */\ntype ResponseType = 'arraybuffer' | 'blob' | 'json' | 'text';\ntype RawRequestType = (() => string | undefined) | (() => HttpResourceRequest | undefined);\n\nfunction makeHttpResourceFn<TRaw>(responseType: ResponseType) {\n return function httpResource<TResult = TRaw>(\n request: RawRequestType,\n options?: HttpResourceOptions<TResult, TRaw>,\n ): HttpResourceRef<TResult> {\n if (ngDevMode && !options?.injector) {\n assertInInjectionContext(httpResource);\n }\n const injector = options?.injector ?? inject(Injector);\n return new HttpResourceImpl(\n injector,\n () => normalizeRequest(request, responseType),\n options?.defaultValue,\n options?.debugName,\n options?.parse as (value: unknown) => TResult,\n options?.equal as ValueEqualityFn<unknown>,\n ) as HttpResourceRef<TResult>;\n };\n}\n\nfunction normalizeRequest(\n request: RawRequestType,\n responseType: ResponseType,\n): HttpRequest<unknown> | undefined {\n let unwrappedRequest = typeof request === 'function' ? request() : request;\n if (unwrappedRequest === undefined) {\n return undefined;\n } else if (typeof unwrappedRequest === 'string') {\n unwrappedRequest = {url: unwrappedRequest};\n }\n\n const headers =\n unwrappedRequest.headers instanceof HttpHeaders\n ? unwrappedRequest.headers\n : new HttpHeaders(\n unwrappedRequest.headers as\n | Record<string, string | number | Array<string | number>>\n | undefined,\n );\n\n const params =\n unwrappedRequest.params instanceof HttpParams\n ? unwrappedRequest.params\n : new HttpParams({fromObject: unwrappedRequest.params});\n\n return new HttpRequest(\n unwrappedRequest.method ?? 'GET',\n unwrappedRequest.url,\n unwrappedRequest.body ?? null,\n {\n headers,\n params,\n reportProgress: unwrappedRequest.reportProgress,\n withCredentials: unwrappedRequest.withCredentials,\n keepalive: unwrappedRequest.keepalive,\n cache: unwrappedRequest.cache as RequestCache,\n priority: unwrappedRequest.priority as RequestPriority,\n mode: unwrappedRequest.mode as RequestMode,\n redirect: unwrappedRequest.redirect as RequestRedirect,\n responseType,\n context: unwrappedRequest.context,\n transferCache: unwrappedRequest.transferCache,\n credentials: unwrappedRequest.credentials as RequestCredentials,\n referrer: unwrappedRequest.referrer,\n referrerPolicy: unwrappedRequest.referrerPolicy as ReferrerPolicy,\n integrity: unwrappedRequest.integrity,\n timeout: unwrappedRequest.timeout,\n },\n );\n}\nclass HttpResourceImpl<T>\n extends ResourceImpl<T, HttpRequest<unknown> | undefined>\n implements HttpResourceRef<T>\n{\n private client!: HttpClient;\n private _headers = linkedSignal({\n source: this.extRequest,\n computation: () => undefined as HttpHeaders | undefined,\n });\n private _progress = linkedSignal({\n source: this.extRequest,\n computation: () => undefined as HttpProgressEvent | undefined,\n });\n private _statusCode = linkedSignal({\n source: this.extRequest,\n computation: () => undefined as number | undefined,\n });\n\n readonly headers = computed(() =>\n this.status() === 'resolved' || this.status() === 'error' ? this._headers() : undefined,\n );\n readonly progress = this._progress.asReadonly();\n readonly statusCode = this._statusCode.asReadonly();\n\n constructor(\n injector: Injector,\n request: () => HttpRequest<T> | undefined,\n defaultValue: T,\n debugName?: string,\n parse?: (value: unknown) => T,\n equal?: ValueEqualityFn<unknown>,\n ) {\n super(\n request,\n ({params: request, abortSignal}) => {\n let sub: Subscription;\n\n // Track the abort listener so it can be removed if the Observable completes (as a memory\n // optimization).\n const onAbort = () => sub.unsubscribe();\n abortSignal.addEventListener('abort', onAbort);\n\n // Start off stream as undefined.\n const stream = signal<ResourceStreamItem<T>>({value: undefined as T});\n let resolve: ((value: Signal<ResourceStreamItem<T>>) => void) | undefined;\n const promise = new Promise<Signal<ResourceStreamItem<T>>>((r) => (resolve = r));\n\n const send = (value: ResourceStreamItem<T>): void => {\n stream.set(value);\n resolve?.(stream);\n resolve = undefined;\n };\n\n sub = this.client.request(request!).subscribe({\n next: (event) => {\n switch (event.type) {\n case HttpEventType.Response:\n this._headers.set(event.headers);\n this._statusCode.set(event.status);\n try {\n send({value: parse ? parse(event.body) : (event.body as T)});\n } catch (error) {\n send({error: encapsulateResourceError(error)});\n }\n break;\n case HttpEventType.DownloadProgress:\n this._progress.set(event);\n break;\n }\n },\n error: (error) => {\n if (error instanceof HttpErrorResponse) {\n this._headers.set(error.headers);\n this._statusCode.set(error.status);\n }\n\n send({error});\n abortSignal.removeEventListener('abort', onAbort);\n },\n complete: () => {\n if (resolve) {\n send({\n error: new ɵRuntimeError(\n ɵRuntimeErrorCode.RESOURCE_COMPLETED_BEFORE_PRODUCING_VALUE,\n ngDevMode && 'Resource completed before producing a value',\n ),\n });\n }\n abortSignal.removeEventListener('abort', onAbort);\n },\n });\n\n return promise;\n },\n defaultValue,\n equal,\n debugName,\n injector,\n );\n this.client = injector.get(HttpClient);\n }\n\n override set(value: T): void {\n super.set(value);\n\n this._headers.set(undefined);\n this._progress.set(undefined);\n this._statusCode.set(undefined);\n }\n\n // This is a type only override of the method\n declare hasValue: () => this is HttpResourceRef<Exclude<T, undefined>>;\n}\n","/**\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\nimport {\n APP_BOOTSTRAP_LISTENER,\n ApplicationRef,\n inject,\n InjectionToken,\n makeStateKey,\n Provider,\n StateKey,\n TransferState,\n ɵformatRuntimeError as formatRuntimeError,\n ɵperformanceMarkFeature as performanceMarkFeature,\n ɵtruncateMiddle as truncateMiddle,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\nimport {Observable, of} from 'rxjs';\nimport {tap} from 'rxjs/operators';\n\nimport {RuntimeErrorCode} from './errors';\nimport {HttpHeaders} from './headers';\nimport {HTTP_ROOT_INTERCEPTOR_FNS, HttpHandlerFn} from './interceptor';\nimport {HttpRequest} from './request';\nimport {HttpEvent, HttpResponse} from './response';\nimport {HttpParams} from './params';\n\n/**\n * Options to configure how TransferCache should be used to cache requests made via HttpClient.\n *\n * @param includeHeaders Specifies which headers should be included into cached responses. No\n * headers are included by default.\n * @param filter A function that receives a request as an argument and returns a boolean to indicate\n * whether a request should be included into the cache.\n * @param includePostRequests Enables caching for POST requests. By default, only GET and HEAD\n * requests are cached. This option can be enabled if POST requests are used to retrieve data\n * (for example using GraphQL).\n * @param includeRequestsWithAuthHeaders Enables caching of requests containing either `Authorization`\n * or `Proxy-Authorization` headers. By default, these requests are excluded from caching.\n *\n * @see [Configuring the caching options](guide/ssr#configuring-the-caching-options)\n *\n * @publicApi\n */\nexport type HttpTransferCacheOptions = {\n includeHeaders?: string[];\n filter?: (req: HttpRequest<unknown>) => boolean;\n includePostRequests?: boolean;\n includeRequestsWithAuthHeaders?: boolean;\n};\n\n/**\n * If your application uses different HTTP origins to make API calls (via `HttpClient`) on the server and\n * on the client, the `HTTP_TRANSFER_CACHE_ORIGIN_MAP` token allows you to establish a mapping\n * between those origins, so that `HttpTransferCache` feature can recognize those requests as the same\n * ones and reuse the data cached on the server during hydration on the client.\n *\n * IMPORTANT: The `HTTP_TRANSFER_CACHE_ORIGIN_MAP` token should *only* be provided in\n * the *server* code of your application (typically in the `app.server.config.ts` script). Angular throws an\n * error if it detects that the token is defined while running on the client.\n *\n * @usageNotes\n *\n * When the same API endpoint is accessed via `http://internal-domain.com:8080` on the server and\n * via `https://external-domain.com` on the client, you can use the following configuration:\n * ```ts\n * // in app.server.config.ts\n * {\n * provide: HTTP_TRANSFER_CACHE_ORIGIN_MAP,\n * useValue: {\n * 'http://internal-domain.com:8080': 'https://external-domain.com'\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport const HTTP_TRANSFER_CACHE_ORIGIN_MAP = new InjectionToken<Record<string, string>>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'HTTP_TRANSFER_CACHE_ORIGIN_MAP' : '',\n);\n\n/**\n * Keys within cached response data structure.\n */\n\nexport const BODY = 'b';\nexport const HEADERS = 'h';\nexport const STATUS = 's';\nexport const STATUS_TEXT = 'st';\nexport const REQ_URL = 'u';\nexport const RESPONSE_TYPE = 'rt';\n\ninterface TransferHttpResponse {\n /** body */\n [BODY]: any;\n /** headers */\n [HEADERS]: Record<string, string[]>;\n /** status */\n [STATUS]?: number;\n /** statusText */\n [STATUS_TEXT]?: string;\n /** url */\n [REQ_URL]?: string;\n /** responseType */\n [RESPONSE_TYPE]?: HttpRequest<unknown>['responseType'];\n}\n\ninterface CacheOptions extends HttpTransferCacheOptions {\n isCacheActive: boolean;\n}\n\nconst CACHE_OPTIONS = new InjectionToken<CacheOptions>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'HTTP_TRANSFER_STATE_CACHE_OPTIONS' : '',\n);\n\n/**\n * A list of allowed HTTP methods to cache.\n */\nconst ALLOWED_METHODS = ['GET', 'HEAD'];\n\nexport function transferCacheInterceptorFn(\n req: HttpRequest<unknown>,\n next: HttpHandlerFn,\n): Observable<HttpEvent<unknown>> {\n const {isCacheActive, ...globalOptions} = inject(CACHE_OPTIONS);\n const {transferCache: requestOptions, method: requestMethod} = req;\n\n // In the following situations we do not want to cache the request\n if (\n !isCacheActive ||\n requestOptions === false ||\n // POST requests are allowed either globally or at request level\n (requestMethod === 'POST' && !globalOptions.includePostRequests && !requestOptions) ||\n (requestMethod !== 'POST' && !ALLOWED_METHODS.includes(requestMethod)) ||\n // Do not cache request that require authorization when includeRequestsWithAuthHeaders is falsey\n (!globalOptions.includeRequestsWithAuthHeaders && hasAuthHeaders(req)) ||\n globalOptions.filter?.(req) === false\n ) {\n return next(req);\n }\n\n const transferState = inject(TransferState);\n\n const originMap: Record<string, string> | null = inject(HTTP_TRANSFER_CACHE_ORIGIN_MAP, {\n optional: true,\n });\n\n if (typeof ngServerMode !== 'undefined' && !ngServerMode && originMap) {\n throw new RuntimeError(\n RuntimeErrorCode.HTTP_ORIGIN_MAP_USED_IN_CLIENT,\n ngDevMode &&\n 'Angular detected that the `HTTP_TRANSFER_CACHE_ORIGIN_MAP` token is configured and ' +\n 'present in the client side code. Please ensure that this token is only provided in the ' +\n 'server code of the application.',\n );\n }\n\n const requestUrl =\n typeof ngServerMode !== 'undefined' && ngServerMode && originMap\n ? mapRequestOriginUrl(req.url, originMap)\n : req.url;\n\n const storeKey = makeCacheKey(req, requestUrl);\n const response = transferState.get(storeKey, null);\n\n let headersToInclude = globalOptions.includeHeaders;\n if (typeof requestOptions === 'object' && requestOptions.includeHeaders) {\n // Request-specific config takes precedence over the global config.\n headersToInclude = requestOptions.includeHeaders;\n }\n\n if (response) {\n const {\n [BODY]: undecodedBody,\n [RESPONSE_TYPE]: responseType,\n [HEADERS]: httpHeaders,\n [STATUS]: status,\n [STATUS_TEXT]: statusText,\n [REQ_URL]: url,\n } = response;\n // Request found in cache. Respond using it.\n let body: ArrayBuffer | Blob | string | undefined = undecodedBody;\n\n switch (responseType) {\n case 'arraybuffer':\n body = fromBase64(undecodedBody);\n break;\n case 'blob':\n body = new Blob([fromBase64(undecodedBody)]);\n break;\n }\n\n // We want to warn users accessing a header provided from the cache\n // That HttpTransferCache alters the headers\n // The warning will be logged a single time by HttpHeaders instance\n let headers = new HttpHeaders(httpHeaders);\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Append extra logic in dev mode to produce a warning when a header\n // that was not transferred to the client is accessed in the code via `get`\n // and `has` calls.\n headers = appendMissingHeadersDetection(req.url, headers, headersToInclude ?? []);\n }\n\n return of(\n new HttpResponse({\n body,\n headers,\n status,\n statusText,\n url,\n }),\n );\n }\n\n const event$ = next(req);\n\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n // Request not found in cache. Make the request and cache it if on the server.\n return event$.pipe(\n tap((event: HttpEvent<unknown>) => {\n // Only cache successful HTTP responses.\n if (event instanceof HttpResponse) {\n transferState.set<TransferHttpResponse>(storeKey, {\n [BODY]:\n req.responseType === 'arraybuffer' || req.responseType === 'blob'\n ? toBase64(event.body)\n : event.body,\n [HEADERS]: getFilteredHeaders(event.headers, headersToInclude),\n [STATUS]: event.status,\n [STATUS_TEXT]: event.statusText,\n [REQ_URL]: requestUrl,\n [RESPONSE_TYPE]: req.responseType,\n });\n }\n }),\n );\n }\n\n return event$;\n}\n\n/** @returns true when the requests contains autorization related headers. */\nfunction hasAuthHeaders(req: HttpRequest<unknown>): boolean {\n return req.headers.has('authorization') || req.headers.has('proxy-authorization');\n}\n\nfunction getFilteredHeaders(\n headers: HttpHeaders,\n includeHeaders: string[] | undefined,\n): Record<string, string[]> {\n if (!includeHeaders) {\n return {};\n }\n\n const headersMap: Record<string, string[]> = {};\n for (const key of includeHeaders) {\n const values = headers.getAll(key);\n if (values !== null) {\n headersMap[key] = values;\n }\n }\n\n return headersMap;\n}\n\nfunction sortAndConcatParams(params: HttpParams | URLSearchParams): string {\n return [...params.keys()]\n .sort()\n .map((k) => `${k}=${params.getAll(k)}`)\n .join('&');\n}\n\nfunction makeCacheKey(\n request: HttpRequest<any>,\n mappedRequestUrl: string,\n): StateKey<TransferHttpResponse> {\n // make the params encoded same as a url so it's easy to identify\n const {params, method, responseType} = request;\n const encodedParams = sortAndConcatParams(params);\n\n let serializedBody = request.serializeBody();\n if (serializedBody instanceof URLSearchParams) {\n serializedBody = sortAndConcatParams(serializedBody);\n } else if (typeof serializedBody !== 'string') {\n serializedBody = '';\n }\n\n const key = [method, responseType, mappedRequestUrl, serializedBody, encodedParams].join('|');\n const hash = generateHash(key);\n\n return makeStateKey(hash);\n}\n\n/**\n * A method that returns a hash representation of a string using a variant of DJB2 hash\n * algorithm.\n *\n * This is the same hashing logic that is used to generate component ids.\n */\nfunction generateHash(value: string): string {\n let hash = 0;\n\n for (const char of value) {\n hash = (Math.imul(31, hash) + char.charCodeAt(0)) << 0;\n }\n\n // Force positive number hash.\n // 2147483647 = equivalent of Integer.MAX_VALUE.\n hash += 2147483647 + 1;\n\n return hash.toString();\n}\n\nfunction toBase64(buffer: unknown): string {\n //TODO: replace with when is Baseline widely available\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/toBase64\n const bytes = new Uint8Array(buffer as ArrayBufferLike);\n\n const CHUNK_SIZE = 0x8000; // 32,768 bytes (~32 KB) per chunk, to avoid stack overflow\n\n let binaryString = '';\n\n for (let i = 0; i < bytes.length; i += CHUNK_SIZE) {\n const chunk = bytes.subarray(i, i + CHUNK_SIZE);\n binaryString += String.fromCharCode.apply(null, chunk as unknown as number[]);\n }\n return btoa(binaryString);\n}\n\nfunction fromBase64(base64: string): ArrayBuffer {\n const binary = atob(base64);\n const bytes = Uint8Array.from(binary, (c) => c.charCodeAt(0));\n return bytes.buffer;\n}\n\n/**\n * Returns the DI providers needed to enable HTTP transfer cache.\n *\n * By default, when using server rendering, requests are performed twice: once on the server and\n * other one on the browser.\n *\n * When these providers are added, requests performed on the server are cached and reused during the\n * bootstrapping of the application in the browser thus avoiding duplicate requests and reducing\n * load time.\n *\n * @see [Caching data when using HttpClient](guide/ssr#configuring-the-caching-options)\n *\n */\nexport function withHttpTransferCache(cacheOptions: HttpTransferCacheOptions): Provider[] {\n return [\n {\n provide: CACHE_OPTIONS,\n useFactory: (): CacheOptions => {\n performanceMarkFeature('NgHttpTransferCache');\n return {isCacheActive: true, ...cacheOptions};\n },\n },\n {\n provide: HTTP_ROOT_INTERCEPTOR_FNS,\n useValue: transferCacheInterceptorFn,\n multi: true,\n },\n {\n provide: APP_BOOTSTRAP_LISTENER,\n multi: true,\n useFactory: () => {\n const appRef = inject(ApplicationRef);\n const cacheState = inject(CACHE_OPTIONS);\n\n return () => {\n appRef.whenStable().then(() => {\n cacheState.isCacheActive = false;\n });\n };\n },\n },\n ];\n}\n\n/**\n * This function will add a proxy to an HttpHeader to intercept calls to get/has\n * and log a warning if the header entry requested has been removed\n */\nfunction appendMissingHeadersDetection(\n url: string,\n headers: HttpHeaders,\n headersToInclude: string[],\n): HttpHeaders {\n const warningProduced = new Set();\n return new Proxy<HttpHeaders>(headers, {\n get(target: HttpHeaders, prop: keyof HttpHeaders): unknown {\n const value = Reflect.get(target, prop);\n const methods: Set<keyof HttpHeaders> = new Set(['get', 'has', 'getAll']);\n\n if (typeof value !== 'function' || !methods.has(prop)) {\n return value;\n }\n\n return (headerName: string) => {\n // We log when the key has been removed and a warning hasn't been produced for the header\n const key = (prop + ':' + headerName).toLowerCase(); // e.g. `get:cache-control`\n if (!headersToInclude.includes(headerName) && !warningProduced.has(key)) {\n warningProduced.add(key);\n const truncatedUrl = truncateMiddle(url);\n\n console.warn(\n formatRuntimeError(\n RuntimeErrorCode.HEADERS_ALTERED_BY_TRANSFER_CACHE,\n `Angular detected that the \\`${headerName}\\` header is accessed, but the value of the header ` +\n `was not transferred from the server to the client by the HttpTransferCache. ` +\n `To include the value of the \\`${headerName}\\` header for the \\`${truncatedUrl}\\` request, ` +\n `use the \\`includeHeaders\\` list. The \\`includeHeaders\\` can be defined either ` +\n `on a request level by adding the \\`transferCache\\` parameter, or on an application ` +\n `level by adding the \\`httpCacheTransfer.includeHeaders\\` argument to the ` +\n `\\`provideClientHydration()\\` call. `,\n ),\n );\n }\n\n // invoking the original method\n return (value as Function).apply(target, [headerName]);\n };\n },\n });\n}\n\nfunction mapRequestOriginUrl(url: string, originMap: Record<string, string>): string {\n const origin = new URL(url, 'resolve://').origin;\n const mappedOrigin = originMap[origin];\n if (!mappedOrigin) {\n return url;\n }\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n verifyMappedOrigin(mappedOrigin);\n }\n\n return url.replace(origin, mappedOrigin);\n}\n\nfunction verifyMappedOrigin(url: string): void {\n if (new URL(url, 'resolve://').pathname !== '/') {\n throw new RuntimeError(\n RuntimeErrorCode.HTTP_ORIGIN_MAP_CONTAINS_PATH,\n 'Angular detected a URL with a path segment in the value provided for the ' +\n `\\`HTTP_TRANSFER_CACHE_ORIGIN_MAP\\` token: ${url}. The map should only contain origins ` +\n 'without any other segments.',\n );\n }\n}\n"],"names":["httpResource","jsonFn","makeHttpResourceFn","arrayBuffer","blob","text","responseType","request","options","ngDevMode","injector","assertInInjectionContext","inject","Injector","HttpResourceImpl","normalizeRequest","defaultValue","debugName","parse","equal","unwrappedRequest","undefined","url","headers","HttpHeaders","params","HttpParams","fromObject","HttpRequest","method","body","reportProgress","withCredentials","keepalive","cache","priority","mode","redirect","context","transferCache","credentials","referrer","referrerPolicy","integrity","timeout","ResourceImpl","client","_headers","linkedSignal","source","extRequest","computation","_progress","_statusCode","computed","status","progress","asReadonly","statusCode","constructor","abortSignal","sub","onAbort","unsubscribe","addEventListener","stream","signal","value","resolve","promise","Promise","r","send","set","subscribe","next","event","type","HttpEventType","Response","error","encapsulateResourceError","DownloadProgress","HttpErrorResponse","removeEventListener","complete","ɵRuntimeError","get","HttpClient","HTTP_TRANSFER_CACHE_ORIGIN_MAP","InjectionToken","BODY","HEADERS","STATUS","STATUS_TEXT","REQ_URL","RESPONSE_TYPE","CACHE_OPTIONS","ALLOWED_METHODS","transferCacheInterceptorFn","req","isCacheActive","globalOptions","requestOptions","requestMethod","includePostRequests","includes","includeRequestsWithAuthHeaders","hasAuthHeaders","filter","transferState","TransferState","originMap","optional","ngServerMode","RuntimeError","requestUrl","mapRequestOriginUrl","storeKey","makeCacheKey","response","headersToInclude","includeHeaders","undecodedBody","httpHeaders","statusText","fromBase64","Blob","appendMissingHeadersDetection","of","HttpResponse","event$","pipe","tap","toBase64","getFilteredHeaders","has","headersMap","key","values","getAll","sortAndConcatParams","keys","sort","map","k","join","mappedRequestUrl","encodedParams","serializedBody","serializeBody","URLSearchParams","hash","generateHash","makeStateKey","char","Math","imul","charCodeAt","toString","buffer","bytes","Uint8Array","CHUNK_SIZE","binaryString","i","length","chunk","subarray","String","fromCharCode","apply","btoa","base64","binary","atob","from","c","withHttpTransferCache","cacheOptions","provide","useFactory","performanceMarkFeature","HTTP_ROOT_INTERCEPTOR_FNS","useValue","multi","APP_BOOTSTRAP_LISTENER","appRef","ApplicationRef","cacheState","whenStable","then","warningProduced","Set","Proxy","target","prop","Reflect","methods","headerName","toLowerCase","add","truncatedUrl","truncateMiddle","console","warn","formatRuntimeError","origin","URL","mappedOrigin","verifyMappedOrigin","replace","pathname"],"mappings":";;;;;;;;;;;;;;AAkNaA,MAAAA,YAAY,GAAmB,CAAC,MAAK;AAChD,EAAA,MAAMC,MAAM,GAAGC,kBAAkB,CAAU,MAAM,CAAmB;AACpED,EAAAA,MAAM,CAACE,WAAW,GAAGD,kBAAkB,CAAc,aAAa,CAAC;AACnED,EAAAA,MAAM,CAACG,IAAI,GAAGF,kBAAkB,CAAC,MAAM,CAAC;AACxCD,EAAAA,MAAM,CAACI,IAAI,GAAGH,kBAAkB,CAAC,MAAM,CAAC;AACxC,EAAA,OAAOD,MAAM;AACf,CAAC;AAWD,SAASC,kBAAkBA,CAAOI,YAA0B,EAAA;AAC1D,EAAA,OAAO,SAASN,YAAYA,CAC1BO,OAAuB,EACvBC,OAA4C,EAAA;AAE5C,IAAA,IAAIC,SAAS,IAAI,CAACD,OAAO,EAAEE,QAAQ,EAAE;MACnCC,wBAAwB,CAACX,YAAY,CAAC;AACxC;IACA,MAAMU,QAAQ,GAAGF,OAAO,EAAEE,QAAQ,IAAIE,MAAM,CAACC,QAAQ,CAAC;AACtD,IAAA,OAAO,IAAIC,gBAAgB,CACzBJ,QAAQ,EACR,MAAMK,gBAAgB,CAACR,OAAO,EAAED,YAAY,CAAC,EAC7CE,OAAO,EAAEQ,YAAY,EACrBR,OAAO,EAAES,SAAS,EAClBT,OAAO,EAAEU,KAAoC,EAC7CV,OAAO,EAAEW,KAAiC,CACf;GAC9B;AACH;AAEA,SAASJ,gBAAgBA,CACvBR,OAAuB,EACvBD,YAA0B,EAAA;EAE1B,IAAIc,gBAAgB,GAAG,OAAOb,OAAO,KAAK,UAAU,GAAGA,OAAO,EAAE,GAAGA,OAAO;EAC1E,IAAIa,gBAAgB,KAAKC,SA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F,MAAM,GAAG,IAAIC,GAAG,CAAC1L,GAAG,EAAE,YAAY,CAAC,CAACyL,MAAM;AAChD,EAAA,MAAME,YAAY,GAAGjG,SAAS,CAAC+F,MAAM,CAAC;EACtC,IAAI,CAACE,YAAY,EAAE;AACjB,IAAA,OAAO3L,GAAG;AACZ;AAEA,EAAA,IAAI,OAAOb,SAAS,KAAK,WAAW,IAAIA,SAAS,EAAE;IACjDyM,kBAAkB,CAACD,YAAY,CAAC;AAClC;AAEA,EAAA,OAAO3L,GAAG,CAAC6L,OAAO,CAACJ,MAAM,EAAEE,YAAY,CAAC;AAC1C;AAEA,SAASC,kBAAkBA,CAAC5L,GAAW,EAAA;EACrC,IAAI,IAAI0L,GAAG,CAAC1L,GAAG,EAAE,YAAY,CAAC,CAAC8L,QAAQ,KAAK,GAAG,EAAE;AAC/C,IAAA,MAAM,IAAIjG,aAAY,CAAA,IAAA,EAEpB,2EAA2E,GACzE,CAAA,0CAAA,EAA6C7F,GAAG,CAAA,sCAAA,CAAwC,GACxF,6BAA6B,CAChC;AACH;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"http.mjs","sources":["../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/common/http/src/transfer_cache.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/common/http/src/resource.ts"],"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\nimport {\n APP_BOOTSTRAP_LISTENER,\n ApplicationRef,\n inject,\n InjectionToken,\n makeStateKey,\n Provider,\n StateKey,\n TransferState,\n ɵformatRuntimeError as formatRuntimeError,\n ɵperformanceMarkFeature as performanceMarkFeature,\n ɵtruncateMiddle as truncateMiddle,\n ɵRuntimeError as RuntimeError,\n} from '@angular/core';\nimport {Observable, of} from 'rxjs';\nimport {tap} from 'rxjs/operators';\n\nimport {RuntimeErrorCode} from './errors';\nimport {HttpHeaders} from './headers';\nimport {HTTP_ROOT_INTERCEPTOR_FNS, HttpHandlerFn} from './interceptor';\nimport {HttpRequest} from './request';\nimport {HttpEvent, HttpResponse} from './response';\nimport {HttpParams} from './params';\n\n/**\n * Options to configure how TransferCache should be used to cache requests made via HttpClient.\n *\n * @param includeHeaders Specifies which headers should be included into cached responses. No\n * headers are included by default.\n * @param filter A function that receives a request as an argument and returns a boolean to indicate\n * whether a request should be included into the cache.\n * @param includePostRequests Enables caching for POST requests. By default, only GET and HEAD\n * requests are cached. This option can be enabled if POST requests are used to retrieve data\n * (for example using GraphQL).\n * @param includeRequestsWithAuthHeaders Enables caching of requests containing either `Authorization`\n * or `Proxy-Authorization` headers. By default, these requests are excluded from caching.\n *\n * @see [Configuring the caching options](guide/ssr#configuring-the-caching-options)\n *\n * @publicApi\n */\nexport type HttpTransferCacheOptions = {\n includeHeaders?: string[];\n filter?: (req: HttpRequest<unknown>) => boolean;\n includePostRequests?: boolean;\n includeRequestsWithAuthHeaders?: boolean;\n};\n\n/**\n * If your application uses different HTTP origins to make API calls (via `HttpClient`) on the server and\n * on the client, the `HTTP_TRANSFER_CACHE_ORIGIN_MAP` token allows you to establish a mapping\n * between those origins, so that `HttpTransferCache` feature can recognize those requests as the same\n * ones and reuse the data cached on the server during hydration on the client.\n *\n * IMPORTANT: The `HTTP_TRANSFER_CACHE_ORIGIN_MAP` token should *only* be provided in\n * the *server* code of your application (typically in the `app.server.config.ts` script). Angular throws an\n * error if it detects that the token is defined while running on the client.\n *\n * @usageNotes\n *\n * When the same API endpoint is accessed via `http://internal-domain.com:8080` on the server and\n * via `https://external-domain.com` on the client, you can use the following configuration:\n * ```ts\n * // in app.server.config.ts\n * {\n * provide: HTTP_TRANSFER_CACHE_ORIGIN_MAP,\n * useValue: {\n * 'http://internal-domain.com:8080': 'https://external-domain.com'\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport const HTTP_TRANSFER_CACHE_ORIGIN_MAP = new InjectionToken<Record<string, string>>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'HTTP_TRANSFER_CACHE_ORIGIN_MAP' : '',\n);\n\n/**\n * Keys within cached response data structure.\n */\n\nexport const BODY = 'b';\nexport const HEADERS = 'h';\nexport const STATUS = 's';\nexport const STATUS_TEXT = 'st';\nexport const REQ_URL = 'u';\nexport const RESPONSE_TYPE = 'rt';\n\ninterface TransferHttpResponse {\n /** body */\n [BODY]: any;\n /** headers */\n [HEADERS]: Record<string, string[]>;\n /** status */\n [STATUS]?: number;\n /** statusText */\n [STATUS_TEXT]?: string;\n /** url */\n [REQ_URL]?: string;\n /** responseType */\n [RESPONSE_TYPE]?: HttpRequest<unknown>['responseType'];\n}\n\ninterface CacheOptions extends HttpTransferCacheOptions {\n isCacheActive: boolean;\n}\n\nexport const CACHE_OPTIONS = new InjectionToken<CacheOptions>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'HTTP_TRANSFER_STATE_CACHE_OPTIONS' : '',\n);\n\n/**\n * A list of allowed HTTP methods to cache.\n */\nconst ALLOWED_METHODS = ['GET', 'HEAD'];\n\nfunction shouldCacheRequest(req: HttpRequest<unknown>, options: CacheOptions): boolean {\n const {isCacheActive, ...globalOptions} = options;\n const {transferCache: requestOptions, method: requestMethod} = req;\n\n if (\n !isCacheActive ||\n requestOptions === false ||\n // POST requests are allowed either globally or at request level\n (requestMethod === 'POST' && !globalOptions.includePostRequests && !requestOptions) ||\n (requestMethod !== 'POST' && !ALLOWED_METHODS.includes(requestMethod)) ||\n // Do not cache request that require authorization when includeRequestsWithAuthHeaders is falsey\n (!globalOptions.includeRequestsWithAuthHeaders && hasAuthHeaders(req)) ||\n globalOptions.filter?.(req) === false\n ) {\n return false;\n }\n\n return true;\n}\n\nfunction getHeadersToInclude(\n options: CacheOptions,\n requestOptions: HttpTransferCacheOptions | boolean | undefined,\n): string[] | undefined {\n const {includeHeaders: globalHeaders} = options;\n let headersToInclude = globalHeaders;\n if (typeof requestOptions === 'object' && requestOptions.includeHeaders) {\n // Request-specific config takes precedence over the global config.\n headersToInclude = requestOptions.includeHeaders;\n }\n return headersToInclude;\n}\n\nexport function retrieveStateFromCache(\n req: HttpRequest<unknown>,\n options: CacheOptions,\n transferState: TransferState,\n originMap: Record<string, string> | null,\n): HttpResponse<unknown> | null {\n const {transferCache: requestOptions} = req;\n\n // In the following situations we do not want to cache the request\n if (!shouldCacheRequest(req, options)) {\n return null;\n }\n\n if (typeof ngServerMode !== 'undefined' && !ngServerMode && originMap) {\n throw new RuntimeError(\n RuntimeErrorCode.HTTP_ORIGIN_MAP_USED_IN_CLIENT,\n ngDevMode &&\n 'Angular detected that the `HTTP_TRANSFER_CACHE_ORIGIN_MAP` token is configured and ' +\n 'present in the client side code. Please ensure that this token is only provided in the ' +\n 'server code of the application.',\n );\n }\n\n const requestUrl =\n typeof ngServerMode !== 'undefined' && ngServerMode && originMap\n ? mapRequestOriginUrl(req.url, originMap)\n : req.url;\n\n const storeKey = makeCacheKey(req, requestUrl);\n const response = transferState.get(storeKey, null);\n\n const headersToInclude = getHeadersToInclude(options, requestOptions);\n\n if (response) {\n const {\n [BODY]: undecodedBody,\n [RESPONSE_TYPE]: responseType,\n [HEADERS]: httpHeaders,\n [STATUS]: status,\n [STATUS_TEXT]: statusText,\n [REQ_URL]: url,\n } = response;\n // Request found in cache. Respond using it.\n let body: ArrayBuffer | Blob | string | undefined = undecodedBody;\n\n switch (responseType) {\n case 'arraybuffer':\n body = fromBase64(undecodedBody);\n break;\n case 'blob':\n body = new Blob([fromBase64(undecodedBody)]);\n break;\n }\n\n // We want to warn users accessing a header provided from the cache\n // That HttpTransferCache alters the headers\n // The warning will be logged a single time by HttpHeaders instance\n let headers = new HttpHeaders(httpHeaders);\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Append extra logic in dev mode to produce a warning when a header\n // that was not transferred to the client is accessed in the code via `get`\n // and `has` calls.\n headers = appendMissingHeadersDetection(req.url, headers, headersToInclude ?? []);\n }\n\n return new HttpResponse({\n body,\n headers,\n status,\n statusText,\n url,\n });\n }\n\n return null;\n}\n\nexport function transferCacheInterceptorFn(\n req: HttpRequest<unknown>,\n next: HttpHandlerFn,\n): Observable<HttpEvent<unknown>> {\n const options = inject(CACHE_OPTIONS);\n const transferState = inject(TransferState);\n\n const originMap = inject(HTTP_TRANSFER_CACHE_ORIGIN_MAP, {optional: true});\n\n const cachedResponse = retrieveStateFromCache(req, options, transferState, originMap);\n if (cachedResponse) {\n return of(cachedResponse);\n }\n\n const {transferCache: requestOptions} = req;\n const headersToInclude = getHeadersToInclude(options, requestOptions);\n\n const requestUrl =\n typeof ngServerMode !== 'undefined' && ngServerMode && originMap\n ? mapRequestOriginUrl(req.url, originMap)\n : req.url;\n const storeKey = makeCacheKey(req, requestUrl);\n\n // In the following situations we do not want to cache the request\n if (!shouldCacheRequest(req, options)) {\n return next(req);\n }\n\n const event$ = next(req);\n\n if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n // Request not found in cache. Make the request and cache it if on the server.\n return event$.pipe(\n tap((event: HttpEvent<unknown>) => {\n // Only cache successful HTTP responses.\n if (event instanceof HttpResponse) {\n transferState.set<TransferHttpResponse>(storeKey, {\n [BODY]:\n req.responseType === 'arraybuffer' || req.responseType === 'blob'\n ? toBase64(event.body)\n : event.body,\n [HEADERS]: getFilteredHeaders(event.headers, headersToInclude),\n [STATUS]: event.status,\n [STATUS_TEXT]: event.statusText,\n [REQ_URL]: requestUrl,\n [RESPONSE_TYPE]: req.responseType,\n });\n }\n }),\n );\n }\n\n return event$;\n}\n\n/** @returns true when the requests contains autorization related headers. */\nfunction hasAuthHeaders(req: HttpRequest<unknown>): boolean {\n return req.headers.has('authorization') || req.headers.has('proxy-authorization');\n}\n\nfunction getFilteredHeaders(\n headers: HttpHeaders,\n includeHeaders: string[] | undefined,\n): Record<string, string[]> {\n if (!includeHeaders) {\n return {};\n }\n\n const headersMap: Record<string, string[]> = {};\n for (const key of includeHeaders) {\n const values = headers.getAll(key);\n if (values !== null) {\n headersMap[key] = values;\n }\n }\n\n return headersMap;\n}\n\nfunction sortAndConcatParams(params: HttpParams | URLSearchParams): string {\n return [...params.keys()]\n .sort()\n .map((k) => `${k}=${params.getAll(k)}`)\n .join('&');\n}\n\nfunction makeCacheKey(\n request: HttpRequest<any>,\n mappedRequestUrl: string,\n): StateKey<TransferHttpResponse> {\n // make the params encoded same as a url so it's easy to identify\n const {params, method, responseType} = request;\n const encodedParams = sortAndConcatParams(params);\n\n let serializedBody = request.serializeBody();\n if (serializedBody instanceof URLSearchParams) {\n serializedBody = sortAndConcatParams(serializedBody);\n } else if (typeof serializedBody !== 'string') {\n serializedBody = '';\n }\n\n const key = [method, responseType, mappedRequestUrl, serializedBody, encodedParams].join('|');\n const hash = generateHash(key);\n\n return makeStateKey(hash);\n}\n\n/**\n * A method that returns a hash representation of a string using a variant of DJB2 hash\n * algorithm.\n *\n * This is the same hashing logic that is used to generate component ids.\n */\nfunction generateHash(value: string): string {\n let hash = 0;\n\n for (const char of value) {\n hash = (Math.imul(31, hash) + char.charCodeAt(0)) << 0;\n }\n\n // Force positive number hash.\n // 2147483647 = equivalent of Integer.MAX_VALUE.\n hash += 2147483647 + 1;\n\n return hash.toString();\n}\n\nfunction toBase64(buffer: unknown): string {\n //TODO: replace with when is Baseline widely available\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/toBase64\n const bytes = new Uint8Array(buffer as ArrayBufferLike);\n\n const CHUNK_SIZE = 0x8000; // 32,768 bytes (~32 KB) per chunk, to avoid stack overflow\n\n let binaryString = '';\n\n for (let i = 0; i < bytes.length; i += CHUNK_SIZE) {\n const chunk = bytes.subarray(i, i + CHUNK_SIZE);\n binaryString += String.fromCharCode.apply(null, chunk as unknown as number[]);\n }\n return btoa(binaryString);\n}\n\nfunction fromBase64(base64: string): ArrayBuffer {\n const binary = atob(base64);\n const bytes = Uint8Array.from(binary, (c) => c.charCodeAt(0));\n return bytes.buffer;\n}\n\n/**\n * Returns the DI providers needed to enable HTTP transfer cache.\n *\n * By default, when using server rendering, requests are performed twice: once on the server and\n * other one on the browser.\n *\n * When these providers are added, requests performed on the server are cached and reused during the\n * bootstrapping of the application in the browser thus avoiding duplicate requests and reducing\n * load time.\n *\n * @see [Caching data when using HttpClient](guide/ssr#configuring-the-caching-options)\n *\n */\nexport function withHttpTransferCache(cacheOptions: HttpTransferCacheOptions): Provider[] {\n return [\n {\n provide: CACHE_OPTIONS,\n useFactory: (): CacheOptions => {\n performanceMarkFeature('NgHttpTransferCache');\n return {isCacheActive: true, ...cacheOptions};\n },\n },\n {\n provide: HTTP_ROOT_INTERCEPTOR_FNS,\n useValue: transferCacheInterceptorFn,\n multi: true,\n },\n {\n provide: APP_BOOTSTRAP_LISTENER,\n multi: true,\n useFactory: () => {\n const appRef = inject(ApplicationRef);\n const cacheState = inject(CACHE_OPTIONS);\n\n return () => {\n appRef.whenStable().then(() => {\n cacheState.isCacheActive = false;\n });\n };\n },\n },\n ];\n}\n\n/**\n * This function will add a proxy to an HttpHeader to intercept calls to get/has\n * and log a warning if the header entry requested has been removed\n */\nfunction appendMissingHeadersDetection(\n url: string,\n headers: HttpHeaders,\n headersToInclude: string[],\n): HttpHeaders {\n const warningProduced = new Set();\n return new Proxy<HttpHeaders>(headers, {\n get(target: HttpHeaders, prop: keyof HttpHeaders): unknown {\n const value = Reflect.get(target, prop);\n const methods: Set<keyof HttpHeaders> = new Set(['get', 'has', 'getAll']);\n\n if (typeof value !== 'function' || !methods.has(prop)) {\n return value;\n }\n\n return (headerName: string) => {\n // We log when the key has been removed and a warning hasn't been produced for the header\n const key = (prop + ':' + headerName).toLowerCase(); // e.g. `get:cache-control`\n if (!headersToInclude.includes(headerName) && !warningProduced.has(key)) {\n warningProduced.add(key);\n const truncatedUrl = truncateMiddle(url);\n\n console.warn(\n formatRuntimeError(\n RuntimeErrorCode.HEADERS_ALTERED_BY_TRANSFER_CACHE,\n `Angular detected that the \\`${headerName}\\` header is accessed, but the value of the header ` +\n `was not transferred from the server to the client by the HttpTransferCache. ` +\n `To include the value of the \\`${headerName}\\` header for the \\`${truncatedUrl}\\` request, ` +\n `use the \\`includeHeaders\\` list. The \\`includeHeaders\\` can be defined either ` +\n `on a request level by adding the \\`transferCache\\` parameter, or on an application ` +\n `level by adding the \\`httpCacheTransfer.includeHeaders\\` argument to the ` +\n `\\`provideClientHydration()\\` call. `,\n ),\n );\n }\n\n // invoking the original method\n return (value as Function).apply(target, [headerName]);\n };\n },\n });\n}\n\nfunction mapRequestOriginUrl(url: string, originMap: Record<string, string>): string {\n const origin = new URL(url, 'resolve://').origin;\n const mappedOrigin = originMap[origin];\n if (!mappedOrigin) {\n return url;\n }\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n verifyMappedOrigin(mappedOrigin);\n }\n\n return url.replace(origin, mappedOrigin);\n}\n\nfunction verifyMappedOrigin(url: string): void {\n if (new URL(url, 'resolve://').pathname !== '/') {\n throw new RuntimeError(\n RuntimeErrorCode.HTTP_ORIGIN_MAP_CONTAINS_PATH,\n 'Angular detected a URL with a path segment in the value provided for the ' +\n `\\`HTTP_TRANSFER_CACHE_ORIGIN_MAP\\` token: ${url}. The map should only contain origins ` +\n 'without any other segments.',\n );\n }\n}\n","/**\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\nimport {\n Injector,\n Signal,\n ɵResourceImpl as ResourceImpl,\n inject,\n linkedSignal,\n assertInInjectionContext,\n signal,\n computed,\n ResourceStreamItem,\n type ValueEqualityFn,\n ɵRuntimeError,\n ɵRuntimeErrorCode,\n ɵencapsulateResourceError as encapsulateResourceError,\n TransferState,\n untracked,\n} from '@angular/core';\nimport type {Subscription} from 'rxjs';\n\nimport {HttpRequest} from './request';\nimport {HttpClient} from './client';\nimport {HttpErrorResponse, HttpEventType, HttpProgressEvent} from './response';\nimport {HttpHeaders} from './headers';\nimport {HttpParams} from './params';\nimport {HttpResourceRef, HttpResourceOptions, HttpResourceRequest} from './resource_api';\nimport {\n CACHE_OPTIONS,\n HTTP_TRANSFER_CACHE_ORIGIN_MAP,\n retrieveStateFromCache,\n} from './transfer_cache';\n\n/**\n * Type for the `httpRequest` top-level function, which includes the call signatures for the JSON-\n * based `httpRequest` as well as sub-functions for `ArrayBuffer`, `Blob`, and `string` type\n * requests.\n *\n * @experimental 19.2\n */\nexport interface HttpResourceFn {\n /**\n * Create a `Resource` that fetches data with an HTTP GET request to the given URL.\n *\n * The resource will update when the URL changes via signals.\n *\n * Uses `HttpClient` to make requests and supports interceptors, testing, and the other features\n * of the `HttpClient` API. Data is parsed as JSON by default - use a sub-function of\n * `httpResource`, such as `httpResource.text()`, to parse the response differently.\n *\n * @experimental 19.2\n */\n <TResult = unknown>(\n url: () => string | undefined,\n options: HttpResourceOptions<TResult, unknown> & {defaultValue: NoInfer<TResult>},\n ): HttpResourceRef<TResult>;\n\n /**\n * Create a `Resource` that fetches data with an HTTP GET request to the given URL.\n *\n * The resource will update when the URL changes via signals.\n *\n * Uses `HttpClient` to make requests and supports interceptors, testing, and the other features\n * of the `HttpClient` API. Data is parsed as JSON by default - use a sub-function of\n * `httpResource`, such as `httpResource.text()`, to parse the response differently.\n *\n * @experimental 19.2\n */\n <TResult = unknown>(\n url: () => string | undefined,\n options?: HttpResourceOptions<TResult, unknown>,\n ): HttpResourceRef<TResult | undefined>;\n\n /**\n * Create a `Resource` that fetches data with the configured HTTP request.\n *\n * The resource will update when the request changes via signals.\n *\n * Uses `HttpClient` to make requests and supports interceptors, testing, and the other features\n * of the `HttpClient` API. Data is parsed as JSON by default - use a sub-function of\n * `httpResource`, such as `httpResource.text()`, to parse the response differently.\n *\n * @experimental 19.2\n */\n <TResult = unknown>(\n request: () => HttpResourceRequest | undefined,\n options: HttpResourceOptions<TResult, unknown> & {defaultValue: NoInfer<TResult>},\n ): HttpResourceRef<TResult>;\n\n /**\n * Create a `Resource` that fetches data with the configured HTTP request.\n *\n * The resource will update when the request changes via signals.\n *\n * Uses `HttpClient` to make requests and supports interceptors, testing, and the other features\n * of the `HttpClient` API. Data is parsed as JSON by default - use a sub-function of\n * `httpResource`, such as `httpResource.text()`, to parse the response differently.\n *\n * @experimental 19.2\n */\n <TResult = unknown>(\n request: () => HttpResourceRequest | undefined,\n options?: HttpResourceOptions<TResult, unknown>,\n ): HttpResourceRef<TResult | undefined>;\n\n /**\n * Create a `Resource` that fetches data with the configured HTTP request.\n *\n * The resource will update when the URL or request changes via signals.\n *\n * Uses `HttpClient` to make requests and supports interceptors, testing, and the other features\n * of the `HttpClient` API. Data is parsed into an `ArrayBuffer`.\n *\n * @experimental 19.2\n */\n arrayBuffer: {\n <TResult = ArrayBuffer>(\n url: () => string | undefined,\n options: HttpResourceOptions<TResult, ArrayBuffer> & {defaultValue: NoInfer<TResult>},\n ): HttpResourceRef<TResult>;\n\n <TResult = ArrayBuffer>(\n url: () => string | undefined,\n options?: HttpResourceOptions<TResult, ArrayBuffer>,\n ): HttpResourceRef<TResult | undefined>;\n\n <TResult = ArrayBuffer>(\n request: () => HttpResourceRequest | undefined,\n options: HttpResourceOptions<TResult, ArrayBuffer> & {defaultValue: NoInfer<TResult>},\n ): HttpResourceRef<TResult>;\n\n <TResult = ArrayBuffer>(\n request: () => HttpResourceRequest | undefined,\n options?: HttpResourceOptions<TResult, ArrayBuffer>,\n ): HttpResourceRef<TResult | undefined>;\n };\n\n /**\n * Create a `Resource` that fetches data with the configured HTTP request.\n *\n * The resource will update when the URL or request changes via signals.\n *\n * Uses `HttpClient` to make requests and supports interceptors, testing, and the other features\n * of the `HttpClient` API. Data is parsed into a `Blob`.\n *\n * @experimental 19.2\n */\n blob: {\n <TResult = Blob>(\n url: () => string | undefined,\n options: HttpResourceOptions<TResult, Blob> & {defaultValue: NoInfer<TResult>},\n ): HttpResourceRef<TResult>;\n\n <TResult = Blob>(\n url: () => string | undefined,\n options?: HttpResourceOptions<TResult, Blob>,\n ): HttpResourceRef<TResult | undefined>;\n\n <TResult = Blob>(\n request: () => HttpResourceRequest | undefined,\n options: HttpResourceOptions<TResult, Blob> & {defaultValue: NoInfer<TResult>},\n ): HttpResourceRef<TResult>;\n\n <TResult = Blob>(\n request: () => HttpResourceRequest | undefined,\n options?: HttpResourceOptions<TResult, Blob>,\n ): HttpResourceRef<TResult | undefined>;\n };\n\n /**\n * Create a `Resource` that fetches data with the configured HTTP request.\n *\n * The resource will update when the URL or request changes via signals.\n *\n * Uses `HttpClient` to make requests and supports interceptors, testing, and the other features\n * of the `HttpClient` API. Data is parsed as a `string`.\n *\n * @experimental 19.2\n */\n text: {\n <TResult = string>(\n url: () => string | undefined,\n options: HttpResourceOptions<TResult, string> & {defaultValue: NoInfer<TResult>},\n ): HttpResourceRef<TResult>;\n\n <TResult = string>(\n url: () => string | undefined,\n options?: HttpResourceOptions<TResult, string>,\n ): HttpResourceRef<TResult | undefined>;\n\n <TResult = string>(\n request: () => HttpResourceRequest | undefined,\n options: HttpResourceOptions<TResult, string> & {defaultValue: NoInfer<TResult>},\n ): HttpResourceRef<TResult>;\n\n <TResult = string>(\n request: () => HttpResourceRequest | undefined,\n options?: HttpResourceOptions<TResult, string>,\n ): HttpResourceRef<TResult | undefined>;\n };\n}\n\n/**\n * `httpResource` makes a reactive HTTP request and exposes the request status and response value as\n * a `WritableResource`. By default, it assumes that the backend will return JSON data. To make a\n * request that expects a different kind of data, you can use a sub-constructor of `httpResource`,\n * such as `httpResource.text`.\n *\n * @experimental 19.2\n * @initializerApiFunction\n */\nexport const httpResource: HttpResourceFn = (() => {\n const jsonFn = makeHttpResourceFn<unknown>('json') as HttpResourceFn;\n jsonFn.arrayBuffer = makeHttpResourceFn<ArrayBuffer>('arraybuffer');\n jsonFn.blob = makeHttpResourceFn('blob');\n jsonFn.text = makeHttpResourceFn('text');\n return jsonFn;\n})();\n\n/**\n * The expected response type of the server.\n *\n * This is used to parse the response appropriately before returning it to\n * the requestee.\n */\ntype ResponseType = 'arraybuffer' | 'blob' | 'json' | 'text';\ntype RawRequestType = (() => string | undefined) | (() => HttpResourceRequest | undefined);\n\nfunction makeHttpResourceFn<TRaw>(responseType: ResponseType) {\n return function httpResource<TResult = TRaw>(\n request: RawRequestType,\n options?: HttpResourceOptions<TResult, TRaw>,\n ): HttpResourceRef<TResult> {\n if (ngDevMode && !options?.injector) {\n assertInInjectionContext(httpResource);\n }\n const injector = options?.injector ?? inject(Injector);\n\n const cacheOptions = injector.get(CACHE_OPTIONS, null, {optional: true});\n const transferState = injector.get(TransferState, null, {optional: true});\n const originMap = injector.get(HTTP_TRANSFER_CACHE_ORIGIN_MAP, null, {optional: true});\n\n const getInitialStream = (req: HttpRequest<unknown> | undefined) => {\n if (cacheOptions && transferState && req) {\n const cachedResponse = retrieveStateFromCache(req, cacheOptions, transferState, originMap);\n if (cachedResponse) {\n try {\n const body = cachedResponse.body as TRaw;\n const parsed = options?.parse ? options.parse(body) : (body as unknown as TResult);\n return signal({value: parsed});\n } catch (e) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n console.warn(\n `Angular detected an error while parsing the cached response for the httpResource at \\`${req.url}\\`. ` +\n `The resource will fall back to its default value and try again asynchronously.`,\n e,\n );\n }\n }\n }\n }\n return undefined;\n };\n\n return new HttpResourceImpl(\n injector,\n () => normalizeRequest(request, responseType),\n options?.defaultValue as TResult,\n options?.debugName,\n options?.parse as (value: unknown) => TResult,\n options?.equal as ValueEqualityFn<unknown>,\n getInitialStream,\n ) as HttpResourceRef<TResult>;\n };\n}\n\nfunction normalizeRequest(\n request: RawRequestType,\n responseType: ResponseType,\n): HttpRequest<unknown> | undefined {\n let unwrappedRequest = typeof request === 'function' ? request() : request;\n if (unwrappedRequest === undefined) {\n return undefined;\n } else if (typeof unwrappedRequest === 'string') {\n unwrappedRequest = {url: unwrappedRequest};\n }\n\n const headers =\n unwrappedRequest.headers instanceof HttpHeaders\n ? unwrappedRequest.headers\n : new HttpHeaders(\n unwrappedRequest.headers as\n | Record<string, string | number | Array<string | number>>\n | undefined,\n );\n\n const params =\n unwrappedRequest.params instanceof HttpParams\n ? unwrappedRequest.params\n : new HttpParams({fromObject: unwrappedRequest.params});\n\n return new HttpRequest(\n unwrappedRequest.method ?? 'GET',\n unwrappedRequest.url,\n unwrappedRequest.body ?? null,\n {\n headers,\n params,\n reportProgress: unwrappedRequest.reportProgress,\n withCredentials: unwrappedRequest.withCredentials,\n keepalive: unwrappedRequest.keepalive,\n cache: unwrappedRequest.cache as RequestCache,\n priority: unwrappedRequest.priority as RequestPriority,\n mode: unwrappedRequest.mode as RequestMode,\n redirect: unwrappedRequest.redirect as RequestRedirect,\n responseType,\n context: unwrappedRequest.context,\n transferCache: unwrappedRequest.transferCache,\n credentials: unwrappedRequest.credentials as RequestCredentials,\n referrer: unwrappedRequest.referrer,\n referrerPolicy: unwrappedRequest.referrerPolicy as ReferrerPolicy,\n integrity: unwrappedRequest.integrity,\n timeout: unwrappedRequest.timeout,\n },\n );\n}\nclass HttpResourceImpl<T>\n extends ResourceImpl<T, HttpRequest<unknown> | undefined>\n implements HttpResourceRef<T>\n{\n private client!: HttpClient;\n private _headers = linkedSignal({\n source: this.extRequest,\n computation: () => undefined as HttpHeaders | undefined,\n });\n private _progress = linkedSignal({\n source: this.extRequest,\n computation: () => undefined as HttpProgressEvent | undefined,\n });\n private _statusCode = linkedSignal({\n source: this.extRequest,\n computation: () => undefined as number | undefined,\n });\n\n readonly headers = computed(() =>\n this.status() === 'resolved' || this.status() === 'error' ? this._headers() : undefined,\n );\n readonly progress = this._progress.asReadonly();\n readonly statusCode = this._statusCode.asReadonly();\n\n constructor(\n injector: Injector,\n request: () => HttpRequest<unknown> | undefined,\n defaultValue: T,\n debugName?: string,\n parse?: (value: unknown) => T,\n equal?: ValueEqualityFn<unknown>,\n getInitialStream?: (\n request: HttpRequest<unknown> | undefined,\n ) => Signal<ResourceStreamItem<T>> | undefined,\n ) {\n super(\n request,\n ({params: request, abortSignal}) => {\n let sub: Subscription;\n\n // Track the abort listener so it can be removed if the Observable completes (as a memory\n // optimization).\n const onAbort = () => sub.unsubscribe();\n abortSignal.addEventListener('abort', onAbort);\n\n // Start off stream as undefined.\n const stream = signal<ResourceStreamItem<T>>({value: undefined as T});\n let resolve: ((value: Signal<ResourceStreamItem<T>>) => void) | undefined;\n const promise = new Promise<Signal<ResourceStreamItem<T>>>((r) => (resolve = r));\n\n const send = (value: ResourceStreamItem<T>): void => {\n stream.set(value);\n resolve?.(stream);\n resolve = undefined;\n };\n\n sub = this.client.request(request!).subscribe({\n next: (event) => {\n switch (event.type) {\n case HttpEventType.Response:\n this._headers.set(event.headers);\n this._statusCode.set(event.status);\n try {\n send({value: parse ? parse(event.body) : (event.body as T)});\n } catch (error) {\n send({error: encapsulateResourceError(error)});\n }\n break;\n case HttpEventType.DownloadProgress:\n this._progress.set(event);\n break;\n }\n },\n error: (error) => {\n if (error instanceof HttpErrorResponse) {\n this._headers.set(error.headers);\n this._statusCode.set(error.status);\n }\n\n send({error});\n abortSignal.removeEventListener('abort', onAbort);\n },\n complete: () => {\n if (resolve) {\n send({\n error: new ɵRuntimeError(\n ɵRuntimeErrorCode.RESOURCE_COMPLETED_BEFORE_PRODUCING_VALUE,\n ngDevMode && 'Resource completed before producing a value',\n ),\n });\n }\n abortSignal.removeEventListener('abort', onAbort);\n },\n });\n\n return promise;\n },\n defaultValue,\n equal,\n debugName,\n injector,\n getInitialStream,\n );\n this.client = injector.get(HttpClient);\n }\n\n override set(value: T): void {\n super.set(value);\n\n this._headers.set(undefined);\n this._progress.set(undefined);\n this._statusCode.set(undefined);\n }\n\n // This is a type only override of the method\n declare hasValue: () => this is HttpResourceRef<Exclude<T, undefined>>;\n}\n"],"names":["HTTP_TRANSFER_CACHE_ORIGIN_MAP","InjectionToken","ngDevMode","BODY","HEADERS","STATUS","STATUS_TEXT","REQ_URL","RESPONSE_TYPE","CACHE_OPTIONS","ALLOWED_METHODS","shouldCacheRequest","req","options","isCacheActive","globalOptions","transferCache","requestOptions","method","requestMethod","includePostRequests","includes","includeRequestsWithAuthHeaders","hasAuthHeaders","filter","getHeadersToInclude","includeHeaders","globalHeaders","headersToInclude","retrieveStateFromCache","transferState","originMap","ngServerMode","RuntimeError","requestUrl","mapRequestOriginUrl","url","storeKey","makeCacheKey","response","get","undecodedBody","responseType","httpHeaders","status","statusText","body","fromBase64","Blob","headers","HttpHeaders","appendMissingHeadersDetection","HttpResponse","transferCacheInterceptorFn","next","inject","TransferState","optional","cachedResponse","of","event$","pipe","tap","event","set","toBase64","getFilteredHeaders","has","headersMap","key","values","getAll","sortAndConcatParams","params","keys","sort","map","k","join","request","mappedRequestUrl","encodedParams","serializedBody","serializeBody","URLSearchParams","hash","generateHash","makeStateKey","value","char","Math","imul","charCodeAt","toString","buffer","bytes","Uint8Array","CHUNK_SIZE","binaryString","i","length","chunk","subarray","String","fromCharCode","apply","btoa","base64","binary","atob","from","c","withHttpTransferCache","cacheOptions","provide","useFactory","performanceMarkFeature","HTTP_ROOT_INTERCEPTOR_FNS","useValue","multi","APP_BOOTSTRAP_LISTENER","appRef","ApplicationRef","cacheState","whenStable","then","warningProduced","Set","Proxy","target","prop","Reflect","methods","headerName","toLowerCase","add","truncatedUrl","truncateMiddle","console","warn","formatRuntimeError","origin","URL","mappedOrigin","verifyMappedOrigin","replace","pathname","httpResource","jsonFn","makeHttpResourceFn","arrayBuffer","blob","text","injector","assertInInjectionContext","Injector","getInitialStream","parsed","parse","signal","e","undefined","HttpResourceImpl","normalizeRequest","defaultValue","debugName","equal","unwrappedRequest","HttpParams","fromObject","HttpRequest","reportProgress","withCredentials","keepalive","cache","priority","mode","redirect","context","credentials","referrer","referrerPolicy","integrity","timeout","ResourceImpl","client","_headers","linkedSignal","source","extRequest","computation","_progress","_statusCode","computed","progress","asReadonly","statusCode","constructor","abortSignal","sub","onAbort","unsubscribe","addEventListener","stream","resolve","promise","Promise","r","send","subscribe","type","HttpEventType","Response","error","encapsulateResourceError","DownloadProgress","HttpErrorResponse","removeEventListener","complete","ɵRuntimeError","HttpClient"],"mappings":";;;;;;;;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;AACD,OAAA,CAAC;AAEF,MAAA,OAAOK,OAAO;KACf,EACDzC,YAAY,EACZE,KAAK,EACLD,SAAS,EACTZ,QAAQ,EACRG,gBAAgB,CACjB;IACD,IAAI,CAAC6B,MAAM,GAAGhC,QAAQ,CAACjH,GAAG,CAACoL,UAAU,CAAC;AACxC;EAES5J,GAAGA,CAACwB,KAAQ,EAAA;AACnB,IAAA,KAAK,CAACxB,GAAG,CAACwB,KAAK,CAAC;AAEhB,IAAA,IAAI,CAACkG,QAAQ,CAAC1H,GAAG,CAACiG,SAAS,CAAC;AAC5B,IAAA,IAAI,CAAC8B,SAAS,CAAC/H,GAAG,CAACiG,SAAS,CAAC;AAC7B,IAAA,IAAI,CAAC+B,WAAW,CAAChI,GAAG,CAACiG,SAAS,CAAC;AACjC;AAID;;;;"}
|
package/fesm2022/testing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.2.
|
|
2
|
+
* @license Angular v21.2.1
|
|
3
3
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -202,7 +202,7 @@ class MockPlatformLocation {
|
|
|
202
202
|
}
|
|
203
203
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
204
204
|
minVersion: "12.0.0",
|
|
205
|
-
version: "21.2.
|
|
205
|
+
version: "21.2.1",
|
|
206
206
|
ngImport: i0,
|
|
207
207
|
type: MockPlatformLocation,
|
|
208
208
|
deps: [{
|
|
@@ -213,14 +213,14 @@ class MockPlatformLocation {
|
|
|
213
213
|
});
|
|
214
214
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
215
215
|
minVersion: "12.0.0",
|
|
216
|
-
version: "21.2.
|
|
216
|
+
version: "21.2.1",
|
|
217
217
|
ngImport: i0,
|
|
218
218
|
type: MockPlatformLocation
|
|
219
219
|
});
|
|
220
220
|
}
|
|
221
221
|
i0.ɵɵngDeclareClassMetadata({
|
|
222
222
|
minVersion: "12.0.0",
|
|
223
|
-
version: "21.2.
|
|
223
|
+
version: "21.2.1",
|
|
224
224
|
ngImport: i0,
|
|
225
225
|
type: MockPlatformLocation,
|
|
226
226
|
decorators: [{
|
|
@@ -300,7 +300,7 @@ class FakeNavigationPlatformLocation {
|
|
|
300
300
|
}
|
|
301
301
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
302
302
|
minVersion: "12.0.0",
|
|
303
|
-
version: "21.2.
|
|
303
|
+
version: "21.2.1",
|
|
304
304
|
ngImport: i0,
|
|
305
305
|
type: FakeNavigationPlatformLocation,
|
|
306
306
|
deps: [],
|
|
@@ -308,14 +308,14 @@ class FakeNavigationPlatformLocation {
|
|
|
308
308
|
});
|
|
309
309
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
310
310
|
minVersion: "12.0.0",
|
|
311
|
-
version: "21.2.
|
|
311
|
+
version: "21.2.1",
|
|
312
312
|
ngImport: i0,
|
|
313
313
|
type: FakeNavigationPlatformLocation
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
316
|
i0.ɵɵngDeclareClassMetadata({
|
|
317
317
|
minVersion: "12.0.0",
|
|
318
|
-
version: "21.2.
|
|
318
|
+
version: "21.2.1",
|
|
319
319
|
ngImport: i0,
|
|
320
320
|
type: FakeNavigationPlatformLocation,
|
|
321
321
|
decorators: [{
|
|
@@ -501,7 +501,7 @@ class SpyLocation {
|
|
|
501
501
|
}
|
|
502
502
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
503
503
|
minVersion: "12.0.0",
|
|
504
|
-
version: "21.2.
|
|
504
|
+
version: "21.2.1",
|
|
505
505
|
ngImport: i0,
|
|
506
506
|
type: SpyLocation,
|
|
507
507
|
deps: [],
|
|
@@ -509,14 +509,14 @@ class SpyLocation {
|
|
|
509
509
|
});
|
|
510
510
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
511
511
|
minVersion: "12.0.0",
|
|
512
|
-
version: "21.2.
|
|
512
|
+
version: "21.2.1",
|
|
513
513
|
ngImport: i0,
|
|
514
514
|
type: SpyLocation
|
|
515
515
|
});
|
|
516
516
|
}
|
|
517
517
|
i0.ɵɵngDeclareClassMetadata({
|
|
518
518
|
minVersion: "12.0.0",
|
|
519
|
-
version: "21.2.
|
|
519
|
+
version: "21.2.1",
|
|
520
520
|
ngImport: i0,
|
|
521
521
|
type: SpyLocation,
|
|
522
522
|
decorators: [{
|
|
@@ -597,7 +597,7 @@ class MockLocationStrategy extends LocationStrategy {
|
|
|
597
597
|
}
|
|
598
598
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
599
599
|
minVersion: "12.0.0",
|
|
600
|
-
version: "21.2.
|
|
600
|
+
version: "21.2.1",
|
|
601
601
|
ngImport: i0,
|
|
602
602
|
type: MockLocationStrategy,
|
|
603
603
|
deps: [],
|
|
@@ -605,14 +605,14 @@ class MockLocationStrategy extends LocationStrategy {
|
|
|
605
605
|
});
|
|
606
606
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
607
607
|
minVersion: "12.0.0",
|
|
608
|
-
version: "21.2.
|
|
608
|
+
version: "21.2.1",
|
|
609
609
|
ngImport: i0,
|
|
610
610
|
type: MockLocationStrategy
|
|
611
611
|
});
|
|
612
612
|
}
|
|
613
613
|
i0.ɵɵngDeclareClassMetadata({
|
|
614
614
|
minVersion: "12.0.0",
|
|
615
|
-
version: "21.2.
|
|
615
|
+
version: "21.2.1",
|
|
616
616
|
ngImport: i0,
|
|
617
617
|
type: MockLocationStrategy,
|
|
618
618
|
decorators: [{
|
package/fesm2022/testing.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/common/testing/src/mock_platform_location.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/common/testing/src/navigation/provide_fake_platform_navigation.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/common/testing/src/location_mock.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/common/testing/src/mock_location_strategy.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/common/testing/src/provide_location_mocks.ts"],"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\nimport {\n LocationChangeEvent,\n LocationChangeListener,\n PlatformLocation,\n PlatformNavigation,\n} from '../../index';\nimport {Inject, inject, Injectable, InjectionToken, Optional} from '@angular/core';\nimport {Subject} from 'rxjs';\n\nimport {FakeNavigation} from './navigation/fake_navigation';\n\n/**\n * Parser from https://tools.ietf.org/html/rfc3986#appendix-B\n * ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?\n * 12 3 4 5 6 7 8 9\n *\n * Example: http://www.ics.uci.edu/pub/ietf/uri/#Related\n *\n * Results in:\n *\n * $1 = http:\n * $2 = http\n * $3 = //www.ics.uci.edu\n * $4 = www.ics.uci.edu\n * $5 = /pub/ietf/uri/\n * $6 = <undefined>\n * $7 = <undefined>\n * $8 = #Related\n * $9 = Related\n */\nconst urlParse = /^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/;\n\nfunction parseUrl(urlStr: string, baseHref: string) {\n const verifyProtocol = /^((http[s]?|ftp):\\/\\/)/;\n let serverBase: string | undefined;\n\n // URL class requires full URL. If the URL string doesn't start with protocol, we need to add\n // an arbitrary base URL which can be removed afterward.\n if (!verifyProtocol.test(urlStr)) {\n serverBase = 'http://empty.com/';\n }\n let parsedUrl: {\n protocol: string;\n hostname: string;\n port: string;\n pathname: string;\n search: string;\n hash: string;\n };\n try {\n parsedUrl = new URL(urlStr, serverBase);\n } catch (e) {\n const result = urlParse.exec(serverBase || '' + urlStr);\n if (!result) {\n throw new Error(`Invalid URL: ${urlStr} with base: ${baseHref}`);\n }\n const hostSplit = result[4].split(':');\n parsedUrl = {\n protocol: result[1],\n hostname: hostSplit[0],\n port: hostSplit[1] || '',\n pathname: result[5],\n search: result[6],\n hash: result[8],\n };\n }\n if (parsedUrl.pathname && parsedUrl.pathname.indexOf(baseHref) === 0) {\n parsedUrl.pathname = parsedUrl.pathname.substring(baseHref.length);\n }\n return {\n hostname: (!serverBase && parsedUrl.hostname) || '',\n protocol: (!serverBase && parsedUrl.protocol) || '',\n port: (!serverBase && parsedUrl.port) || '',\n pathname: parsedUrl.pathname || '/',\n search: parsedUrl.search || '',\n hash: parsedUrl.hash || '',\n };\n}\n\n/**\n * Mock platform location config\n *\n * @publicApi\n */\nexport interface MockPlatformLocationConfig {\n startUrl?: string;\n appBaseHref?: string;\n}\n\n/**\n * Provider for mock platform location config\n *\n * @publicApi\n */\nexport const MOCK_PLATFORM_LOCATION_CONFIG = new InjectionToken<MockPlatformLocationConfig>(\n 'MOCK_PLATFORM_LOCATION_CONFIG',\n);\n\n/**\n * Mock implementation of URL state.\n *\n * @publicApi\n */\n@Injectable()\nexport class MockPlatformLocation implements PlatformLocation {\n private baseHref: string = '';\n private hashUpdate = new Subject<LocationChangeEvent>();\n private popStateSubject = new Subject<LocationChangeEvent>();\n private urlChangeIndex: number = 0;\n private urlChanges: {\n hostname: string;\n protocol: string;\n port: string;\n pathname: string;\n search: string;\n hash: string;\n state: unknown;\n }[] = [{hostname: '', protocol: '', port: '', pathname: '/', search: '', hash: '', state: null}];\n\n constructor(\n @Inject(MOCK_PLATFORM_LOCATION_CONFIG) @Optional() config?: MockPlatformLocationConfig,\n ) {\n if (config) {\n this.baseHref = config.appBaseHref || '';\n\n const parsedChanges = this.parseChanges(\n null,\n config.startUrl || 'http://_empty_/',\n this.baseHref,\n );\n this.urlChanges[0] = {...parsedChanges};\n }\n }\n\n get hostname() {\n return this.urlChanges[this.urlChangeIndex].hostname;\n }\n get protocol() {\n return this.urlChanges[this.urlChangeIndex].protocol;\n }\n get port() {\n return this.urlChanges[this.urlChangeIndex].port;\n }\n get pathname() {\n return this.urlChanges[this.urlChangeIndex].pathname;\n }\n get search() {\n return this.urlChanges[this.urlChangeIndex].search;\n }\n get hash() {\n return this.urlChanges[this.urlChangeIndex].hash;\n }\n get state() {\n return this.urlChanges[this.urlChangeIndex].state;\n }\n\n getBaseHrefFromDOM(): string {\n return this.baseHref;\n }\n\n onPopState(fn: LocationChangeListener): VoidFunction {\n const subscription = this.popStateSubject.subscribe(fn);\n return () => subscription.unsubscribe();\n }\n\n onHashChange(fn: LocationChangeListener): VoidFunction {\n const subscription = this.hashUpdate.subscribe(fn);\n return () => subscription.unsubscribe();\n }\n\n get href(): string {\n let url = `${this.protocol}//${this.hostname}${this.port ? ':' + this.port : ''}`;\n url += `${this.pathname === '/' ? '' : this.pathname}${this.search}${this.hash}`;\n return url;\n }\n\n get url(): string {\n return `${this.pathname}${this.search}${this.hash}`;\n }\n\n private parseChanges(state: unknown, url: string, baseHref: string = '') {\n // When the `history.state` value is stored, it is always copied.\n state = JSON.parse(JSON.stringify(state));\n return {...parseUrl(url, baseHref), state};\n }\n\n replaceState(state: any, title: string, newUrl: string): void {\n const {pathname, search, state: parsedState, hash} = this.parseChanges(state, newUrl);\n\n this.urlChanges[this.urlChangeIndex] = {\n ...this.urlChanges[this.urlChangeIndex],\n pathname,\n search,\n hash,\n state: parsedState,\n };\n }\n\n pushState(state: any, title: string, newUrl: string): void {\n const {pathname, search, state: parsedState, hash} = this.parseChanges(state, newUrl);\n if (this.urlChangeIndex > 0) {\n this.urlChanges.splice(this.urlChangeIndex + 1);\n }\n this.urlChanges.push({\n ...this.urlChanges[this.urlChangeIndex],\n pathname,\n search,\n hash,\n state: parsedState,\n });\n this.urlChangeIndex = this.urlChanges.length - 1;\n }\n\n forward(): void {\n const oldUrl = this.url;\n const oldHash = this.hash;\n if (this.urlChangeIndex < this.urlChanges.length) {\n this.urlChangeIndex++;\n }\n this.emitEvents(oldHash, oldUrl);\n }\n\n back(): void {\n const oldUrl = this.url;\n const oldHash = this.hash;\n if (this.urlChangeIndex > 0) {\n this.urlChangeIndex--;\n }\n this.emitEvents(oldHash, oldUrl);\n }\n\n historyGo(relativePosition: number = 0): void {\n const oldUrl = this.url;\n const oldHash = this.hash;\n const nextPageIndex = this.urlChangeIndex + relativePosition;\n if (nextPageIndex >= 0 && nextPageIndex < this.urlChanges.length) {\n this.urlChangeIndex = nextPageIndex;\n }\n this.emitEvents(oldHash, oldUrl);\n }\n\n getState(): unknown {\n return this.state;\n }\n\n /**\n * Browsers are inconsistent in when they fire events and perform the state updates\n * The most easiest thing to do in our mock is synchronous and that happens to match\n * Firefox and Chrome, at least somewhat closely\n *\n * https://github.com/WICG/navigation-api#watching-for-navigations\n * https://docs.google.com/document/d/1Pdve-DJ1JCGilj9Yqf5HxRJyBKSel5owgOvUJqTauwU/edit#heading=h.3ye4v71wsz94\n * popstate is always sent before hashchange:\n * https://developer.mozilla.org/en-US/docs/Web/API/Window/popstate_event#when_popstate_is_sent\n */\n private emitEvents(oldHash: string, oldUrl: string) {\n this.popStateSubject.next({\n type: 'popstate',\n state: this.getState(),\n oldUrl,\n newUrl: this.url,\n } as LocationChangeEvent);\n if (oldHash !== this.hash) {\n this.hashUpdate.next({\n type: 'hashchange',\n state: null,\n oldUrl,\n newUrl: this.url,\n } as LocationChangeEvent);\n }\n }\n}\n\n/**\n * Mock implementation of URL state.\n */\n@Injectable()\nexport class FakeNavigationPlatformLocation implements PlatformLocation {\n private readonly _platformNavigation: FakeNavigation;\n\n constructor() {\n const platformNavigation = inject(PlatformNavigation);\n if (!(platformNavigation instanceof FakeNavigation)) {\n throw new Error(\n 'FakePlatformNavigation cannot be used without FakeNavigation. Use ' +\n '`provideFakeNavigation` to have all these services provided together.',\n );\n }\n this._platformNavigation = platformNavigation;\n }\n\n private config = inject(MOCK_PLATFORM_LOCATION_CONFIG, {optional: true});\n getBaseHrefFromDOM(): string {\n return this.config?.appBaseHref ?? '';\n }\n\n // window, addEventListener, removeEventListener might be undefined due to test mocks\n onPopState(fn: LocationChangeListener): VoidFunction {\n this._platformNavigation.window?.addEventListener?.('popstate', fn);\n return () => this._platformNavigation.window?.removeEventListener?.('popstate', fn);\n }\n\n onHashChange(fn: LocationChangeListener): VoidFunction {\n this._platformNavigation.window?.addEventListener?.('hashchange', fn as any);\n return () => this._platformNavigation.window?.removeEventListener?.('hashchange', fn as any);\n }\n\n get href(): string {\n return this._platformNavigation.currentEntry.url!;\n }\n get protocol(): string {\n return new URL(this._platformNavigation.currentEntry.url!).protocol;\n }\n get hostname(): string {\n return new URL(this._platformNavigation.currentEntry.url!).hostname;\n }\n get port(): string {\n return new URL(this._platformNavigation.currentEntry.url!).port;\n }\n get pathname(): string {\n return new URL(this._platformNavigation.currentEntry.url!).pathname;\n }\n get search(): string {\n return new URL(this._platformNavigation.currentEntry.url!).search;\n }\n get hash(): string {\n return new URL(this._platformNavigation.currentEntry.url!).hash;\n }\n\n pushState(state: any, title: string, url: string): void {\n this._platformNavigation.pushState(state, title, url);\n }\n\n replaceState(state: any, title: string, url: string): void {\n this._platformNavigation.replaceState(state, title, url);\n }\n\n forward(): void {\n this._platformNavigation.forward();\n }\n\n back(): void {\n this._platformNavigation.back();\n }\n\n historyGo(relativePosition: number = 0): void {\n this._platformNavigation.go(relativePosition);\n }\n\n getState(): unknown {\n return this._platformNavigation.currentEntry.getHistoryState();\n }\n}\n","/**\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\nimport {DOCUMENT, PlatformLocation, PlatformNavigation} from '../../../index';\nimport {inject, InjectionToken, Provider} from '@angular/core';\nimport {PRECOMMIT_HANDLER_SUPPORTED} from '../../../src/navigation/platform_navigation';\n\nimport {\n FakeNavigationPlatformLocation,\n MOCK_PLATFORM_LOCATION_CONFIG,\n} from '../mock_platform_location';\n\nimport {FakeNavigation} from './fake_navigation';\n\nconst FAKE_NAVIGATION = new InjectionToken<FakeNavigation>('fakeNavigation', {\n // Providing a factory implies that the token is provided in root by default\n factory: () => {\n const config = inject(MOCK_PLATFORM_LOCATION_CONFIG, {optional: true});\n const baseFallback = 'http://_empty_/';\n const startUrl = new URL(config?.startUrl || baseFallback, baseFallback);\n const fakeNavigation = new FakeNavigation(inject(DOCUMENT), startUrl.href as `http${string}`);\n fakeNavigation.setSynchronousTraversalsForTesting(true);\n return fakeNavigation;\n },\n});\n\n/**\n * Return a provider for the `FakeNavigation` in place of the real Navigation API.\n */\nexport function provideFakePlatformNavigation(): Provider[] {\n return [\n {\n provide: PlatformNavigation,\n useFactory: () => inject(FAKE_NAVIGATION),\n },\n {provide: PlatformLocation, useClass: FakeNavigationPlatformLocation},\n {provide: PRECOMMIT_HANDLER_SUPPORTED, useValue: true},\n ];\n}\n","/**\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\nimport {\n Location,\n LocationStrategy,\n PopStateEvent,\n ɵnormalizeQueryParams as normalizeQueryParams,\n} from '@angular/common';\nimport {Injectable} from '@angular/core';\nimport {Subject, SubscriptionLike} from 'rxjs';\n\n/**\n * A spy for {@link Location} that allows tests to fire simulated location events.\n *\n * @publicApi\n */\n@Injectable()\nexport class SpyLocation implements Location {\n urlChanges: string[] = [];\n private _history: LocationState[] = [new LocationState('', '', null)];\n private _historyIndex: number = 0;\n /** @internal */\n _subject = new Subject<PopStateEvent>();\n /** @internal */\n _basePath: string = '';\n /** @internal */\n _locationStrategy: LocationStrategy = null!;\n /** @internal */\n _urlChangeListeners: ((url: string, state: unknown) => void)[] = [];\n /** @internal */\n _urlChangeSubscription: SubscriptionLike | null = null;\n\n /** @docs-private */\n ngOnDestroy(): void {\n this._urlChangeSubscription?.unsubscribe();\n this._urlChangeListeners = [];\n }\n\n setInitialPath(url: string) {\n this._history[this._historyIndex].path = url;\n }\n\n setBaseHref(url: string) {\n this._basePath = url;\n }\n\n path(): string {\n return this._history[this._historyIndex].path;\n }\n\n getState(): unknown {\n return this._history[this._historyIndex].state;\n }\n\n isCurrentPathEqualTo(path: string, query: string = ''): boolean {\n const givenPath = path.endsWith('/') ? path.substring(0, path.length - 1) : path;\n const currPath = this.path().endsWith('/')\n ? this.path().substring(0, this.path().length - 1)\n : this.path();\n\n return currPath == givenPath + (query.length > 0 ? '?' + query : '');\n }\n\n simulateUrlPop(pathname: string) {\n this._subject.next({'url': pathname, 'pop': true, 'type': 'popstate'});\n }\n\n simulateHashChange(pathname: string) {\n const path = this.prepareExternalUrl(pathname);\n this.pushHistory(path, '', null);\n\n this.urlChanges.push('hash: ' + pathname);\n // the browser will automatically fire popstate event before each `hashchange` event, so we need\n // to simulate it.\n this._subject.next({'url': pathname, 'pop': true, 'type': 'popstate'});\n this._subject.next({'url': pathname, 'pop': true, 'type': 'hashchange'});\n }\n\n prepareExternalUrl(url: string): string {\n if (url.length > 0 && !url.startsWith('/')) {\n url = '/' + url;\n }\n return this._basePath + url;\n }\n\n go(path: string, query: string = '', state: any = null) {\n path = this.prepareExternalUrl(path);\n\n this.pushHistory(path, query, state);\n\n const locationState = this._history[this._historyIndex - 1];\n if (locationState.path == path && locationState.query == query) {\n return;\n }\n\n const url = path + (query.length > 0 ? '?' + query : '');\n this.urlChanges.push(url);\n this._notifyUrlChangeListeners(path + normalizeQueryParams(query), state);\n }\n\n replaceState(path: string, query: string = '', state: any = null) {\n path = this.prepareExternalUrl(path);\n\n const history = this._history[this._historyIndex];\n\n history.state = state;\n\n if (history.path == path && history.query == query) {\n return;\n }\n\n history.path = path;\n history.query = query;\n\n const url = path + (query.length > 0 ? '?' + query : '');\n this.urlChanges.push('replace: ' + url);\n this._notifyUrlChangeListeners(path + normalizeQueryParams(query), state);\n }\n\n forward() {\n if (this._historyIndex < this._history.length - 1) {\n this._historyIndex++;\n this._subject.next({\n 'url': this.path(),\n 'state': this.getState(),\n 'pop': true,\n 'type': 'popstate',\n });\n }\n }\n\n back() {\n if (this._historyIndex > 0) {\n this._historyIndex--;\n this._subject.next({\n 'url': this.path(),\n 'state': this.getState(),\n 'pop': true,\n 'type': 'popstate',\n });\n }\n }\n\n historyGo(relativePosition: number = 0): void {\n const nextPageIndex = this._historyIndex + relativePosition;\n if (nextPageIndex >= 0 && nextPageIndex < this._history.length) {\n this._historyIndex = nextPageIndex;\n this._subject.next({\n 'url': this.path(),\n 'state': this.getState(),\n 'pop': true,\n 'type': 'popstate',\n });\n }\n }\n\n onUrlChange(fn: (url: string, state: unknown) => void): VoidFunction {\n this._urlChangeListeners.push(fn);\n\n this._urlChangeSubscription ??= this.subscribe((v) => {\n this._notifyUrlChangeListeners(v.url, v.state);\n });\n\n return () => {\n const fnIndex = this._urlChangeListeners.indexOf(fn);\n this._urlChangeListeners.splice(fnIndex, 1);\n\n if (this._urlChangeListeners.length === 0) {\n this._urlChangeSubscription?.unsubscribe();\n this._urlChangeSubscription = null;\n }\n };\n }\n\n /** @internal */\n _notifyUrlChangeListeners(url: string = '', state: unknown) {\n this._urlChangeListeners.forEach((fn) => fn(url, state));\n }\n\n subscribe(\n onNext: (value: any) => void,\n onThrow?: ((error: any) => void) | null,\n onReturn?: (() => void) | null,\n ): SubscriptionLike {\n return this._subject.subscribe({\n next: onNext,\n error: onThrow ?? undefined,\n complete: onReturn ?? undefined,\n });\n }\n\n normalize(url: string): string {\n return null!;\n }\n\n private pushHistory(path: string, query: string, state: any) {\n if (this._historyIndex > 0) {\n this._history.splice(this._historyIndex + 1);\n }\n this._history.push(new LocationState(path, query, state));\n this._historyIndex = this._history.length - 1;\n }\n}\n\nclass LocationState {\n constructor(\n public path: string,\n public query: string,\n public state: any,\n ) {}\n}\n","/**\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\nimport {LocationStrategy} from '@angular/common';\nimport {Injectable} from '@angular/core';\nimport {Subject} from 'rxjs';\n\n/**\n * A mock implementation of {@link LocationStrategy} that allows tests to fire simulated\n * location events.\n *\n * @publicApi\n */\n@Injectable()\nexport class MockLocationStrategy extends LocationStrategy {\n internalBaseHref: string = '/';\n internalPath: string = '/';\n internalTitle: string = '';\n urlChanges: string[] = [];\n /** @internal */\n _subject = new Subject<_MockPopStateEvent>();\n private stateChanges: any[] = [];\n constructor() {\n super();\n }\n\n simulatePopState(url: string): void {\n this.internalPath = url;\n this._subject.next(new _MockPopStateEvent(this.path()));\n }\n\n override path(includeHash: boolean = false): string {\n return this.internalPath;\n }\n\n override prepareExternalUrl(internal: string): string {\n if (internal.startsWith('/') && this.internalBaseHref.endsWith('/')) {\n return this.internalBaseHref + internal.substring(1);\n }\n return this.internalBaseHref + internal;\n }\n\n override pushState(ctx: any, title: string, path: string, query: string): void {\n // Add state change to changes array\n this.stateChanges.push(ctx);\n\n this.internalTitle = title;\n\n const url = path + (query.length > 0 ? '?' + query : '');\n this.internalPath = url;\n\n const externalUrl = this.prepareExternalUrl(url);\n this.urlChanges.push(externalUrl);\n }\n\n override replaceState(ctx: any, title: string, path: string, query: string): void {\n // Reset the last index of stateChanges to the ctx (state) object\n this.stateChanges[(this.stateChanges.length || 1) - 1] = ctx;\n\n this.internalTitle = title;\n\n const url = path + (query.length > 0 ? '?' + query : '');\n this.internalPath = url;\n\n const externalUrl = this.prepareExternalUrl(url);\n this.urlChanges.push('replace: ' + externalUrl);\n }\n\n override onPopState(fn: (value: any) => void): void {\n this._subject.subscribe({next: fn});\n }\n\n override getBaseHref(): string {\n return this.internalBaseHref;\n }\n\n override back(): void {\n if (this.urlChanges.length > 0) {\n this.urlChanges.pop();\n this.stateChanges.pop();\n const nextUrl = this.urlChanges.length > 0 ? this.urlChanges[this.urlChanges.length - 1] : '';\n this.simulatePopState(nextUrl);\n }\n }\n\n override forward(): void {\n throw 'not implemented';\n }\n\n override getState(): unknown {\n return this.stateChanges[(this.stateChanges.length || 1) - 1];\n }\n}\n\nclass _MockPopStateEvent {\n pop: boolean = true;\n type: string = 'popstate';\n constructor(public newUrl: string) {}\n}\n","/**\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\nimport {Location, LocationStrategy} from '../../index';\nimport {Provider} from '@angular/core';\n\nimport {SpyLocation} from './location_mock';\nimport {MockLocationStrategy} from './mock_location_strategy';\n\n/**\n * Returns mock providers for the `Location` and `LocationStrategy` classes.\n * The mocks are helpful in tests to fire simulated location events.\n *\n * @publicApi\n */\nexport function provideLocationMocks(): Provider[] {\n return [\n {provide: Location, useClass: SpyLocation},\n {provide: LocationStrategy, useClass: MockLocationStrategy},\n ];\n}\n"],"names":["urlParse","parseUrl","urlStr","baseHref","verifyProtocol","serverBase","test","parsedUrl","URL","e","result","exec","Error","hostSplit","split","protocol","hostname","port","pathname","search","hash","indexOf","substring","length","MOCK_PLATFORM_LOCATION_CONFIG","InjectionToken","MockPlatformLocation","hashUpdate","Subject","popStateSubject","urlChangeIndex","urlChanges","state","constructor","config","appBaseHref","parsedChanges","parseChanges","startUrl","getBaseHrefFromDOM","onPopState","fn","subscription","subscribe","unsubscribe","onHashChange","href","url","JSON","parse","stringify","replaceState","title","newUrl","parsedState","pushState","splice","push","forward","oldUrl","oldHash","emitEvents","back","historyGo","relativePosition","nextPageIndex","getState","next","type","ɵfac","i0","ɵɵngDeclareFactory","minVersion","version","ngImport","optional","target","ɵɵFactoryTarget","Injectable","decorators","Inject","Optional","FakeNavigationPlatformLocation","_platformNavigation","platformNavigation","inject","PlatformNavigation","FakeNavigation","window","addEventListener","removeEventListener","currentEntry","go","getHistoryState","deps","FAKE_NAVIGATION","factory","baseFallback","fakeNavigation","DOCUMENT","setSynchronousTraversalsForTesting","provideFakePlatformNavigation","provide","useFactory","PlatformLocation","useClass","PRECOMMIT_HANDLER_SUPPORTED","useValue","SpyLocation","_history","LocationState","_historyIndex","_subject","_basePath","_locationStrategy","_urlChangeListeners","_urlChangeSubscription","ngOnDestroy","setInitialPath","path","setBaseHref","isCurrentPathEqualTo","query","givenPath","endsWith","currPath","simulateUrlPop","simulateHashChange","prepareExternalUrl","pushHistory","startsWith","locationState","_notifyUrlChangeListeners","normalizeQueryParams","history","onUrlChange","v","fnIndex","forEach","onNext","onThrow","onReturn","error","undefined","complete","normalize","MockLocationStrategy","LocationStrategy","internalBaseHref","internalPath","internalTitle","stateChanges","simulatePopState","_MockPopStateEvent","includeHash","internal","ctx","externalUrl","getBaseHref","pop","nextUrl","provideLocationMocks","Location"],"mappings":";;;;;;;;;;;;;;;;AAsCA,MAAMA,QAAQ,GAAG,+DAA+D;AAEhF,SAASC,QAAQA,CAACC,MAAc,EAAEC,QAAgB,EAAA;EAChD,MAAMC,cAAc,GAAG,wBAAwB;AAC/C,EAAA,IAAIC,UAA8B;AAIlC,EAAA,IAAI,CAACD,cAAc,CAACE,IAAI,CAACJ,MAAM,CAAC,EAAE;AAChCG,IAAAA,UAAU,GAAG,mBAAmB;AAClC;AACA,EAAA,IAAIE,SAOH;EACD,IAAI;AACFA,IAAAA,SAAS,GAAG,IAAIC,GAAG,CAACN,MAAM,EAAEG,UAAU,CAAC;GACzC,CAAE,OAAOI,CAAC,EAAE;IACV,MAAMC,MAAM,GAAGV,QAAQ,CAACW,IAAI,CAACN,UAAU,IAAI,EAAE,GAAGH,MAAM,CAAC;IACvD,IAAI,CAACQ,MAAM,EAAE;MACX,MAAM,IAAIE,KAAK,CAAC,CAAA,aAAA,EAAgBV,MAAM,CAAeC,YAAAA,EAAAA,QAAQ,EAAE,CAAC;AAClE;IACA,MAAMU,SAAS,GAAGH,MAAM,CAAC,CAAC,CAAC,CAACI,KAAK,CAAC,GAAG,CAAC;AACtCP,IAAAA,SAAS,GAAG;AACVQ,MAAAA,QAAQ,EAAEL,MAAM,CAAC,CAAC,CAAC;AACnBM,MAAAA,QAAQ,EAAEH,SAAS,CAAC,CAAC,CAAC;AACtBI,MAAAA,IAAI,EAAEJ,SAAS,CAAC,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AAA,CAAmBoB,MAAc,EAAA;IAAd,IAAM,CAAAA,MAAA,GAANA,MAAM;AAAW;AACrC;;SCnFe4G,oBAAoBA,GAAA;AAClC,EAAA,OAAO,CACL;AAAC3D,IAAAA,OAAO,EAAE4D,QAAQ;AAAEzD,IAAAA,QAAQ,EAAEG;AAAY,GAAA,EAC1C;AAACN,IAAAA,OAAO,EAAE6C,kBAAgB;AAAE1C,IAAAA,QAAQ,EAAEyC;AAAqB,GAAA,CAC5D;AACH;;;;"}
|
|
1
|
+
{"version":3,"file":"testing.mjs","sources":["../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/common/testing/src/mock_platform_location.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/common/testing/src/navigation/provide_fake_platform_navigation.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/common/testing/src/location_mock.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/common/testing/src/mock_location_strategy.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/common/testing/src/provide_location_mocks.ts"],"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\nimport {\n LocationChangeEvent,\n LocationChangeListener,\n PlatformLocation,\n PlatformNavigation,\n} from '../../index';\nimport {Inject, inject, Injectable, InjectionToken, Optional} from '@angular/core';\nimport {Subject} from 'rxjs';\n\nimport {FakeNavigation} from './navigation/fake_navigation';\n\n/**\n * Parser from https://tools.ietf.org/html/rfc3986#appendix-B\n * ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?\n * 12 3 4 5 6 7 8 9\n *\n * Example: http://www.ics.uci.edu/pub/ietf/uri/#Related\n *\n * Results in:\n *\n * $1 = http:\n * $2 = http\n * $3 = //www.ics.uci.edu\n * $4 = www.ics.uci.edu\n * $5 = /pub/ietf/uri/\n * $6 = <undefined>\n * $7 = <undefined>\n * $8 = #Related\n * $9 = Related\n */\nconst urlParse = /^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/;\n\nfunction parseUrl(urlStr: string, baseHref: string) {\n const verifyProtocol = /^((http[s]?|ftp):\\/\\/)/;\n let serverBase: string | undefined;\n\n // URL class requires full URL. If the URL string doesn't start with protocol, we need to add\n // an arbitrary base URL which can be removed afterward.\n if (!verifyProtocol.test(urlStr)) {\n serverBase = 'http://empty.com/';\n }\n let parsedUrl: {\n protocol: string;\n hostname: string;\n port: string;\n pathname: string;\n search: string;\n hash: string;\n };\n try {\n parsedUrl = new URL(urlStr, serverBase);\n } catch (e) {\n const result = urlParse.exec(serverBase || '' + urlStr);\n if (!result) {\n throw new Error(`Invalid URL: ${urlStr} with base: ${baseHref}`);\n }\n const hostSplit = result[4].split(':');\n parsedUrl = {\n protocol: result[1],\n hostname: hostSplit[0],\n port: hostSplit[1] || '',\n pathname: result[5],\n search: result[6],\n hash: result[8],\n };\n }\n if (parsedUrl.pathname && parsedUrl.pathname.indexOf(baseHref) === 0) {\n parsedUrl.pathname = parsedUrl.pathname.substring(baseHref.length);\n }\n return {\n hostname: (!serverBase && parsedUrl.hostname) || '',\n protocol: (!serverBase && parsedUrl.protocol) || '',\n port: (!serverBase && parsedUrl.port) || '',\n pathname: parsedUrl.pathname || '/',\n search: parsedUrl.search || '',\n hash: parsedUrl.hash || '',\n };\n}\n\n/**\n * Mock platform location config\n *\n * @publicApi\n */\nexport interface MockPlatformLocationConfig {\n startUrl?: string;\n appBaseHref?: string;\n}\n\n/**\n * Provider for mock platform location config\n *\n * @publicApi\n */\nexport const MOCK_PLATFORM_LOCATION_CONFIG = new InjectionToken<MockPlatformLocationConfig>(\n 'MOCK_PLATFORM_LOCATION_CONFIG',\n);\n\n/**\n * Mock implementation of URL state.\n *\n * @publicApi\n */\n@Injectable()\nexport class MockPlatformLocation implements PlatformLocation {\n private baseHref: string = '';\n private hashUpdate = new Subject<LocationChangeEvent>();\n private popStateSubject = new Subject<LocationChangeEvent>();\n private urlChangeIndex: number = 0;\n private urlChanges: {\n hostname: string;\n protocol: string;\n port: string;\n pathname: string;\n search: string;\n hash: string;\n state: unknown;\n }[] = [{hostname: '', protocol: '', port: '', pathname: '/', search: '', hash: '', state: null}];\n\n constructor(\n @Inject(MOCK_PLATFORM_LOCATION_CONFIG) @Optional() config?: MockPlatformLocationConfig,\n ) {\n if (config) {\n this.baseHref = config.appBaseHref || '';\n\n const parsedChanges = this.parseChanges(\n null,\n config.startUrl || 'http://_empty_/',\n this.baseHref,\n );\n this.urlChanges[0] = {...parsedChanges};\n }\n }\n\n get hostname() {\n return this.urlChanges[this.urlChangeIndex].hostname;\n }\n get protocol() {\n return this.urlChanges[this.urlChangeIndex].protocol;\n }\n get port() {\n return this.urlChanges[this.urlChangeIndex].port;\n }\n get pathname() {\n return this.urlChanges[this.urlChangeIndex].pathname;\n }\n get search() {\n return this.urlChanges[this.urlChangeIndex].search;\n }\n get hash() {\n return this.urlChanges[this.urlChangeIndex].hash;\n }\n get state() {\n return this.urlChanges[this.urlChangeIndex].state;\n }\n\n getBaseHrefFromDOM(): string {\n return this.baseHref;\n }\n\n onPopState(fn: LocationChangeListener): VoidFunction {\n const subscription = this.popStateSubject.subscribe(fn);\n return () => subscription.unsubscribe();\n }\n\n onHashChange(fn: LocationChangeListener): VoidFunction {\n const subscription = this.hashUpdate.subscribe(fn);\n return () => subscription.unsubscribe();\n }\n\n get href(): string {\n let url = `${this.protocol}//${this.hostname}${this.port ? ':' + this.port : ''}`;\n url += `${this.pathname === '/' ? '' : this.pathname}${this.search}${this.hash}`;\n return url;\n }\n\n get url(): string {\n return `${this.pathname}${this.search}${this.hash}`;\n }\n\n private parseChanges(state: unknown, url: string, baseHref: string = '') {\n // When the `history.state` value is stored, it is always copied.\n state = JSON.parse(JSON.stringify(state));\n return {...parseUrl(url, baseHref), state};\n }\n\n replaceState(state: any, title: string, newUrl: string): void {\n const {pathname, search, state: parsedState, hash} = this.parseChanges(state, newUrl);\n\n this.urlChanges[this.urlChangeIndex] = {\n ...this.urlChanges[this.urlChangeIndex],\n pathname,\n search,\n hash,\n state: parsedState,\n };\n }\n\n pushState(state: any, title: string, newUrl: string): void {\n const {pathname, search, state: parsedState, hash} = this.parseChanges(state, newUrl);\n if (this.urlChangeIndex > 0) {\n this.urlChanges.splice(this.urlChangeIndex + 1);\n }\n this.urlChanges.push({\n ...this.urlChanges[this.urlChangeIndex],\n pathname,\n search,\n hash,\n state: parsedState,\n });\n this.urlChangeIndex = this.urlChanges.length - 1;\n }\n\n forward(): void {\n const oldUrl = this.url;\n const oldHash = this.hash;\n if (this.urlChangeIndex < this.urlChanges.length) {\n this.urlChangeIndex++;\n }\n this.emitEvents(oldHash, oldUrl);\n }\n\n back(): void {\n const oldUrl = this.url;\n const oldHash = this.hash;\n if (this.urlChangeIndex > 0) {\n this.urlChangeIndex--;\n }\n this.emitEvents(oldHash, oldUrl);\n }\n\n historyGo(relativePosition: number = 0): void {\n const oldUrl = this.url;\n const oldHash = this.hash;\n const nextPageIndex = this.urlChangeIndex + relativePosition;\n if (nextPageIndex >= 0 && nextPageIndex < this.urlChanges.length) {\n this.urlChangeIndex = nextPageIndex;\n }\n this.emitEvents(oldHash, oldUrl);\n }\n\n getState(): unknown {\n return this.state;\n }\n\n /**\n * Browsers are inconsistent in when they fire events and perform the state updates\n * The most easiest thing to do in our mock is synchronous and that happens to match\n * Firefox and Chrome, at least somewhat closely\n *\n * https://github.com/WICG/navigation-api#watching-for-navigations\n * https://docs.google.com/document/d/1Pdve-DJ1JCGilj9Yqf5HxRJyBKSel5owgOvUJqTauwU/edit#heading=h.3ye4v71wsz94\n * popstate is always sent before hashchange:\n * https://developer.mozilla.org/en-US/docs/Web/API/Window/popstate_event#when_popstate_is_sent\n */\n private emitEvents(oldHash: string, oldUrl: string) {\n this.popStateSubject.next({\n type: 'popstate',\n state: this.getState(),\n oldUrl,\n newUrl: this.url,\n } as LocationChangeEvent);\n if (oldHash !== this.hash) {\n this.hashUpdate.next({\n type: 'hashchange',\n state: null,\n oldUrl,\n newUrl: this.url,\n } as LocationChangeEvent);\n }\n }\n}\n\n/**\n * Mock implementation of URL state.\n */\n@Injectable()\nexport class FakeNavigationPlatformLocation implements PlatformLocation {\n private readonly _platformNavigation: FakeNavigation;\n\n constructor() {\n const platformNavigation = inject(PlatformNavigation);\n if (!(platformNavigation instanceof FakeNavigation)) {\n throw new Error(\n 'FakePlatformNavigation cannot be used without FakeNavigation. Use ' +\n '`provideFakeNavigation` to have all these services provided together.',\n );\n }\n this._platformNavigation = platformNavigation;\n }\n\n private config = inject(MOCK_PLATFORM_LOCATION_CONFIG, {optional: true});\n getBaseHrefFromDOM(): string {\n return this.config?.appBaseHref ?? '';\n }\n\n // window, addEventListener, removeEventListener might be undefined due to test mocks\n onPopState(fn: LocationChangeListener): VoidFunction {\n this._platformNavigation.window?.addEventListener?.('popstate', fn);\n return () => this._platformNavigation.window?.removeEventListener?.('popstate', fn);\n }\n\n onHashChange(fn: LocationChangeListener): VoidFunction {\n this._platformNavigation.window?.addEventListener?.('hashchange', fn as any);\n return () => this._platformNavigation.window?.removeEventListener?.('hashchange', fn as any);\n }\n\n get href(): string {\n return this._platformNavigation.currentEntry.url!;\n }\n get protocol(): string {\n return new URL(this._platformNavigation.currentEntry.url!).protocol;\n }\n get hostname(): string {\n return new URL(this._platformNavigation.currentEntry.url!).hostname;\n }\n get port(): string {\n return new URL(this._platformNavigation.currentEntry.url!).port;\n }\n get pathname(): string {\n return new URL(this._platformNavigation.currentEntry.url!).pathname;\n }\n get search(): string {\n return new URL(this._platformNavigation.currentEntry.url!).search;\n }\n get hash(): string {\n return new URL(this._platformNavigation.currentEntry.url!).hash;\n }\n\n pushState(state: any, title: string, url: string): void {\n this._platformNavigation.pushState(state, title, url);\n }\n\n replaceState(state: any, title: string, url: string): void {\n this._platformNavigation.replaceState(state, title, url);\n }\n\n forward(): void {\n this._platformNavigation.forward();\n }\n\n back(): void {\n this._platformNavigation.back();\n }\n\n historyGo(relativePosition: number = 0): void {\n this._platformNavigation.go(relativePosition);\n }\n\n getState(): unknown {\n return this._platformNavigation.currentEntry.getHistoryState();\n }\n}\n","/**\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\nimport {DOCUMENT, PlatformLocation, PlatformNavigation} from '../../../index';\nimport {inject, InjectionToken, Provider} from '@angular/core';\nimport {PRECOMMIT_HANDLER_SUPPORTED} from '../../../src/navigation/platform_navigation';\n\nimport {\n FakeNavigationPlatformLocation,\n MOCK_PLATFORM_LOCATION_CONFIG,\n} from '../mock_platform_location';\n\nimport {FakeNavigation} from './fake_navigation';\n\nconst FAKE_NAVIGATION = new InjectionToken<FakeNavigation>('fakeNavigation', {\n // Providing a factory implies that the token is provided in root by default\n factory: () => {\n const config = inject(MOCK_PLATFORM_LOCATION_CONFIG, {optional: true});\n const baseFallback = 'http://_empty_/';\n const startUrl = new URL(config?.startUrl || baseFallback, baseFallback);\n const fakeNavigation = new FakeNavigation(inject(DOCUMENT), startUrl.href as `http${string}`);\n fakeNavigation.setSynchronousTraversalsForTesting(true);\n return fakeNavigation;\n },\n});\n\n/**\n * Return a provider for the `FakeNavigation` in place of the real Navigation API.\n */\nexport function provideFakePlatformNavigation(): Provider[] {\n return [\n {\n provide: PlatformNavigation,\n useFactory: () => inject(FAKE_NAVIGATION),\n },\n {provide: PlatformLocation, useClass: FakeNavigationPlatformLocation},\n {provide: PRECOMMIT_HANDLER_SUPPORTED, useValue: true},\n ];\n}\n","/**\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\nimport {\n Location,\n LocationStrategy,\n PopStateEvent,\n ɵnormalizeQueryParams as normalizeQueryParams,\n} from '@angular/common';\nimport {Injectable} from '@angular/core';\nimport {Subject, SubscriptionLike} from 'rxjs';\n\n/**\n * A spy for {@link Location} that allows tests to fire simulated location events.\n *\n * @publicApi\n */\n@Injectable()\nexport class SpyLocation implements Location {\n urlChanges: string[] = [];\n private _history: LocationState[] = [new LocationState('', '', null)];\n private _historyIndex: number = 0;\n /** @internal */\n _subject = new Subject<PopStateEvent>();\n /** @internal */\n _basePath: string = '';\n /** @internal */\n _locationStrategy: LocationStrategy = null!;\n /** @internal */\n _urlChangeListeners: ((url: string, state: unknown) => void)[] = [];\n /** @internal */\n _urlChangeSubscription: SubscriptionLike | null = null;\n\n /** @docs-private */\n ngOnDestroy(): void {\n this._urlChangeSubscription?.unsubscribe();\n this._urlChangeListeners = [];\n }\n\n setInitialPath(url: string) {\n this._history[this._historyIndex].path = url;\n }\n\n setBaseHref(url: string) {\n this._basePath = url;\n }\n\n path(): string {\n return this._history[this._historyIndex].path;\n }\n\n getState(): unknown {\n return this._history[this._historyIndex].state;\n }\n\n isCurrentPathEqualTo(path: string, query: string = ''): boolean {\n const givenPath = path.endsWith('/') ? path.substring(0, path.length - 1) : path;\n const currPath = this.path().endsWith('/')\n ? this.path().substring(0, this.path().length - 1)\n : this.path();\n\n return currPath == givenPath + (query.length > 0 ? '?' + query : '');\n }\n\n simulateUrlPop(pathname: string) {\n this._subject.next({'url': pathname, 'pop': true, 'type': 'popstate'});\n }\n\n simulateHashChange(pathname: string) {\n const path = this.prepareExternalUrl(pathname);\n this.pushHistory(path, '', null);\n\n this.urlChanges.push('hash: ' + pathname);\n // the browser will automatically fire popstate event before each `hashchange` event, so we need\n // to simulate it.\n this._subject.next({'url': pathname, 'pop': true, 'type': 'popstate'});\n this._subject.next({'url': pathname, 'pop': true, 'type': 'hashchange'});\n }\n\n prepareExternalUrl(url: string): string {\n if (url.length > 0 && !url.startsWith('/')) {\n url = '/' + url;\n }\n return this._basePath + url;\n }\n\n go(path: string, query: string = '', state: any = null) {\n path = this.prepareExternalUrl(path);\n\n this.pushHistory(path, query, state);\n\n const locationState = this._history[this._historyIndex - 1];\n if (locationState.path == path && locationState.query == query) {\n return;\n }\n\n const url = path + (query.length > 0 ? '?' + query : '');\n this.urlChanges.push(url);\n this._notifyUrlChangeListeners(path + normalizeQueryParams(query), state);\n }\n\n replaceState(path: string, query: string = '', state: any = null) {\n path = this.prepareExternalUrl(path);\n\n const history = this._history[this._historyIndex];\n\n history.state = state;\n\n if (history.path == path && history.query == query) {\n return;\n }\n\n history.path = path;\n history.query = query;\n\n const url = path + (query.length > 0 ? '?' + query : '');\n this.urlChanges.push('replace: ' + url);\n this._notifyUrlChangeListeners(path + normalizeQueryParams(query), state);\n }\n\n forward() {\n if (this._historyIndex < this._history.length - 1) {\n this._historyIndex++;\n this._subject.next({\n 'url': this.path(),\n 'state': this.getState(),\n 'pop': true,\n 'type': 'popstate',\n });\n }\n }\n\n back() {\n if (this._historyIndex > 0) {\n this._historyIndex--;\n this._subject.next({\n 'url': this.path(),\n 'state': this.getState(),\n 'pop': true,\n 'type': 'popstate',\n });\n }\n }\n\n historyGo(relativePosition: number = 0): void {\n const nextPageIndex = this._historyIndex + relativePosition;\n if (nextPageIndex >= 0 && nextPageIndex < this._history.length) {\n this._historyIndex = nextPageIndex;\n this._subject.next({\n 'url': this.path(),\n 'state': this.getState(),\n 'pop': true,\n 'type': 'popstate',\n });\n }\n }\n\n onUrlChange(fn: (url: string, state: unknown) => void): VoidFunction {\n this._urlChangeListeners.push(fn);\n\n this._urlChangeSubscription ??= this.subscribe((v) => {\n this._notifyUrlChangeListeners(v.url, v.state);\n });\n\n return () => {\n const fnIndex = this._urlChangeListeners.indexOf(fn);\n this._urlChangeListeners.splice(fnIndex, 1);\n\n if (this._urlChangeListeners.length === 0) {\n this._urlChangeSubscription?.unsubscribe();\n this._urlChangeSubscription = null;\n }\n };\n }\n\n /** @internal */\n _notifyUrlChangeListeners(url: string = '', state: unknown) {\n this._urlChangeListeners.forEach((fn) => fn(url, state));\n }\n\n subscribe(\n onNext: (value: any) => void,\n onThrow?: ((error: any) => void) | null,\n onReturn?: (() => void) | null,\n ): SubscriptionLike {\n return this._subject.subscribe({\n next: onNext,\n error: onThrow ?? undefined,\n complete: onReturn ?? undefined,\n });\n }\n\n normalize(url: string): string {\n return null!;\n }\n\n private pushHistory(path: string, query: string, state: any) {\n if (this._historyIndex > 0) {\n this._history.splice(this._historyIndex + 1);\n }\n this._history.push(new LocationState(path, query, state));\n this._historyIndex = this._history.length - 1;\n }\n}\n\nclass LocationState {\n constructor(\n public path: string,\n public query: string,\n public state: any,\n ) {}\n}\n","/**\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\nimport {LocationStrategy} from '@angular/common';\nimport {Injectable} from '@angular/core';\nimport {Subject} from 'rxjs';\n\n/**\n * A mock implementation of {@link LocationStrategy} that allows tests to fire simulated\n * location events.\n *\n * @publicApi\n */\n@Injectable()\nexport class MockLocationStrategy extends LocationStrategy {\n internalBaseHref: string = '/';\n internalPath: string = '/';\n internalTitle: string = '';\n urlChanges: string[] = [];\n /** @internal */\n _subject = new Subject<_MockPopStateEvent>();\n private stateChanges: any[] = [];\n constructor() {\n super();\n }\n\n simulatePopState(url: string): void {\n this.internalPath = url;\n this._subject.next(new _MockPopStateEvent(this.path()));\n }\n\n override path(includeHash: boolean = false): string {\n return this.internalPath;\n }\n\n override prepareExternalUrl(internal: string): string {\n if (internal.startsWith('/') && this.internalBaseHref.endsWith('/')) {\n return this.internalBaseHref + internal.substring(1);\n }\n return this.internalBaseHref + internal;\n }\n\n override pushState(ctx: any, title: string, path: string, query: string): void {\n // Add state change to changes array\n this.stateChanges.push(ctx);\n\n this.internalTitle = title;\n\n const url = path + (query.length > 0 ? '?' + query : '');\n this.internalPath = url;\n\n const externalUrl = this.prepareExternalUrl(url);\n this.urlChanges.push(externalUrl);\n }\n\n override replaceState(ctx: any, title: string, path: string, query: string): void {\n // Reset the last index of stateChanges to the ctx (state) object\n this.stateChanges[(this.stateChanges.length || 1) - 1] = ctx;\n\n this.internalTitle = title;\n\n const url = path + (query.length > 0 ? '?' + query : '');\n this.internalPath = url;\n\n const externalUrl = this.prepareExternalUrl(url);\n this.urlChanges.push('replace: ' + externalUrl);\n }\n\n override onPopState(fn: (value: any) => void): void {\n this._subject.subscribe({next: fn});\n }\n\n override getBaseHref(): string {\n return this.internalBaseHref;\n }\n\n override back(): void {\n if (this.urlChanges.length > 0) {\n this.urlChanges.pop();\n this.stateChanges.pop();\n const nextUrl = this.urlChanges.length > 0 ? this.urlChanges[this.urlChanges.length - 1] : '';\n this.simulatePopState(nextUrl);\n }\n }\n\n override forward(): void {\n throw 'not implemented';\n }\n\n override getState(): unknown {\n return this.stateChanges[(this.stateChanges.length || 1) - 1];\n }\n}\n\nclass _MockPopStateEvent {\n pop: boolean = true;\n type: string = 'popstate';\n constructor(public newUrl: string) {}\n}\n","/**\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\nimport {Location, LocationStrategy} from '../../index';\nimport {Provider} from '@angular/core';\n\nimport {SpyLocation} from './location_mock';\nimport {MockLocationStrategy} from './mock_location_strategy';\n\n/**\n * Returns mock providers for the `Location` and `LocationStrategy` classes.\n * The mocks are helpful in tests to fire simulated location events.\n *\n * @publicApi\n */\nexport function provideLocationMocks(): Provider[] {\n return [\n {provide: Location, useClass: SpyLocation},\n {provide: LocationStrategy, useClass: MockLocationStrategy},\n ];\n}\n"],"names":["urlParse","parseUrl","urlStr","baseHref","verifyProtocol","serverBase","test","parsedUrl","URL","e","result","exec","Error","hostSplit","split","protocol","hostname","port","pathname","search","hash","indexOf","substring","length","MOCK_PLATFORM_LOCATION_CONFIG","InjectionToken","MockPlatformLocation","hashUpdate","Subject","popStateSubject","urlChangeIndex","urlChanges","state","constructor","config","appBaseHref","parsedChanges","parseChanges","startUrl","getBaseHrefFromDOM","onPopState","fn","subscription","subscribe","unsubscribe","onHashChange","href","url","JSON","parse","stringify","replaceState","title","newUrl","parsedState","pushState","splice","push","forward","oldUrl","oldHash","emitEvents","back","historyGo","relativePosition","nextPageIndex","getState","next","type","ɵfac","i0","ɵɵngDeclareFactory","minVersion","version","ngImport","optional","target","ɵɵFactoryTarget","Injectable","decorators","Inject","Optional","FakeNavigationPlatformLocation","_platformNavigation","platformNavigation","inject","PlatformNavigation","FakeNavigation","window","addEventListener","removeEventListener","currentEntry","go","getHistoryState","deps","FAKE_NAVIGATION","factory","baseFallback","fakeNavigation","DOCUMENT","setSynchronousTraversalsForTesting","provideFakePlatformNavigation","provide","useFactory","PlatformLocation","useClass","PRECOMMIT_HANDLER_SUPPORTED","useValue","SpyLocation","_history","LocationState","_historyIndex","_subject","_basePath","_locationStrategy","_urlChangeListeners","_urlChangeSubscription","ngOnDestroy","setInitialPath","path","setBaseHref","isCurrentPathEqualTo","query","givenPath","endsWith","currPath","simulateUrlPop","simulateHashChange","prepareExternalUrl","pushHistory","startsWith","locationState","_notifyUrlChangeListeners","normalizeQueryParams","history","onUrlChange","v","fnIndex","forEach","onNext","onThrow","onReturn","error","undefined","complete","normalize","MockLocationStrategy","LocationStrategy","internalBaseHref","internalPath","internalTitle","stateChanges","simulatePopState","_MockPopStateEvent","includeHash","internal","ctx","externalUrl","getBaseHref","pop","nextUrl","provideLocationMocks","Location"],"mappings":";;;;;;;;;;;;;;;;AAsCA,MAAMA,QAAQ,GAAG,+DAA+D;AAEhF,SAASC,QAAQA,CAACC,MAAc,EAAEC,QAAgB,EAAA;EAChD,MAAMC,cAAc,GAAG,wBAAwB;AAC/C,EAAA,IAAIC,UAA8B;AAIlC,EAAA,IAAI,CAACD,cAAc,CAACE,IAAI,CAACJ,MAAM,CAAC,EAAE;AAChCG,IAAAA,UAAU,GAAG,mBAAmB;AAClC;AACA,EAAA,IAAIE,SAOH;EACD,IAAI;AACFA,IAAAA,SAAS,GAAG,IAAIC,GAAG,CAACN,MAAM,EAAEG,UAAU,CAAC;GACzC,C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