@angular/fire 21.0.0-rc.0-canary.ac3dd7c → 21.0.0-rc.0-canary.f54c0fe

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -46,7 +46,7 @@ interface Item {
46
46
  selector: 'app-root',
47
47
  template: `
48
48
  <ul>
49
- @for (item of (item$ | async); track item) {
49
+ @for (item of (items$ | async); track item) {
50
50
  <li>
51
51
  {{ item.name }}
52
52
  </li>
@@ -58,7 +58,7 @@ interface Item {
58
58
  export class AppComponent {
59
59
  firestore = inject(Firestore);
60
60
  itemCollection = collection(this.firestore, 'items');
61
- item$ = collectionData<Item>(itemCollection);
61
+ items$ = collectionData<Item>(this.itemCollection);
62
62
  }
63
63
  ```
64
64
 
@@ -66,6 +66,8 @@ export class AppComponent {
66
66
 
67
67
  [Quickstart](docs/install-and-setup.md) - Get your first application up and running by following our quickstart guide.
68
68
 
69
+ [Deploying SSR to App Hosting](docs/app-hosting.md) - Deploy a server-rendered app to Firebase App Hosting, and avoid the silent SSR-to-CSR fallback.
70
+
69
71
  [Contributing](CONTRIBUTING.md)
70
72
 
71
73
  [Stackblitz Template](https://stackblitz.com/edit/angular-fire-start) - Remember to set your Firebase configuration in `app/app.module.ts`.
@@ -174,9 +176,9 @@ import { } from '@angular/fire/app-check';
174
176
  <tr>
175
177
  <td>
176
178
 
177
- #### [Vertex AI](docs/vertexai.md#vertex-ai)
179
+ #### [AI Logic](docs/ai.md#ai-logic)
178
180
  ```ts
179
- import { } from '@angular/fire/vertexai';
181
+ import { } from '@angular/fire/ai';
180
182
  ```
181
183
  </td>
182
184
 
package/docs/ai.md ADDED
@@ -0,0 +1,53 @@
1
+ <small>
2
+ <a href="https://github.com/angular/angularfire">AngularFire</a> &#10097; <a href="../README.md#developer-guide">Developer Guide</a> &#10097; AI Logic
3
+ </small>
4
+
5
+ # AI Logic
6
+
7
+ Firebase AI Logic gives you access to the latest generative AI models from Google: the Gemini models and Imagen models.
8
+
9
+ [Learn more](https://firebase.google.com/docs/ai-logic)
10
+
11
+ ## Dependency Injection
12
+
13
+ As a prerequisite, ensure that `AngularFire` has been added to your project via
14
+ ```bash
15
+ ng add @angular/fire
16
+ ```
17
+
18
+ Provide an AI instance in the application's `app.config.ts`:
19
+
20
+ ```ts
21
+ import { provideFirebaseApp, initializeApp } from '@angular/fire/app';
22
+ import { provideAI, getAI } from '@angular/fire/ai';
23
+
24
+ export const appConfig: ApplicationConfig = {
25
+ providers: [
26
+ provideFirebaseApp(() => initializeApp({ ... })),
27
+ provideAI(() => getAI()),
28
+ ...
29
+ ],
30
+ ...,
31
+ }
32
+ ```
33
+
34
+ Next inject `AI` into your component:
35
+
36
+ ```typescript
37
+ import { Component, inject } from '@angular/core';
38
+ import { AI } from '@angular/fire/ai';
39
+
40
+ @Component({ ... })
41
+ export class MyComponent {
42
+ private ai = inject(AI);
43
+ ...
44
+ }
45
+ ```
46
+
47
+ ## Firebase API
48
+
49
+ AngularFire wraps the Firebase JS SDK to ensure proper functionality in Angular, while providing the same API.
50
+
51
+ Update the imports from `import { ... } from 'firebase/ai'` to `import { ... } from '@angular/fire/ai'` and follow the official documentation.
52
+
53
+ [Getting Started](https://firebase.google.com/docs/ai-logic/get-started?platform=web) | [API Reference](https://firebase.google.com/docs/reference/js/ai)
@@ -0,0 +1,95 @@
1
+ <small>
2
+ <a href="https://github.com/angular/angularfire">AngularFire</a> &#10097; <a href="../README.md#developer-guide">Developer Guide</a> &#10097; Deploying SSR to Firebase App Hosting
3
+ </small>
4
+
5
+ # Deploying a server-rendered app to Firebase App Hosting
6
+
7
+ [Firebase App Hosting](https://firebase.google.com/docs/app-hosting) is Firebase's recommended way to deploy a server-side-rendered (SSR) Angular application. It builds your app in Google Cloud Build, runs the Node server, and serves it behind Google's CDN and proxy. This applies to either way of deploying to App Hosting, a connected GitHub repository or `firebase deploy` from your own machine; both build the same way and are affected the same way.
8
+
9
+ This guide covers one thing that trips up almost every new SSR deployment: **the server can silently stop server-rendering and fall back to client-side rendering (CSR), with no error anywhere obvious.** It explains how to detect that in 30 seconds and how to fix it.
10
+
11
+ ## How to deploy
12
+
13
+ If you have not deployed yet, follow Firebase's own guides: [Get started with App Hosting](https://firebase.google.com/docs/app-hosting/get-started) to connect a GitHub repository (App Hosting builds and deploys on every push), or [Alternative ways to deploy](https://firebase.google.com/docs/app-hosting/alt-deploy) to deploy with `firebase deploy` from your own machine. Both build your app the same way in Google Cloud Build. The rest of this guide covers an Angular-specific issue you can hit once your app is deployed either way.
14
+
15
+ ## The symptom: SSR silently downgrades to CSR
16
+
17
+ A freshly deployed Angular SSR app usually *looks* fine in a browser, the page renders and works. But the server may be sending an almost-empty HTML shell and letting the browser do all the rendering. When that happens you lose the whole point of SSR: crawlers and link previews see no content, and first paint on slow devices is worse.
18
+
19
+ There is no error in the deploy output and no error in the browser. The only trace is in your backend's server logs, which nothing prompts you to check.
20
+
21
+ App Hosting runs on Cloud Run, not Cloud Functions, so its logs live in Cloud Logging:
22
+
23
+ - In the Firebase console, open your backend and go to its **Logs** tab, then look at **Runtime logs**.
24
+ - From a terminal, use `gcloud`:
25
+
26
+ ```bash
27
+ gcloud logging read 'resource.type=cloud_run_revision AND resource.labels.service_name=YOUR_BACKEND_ID' --project YOUR_PROJECT_ID --limit 10
28
+ ```
29
+
30
+ See Firebase's [View logs and metrics](https://firebase.google.com/docs/app-hosting/logging) guide for more.
31
+
32
+ ## The 30-second check to run after every deploy
33
+
34
+ Pick an SSR route (not an SSG/prerendered one) and fetch it:
35
+
36
+ ```bash
37
+ curl -s https://YOUR-SITE/ | grep ng-server-context
38
+ ```
39
+
40
+ Angular's server renderer stamps a `ng-server-context` attribute on the app's root element:
41
+
42
+ - `ng-server-context="ssr"` - the route was server-rendered (SSR). This is what you want.
43
+ - `ng-server-context="ssg"` - the route was prerendered (SSG). Fine in itself, but not the SSR path this guide is about.
44
+ - **No `ng-server-context` at all** - the server returned a client-only shell and the browser is doing all the rendering. This is the silent CSR fallback described above, regardless of how the page looks in a browser.
45
+
46
+ ## Why it happens
47
+
48
+ Angular's server engine only trusts the `X-Forwarded-*` headers a proxy attaches to a request when it is told to. App Hosting's proxy adds several of these headers (for example `x-forwarded-for` and `x-forwarded-proto`). If Angular does not trust the full set the platform sends, it treats the request as untrusted and de-optimizes to CSR on every request.
49
+
50
+ <!--
51
+ Maintainer note (2026-07-19): the two-step fix below is a workaround for a lag in
52
+ Firebase App Hosting's build image. The underlying fix (injecting the full
53
+ X-Forwarded-* set into NG_TRUST_PROXY_HEADERS) is already merged upstream in
54
+ GoogleCloudPlatform/buildpacks (commit 9346e60b, 2026-06-17) but had not reached
55
+ production builders as of 2026-07-19. Once it ships, `npm update` alone suffices
56
+ and the trustProxyHeaders step becomes optional; revisit and simplify this guide.
57
+ -->
58
+
59
+ ## The Fix
60
+
61
+ Two steps are needed together.
62
+
63
+ **1. Update Angular to the latest patch:**
64
+
65
+ ```bash
66
+ npm update @angular/core @angular/ssr
67
+ ```
68
+
69
+ **2. Turn on proxy-header trust when you create the server engine.** In `src/server.ts`, pass `trustProxyHeaders: true` to `AngularNodeAppEngine`:
70
+
71
+ ```ts
72
+ import { AngularNodeAppEngine } from '@angular/ssr/node';
73
+
74
+ const angularApp = new AngularNodeAppEngine({
75
+ trustProxyHeaders: true,
76
+ });
77
+ ```
78
+
79
+ Redeploy, then run the 30-second check above. You should now see `ng-server-context="ssr"`.
80
+
81
+ ### Why both steps
82
+
83
+ The two steps address different halves of the same handshake, and neither alone is enough:
84
+
85
+ - Recent Angular patches let the `trustProxyHeaders` engine option take effect on App Hosting; on older patches a platform environment variable wins instead, so the code option is ignored. The `npm update` gets you onto a patch where the option is honored.
86
+ - Even on the latest patch, you still have to *set* the option, so App Hosting's proxy headers are trusted.
87
+
88
+ This matches Firebase's own guidance. For the current, authoritative version of this fix (including any App Hosting or Angular version notes), see Firebase's [App Hosting troubleshooting guide](https://firebase.google.com/docs/app-hosting/troubleshooting#angular-proxy-trust).
89
+
90
+ > Note: App Hosting also has an experimental, opt-in local-build deploy option (you build on your own machine, then `firebase deploy`) in which the Firebase CLI applies this proxy-header configuration for you. It is off by default and not a documented, supported workflow, so this guide targets the standard source deploy; apply the fix above.
91
+
92
+ ## Related Angular documentation
93
+
94
+ - [Angular SSR guide](https://angular.dev/guide/ssr)
95
+ - [Configuring trusted proxy headers](https://angular.dev/best-practices/security#configuring-trusted-proxy-headers)
package/docs/auth.md CHANGED
@@ -106,7 +106,7 @@ import { Auth, User, user } from '@angular/fire/auth';
106
106
 
107
107
  export class UserComponent implements OnDestroy {
108
108
  private auth: Auth = inject(Auth);
109
- user$ = user(auth);
109
+ user$ = user(this.auth);
110
110
  userSubscription: Subscription;
111
111
  ...
112
112
 
@@ -136,7 +136,7 @@ import { Auth, authState } from '@angular/fire/auth';
136
136
 
137
137
  export class UserComponent implements OnDestroy {
138
138
  private auth: Auth = inject(Auth);
139
- authState$ = authState(auth);
139
+ authState$ = authState(this.auth);
140
140
  authStateSubscription: Subscription;
141
141
  ...
142
142
 
@@ -165,7 +165,7 @@ import { Auth, idToken } from '@angular/fire/auth';
165
165
 
166
166
  export class UserComponent implements OnDestroy {
167
167
  private auth: Auth = inject(Auth);
168
- idToken$ = idToken(auth);
168
+ idToken$ = idToken(this.auth);
169
169
  idTokenSubscription: Subscription;
170
170
  ...
171
171
 
package/docs/zones.md CHANGED
@@ -18,6 +18,37 @@ When an application is unstable change-detection, two-way binding, and rehydrati
18
18
 
19
19
  There are a number of situations where AngularFire's Zone wrapping is inconsequential such adding/deleting/updating a document in response to user-input, signing a user in, calling a Cloud Function, etc. So long as no long-lived side-effects are kicked off, your application should be ok. Most Promise based APIs are fairly safe without zone wrapping.
20
20
 
21
+ ## Keeping calls inside an injection context
22
+
23
+ A common way to trip the warning is calling an AngularFire API from inside an asynchronous callback, for example building a Firestore query inside a `switchMap` on the signed-in user. The surrounding service is created inside an injection context, but the callback runs *later*, after that context is gone, so AngularFire can no longer wrap the call.
24
+
25
+ Capture an `EnvironmentInjector` while the context is still active (any field initializer or constructor), then re-establish it inside the callback with [`runInInjectionContext`](https://angular.dev/api/core/runInInjectionContext):
26
+
27
+ ```ts
28
+ private readonly injector = inject(EnvironmentInjector);
29
+
30
+ readonly todos$ = this.user$.pipe(
31
+ switchMap((user) =>
32
+ runInInjectionContext(this.injector, () =>
33
+ collectionData(collection(this.firestore, `users/${user.uid}/todos`)),
34
+ ),
35
+ ),
36
+ );
37
+ ```
38
+
39
+ Inside `runInInjectionContext`, AngularFire can wrap the call again, so the SSR/change-detection guarantees are restored and the warning goes away.
40
+
41
+ If a call doesn't depend on the async value, prefer hoisting it out of the callback entirely and running it once where the injection context is still active:
42
+
43
+ ```ts
44
+ // Built once where the context is live, then reused, so no wrapping is needed:
45
+ private readonly items$ = collectionData(collection(this.firestore, "items"));
46
+
47
+ readonly refreshed$ = this.refresh$.pipe(switchMap(() => this.items$));
48
+ ```
49
+
50
+ Reach for `runInInjectionContext` only when the call genuinely must run inside the callback, as the per-user query above does (it needs the signed-in user's `uid`).
51
+
21
52
  ## Logging
22
53
 
23
54
  You may see a log warning, `Calling Firebase APIs outside of an Injection context may destabilize your application leading to subtle change-detection and hydration bugs. Find more at https://github.com/angular/angularfire/blob/main/docs/zones.md` when developing your application.
package/package.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "$schema": "../node_modules/ng-packagr/package.schema.json",
3
3
  "name": "@angular/fire",
4
- "version": "21.0.0-rc.0-canary.ac3dd7c",
4
+ "version": "21.0.0-rc.0-canary.f54c0fe",
5
5
  "description": "Angular + Firebase = ❤️",
6
+ "publishConfig": {
7
+ "registry": "https://wombat-dressing-room.appspot.com",
8
+ "access": "public"
9
+ },
6
10
  "schematics": "./schematics/collection.json",
7
11
  "builders": "./schematics/builders.json",
8
12
  "keywords": [
@@ -26,10 +30,9 @@
26
30
  "@angular/common": "^21.0.0",
27
31
  "@angular/core": "^21.0.0",
28
32
  "@angular/platform-browser": "^21.0.0",
29
- "@angular/platform-browser-dynamic": "^21.0.0",
30
33
  "@angular/platform-server": "^21.0.0",
31
34
  "rxjs": "~7.8.0",
32
- "firebase-tools": "^14.0.0"
35
+ "firebase-tools": "^14.0.0 || ^15.0.0"
33
36
  },
34
37
  "peerDependenciesMeta": {
35
38
  "firebase-tools": {
@@ -41,7 +44,7 @@
41
44
  },
42
45
  "dependencies": {
43
46
  "firebase": "^12.4.0",
44
- "rxfire": "^6.1.0",
47
+ "rxfire": "^6.2.0",
45
48
  "@angular-devkit/schematics": "^21.0.0",
46
49
  "@schematics/angular": "^21.0.0",
47
50
  "tslib": "^2.3.0"
package/publish.sh CHANGED
@@ -1 +1 @@
1
- npm publish . --tag canary
1
+ npm publish . --access public --registry https://wombat-dressing-room.appspot.com --tag canary
@@ -1 +1 @@
1
- var lt=Object.create;var G=Object.defineProperty;var ut=Object.getOwnPropertyDescriptor;var ft=Object.getOwnPropertyNames;var Et=Object.getPrototypeOf,ht=Object.prototype.hasOwnProperty;var p=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),pt=(t,e)=>{for(var r in e)G(t,r,{get:e[r],enumerable:!0})},me=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ft(e))!ht.call(t,n)&&n!==r&&G(t,n,{get:()=>e[n],enumerable:!(s=ut(e,n))||s.enumerable});return t};var mt=(t,e,r)=>(r=t!=null?lt(Et(t)):{},me(e||!t||!t.__esModule?G(r,"default",{value:t,enumerable:!0}):r,t)),$t=t=>me(G({},"__esModule",{value:!0}),t);var w=p((Li,$e)=>{"use strict";var Rt="2.0.0",It=Number.MAX_SAFE_INTEGER||9007199254740991,dt=16,Lt=250,Nt=["major","premajor","minor","preminor","patch","prepatch","prerelease"];$e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:dt,MAX_SAFE_BUILD_LENGTH:Lt,MAX_SAFE_INTEGER:It,RELEASE_TYPES:Nt,SEMVER_SPEC_VERSION:Rt,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var v=p((Ni,Re)=>{"use strict";var Ot=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Re.exports=Ot});var q=p((A,Ie)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:z,MAX_SAFE_BUILD_LENGTH:St,MAX_LENGTH:Tt}=w(),At=v();A=Ie.exports={};var gt=A.re=[],qt=A.safeRe=[],a=A.src=[],wt=A.safeSrc=[],l=A.t={},vt=0,K="[a-zA-Z0-9-]",xt=[["\\s",1],["\\d",Tt],[K,St]],Pt=t=>{for(let[e,r]of xt)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},m=(t,e,r)=>{let s=Pt(e),n=vt++;At(t,n,e),l[t]=n,a[n]=e,wt[n]=s,gt[n]=new RegExp(e,r?"g":void 0),qt[n]=new RegExp(s,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*");m("NUMERICIDENTIFIERLOOSE","\\d+");m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${K}*`);m("MAINVERSION",`(${a[l.NUMERICIDENTIFIER]})\\.(${a[l.NUMERICIDENTIFIER]})\\.(${a[l.NUMERICIDENTIFIER]})`);m("MAINVERSIONLOOSE",`(${a[l.NUMERICIDENTIFIERLOOSE]})\\.(${a[l.NUMERICIDENTIFIERLOOSE]})\\.(${a[l.NUMERICIDENTIFIERLOOSE]})`);m("PRERELEASEIDENTIFIER",`(?:${a[l.NONNUMERICIDENTIFIER]}|${a[l.NUMERICIDENTIFIER]})`);m("PRERELEASEIDENTIFIERLOOSE",`(?:${a[l.NONNUMERICIDENTIFIER]}|${a[l.NUMERICIDENTIFIERLOOSE]})`);m("PRERELEASE",`(?:-(${a[l.PRERELEASEIDENTIFIER]}(?:\\.${a[l.PRERELEASEIDENTIFIER]})*))`);m("PRERELEASELOOSE",`(?:-?(${a[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[l.PRERELEASEIDENTIFIERLOOSE]})*))`);m("BUILDIDENTIFIER",`${K}+`);m("BUILD",`(?:\\+(${a[l.BUILDIDENTIFIER]}(?:\\.${a[l.BUILDIDENTIFIER]})*))`);m("FULLPLAIN",`v?${a[l.MAINVERSION]}${a[l.PRERELEASE]}?${a[l.BUILD]}?`);m("FULL",`^${a[l.FULLPLAIN]}$`);m("LOOSEPLAIN",`[v=\\s]*${a[l.MAINVERSIONLOOSE]}${a[l.PRERELEASELOOSE]}?${a[l.BUILD]}?`);m("LOOSE",`^${a[l.LOOSEPLAIN]}$`);m("GTLT","((?:<|>)?=?)");m("XRANGEIDENTIFIERLOOSE",`${a[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);m("XRANGEIDENTIFIER",`${a[l.NUMERICIDENTIFIER]}|x|X|\\*`);m("XRANGEPLAIN",`[v=\\s]*(${a[l.XRANGEIDENTIFIER]})(?:\\.(${a[l.XRANGEIDENTIFIER]})(?:\\.(${a[l.XRANGEIDENTIFIER]})(?:${a[l.PRERELEASE]})?${a[l.BUILD]}?)?)?`);m("XRANGEPLAINLOOSE",`[v=\\s]*(${a[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[l.XRANGEIDENTIFIERLOOSE]})(?:${a[l.PRERELEASELOOSE]})?${a[l.BUILD]}?)?)?`);m("XRANGE",`^${a[l.GTLT]}\\s*${a[l.XRANGEPLAIN]}$`);m("XRANGELOOSE",`^${a[l.GTLT]}\\s*${a[l.XRANGEPLAINLOOSE]}$`);m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${z}})(?:\\.(\\d{1,${z}}))?(?:\\.(\\d{1,${z}}))?`);m("COERCE",`${a[l.COERCEPLAIN]}(?:$|[^\\d])`);m("COERCEFULL",a[l.COERCEPLAIN]+`(?:${a[l.PRERELEASE]})?(?:${a[l.BUILD]})?(?:$|[^\\d])`);m("COERCERTL",a[l.COERCE],!0);m("COERCERTLFULL",a[l.COERCEFULL],!0);m("LONETILDE","(?:~>?)");m("TILDETRIM",`(\\s*)${a[l.LONETILDE]}\\s+`,!0);A.tildeTrimReplace="$1~";m("TILDE",`^${a[l.LONETILDE]}${a[l.XRANGEPLAIN]}$`);m("TILDELOOSE",`^${a[l.LONETILDE]}${a[l.XRANGEPLAINLOOSE]}$`);m("LONECARET","(?:\\^)");m("CARETTRIM",`(\\s*)${a[l.LONECARET]}\\s+`,!0);A.caretTrimReplace="$1^";m("CARET",`^${a[l.LONECARET]}${a[l.XRANGEPLAIN]}$`);m("CARETLOOSE",`^${a[l.LONECARET]}${a[l.XRANGEPLAINLOOSE]}$`);m("COMPARATORLOOSE",`^${a[l.GTLT]}\\s*(${a[l.LOOSEPLAIN]})$|^$`);m("COMPARATOR",`^${a[l.GTLT]}\\s*(${a[l.FULLPLAIN]})$|^$`);m("COMPARATORTRIM",`(\\s*)${a[l.GTLT]}\\s*(${a[l.LOOSEPLAIN]}|${a[l.XRANGEPLAIN]})`,!0);A.comparatorTrimReplace="$1$2$3";m("HYPHENRANGE",`^\\s*(${a[l.XRANGEPLAIN]})\\s+-\\s+(${a[l.XRANGEPLAIN]})\\s*$`);m("HYPHENRANGELOOSE",`^\\s*(${a[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[l.XRANGEPLAINLOOSE]})\\s*$`);m("STAR","(<|>)?=?\\s*\\*");m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var j=p((Oi,de)=>{"use strict";var Ct=Object.freeze({loose:!0}),Dt=Object.freeze({}),yt=t=>t?typeof t!="object"?Ct:t:Dt;de.exports=yt});var Z=p((Si,Oe)=>{"use strict";var Le=/^[0-9]+$/,Ne=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=Le.test(t),s=Le.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},Gt=(t,e)=>Ne(e,t);Oe.exports={compareIdentifiers:Ne,rcompareIdentifiers:Gt}});var d=p((Ti,Te)=>{"use strict";var F=v(),{MAX_LENGTH:Se,MAX_SAFE_INTEGER:X}=w(),{safeRe:U,t:V}=q(),jt=j(),{compareIdentifiers:J}=Z(),Q=class t{constructor(e,r){if(r=jt(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Se)throw new TypeError(`version is longer than ${Se} characters`);F("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?U[V.LOOSE]:U[V.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>X||this.major<0)throw new TypeError("Invalid major version");if(this.minor>X||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>X||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<X)return i}return n}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(F("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let s=this.prerelease[r],n=e.prerelease[r];if(F("prerelease compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return J(s,n)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],n=e.build[r];if(F("build compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return J(s,n)}while(++r)}inc(e,r,s){if(e.startsWith("pre")){if(!r&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let n=`-${r}`.match(this.options.loose?U[V.PRERELEASELOOSE]:U[V.PRERELEASE]);if(!n||n[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,s),this.inc("pre",r,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,s),this.inc("pre",r,s);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let n=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(r){let i=[r,n];s===!1&&(i=[r]),J(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Te.exports=Q});var g=p((Ai,ge)=>{"use strict";var Ae=d(),Ft=(t,e,r=!1)=>{if(t instanceof Ae)return t;try{return new Ae(t,e)}catch(s){if(!r)return null;throw s}};ge.exports=Ft});var we=p((gi,qe)=>{"use strict";var Xt=g(),Ut=(t,e)=>{let r=Xt(t,e);return r?r.version:null};qe.exports=Ut});var xe=p((qi,ve)=>{"use strict";var Vt=g(),bt=(t,e)=>{let r=Vt(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};ve.exports=bt});var De=p((wi,Ce)=>{"use strict";var Pe=d(),_t=(t,e,r,s,n)=>{typeof r=="string"&&(n=s,s=r,r=void 0);try{return new Pe(t instanceof Pe?t.version:t,r).inc(e,s,n).version}catch(i){return null}};Ce.exports=_t});var je=p((vi,Ge)=>{"use strict";var ye=g(),kt=(t,e)=>{let r=ye(t,null,!0),s=ye(e,null,!0),n=r.compare(s);if(n===0)return null;let i=n>0,o=i?r:s,c=i?s:r,u=!!o.prerelease.length;if(!!c.prerelease.length&&!u){if(!c.patch&&!c.minor)return"major";if(c.compareMain(o)===0)return c.minor&&!c.patch?"minor":"patch"}let $=u?"pre":"";return r.major!==s.major?$+"major":r.minor!==s.minor?$+"minor":r.patch!==s.patch?$+"patch":"prerelease"};Ge.exports=kt});var Xe=p((xi,Fe)=>{"use strict";var Ht=d(),Mt=(t,e)=>new Ht(t,e).major;Fe.exports=Mt});var Ve=p((Pi,Ue)=>{"use strict";var Yt=d(),Bt=(t,e)=>new Yt(t,e).minor;Ue.exports=Bt});var _e=p((Ci,be)=>{"use strict";var Wt=d(),zt=(t,e)=>new Wt(t,e).patch;be.exports=zt});var He=p((Di,ke)=>{"use strict";var Kt=g(),Zt=(t,e)=>{let r=Kt(t,e);return r&&r.prerelease.length?r.prerelease:null};ke.exports=Zt});var S=p((yi,Ye)=>{"use strict";var Me=d(),Jt=(t,e,r)=>new Me(t,r).compare(new Me(e,r));Ye.exports=Jt});var We=p((Gi,Be)=>{"use strict";var Qt=S(),es=(t,e,r)=>Qt(e,t,r);Be.exports=es});var Ke=p((ji,ze)=>{"use strict";var rs=S(),ts=(t,e)=>rs(t,e,!0);ze.exports=ts});var b=p((Fi,Je)=>{"use strict";var Ze=d(),ss=(t,e,r)=>{let s=new Ze(t,r),n=new Ze(e,r);return s.compare(n)||s.compareBuild(n)};Je.exports=ss});var er=p((Xi,Qe)=>{"use strict";var ns=b(),is=(t,e)=>t.sort((r,s)=>ns(r,s,e));Qe.exports=is});var tr=p((Ui,rr)=>{"use strict";var os=b(),cs=(t,e)=>t.sort((r,s)=>os(s,r,e));rr.exports=cs});var x=p((Vi,sr)=>{"use strict";var as=S(),ls=(t,e,r)=>as(t,e,r)>0;sr.exports=ls});var _=p((bi,nr)=>{"use strict";var us=S(),fs=(t,e,r)=>us(t,e,r)<0;nr.exports=fs});var ee=p((_i,ir)=>{"use strict";var Es=S(),hs=(t,e,r)=>Es(t,e,r)===0;ir.exports=hs});var re=p((ki,or)=>{"use strict";var ps=S(),ms=(t,e,r)=>ps(t,e,r)!==0;or.exports=ms});var k=p((Hi,cr)=>{"use strict";var $s=S(),Rs=(t,e,r)=>$s(t,e,r)>=0;cr.exports=Rs});var H=p((Mi,ar)=>{"use strict";var Is=S(),ds=(t,e,r)=>Is(t,e,r)<=0;ar.exports=ds});var te=p((Yi,lr)=>{"use strict";var Ls=ee(),Ns=re(),Os=x(),Ss=k(),Ts=_(),As=H(),gs=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return Ls(t,r,s);case"!=":return Ns(t,r,s);case">":return Os(t,r,s);case">=":return Ss(t,r,s);case"<":return Ts(t,r,s);case"<=":return As(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};lr.exports=gs});var fr=p((Bi,ur)=>{"use strict";var qs=d(),ws=g(),{safeRe:M,t:Y}=q(),vs=(t,e)=>{if(t instanceof qs)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?M[Y.COERCEFULL]:M[Y.COERCE]);else{let u=e.includePrerelease?M[Y.COERCERTLFULL]:M[Y.COERCERTL],f;for(;(f=u.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||f.index+f[0].length!==r.index+r[0].length)&&(r=f),u.lastIndex=f.index+f[1].length+f[2].length;u.lastIndex=-1}if(r===null)return null;let s=r[2],n=r[3]||"0",i=r[4]||"0",o=e.includePrerelease&&r[5]?`-${r[5]}`:"",c=e.includePrerelease&&r[6]?`+${r[6]}`:"";return ws(`${s}.${n}.${i}${o}${c}`,e)};ur.exports=vs});var hr=p((Wi,Er)=>{"use strict";var se=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,r)}return this}};Er.exports=se});var T=p((zi,Rr)=>{"use strict";var xs=/\s+/g,ne=class t{constructor(e,r){if(r=Cs(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof ie)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(xs," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(n=>!mr(n[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&Us(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let s=0;s<r.length;s++)s>0&&(this.formatted+=" "),this.formatted+=r[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&Fs)|(this.options.loose&&Xs))+":"+e,n=pr.get(s);if(n)return n;let i=this.options.loose,o=i?N[L.HYPHENRANGELOOSE]:N[L.HYPHENRANGE];e=e.replace(o,zs(this.options.includePrerelease)),R("hyphen replace",e),e=e.replace(N[L.COMPARATORTRIM],ys),R("comparator trim",e),e=e.replace(N[L.TILDETRIM],Gs),R("tilde trim",e),e=e.replace(N[L.CARETTRIM],js),R("caret trim",e);let c=e.split(" ").map(E=>Vs(E,this.options)).join(" ").split(/\s+/).map(E=>Ws(E,this.options));i&&(c=c.filter(E=>(R("loose invalid filter",E,this.options),!!E.match(N[L.COMPARATORLOOSE])))),R("range list",c);let u=new Map,f=c.map(E=>new ie(E,this.options));for(let E of f){if(mr(E))return[E];u.set(E.value,E)}u.size>1&&u.has("")&&u.delete("");let $=[...u.values()];return pr.set(s,$),$}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>$r(s,r)&&e.set.some(n=>$r(n,r)&&s.every(i=>n.every(o=>i.intersects(o,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Ds(e,this.options)}catch(r){return!1}for(let r=0;r<this.set.length;r++)if(Ks(this.set[r],e,this.options))return!0;return!1}};Rr.exports=ne;var Ps=hr(),pr=new Ps,Cs=j(),ie=P(),R=v(),Ds=d(),{safeRe:N,t:L,comparatorTrimReplace:ys,tildeTrimReplace:Gs,caretTrimReplace:js}=q(),{FLAG_INCLUDE_PRERELEASE:Fs,FLAG_LOOSE:Xs}=w(),mr=t=>t.value==="<0.0.0-0",Us=t=>t.value==="",$r=(t,e)=>{let r=!0,s=t.slice(),n=s.pop();for(;r&&s.length;)r=s.every(i=>n.intersects(i,e)),n=s.pop();return r},Vs=(t,e)=>(t=t.replace(N[L.BUILD],""),R("comp",t,e),t=ks(t,e),R("caret",t),t=bs(t,e),R("tildes",t),t=Ms(t,e),R("xrange",t),t=Bs(t,e),R("stars",t),t),O=t=>!t||t.toLowerCase()==="x"||t==="*",bs=(t,e)=>t.trim().split(/\s+/).map(r=>_s(r,e)).join(" "),_s=(t,e)=>{let r=e.loose?N[L.TILDELOOSE]:N[L.TILDE];return t.replace(r,(s,n,i,o,c)=>{R("tilde",t,s,n,i,o,c);let u;return O(n)?u="":O(i)?u=`>=${n}.0.0 <${+n+1}.0.0-0`:O(o)?u=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:c?(R("replaceTilde pr",c),u=`>=${n}.${i}.${o}-${c} <${n}.${+i+1}.0-0`):u=`>=${n}.${i}.${o} <${n}.${+i+1}.0-0`,R("tilde return",u),u})},ks=(t,e)=>t.trim().split(/\s+/).map(r=>Hs(r,e)).join(" "),Hs=(t,e)=>{R("caret",t,e);let r=e.loose?N[L.CARETLOOSE]:N[L.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(n,i,o,c,u)=>{R("caret",t,n,i,o,c,u);let f;return O(i)?f="":O(o)?f=`>=${i}.0.0${s} <${+i+1}.0.0-0`:O(c)?i==="0"?f=`>=${i}.${o}.0${s} <${i}.${+o+1}.0-0`:f=`>=${i}.${o}.0${s} <${+i+1}.0.0-0`:u?(R("replaceCaret pr",u),i==="0"?o==="0"?f=`>=${i}.${o}.${c}-${u} <${i}.${o}.${+c+1}-0`:f=`>=${i}.${o}.${c}-${u} <${i}.${+o+1}.0-0`:f=`>=${i}.${o}.${c}-${u} <${+i+1}.0.0-0`):(R("no pr"),i==="0"?o==="0"?f=`>=${i}.${o}.${c}${s} <${i}.${o}.${+c+1}-0`:f=`>=${i}.${o}.${c}${s} <${i}.${+o+1}.0-0`:f=`>=${i}.${o}.${c} <${+i+1}.0.0-0`),R("caret return",f),f})},Ms=(t,e)=>(R("replaceXRanges",t,e),t.split(/\s+/).map(r=>Ys(r,e)).join(" ")),Ys=(t,e)=>{t=t.trim();let r=e.loose?N[L.XRANGELOOSE]:N[L.XRANGE];return t.replace(r,(s,n,i,o,c,u)=>{R("xRange",t,s,n,i,o,c,u);let f=O(i),$=f||O(o),E=$||O(c),I=E;return n==="="&&I&&(n=""),u=e.includePrerelease?"-0":"",f?n===">"||n==="<"?s="<0.0.0-0":s="*":n&&I?($&&(o=0),c=0,n===">"?(n=">=",$?(i=+i+1,o=0,c=0):(o=+o+1,c=0)):n==="<="&&(n="<",$?i=+i+1:o=+o+1),n==="<"&&(u="-0"),s=`${n+i}.${o}.${c}${u}`):$?s=`>=${i}.0.0${u} <${+i+1}.0.0-0`:E&&(s=`>=${i}.${o}.0${u} <${i}.${+o+1}.0-0`),R("xRange return",s),s})},Bs=(t,e)=>(R("replaceStars",t,e),t.trim().replace(N[L.STAR],"")),Ws=(t,e)=>(R("replaceGTE0",t,e),t.trim().replace(N[e.includePrerelease?L.GTE0PRE:L.GTE0],"")),zs=t=>(e,r,s,n,i,o,c,u,f,$,E,I)=>(O(s)?r="":O(n)?r=`>=${s}.0.0${t?"-0":""}`:O(i)?r=`>=${s}.${n}.0${t?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,O(f)?u="":O($)?u=`<${+f+1}.0.0-0`:O(E)?u=`<${f}.${+$+1}.0-0`:I?u=`<=${f}.${$}.${E}-${I}`:t?u=`<${f}.${$}.${+E+1}-0`:u=`<=${u}`,`${r} ${u}`.trim()),Ks=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(R(t[s].semver),t[s].semver!==ie.ANY&&t[s].semver.prerelease.length>0){let n=t[s].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var P=p((Ki,Sr)=>{"use strict";var C=Symbol("SemVer ANY"),ae=class t{static get ANY(){return C}constructor(e,r){if(r=Ir(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),ce("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===C?this.value="":this.value=this.operator+this.semver.version,ce("comp",this)}parse(e){let r=this.options.loose?dr[Lr.COMPARATORLOOSE]:dr[Lr.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new Nr(s[2],this.options.loose):this.semver=C}toString(){return this.value}test(e){if(ce("Comparator.test",e,this.options.loose),this.semver===C||e===C)return!0;if(typeof e=="string")try{e=new Nr(e,this.options)}catch(r){return!1}return oe(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Or(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Or(this.value,r).test(e.semver):(r=Ir(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||oe(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||oe(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Sr.exports=ae;var Ir=j(),{safeRe:dr,t:Lr}=q(),oe=te(),ce=v(),Nr=d(),Or=T()});var D=p((Zi,Tr)=>{"use strict";var Zs=T(),Js=(t,e,r)=>{try{e=new Zs(e,r)}catch(s){return!1}return e.test(t)};Tr.exports=Js});var gr=p((Ji,Ar)=>{"use strict";var Qs=T(),en=(t,e)=>new Qs(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Ar.exports=en});var wr=p((Qi,qr)=>{"use strict";var rn=d(),tn=T(),sn=(t,e,r)=>{let s=null,n=null,i=null;try{i=new tn(e,r)}catch(o){return null}return t.forEach(o=>{i.test(o)&&(!s||n.compare(o)===-1)&&(s=o,n=new rn(s,r))}),s};qr.exports=sn});var xr=p((eo,vr)=>{"use strict";var nn=d(),on=T(),cn=(t,e,r)=>{let s=null,n=null,i=null;try{i=new on(e,r)}catch(o){return null}return t.forEach(o=>{i.test(o)&&(!s||n.compare(o)===1)&&(s=o,n=new nn(s,r))}),s};vr.exports=cn});var Dr=p((ro,Cr)=>{"use strict";var le=d(),an=T(),Pr=x(),ln=(t,e)=>{t=new an(t,e);let r=new le("0.0.0");if(t.test(r)||(r=new le("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let n=t.set[s],i=null;n.forEach(o=>{let c=new le(o.semver.version);switch(o.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!i||Pr(c,i))&&(i=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!r||Pr(r,i))&&(r=i)}return r&&t.test(r)?r:null};Cr.exports=ln});var Gr=p((to,yr)=>{"use strict";var un=T(),fn=(t,e)=>{try{return new un(t,e).range||"*"}catch(r){return null}};yr.exports=fn});var B=p((so,Ur)=>{"use strict";var En=d(),Xr=P(),{ANY:hn}=Xr,pn=T(),mn=D(),jr=x(),Fr=_(),$n=H(),Rn=k(),In=(t,e,r,s)=>{t=new En(t,s),e=new pn(e,s);let n,i,o,c,u;switch(r){case">":n=jr,i=$n,o=Fr,c=">",u=">=";break;case"<":n=Fr,i=Rn,o=jr,c="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(mn(t,e,s))return!1;for(let f=0;f<e.set.length;++f){let $=e.set[f],E=null,I=null;if($.forEach(h=>{h.semver===hn&&(h=new Xr(">=0.0.0")),E=E||h,I=I||h,n(h.semver,E.semver,s)?E=h:o(h.semver,I.semver,s)&&(I=h)}),E.operator===c||E.operator===u||(!I.operator||I.operator===c)&&i(t,I.semver))return!1;if(I.operator===u&&o(t,I.semver))return!1}return!0};Ur.exports=In});var br=p((no,Vr)=>{"use strict";var dn=B(),Ln=(t,e,r)=>dn(t,e,">",r);Vr.exports=Ln});var kr=p((io,_r)=>{"use strict";var Nn=B(),On=(t,e,r)=>Nn(t,e,"<",r);_r.exports=On});var Yr=p((oo,Mr)=>{"use strict";var Hr=T(),Sn=(t,e,r)=>(t=new Hr(t,r),e=new Hr(e,r),t.intersects(e,r));Mr.exports=Sn});var Wr=p((co,Br)=>{"use strict";var Tn=D(),An=S();Br.exports=(t,e,r)=>{let s=[],n=null,i=null,o=t.sort(($,E)=>An($,E,r));for(let $ of o)Tn($,e,r)?(i=$,n||(n=$)):(i&&s.push([n,i]),i=null,n=null);n&&s.push([n,null]);let c=[];for(let[$,E]of s)$===E?c.push($):!E&&$===o[0]?c.push("*"):E?$===o[0]?c.push(`<=${E}`):c.push(`${$} - ${E}`):c.push(`>=${$}`);let u=c.join(" || "),f=typeof e.raw=="string"?e.raw:String(e);return u.length<f.length?u:e}});var et=p((ao,Qr)=>{"use strict";var zr=T(),fe=P(),{ANY:ue}=fe,y=D(),Ee=S(),gn=(t,e,r={})=>{if(t===e)return!0;t=new zr(t,r),e=new zr(e,r);let s=!1;e:for(let n of t.set){for(let i of e.set){let o=wn(n,i,r);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},qn=[new fe(">=0.0.0-0")],Kr=[new fe(">=0.0.0")],wn=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===ue){if(e.length===1&&e[0].semver===ue)return!0;r.includePrerelease?t=qn:t=Kr}if(e.length===1&&e[0].semver===ue){if(r.includePrerelease)return!0;e=Kr}let s=new Set,n,i;for(let h of t)h.operator===">"||h.operator===">="?n=Zr(n,h,r):h.operator==="<"||h.operator==="<="?i=Jr(i,h,r):s.add(h.semver);if(s.size>1)return null;let o;if(n&&i){if(o=Ee(n.semver,i.semver,r),o>0)return null;if(o===0&&(n.operator!==">="||i.operator!=="<="))return null}for(let h of s){if(n&&!y(h,String(n),r)||i&&!y(h,String(i),r))return null;for(let at of e)if(!y(h,String(at),r))return!1;return!0}let c,u,f,$,E=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1,I=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1;E&&E.prerelease.length===1&&i.operator==="<"&&E.prerelease[0]===0&&(E=!1);for(let h of e){if($=$||h.operator===">"||h.operator===">=",f=f||h.operator==="<"||h.operator==="<=",n){if(I&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===I.major&&h.semver.minor===I.minor&&h.semver.patch===I.patch&&(I=!1),h.operator===">"||h.operator===">="){if(c=Zr(n,h,r),c===h&&c!==n)return!1}else if(n.operator===">="&&!y(n.semver,String(h),r))return!1}if(i){if(E&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===E.major&&h.semver.minor===E.minor&&h.semver.patch===E.patch&&(E=!1),h.operator==="<"||h.operator==="<="){if(u=Jr(i,h,r),u===h&&u!==i)return!1}else if(i.operator==="<="&&!y(i.semver,String(h),r))return!1}if(!h.operator&&(i||n)&&o!==0)return!1}return!(n&&f&&!i&&o!==0||i&&$&&!n&&o!==0||I||E)},Zr=(t,e,r)=>{if(!t)return e;let s=Ee(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},Jr=(t,e,r)=>{if(!t)return e;let s=Ee(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};Qr.exports=gn});var nt=p((lo,st)=>{"use strict";var he=q(),rt=w(),vn=d(),tt=Z(),xn=g(),Pn=we(),Cn=xe(),Dn=De(),yn=je(),Gn=Xe(),jn=Ve(),Fn=_e(),Xn=He(),Un=S(),Vn=We(),bn=Ke(),_n=b(),kn=er(),Hn=tr(),Mn=x(),Yn=_(),Bn=ee(),Wn=re(),zn=k(),Kn=H(),Zn=te(),Jn=fr(),Qn=P(),ei=T(),ri=D(),ti=gr(),si=wr(),ni=xr(),ii=Dr(),oi=Gr(),ci=B(),ai=br(),li=kr(),ui=Yr(),fi=Wr(),Ei=et();st.exports={parse:xn,valid:Pn,clean:Cn,inc:Dn,diff:yn,major:Gn,minor:jn,patch:Fn,prerelease:Xn,compare:Un,rcompare:Vn,compareLoose:bn,compareBuild:_n,sort:kn,rsort:Hn,gt:Mn,lt:Yn,eq:Bn,neq:Wn,gte:zn,lte:Kn,cmp:Zn,coerce:Jn,Comparator:Qn,Range:ei,satisfies:ri,toComparators:ti,maxSatisfying:si,minSatisfying:ni,minVersion:ii,validRange:oi,outside:ci,gtr:ai,ltr:li,intersects:ui,simplifyRange:fi,subset:Ei,SemVer:vn,re:he.re,src:he.src,tokens:he.t,SEMVER_SPEC_VERSION:rt.SEMVER_SPEC_VERSION,RELEASE_TYPES:rt.RELEASE_TYPES,compareIdentifiers:tt.compareIdentifiers,rcompareIdentifiers:tt.rcompareIdentifiers}});var Ii={};pt(Ii,{ngAdd:()=>Ri});module.exports=$t(Ii);var W=require("@angular-devkit/schematics/tasks");var pe=require("@angular-devkit/schematics"),it=mt(nt());var hi=t=>JSON.stringify(t,null,2),pi=(t,e,r)=>{t.exists(e)?t.overwrite(e,r):t.create(e,r)};function mi(t,e){try{return JSON.parse(e.read(t).toString())}catch(r){throw new pe.SchematicsException(`Error when parsing ${t}: ${r.message}`)}}var ot=(t,e,r)=>{var n,i;let s=t.exists("package.json")&&mi("package.json",t);if(s===void 0)throw new pe.SchematicsException("Could not locate package.json");(n=s.devDependencies)!=null||(s.devDependencies={}),(i=s.dependencies)!=null||(s.dependencies={}),Object.keys(e).forEach(o=>{let c=e[o],u=c.dev?s.devDependencies:s.dependencies,f=u[o];if(f)try{(0,it.intersects)(f,c.version)||r.logger.warn(`\u26A0\uFE0F The ${o} devDependency specified in your package.json (${f}) does not fulfill AngularFire's dependency (${c.version})`)}catch($){f!==c.version&&r.logger.warn(`\u26A0\uFE0F The ${o} devDependency specified in your package.json (${f}) does not fulfill AngularFire's dependency (${c.version})`)}else u[o]=c.version}),pi(t,"package.json",hi(s))};var ct={};var Ri=t=>(e,r)=>{ot(e,ct,r);let s=r.addTask(new W.NodePackageInstallTask);return r.addTask(new W.RunSchematicTask("ng-add-setup-project",t),[s]),e};0&&(module.exports={ngAdd});
1
+ var mt=Object.create;var G=Object.defineProperty;var $t=Object.getOwnPropertyDescriptor;var Rt=Object.getOwnPropertyNames;var dt=Object.getPrototypeOf,It=Object.prototype.hasOwnProperty;var p=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),gt=(t,e)=>{for(var r in e)G(t,r,{get:e[r],enumerable:!0})},ge=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Rt(e))!It.call(t,n)&&n!==r&&G(t,n,{get:()=>e[n],enumerable:!(s=$t(e,n))||s.enumerable});return t};var Lt=(t,e,r)=>(r=t!=null?mt(dt(t)):{},ge(e||!t||!t.__esModule?G(r,"default",{value:t,enumerable:!0}):r,t)),Nt=t=>ge(G({},"__esModule",{value:!0}),t);var P=p((Oi,Le)=>{"use strict";var St="2.0.0",Ot=Number.MAX_SAFE_INTEGER||9007199254740991,Tt=16,At=250,wt=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Le.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Tt,MAX_SAFE_BUILD_LENGTH:At,MAX_SAFE_INTEGER:Ot,RELEASE_TYPES:wt,SEMVER_SPEC_VERSION:St,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var x=p((Ti,Ne)=>{"use strict";var qt=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Ne.exports=qt});var q=p((T,Se)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:ee,MAX_SAFE_BUILD_LENGTH:vt,MAX_LENGTH:Pt}=P(),xt=x();T=Se.exports={};var Ct=T.re=[],Dt=T.safeRe=[],c=T.src=[],yt=T.safeSrc=[],l=T.t={},jt=0,re="[a-zA-Z0-9-]",Ft=[["\\s",1],["\\d",Pt],[re,vt]],Gt=t=>{for(let[e,r]of Ft)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},m=(t,e,r)=>{let s=Gt(e),n=jt++;xt(t,n,e),l[t]=n,c[n]=e,yt[n]=s,Ct[n]=new RegExp(e,r?"g":void 0),Dt[n]=new RegExp(s,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*");m("NUMERICIDENTIFIERLOOSE","\\d+");m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${re}*`);m("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`);m("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`);m("PRERELEASEIDENTIFIER",`(?:${c[l.NONNUMERICIDENTIFIER]}|${c[l.NUMERICIDENTIFIER]})`);m("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NONNUMERICIDENTIFIER]}|${c[l.NUMERICIDENTIFIERLOOSE]})`);m("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`);m("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`);m("BUILDIDENTIFIER",`${re}+`);m("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`);m("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`);m("FULL",`^${c[l.FULLPLAIN]}$`);m("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`);m("LOOSE",`^${c[l.LOOSEPLAIN]}$`);m("GTLT","((?:<|>)?=?)");m("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);m("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`);m("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`);m("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`);m("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`);m("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`);m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${ee}})(?:\\.(\\d{1,${ee}}))?(?:\\.(\\d{1,${ee}}))?`);m("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`);m("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`);m("COERCERTL",c[l.COERCE],!0);m("COERCERTLFULL",c[l.COERCEFULL],!0);m("LONETILDE","(?:~>?)");m("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0);T.tildeTrimReplace="$1~";m("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`);m("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`);m("LONECARET","(?:\\^)");m("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0);T.caretTrimReplace="$1^";m("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`);m("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`);m("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`);m("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`);m("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0);T.comparatorTrimReplace="$1$2$3";m("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`);m("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`);m("STAR","(<|>)?=?\\s*\\*");m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var b=p((Ai,Oe)=>{"use strict";var bt=Object.freeze({loose:!0}),Ut=Object.freeze({}),Vt=t=>t?typeof t!="object"?bt:t:Ut;Oe.exports=Vt});var te=p((wi,we)=>{"use strict";var Te=/^[0-9]+$/,Ae=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=Te.test(t),s=Te.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},Xt=(t,e)=>Ae(e,t);we.exports={compareIdentifiers:Ae,rcompareIdentifiers:Xt}});var I=p((qi,ve)=>{"use strict";var U=x(),{MAX_LENGTH:qe,MAX_SAFE_INTEGER:V}=P(),{safeRe:X,t:k}=q(),kt=b(),{compareIdentifiers:se}=te(),ne=class t{constructor(e,r){if(r=kt(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>qe)throw new TypeError(`version is longer than ${qe} characters`);U("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?X[k.LOOSE]:X[k.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>V||this.major<0)throw new TypeError("Invalid major version");if(this.minor>V||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>V||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<V)return i}return n}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(U("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let s=this.prerelease[r],n=e.prerelease[r];if(U("prerelease compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return se(s,n)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],n=e.build[r];if(U("build compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return se(s,n)}while(++r)}inc(e,r,s){if(e.startsWith("pre")){if(!r&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let n=`-${r}`.match(this.options.loose?X[k.PRERELEASELOOSE]:X[k.PRERELEASE]);if(!n||n[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,s),this.inc("pre",r,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,s),this.inc("pre",r,s);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let n=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(r){let i=[r,n];s===!1&&(i=[r]),se(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};ve.exports=ne});var w=p((vi,xe)=>{"use strict";var Pe=I(),_t=(t,e,r=!1)=>{if(t instanceof Pe)return t;try{return new Pe(t,e)}catch(s){if(!r)return null;throw s}};xe.exports=_t});var De=p((Pi,Ce)=>{"use strict";var Ht=w(),Wt=(t,e)=>{let r=Ht(t,e);return r?r.version:null};Ce.exports=Wt});var je=p((xi,ye)=>{"use strict";var Mt=w(),Yt=(t,e)=>{let r=Mt(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};ye.exports=Yt});var be=p((Ci,Ge)=>{"use strict";var Fe=I(),Bt=(t,e,r,s,n)=>{typeof r=="string"&&(n=s,s=r,r=void 0);try{return new Fe(t instanceof Fe?t.version:t,r).inc(e,s,n).version}catch(i){return null}};Ge.exports=Bt});var Xe=p((Di,Ve)=>{"use strict";var Ue=w(),zt=(t,e)=>{let r=Ue(t,null,!0),s=Ue(e,null,!0),n=r.compare(s);if(n===0)return null;let i=n>0,o=i?r:s,a=i?s:r,u=!!o.prerelease.length;if(!!a.prerelease.length&&!u){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let $=u?"pre":"";return r.major!==s.major?$+"major":r.minor!==s.minor?$+"minor":r.patch!==s.patch?$+"patch":"prerelease"};Ve.exports=zt});var _e=p((yi,ke)=>{"use strict";var Kt=I(),Zt=(t,e)=>new Kt(t,e).major;ke.exports=Zt});var We=p((ji,He)=>{"use strict";var Jt=I(),Qt=(t,e)=>new Jt(t,e).minor;He.exports=Qt});var Ye=p((Fi,Me)=>{"use strict";var es=I(),rs=(t,e)=>new es(t,e).patch;Me.exports=rs});var ze=p((Gi,Be)=>{"use strict";var ts=w(),ss=(t,e)=>{let r=ts(t,e);return r&&r.prerelease.length?r.prerelease:null};Be.exports=ss});var S=p((bi,Ze)=>{"use strict";var Ke=I(),ns=(t,e,r)=>new Ke(t,r).compare(new Ke(e,r));Ze.exports=ns});var Qe=p((Ui,Je)=>{"use strict";var is=S(),os=(t,e,r)=>is(e,t,r);Je.exports=os});var rr=p((Vi,er)=>{"use strict";var as=S(),cs=(t,e)=>as(t,e,!0);er.exports=cs});var _=p((Xi,sr)=>{"use strict";var tr=I(),ls=(t,e,r)=>{let s=new tr(t,r),n=new tr(e,r);return s.compare(n)||s.compareBuild(n)};sr.exports=ls});var ir=p((ki,nr)=>{"use strict";var us=_(),fs=(t,e)=>t.sort((r,s)=>us(r,s,e));nr.exports=fs});var ar=p((_i,or)=>{"use strict";var hs=_(),Es=(t,e)=>t.sort((r,s)=>hs(s,r,e));or.exports=Es});var C=p((Hi,cr)=>{"use strict";var ps=S(),ms=(t,e,r)=>ps(t,e,r)>0;cr.exports=ms});var H=p((Wi,lr)=>{"use strict";var $s=S(),Rs=(t,e,r)=>$s(t,e,r)<0;lr.exports=Rs});var ie=p((Mi,ur)=>{"use strict";var ds=S(),Is=(t,e,r)=>ds(t,e,r)===0;ur.exports=Is});var oe=p((Yi,fr)=>{"use strict";var gs=S(),Ls=(t,e,r)=>gs(t,e,r)!==0;fr.exports=Ls});var W=p((Bi,hr)=>{"use strict";var Ns=S(),Ss=(t,e,r)=>Ns(t,e,r)>=0;hr.exports=Ss});var M=p((zi,Er)=>{"use strict";var Os=S(),Ts=(t,e,r)=>Os(t,e,r)<=0;Er.exports=Ts});var ae=p((Ki,pr)=>{"use strict";var As=ie(),ws=oe(),qs=C(),vs=W(),Ps=H(),xs=M(),Cs=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return As(t,r,s);case"!=":return ws(t,r,s);case">":return qs(t,r,s);case">=":return vs(t,r,s);case"<":return Ps(t,r,s);case"<=":return xs(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};pr.exports=Cs});var $r=p((Zi,mr)=>{"use strict";var Ds=I(),ys=w(),{safeRe:Y,t:B}=q(),js=(t,e)=>{if(t instanceof Ds)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?Y[B.COERCEFULL]:Y[B.COERCE]);else{let u=e.includePrerelease?Y[B.COERCERTLFULL]:Y[B.COERCERTL],f;for(;(f=u.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||f.index+f[0].length!==r.index+r[0].length)&&(r=f),u.lastIndex=f.index+f[1].length+f[2].length;u.lastIndex=-1}if(r===null)return null;let s=r[2],n=r[3]||"0",i=r[4]||"0",o=e.includePrerelease&&r[5]?`-${r[5]}`:"",a=e.includePrerelease&&r[6]?`+${r[6]}`:"";return ys(`${s}.${n}.${i}${o}${a}`,e)};mr.exports=js});var dr=p((Ji,Rr)=>{"use strict";var ce=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,r)}return this}};Rr.exports=ce});var O=p((Qi,Nr)=>{"use strict";var Fs=/\s+/g,le=class t{constructor(e,r){if(r=bs(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof ue)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(Fs," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(n=>!gr(n[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&Ws(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let s=0;s<r.length;s++)s>0&&(this.formatted+=" "),this.formatted+=r[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&_s)|(this.options.loose&&Hs))+":"+e,n=Ir.get(s);if(n)return n;let i=this.options.loose,o=i?L[g.HYPHENRANGELOOSE]:L[g.HYPHENRANGE];e=e.replace(o,rn(this.options.includePrerelease)),R("hyphen replace",e),e=e.replace(L[g.COMPARATORTRIM],Vs),R("comparator trim",e),e=e.replace(L[g.TILDETRIM],Xs),R("tilde trim",e),e=e.replace(L[g.CARETTRIM],ks),R("caret trim",e);let a=e.split(" ").map(h=>Ms(h,this.options)).join(" ").split(/\s+/).map(h=>en(h,this.options));i&&(a=a.filter(h=>(R("loose invalid filter",h,this.options),!!h.match(L[g.COMPARATORLOOSE])))),R("range list",a);let u=new Map,f=a.map(h=>new ue(h,this.options));for(let h of f){if(gr(h))return[h];u.set(h.value,h)}u.size>1&&u.has("")&&u.delete("");let $=[...u.values()];return Ir.set(s,$),$}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>Lr(s,r)&&e.set.some(n=>Lr(n,r)&&s.every(i=>n.every(o=>i.intersects(o,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Us(e,this.options)}catch(r){return!1}for(let r=0;r<this.set.length;r++)if(tn(this.set[r],e,this.options))return!0;return!1}};Nr.exports=le;var Gs=dr(),Ir=new Gs,bs=b(),ue=D(),R=x(),Us=I(),{safeRe:L,t:g,comparatorTrimReplace:Vs,tildeTrimReplace:Xs,caretTrimReplace:ks}=q(),{FLAG_INCLUDE_PRERELEASE:_s,FLAG_LOOSE:Hs}=P(),gr=t=>t.value==="<0.0.0-0",Ws=t=>t.value==="",Lr=(t,e)=>{let r=!0,s=t.slice(),n=s.pop();for(;r&&s.length;)r=s.every(i=>n.intersects(i,e)),n=s.pop();return r},Ms=(t,e)=>(t=t.replace(L[g.BUILD],""),R("comp",t,e),t=zs(t,e),R("caret",t),t=Ys(t,e),R("tildes",t),t=Zs(t,e),R("xrange",t),t=Qs(t,e),R("stars",t),t),N=t=>!t||t.toLowerCase()==="x"||t==="*",Ys=(t,e)=>t.trim().split(/\s+/).map(r=>Bs(r,e)).join(" "),Bs=(t,e)=>{let r=e.loose?L[g.TILDELOOSE]:L[g.TILDE];return t.replace(r,(s,n,i,o,a)=>{R("tilde",t,s,n,i,o,a);let u;return N(n)?u="":N(i)?u=`>=${n}.0.0 <${+n+1}.0.0-0`:N(o)?u=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:a?(R("replaceTilde pr",a),u=`>=${n}.${i}.${o}-${a} <${n}.${+i+1}.0-0`):u=`>=${n}.${i}.${o} <${n}.${+i+1}.0-0`,R("tilde return",u),u})},zs=(t,e)=>t.trim().split(/\s+/).map(r=>Ks(r,e)).join(" "),Ks=(t,e)=>{R("caret",t,e);let r=e.loose?L[g.CARETLOOSE]:L[g.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(n,i,o,a,u)=>{R("caret",t,n,i,o,a,u);let f;return N(i)?f="":N(o)?f=`>=${i}.0.0${s} <${+i+1}.0.0-0`:N(a)?i==="0"?f=`>=${i}.${o}.0${s} <${i}.${+o+1}.0-0`:f=`>=${i}.${o}.0${s} <${+i+1}.0.0-0`:u?(R("replaceCaret pr",u),i==="0"?o==="0"?f=`>=${i}.${o}.${a}-${u} <${i}.${o}.${+a+1}-0`:f=`>=${i}.${o}.${a}-${u} <${i}.${+o+1}.0-0`:f=`>=${i}.${o}.${a}-${u} <${+i+1}.0.0-0`):(R("no pr"),i==="0"?o==="0"?f=`>=${i}.${o}.${a}${s} <${i}.${o}.${+a+1}-0`:f=`>=${i}.${o}.${a}${s} <${i}.${+o+1}.0-0`:f=`>=${i}.${o}.${a} <${+i+1}.0.0-0`),R("caret return",f),f})},Zs=(t,e)=>(R("replaceXRanges",t,e),t.split(/\s+/).map(r=>Js(r,e)).join(" ")),Js=(t,e)=>{t=t.trim();let r=e.loose?L[g.XRANGELOOSE]:L[g.XRANGE];return t.replace(r,(s,n,i,o,a,u)=>{R("xRange",t,s,n,i,o,a,u);let f=N(i),$=f||N(o),h=$||N(a),d=h;return n==="="&&d&&(n=""),u=e.includePrerelease?"-0":"",f?n===">"||n==="<"?s="<0.0.0-0":s="*":n&&d?($&&(o=0),a=0,n===">"?(n=">=",$?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):n==="<="&&(n="<",$?i=+i+1:o=+o+1),n==="<"&&(u="-0"),s=`${n+i}.${o}.${a}${u}`):$?s=`>=${i}.0.0${u} <${+i+1}.0.0-0`:h&&(s=`>=${i}.${o}.0${u} <${i}.${+o+1}.0-0`),R("xRange return",s),s})},Qs=(t,e)=>(R("replaceStars",t,e),t.trim().replace(L[g.STAR],"")),en=(t,e)=>(R("replaceGTE0",t,e),t.trim().replace(L[e.includePrerelease?g.GTE0PRE:g.GTE0],"")),rn=t=>(e,r,s,n,i,o,a,u,f,$,h,d)=>(N(s)?r="":N(n)?r=`>=${s}.0.0${t?"-0":""}`:N(i)?r=`>=${s}.${n}.0${t?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,N(f)?u="":N($)?u=`<${+f+1}.0.0-0`:N(h)?u=`<${f}.${+$+1}.0-0`:d?u=`<=${f}.${$}.${h}-${d}`:t?u=`<${f}.${$}.${+h+1}-0`:u=`<=${u}`,`${r} ${u}`.trim()),tn=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(R(t[s].semver),t[s].semver!==ue.ANY&&t[s].semver.prerelease.length>0){let n=t[s].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var D=p((eo,qr)=>{"use strict";var y=Symbol("SemVer ANY"),Ee=class t{static get ANY(){return y}constructor(e,r){if(r=Sr(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),he("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===y?this.value="":this.value=this.operator+this.semver.version,he("comp",this)}parse(e){let r=this.options.loose?Or[Tr.COMPARATORLOOSE]:Or[Tr.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new Ar(s[2],this.options.loose):this.semver=y}toString(){return this.value}test(e){if(he("Comparator.test",e,this.options.loose),this.semver===y||e===y)return!0;if(typeof e=="string")try{e=new Ar(e,this.options)}catch(r){return!1}return fe(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new wr(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new wr(this.value,r).test(e.semver):(r=Sr(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||fe(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||fe(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};qr.exports=Ee;var Sr=b(),{safeRe:Or,t:Tr}=q(),fe=ae(),he=x(),Ar=I(),wr=O()});var j=p((ro,vr)=>{"use strict";var sn=O(),nn=(t,e,r)=>{try{e=new sn(e,r)}catch(s){return!1}return e.test(t)};vr.exports=nn});var xr=p((to,Pr)=>{"use strict";var on=O(),an=(t,e)=>new on(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Pr.exports=an});var Dr=p((so,Cr)=>{"use strict";var cn=I(),ln=O(),un=(t,e,r)=>{let s=null,n=null,i=null;try{i=new ln(e,r)}catch(o){return null}return t.forEach(o=>{i.test(o)&&(!s||n.compare(o)===-1)&&(s=o,n=new cn(s,r))}),s};Cr.exports=un});var jr=p((no,yr)=>{"use strict";var fn=I(),hn=O(),En=(t,e,r)=>{let s=null,n=null,i=null;try{i=new hn(e,r)}catch(o){return null}return t.forEach(o=>{i.test(o)&&(!s||n.compare(o)===1)&&(s=o,n=new fn(s,r))}),s};yr.exports=En});var br=p((io,Gr)=>{"use strict";var pe=I(),pn=O(),Fr=C(),mn=(t,e)=>{t=new pn(t,e);let r=new pe("0.0.0");if(t.test(r)||(r=new pe("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let n=t.set[s],i=null;n.forEach(o=>{let a=new pe(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!i||Fr(a,i))&&(i=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!r||Fr(r,i))&&(r=i)}return r&&t.test(r)?r:null};Gr.exports=mn});var Vr=p((oo,Ur)=>{"use strict";var $n=O(),Rn=(t,e)=>{try{return new $n(t,e).range||"*"}catch(r){return null}};Ur.exports=Rn});var z=p((ao,Hr)=>{"use strict";var dn=I(),_r=D(),{ANY:In}=_r,gn=O(),Ln=j(),Xr=C(),kr=H(),Nn=M(),Sn=W(),On=(t,e,r,s)=>{t=new dn(t,s),e=new gn(e,s);let n,i,o,a,u;switch(r){case">":n=Xr,i=Nn,o=kr,a=">",u=">=";break;case"<":n=kr,i=Sn,o=Xr,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Ln(t,e,s))return!1;for(let f=0;f<e.set.length;++f){let $=e.set[f],h=null,d=null;if($.forEach(E=>{E.semver===In&&(E=new _r(">=0.0.0")),h=h||E,d=d||E,n(E.semver,h.semver,s)?h=E:o(E.semver,d.semver,s)&&(d=E)}),h.operator===a||h.operator===u||(!d.operator||d.operator===a)&&i(t,d.semver))return!1;if(d.operator===u&&o(t,d.semver))return!1}return!0};Hr.exports=On});var Mr=p((co,Wr)=>{"use strict";var Tn=z(),An=(t,e,r)=>Tn(t,e,">",r);Wr.exports=An});var Br=p((lo,Yr)=>{"use strict";var wn=z(),qn=(t,e,r)=>wn(t,e,"<",r);Yr.exports=qn});var Zr=p((uo,Kr)=>{"use strict";var zr=O(),vn=(t,e,r)=>(t=new zr(t,r),e=new zr(e,r),t.intersects(e,r));Kr.exports=vn});var Qr=p((fo,Jr)=>{"use strict";var Pn=j(),xn=S();Jr.exports=(t,e,r)=>{let s=[],n=null,i=null,o=t.sort(($,h)=>xn($,h,r));for(let $ of o)Pn($,e,r)?(i=$,n||(n=$)):(i&&s.push([n,i]),i=null,n=null);n&&s.push([n,null]);let a=[];for(let[$,h]of s)$===h?a.push($):!h&&$===o[0]?a.push("*"):h?$===o[0]?a.push(`<=${h}`):a.push(`${$} - ${h}`):a.push(`>=${$}`);let u=a.join(" || "),f=typeof e.raw=="string"?e.raw:String(e);return u.length<f.length?u:e}});var it=p((ho,nt)=>{"use strict";var et=O(),$e=D(),{ANY:me}=$e,F=j(),Re=S(),Cn=(t,e,r={})=>{if(t===e)return!0;t=new et(t,r),e=new et(e,r);let s=!1;e:for(let n of t.set){for(let i of e.set){let o=yn(n,i,r);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},Dn=[new $e(">=0.0.0-0")],rt=[new $e(">=0.0.0")],yn=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===me){if(e.length===1&&e[0].semver===me)return!0;r.includePrerelease?t=Dn:t=rt}if(e.length===1&&e[0].semver===me){if(r.includePrerelease)return!0;e=rt}let s=new Set,n,i;for(let E of t)E.operator===">"||E.operator===">="?n=tt(n,E,r):E.operator==="<"||E.operator==="<="?i=st(i,E,r):s.add(E.semver);if(s.size>1)return null;let o;if(n&&i){if(o=Re(n.semver,i.semver,r),o>0)return null;if(o===0&&(n.operator!==">="||i.operator!=="<="))return null}for(let E of s){if(n&&!F(E,String(n),r)||i&&!F(E,String(i),r))return null;for(let pt of e)if(!F(E,String(pt),r))return!1;return!0}let a,u,f,$,h=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1,d=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1;h&&h.prerelease.length===1&&i.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(let E of e){if($=$||E.operator===">"||E.operator===">=",f=f||E.operator==="<"||E.operator==="<=",n){if(d&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===d.major&&E.semver.minor===d.minor&&E.semver.patch===d.patch&&(d=!1),E.operator===">"||E.operator===">="){if(a=tt(n,E,r),a===E&&a!==n)return!1}else if(n.operator===">="&&!F(n.semver,String(E),r))return!1}if(i){if(h&&E.semver.prerelease&&E.semver.prerelease.length&&E.semver.major===h.major&&E.semver.minor===h.minor&&E.semver.patch===h.patch&&(h=!1),E.operator==="<"||E.operator==="<="){if(u=st(i,E,r),u===E&&u!==i)return!1}else if(i.operator==="<="&&!F(i.semver,String(E),r))return!1}if(!E.operator&&(i||n)&&o!==0)return!1}return!(n&&f&&!i&&o!==0||i&&$&&!n&&o!==0||d||h)},tt=(t,e,r)=>{if(!t)return e;let s=Re(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},st=(t,e,r)=>{if(!t)return e;let s=Re(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};nt.exports=Cn});var lt=p((Eo,ct)=>{"use strict";var de=q(),ot=P(),jn=I(),at=te(),Fn=w(),Gn=De(),bn=je(),Un=be(),Vn=Xe(),Xn=_e(),kn=We(),_n=Ye(),Hn=ze(),Wn=S(),Mn=Qe(),Yn=rr(),Bn=_(),zn=ir(),Kn=ar(),Zn=C(),Jn=H(),Qn=ie(),ei=oe(),ri=W(),ti=M(),si=ae(),ni=$r(),ii=D(),oi=O(),ai=j(),ci=xr(),li=Dr(),ui=jr(),fi=br(),hi=Vr(),Ei=z(),pi=Mr(),mi=Br(),$i=Zr(),Ri=Qr(),di=it();ct.exports={parse:Fn,valid:Gn,clean:bn,inc:Un,diff:Vn,major:Xn,minor:kn,patch:_n,prerelease:Hn,compare:Wn,rcompare:Mn,compareLoose:Yn,compareBuild:Bn,sort:zn,rsort:Kn,gt:Zn,lt:Jn,eq:Qn,neq:ei,gte:ri,lte:ti,cmp:si,coerce:ni,Comparator:ii,Range:oi,satisfies:ai,toComparators:ci,maxSatisfying:li,minSatisfying:ui,minVersion:fi,validRange:hi,outside:Ei,gtr:pi,ltr:mi,intersects:$i,simplifyRange:Ri,subset:di,SemVer:jn,re:de.re,src:de.src,tokens:de.t,SEMVER_SPEC_VERSION:ot.SEMVER_SPEC_VERSION,RELEASE_TYPES:ot.RELEASE_TYPES,compareIdentifiers:at.compareIdentifiers,rcompareIdentifiers:at.rcompareIdentifiers}});var Ni={};gt(Ni,{ngAdd:()=>Li});module.exports=Nt(Ni);var Q=require("@angular-devkit/schematics/tasks");var J=require("@angular-devkit/schematics"),A=Lt(lt());var K=t=>JSON.stringify(t,null,2),Z=(t,e,r)=>{t.exists(e)?t.overwrite(e,r):t.create(e,r)};function Ie(t,e){try{return JSON.parse(e.read(t).toString())}catch(r){throw new J.SchematicsException(`Error when parsing ${t}: ${r.message}`)}}var ut=(t,e,r)=>{var n,i;let s=t.exists("package.json")&&Ie("package.json",t);if(s===void 0)throw new J.SchematicsException("Could not locate package.json");(n=s.devDependencies)!=null||(s.devDependencies={}),(i=s.dependencies)!=null||(s.dependencies={}),Object.keys(e).forEach(o=>{let a=e[o],u=a.dev?s.devDependencies:s.dependencies,f=u[o];if(f)try{(0,A.intersects)(f,a.version)||r.logger.warn(`\u26A0\uFE0F The ${o} devDependency specified in your package.json (${f}) does not fulfill AngularFire's dependency (${a.version})`)}catch($){f!==a.version&&r.logger.warn(`\u26A0\uFE0F The ${o} devDependency specified in your package.json (${f}) does not fulfill AngularFire's dependency (${a.version})`)}else u[o]=a.version}),Z(t,"package.json",K(s))},v="^12.4.0",ft=(t,e)=>{var i;if(!t.exists("package.json"))throw new J.SchematicsException("Could not locate package.json");let r=Ie("package.json",t),s=["dependencies","devDependencies"].filter(o=>{var a;return typeof((a=r[o])==null?void 0:a.firebase)=="string"});if(s.length===0)return(i=r.dependencies)!=null||(r.dependencies={}),r.dependencies.firebase=v,e.logger.info(`Added firebase ${v} to your package.json.`),Z(t,"package.json",K(r)),!0;let n=!1;for(let o of s){let a=r[o].firebase,u;try{u=(0,A.subset)(a,v)}catch(f){e.logger.warn(`\u26A0\uFE0F The firebase version in your package.json (${a}) is not a semver range, so it was left as-is; make sure it resolves inside ${v}, the range @angular/fire requires; a version outside it can leave the install with two copies of the firebase SDK.`);continue}u||(r[o].firebase=v,e.logger.info(`Updated the firebase version in your package.json from ${a} to ${v}, the range @angular/fire requires; a workspace range outside it can leave the install with a second copy of the firebase SDK, which fails at runtime.`),n=!0)}return n&&Z(t,"package.json",K(r)),n},Ii="21.0.0-rc.0-canary.f54c0fe",ht=(t,e,r=Ii)=>{if(!t.exists("package.json"))return;let s=Ie("package.json",t),n=["dependencies","devDependencies"].find(o=>{var a;return typeof((a=s[o])==null?void 0:a["@angular/fire"])=="string"});if(!n)return;let i=s[n]["@angular/fire"];if(i.startsWith("^")||i.startsWith("~")){if(!(0,A.valid)(r)){e.logger.warn("Could not determine the installed @angular/fire version; leaving the declared version range as-is.");return}(0,A.prerelease)(r)&&(0,A.satisfies)(r,i,{includePrerelease:!0})&&(s[n]["@angular/fire"]=r,Z(t,"package.json",K(s)),e.logger.info(`Pinned @angular/fire to the exact version ${r} \u2014 a prerelease range like ${i} also matches unreviewed canary builds, so a later install could silently change versions.`))}};var Et={};var Li=t=>(e,r)=>{ut(e,Et,r),ft(e,r),ht(e,r);let s=r.addTask(new Q.NodePackageInstallTask);return r.addTask(new Q.RunSchematicTask("ng-add-setup-project",t),[s]),e};0&&(module.exports={ngAdd});