{
"version": 3,
"sources": ["../../../../../node_modules/@angular/common/fesm2022/common.mjs"],
"sourcesContent": ["/**\n * @license Angular v17.0.7\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { InjectionToken, inject, Injectable, Optional, Inject, EventEmitter, ɵɵinject, ɵfindLocaleData, ɵLocaleDataIndex, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, LOCALE_ID, ɵregisterLocaleData, ɵstringify, Directive, Input, createNgModule, NgModuleRef, ɵRuntimeError, ɵformatRuntimeError, Host, Attribute, RendererStyleFlags2, untracked, ɵisPromise, ɵisSubscribable, Pipe, DEFAULT_CURRENCY_CODE, NgModule, Version, ɵɵdefineInjectable, ɵIMAGE_CONFIG, Renderer2, ElementRef, Injector, PLATFORM_ID, ɵperformanceMarkFeature, NgZone, numberAttribute, booleanAttribute, ɵIMAGE_CONFIG_DEFAULTS, ɵunwrapSafeValue } from '@angular/core';\nexport { ɵIMAGE_CONFIG as IMAGE_CONFIG } from '@angular/core';\nlet _DOM = null;\nfunction getDOM() {\n return _DOM;\n}\nfunction setRootDomAdapter(adapter) {\n if (!_DOM) {\n _DOM = adapter;\n }\n}\n/* tslint:disable:requireParameterType */\n/**\n * Provides DOM operations in an environment-agnostic way.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\nclass DomAdapter {}\n\n/**\n * A DI Token representing the main rendering context.\n * In a browser and SSR this is the DOM Document.\n * When using SSR, that document is created by [Domino](https://github.com/angular/domino).\n *\n * @publicApi\n */\nconst DOCUMENT = new InjectionToken('DocumentToken');\n\n/**\n * This class should not be used directly by an application developer. Instead, use\n * {@link Location}.\n *\n * `PlatformLocation` encapsulates all calls to DOM APIs, which allows the Router to be\n * platform-agnostic.\n * This means that we can have different implementation of `PlatformLocation` for the different\n * platforms that Angular supports. For example, `@angular/platform-browser` provides an\n * implementation specific to the browser environment, while `@angular/platform-server` provides\n * one suitable for use with server-side rendering.\n *\n * The `PlatformLocation` class is used directly by all implementations of {@link LocationStrategy}\n * when they need to interact with the DOM APIs like pushState, popState, etc.\n *\n * {@link LocationStrategy} in turn is used by the {@link Location} service which is used directly\n * by the {@link Router} in order to navigate between routes. Since all interactions between {@link\n * Router} /\n * {@link Location} / {@link LocationStrategy} and DOM APIs flow through the `PlatformLocation`\n * class, they are all platform-agnostic.\n *\n * @publicApi\n */\nclass PlatformLocation {\n historyGo(relativePosition) {\n throw new Error('Not implemented');\n }\n static {\n this.ɵfac = function PlatformLocation_Factory(t) {\n return new (t || PlatformLocation)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: PlatformLocation,\n factory: () => (() => inject(BrowserPlatformLocation))(),\n providedIn: 'platform'\n });\n }\n}\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(PlatformLocation, [{\n type: Injectable,\n args: [{\n providedIn: 'platform',\n useFactory: () => inject(BrowserPlatformLocation)\n }]\n }], null, null);\n})();\n/**\n * @description\n * Indicates when a location is initialized.\n *\n * @publicApi\n */\nconst LOCATION_INITIALIZED = new InjectionToken('Location Initialized');\n/**\n * `PlatformLocation` encapsulates all of the direct calls to platform APIs.\n * This class should not be used directly by an application developer. Instead, use\n * {@link Location}.\n *\n * @publicApi\n */\nclass BrowserPlatformLocation extends PlatformLocation {\n constructor() {\n super();\n this._doc = inject(DOCUMENT);\n this._location = window.location;\n this._history = window.history;\n }\n getBaseHrefFromDOM() {\n return getDOM().getBaseHref(this._doc);\n }\n onPopState(fn) {\n const window = getDOM().getGlobalEventTarget(this._doc, 'window');\n window.addEventListener('popstate', fn, false);\n return () => window.removeEventListener('popstate', fn);\n }\n onHashChange(fn) {\n const window = getDOM().getGlobalEventTarget(this._doc, 'window');\n window.addEventListener('hashchange', fn, false);\n return () => window.removeEventListener('hashchange', fn);\n }\n get href() {\n return this._location.href;\n }\n get protocol() {\n return this._location.protocol;\n }\n get hostname() {\n return this._location.hostname;\n }\n get port() {\n return this._location.port;\n }\n get pathname() {\n return this._location.pathname;\n }\n get search() {\n return this._location.search;\n }\n get hash() {\n return this._location.hash;\n }\n set pathname(newPath) {\n this._location.pathname = newPath;\n }\n pushState(state, title, url) {\n this._history.pushState(state, title, url);\n }\n replaceState(state, title, url) {\n this._history.replaceState(state, title, url);\n }\n forward() {\n this._history.forward();\n }\n back() {\n this._history.back();\n }\n historyGo(relativePosition = 0) {\n this._history.go(relativePosition);\n }\n getState() {\n return this._history.state;\n }\n static {\n this.ɵfac = function BrowserPlatformLocation_Factory(t) {\n return new (t || BrowserPlatformLocation)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: BrowserPlatformLocation,\n factory: () => (() => new BrowserPlatformLocation())(),\n providedIn: 'platform'\n });\n }\n}\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(BrowserPlatformLocation, [{\n type: Injectable,\n args: [{\n providedIn: 'platform',\n useFactory: () => new BrowserPlatformLocation()\n }]\n }], () => [], null);\n})();\n\n/**\n * Joins two parts of a URL with a slash if needed.\n *\n * @param start URL string\n * @param end URL string\n *\n *\n * @returns The joined URL string.\n */\nfunction joinWithSlash(start, end) {\n if (start.length == 0) {\n return end;\n }\n if (end.length == 0) {\n return start;\n }\n let slashes = 0;\n if (start.endsWith('/')) {\n slashes++;\n }\n if (end.startsWith('/')) {\n slashes++;\n }\n if (slashes == 2) {\n return start + end.substring(1);\n }\n if (slashes == 1) {\n return start + end;\n }\n return start + '/' + end;\n}\n/**\n * Removes a trailing slash from a URL string if needed.\n * Looks for the first occurrence of either `#`, `?`, or the end of the\n * line as `/` characters and removes the trailing slash if one exists.\n *\n * @param url URL string.\n *\n * @returns The URL string, modified if needed.\n */\nfunction stripTrailingSlash(url) {\n const match = url.match(/#|\\?|$/);\n const pathEndIdx = match && match.index || url.length;\n const droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);\n return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);\n}\n/**\n * Normalizes URL parameters by prepending with `?` if needed.\n *\n * @param params String of URL parameters.\n *\n * @returns The normalized URL parameters string.\n */\nfunction normalizeQueryParams(params) {\n return params && params[0] !== '?' ? '?' + params : params;\n}\n\n/**\n * Enables the `Location` service to read route state from the browser's URL.\n * Angular provides two strategies:\n * `HashLocationStrategy` and `PathLocationStrategy`.\n *\n * Applications should use the `Router` or `Location` services to\n * interact with application route state.\n *\n * For instance, `HashLocationStrategy` produces URLs like\n * http://example.com#/foo
,\n * and `PathLocationStrategy` produces\n * http://example.com/foo
as an equivalent URL.\n *\n * See these two classes for more.\n *\n * @publicApi\n */\nclass LocationStrategy {\n historyGo(relativePosition) {\n throw new Error('Not implemented');\n }\n static {\n this.ɵfac = function LocationStrategy_Factory(t) {\n return new (t || LocationStrategy)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: LocationStrategy,\n factory: () => (() => inject(PathLocationStrategy))(),\n providedIn: 'root'\n });\n }\n}\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(LocationStrategy, [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n useFactory: () => inject(PathLocationStrategy)\n }]\n }], null, null);\n})();\n/**\n * A predefined [DI token](guide/glossary#di-token) for the base href\n * to be used with the `PathLocationStrategy`.\n * The base href is the URL prefix that should be preserved when generating\n * and recognizing URLs.\n *\n * @usageNotes\n *\n * The following example shows how to use this token to configure the root app injector\n * with a base href value, so that the DI framework can supply the dependency anywhere in the app.\n *\n * ```typescript\n * import {NgModule} from '@angular/core';\n * import {APP_BASE_HREF} from '@angular/common';\n *\n * @NgModule({\n * providers: [{provide: APP_BASE_HREF, useValue: '/my/app'}]\n * })\n * class AppModule {}\n * ```\n *\n * @publicApi\n */\nconst APP_BASE_HREF = new InjectionToken('appBaseHref');\n/**\n * @description\n * A {@link LocationStrategy} used to configure the {@link Location} service to\n * represent its state in the\n * [path](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) of the\n * browser's URL.\n *\n * If you're using `PathLocationStrategy`, you may provide a {@link APP_BASE_HREF}\n * or add a `
Today is {{today | date}}
\n *Or if you prefer, {{today | date:'fullDate'}}
\n *The time is {{today | date:'h:mm a z'}}
\n *{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}
.\n * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n * Default is `1`.\n * - `minFractionDigits`: The minimum number of digits after the decimal point.\n * Default is `0`.\n * - `maxFractionDigits`: The maximum number of digits after the decimal point.\n * Default is `0`.\n * @param locale A locale code for the locale format rules to use.\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n * See [Setting your app locale](guide/i18n-common-locale-id).\n */\n transform(value, digitsInfo, locale) {\n if (!isValue(value)) return null;\n locale = locale || this._locale;\n try {\n const num = strToNumber(value);\n return formatPercent(num, locale, digitsInfo);\n } catch (error) {\n throw invalidPipeArgumentError(PercentPipe, error.message);\n }\n }\n static {\n this.ɵfac = function PercentPipe_Factory(t) {\n return new (t || PercentPipe)(i0.ɵɵdirectiveInject(LOCALE_ID, 16));\n };\n }\n static {\n this.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"percent\",\n type: PercentPipe,\n pure: true,\n standalone: true\n });\n }\n}\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(PercentPipe, [{\n type: Pipe,\n args: [{\n name: 'percent',\n standalone: true\n }]\n }], () => [{\n type: undefined,\n decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }]\n }], null);\n})();\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms a number to a currency string, formatted according to locale rules\n * that determine group sizing and separator, decimal-point character,\n * and other locale-specific configurations.\n *\n *\n * @see {@link getCurrencySymbol}\n * @see {@link formatCurrency}\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}
.\n * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n * Default is `1`.\n * - `minFractionDigits`: The minimum number of digits after the decimal point.\n * Default is `2`.\n * - `maxFractionDigits`: The maximum number of digits after the decimal point.\n * Default is `2`.\n * If not provided, the number will be formatted with the proper amount of digits,\n * depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies.\n * For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none.\n * @param locale A locale code for the locale format rules to use.\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n * See [Setting your app locale](guide/i18n-common-locale-id).\n */\n transform(value, currencyCode = this._defaultCurrencyCode, display = 'symbol', digitsInfo, locale) {\n if (!isValue(value)) return null;\n locale = locale || this._locale;\n if (typeof display === 'boolean') {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && console && console.warn) {\n console.warn(`Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are \"code\", \"symbol\" or \"symbol-narrow\".`);\n }\n display = display ? 'symbol' : 'code';\n }\n let currency = currencyCode || this._defaultCurrencyCode;\n if (display !== 'code') {\n if (display === 'symbol' || display === 'symbol-narrow') {\n currency = getCurrencySymbol(currency, display === 'symbol' ? 'wide' : 'narrow', locale);\n } else {\n currency = display;\n }\n }\n try {\n const num = strToNumber(value);\n return formatCurrency(num, locale, currency, currencyCode, digitsInfo);\n } catch (error) {\n throw invalidPipeArgumentError(CurrencyPipe, error.message);\n }\n }\n static {\n this.ɵfac = function CurrencyPipe_Factory(t) {\n return new (t || CurrencyPipe)(i0.ɵɵdirectiveInject(LOCALE_ID, 16), i0.ɵɵdirectiveInject(DEFAULT_CURRENCY_CODE, 16));\n };\n }\n static {\n this.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"currency\",\n type: CurrencyPipe,\n pure: true,\n standalone: true\n });\n }\n}\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(CurrencyPipe, [{\n type: Pipe,\n args: [{\n name: 'currency',\n standalone: true\n }]\n }], () => [{\n type: undefined,\n decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }]\n }, {\n type: undefined,\n decorators: [{\n type: Inject,\n args: [DEFAULT_CURRENCY_CODE]\n }]\n }], null);\n})();\nfunction isValue(value) {\n return !(value == null || value === '' || value !== value);\n}\n/**\n * Transforms a string into a number (if needed).\n */\nfunction strToNumber(value) {\n // Convert strings to numbers\n if (typeof value === 'string' && !isNaN(Number(value) - parseFloat(value))) {\n return Number(value);\n }\n if (typeof value !== 'number') {\n throw new Error(`${value} is not a number`);\n }\n return value;\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Creates a new `Array` or `String` containing a subset (slice) of the elements.\n *\n * @usageNotes\n *\n * All behavior is based on the expected behavior of the JavaScript API `Array.prototype.slice()`\n * and `String.prototype.slice()`.\n *\n * When operating on an `Array`, the returned `Array` is always a copy even when all\n * the elements are being returned.\n *\n * When operating on a blank value, the pipe returns the blank value.\n *\n * ### List Example\n *\n * This `ngFor` example:\n *\n * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_list'}\n *\n * produces the following:\n *\n * ```html\n *