@angular/common 13.3.11 → 13.4.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 (71) hide show
  1. package/common.d.ts +385 -1
  2. package/esm2020/http/src/client.mjs +3 -3
  3. package/esm2020/http/src/interceptor.mjs +3 -3
  4. package/esm2020/http/src/jsonp.mjs +6 -6
  5. package/esm2020/http/src/module.mjs +15 -15
  6. package/esm2020/http/src/xhr.mjs +3 -3
  7. package/esm2020/http/src/xsrf.mjs +6 -6
  8. package/esm2020/http/testing/src/backend.mjs +3 -3
  9. package/esm2020/http/testing/src/module.mjs +4 -4
  10. package/esm2020/src/common.mjs +2 -1
  11. package/esm2020/src/common_module.mjs +4 -4
  12. package/esm2020/src/directives/index.mjs +3 -2
  13. package/esm2020/src/directives/ng_class.mjs +3 -3
  14. package/esm2020/src/directives/ng_component_outlet.mjs +3 -3
  15. package/esm2020/src/directives/ng_for_of.mjs +3 -3
  16. package/esm2020/src/directives/ng_if.mjs +3 -3
  17. package/esm2020/src/directives/ng_optimized_image/asserts.mjs +20 -0
  18. package/esm2020/src/directives/ng_optimized_image/error_helper.mjs +13 -0
  19. package/esm2020/src/directives/ng_optimized_image/image_loaders/cloudflare_loader.mjs +31 -0
  20. package/esm2020/src/directives/ng_optimized_image/image_loaders/cloudinary_loader.mjs +53 -0
  21. package/esm2020/src/directives/ng_optimized_image/image_loaders/image_loader.mjs +74 -0
  22. package/esm2020/src/directives/ng_optimized_image/image_loaders/imagekit_loader.mjs +44 -0
  23. package/esm2020/src/directives/ng_optimized_image/image_loaders/imgix_loader.mjs +43 -0
  24. package/esm2020/src/directives/ng_optimized_image/index.mjs +16 -0
  25. package/esm2020/src/directives/ng_optimized_image/lcp_image_observer.mjs +99 -0
  26. package/esm2020/src/directives/ng_optimized_image/ng_optimized_image.mjs +864 -0
  27. package/esm2020/src/directives/ng_optimized_image/preconnect_link_checker.mjs +136 -0
  28. package/esm2020/src/directives/ng_optimized_image/preload-link-creator.mjs +75 -0
  29. package/esm2020/src/directives/ng_optimized_image/tokens.mjs +24 -0
  30. package/esm2020/src/directives/ng_optimized_image/url.mjs +42 -0
  31. package/esm2020/src/directives/ng_plural.mjs +6 -6
  32. package/esm2020/src/directives/ng_style.mjs +3 -3
  33. package/esm2020/src/directives/ng_switch.mjs +9 -9
  34. package/esm2020/src/directives/ng_template_outlet.mjs +3 -3
  35. package/esm2020/src/errors.mjs +1 -1
  36. package/esm2020/src/i18n/localization.mjs +6 -6
  37. package/esm2020/src/location/hash_location_strategy.mjs +3 -3
  38. package/esm2020/src/location/location.mjs +3 -3
  39. package/esm2020/src/location/location_strategy.mjs +6 -6
  40. package/esm2020/src/location/platform_location.mjs +6 -6
  41. package/esm2020/src/pipes/async_pipe.mjs +3 -3
  42. package/esm2020/src/pipes/case_conversion_pipes.mjs +9 -9
  43. package/esm2020/src/pipes/date_pipe.mjs +3 -3
  44. package/esm2020/src/pipes/i18n_plural_pipe.mjs +3 -3
  45. package/esm2020/src/pipes/i18n_select_pipe.mjs +3 -3
  46. package/esm2020/src/pipes/json_pipe.mjs +3 -3
  47. package/esm2020/src/pipes/keyvalue_pipe.mjs +3 -3
  48. package/esm2020/src/pipes/number_pipe.mjs +9 -9
  49. package/esm2020/src/pipes/slice_pipe.mjs +3 -3
  50. package/esm2020/src/version.mjs +1 -1
  51. package/esm2020/testing/src/location_mock.mjs +3 -3
  52. package/esm2020/testing/src/mock_location_strategy.mjs +3 -3
  53. package/esm2020/testing/src/mock_platform_location.mjs +3 -3
  54. package/esm2020/upgrade/src/location_upgrade_module.mjs +4 -4
  55. package/fesm2015/common.mjs +1639 -144
  56. package/fesm2015/common.mjs.map +1 -1
  57. package/fesm2015/http/testing.mjs +8 -8
  58. package/fesm2015/http.mjs +37 -37
  59. package/fesm2015/testing.mjs +10 -10
  60. package/fesm2015/upgrade.mjs +5 -5
  61. package/fesm2020/common.mjs +1634 -144
  62. package/fesm2020/common.mjs.map +1 -1
  63. package/fesm2020/http/testing.mjs +8 -8
  64. package/fesm2020/http.mjs +37 -37
  65. package/fesm2020/testing.mjs +10 -10
  66. package/fesm2020/upgrade.mjs +5 -5
  67. package/http/http.d.ts +1 -1
  68. package/http/testing/testing.d.ts +1 -1
  69. package/package.json +2 -2
  70. package/testing/testing.d.ts +1 -1
  71. package/upgrade/upgrade.d.ts +1 -1
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license Angular v13.3.11
2
+ * @license Angular v13.4.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, Optional, EventEmitter, ɵfindLocaleData, ɵLocaleDataIndex, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, LOCALE_ID, ɵregisterLocaleData, ɵisListLikeIterable, ɵstringify, Directive, Input, NgModuleRef, ComponentFactoryResolver, Host, ɵRuntimeError, Attribute, ɵisPromise, ɵisSubscribable, Pipe, DEFAULT_CURRENCY_CODE, NgModule, Version, ɵɵdefineInjectable } from '@angular/core';
8
+ import { InjectionToken, Injectable, ɵɵinject, Inject, Optional, EventEmitter, ɵfindLocaleData, ɵLocaleDataIndex, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, LOCALE_ID, ɵregisterLocaleData, ɵisListLikeIterable, ɵstringify, Directive, Input, NgModuleRef, ComponentFactoryResolver, ɵRuntimeError, inject, ɵformatRuntimeError, InjectFlags, NgZone, Renderer2, ElementRef, Injector, PLATFORM_ID, NgModule, Host, Attribute, ɵisPromise, ɵisSubscribable, Pipe, DEFAULT_CURRENCY_CODE, Version, ɵɵdefineInjectable } 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: "13.3.11", ngImport: i0, type: PlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
91
- PlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PlatformLocation, providedIn: 'platform', useFactory: useBrowserPlatformLocation });
92
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PlatformLocation, decorators: [{
90
+ PlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: PlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
91
+ PlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: PlatformLocation, providedIn: 'platform', useFactory: useBrowserPlatformLocation });
92
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.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: "13.3.11", ngImport: i0, type: BrowserPlatformLocation, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
194
- BrowserPlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BrowserPlatformLocation, providedIn: 'platform', useFactory: createBrowserPlatformLocation });
195
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BrowserPlatformLocation, decorators: [{
193
+ BrowserPlatformLocation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: BrowserPlatformLocation, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
194
+ BrowserPlatformLocation.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: BrowserPlatformLocation, providedIn: 'platform', useFactory: createBrowserPlatformLocation });
195
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.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: "13.3.11", ngImport: i0, type: LocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
317
- LocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LocationStrategy, providedIn: 'root', useFactory: provideLocationStrategy });
318
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LocationStrategy, decorators: [{
316
+ LocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
317
+ LocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LocationStrategy, providedIn: 'root', useFactory: provideLocationStrategy });
318
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LocationStrategy, decorators: [{
319
319
  type: Injectable,
320
320
  args: [{ providedIn: 'root', useFactory: provideLocationStrategy }]
321
321
  }] });
@@ -431,9 +431,9 @@ class PathLocationStrategy extends LocationStrategy {
431
431
  (_b = (_a = this._platformLocation).historyGo) === null || _b === void 0 ? void 0 : _b.call(_a, relativePosition);
432
432
  }
433
433
  }
434
- PathLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PathLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
435
- PathLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PathLocationStrategy });
436
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PathLocationStrategy, decorators: [{
434
+ PathLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: PathLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
435
+ PathLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: PathLocationStrategy });
436
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: PathLocationStrategy, decorators: [{
437
437
  type: Injectable
438
438
  }], ctorParameters: function () {
439
439
  return [{ type: PlatformLocation }, { type: undefined, decorators: [{
@@ -528,9 +528,9 @@ class HashLocationStrategy extends LocationStrategy {
528
528
  (_b = (_a = this._platformLocation).historyGo) === null || _b === void 0 ? void 0 : _b.call(_a, relativePosition);
529
529
  }
530
530
  }
531
- HashLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: HashLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
532
- HashLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: HashLocationStrategy });
533
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: HashLocationStrategy, decorators: [{
531
+ HashLocationStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: HashLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
532
+ HashLocationStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: HashLocationStrategy });
533
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: HashLocationStrategy, decorators: [{
534
534
  type: Injectable
535
535
  }], ctorParameters: function () {
536
536
  return [{ type: PlatformLocation }, { type: undefined, decorators: [{
@@ -769,9 +769,9 @@ Location.joinWithSlash = joinWithSlash;
769
769
  * @returns The URL string, modified if needed.
770
770
  */
771
771
  Location.stripTrailingSlash = stripTrailingSlash;
772
- Location.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: Location, deps: [{ token: LocationStrategy }, { token: PlatformLocation }], target: i0.ɵɵFactoryTarget.Injectable });
773
- Location.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: Location, providedIn: 'root', useFactory: createLocation });
774
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: Location, decorators: [{
772
+ Location.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: Location, deps: [{ token: LocationStrategy }, { token: PlatformLocation }], target: i0.ɵɵFactoryTarget.Injectable });
773
+ Location.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: Location, providedIn: 'root', useFactory: createLocation });
774
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: Location, decorators: [{
775
775
  type: Injectable,
776
776
  args: [{
777
777
  providedIn: 'root',
@@ -2587,9 +2587,9 @@ function parseIntAutoRadix(text) {
2587
2587
  */
2588
2588
  class NgLocalization {
2589
2589
  }
2590
- NgLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2591
- NgLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgLocalization, providedIn: 'root', useFactory: (locale) => new NgLocaleLocalization(locale), deps: [{ token: LOCALE_ID }] });
2592
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgLocalization, decorators: [{
2590
+ NgLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2591
+ NgLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgLocalization, providedIn: 'root', useFactory: (locale) => new NgLocaleLocalization(locale), deps: [{ token: LOCALE_ID }] });
2592
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgLocalization, decorators: [{
2593
2593
  type: Injectable,
2594
2594
  args: [{
2595
2595
  providedIn: 'root',
@@ -2644,9 +2644,9 @@ class NgLocaleLocalization extends NgLocalization {
2644
2644
  }
2645
2645
  }
2646
2646
  }
2647
- NgLocaleLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgLocaleLocalization, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });
2648
- NgLocaleLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgLocaleLocalization });
2649
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgLocaleLocalization, decorators: [{
2647
+ NgLocaleLocalization.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgLocaleLocalization, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });
2648
+ NgLocaleLocalization.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgLocaleLocalization });
2649
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgLocaleLocalization, decorators: [{
2650
2650
  type: Injectable
2651
2651
  }], ctorParameters: function () {
2652
2652
  return [{ type: undefined, decorators: [{
@@ -2841,9 +2841,9 @@ class NgClass {
2841
2841
  }
2842
2842
  }
2843
2843
  }
2844
- NgClass.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgClass, deps: [{ token: i0.IterableDiffers }, { token: i0.KeyValueDiffers }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
2845
- NgClass.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: NgClass, selector: "[ngClass]", inputs: { klass: ["class", "klass"], ngClass: "ngClass" }, ngImport: i0 });
2846
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgClass, decorators: [{
2844
+ NgClass.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgClass, deps: [{ token: i0.IterableDiffers }, { token: i0.KeyValueDiffers }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
2845
+ NgClass.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: NgClass, selector: "[ngClass]", inputs: { klass: ["class", "klass"], ngClass: "ngClass" }, ngImport: i0 });
2846
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgClass, decorators: [{
2847
2847
  type: Directive,
2848
2848
  args: [{ selector: '[ngClass]' }]
2849
2849
  }], ctorParameters: function () { return [{ type: i0.IterableDiffers }, { type: i0.KeyValueDiffers }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { klass: [{
@@ -2951,9 +2951,9 @@ class NgComponentOutlet {
2951
2951
  this._moduleRef.destroy();
2952
2952
  }
2953
2953
  }
2954
- NgComponentOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgComponentOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
2955
- NgComponentOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: { ngComponentOutlet: "ngComponentOutlet", ngComponentOutletInjector: "ngComponentOutletInjector", ngComponentOutletContent: "ngComponentOutletContent", ngComponentOutletNgModuleFactory: "ngComponentOutletNgModuleFactory" }, usesOnChanges: true, ngImport: i0 });
2956
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgComponentOutlet, decorators: [{
2954
+ NgComponentOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgComponentOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
2955
+ NgComponentOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: { ngComponentOutlet: "ngComponentOutlet", ngComponentOutletInjector: "ngComponentOutletInjector", ngComponentOutletContent: "ngComponentOutletContent", ngComponentOutletNgModuleFactory: "ngComponentOutletNgModuleFactory" }, usesOnChanges: true, ngImport: i0 });
2956
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgComponentOutlet, decorators: [{
2957
2957
  type: Directive,
2958
2958
  args: [{ selector: '[ngComponentOutlet]' }]
2959
2959
  }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { ngComponentOutlet: [{
@@ -3227,9 +3227,9 @@ class NgForOf {
3227
3227
  return true;
3228
3228
  }
3229
3229
  }
3230
- NgForOf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgForOf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });
3231
- NgForOf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: { ngForOf: "ngForOf", ngForTrackBy: "ngForTrackBy", ngForTemplate: "ngForTemplate" }, ngImport: i0 });
3232
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgForOf, decorators: [{
3230
+ NgForOf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgForOf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });
3231
+ NgForOf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: { ngForOf: "ngForOf", ngForTrackBy: "ngForTrackBy", ngForTemplate: "ngForTemplate" }, ngImport: i0 });
3232
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgForOf, decorators: [{
3233
3233
  type: Directive,
3234
3234
  args: [{ selector: '[ngFor][ngForOf]' }]
3235
3235
  }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: i0.IterableDiffers }]; }, propDecorators: { ngForOf: [{
@@ -3459,9 +3459,9 @@ class NgIf {
3459
3459
  return true;
3460
3460
  }
3461
3461
  }
3462
- NgIf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgIf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
3463
- NgIf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: NgIf, selector: "[ngIf]", inputs: { ngIf: "ngIf", ngIfThen: "ngIfThen", ngIfElse: "ngIfElse" }, ngImport: i0 });
3464
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgIf, decorators: [{
3462
+ NgIf.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgIf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
3463
+ NgIf.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: NgIf, selector: "[ngIf]", inputs: { ngIf: "ngIf", ngIfThen: "ngIfThen", ngIfElse: "ngIfElse" }, ngImport: i0 });
3464
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgIf, decorators: [{
3465
3465
  type: Directive,
3466
3466
  args: [{ selector: '[ngIf]' }]
3467
3467
  }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }]; }, propDecorators: { ngIf: [{
@@ -3487,6 +3487,1503 @@ function assertTemplate(property, templateRef) {
3487
3487
  }
3488
3488
  }
3489
3489
 
3490
+ /**
3491
+ * @license
3492
+ * Copyright Google LLC All Rights Reserved.
3493
+ *
3494
+ * Use of this source code is governed by an MIT-style license that can be
3495
+ * found in the LICENSE file at https://angular.io/license
3496
+ */
3497
+ const PLATFORM_BROWSER_ID = 'browser';
3498
+ const PLATFORM_SERVER_ID = 'server';
3499
+ const PLATFORM_WORKER_APP_ID = 'browserWorkerApp';
3500
+ const PLATFORM_WORKER_UI_ID = 'browserWorkerUi';
3501
+ /**
3502
+ * Returns whether a platform id represents a browser platform.
3503
+ * @publicApi
3504
+ */
3505
+ function isPlatformBrowser(platformId) {
3506
+ return platformId === PLATFORM_BROWSER_ID;
3507
+ }
3508
+ /**
3509
+ * Returns whether a platform id represents a server platform.
3510
+ * @publicApi
3511
+ */
3512
+ function isPlatformServer(platformId) {
3513
+ return platformId === PLATFORM_SERVER_ID;
3514
+ }
3515
+ /**
3516
+ * Returns whether a platform id represents a web worker app platform.
3517
+ * @publicApi
3518
+ */
3519
+ function isPlatformWorkerApp(platformId) {
3520
+ return platformId === PLATFORM_WORKER_APP_ID;
3521
+ }
3522
+ /**
3523
+ * Returns whether a platform id represents a web worker UI platform.
3524
+ * @publicApi
3525
+ */
3526
+ function isPlatformWorkerUi(platformId) {
3527
+ return platformId === PLATFORM_WORKER_UI_ID;
3528
+ }
3529
+
3530
+ /**
3531
+ * @license
3532
+ * Copyright Google LLC All Rights Reserved.
3533
+ *
3534
+ * Use of this source code is governed by an MIT-style license that can be
3535
+ * found in the LICENSE file at https://angular.io/license
3536
+ */
3537
+ // Assembles directive details string, useful for error messages.
3538
+ function imgDirectiveDetails(ngSrc, includeNgSrc = true) {
3539
+ const ngSrcInfo = includeNgSrc ? `(activated on an <img> element with the \`ngSrc="${ngSrc}"\`) ` : '';
3540
+ return `The NgOptimizedImage directive ${ngSrcInfo}has detected that`;
3541
+ }
3542
+
3543
+ /**
3544
+ * @license
3545
+ * Copyright Google LLC All Rights Reserved.
3546
+ *
3547
+ * Use of this source code is governed by an MIT-style license that can be
3548
+ * found in the LICENSE file at https://angular.io/license
3549
+ */
3550
+ // Converts a string that represents a URL into a URL class instance.
3551
+ function getUrl(src, win) {
3552
+ // Don't use a base URL is the URL is absolute.
3553
+ return isAbsoluteUrl(src) ? new URL(src) : new URL(src, win.location.href);
3554
+ }
3555
+ // Checks whether a URL is absolute (i.e. starts with `http://` or `https://`).
3556
+ function isAbsoluteUrl(src) {
3557
+ return /^https?:\/\//.test(src);
3558
+ }
3559
+ // Given a URL, extract the hostname part.
3560
+ // If a URL is a relative one - the URL is returned as is.
3561
+ function extractHostname(url) {
3562
+ return isAbsoluteUrl(url) ? (new URL(url)).hostname : url;
3563
+ }
3564
+ function isValidPath(path) {
3565
+ const isString = typeof path === 'string';
3566
+ if (!isString || path.trim() === '') {
3567
+ return false;
3568
+ }
3569
+ // Calling new URL() will throw if the path string is malformed
3570
+ try {
3571
+ const url = new URL(path);
3572
+ return true;
3573
+ }
3574
+ catch (_a) {
3575
+ return false;
3576
+ }
3577
+ }
3578
+ function normalizePath(path) {
3579
+ return path.endsWith('/') ? path.slice(0, -1) : path;
3580
+ }
3581
+ function normalizeSrc(src) {
3582
+ return src.startsWith('/') ? src.slice(1) : src;
3583
+ }
3584
+
3585
+ /**
3586
+ * @license
3587
+ * Copyright Google LLC All Rights Reserved.
3588
+ *
3589
+ * Use of this source code is governed by an MIT-style license that can be
3590
+ * found in the LICENSE file at https://angular.io/license
3591
+ */
3592
+ /**
3593
+ * Noop image loader that does no transformation to the original src and just returns it as is.
3594
+ * This loader is used as a default one if more specific logic is not provided in an app config.
3595
+ *
3596
+ * @see `ImageLoader`
3597
+ * @see `NgOptimizedImage`
3598
+ */
3599
+ const noopImageLoader = (config) => config.src;
3600
+ /**
3601
+ * Injection token that configures the image loader function.
3602
+ *
3603
+ * @see `ImageLoader`
3604
+ * @see `NgOptimizedImage`
3605
+ * @publicApi
3606
+ */
3607
+ const IMAGE_LOADER = new InjectionToken('ImageLoader', {
3608
+ providedIn: 'root',
3609
+ factory: () => noopImageLoader,
3610
+ });
3611
+ /**
3612
+ * Internal helper function that makes it easier to introduce custom image loaders for the
3613
+ * `NgOptimizedImage` directive. It is enough to specify a URL builder function to obtain full DI
3614
+ * configuration for a given loader: a DI token corresponding to the actual loader function, plus DI
3615
+ * tokens managing preconnect check functionality.
3616
+ * @param buildUrlFn a function returning a full URL based on loader's configuration
3617
+ * @param exampleUrls example of full URLs for a given loader (used in error messages)
3618
+ * @returns a set of DI providers corresponding to the configured image loader
3619
+ */
3620
+ function createImageLoader(buildUrlFn, exampleUrls) {
3621
+ return function provideImageLoader(path) {
3622
+ if (!isValidPath(path)) {
3623
+ throwInvalidPathError(path, exampleUrls || []);
3624
+ }
3625
+ // The trailing / is stripped (if provided) to make URL construction (concatenation) easier in
3626
+ // the individual loader functions.
3627
+ path = normalizePath(path);
3628
+ const loaderFn = (config) => {
3629
+ if (isAbsoluteUrl(config.src)) {
3630
+ // Image loader functions expect an image file name (e.g. `my-image.png`)
3631
+ // or a relative path + a file name (e.g. `/a/b/c/my-image.png`) as an input,
3632
+ // so the final absolute URL can be constructed.
3633
+ // When an absolute URL is provided instead - the loader can not
3634
+ // build a final URL, thus the error is thrown to indicate that.
3635
+ throwUnexpectedAbsoluteUrlError(path, config.src);
3636
+ }
3637
+ return buildUrlFn(path, Object.assign(Object.assign({}, config), { src: normalizeSrc(config.src) }));
3638
+ };
3639
+ const providers = [{ provide: IMAGE_LOADER, useValue: loaderFn }];
3640
+ return providers;
3641
+ };
3642
+ }
3643
+ function throwInvalidPathError(path, exampleUrls) {
3644
+ throw new ɵRuntimeError(2959 /* INVALID_LOADER_ARGUMENTS */, ngDevMode &&
3645
+ `Image loader has detected an invalid path (\`${path}\`). ` +
3646
+ `To fix this, supply a path using one of the following formats: ${exampleUrls.join(' or ')}`);
3647
+ }
3648
+ function throwUnexpectedAbsoluteUrlError(path, url) {
3649
+ throw new ɵRuntimeError(2959 /* INVALID_LOADER_ARGUMENTS */, ngDevMode &&
3650
+ `Image loader has detected a \`<img>\` tag with an invalid \`ngSrc\` attribute: ${url}. ` +
3651
+ `This image loader expects \`ngSrc\` to be a relative URL - ` +
3652
+ `however the provided value is an absolute URL. ` +
3653
+ `To fix this, provide \`ngSrc\` as a path relative to the base URL ` +
3654
+ `configured for this loader (\`${path}\`).`);
3655
+ }
3656
+
3657
+ /**
3658
+ * @license
3659
+ * Copyright Google LLC All Rights Reserved.
3660
+ *
3661
+ * Use of this source code is governed by an MIT-style license that can be
3662
+ * found in the LICENSE file at https://angular.io/license
3663
+ */
3664
+ /**
3665
+ * Name and URL tester for Cloudinary.
3666
+ */
3667
+ const cloudinaryLoaderInfo = {
3668
+ name: 'Cloudinary',
3669
+ testUrl: isCloudinaryUrl
3670
+ };
3671
+ const CLOUDINARY_LOADER_REGEX = /https?\:\/\/[^\/]+\.cloudinary\.com\/.+/;
3672
+ /**
3673
+ * Tests whether a URL is from Cloudinary CDN.
3674
+ */
3675
+ function isCloudinaryUrl(url) {
3676
+ return CLOUDINARY_LOADER_REGEX.test(url);
3677
+ }
3678
+ /**
3679
+ * Function that generates an ImageLoader for Cloudinary and turns it into an Angular provider.
3680
+ *
3681
+ * @param path Base URL of your Cloudinary images
3682
+ * This URL should match one of the following formats:
3683
+ * https://res.cloudinary.com/mysite
3684
+ * https://mysite.cloudinary.com
3685
+ * https://subdomain.mysite.com
3686
+ * @returns Set of providers to configure the Cloudinary loader.
3687
+ *
3688
+ * @publicApi
3689
+ */
3690
+ const provideCloudinaryLoader = createImageLoader(createCloudinaryUrl, ngDevMode ?
3691
+ [
3692
+ 'https://res.cloudinary.com/mysite', 'https://mysite.cloudinary.com',
3693
+ 'https://subdomain.mysite.com'
3694
+ ] :
3695
+ undefined);
3696
+ // Exported for testing purposes in backport only. Not to be accessed except in unit tests.
3697
+ function createCloudinaryUrl(path, config) {
3698
+ // Cloudinary image URLformat:
3699
+ // https://cloudinary.com/documentation/image_transformations#transformation_url_structure
3700
+ // Example of a Cloudinary image URL:
3701
+ // https://res.cloudinary.com/mysite/image/upload/c_scale,f_auto,q_auto,w_600/marketing/tile-topics-m.png
3702
+ let params = `f_auto,q_auto`; // sets image format and quality to "auto"
3703
+ if (config.width) {
3704
+ params += `,w_${config.width}`;
3705
+ }
3706
+ return `${path}/image/upload/${params}/${config.src}`;
3707
+ }
3708
+
3709
+ /**
3710
+ * @license
3711
+ * Copyright Google LLC All Rights Reserved.
3712
+ *
3713
+ * Use of this source code is governed by an MIT-style license that can be
3714
+ * found in the LICENSE file at https://angular.io/license
3715
+ */
3716
+ /**
3717
+ * Name and URL tester for ImageKit.
3718
+ */
3719
+ const imageKitLoaderInfo = {
3720
+ name: 'ImageKit',
3721
+ testUrl: isImageKitUrl
3722
+ };
3723
+ const IMAGE_KIT_LOADER_REGEX = /https?\:\/\/[^\/]+\.imagekit\.io\/.+/;
3724
+ /**
3725
+ * Tests whether a URL is from ImageKit CDN.
3726
+ */
3727
+ function isImageKitUrl(url) {
3728
+ return IMAGE_KIT_LOADER_REGEX.test(url);
3729
+ }
3730
+ /**
3731
+ * Function that generates an ImageLoader for ImageKit and turns it into an Angular provider.
3732
+ *
3733
+ * @param path Base URL of your ImageKit images
3734
+ * This URL should match one of the following formats:
3735
+ * https://ik.imagekit.io/myaccount
3736
+ * https://subdomain.mysite.com
3737
+ * @returns Set of providers to configure the ImageKit loader.
3738
+ *
3739
+ * @publicApi
3740
+ */
3741
+ const provideImageKitLoader = createImageLoader(createImagekitUrl, ngDevMode ? ['https://ik.imagekit.io/mysite', 'https://subdomain.mysite.com'] : undefined);
3742
+ function createImagekitUrl(path, config) {
3743
+ // Example of an ImageKit image URL:
3744
+ // https://ik.imagekit.io/demo/tr:w-300,h-300/medium_cafe_B1iTdD0C.jpg
3745
+ let params = `tr:q-auto`; // applies the "auto quality" transformation
3746
+ if (config.width) {
3747
+ params += `,w-${config.width}`;
3748
+ }
3749
+ return `${path}/${params}/${config.src}`;
3750
+ }
3751
+
3752
+ /**
3753
+ * @license
3754
+ * Copyright Google LLC All Rights Reserved.
3755
+ *
3756
+ * Use of this source code is governed by an MIT-style license that can be
3757
+ * found in the LICENSE file at https://angular.io/license
3758
+ */
3759
+ /**
3760
+ * Name and URL tester for Imgix.
3761
+ */
3762
+ const imgixLoaderInfo = {
3763
+ name: 'Imgix',
3764
+ testUrl: isImgixUrl
3765
+ };
3766
+ const IMGIX_LOADER_REGEX = /https?\:\/\/[^\/]+\.imgix\.net\/.+/;
3767
+ /**
3768
+ * Tests whether a URL is from Imgix CDN.
3769
+ */
3770
+ function isImgixUrl(url) {
3771
+ return IMGIX_LOADER_REGEX.test(url);
3772
+ }
3773
+ /**
3774
+ * Function that generates an ImageLoader for Imgix and turns it into an Angular provider.
3775
+ *
3776
+ * @param path path to the desired Imgix origin,
3777
+ * e.g. https://somepath.imgix.net or https://images.mysite.com
3778
+ * @returns Set of providers to configure the Imgix loader.
3779
+ *
3780
+ * @publicApi
3781
+ */
3782
+ const provideImgixLoader = createImageLoader(createImgixUrl, ngDevMode ? ['https://somepath.imgix.net/'] : undefined);
3783
+ // Exported for testing purposes in backport only. Not to be accessed except in unit tests.
3784
+ function createImgixUrl(path, config) {
3785
+ const url = new URL(`${path}/${config.src}`);
3786
+ // This setting ensures the smallest allowable format is set.
3787
+ url.searchParams.set('auto', 'format');
3788
+ if (config.width) {
3789
+ url.searchParams.set('w', config.width.toString());
3790
+ }
3791
+ return url.href;
3792
+ }
3793
+
3794
+ /**
3795
+ * @license
3796
+ * Copyright Google LLC All Rights Reserved.
3797
+ *
3798
+ * Use of this source code is governed by an MIT-style license that can be
3799
+ * found in the LICENSE file at https://angular.io/license
3800
+ */
3801
+ /**
3802
+ * Asserts that the application is in development mode. Throws an error if the application is in
3803
+ * production mode. This assert can be used to make sure that there is no dev-mode code invoked in
3804
+ * the prod mode accidentally.
3805
+ */
3806
+ function assertDevMode(checkName) {
3807
+ if (!ngDevMode) {
3808
+ throw new ɵRuntimeError(2958 /* UNEXPECTED_DEV_MODE_CHECK_IN_PROD_MODE */, `Unexpected invocation of the ${checkName} in the prod mode. ` +
3809
+ `Please make sure that the prod mode is enabled for production builds.`);
3810
+ }
3811
+ }
3812
+
3813
+ /**
3814
+ * @license
3815
+ * Copyright Google LLC All Rights Reserved.
3816
+ *
3817
+ * Use of this source code is governed by an MIT-style license that can be
3818
+ * found in the LICENSE file at https://angular.io/license
3819
+ */
3820
+ /**
3821
+ * Observer that detects whether an image with `NgOptimizedImage`
3822
+ * is treated as a Largest Contentful Paint (LCP) element. If so,
3823
+ * asserts that the image has the `priority` attribute.
3824
+ *
3825
+ * Note: this is a dev-mode only class and it does not appear in prod bundles,
3826
+ * thus there is no `ngDevMode` use in the code.
3827
+ *
3828
+ * Based on https://web.dev/lcp/#measure-lcp-in-javascript.
3829
+ */
3830
+ class LCPImageObserver {
3831
+ constructor() {
3832
+ // Map of full image URLs -> original `ngSrc` values.
3833
+ this.images = new Map();
3834
+ // Keep track of images for which `console.warn` was produced.
3835
+ this.alreadyWarned = new Set();
3836
+ this.window = null;
3837
+ this.observer = null;
3838
+ assertDevMode('LCP checker');
3839
+ const win = inject(DOCUMENT).defaultView;
3840
+ if (typeof win !== 'undefined' && typeof PerformanceObserver !== 'undefined') {
3841
+ this.window = win;
3842
+ this.observer = this.initPerformanceObserver();
3843
+ }
3844
+ }
3845
+ /**
3846
+ * Inits PerformanceObserver and subscribes to LCP events.
3847
+ * Based on https://web.dev/lcp/#measure-lcp-in-javascript
3848
+ */
3849
+ initPerformanceObserver() {
3850
+ const observer = new PerformanceObserver((entryList) => {
3851
+ var _a, _b;
3852
+ const entries = entryList.getEntries();
3853
+ if (entries.length === 0)
3854
+ return;
3855
+ // We use the latest entry produced by the `PerformanceObserver` as the best
3856
+ // signal on which element is actually an LCP one. As an example, the first image to load on
3857
+ // a page, by virtue of being the only thing on the page so far, is often a LCP candidate
3858
+ // and gets reported by PerformanceObserver, but isn't necessarily the LCP element.
3859
+ const lcpElement = entries[entries.length - 1];
3860
+ // Cast to `any` due to missing `element` on the `LargestContentfulPaint` type of entry.
3861
+ // See https://developer.mozilla.org/en-US/docs/Web/API/LargestContentfulPaint
3862
+ const imgSrc = (_b = (_a = lcpElement.element) === null || _a === void 0 ? void 0 : _a.src) !== null && _b !== void 0 ? _b : '';
3863
+ // Exclude `data:` and `blob:` URLs, since they are not supported by the directive.
3864
+ if (imgSrc.startsWith('data:') || imgSrc.startsWith('blob:'))
3865
+ return;
3866
+ const imgNgSrc = this.images.get(imgSrc);
3867
+ if (imgNgSrc && !this.alreadyWarned.has(imgSrc)) {
3868
+ this.alreadyWarned.add(imgSrc);
3869
+ logMissingPriorityWarning(imgSrc);
3870
+ }
3871
+ });
3872
+ observer.observe({ type: 'largest-contentful-paint', buffered: true });
3873
+ return observer;
3874
+ }
3875
+ registerImage(rewrittenSrc, originalNgSrc) {
3876
+ if (!this.observer)
3877
+ return;
3878
+ this.images.set(getUrl(rewrittenSrc, this.window).href, originalNgSrc);
3879
+ }
3880
+ unregisterImage(rewrittenSrc) {
3881
+ if (!this.observer)
3882
+ return;
3883
+ this.images.delete(getUrl(rewrittenSrc, this.window).href);
3884
+ }
3885
+ ngOnDestroy() {
3886
+ if (!this.observer)
3887
+ return;
3888
+ this.observer.disconnect();
3889
+ this.images.clear();
3890
+ this.alreadyWarned.clear();
3891
+ }
3892
+ }
3893
+ LCPImageObserver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3894
+ LCPImageObserver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LCPImageObserver, providedIn: 'root' });
3895
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LCPImageObserver, decorators: [{
3896
+ type: Injectable,
3897
+ args: [{ providedIn: 'root' }]
3898
+ }], ctorParameters: function () { return []; } });
3899
+ function logMissingPriorityWarning(ngSrc) {
3900
+ const directiveDetails = imgDirectiveDetails(ngSrc);
3901
+ console.warn(ɵformatRuntimeError(2955 /* LCP_IMG_MISSING_PRIORITY */, `${directiveDetails} this image is the Largest Contentful Paint (LCP) ` +
3902
+ `element but was not marked "priority". This image should be marked ` +
3903
+ `"priority" in order to prioritize its loading. ` +
3904
+ `To fix this, add the "priority" attribute.`));
3905
+ }
3906
+
3907
+ /**
3908
+ * @license
3909
+ * Copyright Google LLC All Rights Reserved.
3910
+ *
3911
+ * Use of this source code is governed by an MIT-style license that can be
3912
+ * found in the LICENSE file at https://angular.io/license
3913
+ */
3914
+ // Set of origins that are always excluded from the preconnect checks.
3915
+ const INTERNAL_PRECONNECT_CHECK_BLOCKLIST = new Set(['localhost', '127.0.0.1', '0.0.0.0']);
3916
+ /**
3917
+ * Injection token to configure which origins should be excluded
3918
+ * from the preconnect checks. It can either be a single string or an array of strings
3919
+ * to represent a group of origins, for example:
3920
+ *
3921
+ * ```typescript
3922
+ * {provide: PRECONNECT_CHECK_BLOCKLIST, useValue: 'https://your-domain.com'}
3923
+ * ```
3924
+ *
3925
+ * or:
3926
+ *
3927
+ * ```typescript
3928
+ * {provide: PRECONNECT_CHECK_BLOCKLIST,
3929
+ * useValue: ['https://your-domain-1.com', 'https://your-domain-2.com']}
3930
+ * ```
3931
+ *
3932
+ * @publicApi
3933
+ */
3934
+ const PRECONNECT_CHECK_BLOCKLIST = new InjectionToken('PRECONNECT_CHECK_BLOCKLIST');
3935
+ /**
3936
+ * Contains the logic to detect whether an image, marked with the "priority" attribute
3937
+ * has a corresponding `<link rel="preconnect">` tag in the `document.head`.
3938
+ *
3939
+ * Note: this is a dev-mode only class, which should not appear in prod bundles,
3940
+ * thus there is no `ngDevMode` use in the code.
3941
+ */
3942
+ class PreconnectLinkChecker {
3943
+ constructor() {
3944
+ /**
3945
+ * Set of <link rel="preconnect"> tags found on this page.
3946
+ * The `null` value indicates that there was no DOM query operation performed.
3947
+ */
3948
+ this.preconnectLinks = null;
3949
+ /*
3950
+ * Keep track of all already seen origin URLs to avoid repeating the same check.
3951
+ */
3952
+ this.alreadySeen = new Set();
3953
+ this.window = null;
3954
+ this.blocklist = new Set(INTERNAL_PRECONNECT_CHECK_BLOCKLIST);
3955
+ this.document = inject(DOCUMENT);
3956
+ assertDevMode('preconnect link checker');
3957
+ const win = this.document.defaultView;
3958
+ if (typeof win !== 'undefined') {
3959
+ this.window = win;
3960
+ }
3961
+ const blocklist = inject(PRECONNECT_CHECK_BLOCKLIST, InjectFlags.Optional);
3962
+ if (blocklist) {
3963
+ this.populateBlocklist(blocklist);
3964
+ }
3965
+ }
3966
+ populateBlocklist(origins) {
3967
+ if (Array.isArray(origins)) {
3968
+ deepForEach(origins, origin => {
3969
+ this.blocklist.add(extractHostname(origin));
3970
+ });
3971
+ }
3972
+ else {
3973
+ this.blocklist.add(extractHostname(origins));
3974
+ }
3975
+ }
3976
+ /**
3977
+ * Checks that a preconnect resource hint exists in the head for the
3978
+ * given src.
3979
+ *
3980
+ * @param rewrittenSrc src formatted with loader
3981
+ * @param originalNgSrc ngSrc value
3982
+ */
3983
+ assertPreconnect(rewrittenSrc, originalNgSrc) {
3984
+ if (!this.window)
3985
+ return;
3986
+ const imgUrl = getUrl(rewrittenSrc, this.window);
3987
+ if (this.blocklist.has(imgUrl.hostname) || this.alreadySeen.has(imgUrl.origin))
3988
+ return;
3989
+ // Register this origin as seen, so we don't check it again later.
3990
+ this.alreadySeen.add(imgUrl.origin);
3991
+ if (!this.preconnectLinks) {
3992
+ // Note: we query for preconnect links only *once* and cache the results
3993
+ // for the entire lifespan of an application, since it's unlikely that the
3994
+ // list would change frequently. This allows to make sure there are no
3995
+ // performance implications of making extra DOM lookups for each image.
3996
+ this.preconnectLinks = this.queryPreconnectLinks();
3997
+ }
3998
+ if (!this.preconnectLinks.has(imgUrl.origin)) {
3999
+ console.warn(ɵformatRuntimeError(2956 /* PRIORITY_IMG_MISSING_PRECONNECT_TAG */, `${imgDirectiveDetails(originalNgSrc)} there is no preconnect tag present for this ` +
4000
+ `image. Preconnecting to the origin(s) that serve priority images ensures that these ` +
4001
+ `images are delivered as soon as possible. To fix this, please add the following ` +
4002
+ `element into the <head> of the document:\n` +
4003
+ ` <link rel="preconnect" href="${imgUrl.origin}">`));
4004
+ }
4005
+ }
4006
+ queryPreconnectLinks() {
4007
+ const preconnectUrls = new Set();
4008
+ const selector = 'link[rel=preconnect]';
4009
+ const links = Array.from(this.document.querySelectorAll(selector));
4010
+ for (let link of links) {
4011
+ const url = getUrl(link.href, this.window);
4012
+ preconnectUrls.add(url.origin);
4013
+ }
4014
+ return preconnectUrls;
4015
+ }
4016
+ ngOnDestroy() {
4017
+ var _a;
4018
+ (_a = this.preconnectLinks) === null || _a === void 0 ? void 0 : _a.clear();
4019
+ this.alreadySeen.clear();
4020
+ }
4021
+ }
4022
+ PreconnectLinkChecker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4023
+ PreconnectLinkChecker.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' });
4024
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: PreconnectLinkChecker, decorators: [{
4025
+ type: Injectable,
4026
+ args: [{ providedIn: 'root' }]
4027
+ }], ctorParameters: function () { return []; } });
4028
+ /**
4029
+ * Invokes a callback for each element in the array. Also invokes a callback
4030
+ * recursively for each nested array.
4031
+ */
4032
+ function deepForEach(input, fn) {
4033
+ for (let value of input) {
4034
+ Array.isArray(value) ? deepForEach(value, fn) : fn(value);
4035
+ }
4036
+ }
4037
+
4038
+ /**
4039
+ * @license
4040
+ * Copyright Google LLC All Rights Reserved.
4041
+ *
4042
+ * Use of this source code is governed by an MIT-style license that can be
4043
+ * found in the LICENSE file at https://angular.io/license
4044
+ */
4045
+ /**
4046
+ * In SSR scenarios, a preload `<link>` element is generated for priority images.
4047
+ * Having a large number of preload tags may negatively affect the performance,
4048
+ * so we warn developers (by throwing an error) if the number of preloaded images
4049
+ * is above a certain threshold. This const specifies this threshold.
4050
+ */
4051
+ const DEFAULT_PRELOADED_IMAGES_LIMIT = 5;
4052
+ /**
4053
+ * Helps to keep track of priority images that already have a corresponding
4054
+ * preload tag (to avoid generating multiple preload tags with the same URL).
4055
+ *
4056
+ * This Set tracks the original src passed into the `ngSrc` input not the src after it has been
4057
+ * run through the specified `IMAGE_LOADER`.
4058
+ */
4059
+ const PRELOADED_IMAGES = new InjectionToken('NG_OPTIMIZED_PRELOADED_IMAGES', { providedIn: 'root', factory: () => new Set() });
4060
+
4061
+ /**
4062
+ * @license
4063
+ * Copyright Google LLC All Rights Reserved.
4064
+ *
4065
+ * Use of this source code is governed by an MIT-style license that can be
4066
+ * found in the LICENSE file at https://angular.io/license
4067
+ */
4068
+ /**
4069
+ * @description Contains the logic needed to track and add preload link tags to the `<head>` tag. It
4070
+ * will also track what images have already had preload link tags added so as to not duplicate link
4071
+ * tags.
4072
+ *
4073
+ * In dev mode this service will validate that the number of preloaded images does not exceed the
4074
+ * configured default preloaded images limit: {@link DEFAULT_PRELOADED_IMAGES_LIMIT}.
4075
+ */
4076
+ class PreloadLinkCreator {
4077
+ constructor() {
4078
+ this.preloadedImages = inject(PRELOADED_IMAGES);
4079
+ this.document = inject(DOCUMENT);
4080
+ }
4081
+ /**
4082
+ * @description Add a preload `<link>` to the `<head>` of the `index.html` that is served from the
4083
+ * server while using Angular Universal and SSR to kick off image loads for high priority images.
4084
+ *
4085
+ * The `sizes` (passed in from the user) and `srcset` (parsed and formatted from `ngSrcset`)
4086
+ * properties used to set the corresponding attributes, `imagesizes` and `imagesrcset`
4087
+ * respectively, on the preload `<link>` tag so that the correctly sized image is preloaded from
4088
+ * the CDN.
4089
+ *
4090
+ * {@link https://web.dev/preload-responsive-images/#imagesrcset-and-imagesizes}
4091
+ *
4092
+ * @param renderer The `Renderer2` passed in from the directive
4093
+ * @param src The original src of the image that is set on the `ngSrc` input.
4094
+ * @param srcset The parsed and formatted srcset created from the `ngSrcset` input
4095
+ * @param sizes The value of the `sizes` attribute passed in to the `<img>` tag
4096
+ */
4097
+ createPreloadLinkTag(renderer, src, srcset, sizes) {
4098
+ if (ngDevMode) {
4099
+ if (this.preloadedImages.size >= DEFAULT_PRELOADED_IMAGES_LIMIT) {
4100
+ throw new ɵRuntimeError(2961 /* TOO_MANY_PRELOADED_IMAGES */, ngDevMode &&
4101
+ `The \`NgOptimizedImage\` directive has detected that more than ` +
4102
+ `${DEFAULT_PRELOADED_IMAGES_LIMIT} images were marked as priority. ` +
4103
+ `This might negatively affect an overall performance of the page. ` +
4104
+ `To fix this, remove the "priority" attribute from images with less priority.`);
4105
+ }
4106
+ }
4107
+ if (this.preloadedImages.has(src)) {
4108
+ return;
4109
+ }
4110
+ this.preloadedImages.add(src);
4111
+ const preload = renderer.createElement('link');
4112
+ renderer.setAttribute(preload, 'as', 'image');
4113
+ renderer.setAttribute(preload, 'href', src);
4114
+ renderer.setAttribute(preload, 'rel', 'preload');
4115
+ renderer.setAttribute(preload, 'fetchpriority', 'high');
4116
+ if (sizes) {
4117
+ renderer.setAttribute(preload, 'imageSizes', sizes);
4118
+ }
4119
+ if (srcset) {
4120
+ renderer.setAttribute(preload, 'imageSrcset', srcset);
4121
+ }
4122
+ renderer.appendChild(this.document.head, preload);
4123
+ }
4124
+ }
4125
+ PreloadLinkCreator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: PreloadLinkCreator, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4126
+ PreloadLinkCreator.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: PreloadLinkCreator, providedIn: 'root' });
4127
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: PreloadLinkCreator, decorators: [{
4128
+ type: Injectable,
4129
+ args: [{ providedIn: 'root' }]
4130
+ }], ctorParameters: function () { return []; } });
4131
+
4132
+ /**
4133
+ * @license
4134
+ * Copyright Google LLC All Rights Reserved.
4135
+ *
4136
+ * Use of this source code is governed by an MIT-style license that can be
4137
+ * found in the LICENSE file at https://angular.io/license
4138
+ */
4139
+ /**
4140
+ * When a Base64-encoded image is passed as an input to the `NgOptimizedImage` directive,
4141
+ * an error is thrown. The image content (as a string) might be very long, thus making
4142
+ * it hard to read an error message if the entire string is included. This const defines
4143
+ * the number of characters that should be included into the error message. The rest
4144
+ * of the content is truncated.
4145
+ */
4146
+ const BASE64_IMG_MAX_LENGTH_IN_ERROR = 50;
4147
+ /**
4148
+ * RegExpr to determine whether a src in a srcset is using width descriptors.
4149
+ * Should match something like: "100w, 200w".
4150
+ */
4151
+ const VALID_WIDTH_DESCRIPTOR_SRCSET = /^((\s*\d+w\s*(,|$)){1,})$/;
4152
+ /**
4153
+ * RegExpr to determine whether a src in a srcset is using density descriptors.
4154
+ * Should match something like: "1x, 2x, 50x". Also supports decimals like "1.5x, 1.50x".
4155
+ */
4156
+ const VALID_DENSITY_DESCRIPTOR_SRCSET = /^((\s*\d+(\.\d+)?x\s*(,|$)){1,})$/;
4157
+ /**
4158
+ * Srcset values with a density descriptor higher than this value will actively
4159
+ * throw an error. Such densities are not permitted as they cause image sizes
4160
+ * to be unreasonably large and slow down LCP.
4161
+ */
4162
+ const ABSOLUTE_SRCSET_DENSITY_CAP = 3;
4163
+ /**
4164
+ * Used only in error message text to communicate best practices, as we will
4165
+ * only throw based on the slightly more conservative ABSOLUTE_SRCSET_DENSITY_CAP.
4166
+ */
4167
+ const RECOMMENDED_SRCSET_DENSITY_CAP = 2;
4168
+ /**
4169
+ * Used in generating automatic density-based srcsets
4170
+ */
4171
+ const DENSITY_SRCSET_MULTIPLIERS = [1, 2];
4172
+ /**
4173
+ * Used to determine which breakpoints to use on full-width images
4174
+ */
4175
+ const VIEWPORT_BREAKPOINT_CUTOFF = 640;
4176
+ /**
4177
+ * Used to determine whether two aspect ratios are similar in value.
4178
+ */
4179
+ const ASPECT_RATIO_TOLERANCE = .1;
4180
+ /**
4181
+ * Used to determine whether the image has been requested at an overly
4182
+ * large size compared to the actual rendered image size (after taking
4183
+ * into account a typical device pixel ratio). In pixels.
4184
+ */
4185
+ const OVERSIZED_IMAGE_TOLERANCE = 1000;
4186
+ /**
4187
+ * Used to limit automatic srcset generation of very large sources for
4188
+ * fixed-size images. In pixels.
4189
+ */
4190
+ const FIXED_SRCSET_WIDTH_LIMIT = 1920;
4191
+ const FIXED_SRCSET_HEIGHT_LIMIT = 1080;
4192
+ /** Info about built-in loaders we can test for. */
4193
+ const BUILT_IN_LOADERS = [imgixLoaderInfo, imageKitLoaderInfo, cloudinaryLoaderInfo];
4194
+ const defaultConfig = {
4195
+ breakpoints: [16, 32, 48, 64, 96, 128, 256, 384, 640, 750, 828, 1080, 1200, 1920, 2048, 3840],
4196
+ };
4197
+ /**
4198
+ * Injection token that configures the image optimized image functionality.
4199
+ *
4200
+ * @see `NgOptimizedImage`
4201
+ * @publicApi
4202
+ */
4203
+ const IMAGE_CONFIG = new InjectionToken('ImageConfig', { providedIn: 'root', factory: () => defaultConfig });
4204
+ /**
4205
+ * @ngModule NgOptimizedImageModule
4206
+ *
4207
+ * @description
4208
+ *
4209
+ * Directive that improves image loading performance by enforcing best practices.
4210
+ *
4211
+ * `NgOptimizedImage` ensures that the loading of the Largest Contentful Paint (LCP) image is
4212
+ * prioritized by:
4213
+ * - Automatically setting the `fetchpriority` attribute on the `<img>` tag
4214
+ * - Lazy loading non-priority images by default
4215
+ * - Asserting that there is a corresponding preconnect link tag in the document head
4216
+ *
4217
+ * In addition, the directive:
4218
+ * - Generates appropriate asset URLs if a corresponding `ImageLoader` function is provided
4219
+ * - Automatically generates a srcset
4220
+ * - Requires that `width` and `height` are set
4221
+ * - Warns if `width` or `height` have been set incorrectly
4222
+ * - Warns if the image will be visually distorted when rendered
4223
+ *
4224
+ * @usageNotes
4225
+ *
4226
+ * Follow the steps below to enable and use the directive:
4227
+ * 1. Import it into the necessary NgModule Component.
4228
+ * 2. Optionally provide an `ImageLoader` if you use an image hosting service.
4229
+ * 3. Update the necessary `<img>` tags in templates and replace `src` attributes with `ngSrc`.
4230
+ * Using a `ngSrc` allows the directive to control when the `src` gets set, which triggers an image
4231
+ * download.
4232
+ *
4233
+ * Step 1: import the `NgOptimizedImage` directive.
4234
+ *
4235
+ * ```typescript
4236
+ * import { NgOptimizedImageModule } from '@angular/common';
4237
+ *
4238
+ * // Include it into the necessary NgModule
4239
+ * @NgModule({
4240
+ * imports: [NgOptimizedImageModule],
4241
+ * })
4242
+ * class AppModule {}
4243
+ *
4244
+ *
4245
+ * Step 2: configure a loader.
4246
+ *
4247
+ * To use the **default loader**: no additional code changes are necessary. The URL returned by the
4248
+ * generic loader will always match the value of "src". In other words, this loader applies no
4249
+ * transformations to the resource URL and the value of the `ngSrc` attribute will be used as is.
4250
+ *
4251
+ * To use an existing loader for a **third-party image service**: add the provider factory for your
4252
+ * chosen service to the `providers` array. In the example below, the Imgix loader is used:
4253
+ *
4254
+ * ```typescript
4255
+ * import {provideImgixLoader} from '@angular/common';
4256
+ *
4257
+ * // Call the function and add the result to the `providers` array:
4258
+ * providers: [
4259
+ * provideImgixLoader("https://my.base.url/"),
4260
+ * ],
4261
+ * ```
4262
+ *
4263
+ * The `NgOptimizedImage` directive provides the following functions:
4264
+ * - `provideCloudflareLoader`
4265
+ * - `provideCloudinaryLoader`
4266
+ * - `provideImageKitLoader`
4267
+ * - `provideImgixLoader`
4268
+ *
4269
+ * If you use a different image provider, you can create a custom loader function as described
4270
+ * below.
4271
+ *
4272
+ * To use a **custom loader**: provide your loader function as a value for the `IMAGE_LOADER` DI
4273
+ * token.
4274
+ *
4275
+ * ```typescript
4276
+ * import {IMAGE_LOADER, ImageLoaderConfig} from '@angular/common';
4277
+ *
4278
+ * // Configure the loader using the `IMAGE_LOADER` token.
4279
+ * providers: [
4280
+ * {
4281
+ * provide: IMAGE_LOADER,
4282
+ * useValue: (config: ImageLoaderConfig) => {
4283
+ * return `https://example.com/${config.src}-${config.width}.jpg}`;
4284
+ * }
4285
+ * },
4286
+ * ],
4287
+ * ```
4288
+ *
4289
+ * Step 3: update `<img>` tags in templates to use `ngSrc` instead of `src`.
4290
+ *
4291
+ * ```
4292
+ * <img ngSrc="logo.png" width="200" height="100">
4293
+ * ```
4294
+ *
4295
+ * @publicApi
4296
+ */
4297
+ class NgOptimizedImage {
4298
+ constructor(imageLoader, config, renderer, elementRef, injector, platformId, preloadLinkChecker) {
4299
+ this.imageLoader = imageLoader;
4300
+ this.config = config;
4301
+ this.renderer = renderer;
4302
+ this.elementRef = elementRef;
4303
+ this.injector = injector;
4304
+ this.platformId = platformId;
4305
+ this.preloadLinkChecker = preloadLinkChecker;
4306
+ /**
4307
+ * Calculate the rewritten `src` once and store it.
4308
+ * This is needed to avoid repetitive calculations and make sure the directive cleanup in the
4309
+ * `ngOnDestroy` does not rely on the `IMAGE_LOADER` logic (which in turn can rely on some other
4310
+ * instance that might be already destroyed).
4311
+ */
4312
+ this._renderedSrc = null;
4313
+ this._priority = false;
4314
+ this._disableOptimizedSrcset = false;
4315
+ this._fill = false;
4316
+ this.config = processConfig(this.config);
4317
+ this.imgElement = this.elementRef.nativeElement;
4318
+ this.lcpObserver = ngDevMode ? this.injector.get(LCPImageObserver) : null;
4319
+ }
4320
+ /**
4321
+ * For responsive images: the intrinsic width of the image in pixels.
4322
+ * For fixed size images: the desired rendered width of the image in pixels.
4323
+ */
4324
+ set width(value) {
4325
+ ngDevMode && assertGreaterThanZero(this, value, 'width');
4326
+ this._width = inputToInteger(value);
4327
+ }
4328
+ get width() {
4329
+ return this._width;
4330
+ }
4331
+ /**
4332
+ * For responsive images: the intrinsic height of the image in pixels.
4333
+ * For fixed size images: the desired rendered height of the image in pixels.* The intrinsic
4334
+ * height of the image in pixels.
4335
+ */
4336
+ set height(value) {
4337
+ ngDevMode && assertGreaterThanZero(this, value, 'height');
4338
+ this._height = inputToInteger(value);
4339
+ }
4340
+ get height() {
4341
+ return this._height;
4342
+ }
4343
+ /**
4344
+ * Indicates whether this image should have a high priority.
4345
+ */
4346
+ set priority(value) {
4347
+ this._priority = inputToBoolean(value);
4348
+ }
4349
+ get priority() {
4350
+ return this._priority;
4351
+ }
4352
+ /**
4353
+ * Disables automatic srcset generation for this image.
4354
+ */
4355
+ set disableOptimizedSrcset(value) {
4356
+ this._disableOptimizedSrcset = inputToBoolean(value);
4357
+ }
4358
+ get disableOptimizedSrcset() {
4359
+ return this._disableOptimizedSrcset;
4360
+ }
4361
+ /**
4362
+ * Sets the image to "fill mode", which eliminates the height/width requirement and adds
4363
+ * styles such that the image fills its containing element.
4364
+ */
4365
+ set fill(value) {
4366
+ this._fill = inputToBoolean(value);
4367
+ }
4368
+ get fill() {
4369
+ return this._fill;
4370
+ }
4371
+ /** @nodoc */
4372
+ ngOnInit() {
4373
+ if (ngDevMode) {
4374
+ assertNonEmptyInput(this, 'ngSrc', this.ngSrc);
4375
+ assertValidNgSrcset(this, this.ngSrcset);
4376
+ assertNoConflictingSrc(this);
4377
+ if (this.ngSrcset) {
4378
+ assertNoConflictingSrcset(this);
4379
+ }
4380
+ assertNotBase64Image(this);
4381
+ assertNotBlobUrl(this);
4382
+ if (this.fill) {
4383
+ assertEmptyWidthAndHeight(this);
4384
+ assertNonZeroRenderedHeight(this, this.imgElement, this.renderer);
4385
+ }
4386
+ else {
4387
+ assertNonEmptyWidthAndHeight(this);
4388
+ // Only check for distorted images when not in fill mode, where
4389
+ // images may be intentionally stretched, cropped or letterboxed.
4390
+ assertNoImageDistortion(this, this.imgElement, this.renderer);
4391
+ }
4392
+ assertValidLoadingInput(this);
4393
+ if (!this.ngSrcset) {
4394
+ assertNoComplexSizes(this);
4395
+ }
4396
+ assertNotMissingBuiltInLoader(this.ngSrc, this.imageLoader);
4397
+ assertNoNgSrcsetWithoutLoader(this, this.imageLoader);
4398
+ assertNoLoaderParamsWithoutLoader(this, this.imageLoader);
4399
+ if (this.priority) {
4400
+ const checker = this.injector.get(PreconnectLinkChecker);
4401
+ checker.assertPreconnect(this.getRewrittenSrc(), this.ngSrc);
4402
+ }
4403
+ else {
4404
+ // Monitor whether an image is an LCP element only in case
4405
+ // the `priority` attribute is missing. Otherwise, an image
4406
+ // has the necessary settings and no extra checks are required.
4407
+ if (this.lcpObserver !== null) {
4408
+ const ngZone = this.injector.get(NgZone);
4409
+ ngZone.runOutsideAngular(() => {
4410
+ this.lcpObserver.registerImage(this.getRewrittenSrc(), this.ngSrc);
4411
+ });
4412
+ }
4413
+ }
4414
+ }
4415
+ this.setHostAttributes();
4416
+ }
4417
+ setHostAttributes() {
4418
+ // Must set width/height explicitly in case they are bound (in which case they will
4419
+ // only be reflected and not found by the browser)
4420
+ if (this.fill) {
4421
+ if (!this.sizes) {
4422
+ this.sizes = '100vw';
4423
+ }
4424
+ this.renderer.setStyle(this.imgElement, 'position', 'absolute');
4425
+ this.renderer.setStyle(this.imgElement, 'width', '100%');
4426
+ this.renderer.setStyle(this.imgElement, 'height', '100%');
4427
+ this.renderer.setStyle(this.imgElement, 'inset', '0px');
4428
+ }
4429
+ else {
4430
+ this.setHostAttribute('width', this.width.toString());
4431
+ this.setHostAttribute('height', this.height.toString());
4432
+ }
4433
+ this.setHostAttribute('loading', this.getLoadingBehavior());
4434
+ this.setHostAttribute('fetchpriority', this.getFetchPriority());
4435
+ // The `data-ng-img` attribute flags an image as using the directive, to allow
4436
+ // for analysis of the directive's performance.
4437
+ this.setHostAttribute('ng-img', 'true');
4438
+ // The `src` and `srcset` attributes should be set last since other attributes
4439
+ // could affect the image's loading behavior.
4440
+ const rewrittenSrc = this.getRewrittenSrc();
4441
+ this.setHostAttribute('src', rewrittenSrc);
4442
+ let rewrittenSrcset = undefined;
4443
+ if (this.sizes) {
4444
+ this.setHostAttribute('sizes', this.sizes);
4445
+ }
4446
+ if (this.ngSrcset) {
4447
+ rewrittenSrcset = this.getRewrittenSrcset();
4448
+ }
4449
+ else if (this.shouldGenerateAutomaticSrcset()) {
4450
+ rewrittenSrcset = this.getAutomaticSrcset();
4451
+ }
4452
+ if (rewrittenSrcset) {
4453
+ this.setHostAttribute('srcset', rewrittenSrcset);
4454
+ }
4455
+ if (isPlatformServer(this.platformId) && this.priority) {
4456
+ this.preloadLinkChecker.createPreloadLinkTag(this.renderer, rewrittenSrc, rewrittenSrcset, this.sizes);
4457
+ }
4458
+ }
4459
+ /** @nodoc */
4460
+ ngOnChanges(changes) {
4461
+ if (ngDevMode) {
4462
+ assertNoPostInitInputChange(this, changes, [
4463
+ 'ngSrc',
4464
+ 'ngSrcset',
4465
+ 'width',
4466
+ 'height',
4467
+ 'priority',
4468
+ 'fill',
4469
+ 'loading',
4470
+ 'sizes',
4471
+ 'loaderParams',
4472
+ 'disableOptimizedSrcset',
4473
+ ]);
4474
+ }
4475
+ }
4476
+ callImageLoader(configWithoutCustomParams) {
4477
+ let augmentedConfig = configWithoutCustomParams;
4478
+ if (this.loaderParams) {
4479
+ augmentedConfig.loaderParams = this.loaderParams;
4480
+ }
4481
+ return this.imageLoader(augmentedConfig);
4482
+ }
4483
+ getLoadingBehavior() {
4484
+ if (!this.priority && this.loading !== undefined) {
4485
+ return this.loading;
4486
+ }
4487
+ return this.priority ? 'eager' : 'lazy';
4488
+ }
4489
+ getFetchPriority() {
4490
+ return this.priority ? 'high' : 'auto';
4491
+ }
4492
+ getRewrittenSrc() {
4493
+ // ImageLoaderConfig supports setting a width property. However, we're not setting width here
4494
+ // because if the developer uses rendered width instead of intrinsic width in the HTML width
4495
+ // attribute, the image requested may be too small for 2x+ screens.
4496
+ if (!this._renderedSrc) {
4497
+ const imgConfig = { src: this.ngSrc };
4498
+ // Cache calculated image src to reuse it later in the code.
4499
+ this._renderedSrc = this.callImageLoader(imgConfig);
4500
+ }
4501
+ return this._renderedSrc;
4502
+ }
4503
+ getRewrittenSrcset() {
4504
+ const widthSrcSet = VALID_WIDTH_DESCRIPTOR_SRCSET.test(this.ngSrcset);
4505
+ const finalSrcs = this.ngSrcset.split(',').filter(src => src !== '').map(srcStr => {
4506
+ srcStr = srcStr.trim();
4507
+ const width = widthSrcSet ? parseFloat(srcStr) : parseFloat(srcStr) * this.width;
4508
+ return `${this.callImageLoader({ src: this.ngSrc, width })} ${srcStr}`;
4509
+ });
4510
+ return finalSrcs.join(', ');
4511
+ }
4512
+ getAutomaticSrcset() {
4513
+ if (this.sizes) {
4514
+ return this.getResponsiveSrcset();
4515
+ }
4516
+ else {
4517
+ return this.getFixedSrcset();
4518
+ }
4519
+ }
4520
+ getResponsiveSrcset() {
4521
+ var _a;
4522
+ const { breakpoints } = this.config;
4523
+ let filteredBreakpoints = breakpoints;
4524
+ if (((_a = this.sizes) === null || _a === void 0 ? void 0 : _a.trim()) === '100vw') {
4525
+ // Since this is a full-screen-width image, our srcset only needs to include
4526
+ // breakpoints with full viewport widths.
4527
+ filteredBreakpoints = breakpoints.filter(bp => bp >= VIEWPORT_BREAKPOINT_CUTOFF);
4528
+ }
4529
+ const finalSrcs = filteredBreakpoints.map(bp => `${this.callImageLoader({ src: this.ngSrc, width: bp })} ${bp}w`);
4530
+ return finalSrcs.join(', ');
4531
+ }
4532
+ getFixedSrcset() {
4533
+ const finalSrcs = DENSITY_SRCSET_MULTIPLIERS.map(multiplier => {
4534
+ const imgUrl = this.callImageLoader({ src: this.ngSrc, width: this.width * multiplier });
4535
+ return `${imgUrl} ${multiplier}x`;
4536
+ });
4537
+ return finalSrcs.join(', ');
4538
+ }
4539
+ shouldGenerateAutomaticSrcset() {
4540
+ return !this._disableOptimizedSrcset && !this.srcset && this.imageLoader !== noopImageLoader &&
4541
+ !(this.width > FIXED_SRCSET_WIDTH_LIMIT || this.height > FIXED_SRCSET_HEIGHT_LIMIT);
4542
+ }
4543
+ /** @nodoc */
4544
+ ngOnDestroy() {
4545
+ if (ngDevMode) {
4546
+ if (!this.priority && this._renderedSrc !== null && this.lcpObserver !== null) {
4547
+ this.lcpObserver.unregisterImage(this._renderedSrc);
4548
+ }
4549
+ }
4550
+ }
4551
+ setHostAttribute(name, value) {
4552
+ this.renderer.setAttribute(this.imgElement, name, value);
4553
+ }
4554
+ }
4555
+ NgOptimizedImage.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgOptimizedImage, deps: [{ token: IMAGE_LOADER }, { token: IMAGE_CONFIG }, { token: Renderer2 }, { token: ElementRef }, { token: Injector }, { token: PLATFORM_ID }, { token: PreloadLinkCreator }], target: i0.ɵɵFactoryTarget.Directive });
4556
+ NgOptimizedImage.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: NgOptimizedImage, 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" }, usesOnChanges: true, ngImport: i0 });
4557
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgOptimizedImage, decorators: [{
4558
+ type: Directive,
4559
+ args: [{ selector: 'img[ngSrc]' }]
4560
+ }], ctorParameters: function () {
4561
+ return [{ type: undefined, decorators: [{
4562
+ type: Inject,
4563
+ args: [IMAGE_LOADER]
4564
+ }] }, { type: undefined, decorators: [{
4565
+ type: Inject,
4566
+ args: [IMAGE_CONFIG]
4567
+ }] }, { type: i0.Renderer2, decorators: [{
4568
+ type: Inject,
4569
+ args: [Renderer2]
4570
+ }] }, { type: i0.ElementRef, decorators: [{
4571
+ type: Inject,
4572
+ args: [ElementRef]
4573
+ }] }, { type: i0.Injector, decorators: [{
4574
+ type: Inject,
4575
+ args: [Injector]
4576
+ }] }, { type: undefined, decorators: [{
4577
+ type: Inject,
4578
+ args: [PLATFORM_ID]
4579
+ }] }, { type: PreloadLinkCreator, decorators: [{
4580
+ type: Inject,
4581
+ args: [PreloadLinkCreator]
4582
+ }] }];
4583
+ }, propDecorators: { ngSrc: [{
4584
+ type: Input
4585
+ }], ngSrcset: [{
4586
+ type: Input
4587
+ }], sizes: [{
4588
+ type: Input
4589
+ }], width: [{
4590
+ type: Input
4591
+ }], height: [{
4592
+ type: Input
4593
+ }], loading: [{
4594
+ type: Input
4595
+ }], priority: [{
4596
+ type: Input
4597
+ }], loaderParams: [{
4598
+ type: Input
4599
+ }], disableOptimizedSrcset: [{
4600
+ type: Input
4601
+ }], fill: [{
4602
+ type: Input
4603
+ }], src: [{
4604
+ type: Input
4605
+ }], srcset: [{
4606
+ type: Input
4607
+ }] } });
4608
+ /***** Helpers *****/
4609
+ /**
4610
+ * Convert input value to integer.
4611
+ */
4612
+ function inputToInteger(value) {
4613
+ return typeof value === 'string' ? parseInt(value, 10) : value;
4614
+ }
4615
+ /**
4616
+ * Convert input value to boolean.
4617
+ */
4618
+ function inputToBoolean(value) {
4619
+ return value != null && `${value}` !== 'false';
4620
+ }
4621
+ /**
4622
+ * Sorts provided config breakpoints and uses defaults.
4623
+ */
4624
+ function processConfig(config) {
4625
+ let sortedBreakpoints = {};
4626
+ if (config.breakpoints) {
4627
+ sortedBreakpoints.breakpoints = config.breakpoints.sort((a, b) => a - b);
4628
+ }
4629
+ return Object.assign({}, defaultConfig, config, sortedBreakpoints);
4630
+ }
4631
+ /***** Assert functions *****/
4632
+ /**
4633
+ * Verifies that there is no `src` set on a host element.
4634
+ */
4635
+ function assertNoConflictingSrc(dir) {
4636
+ if (dir.src) {
4637
+ throw new ɵRuntimeError(2950 /* UNEXPECTED_SRC_ATTR */, `${imgDirectiveDetails(dir.ngSrc)} both \`src\` and \`ngSrc\` have been set. ` +
4638
+ `Supplying both of these attributes breaks lazy loading. ` +
4639
+ `The NgOptimizedImage directive sets \`src\` itself based on the value of \`ngSrc\`. ` +
4640
+ `To fix this, please remove the \`src\` attribute.`);
4641
+ }
4642
+ }
4643
+ /**
4644
+ * Verifies that there is no `srcset` set on a host element.
4645
+ */
4646
+ function assertNoConflictingSrcset(dir) {
4647
+ if (dir.srcset) {
4648
+ throw new ɵRuntimeError(2951 /* UNEXPECTED_SRCSET_ATTR */, `${imgDirectiveDetails(dir.ngSrc)} both \`srcset\` and \`ngSrcset\` have been set. ` +
4649
+ `Supplying both of these attributes breaks lazy loading. ` +
4650
+ `The NgOptimizedImage directive sets \`srcset\` itself based on the value of ` +
4651
+ `\`ngSrcset\`. To fix this, please remove the \`srcset\` attribute.`);
4652
+ }
4653
+ }
4654
+ /**
4655
+ * Verifies that the `ngSrc` is not a Base64-encoded image.
4656
+ */
4657
+ function assertNotBase64Image(dir) {
4658
+ let ngSrc = dir.ngSrc.trim();
4659
+ if (ngSrc.startsWith('data:')) {
4660
+ if (ngSrc.length > BASE64_IMG_MAX_LENGTH_IN_ERROR) {
4661
+ ngSrc = ngSrc.substring(0, BASE64_IMG_MAX_LENGTH_IN_ERROR) + '...';
4662
+ }
4663
+ throw new ɵRuntimeError(2952 /* INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \`ngSrc\` is a Base64-encoded string ` +
4664
+ `(${ngSrc}). NgOptimizedImage does not support Base64-encoded strings. ` +
4665
+ `To fix this, disable the NgOptimizedImage directive for this element ` +
4666
+ `by removing \`ngSrc\` and using a standard \`src\` attribute instead.`);
4667
+ }
4668
+ }
4669
+ /**
4670
+ * Verifies that the 'sizes' only includes responsive values.
4671
+ */
4672
+ function assertNoComplexSizes(dir) {
4673
+ let sizes = dir.sizes;
4674
+ if (sizes === null || sizes === void 0 ? void 0 : sizes.match(/((\)|,)\s|^)\d+px/)) {
4675
+ throw new ɵRuntimeError(2952 /* INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \`sizes\` was set to a string including ` +
4676
+ `pixel values. For automatic \`srcset\` generation, \`sizes\` must only include responsive ` +
4677
+ `values, such as \`sizes="50vw"\` or \`sizes="(min-width: 768px) 50vw, 100vw"\`. ` +
4678
+ `To fix this, modify the \`sizes\` attribute, or provide your own \`ngSrcset\` value directly.`);
4679
+ }
4680
+ }
4681
+ /**
4682
+ * Verifies that the `ngSrc` is not a Blob URL.
4683
+ */
4684
+ function assertNotBlobUrl(dir) {
4685
+ const ngSrc = dir.ngSrc.trim();
4686
+ if (ngSrc.startsWith('blob:')) {
4687
+ throw new ɵRuntimeError(2952 /* INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \`ngSrc\` was set to a blob URL (${ngSrc}). ` +
4688
+ `Blob URLs are not supported by the NgOptimizedImage directive. ` +
4689
+ `To fix this, disable the NgOptimizedImage directive for this element ` +
4690
+ `by removing \`ngSrc\` and using a regular \`src\` attribute instead.`);
4691
+ }
4692
+ }
4693
+ /**
4694
+ * Verifies that the input is set to a non-empty string.
4695
+ */
4696
+ function assertNonEmptyInput(dir, name, value) {
4697
+ const isString = typeof value === 'string';
4698
+ const isEmptyString = isString && value.trim() === '';
4699
+ if (!isString || isEmptyString) {
4700
+ throw new ɵRuntimeError(2952 /* INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \`${name}\` has an invalid value ` +
4701
+ `(\`${value}\`). To fix this, change the value to a non-empty string.`);
4702
+ }
4703
+ }
4704
+ /**
4705
+ * Verifies that the `ngSrcset` is in a valid format, e.g. "100w, 200w" or "1x, 2x".
4706
+ */
4707
+ function assertValidNgSrcset(dir, value) {
4708
+ if (value == null)
4709
+ return;
4710
+ assertNonEmptyInput(dir, 'ngSrcset', value);
4711
+ const stringVal = value;
4712
+ const isValidWidthDescriptor = VALID_WIDTH_DESCRIPTOR_SRCSET.test(stringVal);
4713
+ const isValidDensityDescriptor = VALID_DENSITY_DESCRIPTOR_SRCSET.test(stringVal);
4714
+ if (isValidDensityDescriptor) {
4715
+ assertUnderDensityCap(dir, stringVal);
4716
+ }
4717
+ const isValidSrcset = isValidWidthDescriptor || isValidDensityDescriptor;
4718
+ if (!isValidSrcset) {
4719
+ throw new ɵRuntimeError(2952 /* INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \`ngSrcset\` has an invalid value (\`${value}\`). ` +
4720
+ `To fix this, supply \`ngSrcset\` using a comma-separated list of one or more width ` +
4721
+ `descriptors (e.g. "100w, 200w") or density descriptors (e.g. "1x, 2x").`);
4722
+ }
4723
+ }
4724
+ function assertUnderDensityCap(dir, value) {
4725
+ const underDensityCap = value.split(',').every(num => num === '' || parseFloat(num) <= ABSOLUTE_SRCSET_DENSITY_CAP);
4726
+ if (!underDensityCap) {
4727
+ throw new ɵRuntimeError(2952 /* INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \`ngSrcset\` contains an unsupported image density:` +
4728
+ `\`${value}\`. NgOptimizedImage generally recommends a max image density of ` +
4729
+ `${RECOMMENDED_SRCSET_DENSITY_CAP}x but supports image densities up to ` +
4730
+ `${ABSOLUTE_SRCSET_DENSITY_CAP}x. The human eye cannot distinguish between image densities ` +
4731
+ `greater than ${RECOMMENDED_SRCSET_DENSITY_CAP}x - which makes them unnecessary for ` +
4732
+ `most use cases. Images that will be pinch-zoomed are typically the primary use case for ` +
4733
+ `${ABSOLUTE_SRCSET_DENSITY_CAP}x images. Please remove the high density descriptor and try again.`);
4734
+ }
4735
+ }
4736
+ /**
4737
+ * Creates a `RuntimeError` instance to represent a situation when an input is set after
4738
+ * the directive has initialized.
4739
+ */
4740
+ function postInitInputChangeError(dir, inputName) {
4741
+ let reason;
4742
+ if (inputName === 'width' || inputName === 'height') {
4743
+ reason = `Changing \`${inputName}\` may result in different attribute value ` +
4744
+ `applied to the underlying image element and cause layout shifts on a page.`;
4745
+ }
4746
+ else {
4747
+ reason = `Changing the \`${inputName}\` would have no effect on the underlying ` +
4748
+ `image element, because the resource loading has already occurred.`;
4749
+ }
4750
+ return new ɵRuntimeError(2953 /* UNEXPECTED_INPUT_CHANGE */, `${imgDirectiveDetails(dir.ngSrc)} \`${inputName}\` was updated after initialization. ` +
4751
+ `The NgOptimizedImage directive will not react to this input change. ${reason} ` +
4752
+ `To fix this, either switch \`${inputName}\` to a static value ` +
4753
+ `or wrap the image element in an *ngIf that is gated on the necessary value.`);
4754
+ }
4755
+ /**
4756
+ * Verify that none of the listed inputs has changed.
4757
+ */
4758
+ function assertNoPostInitInputChange(dir, changes, inputs) {
4759
+ inputs.forEach(input => {
4760
+ const isUpdated = changes.hasOwnProperty(input);
4761
+ if (isUpdated && !changes[input].isFirstChange()) {
4762
+ if (input === 'ngSrc') {
4763
+ // When the `ngSrc` input changes, we detect that only in the
4764
+ // `ngOnChanges` hook, thus the `ngSrc` is already set. We use
4765
+ // `ngSrc` in the error message, so we use a previous value, but
4766
+ // not the updated one in it.
4767
+ dir = { ngSrc: changes[input].previousValue };
4768
+ }
4769
+ throw postInitInputChangeError(dir, input);
4770
+ }
4771
+ });
4772
+ }
4773
+ /**
4774
+ * Verifies that a specified input is a number greater than 0.
4775
+ */
4776
+ function assertGreaterThanZero(dir, inputValue, inputName) {
4777
+ const validNumber = typeof inputValue === 'number' && inputValue > 0;
4778
+ const validString = typeof inputValue === 'string' && /^\d+$/.test(inputValue.trim()) && parseInt(inputValue) > 0;
4779
+ if (!validNumber && !validString) {
4780
+ throw new ɵRuntimeError(2952 /* INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \`${inputName}\` has an invalid value ` +
4781
+ `(\`${inputValue}\`). To fix this, provide \`${inputName}\` ` +
4782
+ `as a number greater than 0.`);
4783
+ }
4784
+ }
4785
+ /**
4786
+ * Verifies that the rendered image is not visually distorted. Effectively this is checking:
4787
+ * - Whether the "width" and "height" attributes reflect the actual dimensions of the image.
4788
+ * - Whether image styling is "correct" (see below for a longer explanation).
4789
+ */
4790
+ function assertNoImageDistortion(dir, img, renderer) {
4791
+ const removeListenerFn = renderer.listen(img, 'load', () => {
4792
+ removeListenerFn();
4793
+ const renderedWidth = img.clientWidth;
4794
+ const renderedHeight = img.clientHeight;
4795
+ const renderedAspectRatio = renderedWidth / renderedHeight;
4796
+ const nonZeroRenderedDimensions = renderedWidth !== 0 && renderedHeight !== 0;
4797
+ const intrinsicWidth = img.naturalWidth;
4798
+ const intrinsicHeight = img.naturalHeight;
4799
+ const intrinsicAspectRatio = intrinsicWidth / intrinsicHeight;
4800
+ const suppliedWidth = dir.width;
4801
+ const suppliedHeight = dir.height;
4802
+ const suppliedAspectRatio = suppliedWidth / suppliedHeight;
4803
+ // Tolerance is used to account for the impact of subpixel rendering.
4804
+ // Due to subpixel rendering, the rendered, intrinsic, and supplied
4805
+ // aspect ratios of a correctly configured image may not exactly match.
4806
+ // For example, a `width=4030 height=3020` image might have a rendered
4807
+ // size of "1062w, 796.48h". (An aspect ratio of 1.334... vs. 1.333...)
4808
+ const inaccurateDimensions = Math.abs(suppliedAspectRatio - intrinsicAspectRatio) > ASPECT_RATIO_TOLERANCE;
4809
+ const stylingDistortion = nonZeroRenderedDimensions &&
4810
+ Math.abs(intrinsicAspectRatio - renderedAspectRatio) > ASPECT_RATIO_TOLERANCE;
4811
+ if (inaccurateDimensions) {
4812
+ console.warn(ɵformatRuntimeError(2952 /* INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the aspect ratio of the image does not match ` +
4813
+ `the aspect ratio indicated by the width and height attributes. ` +
4814
+ `\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` +
4815
+ `(aspect-ratio: ${intrinsicAspectRatio}). \nSupplied width and height attributes: ` +
4816
+ `${suppliedWidth}w x ${suppliedHeight}h (aspect-ratio: ${suppliedAspectRatio}). ` +
4817
+ `\nTo fix this, update the width and height attributes.`));
4818
+ }
4819
+ else if (stylingDistortion) {
4820
+ console.warn(ɵformatRuntimeError(2952 /* INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the aspect ratio of the rendered image ` +
4821
+ `does not match the image's intrinsic aspect ratio. ` +
4822
+ `\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` +
4823
+ `(aspect-ratio: ${intrinsicAspectRatio}). \nRendered image size: ` +
4824
+ `${renderedWidth}w x ${renderedHeight}h (aspect-ratio: ` +
4825
+ `${renderedAspectRatio}). \nThis issue can occur if "width" and "height" ` +
4826
+ `attributes are added to an image without updating the corresponding ` +
4827
+ `image styling. To fix this, adjust image styling. In most cases, ` +
4828
+ `adding "height: auto" or "width: auto" to the image styling will fix ` +
4829
+ `this issue.`));
4830
+ }
4831
+ else if (!dir.ngSrcset && nonZeroRenderedDimensions) {
4832
+ // If `ngSrcset` hasn't been set, sanity check the intrinsic size.
4833
+ const recommendedWidth = RECOMMENDED_SRCSET_DENSITY_CAP * renderedWidth;
4834
+ const recommendedHeight = RECOMMENDED_SRCSET_DENSITY_CAP * renderedHeight;
4835
+ const oversizedWidth = (intrinsicWidth - recommendedWidth) >= OVERSIZED_IMAGE_TOLERANCE;
4836
+ const oversizedHeight = (intrinsicHeight - recommendedHeight) >= OVERSIZED_IMAGE_TOLERANCE;
4837
+ if (oversizedWidth || oversizedHeight) {
4838
+ console.warn(ɵformatRuntimeError(2960 /* OVERSIZED_IMAGE */, `${imgDirectiveDetails(dir.ngSrc)} the intrinsic image is significantly ` +
4839
+ `larger than necessary. ` +
4840
+ `\nRendered image size: ${renderedWidth}w x ${renderedHeight}h. ` +
4841
+ `\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h. ` +
4842
+ `\nRecommended intrinsic image size: ${recommendedWidth}w x ${recommendedHeight}h. ` +
4843
+ `\nNote: Recommended intrinsic image size is calculated assuming a maximum DPR of ` +
4844
+ `${RECOMMENDED_SRCSET_DENSITY_CAP}. To improve loading time, resize the image ` +
4845
+ `or consider using the "ngSrcset" and "sizes" attributes.`));
4846
+ }
4847
+ }
4848
+ });
4849
+ }
4850
+ /**
4851
+ * Verifies that a specified input is set.
4852
+ */
4853
+ function assertNonEmptyWidthAndHeight(dir) {
4854
+ let missingAttributes = [];
4855
+ if (dir.width === undefined)
4856
+ missingAttributes.push('width');
4857
+ if (dir.height === undefined)
4858
+ missingAttributes.push('height');
4859
+ if (missingAttributes.length > 0) {
4860
+ throw new ɵRuntimeError(2954 /* REQUIRED_INPUT_MISSING */, `${imgDirectiveDetails(dir.ngSrc)} these required attributes ` +
4861
+ `are missing: ${missingAttributes.map(attr => `"${attr}"`).join(', ')}. ` +
4862
+ `Including "width" and "height" attributes will prevent image-related layout shifts. ` +
4863
+ `To fix this, include "width" and "height" attributes on the image tag or turn on ` +
4864
+ `"fill" mode with the \`fill\` attribute.`);
4865
+ }
4866
+ }
4867
+ /**
4868
+ * Verifies that width and height are not set. Used in fill mode, where those attributes don't make
4869
+ * sense.
4870
+ */
4871
+ function assertEmptyWidthAndHeight(dir) {
4872
+ if (dir.width || dir.height) {
4873
+ throw new ɵRuntimeError(2952 /* INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the attributes \`height\` and/or \`width\` are present ` +
4874
+ `along with the \`fill\` attribute. Because \`fill\` mode causes an image to fill its containing ` +
4875
+ `element, the size attributes have no effect and should be removed.`);
4876
+ }
4877
+ }
4878
+ /**
4879
+ * Verifies that the rendered image has a nonzero height. If the image is in fill mode, provides
4880
+ * guidance that this can be caused by the containing element's CSS position property.
4881
+ */
4882
+ function assertNonZeroRenderedHeight(dir, img, renderer) {
4883
+ const removeListenerFn = renderer.listen(img, 'load', () => {
4884
+ removeListenerFn();
4885
+ const renderedHeight = img.clientHeight;
4886
+ if (dir.fill && renderedHeight === 0) {
4887
+ console.warn(ɵformatRuntimeError(2952 /* INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the height of the fill-mode image is zero. ` +
4888
+ `This is likely because the containing element does not have the CSS 'position' ` +
4889
+ `property set to one of the following: "relative", "fixed", or "absolute". ` +
4890
+ `To fix this problem, make sure the container element has the CSS 'position' ` +
4891
+ `property defined and the height of the element is not zero.`));
4892
+ }
4893
+ });
4894
+ }
4895
+ /**
4896
+ * Verifies that the `loading` attribute is set to a valid input &
4897
+ * is not used on priority images.
4898
+ */
4899
+ function assertValidLoadingInput(dir) {
4900
+ if (dir.loading && dir.priority) {
4901
+ throw new ɵRuntimeError(2952 /* INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \`loading\` attribute ` +
4902
+ `was used on an image that was marked "priority". ` +
4903
+ `Setting \`loading\` on priority images is not allowed ` +
4904
+ `because these images will always be eagerly loaded. ` +
4905
+ `To fix this, remove the “loading” attribute from the priority image.`);
4906
+ }
4907
+ const validInputs = ['auto', 'eager', 'lazy'];
4908
+ if (typeof dir.loading === 'string' && !validInputs.includes(dir.loading)) {
4909
+ throw new ɵRuntimeError(2952 /* INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \`loading\` attribute ` +
4910
+ `has an invalid value (\`${dir.loading}\`). ` +
4911
+ `To fix this, provide a valid value ("lazy", "eager", or "auto").`);
4912
+ }
4913
+ }
4914
+ /**
4915
+ * Warns if NOT using a loader (falling back to the generic loader) and
4916
+ * the image appears to be hosted on one of the image CDNs for which
4917
+ * we do have a built-in image loader. Suggests switching to the
4918
+ * built-in loader.
4919
+ *
4920
+ * @param ngSrc Value of the ngSrc attribute
4921
+ * @param imageLoader ImageLoader provided
4922
+ */
4923
+ function assertNotMissingBuiltInLoader(ngSrc, imageLoader) {
4924
+ if (imageLoader === noopImageLoader) {
4925
+ let builtInLoaderName = '';
4926
+ for (const loader of BUILT_IN_LOADERS) {
4927
+ if (loader.testUrl(ngSrc)) {
4928
+ builtInLoaderName = loader.name;
4929
+ break;
4930
+ }
4931
+ }
4932
+ if (builtInLoaderName) {
4933
+ console.warn(ɵformatRuntimeError(2962 /* MISSING_BUILTIN_LOADER */, `NgOptimizedImage: It looks like your images may be hosted on the ` +
4934
+ `${builtInLoaderName} CDN, but your app is not using Angular's ` +
4935
+ `built-in loader for that CDN. We recommend switching to use ` +
4936
+ `the built-in by calling \`provide${builtInLoaderName}Loader()\` ` +
4937
+ `in your \`providers\` and passing it your instance's base URL. ` +
4938
+ `If you don't want to use the built-in loader, define a custom ` +
4939
+ `loader function using IMAGE_LOADER to silence this warning.`));
4940
+ }
4941
+ }
4942
+ }
4943
+ /**
4944
+ * Warns if ngSrcset is present and no loader is configured (i.e. the default one is being used).
4945
+ */
4946
+ function assertNoNgSrcsetWithoutLoader(dir, imageLoader) {
4947
+ if (dir.ngSrcset && imageLoader === noopImageLoader) {
4948
+ console.warn(ɵformatRuntimeError(2963 /* MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \`ngSrcset\` attribute is present but ` +
4949
+ `no image loader is configured (i.e. the default one is being used), ` +
4950
+ `which would result in the same image being used for all configured sizes. ` +
4951
+ `To fix this, provide a loader or remove the \`ngSrcset\` attribute from the image.`));
4952
+ }
4953
+ }
4954
+ /**
4955
+ * Warns if loaderParams is present and no loader is configured (i.e. the default one is being
4956
+ * used).
4957
+ */
4958
+ function assertNoLoaderParamsWithoutLoader(dir, imageLoader) {
4959
+ if (dir.loaderParams && imageLoader === noopImageLoader) {
4960
+ console.warn(ɵformatRuntimeError(2963 /* MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \`loaderParams\` attribute is present but ` +
4961
+ `no image loader is configured (i.e. the default one is being used), ` +
4962
+ `which means that the loaderParams data will not be consumed and will not affect the URL. ` +
4963
+ `To fix this, provide a custom loader or remove the \`loaderParams\` attribute from the image.`));
4964
+ }
4965
+ }
4966
+ /**
4967
+ * This NgModule exports the `NgOptimizedImage` directive.
4968
+ * Import this module to enable the optimized image directive in your application.
4969
+ *
4970
+ * @publicApi
4971
+ * @deprecated In Angular v15, this NgModule is removed in favor of the NgOptimizedImage directive,
4972
+ * which is annotated as standalone.
4973
+ */
4974
+ class NgOptimizedImageModule {
4975
+ }
4976
+ NgOptimizedImageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgOptimizedImageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4977
+ NgOptimizedImageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgOptimizedImageModule, declarations: [NgOptimizedImage], exports: [NgOptimizedImage] });
4978
+ NgOptimizedImageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgOptimizedImageModule });
4979
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgOptimizedImageModule, decorators: [{
4980
+ type: NgModule,
4981
+ args: [{
4982
+ declarations: [NgOptimizedImage],
4983
+ exports: [NgOptimizedImage],
4984
+ }]
4985
+ }] });
4986
+
3490
4987
  /**
3491
4988
  * @license
3492
4989
  * Copyright Google LLC All Rights Reserved.
@@ -3629,9 +5126,9 @@ class NgSwitch {
3629
5126
  }
3630
5127
  }
3631
5128
  }
3632
- NgSwitch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3633
- NgSwitch.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: NgSwitch, selector: "[ngSwitch]", inputs: { ngSwitch: "ngSwitch" }, ngImport: i0 });
3634
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgSwitch, decorators: [{
5129
+ NgSwitch.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5130
+ NgSwitch.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: NgSwitch, selector: "[ngSwitch]", inputs: { ngSwitch: "ngSwitch" }, ngImport: i0 });
5131
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgSwitch, decorators: [{
3635
5132
  type: Directive,
3636
5133
  args: [{ selector: '[ngSwitch]' }]
3637
5134
  }], propDecorators: { ngSwitch: [{
@@ -3687,9 +5184,9 @@ class NgSwitchCase {
3687
5184
  this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase));
3688
5185
  }
3689
5186
  }
3690
- NgSwitchCase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgSwitchCase, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3691
- NgSwitchCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: { ngSwitchCase: "ngSwitchCase" }, ngImport: i0 });
3692
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgSwitchCase, decorators: [{
5187
+ NgSwitchCase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgSwitchCase, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
5188
+ NgSwitchCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: { ngSwitchCase: "ngSwitchCase" }, ngImport: i0 });
5189
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgSwitchCase, decorators: [{
3693
5190
  type: Directive,
3694
5191
  args: [{ selector: '[ngSwitchCase]' }]
3695
5192
  }], ctorParameters: function () {
@@ -3723,9 +5220,9 @@ class NgSwitchDefault {
3723
5220
  ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));
3724
5221
  }
3725
5222
  }
3726
- NgSwitchDefault.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgSwitchDefault, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3727
- NgSwitchDefault.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: NgSwitchDefault, selector: "[ngSwitchDefault]", ngImport: i0 });
3728
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgSwitchDefault, decorators: [{
5223
+ NgSwitchDefault.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgSwitchDefault, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
5224
+ NgSwitchDefault.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: NgSwitchDefault, selector: "[ngSwitchDefault]", ngImport: i0 });
5225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgSwitchDefault, decorators: [{
3729
5226
  type: Directive,
3730
5227
  args: [{ selector: '[ngSwitchDefault]' }]
3731
5228
  }], ctorParameters: function () {
@@ -3808,9 +5305,9 @@ class NgPlural {
3808
5305
  }
3809
5306
  }
3810
5307
  }
3811
- NgPlural.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgPlural, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Directive });
3812
- NgPlural.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: NgPlural, selector: "[ngPlural]", inputs: { ngPlural: "ngPlural" }, ngImport: i0 });
3813
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgPlural, decorators: [{
5308
+ NgPlural.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgPlural, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Directive });
5309
+ NgPlural.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: NgPlural, selector: "[ngPlural]", inputs: { ngPlural: "ngPlural" }, ngImport: i0 });
5310
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgPlural, decorators: [{
3814
5311
  type: Directive,
3815
5312
  args: [{ selector: '[ngPlural]' }]
3816
5313
  }], ctorParameters: function () { return [{ type: NgLocalization }]; }, propDecorators: { ngPlural: [{
@@ -3843,9 +5340,9 @@ class NgPluralCase {
3843
5340
  ngPlural.addCase(isANumber ? `=${value}` : value, new SwitchView(viewContainer, template));
3844
5341
  }
3845
5342
  }
3846
- NgPluralCase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgPluralCase, deps: [{ token: 'ngPluralCase', attribute: true }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: NgPlural, host: true }], target: i0.ɵɵFactoryTarget.Directive });
3847
- NgPluralCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: NgPluralCase, selector: "[ngPluralCase]", ngImport: i0 });
3848
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgPluralCase, decorators: [{
5343
+ NgPluralCase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgPluralCase, deps: [{ token: 'ngPluralCase', attribute: true }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: NgPlural, host: true }], target: i0.ɵɵFactoryTarget.Directive });
5344
+ NgPluralCase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: NgPluralCase, selector: "[ngPluralCase]", ngImport: i0 });
5345
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgPluralCase, decorators: [{
3849
5346
  type: Directive,
3850
5347
  args: [{ selector: '[ngPluralCase]' }]
3851
5348
  }], ctorParameters: function () {
@@ -3938,9 +5435,9 @@ class NgStyle {
3938
5435
  changes.forEachChangedItem((record) => this._setStyle(record.key, record.currentValue));
3939
5436
  }
3940
5437
  }
3941
- NgStyle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgStyle, deps: [{ token: i0.ElementRef }, { token: i0.KeyValueDiffers }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
3942
- NgStyle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: NgStyle, selector: "[ngStyle]", inputs: { ngStyle: "ngStyle" }, ngImport: i0 });
3943
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgStyle, decorators: [{
5438
+ NgStyle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgStyle, deps: [{ token: i0.ElementRef }, { token: i0.KeyValueDiffers }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
5439
+ NgStyle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: NgStyle, selector: "[ngStyle]", inputs: { ngStyle: "ngStyle" }, ngImport: i0 });
5440
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgStyle, decorators: [{
3944
5441
  type: Directive,
3945
5442
  args: [{ selector: '[ngStyle]' }]
3946
5443
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.KeyValueDiffers }, { type: i0.Renderer2 }]; }, propDecorators: { ngStyle: [{
@@ -4011,9 +5508,9 @@ class NgTemplateOutlet {
4011
5508
  }
4012
5509
  }
4013
5510
  }
4014
- NgTemplateOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgTemplateOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
4015
- NgTemplateOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: { ngTemplateOutletContext: "ngTemplateOutletContext", ngTemplateOutlet: "ngTemplateOutlet" }, usesOnChanges: true, ngImport: i0 });
4016
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NgTemplateOutlet, decorators: [{
5511
+ NgTemplateOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgTemplateOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
5512
+ NgTemplateOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.4.0", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: { ngTemplateOutletContext: "ngTemplateOutletContext", ngTemplateOutlet: "ngTemplateOutlet" }, usesOnChanges: true, ngImport: i0 });
5513
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: NgTemplateOutlet, decorators: [{
4017
5514
  type: Directive,
4018
5515
  args: [{ selector: '[ngTemplateOutlet]' }]
4019
5516
  }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { ngTemplateOutletContext: [{
@@ -4176,9 +5673,9 @@ class AsyncPipe {
4176
5673
  }
4177
5674
  }
4178
5675
  }
4179
- AsyncPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AsyncPipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe });
4180
- AsyncPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AsyncPipe, name: "async", pure: false });
4181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AsyncPipe, decorators: [{
5676
+ AsyncPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AsyncPipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe });
5677
+ AsyncPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AsyncPipe, name: "async", pure: false });
5678
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: AsyncPipe, decorators: [{
4182
5679
  type: Pipe,
4183
5680
  args: [{ name: 'async', pure: false }]
4184
5681
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
@@ -4215,9 +5712,9 @@ class LowerCasePipe {
4215
5712
  return value.toLowerCase();
4216
5713
  }
4217
5714
  }
4218
- LowerCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LowerCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4219
- LowerCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LowerCasePipe, name: "lowercase" });
4220
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LowerCasePipe, decorators: [{
5715
+ LowerCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LowerCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5716
+ LowerCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LowerCasePipe, name: "lowercase" });
5717
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: LowerCasePipe, decorators: [{
4221
5718
  type: Pipe,
4222
5719
  args: [{ name: 'lowercase' }]
4223
5720
  }] });
@@ -4257,9 +5754,9 @@ class TitleCasePipe {
4257
5754
  return value.replace(unicodeWordMatch, (txt => txt[0].toUpperCase() + txt.substr(1).toLowerCase()));
4258
5755
  }
4259
5756
  }
4260
- TitleCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4261
- TitleCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TitleCasePipe, name: "titlecase" });
4262
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: TitleCasePipe, decorators: [{
5757
+ TitleCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5758
+ TitleCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: TitleCasePipe, name: "titlecase" });
5759
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: TitleCasePipe, decorators: [{
4263
5760
  type: Pipe,
4264
5761
  args: [{ name: 'titlecase' }]
4265
5762
  }] });
@@ -4281,9 +5778,9 @@ class UpperCasePipe {
4281
5778
  return value.toUpperCase();
4282
5779
  }
4283
5780
  }
4284
- UpperCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UpperCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4285
- UpperCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UpperCasePipe, name: "uppercase" });
4286
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: UpperCasePipe, decorators: [{
5781
+ UpperCasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: UpperCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5782
+ UpperCasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: UpperCasePipe, name: "uppercase" });
5783
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: UpperCasePipe, decorators: [{
4287
5784
  type: Pipe,
4288
5785
  args: [{ name: 'uppercase' }]
4289
5786
  }] });
@@ -4476,9 +5973,9 @@ class DatePipe {
4476
5973
  }
4477
5974
  }
4478
5975
  }
4479
- DatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DatePipe, deps: [{ token: LOCALE_ID }, { token: DATE_PIPE_DEFAULT_TIMEZONE, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
4480
- DatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DatePipe, name: "date" });
4481
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DatePipe, decorators: [{
5976
+ DatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: DatePipe, deps: [{ token: LOCALE_ID }, { token: DATE_PIPE_DEFAULT_TIMEZONE, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
5977
+ DatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: DatePipe, name: "date" });
5978
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: DatePipe, decorators: [{
4482
5979
  type: Pipe,
4483
5980
  args: [{ name: 'date', pure: true }]
4484
5981
  }], ctorParameters: function () {
@@ -4536,9 +6033,9 @@ class I18nPluralPipe {
4536
6033
  return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());
4537
6034
  }
4538
6035
  }
4539
- I18nPluralPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: I18nPluralPipe, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Pipe });
4540
- I18nPluralPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: I18nPluralPipe, name: "i18nPlural" });
4541
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: I18nPluralPipe, decorators: [{
6036
+ I18nPluralPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: I18nPluralPipe, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Pipe });
6037
+ I18nPluralPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: I18nPluralPipe, name: "i18nPlural" });
6038
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: I18nPluralPipe, decorators: [{
4542
6039
  type: Pipe,
4543
6040
  args: [{ name: 'i18nPlural', pure: true }]
4544
6041
  }], ctorParameters: function () { return [{ type: NgLocalization }]; } });
@@ -4588,9 +6085,9 @@ class I18nSelectPipe {
4588
6085
  return '';
4589
6086
  }
4590
6087
  }
4591
- I18nSelectPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: I18nSelectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4592
- I18nSelectPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: I18nSelectPipe, name: "i18nSelect" });
4593
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: I18nSelectPipe, decorators: [{
6088
+ I18nSelectPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: I18nSelectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
6089
+ I18nSelectPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: I18nSelectPipe, name: "i18nSelect" });
6090
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: I18nSelectPipe, decorators: [{
4594
6091
  type: Pipe,
4595
6092
  args: [{ name: 'i18nSelect', pure: true }]
4596
6093
  }] });
@@ -4625,9 +6122,9 @@ class JsonPipe {
4625
6122
  return JSON.stringify(value, null, 2);
4626
6123
  }
4627
6124
  }
4628
- JsonPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: JsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4629
- JsonPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: JsonPipe, name: "json", pure: false });
4630
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: JsonPipe, decorators: [{
6125
+ JsonPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: JsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
6126
+ JsonPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: JsonPipe, name: "json", pure: false });
6127
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: JsonPipe, decorators: [{
4631
6128
  type: Pipe,
4632
6129
  args: [{ name: 'json', pure: false }]
4633
6130
  }] });
@@ -4691,9 +6188,9 @@ class KeyValuePipe {
4691
6188
  return this.keyValues;
4692
6189
  }
4693
6190
  }
4694
- KeyValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: KeyValuePipe, deps: [{ token: i0.KeyValueDiffers }], target: i0.ɵɵFactoryTarget.Pipe });
4695
- KeyValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: KeyValuePipe, name: "keyvalue", pure: false });
4696
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: KeyValuePipe, decorators: [{
6191
+ KeyValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: KeyValuePipe, deps: [{ token: i0.KeyValueDiffers }], target: i0.ɵɵFactoryTarget.Pipe });
6192
+ KeyValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: KeyValuePipe, name: "keyvalue", pure: false });
6193
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: KeyValuePipe, decorators: [{
4697
6194
  type: Pipe,
4698
6195
  args: [{ name: 'keyvalue', pure: false }]
4699
6196
  }], ctorParameters: function () { return [{ type: i0.KeyValueDiffers }]; } });
@@ -4822,9 +6319,9 @@ class DecimalPipe {
4822
6319
  }
4823
6320
  }
4824
6321
  }
4825
- DecimalPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DecimalPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
4826
- DecimalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DecimalPipe, name: "number" });
4827
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DecimalPipe, decorators: [{
6322
+ DecimalPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: DecimalPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
6323
+ DecimalPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: DecimalPipe, name: "number" });
6324
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: DecimalPipe, decorators: [{
4828
6325
  type: Pipe,
4829
6326
  args: [{ name: 'number' }]
4830
6327
  }], ctorParameters: function () {
@@ -4886,9 +6383,9 @@ class PercentPipe {
4886
6383
  }
4887
6384
  }
4888
6385
  }
4889
- PercentPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PercentPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
4890
- PercentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PercentPipe, name: "percent" });
4891
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PercentPipe, decorators: [{
6386
+ PercentPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: PercentPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
6387
+ PercentPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: PercentPipe, name: "percent" });
6388
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: PercentPipe, decorators: [{
4892
6389
  type: Pipe,
4893
6390
  args: [{ name: 'percent' }]
4894
6391
  }], ctorParameters: function () {
@@ -5003,9 +6500,9 @@ class CurrencyPipe {
5003
6500
  }
5004
6501
  }
5005
6502
  }
5006
- CurrencyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CurrencyPipe, deps: [{ token: LOCALE_ID }, { token: DEFAULT_CURRENCY_CODE }], target: i0.ɵɵFactoryTarget.Pipe });
5007
- CurrencyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CurrencyPipe, name: "currency" });
5008
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CurrencyPipe, decorators: [{
6503
+ CurrencyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CurrencyPipe, deps: [{ token: LOCALE_ID }, { token: DEFAULT_CURRENCY_CODE }], target: i0.ɵɵFactoryTarget.Pipe });
6504
+ CurrencyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CurrencyPipe, name: "currency" });
6505
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CurrencyPipe, decorators: [{
5009
6506
  type: Pipe,
5010
6507
  args: [{ name: 'currency' }]
5011
6508
  }], ctorParameters: function () {
@@ -5089,9 +6586,9 @@ class SlicePipe {
5089
6586
  return typeof obj === 'string' || Array.isArray(obj);
5090
6587
  }
5091
6588
  }
5092
- SlicePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SlicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5093
- SlicePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SlicePipe, name: "slice", pure: false });
5094
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SlicePipe, decorators: [{
6589
+ SlicePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SlicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
6590
+ SlicePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SlicePipe, name: "slice", pure: false });
6591
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SlicePipe, decorators: [{
5095
6592
  type: Pipe,
5096
6593
  args: [{ name: 'slice', pure: false }]
5097
6594
  }] });
@@ -5146,10 +6643,10 @@ const COMMON_PIPES = [
5146
6643
  */
5147
6644
  class CommonModule {
5148
6645
  }
5149
- CommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5150
- CommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CommonModule, declarations: [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] });
5151
- CommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CommonModule });
5152
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CommonModule, decorators: [{
6646
+ CommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6647
+ CommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CommonModule, declarations: [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] });
6648
+ CommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CommonModule });
6649
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CommonModule, decorators: [{
5153
6650
  type: NgModule,
5154
6651
  args: [{
5155
6652
  declarations: [COMMON_DIRECTIVES, COMMON_PIPES],
@@ -5157,46 +6654,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
5157
6654
  }]
5158
6655
  }] });
5159
6656
 
5160
- /**
5161
- * @license
5162
- * Copyright Google LLC All Rights Reserved.
5163
- *
5164
- * Use of this source code is governed by an MIT-style license that can be
5165
- * found in the LICENSE file at https://angular.io/license
5166
- */
5167
- const PLATFORM_BROWSER_ID = 'browser';
5168
- const PLATFORM_SERVER_ID = 'server';
5169
- const PLATFORM_WORKER_APP_ID = 'browserWorkerApp';
5170
- const PLATFORM_WORKER_UI_ID = 'browserWorkerUi';
5171
- /**
5172
- * Returns whether a platform id represents a browser platform.
5173
- * @publicApi
5174
- */
5175
- function isPlatformBrowser(platformId) {
5176
- return platformId === PLATFORM_BROWSER_ID;
5177
- }
5178
- /**
5179
- * Returns whether a platform id represents a server platform.
5180
- * @publicApi
5181
- */
5182
- function isPlatformServer(platformId) {
5183
- return platformId === PLATFORM_SERVER_ID;
5184
- }
5185
- /**
5186
- * Returns whether a platform id represents a web worker app platform.
5187
- * @publicApi
5188
- */
5189
- function isPlatformWorkerApp(platformId) {
5190
- return platformId === PLATFORM_WORKER_APP_ID;
5191
- }
5192
- /**
5193
- * Returns whether a platform id represents a web worker UI platform.
5194
- * @publicApi
5195
- */
5196
- function isPlatformWorkerUi(platformId) {
5197
- return platformId === PLATFORM_WORKER_UI_ID;
5198
- }
5199
-
5200
6657
  /**
5201
6658
  * @license
5202
6659
  * Copyright Google LLC All Rights Reserved.
@@ -5207,7 +6664,7 @@ function isPlatformWorkerUi(platformId) {
5207
6664
  /**
5208
6665
  * @publicApi
5209
6666
  */
5210
- const VERSION = new Version('13.3.11');
6667
+ const VERSION = new Version('13.4.0');
5211
6668
 
5212
6669
  /**
5213
6670
  * @license
@@ -5432,6 +6889,44 @@ class NullViewportScroller {
5432
6889
  class XhrFactory {
5433
6890
  }
5434
6891
 
6892
+ /**
6893
+ * @license
6894
+ * Copyright Google LLC All Rights Reserved.
6895
+ *
6896
+ * Use of this source code is governed by an MIT-style license that can be
6897
+ * found in the LICENSE file at https://angular.io/license
6898
+ */
6899
+ /**
6900
+ * Function that generates an ImageLoader for [Cloudflare Image
6901
+ * Resizing](https://developers.cloudflare.com/images/image-resizing/) and turns it into an Angular
6902
+ * provider. Note: Cloudflare has multiple image products - this provider is specifically for
6903
+ * Cloudflare Image Resizing; it will not work with Cloudflare Images or Cloudflare Polish.
6904
+ *
6905
+ * @param path Your domain name, e.g. https://mysite.com
6906
+ * @returns Provider that provides an ImageLoader function
6907
+ *
6908
+ * @publicApi
6909
+ */
6910
+ const provideCloudflareLoader = createImageLoader(createCloudflareUrl, ngDevMode ? ['https://<ZONE>/cdn-cgi/image/<OPTIONS>/<SOURCE-IMAGE>'] : undefined);
6911
+ // Exported for testing purposes in backport only. Not to be accessed except in unit tests.
6912
+ function createCloudflareUrl(path, config) {
6913
+ let params = `format=auto`;
6914
+ if (config.width) {
6915
+ params += `,width=${config.width}`;
6916
+ }
6917
+ // Cloudflare image URLs format:
6918
+ // https://developers.cloudflare.com/images/image-resizing/url-format/
6919
+ return `${path}/cdn-cgi/image/${params}/${config.src}`;
6920
+ }
6921
+
6922
+ /**
6923
+ * @license
6924
+ * Copyright Google LLC All Rights Reserved.
6925
+ *
6926
+ * Use of this source code is governed by an MIT-style license that can be
6927
+ * found in the LICENSE file at https://angular.io/license
6928
+ */
6929
+
5435
6930
  /**
5436
6931
  * @license
5437
6932
  * Copyright Google LLC All Rights Reserved.
@@ -5461,5 +6956,5 @@ class XhrFactory {
5461
6956
  * Generated bundle index. Do not edit.
5462
6957
  */
5463
6958
 
5464
- export { APP_BASE_HREF, AsyncPipe, CommonModule, CurrencyPipe, DATE_PIPE_DEFAULT_TIMEZONE, DOCUMENT, DatePipe, DecimalPipe, FormStyle, FormatWidth, HashLocationStrategy, I18nPluralPipe, I18nSelectPipe, JsonPipe, KeyValuePipe, LOCATION_INITIALIZED, Location, LocationStrategy, LowerCasePipe, NgClass, NgComponentOutlet, NgForOf, NgForOfContext, NgIf, NgIfContext, NgLocaleLocalization, NgLocalization, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NumberFormatStyle, NumberSymbol, PathLocationStrategy, PercentPipe, PlatformLocation, Plural, SlicePipe, TitleCasePipe, TranslationWidth, UpperCasePipe, VERSION, ViewportScroller, WeekDay, XhrFactory, formatCurrency, formatDate, formatNumber, formatPercent, getCurrencySymbol, getLocaleCurrencyCode, getLocaleCurrencyName, getLocaleCurrencySymbol, getLocaleDateFormat, getLocaleDateTimeFormat, getLocaleDayNames, getLocaleDayPeriods, getLocaleDirection, getLocaleEraNames, getLocaleExtraDayPeriodRules, getLocaleExtraDayPeriods, getLocaleFirstDayOfWeek, getLocaleId, getLocaleMonthNames, getLocaleNumberFormat, getLocaleNumberSymbol, getLocalePluralCase, getLocaleTimeFormat, getLocaleWeekEndRange, getNumberOfCurrencyDigits, isPlatformBrowser, isPlatformServer, isPlatformWorkerApp, isPlatformWorkerUi, registerLocaleData, BrowserPlatformLocation as ɵBrowserPlatformLocation, DomAdapter as ɵDomAdapter, NullViewportScroller as ɵNullViewportScroller, PLATFORM_BROWSER_ID as ɵPLATFORM_BROWSER_ID, PLATFORM_SERVER_ID as ɵPLATFORM_SERVER_ID, PLATFORM_WORKER_APP_ID as ɵPLATFORM_WORKER_APP_ID, PLATFORM_WORKER_UI_ID as ɵPLATFORM_WORKER_UI_ID, getDOM as ɵgetDOM, parseCookieValue as ɵparseCookieValue, setRootDomAdapter as ɵsetRootDomAdapter };
6959
+ export { APP_BASE_HREF, AsyncPipe, CommonModule, CurrencyPipe, DATE_PIPE_DEFAULT_TIMEZONE, DOCUMENT, DatePipe, DecimalPipe, FormStyle, FormatWidth, HashLocationStrategy, I18nPluralPipe, I18nSelectPipe, IMAGE_CONFIG, IMAGE_LOADER, JsonPipe, KeyValuePipe, LOCATION_INITIALIZED, Location, LocationStrategy, LowerCasePipe, NgClass, NgComponentOutlet, NgForOf, NgForOfContext, NgIf, NgIfContext, NgLocaleLocalization, NgLocalization, NgOptimizedImage, NgOptimizedImageModule, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NumberFormatStyle, NumberSymbol, PRECONNECT_CHECK_BLOCKLIST, PathLocationStrategy, PercentPipe, PlatformLocation, Plural, SlicePipe, TitleCasePipe, TranslationWidth, UpperCasePipe, VERSION, ViewportScroller, WeekDay, XhrFactory, formatCurrency, formatDate, formatNumber, formatPercent, getCurrencySymbol, getLocaleCurrencyCode, getLocaleCurrencyName, getLocaleCurrencySymbol, getLocaleDateFormat, getLocaleDateTimeFormat, getLocaleDayNames, getLocaleDayPeriods, getLocaleDirection, getLocaleEraNames, getLocaleExtraDayPeriodRules, getLocaleExtraDayPeriods, getLocaleFirstDayOfWeek, getLocaleId, getLocaleMonthNames, getLocaleNumberFormat, getLocaleNumberSymbol, getLocalePluralCase, getLocaleTimeFormat, getLocaleWeekEndRange, getNumberOfCurrencyDigits, isPlatformBrowser, isPlatformServer, isPlatformWorkerApp, isPlatformWorkerUi, provideCloudflareLoader, provideCloudinaryLoader, provideImageKitLoader, provideImgixLoader, registerLocaleData, BrowserPlatformLocation as ɵBrowserPlatformLocation, DomAdapter as ɵDomAdapter, NullViewportScroller as ɵNullViewportScroller, PLATFORM_BROWSER_ID as ɵPLATFORM_BROWSER_ID, PLATFORM_SERVER_ID as ɵPLATFORM_SERVER_ID, PLATFORM_WORKER_APP_ID as ɵPLATFORM_WORKER_APP_ID, PLATFORM_WORKER_UI_ID as ɵPLATFORM_WORKER_UI_ID, getDOM as ɵgetDOM, parseCookieValue as ɵparseCookieValue, setRootDomAdapter as ɵsetRootDomAdapter };
5465
6960
  //# sourceMappingURL=common.mjs.map