@angular/common 14.2.11 → 14.3.0

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.
Files changed (66) hide show
  1. package/esm2020/http/src/client.mjs +3 -3
  2. package/esm2020/http/src/interceptor.mjs +3 -3
  3. package/esm2020/http/src/jsonp.mjs +6 -6
  4. package/esm2020/http/src/module.mjs +15 -15
  5. package/esm2020/http/src/xhr.mjs +3 -3
  6. package/esm2020/http/src/xsrf.mjs +6 -6
  7. package/esm2020/http/testing/src/backend.mjs +3 -3
  8. package/esm2020/http/testing/src/module.mjs +4 -4
  9. package/esm2020/src/common_module.mjs +4 -4
  10. package/esm2020/src/directives/ng_class.mjs +3 -3
  11. package/esm2020/src/directives/ng_component_outlet.mjs +3 -3
  12. package/esm2020/src/directives/ng_for_of.mjs +3 -3
  13. package/esm2020/src/directives/ng_if.mjs +3 -3
  14. package/esm2020/src/directives/ng_optimized_image/image_loaders/cloudflare_loader.mjs +1 -6
  15. package/esm2020/src/directives/ng_optimized_image/image_loaders/cloudinary_loader.mjs +15 -6
  16. package/esm2020/src/directives/ng_optimized_image/image_loaders/image_loader.mjs +3 -8
  17. package/esm2020/src/directives/ng_optimized_image/image_loaders/imagekit_loader.mjs +15 -6
  18. package/esm2020/src/directives/ng_optimized_image/image_loaders/imgix_loader.mjs +15 -6
  19. package/esm2020/src/directives/ng_optimized_image/index.mjs +2 -2
  20. package/esm2020/src/directives/ng_optimized_image/lcp_image_observer.mjs +3 -3
  21. package/esm2020/src/directives/ng_optimized_image/ng_optimized_image.mjs +307 -53
  22. package/esm2020/src/directives/ng_optimized_image/preconnect_link_checker.mjs +10 -12
  23. package/esm2020/src/directives/ng_optimized_image/preload-link-creator.mjs +75 -0
  24. package/esm2020/src/directives/ng_optimized_image/tokens.mjs +24 -0
  25. package/esm2020/src/directives/ng_plural.mjs +6 -6
  26. package/esm2020/src/directives/ng_style.mjs +3 -3
  27. package/esm2020/src/directives/ng_switch.mjs +9 -9
  28. package/esm2020/src/directives/ng_template_outlet.mjs +3 -3
  29. package/esm2020/src/errors.mjs +1 -1
  30. package/esm2020/src/i18n/localization.mjs +6 -6
  31. package/esm2020/src/location/hash_location_strategy.mjs +3 -3
  32. package/esm2020/src/location/location.mjs +3 -3
  33. package/esm2020/src/location/location_strategy.mjs +6 -6
  34. package/esm2020/src/location/platform_location.mjs +6 -6
  35. package/esm2020/src/pipes/async_pipe.mjs +3 -3
  36. package/esm2020/src/pipes/case_conversion_pipes.mjs +9 -9
  37. package/esm2020/src/pipes/date_pipe.mjs +3 -3
  38. package/esm2020/src/pipes/i18n_plural_pipe.mjs +3 -3
  39. package/esm2020/src/pipes/i18n_select_pipe.mjs +3 -3
  40. package/esm2020/src/pipes/json_pipe.mjs +3 -3
  41. package/esm2020/src/pipes/keyvalue_pipe.mjs +3 -3
  42. package/esm2020/src/pipes/number_pipe.mjs +9 -9
  43. package/esm2020/src/pipes/slice_pipe.mjs +3 -3
  44. package/esm2020/src/version.mjs +1 -1
  45. package/esm2020/testing/src/location_mock.mjs +3 -3
  46. package/esm2020/testing/src/mock_location_strategy.mjs +3 -3
  47. package/esm2020/testing/src/mock_platform_location.mjs +3 -3
  48. package/esm2020/upgrade/src/location_upgrade_module.mjs +4 -4
  49. package/fesm2015/common.mjs +707 -347
  50. package/fesm2015/common.mjs.map +1 -1
  51. package/fesm2015/http/testing.mjs +8 -8
  52. package/fesm2015/http.mjs +37 -37
  53. package/fesm2015/testing.mjs +10 -10
  54. package/fesm2015/upgrade.mjs +5 -5
  55. package/fesm2020/common.mjs +705 -346
  56. package/fesm2020/common.mjs.map +1 -1
  57. package/fesm2020/http/testing.mjs +8 -8
  58. package/fesm2020/http.mjs +37 -37
  59. package/fesm2020/testing.mjs +10 -10
  60. package/fesm2020/upgrade.mjs +5 -5
  61. package/http/index.d.ts +1 -1
  62. package/http/testing/index.d.ts +1 -1
  63. package/index.d.ts +58 -55
  64. package/package.json +2 -2
  65. package/testing/index.d.ts +1 -1
  66. package/upgrade/index.d.ts +1 -1
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license Angular v14.2.11
2
+ * @license Angular v14.3.0
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
7
  import * as i0 from '@angular/core';
8
- import { InjectionToken, Injectable, ɵɵinject, Inject, inject, Optional, EventEmitter, ɵfindLocaleData, ɵLocaleDataIndex, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, LOCALE_ID, ɵregisterLocaleData, ɵisListLikeIterable, ɵstringify, Directive, Input, createNgModule, NgModuleRef, ɵRuntimeError, Host, Attribute, RendererStyleFlags2, ɵisPromise, ɵisSubscribable, Pipe, DEFAULT_CURRENCY_CODE, NgModule, Version, ɵɵdefineInjectable, ɵformatRuntimeError, Renderer2, ElementRef, Injector, NgZone } from '@angular/core';
8
+ import { InjectionToken, Injectable, ɵɵinject, Inject, inject, Optional, EventEmitter, ɵfindLocaleData, ɵLocaleDataIndex, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, LOCALE_ID, ɵregisterLocaleData, ɵisListLikeIterable, ɵstringify, Directive, Input, createNgModule, NgModuleRef, ɵRuntimeError, Host, Attribute, RendererStyleFlags2, ɵisPromise, ɵisSubscribable, Pipe, DEFAULT_CURRENCY_CODE, NgModule, Version, ɵɵdefineInjectable, ɵformatRuntimeError, Renderer2, ElementRef, Injector, PLATFORM_ID, NgZone } from '@angular/core';
9
9
 
10
10
  /**
11
11
  * @license
@@ -87,9 +87,9 @@ class PlatformLocation {
87
87
  throw new Error('Not implemented');
88
88
  }
89
89
  }
90
- PlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: PlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
91
- PlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: PlatformLocation, providedIn: 'platform', useFactory: useBrowserPlatformLocation });
92
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: PlatformLocation, decorators: [{
90
+ PlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
91
+ PlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PlatformLocation, providedIn: 'platform', useFactory: useBrowserPlatformLocation });
92
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PlatformLocation, decorators: [{
93
93
  type: Injectable,
94
94
  args: [{
95
95
  providedIn: 'platform',
@@ -190,9 +190,9 @@ class BrowserPlatformLocation extends PlatformLocation {
190
190
  return this._history.state;
191
191
  }
192
192
  }
193
- BrowserPlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: BrowserPlatformLocation, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
194
- BrowserPlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: BrowserPlatformLocation, providedIn: 'platform', useFactory: createBrowserPlatformLocation });
195
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: BrowserPlatformLocation, decorators: [{
193
+ BrowserPlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BrowserPlatformLocation, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
194
+ BrowserPlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BrowserPlatformLocation, providedIn: 'platform', useFactory: createBrowserPlatformLocation });
195
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BrowserPlatformLocation, decorators: [{
196
196
  type: Injectable,
197
197
  args: [{
198
198
  providedIn: 'platform',
@@ -313,9 +313,9 @@ class LocationStrategy {
313
313
  throw new Error('Not implemented');
314
314
  }
315
315
  }
316
- LocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: LocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
317
- LocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: LocationStrategy, providedIn: 'root', useFactory: () => inject(PathLocationStrategy) });
318
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: LocationStrategy, decorators: [{
316
+ LocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
317
+ LocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LocationStrategy, providedIn: 'root', useFactory: () => inject(PathLocationStrategy) });
318
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LocationStrategy, decorators: [{
319
319
  type: Injectable,
320
320
  args: [{ providedIn: 'root', useFactory: () => inject(PathLocationStrategy) }]
321
321
  }] });
@@ -424,9 +424,9 @@ class PathLocationStrategy extends LocationStrategy {
424
424
  (_b = (_a = this._platformLocation).historyGo) === null || _b === void 0 ? void 0 : _b.call(_a, relativePosition);
425
425
  }
426
426
  }
427
- PathLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: PathLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
428
- PathLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: PathLocationStrategy, providedIn: 'root' });
429
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: PathLocationStrategy, decorators: [{
427
+ PathLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PathLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
428
+ PathLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PathLocationStrategy, providedIn: 'root' });
429
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PathLocationStrategy, decorators: [{
430
430
  type: Injectable,
431
431
  args: [{ providedIn: 'root' }]
432
432
  }], ctorParameters: function () {
@@ -525,9 +525,9 @@ class HashLocationStrategy extends LocationStrategy {
525
525
  (_b = (_a = this._platformLocation).historyGo) === null || _b === void 0 ? void 0 : _b.call(_a, relativePosition);
526
526
  }
527
527
  }
528
- HashLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: HashLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
529
- HashLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: HashLocationStrategy });
530
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: HashLocationStrategy, decorators: [{
528
+ HashLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HashLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
529
+ HashLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HashLocationStrategy });
530
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HashLocationStrategy, decorators: [{
531
531
  type: Injectable
532
532
  }], ctorParameters: function () {
533
533
  return [{ type: PlatformLocation }, { type: undefined, decorators: [{
@@ -783,9 +783,9 @@ Location.joinWithSlash = joinWithSlash;
783
783
  * @returns The URL string, modified if needed.
784
784
  */
785
785
  Location.stripTrailingSlash = stripTrailingSlash;
786
- Location.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: Location, deps: [{ token: LocationStrategy }], target: i0.ɵɵFactoryTarget.Injectable });
787
- Location.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: Location, providedIn: 'root', useFactory: createLocation });
788
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: Location, decorators: [{
786
+ Location.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: Location, deps: [{ token: LocationStrategy }], target: i0.ɵɵFactoryTarget.Injectable });
787
+ Location.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: Location, providedIn: 'root', useFactory: createLocation });
788
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: Location, decorators: [{
789
789
  type: Injectable,
790
790
  args: [{
791
791
  providedIn: 'root',
@@ -2601,9 +2601,9 @@ function parseIntAutoRadix(text) {
2601
2601
  */
2602
2602
  class NgLocalization {
2603
2603
  }
2604
- NgLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2605
- NgLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgLocalization, providedIn: 'root', useFactory: (locale) => new NgLocaleLocalization(locale), deps: [{ token: LOCALE_ID }] });
2606
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgLocalization, decorators: [{
2604
+ NgLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2605
+ NgLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgLocalization, providedIn: 'root', useFactory: (locale) => new NgLocaleLocalization(locale), deps: [{ token: LOCALE_ID }] });
2606
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgLocalization, decorators: [{
2607
2607
  type: Injectable,
2608
2608
  args: [{
2609
2609
  providedIn: 'root',
@@ -2658,9 +2658,9 @@ class NgLocaleLocalization extends NgLocalization {
2658
2658
  }
2659
2659
  }
2660
2660
  }
2661
- NgLocaleLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgLocaleLocalization, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });
2662
- NgLocaleLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgLocaleLocalization });
2663
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgLocaleLocalization, decorators: [{
2661
+ NgLocaleLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgLocaleLocalization, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });
2662
+ NgLocaleLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgLocaleLocalization });
2663
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgLocaleLocalization, decorators: [{
2664
2664
  type: Injectable
2665
2665
  }], ctorParameters: function () {
2666
2666
  return [{ type: undefined, decorators: [{
@@ -2855,9 +2855,9 @@ class NgClass {
2855
2855
  }
2856
2856
  }
2857
2857
  }
2858
- NgClass.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgClass, deps: [{ token: i0.IterableDiffers }, { token: i0.KeyValueDiffers }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
2859
- NgClass.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.11", type: NgClass, isStandalone: true, selector: "[ngClass]", inputs: { klass: ["class", "klass"], ngClass: "ngClass" }, ngImport: i0 });
2860
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgClass, decorators: [{
2858
+ NgClass.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgClass, deps: [{ token: i0.IterableDiffers }, { token: i0.KeyValueDiffers }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
2859
+ NgClass.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: NgClass, isStandalone: true, selector: "[ngClass]", inputs: { klass: ["class", "klass"], ngClass: "ngClass" }, ngImport: i0 });
2860
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgClass, decorators: [{
2861
2861
  type: Directive,
2862
2862
  args: [{
2863
2863
  selector: '[ngClass]',
@@ -2976,9 +2976,9 @@ class NgComponentOutlet {
2976
2976
  this._moduleRef.destroy();
2977
2977
  }
2978
2978
  }
2979
- NgComponentOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgComponentOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
2980
- NgComponentOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.11", type: NgComponentOutlet, isStandalone: true, selector: "[ngComponentOutlet]", inputs: { ngComponentOutlet: "ngComponentOutlet", ngComponentOutletInjector: "ngComponentOutletInjector", ngComponentOutletContent: "ngComponentOutletContent", ngComponentOutletNgModule: "ngComponentOutletNgModule", ngComponentOutletNgModuleFactory: "ngComponentOutletNgModuleFactory" }, usesOnChanges: true, ngImport: i0 });
2981
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgComponentOutlet, decorators: [{
2979
+ NgComponentOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgComponentOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
2980
+ NgComponentOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: NgComponentOutlet, isStandalone: true, selector: "[ngComponentOutlet]", inputs: { ngComponentOutlet: "ngComponentOutlet", ngComponentOutletInjector: "ngComponentOutletInjector", ngComponentOutletContent: "ngComponentOutletContent", ngComponentOutletNgModule: "ngComponentOutletNgModule", ngComponentOutletNgModuleFactory: "ngComponentOutletNgModuleFactory" }, usesOnChanges: true, ngImport: i0 });
2981
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgComponentOutlet, decorators: [{
2982
2982
  type: Directive,
2983
2983
  args: [{
2984
2984
  selector: '[ngComponentOutlet]',
@@ -3268,9 +3268,9 @@ class NgForOf {
3268
3268
  return true;
3269
3269
  }
3270
3270
  }
3271
- NgForOf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgForOf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });
3272
- NgForOf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.11", type: NgForOf, isStandalone: true, selector: "[ngFor][ngForOf]", inputs: { ngForOf: "ngForOf", ngForTrackBy: "ngForTrackBy", ngForTemplate: "ngForTemplate" }, ngImport: i0 });
3273
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgForOf, decorators: [{
3271
+ NgForOf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgForOf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });
3272
+ NgForOf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: NgForOf, isStandalone: true, selector: "[ngFor][ngForOf]", inputs: { ngForOf: "ngForOf", ngForTrackBy: "ngForTrackBy", ngForTemplate: "ngForTemplate" }, ngImport: i0 });
3273
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgForOf, decorators: [{
3274
3274
  type: Directive,
3275
3275
  args: [{
3276
3276
  selector: '[ngFor][ngForOf]',
@@ -3503,9 +3503,9 @@ class NgIf {
3503
3503
  return true;
3504
3504
  }
3505
3505
  }
3506
- NgIf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgIf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
3507
- NgIf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.11", type: NgIf, isStandalone: true, selector: "[ngIf]", inputs: { ngIf: "ngIf", ngIfThen: "ngIfThen", ngIfElse: "ngIfElse" }, ngImport: i0 });
3508
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgIf, decorators: [{
3506
+ NgIf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgIf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
3507
+ NgIf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: NgIf, isStandalone: true, selector: "[ngIf]", inputs: { ngIf: "ngIf", ngIfThen: "ngIfThen", ngIfElse: "ngIfElse" }, ngImport: i0 });
3508
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgIf, decorators: [{
3509
3509
  type: Directive,
3510
3510
  args: [{
3511
3511
  selector: '[ngIf]',
@@ -3676,9 +3676,9 @@ class NgSwitch {
3676
3676
  }
3677
3677
  }
3678
3678
  }
3679
- NgSwitch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3680
- NgSwitch.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.11", type: NgSwitch, isStandalone: true, selector: "[ngSwitch]", inputs: { ngSwitch: "ngSwitch" }, ngImport: i0 });
3681
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgSwitch, decorators: [{
3679
+ NgSwitch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3680
+ NgSwitch.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: NgSwitch, isStandalone: true, selector: "[ngSwitch]", inputs: { ngSwitch: "ngSwitch" }, ngImport: i0 });
3681
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgSwitch, decorators: [{
3682
3682
  type: Directive,
3683
3683
  args: [{
3684
3684
  selector: '[ngSwitch]',
@@ -3737,9 +3737,9 @@ class NgSwitchCase {
3737
3737
  this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase));
3738
3738
  }
3739
3739
  }
3740
- NgSwitchCase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgSwitchCase, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3741
- NgSwitchCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.11", type: NgSwitchCase, isStandalone: true, selector: "[ngSwitchCase]", inputs: { ngSwitchCase: "ngSwitchCase" }, ngImport: i0 });
3742
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgSwitchCase, decorators: [{
3740
+ NgSwitchCase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgSwitchCase, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3741
+ NgSwitchCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: NgSwitchCase, isStandalone: true, selector: "[ngSwitchCase]", inputs: { ngSwitchCase: "ngSwitchCase" }, ngImport: i0 });
3742
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgSwitchCase, decorators: [{
3743
3743
  type: Directive,
3744
3744
  args: [{
3745
3745
  selector: '[ngSwitchCase]',
@@ -3776,9 +3776,9 @@ class NgSwitchDefault {
3776
3776
  ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));
3777
3777
  }
3778
3778
  }
3779
- NgSwitchDefault.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgSwitchDefault, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3780
- NgSwitchDefault.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.11", type: NgSwitchDefault, isStandalone: true, selector: "[ngSwitchDefault]", ngImport: i0 });
3781
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgSwitchDefault, decorators: [{
3779
+ NgSwitchDefault.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgSwitchDefault, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3780
+ NgSwitchDefault.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: NgSwitchDefault, isStandalone: true, selector: "[ngSwitchDefault]", ngImport: i0 });
3781
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgSwitchDefault, decorators: [{
3782
3782
  type: Directive,
3783
3783
  args: [{
3784
3784
  selector: '[ngSwitchDefault]',
@@ -3864,9 +3864,9 @@ class NgPlural {
3864
3864
  }
3865
3865
  }
3866
3866
  }
3867
- NgPlural.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgPlural, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Directive });
3868
- NgPlural.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.11", type: NgPlural, isStandalone: true, selector: "[ngPlural]", inputs: { ngPlural: "ngPlural" }, ngImport: i0 });
3869
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgPlural, decorators: [{
3867
+ NgPlural.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgPlural, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Directive });
3868
+ NgPlural.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: NgPlural, isStandalone: true, selector: "[ngPlural]", inputs: { ngPlural: "ngPlural" }, ngImport: i0 });
3869
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgPlural, decorators: [{
3870
3870
  type: Directive,
3871
3871
  args: [{
3872
3872
  selector: '[ngPlural]',
@@ -3902,9 +3902,9 @@ class NgPluralCase {
3902
3902
  ngPlural.addCase(isANumber ? `=${value}` : value, new SwitchView(viewContainer, template));
3903
3903
  }
3904
3904
  }
3905
- NgPluralCase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgPluralCase, deps: [{ token: 'ngPluralCase', attribute: true }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: NgPlural, host: true }], target: i0.ɵɵFactoryTarget.Directive });
3906
- NgPluralCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.11", type: NgPluralCase, isStandalone: true, selector: "[ngPluralCase]", ngImport: i0 });
3907
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgPluralCase, decorators: [{
3905
+ NgPluralCase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgPluralCase, deps: [{ token: 'ngPluralCase', attribute: true }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: NgPlural, host: true }], target: i0.ɵɵFactoryTarget.Directive });
3906
+ NgPluralCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: NgPluralCase, isStandalone: true, selector: "[ngPluralCase]", ngImport: i0 });
3907
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgPluralCase, decorators: [{
3908
3908
  type: Directive,
3909
3909
  args: [{
3910
3910
  selector: '[ngPluralCase]',
@@ -4000,9 +4000,9 @@ class NgStyle {
4000
4000
  changes.forEachChangedItem((record) => this._setStyle(record.key, record.currentValue));
4001
4001
  }
4002
4002
  }
4003
- NgStyle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgStyle, deps: [{ token: i0.ElementRef }, { token: i0.KeyValueDiffers }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
4004
- NgStyle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.11", type: NgStyle, isStandalone: true, selector: "[ngStyle]", inputs: { ngStyle: "ngStyle" }, ngImport: i0 });
4005
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgStyle, decorators: [{
4003
+ NgStyle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgStyle, deps: [{ token: i0.ElementRef }, { token: i0.KeyValueDiffers }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
4004
+ NgStyle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: NgStyle, isStandalone: true, selector: "[ngStyle]", inputs: { ngStyle: "ngStyle" }, ngImport: i0 });
4005
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgStyle, decorators: [{
4006
4006
  type: Directive,
4007
4007
  args: [{
4008
4008
  selector: '[ngStyle]',
@@ -4082,9 +4082,9 @@ class NgTemplateOutlet {
4082
4082
  }
4083
4083
  }
4084
4084
  }
4085
- NgTemplateOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgTemplateOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
4086
- NgTemplateOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.11", type: NgTemplateOutlet, isStandalone: true, selector: "[ngTemplateOutlet]", inputs: { ngTemplateOutletContext: "ngTemplateOutletContext", ngTemplateOutlet: "ngTemplateOutlet", ngTemplateOutletInjector: "ngTemplateOutletInjector" }, usesOnChanges: true, ngImport: i0 });
4087
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgTemplateOutlet, decorators: [{
4085
+ NgTemplateOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgTemplateOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
4086
+ NgTemplateOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: NgTemplateOutlet, isStandalone: true, selector: "[ngTemplateOutlet]", inputs: { ngTemplateOutletContext: "ngTemplateOutletContext", ngTemplateOutlet: "ngTemplateOutlet", ngTemplateOutletInjector: "ngTemplateOutletInjector" }, usesOnChanges: true, ngImport: i0 });
4087
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgTemplateOutlet, decorators: [{
4088
4088
  type: Directive,
4089
4089
  args: [{
4090
4090
  selector: '[ngTemplateOutlet]',
@@ -4256,9 +4256,9 @@ class AsyncPipe {
4256
4256
  }
4257
4257
  }
4258
4258
  }
4259
- AsyncPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: AsyncPipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe });
4260
- AsyncPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.11", ngImport: i0, type: AsyncPipe, isStandalone: true, name: "async", pure: false });
4261
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: AsyncPipe, decorators: [{
4259
+ AsyncPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AsyncPipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe });
4260
+ AsyncPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: AsyncPipe, isStandalone: true, name: "async", pure: false });
4261
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AsyncPipe, decorators: [{
4262
4262
  type: Pipe,
4263
4263
  args: [{
4264
4264
  name: 'async',
@@ -4299,9 +4299,9 @@ class LowerCasePipe {
4299
4299
  return value.toLowerCase();
4300
4300
  }
4301
4301
  }
4302
- LowerCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: LowerCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4303
- LowerCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.11", ngImport: i0, type: LowerCasePipe, isStandalone: true, name: "lowercase" });
4304
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: LowerCasePipe, decorators: [{
4302
+ LowerCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LowerCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4303
+ LowerCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: LowerCasePipe, isStandalone: true, name: "lowercase" });
4304
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LowerCasePipe, decorators: [{
4305
4305
  type: Pipe,
4306
4306
  args: [{
4307
4307
  name: 'lowercase',
@@ -4344,9 +4344,9 @@ class TitleCasePipe {
4344
4344
  return value.replace(unicodeWordMatch, (txt => txt[0].toUpperCase() + txt.slice(1).toLowerCase()));
4345
4345
  }
4346
4346
  }
4347
- TitleCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4348
- TitleCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.11", ngImport: i0, type: TitleCasePipe, isStandalone: true, name: "titlecase" });
4349
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: TitleCasePipe, decorators: [{
4347
+ TitleCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4348
+ TitleCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: TitleCasePipe, isStandalone: true, name: "titlecase" });
4349
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TitleCasePipe, decorators: [{
4350
4350
  type: Pipe,
4351
4351
  args: [{
4352
4352
  name: 'titlecase',
@@ -4371,9 +4371,9 @@ class UpperCasePipe {
4371
4371
  return value.toUpperCase();
4372
4372
  }
4373
4373
  }
4374
- UpperCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: UpperCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4375
- UpperCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.11", ngImport: i0, type: UpperCasePipe, isStandalone: true, name: "uppercase" });
4376
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: UpperCasePipe, decorators: [{
4374
+ UpperCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UpperCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4375
+ UpperCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: UpperCasePipe, isStandalone: true, name: "uppercase" });
4376
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: UpperCasePipe, decorators: [{
4377
4377
  type: Pipe,
4378
4378
  args: [{
4379
4379
  name: 'uppercase',
@@ -4569,9 +4569,9 @@ class DatePipe {
4569
4569
  }
4570
4570
  }
4571
4571
  }
4572
- DatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: DatePipe, deps: [{ token: LOCALE_ID }, { token: DATE_PIPE_DEFAULT_TIMEZONE, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
4573
- DatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.11", ngImport: i0, type: DatePipe, isStandalone: true, name: "date" });
4574
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: DatePipe, decorators: [{
4572
+ DatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DatePipe, deps: [{ token: LOCALE_ID }, { token: DATE_PIPE_DEFAULT_TIMEZONE, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
4573
+ DatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: DatePipe, isStandalone: true, name: "date" });
4574
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DatePipe, decorators: [{
4575
4575
  type: Pipe,
4576
4576
  args: [{
4577
4577
  name: 'date',
@@ -4633,9 +4633,9 @@ class I18nPluralPipe {
4633
4633
  return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());
4634
4634
  }
4635
4635
  }
4636
- I18nPluralPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: I18nPluralPipe, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Pipe });
4637
- I18nPluralPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.11", ngImport: i0, type: I18nPluralPipe, isStandalone: true, name: "i18nPlural" });
4638
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: I18nPluralPipe, decorators: [{
4636
+ I18nPluralPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: I18nPluralPipe, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Pipe });
4637
+ I18nPluralPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: I18nPluralPipe, isStandalone: true, name: "i18nPlural" });
4638
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: I18nPluralPipe, decorators: [{
4639
4639
  type: Pipe,
4640
4640
  args: [{
4641
4641
  name: 'i18nPlural',
@@ -4689,9 +4689,9 @@ class I18nSelectPipe {
4689
4689
  return '';
4690
4690
  }
4691
4691
  }
4692
- I18nSelectPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: I18nSelectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4693
- I18nSelectPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.11", ngImport: i0, type: I18nSelectPipe, isStandalone: true, name: "i18nSelect" });
4694
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: I18nSelectPipe, decorators: [{
4692
+ I18nSelectPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: I18nSelectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4693
+ I18nSelectPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: I18nSelectPipe, isStandalone: true, name: "i18nSelect" });
4694
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: I18nSelectPipe, decorators: [{
4695
4695
  type: Pipe,
4696
4696
  args: [{
4697
4697
  name: 'i18nSelect',
@@ -4730,9 +4730,9 @@ class JsonPipe {
4730
4730
  return JSON.stringify(value, null, 2);
4731
4731
  }
4732
4732
  }
4733
- JsonPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: JsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4734
- JsonPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.11", ngImport: i0, type: JsonPipe, isStandalone: true, name: "json", pure: false });
4735
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: JsonPipe, decorators: [{
4733
+ JsonPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: JsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4734
+ JsonPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: JsonPipe, isStandalone: true, name: "json", pure: false });
4735
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: JsonPipe, decorators: [{
4736
4736
  type: Pipe,
4737
4737
  args: [{
4738
4738
  name: 'json',
@@ -4800,9 +4800,9 @@ class KeyValuePipe {
4800
4800
  return this.keyValues;
4801
4801
  }
4802
4802
  }
4803
- KeyValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: KeyValuePipe, deps: [{ token: i0.KeyValueDiffers }], target: i0.ɵɵFactoryTarget.Pipe });
4804
- KeyValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.11", ngImport: i0, type: KeyValuePipe, isStandalone: true, name: "keyvalue", pure: false });
4805
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: KeyValuePipe, decorators: [{
4803
+ KeyValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KeyValuePipe, deps: [{ token: i0.KeyValueDiffers }], target: i0.ɵɵFactoryTarget.Pipe });
4804
+ KeyValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: KeyValuePipe, isStandalone: true, name: "keyvalue", pure: false });
4805
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KeyValuePipe, decorators: [{
4806
4806
  type: Pipe,
4807
4807
  args: [{
4808
4808
  name: 'keyvalue',
@@ -4935,9 +4935,9 @@ class DecimalPipe {
4935
4935
  }
4936
4936
  }
4937
4937
  }
4938
- DecimalPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: DecimalPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
4939
- DecimalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.11", ngImport: i0, type: DecimalPipe, isStandalone: true, name: "number" });
4940
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: DecimalPipe, decorators: [{
4938
+ DecimalPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DecimalPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
4939
+ DecimalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: DecimalPipe, isStandalone: true, name: "number" });
4940
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DecimalPipe, decorators: [{
4941
4941
  type: Pipe,
4942
4942
  args: [{
4943
4943
  name: 'number',
@@ -5002,9 +5002,9 @@ class PercentPipe {
5002
5002
  }
5003
5003
  }
5004
5004
  }
5005
- PercentPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: PercentPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
5006
- PercentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.11", ngImport: i0, type: PercentPipe, isStandalone: true, name: "percent" });
5007
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: PercentPipe, decorators: [{
5005
+ PercentPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PercentPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
5006
+ PercentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: PercentPipe, isStandalone: true, name: "percent" });
5007
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PercentPipe, decorators: [{
5008
5008
  type: Pipe,
5009
5009
  args: [{
5010
5010
  name: 'percent',
@@ -5122,9 +5122,9 @@ class CurrencyPipe {
5122
5122
  }
5123
5123
  }
5124
5124
  }
5125
- CurrencyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: CurrencyPipe, deps: [{ token: LOCALE_ID }, { token: DEFAULT_CURRENCY_CODE }], target: i0.ɵɵFactoryTarget.Pipe });
5126
- CurrencyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.11", ngImport: i0, type: CurrencyPipe, isStandalone: true, name: "currency" });
5127
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: CurrencyPipe, decorators: [{
5125
+ CurrencyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CurrencyPipe, deps: [{ token: LOCALE_ID }, { token: DEFAULT_CURRENCY_CODE }], target: i0.ɵɵFactoryTarget.Pipe });
5126
+ CurrencyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: CurrencyPipe, isStandalone: true, name: "currency" });
5127
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CurrencyPipe, decorators: [{
5128
5128
  type: Pipe,
5129
5129
  args: [{
5130
5130
  name: 'currency',
@@ -5211,9 +5211,9 @@ class SlicePipe {
5211
5211
  return typeof obj === 'string' || Array.isArray(obj);
5212
5212
  }
5213
5213
  }
5214
- SlicePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SlicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5215
- SlicePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.11", ngImport: i0, type: SlicePipe, isStandalone: true, name: "slice", pure: false });
5216
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SlicePipe, decorators: [{
5214
+ SlicePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SlicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5215
+ SlicePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: SlicePipe, isStandalone: true, name: "slice", pure: false });
5216
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SlicePipe, decorators: [{
5217
5217
  type: Pipe,
5218
5218
  args: [{
5219
5219
  name: 'slice',
@@ -5267,10 +5267,10 @@ const COMMON_PIPES = [
5267
5267
  */
5268
5268
  class CommonModule {
5269
5269
  }
5270
- CommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: CommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5271
- CommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.11", ngImport: i0, type: CommonModule, imports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe], exports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe] });
5272
- CommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: CommonModule });
5273
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: CommonModule, decorators: [{
5270
+ CommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5271
+ CommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: CommonModule, imports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe], exports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe] });
5272
+ CommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CommonModule });
5273
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CommonModule, decorators: [{
5274
5274
  type: NgModule,
5275
5275
  args: [{
5276
5276
  imports: [COMMON_DIRECTIVES, COMMON_PIPES],
@@ -5328,7 +5328,7 @@ function isPlatformWorkerUi(platformId) {
5328
5328
  /**
5329
5329
  * @publicApi
5330
5330
  */
5331
- const VERSION = new Version('14.2.11');
5331
+ const VERSION = new Version('14.3.0');
5332
5332
 
5333
5333
  /**
5334
5334
  * @license
@@ -5553,38 +5553,6 @@ class NullViewportScroller {
5553
5553
  class XhrFactory {
5554
5554
  }
5555
5555
 
5556
- /**
5557
- * @license
5558
- * Copyright Google LLC All Rights Reserved.
5559
- *
5560
- * Use of this source code is governed by an MIT-style license that can be
5561
- * found in the LICENSE file at https://angular.io/license
5562
- */
5563
- /**
5564
- * Asserts that the application is in development mode. Throws an error if the application is in
5565
- * production mode. This assert can be used to make sure that there is no dev-mode code invoked in
5566
- * the prod mode accidentally.
5567
- */
5568
- function assertDevMode(checkName) {
5569
- if (!ngDevMode) {
5570
- throw new ɵRuntimeError(2958 /* RuntimeErrorCode.UNEXPECTED_DEV_MODE_CHECK_IN_PROD_MODE */, `Unexpected invocation of the ${checkName} in the prod mode. ` +
5571
- `Please make sure that the prod mode is enabled for production builds.`);
5572
- }
5573
- }
5574
-
5575
- /**
5576
- * @license
5577
- * Copyright Google LLC All Rights Reserved.
5578
- *
5579
- * Use of this source code is governed by an MIT-style license that can be
5580
- * found in the LICENSE file at https://angular.io/license
5581
- */
5582
- // Assembles directive details string, useful for error messages.
5583
- function imgDirectiveDetails(ngSrc, includeNgSrc = true) {
5584
- const ngSrcInfo = includeNgSrc ? `(activated on an <img> element with the \`ngSrc="${ngSrc}"\`) ` : '';
5585
- return `The NgOptimizedImage directive ${ngSrcInfo}has detected that`;
5586
- }
5587
-
5588
5556
  /**
5589
5557
  * @license
5590
5558
  * Copyright Google LLC All Rights Reserved.
@@ -5627,139 +5595,6 @@ function normalizeSrc(src) {
5627
5595
  return src.startsWith('/') ? src.slice(1) : src;
5628
5596
  }
5629
5597
 
5630
- /**
5631
- * @license
5632
- * Copyright Google LLC All Rights Reserved.
5633
- *
5634
- * Use of this source code is governed by an MIT-style license that can be
5635
- * found in the LICENSE file at https://angular.io/license
5636
- */
5637
- // Set of origins that are always excluded from the preconnect checks.
5638
- const INTERNAL_PRECONNECT_CHECK_BLOCKLIST = new Set(['localhost', '127.0.0.1', '0.0.0.0']);
5639
- /**
5640
- * Multi-provider injection token to configure which origins should be excluded
5641
- * from the preconnect checks. It can either be a single string or an array of strings
5642
- * to represent a group of origins, for example:
5643
- *
5644
- * ```typescript
5645
- * {provide: PRECONNECT_CHECK_BLOCKLIST, multi: true, useValue: 'https://your-domain.com'}
5646
- * ```
5647
- *
5648
- * or:
5649
- *
5650
- * ```typescript
5651
- * {provide: PRECONNECT_CHECK_BLOCKLIST, multi: true,
5652
- * useValue: ['https://your-domain-1.com', 'https://your-domain-2.com']}
5653
- * ```
5654
- *
5655
- * @publicApi
5656
- * @developerPreview
5657
- */
5658
- const PRECONNECT_CHECK_BLOCKLIST = new InjectionToken('PRECONNECT_CHECK_BLOCKLIST');
5659
- /**
5660
- * Contains the logic to detect whether an image, marked with the "priority" attribute
5661
- * has a corresponding `<link rel="preconnect">` tag in the `document.head`.
5662
- *
5663
- * Note: this is a dev-mode only class, which should not appear in prod bundles,
5664
- * thus there is no `ngDevMode` use in the code.
5665
- */
5666
- class PreconnectLinkChecker {
5667
- constructor() {
5668
- this.document = inject(DOCUMENT);
5669
- /**
5670
- * Set of <link rel="preconnect"> tags found on this page.
5671
- * The `null` value indicates that there was no DOM query operation performed.
5672
- */
5673
- this.preconnectLinks = null;
5674
- /*
5675
- * Keep track of all already seen origin URLs to avoid repeating the same check.
5676
- */
5677
- this.alreadySeen = new Set();
5678
- this.window = null;
5679
- this.blocklist = new Set(INTERNAL_PRECONNECT_CHECK_BLOCKLIST);
5680
- assertDevMode('preconnect link checker');
5681
- const win = this.document.defaultView;
5682
- if (typeof win !== 'undefined') {
5683
- this.window = win;
5684
- }
5685
- const blocklist = inject(PRECONNECT_CHECK_BLOCKLIST, { optional: true });
5686
- if (blocklist) {
5687
- this.populateBlocklist(blocklist);
5688
- }
5689
- }
5690
- populateBlocklist(origins) {
5691
- if (Array.isArray(origins)) {
5692
- deepForEach(origins, origin => {
5693
- this.blocklist.add(extractHostname(origin));
5694
- });
5695
- }
5696
- else {
5697
- throw new ɵRuntimeError(2957 /* RuntimeErrorCode.INVALID_PRECONNECT_CHECK_BLOCKLIST */, `The blocklist for the preconnect check was not provided as an array. ` +
5698
- `Check that the \`PRECONNECT_CHECK_BLOCKLIST\` token is configured as a \`multi: true\` provider.`);
5699
- }
5700
- }
5701
- /**
5702
- * Checks that a preconnect resource hint exists in the head fo rthe
5703
- * given src.
5704
- *
5705
- * @param rewrittenSrc src formatted with loader
5706
- * @param originalNgSrc ngSrc value
5707
- */
5708
- assertPreconnect(rewrittenSrc, originalNgSrc) {
5709
- if (!this.window)
5710
- return;
5711
- const imgUrl = getUrl(rewrittenSrc, this.window);
5712
- if (this.blocklist.has(imgUrl.hostname) || this.alreadySeen.has(imgUrl.origin))
5713
- return;
5714
- // Register this origin as seen, so we don't check it again later.
5715
- this.alreadySeen.add(imgUrl.origin);
5716
- if (!this.preconnectLinks) {
5717
- // Note: we query for preconnect links only *once* and cache the results
5718
- // for the entire lifespan of an application, since it's unlikely that the
5719
- // list would change frequently. This allows to make sure there are no
5720
- // performance implications of making extra DOM lookups for each image.
5721
- this.preconnectLinks = this.queryPreconnectLinks();
5722
- }
5723
- if (!this.preconnectLinks.has(imgUrl.origin)) {
5724
- console.warn(ɵformatRuntimeError(2956 /* RuntimeErrorCode.PRIORITY_IMG_MISSING_PRECONNECT_TAG */, `${imgDirectiveDetails(originalNgSrc)} there is no preconnect tag present for this ` +
5725
- `image. Preconnecting to the origin(s) that serve priority images ensures that these ` +
5726
- `images are delivered as soon as possible. To fix this, please add the following ` +
5727
- `element into the <head> of the document:\n` +
5728
- ` <link rel="preconnect" href="${imgUrl.origin}">`));
5729
- }
5730
- }
5731
- queryPreconnectLinks() {
5732
- const preconnectUrls = new Set();
5733
- const selector = 'link[rel=preconnect]';
5734
- const links = Array.from(this.document.querySelectorAll(selector));
5735
- for (let link of links) {
5736
- const url = getUrl(link.href, this.window);
5737
- preconnectUrls.add(url.origin);
5738
- }
5739
- return preconnectUrls;
5740
- }
5741
- ngOnDestroy() {
5742
- var _a;
5743
- (_a = this.preconnectLinks) === null || _a === void 0 ? void 0 : _a.clear();
5744
- this.alreadySeen.clear();
5745
- }
5746
- }
5747
- PreconnectLinkChecker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5748
- PreconnectLinkChecker.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' });
5749
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: PreconnectLinkChecker, decorators: [{
5750
- type: Injectable,
5751
- args: [{ providedIn: 'root' }]
5752
- }], ctorParameters: function () { return []; } });
5753
- /**
5754
- * Invokes a callback for each element in the array. Also invokes a callback
5755
- * recursively for each nested array.
5756
- */
5757
- function deepForEach(input, fn) {
5758
- for (let value of input) {
5759
- Array.isArray(value) ? deepForEach(value, fn) : fn(value);
5760
- }
5761
- }
5762
-
5763
5598
  /**
5764
5599
  * @license
5765
5600
  * Copyright Google LLC All Rights Reserved.
@@ -5781,7 +5616,6 @@ const noopImageLoader = (config) => config.src;
5781
5616
  * @see `ImageLoader`
5782
5617
  * @see `NgOptimizedImage`
5783
5618
  * @publicApi
5784
- * @developerPreview
5785
5619
  */
5786
5620
  const IMAGE_LOADER = new InjectionToken('ImageLoader', {
5787
5621
  providedIn: 'root',
@@ -5797,7 +5631,7 @@ const IMAGE_LOADER = new InjectionToken('ImageLoader', {
5797
5631
  * @returns a set of DI providers corresponding to the configured image loader
5798
5632
  */
5799
5633
  function createImageLoader(buildUrlFn, exampleUrls) {
5800
- return function provideImageLoader(path, options = { ensurePreconnect: true }) {
5634
+ return function provideImageLoader(path) {
5801
5635
  if (!isValidPath(path)) {
5802
5636
  throwInvalidPathError(path, exampleUrls || []);
5803
5637
  }
@@ -5816,9 +5650,6 @@ function createImageLoader(buildUrlFn, exampleUrls) {
5816
5650
  return buildUrlFn(path, Object.assign(Object.assign({}, config), { src: normalizeSrc(config.src) }));
5817
5651
  };
5818
5652
  const providers = [{ provide: IMAGE_LOADER, useValue: loaderFn }];
5819
- if (ngDevMode && options.ensurePreconnect === false) {
5820
- providers.push({ provide: PRECONNECT_CHECK_BLOCKLIST, useValue: [path], multi: true });
5821
- }
5822
5653
  return providers;
5823
5654
  };
5824
5655
  }
@@ -5850,14 +5681,9 @@ function throwUnexpectedAbsoluteUrlError(path, url) {
5850
5681
  * Cloudflare Image Resizing; it will not work with Cloudflare Images or Cloudflare Polish.
5851
5682
  *
5852
5683
  * @param path Your domain name, e.g. https://mysite.com
5853
- * @param options An object with extra configuration:
5854
- * - `ensurePreconnect`: boolean flag indicating whether the NgOptimizedImage directive
5855
- * should verify that there is a corresponding `<link rel="preconnect">`
5856
- * present in the document's `<head>`.
5857
5684
  * @returns Provider that provides an ImageLoader function
5858
5685
  *
5859
5686
  * @publicApi
5860
- * @developerPreview
5861
5687
  */
5862
5688
  const provideCloudflareLoader = createImageLoader(createCloudflareUrl, ngDevMode ? ['https://<ZONE>/cdn-cgi/image/<OPTIONS>/<SOURCE-IMAGE>'] : undefined);
5863
5689
  function createCloudflareUrl(path, config) {
@@ -5877,6 +5703,20 @@ function createCloudflareUrl(path, config) {
5877
5703
  * Use of this source code is governed by an MIT-style license that can be
5878
5704
  * found in the LICENSE file at https://angular.io/license
5879
5705
  */
5706
+ /**
5707
+ * Name and URL tester for Cloudinary.
5708
+ */
5709
+ const cloudinaryLoaderInfo = {
5710
+ name: 'Cloudinary',
5711
+ testUrl: isCloudinaryUrl
5712
+ };
5713
+ const CLOUDINARY_LOADER_REGEX = /https?\:\/\/[^\/]+\.cloudinary\.com\/.+/;
5714
+ /**
5715
+ * Tests whether a URL is from Cloudinary CDN.
5716
+ */
5717
+ function isCloudinaryUrl(url) {
5718
+ return CLOUDINARY_LOADER_REGEX.test(url);
5719
+ }
5880
5720
  /**
5881
5721
  * Function that generates an ImageLoader for Cloudinary and turns it into an Angular provider.
5882
5722
  *
@@ -5885,14 +5725,9 @@ function createCloudflareUrl(path, config) {
5885
5725
  * https://res.cloudinary.com/mysite
5886
5726
  * https://mysite.cloudinary.com
5887
5727
  * https://subdomain.mysite.com
5888
- * @param options An object with extra configuration:
5889
- * - `ensurePreconnect`: boolean flag indicating whether the NgOptimizedImage directive
5890
- * should verify that there is a corresponding `<link rel="preconnect">`
5891
- * present in the document's `<head>`.
5892
5728
  * @returns Set of providers to configure the Cloudinary loader.
5893
5729
  *
5894
5730
  * @publicApi
5895
- * @developerPreview
5896
5731
  */
5897
5732
  const provideCloudinaryLoader = createImageLoader(createCloudinaryUrl, ngDevMode ?
5898
5733
  [
@@ -5919,6 +5754,20 @@ function createCloudinaryUrl(path, config) {
5919
5754
  * Use of this source code is governed by an MIT-style license that can be
5920
5755
  * found in the LICENSE file at https://angular.io/license
5921
5756
  */
5757
+ /**
5758
+ * Name and URL tester for ImageKit.
5759
+ */
5760
+ const imageKitLoaderInfo = {
5761
+ name: 'ImageKit',
5762
+ testUrl: isImageKitUrl
5763
+ };
5764
+ const IMAGE_KIT_LOADER_REGEX = /https?\:\/\/[^\/]+\.imagekit\.io\/.+/;
5765
+ /**
5766
+ * Tests whether a URL is from ImageKit CDN.
5767
+ */
5768
+ function isImageKitUrl(url) {
5769
+ return IMAGE_KIT_LOADER_REGEX.test(url);
5770
+ }
5922
5771
  /**
5923
5772
  * Function that generates an ImageLoader for ImageKit and turns it into an Angular provider.
5924
5773
  *
@@ -5926,14 +5775,9 @@ function createCloudinaryUrl(path, config) {
5926
5775
  * This URL should match one of the following formats:
5927
5776
  * https://ik.imagekit.io/myaccount
5928
5777
  * https://subdomain.mysite.com
5929
- * @param options An object with extra configuration:
5930
- * - `ensurePreconnect`: boolean flag indicating whether the NgOptimizedImage directive
5931
- * should verify that there is a corresponding `<link rel="preconnect">`
5932
- * present in the document's `<head>`.
5933
5778
  * @returns Set of providers to configure the ImageKit loader.
5934
5779
  *
5935
5780
  * @publicApi
5936
- * @developerPreview
5937
5781
  */
5938
5782
  const provideImageKitLoader = createImageLoader(createImagekitUrl, ngDevMode ? ['https://ik.imagekit.io/mysite', 'https://subdomain.mysite.com'] : undefined);
5939
5783
  function createImagekitUrl(path, config) {
@@ -5953,19 +5797,28 @@ function createImagekitUrl(path, config) {
5953
5797
  * Use of this source code is governed by an MIT-style license that can be
5954
5798
  * found in the LICENSE file at https://angular.io/license
5955
5799
  */
5800
+ /**
5801
+ * Name and URL tester for Imgix.
5802
+ */
5803
+ const imgixLoaderInfo = {
5804
+ name: 'Imgix',
5805
+ testUrl: isImgixUrl
5806
+ };
5807
+ const IMGIX_LOADER_REGEX = /https?\:\/\/[^\/]+\.imgix\.net\/.+/;
5808
+ /**
5809
+ * Tests whether a URL is from Imgix CDN.
5810
+ */
5811
+ function isImgixUrl(url) {
5812
+ return IMGIX_LOADER_REGEX.test(url);
5813
+ }
5956
5814
  /**
5957
5815
  * Function that generates an ImageLoader for Imgix and turns it into an Angular provider.
5958
5816
  *
5959
5817
  * @param path path to the desired Imgix origin,
5960
5818
  * e.g. https://somepath.imgix.net or https://images.mysite.com
5961
- * @param options An object with extra configuration:
5962
- * - `ensurePreconnect`: boolean flag indicating whether the NgOptimizedImage directive
5963
- * should verify that there is a corresponding `<link rel="preconnect">`
5964
- * present in the document's `<head>`.
5965
5819
  * @returns Set of providers to configure the Imgix loader.
5966
5820
  *
5967
5821
  * @publicApi
5968
- * @developerPreview
5969
5822
  */
5970
5823
  const provideImgixLoader = createImageLoader(createImgixUrl, ngDevMode ? ['https://somepath.imgix.net/'] : undefined);
5971
5824
  function createImgixUrl(path, config) {
@@ -5978,6 +5831,38 @@ function createImgixUrl(path, config) {
5978
5831
  return url.href;
5979
5832
  }
5980
5833
 
5834
+ /**
5835
+ * @license
5836
+ * Copyright Google LLC All Rights Reserved.
5837
+ *
5838
+ * Use of this source code is governed by an MIT-style license that can be
5839
+ * found in the LICENSE file at https://angular.io/license
5840
+ */
5841
+ // Assembles directive details string, useful for error messages.
5842
+ function imgDirectiveDetails(ngSrc, includeNgSrc = true) {
5843
+ const ngSrcInfo = includeNgSrc ? `(activated on an <img> element with the \`ngSrc="${ngSrc}"\`) ` : '';
5844
+ return `The NgOptimizedImage directive ${ngSrcInfo}has detected that`;
5845
+ }
5846
+
5847
+ /**
5848
+ * @license
5849
+ * Copyright Google LLC All Rights Reserved.
5850
+ *
5851
+ * Use of this source code is governed by an MIT-style license that can be
5852
+ * found in the LICENSE file at https://angular.io/license
5853
+ */
5854
+ /**
5855
+ * Asserts that the application is in development mode. Throws an error if the application is in
5856
+ * production mode. This assert can be used to make sure that there is no dev-mode code invoked in
5857
+ * the prod mode accidentally.
5858
+ */
5859
+ function assertDevMode(checkName) {
5860
+ if (!ngDevMode) {
5861
+ throw new ɵRuntimeError(2958 /* RuntimeErrorCode.UNEXPECTED_DEV_MODE_CHECK_IN_PROD_MODE */, `Unexpected invocation of the ${checkName} in the prod mode. ` +
5862
+ `Please make sure that the prod mode is enabled for production builds.`);
5863
+ }
5864
+ }
5865
+
5981
5866
  /**
5982
5867
  * @license
5983
5868
  * Copyright Google LLC All Rights Reserved.
@@ -6058,9 +5943,9 @@ class LCPImageObserver {
6058
5943
  this.alreadyWarned.clear();
6059
5944
  }
6060
5945
  }
6061
- LCPImageObserver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6062
- LCPImageObserver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: LCPImageObserver, providedIn: 'root' });
6063
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: LCPImageObserver, decorators: [{
5946
+ LCPImageObserver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5947
+ LCPImageObserver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LCPImageObserver, providedIn: 'root' });
5948
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LCPImageObserver, decorators: [{
6064
5949
  type: Injectable,
6065
5950
  args: [{ providedIn: 'root' }]
6066
5951
  }], ctorParameters: function () { return []; } });
@@ -6072,6 +5957,231 @@ function logMissingPriorityWarning(ngSrc) {
6072
5957
  `To fix this, add the "priority" attribute.`));
6073
5958
  }
6074
5959
 
5960
+ /**
5961
+ * @license
5962
+ * Copyright Google LLC All Rights Reserved.
5963
+ *
5964
+ * Use of this source code is governed by an MIT-style license that can be
5965
+ * found in the LICENSE file at https://angular.io/license
5966
+ */
5967
+ // Set of origins that are always excluded from the preconnect checks.
5968
+ const INTERNAL_PRECONNECT_CHECK_BLOCKLIST = new Set(['localhost', '127.0.0.1', '0.0.0.0']);
5969
+ /**
5970
+ * Injection token to configure which origins should be excluded
5971
+ * from the preconnect checks. It can either be a single string or an array of strings
5972
+ * to represent a group of origins, for example:
5973
+ *
5974
+ * ```typescript
5975
+ * {provide: PRECONNECT_CHECK_BLOCKLIST, useValue: 'https://your-domain.com'}
5976
+ * ```
5977
+ *
5978
+ * or:
5979
+ *
5980
+ * ```typescript
5981
+ * {provide: PRECONNECT_CHECK_BLOCKLIST,
5982
+ * useValue: ['https://your-domain-1.com', 'https://your-domain-2.com']}
5983
+ * ```
5984
+ *
5985
+ * @publicApi
5986
+ */
5987
+ const PRECONNECT_CHECK_BLOCKLIST = new InjectionToken('PRECONNECT_CHECK_BLOCKLIST');
5988
+ /**
5989
+ * Contains the logic to detect whether an image, marked with the "priority" attribute
5990
+ * has a corresponding `<link rel="preconnect">` tag in the `document.head`.
5991
+ *
5992
+ * Note: this is a dev-mode only class, which should not appear in prod bundles,
5993
+ * thus there is no `ngDevMode` use in the code.
5994
+ */
5995
+ class PreconnectLinkChecker {
5996
+ constructor() {
5997
+ this.document = inject(DOCUMENT);
5998
+ /**
5999
+ * Set of <link rel="preconnect"> tags found on this page.
6000
+ * The `null` value indicates that there was no DOM query operation performed.
6001
+ */
6002
+ this.preconnectLinks = null;
6003
+ /*
6004
+ * Keep track of all already seen origin URLs to avoid repeating the same check.
6005
+ */
6006
+ this.alreadySeen = new Set();
6007
+ this.window = null;
6008
+ this.blocklist = new Set(INTERNAL_PRECONNECT_CHECK_BLOCKLIST);
6009
+ assertDevMode('preconnect link checker');
6010
+ const win = this.document.defaultView;
6011
+ if (typeof win !== 'undefined') {
6012
+ this.window = win;
6013
+ }
6014
+ const blocklist = inject(PRECONNECT_CHECK_BLOCKLIST, { optional: true });
6015
+ if (blocklist) {
6016
+ this.populateBlocklist(blocklist);
6017
+ }
6018
+ }
6019
+ populateBlocklist(origins) {
6020
+ if (Array.isArray(origins)) {
6021
+ deepForEach(origins, origin => {
6022
+ this.blocklist.add(extractHostname(origin));
6023
+ });
6024
+ }
6025
+ else {
6026
+ this.blocklist.add(extractHostname(origins));
6027
+ }
6028
+ }
6029
+ /**
6030
+ * Checks that a preconnect resource hint exists in the head for the
6031
+ * given src.
6032
+ *
6033
+ * @param rewrittenSrc src formatted with loader
6034
+ * @param originalNgSrc ngSrc value
6035
+ */
6036
+ assertPreconnect(rewrittenSrc, originalNgSrc) {
6037
+ if (!this.window)
6038
+ return;
6039
+ const imgUrl = getUrl(rewrittenSrc, this.window);
6040
+ if (this.blocklist.has(imgUrl.hostname) || this.alreadySeen.has(imgUrl.origin))
6041
+ return;
6042
+ // Register this origin as seen, so we don't check it again later.
6043
+ this.alreadySeen.add(imgUrl.origin);
6044
+ if (!this.preconnectLinks) {
6045
+ // Note: we query for preconnect links only *once* and cache the results
6046
+ // for the entire lifespan of an application, since it's unlikely that the
6047
+ // list would change frequently. This allows to make sure there are no
6048
+ // performance implications of making extra DOM lookups for each image.
6049
+ this.preconnectLinks = this.queryPreconnectLinks();
6050
+ }
6051
+ if (!this.preconnectLinks.has(imgUrl.origin)) {
6052
+ console.warn(ɵformatRuntimeError(2956 /* RuntimeErrorCode.PRIORITY_IMG_MISSING_PRECONNECT_TAG */, `${imgDirectiveDetails(originalNgSrc)} there is no preconnect tag present for this ` +
6053
+ `image. Preconnecting to the origin(s) that serve priority images ensures that these ` +
6054
+ `images are delivered as soon as possible. To fix this, please add the following ` +
6055
+ `element into the <head> of the document:\n` +
6056
+ ` <link rel="preconnect" href="${imgUrl.origin}">`));
6057
+ }
6058
+ }
6059
+ queryPreconnectLinks() {
6060
+ const preconnectUrls = new Set();
6061
+ const selector = 'link[rel=preconnect]';
6062
+ const links = Array.from(this.document.querySelectorAll(selector));
6063
+ for (let link of links) {
6064
+ const url = getUrl(link.href, this.window);
6065
+ preconnectUrls.add(url.origin);
6066
+ }
6067
+ return preconnectUrls;
6068
+ }
6069
+ ngOnDestroy() {
6070
+ var _a;
6071
+ (_a = this.preconnectLinks) === null || _a === void 0 ? void 0 : _a.clear();
6072
+ this.alreadySeen.clear();
6073
+ }
6074
+ }
6075
+ PreconnectLinkChecker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6076
+ PreconnectLinkChecker.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' });
6077
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PreconnectLinkChecker, decorators: [{
6078
+ type: Injectable,
6079
+ args: [{ providedIn: 'root' }]
6080
+ }], ctorParameters: function () { return []; } });
6081
+ /**
6082
+ * Invokes a callback for each element in the array. Also invokes a callback
6083
+ * recursively for each nested array.
6084
+ */
6085
+ function deepForEach(input, fn) {
6086
+ for (let value of input) {
6087
+ Array.isArray(value) ? deepForEach(value, fn) : fn(value);
6088
+ }
6089
+ }
6090
+
6091
+ /**
6092
+ * @license
6093
+ * Copyright Google LLC All Rights Reserved.
6094
+ *
6095
+ * Use of this source code is governed by an MIT-style license that can be
6096
+ * found in the LICENSE file at https://angular.io/license
6097
+ */
6098
+ /**
6099
+ * In SSR scenarios, a preload `<link>` element is generated for priority images.
6100
+ * Having a large number of preload tags may negatively affect the performance,
6101
+ * so we warn developers (by throwing an error) if the number of preloaded images
6102
+ * is above a certain threshold. This const specifies this threshold.
6103
+ */
6104
+ const DEFAULT_PRELOADED_IMAGES_LIMIT = 5;
6105
+ /**
6106
+ * Helps to keep track of priority images that already have a corresponding
6107
+ * preload tag (to avoid generating multiple preload tags with the same URL).
6108
+ *
6109
+ * This Set tracks the original src passed into the `ngSrc` input not the src after it has been
6110
+ * run through the specified `IMAGE_LOADER`.
6111
+ */
6112
+ const PRELOADED_IMAGES = new InjectionToken('NG_OPTIMIZED_PRELOADED_IMAGES', { providedIn: 'root', factory: () => new Set() });
6113
+
6114
+ /**
6115
+ * @license
6116
+ * Copyright Google LLC All Rights Reserved.
6117
+ *
6118
+ * Use of this source code is governed by an MIT-style license that can be
6119
+ * found in the LICENSE file at https://angular.io/license
6120
+ */
6121
+ /**
6122
+ * @description Contains the logic needed to track and add preload link tags to the `<head>` tag. It
6123
+ * will also track what images have already had preload link tags added so as to not duplicate link
6124
+ * tags.
6125
+ *
6126
+ * In dev mode this service will validate that the number of preloaded images does not exceed the
6127
+ * configured default preloaded images limit: {@link DEFAULT_PRELOADED_IMAGES_LIMIT}.
6128
+ */
6129
+ class PreloadLinkCreator {
6130
+ constructor() {
6131
+ this.preloadedImages = inject(PRELOADED_IMAGES);
6132
+ this.document = inject(DOCUMENT);
6133
+ }
6134
+ /**
6135
+ * @description Add a preload `<link>` to the `<head>` of the `index.html` that is served from the
6136
+ * server while using Angular Universal and SSR to kick off image loads for high priority images.
6137
+ *
6138
+ * The `sizes` (passed in from the user) and `srcset` (parsed and formatted from `ngSrcset`)
6139
+ * properties used to set the corresponding attributes, `imagesizes` and `imagesrcset`
6140
+ * respectively, on the preload `<link>` tag so that the correctly sized image is preloaded from
6141
+ * the CDN.
6142
+ *
6143
+ * {@link https://web.dev/preload-responsive-images/#imagesrcset-and-imagesizes}
6144
+ *
6145
+ * @param renderer The `Renderer2` passed in from the directive
6146
+ * @param src The original src of the image that is set on the `ngSrc` input.
6147
+ * @param srcset The parsed and formatted srcset created from the `ngSrcset` input
6148
+ * @param sizes The value of the `sizes` attribute passed in to the `<img>` tag
6149
+ */
6150
+ createPreloadLinkTag(renderer, src, srcset, sizes) {
6151
+ if (ngDevMode) {
6152
+ if (this.preloadedImages.size >= DEFAULT_PRELOADED_IMAGES_LIMIT) {
6153
+ throw new ɵRuntimeError(2961 /* RuntimeErrorCode.TOO_MANY_PRELOADED_IMAGES */, ngDevMode &&
6154
+ `The \`NgOptimizedImage\` directive has detected that more than ` +
6155
+ `${DEFAULT_PRELOADED_IMAGES_LIMIT} images were marked as priority. ` +
6156
+ `This might negatively affect an overall performance of the page. ` +
6157
+ `To fix this, remove the "priority" attribute from images with less priority.`);
6158
+ }
6159
+ }
6160
+ if (this.preloadedImages.has(src)) {
6161
+ return;
6162
+ }
6163
+ this.preloadedImages.add(src);
6164
+ const preload = renderer.createElement('link');
6165
+ renderer.setAttribute(preload, 'as', 'image');
6166
+ renderer.setAttribute(preload, 'href', src);
6167
+ renderer.setAttribute(preload, 'rel', 'preload');
6168
+ renderer.setAttribute(preload, 'fetchpriority', 'high');
6169
+ if (sizes) {
6170
+ renderer.setAttribute(preload, 'imageSizes', sizes);
6171
+ }
6172
+ if (srcset) {
6173
+ renderer.setAttribute(preload, 'imageSrcset', srcset);
6174
+ }
6175
+ renderer.appendChild(this.document.head, preload);
6176
+ }
6177
+ }
6178
+ PreloadLinkCreator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PreloadLinkCreator, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6179
+ PreloadLinkCreator.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PreloadLinkCreator, providedIn: 'root' });
6180
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PreloadLinkCreator, decorators: [{
6181
+ type: Injectable,
6182
+ args: [{ providedIn: 'root' }]
6183
+ }] });
6184
+
6075
6185
  /**
6076
6186
  * @license
6077
6187
  * Copyright Google LLC All Rights Reserved.
@@ -6108,6 +6218,14 @@ const ABSOLUTE_SRCSET_DENSITY_CAP = 3;
6108
6218
  * only throw based on the slightly more conservative ABSOLUTE_SRCSET_DENSITY_CAP.
6109
6219
  */
6110
6220
  const RECOMMENDED_SRCSET_DENSITY_CAP = 2;
6221
+ /**
6222
+ * Used in generating automatic density-based srcsets
6223
+ */
6224
+ const DENSITY_SRCSET_MULTIPLIERS = [1, 2];
6225
+ /**
6226
+ * Used to determine which breakpoints to use on full-width images
6227
+ */
6228
+ const VIEWPORT_BREAKPOINT_CUTOFF = 640;
6111
6229
  /**
6112
6230
  * Used to determine whether two aspect ratios are similar in value.
6113
6231
  */
@@ -6118,6 +6236,25 @@ const ASPECT_RATIO_TOLERANCE = .1;
6118
6236
  * into account a typical device pixel ratio). In pixels.
6119
6237
  */
6120
6238
  const OVERSIZED_IMAGE_TOLERANCE = 1000;
6239
+ /**
6240
+ * Used to limit automatic srcset generation of very large sources for
6241
+ * fixed-size images. In pixels.
6242
+ */
6243
+ const FIXED_SRCSET_WIDTH_LIMIT = 1920;
6244
+ const FIXED_SRCSET_HEIGHT_LIMIT = 1080;
6245
+ /** Info about built-in loaders we can test for. */
6246
+ const BUILT_IN_LOADERS = [imgixLoaderInfo, imageKitLoaderInfo, cloudinaryLoaderInfo];
6247
+ const defaultConfig = {
6248
+ breakpoints: [16, 32, 48, 64, 96, 128, 256, 384, 640, 750, 828, 1080, 1200, 1920, 2048, 3840],
6249
+ };
6250
+ /**
6251
+ * Injection token that configures the image optimized image functionality.
6252
+ *
6253
+ * @see `NgOptimizedImage`
6254
+ * @publicApi
6255
+ * @developerPreview
6256
+ */
6257
+ const IMAGE_CONFIG = new InjectionToken('ImageConfig', { providedIn: 'root', factory: () => defaultConfig });
6121
6258
  /**
6122
6259
  * Directive that improves image loading performance by enforcing best practices.
6123
6260
  *
@@ -6129,6 +6266,7 @@ const OVERSIZED_IMAGE_TOLERANCE = 1000;
6129
6266
  *
6130
6267
  * In addition, the directive:
6131
6268
  * - Generates appropriate asset URLs if a corresponding `ImageLoader` function is provided
6269
+ * - Automatically generates a srcset
6132
6270
  * - Requires that `width` and `height` are set
6133
6271
  * - Warns if `width` or `height` have been set incorrectly
6134
6272
  * - Warns if the image will be visually distorted when rendered
@@ -6214,14 +6352,16 @@ const OVERSIZED_IMAGE_TOLERANCE = 1000;
6214
6352
  * ```
6215
6353
  *
6216
6354
  * @publicApi
6217
- * @developerPreview
6218
6355
  */
6219
6356
  class NgOptimizedImage {
6220
6357
  constructor() {
6221
6358
  this.imageLoader = inject(IMAGE_LOADER);
6359
+ this.config = processConfig(inject(IMAGE_CONFIG));
6222
6360
  this.renderer = inject(Renderer2);
6223
6361
  this.imgElement = inject(ElementRef).nativeElement;
6224
6362
  this.injector = inject(Injector);
6363
+ this.isServer = isPlatformServer(inject(PLATFORM_ID));
6364
+ this.preloadLinkChecker = inject(PreloadLinkCreator);
6225
6365
  // a LCP image observer - should be injected only in the dev mode
6226
6366
  this.lcpObserver = ngDevMode ? this.injector.get(LCPImageObserver) : null;
6227
6367
  /**
@@ -6232,28 +6372,12 @@ class NgOptimizedImage {
6232
6372
  */
6233
6373
  this._renderedSrc = null;
6234
6374
  this._priority = false;
6375
+ this._disableOptimizedSrcset = false;
6376
+ this._fill = false;
6235
6377
  }
6236
6378
  /**
6237
- * Previously, the `rawSrc` attribute was used to activate the directive.
6238
- * The attribute was renamed to `ngSrc` and this input just produces an error,
6239
- * suggesting to switch to `ngSrc` instead.
6240
- *
6241
- * This error should be removed in v15.
6242
- *
6243
- * @nodoc
6244
- * @deprecated Use `ngSrc` instead.
6245
- */
6246
- set rawSrc(value) {
6247
- if (ngDevMode) {
6248
- throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(value, false)} the \`rawSrc\` attribute was used ` +
6249
- `to activate the directive. Newer version of the directive uses the \`ngSrc\` ` +
6250
- `attribute instead. Please replace \`rawSrc\` with \`ngSrc\` and ` +
6251
- `\`rawSrcset\` with \`ngSrcset\` attributes in the template to ` +
6252
- `enable image optimizations.`);
6253
- }
6254
- }
6255
- /**
6256
- * The intrinsic width of the image in pixels.
6379
+ * For responsive images: the intrinsic width of the image in pixels.
6380
+ * For fixed size images: the desired rendered width of the image in pixels.
6257
6381
  */
6258
6382
  set width(value) {
6259
6383
  ngDevMode && assertGreaterThanZero(this, value, 'width');
@@ -6263,7 +6387,9 @@ class NgOptimizedImage {
6263
6387
  return this._width;
6264
6388
  }
6265
6389
  /**
6266
- * The intrinsic height of the image in pixels.
6390
+ * For responsive images: the intrinsic height of the image in pixels.
6391
+ * For fixed size images: the desired rendered height of the image in pixels.* The intrinsic
6392
+ * height of the image in pixels.
6267
6393
  */
6268
6394
  set height(value) {
6269
6395
  ngDevMode && assertGreaterThanZero(this, value, 'height');
@@ -6281,17 +6407,55 @@ class NgOptimizedImage {
6281
6407
  get priority() {
6282
6408
  return this._priority;
6283
6409
  }
6410
+ /**
6411
+ * Disables automatic srcset generation for this image.
6412
+ */
6413
+ set disableOptimizedSrcset(value) {
6414
+ this._disableOptimizedSrcset = inputToBoolean(value);
6415
+ }
6416
+ get disableOptimizedSrcset() {
6417
+ return this._disableOptimizedSrcset;
6418
+ }
6419
+ /**
6420
+ * Sets the image to "fill mode", which eliminates the height/width requirement and adds
6421
+ * styles such that the image fills its containing element.
6422
+ *
6423
+ * @developerPreview
6424
+ */
6425
+ set fill(value) {
6426
+ this._fill = inputToBoolean(value);
6427
+ }
6428
+ get fill() {
6429
+ return this._fill;
6430
+ }
6431
+ /** @nodoc */
6284
6432
  ngOnInit() {
6285
6433
  if (ngDevMode) {
6286
6434
  assertNonEmptyInput(this, 'ngSrc', this.ngSrc);
6287
6435
  assertValidNgSrcset(this, this.ngSrcset);
6288
6436
  assertNoConflictingSrc(this);
6289
- assertNoConflictingSrcset(this);
6437
+ if (this.ngSrcset) {
6438
+ assertNoConflictingSrcset(this);
6439
+ }
6290
6440
  assertNotBase64Image(this);
6291
6441
  assertNotBlobUrl(this);
6292
- assertNonEmptyWidthAndHeight(this);
6442
+ if (this.fill) {
6443
+ assertEmptyWidthAndHeight(this);
6444
+ assertNonZeroRenderedHeight(this, this.imgElement, this.renderer);
6445
+ }
6446
+ else {
6447
+ assertNonEmptyWidthAndHeight(this);
6448
+ // Only check for distorted images when not in fill mode, where
6449
+ // images may be intentionally stretched, cropped or letterboxed.
6450
+ assertNoImageDistortion(this, this.imgElement, this.renderer);
6451
+ }
6293
6452
  assertValidLoadingInput(this);
6294
- assertNoImageDistortion(this, this.imgElement, this.renderer);
6453
+ if (!this.ngSrcset) {
6454
+ assertNoComplexSizes(this);
6455
+ }
6456
+ assertNotMissingBuiltInLoader(this.ngSrc, this.imageLoader);
6457
+ assertNoNgSrcsetWithoutLoader(this, this.imageLoader);
6458
+ assertNoLoaderParamsWithoutLoader(this, this.imageLoader);
6295
6459
  if (this.priority) {
6296
6460
  const checker = this.injector.get(PreconnectLinkChecker);
6297
6461
  checker.assertPreconnect(this.getRewrittenSrc(), this.ngSrc);
@@ -6313,21 +6477,64 @@ class NgOptimizedImage {
6313
6477
  setHostAttributes() {
6314
6478
  // Must set width/height explicitly in case they are bound (in which case they will
6315
6479
  // only be reflected and not found by the browser)
6316
- this.setHostAttribute('width', this.width.toString());
6317
- this.setHostAttribute('height', this.height.toString());
6480
+ if (this.fill) {
6481
+ if (!this.sizes) {
6482
+ this.sizes = '100vw';
6483
+ }
6484
+ }
6485
+ else {
6486
+ this.setHostAttribute('width', this.width.toString());
6487
+ this.setHostAttribute('height', this.height.toString());
6488
+ }
6318
6489
  this.setHostAttribute('loading', this.getLoadingBehavior());
6319
6490
  this.setHostAttribute('fetchpriority', this.getFetchPriority());
6491
+ // The `data-ng-img` attribute flags an image as using the directive, to allow
6492
+ // for analysis of the directive's performance.
6493
+ this.setHostAttribute('ng-img', 'true');
6320
6494
  // The `src` and `srcset` attributes should be set last since other attributes
6321
6495
  // could affect the image's loading behavior.
6322
- this.setHostAttribute('src', this.getRewrittenSrc());
6496
+ const rewrittenSrc = this.getRewrittenSrc();
6497
+ this.setHostAttribute('src', rewrittenSrc);
6498
+ let rewrittenSrcset = undefined;
6499
+ if (this.sizes) {
6500
+ this.setHostAttribute('sizes', this.sizes);
6501
+ }
6323
6502
  if (this.ngSrcset) {
6324
- this.setHostAttribute('srcset', this.getRewrittenSrcset());
6503
+ rewrittenSrcset = this.getRewrittenSrcset();
6504
+ }
6505
+ else if (this.shouldGenerateAutomaticSrcset()) {
6506
+ rewrittenSrcset = this.getAutomaticSrcset();
6507
+ }
6508
+ if (rewrittenSrcset) {
6509
+ this.setHostAttribute('srcset', rewrittenSrcset);
6510
+ }
6511
+ if (this.isServer && this.priority) {
6512
+ this.preloadLinkChecker.createPreloadLinkTag(this.renderer, rewrittenSrc, rewrittenSrcset, this.sizes);
6325
6513
  }
6326
6514
  }
6515
+ /** @nodoc */
6327
6516
  ngOnChanges(changes) {
6328
6517
  if (ngDevMode) {
6329
- assertNoPostInitInputChange(this, changes, ['ngSrc', 'ngSrcset', 'width', 'height', 'priority']);
6330
- }
6518
+ assertNoPostInitInputChange(this, changes, [
6519
+ 'ngSrc',
6520
+ 'ngSrcset',
6521
+ 'width',
6522
+ 'height',
6523
+ 'priority',
6524
+ 'fill',
6525
+ 'loading',
6526
+ 'sizes',
6527
+ 'loaderParams',
6528
+ 'disableOptimizedSrcset',
6529
+ ]);
6530
+ }
6531
+ }
6532
+ callImageLoader(configWithoutCustomParams) {
6533
+ let augmentedConfig = configWithoutCustomParams;
6534
+ if (this.loaderParams) {
6535
+ augmentedConfig.loaderParams = this.loaderParams;
6536
+ }
6537
+ return this.imageLoader(augmentedConfig);
6331
6538
  }
6332
6539
  getLoadingBehavior() {
6333
6540
  if (!this.priority && this.loading !== undefined) {
@@ -6345,7 +6552,7 @@ class NgOptimizedImage {
6345
6552
  if (!this._renderedSrc) {
6346
6553
  const imgConfig = { src: this.ngSrc };
6347
6554
  // Cache calculated image src to reuse it later in the code.
6348
- this._renderedSrc = this.imageLoader(imgConfig);
6555
+ this._renderedSrc = this.callImageLoader(imgConfig);
6349
6556
  }
6350
6557
  return this._renderedSrc;
6351
6558
  }
@@ -6354,10 +6561,42 @@ class NgOptimizedImage {
6354
6561
  const finalSrcs = this.ngSrcset.split(',').filter(src => src !== '').map(srcStr => {
6355
6562
  srcStr = srcStr.trim();
6356
6563
  const width = widthSrcSet ? parseFloat(srcStr) : parseFloat(srcStr) * this.width;
6357
- return `${this.imageLoader({ src: this.ngSrc, width })} ${srcStr}`;
6564
+ return `${this.callImageLoader({ src: this.ngSrc, width })} ${srcStr}`;
6358
6565
  });
6359
6566
  return finalSrcs.join(', ');
6360
6567
  }
6568
+ getAutomaticSrcset() {
6569
+ if (this.sizes) {
6570
+ return this.getResponsiveSrcset();
6571
+ }
6572
+ else {
6573
+ return this.getFixedSrcset();
6574
+ }
6575
+ }
6576
+ getResponsiveSrcset() {
6577
+ var _a;
6578
+ const { breakpoints } = this.config;
6579
+ let filteredBreakpoints = breakpoints;
6580
+ if (((_a = this.sizes) === null || _a === void 0 ? void 0 : _a.trim()) === '100vw') {
6581
+ // Since this is a full-screen-width image, our srcset only needs to include
6582
+ // breakpoints with full viewport widths.
6583
+ filteredBreakpoints = breakpoints.filter(bp => bp >= VIEWPORT_BREAKPOINT_CUTOFF);
6584
+ }
6585
+ const finalSrcs = filteredBreakpoints.map(bp => `${this.callImageLoader({ src: this.ngSrc, width: bp })} ${bp}w`);
6586
+ return finalSrcs.join(', ');
6587
+ }
6588
+ getFixedSrcset() {
6589
+ const finalSrcs = DENSITY_SRCSET_MULTIPLIERS.map(multiplier => {
6590
+ const imgUrl = this.callImageLoader({ src: this.ngSrc, width: this.width * multiplier });
6591
+ return `${imgUrl} ${multiplier}x`;
6592
+ });
6593
+ return finalSrcs.join(', ');
6594
+ }
6595
+ shouldGenerateAutomaticSrcset() {
6596
+ return !this._disableOptimizedSrcset && !this.srcset && this.imageLoader !== noopImageLoader &&
6597
+ !(this.width > FIXED_SRCSET_WIDTH_LIMIT || this.height > FIXED_SRCSET_HEIGHT_LIMIT);
6598
+ }
6599
+ /** @nodoc */
6361
6600
  ngOnDestroy() {
6362
6601
  if (ngDevMode) {
6363
6602
  if (!this.priority && this._renderedSrc !== null && this.lcpObserver !== null) {
@@ -6369,20 +6608,26 @@ class NgOptimizedImage {
6369
6608
  this.renderer.setAttribute(this.imgElement, name, value);
6370
6609
  }
6371
6610
  }
6372
- NgOptimizedImage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgOptimizedImage, deps: [], target: i0.ɵɵFactoryTarget.Directive });
6373
- NgOptimizedImage.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.11", type: NgOptimizedImage, isStandalone: true, selector: "img[ngSrc],img[rawSrc]", inputs: { rawSrc: "rawSrc", ngSrc: "ngSrc", ngSrcset: "ngSrcset", width: "width", height: "height", loading: "loading", priority: "priority", src: "src", srcset: "srcset" }, usesOnChanges: true, ngImport: i0 });
6374
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NgOptimizedImage, decorators: [{
6611
+ NgOptimizedImage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgOptimizedImage, deps: [], target: i0.ɵɵFactoryTarget.Directive });
6612
+ NgOptimizedImage.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: NgOptimizedImage, isStandalone: true, selector: "img[ngSrc]", inputs: { ngSrc: "ngSrc", ngSrcset: "ngSrcset", sizes: "sizes", width: "width", height: "height", loading: "loading", priority: "priority", loaderParams: "loaderParams", disableOptimizedSrcset: "disableOptimizedSrcset", fill: "fill", src: "src", srcset: "srcset" }, host: { properties: { "style.position": "fill ? \"absolute\" : null", "style.width": "fill ? \"100%\" : null", "style.height": "fill ? \"100%\" : null", "style.inset": "fill ? \"0px\" : null" } }, usesOnChanges: true, ngImport: i0 });
6613
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgOptimizedImage, decorators: [{
6375
6614
  type: Directive,
6376
6615
  args: [{
6377
6616
  standalone: true,
6378
- selector: 'img[ngSrc],img[rawSrc]',
6617
+ selector: 'img[ngSrc]',
6618
+ host: {
6619
+ '[style.position]': 'fill ? "absolute" : null',
6620
+ '[style.width]': 'fill ? "100%" : null',
6621
+ '[style.height]': 'fill ? "100%" : null',
6622
+ '[style.inset]': 'fill ? "0px" : null'
6623
+ }
6379
6624
  }]
6380
- }], propDecorators: { rawSrc: [{
6381
- type: Input
6382
- }], ngSrc: [{
6625
+ }], propDecorators: { ngSrc: [{
6383
6626
  type: Input
6384
6627
  }], ngSrcset: [{
6385
6628
  type: Input
6629
+ }], sizes: [{
6630
+ type: Input
6386
6631
  }], width: [{
6387
6632
  type: Input
6388
6633
  }], height: [{
@@ -6391,6 +6636,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
6391
6636
  type: Input
6392
6637
  }], priority: [{
6393
6638
  type: Input
6639
+ }], loaderParams: [{
6640
+ type: Input
6641
+ }], disableOptimizedSrcset: [{
6642
+ type: Input
6643
+ }], fill: [{
6644
+ type: Input
6394
6645
  }], src: [{
6395
6646
  type: Input
6396
6647
  }], srcset: [{
@@ -6409,6 +6660,16 @@ function inputToInteger(value) {
6409
6660
  function inputToBoolean(value) {
6410
6661
  return value != null && `${value}` !== 'false';
6411
6662
  }
6663
+ /**
6664
+ * Sorts provided config breakpoints and uses defaults.
6665
+ */
6666
+ function processConfig(config) {
6667
+ let sortedBreakpoints = {};
6668
+ if (config.breakpoints) {
6669
+ sortedBreakpoints.breakpoints = config.breakpoints.sort((a, b) => a - b);
6670
+ }
6671
+ return Object.assign({}, defaultConfig, config, sortedBreakpoints);
6672
+ }
6412
6673
  /***** Assert functions *****/
6413
6674
  /**
6414
6675
  * Verifies that there is no `src` set on a host element.
@@ -6447,6 +6708,18 @@ function assertNotBase64Image(dir) {
6447
6708
  `by removing \`ngSrc\` and using a standard \`src\` attribute instead.`);
6448
6709
  }
6449
6710
  }
6711
+ /**
6712
+ * Verifies that the 'sizes' only includes responsive values.
6713
+ */
6714
+ function assertNoComplexSizes(dir) {
6715
+ let sizes = dir.sizes;
6716
+ if (sizes === null || sizes === void 0 ? void 0 : sizes.match(/((\)|,)\s|^)\d+px/)) {
6717
+ throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \`sizes\` was set to a string including ` +
6718
+ `pixel values. For automatic \`srcset\` generation, \`sizes\` must only include responsive ` +
6719
+ `values, such as \`sizes="50vw"\` or \`sizes="(min-width: 768px) 50vw, 100vw"\`. ` +
6720
+ `To fix this, modify the \`sizes\` attribute, or provide your own \`ngSrcset\` value directly.`);
6721
+ }
6722
+ }
6450
6723
  /**
6451
6724
  * Verifies that the `ngSrc` is not a Blob URL.
6452
6725
  */
@@ -6507,10 +6780,19 @@ function assertUnderDensityCap(dir, value) {
6507
6780
  * the directive has initialized.
6508
6781
  */
6509
6782
  function postInitInputChangeError(dir, inputName) {
6783
+ let reason;
6784
+ if (inputName === 'width' || inputName === 'height') {
6785
+ reason = `Changing \`${inputName}\` may result in different attribute value ` +
6786
+ `applied to the underlying image element and cause layout shifts on a page.`;
6787
+ }
6788
+ else {
6789
+ reason = `Changing the \`${inputName}\` would have no effect on the underlying ` +
6790
+ `image element, because the resource loading has already occurred.`;
6791
+ }
6510
6792
  return new ɵRuntimeError(2953 /* RuntimeErrorCode.UNEXPECTED_INPUT_CHANGE */, `${imgDirectiveDetails(dir.ngSrc)} \`${inputName}\` was updated after initialization. ` +
6511
- `The NgOptimizedImage directive will not react to this input change. ` +
6512
- `To fix this, switch \`${inputName}\` a static value or wrap the image element ` +
6513
- `in an *ngIf that is gated on the necessary value.`);
6793
+ `The NgOptimizedImage directive will not react to this input change. ${reason} ` +
6794
+ `To fix this, either switch \`${inputName}\` to a static value ` +
6795
+ `or wrap the image element in an *ngIf that is gated on the necessary value.`);
6514
6796
  }
6515
6797
  /**
6516
6798
  * Verify that none of the listed inputs has changed.
@@ -6550,15 +6832,12 @@ function assertGreaterThanZero(dir, inputValue, inputName) {
6550
6832
  function assertNoImageDistortion(dir, img, renderer) {
6551
6833
  const removeListenerFn = renderer.listen(img, 'load', () => {
6552
6834
  removeListenerFn();
6553
- // TODO: `clientWidth`, `clientHeight`, `naturalWidth` and `naturalHeight`
6554
- // are typed as number, but we run `parseFloat` (which accepts strings only).
6555
- // Verify whether `parseFloat` is needed in the cases below.
6556
- const renderedWidth = parseFloat(img.clientWidth);
6557
- const renderedHeight = parseFloat(img.clientHeight);
6835
+ const renderedWidth = img.clientWidth;
6836
+ const renderedHeight = img.clientHeight;
6558
6837
  const renderedAspectRatio = renderedWidth / renderedHeight;
6559
6838
  const nonZeroRenderedDimensions = renderedWidth !== 0 && renderedHeight !== 0;
6560
- const intrinsicWidth = parseFloat(img.naturalWidth);
6561
- const intrinsicHeight = parseFloat(img.naturalHeight);
6839
+ const intrinsicWidth = img.naturalWidth;
6840
+ const intrinsicHeight = img.naturalHeight;
6562
6841
  const intrinsicAspectRatio = intrinsicWidth / intrinsicHeight;
6563
6842
  const suppliedWidth = dir.width;
6564
6843
  const suppliedHeight = dir.height;
@@ -6623,9 +6902,38 @@ function assertNonEmptyWidthAndHeight(dir) {
6623
6902
  throw new ɵRuntimeError(2954 /* RuntimeErrorCode.REQUIRED_INPUT_MISSING */, `${imgDirectiveDetails(dir.ngSrc)} these required attributes ` +
6624
6903
  `are missing: ${missingAttributes.map(attr => `"${attr}"`).join(', ')}. ` +
6625
6904
  `Including "width" and "height" attributes will prevent image-related layout shifts. ` +
6626
- `To fix this, include "width" and "height" attributes on the image tag.`);
6905
+ `To fix this, include "width" and "height" attributes on the image tag or turn on ` +
6906
+ `"fill" mode with the \`fill\` attribute.`);
6907
+ }
6908
+ }
6909
+ /**
6910
+ * Verifies that width and height are not set. Used in fill mode, where those attributes don't make
6911
+ * sense.
6912
+ */
6913
+ function assertEmptyWidthAndHeight(dir) {
6914
+ if (dir.width || dir.height) {
6915
+ throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the attributes \`height\` and/or \`width\` are present ` +
6916
+ `along with the \`fill\` attribute. Because \`fill\` mode causes an image to fill its containing ` +
6917
+ `element, the size attributes have no effect and should be removed.`);
6627
6918
  }
6628
6919
  }
6920
+ /**
6921
+ * Verifies that the rendered image has a nonzero height. If the image is in fill mode, provides
6922
+ * guidance that this can be caused by the containing element's CSS position property.
6923
+ */
6924
+ function assertNonZeroRenderedHeight(dir, img, renderer) {
6925
+ const removeListenerFn = renderer.listen(img, 'load', () => {
6926
+ removeListenerFn();
6927
+ const renderedHeight = img.clientHeight;
6928
+ if (dir.fill && renderedHeight === 0) {
6929
+ console.warn(ɵformatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the height of the fill-mode image is zero. ` +
6930
+ `This is likely because the containing element does not have the CSS 'position' ` +
6931
+ `property set to one of the following: "relative", "fixed", or "absolute". ` +
6932
+ `To fix this problem, make sure the container element has the CSS 'position' ` +
6933
+ `property defined and the height of the element is not zero.`));
6934
+ }
6935
+ });
6936
+ }
6629
6937
  /**
6630
6938
  * Verifies that the `loading` attribute is set to a valid input &
6631
6939
  * is not used on priority images.
@@ -6645,6 +6953,58 @@ function assertValidLoadingInput(dir) {
6645
6953
  `To fix this, provide a valid value ("lazy", "eager", or "auto").`);
6646
6954
  }
6647
6955
  }
6956
+ /**
6957
+ * Warns if NOT using a loader (falling back to the generic loader) and
6958
+ * the image appears to be hosted on one of the image CDNs for which
6959
+ * we do have a built-in image loader. Suggests switching to the
6960
+ * built-in loader.
6961
+ *
6962
+ * @param ngSrc Value of the ngSrc attribute
6963
+ * @param imageLoader ImageLoader provided
6964
+ */
6965
+ function assertNotMissingBuiltInLoader(ngSrc, imageLoader) {
6966
+ if (imageLoader === noopImageLoader) {
6967
+ let builtInLoaderName = '';
6968
+ for (const loader of BUILT_IN_LOADERS) {
6969
+ if (loader.testUrl(ngSrc)) {
6970
+ builtInLoaderName = loader.name;
6971
+ break;
6972
+ }
6973
+ }
6974
+ if (builtInLoaderName) {
6975
+ console.warn(ɵformatRuntimeError(2962 /* RuntimeErrorCode.MISSING_BUILTIN_LOADER */, `NgOptimizedImage: It looks like your images may be hosted on the ` +
6976
+ `${builtInLoaderName} CDN, but your app is not using Angular's ` +
6977
+ `built-in loader for that CDN. We recommend switching to use ` +
6978
+ `the built-in by calling \`provide${builtInLoaderName}Loader()\` ` +
6979
+ `in your \`providers\` and passing it your instance's base URL. ` +
6980
+ `If you don't want to use the built-in loader, define a custom ` +
6981
+ `loader function using IMAGE_LOADER to silence this warning.`));
6982
+ }
6983
+ }
6984
+ }
6985
+ /**
6986
+ * Warns if ngSrcset is present and no loader is configured (i.e. the default one is being used).
6987
+ */
6988
+ function assertNoNgSrcsetWithoutLoader(dir, imageLoader) {
6989
+ if (dir.ngSrcset && imageLoader === noopImageLoader) {
6990
+ console.warn(ɵformatRuntimeError(2963 /* RuntimeErrorCode.MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \`ngSrcset\` attribute is present but ` +
6991
+ `no image loader is configured (i.e. the default one is being used), ` +
6992
+ `which would result in the same image being used for all configured sizes. ` +
6993
+ `To fix this, provide a loader or remove the \`ngSrcset\` attribute from the image.`));
6994
+ }
6995
+ }
6996
+ /**
6997
+ * Warns if loaderParams is present and no loader is configured (i.e. the default one is being
6998
+ * used).
6999
+ */
7000
+ function assertNoLoaderParamsWithoutLoader(dir, imageLoader) {
7001
+ if (dir.loaderParams && imageLoader === noopImageLoader) {
7002
+ console.warn(ɵformatRuntimeError(2963 /* RuntimeErrorCode.MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \`loaderParams\` attribute is present but ` +
7003
+ `no image loader is configured (i.e. the default one is being used), ` +
7004
+ `which means that the loaderParams data will not be consumed and will not affect the URL. ` +
7005
+ `To fix this, provide a custom loader or remove the \`loaderParams\` attribute from the image.`));
7006
+ }
7007
+ }
6648
7008
 
6649
7009
  /**
6650
7010
  * @license